@medialane/ui 0.160.0 → 0.161.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.
Files changed (35) hide show
  1. package/dist/components/share-button.cjs +0 -2
  2. package/dist/components/share-button.cjs.map +1 -1
  3. package/dist/components/share-button.js +0 -2
  4. package/dist/components/share-button.js.map +1 -1
  5. package/dist/components/wallet/export-key-section.cjs +106 -0
  6. package/dist/components/wallet/export-key-section.cjs.map +1 -0
  7. package/dist/components/wallet/export-key-section.d.cts +12 -0
  8. package/dist/components/wallet/export-key-section.d.ts +12 -0
  9. package/dist/components/wallet/export-key-section.js +82 -0
  10. package/dist/components/wallet/export-key-section.js.map +1 -0
  11. package/dist/components/wallet/self-fund-consent-dialog.cjs +89 -0
  12. package/dist/components/wallet/self-fund-consent-dialog.cjs.map +1 -0
  13. package/dist/components/wallet/self-fund-consent-dialog.d.cts +9 -0
  14. package/dist/components/wallet/self-fund-consent-dialog.d.ts +9 -0
  15. package/dist/components/wallet/self-fund-consent-dialog.js +64 -0
  16. package/dist/components/wallet/self-fund-consent-dialog.js.map +1 -0
  17. package/dist/index.cjs +8 -0
  18. package/dist/index.cjs.map +1 -1
  19. package/dist/index.d.cts +2 -0
  20. package/dist/index.d.ts +2 -0
  21. package/dist/index.js +5 -0
  22. package/dist/index.js.map +1 -1
  23. package/dist/utils/notification-readiness.cjs +32 -0
  24. package/dist/utils/notification-readiness.cjs.map +1 -0
  25. package/dist/utils/notification-readiness.d.cts +9 -0
  26. package/dist/utils/notification-readiness.d.ts +9 -0
  27. package/dist/utils/notification-readiness.js +8 -0
  28. package/dist/utils/notification-readiness.js.map +1 -0
  29. package/dist/utils/use-notifications.cjs +15 -4
  30. package/dist/utils/use-notifications.cjs.map +1 -1
  31. package/dist/utils/use-notifications.d.cts +1 -0
  32. package/dist/utils/use-notifications.d.ts +1 -0
  33. package/dist/utils/use-notifications.js +16 -5
  34. package/dist/utils/use-notifications.js.map +1 -1
  35. package/package.json +3 -3
@@ -25,7 +25,6 @@ module.exports = __toCommonJS(share_button_exports);
25
25
  var import_jsx_runtime = require("react/jsx-runtime");
26
26
  var import_react = require("react");
27
27
  var import_lucide_react = require("lucide-react");
28
- var import_sonner = require("sonner");
29
28
  var import_cn = require("../utils/cn.js");
30
29
  const VARIANT_CLASSES = {
31
30
  outline: "border border-input bg-background hover:bg-accent hover:text-accent-foreground",
@@ -56,7 +55,6 @@ function ShareButton({
56
55
  } else {
57
56
  await navigator.clipboard.writeText(shareUrl);
58
57
  setCopied(true);
59
- import_sonner.toast.success("Link copied to clipboard");
60
58
  setTimeout(() => setCopied(false), 2e3);
61
59
  }
62
60
  };
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/components/share-button.tsx"],"sourcesContent":["\"use client\";\n\nimport { useState } from \"react\";\nimport { Share2, Check } from \"lucide-react\";\nimport { toast } from \"sonner\";\nimport { cn } from \"../utils/cn.js\";\n\nexport interface ShareButtonProps {\n title: string;\n url?: string;\n variant?: \"outline\" | \"ghost\" | \"default\";\n size?: \"sm\" | \"default\" | \"lg\" | \"icon\";\n className?: string;\n}\n\nconst VARIANT_CLASSES: Record<NonNullable<ShareButtonProps[\"variant\"]>, string> = {\n outline: \"border border-input bg-background hover:bg-accent hover:text-accent-foreground\",\n ghost: \"hover:bg-accent hover:text-accent-foreground\",\n default: \"bg-primary text-primary-foreground hover:bg-primary/90\",\n};\n\nconst SIZE_CLASSES: Record<NonNullable<ShareButtonProps[\"size\"]>, string> = {\n sm: \"h-9 px-3 text-xs rounded-md\",\n default: \"h-10 px-4 py-2 text-sm rounded-md\",\n lg: \"h-11 px-8 text-sm rounded-md\",\n icon: \"min-h-11 min-w-11 rounded-md\",\n};\n\nexport function ShareButton({\n title,\n url,\n variant = \"outline\",\n size = \"sm\",\n className,\n}: ShareButtonProps) {\n const [copied, setCopied] = useState(false);\n\n const handleShare = async () => {\n const shareUrl = url ?? (typeof window !== \"undefined\" ? window.location.href : \"\");\n if (typeof navigator !== \"undefined\" && navigator.share) {\n try {\n await navigator.share({ title, url: shareUrl });\n } catch {\n\n }\n } else {\n await navigator.clipboard.writeText(shareUrl);\n setCopied(true);\n toast.success(\"Link copied to clipboard\");\n setTimeout(() => setCopied(false), 2000);\n }\n };\n\n return (\n <button\n onClick={handleShare}\n className={cn(\n \"inline-flex items-center justify-center font-medium transition-colors\",\n \"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring\",\n \"disabled:pointer-events-none disabled:opacity-50\",\n VARIANT_CLASSES[variant],\n SIZE_CLASSES[size],\n className\n )}\n >\n {copied\n ? <Check className=\"h-3.5 w-3.5 text-emerald-500\" />\n : <Share2 className=\"h-3.5 w-3.5\" />\n }\n {size !== \"icon\" && (\n <span className=\"ml-1.5\">{copied ? \"Copied\" : \"Share\"}</span>\n )}\n </button>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAsDI;AApDJ,mBAAyB;AACzB,0BAA8B;AAC9B,oBAAsB;AACtB,gBAAmB;AAUnB,MAAM,kBAA4E;AAAA,EAChF,SAAS;AAAA,EACT,OAAO;AAAA,EACP,SAAS;AACX;AAEA,MAAM,eAAsE;AAAA,EAC1E,IAAI;AAAA,EACJ,SAAS;AAAA,EACT,IAAI;AAAA,EACJ,MAAM;AACR;AAEO,SAAS,YAAY;AAAA,EAC1B;AAAA,EACA;AAAA,EACA,UAAU;AAAA,EACV,OAAO;AAAA,EACP;AACF,GAAqB;AACnB,QAAM,CAAC,QAAQ,SAAS,QAAI,uBAAS,KAAK;AAE1C,QAAM,cAAc,YAAY;AAC9B,UAAM,WAAW,QAAQ,OAAO,WAAW,cAAc,OAAO,SAAS,OAAO;AAChF,QAAI,OAAO,cAAc,eAAe,UAAU,OAAO;AACvD,UAAI;AACF,cAAM,UAAU,MAAM,EAAE,OAAO,KAAK,SAAS,CAAC;AAAA,MAChD,QAAQ;AAAA,MAER;AAAA,IACF,OAAO;AACL,YAAM,UAAU,UAAU,UAAU,QAAQ;AAC5C,gBAAU,IAAI;AACd,0BAAM,QAAQ,0BAA0B;AACxC,iBAAW,MAAM,UAAU,KAAK,GAAG,GAAI;AAAA,IACzC;AAAA,EACF;AAEA,SACE;AAAA,IAAC;AAAA;AAAA,MACC,SAAS;AAAA,MACT,eAAW;AAAA,QACT;AAAA,QACA;AAAA,QACA;AAAA,QACA,gBAAgB,OAAO;AAAA,QACvB,aAAa,IAAI;AAAA,QACjB;AAAA,MACF;AAAA,MAEC;AAAA,iBACG,4CAAC,6BAAM,WAAU,gCAA+B,IAChD,4CAAC,8BAAO,WAAU,eAAc;AAAA,QAEnC,SAAS,UACR,4CAAC,UAAK,WAAU,UAAU,mBAAS,WAAW,SAAQ;AAAA;AAAA;AAAA,EAE1D;AAEJ;","names":[]}
1
+ {"version":3,"sources":["../../src/components/share-button.tsx"],"sourcesContent":["\"use client\";\n\nimport { useState } from \"react\";\nimport { Share2, Check } from \"lucide-react\";\nimport { cn } from \"../utils/cn.js\";\n\nexport interface ShareButtonProps {\n title: string;\n url?: string;\n variant?: \"outline\" | \"ghost\" | \"default\";\n size?: \"sm\" | \"default\" | \"lg\" | \"icon\";\n className?: string;\n}\n\nconst VARIANT_CLASSES: Record<NonNullable<ShareButtonProps[\"variant\"]>, string> = {\n outline: \"border border-input bg-background hover:bg-accent hover:text-accent-foreground\",\n ghost: \"hover:bg-accent hover:text-accent-foreground\",\n default: \"bg-primary text-primary-foreground hover:bg-primary/90\",\n};\n\nconst SIZE_CLASSES: Record<NonNullable<ShareButtonProps[\"size\"]>, string> = {\n sm: \"h-9 px-3 text-xs rounded-md\",\n default: \"h-10 px-4 py-2 text-sm rounded-md\",\n lg: \"h-11 px-8 text-sm rounded-md\",\n icon: \"min-h-11 min-w-11 rounded-md\",\n};\n\nexport function ShareButton({\n title,\n url,\n variant = \"outline\",\n size = \"sm\",\n className,\n}: ShareButtonProps) {\n const [copied, setCopied] = useState(false);\n\n const handleShare = async () => {\n const shareUrl = url ?? (typeof window !== \"undefined\" ? window.location.href : \"\");\n if (typeof navigator !== \"undefined\" && navigator.share) {\n try {\n await navigator.share({ title, url: shareUrl });\n } catch {\n\n }\n } else {\n await navigator.clipboard.writeText(shareUrl);\n setCopied(true);\n setTimeout(() => setCopied(false), 2000);\n }\n };\n\n return (\n <button\n onClick={handleShare}\n className={cn(\n \"inline-flex items-center justify-center font-medium transition-colors\",\n \"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring\",\n \"disabled:pointer-events-none disabled:opacity-50\",\n VARIANT_CLASSES[variant],\n SIZE_CLASSES[size],\n className\n )}\n >\n {copied\n ? <Check className=\"h-3.5 w-3.5 text-emerald-500\" />\n : <Share2 className=\"h-3.5 w-3.5\" />\n }\n {size !== \"icon\" && (\n <span className=\"ml-1.5\">{copied ? \"Copied\" : \"Share\"}</span>\n )}\n </button>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAoDI;AAlDJ,mBAAyB;AACzB,0BAA8B;AAC9B,gBAAmB;AAUnB,MAAM,kBAA4E;AAAA,EAChF,SAAS;AAAA,EACT,OAAO;AAAA,EACP,SAAS;AACX;AAEA,MAAM,eAAsE;AAAA,EAC1E,IAAI;AAAA,EACJ,SAAS;AAAA,EACT,IAAI;AAAA,EACJ,MAAM;AACR;AAEO,SAAS,YAAY;AAAA,EAC1B;AAAA,EACA;AAAA,EACA,UAAU;AAAA,EACV,OAAO;AAAA,EACP;AACF,GAAqB;AACnB,QAAM,CAAC,QAAQ,SAAS,QAAI,uBAAS,KAAK;AAE1C,QAAM,cAAc,YAAY;AAC9B,UAAM,WAAW,QAAQ,OAAO,WAAW,cAAc,OAAO,SAAS,OAAO;AAChF,QAAI,OAAO,cAAc,eAAe,UAAU,OAAO;AACvD,UAAI;AACF,cAAM,UAAU,MAAM,EAAE,OAAO,KAAK,SAAS,CAAC;AAAA,MAChD,QAAQ;AAAA,MAER;AAAA,IACF,OAAO;AACL,YAAM,UAAU,UAAU,UAAU,QAAQ;AAC5C,gBAAU,IAAI;AACd,iBAAW,MAAM,UAAU,KAAK,GAAG,GAAI;AAAA,IACzC;AAAA,EACF;AAEA,SACE;AAAA,IAAC;AAAA;AAAA,MACC,SAAS;AAAA,MACT,eAAW;AAAA,QACT;AAAA,QACA;AAAA,QACA;AAAA,QACA,gBAAgB,OAAO;AAAA,QACvB,aAAa,IAAI;AAAA,QACjB;AAAA,MACF;AAAA,MAEC;AAAA,iBACG,4CAAC,6BAAM,WAAU,gCAA+B,IAChD,4CAAC,8BAAO,WAAU,eAAc;AAAA,QAEnC,SAAS,UACR,4CAAC,UAAK,WAAU,UAAU,mBAAS,WAAW,SAAQ;AAAA;AAAA;AAAA,EAE1D;AAEJ;","names":[]}
@@ -2,7 +2,6 @@
2
2
  import { jsx, jsxs } from "react/jsx-runtime";
3
3
  import { useState } from "react";
4
4
  import { Share2, Check } from "lucide-react";
5
- import { toast } from "sonner";
6
5
  import { cn } from "../utils/cn.js";
7
6
  const VARIANT_CLASSES = {
8
7
  outline: "border border-input bg-background hover:bg-accent hover:text-accent-foreground",
@@ -33,7 +32,6 @@ function ShareButton({
33
32
  } else {
34
33
  await navigator.clipboard.writeText(shareUrl);
35
34
  setCopied(true);
36
- toast.success("Link copied to clipboard");
37
35
  setTimeout(() => setCopied(false), 2e3);
38
36
  }
39
37
  };
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/components/share-button.tsx"],"sourcesContent":["\"use client\";\n\nimport { useState } from \"react\";\nimport { Share2, Check } from \"lucide-react\";\nimport { toast } from \"sonner\";\nimport { cn } from \"../utils/cn.js\";\n\nexport interface ShareButtonProps {\n title: string;\n url?: string;\n variant?: \"outline\" | \"ghost\" | \"default\";\n size?: \"sm\" | \"default\" | \"lg\" | \"icon\";\n className?: string;\n}\n\nconst VARIANT_CLASSES: Record<NonNullable<ShareButtonProps[\"variant\"]>, string> = {\n outline: \"border border-input bg-background hover:bg-accent hover:text-accent-foreground\",\n ghost: \"hover:bg-accent hover:text-accent-foreground\",\n default: \"bg-primary text-primary-foreground hover:bg-primary/90\",\n};\n\nconst SIZE_CLASSES: Record<NonNullable<ShareButtonProps[\"size\"]>, string> = {\n sm: \"h-9 px-3 text-xs rounded-md\",\n default: \"h-10 px-4 py-2 text-sm rounded-md\",\n lg: \"h-11 px-8 text-sm rounded-md\",\n icon: \"min-h-11 min-w-11 rounded-md\",\n};\n\nexport function ShareButton({\n title,\n url,\n variant = \"outline\",\n size = \"sm\",\n className,\n}: ShareButtonProps) {\n const [copied, setCopied] = useState(false);\n\n const handleShare = async () => {\n const shareUrl = url ?? (typeof window !== \"undefined\" ? window.location.href : \"\");\n if (typeof navigator !== \"undefined\" && navigator.share) {\n try {\n await navigator.share({ title, url: shareUrl });\n } catch {\n\n }\n } else {\n await navigator.clipboard.writeText(shareUrl);\n setCopied(true);\n toast.success(\"Link copied to clipboard\");\n setTimeout(() => setCopied(false), 2000);\n }\n };\n\n return (\n <button\n onClick={handleShare}\n className={cn(\n \"inline-flex items-center justify-center font-medium transition-colors\",\n \"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring\",\n \"disabled:pointer-events-none disabled:opacity-50\",\n VARIANT_CLASSES[variant],\n SIZE_CLASSES[size],\n className\n )}\n >\n {copied\n ? <Check className=\"h-3.5 w-3.5 text-emerald-500\" />\n : <Share2 className=\"h-3.5 w-3.5\" />\n }\n {size !== \"icon\" && (\n <span className=\"ml-1.5\">{copied ? \"Copied\" : \"Share\"}</span>\n )}\n </button>\n );\n}\n"],"mappings":";AAsDI,SAYM,KAZN;AApDJ,SAAS,gBAAgB;AACzB,SAAS,QAAQ,aAAa;AAC9B,SAAS,aAAa;AACtB,SAAS,UAAU;AAUnB,MAAM,kBAA4E;AAAA,EAChF,SAAS;AAAA,EACT,OAAO;AAAA,EACP,SAAS;AACX;AAEA,MAAM,eAAsE;AAAA,EAC1E,IAAI;AAAA,EACJ,SAAS;AAAA,EACT,IAAI;AAAA,EACJ,MAAM;AACR;AAEO,SAAS,YAAY;AAAA,EAC1B;AAAA,EACA;AAAA,EACA,UAAU;AAAA,EACV,OAAO;AAAA,EACP;AACF,GAAqB;AACnB,QAAM,CAAC,QAAQ,SAAS,IAAI,SAAS,KAAK;AAE1C,QAAM,cAAc,YAAY;AAC9B,UAAM,WAAW,QAAQ,OAAO,WAAW,cAAc,OAAO,SAAS,OAAO;AAChF,QAAI,OAAO,cAAc,eAAe,UAAU,OAAO;AACvD,UAAI;AACF,cAAM,UAAU,MAAM,EAAE,OAAO,KAAK,SAAS,CAAC;AAAA,MAChD,QAAQ;AAAA,MAER;AAAA,IACF,OAAO;AACL,YAAM,UAAU,UAAU,UAAU,QAAQ;AAC5C,gBAAU,IAAI;AACd,YAAM,QAAQ,0BAA0B;AACxC,iBAAW,MAAM,UAAU,KAAK,GAAG,GAAI;AAAA,IACzC;AAAA,EACF;AAEA,SACE;AAAA,IAAC;AAAA;AAAA,MACC,SAAS;AAAA,MACT,WAAW;AAAA,QACT;AAAA,QACA;AAAA,QACA;AAAA,QACA,gBAAgB,OAAO;AAAA,QACvB,aAAa,IAAI;AAAA,QACjB;AAAA,MACF;AAAA,MAEC;AAAA,iBACG,oBAAC,SAAM,WAAU,gCAA+B,IAChD,oBAAC,UAAO,WAAU,eAAc;AAAA,QAEnC,SAAS,UACR,oBAAC,UAAK,WAAU,UAAU,mBAAS,WAAW,SAAQ;AAAA;AAAA;AAAA,EAE1D;AAEJ;","names":[]}
1
+ {"version":3,"sources":["../../src/components/share-button.tsx"],"sourcesContent":["\"use client\";\n\nimport { useState } from \"react\";\nimport { Share2, Check } from \"lucide-react\";\nimport { cn } from \"../utils/cn.js\";\n\nexport interface ShareButtonProps {\n title: string;\n url?: string;\n variant?: \"outline\" | \"ghost\" | \"default\";\n size?: \"sm\" | \"default\" | \"lg\" | \"icon\";\n className?: string;\n}\n\nconst VARIANT_CLASSES: Record<NonNullable<ShareButtonProps[\"variant\"]>, string> = {\n outline: \"border border-input bg-background hover:bg-accent hover:text-accent-foreground\",\n ghost: \"hover:bg-accent hover:text-accent-foreground\",\n default: \"bg-primary text-primary-foreground hover:bg-primary/90\",\n};\n\nconst SIZE_CLASSES: Record<NonNullable<ShareButtonProps[\"size\"]>, string> = {\n sm: \"h-9 px-3 text-xs rounded-md\",\n default: \"h-10 px-4 py-2 text-sm rounded-md\",\n lg: \"h-11 px-8 text-sm rounded-md\",\n icon: \"min-h-11 min-w-11 rounded-md\",\n};\n\nexport function ShareButton({\n title,\n url,\n variant = \"outline\",\n size = \"sm\",\n className,\n}: ShareButtonProps) {\n const [copied, setCopied] = useState(false);\n\n const handleShare = async () => {\n const shareUrl = url ?? (typeof window !== \"undefined\" ? window.location.href : \"\");\n if (typeof navigator !== \"undefined\" && navigator.share) {\n try {\n await navigator.share({ title, url: shareUrl });\n } catch {\n\n }\n } else {\n await navigator.clipboard.writeText(shareUrl);\n setCopied(true);\n setTimeout(() => setCopied(false), 2000);\n }\n };\n\n return (\n <button\n onClick={handleShare}\n className={cn(\n \"inline-flex items-center justify-center font-medium transition-colors\",\n \"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring\",\n \"disabled:pointer-events-none disabled:opacity-50\",\n VARIANT_CLASSES[variant],\n SIZE_CLASSES[size],\n className\n )}\n >\n {copied\n ? <Check className=\"h-3.5 w-3.5 text-emerald-500\" />\n : <Share2 className=\"h-3.5 w-3.5\" />\n }\n {size !== \"icon\" && (\n <span className=\"ml-1.5\">{copied ? \"Copied\" : \"Share\"}</span>\n )}\n </button>\n );\n}\n"],"mappings":";AAoDI,SAYM,KAZN;AAlDJ,SAAS,gBAAgB;AACzB,SAAS,QAAQ,aAAa;AAC9B,SAAS,UAAU;AAUnB,MAAM,kBAA4E;AAAA,EAChF,SAAS;AAAA,EACT,OAAO;AAAA,EACP,SAAS;AACX;AAEA,MAAM,eAAsE;AAAA,EAC1E,IAAI;AAAA,EACJ,SAAS;AAAA,EACT,IAAI;AAAA,EACJ,MAAM;AACR;AAEO,SAAS,YAAY;AAAA,EAC1B;AAAA,EACA;AAAA,EACA,UAAU;AAAA,EACV,OAAO;AAAA,EACP;AACF,GAAqB;AACnB,QAAM,CAAC,QAAQ,SAAS,IAAI,SAAS,KAAK;AAE1C,QAAM,cAAc,YAAY;AAC9B,UAAM,WAAW,QAAQ,OAAO,WAAW,cAAc,OAAO,SAAS,OAAO;AAChF,QAAI,OAAO,cAAc,eAAe,UAAU,OAAO;AACvD,UAAI;AACF,cAAM,UAAU,MAAM,EAAE,OAAO,KAAK,SAAS,CAAC;AAAA,MAChD,QAAQ;AAAA,MAER;AAAA,IACF,OAAO;AACL,YAAM,UAAU,UAAU,UAAU,QAAQ;AAC5C,gBAAU,IAAI;AACd,iBAAW,MAAM,UAAU,KAAK,GAAG,GAAI;AAAA,IACzC;AAAA,EACF;AAEA,SACE;AAAA,IAAC;AAAA;AAAA,MACC,SAAS;AAAA,MACT,WAAW;AAAA,QACT;AAAA,QACA;AAAA,QACA;AAAA,QACA,gBAAgB,OAAO;AAAA,QACvB,aAAa,IAAI;AAAA,QACjB;AAAA,MACF;AAAA,MAEC;AAAA,iBACG,oBAAC,SAAM,WAAU,gCAA+B,IAChD,oBAAC,UAAO,WAAU,eAAc;AAAA,QAEnC,SAAS,UACR,oBAAC,UAAK,WAAU,UAAU,mBAAS,WAAW,SAAQ;AAAA;AAAA;AAAA,EAE1D;AAEJ;","names":[]}
@@ -0,0 +1,106 @@
1
+ "use strict";
2
+ "use client";
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, { get: all[name], enumerable: true });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
+ }
17
+ return to;
18
+ };
19
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
20
+ var export_key_section_exports = {};
21
+ __export(export_key_section_exports, {
22
+ ExportKeySection: () => ExportKeySection
23
+ });
24
+ module.exports = __toCommonJS(export_key_section_exports);
25
+ var import_jsx_runtime = require("react/jsx-runtime");
26
+ var import_react = require("react");
27
+ var import_lucide_react = require("lucide-react");
28
+ var import_button = require("../button.js");
29
+ var import_alert = require("../alert.js");
30
+ function ExportKeySection({ loadSealed, unlock, isRecoveryKey, describeError }) {
31
+ const [privateKey, setPrivateKey] = (0, import_react.useState)(null);
32
+ const [busy, setBusy] = (0, import_react.useState)(false);
33
+ const [error, setError] = (0, import_react.useState)(null);
34
+ const [copied, setCopied] = (0, import_react.useState)(false);
35
+ const reveal = async () => {
36
+ setBusy(true);
37
+ setError(null);
38
+ try {
39
+ const sealed = loadSealed();
40
+ if (!sealed) {
41
+ setError("This browser has no wallet key stored.");
42
+ return;
43
+ }
44
+ if (!isRecoveryKey(sealed)) {
45
+ setError(
46
+ "This device was approved from another one, so its key cannot restore your account on its own. Export from the device you first signed up on."
47
+ );
48
+ return;
49
+ }
50
+ setPrivateKey(await unlock(sealed));
51
+ } catch (err) {
52
+ const fallback = "Could not unlock your key. Please try again.";
53
+ setError(describeError ? describeError(err, fallback) : fallback);
54
+ } finally {
55
+ setBusy(false);
56
+ }
57
+ };
58
+ const copy = async () => {
59
+ if (!privateKey) return;
60
+ await navigator.clipboard.writeText(privateKey);
61
+ setCopied(true);
62
+ setTimeout(() => setCopied(false), 2e3);
63
+ };
64
+ const hide = () => {
65
+ setPrivateKey(null);
66
+ setCopied(false);
67
+ };
68
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex flex-col gap-3", children: [
69
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { children: [
70
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "text-sm font-semibold", children: "Recovery key" }),
71
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "mt-1 text-xs text-muted-foreground leading-relaxed", children: "Save this somewhere private, such as a password manager. It restores your account if you lose access to every device you use. To start using a new phone or browser, approve it from a device you already have." })
72
+ ] }),
73
+ privateKey ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
74
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_alert.Alert, { variant: "destructive", children: [
75
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.ShieldAlert, { className: "h-4 w-4" }),
76
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_alert.AlertDescription, { className: "text-xs leading-relaxed", children: [
77
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "font-semibold", children: "Anyone with this key controls your wallet." }),
78
+ " ",
79
+ "Medialane will never ask you for it. Treat any message requesting it as an attempt to take your assets."
80
+ ] })
81
+ ] }),
82
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("code", { className: "block break-all rounded-xl bg-muted px-3 py-2.5 font-mono text-xs select-all", children: privateKey }),
83
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex items-center gap-2", children: [
84
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_button.Button, { onClick: copy, variant: "outline", size: "sm", children: [
85
+ copied ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Check, { className: "mr-1.5 h-3.5 w-3.5" }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Copy, { className: "mr-1.5 h-3.5 w-3.5" }),
86
+ copied ? "Copied" : "Copy key"
87
+ ] }),
88
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_button.Button, { onClick: hide, variant: "ghost", size: "sm", children: [
89
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.EyeOff, { className: "mr-1.5 h-3.5 w-3.5" }),
90
+ "Hide"
91
+ ] })
92
+ ] })
93
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
94
+ error && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "text-sm text-destructive", children: error }),
95
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_button.Button, { onClick: reveal, disabled: busy, variant: "outline", size: "sm", className: "self-start", children: [
96
+ busy ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Loader2, { className: "mr-1.5 h-3.5 w-3.5 animate-spin" }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.KeyRound, { className: "mr-1.5 h-3.5 w-3.5" }),
97
+ "Show recovery key"
98
+ ] })
99
+ ] })
100
+ ] });
101
+ }
102
+ // Annotate the CommonJS export names for ESM import in node:
103
+ 0 && (module.exports = {
104
+ ExportKeySection
105
+ });
106
+ //# sourceMappingURL=export-key-section.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/components/wallet/export-key-section.tsx"],"sourcesContent":["\"use client\";\n\nimport { useState } from \"react\";\nimport { KeyRound, Copy, Check, EyeOff, Loader2, ShieldAlert } from \"lucide-react\";\nimport type { SealedOwner } from \"@medialane/sdk/starknet\";\nimport { Button } from \"../button.js\";\nimport { Alert, AlertDescription } from \"../alert.js\";\n\nexport interface ExportKeySectionProps {\n loadSealed: () => SealedOwner | null;\n unlock: (sealed: SealedOwner) => Promise<string>;\n isRecoveryKey: (sealed: SealedOwner) => boolean;\n describeError?: (err: unknown, fallback: string) => string;\n}\n\nexport function ExportKeySection({ loadSealed, unlock, isRecoveryKey, describeError }: ExportKeySectionProps) {\n const [privateKey, setPrivateKey] = useState<string | null>(null);\n const [busy, setBusy] = useState(false);\n const [error, setError] = useState<string | null>(null);\n const [copied, setCopied] = useState(false);\n\n const reveal = async () => {\n setBusy(true);\n setError(null);\n try {\n const sealed = loadSealed();\n if (!sealed) {\n setError(\"This browser has no wallet key stored.\");\n return;\n }\n if (!isRecoveryKey(sealed)) {\n setError(\n \"This device was approved from another one, so its key cannot restore your account on its own. Export from the device you first signed up on.\",\n );\n return;\n }\n setPrivateKey(await unlock(sealed));\n } catch (err) {\n const fallback = \"Could not unlock your key. Please try again.\";\n setError(describeError ? describeError(err, fallback) : fallback);\n } finally {\n setBusy(false);\n }\n };\n\n const copy = async () => {\n if (!privateKey) return;\n await navigator.clipboard.writeText(privateKey);\n setCopied(true);\n setTimeout(() => setCopied(false), 2000);\n };\n\n const hide = () => {\n setPrivateKey(null);\n setCopied(false);\n };\n\n return (\n <div className=\"flex flex-col gap-3\">\n <div>\n <p className=\"text-sm font-semibold\">Recovery key</p>\n <p className=\"mt-1 text-xs text-muted-foreground leading-relaxed\">\n Save this somewhere private, such as a password manager. It restores your account if you\n lose access to every device you use. To start using a new phone or browser, approve it\n from a device you already have.\n </p>\n </div>\n\n {privateKey ? (\n <>\n <Alert variant=\"destructive\">\n <ShieldAlert className=\"h-4 w-4\" />\n <AlertDescription className=\"text-xs leading-relaxed\">\n <span className=\"font-semibold\">Anyone with this key controls your wallet.</span>{\" \"}\n Medialane will never ask you for it. Treat any message requesting it as an attempt to\n take your assets.\n </AlertDescription>\n </Alert>\n <code className=\"block break-all rounded-xl bg-muted px-3 py-2.5 font-mono text-xs select-all\">\n {privateKey}\n </code>\n <div className=\"flex items-center gap-2\">\n <Button onClick={copy} variant=\"outline\" size=\"sm\">\n {copied ? <Check className=\"mr-1.5 h-3.5 w-3.5\" /> : <Copy className=\"mr-1.5 h-3.5 w-3.5\" />}\n {copied ? \"Copied\" : \"Copy key\"}\n </Button>\n <Button onClick={hide} variant=\"ghost\" size=\"sm\">\n <EyeOff className=\"mr-1.5 h-3.5 w-3.5\" />\n Hide\n </Button>\n </div>\n </>\n ) : (\n <>\n {error && <p className=\"text-sm text-destructive\">{error}</p>}\n <Button onClick={reveal} disabled={busy} variant=\"outline\" size=\"sm\" className=\"self-start\">\n {busy ? <Loader2 className=\"mr-1.5 h-3.5 w-3.5 animate-spin\" /> : <KeyRound className=\"mr-1.5 h-3.5 w-3.5\" />}\n Show recovery key\n </Button>\n </>\n )}\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AA2DM;AAzDN,mBAAyB;AACzB,0BAAoE;AAEpE,oBAAuB;AACvB,mBAAwC;AASjC,SAAS,iBAAiB,EAAE,YAAY,QAAQ,eAAe,cAAc,GAA0B;AAC5G,QAAM,CAAC,YAAY,aAAa,QAAI,uBAAwB,IAAI;AAChE,QAAM,CAAC,MAAM,OAAO,QAAI,uBAAS,KAAK;AACtC,QAAM,CAAC,OAAO,QAAQ,QAAI,uBAAwB,IAAI;AACtD,QAAM,CAAC,QAAQ,SAAS,QAAI,uBAAS,KAAK;AAE1C,QAAM,SAAS,YAAY;AACzB,YAAQ,IAAI;AACZ,aAAS,IAAI;AACb,QAAI;AACF,YAAM,SAAS,WAAW;AAC1B,UAAI,CAAC,QAAQ;AACX,iBAAS,wCAAwC;AACjD;AAAA,MACF;AACA,UAAI,CAAC,cAAc,MAAM,GAAG;AAC1B;AAAA,UACE;AAAA,QACF;AACA;AAAA,MACF;AACA,oBAAc,MAAM,OAAO,MAAM,CAAC;AAAA,IACpC,SAAS,KAAK;AACZ,YAAM,WAAW;AACjB,eAAS,gBAAgB,cAAc,KAAK,QAAQ,IAAI,QAAQ;AAAA,IAClE,UAAE;AACA,cAAQ,KAAK;AAAA,IACf;AAAA,EACF;AAEA,QAAM,OAAO,YAAY;AACvB,QAAI,CAAC,WAAY;AACjB,UAAM,UAAU,UAAU,UAAU,UAAU;AAC9C,cAAU,IAAI;AACd,eAAW,MAAM,UAAU,KAAK,GAAG,GAAI;AAAA,EACzC;AAEA,QAAM,OAAO,MAAM;AACjB,kBAAc,IAAI;AAClB,cAAU,KAAK;AAAA,EACjB;AAEA,SACE,6CAAC,SAAI,WAAU,uBACb;AAAA,iDAAC,SACC;AAAA,kDAAC,OAAE,WAAU,yBAAwB,0BAAY;AAAA,MACjD,4CAAC,OAAE,WAAU,sDAAqD,6NAIlE;AAAA,OACF;AAAA,IAEC,aACC,4EACE;AAAA,mDAAC,sBAAM,SAAQ,eACb;AAAA,oDAAC,mCAAY,WAAU,WAAU;AAAA,QACjC,6CAAC,iCAAiB,WAAU,2BAC1B;AAAA,sDAAC,UAAK,WAAU,iBAAgB,wDAA0C;AAAA,UAAQ;AAAA,UAAI;AAAA,WAGxF;AAAA,SACF;AAAA,MACA,4CAAC,UAAK,WAAU,gFACb,sBACH;AAAA,MACA,6CAAC,SAAI,WAAU,2BACb;AAAA,qDAAC,wBAAO,SAAS,MAAM,SAAQ,WAAU,MAAK,MAC3C;AAAA,mBAAS,4CAAC,6BAAM,WAAU,sBAAqB,IAAK,4CAAC,4BAAK,WAAU,sBAAqB;AAAA,UACzF,SAAS,WAAW;AAAA,WACvB;AAAA,QACA,6CAAC,wBAAO,SAAS,MAAM,SAAQ,SAAQ,MAAK,MAC1C;AAAA,sDAAC,8BAAO,WAAU,sBAAqB;AAAA,UAAE;AAAA,WAE3C;AAAA,SACF;AAAA,OACF,IAEA,4EACG;AAAA,eAAS,4CAAC,OAAE,WAAU,4BAA4B,iBAAM;AAAA,MACzD,6CAAC,wBAAO,SAAS,QAAQ,UAAU,MAAM,SAAQ,WAAU,MAAK,MAAK,WAAU,cAC5E;AAAA,eAAO,4CAAC,+BAAQ,WAAU,mCAAkC,IAAK,4CAAC,gCAAS,WAAU,sBAAqB;AAAA,QAAG;AAAA,SAEhH;AAAA,OACF;AAAA,KAEJ;AAEJ;","names":[]}
@@ -0,0 +1,12 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import { SealedOwner } from '@medialane/sdk/starknet';
3
+
4
+ interface ExportKeySectionProps {
5
+ loadSealed: () => SealedOwner | null;
6
+ unlock: (sealed: SealedOwner) => Promise<string>;
7
+ isRecoveryKey: (sealed: SealedOwner) => boolean;
8
+ describeError?: (err: unknown, fallback: string) => string;
9
+ }
10
+ declare function ExportKeySection({ loadSealed, unlock, isRecoveryKey, describeError }: ExportKeySectionProps): react_jsx_runtime.JSX.Element;
11
+
12
+ export { ExportKeySection, type ExportKeySectionProps };
@@ -0,0 +1,12 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import { SealedOwner } from '@medialane/sdk/starknet';
3
+
4
+ interface ExportKeySectionProps {
5
+ loadSealed: () => SealedOwner | null;
6
+ unlock: (sealed: SealedOwner) => Promise<string>;
7
+ isRecoveryKey: (sealed: SealedOwner) => boolean;
8
+ describeError?: (err: unknown, fallback: string) => string;
9
+ }
10
+ declare function ExportKeySection({ loadSealed, unlock, isRecoveryKey, describeError }: ExportKeySectionProps): react_jsx_runtime.JSX.Element;
11
+
12
+ export { ExportKeySection, type ExportKeySectionProps };
@@ -0,0 +1,82 @@
1
+ "use client";
2
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
3
+ import { useState } from "react";
4
+ import { KeyRound, Copy, Check, EyeOff, Loader2, ShieldAlert } from "lucide-react";
5
+ import { Button } from "../button.js";
6
+ import { Alert, AlertDescription } from "../alert.js";
7
+ function ExportKeySection({ loadSealed, unlock, isRecoveryKey, describeError }) {
8
+ const [privateKey, setPrivateKey] = useState(null);
9
+ const [busy, setBusy] = useState(false);
10
+ const [error, setError] = useState(null);
11
+ const [copied, setCopied] = useState(false);
12
+ const reveal = async () => {
13
+ setBusy(true);
14
+ setError(null);
15
+ try {
16
+ const sealed = loadSealed();
17
+ if (!sealed) {
18
+ setError("This browser has no wallet key stored.");
19
+ return;
20
+ }
21
+ if (!isRecoveryKey(sealed)) {
22
+ setError(
23
+ "This device was approved from another one, so its key cannot restore your account on its own. Export from the device you first signed up on."
24
+ );
25
+ return;
26
+ }
27
+ setPrivateKey(await unlock(sealed));
28
+ } catch (err) {
29
+ const fallback = "Could not unlock your key. Please try again.";
30
+ setError(describeError ? describeError(err, fallback) : fallback);
31
+ } finally {
32
+ setBusy(false);
33
+ }
34
+ };
35
+ const copy = async () => {
36
+ if (!privateKey) return;
37
+ await navigator.clipboard.writeText(privateKey);
38
+ setCopied(true);
39
+ setTimeout(() => setCopied(false), 2e3);
40
+ };
41
+ const hide = () => {
42
+ setPrivateKey(null);
43
+ setCopied(false);
44
+ };
45
+ return /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-3", children: [
46
+ /* @__PURE__ */ jsxs("div", { children: [
47
+ /* @__PURE__ */ jsx("p", { className: "text-sm font-semibold", children: "Recovery key" }),
48
+ /* @__PURE__ */ jsx("p", { className: "mt-1 text-xs text-muted-foreground leading-relaxed", children: "Save this somewhere private, such as a password manager. It restores your account if you lose access to every device you use. To start using a new phone or browser, approve it from a device you already have." })
49
+ ] }),
50
+ privateKey ? /* @__PURE__ */ jsxs(Fragment, { children: [
51
+ /* @__PURE__ */ jsxs(Alert, { variant: "destructive", children: [
52
+ /* @__PURE__ */ jsx(ShieldAlert, { className: "h-4 w-4" }),
53
+ /* @__PURE__ */ jsxs(AlertDescription, { className: "text-xs leading-relaxed", children: [
54
+ /* @__PURE__ */ jsx("span", { className: "font-semibold", children: "Anyone with this key controls your wallet." }),
55
+ " ",
56
+ "Medialane will never ask you for it. Treat any message requesting it as an attempt to take your assets."
57
+ ] })
58
+ ] }),
59
+ /* @__PURE__ */ jsx("code", { className: "block break-all rounded-xl bg-muted px-3 py-2.5 font-mono text-xs select-all", children: privateKey }),
60
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
61
+ /* @__PURE__ */ jsxs(Button, { onClick: copy, variant: "outline", size: "sm", children: [
62
+ copied ? /* @__PURE__ */ jsx(Check, { className: "mr-1.5 h-3.5 w-3.5" }) : /* @__PURE__ */ jsx(Copy, { className: "mr-1.5 h-3.5 w-3.5" }),
63
+ copied ? "Copied" : "Copy key"
64
+ ] }),
65
+ /* @__PURE__ */ jsxs(Button, { onClick: hide, variant: "ghost", size: "sm", children: [
66
+ /* @__PURE__ */ jsx(EyeOff, { className: "mr-1.5 h-3.5 w-3.5" }),
67
+ "Hide"
68
+ ] })
69
+ ] })
70
+ ] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
71
+ error && /* @__PURE__ */ jsx("p", { className: "text-sm text-destructive", children: error }),
72
+ /* @__PURE__ */ jsxs(Button, { onClick: reveal, disabled: busy, variant: "outline", size: "sm", className: "self-start", children: [
73
+ busy ? /* @__PURE__ */ jsx(Loader2, { className: "mr-1.5 h-3.5 w-3.5 animate-spin" }) : /* @__PURE__ */ jsx(KeyRound, { className: "mr-1.5 h-3.5 w-3.5" }),
74
+ "Show recovery key"
75
+ ] })
76
+ ] })
77
+ ] });
78
+ }
79
+ export {
80
+ ExportKeySection
81
+ };
82
+ //# sourceMappingURL=export-key-section.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/components/wallet/export-key-section.tsx"],"sourcesContent":["\"use client\";\n\nimport { useState } from \"react\";\nimport { KeyRound, Copy, Check, EyeOff, Loader2, ShieldAlert } from \"lucide-react\";\nimport type { SealedOwner } from \"@medialane/sdk/starknet\";\nimport { Button } from \"../button.js\";\nimport { Alert, AlertDescription } from \"../alert.js\";\n\nexport interface ExportKeySectionProps {\n loadSealed: () => SealedOwner | null;\n unlock: (sealed: SealedOwner) => Promise<string>;\n isRecoveryKey: (sealed: SealedOwner) => boolean;\n describeError?: (err: unknown, fallback: string) => string;\n}\n\nexport function ExportKeySection({ loadSealed, unlock, isRecoveryKey, describeError }: ExportKeySectionProps) {\n const [privateKey, setPrivateKey] = useState<string | null>(null);\n const [busy, setBusy] = useState(false);\n const [error, setError] = useState<string | null>(null);\n const [copied, setCopied] = useState(false);\n\n const reveal = async () => {\n setBusy(true);\n setError(null);\n try {\n const sealed = loadSealed();\n if (!sealed) {\n setError(\"This browser has no wallet key stored.\");\n return;\n }\n if (!isRecoveryKey(sealed)) {\n setError(\n \"This device was approved from another one, so its key cannot restore your account on its own. Export from the device you first signed up on.\",\n );\n return;\n }\n setPrivateKey(await unlock(sealed));\n } catch (err) {\n const fallback = \"Could not unlock your key. Please try again.\";\n setError(describeError ? describeError(err, fallback) : fallback);\n } finally {\n setBusy(false);\n }\n };\n\n const copy = async () => {\n if (!privateKey) return;\n await navigator.clipboard.writeText(privateKey);\n setCopied(true);\n setTimeout(() => setCopied(false), 2000);\n };\n\n const hide = () => {\n setPrivateKey(null);\n setCopied(false);\n };\n\n return (\n <div className=\"flex flex-col gap-3\">\n <div>\n <p className=\"text-sm font-semibold\">Recovery key</p>\n <p className=\"mt-1 text-xs text-muted-foreground leading-relaxed\">\n Save this somewhere private, such as a password manager. It restores your account if you\n lose access to every device you use. To start using a new phone or browser, approve it\n from a device you already have.\n </p>\n </div>\n\n {privateKey ? (\n <>\n <Alert variant=\"destructive\">\n <ShieldAlert className=\"h-4 w-4\" />\n <AlertDescription className=\"text-xs leading-relaxed\">\n <span className=\"font-semibold\">Anyone with this key controls your wallet.</span>{\" \"}\n Medialane will never ask you for it. Treat any message requesting it as an attempt to\n take your assets.\n </AlertDescription>\n </Alert>\n <code className=\"block break-all rounded-xl bg-muted px-3 py-2.5 font-mono text-xs select-all\">\n {privateKey}\n </code>\n <div className=\"flex items-center gap-2\">\n <Button onClick={copy} variant=\"outline\" size=\"sm\">\n {copied ? <Check className=\"mr-1.5 h-3.5 w-3.5\" /> : <Copy className=\"mr-1.5 h-3.5 w-3.5\" />}\n {copied ? \"Copied\" : \"Copy key\"}\n </Button>\n <Button onClick={hide} variant=\"ghost\" size=\"sm\">\n <EyeOff className=\"mr-1.5 h-3.5 w-3.5\" />\n Hide\n </Button>\n </div>\n </>\n ) : (\n <>\n {error && <p className=\"text-sm text-destructive\">{error}</p>}\n <Button onClick={reveal} disabled={busy} variant=\"outline\" size=\"sm\" className=\"self-start\">\n {busy ? <Loader2 className=\"mr-1.5 h-3.5 w-3.5 animate-spin\" /> : <KeyRound className=\"mr-1.5 h-3.5 w-3.5\" />}\n Show recovery key\n </Button>\n </>\n )}\n </div>\n );\n}\n"],"mappings":";AA2DM,SAUE,UATA,KADF;AAzDN,SAAS,gBAAgB;AACzB,SAAS,UAAU,MAAM,OAAO,QAAQ,SAAS,mBAAmB;AAEpE,SAAS,cAAc;AACvB,SAAS,OAAO,wBAAwB;AASjC,SAAS,iBAAiB,EAAE,YAAY,QAAQ,eAAe,cAAc,GAA0B;AAC5G,QAAM,CAAC,YAAY,aAAa,IAAI,SAAwB,IAAI;AAChE,QAAM,CAAC,MAAM,OAAO,IAAI,SAAS,KAAK;AACtC,QAAM,CAAC,OAAO,QAAQ,IAAI,SAAwB,IAAI;AACtD,QAAM,CAAC,QAAQ,SAAS,IAAI,SAAS,KAAK;AAE1C,QAAM,SAAS,YAAY;AACzB,YAAQ,IAAI;AACZ,aAAS,IAAI;AACb,QAAI;AACF,YAAM,SAAS,WAAW;AAC1B,UAAI,CAAC,QAAQ;AACX,iBAAS,wCAAwC;AACjD;AAAA,MACF;AACA,UAAI,CAAC,cAAc,MAAM,GAAG;AAC1B;AAAA,UACE;AAAA,QACF;AACA;AAAA,MACF;AACA,oBAAc,MAAM,OAAO,MAAM,CAAC;AAAA,IACpC,SAAS,KAAK;AACZ,YAAM,WAAW;AACjB,eAAS,gBAAgB,cAAc,KAAK,QAAQ,IAAI,QAAQ;AAAA,IAClE,UAAE;AACA,cAAQ,KAAK;AAAA,IACf;AAAA,EACF;AAEA,QAAM,OAAO,YAAY;AACvB,QAAI,CAAC,WAAY;AACjB,UAAM,UAAU,UAAU,UAAU,UAAU;AAC9C,cAAU,IAAI;AACd,eAAW,MAAM,UAAU,KAAK,GAAG,GAAI;AAAA,EACzC;AAEA,QAAM,OAAO,MAAM;AACjB,kBAAc,IAAI;AAClB,cAAU,KAAK;AAAA,EACjB;AAEA,SACE,qBAAC,SAAI,WAAU,uBACb;AAAA,yBAAC,SACC;AAAA,0BAAC,OAAE,WAAU,yBAAwB,0BAAY;AAAA,MACjD,oBAAC,OAAE,WAAU,sDAAqD,6NAIlE;AAAA,OACF;AAAA,IAEC,aACC,iCACE;AAAA,2BAAC,SAAM,SAAQ,eACb;AAAA,4BAAC,eAAY,WAAU,WAAU;AAAA,QACjC,qBAAC,oBAAiB,WAAU,2BAC1B;AAAA,8BAAC,UAAK,WAAU,iBAAgB,wDAA0C;AAAA,UAAQ;AAAA,UAAI;AAAA,WAGxF;AAAA,SACF;AAAA,MACA,oBAAC,UAAK,WAAU,gFACb,sBACH;AAAA,MACA,qBAAC,SAAI,WAAU,2BACb;AAAA,6BAAC,UAAO,SAAS,MAAM,SAAQ,WAAU,MAAK,MAC3C;AAAA,mBAAS,oBAAC,SAAM,WAAU,sBAAqB,IAAK,oBAAC,QAAK,WAAU,sBAAqB;AAAA,UACzF,SAAS,WAAW;AAAA,WACvB;AAAA,QACA,qBAAC,UAAO,SAAS,MAAM,SAAQ,SAAQ,MAAK,MAC1C;AAAA,8BAAC,UAAO,WAAU,sBAAqB;AAAA,UAAE;AAAA,WAE3C;AAAA,SACF;AAAA,OACF,IAEA,iCACG;AAAA,eAAS,oBAAC,OAAE,WAAU,4BAA4B,iBAAM;AAAA,MACzD,qBAAC,UAAO,SAAS,QAAQ,UAAU,MAAM,SAAQ,WAAU,MAAK,MAAK,WAAU,cAC5E;AAAA,eAAO,oBAAC,WAAQ,WAAU,mCAAkC,IAAK,oBAAC,YAAS,WAAU,sBAAqB;AAAA,QAAG;AAAA,SAEhH;AAAA,OACF;AAAA,KAEJ;AAEJ;","names":[]}
@@ -0,0 +1,89 @@
1
+ "use strict";
2
+ "use client";
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, { get: all[name], enumerable: true });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
+ }
17
+ return to;
18
+ };
19
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
20
+ var self_fund_consent_dialog_exports = {};
21
+ __export(self_fund_consent_dialog_exports, {
22
+ SelfFundConsentDialog: () => SelfFundConsentDialog,
23
+ feeLabelFor: () => feeLabelFor
24
+ });
25
+ module.exports = __toCommonJS(self_fund_consent_dialog_exports);
26
+ var import_jsx_runtime = require("react/jsx-runtime");
27
+ var import_react = require("react");
28
+ var import_sdk = require("@medialane/sdk");
29
+ var import_action_dialog = require("../action-dialog.js");
30
+ function feeLabelFor(estimate) {
31
+ if (estimate === "loading" || estimate == null) return null;
32
+ const [whole, fraction = ""] = (0, import_sdk.formatAmount)(estimate.feeRaw.toString(), 18).split(".");
33
+ const trimmed = fraction.slice(0, 6).replace(/0+$/, "");
34
+ const amount = trimmed ? `${whole}.${trimmed}` : whole;
35
+ return `${amount} ${estimate.unit === "FRI" ? "STRK" : "ETH"}`;
36
+ }
37
+ function SelfFundConsentDialog({ consent }) {
38
+ const [pending, setPending] = (0, import_react.useState)(null);
39
+ (0, import_react.useEffect)(() => {
40
+ consent.registerHandler((feeEstimatePromise) => {
41
+ return new Promise((resolve) => {
42
+ setPending({ resolve, feeEstimate: "loading" });
43
+ void feeEstimatePromise.then((feeEstimate) => {
44
+ setPending((current) => current ? { ...current, feeEstimate } : current);
45
+ });
46
+ });
47
+ });
48
+ return () => consent.registerHandler(null);
49
+ }, [consent]);
50
+ const respond = (consented) => {
51
+ pending?.resolve(consented);
52
+ setPending(null);
53
+ };
54
+ const label = feeLabelFor(pending?.feeEstimate ?? null);
55
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_action_dialog.ActionDialog, { open: pending !== null, onClose: () => respond(false), width: 420, shadow: false, children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "p-6 space-y-4", children: [
56
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("h2", { className: "text-lg font-semibold", children: "Pay this transaction" }),
57
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "text-sm text-muted-foreground", children: "This transaction will cover onchain fees with funds from your account." }),
58
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "rounded-lg bg-muted px-4 py-3 flex items-center justify-between", children: [
59
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "text-sm text-muted-foreground", children: "Estimated cost" }),
60
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "text-sm font-semibold", children: label ?? "Estimating\u2026" })
61
+ ] }),
62
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex justify-end gap-2", children: [
63
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
64
+ "button",
65
+ {
66
+ type: "button",
67
+ onClick: () => respond(false),
68
+ className: "px-4 py-2 rounded-lg text-sm font-medium text-muted-foreground hover:bg-muted transition-colors",
69
+ children: "Cancel"
70
+ }
71
+ ),
72
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
73
+ "button",
74
+ {
75
+ type: "button",
76
+ onClick: () => respond(true),
77
+ className: "px-4 py-2 rounded-lg text-sm font-medium bg-primary text-primary-foreground hover:opacity-90 transition-opacity",
78
+ children: "Pay with my wallet"
79
+ }
80
+ )
81
+ ] })
82
+ ] }) });
83
+ }
84
+ // Annotate the CommonJS export names for ESM import in node:
85
+ 0 && (module.exports = {
86
+ SelfFundConsentDialog,
87
+ feeLabelFor
88
+ });
89
+ //# sourceMappingURL=self-fund-consent-dialog.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/components/wallet/self-fund-consent-dialog.tsx"],"sourcesContent":["\"use client\";\n\nimport { useEffect, useState } from \"react\";\nimport { formatAmount } from \"@medialane/sdk\";\nimport type { SelfFundConsent, SelfFundFeeEstimate } from \"@medialane/sdk/starknet\";\nimport { ActionDialog } from \"../action-dialog.js\";\n\ninterface PendingRequest {\n resolve: (consented: boolean) => void;\n feeEstimate: SelfFundFeeEstimate | null | \"loading\";\n}\n\nexport function feeLabelFor(estimate: SelfFundFeeEstimate | null | \"loading\"): string | null {\n if (estimate === \"loading\" || estimate == null) return null;\n const [whole, fraction = \"\"] = formatAmount(estimate.feeRaw.toString(), 18).split(\".\");\n const trimmed = fraction.slice(0, 6).replace(/0+$/, \"\");\n const amount = trimmed ? `${whole}.${trimmed}` : whole;\n return `${amount} ${estimate.unit === \"FRI\" ? \"STRK\" : \"ETH\"}`;\n}\n\nexport function SelfFundConsentDialog({ consent }: { consent: SelfFundConsent }) {\n const [pending, setPending] = useState<PendingRequest | null>(null);\n\n useEffect(() => {\n consent.registerHandler((feeEstimatePromise) => {\n return new Promise<boolean>((resolve) => {\n setPending({ resolve, feeEstimate: \"loading\" });\n void feeEstimatePromise.then((feeEstimate) => {\n setPending((current) => (current ? { ...current, feeEstimate } : current));\n });\n });\n });\n return () => consent.registerHandler(null);\n }, [consent]);\n\n const respond = (consented: boolean) => {\n pending?.resolve(consented);\n setPending(null);\n };\n\n const label = feeLabelFor(pending?.feeEstimate ?? null);\n\n return (\n <ActionDialog open={pending !== null} onClose={() => respond(false)} width={420} shadow={false}>\n <div className=\"p-6 space-y-4\">\n <h2 className=\"text-lg font-semibold\">Pay this transaction</h2>\n <p className=\"text-sm text-muted-foreground\">\n This transaction will cover onchain fees with funds from your account.\n </p>\n <div className=\"rounded-lg bg-muted px-4 py-3 flex items-center justify-between\">\n <span className=\"text-sm text-muted-foreground\">Estimated cost</span>\n <span className=\"text-sm font-semibold\">{label ?? \"Estimating…\"}</span>\n </div>\n <div className=\"flex justify-end gap-2\">\n <button\n type=\"button\"\n onClick={() => respond(false)}\n className=\"px-4 py-2 rounded-lg text-sm font-medium text-muted-foreground hover:bg-muted transition-colors\"\n >\n Cancel\n </button>\n <button\n type=\"button\"\n onClick={() => respond(true)}\n className=\"px-4 py-2 rounded-lg text-sm font-medium bg-primary text-primary-foreground hover:opacity-90 transition-opacity\"\n >\n Pay with my wallet\n </button>\n </div>\n </div>\n </ActionDialog>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AA6CQ;AA3CR,mBAAoC;AACpC,iBAA6B;AAE7B,2BAA6B;AAOtB,SAAS,YAAY,UAAiE;AAC3F,MAAI,aAAa,aAAa,YAAY,KAAM,QAAO;AACvD,QAAM,CAAC,OAAO,WAAW,EAAE,QAAI,yBAAa,SAAS,OAAO,SAAS,GAAG,EAAE,EAAE,MAAM,GAAG;AACrF,QAAM,UAAU,SAAS,MAAM,GAAG,CAAC,EAAE,QAAQ,OAAO,EAAE;AACtD,QAAM,SAAS,UAAU,GAAG,KAAK,IAAI,OAAO,KAAK;AACjD,SAAO,GAAG,MAAM,IAAI,SAAS,SAAS,QAAQ,SAAS,KAAK;AAC9D;AAEO,SAAS,sBAAsB,EAAE,QAAQ,GAAiC;AAC/E,QAAM,CAAC,SAAS,UAAU,QAAI,uBAAgC,IAAI;AAElE,8BAAU,MAAM;AACd,YAAQ,gBAAgB,CAAC,uBAAuB;AAC9C,aAAO,IAAI,QAAiB,CAAC,YAAY;AACvC,mBAAW,EAAE,SAAS,aAAa,UAAU,CAAC;AAC9C,aAAK,mBAAmB,KAAK,CAAC,gBAAgB;AAC5C,qBAAW,CAAC,YAAa,UAAU,EAAE,GAAG,SAAS,YAAY,IAAI,OAAQ;AAAA,QAC3E,CAAC;AAAA,MACH,CAAC;AAAA,IACH,CAAC;AACD,WAAO,MAAM,QAAQ,gBAAgB,IAAI;AAAA,EAC3C,GAAG,CAAC,OAAO,CAAC;AAEZ,QAAM,UAAU,CAAC,cAAuB;AACtC,aAAS,QAAQ,SAAS;AAC1B,eAAW,IAAI;AAAA,EACjB;AAEA,QAAM,QAAQ,YAAY,SAAS,eAAe,IAAI;AAEtD,SACE,4CAAC,qCAAa,MAAM,YAAY,MAAM,SAAS,MAAM,QAAQ,KAAK,GAAG,OAAO,KAAK,QAAQ,OACvF,uDAAC,SAAI,WAAU,iBACb;AAAA,gDAAC,QAAG,WAAU,yBAAwB,kCAAoB;AAAA,IAC1D,4CAAC,OAAE,WAAU,iCAAgC,oFAE7C;AAAA,IACA,6CAAC,SAAI,WAAU,mEACb;AAAA,kDAAC,UAAK,WAAU,iCAAgC,4BAAc;AAAA,MAC9D,4CAAC,UAAK,WAAU,yBAAyB,mBAAS,oBAAc;AAAA,OAClE;AAAA,IACA,6CAAC,SAAI,WAAU,0BACb;AAAA;AAAA,QAAC;AAAA;AAAA,UACC,MAAK;AAAA,UACL,SAAS,MAAM,QAAQ,KAAK;AAAA,UAC5B,WAAU;AAAA,UACX;AAAA;AAAA,MAED;AAAA,MACA;AAAA,QAAC;AAAA;AAAA,UACC,MAAK;AAAA,UACL,SAAS,MAAM,QAAQ,IAAI;AAAA,UAC3B,WAAU;AAAA,UACX;AAAA;AAAA,MAED;AAAA,OACF;AAAA,KACF,GACF;AAEJ;","names":[]}
@@ -0,0 +1,9 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import { SelfFundConsent, SelfFundFeeEstimate } from '@medialane/sdk/starknet';
3
+
4
+ declare function feeLabelFor(estimate: SelfFundFeeEstimate | null | "loading"): string | null;
5
+ declare function SelfFundConsentDialog({ consent }: {
6
+ consent: SelfFundConsent;
7
+ }): react_jsx_runtime.JSX.Element;
8
+
9
+ export { SelfFundConsentDialog, feeLabelFor };
@@ -0,0 +1,9 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import { SelfFundConsent, SelfFundFeeEstimate } from '@medialane/sdk/starknet';
3
+
4
+ declare function feeLabelFor(estimate: SelfFundFeeEstimate | null | "loading"): string | null;
5
+ declare function SelfFundConsentDialog({ consent }: {
6
+ consent: SelfFundConsent;
7
+ }): react_jsx_runtime.JSX.Element;
8
+
9
+ export { SelfFundConsentDialog, feeLabelFor };
@@ -0,0 +1,64 @@
1
+ "use client";
2
+ import { jsx, jsxs } from "react/jsx-runtime";
3
+ import { useEffect, useState } from "react";
4
+ import { formatAmount } from "@medialane/sdk";
5
+ import { ActionDialog } from "../action-dialog.js";
6
+ function feeLabelFor(estimate) {
7
+ if (estimate === "loading" || estimate == null) return null;
8
+ const [whole, fraction = ""] = formatAmount(estimate.feeRaw.toString(), 18).split(".");
9
+ const trimmed = fraction.slice(0, 6).replace(/0+$/, "");
10
+ const amount = trimmed ? `${whole}.${trimmed}` : whole;
11
+ return `${amount} ${estimate.unit === "FRI" ? "STRK" : "ETH"}`;
12
+ }
13
+ function SelfFundConsentDialog({ consent }) {
14
+ const [pending, setPending] = useState(null);
15
+ useEffect(() => {
16
+ consent.registerHandler((feeEstimatePromise) => {
17
+ return new Promise((resolve) => {
18
+ setPending({ resolve, feeEstimate: "loading" });
19
+ void feeEstimatePromise.then((feeEstimate) => {
20
+ setPending((current) => current ? { ...current, feeEstimate } : current);
21
+ });
22
+ });
23
+ });
24
+ return () => consent.registerHandler(null);
25
+ }, [consent]);
26
+ const respond = (consented) => {
27
+ pending?.resolve(consented);
28
+ setPending(null);
29
+ };
30
+ const label = feeLabelFor(pending?.feeEstimate ?? null);
31
+ return /* @__PURE__ */ jsx(ActionDialog, { open: pending !== null, onClose: () => respond(false), width: 420, shadow: false, children: /* @__PURE__ */ jsxs("div", { className: "p-6 space-y-4", children: [
32
+ /* @__PURE__ */ jsx("h2", { className: "text-lg font-semibold", children: "Pay this transaction" }),
33
+ /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground", children: "This transaction will cover onchain fees with funds from your account." }),
34
+ /* @__PURE__ */ jsxs("div", { className: "rounded-lg bg-muted px-4 py-3 flex items-center justify-between", children: [
35
+ /* @__PURE__ */ jsx("span", { className: "text-sm text-muted-foreground", children: "Estimated cost" }),
36
+ /* @__PURE__ */ jsx("span", { className: "text-sm font-semibold", children: label ?? "Estimating\u2026" })
37
+ ] }),
38
+ /* @__PURE__ */ jsxs("div", { className: "flex justify-end gap-2", children: [
39
+ /* @__PURE__ */ jsx(
40
+ "button",
41
+ {
42
+ type: "button",
43
+ onClick: () => respond(false),
44
+ className: "px-4 py-2 rounded-lg text-sm font-medium text-muted-foreground hover:bg-muted transition-colors",
45
+ children: "Cancel"
46
+ }
47
+ ),
48
+ /* @__PURE__ */ jsx(
49
+ "button",
50
+ {
51
+ type: "button",
52
+ onClick: () => respond(true),
53
+ className: "px-4 py-2 rounded-lg text-sm font-medium bg-primary text-primary-foreground hover:opacity-90 transition-opacity",
54
+ children: "Pay with my wallet"
55
+ }
56
+ )
57
+ ] })
58
+ ] }) });
59
+ }
60
+ export {
61
+ SelfFundConsentDialog,
62
+ feeLabelFor
63
+ };
64
+ //# sourceMappingURL=self-fund-consent-dialog.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/components/wallet/self-fund-consent-dialog.tsx"],"sourcesContent":["\"use client\";\n\nimport { useEffect, useState } from \"react\";\nimport { formatAmount } from \"@medialane/sdk\";\nimport type { SelfFundConsent, SelfFundFeeEstimate } from \"@medialane/sdk/starknet\";\nimport { ActionDialog } from \"../action-dialog.js\";\n\ninterface PendingRequest {\n resolve: (consented: boolean) => void;\n feeEstimate: SelfFundFeeEstimate | null | \"loading\";\n}\n\nexport function feeLabelFor(estimate: SelfFundFeeEstimate | null | \"loading\"): string | null {\n if (estimate === \"loading\" || estimate == null) return null;\n const [whole, fraction = \"\"] = formatAmount(estimate.feeRaw.toString(), 18).split(\".\");\n const trimmed = fraction.slice(0, 6).replace(/0+$/, \"\");\n const amount = trimmed ? `${whole}.${trimmed}` : whole;\n return `${amount} ${estimate.unit === \"FRI\" ? \"STRK\" : \"ETH\"}`;\n}\n\nexport function SelfFundConsentDialog({ consent }: { consent: SelfFundConsent }) {\n const [pending, setPending] = useState<PendingRequest | null>(null);\n\n useEffect(() => {\n consent.registerHandler((feeEstimatePromise) => {\n return new Promise<boolean>((resolve) => {\n setPending({ resolve, feeEstimate: \"loading\" });\n void feeEstimatePromise.then((feeEstimate) => {\n setPending((current) => (current ? { ...current, feeEstimate } : current));\n });\n });\n });\n return () => consent.registerHandler(null);\n }, [consent]);\n\n const respond = (consented: boolean) => {\n pending?.resolve(consented);\n setPending(null);\n };\n\n const label = feeLabelFor(pending?.feeEstimate ?? null);\n\n return (\n <ActionDialog open={pending !== null} onClose={() => respond(false)} width={420} shadow={false}>\n <div className=\"p-6 space-y-4\">\n <h2 className=\"text-lg font-semibold\">Pay this transaction</h2>\n <p className=\"text-sm text-muted-foreground\">\n This transaction will cover onchain fees with funds from your account.\n </p>\n <div className=\"rounded-lg bg-muted px-4 py-3 flex items-center justify-between\">\n <span className=\"text-sm text-muted-foreground\">Estimated cost</span>\n <span className=\"text-sm font-semibold\">{label ?? \"Estimating…\"}</span>\n </div>\n <div className=\"flex justify-end gap-2\">\n <button\n type=\"button\"\n onClick={() => respond(false)}\n className=\"px-4 py-2 rounded-lg text-sm font-medium text-muted-foreground hover:bg-muted transition-colors\"\n >\n Cancel\n </button>\n <button\n type=\"button\"\n onClick={() => respond(true)}\n className=\"px-4 py-2 rounded-lg text-sm font-medium bg-primary text-primary-foreground hover:opacity-90 transition-opacity\"\n >\n Pay with my wallet\n </button>\n </div>\n </div>\n </ActionDialog>\n );\n}\n"],"mappings":";AA6CQ,cAIA,YAJA;AA3CR,SAAS,WAAW,gBAAgB;AACpC,SAAS,oBAAoB;AAE7B,SAAS,oBAAoB;AAOtB,SAAS,YAAY,UAAiE;AAC3F,MAAI,aAAa,aAAa,YAAY,KAAM,QAAO;AACvD,QAAM,CAAC,OAAO,WAAW,EAAE,IAAI,aAAa,SAAS,OAAO,SAAS,GAAG,EAAE,EAAE,MAAM,GAAG;AACrF,QAAM,UAAU,SAAS,MAAM,GAAG,CAAC,EAAE,QAAQ,OAAO,EAAE;AACtD,QAAM,SAAS,UAAU,GAAG,KAAK,IAAI,OAAO,KAAK;AACjD,SAAO,GAAG,MAAM,IAAI,SAAS,SAAS,QAAQ,SAAS,KAAK;AAC9D;AAEO,SAAS,sBAAsB,EAAE,QAAQ,GAAiC;AAC/E,QAAM,CAAC,SAAS,UAAU,IAAI,SAAgC,IAAI;AAElE,YAAU,MAAM;AACd,YAAQ,gBAAgB,CAAC,uBAAuB;AAC9C,aAAO,IAAI,QAAiB,CAAC,YAAY;AACvC,mBAAW,EAAE,SAAS,aAAa,UAAU,CAAC;AAC9C,aAAK,mBAAmB,KAAK,CAAC,gBAAgB;AAC5C,qBAAW,CAAC,YAAa,UAAU,EAAE,GAAG,SAAS,YAAY,IAAI,OAAQ;AAAA,QAC3E,CAAC;AAAA,MACH,CAAC;AAAA,IACH,CAAC;AACD,WAAO,MAAM,QAAQ,gBAAgB,IAAI;AAAA,EAC3C,GAAG,CAAC,OAAO,CAAC;AAEZ,QAAM,UAAU,CAAC,cAAuB;AACtC,aAAS,QAAQ,SAAS;AAC1B,eAAW,IAAI;AAAA,EACjB;AAEA,QAAM,QAAQ,YAAY,SAAS,eAAe,IAAI;AAEtD,SACE,oBAAC,gBAAa,MAAM,YAAY,MAAM,SAAS,MAAM,QAAQ,KAAK,GAAG,OAAO,KAAK,QAAQ,OACvF,+BAAC,SAAI,WAAU,iBACb;AAAA,wBAAC,QAAG,WAAU,yBAAwB,kCAAoB;AAAA,IAC1D,oBAAC,OAAE,WAAU,iCAAgC,oFAE7C;AAAA,IACA,qBAAC,SAAI,WAAU,mEACb;AAAA,0BAAC,UAAK,WAAU,iCAAgC,4BAAc;AAAA,MAC9D,oBAAC,UAAK,WAAU,yBAAyB,mBAAS,oBAAc;AAAA,OAClE;AAAA,IACA,qBAAC,SAAI,WAAU,0BACb;AAAA;AAAA,QAAC;AAAA;AAAA,UACC,MAAK;AAAA,UACL,SAAS,MAAM,QAAQ,KAAK;AAAA,UAC5B,WAAU;AAAA,UACX;AAAA;AAAA,MAED;AAAA,MACA;AAAA,QAAC;AAAA;AAAA,UACC,MAAK;AAAA,UACL,SAAS,MAAM,QAAQ,IAAI;AAAA,UAC3B,WAAU;AAAA,UACX;AAAA;AAAA,MAED;AAAA,OACF;AAAA,KACF,GACF;AAEJ;","names":[]}
package/dist/index.cjs CHANGED
@@ -139,6 +139,7 @@ __export(index_exports, {
139
139
  EmailVerificationGate: () => import_email_verification_gate.EmailVerificationGate,
140
140
  EmptyOrError: () => import_empty_or_error.EmptyOrError,
141
141
  ExclusiveContentSection: () => import_exclusive_content_section.ExclusiveContentSection,
142
+ ExportKeySection: () => import_export_key_section.ExportKeySection,
142
143
  FadeIn: () => import_motion_primitives.FadeIn,
143
144
  FastMint: () => import_fast_mint.FastMint,
144
145
  FeaturedCarousel: () => import_featured_carousel.FeaturedCarousel,
@@ -247,6 +248,7 @@ __export(index_exports, {
247
248
  SelectSeparator: () => import_select.SelectSeparator,
248
249
  SelectTrigger: () => import_select.SelectTrigger,
249
250
  SelectValue: () => import_select.SelectValue,
251
+ SelfFundConsentDialog: () => import_self_fund_consent_dialog.SelfFundConsentDialog,
250
252
  ServiceFormShell: () => import_service_form_shell.ServiceFormShell,
251
253
  ServiceHeader: () => import_service_header.ServiceHeader,
252
254
  ShareButton: () => import_share_button.ShareButton,
@@ -302,6 +304,7 @@ __export(index_exports, {
302
304
  derivePortfolioCounts: () => import_portfolio_counts.derivePortfolioCounts,
303
305
  dropCreateSchema: () => import_drop_create_schema.dropCreateSchema,
304
306
  fdvUsd: () => import_coins.fdvUsd,
307
+ feeLabelFor: () => import_self_fund_consent_dialog.feeLabelFor,
305
308
  formatActivity: () => import_format_activity.formatActivity,
306
309
  formatAssetReceivedNotification: () => import_format_activity.formatAssetReceivedNotification,
307
310
  formatCoinPrice: () => import_coins.formatCoinPrice,
@@ -560,6 +563,8 @@ var import_owner_setup_panel = require("./components/owner-setup-panel.js");
560
563
  var import_drop_countdown = require("./components/drop-countdown.js");
561
564
  var import_creator_analytics = require("./components/creator-analytics.js");
562
565
  var import_dialog = require("./components/dialog.js");
566
+ var import_self_fund_consent_dialog = require("./components/wallet/self-fund-consent-dialog.js");
567
+ var import_export_key_section = require("./components/wallet/export-key-section.js");
563
568
  // Annotate the CommonJS export names for ESM import in node:
564
569
  0 && (module.exports = {
565
570
  ACTIVITY_MESSAGES,
@@ -683,6 +688,7 @@ var import_dialog = require("./components/dialog.js");
683
688
  EmailVerificationGate,
684
689
  EmptyOrError,
685
690
  ExclusiveContentSection,
691
+ ExportKeySection,
686
692
  FadeIn,
687
693
  FastMint,
688
694
  FeaturedCarousel,
@@ -791,6 +797,7 @@ var import_dialog = require("./components/dialog.js");
791
797
  SelectSeparator,
792
798
  SelectTrigger,
793
799
  SelectValue,
800
+ SelfFundConsentDialog,
794
801
  ServiceFormShell,
795
802
  ServiceHeader,
796
803
  ShareButton,
@@ -846,6 +853,7 @@ var import_dialog = require("./components/dialog.js");
846
853
  derivePortfolioCounts,
847
854
  dropCreateSchema,
848
855
  fdvUsd,
856
+ feeLabelFor,
849
857
  formatActivity,
850
858
  formatAssetReceivedNotification,
851
859
  formatCoinPrice,