@inkeep/open-knowledge 0.17.0 → 0.17.1-beta.1
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/assets/skills/discovery/SKILL.md +1 -1
- package/dist/assets/skills/project/SKILL.md +1 -1
- package/dist/cli.mjs +6 -6
- package/dist/constants-DI9ybvfY.mjs +2 -0
- package/dist/{dist-Dycch3Bo.mjs → dist-DS-lr0dJ.mjs} +3 -3
- package/dist/{dist-DyAf4V0Q.mjs → dist-DfeFCiM5.mjs} +1 -1
- package/dist/{gh-detect-5m4AdE0N.mjs → gh-detect-CenJLuMO.mjs} +2 -2
- package/dist/index.mjs +1 -1
- package/dist/init-B1gdXQCY.mjs +1 -0
- package/dist/{init-CnuOnNM4.mjs → init-C0ivSgZ8.mjs} +4 -4
- package/dist/loader-CNLvkkvM.mjs +1 -0
- package/dist/{loader-BC1xQQPM.mjs → loader-Cq9-sjAl.mjs} +2 -2
- package/dist/{preview-OyCPPr4x.mjs → preview-BxpJZ3Yd.mjs} +2 -2
- package/dist/preview-fO2q72Jk.mjs +1 -0
- package/dist/public/assets/{ActivityModeContent-Dl8kJCiz.js → ActivityModeContent-BhLDEUEu.js} +1 -1
- package/dist/public/assets/{DocumentContext-ahzUXqR1.js → DocumentContext-BX_sV_R5.js} +3 -3
- package/dist/public/assets/{GraphPanel-BqyJr7H0.js → GraphPanel-BcI5qcvU.js} +1 -1
- package/dist/public/assets/{OpenInAgentMenuRequestContext-Clw6Qq_e.js → OpenInAgentMenuRequestContext-RVOid4N9.js} +3 -3
- package/dist/public/assets/SettingsDialogBody-HMe-8_5H.js +7 -0
- package/dist/public/assets/SourceEditor-CtjBvs7y.js +2 -0
- package/dist/public/assets/{TerminalPanel-CUIIoGHN.js → TerminalPanel-CRRQI35z.js} +1 -1
- package/dist/public/assets/{config-validation-events-Bekqky0D.js → config-validation-events-D83pJzu8.js} +5 -5
- package/dist/public/assets/{dist-Cxvuqvas.js → dist-BOw5J5xw.js} +159 -158
- package/dist/public/assets/index-BLv-umMW.js +2002 -0
- package/dist/public/assets/index-BqjKblAJ.css +1 -0
- package/dist/public/assets/{keyboard-shortcuts-DfWwnTs8.js → keyboard-shortcuts-Cup8f5Fx.js} +1 -1
- package/dist/public/assets/{prop-types-DG4ribF0.js → prop-types-Bu6HzVRz.js} +1 -1
- package/dist/public/assets/{target-navigation-intent-CUr8kqsv.js → target-navigation-intent-Dirj8zkE.js} +1 -1
- package/dist/public/assets/{telemetry-impl-BXM3YshC.js → telemetry-impl-BBCqZg6V.js} +1 -1
- package/dist/public/index.html +9 -9
- package/dist/{repair-launch-json-BYM8CIj6.mjs → repair-launch-json-Ce3TeUe3.mjs} +2 -2
- package/dist/{repair-mcp-configs-BamXpBTG.mjs → repair-mcp-configs-CuapyiV-.mjs} +2 -2
- package/dist/{repair-skills-kKWWiqBy.mjs → repair-skills-BMwoxPAJ.mjs} +2 -2
- package/dist/repair-skills-BTAEHhVs.mjs +1 -0
- package/dist/{server-lock-BpjJj3OD-DJIGZqfz.mjs → server-lock-BpjJj3OD-DWhr5fHw.mjs} +20 -19
- package/dist/server-lock-CyhBidkz-D48N1gMX.mjs +1 -0
- package/dist/{src-pqgJP0A8.mjs → src-CBFTj7fX.mjs} +2 -2
- package/dist/{start-D2qkDoxq.mjs → start-_PTfnYFZ.mjs} +2 -2
- package/dist/start-yX3Bgm1V.mjs +1 -0
- package/dist/{write-project-skill-9crem9HB.mjs → write-project-skill-DVFdi_YZ.mjs} +2 -2
- package/package.json +1 -1
- package/dist/constants-0mGfStNQ.mjs +0 -2
- package/dist/init-BGvWkJT5.mjs +0 -1
- package/dist/loader-zIR0bbiS.mjs +0 -1
- package/dist/preview-BOn8AG6T.mjs +0 -1
- package/dist/public/assets/SettingsDialogBody-BhXgXyf7.js +0 -7
- package/dist/public/assets/SourceEditor-D2O63e1-.js +0 -2
- package/dist/public/assets/index-C0_gw-ES.js +0 -2002
- package/dist/public/assets/index-vvXWe6WY.css +0 -1
- package/dist/repair-skills-Dg0iNFNA.mjs +0 -1
- package/dist/server-lock-CyhBidkz-Bn8GS6ED.mjs +0 -1
- package/dist/start-BitVoQc9.mjs +0 -1
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{o as e}from"./chunk-CFjPhJqf.js";import{a as t,o as n,t as r}from"./compiler-runtime-Cs91PcD2.js";import{D as i,K as a,L as o,O as s,St as c,W as l,_n as u,an as d,cn as f,dn as p,fn as m,gn as h,hn as g,k as _,ln as v,mn as y,pn as b,sn as x,un as S,xt as ee,z as te}from"./DocumentContext-BX_sV_R5.js";import{I as C,Ir as ne,fi as re,tn as w}from"./dist-BOw5J5xw.js";import{l as ie}from"./keyboard-shortcuts-Cup8f5Fx.js";import{$ as T,Dt as ae,Et as E,Ft as D,J as O,Ot as k,P as A,Q as j,Tt as M,X as N,jt as P,pt as F,ut as oe,xt as I}from"./dist-C0jOOVYt.js";import{a as L,d as R,i as z,m as se,n as ce,p as le,u as ue}from"./OpenInAgentMenuRequestContext-RVOid4N9.js";var B=e(t(),1),de=r(),V=class e{constructor(e,t){this.yanchor=e,this.yhead=t}toJSON(){return{yanchor:m(this.yanchor),yhead:m(this.yhead)}}static fromJSON(t){return new e(S(t.yanchor),S(t.yhead))}},H=class{constructor(e,t){this.ytext=e,this.awareness=t,this.undoManager=new x(e)}toYPos(e,t=0){return p(this.ytext,e,t)}fromYPos(e){let t=v(S(e),this.ytext.doc);if(t==null||t.type!==this.ytext)throw Error(`[y-codemirror] The position you want to retrieve was created by a different document`);return{pos:t.index,assoc:t.assoc}}toYRange(e){let t=e.assoc;return new V(this.toYPos(e.anchor,t),this.toYPos(e.head,t))}fromYRange(e){let t=this.fromYPos(e.yanchor),n=this.fromYPos(e.yhead);return t.pos===n.pos?E.cursor(n.pos,n.assoc):E.range(t.pos,n.pos)}},U=k.define({combine(e){return e[e.length-1]}}),W=I.define(),G=class{constructor(e){this.view=e,this.conf=e.state.facet(U),this._observer=(t,n)=>{if(n.origin!==this.conf){let n=t.delta,r=[],i=0;for(let e=0;e<n.length;e++){let t=n[e];t.insert==null?t.delete==null?i+=t.retain:(r.push({from:i,to:i+t.delete,insert:``}),i+=t.delete):r.push({from:i,to:i,insert:t.insert})}e.dispatch({changes:r,annotations:[W.of(this.conf)]})}},this._ytext=this.conf.ytext,this._ytext.observe(this._observer)}update(e){if(!e.docChanged||e.transactions.length>0&&e.transactions[0].annotation(W)===this.conf)return;let t=this.conf.ytext;t.doc.transact(()=>{let n=0;e.changes.iterChanges((e,r,i,a,o)=>{let s=o.sliceString(0,o.length,`
|
|
2
|
+
`);e!==r&&t.delete(e+n,r-e),s.length>0&&t.insert(e+n,s),n+=s.length-(r-e)})},this.conf)}destroy(){this._ytext.unobserve(this._observer)}},K=j.fromClass(G),q=N.baseTheme({".cm-ySelection":{},".cm-yLineSelection":{padding:0,margin:`0px 2px 0px 4px`},".cm-ySelectionCaret":{position:`relative`,borderLeft:`1px solid black`,borderRight:`1px solid black`,marginLeft:`-1px`,marginRight:`-1px`,boxSizing:`border-box`,display:`inline`},".cm-ySelectionCaretDot":{borderRadius:`50%`,position:`absolute`,width:`.4em`,height:`.4em`,top:`-.2em`,left:`-.2em`,backgroundColor:`inherit`,transition:`transform .3s ease-in-out`,boxSizing:`border-box`},".cm-ySelectionCaret:hover > .cm-ySelectionCaretDot":{transformOrigin:`bottom center`,transform:`scale(0)`},".cm-ySelectionInfo":{position:`absolute`,top:`-1.05em`,left:`-1px`,fontSize:`.75em`,fontFamily:`serif`,fontStyle:`normal`,fontWeight:`normal`,lineHeight:`normal`,userSelect:`none`,color:`white`,paddingLeft:`2px`,paddingRight:`2px`,zIndex:101,transition:`opacity .3s ease-in-out`,backgroundColor:`inherit`,opacity:0,transitionDelay:`0s`,whiteSpace:`nowrap`},".cm-ySelectionCaret:hover > .cm-ySelectionInfo":{opacity:1,transitionDelay:`0s`}}),J=I.define(),Y=class extends T{constructor(e,t){super(),this.color=e,this.name=t}toDOM(){return b(`span`,[g(`class`,`cm-ySelectionCaret`),g(`style`,`background-color: ${this.color}; border-color: ${this.color}`)],[y(``),b(`div`,[g(`class`,`cm-ySelectionCaretDot`)]),y(``),b(`div`,[g(`class`,`cm-ySelectionInfo`)],[y(this.name)]),y(``)])}eq(e){return e.color===this.color}compare(e){return e.color===this.color}updateDOM(){return!1}get estimatedHeight(){return-1}ignoreEvent(){return!0}},fe=class{constructor(e){this.conf=e.state.facet(U),this._listener=({added:t,updated:n,removed:r},i,a)=>{t.concat(n).concat(r).findIndex(e=>e!==this.conf.awareness.doc.clientID)>=0&&e.dispatch({annotations:[J.of([])]})},this._awareness=this.conf.awareness,this._awareness.on(`change`,this._listener),this.decorations=P.of([])}destroy(){this._awareness.off(`change`,this._listener)}update(e){let t=this.conf.ytext,n=t.doc,r=this.conf.awareness,i=[],a=this.conf.awareness.getLocalState();if(a!=null){let n=e.view.hasFocus&&e.view.dom.ownerDocument.hasFocus(),i=n?e.state.selection.main:null,o=a.cursor==null?null:S(a.cursor.anchor),s=a.cursor==null?null:S(a.cursor.head);if(i!=null){let e=p(t,i.anchor),n=p(t,i.head);(a.cursor==null||!f(o,e)||!f(s,n))&&r.setLocalStateField(`cursor`,{anchor:e,head:n})}else a.cursor!=null&&n&&r.setLocalStateField(`cursor`,null)}r.getStates().forEach((a,o)=>{if(o===r.doc.clientID)return;let s=a.cursor;if(s==null||s.anchor==null||s.head==null)return;let c=v(s.anchor,n),l=v(s.head,n);if(c==null||l==null||c.type!==t||l.type!==t)return;let{color:d=`#30bced`,name:f=`Anonymous`}=a.user||{},p=a.user&&a.user.colorLight||d+`33`,m=u(c.index,l.index),g=h(c.index,l.index),_=e.view.state.doc.lineAt(m),y=e.view.state.doc.lineAt(g);if(_.number===y.number)i.push({from:m,to:g,value:O.mark({attributes:{style:`background-color: ${p}`},class:`cm-ySelection`})});else{i.push({from:m,to:_.from+_.length,value:O.mark({attributes:{style:`background-color: ${p}`},class:`cm-ySelection`})}),i.push({from:y.from,to:g,value:O.mark({attributes:{style:`background-color: ${p}`},class:`cm-ySelection`})});for(let t=_.number+1;t<y.number;t++){let n=e.view.state.doc.line(t).from;i.push({from:n,to:n,value:O.line({attributes:{style:`background-color: ${p}`,class:`cm-yLineSelection`}})})}}i.push({from:l.index,to:l.index,value:O.widget({side:l.index-c.index>0?-1:1,block:!1,widget:new Y(d,f)})})}),this.decorations=O.set(i,!0)}},pe=j.fromClass(fe,{decorations:e=>e.decorations}),me=class{constructor(e){this.undoManager=e}addTrackedOrigin(e){this.undoManager.addTrackedOrigin(e)}removeTrackedOrigin(e){this.undoManager.removeTrackedOrigin(e)}undo(){return this.undoManager.undo()!=null}redo(){return this.undoManager.redo()!=null}},X=k.define({combine(e){return e[e.length-1]}});I.define();var he=class{constructor(e){this.view=e,this.conf=e.state.facet(X),this._undoManager=this.conf.undoManager,this.syncConf=e.state.facet(U),this._beforeChangeSelection=null,this._mux=d(),this._onStackItemAdded=({stackItem:e,changedParentTypes:t})=>{t.has(this.syncConf.ytext)&&this._beforeChangeSelection&&!e.meta.has(this)&&e.meta.set(this,this._beforeChangeSelection)},this._onStackItemPopped=({stackItem:t})=>{let n=t.meta.get(this);if(n){let t=this.syncConf.fromYRange(n);e.dispatch(e.state.update({selection:t,effects:[N.scrollIntoView(t)]})),this._storeSelection()}},this._storeSelection=()=>{this._beforeChangeSelection=this.syncConf.toYRange(this.view.state.selection.main)},this._undoManager.on(`stack-item-added`,this._onStackItemAdded),this._undoManager.on(`stack-item-popped`,this._onStackItemPopped),this._undoManager.addTrackedOrigin(this.syncConf)}update(e){e.selectionSet&&(e.transactions.length===0||e.transactions[0].annotation(W)!==this.syncConf)&&this._storeSelection()}destroy(){this._undoManager.off(`stack-item-added`,this._onStackItemAdded),this._undoManager.off(`stack-item-popped`,this._onStackItemPopped),this._undoManager.removeTrackedOrigin(this.syncConf)}},ge=j.fromClass(he),_e=({state:e,dispatch:t})=>e.facet(X).undo()||!0,ve=({state:e,dispatch:t})=>e.facet(X).redo()||!0,ye=(e,t,{undoManager:n=new x(e)}={})=>{let r=new H(e,t),i=[U.of(r),K];return t&&i.push(q,pe),n!==!1&&i.push(X.of(new me(n)),ge,N.domEventHandlers({beforeinput(e,t){return e.inputType===`historyUndo`?_e(t):e.inputType===`historyRedo`?ve(t):!1}})),i},be=O.mark({class:`cm-link-ref-broken`}),Z=/^\s{0,3}\[([^\]]+)\]:\s/,Q=/\[([^\]]*)\]\[([^\]]*)\]/g,xe=new Set([`FencedCode`,`CodeBlock`,`InlineCode`]);function $(e,t){let n=0,r=t.length-1;for(;n<=r;){let i=n+r>>1,a=t[i];if(e<a.from)r=i-1;else if(e>=a.to)n=i+1;else return!0}return!1}function Se(e){let t=[];return A(e).iterate({enter(e){if(xe.has(e.name))return t.push({from:e.from,to:e.to}),!1}}),t.sort((e,t)=>e.from-t.from),t}function Ce(e){let t=new Set,n=[],r=e.doc,i=Se(e);for(let e=1;e<=r.lines;e++){let n=r.line(e);if($(n.from,i))continue;let a=Z.exec(n.text);a&&t.add(a[1].toLowerCase())}for(let e=1;e<=r.lines;e++){let t=r.line(e);if(!$(t.from,i)&&!Z.test(t.text))for(Q.lastIndex=0;;){let e=Q.exec(t.text);if(!e)break;let r=t.from+e.index;if($(r,i))continue;let a=e[2]||e[1];n.push({from:r,to:r+e[0].length,label:a.toLowerCase()})}}let a=[];for(let e of n)t.has(e.label)||a.push(be.range(e.from,e.to));return a.sort((e,t)=>e.from-t.from),O.set(a)}var we=D.define({create(e){return Ce(e)},update(e,t){return t.docChanged?Ce(t.state):e},provide:e=>N.decorations.from(e)}),Te=/^(\s*(?:[-*+]|\d+[.)]) (?:\[[ x]\] )?)/,Ee=O.mark({class:`cm-del`}),De=O.line({class:`cm-table-header`,attributes:{style:`--list-hang: 2ch`}}),Oe=O.line({class:`cm-table-row`,attributes:{style:`--list-hang: 2ch`}});function ke(e){let t=0;for(let n of e)if(n===` `)t++;else if(n===` `)t+=4;else break;return t}function Ae(e){if(e.doc.lines<2)return null;let t=e.doc.line(1);if(!C.test(t.text))return null;for(let n=2;n<=e.doc.lines;n++){let r=e.doc.line(n);if(C.test(r.text))return{from:t.from,to:r.to}}return null}function je(e,t){let n=[],r=A(e),i=Ae(e),a=e=>i!==null&&e>=i.from&&e<=i.to;for(let{from:i,to:o}of t)r.iterate({from:i,to:o,enter(t){if(!a(t.from)){if(t.name===`Strikethrough`){let e=t.from,r=t.to,i=t.node.cursor();if(i.firstChild())do i.name===`StrikethroughMark`&&(i.from===t.from?e=i.to:r=i.from);while(i.nextSibling());return e<r&&n.push(Ee.range(e,r)),!1}if(t.name===`ListItem`){let r=e.doc.lineAt(t.from),i=Te.exec(r.text),a=i?i[1].length:2,o=O.line({class:`cm-list-item`,attributes:{style:`--list-hang: ${a}ch`}});n.push(o.range(r.from));return}if(t.name===`FencedCode`){let r=e.doc.lineAt(t.from),i=e.doc.lineAt(t.to);for(let t=r.number+1;t<i.number;t++){let r=e.doc.line(t),i=ke(r.text),a=O.line({class:`cm-fenced-code-line`,attributes:{style:`--line-indent: ${i}`}});n.push(a.range(r.from))}return!1}if(t.name===`TableHeader`){let r=e.doc.lineAt(t.from);return n.push(De.range(r.from)),!1}if(t.name===`TableRow`){let r=e.doc.lineAt(t.from);return n.push(Oe.range(r.from)),!1}if(t.name===`TableDelimiter`&&t.node.parent?.name===`Table`){let r=e.doc.lineAt(t.from);return n.push(Oe.range(r.from)),!1}}}});return n.sort((e,t)=>e.from-t.from||e.value.startSide-t.value.startSide),O.set(n)}var Me=class{decorations;constructor(e){this.decorations=je(e.state,e.visibleRanges)}update(e){(e.docChanged||e.viewportChanged||A(e.startState)!==A(e.state))&&(this.decorations=je(e.view.state,e.view.visibleRanges))}},Ne=j.fromClass(Me,{decorations:e=>e.decorations});function Pe(){return[Ne,we]}var Fe=n(),Ie=56;function Le(e,t){let n=e.state.doc,r=1;if(n.lines>=1&&C.test(n.line(1).text)){for(let e=2;e<=n.lines;e++)if(C.test(n.line(e).text)){r=e+1;break}}let i=w(),a=0;for(let o=r;o<=n.lines;o++){let r=n.line(o);if(!i(r.text)&&/^#{1,6}\s/.test(r.text)){if(a===t.index){e.dispatch({selection:E.cursor(r.from),effects:N.scrollIntoView(r.from,{y:`start`})}),e.focus();return}a++}}}function Re(e,t){requestAnimationFrame(()=>{let n=e.state.doc,r=Math.min(t.offset,n.length);e.dispatch({selection:E.cursor(r),effects:N.scrollIntoView(r,{y:`center`})}),e.focus()})}function ze(e){let t=e.state.selection.main;return t.empty?``:e.state.sliceDoc(t.from,t.to)}function Be(e){let t=(0,de.c)(36),{docName:n,ytext:r,provider:o,placeholder:u,isSourceModeActive:d}=e,f=(0,B.useRef)(null),p=(0,B.useRef)(null),[m,h]=(0,B.useState)(null);if(m)throw m;let{resolvedTheme:g}=re(),{merged:v}=te(),{openSelection:y}=ce(),b=(0,B.useRef)(y),x=(0,B.useRef)(d),S=v?.editor?.wordWrap??!0,C,w;t[0]===y?(C=t[1],w=t[2]):(C=()=>{b.current=y},w=[y],t[0]=y,t[1]=C,t[2]=w),(0,B.useEffect)(C,w);let T,E;t[3]===d?(T=t[4],E=t[5]):(T=()=>{x.current=d},E=[d],t[3]=d,t[4]=T,t[5]=E),(0,B.useEffect)(T,E);let D=(0,B.useRef)(null),O;t[6]!==u||t[7]!==o||t[8]!==g||t[9]!==S||t[10]!==r?(O=()=>{let e=f.current;if(!e)return;let t=o.configuration.name??``,n,s=He;try{n=ee({docName:t,container:e,sizeStats:{viewCount:0,bytes:r.length},factory:e=>{let n=null,c=a({ydoc:o.document,ytext:r}),d=new M,f=new M,p=new M,m=new N({state:ae.create({doc:r.toString(),extensions:[ue,oe.of([l]),ye(r,o.awareness),...i({themeCompartment:d,resolvedTheme:g,ydoc:o.document,wordWrapCompartment:f,wordWrap:S}),Pe(),c,N.updateListener.of(e=>{!e.selectionSet&&!e.docChanged||(n!==null&&clearTimeout(n),n=setTimeout(()=>{n=null,z(t,`source`,L(e.view))},120))}),N.domEventHandlers({keydown:(e,n)=>!x.current||!ne()||!ie(e,`edit-with-ai`)?!1:(e.preventDefault(),e.stopPropagation(),e.stopImmediatePropagation(),b.current({docName:t,instruction:``,selectionMarkdown:ze(n)}),!0)}),p.of(F(u??``)),N.theme({"&":{height:`100%`}}),N.scrollMargins.of(Ve)]}),parent:e});z(t,`source`,L(m));let h=m.contentDOM;return h.addEventListener(`keydown`,s),h.addEventListener(`paste`,s),h.addEventListener(`drop`,s),h.addEventListener(`cut`,s),{view:m,ydoc:o.document,ytext:r,provider:o,themeCompartment:d,wordWrapCompartment:f,placeholderCompartment:p}}}),D.current=n,p.current=n.view}catch(e){let t=e;console.error(`[SourceEditor] mountCmEditor failed`,t),D.current=null,p.current=null,h(t instanceof Error?t:Error(String(t)))}return()=>{let e=D.current;e&&c(e),D.current=null,p.current=null}},t[6]=u,t[7]=o,t[8]=g,t[9]=S,t[10]=r,t[11]=O):O=t[11];let k;t[12]!==o||t[13]!==r?(k=[r,o],t[12]=o,t[13]=r,t[14]=k):k=t[14],(0,B.useEffect)(O,k);let A,j;t[15]===n?(A=t[16],j=t[17]):(A=()=>{},j=[n],t[15]=n,t[16]=A,t[17]=j),(0,B.useEffect)(A,j);let P,I;t[18]===g?(P=t[19],I=t[20]):(I=()=>{let e=D.current;e&&e.view.dispatch({effects:e.themeCompartment.reconfigure(g===`dark`?s:_)})},P=[g],t[18]=g,t[19]=P,t[20]=I),(0,B.useEffect)(I,P);let V,H;t[21]===S?(V=t[22],H=t[23]):(V=()=>{let e=D.current;e&&e.view.dispatch({effects:e.wordWrapCompartment.reconfigure(S?N.lineWrapping:[])})},H=[S],t[21]=S,t[22]=V,t[23]=H),(0,B.useEffect)(V,H);let U,W;t[24]===u?(U=t[25],W=t[26]):(U=()=>{let e=D.current;e&&e.view.dispatch({effects:e.placeholderCompartment.reconfigure(F(u??``))})},W=[u],t[24]=u,t[25]=U,t[26]=W),(0,B.useEffect)(U,W);let G,K;t[27]!==n||t[28]!==d?(G=()=>{let e=function(e){let t=e.detail;if(!t||t.mode!==`source`||!d)return;let r=p.current;r&&(Le(r,t),le(n))};return window.addEventListener(R,e),()=>window.removeEventListener(R,e)},K=[n,d],t[27]=n,t[28]=d,t[29]=G,t[30]=K):(G=t[29],K=t[30]),(0,B.useEffect)(G,K);let q,J;t[31]!==n||t[32]!==d?(q=()=>{if(!d)return;let e=p.current;if(!e)return;let t=se(n);if(t){if(t.kind===`outline`){Le(e,t.detail);return}Re(e,t.detail)}},J=[n,d],t[31]=n,t[32]=d,t[33]=q,t[34]=J):(q=t[33],J=t[34]),(0,B.useEffect)(q,J);let Y;return t[35]===Symbol.for(`react.memo_cache_sentinel`)?(Y=(0,Fe.jsx)(`div`,{ref:f,className:`source-editor h-full pb-3`}),t[35]=Y):Y=t[35],Y}function Ve(){return{top:Ie}}function He(){return o()}export{Be as SourceEditor};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{o as e}from"./chunk-CFjPhJqf.js";import{a as t,i as n,o as r,t as i}from"./compiler-runtime-Cs91PcD2.js";import{Ft as a,fi as o,yt as s}from"./dist-
|
|
1
|
+
import{o as e}from"./chunk-CFjPhJqf.js";import{a as t,i as n,o as r,t as i}from"./compiler-runtime-Cs91PcD2.js";import{Ft as a,fi as o,yt as s}from"./dist-BOw5J5xw.js";import{l as c,t as l}from"./button-CmLxDlCv.js";import{n as u,r as d}from"./dist-DuNRfJxD.js";import{t as f}from"./terminal-theme-BhdZI3O9.js";var p=i(),m=2,h=1,g=class{activate(e){this._terminal=e}dispose(){}fit(){let e=this.proposeDimensions();if(!e||!this._terminal||isNaN(e.cols)||isNaN(e.rows))return;let t=this._terminal._core;(this._terminal.rows!==e.rows||this._terminal.cols!==e.cols)&&(t._renderService.clear(),this._terminal.resize(e.cols,e.rows))}proposeDimensions(){if(!this._terminal||!this._terminal.element||!this._terminal.element.parentElement)return;let e=this._terminal._core._renderService.dimensions;if(e.css.cell.width===0||e.css.cell.height===0)return;let t=this._terminal.options.scrollback===0?0:this._terminal.options.overviewRuler?.width||14,n=window.getComputedStyle(this._terminal.element.parentElement),r=parseInt(n.getPropertyValue(`height`)),i=Math.max(0,parseInt(n.getPropertyValue(`width`))),a=window.getComputedStyle(this._terminal.element),o={top:parseInt(a.getPropertyValue(`padding-top`)),bottom:parseInt(a.getPropertyValue(`padding-bottom`)),right:parseInt(a.getPropertyValue(`padding-right`)),left:parseInt(a.getPropertyValue(`padding-left`))},s=o.top+o.bottom,c=o.right+o.left,l=r-s,u=i-c-t;return{cols:Math.max(m,Math.floor(u/e.css.cell.width)),rows:Math.max(h,Math.floor(l/e.css.cell.height))}}},_=[[768,879],[1155,1158],[1160,1161],[1425,1469],[1471,1471],[1473,1474],[1476,1477],[1479,1479],[1536,1539],[1552,1557],[1611,1630],[1648,1648],[1750,1764],[1767,1768],[1770,1773],[1807,1807],[1809,1809],[1840,1866],[1958,1968],[2027,2035],[2305,2306],[2364,2364],[2369,2376],[2381,2381],[2385,2388],[2402,2403],[2433,2433],[2492,2492],[2497,2500],[2509,2509],[2530,2531],[2561,2562],[2620,2620],[2625,2626],[2631,2632],[2635,2637],[2672,2673],[2689,2690],[2748,2748],[2753,2757],[2759,2760],[2765,2765],[2786,2787],[2817,2817],[2876,2876],[2879,2879],[2881,2883],[2893,2893],[2902,2902],[2946,2946],[3008,3008],[3021,3021],[3134,3136],[3142,3144],[3146,3149],[3157,3158],[3260,3260],[3263,3263],[3270,3270],[3276,3277],[3298,3299],[3393,3395],[3405,3405],[3530,3530],[3538,3540],[3542,3542],[3633,3633],[3636,3642],[3655,3662],[3761,3761],[3764,3769],[3771,3772],[3784,3789],[3864,3865],[3893,3893],[3895,3895],[3897,3897],[3953,3966],[3968,3972],[3974,3975],[3984,3991],[3993,4028],[4038,4038],[4141,4144],[4146,4146],[4150,4151],[4153,4153],[4184,4185],[4448,4607],[4959,4959],[5906,5908],[5938,5940],[5970,5971],[6002,6003],[6068,6069],[6071,6077],[6086,6086],[6089,6099],[6109,6109],[6155,6157],[6313,6313],[6432,6434],[6439,6440],[6450,6450],[6457,6459],[6679,6680],[6912,6915],[6964,6964],[6966,6970],[6972,6972],[6978,6978],[7019,7027],[7616,7626],[7678,7679],[8203,8207],[8234,8238],[8288,8291],[8298,8303],[8400,8431],[12330,12335],[12441,12442],[43014,43014],[43019,43019],[43045,43046],[64286,64286],[65024,65039],[65056,65059],[65279,65279],[65529,65531]],v=[[68097,68099],[68101,68102],[68108,68111],[68152,68154],[68159,68159],[119143,119145],[119155,119170],[119173,119179],[119210,119213],[119362,119364],[917505,917505],[917536,917631],[917760,917999]],y;function b(e,t){let n=0,r=t.length-1,i;if(e<t[0][0]||e>t[r][1])return!1;for(;r>=n;)if(i=n+r>>1,e>t[i][1])n=i+1;else if(e<t[i][0])r=i-1;else return!0;return!1}var x=class{constructor(){if(this.version=`6`,!y){y=new Uint8Array(65536),y.fill(1),y[0]=0,y.fill(0,1,32),y.fill(0,127,160),y.fill(2,4352,4448),y[9001]=2,y[9002]=2,y.fill(2,11904,42192),y[12351]=1,y.fill(2,44032,55204),y.fill(2,63744,64256),y.fill(2,65040,65050),y.fill(2,65072,65136),y.fill(2,65280,65377),y.fill(2,65504,65511);for(let e=0;e<_.length;++e)y.fill(0,_[e][0],_[e][1]+1)}}wcwidth(e){return e<32?0:e<127?1:e<65536?y[e]:b(e,v)?0:e>=131072&&e<=196605||e>=196608&&e<=262141?2:1}charProperties(e,t){let n=this.wcwidth(e),r=n===0&&t!==0;if(r){let e=He.extractWidth(t);e===0?r=!1:e>n&&(n=e)}return He.createPropertyValue(0,n,r)}},S=new class{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(e){setTimeout(()=>{throw e.stack?E.isErrorNoTelemetry(e)?new E(e.message+`
|
|
2
2
|
|
|
3
3
|
`+e.stack):Error(e.message+`
|
|
4
4
|
|