@hanzo/ui 5.6.1 → 5.7.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 (66) hide show
  1. package/dist/3d/carousel.js +1 -1
  2. package/dist/3d/carousel.mjs +1 -1
  3. package/dist/animation/animated-background.js +1 -1
  4. package/dist/animation/animated-background.mjs +1 -1
  5. package/dist/animation/animated-icon.js +2 -2
  6. package/dist/animation/animated-icon.mjs +2 -2
  7. package/dist/animation/animated-list.js +1 -1
  8. package/dist/animation/animated-list.mjs +1 -1
  9. package/dist/animation/animated-number.js +1 -1
  10. package/dist/animation/animated-number.mjs +1 -1
  11. package/dist/animation/index.js +2 -2
  12. package/dist/animation/index.mjs +2 -2
  13. package/dist/auth/index.js +2 -2
  14. package/dist/auth/index.mjs +2 -2
  15. package/dist/billing/index.js +2 -2
  16. package/dist/billing/index.mjs +2 -2
  17. package/dist/drawer.js +1 -1
  18. package/dist/drawer.mjs +1 -1
  19. package/dist/models/index.js +1 -1
  20. package/dist/models/index.mjs +1 -1
  21. package/dist/navigation/hanzo-shell.js +1 -1
  22. package/dist/navigation/hanzo-shell.mjs +1 -1
  23. package/dist/navigation/index.js +2 -2
  24. package/dist/navigation/index.mjs +2 -2
  25. package/dist/primitives/drawer.d.ts +2 -2
  26. package/dist/primitives/drawer.d.ts.map +1 -1
  27. package/dist/primitives/form.d.ts +1 -1
  28. package/dist/primitives/form.d.ts.map +1 -1
  29. package/dist/src/auth/AuthGuard.d.ts.map +1 -1
  30. package/dist/src/auth/AuthGuard.js +3 -7
  31. package/dist/src/auth/IAMLoginButton.d.ts +10 -3
  32. package/dist/src/auth/IAMLoginButton.d.ts.map +1 -1
  33. package/dist/src/auth/IAMLoginButton.js +14 -19
  34. package/dist/src/auth/PasswordForm.d.ts +22 -0
  35. package/dist/src/auth/PasswordForm.d.ts.map +1 -0
  36. package/dist/src/auth/PasswordForm.js +28 -0
  37. package/dist/src/auth/SignIn.d.ts +37 -0
  38. package/dist/src/auth/SignIn.d.ts.map +1 -0
  39. package/dist/src/auth/SignIn.js +26 -0
  40. package/dist/src/auth/SocialButton.d.ts +27 -0
  41. package/dist/src/auth/SocialButton.d.ts.map +1 -0
  42. package/dist/src/auth/SocialButton.js +37 -0
  43. package/dist/src/auth/Web3Connect.d.ts +9 -0
  44. package/dist/src/auth/Web3Connect.d.ts.map +1 -0
  45. package/dist/src/auth/Web3Connect.js +11 -0
  46. package/dist/src/auth/iam.d.ts +56 -0
  47. package/dist/src/auth/iam.d.ts.map +1 -0
  48. package/dist/src/auth/iam.js +78 -0
  49. package/dist/src/auth/index.d.ts +11 -0
  50. package/dist/src/auth/index.d.ts.map +1 -1
  51. package/dist/src/auth/index.js +9 -0
  52. package/dist/src/auth/types.d.ts +43 -0
  53. package/dist/src/auth/types.d.ts.map +1 -0
  54. package/dist/src/auth/types.js +8 -0
  55. package/dist/src/billing/components/payment-manager.d.ts.map +1 -1
  56. package/dist/src/billing/components/payment-manager.js +13 -1
  57. package/dist/src/form/form.d.ts +4 -2
  58. package/dist/src/form/form.d.ts.map +1 -1
  59. package/dist/src/models/ModelCard.js +2 -2
  60. package/dist/src/navigation/hanzo-shell/AppSwitcher.js +1 -1
  61. package/dist/src/navigation/hanzo-shell/types.d.ts +1 -0
  62. package/dist/src/navigation/hanzo-shell/types.d.ts.map +1 -1
  63. package/dist/src/navigation/hanzo-shell/types.js +11 -0
  64. package/dist/src/navigation/hanzo-shell/useHanzoAuth.js +2 -2
  65. package/dist/util/index.mjs +1 -1
  66. package/package.json +7 -15
@@ -7,7 +7,7 @@ const APP_GROUPS = [
7
7
  { label: 'Core', ids: ['account', 'billing', 'console'] },
8
8
  { label: 'AI', ids: ['chat', 'flow', 'bot'] },
9
9
  { label: 'Observability', ids: ['o11y', 'sentry', 'insights', 'analytics'] },
10
- { label: 'Infrastructure', ids: ['platform', 'cloud', 'storage', 'kms', 'dns', 'registry'] },
10
+ { label: 'Infrastructure', ids: ['platform', 'cloud', 'web3', 'storage', 'kms', 'dns', 'registry'] },
11
11
  { label: 'Apps', ids: ['commerce', 'base', 'search', 'auto'] },
12
12
  { label: 'Business', ids: ['team', 'sign', 'dataroom', 'captable'] },
13
13
  { label: 'Resources', ids: ['docs', 'status'] },
@@ -72,6 +72,7 @@ export type OrgDomains = {
72
72
  insights: string;
73
73
  analytics: string;
74
74
  platform: string;
75
+ web3: string;
75
76
  storage: string;
76
77
  s3: string;
77
78
  kms: string;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/navigation/hanzo-shell/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,QAAQ,GAAG;IACrB,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACtB,WAAW,CAAC,EAAE,MAAM,CAAA;CACrB,CAAA;AAED,MAAM,MAAM,QAAQ,GAAG;IACrB,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,CAAC,EAAE,MAAM,CAAA;CACd,CAAA;AAED,MAAM,MAAM,SAAS,GAAG;IACtB,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB,CAAA;AAED,MAAM,MAAM,cAAc,GAAG;IAC3B,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB,CAAA;AAED,MAAM,MAAM,eAAe,GAAG;IAC5B,2CAA2C;IAC3C,UAAU,EAAE,MAAM,CAAA;IAClB,wEAAwE;IACxE,YAAY,CAAC,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AO,EAAE,MAAM,CAAA;IACf,KAAK,EAAE,MAAM,CAAA;IAEb,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;IACZ,GAAG,EAAE,MAAM,CAAA;IAEX,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,EAAE,MAAM,CAAA;IACd,QAAQ,EAAE,MAAM,CAAA;IAChB,SAAS,EAAE,MAAM,CAAA;IAEjB,QAAQ,EAAE,MAAM,CAAA;IAChB,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,EAAE,MAAM,CAAA;IACf,EAAE,EAAE,MAAM,CAAA;IACV,GAAG,EAAE,MAAM,CAAA;IACX,GAAG,EAAE,MAAM,CAAA;IACX,QAAQ,EAAE,MAAM,CAAA;IAEhB,QAAQ,EAAE,MAAM,CAAA;IAChB,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,EAAE,MAAM,CAAA;IACd,IAAI,EAAE,MAAM,CAAA;IAEZ,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;IACZ,QAAQ,EAAE,MAAM,CAAA;IAChB,QAAQ,EAAE,MAAM,CAAA;IAEhB,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,EAAE,MAAM,CAAA;CACf,CAAA;AAED,eAAO,MAAM,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,UAAU,CA6HlD,CAAA;AAED,wCAAwC;AACxC,wBAAgB,aAAa,CAAC,OAAO,EAAE,MAAM,GAAG,QAAQ,EAAE,CAsCzD"}
@@ -75,6 +75,12 @@ export const DEFAULT_HANZO_APPS = [
75
75
  href: 'https://cloud.hanzo.ai',
76
76
  description: 'Cloud infrastructure',
77
77
  },
78
+ {
79
+ id: 'web3',
80
+ label: 'Web3',
81
+ href: 'https://web3.hanzo.ai',
82
+ description: 'Deploy & manage blockchain validators across Bitcoin, Ethereum, Solana, Lux, and any Lux-derived L1',
83
+ },
78
84
  {
79
85
  id: 'storage',
80
86
  label: 'Storage',
@@ -170,6 +176,7 @@ export const ORG_DOMAINS = {
170
176
  billing: 'https://billing.hanzo.ai',
171
177
  console: 'https://console.hanzo.ai',
172
178
  cloud: 'https://cloud.hanzo.ai',
179
+ web3: 'https://web3.hanzo.ai',
173
180
  chat: 'https://hanzo.chat',
174
181
  flow: 'https://flow.hanzo.ai',
175
182
  bot: 'https://hanzo.bot',
@@ -200,6 +207,7 @@ export const ORG_DOMAINS = {
200
207
  billing: 'https://billing.lux.network',
201
208
  console: 'https://console.lux.network',
202
209
  cloud: 'https://cloud.lux.network',
210
+ web3: 'https://web3.lux.network',
203
211
  chat: 'https://lux.chat',
204
212
  flow: 'https://flow.lux.network',
205
213
  bot: 'https://bot.lux.network',
@@ -230,6 +238,7 @@ export const ORG_DOMAINS = {
230
238
  billing: 'https://billing.zoo.ngo',
231
239
  console: 'https://console.zoo.ngo',
232
240
  cloud: 'https://cloud.zoo.network',
241
+ web3: 'https://web3.zoo.ngo',
233
242
  chat: 'https://chat.zoo.ngo',
234
243
  flow: 'https://flow.zoo.ngo',
235
244
  bot: 'https://bot.zoo.ngo',
@@ -260,6 +269,7 @@ export const ORG_DOMAINS = {
260
269
  billing: 'https://billing.pars.network',
261
270
  console: 'https://console.pars.network',
262
271
  cloud: 'https://cloud.pars.network',
272
+ web3: 'https://web3.pars.network',
263
273
  chat: 'https://chat.pars.network',
264
274
  flow: 'https://flow.pars.network',
265
275
  bot: 'https://bot.pars.network',
@@ -305,6 +315,7 @@ export function getAppsForOrg(orgSlug) {
305
315
  // Infrastructure
306
316
  { id: 'platform', label: 'Platform', href: d.platform, description: 'Deploy & scale services' },
307
317
  { id: 'cloud', label: 'Cloud', href: d.cloud, description: 'Cloud infrastructure' },
318
+ { id: 'web3', label: 'Web3', href: d.web3, description: 'Deploy & manage blockchain validators across Bitcoin, Ethereum, Solana, Lux, and any Lux-derived L1' },
308
319
  { id: 'storage', label: 'Storage', href: d.storage, description: 'S3 object storage' },
309
320
  { id: 'kms', label: 'KMS', href: d.kms, description: 'Secrets & key management' },
310
321
  { id: 'dns', label: 'DNS', href: d.dns, description: 'DNS management' },
@@ -41,8 +41,8 @@ export function useHanzoAuth() {
41
41
  }
42
42
  catch { /* ignore */ }
43
43
  }
44
- // Fetch fresh from IAM
45
- const res = await fetch(`${IAM_ENDPOINT}/api/userinfo`, {
44
+ // Fetch fresh from IAM — canonical OIDC userinfo (HIP-0111), never /api/.
45
+ const res = await fetch(`${IAM_ENDPOINT}/v1/iam/oauth/userinfo`, {
46
46
  headers: { Authorization: `Bearer ${storedToken}` },
47
47
  });
48
48
  if (res.ok) {
@@ -1 +1 @@
1
- import {createRoot}from'react-dom/client';import {Buffer}from'buffer';import {toast}from'sonner';import {jsx}from'react/jsx-runtime';import*as a from'react';import {useRef,useEffect}from'react';import {clsx}from'clsx';import {twMerge}from'tailwind-merge';import {reaction,computed,makeObservable,action,observable}from'mobx';var d=Object.defineProperty;var r=(e,t)=>d(e,"name",{value:t,configurable:true});var P=r(e=>e?new Date(e).toLocaleDateString("en-US",{year:"numeric",month:"numeric",day:"numeric"}):"-","formatDateToUSLocaleString"),E=r(e=>e?new Date(e).toLocaleDateString("en-US",{year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric"}):"-","formatDateToLocaleStringWithTime"),U=r(e=>{let t=new Date,n=new Date;return n.setDate(t.getDate()-1),e.toDateString()===t.toDateString()?"today":e.toDateString()===n.toDateString()?"yesterday":e.toDateString()},"getRelativeDateLabel"),N=r(e=>{let t={};for(let n of e){let o=new Date(n.createdAt??"").toDateString();t[o]||(t[o]=[]),t[o].push(n);}return t},"groupMessagesByDate"),F=r(e=>{let t=new Date;if(e.getDate()===t.getDate()&&e.getMonth()===t.getMonth()&&e.getFullYear()===t.getFullYear())return e.toLocaleTimeString("en-US",{hour:"numeric",minute:"numeric",hour12:true});let n=e.getMonth()+1,o=e.getDate();return `${n}/${o}`},"formatDateToMonthAndDay");var B=r(e=>e.split(".").slice(0,-1).join("."),"getFileName"),I=r(e=>e.split(".").pop()||"","getFileExt"),H=r(e=>e?e?.type.startsWith("image/")||e?.type.startsWith("application/pdf"):false,"isFileTypeImageOrPdf");function V(e,t){let n=document.createElement(e),o=n.attachShadow({mode:"open"}),i=new CSSStyleSheet;return i.replaceSync(t),o.adoptedStyleSheets=[i],document.querySelector("html").prepend(n),createRoot(o)}r(V,"createShadowRoot");function q(e=1e3){return new Promise(t=>setTimeout(t,e))}r(q,"delay");var K=r(e=>{let t=new FileReader;return t.readAsDataURL(e),new Promise(n=>{t.onloadend=()=>{n(t.result);};})},"blobToBase64"),X=r((e,t)=>{let n=e.split(",");if(n.length<2)return;let o=n[0].match(/:(.*?);/);if(!o||o.length<2)return;let i=o[1],s=Buffer.from(n[1],"base64");return new File([new Uint8Array(s)],t,{type:i})},"dataUrlToFile");async function re(e){try{await navigator.clipboard.writeText(e);}catch{let t=document.createElement("textarea");t.style.position="fixed",t.style.top="-9999px",t.style.left="-9999px",t.innerText=e,document.body.appendChild(t),t.focus(),t.select(),document.execCommand("copy"),t.remove();}}r(re,"copyToClipboard");var ie=r(e=>e.replace(/([a-z])([A-Z])/g,"$1 $2").replace(/_/g," ").split(" ").map(o=>o.charAt(0).toUpperCase()+o.slice(1)).join(" "),"formatText"),se=r(e=>{let o=e.split(/(?=[A-Z])/).map(i=>i.charAt(0).toUpperCase()+i.slice(1).toLowerCase()).join(" ");return o.charAt(0).toUpperCase()+o.slice(1)},"formatCamelCaseText"),ae=r(e=>{if(e.version)return e.version;let t=e.name.split(":::");return t.length===4?t[3]:"latest"},"getVersionFromTool");var me=r(()=>toast.error(jsx("div",{children:"Your Hanzo Node is currently locked by existing keys, please restore your connection or reset your Hanzo Node Storage"}),{position:"bottom-center"}),"submitRegistrationNoCodeNonPristineError"),le=r(()=>toast.error(jsx("div",{children:"Error connecting to your Hanzo Node"}),{position:"bottom-center"}),"submitRegistrationNoCodeError");var he=r((e,t)=>{let n=null;return (...o)=>{n&&clearTimeout(n),n=setTimeout(()=>{e(...o);},t);}},"debounce");function b(e){let t=[],n="scale"in e?e.scale:void 0;if(n)if(typeof n=="number")t.push(`scale(${n})`);else if(Array.isArray(n)&&n.length==2&&typeof n[0]=="number")t.push(`scale(${n[0]}, ${n[1]})`);else throw new Error("parsing MediaTransform: Unrecognized value for 'scale'!");return t.length>0?{transform:t.join(" ")}:{}}r(b,"spreadToTransform");var y=b;var Te=r((e,t)=>e.split(" ").find(o=>o.startsWith(`${t}-`)),"getPrimaryStartingWith"),we=r(e=>{let t=e.split("-");return t[t.length-1]},"getTShirtSize"),De=r(e=>{let t=e.split("-");return t[t.length-1]},"getTypographySize"),_e=r(e=>{let t=e.split("-");if(t[t.length-1]){let o=e.split("x");return o?{w:Number(o[0]),h:Number(o[1])}:void 0}},"getDim");function Ae(e,t,n,o){let i=t(e);return i?n(i)??o:o??void 0}r(Ae,"getSpecifierData");var Ce=["K","M","B","T"];var u=768;function Le(){let[e,t]=a.useState(void 0);return a.useEffect(()=>{let n=window.matchMedia(`(max-width: ${u-1}px)`),o=r(()=>{t(window.innerWidth<u);},"onChange");return n.addEventListener("change",o),t(window.innerWidth<u),()=>n.removeEventListener("change",o)},[]),!!e}r(Le,"useIsMobile");function T(...e){return twMerge(clsx(e))}r(T,"cn");function w(e){return new Date(e).toLocaleDateString("en-US",{month:"long",day:"numeric",year:"numeric"})}r(w,"formatDate");function D(e){return `${process.env.NEXT_PUBLIC_APP_URL||""}${e}`}r(D,"absoluteUrl");function $e(e,t,n){if(typeof e=="number"&&typeof t=="number"&&typeof n=="number")return Math.min(Math.max(e,t),n);if(typeof e=="object"&&typeof t=="object"){let o=e,i=t,s=o.w/o.h,f=i.w/i.h;return s>f?{w:i.w,h:i.w/s}:{w:i.h*s,h:i.h}}throw new Error("Invalid parameters for constrain function")}r($e,"constrain");function Be(e){return Math.round(e*100)/100}r(Be,"round");function Ie(e,t=16){return `${e/t}rem`}r(Ie,"pxToRem");function He(e,t=16){return `${e/t}em`}r(He,"pxToEm");function We(e,t){return e?e.toLowerCase().includes(t.toLowerCase()):false}r(We,"containsToken");function je(...e){let t={};for(let n of e)n&&typeof n=="object"&&Object.assign(t,n);return t}r(je,"ldMerge");function Qe(e,t=0){let n=Number(e);return isNaN(n)?t:n}r(Qe,"asNum");function Ve(e){return e&&e.charAt(0).toUpperCase()+e.slice(1)}r(Ve,"capitalize");var p=class p{constructor(t,n){this._step=-1;this._reactionDisposer=void 0;this.initialize=r(()=>{let t=r(()=>{this._setStep(this._step+1),this._step<=this._intervals.length&&setTimeout(()=>{t();},this._intervals[this._step-1]);},"fireNext");this._reactionDisposer=reaction(this._initialStep,n=>{n&&this._step===-1?this._setStep(0):this._step===0&&t();});},"initialize");this._setStep=r(t=>{this._step=t;},"_setStep");this.dispose=r(()=>{this._reactionDisposer&&this._reactionDisposer();},"dispose");this.notPast=r(t=>computed(()=>this._step>-1&&this._step<=t).get(),"notPast");this._initialStep=t,this._intervals=n,makeObservable(this,{_step:observable,_setStep:action});}};r(p,"MyStepAnimation");var c=p,ft=r((e,t)=>{let n=useRef(new c(e,t));return useEffect(()=>(n.current.initialize(),n.current.dispose),[]),n.current},"useStepAnimation");export{Ce as ABBR_SYMBOLS_ARRAY,D as absoluteUrl,Qe as asNum,K as blobToBase64,Ve as capitalize,T as cn,$e as constrain,We as containsToken,re as copyToClipboard,V as createShadowRoot,X as dataUrlToFile,he as debounce,q as delay,se as formatCamelCaseText,w as formatDate,E as formatDateToLocaleStringWithTime,F as formatDateToMonthAndDay,P as formatDateToUSLocaleString,ie as formatText,_e as getDim,I as getFileExt,B as getFileName,Te as getPrimaryStartingWith,U as getRelativeDateLabel,Ae as getSpecifierData,we as getTShirtSize,De as getTypographySize,ae as getVersionFromTool,N as groupMessagesByDate,H as isFileTypeImageOrPdf,je as ldMerge,He as pxToEm,Ie as pxToRem,Be as round,y as spreadToTransform,le as submitRegistrationNoCodeError,me as submitRegistrationNoCodeNonPristineError,Le as useIsMobile,ft as useStepAnimation};
1
+ import {createRoot}from'react-dom/client';import {Buffer}from'buffer';import {toast}from'sonner';import {jsx}from'react/jsx-runtime';import*as a from'react';import {useRef,useEffect}from'react';import {clsx}from'clsx';import {twMerge}from'tailwind-merge';import {reaction,computed,makeObservable,action,observable}from'mobx';var d=Object.defineProperty;var r=(e,t)=>d(e,"name",{value:t,configurable:true});var P=r(e=>e?new Date(e).toLocaleDateString("en-US",{year:"numeric",month:"numeric",day:"numeric"}):"-","formatDateToUSLocaleString"),E=r(e=>e?new Date(e).toLocaleDateString("en-US",{year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric"}):"-","formatDateToLocaleStringWithTime"),U=r(e=>{let t=new Date,n=new Date;return n.setDate(t.getDate()-1),e.toDateString()===t.toDateString()?"today":e.toDateString()===n.toDateString()?"yesterday":e.toDateString()},"getRelativeDateLabel"),F=r(e=>{let t={};for(let n of e){let o=new Date(n.createdAt??"").toDateString();t[o]||(t[o]=[]),t[o].push(n);}return t},"groupMessagesByDate"),N=r(e=>{let t=new Date;if(e.getDate()===t.getDate()&&e.getMonth()===t.getMonth()&&e.getFullYear()===t.getFullYear())return e.toLocaleTimeString("en-US",{hour:"numeric",minute:"numeric",hour12:true});let n=e.getMonth()+1,o=e.getDate();return `${n}/${o}`},"formatDateToMonthAndDay");var B=r(e=>e.split(".").slice(0,-1).join("."),"getFileName"),I=r(e=>e.split(".").pop()||"","getFileExt"),H=r(e=>e?e?.type.startsWith("image/")||e?.type.startsWith("application/pdf"):false,"isFileTypeImageOrPdf");function V(e,t){let n=document.createElement(e),o=n.attachShadow({mode:"open"}),i=new CSSStyleSheet;return i.replaceSync(t),o.adoptedStyleSheets=[i],document.querySelector("html").prepend(n),createRoot(o)}r(V,"createShadowRoot");function q(e=1e3){return new Promise(t=>setTimeout(t,e))}r(q,"delay");var X=r(e=>{let t=new FileReader;return t.readAsDataURL(e),new Promise(n=>{t.onloadend=()=>{n(t.result);};})},"blobToBase64"),J=r((e,t)=>{let n=e.split(",");if(n.length<2)return;let o=n[0].match(/:(.*?);/);if(!o||o.length<2)return;let i=o[1],s=Buffer.from(n[1],"base64");return new File([new Uint8Array(s)],t,{type:i})},"dataUrlToFile");async function re(e){try{await navigator.clipboard.writeText(e);}catch{let t=document.createElement("textarea");t.style.position="fixed",t.style.top="-9999px",t.style.left="-9999px",t.innerText=e,document.body.appendChild(t),t.focus(),t.select(),document.execCommand("copy"),t.remove();}}r(re,"copyToClipboard");var ie=r(e=>e.replace(/([a-z])([A-Z])/g,"$1 $2").replace(/_/g," ").split(" ").map(o=>o.charAt(0).toUpperCase()+o.slice(1)).join(" "),"formatText"),se=r(e=>{let o=e.split(/(?=[A-Z])/).map(i=>i.charAt(0).toUpperCase()+i.slice(1).toLowerCase()).join(" ");return o.charAt(0).toUpperCase()+o.slice(1)},"formatCamelCaseText"),ae=r(e=>{if(e.version)return e.version;let t=e.name.split(":::");return t.length===4?t[3]:"latest"},"getVersionFromTool");var me=r(()=>toast.error(jsx("div",{children:"Your Hanzo Node is currently locked by existing keys, please restore your connection or reset your Hanzo Node Storage"}),{position:"bottom-center"}),"submitRegistrationNoCodeNonPristineError"),le=r(()=>toast.error(jsx("div",{children:"Error connecting to your Hanzo Node"}),{position:"bottom-center"}),"submitRegistrationNoCodeError");var he=r((e,t)=>{let n=null;return (...o)=>{n&&clearTimeout(n),n=setTimeout(()=>{e(...o);},t);}},"debounce");function b(e){let t=[],n="scale"in e?e.scale:void 0;if(n)if(typeof n=="number")t.push(`scale(${n})`);else if(Array.isArray(n)&&n.length==2&&typeof n[0]=="number")t.push(`scale(${n[0]}, ${n[1]})`);else throw new Error("parsing MediaTransform: Unrecognized value for 'scale'!");return t.length>0?{transform:t.join(" ")}:{}}r(b,"spreadToTransform");var y=b;var Te=r((e,t)=>e.split(" ").find(o=>o.startsWith(`${t}-`)),"getPrimaryStartingWith"),we=r(e=>{let t=e.split("-");return t[t.length-1]},"getTShirtSize"),De=r(e=>{let t=e.split("-");return t[t.length-1]},"getTypographySize"),_e=r(e=>{let t=e.split("-");if(t[t.length-1]){let o=e.split("x");return o?{w:Number(o[0]),h:Number(o[1])}:void 0}},"getDim");function Ae(e,t,n,o){let i=t(e);return i?n(i)??o:o??void 0}r(Ae,"getSpecifierData");var Ce=["K","M","B","T"];var u=768;function Le(){let[e,t]=a.useState(void 0);return a.useEffect(()=>{let n=window.matchMedia(`(max-width: ${u-1}px)`),o=r(()=>{t(window.innerWidth<u);},"onChange");return n.addEventListener("change",o),t(window.innerWidth<u),()=>n.removeEventListener("change",o)},[]),!!e}r(Le,"useIsMobile");function T(...e){return twMerge(clsx(e))}r(T,"cn");function w(e){return new Date(e).toLocaleDateString("en-US",{month:"long",day:"numeric",year:"numeric"})}r(w,"formatDate");function D(e){return `${process.env.NEXT_PUBLIC_APP_URL||""}${e}`}r(D,"absoluteUrl");function $e(e,t,n){if(typeof e=="number"&&typeof t=="number"&&typeof n=="number")return Math.min(Math.max(e,t),n);if(typeof e=="object"&&typeof t=="object"){let o=e,i=t,s=o.w/o.h,f=i.w/i.h;return s>f?{w:i.w,h:i.w/s}:{w:i.h*s,h:i.h}}throw new Error("Invalid parameters for constrain function")}r($e,"constrain");function Be(e){return Math.round(e*100)/100}r(Be,"round");function Ie(e,t=16){return `${e/t}rem`}r(Ie,"pxToRem");function He(e,t=16){return `${e/t}em`}r(He,"pxToEm");function We(e,t){return e?e.toLowerCase().includes(t.toLowerCase()):false}r(We,"containsToken");function je(...e){let t={};for(let n of e)n&&typeof n=="object"&&Object.assign(t,n);return t}r(je,"ldMerge");function Qe(e,t=0){let n=Number(e);return isNaN(n)?t:n}r(Qe,"asNum");function Ve(e){return e&&e.charAt(0).toUpperCase()+e.slice(1)}r(Ve,"capitalize");var p=class p{constructor(t,n){this._step=-1;this._reactionDisposer=void 0;this.initialize=r(()=>{let t=r(()=>{this._setStep(this._step+1),this._step<=this._intervals.length&&setTimeout(()=>{t();},this._intervals[this._step-1]);},"fireNext");this._reactionDisposer=reaction(this._initialStep,n=>{n&&this._step===-1?this._setStep(0):this._step===0&&t();});},"initialize");this._setStep=r(t=>{this._step=t;},"_setStep");this.dispose=r(()=>{this._reactionDisposer&&this._reactionDisposer();},"dispose");this.notPast=r(t=>computed(()=>this._step>-1&&this._step<=t).get(),"notPast");this._initialStep=t,this._intervals=n,makeObservable(this,{_step:observable,_setStep:action});}};r(p,"MyStepAnimation");var c=p,ft=r((e,t)=>{let n=useRef(new c(e,t));return useEffect(()=>(n.current.initialize(),n.current.dispose),[]),n.current},"useStepAnimation");export{Ce as ABBR_SYMBOLS_ARRAY,D as absoluteUrl,Qe as asNum,X as blobToBase64,Ve as capitalize,T as cn,$e as constrain,We as containsToken,re as copyToClipboard,V as createShadowRoot,J as dataUrlToFile,he as debounce,q as delay,se as formatCamelCaseText,w as formatDate,E as formatDateToLocaleStringWithTime,N as formatDateToMonthAndDay,P as formatDateToUSLocaleString,ie as formatText,_e as getDim,I as getFileExt,B as getFileName,Te as getPrimaryStartingWith,U as getRelativeDateLabel,Ae as getSpecifierData,we as getTShirtSize,De as getTypographySize,ae as getVersionFromTool,F as groupMessagesByDate,H as isFileTypeImageOrPdf,je as ldMerge,He as pxToEm,Ie as pxToRem,Be as round,y as spreadToTransform,le as submitRegistrationNoCodeError,me as submitRegistrationNoCodeNonPristineError,Le as useIsMobile,ft as useStepAnimation};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hanzo/ui",
3
- "version": "5.6.1",
3
+ "version": "5.7.1",
4
4
  "description": "Multi-framework UI library with React, Vue, Svelte, and React Native support. Based on shadcn/ui with comprehensive framework coverage.",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/",
@@ -26,7 +26,7 @@
26
26
  "repository": {
27
27
  "type": "git",
28
28
  "url": "git+https://github.com/hanzoai/ui.git",
29
- "directory": "pkg/ui"
29
+ "directory": "pkgs/ui"
30
30
  },
31
31
  "keywords": [
32
32
  "components",
@@ -47,9 +47,10 @@
47
47
  ],
48
48
  "scripts": {
49
49
  "lat": "npm show @hanzo/ui version",
50
- "pub": "npm publish",
50
+ "pub": "./scripts/publish.sh",
51
51
  "tc": "tsc --project tsconfig.build.json",
52
- "build": "npm run clean && npm run build:minimal && npm run tc",
52
+ "check:no-hanzogui": "bash scripts/check-no-hanzogui.sh",
53
+ "build": "npm run check:no-hanzogui && npm run clean && npm run build:minimal && npm run tc",
53
54
  "build:minimal": "tsup --config tsup.config.minimal.ts",
54
55
  "build:namespaces": "tsup --config tsup.config.namespaces.ts",
55
56
  "build:full": "tsup --config tsup.config.production.ts",
@@ -98,16 +99,6 @@
98
99
  "import": "./dist/registry/*.mjs",
99
100
  "require": "./dist/registry/*.js"
100
101
  },
101
- "./primitives/bases/gui": {
102
- "types": "./dist/primitives/bases/gui/index.d.ts",
103
- "import": "./dist/primitives/bases/gui/index.mjs",
104
- "require": "./dist/primitives/bases/gui/index.js"
105
- },
106
- "./primitives/bases/gui/*": {
107
- "types": "./dist/primitives/bases/gui/*.d.ts",
108
- "import": "./dist/primitives/bases/gui/*.mjs",
109
- "require": "./dist/primitives/bases/gui/*.js"
110
- },
111
102
  "./calendar": {
112
103
  "types": "./dist/calendar.d.ts",
113
104
  "import": "./dist/calendar.mjs",
@@ -661,7 +652,7 @@
661
652
  }
662
653
  },
663
654
  "dependencies": {
664
- "@next/third-parties": "^16.2.1",
655
+ "@next/third-parties": "^16.2.7",
665
656
  "@radix-ui/react-accordion": "^1.2.12",
666
657
  "@radix-ui/react-alert-dialog": "^1.1.15",
667
658
  "@radix-ui/react-aspect-ratio": "^1.1.8",
@@ -851,6 +842,7 @@
851
842
  "embla-carousel": "^8.6.0",
852
843
  "filesize": "^11.0.13",
853
844
  "glob": "^13.0.6",
845
+ "happy-dom": "^20.10.6",
854
846
  "jest": "^30.3.0",
855
847
  "jsdom": "^29.0.1",
856
848
  "react-dropzone": "^15.0.0",