@chaibuilder/sdk 3.1.5 → 3.1.6

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";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),u=require("./index-ENH8SVib.cjs"),n=require("./tooltip-C2BCZ8Al.cjs");require("clsx");require("tailwind-merge");const S=({isOpen:m,onClose:l,editor:t,rteElement:f})=>{const r=u.usePageExternalData(),j=o=>{if(!t)return;const i=`{{${o}}}`;t.commands.focus();const{from:p,to:g}=t.state.selection;if(p!==g)t.chain().deleteSelection().insertContent(i).run();else{const{state:c}=t,s=c.selection.from,x=c.doc.textBetween(Math.max(0,s-1),s),a=c.doc.textBetween(s,Math.min(s+1,c.doc.content.size));let d="";s>0&&x!==" "&&!/[.,!?;:]/.test(x)&&(d=" ");let h="";a&&a!==" "&&!/[.,!?;:]/.test(a)&&(h=" "),t.chain().insertContent(d+i+h).run()}};return e.jsx(n.Dialog,{open:m,onOpenChange:o=>!o&&l(),children:e.jsxs(n.DialogContent,{className:"max-h-[90vh] overflow-y-auto sm:max-w-[800px]",children:[e.jsx(n.DialogHeader,{children:e.jsxs(n.DialogTitle,{className:"flex items-center justify-between pr-8",children:[e.jsx("span",{children:"Rich Text Editor"}),Object.keys(r).length>0&&e.jsxs("div",{className:"flex items-center",children:[e.jsx("span",{className:"mr-2 text-sm text-muted-foreground",children:"Add field:"}),e.jsx("div",{className:"rte-path-selector",children:e.jsx(u.NestedPathSelector,{data:r,onSelect:j})})]})]})}),f,e.jsx("div",{className:"mt-4 flex justify-end",children:e.jsx(n.Button,{onClick:l,children:"Done"})})]})})};exports.default=S;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),u=require("./index-CooHzimL.cjs"),n=require("./tooltip-C2BCZ8Al.cjs");require("clsx");require("tailwind-merge");const S=({isOpen:m,onClose:l,editor:t,rteElement:f})=>{const r=u.usePageExternalData(),j=o=>{if(!t)return;const i=`{{${o}}}`;t.commands.focus();const{from:p,to:g}=t.state.selection;if(p!==g)t.chain().deleteSelection().insertContent(i).run();else{const{state:c}=t,s=c.selection.from,x=c.doc.textBetween(Math.max(0,s-1),s),a=c.doc.textBetween(s,Math.min(s+1,c.doc.content.size));let d="";s>0&&x!==" "&&!/[.,!?;:]/.test(x)&&(d=" ");let h="";a&&a!==" "&&!/[.,!?;:]/.test(a)&&(h=" "),t.chain().insertContent(d+i+h).run()}};return e.jsx(n.Dialog,{open:m,onOpenChange:o=>!o&&l(),children:e.jsxs(n.DialogContent,{className:"max-h-[90vh] overflow-y-auto sm:max-w-[800px]",children:[e.jsx(n.DialogHeader,{children:e.jsxs(n.DialogTitle,{className:"flex items-center justify-between pr-8",children:[e.jsx("span",{children:"Rich Text Editor"}),Object.keys(r).length>0&&e.jsxs("div",{className:"flex items-center",children:[e.jsx("span",{className:"mr-2 text-sm text-muted-foreground",children:"Add field:"}),e.jsx("div",{className:"rte-path-selector",children:e.jsx(u.NestedPathSelector,{data:r,onSelect:j})})]})]})}),f,e.jsx("div",{className:"mt-4 flex justify-end",children:e.jsx(n.Button,{onClick:l,children:"Done"})})]})})};exports.default=S;
@@ -1,5 +1,5 @@
1
1
  import { jsx as e, jsxs as c } from "react/jsx-runtime";
2
- import { d as N, N as D } from "./index-DHTitEQZ.js";
2
+ import { d as N, N as D } from "./index-CDJhqQK5.js";
3
3
  import { a1 as v, a3 as S, a6 as j, a9 as w, v as y } from "./tooltip-4-b9QGDK.js";
4
4
  import "clsx";
5
5
  import "tailwind-merge";
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "author": "Suraj Air",
6
6
  "license": "BSD-3-Clause",
7
7
  "homepage": "https://chaibuilder.com",
8
- "version": "3.1.5",
8
+ "version": "3.1.6",
9
9
  "type": "module",
10
10
  "repository": {
11
11
  "type": "git",
@@ -1,11 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const P=require("react/jsx-runtime"),oe=require("./tooltip-C2BCZ8Al.cjs"),a=require("react"),ee=require("@radix-ui/react-icons");function ie(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function we(e){if(Array.isArray(e))return e}function je(e,t,r){return(t=Ie(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Oe(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,o,i,l,f=[],g=!0,h=!1;try{if(i=(r=r.call(e)).next,t!==0)for(;!(g=(n=i.call(r)).done)&&(f.push(n.value),f.length!==t);g=!0);}catch(S){h=!0,o=S}finally{try{if(!g&&r.return!=null&&(l=r.return(),Object(l)!==l))return}finally{if(h)throw o}}return f}}function Me(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
2
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ae(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function ue(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ae(Object(r),!0).forEach(function(n){je(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ae(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Se(e,t){if(e==null)return{};var r,n,o=Pe(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function Pe(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function Ee(e,t){return we(e)||Oe(e,t)||xe(e,t)||Me()}function Ce(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Ie(e){var t=Ce(e,"string");return typeof t=="symbol"?t:t+""}function xe(e,t){{if(typeof e=="string")return ie(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?ie(e,t):void 0}}function Re(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ce(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function le(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ce(Object(r),!0).forEach(function(n){Re(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ce(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Le(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return function(n){return t.reduceRight(function(o,i){return i(o)},n)}}function q(e){return function t(){for(var r=this,n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];return o.length>=e.length?e.apply(this,o):function(){for(var l=arguments.length,f=new Array(l),g=0;g<l;g++)f[g]=arguments[g];return t.apply(r,[].concat(o,f))}}}function K(e){return{}.toString.call(e).includes("Object")}function Te(e){return!Object.keys(e).length}function U(e){return typeof e=="function"}function Ae(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function De(e,t){return K(t)||C("changeType"),Object.keys(t).some(function(r){return!Ae(e,r)})&&C("changeField"),t}function $e(e){U(e)||C("selectorType")}function Ne(e){U(e)||K(e)||C("handlerType"),K(e)&&Object.values(e).some(function(t){return!U(t)})&&C("handlersType")}function Ve(e){e||C("initialIsRequired"),K(e)||C("initialType"),Te(e)&&C("initialContent")}function qe(e,t){throw new Error(e[t]||e.default)}var ze={initialIsRequired:"initial state is required",initialType:"initial state should be an object",initialContent:"initial state shouldn't be an empty object",handlerType:"handler should be an object or a function",handlersType:"all handlers should be a functions",selectorType:"selector should be a function",changeType:"provided value of changes should be an object",changeField:'it seams you want to change a field in the state which is not specified in the "initial" state',default:"an unknown error accured in `state-local` package"},C=q(qe)(ze),W={changes:De,selector:$e,handler:Ne,initial:Ve};function Ue(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};W.initial(e),W.handler(t);var r={current:e},n=q(He)(r,t),o=q(Be)(r),i=q(W.changes)(e),l=q(Fe)(r);function f(){var h=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(S){return S};return W.selector(h),h(r.current)}function g(h){Le(n,o,i,l)(h)}return[f,g]}function Fe(e,t){return U(t)?t(e.current):t}function Be(e,t){return e.current=le(le({},e.current),t),t}function He(e,t,r){return U(t)?t(e.current):Object.keys(r).forEach(function(n){var o;return(o=t[n])===null||o===void 0?void 0:o.call(t,e.current[n])}),r}var We={create:Ue},ke={paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.54.0/min/vs"}};function Ke(e){return function t(){for(var r=this,n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];return o.length>=e.length?e.apply(this,o):function(){for(var l=arguments.length,f=new Array(l),g=0;g<l;g++)f[g]=arguments[g];return t.apply(r,[].concat(o,f))}}}function Ge(e){return{}.toString.call(e).includes("Object")}function Ye(e){return e||se("configIsRequired"),Ge(e)||se("configType"),e.urls?(_e(),{paths:{vs:e.urls.monacoBase}}):e}function _e(){console.warn(fe.deprecation)}function Je(e,t){throw new Error(e[t]||e.default)}var fe={configIsRequired:"the configuration object is required",configType:"the configuration object should be an object",default:"an unknown error accured in `@monaco-editor/loader` package",deprecation:`Deprecation warning!
3
- You are using deprecated way of configuration.
4
-
5
- Instead of using
6
- monaco.config({ urls: { monacoBase: '...' } })
7
- use
8
- monaco.config({ paths: { vs: '...' } })
9
-
10
- For more please check the link https://github.com/suren-atoyan/monaco-loader#config
11
- `},se=Ke(Je)(fe),Qe={config:Ye},Xe=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return function(o){return r.reduceRight(function(i,l){return l(i)},o)}};function de(e,t){return Object.keys(t).forEach(function(r){t[r]instanceof Object&&e[r]&&Object.assign(t[r],de(e[r],t[r]))}),ue(ue({},e),t)}var Ze={type:"cancelation",msg:"operation is manually canceled"};function te(e){var t=!1,r=new Promise(function(n,o){e.then(function(i){return t?o(Ze):n(i)}),e.catch(o)});return r.cancel=function(){return t=!0},r}var et=["monaco"],tt=We.create({config:ke,isInitialized:!1,resolve:null,reject:null,monaco:null}),pe=Ee(tt,2),F=pe[0],G=pe[1];function rt(e){var t=Qe.config(e),r=t.monaco,n=Se(t,et);G(function(o){return{config:de(o.config,n),monaco:r}})}function nt(){var e=F(function(t){var r=t.monaco,n=t.isInitialized,o=t.resolve;return{monaco:r,isInitialized:n,resolve:o}});if(!e.isInitialized){if(G({isInitialized:!0}),e.monaco)return e.resolve(e.monaco),te(re);if(window.monaco&&window.monaco.editor)return ge(window.monaco),e.resolve(window.monaco),te(re);Xe(ot,at)(ut)}return te(re)}function ot(e){return document.body.appendChild(e)}function it(e){var t=document.createElement("script");return e&&(t.src=e),t}function at(e){var t=F(function(n){var o=n.config,i=n.reject;return{config:o,reject:i}}),r=it("".concat(t.config.paths.vs,"/loader.js"));return r.onload=function(){return e()},r.onerror=t.reject,r}function ut(){var e=F(function(r){var n=r.config,o=r.resolve,i=r.reject;return{config:n,resolve:o,reject:i}}),t=window.require;t.config(e.config),t(["vs/editor/editor.main"],function(r){var n=r.m;ge(n),e.resolve(n)},function(r){e.reject(r)})}function ge(e){F().monaco||G({monaco:e})}function ct(){return F(function(e){var t=e.monaco;return t})}var re=new Promise(function(e,t){return G({resolve:e,reject:t})}),he={config:rt,init:nt,__getMonacoInstance:ct},lt={wrapper:{display:"flex",position:"relative",textAlign:"initial"},fullWidth:{width:"100%"},hide:{display:"none"}},ne=lt,st={container:{display:"flex",height:"100%",width:"100%",justifyContent:"center",alignItems:"center"}},ft=st;function dt({children:e}){return a.createElement("div",{style:ft.container},e)}var pt=dt,gt=pt;function ht({width:e,height:t,isEditorReady:r,loading:n,_ref:o,className:i,wrapperProps:l}){return a.createElement("section",{style:{...ne.wrapper,width:e,height:t},...l},!r&&a.createElement(gt,null,n),a.createElement("div",{ref:o,style:{...ne.fullWidth,...!r&&ne.hide},className:i}))}var vt=ht,ve=a.memo(vt);function mt(e){a.useEffect(e,[])}var me=mt;function bt(e,t,r=!0){let n=a.useRef(!0);a.useEffect(n.current||!r?()=>{n.current=!1}:e,t)}var O=bt;function z(){}function T(e,t,r,n){return yt(e,n)||wt(e,t,r,n)}function yt(e,t){return e.editor.getModel(be(e,t))}function wt(e,t,r,n){return e.editor.createModel(t,r,n?be(e,n):void 0)}function be(e,t){return e.Uri.parse(t)}function jt({original:e,modified:t,language:r,originalLanguage:n,modifiedLanguage:o,originalModelPath:i,modifiedModelPath:l,keepCurrentOriginalModel:f=!1,keepCurrentModifiedModel:g=!1,theme:h="light",loading:S="Loading...",options:M={},height:Y="100%",width:_="100%",className:J,wrapperProps:Q={},beforeMount:X=z,onMount:Z=z}){let[w,A]=a.useState(!1),[I,m]=a.useState(!0),b=a.useRef(null),v=a.useRef(null),D=a.useRef(null),y=a.useRef(Z),s=a.useRef(X),x=a.useRef(!1);me(()=>{let u=he.init();return u.then(d=>(v.current=d)&&m(!1)).catch(d=>(d==null?void 0:d.type)!=="cancelation"&&console.error("Monaco initialization: error:",d)),()=>b.current?$():u.cancel()}),O(()=>{if(b.current&&v.current){let u=b.current.getOriginalEditor(),d=T(v.current,e||"",n||r||"text",i||"");d!==u.getModel()&&u.setModel(d)}},[i],w),O(()=>{if(b.current&&v.current){let u=b.current.getModifiedEditor(),d=T(v.current,t||"",o||r||"text",l||"");d!==u.getModel()&&u.setModel(d)}},[l],w),O(()=>{let u=b.current.getModifiedEditor();u.getOption(v.current.editor.EditorOption.readOnly)?u.setValue(t||""):t!==u.getValue()&&(u.executeEdits("",[{range:u.getModel().getFullModelRange(),text:t||"",forceMoveMarkers:!0}]),u.pushUndoStop())},[t],w),O(()=>{var u,d;(d=(u=b.current)==null?void 0:u.getModel())==null||d.original.setValue(e||"")},[e],w),O(()=>{let{original:u,modified:d}=b.current.getModel();v.current.editor.setModelLanguage(u,n||r||"text"),v.current.editor.setModelLanguage(d,o||r||"text")},[r,n,o],w),O(()=>{var u;(u=v.current)==null||u.editor.setTheme(h)},[h],w),O(()=>{var u;(u=b.current)==null||u.updateOptions(M)},[M],w);let B=a.useCallback(()=>{var E;if(!v.current)return;s.current(v.current);let u=T(v.current,e||"",n||r||"text",i||""),d=T(v.current,t||"",o||r||"text",l||"");(E=b.current)==null||E.setModel({original:u,modified:d})},[r,t,o,e,n,i,l]),H=a.useCallback(()=>{var u;!x.current&&D.current&&(b.current=v.current.editor.createDiffEditor(D.current,{automaticLayout:!0,...M}),B(),(u=v.current)==null||u.editor.setTheme(h),A(!0),x.current=!0)},[M,h,B]);a.useEffect(()=>{w&&y.current(b.current,v.current)},[w]),a.useEffect(()=>{!I&&!w&&H()},[I,w,H]);function $(){var d,E,R,N;let u=(d=b.current)==null?void 0:d.getModel();f||((E=u==null?void 0:u.original)==null||E.dispose()),g||((R=u==null?void 0:u.modified)==null||R.dispose()),(N=b.current)==null||N.dispose()}return a.createElement(ve,{width:_,height:Y,isEditorReady:w,loading:S,_ref:D,className:J,wrapperProps:Q})}var Ot=jt;a.memo(Ot);function Mt(e){let t=a.useRef();return a.useEffect(()=>{t.current=e},[e]),t.current}var St=Mt,k=new Map;function Pt({defaultValue:e,defaultLanguage:t,defaultPath:r,value:n,language:o,path:i,theme:l="light",line:f,loading:g="Loading...",options:h={},overrideServices:S={},saveViewState:M=!0,keepCurrentModel:Y=!1,width:_="100%",height:J="100%",className:Q,wrapperProps:X={},beforeMount:Z=z,onMount:w=z,onChange:A,onValidate:I=z}){let[m,b]=a.useState(!1),[v,D]=a.useState(!0),y=a.useRef(null),s=a.useRef(null),x=a.useRef(null),B=a.useRef(w),H=a.useRef(Z),$=a.useRef(),u=a.useRef(n),d=St(i),E=a.useRef(!1),R=a.useRef(!1);me(()=>{let c=he.init();return c.then(p=>(y.current=p)&&D(!1)).catch(p=>(p==null?void 0:p.type)!=="cancelation"&&console.error("Monaco initialization: error:",p)),()=>s.current?ye():c.cancel()}),O(()=>{var p,j,V,L;let c=T(y.current,e||n||"",t||o||"",i||r||"");c!==((p=s.current)==null?void 0:p.getModel())&&(M&&k.set(d,(j=s.current)==null?void 0:j.saveViewState()),(V=s.current)==null||V.setModel(c),M&&((L=s.current)==null||L.restoreViewState(k.get(i))))},[i],m),O(()=>{var c;(c=s.current)==null||c.updateOptions(h)},[h],m),O(()=>{!s.current||n===void 0||(s.current.getOption(y.current.editor.EditorOption.readOnly)?s.current.setValue(n):n!==s.current.getValue()&&(R.current=!0,s.current.executeEdits("",[{range:s.current.getModel().getFullModelRange(),text:n,forceMoveMarkers:!0}]),s.current.pushUndoStop(),R.current=!1))},[n],m),O(()=>{var p,j;let c=(p=s.current)==null?void 0:p.getModel();c&&o&&((j=y.current)==null||j.editor.setModelLanguage(c,o))},[o],m),O(()=>{var c;f!==void 0&&((c=s.current)==null||c.revealLine(f))},[f],m),O(()=>{var c;(c=y.current)==null||c.editor.setTheme(l)},[l],m);let N=a.useCallback(()=>{var c;if(!(!x.current||!y.current)&&!E.current){H.current(y.current);let p=i||r,j=T(y.current,n||e||"",t||o||"",p||"");s.current=(c=y.current)==null?void 0:c.editor.create(x.current,{model:j,automaticLayout:!0,...h},S),M&&s.current.restoreViewState(k.get(p)),y.current.editor.setTheme(l),f!==void 0&&s.current.revealLine(f),b(!0),E.current=!0}},[e,t,r,n,o,i,h,S,M,l,f]);a.useEffect(()=>{m&&B.current(s.current,y.current)},[m]),a.useEffect(()=>{!v&&!m&&N()},[v,m,N]),u.current=n,a.useEffect(()=>{var c,p;m&&A&&((c=$.current)==null||c.dispose(),$.current=(p=s.current)==null?void 0:p.onDidChangeModelContent(j=>{R.current||A(s.current.getValue(),j)}))},[m,A]),a.useEffect(()=>{if(m){let c=y.current.editor.onDidChangeMarkers(p=>{var V;let j=(V=s.current.getModel())==null?void 0:V.uri;if(j&&p.find(L=>L.path===j.path)){let L=y.current.editor.getModelMarkers({resource:j});I==null||I(L)}});return()=>{c==null||c.dispose()}}return()=>{}},[m,I]);function ye(){var c,p;(c=$.current)==null||c.dispose(),Y?M&&k.set(i,s.current.saveViewState()):(p=s.current.getModel())==null||p.dispose(),s.current.dispose()}return a.createElement(ve,{width:_,height:J,isEditorReady:m,loading:g,_ref:x,className:Q,wrapperProps:X})}var Et=Pt,Ct=a.memo(Et),It=Ct;function xt({code:e,onCopy:t,language:r="javascript",onDownload:n,downloadText:o="Download"}){const[i,l]=a.useState(!1),[f,g]=a.useState(e),h=()=>{t(f),l(!0),setTimeout(()=>{l(!1)},2e3)},S=()=>{n(f)};return P.jsxs("div",{className:"flex flex-col gap-4",children:[P.jsx("div",{className:"h-[500px] max-h-full overflow-hidden rounded-md border py-2",children:P.jsx(It,{height:"100%",defaultLanguage:r,language:r,value:f,onChange:M=>g(M||""),theme:"vs-light",options:{minimap:{enabled:!1},fontSize:12,lineNumbers:"off",roundedSelection:!1,scrollBeyondLastLine:!1,automaticLayout:!0,tabSize:2,insertSpaces:!0,wordWrap:"on",bracketPairColorization:{enabled:!0},suggest:{showKeywords:!1,showSnippets:!1}}})}),P.jsxs("div",{className:"flex justify-end gap-2",children:[P.jsxs(oe.Button,{type:"button",variant:"outline",onClick:h,children:[i?P.jsx(ee.CheckIcon,{className:"text-green-500"}):P.jsx(ee.CopyIcon,{})," ",i?"Copied":"Copy"]}),P.jsxs(oe.Button,{type:"button",onClick:S,children:[P.jsx(ee.DownloadIcon,{})," ",o]})]})]})}exports.default=xt;