@zonos/amino 6.0.0-alpha.20 → 6.0.0-alpha.22

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.
@@ -1 +1 @@
1
- "use strict";var e=require("../../_rollupPluginBabelHelpers-4522587c.js"),a=require("../../tslib.es6-cdc5f922.js"),r=require("react"),n=require("class-variance-authority"),t=require("./RippleGroup.js"),s=require("./useRipple.js"),o=require("../spinner/Spinner.js"),i=require("../../styles/constants/theme.js"),d=require("../../utils/cn.js"),c=require("../../utils/getAminoColor.js"),p=require("../../utils/getTestId.js"),u=require("react/jsx-runtime");require("framer-motion"),require("uuid"),require("./_Ripple.js"),require("clsx"),require("tailwind-merge");var l=n.cva("amino-button relative outline-none box-border flex flex-row items-center justify-center transition-all duration-200 select-none font-sans tracking-normal cursor-pointer disabled:cursor-not-allowed disabled:opacity-disabled whitespace-nowrap text-amino-base w-fit [&_svg_path:not([data-is-secondary-color])]:fill-current",{compoundVariants:[{className:"text-blue-600 shadow-[0px_0px_0px_1px] shadow-blue-600 bg-transparent [text-shadow:none] [&_svg_path:not([data-is-secondary-color])]:drop-shadow-none hover:bg-blue-50 hover:bg-none active:bg-blue-100 disabled:bg-transparent disabled:shadow-blue-600 [&_.spinner-wrapper]:bg-transparent",outline:!0,variant:"primary"},{className:"text-green-600 shadow-[0px_0px_0px_1px] shadow-green-600 bg-transparent [text-shadow:none] [&_svg_path:not([data-is-secondary-color])]:drop-shadow-none hover:bg-green-50 hover:bg-none active:bg-green-100 disabled:bg-transparent disabled:shadow-green-600 [&_.spinner-wrapper]:bg-transparent",outline:!0,variant:"success"},{className:"text-red-600 shadow-[0px_0px_0px_1px] shadow-red-600 bg-transparent [text-shadow:none] [&_svg_path:not([data-is-secondary-color])]:drop-shadow-none hover:bg-red-50 hover:bg-none active:bg-red-100 disabled:bg-transparent disabled:shadow-red-600 [&_.spinner-wrapper]:bg-transparent",outline:!0,variant:"danger"},{className:"text-orange-600 shadow-[0px_0px_0px_1px] shadow-orange-600 bg-transparent [text-shadow:none] [&_svg_path:not([data-is-secondary-color])]:drop-shadow-none hover:bg-orange-50 hover:bg-none active:bg-orange-100 disabled:bg-transparent disabled:shadow-[0px_0px_0px_1px_inset] disabled:shadow-orange-600 [&_.spinner-wrapper]:bg-transparent",outline:!0,variant:"warning"},{className:"text-purple-600 shadow-[0px_0px_0px_1px] shadow-purple-600 bg-transparent [text-shadow:none] [&_svg_path:not([data-is-secondary-color])]:drop-shadow-none hover:bg-purple-50 hover:bg-none active:bg-purple-100 disabled:bg-transparent disabled:shadow-[0px_0px_0px_1px_inset] disabled:shadow-purple-600 [&_.spinner-wrapper]:bg-transparent",outline:!0,variant:"purple"},{className:"text-cyan-600 shadow-[0px_0px_0px_1px] shadow-cyan-600 bg-transparent [text-shadow:none] [&_svg_path:not([data-is-secondary-color])]:drop-shadow-none hover:bg-cyan-50 hover:bg-none active:bg-cyan-100 disabled:bg-transparent disabled:shadow-[0px_0px_0px_1px_inset] disabled:shadow-cyan-600 [&_.spinner-wrapper]:bg-transparent",outline:!0,variant:"cyan"},{className:"text-text-color bg-transparent shadow-none border border-gray-300 hover:bg-black/[0.04] dark:hover:bg-white/[0.08] hover:bg-none active:bg-gray-100 focus:shadow-[rgba(0,0,0,0.08)_0px_0px_0px_4px] dark:focus:shadow-[rgba(220,225,255,0.24)_0px_0px_0px_4px]",outline:!0,variant:"standard"}],defaultVariants:{outline:!1,size:"sm",variant:"standard"},variants:{outline:{false:"",true:""},size:{lg:"h-amino-lg",md:"h-amino-md",sm:"h-amino-sm",xl:"h-amino-xl"},variant:{cyan:"shadow-btn-cyan [text-shadow:0px_1px_1px_rgba(0,0,0,0.2)] [&_svg_path:not([data-is-secondary-color])]:drop-shadow-[0px_1px_1px_rgba(0,0,0,0.2)] dark:text-gray-1000 active:bg-cyan-600 focus:shadow-btn-cyan-focus disabled:bg-gray-500 disabled:shadow-btn-disabled [&_.spinner-wrapper]:bg-amino-cyan",danger:"shadow-btn-danger [text-shadow:0px_1px_1px_rgba(0,0,0,0.2)] [&_svg_path:not([data-is-secondary-color])]:drop-shadow-[0px_1px_1px_rgba(0,0,0,0.2)] dark:text-gray-1000 active:bg-red-600 focus:shadow-btn-danger-focus disabled:bg-gray-500 disabled:shadow-btn-disabled [&_.spinner-wrapper]:bg-danger",inlineLink:"p-0 inline-flex leading-[inherit] text-[var(--amino-button-color)] hover:text-[var(--amino-button-text-button-hover-color)] active:text-[var(--amino-button-text-button-hover-color)]",inverted:"bg-gray-1000 text-gray-0 shadow-raised-standard hover:bg-gray-900 active:bg-gray-600 focus:shadow-raised-standard disabled:shadow-btn-disabled [&_.spinner-wrapper]:bg-gray-1000",link:"active:bg-blue-100 hover:bg-blue-50 focus:shadow-btn-focus-ring",plain:"",primary:"shadow-btn-primary [text-shadow:0px_1px_1px_rgba(0,0,0,0.2)] [&_svg_path:not([data-is-secondary-color])]:drop-shadow-[0px_1px_1px_rgba(0,0,0,0.2)] dark:text-gray-1000 active:bg-blue-600 focus:shadow-btn-primary-focus disabled:bg-gray-500 disabled:shadow-btn-disabled [&_.spinner-wrapper]:bg-primary",purple:"shadow-btn-purple [text-shadow:0px_1px_1px_rgba(0,0,0,0.2)] [&_svg_path:not([data-is-secondary-color])]:drop-shadow-[0px_1px_1px_rgba(0,0,0,0.2)] dark:text-gray-1000 active:bg-purple-600 focus:shadow-btn-purple-focus disabled:bg-gray-500 disabled:shadow-btn-disabled [&_.spinner-wrapper]:bg-amino-purple",standard:"shadow-raised-standard active:bg-gray-100 focus:shadow-raised-standard",subtle:"hover:bg-gray-50 active:bg-gray-100 focus:shadow-focus-btn",success:"shadow-btn-success [text-shadow:0px_1px_1px_rgba(0,0,0,0.2)] [&_svg_path:not([data-is-secondary-color])]:drop-shadow-[0px_1px_1px_rgba(0,0,0,0.2)] dark:text-gray-1000 active:bg-green-600 focus:shadow-btn-success-focus disabled:bg-gray-500 disabled:shadow-btn-disabled [&_.spinner-wrapper]:bg-success",text:"text-[var(--amino-button-text-button-color)] hover:text-[var(--amino-button-text-button-hover-color)] disabled:text-[var(--amino-button-text-button-disabled-color)] [&.loading]:text-transparent",warning:"shadow-btn-warning [text-shadow:0px_1px_1px_rgba(0,0,0,0.2)] [&_svg_path:not([data-is-secondary-color])]:drop-shadow-[0px_1px_1px_rgba(0,0,0,0.2)] dark:text-gray-1000 active:bg-orange-600 focus:shadow-btn-warning-focus disabled:bg-gray-500 disabled:shadow-btn-disabled [&_.spinner-wrapper]:bg-warning"}}});exports.Button=function(n){var b=n.background,g=n.children,h=n.className,x=n.color,m=n.disabled,_=void 0!==m&&m,v=n.fitContentWidth,w=n.hoverBackground;n.hoverColor;var y,f=n.icon,k=n.iconRight,j=n.loading,C=void 0!==j&&j,q=n.loadingText,N=n.noRipple,R=void 0!==N&&N,z=n.outline,H=void 0!==z&&z,S=n.size,L=void 0===S?"sm":S,A=n.spinnerColor,I=n.style,B=n.tag,T=void 0===B?"button":B,W=n.testId,P=n.themeOverride,E=n.type,G=void 0===E?"button":E,O=n.variant,V=void 0===O?"standard":O,D=a.__rest(n,["background","children","className","color","disabled","fitContentWidth","hoverBackground","hoverColor","icon","iconRight","loading","loadingText","noRipple","outline","size","spinnerColor","style","tag","testId","themeOverride","type","variant"]),F=T,M=a.__read(r.useState(""),2),J=M[0],K=M[1],Q=r.useCallback(function(e){K((null==e?void 0:e.textContent)||"")},[]),U=r.useMemo(function(){return p.getTestId({componentName:"button",name:J})},[J]),X=function(){switch(L){case"sm":return 16;case"lg":case"xl":return 24;default:return 20}},Y=d.cn(l({outline:H,size:L,variant:V}),f&&!g&&"p-0",f&&!g&&"w-[var(--amino-button-size)]",k&&"icon-right",f&&"has-icon",C&&"loading [&_.content]:invisible",!_&&!C&&"active:scale-[0.99]\n hover:bg-[image:var(--amino-button-hover-background-color)]",_&&"cursor-not-allowed",f&&g&&!k&&"[&_svg:not(.amino-spinner)]:mr-[2px] [&_svg:not(.amino-spinner)]:ml-0\n [&_svg:not(.amino-spinner)]:opacity-80",f&&g&&k&&"[&_svg:not(.amino-spinner)]:ml-[2px] [&_svg:not(.amino-spinner)]:mr-0\n [&_svg:not(.amino-spinner)]:opacity-80",h),Z=r.useRef(null),$=s.useRipple({disabled:_||C,rippleEnabled:!R&&!["plain","text","inlineLink"].includes(V),rippleRef:Z}),ee=$.getRippleHandlers,ae=$.rippleEnabled,re={className:Y,disabled:_||C,size:L},ne=a.__assign(a.__assign(a.__assign({type:G},re),D),ee(D)),te=!!f&&!g;return u.jsxs(F,e._objectSpread2(e._objectSpread2({ref:Q,"data-testid":W||U,"data-theme":P,style:a.__assign(a.__assign(a.__assign(a.__assign(a.__assign({"--amino-button-background-color":function(){if(b)return c.getAminoColor(b)||"";if(H&&["primary","success","warning","danger","cyan","purple","standard"].includes(V))return"transparent";if((_||C)&&["primary","success","warning","danger","cyan","purple"].includes(V))return i.theme.gray500;switch(V){case"primary":return i.theme.primary;case"success":return i.theme.success;case"warning":return i.theme.warning;case"danger":return i.theme.danger;case"cyan":return i.theme.cyan;case"purple":return i.theme.purple;case"inverted":return i.theme.gray1000;case"standard":return i.theme.raisedSurfaceColor;case"subtle":case"inlineLink":return"none";default:return""}}(),"--amino-button-color":function(){if(x)return c.getAminoColor(x)||"";if(H)switch(V){case"primary":return i.theme.blue600;case"success":return i.theme.green600;case"warning":return i.theme.orange600;case"danger":return i.theme.red600;case"cyan":return i.theme.cyan600;case"purple":return i.theme.purple600}switch(V){case"primary":case"success":case"warning":case"danger":case"cyan":case"purple":case"inverted":return i.theme.gray0;case"link":case"inlineLink":return i.theme.blue600;case"subtle":return i.theme.textColorSecondary;default:return i.theme.textColor}}(),"--amino-button-font-weight":function(){switch(L){case"lg":case"xl":return 600;default:return 500}}(),"--amino-button-hover-background-color":function(){if(w&&"inherit"!==w){var e=c.getAminoColor(w);return"linear-gradient(".concat(e,", ").concat(e,")")}if(H)return"";switch(V){case"primary":return i.theme.buttonPrimaryHover;case"success":return i.theme.buttonSuccessHover;case"warning":return i.theme.buttonWarningHover;case"danger":return i.theme.buttonDangerHover;case"cyan":return i.theme.buttonCyanHover;case"purple":return i.theme.buttonPurpleHover;case"standard":return i.theme.buttonStandardHover;case"subtle":case"inverted":return i.theme.gray100;case"link":return i.theme.blue100;case"text":return i.theme.gray500;default:return""}}(),"--amino-button-padding":te?"0":function(){switch(L){case"sm":return"".concat(i.theme.space4," ").concat(i.theme.space8);case"lg":case"xl":return"".concat(i.theme.space12," ").concat(i.theme.space24);default:return"".concat(i.theme.space8," ").concat(i.theme.space16)}}(),"--amino-button-radius":function(){switch(L){case"sm":return i.theme.radius6;case"lg":case"xl":return i.theme.radius10;default:return i.theme.radius8}}(),"--amino-button-size":"var(--amino-size-".concat(L,")"),"--amino-button-text-button-color":_||C?D.href?i.theme.blue300:i.theme.gray300:D.href?i.theme.primary:i.theme.textColorSecondary,"--amino-button-text-button-disabled-color":D.href?i.theme.blue300:i.theme.gray300,"--amino-button-text-button-hover-color":"inlineLink"===V&&x?c.getAminoColor(x)||i.theme.blue500:D.href?i.theme.blue500:i.theme.gray500,background:"var(--amino-button-background-color)",borderRadius:"var(--amino-button-radius)"},"text"!==V&&"inlineLink"!==V&&!(H&&"standard"===V)&&{color:"var(--amino-button-color)"}),{fontWeight:"var(--amino-button-font-weight)"}),"inlineLink"!==V&&{lineHeight:"var(--amino-button-size)",padding:"var(--amino-button-padding)"}),v&&{width:"fit-content"}),I),tabIndex:"div"===T?0:void 0},ne),{},{children:[(y=A||function(){switch(V){case"primary":return H?"info":"white";case"success":return H?"success":"white";case"warning":return H?"warning":"white";case"danger":return H?"danger":"white";case"purple":return H?"purple":"white";case"cyan":return H?"cyan":"white";case"inverted":return"white";case"link":case"inlineLink":return"info";default:return"black"}}(),u.jsxs(u.Fragment,{children:[!k&&u.jsx("span",{className:"content",children:f}),u.jsx("div",{className:d.cn("content",g&&"px-amino-4"),children:g}),k&&u.jsx("span",{className:"content",children:f}),"plain"!==V&&"text"!==V&&C&&u.jsxs("span",{className:"spinner-wrapper rounded-amino-6 gap-amino-8 absolute inset-0 flex items-center justify-center",children:[u.jsx(o.Spinner,{color:y,size:X()}),q]})]})),ae&&u.jsx(t.RippleGroup,{ref:Z})]}))};
1
+ "use strict";var e=require("../../_rollupPluginBabelHelpers-4522587c.js"),a=require("../../tslib.es6-cdc5f922.js"),r=require("react"),n=require("class-variance-authority"),t=require("./RippleGroup.js"),s=require("./useRipple.js"),o=require("../spinner/Spinner.js"),i=require("../../styles/constants/theme.js"),d=require("../../utils/cn.js"),c=require("../../utils/getAminoColor.js"),p=require("../../utils/getTestId.js"),u=require("react/jsx-runtime");require("framer-motion"),require("uuid"),require("./_Ripple.js"),require("clsx"),require("tailwind-merge");var l=n.cva("amino-button relative outline-none box-border flex flex-row items-center justify-center transition-all duration-200 select-none font-sans tracking-normal cursor-pointer disabled:cursor-not-allowed disabled:opacity-disabled whitespace-nowrap text-amino-base w-fit [&_svg_path:not([data-is-secondary-color])]:fill-current",{compoundVariants:[{className:"text-blue-600 shadow-[0px_0px_0px_1px] shadow-blue-600 bg-transparent [text-shadow:none] [&_svg_path:not([data-is-secondary-color])]:drop-shadow-none hover:bg-blue-50 hover:bg-none active:bg-blue-100 disabled:bg-transparent disabled:shadow-blue-600 [&_.spinner-wrapper]:bg-transparent",outline:!0,variant:"primary"},{className:"text-green-600 shadow-[0px_0px_0px_1px] shadow-green-600 bg-transparent [text-shadow:none] [&_svg_path:not([data-is-secondary-color])]:drop-shadow-none hover:bg-green-50 hover:bg-none active:bg-green-100 disabled:bg-transparent disabled:shadow-green-600 [&_.spinner-wrapper]:bg-transparent",outline:!0,variant:"success"},{className:"text-red-600 shadow-[0px_0px_0px_1px] shadow-red-600 bg-transparent [text-shadow:none] [&_svg_path:not([data-is-secondary-color])]:drop-shadow-none hover:bg-red-50 hover:bg-none active:bg-red-100 disabled:bg-transparent disabled:shadow-red-600 [&_.spinner-wrapper]:bg-transparent",outline:!0,variant:"danger"},{className:"text-orange-600 shadow-[0px_0px_0px_1px] shadow-orange-600 bg-transparent [text-shadow:none] [&_svg_path:not([data-is-secondary-color])]:drop-shadow-none hover:bg-orange-50 hover:bg-none active:bg-orange-100 disabled:bg-transparent disabled:shadow-[0px_0px_0px_1px_inset] disabled:shadow-orange-600 [&_.spinner-wrapper]:bg-transparent",outline:!0,variant:"warning"},{className:"text-purple-600 shadow-[0px_0px_0px_1px] shadow-purple-600 bg-transparent [text-shadow:none] [&_svg_path:not([data-is-secondary-color])]:drop-shadow-none hover:bg-purple-50 hover:bg-none active:bg-purple-100 disabled:bg-transparent disabled:shadow-[0px_0px_0px_1px_inset] disabled:shadow-purple-600 [&_.spinner-wrapper]:bg-transparent",outline:!0,variant:"purple"},{className:"text-cyan-600 shadow-[0px_0px_0px_1px] shadow-cyan-600 bg-transparent [text-shadow:none] [&_svg_path:not([data-is-secondary-color])]:drop-shadow-none hover:bg-cyan-50 hover:bg-none active:bg-cyan-100 disabled:bg-transparent disabled:shadow-[0px_0px_0px_1px_inset] disabled:shadow-cyan-600 [&_.spinner-wrapper]:bg-transparent",outline:!0,variant:"cyan"},{className:"text-text-color bg-transparent shadow-none border border-gray-300 hover:bg-black/[0.04] dark:hover:bg-white/[0.08] hover:bg-none active:bg-gray-100 focus:shadow-[rgba(0,0,0,0.08)_0px_0px_0px_4px] dark:focus:shadow-[rgba(220,225,255,0.24)_0px_0px_0px_4px]",outline:!0,variant:"standard"}],defaultVariants:{outline:!1,size:"sm",variant:"standard"},variants:{outline:{false:"",true:""},size:{lg:"h-amino-lg",md:"h-amino-md",sm:"h-amino-sm",xl:"h-amino-xl"},variant:{cyan:"shadow-btn-cyan [text-shadow:0px_1px_1px_rgba(0,0,0,0.2)] [&_svg_path:not([data-is-secondary-color])]:drop-shadow-[0px_1px_1px_rgba(0,0,0,0.2)] dark:text-gray-1000 active:bg-cyan-600 focus:shadow-btn-cyan-focus disabled:bg-gray-500 disabled:shadow-btn-disabled [&_.spinner-wrapper]:bg-amino-cyan",danger:"shadow-btn-danger [text-shadow:0px_1px_1px_rgba(0,0,0,0.2)] [&_svg_path:not([data-is-secondary-color])]:drop-shadow-[0px_1px_1px_rgba(0,0,0,0.2)] dark:text-gray-1000 active:bg-red-600 focus:shadow-btn-danger-focus disabled:bg-gray-500 disabled:shadow-btn-disabled [&_.spinner-wrapper]:bg-danger",inlineLink:"p-0 inline-flex leading-[inherit] text-[var(--amino-button-color)] hover:text-[var(--amino-button-text-button-hover-color)] active:text-[var(--amino-button-text-button-hover-color)]",inverted:"bg-gray-1000 text-gray-0 shadow-raised-standard hover:bg-gray-900 active:bg-gray-600 focus:shadow-raised-standard disabled:shadow-btn-disabled [&_.spinner-wrapper]:bg-gray-1000",link:"active:bg-blue-100 hover:bg-blue-50 focus:shadow-btn-focus-ring",plain:"",primary:"shadow-btn-primary [text-shadow:0px_1px_1px_rgba(0,0,0,0.2)] [&_svg_path:not([data-is-secondary-color])]:drop-shadow-[0px_1px_1px_rgba(0,0,0,0.2)] dark:text-gray-1000 active:bg-blue-600 focus:shadow-btn-primary-focus disabled:bg-gray-500 disabled:shadow-btn-disabled [&_.spinner-wrapper]:bg-primary",purple:"shadow-btn-purple [text-shadow:0px_1px_1px_rgba(0,0,0,0.2)] [&_svg_path:not([data-is-secondary-color])]:drop-shadow-[0px_1px_1px_rgba(0,0,0,0.2)] dark:text-gray-1000 active:bg-purple-600 focus:shadow-btn-purple-focus disabled:bg-gray-500 disabled:shadow-btn-disabled [&_.spinner-wrapper]:bg-amino-purple",standard:"shadow-raised-standard active:bg-gray-100 focus:shadow-raised-standard",subtle:"hover:bg-gray-50 active:bg-gray-100 focus:shadow-focus-btn",success:"shadow-btn-success [text-shadow:0px_1px_1px_rgba(0,0,0,0.2)] [&_svg_path:not([data-is-secondary-color])]:drop-shadow-[0px_1px_1px_rgba(0,0,0,0.2)] dark:text-gray-1000 active:bg-green-600 focus:shadow-btn-success-focus disabled:bg-gray-500 disabled:shadow-btn-disabled [&_.spinner-wrapper]:bg-success",text:"text-[var(--amino-button-text-button-color)] hover:text-[var(--amino-button-text-button-hover-color)] disabled:text-[var(--amino-button-text-button-disabled-color)] [&.loading]:text-transparent",warning:"shadow-btn-warning [text-shadow:0px_1px_1px_rgba(0,0,0,0.2)] [&_svg_path:not([data-is-secondary-color])]:drop-shadow-[0px_1px_1px_rgba(0,0,0,0.2)] dark:text-gray-1000 active:bg-orange-600 focus:shadow-btn-warning-focus disabled:bg-gray-500 disabled:shadow-btn-disabled [&_.spinner-wrapper]:bg-warning"}}});exports.Button=function(n){var b=n.background,g=n.children,h=n.className,x=n.color,m=n.disabled,_=void 0!==m&&m,v=n.fitContentWidth,w=n.hoverBackground;n.hoverColor;var y,f=n.icon,k=n.iconRight,j=n.loading,C=void 0!==j&&j,q=n.loadingText,N=n.noRipple,R=void 0!==N&&N,z=n.outline,H=void 0!==z&&z,S=n.size,L=void 0===S?"sm":S,A=n.spinnerColor,I=n.style,B=n.tag,T=void 0===B?"button":B,W=n.testId,P=n.themeOverride,E=n.type,G=void 0===E?"button":E,O=n.variant,V=void 0===O?"standard":O,D=a.__rest(n,["background","children","className","color","disabled","fitContentWidth","hoverBackground","hoverColor","icon","iconRight","loading","loadingText","noRipple","outline","size","spinnerColor","style","tag","testId","themeOverride","type","variant"]),F=T,M=a.__read(r.useState(""),2),J=M[0],K=M[1],Q=r.useCallback(function(e){K((null==e?void 0:e.textContent)||"")},[]),U=r.useMemo(function(){return p.getTestId({componentName:"button",name:J})},[J]),X=function(){switch(L){case"sm":return 16;case"lg":case"xl":return 24;default:return 20}},Y=!H&&("primary"===V||"success"===V||"warning"===V||"danger"===V||"cyan"===V||"purple"===V),Z=d.cn(l({outline:H,size:L,variant:V}),f&&!g&&"p-0",f&&!g&&"w-[var(--amino-button-size)]",k&&"icon-right",f&&"has-icon",C&&"loading [&_.content]:invisible",!_&&!C&&"active:scale-[0.99]\n hover:bg-[image:var(--amino-button-hover-background-color)]",(_||C)&&"cursor-not-allowed opacity-disabled",(_||C)&&Y&&"shadow-btn-disabled",f&&g&&!k&&"[&_svg:not(.amino-spinner)]:mr-[2px] [&_svg:not(.amino-spinner)]:ml-0\n [&_svg:not(.amino-spinner)]:opacity-80",f&&g&&k&&"[&_svg:not(.amino-spinner)]:ml-[2px] [&_svg:not(.amino-spinner)]:mr-0\n [&_svg:not(.amino-spinner)]:opacity-80",h),$=r.useRef(null),ee=s.useRipple({disabled:_||C,rippleEnabled:!R&&!["plain","text","inlineLink"].includes(V),rippleRef:$}),ae=ee.getRippleHandlers,re=ee.rippleEnabled,ne={className:Z,disabled:_||C,size:L},te=a.__assign(a.__assign(a.__assign({type:G},ne),D),ae(D)),se=!!f&&!g;return u.jsxs(F,e._objectSpread2(e._objectSpread2({ref:Q,"data-testid":W||U,"data-theme":P,style:a.__assign(a.__assign(a.__assign(a.__assign(a.__assign({"--amino-button-background-color":function(){if(b)return c.getAminoColor(b)||"";if(H&&["primary","success","warning","danger","cyan","purple","standard"].includes(V))return"transparent";if((_||C)&&["primary","success","warning","danger","cyan","purple"].includes(V))return i.theme.gray500;switch(V){case"primary":return i.theme.primary;case"success":return i.theme.success;case"warning":return i.theme.warning;case"danger":return i.theme.danger;case"cyan":return i.theme.cyan;case"purple":return i.theme.purple;case"inverted":return i.theme.gray1000;case"standard":return i.theme.raisedSurfaceColor;case"subtle":case"inlineLink":return"none";default:return""}}(),"--amino-button-color":function(){if(x)return c.getAminoColor(x)||"";if(H)switch(V){case"primary":return i.theme.blue600;case"success":return i.theme.green600;case"warning":return i.theme.orange600;case"danger":return i.theme.red600;case"cyan":return i.theme.cyan600;case"purple":return i.theme.purple600}switch(V){case"primary":case"success":case"warning":case"danger":case"cyan":case"purple":case"inverted":return i.theme.gray0;case"link":case"inlineLink":return i.theme.blue600;case"subtle":return i.theme.textColorSecondary;default:return i.theme.textColor}}(),"--amino-button-font-weight":function(){switch(L){case"lg":case"xl":return 600;default:return 500}}(),"--amino-button-hover-background-color":function(){if(w&&"inherit"!==w){var e=c.getAminoColor(w);return"linear-gradient(".concat(e,", ").concat(e,")")}if(H)return"";switch(V){case"primary":return i.theme.buttonPrimaryHover;case"success":return i.theme.buttonSuccessHover;case"warning":return i.theme.buttonWarningHover;case"danger":return i.theme.buttonDangerHover;case"cyan":return i.theme.buttonCyanHover;case"purple":return i.theme.buttonPurpleHover;case"standard":return i.theme.buttonStandardHover;case"subtle":case"inverted":return i.theme.gray100;case"link":return i.theme.blue100;case"text":return i.theme.gray500;default:return""}}(),"--amino-button-padding":se?"0":function(){switch(L){case"sm":return"".concat(i.theme.space4," ").concat(i.theme.space8);case"lg":case"xl":return"".concat(i.theme.space12," ").concat(i.theme.space24);default:return"".concat(i.theme.space8," ").concat(i.theme.space16)}}(),"--amino-button-radius":function(){switch(L){case"sm":return i.theme.radius6;case"lg":case"xl":return i.theme.radius10;default:return i.theme.radius8}}(),"--amino-button-size":"var(--amino-size-".concat(L,")"),"--amino-button-text-button-color":_||C?D.href?i.theme.blue300:i.theme.gray300:D.href?i.theme.primary:i.theme.textColorSecondary,"--amino-button-text-button-disabled-color":D.href?i.theme.blue300:i.theme.gray300,"--amino-button-text-button-hover-color":"inlineLink"===V&&x?c.getAminoColor(x)||i.theme.blue500:D.href?i.theme.blue500:i.theme.gray500,background:"var(--amino-button-background-color)",borderRadius:"var(--amino-button-radius)"},"text"!==V&&"inlineLink"!==V&&!(H&&"standard"===V)&&{color:H||"primary"!==V&&"success"!==V&&"warning"!==V&&"danger"!==V&&"cyan"!==V&&"purple"!==V?"var(--amino-button-color)":"white"}),{fontWeight:"var(--amino-button-font-weight)"}),"inlineLink"!==V&&{lineHeight:"var(--amino-button-size)",padding:"var(--amino-button-padding)"}),v&&{width:"fit-content"}),I),tabIndex:"div"===T?0:void 0},te),{},{children:[(y=A||function(){switch(V){case"primary":return H?"info":"inverted";case"success":return H?"success":"inverted";case"warning":return H?"warning":"inverted";case"danger":return H?"danger":"inverted";case"purple":return H?"purple":"inverted";case"cyan":return H?"cyan":"inverted";case"inverted":return"white";case"link":case"inlineLink":return"info";default:return"black"}}(),u.jsxs(u.Fragment,{children:[!k&&u.jsx("span",{className:"content",children:f}),u.jsx("div",{className:d.cn("content",g&&"px-amino-4"),children:g}),k&&u.jsx("span",{className:"content",children:f}),"plain"!==V&&"text"!==V&&C&&u.jsxs("span",{className:"spinner-wrapper rounded-amino-6 gap-amino-8 absolute inset-0 flex items-center justify-center",children:[u.jsx(o.Spinner,{color:y,size:X()}),q]})]})),re&&u.jsx(t.RippleGroup,{ref:$})]}))};
@@ -1 +1 @@
1
- "use strict";var e=require("../../../_rollupPluginBabelHelpers-4522587c.js"),r=require("../../../tslib.es6-cdc5f922.js"),t=require("../../help-text/HelpText.js"),i=require("./input-type/_DateInput.js"),n=require("./input-type/_NumberInput.js"),u=require("./input-type/_PasswordInput.js"),a=require("./input-type/_TimeInput.js"),s=require("../../../styles/constants/theme.js"),o=require("../../../utils/cn.js"),l=require("./input-type/_InputBase.js"),d=require("react/jsx-runtime");require("../../text/Text.js"),require("clsx"),require("tailwind-merge"),require("react"),require("@floating-ui/react"),require("../../../icons/CalendarIcon.js"),require("../../../icons/icon-base/_IconBase.js"),require("../../../icons/CaretDownIcon.js"),require("../../../icons/CaretUpIcon.js"),require("../../button/Button.js"),require("class-variance-authority"),require("../../button/RippleGroup.js"),require("framer-motion"),require("uuid"),require("../../button/_Ripple.js"),require("../../../utils/getAminoColor.js"),require("../../button/useRipple.js"),require("../../spinner/Spinner.js"),require("../../../utils/getTestId.js"),require("../../../icons/EyeIcon.js"),require("../../../icons/EyeOffIcon.js"),require("../../../icons/ClockIcon.js");exports.InputSimple=function(p){var c=p.autoFocus,x=p.className,f=p.disabled,q=p.error,b=p.helpText,j=p.inputMode,y=p.inputRef,h=p.label,m=p.noBorder,I=void 0!==m&&m,v=p.onChange,w=p.onKeyDown,_=p.pattern,g=p.placeholder,B=p.prefix,C=p.readOnly,D=p.required,P=p.size,T=void 0===P?"md":P,O=p.style,z=p.suffix,F=p.tabIndex,K=p.type,M=p.value,S=p.valuePrefix,N=p.width,R=r.__rest(p,["autoFocus","className","disabled","error","helpText","inputMode","inputRef","label","noBorder","onChange","onKeyDown","pattern","placeholder","prefix","readOnly","required","size","style","suffix","tabIndex","type","value","valuePrefix","width"]);return d.jsxs("div",{className:o.cn("amino-input-wrapper relative",f&&["disabled","opacity-disabled"],x),style:r.__assign({"--amino-input-border-radius":function(){switch(T){case"sm":return"".concat(s.theme.radius6);case"lg":return"".concat(s.theme.radius10);case"xl":return"".concat(s.theme.radius12);default:return"".concat(s.theme.radius8)}}(),"--amino-input-width":N?"".concat(N,"px"):"100%"},O),children:[function(){switch(K){case"password":return d.jsx(u.PasswordInput,e._objectSpread2({ref:y,autoFocus:c,disabled:f,error:q,inputMode:j,label:h,noBorder:I,onChange:v,onKeyDown:w,pattern:_,placeholder:g,prefix:B,readOnly:C,required:D,size:T,suffix:z,tabIndex:F,value:M||"",valuePrefix:S},R));case"date":case"datetime-local":return d.jsx(i.DateInput,e._objectSpread2({ref:y,autoFocus:c,disabled:f,error:q,inputMode:j,label:h,noBorder:I,onChange:v,onKeyDown:w,pattern:_,placeholder:g,prefix:B,readOnly:C,required:D,size:T,suffix:z,tabIndex:F,type:K,value:M||"",valuePrefix:S},R));case"number":return d.jsx(n.NumberInput,e._objectSpread2({ref:y,autoFocus:c,disabled:f,error:q,inputMode:j,label:h,noBorder:I,onChange:v,onKeyDown:w,pattern:_,placeholder:g,prefix:B,readOnly:C,required:D,size:T,suffix:z,tabIndex:F,value:M||"",valuePrefix:S},R));case"time":return d.jsx(a.TimeInput,e._objectSpread2({ref:y,autoFocus:c,disabled:f,error:q,inputMode:j,label:h,noBorder:I,onChange:v,onKeyDown:w,pattern:_,placeholder:g,prefix:B,readOnly:C,required:D,size:T,suffix:z,tabIndex:F,value:M||"",valuePrefix:S},R));default:return d.jsx(l.InputBase,e._objectSpread2({ref:y,autoFocus:c,className:x,disabled:f,error:q,inputMode:j,label:h,noBorder:I,onChange:v,onKeyDown:w,pattern:_,placeholder:g,prefix:B,readOnly:C,required:D,size:T,suffix:z,tabIndex:F,type:K,value:M||"",valuePrefix:S},R))}}(),d.jsx(t.HelpText,{error:q,helpText:b})]})};
1
+ "use strict";var e=require("../../../_rollupPluginBabelHelpers-4522587c.js"),r=require("../../../tslib.es6-cdc5f922.js"),t=require("../../help-text/HelpText.js"),i=require("./input-type/_DateInput.js"),n=require("./input-type/_NumberInput.js"),u=require("./input-type/_PasswordInput.js"),a=require("./input-type/_TimeInput.js"),s=require("../../../styles/constants/theme.js"),o=require("../../../utils/cn.js"),l=require("./input-type/_InputBase.js"),d=require("react/jsx-runtime");require("../../text/Text.js"),require("clsx"),require("tailwind-merge"),require("react"),require("@floating-ui/react"),require("../../../icons/CalendarIcon.js"),require("../../../icons/icon-base/_IconBase.js"),require("../../../icons/CaretDownIcon.js"),require("../../../icons/CaretUpIcon.js"),require("../../button/Button.js"),require("class-variance-authority"),require("../../button/RippleGroup.js"),require("framer-motion"),require("uuid"),require("../../button/_Ripple.js"),require("../../../utils/getAminoColor.js"),require("../../button/useRipple.js"),require("../../spinner/Spinner.js"),require("../../../utils/getTestId.js"),require("../../../icons/EyeIcon.js"),require("../../../icons/EyeOffIcon.js"),require("../../../icons/ClockIcon.js");exports.InputSimple=function(p){var c=p.autoFocus,x=p.className,f=p.disabled,q=p.error,b=p.helpText,j=p.inputMode,h=p.inputRef,y=p.label,m=p.noBorder,I=void 0!==m&&m,v=p.onChange,w=p.onKeyDown,_=p.pattern,g=p.placeholder,B=p.prefix,C=p.readOnly,D=p.required,P=p.size,T=void 0===P?"md":P,O=p.style,z=p.suffix,F=p.tabIndex,K=p.type,M=p.value,S=p.valuePrefix,N=p.width,R=r.__rest(p,["autoFocus","className","disabled","error","helpText","inputMode","inputRef","label","noBorder","onChange","onKeyDown","pattern","placeholder","prefix","readOnly","required","size","style","suffix","tabIndex","type","value","valuePrefix","width"]);return d.jsxs("div",{className:o.cn("amino-input-wrapper relative w-(--amino-input-width)",f&&["disabled","opacity-disabled"],x),style:r.__assign({"--amino-input-border-radius":function(){switch(T){case"sm":return"".concat(s.theme.radius6);case"lg":return"".concat(s.theme.radius10);case"xl":return"".concat(s.theme.radius12);default:return"".concat(s.theme.radius8)}}(),"--amino-input-width":N?"".concat(N,"px"):"100%"},O),children:[function(){switch(K){case"password":return d.jsx(u.PasswordInput,e._objectSpread2({ref:h,autoFocus:c,disabled:f,error:q,inputMode:j,label:y,noBorder:I,onChange:v,onKeyDown:w,pattern:_,placeholder:g,prefix:B,readOnly:C,required:D,size:T,suffix:z,tabIndex:F,value:M||"",valuePrefix:S},R));case"date":case"datetime-local":return d.jsx(i.DateInput,e._objectSpread2({ref:h,autoFocus:c,disabled:f,error:q,inputMode:j,label:y,noBorder:I,onChange:v,onKeyDown:w,pattern:_,placeholder:g,prefix:B,readOnly:C,required:D,size:T,suffix:z,tabIndex:F,type:K,value:M||"",valuePrefix:S},R));case"number":return d.jsx(n.NumberInput,e._objectSpread2({ref:h,autoFocus:c,disabled:f,error:q,inputMode:j,label:y,noBorder:I,onChange:v,onKeyDown:w,pattern:_,placeholder:g,prefix:B,readOnly:C,required:D,size:T,suffix:z,tabIndex:F,value:M||"",valuePrefix:S},R));case"time":return d.jsx(a.TimeInput,e._objectSpread2({ref:h,autoFocus:c,disabled:f,error:q,inputMode:j,label:y,noBorder:I,onChange:v,onKeyDown:w,pattern:_,placeholder:g,prefix:B,readOnly:C,required:D,size:T,suffix:z,tabIndex:F,value:M||"",valuePrefix:S},R));default:return d.jsx(l.InputBase,e._objectSpread2({ref:h,autoFocus:c,className:x,disabled:f,error:q,inputMode:j,label:y,noBorder:I,onChange:v,onKeyDown:w,pattern:_,placeholder:g,prefix:B,readOnly:C,required:D,size:T,suffix:z,tabIndex:F,type:K,value:M||"",valuePrefix:S},R))}}(),d.jsx(t.HelpText,{error:q,helpText:b})]})};
@@ -1 +1 @@
1
- "use strict";var e=require("../../tslib.es6-cdc5f922.js"),r=require("react"),t=require("clsx"),n=require("../button/Button.js"),a=require("../flex/Flex.js"),o=require("../input/Input.js"),s=require("../text/Text.js"),l=require("../../icons/CheckmarkIcon.js"),i=require("../../icons/ChevronDownIcon.js"),c=require("../../icons/ChevronRightIcon.js"),d=require("../../icons/CopyIcon.js"),u=require("../../icons/HelpIcon.js"),x=require("../../icons/LinkIcon.js"),b=require("../../icons/SearchIcon.js"),g=require("../../utils/jsonParse.js"),h=require("react/jsx-runtime");function p(e){return e&&e.__esModule?e:{default:e}}require("../../_rollupPluginBabelHelpers-4522587c.js"),require("class-variance-authority"),require("../button/RippleGroup.js"),require("framer-motion"),require("uuid"),require("../button/_Ripple.js"),require("../../utils/getAminoColor.js"),require("../../styles/constants/theme.js"),require("../button/useRipple.js"),require("../spinner/Spinner.js"),require("../../utils/cn.js"),require("tailwind-merge"),require("../../utils/getTestId.js"),require("../help-text/HelpText.js"),require("../input/input-type/_DateInput.js"),require("@floating-ui/react"),require("../input/input-type/_FloatLabelInput.js"),require("../../icons/CalendarIcon.js"),require("../../icons/icon-base/_IconBase.js"),require("../input/input-type/_NumberInput.js"),require("../../icons/CaretDownIcon.js"),require("../../icons/CaretUpIcon.js"),require("../input/input-type/_PasswordInput.js"),require("../../icons/EyeIcon.js"),require("../../icons/EyeOffIcon.js"),require("../input/input-type/_TimeInput.js"),require("../../icons/ClockIcon.js");var y=p(t),f=function(e){return null===e?"null":Array.isArray(e)?"array":typeof e},v=function(r,t){var n,a,o=r;try{for(var s=e.__values(t),l=s.next();!l.done;l=s.next()){var i=l.value;if(null===o||"object"!=typeof o)return;if(Array.isArray(o)){var c=parseInt(i,10);if(Number.isNaN(c)||c<0||c>=o.length)return;o=o[c]}else{if(!(i in o))return;o=o[i]}}}catch(e){n={error:e}}finally{try{l&&!l.done&&(a=s.return)&&a.call(s)}finally{if(n)throw n.error}}return o},k=function(e){switch(e){case"object":return"{}";case"array":return"[]";case"string":return'""';case"number":return"#";case"boolean":return"◯";case"null":return"∅";default:return"?"}},m=function(r,t){var n,a;if(null===r||"object"!=typeof r)return r;if(Array.isArray(r))return r.map(function(e){return m(e,t)});var o=r,s=Object.keys(o).sort(function(e,r){var n=e.localeCompare(r,void 0,{sensitivity:"base"});return"asc"===t?n:-n}),l={};try{for(var i=e.__values(s),c=i.next();!c.done;c=i.next()){var d=c.value,u=o[d];void 0!==u&&(l[d]=m(u,t))}}catch(e){n={error:e}}finally{try{c&&!c.done&&(a=i.return)&&a.call(i)}finally{if(n)throw n.error}}return l},j=function(e){return"undefined"!=typeof CSS&&CSS.escape?CSS.escape(e):e.replace(/["\\]/g,"\\$&")},w=function(e,r){switch(r){case"array":var t=e;return"".concat(t.length," ").concat(1===t.length?"item":"items");case"object":var n=e,a=Object.keys(n);return"".concat(a.length," ").concat(1===a.length?"field":"fields");case"string":case"number":return String(e);case"boolean":return e?"true":"false";case"null":return"null";default:return""}},N=function(e,r){if("string"===r){var t=String(e);return t.length>30?t:void 0}},_=function(r,t,n,a,o){var s;if(void 0===n&&(n=[]),void 0===a&&(a=[]),void 0===o&&(o=50),a.length>=o)return a;var l=t.toLowerCase();if(null===r||"object"!=typeof r){var i=String(r);return i.toLowerCase().includes(l)&&a.push({key:null!==(s=n[n.length-1])&&void 0!==s?s:"root",matchType:"value",path:n,preview:i.length>50?"".concat(i.slice(0,50),"..."):i}),a}return Array.isArray(r)?r.forEach(function(r,s){a.length<o&&_(r,t,e.__spreadArray(e.__spreadArray([],e.__read(n),!1),[String(s)],!1),a,o)}):Object.entries(r).forEach(function(r){var s=e.__read(r,2),i=s[0],c=s[1];if(!(a.length>=o)){if(i.toLowerCase().includes(l)){var d=f(c);a.push({key:i,matchType:"key",path:e.__spreadArray(e.__spreadArray([],e.__read(n),!1),[i],!1),preview:w(c,d)})}_(c,t,e.__spreadArray(e.__spreadArray([],e.__read(n),!1),[i],!1),a,o)}}),a},C=function(e){var r=e.name,t=e.value,n=f(t),a="boolean"===n?t?"true":"false":String(t);return h.jsx("div",{className:"border-border-color bg-surface max-w-[320px] min-w-[260px] shrink-0 overflow-y-auto border-r dark:border-gray-700 dark:bg-gray-800",children:h.jsxs("div",{className:"flex items-center gap-2 bg-blue-600 px-3 py-2.5",children:[h.jsx("span",{className:"flex size-5 shrink-0 items-center justify-center rounded bg-blue-500 text-[10px] font-semibold text-white",children:k(n)}),h.jsx("span",{className:"text-[13px] font-medium whitespace-nowrap text-white",children:r}),h.jsx("span",{className:y.default("ml-auto max-w-[180px] overflow-hidden font-mono text-[13px]\n text-ellipsis whitespace-nowrap",function(){switch(n){case"string":return"text-orange-200";case"number":return"text-blue-200";case"boolean":return"text-purple-200";case"null":return"text-blue-200 italic";default:return""}}()),children:a})]})})},S=function(t){var n=t.columnIndex,a=t.data,o=t.isActiveColumn,s=t.onFocusColumn,l=t.onSelect,i=t.selectedKey,d=r.useRef(null),u=r.useMemo(function(){return null===a||"object"!=typeof a?[]:Array.isArray(a)?a.map(function(e,r){return{key:r.toString(),type:f(e),value:e}}):Object.entries(a).map(function(r){var t=e.__read(r,2),n=t[0],a=t[1];return{key:n,type:f(a),value:a}})},[a]);return r.useEffect(function(){if(o&&i&&d.current){var e=j(i),r=d.current.querySelector('[data-key="'.concat(e,'"]'));r&&(r.focus(),r.scrollIntoView({behavior:"smooth",block:"nearest"}))}},[o,i]),r.useEffect(function(){if(i&&d.current){var e=j(i),r=d.current.querySelector('[data-key="'.concat(e,'"]'));r&&r.scrollIntoView({behavior:"smooth",block:"nearest"})}},[i]),0===u.length?h.jsx("div",{className:"border-border-color bg-surface w-[280px] max-w-[280px] min-w-[280px] shrink-0 grow-0 overflow-y-auto border-r dark:border-gray-700 dark:bg-gray-800 [&::-webkit-scrollbar]:w-1.5 [&::-webkit-scrollbar-thumb]:rounded [&::-webkit-scrollbar-thumb]:bg-gray-300",children:h.jsx("div",{className:"p-6 text-center text-gray-500 italic",children:"Empty"})}):h.jsx("div",{ref:d,className:"border-border-color bg-surface w-[280px] max-w-[280px] min-w-[280px] shrink-0 grow-0 overflow-y-auto border-r dark:border-gray-700 dark:bg-gray-800 [&::-webkit-scrollbar]:w-1.5 [&::-webkit-scrollbar-thumb]:rounded [&::-webkit-scrollbar-thumb]:bg-gray-300",children:u.map(function(e){var r="object"===e.type||"array"===e.type,t=i===e.key;return h.jsxs("button",{className:y.default("flex w-full cursor-pointer items-center gap-2 border-none\n bg-transparent px-3 py-2.5 text-left transition-colors\n duration-100 hover:bg-gray-50 dark:hover:bg-gray-700",t&&"bg-blue-600 hover:bg-blue-600 dark:bg-blue-600\n dark:hover:bg-blue-600"),"data-key":e.key,onClick:function(){s(n),l(e.key)},onFocus:function(){return s(n)},type:"button",children:[h.jsx("span",{className:y.default("flex size-5 shrink-0 items-center justify-center rounded\n bg-gray-100 text-[10px] font-semibold text-gray-500\n dark:bg-gray-700 dark:text-gray-400",t&&"bg-blue-500 text-white dark:bg-blue-500 dark:text-white"),children:k(e.type)}),h.jsx("span",{className:y.default("flex-1 overflow-hidden text-[13px] font-medium text-ellipsis\n whitespace-nowrap text-gray-800 dark:text-gray-200",t&&"text-white dark:text-white"),title:e.key,children:e.key}),h.jsx("span",{className:y.default("max-w-[100px] shrink-0 overflow-hidden text-xs text-ellipsis\n whitespace-nowrap text-gray-500 dark:text-gray-500",t&&"text-blue-200 dark:text-blue-200"),title:N(e.value,e.type),children:w(e.value,e.type)}),r&&h.jsx(c.ChevronRightIcon,{className:y.default("shrink-0 text-gray-400",t&&"text-blue-200 dark:text-blue-200"),size:14})]},e.key)})})},A=function(t){var n=t.depth,a=t.expandedPaths,o=t.nodeKey,s=t.onCopy,l=t.onSelect,u=t.onToggle,x=t.path,b=t.selectedPath,g=t.value,p=f(g),v="object"===p||"array"===p,m=a.has(x),j=e.__read(r.useState(!1),2),_=j[0],C=j[1],S=x.split("::").slice(1),I=null!==b&&S.length===b.length&&S.every(function(e,r){return e===b[r]}),z=r.useMemo(function(){return v&&m?Array.isArray(g)?g.map(function(e,r){return{key:r.toString(),value:e}}):Object.entries(g).map(function(r){var t=e.__read(r,2);return{key:t[0],value:t[1]}}):[]},[g,v,m]);return h.jsxs("div",{className:"block",children:[h.jsxs("div",{className:y.default("relative mx-2 flex cursor-pointer items-center gap-1 rounded px-2\n py-1 hover:bg-gray-50 dark:hover:bg-gray-800",I&&"bg-blue-50 hover:bg-blue-100 dark:bg-gray-700\n dark:hover:bg-gray-600"),"data-path":JSON.stringify(S),onClick:function(e){e.stopPropagation(),l(S,g),v&&u(x)},onKeyDown:function(e){"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),l(S,g),v&&u(x))},onMouseEnter:function(){return C(!0)},onMouseLeave:function(){return C(!1)},role:"button",style:{paddingLeft:"".concat(20*n+8,"px")},tabIndex:0,children:[v&&h.jsx("span",{className:"flex size-[18px] items-center justify-center text-gray-500",children:m?h.jsx(i.ChevronDownIcon,{size:14}):h.jsx(c.ChevronRightIcon,{size:14})}),!v&&h.jsx("span",{className:"w-[18px]"}),h.jsx("span",{className:"mr-1 flex size-[18px] shrink-0 items-center justify-center rounded-[3px] bg-gray-100 text-[9px] font-semibold text-gray-500 dark:bg-gray-700 dark:text-gray-400",children:k(p)}),h.jsx("span",{className:"font-medium text-gray-800 dark:text-gray-200",title:o,children:o}),!v&&h.jsxs(h.Fragment,{children:[h.jsx("span",{className:"mx-1 text-gray-500 dark:text-gray-600",children:":"}),function(){switch(p){case"string":return h.jsxs("span",{className:"text-orange-600 dark:text-orange-400",children:['"',String(g),'"']});case"number":return h.jsx("span",{className:"text-blue-600 dark:text-blue-400",children:String(g)});case"boolean":return h.jsx("span",{className:"text-purple-600 dark:text-purple-400",children:g?"true":"false"});case"null":return h.jsx("span",{className:"text-gray-500 italic dark:text-gray-500",children:"null"});default:return null}}()]}),v&&!m&&h.jsx("span",{className:"ml-2 text-xs text-gray-400 dark:text-gray-600",title:N(g,p),children:w(g,p)}),_&&h.jsx("button",{className:"absolute top-1/2 right-2 flex size-[22px] -translate-y-1/2 cursor-pointer items-center justify-center rounded border-none bg-gray-100 text-gray-600 hover:bg-gray-200 hover:text-gray-800 dark:bg-gray-700 dark:text-gray-400 dark:hover:bg-gray-600 dark:hover:text-gray-200",onClick:function(e){e.stopPropagation(),s(g)},type:"button",children:h.jsx(d.CopyIcon,{size:12})})]}),m&&z.length>0&&h.jsx("div",{className:"block",children:z.map(function(e){return h.jsx(A,{depth:n+1,expandedPaths:a,nodeKey:e.key,onCopy:s,onSelect:l,onToggle:u,path:"".concat(x,"::").concat(e.key),selectedPath:b,value:e.value},e.key)})})]})},I=function(t){var a=t.data,o=t.onCopy,s=r.useMemo(function(){return JSON.stringify(a,null,2)},[a]),l=r.useMemo(function(){return s.split("\n")},[s]),i=r.useRef(null),c=e.__read(r.useState(0),2),u=c[0],x=c[1],b=e.__read(r.useState(!1),2),g=b[0],p=b[1],y=e.__read(r.useState(1),2),f=y[0],v=y[1];r.useEffect(function(){var e=i.current;if(e){var r=function(){var r=e.clientHeight,t=e.scrollHeight,n=e.scrollTop,a=t-r;x(a>0?n/a:0);var o=Math.floor(n/19.5)+1;v(Math.min(o,l.length)),p(a>100)};return e.addEventListener("scroll",r),r(),function(){return e.removeEventListener("scroll",r)}}},[l.length]);var k=function(){var e;null===(e=i.current)||void 0===e||e.scrollTo({behavior:"smooth",top:0})},m=function(){i.current&&i.current.scrollTo({behavior:"smooth",top:i.current.scrollHeight})},j=function(){i.current&&i.current.scrollBy({behavior:"smooth",top:.8*-i.current.clientHeight})},w=function(){i.current&&i.current.scrollBy({behavior:"smooth",top:.8*i.current.clientHeight})};return r.useEffect(function(){var e=function(e){e.target instanceof HTMLInputElement||e.target instanceof HTMLTextAreaElement||("PageUp"===e.key?(e.preventDefault(),j()):"PageDown"===e.key?(e.preventDefault(),w()):"Home"===e.key&&(e.metaKey||e.ctrlKey)?(e.preventDefault(),k()):"End"===e.key&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),m()))};return window.addEventListener("keydown",e),function(){return window.removeEventListener("keydown",e)}},[]),h.jsxs("div",{className:"relative flex h-full flex-col",children:[h.jsxs("div",{className:"border-border-color bg-surface flex items-center gap-4 border-b px-4 py-2 dark:border-gray-700 dark:bg-gray-900",children:[h.jsx(n.Button,{icon:h.jsx(d.CopyIcon,{size:16}),onClick:o,size:"sm",variant:"subtle",children:"Copy JSON"}),h.jsxs("span",{className:"text-xs text-gray-500",children:[l.length.toLocaleString()," lines"]})]}),h.jsxs("div",{ref:i,className:"flex flex-1 overflow-auto scroll-smooth bg-gray-900 dark:bg-[#1a1a2e] [&::-webkit-scrollbar]:size-3.5 [&::-webkit-scrollbar-thumb]:rounded-[7px] [&::-webkit-scrollbar-thumb]:border-[3px] [&::-webkit-scrollbar-thumb]:border-transparent [&::-webkit-scrollbar-thumb]:bg-white/20 [&::-webkit-scrollbar-thumb]:bg-clip-content [&::-webkit-scrollbar-thumb:hover]:bg-white/30 [&::-webkit-scrollbar-thumb:hover]:bg-clip-content [&::-webkit-scrollbar-track]:bg-black/20",children:[h.jsx("div",{className:"sticky left-0 z-[1] shrink-0 bg-black/20 py-4 select-none dark:bg-black/30",children:l.map(function(e,r){return h.jsx("div",{className:"px-4 text-right font-mono text-[13px] leading-[1.5] text-gray-600",children:r+1},r)})}),h.jsx("pre",{className:"m-0 min-w-0 flex-1 p-4 font-mono text-[13px] leading-[1.5] text-gray-200 dark:text-gray-100",children:h.jsx("code",{className:"block whitespace-pre",children:s})})]}),g&&h.jsxs("div",{className:"absolute right-4 bottom-4 z-10 flex flex-col items-end gap-2",children:[h.jsxs("div",{className:"rounded bg-[rgba(30,30,46,0.95)] px-2 py-1 font-mono text-[11px] text-white/70 backdrop-blur",children:["Line ",f.toLocaleString()," /"," ",l.length.toLocaleString()]}),h.jsx("div",{className:"h-[60px] w-1 overflow-hidden rounded-sm bg-white/10",children:h.jsx("div",{className:"w-full rounded-sm bg-blue-500 transition-[height] duration-100",style:{height:"".concat(100*u,"%")}})}),h.jsxs("div",{className:"flex flex-col gap-1 rounded-lg border border-white/10 bg-[rgba(30,30,46,0.95)] p-1.5 backdrop-blur",children:[h.jsx("button",{className:"flex size-7 items-center justify-center rounded border-none bg-transparent text-white/60 transition-all duration-150 hover:bg-white/10 hover:text-white active:bg-white/15 disabled:cursor-not-allowed disabled:opacity-30",disabled:u<.01,onClick:k,title:"Scroll to top (Cmd/Ctrl+Home)",type:"button",children:h.jsx("svg",{fill:"currentColor",height:"14",viewBox:"0 0 24 24",width:"14",children:h.jsx("path",{d:"M12 4L4 12h5v8h6v-8h5L12 4z"})})}),h.jsx("button",{className:"flex size-7 items-center justify-center rounded border-none bg-transparent text-white/60 transition-all duration-150 hover:bg-white/10 hover:text-white active:bg-white/15 disabled:cursor-not-allowed disabled:opacity-30",disabled:u<.01,onClick:j,title:"Page up (PageUp)",type:"button",children:h.jsx("svg",{fill:"currentColor",height:"12",viewBox:"0 0 24 24",width:"12",children:h.jsx("path",{d:"M7 14l5-5 5 5H7z"})})}),h.jsx("button",{className:"flex size-7 items-center justify-center rounded border-none bg-transparent text-white/60 transition-all duration-150 hover:bg-white/10 hover:text-white active:bg-white/15 disabled:cursor-not-allowed disabled:opacity-30",disabled:u>.99,onClick:w,title:"Page down (PageDown)",type:"button",children:h.jsx("svg",{fill:"currentColor",height:"12",viewBox:"0 0 24 24",width:"12",children:h.jsx("path",{d:"M7 10l5 5 5-5H7z"})})}),h.jsx("button",{className:"flex size-7 items-center justify-center rounded border-none bg-transparent text-white/60 transition-all duration-150 hover:bg-white/10 hover:text-white active:bg-white/15 disabled:cursor-not-allowed disabled:opacity-30",disabled:u>.99,onClick:m,title:"Scroll to bottom (Cmd/Ctrl+End)",type:"button",children:h.jsx("svg",{fill:"currentColor",height:"14",viewBox:"0 0 24 24",width:"14",children:h.jsx("path",{d:"M12 20l8-8h-5V4H9v8H4l8 8z"})})})]})]})]})},z=function(r){var t=r.data,n=r.indent,a=void 0===n?0:n,o=" ".repeat(a),s=" ".repeat(a+1);if(null===t)return h.jsx("span",{className:"text-gray-500 italic dark:text-gray-500",children:"null"});if("boolean"==typeof t)return h.jsx("span",{className:"text-cyan-600 dark:text-cyan-400",children:t?"true":"false"});if("number"==typeof t)return h.jsx("span",{className:"text-purple-600 dark:text-purple-400",children:t});if("string"==typeof t)return h.jsxs("span",{className:"text-orange-600 dark:text-orange-400",children:['"',t,'"']});if(Array.isArray(t))return 0===t.length?h.jsx("span",{className:"text-gray-600 dark:text-gray-500",children:"[]"}):h.jsxs(h.Fragment,{children:[h.jsx("span",{className:"text-gray-600 dark:text-gray-500",children:"["}),"\n",t.map(function(e,r){return h.jsxs("span",{children:[s,h.jsx(z,{data:e,indent:a+1}),r<t.length-1&&h.jsx("span",{className:"text-gray-500 dark:text-gray-600",children:","}),"\n"]},"array-".concat(a,"-").concat(r))}),o,h.jsx("span",{className:"text-gray-600 dark:text-gray-500",children:"]"})]});if("object"==typeof t){var l=Object.entries(t);return 0===l.length?h.jsx("span",{className:"text-gray-600 dark:text-gray-500",children:"{}"}):h.jsxs(h.Fragment,{children:[h.jsx("span",{className:"text-gray-600 dark:text-gray-500",children:"{"}),"\n",l.map(function(r,t){var n=e.__read(r,2),o=n[0],i=n[1];return h.jsxs("span",{children:[s,h.jsxs("span",{className:"text-blue-600 dark:text-blue-400",children:['"',o,'"']}),h.jsx("span",{className:"text-gray-500 dark:text-gray-600",children:": "}),h.jsx(z,{data:i,indent:a+1}),t<l.length-1&&h.jsx("span",{className:"text-gray-500 dark:text-gray-600",children:","}),"\n"]},o)}),o,h.jsx("span",{className:"text-gray-600 dark:text-gray-500",children:"}"})]})}return null},q=function(t){var a=t.path,o=t.value,s=f(o),i=e.__read(r.useState(!1),2),c=i[0],u=i[1],x=e.__read(r.useState(!1),2),b=x[0],g=x[1],p="object"!==s&&"array"!==s,y=r.useRef(null),v=r.useRef(null);r.useEffect(function(){return function(){y.current&&clearTimeout(y.current),v.current&&clearTimeout(v.current)}},[]);return h.jsxs("div",{className:"p-0",children:[h.jsxs("div",{className:"mb-4 flex flex-col gap-3 border-b border-gray-100 bg-gradient-to-b from-gray-50 to-transparent px-4 pt-4 pb-4 dark:border-gray-700 dark:from-gray-800",children:[h.jsxs("div",{className:"flex items-center gap-2.5",children:[h.jsx("div",{className:"font-mono text-base font-semibold break-all text-blue-600 dark:text-blue-400",children:0===a.length?h.jsx("span",{className:"font-medium text-gray-500 dark:text-gray-500",children:"root"}):a[a.length-1]}),h.jsx("span",{className:"inline-flex shrink-0 rounded bg-gray-100 px-2.5 py-[3px] text-[10px] font-bold tracking-wide text-gray-600 uppercase dark:bg-gray-700 dark:text-gray-300",children:s.toUpperCase()})]}),a.length>1&&h.jsx("div",{className:"font-mono text-[11px] break-all text-gray-500 dark:text-gray-500",children:a.join(".")}),h.jsx("div",{className:"flex flex-wrap items-center gap-2",children:p?h.jsx(n.Button,{icon:b?h.jsx(l.CheckmarkIcon,{size:14}):h.jsx(d.CopyIcon,{size:14}),onClick:function(){return e.__awaiter(void 0,void 0,void 0,function(){var r,t;return e.__generator(this,function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),r=null===o?"null":String(o),[4,navigator.clipboard.writeText(r)];case 1:return e.sent(),g(!0),v.current&&clearTimeout(v.current),v.current=setTimeout(function(){return g(!1)},2e3),[3,3];case 2:return t=e.sent(),console.error("Failed to copy:",t),[3,3];case 3:return[2]}})})},size:"sm",variant:"standard",children:b?"Copied!":"Copy Value"}):h.jsx(n.Button,{icon:c?h.jsx(l.CheckmarkIcon,{size:14}):h.jsx(d.CopyIcon,{size:14}),onClick:function(){return e.__awaiter(void 0,void 0,void 0,function(){var r,t;return e.__generator(this,function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),r="object"==typeof o?JSON.stringify(o,null,2):String(o),[4,navigator.clipboard.writeText(r)];case 1:return e.sent(),u(!0),y.current&&clearTimeout(y.current),y.current=setTimeout(function(){return u(!1)},2e3),[3,3];case 2:return t=e.sent(),console.error("Failed to copy:",t),[3,3];case 3:return[2]}})})},size:"sm",variant:"standard",children:c?"Copied!":"Copy JSON"})})]}),h.jsxs("div",{className:"px-4 pb-4",children:[h.jsx("span",{className:"mb-2 block text-[11px] font-semibold tracking-wide text-gray-500 uppercase",children:p?"Value":"Preview"}),h.jsx("pre",{className:"m-0 rounded-md bg-gray-50 px-3 py-2 font-mono text-[13px] leading-relaxed break-words whitespace-pre-wrap dark:bg-gray-800",children:h.jsx(z,{data:o})})]})]})};exports.JsonVisionViewer=function(t){var i,c=t.data,d=t.defaultViewMode,p=void 0===d?"tree":d,k=t.onClose,j=t.onShare,w=t.title,N=e.__read(r.useState(p),2),z=N[0],T=N[1],E=e.__read(r.useState("original"),2),L=E[0],D=E[1],M=e.__read(r.useState([]),2),H=M[0],P=M[1],O=e.__read(r.useState(0),2),R=O[0],B=O[1],K=e.__read(r.useState(""),2),F=K[0],V=K[1],U=e.__read(r.useState(!1),2),J=U[0],Z=U[1],G=e.__read(r.useState(-1),2),W=G[0],$=G[1],Q=e.__read(r.useState(new Set(["root"])),2),X=Q[0],Y=Q[1],ee=e.__read(r.useState("idle"),2),re=ee[0],te=ee[1],ne=r.useRef(null),ae=e.__read(r.useState(!1),2),oe=ae[0],se=ae[1];r.useEffect(function(){return function(){ne.current&&clearTimeout(ne.current)}},[]);var le=r.useMemo(function(){var e;if("undefined"==typeof navigator)return!1;var r=null===(e=navigator.userAgentData)||void 0===e?void 0:e.platform;return/Mac|iPod|iPhone|iPad/i.test(null!=r?r:navigator.userAgent)},[]),ie=le?"⌘":"Ctrl",ce=r.useRef(null),de=r.useRef(null),ue=r.useRef(null),xe=r.useRef(null),be=r.useRef(null);r.useEffect(function(){var e=function(e){var r;be.current&&!be.current.contains(e.target)&&Z(!1),de.current&&!(null===(r=de.current.parentElement)||void 0===r?void 0:r.contains(e.target))&&se(!1)};return document.addEventListener("mousedown",e),function(){return document.removeEventListener("mousedown",e)}},[]);var ge=r.useMemo(function(){return c&&"original"!==L?m(c,"keys-asc"===L?"asc":"desc"):c},[c,L]),he=r.useMemo(function(){return!ge||F.length<2?[]:_(ge,F)},[ge,F]);r.useEffect(function(){$(-1)},[he]);var pe=r.useCallback(function(r){var t,n;if(J&&0!==he.length)if("ArrowDown"===r.key)r.preventDefault(),$(function(e){return e<he.length-1?e+1:e});else if("ArrowUp"===r.key)r.preventDefault(),$(function(e){return e>0?e-1:e});else if("Enter"===r.key&&W>=0){r.preventDefault();var a=he[W];if(a&&(P(a.path),B(a.path.length-1),Z(!1),V(""),"tree"===z)){var o=new Set(X),s="root";try{for(var l=e.__values(a.path),i=l.next();!i.done;i=l.next()){var c=i.value;s="".concat(s,"::").concat(c),o.add(s)}}catch(e){t={error:e}}finally{try{i&&!i.done&&(n=l.return)&&n.call(l)}finally{if(t)throw t.error}}Y(o)}}else"Escape"===r.key&&(Z(!1),$(-1))},[J,he,W,z,X]),ye=r.useCallback(function(r){var t,n;if(P(r.path),B(r.path.length-1),Z(!1),V(""),"tree"===z){var a=new Set(X),o="root";try{for(var s=e.__values(r.path),l=s.next();!l.done;l=s.next()){var i=l.value;o="".concat(o,"::").concat(i),a.add(o)}}catch(e){t={error:e}}finally{try{l&&!l.done&&(n=s.return)&&n.call(s)}finally{if(t)throw t.error}}Y(a)}},[z,X]),fe=r.useCallback(function(){return e.__awaiter(void 0,void 0,void 0,function(){var r;return e.__generator(this,function(e){switch(e.label){case 0:if(!j)return[2];e.label=1;case 1:return e.trys.push([1,3,,4]),[4,j()];case 2:return e.sent(),te("copied"),ne.current&&clearTimeout(ne.current),ne.current=setTimeout(function(){return te("idle")},2e3),[3,4];case 3:return r=e.sent(),console.error("Failed to share:",r),[3,4];case 4:return[2]}})})},[j]),ve=r.useMemo(function(){if(ge)return 0===H.length?ge:v(ge,H)},[ge,H]),ke=r.useMemo(function(){var e,r;if(!ge)return[];var t=[];t.push({data:ge,selectedKey:null!==(e=H[0])&&void 0!==e?e:null});for(var n=ge,a=0;a<H.length;a+=1){var o=H[a];if(!o||null===n||"object"!=typeof n)break;if(Array.isArray(n)){var s=parseInt(o,10);if(!(!Number.isNaN(s)&&s>=0&&s<n.length))break;n=n[s]}else{if(!(o in n))break;n=n[o]}null!==n&&"object"==typeof n&&t.push({data:n,selectedKey:null!==(r=H[a+1])&&void 0!==r?r:null})}return t},[ge,H]),me=r.useCallback(function(e,r){P(function(t){var n=t.slice(0,e);return n.push(r),n})},[]),je=r.useCallback(function(e){Y(function(r){var t=new Set(r);return t.has(e)?t.delete(e):t.add(e),t})},[]),we=r.useCallback(function(e,r){P(e)},[]),Ne=r.useCallback(function(r){return e.__awaiter(void 0,void 0,void 0,function(){var t,n;return e.__generator(this,function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),t="object"==typeof r?JSON.stringify(r,null,2):String(r),[4,navigator.clipboard.writeText(t)];case 1:return e.sent(),[3,3];case 2:return n=e.sent(),console.error("Failed to copy:",n),[3,3];case 3:return[2]}})})},[]),_e=r.useCallback(function(){return e.__awaiter(void 0,void 0,void 0,function(){var r;return e.__generator(this,function(e){switch(e.label){case 0:if(!ge)return[2];e.label=1;case 1:return e.trys.push([1,3,,4]),[4,navigator.clipboard.writeText(JSON.stringify(ge,null,2))];case 2:return e.sent(),[3,4];case 3:return r=e.sent(),console.error("Failed to copy:",r),[3,4];case 4:return[2]}})})},[ge]),Ce=r.useCallback(function(){if(c){var r=new Set,t=function(n,a){r.add(a),Array.isArray(n)?n.forEach(function(e,r){"object"==typeof e&&null!==e&&t(e,"".concat(a,"::").concat(r))}):"object"==typeof n&&null!==n&&Object.entries(n).forEach(function(r){var n=e.__read(r,2),o=n[0],s=n[1];"object"==typeof s&&null!==s&&t(s,"".concat(a,"::").concat(o))})};t(c,"root"),Y(r)}},[c]),Se=r.useCallback(function(){Y(new Set(["root"]))},[]),Ae=r.useCallback(function(r){var t=ke[r];return null==(null==t?void 0:t.data)||"object"!=typeof t.data?[]:Array.isArray(t.data)?t.data.map(function(e,r){return{key:r.toString(),type:f(e),value:e}}):Object.entries(t.data).map(function(r){var t=e.__read(r,2),n=t[0],a=t[1];return{key:n,type:f(a),value:a}})},[ke]);return r.useEffect(function(){var e=function(e){var r,t,n;if(!(e.target instanceof HTMLInputElement||e.target instanceof HTMLTextAreaElement))if(!e.metaKey&&!e.ctrlKey||"f"!==e.key)if(!e.metaKey&&!e.ctrlKey||"c"!==e.key){if("tree"!==z){if("column"===z){var a=Ae(R),o=H[R],s=a.findIndex(function(e){return e.key===o});if("ArrowDown"===e.key){if(e.preventDefault(),0===a.length)return;if(-1===s){var l=a[0];return void(l&&me(R,l.key))}if(s<a.length-1){var i=a[s+1];i&&me(R,i.key)}}else if("ArrowUp"===e.key){if(e.preventDefault(),0===a.length)return;if(-1===s){var c=a[a.length-1];return void(c&&me(R,c.key))}if(s>0){var d=a[s-1];d&&me(R,d.key)}}else if("ArrowLeft"===e.key)e.preventDefault(),R>0&&(B(R-1),P(function(e){return e.slice(0,R)}));else if("ArrowRight"===e.key){e.preventDefault();var u=a[s];if(u&&("object"===u.type||"array"===u.type)&&R<ke.length-1){B(R+1);var x=Ae(R+1);x.length>0&&x[0]&&me(R+1,x[0].key)}}}}else if("ArrowDown"===e.key||"ArrowUp"===e.key||"ArrowLeft"===e.key||"ArrowRight"===e.key){e.preventDefault();var b=null===(t=ue.current)||void 0===t?void 0:t.querySelectorAll('[role="button"][data-path]');if(!b||0===b.length)return;var h=null===(n=ue.current)||void 0===n?void 0:n.querySelector('[role="button"][data-path].bg-blue-50'),p=Array.from(b),y=h?p.indexOf(h):-1,f=function(e){var r=p[e];if(r){var t=r.getAttribute("data-path");if(null!==t){var n=g.jsonParse(t);Array.isArray(n)&&we(n)}r.scrollIntoView({behavior:"smooth",block:"nearest"})}};if("ArrowDown"===e.key)f(-1===y?0:Math.min(y+1,p.length-1));else if("ArrowUp"===e.key){f(-1===y?p.length-1:Math.max(y-1,0))}else if("ArrowRight"===e.key&&h){var k=H.length>0?"root::".concat(H.join("::")):"",m=v(ge,H);k&&("object"==typeof m&&null!==m)&&!X.has(k)?je(k):y>=0&&y<p.length-1&&f(y+1)}else if("ArrowLeft"===e.key&&h){(k=H.length>0?"root::".concat(H.join("::")):"")&&X.has(k)?je(k):H.length>1&&P(function(e){return e.slice(0,-1)})}}}else{var j=window.getSelection();void 0!==ve&&H.length>0&&(!j||0===j.toString().length)&&(e.preventDefault(),Ne(ve))}else"column"!==z&&"tree"!==z||(e.preventDefault(),null===(r=xe.current)||void 0===r||r.focus())};return window.addEventListener("keydown",e),function(){return window.removeEventListener("keydown",e)}},[z,R,H,ke,Ae,me,ve,Ne,X,je,we]),c?h.jsxs("div",{ref:ce,className:"bg-surface flex h-full flex-col overflow-hidden rounded-lg dark:bg-gray-900",children:[h.jsxs("div",{className:"border-border-color bg-surface flex flex-wrap items-center justify-between gap-4 border-b px-4 py-3 dark:border-gray-700 dark:bg-gray-900",children:[h.jsxs(a.Flex,{alignItems:"center",gap:16,children:[w&&h.jsx(s.Text,{fontWeight:600,children:w}),h.jsxs("div",{className:"flex items-center gap-1 rounded-lg bg-gray-100 p-1 dark:bg-gray-800",children:[h.jsxs("button",{className:y.default("flex items-center gap-1.5 rounded-md border-none px-3 py-1.5\n text-[13px] font-medium whitespace-nowrap text-gray-600\n transition-all duration-150 hover:bg-gray-200\n hover:text-gray-800 dark:text-gray-400 dark:hover:bg-gray-700\n dark:hover:text-gray-200 [&>svg]:shrink-0","tree"===z&&"bg-surface hover:bg-surface text-blue-600\n shadow-[0_1px_3px_rgba(0,0,0,0.1)] hover:text-blue-600\n dark:bg-gray-700 dark:text-blue-400\n dark:shadow-[0_1px_3px_rgba(0,0,0,0.3)] dark:hover:bg-gray-700\n dark:hover:text-blue-400 [&>svg]:text-blue-600\n dark:[&>svg]:text-blue-400"),onClick:function(){return T("tree")},type:"button",children:[h.jsx("svg",{fill:"currentColor",height:"14",viewBox:"0 0 24 24",width:"14",children:h.jsx("path",{d:"M3 5h18v2H3V5zm4 4h14v2H7V9zm4 4h10v2H11v-2zm4 4h6v2h-6v-2z"})}),h.jsx("span",{children:"Tree"})]}),h.jsxs("button",{className:y.default("flex items-center gap-1.5 rounded-md border-none px-3 py-1.5\n text-[13px] font-medium whitespace-nowrap text-gray-600\n transition-all duration-150 hover:bg-gray-200\n hover:text-gray-800 dark:text-gray-400 dark:hover:bg-gray-700\n dark:hover:text-gray-200 [&>svg]:shrink-0","column"===z&&"bg-surface hover:bg-surface text-blue-600\n shadow-[0_1px_3px_rgba(0,0,0,0.1)] hover:text-blue-600\n dark:bg-gray-700 dark:text-blue-400\n dark:shadow-[0_1px_3px_rgba(0,0,0,0.3)] dark:hover:bg-gray-700\n dark:hover:text-blue-400 [&>svg]:text-blue-600\n dark:[&>svg]:text-blue-400"),onClick:function(){return T("column")},type:"button",children:[h.jsxs("svg",{fill:"currentColor",height:"14",viewBox:"0 0 24 24",width:"14",children:[h.jsx("rect",{height:"18",rx:"1",width:"6",x:"2",y:"3"}),h.jsx("rect",{height:"18",rx:"1",width:"6",x:"9",y:"3"}),h.jsx("rect",{height:"18",rx:"1",width:"6",x:"16",y:"3"})]}),h.jsx("span",{children:"Columns"})]}),h.jsxs("button",{className:y.default("flex items-center gap-1.5 rounded-md border-none px-3 py-1.5\n text-[13px] font-medium whitespace-nowrap text-gray-600\n transition-all duration-150 hover:bg-gray-200\n hover:text-gray-800 dark:text-gray-400 dark:hover:bg-gray-700\n dark:hover:text-gray-200 [&>svg]:shrink-0","editor"===z&&"bg-surface hover:bg-surface text-blue-600\n shadow-[0_1px_3px_rgba(0,0,0,0.1)] hover:text-blue-600\n dark:bg-gray-700 dark:text-blue-400\n dark:shadow-[0_1px_3px_rgba(0,0,0,0.3)] dark:hover:bg-gray-700\n dark:hover:text-blue-400 [&>svg]:text-blue-600\n dark:[&>svg]:text-blue-400"),onClick:function(){return T("editor")},type:"button",children:[h.jsx("svg",{fill:"currentColor",height:"14",viewBox:"0 0 24 24",width:"14",children:h.jsx("path",{d:"M8 3l-6 9 6 9h2l-6-9 6-9H8zm8 0l6 9-6 9h-2l6-9-6-9h2z"})}),h.jsx("span",{children:"Code"})]})]}),h.jsxs("div",{className:"ml-2 flex items-center gap-1 border-l border-gray-200 pl-3 dark:border-gray-700",children:[h.jsx("span",{className:"mr-1 text-xs text-gray-500 dark:text-gray-500",children:"Sort:"}),h.jsx("button",{className:y.default("rounded border-none bg-transparent px-2 py-1 text-xs\n font-medium text-gray-500 transition-all duration-150\n hover:bg-gray-100 hover:text-gray-700 dark:text-gray-500\n dark:hover:bg-gray-700 dark:hover:text-gray-300","original"===L&&"bg-blue-100 text-blue-700 hover:bg-blue-100\n hover:text-blue-700 dark:bg-blue-900 dark:text-blue-300\n dark:hover:bg-blue-900 dark:hover:text-blue-300"),onClick:function(){return D("original")},title:"Original order from API",type:"button",children:"Original"}),h.jsx("button",{className:y.default("rounded border-none bg-transparent px-2 py-1 text-xs\n font-medium text-gray-500 transition-all duration-150\n hover:bg-gray-100 hover:text-gray-700 dark:text-gray-500\n dark:hover:bg-gray-700 dark:hover:text-gray-300","keys-asc"===L&&"bg-blue-100 text-blue-700 hover:bg-blue-100\n hover:text-blue-700 dark:bg-blue-900 dark:text-blue-300\n dark:hover:bg-blue-900 dark:hover:text-blue-300"),onClick:function(){return D("keys-asc")},title:"Sort keys A to Z",type:"button",children:"A-Z"}),h.jsx("button",{className:y.default("rounded border-none bg-transparent px-2 py-1 text-xs\n font-medium text-gray-500 transition-all duration-150\n hover:bg-gray-100 hover:text-gray-700 dark:text-gray-500\n dark:hover:bg-gray-700 dark:hover:text-gray-300","keys-desc"===L&&"bg-blue-100 text-blue-700 hover:bg-blue-100\n hover:text-blue-700 dark:bg-blue-900 dark:text-blue-300\n dark:hover:bg-blue-900 dark:hover:text-blue-300"),onClick:function(){return D("keys-desc")},title:"Sort keys Z to A",type:"button",children:"Z-A"})]})]}),h.jsxs(a.Flex,{alignItems:"center",gap:8,children:[("column"===z||"tree"===z)&&h.jsxs("div",{ref:be,className:"relative flex items-center",children:[h.jsx(b.SearchIcon,{className:"pointer-events-none absolute left-2.5 z-[1] text-gray-500",size:16}),h.jsx(o.Input,{className:"[&>input]:pl-8",inputRef:xe,onChange:function(e){V(e.target.value),Z(e.target.value.length>=2)},onFocus:function(){return Z(F.length>=2)},onKeyDown:pe,placeholder:"Search keys & values...",size:"sm",style:{width:358},value:F}),J&&he.length>0&&h.jsxs("div",{className:"border-border-color bg-surface absolute top-full right-0 left-0 z-[100] mt-1 max-h-[300px] min-w-[280px] overflow-y-auto rounded-lg border shadow-[0_4px_12px_rgba(0,0,0,0.15)] dark:border-gray-700 dark:bg-gray-800",children:[he.map(function(e,r){return h.jsxs("button",{className:y.default("flex w-full flex-col items-start gap-0.5 border-b\n border-gray-100 bg-transparent px-3 py-2 text-left\n transition-colors duration-100 last:border-b-0\n hover:bg-blue-50 dark:border-gray-700\n dark:hover:bg-gray-700",r===W&&"bg-blue-50 dark:bg-gray-700"),onClick:function(){return ye(e)},type:"button",children:[h.jsx("span",{className:"font-mono text-xs break-all text-blue-600 dark:text-blue-400",children:e.path.join(".")}),h.jsx("span",{className:"max-w-full overflow-hidden text-[11px] text-ellipsis whitespace-nowrap text-gray-500 dark:text-gray-500",children:"key"===e.matchType?"(key)":e.preview})]},"".concat(e.path.join("."),"-").concat(e.matchType,"-").concat(r))}),50===he.length&&h.jsx("div",{className:"border-t border-gray-100 px-3 py-2 text-center text-[11px] text-gray-500 dark:border-gray-700",children:"Showing first 50 results..."})]}),J&&F.length>=2&&0===he.length&&h.jsx("div",{className:"border-border-color bg-surface absolute top-full right-0 left-0 z-[100] mt-1 max-h-[300px] min-w-[280px] overflow-y-auto rounded-lg border shadow-[0_4px_12px_rgba(0,0,0,0.15)] dark:border-gray-700 dark:bg-gray-800",children:h.jsx("div",{className:"px-3 py-4 text-center text-[13px] text-gray-500",children:"No matches found"})})]}),"tree"===z&&h.jsxs(a.Flex,{gap:4,children:[h.jsx(n.Button,{onClick:Ce,size:"sm",variant:"subtle",children:"Expand all"}),h.jsx(n.Button,{onClick:Se,size:"sm",variant:"subtle",children:"Collapse all"})]}),h.jsxs("div",{className:"relative",children:[h.jsx("button",{ref:de,className:"flex size-8 items-center justify-center rounded-md border-none bg-transparent text-gray-500 transition-all duration-150 hover:bg-gray-100 hover:text-gray-700 dark:text-gray-400 dark:hover:bg-gray-700 dark:hover:text-gray-200",onClick:function(){return se(!oe)},title:"Tips & shortcuts",type:"button",children:h.jsx(u.HelpIcon,{size:16})}),oe&&h.jsxs("div",{className:"absolute top-full right-0 z-[100] mt-2 w-[260px] overflow-hidden rounded-lg border border-gray-200 bg-white shadow-[0_4px_16px_rgba(0,0,0,0.12)] dark:border-gray-700 dark:bg-gray-800",children:[h.jsx("div",{className:"px-4 pt-3 pb-2 text-[11px] font-semibold tracking-wide text-gray-500 uppercase dark:text-gray-400",children:"Keyboard shortcuts"}),h.jsxs("div",{className:"px-4 pb-3",children:[h.jsxs("div",{className:"flex items-center justify-between py-1.5 text-[13px] text-gray-700 dark:text-gray-300",children:[h.jsxs("span",{className:"flex items-center gap-1 font-mono [&>kbd]:inline-flex [&>kbd]:h-[22px] [&>kbd]:min-w-[22px] [&>kbd]:items-center [&>kbd]:justify-center [&>kbd]:rounded [&>kbd]:border [&>kbd]:border-gray-200 [&>kbd]:bg-gray-100 [&>kbd]:px-1.5 [&>kbd]:text-[11px] [&>kbd]:text-gray-600 dark:[&>kbd]:border-gray-600 dark:[&>kbd]:bg-gray-700 dark:[&>kbd]:text-gray-300",children:[h.jsx("kbd",{children:"↑"})," ",h.jsx("kbd",{children:"↓"})]}),h.jsx("span",{children:"Navigate items"})]}),h.jsxs("div",{className:"flex items-center justify-between py-1.5 text-[13px] text-gray-700 dark:text-gray-300",children:[h.jsxs("span",{className:"flex items-center gap-1 font-mono [&>kbd]:inline-flex [&>kbd]:h-[22px] [&>kbd]:min-w-[22px] [&>kbd]:items-center [&>kbd]:justify-center [&>kbd]:rounded [&>kbd]:border [&>kbd]:border-gray-200 [&>kbd]:bg-gray-100 [&>kbd]:px-1.5 [&>kbd]:text-[11px] [&>kbd]:text-gray-600 dark:[&>kbd]:border-gray-600 dark:[&>kbd]:bg-gray-700 dark:[&>kbd]:text-gray-300",children:[h.jsx("kbd",{children:"←"})," ",h.jsx("kbd",{children:"→"})]}),h.jsx("span",{children:"Collapse/expand"})]}),h.jsxs("div",{className:"flex items-center justify-between py-1.5 text-[13px] text-gray-700 dark:text-gray-300",children:[h.jsxs("span",{className:"flex items-center gap-1 font-mono [&>kbd]:inline-flex [&>kbd]:h-[22px] [&>kbd]:min-w-[22px] [&>kbd]:items-center [&>kbd]:justify-center [&>kbd]:rounded [&>kbd]:border [&>kbd]:border-gray-200 [&>kbd]:bg-gray-100 [&>kbd]:px-1.5 [&>kbd]:text-[11px] [&>kbd]:text-gray-600 dark:[&>kbd]:border-gray-600 dark:[&>kbd]:bg-gray-700 dark:[&>kbd]:text-gray-300",children:[h.jsx("kbd",{children:ie}),"+",h.jsx("kbd",{children:"C"})]}),h.jsx("span",{children:"Copy selection"})]}),h.jsxs("div",{className:"flex items-center justify-between py-1.5 text-[13px] text-gray-700 dark:text-gray-300",children:[h.jsxs("span",{className:"flex items-center gap-1 font-mono [&>kbd]:inline-flex [&>kbd]:h-[22px] [&>kbd]:min-w-[22px] [&>kbd]:items-center [&>kbd]:justify-center [&>kbd]:rounded [&>kbd]:border [&>kbd]:border-gray-200 [&>kbd]:bg-gray-100 [&>kbd]:px-1.5 [&>kbd]:text-[11px] [&>kbd]:text-gray-600 dark:[&>kbd]:border-gray-600 dark:[&>kbd]:bg-gray-700 dark:[&>kbd]:text-gray-300",children:[h.jsx("kbd",{children:ie}),"+",h.jsx("kbd",{children:"F"})]}),h.jsx("span",{children:"Search"})]})]}),h.jsx("div",{className:"px-4 pt-3 pb-2 text-[11px] font-semibold tracking-wide text-gray-500 uppercase dark:text-gray-400",children:"Tips"}),h.jsxs("div",{className:"px-4 pb-3",children:[h.jsx("div",{className:"py-1 text-xs leading-snug text-gray-600 dark:text-gray-400",children:"Click any item to see details and copy options"}),h.jsx("div",{className:"py-1 text-xs leading-snug text-gray-600 dark:text-gray-400",children:"Use Share to copy a link to your current view"}),h.jsx("div",{className:"py-1 text-xs leading-snug text-gray-600 dark:text-gray-400",children:"Search finds both keys and values"})]})]})]}),j&&h.jsx(n.Button,{icon:"copied"===re?h.jsx(l.CheckmarkIcon,{size:16}):h.jsx(x.LinkIcon,{size:16}),onClick:fe,size:"sm",variant:"subtle",children:"copied"===re?"Copied!":"Share"}),k&&h.jsx(n.Button,{onClick:k,size:"sm",variant:"subtle",children:"Close"})]})]}),"editor"!==z&&h.jsxs("div",{className:"border-border-color flex items-center overflow-x-auto border-b bg-gray-50 px-4 py-2 text-[13px] dark:border-gray-700 dark:bg-gray-800 [&::-webkit-scrollbar]:h-1",children:[h.jsx("button",{className:"cursor-pointer rounded border-none bg-none px-2 py-1 text-[13px] whitespace-nowrap text-blue-600 hover:bg-blue-50 dark:text-blue-400 dark:hover:bg-gray-700",onClick:function(){return P([])},type:"button",children:"root"}),H.map(function(e,r){return h.jsxs("span",{children:[h.jsx("span",{className:"mx-0.5 text-gray-400 dark:text-gray-600",children:"/"}),h.jsx("button",{className:"cursor-pointer rounded border-none bg-none px-2 py-1 text-[13px] whitespace-nowrap text-blue-600 hover:bg-blue-50 dark:text-blue-400 dark:hover:bg-gray-700",onClick:function(){return P(H.slice(0,r+1))},type:"button",children:e})]},"breadcrumb-".concat(r,"-").concat(e))})]}),h.jsxs("div",{className:"flex flex-1 flex-col overflow-hidden",children:["column"===z&&h.jsxs("div",{className:"flex h-full overflow-hidden",children:[h.jsxs("div",{className:"bg-page flex flex-1 overflow-x-auto dark:bg-gray-900 [&::-webkit-scrollbar]:h-2 [&::-webkit-scrollbar-thumb]:rounded [&::-webkit-scrollbar-thumb]:bg-gray-300 [&::-webkit-scrollbar-track]:bg-gray-100",children:[ke.map(function(e,r){return h.jsx(S,{columnIndex:r,data:e.data,isActiveColumn:R===r,onFocusColumn:B,onSelect:function(e){return me(r,e)},selectedKey:e.selectedKey},"column-".concat(r))}),void 0!==ve&&(null===ve||"object"!=typeof ve)&&H.length>0&&h.jsx(C,{name:null!==(i=H[H.length-1])&&void 0!==i?i:"",value:ve})]}),void 0!==ve&&h.jsx("div",{className:"border-border-color bg-surface w-[400px] shrink-0 grow-0 overflow-y-auto border-l dark:border-gray-700 dark:bg-gray-800",children:h.jsx(q,{path:H,value:ve})})]}),"tree"===z&&ge&&h.jsxs("div",{className:"flex h-full flex-1 overflow-hidden",children:[h.jsx("div",{ref:ue,className:"flex-1 overflow-auto py-2 font-mono text-[13px] leading-normal",children:Object.entries(ge).map(function(r){var t=e.__read(r,2),n=t[0],a=t[1];return h.jsx(A,{depth:0,expandedPaths:X,nodeKey:n,onCopy:Ne,onSelect:we,onToggle:je,path:"root::".concat(n),selectedPath:H,value:a},n)})}),void 0!==ve&&H.length>0&&h.jsx("div",{className:"border-border-color bg-surface w-[400px] shrink-0 grow-0 overflow-y-auto border-l dark:border-gray-700 dark:bg-gray-800",children:h.jsx(q,{path:H,value:ve})})]}),"editor"===z&&ge&&h.jsx(I,{data:ge,onCopy:_e})]})]}):h.jsx("div",{className:"bg-surface flex h-full flex-col overflow-hidden rounded-lg dark:bg-gray-900",children:h.jsx("div",{className:"flex h-full items-center justify-center p-10",children:h.jsx(s.Text,{color:"gray600",children:"No data available"})})})};
1
+ "use strict";var e=require("../../tslib.es6-cdc5f922.js"),r=require("react"),t=require("clsx"),n=require("../button/Button.js"),a=require("../flex/Flex.js"),o=require("../input/Input.js"),s=require("../text/Text.js"),l=require("../../icons/CheckmarkIcon.js"),i=require("../../icons/ChevronDownIcon.js"),c=require("../../icons/ChevronRightIcon.js"),d=require("../../icons/CopyIcon.js"),u=require("../../icons/HelpIcon.js"),x=require("../../icons/LinkIcon.js"),b=require("../../icons/SearchIcon.js"),g=require("../../utils/jsonParse.js"),h=require("react/jsx-runtime");function p(e){return e&&e.__esModule?e:{default:e}}require("../../_rollupPluginBabelHelpers-4522587c.js"),require("class-variance-authority"),require("../button/RippleGroup.js"),require("framer-motion"),require("uuid"),require("../button/_Ripple.js"),require("../../utils/getAminoColor.js"),require("../../styles/constants/theme.js"),require("../button/useRipple.js"),require("../spinner/Spinner.js"),require("../../utils/cn.js"),require("tailwind-merge"),require("../../utils/getTestId.js"),require("../help-text/HelpText.js"),require("../input/input-type/_DateInput.js"),require("@floating-ui/react"),require("../input/input-type/_FloatLabelInput.js"),require("../../icons/CalendarIcon.js"),require("../../icons/icon-base/_IconBase.js"),require("../input/input-type/_NumberInput.js"),require("../../icons/CaretDownIcon.js"),require("../../icons/CaretUpIcon.js"),require("../input/input-type/_PasswordInput.js"),require("../../icons/EyeIcon.js"),require("../../icons/EyeOffIcon.js"),require("../input/input-type/_TimeInput.js"),require("../../icons/ClockIcon.js");var f=p(t),y=function(e){return null===e?"null":Array.isArray(e)?"array":typeof e},v=function(r,t){var n,a,o=r;try{for(var s=e.__values(t),l=s.next();!l.done;l=s.next()){var i=l.value;if(null===o||"object"!=typeof o)return;if(Array.isArray(o)){var c=parseInt(i,10);if(Number.isNaN(c)||c<0||c>=o.length)return;o=o[c]}else{if(!(i in o))return;o=o[i]}}}catch(e){n={error:e}}finally{try{l&&!l.done&&(a=s.return)&&a.call(s)}finally{if(n)throw n.error}}return o},k=function(e){switch(e){case"object":return"{}";case"array":return"[]";case"string":return'""';case"number":return"#";case"boolean":return"◯";case"null":return"∅";default:return"?"}},m=function(r,t){var n,a;if(null===r||"object"!=typeof r)return r;if(Array.isArray(r))return r.map(function(e){return m(e,t)});var o=r,s=Object.keys(o).sort(function(e,r){var n=e.localeCompare(r,void 0,{sensitivity:"base"});return"asc"===t?n:-n}),l={};try{for(var i=e.__values(s),c=i.next();!c.done;c=i.next()){var d=c.value,u=o[d];void 0!==u&&(l[d]=m(u,t))}}catch(e){n={error:e}}finally{try{c&&!c.done&&(a=i.return)&&a.call(i)}finally{if(n)throw n.error}}return l},j=function(e){return"undefined"!=typeof CSS&&CSS.escape?CSS.escape(e):e.replace(/["\\]/g,"\\$&")},w=function(e,r){switch(r){case"array":var t=e;return"".concat(t.length," ").concat(1===t.length?"item":"items");case"object":var n=e,a=Object.keys(n);return"".concat(a.length," ").concat(1===a.length?"field":"fields");case"string":case"number":return String(e);case"boolean":return e?"true":"false";case"null":return"null";default:return""}},N=function(e,r){if("string"===r){var t=String(e);return t.length>30?t:void 0}},_=function(r,t,n,a,o){var s;if(void 0===n&&(n=[]),void 0===a&&(a=[]),void 0===o&&(o=50),a.length>=o)return a;var l=t.toLowerCase();if(null===r||"object"!=typeof r){var i=String(r);return i.toLowerCase().includes(l)&&a.push({key:null!==(s=n[n.length-1])&&void 0!==s?s:"root",matchType:"value",path:n,preview:i.length>50?"".concat(i.slice(0,50),"..."):i}),a}return Array.isArray(r)?r.forEach(function(r,s){a.length<o&&_(r,t,e.__spreadArray(e.__spreadArray([],e.__read(n),!1),[String(s)],!1),a,o)}):Object.entries(r).forEach(function(r){var s=e.__read(r,2),i=s[0],c=s[1];if(!(a.length>=o)){if(i.toLowerCase().includes(l)){var d=y(c);a.push({key:i,matchType:"key",path:e.__spreadArray(e.__spreadArray([],e.__read(n),!1),[i],!1),preview:w(c,d)})}_(c,t,e.__spreadArray(e.__spreadArray([],e.__read(n),!1),[i],!1),a,o)}}),a},C=function(e){var r=e.name,t=e.value,n=y(t),a="boolean"===n?t?"true":"false":String(t);return h.jsx("div",{className:"border-border-color bg-surface max-w-[320px] min-w-[260px] shrink-0 overflow-y-auto border-r dark:border-gray-300",children:h.jsxs("div",{className:"flex items-center gap-2 bg-blue-600 px-3 py-2.5",children:[h.jsx("span",{className:"flex size-5 shrink-0 items-center justify-center rounded bg-blue-500 text-[10px] font-semibold text-white",children:k(n)}),h.jsx("span",{className:"text-[13px] font-medium whitespace-nowrap text-white",children:r}),h.jsx("span",{className:f.default("ml-auto max-w-[180px] overflow-hidden font-mono text-[13px]\n text-ellipsis whitespace-nowrap",function(){switch(n){case"string":return"text-orange-200";case"number":return"text-blue-200";case"boolean":return"text-purple-200";case"null":return"text-blue-200 italic";default:return""}}()),children:a})]})})},S=function(t){var n=t.columnIndex,a=t.data,o=t.isActiveColumn,s=t.onFocusColumn,l=t.onSelect,i=t.selectedKey,d=r.useRef(null),u=r.useMemo(function(){return null===a||"object"!=typeof a?[]:Array.isArray(a)?a.map(function(e,r){return{key:r.toString(),type:y(e),value:e}}):Object.entries(a).map(function(r){var t=e.__read(r,2),n=t[0],a=t[1];return{key:n,type:y(a),value:a}})},[a]);return r.useEffect(function(){if(o&&i&&d.current){var e=j(i),r=d.current.querySelector('[data-key="'.concat(e,'"]'));r&&(r.focus(),r.scrollIntoView({behavior:"smooth",block:"nearest"}))}},[o,i]),r.useEffect(function(){if(i&&d.current){var e=j(i),r=d.current.querySelector('[data-key="'.concat(e,'"]'));r&&r.scrollIntoView({behavior:"smooth",block:"nearest"})}},[i]),0===u.length?h.jsx("div",{className:"border-border-color bg-surface w-[280px] max-w-[280px] min-w-[280px] shrink-0 grow-0 overflow-y-auto border-r dark:border-gray-300 [&::-webkit-scrollbar]:w-1.5 [&::-webkit-scrollbar-thumb]:rounded [&::-webkit-scrollbar-thumb]:bg-gray-300",children:h.jsx("div",{className:"p-6 text-center text-gray-500 italic",children:"Empty"})}):h.jsx("div",{ref:d,className:"border-border-color bg-surface w-[280px] max-w-[280px] min-w-[280px] shrink-0 grow-0 overflow-y-auto border-r dark:border-gray-300 [&::-webkit-scrollbar]:w-1.5 [&::-webkit-scrollbar-thumb]:rounded [&::-webkit-scrollbar-thumb]:bg-gray-300",children:u.map(function(e){var r="object"===e.type||"array"===e.type,t=i===e.key;return h.jsxs("button",{className:f.default("flex w-full cursor-pointer items-center gap-2 border-none\n bg-transparent px-3 py-2.5 text-left transition-colors\n duration-100 hover:bg-gray-50 dark:hover:bg-gray-300",t&&"bg-blue-600 hover:bg-blue-600 dark:bg-blue-600\n dark:hover:bg-blue-600"),"data-key":e.key,onClick:function(){s(n),l(e.key)},onFocus:function(){return s(n)},type:"button",children:[h.jsx("span",{className:f.default("flex size-5 shrink-0 items-center justify-center rounded\n bg-gray-100 text-[10px] font-semibold text-gray-500\n dark:bg-gray-300 dark:text-gray-600",t&&"bg-blue-500 text-white dark:bg-blue-500 dark:text-white"),children:k(e.type)}),h.jsx("span",{className:f.default("flex-1 overflow-hidden text-[13px] font-medium text-ellipsis\n whitespace-nowrap text-gray-800 dark:text-gray-800",t&&"text-white dark:text-white"),title:e.key,children:e.key}),h.jsx("span",{className:f.default("max-w-[100px] shrink-0 overflow-hidden text-xs text-ellipsis\n whitespace-nowrap text-gray-500 dark:text-gray-500",t&&"text-blue-200 dark:text-blue-200"),title:N(e.value,e.type),children:w(e.value,e.type)}),r&&h.jsx(c.ChevronRightIcon,{className:f.default("shrink-0 text-gray-400",t&&"text-blue-200 dark:text-blue-200"),size:14})]},e.key)})})},A=function(t){var n=t.depth,a=t.expandedPaths,o=t.nodeKey,s=t.onCopy,l=t.onSelect,u=t.onToggle,x=t.path,b=t.selectedPath,g=t.value,p=y(g),v="object"===p||"array"===p,m=a.has(x),j=e.__read(r.useState(!1),2),_=j[0],C=j[1],S=x.split("::").slice(1),I=null!==b&&S.length===b.length&&S.every(function(e,r){return e===b[r]}),z=r.useMemo(function(){return v&&m?Array.isArray(g)?g.map(function(e,r){return{key:r.toString(),value:e}}):Object.entries(g).map(function(r){var t=e.__read(r,2);return{key:t[0],value:t[1]}}):[]},[g,v,m]);return h.jsxs("div",{className:"block",children:[h.jsxs("div",{className:f.default("relative mx-2 flex cursor-pointer items-center gap-1 rounded px-2\n py-1 hover:bg-gray-50 dark:hover:bg-gray-200",I&&"bg-blue-50 hover:bg-blue-100 dark:bg-gray-300\n dark:hover:bg-gray-400"),"data-path":JSON.stringify(S),onClick:function(e){e.stopPropagation(),l(S,g),v&&u(x)},onKeyDown:function(e){"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),l(S,g),v&&u(x))},onMouseEnter:function(){return C(!0)},onMouseLeave:function(){return C(!1)},role:"button",style:{paddingLeft:"".concat(20*n+8,"px")},tabIndex:0,children:[v&&h.jsx("span",{className:"flex size-[18px] items-center justify-center text-gray-500",children:m?h.jsx(i.ChevronDownIcon,{size:14}):h.jsx(c.ChevronRightIcon,{size:14})}),!v&&h.jsx("span",{className:"w-[18px]"}),h.jsx("span",{className:"mr-1 flex size-[18px] shrink-0 items-center justify-center rounded-[3px] bg-gray-100 text-[9px] font-semibold text-gray-500 dark:bg-gray-300 dark:text-gray-600",children:k(p)}),h.jsx("span",{className:"font-medium text-gray-800 dark:text-gray-800",title:o,children:o}),!v&&h.jsxs(h.Fragment,{children:[h.jsx("span",{className:"mx-1 text-gray-500 dark:text-gray-600",children:":"}),function(){switch(p){case"string":return h.jsxs("span",{className:"text-orange-600 dark:text-orange-400",children:['"',String(g),'"']});case"number":return h.jsx("span",{className:"text-blue-600 dark:text-blue-400",children:String(g)});case"boolean":return h.jsx("span",{className:"text-purple-600 dark:text-purple-400",children:g?"true":"false"});case"null":return h.jsx("span",{className:"text-gray-500 italic dark:text-gray-500",children:"null"});default:return null}}()]}),v&&!m&&h.jsx("span",{className:"ml-2 text-xs text-gray-400 dark:text-gray-600",title:N(g,p),children:w(g,p)}),_&&h.jsx("button",{className:"absolute top-1/2 right-2 flex size-[22px] -translate-y-1/2 cursor-pointer items-center justify-center rounded border-none bg-gray-100 text-gray-600 hover:bg-gray-200 hover:text-gray-800 dark:bg-gray-300 dark:text-gray-600 dark:hover:bg-gray-400 dark:hover:text-gray-200",onClick:function(e){e.stopPropagation(),s(g)},type:"button",children:h.jsx(d.CopyIcon,{size:12})})]}),m&&z.length>0&&h.jsx("div",{className:"block",children:z.map(function(e){return h.jsx(A,{depth:n+1,expandedPaths:a,nodeKey:e.key,onCopy:s,onSelect:l,onToggle:u,path:"".concat(x,"::").concat(e.key),selectedPath:b,value:e.value},e.key)})})]})},I=function(t){var a=t.data,o=t.onCopy,s=r.useMemo(function(){return JSON.stringify(a,null,2)},[a]),l=r.useMemo(function(){return s.split("\n")},[s]),i=r.useRef(null),c=e.__read(r.useState(0),2),u=c[0],x=c[1],b=e.__read(r.useState(!1),2),g=b[0],p=b[1],f=e.__read(r.useState(1),2),y=f[0],v=f[1];r.useEffect(function(){var e=i.current;if(e){var r=function(){var r=e.clientHeight,t=e.scrollHeight,n=e.scrollTop,a=t-r;x(a>0?n/a:0);var o=Math.floor(n/19.5)+1;v(Math.min(o,l.length)),p(a>100)};return e.addEventListener("scroll",r),r(),function(){return e.removeEventListener("scroll",r)}}},[l.length]);var k=function(){var e;null===(e=i.current)||void 0===e||e.scrollTo({behavior:"smooth",top:0})},m=function(){i.current&&i.current.scrollTo({behavior:"smooth",top:i.current.scrollHeight})},j=function(){i.current&&i.current.scrollBy({behavior:"smooth",top:.8*-i.current.clientHeight})},w=function(){i.current&&i.current.scrollBy({behavior:"smooth",top:.8*i.current.clientHeight})};return r.useEffect(function(){var e=function(e){e.target instanceof HTMLInputElement||e.target instanceof HTMLTextAreaElement||("PageUp"===e.key?(e.preventDefault(),j()):"PageDown"===e.key?(e.preventDefault(),w()):"Home"===e.key&&(e.metaKey||e.ctrlKey)?(e.preventDefault(),k()):"End"===e.key&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),m()))};return window.addEventListener("keydown",e),function(){return window.removeEventListener("keydown",e)}},[]),h.jsxs("div",{className:"relative flex h-full flex-col",children:[h.jsxs("div",{className:"border-border-color bg-surface flex items-center gap-4 border-b px-4 py-2 dark:border-gray-300",children:[h.jsx(n.Button,{icon:h.jsx(d.CopyIcon,{size:16}),onClick:o,size:"sm",variant:"subtle",children:"Copy JSON"}),h.jsxs("span",{className:"text-xs text-gray-500",children:[l.length.toLocaleString()," lines"]})]}),h.jsxs("div",{ref:i,className:"flex flex-1 overflow-auto scroll-smooth bg-gray-900 dark:bg-[#1a1a2e] [&::-webkit-scrollbar]:size-3.5 [&::-webkit-scrollbar-thumb]:rounded-[7px] [&::-webkit-scrollbar-thumb]:border-[3px] [&::-webkit-scrollbar-thumb]:border-transparent [&::-webkit-scrollbar-thumb]:bg-white/20 [&::-webkit-scrollbar-thumb]:bg-clip-content [&::-webkit-scrollbar-thumb:hover]:bg-white/30 [&::-webkit-scrollbar-thumb:hover]:bg-clip-content [&::-webkit-scrollbar-track]:bg-black/20",children:[h.jsx("div",{className:"sticky left-0 z-1 shrink-0 bg-black/20 py-4 select-none dark:bg-black/30",children:l.map(function(e,r){return h.jsx("div",{className:"px-4 text-right font-mono text-[13px] leading-normal text-gray-600",children:r+1},r)})}),h.jsx("pre",{className:"m-0 min-w-0 flex-1 p-4 font-mono text-[13px] leading-normal text-gray-200 dark:text-gray-100",children:h.jsx("code",{className:"block whitespace-pre",children:s})})]}),g&&h.jsxs("div",{className:"absolute right-4 bottom-4 z-10 flex flex-col items-end gap-2",children:[h.jsxs("div",{className:"rounded bg-[rgba(30,30,46,0.95)] px-2 py-1 font-mono text-[11px] text-white/70 backdrop-blur",children:["Line ",y.toLocaleString()," /"," ",l.length.toLocaleString()]}),h.jsx("div",{className:"h-[60px] w-1 overflow-hidden rounded-sm bg-white/10",children:h.jsx("div",{className:"w-full rounded-sm bg-blue-500 transition-[height] duration-100",style:{height:"".concat(100*u,"%")}})}),h.jsxs("div",{className:"flex flex-col gap-1 rounded-lg border border-white/10 bg-[rgba(30,30,46,0.95)] p-1.5 backdrop-blur",children:[h.jsx("button",{className:"flex size-7 items-center justify-center rounded border-none bg-transparent text-white/60 transition-all duration-150 hover:bg-white/10 hover:text-white active:bg-white/15 disabled:cursor-not-allowed disabled:opacity-30",disabled:u<.01,onClick:k,title:"Scroll to top (Cmd/Ctrl+Home)",type:"button",children:h.jsx("svg",{fill:"currentColor",height:"14",viewBox:"0 0 24 24",width:"14",children:h.jsx("path",{d:"M12 4L4 12h5v8h6v-8h5L12 4z"})})}),h.jsx("button",{className:"flex size-7 items-center justify-center rounded border-none bg-transparent text-white/60 transition-all duration-150 hover:bg-white/10 hover:text-white active:bg-white/15 disabled:cursor-not-allowed disabled:opacity-30",disabled:u<.01,onClick:j,title:"Page up (PageUp)",type:"button",children:h.jsx("svg",{fill:"currentColor",height:"12",viewBox:"0 0 24 24",width:"12",children:h.jsx("path",{d:"M7 14l5-5 5 5H7z"})})}),h.jsx("button",{className:"flex size-7 items-center justify-center rounded border-none bg-transparent text-white/60 transition-all duration-150 hover:bg-white/10 hover:text-white active:bg-white/15 disabled:cursor-not-allowed disabled:opacity-30",disabled:u>.99,onClick:w,title:"Page down (PageDown)",type:"button",children:h.jsx("svg",{fill:"currentColor",height:"12",viewBox:"0 0 24 24",width:"12",children:h.jsx("path",{d:"M7 10l5 5 5-5H7z"})})}),h.jsx("button",{className:"flex size-7 items-center justify-center rounded border-none bg-transparent text-white/60 transition-all duration-150 hover:bg-white/10 hover:text-white active:bg-white/15 disabled:cursor-not-allowed disabled:opacity-30",disabled:u>.99,onClick:m,title:"Scroll to bottom (Cmd/Ctrl+End)",type:"button",children:h.jsx("svg",{fill:"currentColor",height:"14",viewBox:"0 0 24 24",width:"14",children:h.jsx("path",{d:"M12 20l8-8h-5V4H9v8H4l8 8z"})})})]})]})]})},z=function(r){var t=r.data,n=r.indent,a=void 0===n?0:n,o=" ".repeat(a),s=" ".repeat(a+1);if(null===t)return h.jsx("span",{className:"text-gray-500 italic dark:text-gray-500",children:"null"});if("boolean"==typeof t)return h.jsx("span",{className:"text-cyan-600 dark:text-cyan-400",children:t?"true":"false"});if("number"==typeof t)return h.jsx("span",{className:"text-purple-600 dark:text-purple-400",children:t});if("string"==typeof t)return h.jsxs("span",{className:"text-orange-600 dark:text-orange-400",children:['"',t,'"']});if(Array.isArray(t))return 0===t.length?h.jsx("span",{className:"text-gray-600 dark:text-gray-500",children:"[]"}):h.jsxs(h.Fragment,{children:[h.jsx("span",{className:"text-gray-600 dark:text-gray-500",children:"["}),"\n",t.map(function(e,r){return h.jsxs("span",{children:[s,h.jsx(z,{data:e,indent:a+1}),r<t.length-1&&h.jsx("span",{className:"text-gray-500 dark:text-gray-600",children:","}),"\n"]},"array-".concat(a,"-").concat(r))}),o,h.jsx("span",{className:"text-gray-600 dark:text-gray-500",children:"]"})]});if("object"==typeof t){var l=Object.entries(t);return 0===l.length?h.jsx("span",{className:"text-gray-600 dark:text-gray-500",children:"{}"}):h.jsxs(h.Fragment,{children:[h.jsx("span",{className:"text-gray-600 dark:text-gray-500",children:"{"}),"\n",l.map(function(r,t){var n=e.__read(r,2),o=n[0],i=n[1];return h.jsxs("span",{children:[s,h.jsxs("span",{className:"text-blue-600 dark:text-blue-400",children:['"',o,'"']}),h.jsx("span",{className:"text-gray-500 dark:text-gray-600",children:": "}),h.jsx(z,{data:i,indent:a+1}),t<l.length-1&&h.jsx("span",{className:"text-gray-500 dark:text-gray-600",children:","}),"\n"]},o)}),o,h.jsx("span",{className:"text-gray-600 dark:text-gray-500",children:"}"})]})}return null},q=function(t){var a=t.path,o=t.value,s=y(o),i=e.__read(r.useState(!1),2),c=i[0],u=i[1],x=e.__read(r.useState(!1),2),b=x[0],g=x[1],p="object"!==s&&"array"!==s,f=r.useRef(null),v=r.useRef(null);r.useEffect(function(){return function(){f.current&&clearTimeout(f.current),v.current&&clearTimeout(v.current)}},[]);return h.jsxs("div",{className:"p-0",children:[h.jsxs("div",{className:"mb-4 flex flex-col gap-3 border-b border-gray-100 bg-linear-to-b from-gray-50 to-transparent px-4 pt-4 pb-4 dark:border-gray-300 dark:from-gray-200",children:[h.jsxs("div",{className:"flex items-center gap-2.5",children:[h.jsx("div",{className:"font-mono text-base font-semibold break-all text-blue-600 dark:text-blue-400",children:0===a.length?h.jsx("span",{className:"font-medium text-gray-500 dark:text-gray-500",children:"root"}):a[a.length-1]}),h.jsx("span",{className:"inline-flex shrink-0 rounded bg-gray-100 px-2.5 py-[3px] text-[10px] font-bold tracking-wide text-gray-600 uppercase dark:bg-gray-300 dark:text-gray-300",children:s.toUpperCase()})]}),a.length>1&&h.jsx("div",{className:"font-mono text-[11px] break-all text-gray-500 dark:text-gray-500",children:a.join(".")}),h.jsx("div",{className:"flex flex-wrap items-center gap-2",children:p?h.jsx(n.Button,{icon:b?h.jsx(l.CheckmarkIcon,{size:14}):h.jsx(d.CopyIcon,{size:14}),onClick:function(){return e.__awaiter(void 0,void 0,void 0,function(){var r,t;return e.__generator(this,function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),r=null===o?"null":String(o),[4,navigator.clipboard.writeText(r)];case 1:return e.sent(),g(!0),v.current&&clearTimeout(v.current),v.current=setTimeout(function(){return g(!1)},2e3),[3,3];case 2:return t=e.sent(),console.error("Failed to copy:",t),[3,3];case 3:return[2]}})})},size:"sm",variant:"standard",children:b?"Copied!":"Copy Value"}):h.jsx(n.Button,{icon:c?h.jsx(l.CheckmarkIcon,{size:14}):h.jsx(d.CopyIcon,{size:14}),onClick:function(){return e.__awaiter(void 0,void 0,void 0,function(){var r,t;return e.__generator(this,function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),r="object"==typeof o?JSON.stringify(o,null,2):String(o),[4,navigator.clipboard.writeText(r)];case 1:return e.sent(),u(!0),f.current&&clearTimeout(f.current),f.current=setTimeout(function(){return u(!1)},2e3),[3,3];case 2:return t=e.sent(),console.error("Failed to copy:",t),[3,3];case 3:return[2]}})})},size:"sm",variant:"standard",children:c?"Copied!":"Copy JSON"})})]}),h.jsxs("div",{className:"px-4 pb-4",children:[h.jsx("span",{className:"mb-2 block text-[11px] font-semibold tracking-wide text-gray-500 uppercase",children:p?"Value":"Preview"}),h.jsx("pre",{className:"m-0 rounded-md bg-gray-50 px-3 py-2 font-mono text-[13px] leading-relaxed wrap-break-word whitespace-pre-wrap dark:bg-gray-100",children:h.jsx(z,{data:o})})]})]})};exports.JsonVisionViewer=function(t){var i,c=t.data,d=t.defaultViewMode,p=void 0===d?"tree":d,k=t.onClose,j=t.onShare,w=t.title,N=e.__read(r.useState(p),2),z=N[0],T=N[1],E=e.__read(r.useState("original"),2),L=E[0],D=E[1],M=e.__read(r.useState([]),2),H=M[0],P=M[1],O=e.__read(r.useState(0),2),R=O[0],B=O[1],K=e.__read(r.useState(""),2),F=K[0],V=K[1],U=e.__read(r.useState(!1),2),J=U[0],Z=U[1],G=e.__read(r.useState(-1),2),W=G[0],$=G[1],Q=e.__read(r.useState(new Set(["root"])),2),X=Q[0],Y=Q[1],ee=e.__read(r.useState("idle"),2),re=ee[0],te=ee[1],ne=r.useRef(null),ae=e.__read(r.useState(!1),2),oe=ae[0],se=ae[1];r.useEffect(function(){return function(){ne.current&&clearTimeout(ne.current)}},[]);var le=r.useMemo(function(){var e;if("undefined"==typeof navigator)return!1;var r=null===(e=navigator.userAgentData)||void 0===e?void 0:e.platform;return/Mac|iPod|iPhone|iPad/i.test(null!=r?r:navigator.userAgent)},[]),ie=le?"⌘":"Ctrl",ce=r.useRef(null),de=r.useRef(null),ue=r.useRef(null),xe=r.useRef(null),be=r.useRef(null);r.useEffect(function(){var e=function(e){var r;be.current&&!be.current.contains(e.target)&&Z(!1),de.current&&!(null===(r=de.current.parentElement)||void 0===r?void 0:r.contains(e.target))&&se(!1)};return document.addEventListener("mousedown",e),function(){return document.removeEventListener("mousedown",e)}},[]);var ge=r.useMemo(function(){return c&&"original"!==L?m(c,"keys-asc"===L?"asc":"desc"):c},[c,L]),he=r.useMemo(function(){return!ge||F.length<2?[]:_(ge,F)},[ge,F]);r.useEffect(function(){$(-1)},[he]);var pe=r.useCallback(function(r){var t,n;if(J&&0!==he.length)if("ArrowDown"===r.key)r.preventDefault(),$(function(e){return e<he.length-1?e+1:e});else if("ArrowUp"===r.key)r.preventDefault(),$(function(e){return e>0?e-1:e});else if("Enter"===r.key&&W>=0){r.preventDefault();var a=he[W];if(a&&(P(a.path),B(a.path.length-1),Z(!1),V(""),"tree"===z)){var o=new Set(X),s="root";try{for(var l=e.__values(a.path),i=l.next();!i.done;i=l.next()){var c=i.value;s="".concat(s,"::").concat(c),o.add(s)}}catch(e){t={error:e}}finally{try{i&&!i.done&&(n=l.return)&&n.call(l)}finally{if(t)throw t.error}}Y(o)}}else"Escape"===r.key&&(Z(!1),$(-1))},[J,he,W,z,X]),fe=r.useCallback(function(r){var t,n;if(P(r.path),B(r.path.length-1),Z(!1),V(""),"tree"===z){var a=new Set(X),o="root";try{for(var s=e.__values(r.path),l=s.next();!l.done;l=s.next()){var i=l.value;o="".concat(o,"::").concat(i),a.add(o)}}catch(e){t={error:e}}finally{try{l&&!l.done&&(n=s.return)&&n.call(s)}finally{if(t)throw t.error}}Y(a)}},[z,X]),ye=r.useCallback(function(){return e.__awaiter(void 0,void 0,void 0,function(){var r;return e.__generator(this,function(e){switch(e.label){case 0:if(!j)return[2];e.label=1;case 1:return e.trys.push([1,3,,4]),[4,j()];case 2:return e.sent(),te("copied"),ne.current&&clearTimeout(ne.current),ne.current=setTimeout(function(){return te("idle")},2e3),[3,4];case 3:return r=e.sent(),console.error("Failed to share:",r),[3,4];case 4:return[2]}})})},[j]),ve=r.useMemo(function(){if(ge)return 0===H.length?ge:v(ge,H)},[ge,H]),ke=r.useMemo(function(){var e,r;if(!ge)return[];var t=[];t.push({data:ge,selectedKey:null!==(e=H[0])&&void 0!==e?e:null});for(var n=ge,a=0;a<H.length;a+=1){var o=H[a];if(!o||null===n||"object"!=typeof n)break;if(Array.isArray(n)){var s=parseInt(o,10);if(!(!Number.isNaN(s)&&s>=0&&s<n.length))break;n=n[s]}else{if(!(o in n))break;n=n[o]}null!==n&&"object"==typeof n&&t.push({data:n,selectedKey:null!==(r=H[a+1])&&void 0!==r?r:null})}return t},[ge,H]),me=r.useCallback(function(e,r){P(function(t){var n=t.slice(0,e);return n.push(r),n})},[]),je=r.useCallback(function(e){Y(function(r){var t=new Set(r);return t.has(e)?t.delete(e):t.add(e),t})},[]),we=r.useCallback(function(e,r){P(e)},[]),Ne=r.useCallback(function(r){return e.__awaiter(void 0,void 0,void 0,function(){var t,n;return e.__generator(this,function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),t="object"==typeof r?JSON.stringify(r,null,2):String(r),[4,navigator.clipboard.writeText(t)];case 1:return e.sent(),[3,3];case 2:return n=e.sent(),console.error("Failed to copy:",n),[3,3];case 3:return[2]}})})},[]),_e=r.useCallback(function(){return e.__awaiter(void 0,void 0,void 0,function(){var r;return e.__generator(this,function(e){switch(e.label){case 0:if(!ge)return[2];e.label=1;case 1:return e.trys.push([1,3,,4]),[4,navigator.clipboard.writeText(JSON.stringify(ge,null,2))];case 2:return e.sent(),[3,4];case 3:return r=e.sent(),console.error("Failed to copy:",r),[3,4];case 4:return[2]}})})},[ge]),Ce=r.useCallback(function(){if(c){var r=new Set,t=function(n,a){r.add(a),Array.isArray(n)?n.forEach(function(e,r){"object"==typeof e&&null!==e&&t(e,"".concat(a,"::").concat(r))}):"object"==typeof n&&null!==n&&Object.entries(n).forEach(function(r){var n=e.__read(r,2),o=n[0],s=n[1];"object"==typeof s&&null!==s&&t(s,"".concat(a,"::").concat(o))})};t(c,"root"),Y(r)}},[c]),Se=r.useCallback(function(){Y(new Set(["root"]))},[]),Ae=r.useCallback(function(r){var t=ke[r];return null==(null==t?void 0:t.data)||"object"!=typeof t.data?[]:Array.isArray(t.data)?t.data.map(function(e,r){return{key:r.toString(),type:y(e),value:e}}):Object.entries(t.data).map(function(r){var t=e.__read(r,2),n=t[0],a=t[1];return{key:n,type:y(a),value:a}})},[ke]);return r.useEffect(function(){var e=function(e){var r,t,n;if(!(e.target instanceof HTMLInputElement||e.target instanceof HTMLTextAreaElement))if(!e.metaKey&&!e.ctrlKey||"f"!==e.key)if(!e.metaKey&&!e.ctrlKey||"c"!==e.key){if("tree"!==z){if("column"===z){var a=Ae(R),o=H[R],s=a.findIndex(function(e){return e.key===o});if("ArrowDown"===e.key){if(e.preventDefault(),0===a.length)return;if(-1===s){var l=a[0];return void(l&&me(R,l.key))}if(s<a.length-1){var i=a[s+1];i&&me(R,i.key)}}else if("ArrowUp"===e.key){if(e.preventDefault(),0===a.length)return;if(-1===s){var c=a[a.length-1];return void(c&&me(R,c.key))}if(s>0){var d=a[s-1];d&&me(R,d.key)}}else if("ArrowLeft"===e.key)e.preventDefault(),R>0&&(B(R-1),P(function(e){return e.slice(0,R)}));else if("ArrowRight"===e.key){e.preventDefault();var u=a[s];if(u&&("object"===u.type||"array"===u.type)&&R<ke.length-1){B(R+1);var x=Ae(R+1);x.length>0&&x[0]&&me(R+1,x[0].key)}}}}else if("ArrowDown"===e.key||"ArrowUp"===e.key||"ArrowLeft"===e.key||"ArrowRight"===e.key){e.preventDefault();var b=null===(t=ue.current)||void 0===t?void 0:t.querySelectorAll('[role="button"][data-path]');if(!b||0===b.length)return;var h=null===(n=ue.current)||void 0===n?void 0:n.querySelector('[role="button"][data-path].bg-blue-50'),p=Array.from(b),f=h?p.indexOf(h):-1,y=function(e){var r=p[e];if(r){var t=r.getAttribute("data-path");if(null!==t){var n=g.jsonParse(t);Array.isArray(n)&&we(n)}r.scrollIntoView({behavior:"smooth",block:"nearest"})}};if("ArrowDown"===e.key)y(-1===f?0:Math.min(f+1,p.length-1));else if("ArrowUp"===e.key){y(-1===f?p.length-1:Math.max(f-1,0))}else if("ArrowRight"===e.key&&h){var k=H.length>0?"root::".concat(H.join("::")):"",m=v(ge,H);k&&("object"==typeof m&&null!==m)&&!X.has(k)?je(k):f>=0&&f<p.length-1&&y(f+1)}else if("ArrowLeft"===e.key&&h){(k=H.length>0?"root::".concat(H.join("::")):"")&&X.has(k)?je(k):H.length>1&&P(function(e){return e.slice(0,-1)})}}}else{var j=window.getSelection();void 0!==ve&&H.length>0&&(!j||0===j.toString().length)&&(e.preventDefault(),Ne(ve))}else"column"!==z&&"tree"!==z||(e.preventDefault(),null===(r=xe.current)||void 0===r||r.focus())};return window.addEventListener("keydown",e),function(){return window.removeEventListener("keydown",e)}},[z,R,H,ke,Ae,me,ve,Ne,X,je,we]),c?h.jsxs("div",{ref:ce,className:"bg-surface flex h-full flex-col overflow-hidden rounded-lg",children:[h.jsxs("div",{className:"border-border-color bg-surface flex flex-wrap items-center justify-between gap-4 border-b px-4 py-3 dark:border-gray-300",children:[h.jsxs(a.Flex,{alignItems:"center",gap:16,children:[w&&h.jsx(s.Text,{fontWeight:600,children:w}),h.jsxs("div",{className:"flex items-center gap-1 rounded-lg bg-gray-100 p-1 dark:bg-gray-100",children:[h.jsxs("button",{className:f.default("flex items-center gap-1.5 rounded-md border-none px-3 py-1.5\n text-[13px] font-medium whitespace-nowrap transition-all\n duration-150 [&>svg]:shrink-0","tree"!==z&&"text-gray-600 hover:bg-gray-200 hover:text-gray-800\n dark:text-gray-600 dark:hover:bg-gray-300\n dark:hover:text-gray-200","tree"===z&&"bg-surface hover:bg-surface text-blue-600\n shadow-[0_1px_3px_rgba(0,0,0,0.1)] hover:text-blue-600\n dark:bg-gray-50 dark:text-blue-400\n dark:shadow-[0_1px_3px_rgba(0,0,0,0.3)] dark:hover:bg-gray-50\n dark:hover:text-blue-400 [&>svg]:text-blue-600\n dark:[&>svg]:text-blue-400"),onClick:function(){return T("tree")},type:"button",children:[h.jsx("svg",{fill:"currentColor",height:"14",viewBox:"0 0 24 24",width:"14",children:h.jsx("path",{d:"M3 5h18v2H3V5zm4 4h14v2H7V9zm4 4h10v2H11v-2zm4 4h6v2h-6v-2z"})}),h.jsx("span",{children:"Tree"})]}),h.jsxs("button",{className:f.default("flex items-center gap-1.5 rounded-md border-none px-3 py-1.5\n text-[13px] font-medium whitespace-nowrap transition-all\n duration-150 [&>svg]:shrink-0","column"!==z&&"text-gray-600 hover:bg-gray-200 hover:text-gray-800\n dark:text-gray-600 dark:hover:bg-gray-300\n dark:hover:text-gray-200","column"===z&&"bg-surface hover:bg-surface text-blue-600\n shadow-[0_1px_3px_rgba(0,0,0,0.1)] hover:text-blue-600\n dark:bg-gray-50 dark:text-blue-400\n dark:shadow-[0_1px_3px_rgba(0,0,0,0.3)] dark:hover:bg-gray-50\n dark:hover:text-blue-400 [&>svg]:text-blue-600\n dark:[&>svg]:text-blue-400"),onClick:function(){return T("column")},type:"button",children:[h.jsxs("svg",{fill:"currentColor",height:"14",viewBox:"0 0 24 24",width:"14",children:[h.jsx("rect",{height:"18",rx:"1",width:"6",x:"2",y:"3"}),h.jsx("rect",{height:"18",rx:"1",width:"6",x:"9",y:"3"}),h.jsx("rect",{height:"18",rx:"1",width:"6",x:"16",y:"3"})]}),h.jsx("span",{children:"Columns"})]}),h.jsxs("button",{className:f.default("flex items-center gap-1.5 rounded-md border-none px-3 py-1.5\n text-[13px] font-medium whitespace-nowrap transition-all\n duration-150 [&>svg]:shrink-0","editor"!==z&&"text-gray-600 hover:bg-gray-200 hover:text-gray-800\n dark:text-gray-600 dark:hover:bg-gray-300\n dark:hover:text-gray-200","editor"===z&&"bg-surface hover:bg-surface text-blue-600\n shadow-[0_1px_3px_rgba(0,0,0,0.1)] hover:text-blue-600\n dark:bg-gray-50 dark:text-blue-400\n dark:shadow-[0_1px_3px_rgba(0,0,0,0.3)] dark:hover:bg-gray-50\n dark:hover:text-blue-400 [&>svg]:text-blue-600\n dark:[&>svg]:text-blue-400"),onClick:function(){return T("editor")},type:"button",children:[h.jsx("svg",{fill:"currentColor",height:"14",viewBox:"0 0 24 24",width:"14",children:h.jsx("path",{d:"M8 3l-6 9 6 9h2l-6-9 6-9H8zm8 0l6 9-6 9h-2l6-9-6-9h2z"})}),h.jsx("span",{children:"Code"})]})]}),h.jsxs("div",{className:"ml-2 flex items-center gap-1 border-l border-gray-200 pl-3 dark:border-gray-300",children:[h.jsx("span",{className:"mr-1 text-xs text-gray-500 dark:text-gray-500",children:"Sort:"}),h.jsx("button",{className:f.default("rounded border-none px-2 py-1 text-xs font-medium text-gray-500\n transition-all duration-150 hover:bg-gray-100\n hover:text-gray-700 dark:text-gray-500 dark:hover:bg-gray-300\n dark:hover:text-gray-300","original"===L&&"bg-blue-100 text-blue-700 hover:bg-blue-100\n hover:text-blue-700 dark:bg-blue-900 dark:text-blue-300\n dark:hover:bg-blue-900 dark:hover:text-blue-300"),onClick:function(){return D("original")},title:"Original order from API",type:"button",children:"Original"}),h.jsx("button",{className:f.default("rounded border-none px-2 py-1 text-xs font-medium text-gray-500\n transition-all duration-150 hover:bg-gray-100\n hover:text-gray-700 dark:text-gray-500 dark:hover:bg-gray-300\n dark:hover:text-gray-300","keys-asc"===L&&"bg-blue-100 text-blue-700 hover:bg-blue-100\n hover:text-blue-700 dark:bg-blue-900 dark:text-blue-300\n dark:hover:bg-blue-900 dark:hover:text-blue-300"),onClick:function(){return D("keys-asc")},title:"Sort keys A to Z",type:"button",children:"A-Z"}),h.jsx("button",{className:f.default("rounded border-none px-2 py-1 text-xs font-medium text-gray-500\n transition-all duration-150 hover:bg-gray-100\n hover:text-gray-700 dark:text-gray-500 dark:hover:bg-gray-300\n dark:hover:text-gray-300","keys-desc"===L&&"bg-blue-100 text-blue-700 hover:bg-blue-100\n hover:text-blue-700 dark:bg-blue-900 dark:text-blue-300\n dark:hover:bg-blue-900 dark:hover:text-blue-300"),onClick:function(){return D("keys-desc")},title:"Sort keys Z to A",type:"button",children:"Z-A"})]})]}),h.jsxs(a.Flex,{alignItems:"center",gap:8,children:[("column"===z||"tree"===z)&&h.jsxs("div",{ref:be,className:"relative flex items-center",children:[h.jsx(b.SearchIcon,{className:"pointer-events-none absolute left-2.5 z-[1] text-gray-500",size:16}),h.jsx(o.Input,{className:"[&>input]:pl-8",inputRef:xe,onChange:function(e){V(e.target.value),Z(e.target.value.length>=2)},onFocus:function(){return Z(F.length>=2)},onKeyDown:pe,placeholder:"Search keys & values...",size:"sm",style:{width:358},value:F}),J&&he.length>0&&h.jsxs("div",{className:"border-border-color bg-surface absolute top-full right-0 left-0 z-100 mt-1 max-h-[300px] min-w-[280px] overflow-y-auto rounded-lg border shadow-[0_4px_12px_rgba(0,0,0,0.15)] dark:border-gray-300",children:[he.map(function(e,r){return h.jsxs("button",{className:f.default("flex w-full flex-col items-start gap-0.5 border-b\n border-gray-100 bg-transparent px-3 py-2 text-left\n transition-colors duration-100 last:border-b-0\n hover:bg-blue-50 dark:border-gray-300\n dark:hover:bg-gray-300",r===W&&"bg-blue-50 dark:bg-gray-300"),onClick:function(){return fe(e)},type:"button",children:[h.jsx("span",{className:"font-mono text-xs break-all text-blue-600 dark:text-blue-400",children:e.path.join(".")}),h.jsx("span",{className:"max-w-full overflow-hidden text-[11px] text-ellipsis whitespace-nowrap text-gray-500 dark:text-gray-500",children:"key"===e.matchType?"(key)":e.preview})]},"".concat(e.path.join("."),"-").concat(e.matchType,"-").concat(r))}),50===he.length&&h.jsx("div",{className:"border-t border-gray-100 px-3 py-2 text-center text-[11px] text-gray-500 dark:border-gray-300",children:"Showing first 50 results..."})]}),J&&F.length>=2&&0===he.length&&h.jsx("div",{className:"border-border-color bg-surface absolute top-full right-0 left-0 z-[100] mt-1 max-h-[300px] min-w-[280px] overflow-y-auto rounded-lg border shadow-[0_4px_12px_rgba(0,0,0,0.15)] dark:border-gray-300",children:h.jsx("div",{className:"px-3 py-4 text-center text-[13px] text-gray-500",children:"No matches found"})})]}),"tree"===z&&h.jsxs(a.Flex,{gap:4,children:[h.jsx(n.Button,{onClick:Ce,size:"sm",variant:"subtle",children:"Expand all"}),h.jsx(n.Button,{onClick:Se,size:"sm",variant:"subtle",children:"Collapse all"})]}),h.jsxs("div",{className:"relative",children:[h.jsx("button",{ref:de,className:"flex size-8 items-center justify-center rounded-md border-none bg-transparent text-gray-500 transition-all duration-150 hover:bg-gray-100 hover:text-gray-700 dark:text-gray-600 dark:hover:bg-gray-300 dark:hover:text-gray-200",onClick:function(){return se(!oe)},title:"Tips & shortcuts",type:"button",children:h.jsx(u.HelpIcon,{size:16})}),oe&&h.jsxs("div",{className:"bg-surface absolute top-full right-0 z-[100] mt-2 w-[260px] overflow-hidden rounded-lg border border-gray-200 shadow-[0_4px_16px_rgba(0,0,0,0.12)] dark:border-gray-300",children:[h.jsx("div",{className:"px-4 pt-3 pb-2 text-[11px] font-semibold tracking-wide text-gray-500 uppercase dark:text-gray-600",children:"Keyboard shortcuts"}),h.jsxs("div",{className:"px-4 pb-3",children:[h.jsxs("div",{className:"flex items-center justify-between py-1.5 text-[13px] text-gray-700 dark:text-gray-300",children:[h.jsxs("span",{className:"flex items-center gap-1 font-mono [&>kbd]:inline-flex [&>kbd]:h-[22px] [&>kbd]:min-w-[22px] [&>kbd]:items-center [&>kbd]:justify-center [&>kbd]:rounded [&>kbd]:border [&>kbd]:border-gray-200 [&>kbd]:bg-gray-100 [&>kbd]:px-1.5 [&>kbd]:text-[11px] [&>kbd]:text-gray-600 dark:[&>kbd]:border-gray-600 dark:[&>kbd]:bg-gray-700 dark:[&>kbd]:text-gray-300",children:[h.jsx("kbd",{children:"↑"})," ",h.jsx("kbd",{children:"↓"})]}),h.jsx("span",{children:"Navigate items"})]}),h.jsxs("div",{className:"flex items-center justify-between py-1.5 text-[13px] text-gray-700 dark:text-gray-300",children:[h.jsxs("span",{className:"flex items-center gap-1 font-mono [&>kbd]:inline-flex [&>kbd]:h-[22px] [&>kbd]:min-w-[22px] [&>kbd]:items-center [&>kbd]:justify-center [&>kbd]:rounded [&>kbd]:border [&>kbd]:border-gray-200 [&>kbd]:bg-gray-100 [&>kbd]:px-1.5 [&>kbd]:text-[11px] [&>kbd]:text-gray-600 dark:[&>kbd]:border-gray-600 dark:[&>kbd]:bg-gray-700 dark:[&>kbd]:text-gray-300",children:[h.jsx("kbd",{children:"←"})," ",h.jsx("kbd",{children:"→"})]}),h.jsx("span",{children:"Collapse/expand"})]}),h.jsxs("div",{className:"flex items-center justify-between py-1.5 text-[13px] text-gray-700 dark:text-gray-300",children:[h.jsxs("span",{className:"flex items-center gap-1 font-mono [&>kbd]:inline-flex [&>kbd]:h-[22px] [&>kbd]:min-w-[22px] [&>kbd]:items-center [&>kbd]:justify-center [&>kbd]:rounded [&>kbd]:border [&>kbd]:border-gray-200 [&>kbd]:bg-gray-100 [&>kbd]:px-1.5 [&>kbd]:text-[11px] [&>kbd]:text-gray-600 dark:[&>kbd]:border-gray-600 dark:[&>kbd]:bg-gray-700 dark:[&>kbd]:text-gray-300",children:[h.jsx("kbd",{children:ie}),"+",h.jsx("kbd",{children:"C"})]}),h.jsx("span",{children:"Copy selection"})]}),h.jsxs("div",{className:"flex items-center justify-between py-1.5 text-[13px] text-gray-700 dark:text-gray-300",children:[h.jsxs("span",{className:"flex items-center gap-1 font-mono [&>kbd]:inline-flex [&>kbd]:h-[22px] [&>kbd]:min-w-[22px] [&>kbd]:items-center [&>kbd]:justify-center [&>kbd]:rounded [&>kbd]:border [&>kbd]:border-gray-200 [&>kbd]:bg-gray-100 [&>kbd]:px-1.5 [&>kbd]:text-[11px] [&>kbd]:text-gray-600 dark:[&>kbd]:border-gray-600 dark:[&>kbd]:bg-gray-700 dark:[&>kbd]:text-gray-300",children:[h.jsx("kbd",{children:ie}),"+",h.jsx("kbd",{children:"F"})]}),h.jsx("span",{children:"Search"})]})]}),h.jsx("div",{className:"px-4 pt-3 pb-2 text-[11px] font-semibold tracking-wide text-gray-500 uppercase dark:text-gray-600",children:"Tips"}),h.jsxs("div",{className:"px-4 pb-3",children:[h.jsx("div",{className:"py-1 text-xs leading-snug text-gray-600 dark:text-gray-600",children:"Click any item to see details and copy options"}),h.jsx("div",{className:"py-1 text-xs leading-snug text-gray-600 dark:text-gray-600",children:"Use Share to copy a link to your current view"}),h.jsx("div",{className:"py-1 text-xs leading-snug text-gray-600 dark:text-gray-600",children:"Search finds both keys and values"})]})]})]}),j&&h.jsx(n.Button,{icon:"copied"===re?h.jsx(l.CheckmarkIcon,{size:16}):h.jsx(x.LinkIcon,{size:16}),onClick:ye,size:"sm",variant:"subtle",children:"copied"===re?"Copied!":"Share"}),k&&h.jsx(n.Button,{onClick:k,size:"sm",variant:"subtle",children:"Close"})]})]}),"editor"!==z&&h.jsxs("div",{className:"border-border-color flex items-center overflow-x-auto border-b bg-gray-50 px-4 py-2 text-[13px] dark:border-gray-300 dark:bg-gray-100 [&::-webkit-scrollbar]:h-1",children:[h.jsx("button",{className:"cursor-pointer rounded border-none bg-none px-2 py-1 text-[13px] whitespace-nowrap text-blue-600 hover:bg-blue-50 dark:text-blue-400 dark:hover:bg-gray-300",onClick:function(){return P([])},type:"button",children:"root"}),H.map(function(e,r){return h.jsxs("span",{children:[h.jsx("span",{className:"mx-0.5 text-gray-400 dark:text-gray-600",children:"/"}),h.jsx("button",{className:"cursor-pointer rounded border-none bg-none px-2 py-1 text-[13px] whitespace-nowrap text-blue-600 hover:bg-blue-50 dark:text-blue-400 dark:hover:bg-gray-300",onClick:function(){return P(H.slice(0,r+1))},type:"button",children:e})]},"breadcrumb-".concat(r,"-").concat(e))})]}),h.jsxs("div",{className:"flex flex-1 flex-col overflow-hidden",children:["column"===z&&h.jsxs("div",{className:"flex h-full overflow-hidden",children:[h.jsxs("div",{className:"bg-surface flex flex-1 overflow-x-auto [&::-webkit-scrollbar]:h-2 [&::-webkit-scrollbar-thumb]:rounded [&::-webkit-scrollbar-thumb]:bg-gray-300 [&::-webkit-scrollbar-track]:bg-gray-100",children:[ke.map(function(e,r){return h.jsx(S,{columnIndex:r,data:e.data,isActiveColumn:R===r,onFocusColumn:B,onSelect:function(e){return me(r,e)},selectedKey:e.selectedKey},"column-".concat(r))}),void 0!==ve&&(null===ve||"object"!=typeof ve)&&H.length>0&&h.jsx(C,{name:null!==(i=H[H.length-1])&&void 0!==i?i:"",value:ve})]}),void 0!==ve&&h.jsx("div",{className:"border-border-color bg-surface w-[400px] shrink-0 grow-0 overflow-y-auto border-l dark:border-gray-300",children:h.jsx(q,{path:H,value:ve})})]}),"tree"===z&&ge&&h.jsxs("div",{className:"flex h-full flex-1 overflow-hidden",children:[h.jsx("div",{ref:ue,className:"flex-1 overflow-auto py-2 font-mono text-[13px] leading-normal",children:Object.entries(ge).map(function(r){var t=e.__read(r,2),n=t[0],a=t[1];return h.jsx(A,{depth:0,expandedPaths:X,nodeKey:n,onCopy:Ne,onSelect:we,onToggle:je,path:"root::".concat(n),selectedPath:H,value:a},n)})}),void 0!==ve&&H.length>0&&h.jsx("div",{className:"border-border-color bg-surface w-[400px] shrink-0 grow-0 overflow-y-auto border-l dark:border-gray-300",children:h.jsx(q,{path:H,value:ve})})]}),"editor"===z&&ge&&h.jsx(I,{data:ge,onCopy:_e})]})]}):h.jsx("div",{className:"bg-surface flex h-full flex-col overflow-hidden rounded-lg",children:h.jsx("div",{className:"flex h-full items-center justify-center p-10",children:h.jsx(s.Text,{color:"gray600",children:"No data available"})})})};
@@ -1 +1 @@
1
- "use strict";var e=require("../../tslib.es6-cdc5f922.js"),r=require("../../styles/constants/theme.js"),a=require("../../utils/cn.js"),s=require("react/jsx-runtime");require("clsx"),require("tailwind-merge");exports.Layout=function(i){var o=i.className,n=i.content,d=i.footer,t=i.headerContent,l=i.logoSidebar,c=i.noPaddingContent,h=i.sidebar,b=i.style;return s.jsxs("main",{className:a.cn("h-screen overflow-hidden",o),style:e.__assign(e.__assign({},b),{"--amino-layout-height":t?"calc(100vh - ".concat(r.theme.appbarHeight,")"):"100vh"}),children:[!!t&&s.jsx("header",{className:"border-amino bg-header shadow-amino-base sticky top-0 z-(--amino-appbar-elevation) box-border flex h-(--amino-appbar-height) border-b",children:t}),s.jsxs("div",{className:"grid h-(--amino-layout-height)",style:{gridTemplateColumns:"var(--amino-sidebar-width) 1fr"},children:[s.jsxs("nav",{className:"border-amino-subtle bg-sidebar box-border grid h-screen w-(--amino-sidebar-width) grid-rows-[1fr_auto] border-r",children:[s.jsxs("div",{className:"p-amino-16 box-border h-full w-full overflow-y-auto",children:[!!l&&s.jsx("div",{className:"mb-amino-24",children:l}),h]}),s.jsx("div",{className:"box-border w-(--amino-sidebar-width)",children:d})]}),s.jsx("div",{className:a.cn("box-border h-full overflow-y-auto",c?"p-0":"p-amino-32"),children:n})]})]})};
1
+ "use strict";var e=require("../../tslib.es6-cdc5f922.js"),r=require("../../styles/constants/theme.js"),a=require("../../utils/cn.js"),s=require("react/jsx-runtime");require("clsx"),require("tailwind-merge");exports.Layout=function(i){var o=i.className,n=i.content,t=i.footer,d=i.headerContent,l=i.logoSidebar,c=i.noPaddingContent,h=i.sidebar,m=i.style;return s.jsxs("main",{className:a.cn("h-screen overflow-hidden",o),style:e.__assign(e.__assign({},m),{"--amino-layout-height":d?"calc(100vh - ".concat(r.theme.appbarHeight,")"):"100vh"}),children:[!!d&&s.jsx("header",{className:"border-amino shadow-amino-base sticky top-0 z-(--amino-appbar-elevation) box-border flex h-(--amino-appbar-height) border-b",children:d}),s.jsxs("div",{className:"grid h-(--amino-layout-height)",style:{gridTemplateColumns:"var(--amino-sidebar-width) 1fr"},children:[s.jsxs("nav",{className:"border-amino-subtle bg-sidebar box-border grid h-screen w-(--amino-sidebar-width) grid-rows-[1fr_auto] border-r",children:[s.jsxs("div",{className:"p-amino-16 box-border h-full w-full overflow-y-auto",children:[!!l&&s.jsx("div",{className:"mb-amino-24",children:l}),h]}),s.jsx("div",{className:"box-border w-(--amino-sidebar-width)",children:t})]}),s.jsx("div",{className:a.cn("box-border h-full overflow-y-auto",c?"p-0":"p-amino-32"),children:n})]})]})};
@@ -1 +1 @@
1
- "use strict";var e=require("../collapse/Collapse.js"),r=require("../../utils/cn.js"),a=require("react/jsx-runtime");require("../../_rollupPluginBabelHelpers-4522587c.js"),require("../../tslib.es6-cdc5f922.js"),require("clsx"),require("tailwind-merge");exports.NavigationGroup=function(t){var i=t.children,s=t.className,n=t.collapsed,l=void 0!==n&&n,o=t.content,g=t.style;return a.jsxs("div",{className:r.cn("flex flex-col",s),style:g,children:[a.jsx("div",{className:r.cn(!l&&"[&_.navigation-item]:text-text-color\n [&_.navigation-item_svg]:text-gray-1000\n [&_.navigation-item]:hover:bg-transparent\n dark:[&_.navigation-item_svg]:text-gray-100"),children:a.jsx("div",{className:"navigation-item",children:o})}),a.jsx(e.Collapse,{className:"pl-amino-12 border-border-color ml-[15px] border-l",collapsed:l,children:i})]})},exports.NavigationItem=function(e){var t=e.className,i=e.content,s=e.icon,n=e.isActive,l=void 0!==n&&n,o=e.style;return a.jsxs("div",{className:r.cn("gap-amino-8 px-amino-8 py-amino-4 text-amino-base rounded-amino-6\n mb-[2px] flex h-[28px] items-center font-medium text-gray-800\n dark:text-gray-200","hover:bg-hover hover:text-gray-1000 dark:hover:text-gray-1000","[&_svg]:h-amino-24 [&_svg]:w-amino-24 [&_svg]:ml-amino-n4\n [&_svg]:text-gray-600 dark:[&_svg]:text-gray-400","hover:[&_svg]:text-gray-800 dark:hover:[&_svg]:text-gray-800",l&&"text-gray-1000 [&_svg]:text-gray-1000 bg-gray-100 dark:bg-gray-900",t),style:o,children:[s&&a.jsx("div",{className:"flex-shrink-0 flex-grow-0",children:s}),i]})};
1
+ "use strict";var e=require("../collapse/Collapse.js"),r=require("../../utils/cn.js"),a=require("react/jsx-runtime");require("../../_rollupPluginBabelHelpers-4522587c.js"),require("../../tslib.es6-cdc5f922.js"),require("clsx"),require("tailwind-merge");exports.NavigationGroup=function(i){var s=i.children,t=i.className,n=i.collapsed,l=void 0!==n&&n,o=i.content,c=i.style;return a.jsxs("div",{className:r.cn("flex flex-col",t),style:c,children:[a.jsx("div",{className:r.cn(!l&&"[&_.navigation-item_*]:text-gray-1000\n [&_.navigation-item_svg]:text-gray-1000\n [&_.navigation-item]:hover:bg-transparent"),children:a.jsx("div",{className:"navigation-item",children:o})}),a.jsx(e.Collapse,{className:"pl-amino-12 border-border-color ml-[15px] border-l",collapsed:l,children:s})]})},exports.NavigationItem=function(e){var i=e.className,s=e.content,t=e.icon,n=e.isActive,l=void 0!==n&&n,o=e.style;return a.jsxs("div",{className:r.cn("gap-amino-8 px-amino-8 py-amino-4 text-amino-base rounded-amino-6\n mb-[2px] flex h-[28px] items-center font-medium text-gray-800","hover:bg-hover hover:text-gray-1000","[&_svg]:h-amino-24 [&_svg]:w-amino-24 [&_svg]:ml-amino-n4\n [&_svg]:text-gray-600","hover:[&_svg]:text-gray-800",l&&"text-gray-1000 [&_svg]:text-gray-1000 bg-gray-100",i),style:o,children:[t&&a.jsx("div",{className:"shrink-0 grow-0",children:t}),s]})};
@@ -1 +1 @@
1
- "use strict";var e=require("../text/Text.js"),r=require("../../utils/cn.js"),t=require("react/jsx-runtime");require("../../_rollupPluginBabelHelpers-4522587c.js"),require("../../tslib.es6-cdc5f922.js"),require("../../styles/constants/theme.js"),require("clsx"),require("tailwind-merge");var l=function(e){var r=e.icon,l=e.iconComponent,n=e.label;return r?t.jsx("img",{alt:n,className:"mr-4 h-8 w-8 rounded-md",src:r}):l?t.jsx(t.Fragment,{children:l}):null};exports.ListItem=function(n){var i=n.className,s=n.decorator,o=n.disabled,c=n.label,a=n.onClick,u=n.rightDecorator,d=n.selected,x=n.style,m=n.subtitle;return t.jsxs("button",{className:r.cn("flex min-h-(--amino-size-xl) flex-row items-center gap-4 rounded-lg p-2\n px-4 leading-4",!o&&d&&"bg-blue-50 **:text-blue-800","active:bg-hover active:outline-none","focus:bg-hover focus:outline-none","hover:bg-hover hover:outline-none",o&&"cursor-not-allowed text-gray-600",!o&&!d&&a&&"hover:bg-hover cursor-pointer",i),onClick:function(e){return!o&&(null==a?void 0:a(e))},style:x,type:"button",children:[t.jsxs("div",{className:r.cn("list-item-icon-wrap",!s&&"hidden",s&&"inline-block"),children:[s,t.jsx(l,{label:"string"==typeof c?c:""})]}),t.jsxs("div",{className:"flex grow flex-col items-start gap-0.5",children:[t.jsx(e.Text,{type:"label",children:c}),m&&t.jsx(e.Text,{type:"caption",children:m})]}),u]})};
1
+ "use strict";var e=require("../text/Text.js"),r=require("../../utils/cn.js"),t=require("react/jsx-runtime");require("../../_rollupPluginBabelHelpers-4522587c.js"),require("../../tslib.es6-cdc5f922.js"),require("../../styles/constants/theme.js"),require("clsx"),require("tailwind-merge");var l=function(e){var r=e.icon,l=e.iconComponent,n=e.label;return r?t.jsx("img",{alt:n,className:"mr-4 h-8 w-8 rounded-md",src:r}):l?t.jsx(t.Fragment,{children:l}):null};exports.ListItem=function(n){var i=n.className,s=n.decorator,o=n.disabled,c=n.label,a=n.onClick,u=n.rightDecorator,d=n.selected,x=n.style,m=n.subtitle;return t.jsxs("button",{className:r.cn("flex min-h-(--amino-size-xl) flex-row items-center gap-4 rounded-lg p-2\n px-4 leading-4",!o&&d&&"bg-blue-50 **:text-blue-800","focus:outline-none active:outline-none",!d&&"active:bg-hover focus:bg-hover hover:bg-hover hover:outline-none",o&&"cursor-not-allowed text-gray-600",!o&&!d&&a&&"cursor-pointer",i),onClick:function(e){return!o&&(null==a?void 0:a(e))},style:x,type:"button",children:[t.jsxs("div",{className:r.cn("list-item-icon-wrap",!s&&"hidden",s&&"inline-block"),children:[s,t.jsx(l,{label:"string"==typeof c?c:""})]}),t.jsxs("div",{className:"flex grow flex-col items-start gap-0.5",children:[t.jsx(e.Text,{type:"label",children:c}),m&&t.jsx(e.Text,{type:"caption",children:m})]}),u]})};
@@ -1 +1 @@
1
- "use strict";var e=require("../../_rollupPluginBabelHelpers-4522587c.js"),r=require("../../tslib.es6-cdc5f922.js"),t=require("react"),a=require("../flex/Flex.js"),l=require("../help-text/HelpText.js"),n=require("../../utils/cn.js"),o=require("../../utils/hooks/useHeightAdjustTextarea.js"),s=require("react/jsx-runtime");require("clsx"),require("tailwind-merge"),require("../text/Text.js"),require("../../styles/constants/theme.js");var i=t.forwardRef(function(i,u){var d=i.actions,c=i.className,x=i.disabled,p=i.disableExpand,f=i.error,m=i.helpText,h=i.label,b=i.maxRows,w=i.rows,j=i.style,g=i.value,v=i.width,y=r.__rest(i,["actions","className","disabled","disableExpand","error","helpText","label","maxRows","rows","style","value","width"]),q=t.useId(),_=!!g,T=t.useRef(null),N=t.useRef(null);return o.useHeightAdjustTextarea({maxRows:b,ref:T,shouldExpand:!p,textareaValue:(null==g?void 0:g.toString())||""}),s.jsxs(a.Flex,{className:"w-[var(--amino-textarea-width)]",flexDirection:"column",gap:4,justifyContent:"space-between",style:r.__assign(r.__assign({},j),{"--amino-textarea-width":v||"100%"}),children:[s.jsxs("div",{className:n.cn("amino-input-wrapper border-amino relative w-full overflow-hidden\n rounded-[12px] border p-0",x&&["*:cursor-not-allowed","[&_.fields]:opacity-disabled","[&_.styledTextarea]:select-none"],c),children:[s.jsxs("button",{className:n.cn("relative flex w-full flex-col hover:border-gray-300"),onClick:function(){var e;return null===(e=null==T?void 0:T.current)||void 0===e?void 0:e.focus()},type:"button",children:[s.jsx("textarea",e._objectSpread2({ref:function(e){u&&"function"==typeof u?u(e):u&&(u.current=e),T.current=e},className:n.cn("text-amino-base bg-amino-input box-border min-h-[50px] w-full\n flex-grow resize-none border-0 px-4 py-2 font-medium\n outline-none","placeholder:font-normal placeholder:text-gray-400\n placeholder:opacity-60 placeholder:transition-all\n placeholder:duration-300 placeholder:ease-in-out","focus:outline-none",h&&["mt-6 pt-0","placeholder:opacity-0",_&&"placeholder:opacity-60","focus:placeholder:opacity-60"],!!d&&!w&&"min-h-[5em]"),disabled:x,id:q,rows:w,style:r.__assign({},f&&{"--amino-textarea-shadow":"var(--amino-glow-error)"}),value:g},y)),h&&s.jsx("label",{className:n.cn("text-amino-base origin-left-top absolute top-5.5 left-4\n leading-none transition-all duration-300 ease-in-out",(_||T.current===document.activeElement)&&"top-[11px] scale-[0.8]"),"data-label":h,htmlFor:y.id||q,style:{color:"var(--amino-gray-800)"},children:h}),s.jsx("div",{className:n.cn("after:absolute after:inset-0 after:rounded-[12px]\n after:content-['']",f&&"after:shadow-[var(--amino-glow-error)]")})]}),d&&s.jsx("div",{ref:N,className:"bg-page flex items-center justify-end px-4 py-4",children:s.jsx(a.Flex,{alignItems:"center",fullHeight:!0,justifyContent:"flex-end",children:d})})]}),s.jsx(l.HelpText,{error:f,helpText:m,withoutMargin:!0})]})});exports.Textarea=i;
1
+ "use strict";var e=require("../../_rollupPluginBabelHelpers-4522587c.js"),t=require("../../tslib.es6-cdc5f922.js"),r=require("react"),a=require("../flex/Flex.js"),l=require("../help-text/HelpText.js"),n=require("../../styles/constants/theme.js"),o=require("../../utils/cn.js"),s=require("../../utils/hooks/useHeightAdjustTextarea.js"),i=require("react/jsx-runtime");require("clsx"),require("tailwind-merge"),require("../text/Text.js");var u=r.forwardRef(function(u,c){var d=u.actions,x=u.className,p=u.disabled,f=u.disableExpand,h=u.error,m=u.helpText,w=u.label,b=u.maxRows,v=u.rows,j=u.style,g=u.value,y=u.width,_=t.__rest(u,["actions","className","disabled","disableExpand","error","helpText","label","maxRows","rows","style","value","width"]),q=r.useId(),T=!!g,N=t.__read(r.useState(!1),2),R=N[0],F=N[1],H=r.useRef(null),S=r.useRef(null);return s.useHeightAdjustTextarea({maxRows:b,ref:H,shouldExpand:!f,textareaValue:(null==g?void 0:g.toString())||""}),i.jsxs(a.Flex,{className:"w-[var(--amino-textarea-width)]",flexDirection:"column",gap:4,justifyContent:"space-between",style:t.__assign(t.__assign({},j),{"--amino-textarea-width":y||"100%"}),children:[i.jsxs("div",{className:o.cn("amino-input-wrapper relative w-full overflow-hidden rounded-[12px]\n border p-0",h?"border-transparent shadow-[var(--amino-glow-error)]":"border-amino",!h&&R&&"shadow-[var(--amino-focus-shadow)]",p&&["*:cursor-not-allowed","[&_.fields]:opacity-disabled","[&_.styledTextarea]:select-none"],x),style:{"--amino-focus-shadow":n.theme.glowBlue},children:[i.jsxs("label",{className:"relative flex w-full flex-col",htmlFor:_.id||q,onClick:function(e){e.target===H.current?e.preventDefault():setTimeout(function(){var e=H.current;if(e){var t=e.value.length;e.setSelectionRange(t,t)}},0)},children:[i.jsx("textarea",e._objectSpread2(e._objectSpread2({ref:function(e){c&&"function"==typeof c?c(e):c&&(c.current=e),H.current=e},className:o.cn("text-amino-base bg-amino-input box-border min-h-[100px] w-full\n flex-grow resize-none border-0 px-4 py-3 font-medium\n outline-none","placeholder:font-normal placeholder:text-gray-400\n placeholder:opacity-60 placeholder:transition-all\n placeholder:duration-300 placeholder:ease-in-out","focus:outline-none",w&&["mt-6 pt-0","placeholder:opacity-0",T&&"placeholder:opacity-60","focus:placeholder:opacity-60"],!!d&&!v&&"min-h-[5em]")},_),{},{disabled:p,id:q,onBlur:function(e){var t;F(!1),null===(t=_.onBlur)||void 0===t||t.call(_,e)},onFocus:function(e){var t;F(!0),null===(t=_.onFocus)||void 0===t||t.call(_,e)},rows:v,value:g})),w&&i.jsx("span",{className:o.cn("text-amino-base pointer-events-none absolute top-6 left-4\n origin-top-left leading-none transition-all duration-300\n ease-in-out",(T||R)&&"top-[11px] scale-[0.8]"),style:{color:"var(--amino-gray-800)"},children:w}),i.jsx("div",{className:"after:absolute after:inset-0 after:rounded-[12px] after:content-['']"})]}),d&&i.jsx("div",{ref:S,className:"bg-page flex items-center justify-end px-4 py-4",children:i.jsx(a.Flex,{alignItems:"center",fullHeight:!0,justifyContent:"flex-end",children:d})})]}),i.jsx(l.HelpText,{error:h,helpText:m,withoutMargin:!0})]})});exports.Textarea=u;
@@ -1 +1 @@
1
- "use strict";var r=require("../../_rollupPluginBabelHelpers-4522587c.js"),e=require("../../tslib.es6-cdc5f922.js"),a=require("framer-motion"),t=require("../button/Button.js"),n=require("../flex/Flex.js"),s=require("../../icons/CheckCircleIcon.js"),i=require("../../icons/InfoIcon.js"),o=require("../../icons/RemoveCircleIcon.js"),c=require("../../icons/RemoveIcon.js"),g=require("../../icons/WarningIcon.js"),l=require("../../utils/cn.js"),u=require("react/jsx-runtime"),b=require("react");require("class-variance-authority"),require("../button/RippleGroup.js"),require("uuid"),require("../button/_Ripple.js"),require("../../utils/getAminoColor.js"),require("../../styles/constants/theme.js"),require("../button/useRipple.js"),require("../spinner/Spinner.js"),require("../../utils/getTestId.js"),require("clsx"),require("tailwind-merge"),require("../../icons/icon-base/_IconBase.js");exports.Toast=function(d){var _=d.actions,m=d.children,x=d.direction,k=d.intent,j=d.isPersistent,f=d.onDismiss,y=d.style,p=d.toastKey,v=function(){switch(x){case"top":return{opacity:0,translateX:0,translateY:-10};case"bottom":return{opacity:0,translateX:0,translateY:10};case"left":return{opacity:0,translateX:-10,translateY:0};default:return{opacity:0,translateX:10,translateY:0}}},q={animate:{opacity:1,translateX:0,translateY:0},exit:v(),initial:v()},I=function(){switch(k){case"success":return{class:l.cn("bg-linear-to-r from-[rgba(86,199,111,0.4)_0%] to-[rgba(86,199,111,0)_50%] bg-gray-1000","[&_svg]:text-green-500","dark:bg-linear-to-r dark:from-[rgba(86,199,111,0.24)_0%] dark:to-[rgba(86,199,111,0)_50%] dark:bg-gray-50","dark:[&_svg]:text-green-600"),icon:u.jsx(s.CheckCircleIcon,{})};case"error":return{class:l.cn("bg-linear-to-r from-[rgba(249,92,103,0.4)_0%] to-[rgba(249,92,103,0)_50%] bg-gray-1000","[&_svg]:text-red-500","dark:bg-linear-to-r dark:from-[rgba(249,92,103,0.24)_0%] dark:to-[rgba(249,92,103,0)_50%] dark:bg-gray-50","dark:[&_svg]:text-red-600"),icon:u.jsx(o.RemoveCircleIcon,{})};case"warning":return{class:l.cn("bg-linear-to-r from-[rgba(248,140,83,0.4)_0%] to-[rgba(248,140,83,0)_50%] bg-gray-1000","[&_svg]:text-orange-500","dark:bg-linear-to-r dark:from-[rgba(248,140,83,0.24)_0%] dark:to-[rgba(248,140,83,0)_50%] dark:bg-gray-50","dark:[&_svg]:text-orange-600"),icon:u.jsx(g.WarningIcon,{})};case"info":return{class:l.cn("bg-linear-to-r from-[rgba(95,146,246,0.4)_0%] to-[rgba(95,146,246,0)_50%] bg-gray-1000","[&_svg]:text-blue-500","dark:bg-linear-to-r dark:from-[rgba(95,146,246,0.24)_0%] dark:to-[rgba(95,146,246,0)_50%] dark:bg-gray-50","dark:[&_svg]:text-blue-600"),icon:u.jsx(i.InfoIcon,{})};default:return{class:l.cn("bg-linear-to-r from-[rgba(148,150,158,0.4)_0%] to-[rgba(148,150,158,0)_50%] bg-gray-1000","[&_svg]:text-gray-500","dark:bg-linear-to-r dark:from-[rgba(148,150,158,0.24)_0%] dark:to-[rgba(148,150,158,0)_50%] dark:bg-gray-50","dark:[&_svg]:text-gray-600"),icon:u.jsx(i.InfoIcon,{})}}}();return b.createElement(a.motion.div,r._objectSpread2(r._objectSpread2({className:l.cn("shadow-amino-v3-large z-[999999] flex-1 rounded-xl p-4 leading-6\n font-medium select-none","bg-gray-1000 text-gray-0 bg-linear-to-r from-[rgba(148,150,158,0.4)_0%]\n to-[rgba(148,150,158,0)_50%]","[&_svg]:text-gray-500","dark:text-gray-1000 dark:bg-gray-50 dark:bg-linear-to-r\n dark:from-[rgba(148,150,158,0.24)_0%] dark:to-[rgba(148,150,158,0)_50%]","dark:[&_svg]:text-gray-600",I.class,j&&"cursor-pointer select-auto hover:scale-95"),layout:!0,style:e.__assign({},y)},q),{},{key:p}),u.jsxs(n.Flex,{alignItems:"flex-start",gap:12,justifyContent:"space-between",children:[u.jsxs(n.Flex,{alignItems:"center",className:"self-center",gap:12,children:[u.jsx("div",{className:"self-start",children:I.icon}),u.jsx("div",{children:m})]}),u.jsxs(n.Flex,{alignItems:"center",className:"toast-actions",gap:12,children:[_,j&&u.jsx(t.Button,{className:"h-6",icon:u.jsx(c.RemoveIcon,{}),onClick:function(r){return null==f?void 0:f(r)},variant:"plain"})]})]}))};
1
+ "use strict";var e=require("../../_rollupPluginBabelHelpers-4522587c.js"),r=require("../../tslib.es6-cdc5f922.js"),a=require("framer-motion"),t=require("../button/Button.js"),n=require("../flex/Flex.js"),i=require("../../icons/CheckCircleIcon.js"),s=require("../../icons/InfoIcon.js"),g=require("../../icons/RemoveCircleIcon.js"),c=require("../../icons/RemoveIcon.js"),l=require("../../icons/WarningIcon.js"),o=require("../../utils/cn.js"),u=require("react/jsx-runtime"),d=require("react");require("class-variance-authority"),require("../button/RippleGroup.js"),require("uuid"),require("../button/_Ripple.js"),require("../../utils/getAminoColor.js"),require("../../styles/constants/theme.js"),require("../button/useRipple.js"),require("../spinner/Spinner.js"),require("../../utils/getTestId.js"),require("clsx"),require("tailwind-merge"),require("../../icons/icon-base/_IconBase.js");exports.Toast=function(b){var _=b.actions,x=b.children,m=b.direction,j=b.intent,y=b.isPersistent,p=b.onDismiss,q=b.style,v=b.toastKey,k=function(){switch(m){case"top":return{opacity:0,translateX:0,translateY:-10};case"bottom":return{opacity:0,translateX:0,translateY:10};case"left":return{opacity:0,translateX:-10,translateY:0};default:return{opacity:0,translateX:10,translateY:0}}},f={animate:{opacity:1,translateX:0,translateY:0},exit:k(),initial:k()},I=function(){switch(j){case"success":return{class:o.cn("bg-gray-1000 bg-[image:linear-gradient(90deg,rgba(86,199,111,0.4)_0%,rgba(86,199,111,0)_50%)]","[&_svg]:text-green-500","dark:bg-gray-50 dark:bg-[image:linear-gradient(90deg,rgba(86,199,111,0.24)_0%,rgba(86,199,111,0)_50%)]","dark:[&_svg]:text-green-600"),icon:u.jsx(i.CheckCircleIcon,{})};case"error":return{class:o.cn("bg-gray-1000 bg-[image:linear-gradient(90deg,rgba(249,92,103,0.4)_0%,rgba(249,92,103,0)_50%)]","[&_svg]:text-red-500","dark:bg-gray-50 dark:bg-[image:linear-gradient(90deg,rgba(249,92,103,0.24)_0%,rgba(249,92,103,0)_50%)]","dark:[&_svg]:text-red-600"),icon:u.jsx(g.RemoveCircleIcon,{})};case"warning":return{class:o.cn("bg-gray-1000 bg-[image:linear-gradient(90deg,rgba(248,140,83,0.4)_0%,rgba(248,140,83,0)_50%)]","[&_svg]:text-orange-500","dark:bg-gray-50 dark:bg-[image:linear-gradient(90deg,rgba(248,140,83,0.24)_0%,rgba(248,140,83,0)_50%)]","dark:[&_svg]:text-orange-600"),icon:u.jsx(l.WarningIcon,{})};case"info":return{class:o.cn("bg-gray-1000 bg-[image:linear-gradient(90deg,rgba(95,146,246,0.4)_0%,rgba(95,146,246,0)_50%)]","[&_svg]:text-blue-500","dark:bg-gray-50 dark:bg-[image:linear-gradient(90deg,rgba(95,146,246,0.24)_0%,rgba(95,146,246,0)_50%)]","dark:[&_svg]:text-blue-600"),icon:u.jsx(s.InfoIcon,{})};default:return{class:o.cn("bg-gray-1000 bg-[image:linear-gradient(90deg,rgba(148,150,158,0.4)_0%,rgba(148,150,158,0)_50%)]","[&_svg]:text-gray-500","dark:bg-gray-50 dark:bg-[image:linear-gradient(90deg,rgba(148,150,158,0.24)_0%,rgba(148,150,158,0)_50%)]","dark:[&_svg]:text-gray-600"),icon:u.jsx(s.InfoIcon,{})}}}();return d.createElement(a.motion.div,e._objectSpread2(e._objectSpread2({className:o.cn("shadow-amino-v3-large z-999999 flex-1 rounded-xl p-4 leading-6\n font-medium select-none","bg-gray-1000 text-gray-0\n bg-[linear-gradient(90deg,rgba(148,150,158,0.4)_0%,rgba(148,150,158,0)_50%)]","[&_svg]:text-gray-500","dark:text-gray-1000 dark:bg-gray-50\n dark:bg-[linear-gradient(90deg,rgba(148,150,158,0.24)_0%,rgba(148,150,158,0)_50%)]","dark:[&_svg]:text-gray-600",I.class,y&&"cursor-pointer select-auto"),layout:!0,style:r.__assign({},q)},f),{},{key:v}),u.jsxs(n.Flex,{alignItems:"flex-start",gap:12,justifyContent:"space-between",children:[u.jsxs(n.Flex,{alignItems:"center",className:"self-center",gap:12,children:[u.jsx("div",{className:"self-start",children:I.icon}),u.jsx("div",{children:x})]}),u.jsxs(n.Flex,{alignItems:"center",className:"toast-actions",gap:12,children:[_,y&&u.jsx(t.Button,{className:"h-6",icon:u.jsx(c.RemoveIcon,{}),onClick:function(e){return null==p?void 0:p(e)},variant:"plain"})]})]}))};
@@ -1 +1 @@
1
- "use strict";var e=require("../../_rollupPluginBabelHelpers-4522587c.js"),t=require("../../tslib.es6-cdc5f922.js"),r=require("react"),i=require("@radix-ui/react-tooltip"),o=require("../../utils/cn.js"),a=require("react/jsx-runtime");function n(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach(function(r){if("default"!==r){var i=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,i.get?i:{enumerable:!0,get:function(){return e[r]}})}}),t.default=e,Object.freeze(t)}require("clsx"),require("tailwind-merge");var s=n(r),d=n(i),l=d.Provider,u=d.Root,f=d.Trigger,c=s.forwardRef(function(r,i){var n=r.className,s=r.sideOffset,l=void 0===s?4:s,u=t.__rest(r,["className","sideOffset"]);return a.jsx(d.Portal,{children:a.jsx(d.Content,e._objectSpread2({ref:i,className:o.cn("bg-primary text-primary-foreground animate-in fade-in-0 zoom-in-95\n data-[state=closed]:animate-out data-[state=closed]:fade-out-0\n data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2\n data-[side=left]:slide-in-from-right-2\n data-[side=right]:slide-in-from-left-2\n data-[side=top]:slide-in-from-bottom-2 z-50\n origin-[--radix-tooltip-content-transform-origin] overflow-hidden\n rounded-md px-3 py-1.5 text-xs",n),sideOffset:l},u))})});c.displayName=d.Content.displayName,exports.Tooltip=u,exports.TooltipContent=c,exports.TooltipProvider=l,exports.TooltipTrigger=f;
1
+ "use strict";var e=require("../../_rollupPluginBabelHelpers-4522587c.js"),t=require("../../tslib.es6-cdc5f922.js"),r=require("react"),i=require("@radix-ui/react-tooltip"),o=require("../../utils/cn.js"),a=require("react/jsx-runtime");function s(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach(function(r){if("default"!==r){var i=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,i.get?i:{enumerable:!0,get:function(){return e[r]}})}}),t.default=e,Object.freeze(t)}require("clsx"),require("tailwind-merge");var n=s(r),d=s(i),l=d.Provider,f=d.Root,u=d.Trigger,c=n.forwardRef(function(r,i){var s=r.className,n=r.sideOffset,l=void 0===n?4:n,f=t.__rest(r,["className","sideOffset"]);return a.jsx(d.Portal,{children:a.jsx(d.Content,e._objectSpread2({ref:i,className:o.cn("animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out\n data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95\n data-[side=bottom]:slide-in-from-top-2\n data-[side=left]:slide-in-from-right-2\n data-[side=right]:slide-in-from-left-2\n data-[side=top]:slide-in-from-bottom-2 z-50\n origin-[--radix-tooltip-content-transform-origin] overflow-hidden",s),sideOffset:l},f))})});c.displayName=d.Content.displayName,exports.Tooltip=f,exports.TooltipContent=c,exports.TooltipProvider=l,exports.TooltipTrigger=u;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zonos/amino",
3
- "version": "6.0.0-alpha.20",
3
+ "version": "6.0.0-alpha.22",
4
4
  "description": "Core UI components for Amino",
5
5
  "repository": "git@github.com:Zonos/amino.git",
6
6
  "license": "MIT",
@@ -1,7 +1,3 @@
1
- [data-theme='night'] .amino-simple-table thead tr th {
2
- background-color: var(--amino-gray-50);
3
- }
4
-
5
1
  [data-theme='night'] tbody tr.amino-table-row-active {
6
2
  background-color: var(--amino-gray-100);
7
3
  }