superleap-code-editor 1.0.4 → 1.0.5

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.
@@ -2,6 +2,7 @@ import React from "react";
2
2
  interface SidebarProps {
3
3
  activePanel: string;
4
4
  setActivePanel: (panel: string) => void;
5
+ allowedRoutes?: string[];
5
6
  }
6
7
  export declare const Sidebar: React.FC<SidebarProps>;
7
8
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"sidebar.d.ts","sourceRoot":"","sources":["../../../src/components/layout/sidebar.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,UAAU,YAAY;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,cAAc,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACzC;AACD,eAAO,MAAM,OAAO,EAAE,KAAK,CAAC,EAAE,CAAC,YAAY,CAoD1C,CAAC"}
1
+ {"version":3,"file":"sidebar.d.ts","sourceRoot":"","sources":["../../../src/components/layout/sidebar.tsx"],"names":[],"mappings":"AASA,OAAO,KAAkB,MAAM,OAAO,CAAC;AACvC,UAAU,YAAY;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,cAAc,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;CAC1B;AA4BD,eAAO,MAAM,OAAO,EAAE,KAAK,CAAC,EAAE,CAAC,YAAY,CA8B1C,CAAC"}
package/dist/index.cjs.js CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const w=require("react"),Er=require("@monaco-editor/react"),E=require("antd"),S=require("@tabler/icons-react");var q={exports:{}},L={};/**
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const E=require("react"),jt=require("@monaco-editor/react"),w=require("antd"),h=require("@tabler/icons-react");var q={exports:{}},L={};/**
2
2
  * @license React
3
3
  * react-jsx-runtime.production.min.js
4
4
  *
@@ -6,7 +6,7 @@
6
6
  *
7
7
  * This source code is licensed under the MIT license found in the
8
8
  * LICENSE file in the root directory of this source tree.
9
- */var Se;function jr(){if(Se)return L;Se=1;var s=w,t=Symbol.for("react.element"),i=Symbol.for("react.fragment"),a=Object.prototype.hasOwnProperty,d=s.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,x={key:!0,ref:!0,__self:!0,__source:!0};function j(F,m,T){var u,R={},C=null,k=null;T!==void 0&&(C=""+T),m.key!==void 0&&(C=""+m.key),m.ref!==void 0&&(k=m.ref);for(u in m)a.call(m,u)&&!x.hasOwnProperty(u)&&(R[u]=m[u]);if(F&&F.defaultProps)for(u in m=F.defaultProps,m)R[u]===void 0&&(R[u]=m[u]);return{$$typeof:t,type:F,key:C,ref:k,props:R,_owner:d.current}}return L.Fragment=i,L.jsx=j,L.jsxs=j,L}var W={};/**
9
+ */var Se;function Et(){if(Se)return L;Se=1;var o=E,r=Symbol.for("react.element"),a=Symbol.for("react.fragment"),i=Object.prototype.hasOwnProperty,c=o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,g={key:!0,ref:!0,__self:!0,__source:!0};function N(C,v,R){var d,F={},S=null,O=null;R!==void 0&&(S=""+R),v.key!==void 0&&(S=""+v.key),v.ref!==void 0&&(O=v.ref);for(d in v)i.call(v,d)&&!g.hasOwnProperty(d)&&(F[d]=v[d]);if(C&&C.defaultProps)for(d in v=C.defaultProps,v)F[d]===void 0&&(F[d]=v[d]);return{$$typeof:r,type:C,key:S,ref:O,props:F,_owner:c.current}}return L.Fragment=a,L.jsx=N,L.jsxs=N,L}var $={};/**
10
10
  * @license React
11
11
  * react-jsx-runtime.development.js
12
12
  *
@@ -14,12 +14,41 @@
14
14
  *
15
15
  * This source code is licensed under the MIT license found in the
16
16
  * LICENSE file in the root directory of this source tree.
17
- */var Te;function Fr(){return Te||(Te=1,process.env.NODE_ENV!=="production"&&(function(){var s=w,t=Symbol.for("react.element"),i=Symbol.for("react.portal"),a=Symbol.for("react.fragment"),d=Symbol.for("react.strict_mode"),x=Symbol.for("react.profiler"),j=Symbol.for("react.provider"),F=Symbol.for("react.context"),m=Symbol.for("react.forward_ref"),T=Symbol.for("react.suspense"),u=Symbol.for("react.suspense_list"),R=Symbol.for("react.memo"),C=Symbol.for("react.lazy"),k=Symbol.for("react.offscreen"),z=Symbol.iterator,J="@@iterator";function G(e){if(e===null||typeof e!="object")return null;var r=z&&e[z]||e[J];return typeof r=="function"?r:null}var g=s.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function h(e){{for(var r=arguments.length,n=new Array(r>1?r-1:0),l=1;l<r;l++)n[l-1]=arguments[l];Me("error",e,n)}}function Me(e,r,n){{var l=g.ReactDebugCurrentFrame,v=l.getStackAddendum();v!==""&&(r+="%s",n=n.concat([v]));var p=n.map(function(f){return String(f)});p.unshift("Warning: "+r),Function.prototype.apply.call(console[e],console,p)}}var Ye=!1,Ve=!1,Ue=!1,qe=!1,He=!1,ne;ne=Symbol.for("react.module.reference");function Je(e){return!!(typeof e=="string"||typeof e=="function"||e===a||e===x||He||e===d||e===T||e===u||qe||e===k||Ye||Ve||Ue||typeof e=="object"&&e!==null&&(e.$$typeof===C||e.$$typeof===R||e.$$typeof===j||e.$$typeof===F||e.$$typeof===m||e.$$typeof===ne||e.getModuleId!==void 0))}function Ge(e,r,n){var l=e.displayName;if(l)return l;var v=r.displayName||r.name||"";return v!==""?n+"("+v+")":n}function ie(e){return e.displayName||"Context"}function N(e){if(e==null)return null;if(typeof e.tag=="number"&&h("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case a:return"Fragment";case i:return"Portal";case x:return"Profiler";case d:return"StrictMode";case T:return"Suspense";case u:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case F:var r=e;return ie(r)+".Consumer";case j:var n=e;return ie(n._context)+".Provider";case m:return Ge(e,e.render,"ForwardRef");case R:var l=e.displayName||null;return l!==null?l:N(e.type)||"Memo";case C:{var v=e,p=v._payload,f=v._init;try{return N(f(p))}catch{return null}}}return null}var I=Object.assign,$=0,ae,oe,se,le,ce,ue,fe;function de(){}de.__reactDisabledLog=!0;function Ke(){{if($===0){ae=console.log,oe=console.info,se=console.warn,le=console.error,ce=console.group,ue=console.groupCollapsed,fe=console.groupEnd;var e={configurable:!0,enumerable:!0,value:de,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}$++}}function Xe(){{if($--,$===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:I({},e,{value:ae}),info:I({},e,{value:oe}),warn:I({},e,{value:se}),error:I({},e,{value:le}),group:I({},e,{value:ce}),groupCollapsed:I({},e,{value:ue}),groupEnd:I({},e,{value:fe})})}$<0&&h("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var K=g.ReactCurrentDispatcher,X;function B(e,r,n){{if(X===void 0)try{throw Error()}catch(v){var l=v.stack.trim().match(/\n( *(at )?)/);X=l&&l[1]||""}return`
18
- `+X+e}}var Z=!1,M;{var Ze=typeof WeakMap=="function"?WeakMap:Map;M=new Ze}function ve(e,r){if(!e||Z)return"";{var n=M.get(e);if(n!==void 0)return n}var l;Z=!0;var v=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var p;p=K.current,K.current=null,Ke();try{if(r){var f=function(){throw Error()};if(Object.defineProperty(f.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(f,[])}catch(O){l=O}Reflect.construct(e,[],f)}else{try{f.call()}catch(O){l=O}e.call(f.prototype)}}else{try{throw Error()}catch(O){l=O}e()}}catch(O){if(O&&l&&typeof O.stack=="string"){for(var c=O.stack.split(`
17
+ */var _e;function wt(){return _e||(_e=1,process.env.NODE_ENV!=="production"&&(function(){var o=E,r=Symbol.for("react.element"),a=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),c=Symbol.for("react.strict_mode"),g=Symbol.for("react.profiler"),N=Symbol.for("react.provider"),C=Symbol.for("react.context"),v=Symbol.for("react.forward_ref"),R=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),F=Symbol.for("react.memo"),S=Symbol.for("react.lazy"),O=Symbol.for("react.offscreen"),M=Symbol.iterator,J="@@iterator";function G(e){if(e===null||typeof e!="object")return null;var n=M&&e[M]||e[J];return typeof n=="function"?n:null}var b=o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function p(e){{for(var n=arguments.length,s=new Array(n>1?n-1:0),l=1;l<n;l++)s[l-1]=arguments[l];We("error",e,s)}}function We(e,n,s){{var l=b.ReactDebugCurrentFrame,m=l.getStackAddendum();m!==""&&(n+="%s",s=s.concat([m]));var x=s.map(function(f){return String(f)});x.unshift("Warning: "+n),Function.prototype.apply.call(console[e],console,x)}}var Ve=!1,Ye=!1,Ue=!1,qe=!1,He=!1,ne;ne=Symbol.for("react.module.reference");function Je(e){return!!(typeof e=="string"||typeof e=="function"||e===i||e===g||He||e===c||e===R||e===d||qe||e===O||Ve||Ye||Ue||typeof e=="object"&&e!==null&&(e.$$typeof===S||e.$$typeof===F||e.$$typeof===N||e.$$typeof===C||e.$$typeof===v||e.$$typeof===ne||e.getModuleId!==void 0))}function Ge(e,n,s){var l=e.displayName;if(l)return l;var m=n.displayName||n.name||"";return m!==""?s+"("+m+")":s}function ae(e){return e.displayName||"Context"}function I(e){if(e==null)return null;if(typeof e.tag=="number"&&p("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case i:return"Fragment";case a:return"Portal";case g:return"Profiler";case c:return"StrictMode";case R:return"Suspense";case d:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case C:var n=e;return ae(n)+".Consumer";case N:var s=e;return ae(s._context)+".Provider";case v:return Ge(e,e.render,"ForwardRef");case F:var l=e.displayName||null;return l!==null?l:I(e.type)||"Memo";case S:{var m=e,x=m._payload,f=m._init;try{return I(f(x))}catch{return null}}}return null}var k=Object.assign,z=0,se,ie,oe,le,ce,de,ue;function fe(){}fe.__reactDisabledLog=!0;function Ke(){{if(z===0){se=console.log,ie=console.info,oe=console.warn,le=console.error,ce=console.group,de=console.groupCollapsed,ue=console.groupEnd;var e={configurable:!0,enumerable:!0,value:fe,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}z++}}function Xe(){{if(z--,z===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:k({},e,{value:se}),info:k({},e,{value:ie}),warn:k({},e,{value:oe}),error:k({},e,{value:le}),group:k({},e,{value:ce}),groupCollapsed:k({},e,{value:de}),groupEnd:k({},e,{value:ue})})}z<0&&p("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var K=b.ReactCurrentDispatcher,X;function B(e,n,s){{if(X===void 0)try{throw Error()}catch(m){var l=m.stack.trim().match(/\n( *(at )?)/);X=l&&l[1]||""}return`
18
+ `+X+e}}var Z=!1,W;{var Ze=typeof WeakMap=="function"?WeakMap:Map;W=new Ze}function me(e,n){if(!e||Z)return"";{var s=W.get(e);if(s!==void 0)return s}var l;Z=!0;var m=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var x;x=K.current,K.current=null,Ke();try{if(n){var f=function(){throw Error()};if(Object.defineProperty(f.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(f,[])}catch(P){l=P}Reflect.construct(e,[],f)}else{try{f.call()}catch(P){l=P}e.call(f.prototype)}}else{try{throw Error()}catch(P){l=P}e()}}catch(P){if(P&&l&&typeof P.stack=="string"){for(var u=P.stack.split(`
19
19
  `),_=l.stack.split(`
20
- `),y=c.length-1,b=_.length-1;y>=1&&b>=0&&c[y]!==_[b];)b--;for(;y>=1&&b>=0;y--,b--)if(c[y]!==_[b]){if(y!==1||b!==1)do if(y--,b--,b<0||c[y]!==_[b]){var P=`
21
- `+c[y].replace(" at new "," at ");return e.displayName&&P.includes("<anonymous>")&&(P=P.replace("<anonymous>",e.displayName)),typeof e=="function"&&M.set(e,P),P}while(y>=1&&b>=0);break}}}finally{Z=!1,K.current=p,Xe(),Error.prepareStackTrace=v}var A=e?e.displayName||e.name:"",_e=A?B(A):"";return typeof e=="function"&&M.set(e,_e),_e}function Qe(e,r,n){return ve(e,!1)}function er(e){var r=e.prototype;return!!(r&&r.isReactComponent)}function Y(e,r,n){if(e==null)return"";if(typeof e=="function")return ve(e,er(e));if(typeof e=="string")return B(e);switch(e){case T:return B("Suspense");case u:return B("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case m:return Qe(e.render);case R:return Y(e.type,r,n);case C:{var l=e,v=l._payload,p=l._init;try{return Y(p(v),r,n)}catch{}}}return""}var V=Object.prototype.hasOwnProperty,he={},pe=g.ReactDebugCurrentFrame;function U(e){if(e){var r=e._owner,n=Y(e.type,e._source,r?r.type:null);pe.setExtraStackFrame(n)}else pe.setExtraStackFrame(null)}function rr(e,r,n,l,v){{var p=Function.call.bind(V);for(var f in e)if(p(e,f)){var c=void 0;try{if(typeof e[f]!="function"){var _=Error((l||"React class")+": "+n+" type `"+f+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[f]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw _.name="Invariant Violation",_}c=e[f](r,f,l,n,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(y){c=y}c&&!(c instanceof Error)&&(U(v),h("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",l||"React class",n,f,typeof c),U(null)),c instanceof Error&&!(c.message in he)&&(he[c.message]=!0,U(v),h("Failed %s type: %s",n,c.message),U(null))}}}var tr=Array.isArray;function Q(e){return tr(e)}function nr(e){{var r=typeof Symbol=="function"&&Symbol.toStringTag,n=r&&e[Symbol.toStringTag]||e.constructor.name||"Object";return n}}function ir(e){try{return me(e),!1}catch{return!0}}function me(e){return""+e}function ge(e){if(ir(e))return h("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",nr(e)),me(e)}var ye=g.ReactCurrentOwner,ar={key:!0,ref:!0,__self:!0,__source:!0},be,xe;function or(e){if(V.call(e,"ref")){var r=Object.getOwnPropertyDescriptor(e,"ref").get;if(r&&r.isReactWarning)return!1}return e.ref!==void 0}function sr(e){if(V.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return!1}return e.key!==void 0}function lr(e,r){typeof e.ref=="string"&&ye.current}function cr(e,r){{var n=function(){be||(be=!0,h("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",r))};n.isReactWarning=!0,Object.defineProperty(e,"key",{get:n,configurable:!0})}}function ur(e,r){{var n=function(){xe||(xe=!0,h("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",r))};n.isReactWarning=!0,Object.defineProperty(e,"ref",{get:n,configurable:!0})}}var fr=function(e,r,n,l,v,p,f){var c={$$typeof:t,type:e,key:r,ref:n,props:f,_owner:p};return c._store={},Object.defineProperty(c._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(c,"_self",{configurable:!1,enumerable:!1,writable:!1,value:l}),Object.defineProperty(c,"_source",{configurable:!1,enumerable:!1,writable:!1,value:v}),Object.freeze&&(Object.freeze(c.props),Object.freeze(c)),c};function dr(e,r,n,l,v){{var p,f={},c=null,_=null;n!==void 0&&(ge(n),c=""+n),sr(r)&&(ge(r.key),c=""+r.key),or(r)&&(_=r.ref,lr(r,v));for(p in r)V.call(r,p)&&!ar.hasOwnProperty(p)&&(f[p]=r[p]);if(e&&e.defaultProps){var y=e.defaultProps;for(p in y)f[p]===void 0&&(f[p]=y[p])}if(c||_){var b=typeof e=="function"?e.displayName||e.name||"Unknown":e;c&&cr(f,b),_&&ur(f,b)}return fr(e,c,_,v,l,ye.current,f)}}var ee=g.ReactCurrentOwner,Ee=g.ReactDebugCurrentFrame;function D(e){if(e){var r=e._owner,n=Y(e.type,e._source,r?r.type:null);Ee.setExtraStackFrame(n)}else Ee.setExtraStackFrame(null)}var re;re=!1;function te(e){return typeof e=="object"&&e!==null&&e.$$typeof===t}function je(){{if(ee.current){var e=N(ee.current.type);if(e)return`
20
+ `),y=u.length-1,j=_.length-1;y>=1&&j>=0&&u[y]!==_[j];)j--;for(;y>=1&&j>=0;y--,j--)if(u[y]!==_[j]){if(y!==1||j!==1)do if(y--,j--,j<0||u[y]!==_[j]){var T=`
21
+ `+u[y].replace(" at new "," at ");return e.displayName&&T.includes("<anonymous>")&&(T=T.replace("<anonymous>",e.displayName)),typeof e=="function"&&W.set(e,T),T}while(y>=1&&j>=0);break}}}finally{Z=!1,K.current=x,Xe(),Error.prepareStackTrace=m}var A=e?e.displayName||e.name:"",Re=A?B(A):"";return typeof e=="function"&&W.set(e,Re),Re}function Qe(e,n,s){return me(e,!1)}function et(e){var n=e.prototype;return!!(n&&n.isReactComponent)}function V(e,n,s){if(e==null)return"";if(typeof e=="function")return me(e,et(e));if(typeof e=="string")return B(e);switch(e){case R:return B("Suspense");case d:return B("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case v:return Qe(e.render);case F:return V(e.type,n,s);case S:{var l=e,m=l._payload,x=l._init;try{return V(x(m),n,s)}catch{}}}return""}var Y=Object.prototype.hasOwnProperty,he={},pe=b.ReactDebugCurrentFrame;function U(e){if(e){var n=e._owner,s=V(e.type,e._source,n?n.type:null);pe.setExtraStackFrame(s)}else pe.setExtraStackFrame(null)}function tt(e,n,s,l,m){{var x=Function.call.bind(Y);for(var f in e)if(x(e,f)){var u=void 0;try{if(typeof e[f]!="function"){var _=Error((l||"React class")+": "+s+" type `"+f+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[f]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw _.name="Invariant Violation",_}u=e[f](n,f,l,s,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(y){u=y}u&&!(u instanceof Error)&&(U(m),p("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",l||"React class",s,f,typeof u),U(null)),u instanceof Error&&!(u.message in he)&&(he[u.message]=!0,U(m),p("Failed %s type: %s",s,u.message),U(null))}}}var rt=Array.isArray;function Q(e){return rt(e)}function nt(e){{var n=typeof Symbol=="function"&&Symbol.toStringTag,s=n&&e[Symbol.toStringTag]||e.constructor.name||"Object";return s}}function at(e){try{return xe(e),!1}catch{return!0}}function xe(e){return""+e}function ve(e){if(at(e))return p("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",nt(e)),xe(e)}var be=b.ReactCurrentOwner,st={key:!0,ref:!0,__self:!0,__source:!0},ge,ye;function it(e){if(Y.call(e,"ref")){var n=Object.getOwnPropertyDescriptor(e,"ref").get;if(n&&n.isReactWarning)return!1}return e.ref!==void 0}function ot(e){if(Y.call(e,"key")){var n=Object.getOwnPropertyDescriptor(e,"key").get;if(n&&n.isReactWarning)return!1}return e.key!==void 0}function lt(e,n){typeof e.ref=="string"&&be.current}function ct(e,n){{var s=function(){ge||(ge=!0,p("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",n))};s.isReactWarning=!0,Object.defineProperty(e,"key",{get:s,configurable:!0})}}function dt(e,n){{var s=function(){ye||(ye=!0,p("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",n))};s.isReactWarning=!0,Object.defineProperty(e,"ref",{get:s,configurable:!0})}}var ut=function(e,n,s,l,m,x,f){var u={$$typeof:r,type:e,key:n,ref:s,props:f,_owner:x};return u._store={},Object.defineProperty(u._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(u,"_self",{configurable:!1,enumerable:!1,writable:!1,value:l}),Object.defineProperty(u,"_source",{configurable:!1,enumerable:!1,writable:!1,value:m}),Object.freeze&&(Object.freeze(u.props),Object.freeze(u)),u};function ft(e,n,s,l,m){{var x,f={},u=null,_=null;s!==void 0&&(ve(s),u=""+s),ot(n)&&(ve(n.key),u=""+n.key),it(n)&&(_=n.ref,lt(n,m));for(x in n)Y.call(n,x)&&!st.hasOwnProperty(x)&&(f[x]=n[x]);if(e&&e.defaultProps){var y=e.defaultProps;for(x in y)f[x]===void 0&&(f[x]=y[x])}if(u||_){var j=typeof e=="function"?e.displayName||e.name||"Unknown":e;u&&ct(f,j),_&&dt(f,j)}return ut(e,u,_,m,l,be.current,f)}}var ee=b.ReactCurrentOwner,je=b.ReactDebugCurrentFrame;function D(e){if(e){var n=e._owner,s=V(e.type,e._source,n?n.type:null);je.setExtraStackFrame(s)}else je.setExtraStackFrame(null)}var te;te=!1;function re(e){return typeof e=="object"&&e!==null&&e.$$typeof===r}function Ee(){{if(ee.current){var e=I(ee.current.type);if(e)return`
22
22
 
23
- Check the render method of \``+e+"`."}return""}}function vr(e){return""}var Fe={};function hr(e){{var r=je();if(!r){var n=typeof e=="string"?e:e.displayName||e.name;n&&(r=`
23
+ Check the render method of \``+e+"`."}return""}}function mt(e){return""}var we={};function ht(e){{var n=Ee();if(!n){var s=typeof e=="string"?e:e.displayName||e.name;s&&(n=`
24
24
 
25
- Check the top-level render call using <`+n+">.")}return r}}function Re(e,r){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var n=hr(r);if(Fe[n])return;Fe[n]=!0;var l="";e&&e._owner&&e._owner!==ee.current&&(l=" It was passed a child from "+N(e._owner.type)+"."),D(e),h('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',n,l),D(null)}}function we(e,r){{if(typeof e!="object")return;if(Q(e))for(var n=0;n<e.length;n++){var l=e[n];te(l)&&Re(l,r)}else if(te(e))e._store&&(e._store.validated=!0);else if(e){var v=G(e);if(typeof v=="function"&&v!==e.entries)for(var p=v.call(e),f;!(f=p.next()).done;)te(f.value)&&Re(f.value,r)}}}function pr(e){{var r=e.type;if(r==null||typeof r=="string")return;var n;if(typeof r=="function")n=r.propTypes;else if(typeof r=="object"&&(r.$$typeof===m||r.$$typeof===R))n=r.propTypes;else return;if(n){var l=N(r);rr(n,e.props,"prop",l,e)}else if(r.PropTypes!==void 0&&!re){re=!0;var v=N(r);h("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",v||"Unknown")}typeof r.getDefaultProps=="function"&&!r.getDefaultProps.isReactClassApproved&&h("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function mr(e){{for(var r=Object.keys(e.props),n=0;n<r.length;n++){var l=r[n];if(l!=="children"&&l!=="key"){D(e),h("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",l),D(null);break}}e.ref!==null&&(D(e),h("Invalid attribute `ref` supplied to `React.Fragment`."),D(null))}}function Ce(e,r,n,l,v,p){{var f=Je(e);if(!f){var c="";(e===void 0||typeof e=="object"&&e!==null&&Object.keys(e).length===0)&&(c+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var _=vr();_?c+=_:c+=je();var y;e===null?y="null":Q(e)?y="array":e!==void 0&&e.$$typeof===t?(y="<"+(N(e.type)||"Unknown")+" />",c=" Did you accidentally export a JSX literal instead of a component?"):y=typeof e,h("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",y,c)}var b=dr(e,r,n,v,p);if(b==null)return b;if(f){var P=r.children;if(P!==void 0)if(l)if(Q(P)){for(var A=0;A<P.length;A++)we(P[A],e);Object.freeze&&Object.freeze(P)}else h("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else we(P,e)}return e===a?mr(b):pr(b),b}}function gr(e,r,n){return Ce(e,r,n,!0)}function yr(e,r,n){return Ce(e,r,n,!1)}var br=yr,xr=gr;W.Fragment=a,W.jsx=br,W.jsxs=xr})()),W}var Pe;function Rr(){return Pe||(Pe=1,process.env.NODE_ENV==="production"?q.exports=jr():q.exports=Fr()),q.exports}var o=Rr();function Oe(s){const[t,i]=w.useState([]),[a,d]=w.useState(null),[x,j]=w.useState(""),[F,m]=w.useState(!1),[T,u]=w.useState(null),R=w.useCallback(async()=>{try{m(!0),u(null);const g=await s.getFiles();if(i(g),!a&&g.length>0){const h=ke(g);h&&d(h.id)}}catch(g){u(g instanceof Error?g.message:"Failed to load files")}finally{m(!1)}},[s,a]),C=w.useCallback(async g=>{try{m(!0),u(null);const h=await s.getFileContent(g);j(h)}catch(h){u(h instanceof Error?h.message:"Failed to load file content"),j("")}finally{m(!1)}},[s]),k=w.useCallback(async g=>{if(a)try{u(null),await s.updateFileContent(a,g),j(g),i(h=>Ie(h,a,{content:g}))}catch(h){u(h instanceof Error?h.message:"Failed to update file content")}},[a,s]),z=w.useCallback(g=>{d(g),C(g)},[C]),J=w.useCallback(()=>{R()},[R]),G=w.useCallback(g=>Ne(t,g),[t]);return w.useEffect(()=>{R()},[R]),w.useEffect(()=>{a&&C(a)},[a,C]),{files:t,activeFile:a,fileContent:x,loading:F,error:T,setActiveFile:z,updateFileContent:k,refreshFiles:J,getFileById:G}}function ke(s){for(const t of s){if(t.type==="file")return t;if(t.children){const i=ke(t.children);if(i)return i}}return null}function Ne(s,t){for(const i of s){if(i.id===t)return i;if(i.children){const a=Ne(i.children,t);if(a)return a}}return null}function Ie(s,t,i){return s.map(a=>a.id===t?{...a,...i}:a.children?{...a,children:Ie(a.children,t,i)}:a)}class De{config;files=[];constructor(t){this.config=t}async getFiles(){return this.files.length===0&&await this.loadFiles(),this.files}async getFileContent(t){if(t==="main-function")return await this.config.fetchFunction(this.config.functionId,this.config.version);throw new Error(`File ${t} not found`)}async updateFileContent(t,i){const a=this.findFileById(t);a&&(a.content=i),console.log(`Updated file ${t} with content:`,i)}async getFileMetadata(t){return this.findFileById(t)?.metadata||{}}async loadFiles(){this.files=[{id:"main-function",name:"function.js",type:"file",path:"/function.js",metadata:{language:"javascript",lastModified:new Date}},{id:"versions",name:"versions",type:"folder",path:"/versions",children:this.config.versionList.map(t=>({id:`version-${t}`,name:`v${t}.js`,type:"file",path:`/versions/v${t}.js`,metadata:{language:"javascript"}}))}]}findFileById(t){const i=a=>{for(const d of a){if(d.id===t)return d;if(d.children){const x=i(d.children);if(x)return x}}return null};return i(this.files)}}class Ae{config;files=[];constructor(t){this.config=t,this.initializeFiles()}async getFiles(){return this.files}async getFileContent(t){if(t==="form-code")return this.config.codeContent;throw new Error(`File ${t} not found`)}async updateFileContent(t,i){if(t==="form-code"){this.config.codeContent=i;const a=this.files.find(d=>d.id===t);a&&(a.content=i)}}async getFileMetadata(t){return this.findFileById(t)?.metadata||{}}initializeFiles(){this.files=[{id:"form-code",name:this.config.fileName||"code.js",type:"file",path:`/${this.config.fileName||"code.js"}`,content:this.config.codeContent,metadata:{language:this.config.language||"javascript",lastModified:new Date}}]}findFileById(t){return this.files.find(i=>i.id===t)||null}}class $e{config;files=[];constructor(t){this.config=t,this.initializeFiles()}async getFiles(){return this.files}async getFileContent(t){const i=this.findFileById(t);if(!i||!i.metadata?.url)throw new Error(`File ${t} not found`);try{const a=await fetch(i.metadata.url);if(!a.ok)throw new Error(`Failed to fetch file: ${a.statusText}`);return await a.text()}catch(a){throw new Error(`Error fetching file content: ${a}`)}}async updateFileContent(t,i){console.log(`Would save file ${t} content to backend:`,i);const a=this.findFileById(t);a&&(a.content=i)}async getFileMetadata(t){return this.findFileById(t)?.metadata||{}}initializeFiles(){this.files=this.config.fileUrls.map((t,i)=>({id:`url-file-${i}`,name:t.name,type:"file",path:`/${t.name}`,metadata:{language:t.type,url:t.url,lastModified:new Date}}))}findFileById(t){return this.files.find(i=>i.id===t)||null}}function Le(s){if(s.workflowConfig)return new De(s.workflowConfig);if(s.formConfig)return new Ae(s.formConfig);if(s.urlConfig)return new $e(s.urlConfig);throw new Error("No valid configuration provided")}const We=({value:s,onChange:t,language:i="javascript",filename:a,readOnly:d=!1,loading:x=!1})=>{const j=F=>{F!==void 0&&t(F)};return o.jsx("div",{className:"h-full w-full",children:o.jsx(Er,{height:"100%",defaultLanguage:i,defaultValue:s,onChange:j,theme:"vs-light",options:{minimap:{enabled:!1},fontSize:14,wordWrap:"on",automaticLayout:!0,padding:{top:16},scrollBeyondLastLine:!1,readOnly:d}})})},wr=({activePanel:s,setActivePanel:t})=>{const i=[{id:"explorer",icon:S.IconFolderOpen,label:"Files"},{id:"data",icon:S.IconDatabase,label:"Data"},{id:"functions",icon:S.IconCode,label:"Functions"},{id:"versions",icon:S.IconHistory,label:"Versions"},{id:"tests",icon:S.IconFlask,label:"Tests"}];return o.jsxs("div",{className:"w-14 border-r border-slate-200 bg-white flex flex-col gap-4 items-center py-4",children:[i.map(a=>{const d=a.icon;return o.jsx(E.Tooltip,{title:a.label,placement:"right",children:o.jsx(E.Button,{type:s===a.id?"primary":"text",icon:o.jsx(d,{size:16}),onClick:()=>t(a.id)})},a.id)}),o.jsx("div",{className:"mt-auto",children:o.jsx(E.Tooltip,{title:"Settings",placement:"right",children:o.jsx(E.Button,{type:"text",icon:o.jsx(S.IconSettings,{size:20})})})})]})},ze=({leftPanel:s,editor:t,rightPanel:i,activePanel:a,setActivePanel:d})=>o.jsxs("div",{className:"flex flex-1 overflow-hidden",children:[o.jsx(wr,{activePanel:a,setActivePanel:d}),o.jsx("div",{className:"flex-1",children:i?o.jsxs(E.Splitter,{style:{height:"100%"},onResize:x=>console.log(x),children:[o.jsx(E.Splitter.Panel,{defaultSize:"25%",min:"15%",max:"40%",className:"bg-white border-r border-slate-200",collapsible:!0,children:o.jsx("div",{className:"h-full overflow-y-auto",children:s})}),o.jsx(E.Splitter.Panel,{defaultSize:"50%",min:"30%",children:t}),o.jsx(E.Splitter.Panel,{defaultSize:"25%",min:"20%",max:"50%",className:"bg-white border-l border-slate-200",children:o.jsx("div",{className:"h-full overflow-y-auto",children:i})})]}):o.jsxs(E.Splitter,{style:{height:"100%"},children:[o.jsx(E.Splitter.Panel,{defaultSize:"25%",min:"15%",max:"40%",className:"bg-white border-r border-slate-200",children:o.jsx("div",{className:"h-full overflow-y-auto",children:s})}),o.jsx(E.Splitter.Panel,{defaultSize:"75%",min:"60%",children:t})]})})]}),Be=({files:s,activeFile:t,onFileSelect:i,loading:a=!1,error:d=null,onRefresh:x})=>{const j=T=>T.map(u=>({title:u.name,key:u.id,icon:u.type==="file"?o.jsx(S.IconFile,{size:16,className:"text-slate-500 flex"}):o.jsx(S.IconFolderOpen,{size:16,className:"text-slate-500 flex"}),isLeaf:u.type==="file",children:u.children?j(u.children):void 0,metadata:u.metadata})),F=j(s),m=(T,u)=>{u?.node.isLeaf&&u.node.key&&i(u.node.key)};return o.jsxs("div",{className:"h-full",children:[o.jsxs("div",{className:"flex items-center justify-between p-4 border-b border-slate-200",children:[o.jsx("h2",{className:"font-medium text-sm",children:"Files"}),o.jsx("div",{className:"flex items-center gap-2",children:x&&o.jsx(E.Button,{type:"text",icon:o.jsx(S.IconPlus,{size:16}),onClick:x,loading:a,title:"Refresh files"})})]}),o.jsxs("div",{className:"p-2",children:[d&&o.jsx(E.Alert,{message:"Error loading files",description:d,type:"error",className:"mb-2"}),o.jsx(E.Tree,{treeData:F,onSelect:m,selectedKeys:t?[t]:[],showIcon:!0,defaultExpandAll:!0,showLine:!0,className:"file-explorer-tree"})]})]})},H=({config:s,rightPanel:t=!1})=>{const i=w.useMemo(()=>Le(s),[s]);console.log({config:s});const{files:a,activeFile:d,fileContent:x,loading:j,error:F,setActiveFile:m,updateFileContent:T,refreshFiles:u,getFileById:R}=Oe(i),C=d?R(d):null,k=C?.metadata?.language||"javascript";return o.jsx(ze,{leftPanel:o.jsx(Be,{files:a,activeFile:d,onFileSelect:m,loading:j,error:F,onRefresh:u}),editor:o.jsx(We,{value:x,onChange:T,language:k,filename:C?.name,readOnly:s.settings?.readOnly,loading:j}),rightPanel:t,activePanel:"explorer",setActivePanel:()=>{}})},Cr=({functionId:s,version:t,versionList:i,fetchFunction:a,fetchVersionList:d})=>{const x={workflowConfig:{functionId:s,version:t,versionList:i,fetchFunction:a,fetchVersionList:d}};return o.jsx(H,{config:x})},_r=({codeContent:s,fileName:t="code.js",language:i="javascript",readOnly:a=!1})=>{const d={formConfig:{codeContent:s,fileName:t,language:i},settings:{readOnly:a}};return o.jsx(H,{config:d})},Sr=({fileUrls:s,rightPanel:t})=>{const i={urlConfig:{fileUrls:s}};return o.jsx(H,{config:i,rightPanel:t})},Tr=({activeFile:s,showPreview:t,setShowPreview:i})=>o.jsxs("div",{className:"h-14 border-b border-slate-200 bg-white px-4 flex items-center justify-between",children:[o.jsxs("div",{className:"flex items-center",children:[o.jsx("h1",{className:"text-lg font-semibold text-slate-900 mr-4",children:"CRM Code Editor"}),o.jsx("span",{className:"text-sm text-slate-500 px-2 py-1 bg-slate-100 rounded-md",children:s})]}),o.jsxs("div",{className:"flex items-center space-x-2",children:[o.jsx("button",{className:"p-1.5 hover:bg-slate-100 rounded-md text-slate-600",onClick:()=>i(!t),title:t?"Hide Preview":"Show Preview",children:t?o.jsx(S.IconEyeOff,{size:18}):o.jsx(S.IconEye,{size:18})}),o.jsx("button",{className:"p-1.5 hover:bg-slate-100 rounded-md text-slate-600",title:"Version History",children:o.jsx(S.IconHistory,{size:18})}),o.jsx("button",{className:"p-1.5 hover:bg-slate-100 rounded-md text-slate-600",title:"Run Code",children:o.jsx(S.IconPlayerPlay,{size:18})}),o.jsx("button",{className:"p-1.5 hover:bg-slate-100 rounded-md text-slate-600",title:"Export",children:o.jsx(S.IconDownload,{size:18})}),o.jsxs("button",{className:"ml-2 px-3 py-1.5 bg-slate-900 text-white rounded-md flex items-center text-sm hover:bg-slate-800",children:[o.jsx(S.IconDeviceFloppy,{size:16,className:"mr-1.5"})," Save"]}),o.jsxs("div",{className:"ml-2 px-3 py-1.5 bg-emerald-100 text-emerald-800 rounded-md flex items-center text-sm",children:[o.jsx("span",{className:"w-2 h-2 bg-emerald-500 rounded-full mr-1.5"})," ","Draft"]})]})]}),Pr="1.0.0";Object.defineProperty(exports,"Alert",{enumerable:!0,get:()=>E.Alert});Object.defineProperty(exports,"Button",{enumerable:!0,get:()=>E.Button});Object.defineProperty(exports,"Splitter",{enumerable:!0,get:()=>E.Splitter});Object.defineProperty(exports,"Tooltip",{enumerable:!0,get:()=>E.Tooltip});Object.defineProperty(exports,"Tree",{enumerable:!0,get:()=>E.Tree});exports.CodeEditor=We;exports.CodeEditorWrapper=H;exports.EditorLayout=ze;exports.FileExplorer=Be;exports.FormCodeEditor=_r;exports.FormFileProvider=Ae;exports.Header=Tr;exports.URLCodeEditor=Sr;exports.URLFileProvider=$e;exports.VERSION=Pr;exports.WorkflowCodeEditor=Cr;exports.WorkflowFileProvider=De;exports.createFileProvider=Le;exports.useFileManager=Oe;
25
+ Check the top-level render call using <`+s+">.")}return n}}function Ne(e,n){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var s=ht(n);if(we[s])return;we[s]=!0;var l="";e&&e._owner&&e._owner!==ee.current&&(l=" It was passed a child from "+I(e._owner.type)+"."),D(e),p('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',s,l),D(null)}}function Ce(e,n){{if(typeof e!="object")return;if(Q(e))for(var s=0;s<e.length;s++){var l=e[s];re(l)&&Ne(l,n)}else if(re(e))e._store&&(e._store.validated=!0);else if(e){var m=G(e);if(typeof m=="function"&&m!==e.entries)for(var x=m.call(e),f;!(f=x.next()).done;)re(f.value)&&Ne(f.value,n)}}}function pt(e){{var n=e.type;if(n==null||typeof n=="string")return;var s;if(typeof n=="function")s=n.propTypes;else if(typeof n=="object"&&(n.$$typeof===v||n.$$typeof===F))s=n.propTypes;else return;if(s){var l=I(n);tt(s,e.props,"prop",l,e)}else if(n.PropTypes!==void 0&&!te){te=!0;var m=I(n);p("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",m||"Unknown")}typeof n.getDefaultProps=="function"&&!n.getDefaultProps.isReactClassApproved&&p("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function xt(e){{for(var n=Object.keys(e.props),s=0;s<n.length;s++){var l=n[s];if(l!=="children"&&l!=="key"){D(e),p("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",l),D(null);break}}e.ref!==null&&(D(e),p("Invalid attribute `ref` supplied to `React.Fragment`."),D(null))}}function Fe(e,n,s,l,m,x){{var f=Je(e);if(!f){var u="";(e===void 0||typeof e=="object"&&e!==null&&Object.keys(e).length===0)&&(u+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var _=mt();_?u+=_:u+=Ee();var y;e===null?y="null":Q(e)?y="array":e!==void 0&&e.$$typeof===r?(y="<"+(I(e.type)||"Unknown")+" />",u=" Did you accidentally export a JSX literal instead of a component?"):y=typeof e,p("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",y,u)}var j=ft(e,n,s,m,x);if(j==null)return j;if(f){var T=n.children;if(T!==void 0)if(l)if(Q(T)){for(var A=0;A<T.length;A++)Ce(T[A],e);Object.freeze&&Object.freeze(T)}else p("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else Ce(T,e)}return e===i?xt(j):pt(j),j}}function vt(e,n,s){return Fe(e,n,s,!0)}function bt(e,n,s){return Fe(e,n,s,!1)}var gt=bt,yt=vt;$.Fragment=i,$.jsx=gt,$.jsxs=yt})()),$}var Te;function Nt(){return Te||(Te=1,process.env.NODE_ENV==="production"?q.exports=Et():q.exports=wt()),q.exports}var t=Nt();function Pe(o){const[r,a]=E.useState([]),[i,c]=E.useState(null),[g,N]=E.useState(""),[C,v]=E.useState(!1),[R,d]=E.useState(null),F=E.useCallback(async()=>{try{v(!0),d(null);const b=await o.getFiles();if(a(b),!i&&b.length>0){const p=Oe(b);p&&c(p.id)}}catch(b){d(b instanceof Error?b.message:"Failed to load files")}finally{v(!1)}},[o,i]),S=E.useCallback(async b=>{try{v(!0),d(null);const p=await o.getFileContent(b);N(p)}catch(p){d(p instanceof Error?p.message:"Failed to load file content"),N("")}finally{v(!1)}},[o]),O=E.useCallback(async b=>{if(i)try{d(null),await o.updateFileContent(i,b),N(b),a(p=>ke(p,i,{content:b}))}catch(p){d(p instanceof Error?p.message:"Failed to update file content")}},[i,o]),M=E.useCallback(b=>{c(b),S(b)},[S]),J=E.useCallback(()=>{F()},[F]),G=E.useCallback(b=>Ie(r,b),[r]);return E.useEffect(()=>{F()},[F]),E.useEffect(()=>{i&&S(i)},[i,S]),{files:r,activeFile:i,fileContent:g,loading:C,error:R,setActiveFile:M,updateFileContent:O,refreshFiles:J,getFileById:G}}function Oe(o){for(const r of o){if(r.type==="file")return r;if(r.children){const a=Oe(r.children);if(a)return a}}return null}function Ie(o,r){for(const a of o){if(a.id===r)return a;if(a.children){const i=Ie(a.children,r);if(i)return i}}return null}function ke(o,r,a){return o.map(i=>i.id===r?{...i,...a}:i.children?{...i,children:ke(i.children,r,a)}:i)}class De{config;files=[];constructor(r){this.config=r}async getFiles(){return this.files.length===0&&await this.loadFiles(),this.files}async getFileContent(r){if(r==="main-function")return await this.config.fetchFunction(this.config.functionId,this.config.version);throw new Error(`File ${r} not found`)}async updateFileContent(r,a){const i=this.findFileById(r);i&&(i.content=a),console.log(`Updated file ${r} with content:`,a)}async getFileMetadata(r){return this.findFileById(r)?.metadata||{}}async loadFiles(){this.files=[{id:"main-function",name:"function.js",type:"file",path:"/function.js",metadata:{language:"javascript",lastModified:new Date}},{id:"versions",name:"versions",type:"folder",path:"/versions",children:this.config.versionList.map(r=>({id:`version-${r}`,name:`v${r}.js`,type:"file",path:`/versions/v${r}.js`,metadata:{language:"javascript"}}))}]}findFileById(r){const a=i=>{for(const c of i){if(c.id===r)return c;if(c.children){const g=a(c.children);if(g)return g}}return null};return a(this.files)}}class Ae{config;files=[];constructor(r){this.config=r,this.initializeFiles()}async getFiles(){return this.files}async getFileContent(r){if(r==="form-code")return this.config.codeContent;throw new Error(`File ${r} not found`)}async updateFileContent(r,a){if(r==="form-code"){this.config.codeContent=a;const i=this.files.find(c=>c.id===r);i&&(i.content=a)}}async getFileMetadata(r){return this.findFileById(r)?.metadata||{}}initializeFiles(){this.files=[{id:"form-code",name:this.config.fileName||"code.js",type:"file",path:`/${this.config.fileName||"code.js"}`,content:this.config.codeContent,metadata:{language:this.config.language||"javascript",lastModified:new Date}}]}findFileById(r){return this.files.find(a=>a.id===r)||null}}class ze{config;files=[];constructor(r){this.config=r,this.initializeFiles()}async getFiles(){return this.files}async getFileContent(r){const a=this.findFileById(r);if(!a||!a.metadata?.url)throw new Error(`File ${r} not found`);try{const i=await fetch(a.metadata.url);if(!i.ok)throw new Error(`Failed to fetch file: ${i.statusText}`);return await i.text()}catch(i){throw new Error(`Error fetching file content: ${i}`)}}async updateFileContent(r,a){console.log(`Would save file ${r} content to backend:`,a);const i=this.findFileById(r);i&&(i.content=a)}async getFileMetadata(r){return this.findFileById(r)?.metadata||{}}initializeFiles(){this.files=this.config.fileUrls.map((r,a)=>({id:`url-file-${a}`,name:r.name,type:"file",path:`/${r.name}`,metadata:{language:r.type,url:r.url,lastModified:new Date}}))}findFileById(r){return this.files.find(a=>a.id===r)||null}}function Le(o){if(o.workflowConfig)return new De(o.workflowConfig);if(o.formConfig)return new Ae(o.formConfig);if(o.urlConfig)return new ze(o.urlConfig);throw new Error("No valid configuration provided")}const $e=({value:o,onChange:r,language:a="javascript",filename:i,readOnly:c=!1,loading:g=!1})=>{const N=C=>{C!==void 0&&r(C)};return t.jsx("div",{className:"h-full w-full",children:t.jsx(jt,{height:"100%",defaultLanguage:a,defaultValue:o,onChange:N,theme:"vs-light",options:{minimap:{enabled:!1},fontSize:14,wordWrap:"on",automaticLayout:!0,padding:{top:16},scrollBeyondLastLine:!1,readOnly:c}})})},Ct=[{id:"explorer",icon:h.IconFolderOpen,label:"Files"},{id:"data",icon:h.IconDatabase,label:"Data"},{id:"functions",icon:h.IconCode,label:"Functions"},{id:"versions",icon:h.IconHistory,label:"Versions"},{id:"tests",icon:h.IconFlask,label:"Tests"}],Ft=({activePanel:o,setActivePanel:r,allowedRoutes:a=["explorer"]})=>{const i=E.useMemo(()=>Ct.filter(c=>a.includes(c.id)),[a]);return t.jsxs("div",{className:"w-14 border-r border-slate-200 bg-white flex flex-col gap-4 items-center py-4",children:[i.map(c=>{const g=c.icon;return t.jsx(w.Tooltip,{title:c.label,placement:"right",children:t.jsx(w.Button,{type:o===c.id?"primary":"text",icon:t.jsx(g,{size:16}),onClick:()=>r(c.id)})},c.id)}),t.jsx("div",{className:"mt-auto",children:t.jsx(w.Tooltip,{title:"Settings",placement:"right",children:t.jsx(w.Button,{type:"text",icon:t.jsx(h.IconSettings,{size:20})})})})]})},Me=({leftPanel:o,editor:r,rightPanel:a,activePanel:i,setActivePanel:c})=>t.jsxs("div",{className:"flex flex-1 overflow-hidden",children:[t.jsx(Ft,{activePanel:i,setActivePanel:c}),t.jsx("div",{className:"flex-1",children:a?t.jsxs(w.Splitter,{style:{height:"100%"},onResize:g=>console.log(g),children:[t.jsx(w.Splitter.Panel,{defaultSize:"25%",min:"15%",max:"40%",className:"bg-white border-r border-slate-200",collapsible:!0,children:t.jsx("div",{className:"h-full overflow-y-auto",children:o})}),t.jsx(w.Splitter.Panel,{defaultSize:"50%",min:"30%",children:r}),t.jsx(w.Splitter.Panel,{defaultSize:"25%",min:"20%",max:"50%",className:"bg-white border-l border-slate-200",children:t.jsx("div",{className:"h-full overflow-y-auto",children:a})})]}):t.jsxs(w.Splitter,{style:{height:"100%"},children:[t.jsx(w.Splitter.Panel,{defaultSize:"25%",min:"15%",max:"40%",className:"bg-white border-r border-slate-200",children:t.jsx("div",{className:"h-full overflow-y-auto",children:o})}),t.jsx(w.Splitter.Panel,{defaultSize:"75%",min:"60%",children:r})]})})]}),Be=({files:o,activeFile:r,onFileSelect:a,loading:i=!1,error:c=null,onRefresh:g})=>{const N=R=>R.map(d=>({title:d.name,key:d.id,icon:d.type==="file"?t.jsx(h.IconFile,{size:16,className:"text-slate-500 flex"}):t.jsx(h.IconFolderOpen,{size:16,className:"text-slate-500 flex"}),isLeaf:d.type==="file",children:d.children?N(d.children):void 0,metadata:d.metadata})),C=N(o),v=(R,d)=>{d?.node.isLeaf&&d.node.key&&a(d.node.key)};return t.jsxs("div",{className:"h-full",children:[t.jsxs("div",{className:"flex items-center justify-between p-4 border-b border-slate-200",children:[t.jsx("h2",{className:"font-medium text-sm",children:"Files"}),t.jsx("div",{className:"flex items-center gap-2",children:g&&t.jsx(w.Button,{type:"text",icon:t.jsx(h.IconPlus,{size:16}),onClick:g,loading:i,title:"Refresh files"})})]}),t.jsxs("div",{className:"p-2",children:[c&&t.jsx(w.Alert,{message:"Error loading files",description:c,type:"error",className:"mb-2"}),t.jsx(w.Tree,{treeData:C,onSelect:v,selectedKeys:r?[r]:[],showIcon:!0,defaultExpandAll:!0,showLine:!0,className:"file-explorer-tree"})]})]})},H=({config:o,rightPanel:r=!1})=>{const a=E.useMemo(()=>Le(o),[o]);console.log({config:o});const{files:i,activeFile:c,fileContent:g,loading:N,error:C,setActiveFile:v,updateFileContent:R,refreshFiles:d,getFileById:F}=Pe(a),S=c?F(c):null,O=S?.metadata?.language||"javascript";return t.jsx(Me,{leftPanel:t.jsx(Be,{files:i,activeFile:c,onFileSelect:v,loading:N,error:C,onRefresh:d}),editor:t.jsx($e,{value:g,onChange:R,language:O,filename:S?.name,readOnly:o.settings?.readOnly,loading:N}),rightPanel:r,activePanel:"explorer",setActivePanel:()=>{}})},Rt=({functionId:o,version:r,versionList:a,fetchFunction:i,fetchVersionList:c})=>{const g={workflowConfig:{functionId:o,version:r,versionList:a,fetchFunction:i,fetchVersionList:c}};return t.jsx(H,{config:g})},St=({codeContent:o,fileName:r="code.js",language:a="javascript",readOnly:i=!1})=>{const c={formConfig:{codeContent:o,fileName:r,language:a},settings:{readOnly:i}};return t.jsx(H,{config:c})},_t=({fileUrls:o,rightPanel:r})=>{const a={urlConfig:{fileUrls:o}};return t.jsx(H,{config:a,rightPanel:r})},Tt=({activeFile:o,showPreview:r,setShowPreview:a})=>t.jsxs("div",{className:"h-14 border-b border-slate-200 bg-white px-4 flex items-center justify-between",children:[t.jsxs("div",{className:"flex items-center",children:[t.jsx("h1",{className:"text-lg font-semibold text-slate-900 mr-4",children:"CRM Code Editor"}),t.jsx("span",{className:"text-sm text-slate-500 px-2 py-1 bg-slate-100 rounded-md",children:o})]}),t.jsxs("div",{className:"flex items-center space-x-2",children:[t.jsx("button",{className:"p-1.5 hover:bg-slate-100 rounded-md text-slate-600",onClick:()=>a(!r),title:r?"Hide Preview":"Show Preview",children:r?t.jsx(h.IconEyeOff,{size:18}):t.jsx(h.IconEye,{size:18})}),t.jsx("button",{className:"p-1.5 hover:bg-slate-100 rounded-md text-slate-600",title:"Version History",children:t.jsx(h.IconHistory,{size:18})}),t.jsx("button",{className:"p-1.5 hover:bg-slate-100 rounded-md text-slate-600",title:"Run Code",children:t.jsx(h.IconPlayerPlay,{size:18})}),t.jsx("button",{className:"p-1.5 hover:bg-slate-100 rounded-md text-slate-600",title:"Export",children:t.jsx(h.IconDownload,{size:18})}),t.jsxs("button",{className:"ml-2 px-3 py-1.5 bg-slate-900 text-white rounded-md flex items-center text-sm hover:bg-slate-800",children:[t.jsx(h.IconDeviceFloppy,{size:16,className:"mr-1.5"})," Save"]}),t.jsxs("div",{className:"ml-2 px-3 py-1.5 bg-emerald-100 text-emerald-800 rounded-md flex items-center text-sm",children:[t.jsx("span",{className:"w-2 h-2 bg-emerald-500 rounded-full mr-1.5"})," ","Draft"]})]})]}),Pt=()=>{const o=[{name:"Lead",fields:["id","name","email","phone","status","createdAt"],expanded:!0},{name:"Contact",fields:["id","firstName","lastName","email","phone"],expanded:!1},{name:"Account",fields:["id","name","industry","website","employees"],expanded:!1},{name:"Opportunity",fields:["id","name","amount","stage","closeDate"],expanded:!1}];return t.jsxs("div",{className:"h-full",children:[t.jsx("div",{className:"flex items-center justify-between p-4 border-b border-slate-200",children:t.jsx("h2",{className:"font-medium text-sm",children:"Data Explorer"})}),t.jsxs("div",{className:"p-3",children:[t.jsxs("div",{className:"relative mb-3",children:[t.jsx(h.IconSearch,{size:16,className:"absolute left-2.5 top-2.5 text-slate-400"}),t.jsx("input",{type:"text",placeholder:"Search objects...",className:"w-full pl-8 pr-3 py-2 text-sm border border-slate-200 rounded-md focus:outline-none focus:ring-2 focus:ring-slate-300"})]}),t.jsx("div",{children:o.map(r=>t.jsxs("div",{className:"mb-1",children:[t.jsxs("div",{className:"flex items-center p-2 hover:bg-slate-50 rounded-md cursor-pointer",children:[t.jsx(h.IconChevronRight,{size:16,className:`mr-1 text-slate-400 transition-transform ${r.expanded?"rotate-90":""}`}),t.jsx(h.IconDatabase,{size:16,className:"mr-2 text-slate-500"}),t.jsx("span",{className:"text-sm font-medium",children:r.name})]}),r.expanded&&t.jsx("div",{className:"ml-7 border-l border-slate-200 pl-2",children:r.fields.map(a=>t.jsx("div",{className:"flex items-center p-1.5 hover:bg-slate-50 rounded-md cursor-pointer",children:t.jsx("span",{className:"text-xs text-slate-600",children:a})},a))})]},r.name))})]})]})},Ot=()=>{const o=[{name:"formatCurrency",description:"Format a number as currency",category:"Formatting"},{name:"calculateDiscount",description:"Calculate discount based on amount",category:"Calculations"},{name:"getLeadData",description:"Fetch lead data from CRM",category:"Data Access"},{name:"updateContact",description:"Update contact information",category:"Data Modification"},{name:"sendEmail",description:"Send an email to a contact",category:"Communication"},{name:"validateEmail",description:"Validate email format",category:"Validation"}];return t.jsxs("div",{className:"h-full",children:[t.jsx("div",{className:"flex items-center justify-between p-4 border-b border-slate-200",children:t.jsx("h2",{className:"font-medium text-sm",children:"Function Library"})}),t.jsxs("div",{className:"p-3",children:[t.jsxs("div",{className:"relative mb-3",children:[t.jsx(h.IconSearch,{size:16,className:"absolute left-2.5 top-2.5 text-slate-400"}),t.jsx("input",{type:"text",placeholder:"Search functions...",className:"w-full pl-8 pr-3 py-2 text-sm border border-slate-200 rounded-md focus:outline-none focus:ring-2 focus:ring-slate-300"})]}),t.jsx("div",{children:o.map(r=>t.jsxs("div",{className:"p-2 border border-slate-200 rounded-md mb-2 hover:bg-slate-50 cursor-pointer",children:[t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsxs("div",{className:"flex items-center",children:[t.jsx(h.IconCode,{size:16,className:"mr-2 text-slate-500"}),t.jsx("span",{className:"text-sm font-medium",children:r.name})]}),t.jsx("span",{className:"text-xs bg-slate-100 px-2 py-0.5 rounded text-slate-600",children:r.category})]}),t.jsx("p",{className:"text-xs text-slate-500 mt-1",children:r.description})]},r.name))}),t.jsxs("div",{className:"mt-4 p-3 bg-slate-50 rounded-md border border-slate-200 flex items-center",children:[t.jsx(h.IconBook,{size:16,className:"text-slate-500 mr-2"}),t.jsx("span",{className:"text-xs text-slate-600",children:"Browse documentation for more functions and examples"})]})]})]})},It=({code:o})=>{const[r,a]=E.useState(null),[i,c]=E.useState(!1),g="body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif; padding: 1rem; }",C=(d=>d.replace(/import\s+.*axios.*from\s+['"]axios['"];?/g,"// Axios imports removed for preview").replace(/axios\./g,"/* axios. */").replace(/fetch\(/g,"/* fetch( */"))(o),v=`
26
+ <!DOCTYPE html>
27
+ <html>
28
+ <head>
29
+ <style>${g}</style>
30
+ </head>
31
+ <body>
32
+ <div id="root"></div>
33
+ <script>
34
+ try {
35
+ // Disable network requests in the preview
36
+ window.fetch = function() {
37
+ console.log('Network requests are disabled in preview');
38
+ return Promise.reject(new Error('Network requests are disabled in preview'));
39
+ };
40
+ const preview = () => {
41
+ const output = document.getElementById('root');
42
+ output.innerHTML = '<div style="padding: 20px;">Preview will appear here</div>';
43
+ if (${C.includes("console.log")}) {
44
+ output.innerHTML += '<div style="padding: 10px; background: #f0f0f0; border-radius: 4px; margin-top: 10px;">Console output would appear here</div>';
45
+ }
46
+ };
47
+ preview();
48
+ } catch (e) {
49
+ document.getElementById('root').innerHTML = '<div style="color: red; padding: 20px;">Error: ' + e.message + '</div>';
50
+ }
51
+ <\/script>
52
+ </body>
53
+ </html>
54
+ `,R=()=>{c(!0),a(null),setTimeout(()=>c(!1),300)};return t.jsxs("div",{className:"h-full flex flex-col",children:[t.jsxs("div",{className:"flex items-center justify-between p-4 border-b border-slate-200",children:[t.jsx("h2",{className:"font-medium text-sm",children:"Preview"}),t.jsx("button",{className:"p-1 hover:bg-slate-100 rounded-md",onClick:R,children:t.jsx(h.IconRefresh,{size:16,className:i?"animate-spin":""})})]}),t.jsx("div",{className:"flex-1 bg-white overflow-auto",children:r?t.jsxs("div",{className:"p-4 bg-red-50 border border-red-200 rounded-md flex items-start",children:[t.jsx(h.IconAlertTriangle,{size:16,className:"text-red-500 mr-2 mt-0.5"}),t.jsxs("div",{children:[t.jsx("p",{className:"text-sm font-medium text-red-800",children:"Preview Error"}),t.jsx("p",{className:"text-xs text-red-600",children:r})]})]}):t.jsx("iframe",{title:"Preview",className:"w-full h-full",srcDoc:v,sandbox:"allow-scripts",onError:()=>a("Failed to load preview")})})]})},kt=()=>{const o=[{id:"1",name:"Should format currency correctly",status:"passed",duration:"12ms"},{id:"2",name:"Should calculate discount",status:"passed",duration:"8ms"},{id:"3",name:"Should validate email format",status:"failed",duration:"5ms",error:"Expected true but received false"},{id:"4",name:"Should handle empty input",status:"passed",duration:"3ms"}];return t.jsxs("div",{className:"h-full",children:[t.jsxs("div",{className:"flex items-center justify-between p-4 border-b border-slate-200",children:[t.jsx("h2",{className:"font-medium text-sm",children:"Test Runner"}),t.jsxs("div",{className:"flex items-center",children:[t.jsx("button",{className:"p-1 hover:bg-slate-100 rounded-md mr-1",children:t.jsx(h.IconSettings,{size:14})}),t.jsxs("button",{className:"bg-slate-900 text-white text-xs px-2 py-1 rounded-md flex items-center",children:[t.jsx(h.IconPlayerPlay,{size:12,className:"mr-1"})," Run Tests"]})]})]}),t.jsxs("div",{className:"p-3",children:[t.jsxs("div",{className:"mb-3 p-2 bg-slate-50 rounded-md border border-slate-200",children:[t.jsxs("div",{className:"flex justify-between items-center",children:[t.jsx("span",{className:"text-sm font-medium",children:"Test Summary"}),t.jsx("span",{className:"text-xs",children:"3 passed, 1 failed, 4 total"})]}),t.jsx("div",{className:"w-full h-2 bg-slate-200 rounded-full mt-2 overflow-hidden",children:t.jsx("div",{className:"h-full bg-emerald-500",style:{width:"75%"}})})]}),t.jsx("div",{children:o.map(r=>t.jsxs("div",{className:`p-2 mb-2 rounded-md ${r.status==="failed"?"bg-red-50 border border-red-100":"bg-slate-50 border border-slate-200"}`,children:[t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsxs("div",{className:"flex items-center",children:[r.status==="passed"?t.jsx(h.IconCircleCheck,{size:16,className:"text-emerald-500 mr-2"}):t.jsx(h.IconCircleX,{size:16,className:"text-red-500 mr-2"}),t.jsx("span",{className:"text-sm",children:r.name})]}),t.jsx("span",{className:"text-xs text-slate-500",children:r.duration})]}),r.error&&t.jsx("div",{className:"mt-2 text-xs text-red-600 bg-red-50 p-2 rounded",children:r.error})]},r.id))}),t.jsx("div",{className:"mt-4",children:t.jsx("button",{className:"w-full py-2 border border-dashed border-slate-300 rounded-md text-sm text-slate-500 hover:bg-slate-50",children:"+ Add New Test Case"})})]})]})},Dt=()=>{const o=[{id:"v1",name:"Initial version",author:"John Doe",timestamp:"Today, 2:30 PM",current:!0},{id:"v2",name:"Added form validation",author:"John Doe",timestamp:"Today, 1:15 PM",current:!1},{id:"v3",name:"Fixed API integration",author:"Sarah Smith",timestamp:"Yesterday, 4:45 PM",current:!1},{id:"v4",name:"Initial setup",author:"Sarah Smith",timestamp:"Yesterday, 11:30 AM",current:!1}];return t.jsxs("div",{className:"h-full",children:[t.jsxs("div",{className:"flex items-center justify-between p-4 border-b border-slate-200",children:[t.jsx("h2",{className:"font-medium text-sm",children:"Version History"}),t.jsx("button",{className:"text-xs text-slate-500 hover:text-slate-800",children:"Save Version"})]}),t.jsx("div",{className:"p-2",children:o.map(r=>t.jsxs("div",{className:`p-3 mb-2 rounded-md ${r.current?"bg-slate-100 border border-slate-200":"hover:bg-slate-50 cursor-pointer"}`,children:[t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsx("span",{className:"text-sm font-medium",children:r.name}),r.current&&t.jsx("span",{className:"text-xs bg-emerald-100 text-emerald-800 px-2 py-0.5 rounded",children:"Current"})]}),t.jsxs("div",{className:"flex items-center mt-1 text-xs text-slate-500",children:[t.jsx(h.IconUser,{size:12,className:"mr-1"}),t.jsx("span",{className:"mr-3",children:r.author}),t.jsx(h.IconClock,{size:12,className:"mr-1"}),t.jsx("span",{children:r.timestamp})]}),!r.current&&t.jsx("div",{className:"mt-2",children:t.jsxs("button",{className:"text-xs flex items-center text-slate-600 hover:text-slate-900",children:[t.jsx(h.IconRotate,{size:12,className:"mr-1"})," Restore this version"]})})]},r.id))})]})},At="1.0.0";Object.defineProperty(exports,"Alert",{enumerable:!0,get:()=>w.Alert});Object.defineProperty(exports,"Button",{enumerable:!0,get:()=>w.Button});Object.defineProperty(exports,"Splitter",{enumerable:!0,get:()=>w.Splitter});Object.defineProperty(exports,"Tooltip",{enumerable:!0,get:()=>w.Tooltip});Object.defineProperty(exports,"Tree",{enumerable:!0,get:()=>w.Tree});exports.CodeEditor=$e;exports.CodeEditorWrapper=H;exports.DataExplorer=Pt;exports.EditorLayout=Me;exports.FileExplorer=Be;exports.FormCodeEditor=St;exports.FormFileProvider=Ae;exports.FunctionLibrary=Ot;exports.Header=Tt;exports.PreviewPanel=It;exports.TestRunner=kt;exports.URLCodeEditor=_t;exports.URLFileProvider=ze;exports.VERSION=At;exports.VersionHistory=Dt;exports.WorkflowCodeEditor=Rt;exports.WorkflowFileProvider=De;exports.createFileProvider=Le;exports.useFileManager=Pe;
package/dist/index.d.ts CHANGED
@@ -3,6 +3,11 @@ export { CodeEditor } from "./components/editor/codeEditor";
3
3
  export { EditorLayout } from "./components/layout/editorLayout";
4
4
  export { Header } from "./components/layout/header";
5
5
  export { FileExplorer } from "./components/panels/fileExplorer";
6
+ export { DataExplorer } from "./components/panels/dataExplorer";
7
+ export { FunctionLibrary } from "./components/panels/functionLibrary";
8
+ export { PreviewPanel } from "./components/panels/previewPanel";
9
+ export { TestRunner } from "./components/panels/testRunner";
10
+ export { VersionHistory } from "./components/panels/versionHistory";
6
11
  export { createFileProvider, FormFileProvider, URLFileProvider, WorkflowFileProvider, } from "./providers/fileProviders";
7
12
  export { useFileManager } from "./hooks/useFileManager";
8
13
  export type { CodeEditorConfig, FileNode, FileProvider, } from "./types/fileTypes";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AACnE,OAAO,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AAC5D,OAAO,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAC;AAChE,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAC;AAGhE,OAAO,EACL,kBAAkB,EAClB,gBAAgB,EAChB,eAAe,EACf,oBAAoB,GACrB,MAAM,2BAA2B,CAAC;AAGnC,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAGxD,YAAY,EACV,gBAAgB,EAChB,QAAQ,EACR,YAAY,GACb,MAAM,mBAAmB,CAAC;AAE3B,YAAY,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAGnE,OAAO,EACL,cAAc,EACd,aAAa,EACb,kBAAkB,GACnB,MAAM,gCAAgC,CAAC;AAGxC,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAG9D,eAAO,MAAM,OAAO,UAAU,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AACnE,OAAO,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AAC5D,OAAO,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAC;AAChE,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAC;AAEhE,OAAO,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAC;AAChE,OAAO,EAAE,eAAe,EAAE,MAAM,qCAAqC,CAAC;AACtE,OAAO,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAC;AAChE,OAAO,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AAC5D,OAAO,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AAGpE,OAAO,EACL,kBAAkB,EAClB,gBAAgB,EAChB,eAAe,EACf,oBAAoB,GACrB,MAAM,2BAA2B,CAAC;AAGnC,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAGxD,YAAY,EACV,gBAAgB,EAChB,QAAQ,EACR,YAAY,GACb,MAAM,mBAAmB,CAAC;AAE3B,YAAY,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAGnE,OAAO,EACL,cAAc,EACd,aAAa,EACb,kBAAkB,GACnB,MAAM,gCAAgC,CAAC;AAGxC,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAG9D,eAAO,MAAM,OAAO,UAAU,CAAC"}