pinomad 0.12.0 → 0.13.0
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.
- package/dist/{chunk-np4jd070.js → chunk-4fferbxw.js} +97 -29
- package/dist/{chunk-ksfxqd8s.js → chunk-53xv3fny.js} +241 -48
- package/dist/{chunk-nppgxh6c.js → chunk-563fnad9.js} +1 -1
- package/dist/{chunk-41q0saz0.js → chunk-6th9xv39.js} +4 -4
- package/dist/{chunk-aqj9wfmb.js → chunk-90g1cg9n.js} +1 -1
- package/dist/{chunk-mnmqyq7d.js → chunk-aapsc9g0.js} +42 -48
- package/dist/{chunk-5qf1grkk.js → chunk-d4tq62yr.js} +46 -11
- package/dist/{chunk-gg2dcqbg.js → chunk-d9mq5d46.js} +22 -7
- package/dist/{chunk-47ff1d1t.js → chunk-kmzzjv53.js} +51 -4
- package/dist/{chunk-agq4tn9r.js → chunk-m51mq8vh.js} +4 -4
- package/dist/{chunk-vqkb70d7.js → chunk-maqv34cs.js} +2 -2
- package/dist/{chunk-vx7dy07y.js → chunk-ra86wjp5.js} +4 -4
- package/dist/{chunk-7wj0jh3t.js → chunk-s0h7c7da.js} +1 -1
- package/dist/{chunk-42nqtx5r.js → chunk-sd640dt7.js} +6 -6
- package/dist/{chunk-jeqsdcj1.js → chunk-t6fw0wa9.js} +4 -4
- package/dist/{chunk-t5abqsva.js → chunk-wd7aracm.js} +17 -5
- package/dist/pinomad.js +12 -12
- package/package.json +12 -11
- package/web/assets/{core-DnpzcQzs.js → core-BHm2gdHL.js} +1 -1
- package/web/assets/geist-mono-cyrillic-ext-wght-normal-X_5orZeX.woff2 +0 -0
- package/web/assets/geist-mono-cyrillic-wght-normal-DiZS0aHC.woff2 +0 -0
- package/web/assets/geist-mono-latin-ext-wght-normal-Bwz-egvJ.woff2 +0 -0
- package/web/assets/geist-mono-latin-wght-normal-XN7g48iV.woff2 +0 -0
- package/web/assets/geist-mono-symbols2-wght-normal-CO5SzqOn.woff2 +0 -0
- package/web/assets/geist-mono-vietnamese-wght-normal-DadHysG0.woff2 +0 -0
- package/web/assets/{highlighted-diff-Dn5ifsvK.js → highlighted-diff-DrHvSLK9.js} +2 -2
- package/web/assets/{highlights-DnHv6NBM.js → highlights-1aLwssz-.js} +1 -1
- package/web/assets/{highlights-themes-CUdrlZk3.js → highlights-themes-C1p4pFYS.js} +1 -1
- package/web/assets/index-A_AUJoO6.css +1 -0
- package/web/assets/index-BafYMKiN.js +396 -0
- package/web/assets/{shiki-BuPP5HCg.js → shiki-BwyCm3kZ.js} +2 -2
- package/web/assets/{shiki-langs-FJk0v0Ga.js → shiki-langs-CMlALLSg.js} +1 -1
- package/web/assets/{stream-tokenizer-Bl6bisIa.js → stream-tokenizer-BlgIhw0y.js} +1 -1
- package/web/assets/{theming-themes-BL_CC-Mm.js → theming-themes-DDvoqEqT.js} +1 -1
- package/web/assets/{xterm-view-ZsuzJb2C.js → xterm-view-BnKOnF3C.js} +1 -1
- package/web/index.html +2 -2
- package/web/assets/index-BV0ecolo.css +0 -1
- package/web/assets/index-DNsTTgPE.js +0 -396
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/shiki-langs-
|
|
2
|
-
var Ht=Object.defineProperty;var Ct=e=>{throw TypeError(e)};var Nt=(e,i,s)=>i in e?Ht(e,i,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[i]=s;var J=(e,i,s)=>Nt(e,typeof i!="symbol"?i+"":i,s),Et=(e,i,s)=>i.has(e)||Ct("Cannot "+s);var t=(e,i,s)=>(Et(e,i,"read from private field"),s?s.call(e):i.get(e)),d=(e,i,s)=>i.has(e)?Ct("Cannot add the same private member more than once"):i instanceof WeakSet?i.add(e):i.set(e,s),a=(e,i,s,n)=>(Et(e,i,"write to private field"),n?n.call(e,s):i.set(e,s),s),l=(e,i,s)=>(Et(e,i,"access private method"),s);var Rt=(e,i,s,n)=>({set _(r){a(e,i,r,s)},get _(){return t(e,i,n)}});import{_ as vt}from"./index-DNsTTgPE.js";import{R as dt,A as Gt,i as Jt,c as pt,d as Bt,e as Kt,f as Wt}from"./highlighted-diff-Dn5ifsvK.js";import{B as Ut,D as Zt}from"./stream-tokenizer-Bl6bisIa.js";import{I as K,E as Dt,c as Qt,a as Xt}from"./core-DnpzcQzs.js";function Yt(e,i){for(const s of Array.isArray(e)?e:[e]){let n=dt.get(s.name);n==null&&(n=s,dt.set(s.name,n)),i.attachLanguages([n]),Gt.add(n.name)}}async function $t(e){if(typeof __DIFFS_WORKER__<"u"?__DIFFS_WORKER__:Jt())throw new Error(`resolveLanguage("${e}") cannot be called from a worker context. Languages must be pre-resolved on the main thread and passed to the worker via the resolvedLanguages parameter.`);const i=pt.get(e);if(i!=null)return i;const s=(async()=>{let n=Bt.get(e);if(n==null){const{bundledLanguages:c}=await vt(async()=>{const{bundledLanguages:g}=await import("./shiki-langs-FJk0v0Ga.js");return{bundledLanguages:g}},__vite__mapDeps([0,1,2]));Object.prototype.hasOwnProperty.call(c,e)&&(n=c[e])}if(n==null)throw new Error(`resolveLanguage: "${e}" not found in bundled or custom languages`);const{default:r}=await n(),o={name:e,data:r};return dt.has(e)||dt.set(e,o),o})();pt.set(e,s);try{return await s}finally{pt.get(e)===s&&pt.delete(e)}}function te(e){return dt.get(e)??$t(e)}async function ee(e){const i=[],s=[];for(const n of e){if(n==="text"||n==="ansi")continue;const r=te(n)??$t(n);"then"in r?s.push(r):i.push(r)}return s.length>0&&await Promise.all(s).then(n=>{for(const r of n){if(r==null)throw new Error("resolvedLanguages: unable to resolve language");i.push(r)}}),i}function se(e,i){let s;return function(...n){clearTimeout(s),s=setTimeout(()=>e.apply(this,n),i)}}const Ot=0;let ie=0;var H,T,B,U,L,st,it,x,Z,nt,u,C,D,O,A,S,b,y,ft,z,P,Q,N,_,X,St,mt,h,W,ut,yt,zt,Y,wt,It,ct,tt,Vt,gt,et,Ft,jt,Pt,ne=(Pt=class{constructor(e,i,s){d(this,h);J(this,"backend");d(this,H);d(this,T);d(this,B);d(this,U);d(this,L);d(this,st);d(this,it);d(this,x);d(this,Z);d(this,nt,!1);d(this,u,[K]);d(this,C,[]);d(this,D,0);d(this,O,[]);d(this,A,-1);d(this,S,!0);d(this,b,!1);d(this,y,0);d(this,ft,++ie);d(this,z,-1);d(this,P,-1);d(this,Q);d(this,N,0);d(this,_,[]);d(this,X,!1);d(this,St,se(async e=>{var r;if(t(this,nt))return;const{startingLine:i=0,totalLines:s=1/0}=e??{},n=Math.min(s===1/0?1/0:i+s,t(this,L).lineCount);if(t(this,T)==null&&!Tt(t(this,L).languageId)){if(await((r=this.backend)==null?void 0:r.loadLanguages([t(this,L).languageId])),t(this,nt))return;a(this,T,t(this,H).getLanguage(t(this,L).languageId))}l(this,h,W).call(this),l(this,h,It).call(this,n)},500));d(this,mt,({data:e})=>{if(typeof e!="object"||e===null)return;const{type:i,tokenizerId:s,jobId:n}=e;i==="tokenize"&&s===t(this,ft)&&typeof n=="number"&&n===t(this,y)&&(t(this,z)>=0?l(this,h,Ft).call(this,n):l(this,h,jt).call(this,n))});this.backend=s,a(this,H,e),a(this,L,i.textDocument),a(this,B,i.theme),a(this,U,[]),a(this,st,i.tokenizeMaxLineLength??1e3),a(this,it,i.onDeferTokenize),a(this,x,i.matchBrackets!==!1),a(this,Z,i.__debug??!1),l(this,h,ut).call(this),l(this,h,W).call(this)}getStringCommentRegexpRangesInLine(e){if(!t(this,x)||e<0||e>=t(this,L).lineCount||(l(this,h,ut).call(this),t(this,T)==null))return null;if(t(this,_)[e]===void 0){l(this,h,et).call(this,e);const i=t(this,u)[e]??K,s=l(this,h,ct).call(this,e,i);t(this,u)[e+1]=s.state}return t(this,_)[e]??null}setTheme(e){t(this,B)!==e&&(a(this,B,e),l(this,h,W).call(this),this.stopBackgroundTokenize(),a(this,u,[K]),a(this,C,[]),a(this,D,0),a(this,O,[]),t(this,T)!=null&&t(this,L).lineCount>0&&l(this,h,wt).call(this,0))}dispose(){a(this,nt,!0),this.stopBackgroundTokenize(),l(this,h,zt).call(this)}tokenize(e,i,s=!1){var xt;if(l(this,h,ut).call(this),l(this,h,W).call(this),t(this,T)==null&&!Tt(t(this,L).languageId))throw new Error(`Grammar for language "${t(this,L).languageId}" not loaded`);const{lineCount:n}=t(this,L),{startingLine:r=0,totalLines:o=1/0}=i??{},c=o===1/0?n:Math.min(r+o,n),g=e.startLine,f=Math.max(r,g),I=i!=null&&o!==1/0&&e.lineDelta>0&&g<c&&e.endLine>=c,m=e.lineDelta===0&&(((xt=e.changedLineChanges)==null?void 0:xt.every(([,,p])=>p===0))??!0);t(this,x)&&!m&&(t(this,_).length=Math.min(t(this,_).length,e.startLine));const w=s&&e.lineDelta!==0&&g>=r,E=m||i==null||g>=f,v=e.changedLineRanges??[[g,e.endLine]];a(this,C,[]),a(this,D,0),a(this,O,[]);let V=-1;if(g<f)for(const[p,R]of v)p<f&&(V=Math.max(V,Math.min(R,f-1)));const kt=V>=g&&(m||e.lineDelta<0);m?l(this,h,et).call(this,g):(l(this,h,Vt).call(this,e),(i==null||g>=f)&&l(this,h,et).call(this,f));let F=0,bt=v[F][1],rt,_t=0,k=m?v[F][0]:f,ht=!1;const Mt=new Map,j=kt?new Map:void 0;if(j!=null&&!m){const p=Math.min(V+1,f,c);if(p>g){l(this,h,et).call(this,p);let R=g,ot=t(this,u)[R]??K;for(;R<p;R++){const M=l(this,h,ct).call(this,R,ot);ot=M.state,j.set(R,M.resolvedTokens)}t(this,u)[p]=ot}}let q=t(this,u)[k]??K;for(;k<c;){const p=m?t(this,u)[k+1]:w?l(this,h,gt).call(this,k+1):void 0;E&&(t(this,u)[k]=q);const{resolvedTokens:R,state:ot}=l(this,h,ct).call(this,k,q);if(q=ot,k>=f?Mt.set(k,R):j==null||j.set(k,R),E&&(t(this,u)[k+1]=q),ht=k>=bt&&(m||w)&&p!=null&&q.equals(p),ht){F++;const M=v[F];if(M==null)break;if(M[0]>=c){rt=M[0],_t=F;break}let lt=t(this,u)[M[0]];if(w)for(let Lt=k+2;Lt<=M[0]&&(lt=l(this,h,gt).call(this,Lt),lt!=null);Lt++)t(this,u)[Lt]=lt;lt==null?(bt=M[1],k++):(k=M[0],q=lt,bt=M[1]),ht=!1;continue}k++}if(E&&(k<c?t(this,u)[k+1]=q:t(this,u)[k]=q),ht&&w&&rt==null){for(let p=k+2;p<=n;p++){const R=l(this,h,gt).call(this,p);if(R==null)break;t(this,u)[p]=R}a(this,C,[]),a(this,D,0),a(this,O,[])}if(j!=null&&j.size>0&&t(this,it).call(this,j),rt!=null)t(this,x)&&m&&(t(this,_).length=Math.min(t(this,_).length,rt)),l(this,h,wt).call(this,rt,v,_t);else if(!ht&&k<n){const p=I&&g>=f?c:g<f&&!m?g:k;t(this,x)&&m&&(t(this,_).length=Math.min(t(this,_).length,p)),l(this,h,wt).call(this,p,v,F)}return Mt}prebuildStateStack(e){l(this,h,ut).call(this),t(this,St).call(this,e)}stopBackgroundTokenize(){a(this,P,-1),!t(this,S)&&(a(this,S,!0),a(this,b,!1),a(this,A,-1),a(this,z,-1),a(this,Q,void 0),a(this,N,0),a(this,C,[]),a(this,D,0),a(this,O,[]),l(this,h,zt).call(this))}pauseBackgroundTokenize(){t(this,S)||t(this,b)||(t(this,Z)&&console.log("[diffs/editor] background tokenization paused",{jobId:t(this,y)}),a(this,b,!0))}resumeBackgroundTokenize(){t(this,S)||!t(this,b)||t(this,T)==null||t(this,A)<0||(t(this,Z)&&console.log("[diffs/editor] background tokenization resumed",{jobId:t(this,y)}),a(this,b,!1),l(this,h,Y).call(this,t(this,y)))}},H=new WeakMap,T=new WeakMap,B=new WeakMap,U=new WeakMap,L=new WeakMap,st=new WeakMap,it=new WeakMap,x=new WeakMap,Z=new WeakMap,nt=new WeakMap,u=new WeakMap,C=new WeakMap,D=new WeakMap,O=new WeakMap,A=new WeakMap,S=new WeakMap,b=new WeakMap,y=new WeakMap,ft=new WeakMap,z=new WeakMap,P=new WeakMap,Q=new WeakMap,N=new WeakMap,_=new WeakMap,X=new WeakMap,St=new WeakMap,mt=new WeakMap,h=new WeakSet,W=function(){var i;if(t(this,B)==="")return;(i=this.backend)==null||i.getTheme(t(this,B));const{colorMap:e}=t(this,H).setTheme(t(this,B));a(this,U,e)},ut=function(){t(this,T)==null&&!Tt(t(this,L).languageId)&&t(this,H).getLoadedLanguages().includes(t(this,L).languageId)&&a(this,T,t(this,H).getLanguage(t(this,L).languageId))},yt=function(){t(this,X)||(globalThis.addEventListener("message",t(this,mt)),a(this,X,!0))},zt=function(){t(this,X)&&(globalThis.removeEventListener("message",t(this,mt)),a(this,X,!1))},Y=function(e){globalThis.postMessage({type:"tokenize",tokenizerId:t(this,ft),jobId:e})},wt=function(e,i,s=0){if(Tt(t(this,L).languageId))return;const n=++Rt(this,y)._;t(this,Z)&&console.log("[diffs/editor] background tokenization scheduled",{jobId:n,startLine:e,changedLineRanges:i,changedRangeIndex:s}),a(this,S,!1),a(this,b,!1),a(this,A,e),t(this,z)>=0&&a(this,P,Math.max(t(this,P),t(this,z))),a(this,z,-1),a(this,Q,i),a(this,N,s),l(this,h,yt).call(this),l(this,h,Y).call(this,n)},It=function(e){if(t(this,T)==null||t(this,u).length>e)return;if(!t(this,S)){t(this,z)>=0?a(this,z,Math.max(t(this,z),e)):a(this,P,Math.max(t(this,P),e));return}const i=++Rt(this,y)._;a(this,S,!1),a(this,b,!1),a(this,A,t(this,u).length-1),a(this,z,e),a(this,P,-1),a(this,Q,void 0),a(this,N,0),l(this,h,yt).call(this),l(this,h,Y).call(this,i)},ct=function(e,i){const s=t(this,L).getLineText(e);if(s.length>=t(this,st))return console.warn(`[diffs] Line(${e}) too long to tokenize: ${s.length}`),l(this,h,tt).call(this,e,null),{resolvedTokens:[[0,"",s]],state:i};if(t(this,T)==null||s===""||s.trim()==="")return l(this,h,tt).call(this,e,null),{resolvedTokens:[[0,"",s]],state:i};const n=At(t(this,T),t(this,U),s,i,Ot,t(this,x));return l(this,h,tt).call(this,e,n.bracketIgnoredRanges),{resolvedTokens:n.resolvedTokens,state:n.ruleStack}},tt=function(e,i){t(this,x)&&(t(this,_)[e]=i)},Vt=function(e){const i=e.changedLineChanges??[[e.startLine,e.endLine,e.lineDelta]],s=e.startLine+1;s<=t(this,u).length-s?(a(this,C,t(this,u)),a(this,D,0),a(this,u,t(this,u).slice(0,s))):(a(this,D,s),a(this,C,t(this,u).slice(s)),t(this,u).length=Math.min(t(this,u).length,s)),a(this,O,i)},gt=function(e){let i=e;for(let s=t(this,O).length-1;s>=0;s--){const[n,r,o]=t(this,O)[s];if(o!==0){if(i>r)i-=o;else if(i>n)return t(this,u)[e]}}return t(this,C)[i-t(this,D)]??t(this,u)[e]},et=function(e,i){const s=Math.min(Math.max(0,e),t(this,L).lineCount);if(t(this,u).length>s||t(this,T)==null)return!0;const n=i==null?0:performance.now();let r=t(this,u).length-1,o=t(this,u)[r]??K;for(;r<s;){t(this,u)[r]=o;const c=t(this,L).getLineText(r);if(c.length<t(this,st)&&c!==""&&c.trim()!==""){const g=At(t(this,T),t(this,U),c,o,Ot,t(this,x),!1);l(this,h,tt).call(this,r,g.bracketIgnoredRanges),o=g.ruleStack}else l(this,h,tt).call(this,r,null);if(r++,t(this,u)[r]=o,i!=null&&performance.now()-n>i)break}return r>=s},Ft=function(e){if(t(this,S)||t(this,b)||t(this,T)==null||e!==t(this,y))return;l(this,h,W).call(this);const i=l(this,h,et).call(this,t(this,z),1);if(!(t(this,S)||t(this,b)||e!==t(this,y))){if(i){this.stopBackgroundTokenize();return}a(this,A,t(this,u).length-1),l(this,h,Y).call(this,e)}},jt=function(e){var m;if(t(this,S)||t(this,b)||t(this,T)==null||e!==t(this,y))return;l(this,h,W).call(this);const i=performance.now(),s=new Map,n=t(this,L).lineCount,r=t(this,Q);let o=t(this,A),c=t(this,u)[o]??K,g=!1,f=t(this,N),I=(m=r==null?void 0:r[f])==null?void 0:m[1];for(;o<n;){t(this,u)[o]=c;const w=I!=null?l(this,h,gt).call(this,o+1):void 0,E=l(this,h,ct).call(this,o,c);if(s.set(o,E.resolvedTokens),c=E.state,t(this,u)[o+1]=c,g=I!=null&&o>=I&&w!=null&&c.equals(w),o++,g){f++;const v=r==null?void 0:r[f];if(v==null)break;if(I=v[1],t(this,u)[v[0]]==null)g=!1;else{o=v[0],c=t(this,u)[o]??c,g=!1;continue}}if(performance.now()-i>1)break}if(t(this,it).call(this,s),!(t(this,S)||t(this,b)||e!==t(this,y))){if(g||o>=n){const w=t(this,P);this.stopBackgroundTokenize(),w>=0&&l(this,h,It).call(this,w);return}a(this,A,o),a(this,N,f),l(this,h,Y).call(this,e)}},Pt);function At(e,i,s,n,r,o=!0,c=!0){const g=e.tokenizeLine2(s,n,r);g.stoppedEarly&&console.warn(`[diffs] Time limit reached when tokenizing line: ${s.substring(0,100)}`);const f=g.tokens,I=f.length/2,m=[],w=[];if(!c&&!o)return{ruleStack:g.ruleStack,resolvedTokens:m,bracketIgnoredRanges:w};for(let E=0;E<I;E++){const v=f[2*E],V=E+1<I?f[2*E+2]:s.length;if(v===V)continue;const kt=f[2*E+1];if(c){const F=Dt.getForeground(kt);m.push([v,i[F],s.slice(v,V)])}o&&Dt.getTokenType(kt)>0&&w.push([v,V])}return{ruleStack:g.ruleStack,resolvedTokens:m,bracketIgnoredRanges:w}}function Tt(e){return e==="text"||e==="ansi"}var $,G,at,ae=(at=class extends Ut{constructor(s,n){super();J(this,"highlighter");J(this,"options");d(this,$,"");d(this,G);this.highlighter=s,this.options=n}tokenizeChunk(s,n){const r=(t(this,$)+s).split(/(\r\n|\r|\n)/);let o=[];for(let c=0;c<r.length;c+=2){const g=r[c],f=this.highlighter.codeToTokens(g,{...this.options,grammarState:t(this,G)}),I=f.tokens[0].map(m=>({...m,offset:m.offset+this.stableOffset}));c+1<r.length?(Kt(n,I),this.pushLineBreak(n,g.length,r[c+1]),a(this,G,f.grammarState)):(o=I,a(this,$,g))}return{unstable:o,tailLength:t(this,$).length}}clone(){this.assertActive();const s=new at(this.highlighter,this.options);return this.copyStateTo(s),a(s,$,t(this,$)),a(s,G,t(this,G)),s}resetSource(){a(this,$,""),a(this,G,void 0)}releaseSource(){this.resetSource()}},$=new WeakMap,G=new WeakMap,at),ce=class qt extends Zt{constructor(s,n){super(s,Wt(s));J(this,"raw");J(this,"loadedThemes",new Map);J(this,"attachedLanguages",new Set(["text","ansi"]));this.raw=n}static async create(s){const n=s==="shiki-wasm"?(await vt(async()=>{const{createOnigurumaEngine:o}=await import("./engine-oniguruma-CQjQPVHy.js");return{createOnigurumaEngine:o}},[])).createOnigurumaEngine(vt(()=>import("./shiki-wasm-CgFRq91U.js"),[])):(await vt(async()=>{const{createJavaScriptRegexEngine:o}=await import("./engine-javascript-BHPwbUfN.js");return{createJavaScriptRegexEngine:o}},[])).createJavaScriptRegexEngine(),r=await Qt({themes:[],langs:[],engine:n});return new qt(s,r)}getTheme(s){this.assertNotDisposed();const n=this.loadedThemes.get(s),r=this.themeResolver.getResolvedTheme(s)??n;if(r==null)throw new Error(`Theme "${s}" has not been resolved`);if(n!==r){const o=r.textmate??(r.cssVariables!=null?Xt(r.cssVariables):void 0);if(o==null)throw new Error(`Theme "${s}" does not support Shiki`);this.raw.setTheme({...o,name:s}),this.loadedThemes.set(s,r)}return r}codeToTokens(s,n){return this.raw.codeToTokens(s,this.resolveOptions(n))}createEditorTokenizer(s){return new ne(this.raw,s,this)}createStreamTokenizer(s){return new ae(this.raw,this.resolveOptions(s))}async loadLanguages(s){this.assertNotDisposed();const n=s.filter(r=>!this.attachedLanguages.has(r));Yt(await ee(n),this)}hasLoadedLanguages(s){if(this.disposed)return!1;let n;return s.every(r=>this.attachedLanguages.has(r)?!0:Bt.has(r)?!1:(n??(n=this.raw.getLoadedLanguages()),n.includes(r)))}attachLanguages(s){this.assertNotDisposed();for(const n of s){if(this.attachedLanguages.has(n.name))continue;const r=n.data.find(o=>{var c;return o.name===n.name||((c=o.aliases)==null?void 0:c.includes(n.name))===!0});if(r==null)throw new Error(`attachResolvedLanguages: No returned grammar declares "${n.name}" as its name or an alias.`);this.raw.loadLanguageSync(n.data);try{this.raw.getLanguage(n.name)}catch{throw new Error(`attachResolvedLanguages: "${r.name}" is already loaded without alias "${n.name}". Load the alias first or give the grammar a unique name.`)}this.attachedLanguages.add(n.name)}}releaseResources(){this.loadedThemes.clear(),this.attachedLanguages.clear(),this.raw.dispose()}resolveOptions({theme:s,themes:n,...r}){if(this.assertNotDisposed(),s!=null)return this.getTheme(s),{...r,theme:s};if(n==null)throw new Error("A theme or themes option is required");for(const o of Object.values(n))this.getTheme(o);return{...r,themes:n}}};export{ce as ShikiHighlighter};
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/shiki-langs-CMlALLSg.js","assets/index-BafYMKiN.js","assets/index-A_AUJoO6.css"])))=>i.map(i=>d[i]);
|
|
2
|
+
var Ht=Object.defineProperty;var Ct=e=>{throw TypeError(e)};var Nt=(e,i,s)=>i in e?Ht(e,i,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[i]=s;var J=(e,i,s)=>Nt(e,typeof i!="symbol"?i+"":i,s),Et=(e,i,s)=>i.has(e)||Ct("Cannot "+s);var t=(e,i,s)=>(Et(e,i,"read from private field"),s?s.call(e):i.get(e)),d=(e,i,s)=>i.has(e)?Ct("Cannot add the same private member more than once"):i instanceof WeakSet?i.add(e):i.set(e,s),a=(e,i,s,n)=>(Et(e,i,"write to private field"),n?n.call(e,s):i.set(e,s),s),l=(e,i,s)=>(Et(e,i,"access private method"),s);var Rt=(e,i,s,n)=>({set _(r){a(e,i,r,s)},get _(){return t(e,i,n)}});import{_ as vt}from"./index-BafYMKiN.js";import{R as dt,A as Gt,i as Jt,c as pt,d as Bt,e as Kt,f as Wt}from"./highlighted-diff-DrHvSLK9.js";import{B as Ut,D as Zt}from"./stream-tokenizer-BlgIhw0y.js";import{I as K,E as Dt,c as Qt,a as Xt}from"./core-BHm2gdHL.js";function Yt(e,i){for(const s of Array.isArray(e)?e:[e]){let n=dt.get(s.name);n==null&&(n=s,dt.set(s.name,n)),i.attachLanguages([n]),Gt.add(n.name)}}async function $t(e){if(typeof __DIFFS_WORKER__<"u"?__DIFFS_WORKER__:Jt())throw new Error(`resolveLanguage("${e}") cannot be called from a worker context. Languages must be pre-resolved on the main thread and passed to the worker via the resolvedLanguages parameter.`);const i=pt.get(e);if(i!=null)return i;const s=(async()=>{let n=Bt.get(e);if(n==null){const{bundledLanguages:c}=await vt(async()=>{const{bundledLanguages:g}=await import("./shiki-langs-CMlALLSg.js");return{bundledLanguages:g}},__vite__mapDeps([0,1,2]));Object.prototype.hasOwnProperty.call(c,e)&&(n=c[e])}if(n==null)throw new Error(`resolveLanguage: "${e}" not found in bundled or custom languages`);const{default:r}=await n(),o={name:e,data:r};return dt.has(e)||dt.set(e,o),o})();pt.set(e,s);try{return await s}finally{pt.get(e)===s&&pt.delete(e)}}function te(e){return dt.get(e)??$t(e)}async function ee(e){const i=[],s=[];for(const n of e){if(n==="text"||n==="ansi")continue;const r=te(n)??$t(n);"then"in r?s.push(r):i.push(r)}return s.length>0&&await Promise.all(s).then(n=>{for(const r of n){if(r==null)throw new Error("resolvedLanguages: unable to resolve language");i.push(r)}}),i}function se(e,i){let s;return function(...n){clearTimeout(s),s=setTimeout(()=>e.apply(this,n),i)}}const Ot=0;let ie=0;var H,T,B,U,L,st,it,x,Z,nt,u,C,D,O,A,S,b,y,ft,z,P,Q,N,_,X,St,mt,h,W,ut,yt,zt,Y,wt,It,ct,tt,Vt,gt,et,Ft,jt,Pt,ne=(Pt=class{constructor(e,i,s){d(this,h);J(this,"backend");d(this,H);d(this,T);d(this,B);d(this,U);d(this,L);d(this,st);d(this,it);d(this,x);d(this,Z);d(this,nt,!1);d(this,u,[K]);d(this,C,[]);d(this,D,0);d(this,O,[]);d(this,A,-1);d(this,S,!0);d(this,b,!1);d(this,y,0);d(this,ft,++ie);d(this,z,-1);d(this,P,-1);d(this,Q);d(this,N,0);d(this,_,[]);d(this,X,!1);d(this,St,se(async e=>{var r;if(t(this,nt))return;const{startingLine:i=0,totalLines:s=1/0}=e??{},n=Math.min(s===1/0?1/0:i+s,t(this,L).lineCount);if(t(this,T)==null&&!Tt(t(this,L).languageId)){if(await((r=this.backend)==null?void 0:r.loadLanguages([t(this,L).languageId])),t(this,nt))return;a(this,T,t(this,H).getLanguage(t(this,L).languageId))}l(this,h,W).call(this),l(this,h,It).call(this,n)},500));d(this,mt,({data:e})=>{if(typeof e!="object"||e===null)return;const{type:i,tokenizerId:s,jobId:n}=e;i==="tokenize"&&s===t(this,ft)&&typeof n=="number"&&n===t(this,y)&&(t(this,z)>=0?l(this,h,Ft).call(this,n):l(this,h,jt).call(this,n))});this.backend=s,a(this,H,e),a(this,L,i.textDocument),a(this,B,i.theme),a(this,U,[]),a(this,st,i.tokenizeMaxLineLength??1e3),a(this,it,i.onDeferTokenize),a(this,x,i.matchBrackets!==!1),a(this,Z,i.__debug??!1),l(this,h,ut).call(this),l(this,h,W).call(this)}getStringCommentRegexpRangesInLine(e){if(!t(this,x)||e<0||e>=t(this,L).lineCount||(l(this,h,ut).call(this),t(this,T)==null))return null;if(t(this,_)[e]===void 0){l(this,h,et).call(this,e);const i=t(this,u)[e]??K,s=l(this,h,ct).call(this,e,i);t(this,u)[e+1]=s.state}return t(this,_)[e]??null}setTheme(e){t(this,B)!==e&&(a(this,B,e),l(this,h,W).call(this),this.stopBackgroundTokenize(),a(this,u,[K]),a(this,C,[]),a(this,D,0),a(this,O,[]),t(this,T)!=null&&t(this,L).lineCount>0&&l(this,h,wt).call(this,0))}dispose(){a(this,nt,!0),this.stopBackgroundTokenize(),l(this,h,zt).call(this)}tokenize(e,i,s=!1){var xt;if(l(this,h,ut).call(this),l(this,h,W).call(this),t(this,T)==null&&!Tt(t(this,L).languageId))throw new Error(`Grammar for language "${t(this,L).languageId}" not loaded`);const{lineCount:n}=t(this,L),{startingLine:r=0,totalLines:o=1/0}=i??{},c=o===1/0?n:Math.min(r+o,n),g=e.startLine,f=Math.max(r,g),I=i!=null&&o!==1/0&&e.lineDelta>0&&g<c&&e.endLine>=c,m=e.lineDelta===0&&(((xt=e.changedLineChanges)==null?void 0:xt.every(([,,p])=>p===0))??!0);t(this,x)&&!m&&(t(this,_).length=Math.min(t(this,_).length,e.startLine));const w=s&&e.lineDelta!==0&&g>=r,E=m||i==null||g>=f,v=e.changedLineRanges??[[g,e.endLine]];a(this,C,[]),a(this,D,0),a(this,O,[]);let V=-1;if(g<f)for(const[p,R]of v)p<f&&(V=Math.max(V,Math.min(R,f-1)));const kt=V>=g&&(m||e.lineDelta<0);m?l(this,h,et).call(this,g):(l(this,h,Vt).call(this,e),(i==null||g>=f)&&l(this,h,et).call(this,f));let F=0,bt=v[F][1],rt,_t=0,k=m?v[F][0]:f,ht=!1;const Mt=new Map,j=kt?new Map:void 0;if(j!=null&&!m){const p=Math.min(V+1,f,c);if(p>g){l(this,h,et).call(this,p);let R=g,ot=t(this,u)[R]??K;for(;R<p;R++){const M=l(this,h,ct).call(this,R,ot);ot=M.state,j.set(R,M.resolvedTokens)}t(this,u)[p]=ot}}let q=t(this,u)[k]??K;for(;k<c;){const p=m?t(this,u)[k+1]:w?l(this,h,gt).call(this,k+1):void 0;E&&(t(this,u)[k]=q);const{resolvedTokens:R,state:ot}=l(this,h,ct).call(this,k,q);if(q=ot,k>=f?Mt.set(k,R):j==null||j.set(k,R),E&&(t(this,u)[k+1]=q),ht=k>=bt&&(m||w)&&p!=null&&q.equals(p),ht){F++;const M=v[F];if(M==null)break;if(M[0]>=c){rt=M[0],_t=F;break}let lt=t(this,u)[M[0]];if(w)for(let Lt=k+2;Lt<=M[0]&&(lt=l(this,h,gt).call(this,Lt),lt!=null);Lt++)t(this,u)[Lt]=lt;lt==null?(bt=M[1],k++):(k=M[0],q=lt,bt=M[1]),ht=!1;continue}k++}if(E&&(k<c?t(this,u)[k+1]=q:t(this,u)[k]=q),ht&&w&&rt==null){for(let p=k+2;p<=n;p++){const R=l(this,h,gt).call(this,p);if(R==null)break;t(this,u)[p]=R}a(this,C,[]),a(this,D,0),a(this,O,[])}if(j!=null&&j.size>0&&t(this,it).call(this,j),rt!=null)t(this,x)&&m&&(t(this,_).length=Math.min(t(this,_).length,rt)),l(this,h,wt).call(this,rt,v,_t);else if(!ht&&k<n){const p=I&&g>=f?c:g<f&&!m?g:k;t(this,x)&&m&&(t(this,_).length=Math.min(t(this,_).length,p)),l(this,h,wt).call(this,p,v,F)}return Mt}prebuildStateStack(e){l(this,h,ut).call(this),t(this,St).call(this,e)}stopBackgroundTokenize(){a(this,P,-1),!t(this,S)&&(a(this,S,!0),a(this,b,!1),a(this,A,-1),a(this,z,-1),a(this,Q,void 0),a(this,N,0),a(this,C,[]),a(this,D,0),a(this,O,[]),l(this,h,zt).call(this))}pauseBackgroundTokenize(){t(this,S)||t(this,b)||(t(this,Z)&&console.log("[diffs/editor] background tokenization paused",{jobId:t(this,y)}),a(this,b,!0))}resumeBackgroundTokenize(){t(this,S)||!t(this,b)||t(this,T)==null||t(this,A)<0||(t(this,Z)&&console.log("[diffs/editor] background tokenization resumed",{jobId:t(this,y)}),a(this,b,!1),l(this,h,Y).call(this,t(this,y)))}},H=new WeakMap,T=new WeakMap,B=new WeakMap,U=new WeakMap,L=new WeakMap,st=new WeakMap,it=new WeakMap,x=new WeakMap,Z=new WeakMap,nt=new WeakMap,u=new WeakMap,C=new WeakMap,D=new WeakMap,O=new WeakMap,A=new WeakMap,S=new WeakMap,b=new WeakMap,y=new WeakMap,ft=new WeakMap,z=new WeakMap,P=new WeakMap,Q=new WeakMap,N=new WeakMap,_=new WeakMap,X=new WeakMap,St=new WeakMap,mt=new WeakMap,h=new WeakSet,W=function(){var i;if(t(this,B)==="")return;(i=this.backend)==null||i.getTheme(t(this,B));const{colorMap:e}=t(this,H).setTheme(t(this,B));a(this,U,e)},ut=function(){t(this,T)==null&&!Tt(t(this,L).languageId)&&t(this,H).getLoadedLanguages().includes(t(this,L).languageId)&&a(this,T,t(this,H).getLanguage(t(this,L).languageId))},yt=function(){t(this,X)||(globalThis.addEventListener("message",t(this,mt)),a(this,X,!0))},zt=function(){t(this,X)&&(globalThis.removeEventListener("message",t(this,mt)),a(this,X,!1))},Y=function(e){globalThis.postMessage({type:"tokenize",tokenizerId:t(this,ft),jobId:e})},wt=function(e,i,s=0){if(Tt(t(this,L).languageId))return;const n=++Rt(this,y)._;t(this,Z)&&console.log("[diffs/editor] background tokenization scheduled",{jobId:n,startLine:e,changedLineRanges:i,changedRangeIndex:s}),a(this,S,!1),a(this,b,!1),a(this,A,e),t(this,z)>=0&&a(this,P,Math.max(t(this,P),t(this,z))),a(this,z,-1),a(this,Q,i),a(this,N,s),l(this,h,yt).call(this),l(this,h,Y).call(this,n)},It=function(e){if(t(this,T)==null||t(this,u).length>e)return;if(!t(this,S)){t(this,z)>=0?a(this,z,Math.max(t(this,z),e)):a(this,P,Math.max(t(this,P),e));return}const i=++Rt(this,y)._;a(this,S,!1),a(this,b,!1),a(this,A,t(this,u).length-1),a(this,z,e),a(this,P,-1),a(this,Q,void 0),a(this,N,0),l(this,h,yt).call(this),l(this,h,Y).call(this,i)},ct=function(e,i){const s=t(this,L).getLineText(e);if(s.length>=t(this,st))return console.warn(`[diffs] Line(${e}) too long to tokenize: ${s.length}`),l(this,h,tt).call(this,e,null),{resolvedTokens:[[0,"",s]],state:i};if(t(this,T)==null||s===""||s.trim()==="")return l(this,h,tt).call(this,e,null),{resolvedTokens:[[0,"",s]],state:i};const n=At(t(this,T),t(this,U),s,i,Ot,t(this,x));return l(this,h,tt).call(this,e,n.bracketIgnoredRanges),{resolvedTokens:n.resolvedTokens,state:n.ruleStack}},tt=function(e,i){t(this,x)&&(t(this,_)[e]=i)},Vt=function(e){const i=e.changedLineChanges??[[e.startLine,e.endLine,e.lineDelta]],s=e.startLine+1;s<=t(this,u).length-s?(a(this,C,t(this,u)),a(this,D,0),a(this,u,t(this,u).slice(0,s))):(a(this,D,s),a(this,C,t(this,u).slice(s)),t(this,u).length=Math.min(t(this,u).length,s)),a(this,O,i)},gt=function(e){let i=e;for(let s=t(this,O).length-1;s>=0;s--){const[n,r,o]=t(this,O)[s];if(o!==0){if(i>r)i-=o;else if(i>n)return t(this,u)[e]}}return t(this,C)[i-t(this,D)]??t(this,u)[e]},et=function(e,i){const s=Math.min(Math.max(0,e),t(this,L).lineCount);if(t(this,u).length>s||t(this,T)==null)return!0;const n=i==null?0:performance.now();let r=t(this,u).length-1,o=t(this,u)[r]??K;for(;r<s;){t(this,u)[r]=o;const c=t(this,L).getLineText(r);if(c.length<t(this,st)&&c!==""&&c.trim()!==""){const g=At(t(this,T),t(this,U),c,o,Ot,t(this,x),!1);l(this,h,tt).call(this,r,g.bracketIgnoredRanges),o=g.ruleStack}else l(this,h,tt).call(this,r,null);if(r++,t(this,u)[r]=o,i!=null&&performance.now()-n>i)break}return r>=s},Ft=function(e){if(t(this,S)||t(this,b)||t(this,T)==null||e!==t(this,y))return;l(this,h,W).call(this);const i=l(this,h,et).call(this,t(this,z),1);if(!(t(this,S)||t(this,b)||e!==t(this,y))){if(i){this.stopBackgroundTokenize();return}a(this,A,t(this,u).length-1),l(this,h,Y).call(this,e)}},jt=function(e){var m;if(t(this,S)||t(this,b)||t(this,T)==null||e!==t(this,y))return;l(this,h,W).call(this);const i=performance.now(),s=new Map,n=t(this,L).lineCount,r=t(this,Q);let o=t(this,A),c=t(this,u)[o]??K,g=!1,f=t(this,N),I=(m=r==null?void 0:r[f])==null?void 0:m[1];for(;o<n;){t(this,u)[o]=c;const w=I!=null?l(this,h,gt).call(this,o+1):void 0,E=l(this,h,ct).call(this,o,c);if(s.set(o,E.resolvedTokens),c=E.state,t(this,u)[o+1]=c,g=I!=null&&o>=I&&w!=null&&c.equals(w),o++,g){f++;const v=r==null?void 0:r[f];if(v==null)break;if(I=v[1],t(this,u)[v[0]]==null)g=!1;else{o=v[0],c=t(this,u)[o]??c,g=!1;continue}}if(performance.now()-i>1)break}if(t(this,it).call(this,s),!(t(this,S)||t(this,b)||e!==t(this,y))){if(g||o>=n){const w=t(this,P);this.stopBackgroundTokenize(),w>=0&&l(this,h,It).call(this,w);return}a(this,A,o),a(this,N,f),l(this,h,Y).call(this,e)}},Pt);function At(e,i,s,n,r,o=!0,c=!0){const g=e.tokenizeLine2(s,n,r);g.stoppedEarly&&console.warn(`[diffs] Time limit reached when tokenizing line: ${s.substring(0,100)}`);const f=g.tokens,I=f.length/2,m=[],w=[];if(!c&&!o)return{ruleStack:g.ruleStack,resolvedTokens:m,bracketIgnoredRanges:w};for(let E=0;E<I;E++){const v=f[2*E],V=E+1<I?f[2*E+2]:s.length;if(v===V)continue;const kt=f[2*E+1];if(c){const F=Dt.getForeground(kt);m.push([v,i[F],s.slice(v,V)])}o&&Dt.getTokenType(kt)>0&&w.push([v,V])}return{ruleStack:g.ruleStack,resolvedTokens:m,bracketIgnoredRanges:w}}function Tt(e){return e==="text"||e==="ansi"}var $,G,at,ae=(at=class extends Ut{constructor(s,n){super();J(this,"highlighter");J(this,"options");d(this,$,"");d(this,G);this.highlighter=s,this.options=n}tokenizeChunk(s,n){const r=(t(this,$)+s).split(/(\r\n|\r|\n)/);let o=[];for(let c=0;c<r.length;c+=2){const g=r[c],f=this.highlighter.codeToTokens(g,{...this.options,grammarState:t(this,G)}),I=f.tokens[0].map(m=>({...m,offset:m.offset+this.stableOffset}));c+1<r.length?(Kt(n,I),this.pushLineBreak(n,g.length,r[c+1]),a(this,G,f.grammarState)):(o=I,a(this,$,g))}return{unstable:o,tailLength:t(this,$).length}}clone(){this.assertActive();const s=new at(this.highlighter,this.options);return this.copyStateTo(s),a(s,$,t(this,$)),a(s,G,t(this,G)),s}resetSource(){a(this,$,""),a(this,G,void 0)}releaseSource(){this.resetSource()}},$=new WeakMap,G=new WeakMap,at),ce=class qt extends Zt{constructor(s,n){super(s,Wt(s));J(this,"raw");J(this,"loadedThemes",new Map);J(this,"attachedLanguages",new Set(["text","ansi"]));this.raw=n}static async create(s){const n=s==="shiki-wasm"?(await vt(async()=>{const{createOnigurumaEngine:o}=await import("./engine-oniguruma-CQjQPVHy.js");return{createOnigurumaEngine:o}},[])).createOnigurumaEngine(vt(()=>import("./shiki-wasm-CgFRq91U.js"),[])):(await vt(async()=>{const{createJavaScriptRegexEngine:o}=await import("./engine-javascript-BHPwbUfN.js");return{createJavaScriptRegexEngine:o}},[])).createJavaScriptRegexEngine(),r=await Qt({themes:[],langs:[],engine:n});return new qt(s,r)}getTheme(s){this.assertNotDisposed();const n=this.loadedThemes.get(s),r=this.themeResolver.getResolvedTheme(s)??n;if(r==null)throw new Error(`Theme "${s}" has not been resolved`);if(n!==r){const o=r.textmate??(r.cssVariables!=null?Xt(r.cssVariables):void 0);if(o==null)throw new Error(`Theme "${s}" does not support Shiki`);this.raw.setTheme({...o,name:s}),this.loadedThemes.set(s,r)}return r}codeToTokens(s,n){return this.raw.codeToTokens(s,this.resolveOptions(n))}createEditorTokenizer(s){return new ne(this.raw,s,this)}createStreamTokenizer(s){return new ae(this.raw,this.resolveOptions(s))}async loadLanguages(s){this.assertNotDisposed();const n=s.filter(r=>!this.attachedLanguages.has(r));Yt(await ee(n),this)}hasLoadedLanguages(s){if(this.disposed)return!1;let n;return s.every(r=>this.attachedLanguages.has(r)?!0:Bt.has(r)?!1:(n??(n=this.raw.getLoadedLanguages()),n.includes(r)))}attachLanguages(s){this.assertNotDisposed();for(const n of s){if(this.attachedLanguages.has(n.name))continue;const r=n.data.find(o=>{var c;return o.name===n.name||((c=o.aliases)==null?void 0:c.includes(n.name))===!0});if(r==null)throw new Error(`attachResolvedLanguages: No returned grammar declares "${n.name}" as its name or an alias.`);this.raw.loadLanguageSync(n.data);try{this.raw.getLanguage(n.name)}catch{throw new Error(`attachResolvedLanguages: "${r.name}" is already loaded without alias "${n.name}". Load the alias first or give the grammar a unique name.`)}this.attachedLanguages.add(n.name)}}releaseResources(){this.loadedThemes.clear(),this.attachedLanguages.clear(),this.raw.dispose()}resolveOptions({theme:s,themes:n,...r}){if(this.assertNotDisposed(),s!=null)return this.getTheme(s),{...r,theme:s};if(n==null)throw new Error("A theme or themes option is required");for(const o of Object.values(n))this.getTheme(o);return{...r,themes:n}}};export{ce as ShikiHighlighter};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/scss-Cw6XMfVs.js","assets/css-Z72CF80r.js","assets/html-BlS82ilI.js","assets/javascript-wDzz0qaB.js","assets/vue-CwSeJimo.js","assets/typescript-BPQ3VLAy.js","assets/json-Cp-IABpG.js","assets/svelte-DoIXUgJc.js","assets/postcss-DnzrXTVv.js","assets/astro-DOly5024.js","assets/tsx-COt5Ahok.js","assets/cpp-DddhVWhK.js","assets/c-BIGW1oBm.js","assets/ruby-B43yHlf9.js","assets/xml-sdJ4AIDG.js","assets/java-CylS5w8V.js","assets/sql-DkvoVjww.js","assets/graphql-ChdNCCLP.js","assets/jsx-g9-lgVsj.js","assets/shellscript-Yzrsuije.js","assets/lua-BaeVxFsk.js","assets/yaml-Buea-lGh.js","assets/php-DoruYMF0.js","assets/elixir-DkJLSxtU.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{_}from"./index-
|
|
2
|
+
import{_}from"./index-BafYMKiN.js";const t={typescript:()=>_(()=>import("./typescript-BPQ3VLAy.js"),[]),tsx:()=>_(()=>import("./tsx-COt5Ahok.js"),[]),javascript:()=>_(()=>import("./javascript-wDzz0qaB.js"),[]),jsx:()=>_(()=>import("./jsx-g9-lgVsj.js"),[]),json:()=>_(()=>import("./json-Cp-IABpG.js"),[]),jsonc:()=>_(()=>import("./jsonc-Des-eS-w.js"),[]),markdown:()=>_(()=>import("./markdown-Cvjx9yec.js"),[]),css:()=>_(()=>import("./css-Z72CF80r.js"),[]),scss:()=>_(()=>import("./scss-Cw6XMfVs.js"),__vite__mapDeps([0,1])),less:()=>_(()=>import("./less-B1dDrJ26.js"),[]),html:()=>_(()=>import("./html-BlS82ilI.js"),__vite__mapDeps([2,3,1])),vue:()=>_(()=>import("./vue-CwSeJimo.js"),__vite__mapDeps([4,1,3,5,6,2])),svelte:()=>_(()=>import("./svelte-DoIXUgJc.js"),__vite__mapDeps([7,3,5,1,8])),astro:()=>_(()=>import("./astro-DOly5024.js"),__vite__mapDeps([9,6,3,5,1,8,10])),python:()=>_(()=>import("./python-B6aJPvgy.js"),[]),rust:()=>_(()=>import("./rust-DPvrY3IQ.js"),[]),go:()=>_(()=>import("./go-C27-OAKa.js"),[]),swift:()=>_(()=>import("./swift-C2oV4EkX.js"),[]),kotlin:()=>_(()=>import("./kotlin-BdnUsdx6.js"),[]),java:()=>_(()=>import("./java-CylS5w8V.js"),[]),c:()=>_(()=>import("./c-BIGW1oBm.js"),[]),cpp:()=>_(()=>import("./cpp-DddhVWhK.js"),__vite__mapDeps([11,12])),csharp:()=>_(()=>import("./csharp-B_TYUkTI.js"),[]),"objective-c":()=>_(()=>import("./objective-c-DXmwc3jG.js"),[]),ruby:()=>_(()=>import("./ruby-B43yHlf9.js"),__vite__mapDeps([13,2,3,1,14,15,16,17,5,18,10,11,12,19,20,21])),php:()=>_(()=>import("./php-DoruYMF0.js"),__vite__mapDeps([22,2,3,1,14,15,16,6])),shellscript:()=>_(()=>import("./shellscript-Yzrsuije.js"),[]),powershell:()=>_(()=>import("./powershell-Dd0kTxKP.js"),[]),fish:()=>_(()=>import("./fish-BvzEVeQv.js"),[]),yaml:()=>_(()=>import("./yaml-Buea-lGh.js"),[]),toml:()=>_(()=>import("./toml-vGWfd6FD.js"),[]),ini:()=>_(()=>import("./ini-BEwlwnbL.js"),[]),sql:()=>_(()=>import("./sql-DkvoVjww.js"),[]),dockerfile:()=>_(()=>import("./dockerfile-BcOcwvcX.js"),[]),make:()=>_(()=>import("./make-CHLpvVh8.js"),[]),xml:()=>_(()=>import("./xml-sdJ4AIDG.js"),__vite__mapDeps([14,15])),graphql:()=>_(()=>import("./graphql-ChdNCCLP.js"),__vite__mapDeps([17,3,5,18,10])),lua:()=>_(()=>import("./lua-BaeVxFsk.js"),__vite__mapDeps([20,12])),dart:()=>_(()=>import("./dart-CtKP3W-j.js"),[]),zig:()=>_(()=>import("./zig-VOosw3JB.js"),[]),nix:()=>_(()=>import("./nix-CwoSXNpI.js"),[]),diff:()=>_(()=>import("./diff-D97Zzqfu.js"),[]),elixir:()=>_(()=>import("./elixir-DkJLSxtU.js"),__vite__mapDeps([23,2,3,1])),haskell:()=>_(()=>import("./haskell-Df6bDoY_.js"),[]),scala:()=>_(()=>import("./scala-CqE71os6.js"),[]),proto:()=>_(()=>import("./proto-C7zT0LnQ.js"),[]),hcl:()=>_(()=>import("./hcl-BWvSN4gD.js"),[]),terraform:()=>_(()=>import("./terraform-BETggiCN.js"),[]),prisma:()=>_(()=>import("./prisma-Vru482bI.js"),[])};export{t as bundledLanguages};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var f=Object.defineProperty;var p=(e,s,t)=>s in e?f(e,s,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[s]=t;var n=(e,s,t)=>p(e,typeof s!="symbol"?s+"":s,t);import{r as g,h as c,a as u,b,H as m}from"./highlighted-diff-
|
|
1
|
+
var f=Object.defineProperty;var p=(e,s,t)=>s in e?f(e,s,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[s]=t;var n=(e,s,t)=>p(e,typeof s!="symbol"?s+"":s,t);import{r as g,h as c,a as u,b,H as m}from"./highlighted-diff-DrHvSLK9.js";function y(e,s,t,r=!1){var l;const o=[0];if(((l=t.decorations)==null?void 0:l.some(i=>typeof i.start=="number"||typeof i.end=="number"))===!0)for(let i=e.indexOf(`
|
|
2
2
|
`);i!==-1;i=e.indexOf(`
|
|
3
3
|
`,i+1))o.push(i+1);const a={type:"element",tagName:"code",properties:{},children:[]},h=g(s.tokens,{decorations:t.decorations,mergeWhitespaces:t.mergeWhitespaces,lineOffsets:o,cacheHtmlStyles:r});for(let i=0;i<h.length;i++)i>0&&a.children.push({type:"text",value:`
|
|
4
4
|
`}),a.children.push(h[i]);const d={type:"root",children:[{type:"element",tagName:"pre",properties:{class:"diffs",style:s.rootStyle===!1?void 0:s.rootStyle??[s.fg!=null?`color:${s.fg}`:"",s.bg!=null?`background-color:${s.bg}`:""].filter(Boolean).join(";"),tabIndex:0},children:[a]}]};return c(d)}var T=class{constructor(e,s){n(this,"name");n(this,"themeResolver");n(this,"disposed",!1);this.name=e,this.themeResolver=s,u(e)}codeToHtml(e,s){return y(e,this.codeToTokens(e,s),s,this.name==="highlights")}get isDisposed(){return this.disposed}dispose(){this.disposed||(this.disposed=!0,this.releaseResources(),b())}assertNotDisposed(){if(this.disposed)throw new m}},v=class{constructor(){n(this,"disposed",!1);n(this,"stableOffset",0);n(this,"unstable",[]);n(this,"pendingCarriageReturn","")}enqueue(e){this.assertActive(),e=this.pendingCarriageReturn+e,this.pendingCarriageReturn=e.endsWith("\r")?"\r":"",this.pendingCarriageReturn!==""&&(e=e.slice(0,-1));const s=this.unstable.length,t=[],{unstable:r,tailLength:o}=this.tokenizeChunk(e,t);return this.pendingCarriageReturn!==""&&r.push({content:"\r",offset:this.stableOffset+o}),this.unstable=r,{recall:s,stable:t,unstable:r}}pushLineBreak(e,s,t){for(let r=0;r<t.length;r++)e.push({content:t[r],offset:this.stableOffset+s+r});this.stableOffset+=s+t.length}close(){const e=this.unstable;return this.dispose(),{stable:e}}clear(){this.assertActive(),this.stableOffset=0,this.unstable=[],this.pendingCarriageReturn="",this.resetSource()}dispose(){this.disposed||(this.disposed=!0,this.unstable=[],this.releaseSource())}copyStateTo(e){e.stableOffset=this.stableOffset,e.unstable=this.unstable.slice(),e.pendingCarriageReturn=this.pendingCarriageReturn}assertActive(){if(this.disposed)throw new Error("stream tokenizer is disposed")}};export{v as B,T as D};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as r}from"./index-
|
|
1
|
+
import{_ as r}from"./index-BafYMKiN.js";const o={"pierre-light":()=>r(()=>import("./pierre-light-480U9XYS.js"),[]),"pierre-dark":()=>r(()=>import("./pierre-dark-CyvmCCZW.js"),[])},_={getTheme:e=>Object.hasOwn(o,e)?{load:o[e]}:void 0};export{_ as themes};
|
package/web/index.html
CHANGED
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
|
|
7
7
|
<link rel="apple-touch-icon" href="/apple-touch-icon.png" />
|
|
8
8
|
<title>PiNomad</title>
|
|
9
|
-
<script type="module" crossorigin src="/assets/index-
|
|
10
|
-
<link rel="stylesheet" crossorigin href="/assets/index-
|
|
9
|
+
<script type="module" crossorigin src="/assets/index-BafYMKiN.js"></script>
|
|
10
|
+
<link rel="stylesheet" crossorigin href="/assets/index-A_AUJoO6.css">
|
|
11
11
|
</head>
|
|
12
12
|
<body>
|
|
13
13
|
<div id="root"></div>
|