UNPKG

@getontime/cli

Version:
3 lines (2 loc) 1.11 kB
import{r as s,j as f,cb as y,cc as u}from"./vendor-DFNUfA2K.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="c98f0c78-2cba-4937-9741-6d6965277dd8",e._sentryDebugIdIdentifier="sentry-dbid-c98f0c78-2cba-4937-9741-6d6965277dd8")}catch{}})();const h="_wrapper_1l24u_17",b={wrapper:h},g=s.forwardRef((e,n)=>{const{language:i,initialValue:t,isDirty:d,setIsDirty:o}=e,[r,l]=s.useState(t),p=a=>{const c=u.languages[i];return c?u.highlight(a,c,i):a},m=a=>{l(a)};return s.useImperativeHandle(n,()=>({getCss:()=>r})),s.useEffect(()=>{l(t)},[t]),s.useEffect(()=>{t.trim()!==r.trim()&&!d&&r.length!==0&&o(!0),t.trim()===r.trim()&&d&&o(!1)},[t,r,d,o]),f.jsx("div",{className:b.wrapper,children:f.jsx(y,{value:r,padding:15,onValueChange:m,highlight:p,style:{fontFamily:"monospace",fontSize:12,minHeight:500,background:"#2d2d2d"}})})});g.displayName="StyleEditor";const E=s.memo(g);export{E as default}; //# sourceMappingURL=StyleEditor-fQAOer4u.js.map