@thenamespace/ens-components 0.0.6-alpha → 0.0.7-alpha

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.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
2
2
  import { forwardRef, createElement, useState, useRef, useEffect, useCallback, useMemo, createContext, useContext } from 'react';
3
3
  import { isAddress as isAddress$1, parseAbi, namehash, encodeFunctionData, toHex, ContractFunctionExecutionError } from 'viem';
4
- import { mainnet, base as base$1, arbitrum, polygon, optimism, zora } from 'viem/chains';
4
+ import { mainnet, base as base$1, arbitrum, polygon, optimism, zora, celo } from 'viem/chains';
5
5
  import { usePublicClient, useWalletClient, useAccount, useSwitchChain } from 'wagmi';
6
6
 
7
7
  const sizeToClass = {
@@ -671,16 +671,27 @@ const Icon = ({
671
671
  );
672
672
  };
673
673
 
674
- const ChainIcon = ({
675
- chain,
676
- size = 20,
677
- className,
678
- ...props
679
- }) => {
680
- const renderIcon = () => {
681
- switch (chain) {
682
- case "eth":
683
- return /* @__PURE__ */ jsxs("g", { clipPath: "url(#clip0_597_2890)", children: [
674
+ const EthSvg = ({ size = 20, ...props }) => {
675
+ return /* @__PURE__ */ jsxs(
676
+ "svg",
677
+ {
678
+ width: size,
679
+ height: size,
680
+ viewBox: "0 0 20 20",
681
+ fill: "none",
682
+ xmlns: "http://www.w3.org/2000/svg",
683
+ ...props,
684
+ children: [
685
+ /* @__PURE__ */ jsx("defs", { children: /* @__PURE__ */ jsx("clipPath", { id: "clip0_597_2890", children: /* @__PURE__ */ jsx(
686
+ "rect",
687
+ {
688
+ width: "19",
689
+ height: "19",
690
+ fill: "white",
691
+ transform: "translate(0.255859 0.5)"
692
+ }
693
+ ) }) }),
694
+ /* @__PURE__ */ jsxs("g", { clipPath: "url(#clip0_597_2890)", children: [
684
695
  /* @__PURE__ */ jsx(
685
696
  "path",
686
697
  {
@@ -734,180 +745,299 @@ const ChainIcon = ({
734
745
  fillOpacity: "0.602"
735
746
  }
736
747
  )
737
- ] });
738
- case "arb":
739
- return /* @__PURE__ */ jsxs(Fragment, { children: [
740
- /* @__PURE__ */ jsx(
741
- "path",
742
- {
743
- fill: "#2d374b",
744
- d: "m24.554 20.16 3.23-5.482 8.71 13.565.005 2.604-.029-17.915a1.35 1.35 0 0 0-.624-1.075l-15.68-9.02a1.38 1.38 0 0 0-1.339.087l-.055.034-15.22 8.82-.06.028a1.34 1.34 0 0 0-.787 1.146L2.73 27.55l8.113-12.574c1.02-1.667 3.246-2.205 5.313-2.175l2.424.064-14.286 22.91 1.684.97 14.457-23.857 6.39-.023-14.42 24.459 6.01 3.457.718.412c.303.124.661.13.968.02L36 31.996l-3.04 1.762zm1.232 17.757-6.069-9.526 3.705-6.287 7.971 12.564-5.607 3.25Z"
745
- }
746
- ),
747
- /* @__PURE__ */ jsx(
748
- "path",
749
- {
750
- fill: "#28a0f0",
751
- d: "m19.715 28.392 6.07 9.525 5.606-3.249-7.97-12.564zm16.783 2.455-.004-2.604-8.71-13.565-3.231 5.483 8.408 13.598L36 31.997c.298-.242.479-.597.498-.98z"
752
- }
753
- ),
754
- /* @__PURE__ */ jsx(
755
- "path",
756
- {
757
- fill: "#fff",
758
- d: "m0 33.302 4.293 2.474L18.58 12.865l-2.424-.064c-2.066-.03-4.291.508-5.313 2.175L2.73 27.55 0 31.743zm26.825-20.437-6.39.023L5.976 36.745l5.053 2.91 1.375-2.331 14.42-24.46Z"
759
- }
760
- ),
761
- /* @__PURE__ */ jsx(
762
- "path",
763
- {
764
- fill: "#96bedc",
765
- d: "M39.191 12.832a4.07 4.07 0 0 0-1.91-3.272L21.394.424a4.13 4.13 0 0 0-3.645 0C17.617.49 2.3 9.373 2.3 9.373a4.04 4.04 0 0 0-2.3 3.45v18.92l2.73-4.194-.024-14.599a1.35 1.35 0 0 1 .562-1.015c.071-.05 15.649-9.068 15.699-9.093a1.38 1.38 0 0 1 1.198-.006l15.68 9.02c.371.236.604.637.624 1.075v18.084c-.018.383-.17.739-.468.98l-3.04 1.763-1.569.909-5.607 3.249-5.685 3.295a1.38 1.38 0 0 1-.968-.02l-6.727-3.868-1.375 2.33 6.046 3.481.524.297c.226.127.38.211.435.238.43.209 1.048.33 1.605.33.51 0 1.009-.094 1.48-.278l16.515-9.564a4.04 4.04 0 0 0 1.556-3.042z"
766
- }
767
- )
768
- ] });
769
- case "base":
770
- return /* @__PURE__ */ jsx(
748
+ ] })
749
+ ]
750
+ }
751
+ );
752
+ };
753
+
754
+ const ArbSvg = ({ size = 20, ...props }) => {
755
+ return /* @__PURE__ */ jsxs(
756
+ "svg",
757
+ {
758
+ width: size,
759
+ height: size,
760
+ viewBox: "0 0 40 44",
761
+ fill: "none",
762
+ xmlns: "http://www.w3.org/2000/svg",
763
+ ...props,
764
+ children: [
765
+ /* @__PURE__ */ jsx(
771
766
  "path",
772
767
  {
773
- fill: "#0052ff",
774
- d: "M54.921 110.034c30.438 0 55.113-24.632 55.113-55.017S85.359 0 54.921 0C26.043 0 2.353 22.171 0 50.392h72.847v9.25H0c2.353 28.22 26.043 50.392 54.921 50.392"
768
+ fill: "#2d374b",
769
+ d: "m24.554 20.16 3.23-5.482 8.71 13.565.005 2.604-.029-17.915a1.35 1.35 0 0 0-.624-1.075l-15.68-9.02a1.38 1.38 0 0 0-1.339.087l-.055.034-15.22 8.82-.06.028a1.34 1.34 0 0 0-.787 1.146L2.73 27.55l8.113-12.574c1.02-1.667 3.246-2.205 5.313-2.175l2.424.064-14.286 22.91 1.684.97 14.457-23.857 6.39-.023-14.42 24.459 6.01 3.457.718.412c.303.124.661.13.968.02L36 31.996l-3.04 1.762zm1.232 17.757-6.069-9.526 3.705-6.287 7.971 12.564-5.607 3.25Z"
775
770
  }
776
- );
777
- case "bitcoin":
778
- return /* @__PURE__ */ jsx(
771
+ ),
772
+ /* @__PURE__ */ jsx(
779
773
  "path",
780
774
  {
781
- fill: "#f39321",
782
- d: "M43.43 125.143c7.71-10.766 14.875-21.901 23.562-31.986 15.8-18.343 33.692-34.063 54.18-47.075 18.379-11.672 37.761-20.872 58.501-27.305 32.294-10.018 65.26-12.997 98.838-9.165 24.544 2.801 48.191 9.067 70.713 19.215 13.633 6.142 26.456 13.731 39.025 21.927 25.328 16.515 45.618 38.014 62.58 62.577 18.116 26.236 29.889 55.421 36.346 86.725 4.535 21.983 6.449 44.171 4.503 66.504-2.399 27.536-8.514 54.086-19.938 79.604-9.662 21.583-21.589 41.401-36.861 59.301-14.94 17.511-31.788 32.831-51.149 45.461-13.184 8.6-26.926 16.276-41.434 21.975-24.274 9.537-49.447 15.986-75.787 17.115-18.545.795-36.985.483-55.279-2.763-15.713-2.788-31.049-6.858-46.063-12.496-14.566-5.47-28.693-11.95-41.709-20.143-18.766-11.812-35.683-26.147-50.737-42.663-16.773-18.403-30.373-38.808-40.779-61.344-14.7-31.835-21.929-65.401-22.359-100.425-.162-13.173 1.349-26.244 3.105-39.283.126-.933-.002-1.899-.012-2.851 1.536-.952 1.4-2.618 1.677-4.071 3.906-20.483 10.494-40.059 19.418-58.906 3.162-6.674 7.525-12.764 9.659-19.928m281.727 129.37c6.537-3.474 12.749-5.465 17.658-9.85 18.918-16.899 23.96-56.673-6.747-75.833-9.566-5.969-19.77-10.393-30.77-14.907 1.819-14.731 7.709-28.516 9.622-43.603-9.076-2.249-17.578-5.234-26.425-6.193l-10.674 41.837c-6.78-2.076-13.761-1.879-20.142-5.473 2.302-14.39 7.773-27.872 9.268-42.314-9.322-1.464-17.216-5.094-26.265-5.485l-10.586 42.215c-17.944-2.75-34.419-8.921-52.52-12.239-3.977 8.91-5.738 18.311-7.334 28.313 5.896 1.392 11.022 2.623 16.158 3.811 12.965 2.998 16.517 10.086 13.439 21.424-2.19 8.065-4.166 16.189-6.182 24.301-7.245 29.16-14.432 58.333-21.72 87.482-1.642 6.567-5.734 8.706-12.398 7.731-6.563-.96-12.757-3.907-19.99-3.693-3.136 10.032-9.378 18.871-11.588 29.946l51.344 13.08c-1.312 15.208-7.614 29.125-9.476 44.441l25.544 6.123c5.653-14.044 6.957-28.803 12.226-43.33 6.351 3.265 13.397 2.317 19.612 6.427l-10.178 42.077c8.986 3.216 17.753 4.528 26.758 6.77l10.578-42.386c2.123-1.091 3.676-.888 5.143-.574a132.9 132.9 0 0 0 42.676 2.14c12.368-1.373 23.343-6.088 32.148-15.372 9.791-10.323 14.71-22.952 17.078-36.535 1.93-11.065 1.436-22.277-5.06-32.071-5.091-7.674-12.084-13.53-21.197-18.26M223.128 312.17c17.411 4.325 34.803 8.95 53.02 5.624 9.715-1.774 17.037-6.73 19.985-16.503 2.78-9.218 1.164-17.593-5.673-24.879-7.11-7.576-16.254-11.514-25.682-14.807-11.264-3.934-22.683-7.508-34.99-8.48l-13.972 56.788c2.981.929 5.117 1.712 7.312 2.257m61.5-80.324c9.628-1.368 17.612-7.738 19.958-16.393 2.869-10.583-.337-19.865-8.902-26.178-9.718-7.163-20.908-10.807-32.47-13.337-4.307-.943-8.544-3.454-13.756-1.759l-12.599 51.209c16.457 4.155 31.611 8.753 47.769 6.458"
775
+ fill: "#28a0f0",
776
+ d: "m19.715 28.392 6.07 9.525 5.606-3.249-7.97-12.564zm16.783 2.455-.004-2.604-8.71-13.565-3.231 5.483 8.408 13.598L36 31.997c.298-.242.479-.597.498-.98z"
783
777
  }
784
- );
785
- case "matic":
786
- return /* @__PURE__ */ jsx("path", { d: "M377.3 163.9c-9.2-5.4-21.2-5.4-31.4 0l-72 41.7-48.9 27.2-72 41.7c-9.2 5.4-21.2 5.4-31.4 0l-57.2-32.6c-9.2-5.4-15.7-15.4-15.7-26.3v-64.3c0-10.9 5.5-20.8 15.7-26.3l56.3-31.7c9.2-5.4 21.2-5.4 31.4 0l56.3 31.7c9.2 5.4 15.7 15.4 15.7 26.3V193l48.9-28.1v-41.7c0-10.9-5.5-20.8-15.7-26.3L153.1 37.1c-9.2-5.4-21.2-5.4-31.4 0l-106 59.8C5.5 102.3 0 112.3 0 123.2v120.5c0 10.9 5.5 20.8 15.7 26.3l106.1 59.8c9.2 5.4 21.2 5.4 31.4 0l72-40.8 48.9-28.1 72-40.8c9.2-5.4 21.2-5.4 31.4 0l56.3 31.7c9.2 5.4 15.7 15.4 15.7 26.3v64.3c0 10.9-5.5 20.8-15.7 26.3l-56.3 32.6c-9.2 5.4-21.2 5.4-31.4 0l-56.3-31.7c-9.2-5.4-15.7-15.4-15.7-26.3v-41.7l-48.9 28.1v41.7c0 10.9 5.5 20.8 15.7 26.3L347 457.5c9.2 5.4 21.2 5.4 31.4 0l106.1-59.8c9.2-5.4 15.7-15.4 15.7-26.3V250.9c0-10.9-5.5-20.8-15.7-26.3z" });
787
- case "op":
788
- return /* @__PURE__ */ jsxs(Fragment, { children: [
789
- /* @__PURE__ */ jsx(
790
- "path",
791
- {
792
- fill: "#ff0420",
793
- d: "M42 84c23.196 0 42-18.804 42-42S65.196 0 42 0 0 18.804 0 42s18.804 42 42 42"
794
- }
795
- ),
796
- /* @__PURE__ */ jsx(
797
- "path",
798
- {
799
- fill: "#fff",
800
- d: "M30.461 53.76q-3.8 0-6.226-1.83-2.395-1.861-2.395-5.291 0-.72.16-1.764.414-2.352 1.181-5.651 2.171-8.984 11.208-8.984 2.46 0 4.407.85 1.947.817 3.065 2.482 1.118 1.635 1.118 3.92 0 .687-.16 1.732a76 76 0 0 1-1.15 5.65q-1.116 4.476-3.863 6.697-2.747 2.19-7.345 2.19Zm.448-4.704q1.788 0 3.033-1.078 1.277-1.077 1.82-3.3.735-3.07 1.118-5.356.127-.687.127-1.405 0-2.973-3.033-2.973-1.788 0-3.065 1.078-1.245 1.078-1.789 3.3-.574 2.188-1.15 5.357a7 7 0 0 0-.127 1.372q0 3.005 3.066 3.005m13.536 4.377q-.351 0-.543-.229a.8.8 0 0 1-.096-.588l4.407-21.233a.94.94 0 0 1 .351-.588.96.96 0 0 1 .607-.229h8.494q3.544 0 5.684 1.503 2.17 1.503 2.171 4.345a8 8 0 0 1-.192 1.698q-.798 3.757-3.225 5.554-2.395 1.797-6.578 1.797h-4.31l-1.47 7.153a.94.94 0 0 1-.35.588.96.96 0 0 1-.607.23zm11.304-12.478q1.34 0 2.33-.752 1.023-.751 1.342-2.156.096-.555.096-.98 0-.947-.543-1.437-.544-.523-1.852-.523H53.29l-1.213 5.848z"
801
- }
802
- )
803
- ] });
804
- case "sol":
805
- return /* @__PURE__ */ jsxs(Fragment, { children: [
806
- /* @__PURE__ */ jsx("path", { d: "M250 0c138 0 250 111.9 250 250S388 500 250 500 0 388 0 250 111.9 0 250 0" }),
807
- /* @__PURE__ */ jsxs(
808
- "linearGradient",
809
- {
810
- id: "SolIcon_svg__a",
811
- x1: "242.52",
812
- x2: "755.68",
813
- y1: "267.33",
814
- y2: "-245.83",
815
- gradientTransform: "matrix(.5 0 0 .5 0 250)",
816
- gradientUnits: "userSpaceOnUse",
817
- children: [
818
- /* @__PURE__ */ jsx("stop", { offset: "0", style: { stopColor: "rgb(203, 78, 232)" } }),
819
- /* @__PURE__ */ jsx("stop", { offset: "1", style: { stopColor: "rgb(16, 244, 177)" } })
820
- ]
821
- }
822
- ),
823
- /* @__PURE__ */ jsx(
824
- "path",
825
- {
826
- d: "M115.6 226.1H347c2.9 0 5.6 1.1 7.6 3.2l36.6 36.8c6.8 6.8 2 18.4-7.6 18.4H152.2c-2.9 0-5.6-1.1-7.6-3.2L108 244.5c-6.8-6.7-2-18.4 7.6-18.4m-7.7-48.8 36.6-36.8c2.1-2.1 4.8-3.2 7.6-3.2h231.3c9.6 0 14.5 11.6 7.6 18.4l-36.5 36.8c-2 2.1-4.8 3.2-7.6 3.2H115.6c-9.6 0-14.4-11.6-7.7-18.4m283.2 156.2-36.6 36.9c-2 2-4.8 3.2-7.6 3.2H115.6c-9.6 0-14.4-11.6-7.7-18.4l36.6-36.9c2.1-2 4.8-3.2 7.6-3.2h231.3c9.7-.1 14.6 11.5 7.7 18.4",
827
- style: {
828
- fillRule: "evenodd",
829
- clipRule: "evenodd",
830
- fill: "url(#SolIcon_svg__a)"
831
- }
832
- }
833
- )
834
- ] });
835
- case "zora":
836
- return /* @__PURE__ */ jsxs(Fragment, { children: [
837
- /* @__PURE__ */ jsx(
838
- "path",
839
- {
840
- fill: "url(#ZoraIcon_svg__a)",
841
- d: "M70.615 141.23C31.615 141.23 0 109.615 0 70.615S31.616 0 70.615 0c39 0 70.615 31.615 70.615 70.615s-31.615 70.615-70.614 70.615Z"
842
- }
843
- ),
844
- /* @__PURE__ */ jsx("defs", { children: /* @__PURE__ */ jsxs(
845
- "radialGradient",
846
- {
847
- id: "ZoraIcon_svg__a",
848
- cx: "0",
849
- cy: "0",
850
- r: "1",
851
- gradientTransform: "translate(102.676 37.972)scale(-119.284)",
852
- gradientUnits: "userSpaceOnUse",
853
- children: [
854
- /* @__PURE__ */ jsx("stop", { offset: "0.007", stopColor: "#f2cefe" }),
855
- /* @__PURE__ */ jsx("stop", { offset: "0.191", stopColor: "#afbaf1" }),
856
- /* @__PURE__ */ jsx("stop", { offset: "0.498", stopColor: "#4281d3" }),
857
- /* @__PURE__ */ jsx("stop", { offset: "0.667", stopColor: "#2e427d" }),
858
- /* @__PURE__ */ jsx("stop", { offset: "0.823", stopColor: "#230101" }),
859
- /* @__PURE__ */ jsx("stop", { offset: "1", stopColor: "#8f6b40" })
860
- ]
778
+ ),
779
+ /* @__PURE__ */ jsx(
780
+ "path",
781
+ {
782
+ fill: "#fff",
783
+ d: "m0 33.302 4.293 2.474L18.58 12.865l-2.424-.064c-2.066-.03-4.291.508-5.313 2.175L2.73 27.55 0 31.743zm26.825-20.437-6.39.023L5.976 36.745l5.053 2.91 1.375-2.331 14.42-24.46Z"
784
+ }
785
+ ),
786
+ /* @__PURE__ */ jsx(
787
+ "path",
788
+ {
789
+ fill: "#96bedc",
790
+ d: "M39.191 12.832a4.07 4.07 0 0 0-1.91-3.272L21.394.424a4.13 4.13 0 0 0-3.645 0C17.617.49 2.3 9.373 2.3 9.373a4.04 4.04 0 0 0-2.3 3.45v18.92l2.73-4.194-.024-14.599a1.35 1.35 0 0 1 .562-1.015c.071-.05 15.649-9.068 15.699-9.093a1.38 1.38 0 0 1 1.198-.006l15.68 9.02c.371.236.604.637.624 1.075v18.084c-.018.383-.17.739-.468.98l-3.04 1.763-1.569.909-5.607 3.249-5.685 3.295a1.38 1.38 0 0 1-.968-.02l-6.727-3.868-1.375 2.33 6.046 3.481.524.297c.226.127.38.211.435.238.43.209 1.048.33 1.605.33.51 0 1.009-.094 1.48-.278l16.515-9.564a4.04 4.04 0 0 0 1.556-3.042z"
791
+ }
792
+ )
793
+ ]
794
+ }
795
+ );
796
+ };
797
+
798
+ const BaseSvg = ({ size = 20, ...props }) => {
799
+ return /* @__PURE__ */ jsx(
800
+ "svg",
801
+ {
802
+ width: size,
803
+ height: size,
804
+ viewBox: "0 0 111 111",
805
+ fill: "none",
806
+ xmlns: "http://www.w3.org/2000/svg",
807
+ ...props,
808
+ children: /* @__PURE__ */ jsx(
809
+ "path",
810
+ {
811
+ fill: "#0052ff",
812
+ d: "M54.921 110.034c30.438 0 55.113-24.632 55.113-55.017S85.359 0 54.921 0C26.043 0 2.353 22.171 0 50.392h72.847v9.25H0c2.353 28.22 26.043 50.392 54.921 50.392"
813
+ }
814
+ )
815
+ }
816
+ );
817
+ };
818
+
819
+ const BitcoinSvg = ({ size = 20, ...props }) => {
820
+ return /* @__PURE__ */ jsx(
821
+ "svg",
822
+ {
823
+ width: size,
824
+ height: size,
825
+ viewBox: "0 0 500 500",
826
+ fill: "none",
827
+ xmlns: "http://www.w3.org/2000/svg",
828
+ ...props,
829
+ children: /* @__PURE__ */ jsx(
830
+ "path",
831
+ {
832
+ fill: "#f39321",
833
+ d: "M43.43 125.143c7.71-10.766 14.875-21.901 23.562-31.986 15.8-18.343 33.692-34.063 54.18-47.075 18.379-11.672 37.761-20.872 58.501-27.305 32.294-10.018 65.26-12.997 98.838-9.165 24.544 2.801 48.191 9.067 70.713 19.215 13.633 6.142 26.456 13.731 39.025 21.927 25.328 16.515 45.618 38.014 62.58 62.577 18.116 26.236 29.889 55.421 36.346 86.725 4.535 21.983 6.449 44.171 4.503 66.504-2.399 27.536-8.514 54.086-19.938 79.604-9.662 21.583-21.589 41.401-36.861 59.301-14.94 17.511-31.788 32.831-51.149 45.461-13.184 8.6-26.926 16.276-41.434 21.975-24.274 9.537-49.447 15.986-75.787 17.115-18.545.795-36.985.483-55.279-2.763-15.713-2.788-31.049-6.858-46.063-12.496-14.566-5.47-28.693-11.95-41.709-20.143-18.766-11.812-35.683-26.147-50.737-42.663-16.773-18.403-30.373-38.808-40.779-61.344-14.7-31.835-21.929-65.401-22.359-100.425-.162-13.173 1.349-26.244 3.105-39.283.126-.933-.002-1.899-.012-2.851 1.536-.952 1.4-2.618 1.677-4.071 3.906-20.483 10.494-40.059 19.418-58.906 3.162-6.674 7.525-12.764 9.659-19.928m281.727 129.37c6.537-3.474 12.749-5.465 17.658-9.85 18.918-16.899 23.96-56.673-6.747-75.833-9.566-5.969-19.77-10.393-30.77-14.907 1.819-14.731 7.709-28.516 9.622-43.603-9.076-2.249-17.578-5.234-26.425-6.193l-10.674 41.837c-6.78-2.076-13.761-1.879-20.142-5.473 2.302-14.39 7.773-27.872 9.268-42.314-9.322-1.464-17.216-5.094-26.265-5.485l-10.586 42.215c-17.944-2.75-34.419-8.921-52.52-12.239-3.977 8.91-5.738 18.311-7.334 28.313 5.896 1.392 11.022 2.623 16.158 3.811 12.965 2.998 16.517 10.086 13.439 21.424-2.19 8.065-4.166 16.189-6.182 24.301-7.245 29.16-14.432 58.333-21.72 87.482-1.642 6.567-5.734 8.706-12.398 7.731-6.563-.96-12.757-3.907-19.99-3.693-3.136 10.032-9.378 18.871-11.588 29.946l51.344 13.08c-1.312 15.208-7.614 29.125-9.476 44.441l25.544 6.123c5.653-14.044 6.957-28.803 12.226-43.33 6.351 3.265 13.397 2.317 19.612 6.427l-10.178 42.077c8.986 3.216 17.753 4.528 26.758 6.77l10.578-42.386c2.123-1.091 3.676-.888 5.143-.574a132.9 132.9 0 0 0 42.676 2.14c12.368-1.373 23.343-6.088 32.148-15.372 9.791-10.323 14.71-22.952 17.078-36.535 1.93-11.065 1.436-22.277-5.06-32.071-5.091-7.674-12.084-13.53-21.197-18.26M223.128 312.17c17.411 4.325 34.803 8.95 53.02 5.624 9.715-1.774 17.037-6.73 19.985-16.503 2.78-9.218 1.164-17.593-5.673-24.879-7.11-7.576-16.254-11.514-25.682-14.807-11.264-3.934-22.683-7.508-34.99-8.48l-13.972 56.788c2.981.929 5.117 1.712 7.312 2.257m61.5-80.324c9.628-1.368 17.612-7.738 19.958-16.393 2.869-10.583-.337-19.865-8.902-26.178-9.718-7.163-20.908-10.807-32.47-13.337-4.307-.943-8.544-3.454-13.756-1.759l-12.599 51.209c16.457 4.155 31.611 8.753 47.769 6.458"
834
+ }
835
+ )
836
+ }
837
+ );
838
+ };
839
+
840
+ const MaticSvg = ({ size = 20, ...props }) => {
841
+ return /* @__PURE__ */ jsx(
842
+ "svg",
843
+ {
844
+ width: size,
845
+ height: size,
846
+ viewBox: "0 0 32 32",
847
+ fill: "none",
848
+ xmlns: "http://www.w3.org/2000/svg",
849
+ ...props,
850
+ children: /* @__PURE__ */ jsxs("g", { fill: "none", children: [
851
+ /* @__PURE__ */ jsx("circle", { fill: "#6F41D8", cx: "16", cy: "16", r: "16" }),
852
+ /* @__PURE__ */ jsx("path", { d: "M21.092 12.693c-.369-.215-.848-.215-1.254 0l-2.879 1.654-1.955 1.078-2.879 1.653c-.369.216-.848.216-1.254 0l-2.288-1.294c-.369-.215-.627-.61-.627-1.042V12.19c0-.431.221-.826.627-1.042l2.25-1.258c.37-.216.85-.216 1.256 0l2.25 1.258c.37.216.628.611.628 1.042v1.654l1.955-1.115v-1.653a1.16 1.16 0 00-.627-1.042l-4.17-2.372c-.369-.216-.848-.216-1.254 0l-4.244 2.372A1.16 1.16 0 006 11.076v4.78c0 .432.221.827.627 1.043l4.244 2.372c.369.215.849.215 1.254 0l2.879-1.618 1.955-1.114 2.879-1.617c.369-.216.848-.216 1.254 0l2.251 1.258c.37.215.627.61.627 1.042v2.552c0 .431-.22.826-.627 1.042l-2.25 1.294c-.37.216-.85.216-1.255 0l-2.251-1.258c-.37-.216-.628-.611-.628-1.042v-1.654l-1.955 1.115v1.653c0 .431.221.827.627 1.042l4.244 2.372c.369.216.848.216 1.254 0l4.244-2.372c.369-.215.627-.61.627-1.042v-4.78a1.16 1.16 0 00-.627-1.042l-4.28-2.409z", fill: "#FFF" })
853
+ ] })
854
+ }
855
+ );
856
+ };
857
+
858
+ const OpSvg = ({ size = 20, ...props }) => {
859
+ return /* @__PURE__ */ jsxs(
860
+ "svg",
861
+ {
862
+ width: size,
863
+ height: size,
864
+ viewBox: "0 0 84 84",
865
+ fill: "none",
866
+ xmlns: "http://www.w3.org/2000/svg",
867
+ ...props,
868
+ children: [
869
+ /* @__PURE__ */ jsx(
870
+ "path",
871
+ {
872
+ fill: "#ff0420",
873
+ d: "M42 84c23.196 0 42-18.804 42-42S65.196 0 42 0 0 18.804 0 42s18.804 42 42 42"
874
+ }
875
+ ),
876
+ /* @__PURE__ */ jsx(
877
+ "path",
878
+ {
879
+ fill: "#fff",
880
+ d: "M30.461 53.76q-3.8 0-6.226-1.83-2.395-1.861-2.395-5.291 0-.72.16-1.764.414-2.352 1.181-5.651 2.171-8.984 11.208-8.984 2.46 0 4.407.85 1.947.817 3.065 2.482 1.118 1.635 1.118 3.92 0 .687-.16 1.732a76 76 0 0 1-1.15 5.65q-1.116 4.476-3.863 6.697-2.747 2.19-7.345 2.19Zm.448-4.704q1.788 0 3.033-1.078 1.277-1.077 1.82-3.3.735-3.07 1.118-5.356.127-.687.127-1.405 0-2.973-3.033-2.973-1.788 0-3.065 1.078-1.245 1.078-1.789 3.3-.574 2.188-1.15 5.357a7 7 0 0 0-.127 1.372q0 3.005 3.066 3.005m13.536 4.377q-.351 0-.543-.229a.8.8 0 0 1-.096-.588l4.407-21.233a.94.94 0 0 1 .351-.588.96.96 0 0 1 .607-.229h8.494q3.544 0 5.684 1.503 2.17 1.503 2.171 4.345a8 8 0 0 1-.192 1.698q-.798 3.757-3.225 5.554-2.395 1.797-6.578 1.797h-4.31l-1.47 7.153a.94.94 0 0 1-.35.588.96.96 0 0 1-.607.23zm11.304-12.478q1.34 0 2.33-.752 1.023-.751 1.342-2.156.096-.555.096-.98 0-.947-.543-1.437-.544-.523-1.852-.523H53.29l-1.213 5.848z"
881
+ }
882
+ )
883
+ ]
884
+ }
885
+ );
886
+ };
887
+
888
+ const SolSvg = ({ size = 20, ...props }) => {
889
+ return /* @__PURE__ */ jsxs(
890
+ "svg",
891
+ {
892
+ width: size,
893
+ height: size,
894
+ viewBox: "0 0 500 500",
895
+ fill: "none",
896
+ xmlns: "http://www.w3.org/2000/svg",
897
+ ...props,
898
+ children: [
899
+ /* @__PURE__ */ jsx("path", { d: "M250 0c138 0 250 111.9 250 250S388 500 250 500 0 388 0 250 111.9 0 250 0" }),
900
+ /* @__PURE__ */ jsxs(
901
+ "linearGradient",
902
+ {
903
+ id: "SolIcon_svg__a",
904
+ x1: "242.52",
905
+ x2: "755.68",
906
+ y1: "267.33",
907
+ y2: "-245.83",
908
+ gradientTransform: "matrix(.5 0 0 .5 0 250)",
909
+ gradientUnits: "userSpaceOnUse",
910
+ children: [
911
+ /* @__PURE__ */ jsx("stop", { offset: "0", style: { stopColor: "rgb(203, 78, 232)" } }),
912
+ /* @__PURE__ */ jsx("stop", { offset: "1", style: { stopColor: "rgb(16, 244, 177)" } })
913
+ ]
914
+ }
915
+ ),
916
+ /* @__PURE__ */ jsx(
917
+ "path",
918
+ {
919
+ d: "M115.6 226.1H347c2.9 0 5.6 1.1 7.6 3.2l36.6 36.8c6.8 6.8 2 18.4-7.6 18.4H152.2c-2.9 0-5.6-1.1-7.6-3.2L108 244.5c-6.8-6.7-2-18.4 7.6-18.4m-7.7-48.8 36.6-36.8c2.1-2.1 4.8-3.2 7.6-3.2h231.3c9.6 0 14.5 11.6 7.6 18.4l-36.5 36.8c-2 2.1-4.8 3.2-7.6 3.2H115.6c-9.6 0-14.4-11.6-7.7-18.4m283.2 156.2-36.6 36.9c-2 2-4.8 3.2-7.6 3.2H115.6c-9.6 0-14.4-11.6-7.7-18.4l36.6-36.9c2.1-2 4.8-3.2 7.6-3.2h231.3c9.7-.1 14.6 11.5 7.7 18.4",
920
+ style: {
921
+ fillRule: "evenodd",
922
+ clipRule: "evenodd",
923
+ fill: "url(#SolIcon_svg__a)"
861
924
  }
862
- ) })
863
- ] });
864
- default:
865
- return null;
925
+ }
926
+ )
927
+ ]
866
928
  }
867
- };
868
- const getViewBox = () => {
869
- switch (chain) {
870
- case "eth":
871
- return "0 0 20 20";
872
- case "arb":
873
- return "0 0 40 44";
874
- case "base":
875
- return "0 0 111 111";
876
- case "bitcoin":
877
- return "0 0 500 500";
878
- case "op":
879
- return "0 0 84 84";
880
- case "sol":
881
- return "0 0 500 500";
882
- case "zora":
883
- return "0 0 142 142";
884
- default:
885
- return "0 0 24 24";
929
+ );
930
+ };
931
+
932
+ const ZoraSvg = ({ size = 20, ...props }) => {
933
+ return /* @__PURE__ */ jsxs(
934
+ "svg",
935
+ {
936
+ width: size,
937
+ height: size,
938
+ viewBox: "0 0 142 142",
939
+ fill: "none",
940
+ xmlns: "http://www.w3.org/2000/svg",
941
+ ...props,
942
+ children: [
943
+ /* @__PURE__ */ jsx("defs", { children: /* @__PURE__ */ jsxs(
944
+ "radialGradient",
945
+ {
946
+ id: "ZoraIcon_svg__a",
947
+ cx: "0",
948
+ cy: "0",
949
+ r: "1",
950
+ gradientTransform: "translate(102.676 37.972)scale(-119.284)",
951
+ gradientUnits: "userSpaceOnUse",
952
+ children: [
953
+ /* @__PURE__ */ jsx("stop", { offset: "0.007", stopColor: "#f2cefe" }),
954
+ /* @__PURE__ */ jsx("stop", { offset: "0.191", stopColor: "#afbaf1" }),
955
+ /* @__PURE__ */ jsx("stop", { offset: "0.498", stopColor: "#4281d3" }),
956
+ /* @__PURE__ */ jsx("stop", { offset: "0.667", stopColor: "#2e427d" }),
957
+ /* @__PURE__ */ jsx("stop", { offset: "0.823", stopColor: "#230101" }),
958
+ /* @__PURE__ */ jsx("stop", { offset: "1", stopColor: "#8f6b40" })
959
+ ]
960
+ }
961
+ ) }),
962
+ /* @__PURE__ */ jsx(
963
+ "path",
964
+ {
965
+ fill: "url(#ZoraIcon_svg__a)",
966
+ d: "M70.615 141.23C31.615 141.23 0 109.615 0 70.615S31.616 0 70.615 0c39 0 70.615 31.615 70.615 70.615s-31.615 70.615-70.614 70.615Z"
967
+ }
968
+ )
969
+ ]
886
970
  }
887
- };
888
- return /* @__PURE__ */ jsx("div", { className: `ns-chain-icon ${className || ""}`, children: /* @__PURE__ */ jsxs(
971
+ );
972
+ };
973
+
974
+ const CeloSvg = ({ size = 20, ...props }) => {
975
+ return /* @__PURE__ */ jsxs(
889
976
  "svg",
890
977
  {
891
978
  width: size,
892
979
  height: size,
893
- viewBox: getViewBox(),
980
+ viewBox: "0 0 2500 2500",
894
981
  fill: "none",
895
982
  xmlns: "http://www.w3.org/2000/svg",
896
983
  ...props,
897
984
  children: [
898
- renderIcon(),
899
- chain === "eth" && /* @__PURE__ */ jsx("defs", { children: /* @__PURE__ */ jsx("clipPath", { id: "clip0_597_2890", children: /* @__PURE__ */ jsx(
900
- "rect",
985
+ /* @__PURE__ */ jsx(
986
+ "circle",
901
987
  {
902
- width: "19",
903
- height: "19",
904
- fill: "white",
905
- transform: "translate(0.255859 0.5)"
988
+ cx: "1250",
989
+ cy: "1250",
990
+ r: "1250",
991
+ fill: "#FCFF52",
992
+ fillRule: "evenodd",
993
+ clipRule: "evenodd"
994
+ }
995
+ ),
996
+ /* @__PURE__ */ jsx(
997
+ "path",
998
+ {
999
+ d: "M1949.3,546.2H550.7v1407.7h1398.7v-491.4h-232.1c-80,179.3-260.1,304.1-466.2,304.1 c-284.1,0-514.2-233.6-514.2-517.5c0-284,230.1-515.6,514.2-515.6c210.1,0,390.2,128.9,470.2,312.1h228.1V546.2z",
1000
+ fill: "currentColor",
1001
+ fillRule: "evenodd",
1002
+ clipRule: "evenodd"
906
1003
  }
907
- ) }) })
1004
+ )
908
1005
  ]
909
1006
  }
910
- ) });
1007
+ );
1008
+ };
1009
+
1010
+ const ChainIcon = ({
1011
+ chain,
1012
+ size = 20,
1013
+ className,
1014
+ ...props
1015
+ }) => {
1016
+ const renderIcon = () => {
1017
+ switch (chain) {
1018
+ case "eth":
1019
+ return /* @__PURE__ */ jsx(EthSvg, { size, ...props });
1020
+ case "arb":
1021
+ return /* @__PURE__ */ jsx(ArbSvg, { size, ...props });
1022
+ case "base":
1023
+ return /* @__PURE__ */ jsx(BaseSvg, { size, ...props });
1024
+ case "bitcoin":
1025
+ return /* @__PURE__ */ jsx(BitcoinSvg, { size, ...props });
1026
+ case "matic":
1027
+ return /* @__PURE__ */ jsx(MaticSvg, { size, ...props });
1028
+ case "op":
1029
+ return /* @__PURE__ */ jsx(OpSvg, { size, ...props });
1030
+ case "sol":
1031
+ return /* @__PURE__ */ jsx(SolSvg, { size, ...props });
1032
+ case "zora":
1033
+ return /* @__PURE__ */ jsx(ZoraSvg, { size, ...props });
1034
+ case "celo":
1035
+ return /* @__PURE__ */ jsx(CeloSvg, { size, ...props });
1036
+ default:
1037
+ return null;
1038
+ }
1039
+ };
1040
+ return /* @__PURE__ */ jsx("div", { className: `ns-chain-icon ${className || ""}`, children: renderIcon() });
911
1041
  };
912
1042
 
913
1043
  const Tooltip = ({
@@ -9857,6 +9987,15 @@ const supportedAddresses = [
9857
9987
  validateFunc: isValidEmvAddress,
9858
9988
  placeholder: "0x1D8...c19f8"
9859
9989
  },
9990
+ {
9991
+ isEMV: true,
9992
+ label: "Celo",
9993
+ coinType: convertEVMChainIdToCoinType(celo.id),
9994
+ chainId: arbitrum.id,
9995
+ chainName: "celo",
9996
+ validateFunc: isValidEmvAddress,
9997
+ placeholder: "0x1D8...c19f8"
9998
+ },
9860
9999
  {
9861
10000
  isEMV: true,
9862
10001
  label: "Polygon",
@@ -11536,97 +11675,78 @@ var TextRecordCategory = /* @__PURE__ */ ((TextRecordCategory2) => {
11536
11675
  })(TextRecordCategory || {});
11537
11676
  const supportedTexts = [
11538
11677
  {
11539
- icon: "circle-person",
11678
+ icon: "person",
11540
11679
  key: "avatar",
11541
11680
  category: "image" /* Image */,
11542
- label: "Avatar",
11543
- placeholder: "https://"
11681
+ label: "Avatar"
11544
11682
  },
11545
11683
  {
11546
- icon: "image",
11684
+ icon: "person",
11547
11685
  key: "header",
11548
11686
  category: "image" /* Image */,
11549
- label: "Header",
11550
- placeholder: "https://"
11687
+ label: "Header"
11551
11688
  },
11552
11689
  {
11553
11690
  icon: "person",
11554
11691
  key: "name",
11555
11692
  category: "general" /* General */,
11556
- label: "Nickname",
11557
- placeholder: "John Smith"
11693
+ label: "Nickname"
11558
11694
  },
11559
11695
  {
11560
11696
  icon: "book",
11561
11697
  key: "description",
11562
11698
  category: "general" /* General */,
11563
- label: "Short bio",
11564
- placeholder: "I am a ninja from far away land"
11699
+ label: "Short bio"
11565
11700
  },
11566
11701
  {
11567
11702
  icon: "globe",
11568
11703
  key: "url",
11569
11704
  category: "general" /* General */,
11570
- label: "Website",
11571
- placeholder: "https://namespace.ninja"
11705
+ label: "Website"
11572
11706
  },
11573
11707
  {
11574
11708
  icon: "map-pin",
11575
11709
  key: "location",
11576
11710
  category: "general" /* General */,
11577
- label: "Location",
11578
- placeholder: "Metaverse"
11711
+ label: "Location"
11579
11712
  },
11580
11713
  {
11581
11714
  icon: "mail",
11582
11715
  key: "mail",
11583
11716
  category: "general" /* General */,
11584
- label: "E-Mail",
11585
- placeholder: "name@example.com"
11717
+ label: "E-Mail"
11586
11718
  },
11587
11719
  {
11588
- icon: "twitter",
11720
+ icon: "person",
11589
11721
  key: "com.twitter",
11590
11722
  category: "social" /* Social */,
11591
- label: "Twitter",
11592
- placeholder: "eg. namespace"
11723
+ label: "Twitter"
11593
11724
  },
11594
11725
  {
11595
11726
  icon: "discord",
11596
11727
  key: "com.discord",
11597
11728
  category: "social" /* Social */,
11598
- label: "Discord",
11599
- placeholder: "eg. namespace"
11729
+ label: "Discord"
11600
11730
  },
11601
11731
  {
11602
11732
  icon: "github",
11603
11733
  key: "com.github",
11604
11734
  category: "social" /* Social */,
11605
- label: "Github",
11606
- placeholder: "eg. namespace"
11735
+ label: "Github"
11607
11736
  },
11608
11737
  {
11609
11738
  icon: "telegram",
11610
11739
  key: "org.telegram",
11611
11740
  category: "social" /* Social */,
11612
- label: "Telegram",
11613
- placeholder: "eg. namespace"
11741
+ label: "Telegram"
11614
11742
  },
11615
11743
  {
11616
11744
  icon: "youtube",
11617
11745
  key: "com.youtube",
11618
11746
  category: "social" /* Social */,
11619
- label: "Youtube",
11620
- placeholder: "eg. namespace"
11747
+ label: "Youtube"
11621
11748
  }
11622
11749
  ];
11623
- const getSupportedTextMap = () => {
11624
- const map = {};
11625
- supportedTexts.forEach((txt) => {
11626
- map[txt.key] = txt;
11627
- });
11628
- return map;
11629
- };
11630
11750
  const getSupportedText = (key) => {
11631
11751
  return supportedTexts.find((txt) => txt.key === key);
11632
11752
  };
@@ -12531,5 +12651,5 @@ const useTheme = () => {
12531
12651
  return ctx;
12532
12652
  };
12533
12653
 
12534
- export { Alert, Button, ChainIcon, ContenthashIcon, ContenthashProtocol, Dropdown, ENS_RESOLVER_ABI, EnsRecordsForm, Icon, Input, MULTICALL, Modal, PendingTransaction, SET_ADDRESS_FUNC, SET_CONTENTHASH_FUNC, SET_TEXT_FUNC, SelectRecordsForm, Text, TextRecordCategory, ThemeProvider, Tooltip, TransactionState, capitalize, convertEVMChainIdToCoinType, deepCopy, equalsIgnoreCase, getEnsRecordsDiff, getSupportedAddressByCoin, getSupportedAddressByName, getSupportedAddressMap, getSupportedChashByProtocol, getSupportedText, getSupportedTextMap, isContenthashValid, supportedAddresses, supportedContenthashRecords, supportedTexts, useTheme, useWaitForTransaction, useWeb3Client };
12654
+ export { Alert, Button, ChainIcon, ContenthashIcon, ContenthashProtocol, Dropdown, ENS_RESOLVER_ABI, EnsRecordsForm, Icon, Input, MULTICALL, Modal, PendingTransaction, SET_ADDRESS_FUNC, SET_CONTENTHASH_FUNC, SET_TEXT_FUNC, SelectRecordsForm, Text, TextRecordCategory, ThemeProvider, Tooltip, TransactionState, capitalize, convertEVMChainIdToCoinType, deepCopy, equalsIgnoreCase, getEnsRecordsDiff, getSupportedAddressByCoin, getSupportedAddressByName, getSupportedAddressMap, getSupportedChashByProtocol, getSupportedText, isContenthashValid, supportedAddresses, supportedContenthashRecords, supportedTexts, useTheme, useWaitForTransaction, useWeb3Client };
12535
12655
  //# sourceMappingURL=index.js.map