@supanadit/morse-web 0.13.0 → 0.14.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/README.md +53 -10
- package/dist/server.mjs +698 -86
- package/dist/server.mjs.map +4 -4
- package/dist/ui/3rdpartylicenses.txt +4 -4
- package/dist/ui/{chunk-D1etuzzZ.js → chunk-BDxa4PZ6.js} +1 -1
- package/dist/ui/{chunk-CVTlMVVu.js → chunk-BLn-qnxQ.js} +1 -1
- package/dist/ui/{chunk-ourdPesa.js → chunk-fviAHFag.js} +1 -1
- package/dist/ui/index.html +1 -1
- package/dist/ui/main-YPK6Y6LK.js +120 -0
- package/dist/ui/webview.manifest.json +3 -3
- package/package.json +12 -1
- package/dist/ui/main-TLDRX4Y6.js +0 -120
|
@@ -631,10 +631,10 @@ Redistribution and use in source and binary forms, with or without modification,
|
|
|
631
631
|
This software is provided by the copyright holders and contributors “as is” and any express or implied warranties, including, but not limited to, the implied warranties of merchantability and fitness for a particular purpose are disclaimed. In no event shall the copyright owner or contributors be liable for any direct, indirect, incidental, special, exemplary, or consequential damages (including, but not limited to, procurement of substitute goods or services; loss of use, data, or profits; or business interruption) however caused and on any theory of liability, whether in contract, strict liability, or tort (including negligence or otherwise) arising in any way out of the use of this software, even if advised of the possibility of such damage.
|
|
632
632
|
|
|
633
633
|
--------------------------------------------------------------------------------
|
|
634
|
-
Package: @xterm/addon-
|
|
634
|
+
Package: @xterm/addon-webgl
|
|
635
635
|
License: "MIT"
|
|
636
636
|
|
|
637
|
-
Copyright (c)
|
|
637
|
+
Copyright (c) 2018, The xterm.js authors (https://github.com/xtermjs/xterm.js)
|
|
638
638
|
|
|
639
639
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
640
640
|
of this software and associated documentation files (the "Software"), to deal
|
|
@@ -655,10 +655,10 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
|
655
655
|
THE SOFTWARE.
|
|
656
656
|
|
|
657
657
|
--------------------------------------------------------------------------------
|
|
658
|
-
Package: @xterm/addon-
|
|
658
|
+
Package: @xterm/addon-fit
|
|
659
659
|
License: "MIT"
|
|
660
660
|
|
|
661
|
-
Copyright (c)
|
|
661
|
+
Copyright (c) 2019, The xterm.js authors (https://github.com/xtermjs/xterm.js)
|
|
662
662
|
|
|
663
663
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
664
664
|
of this software and associated documentation files (the "Software"), to deal
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{n as t}from"./main-
|
|
1
|
+
import{n as t}from"./main-YPK6Y6LK.js";var Ae=t((_e,pe)=>{(function(ue,Q){typeof _e==`object`&&typeof pe==`object`?pe.exports=Q():typeof define==`function`&&define.amd?define([],Q):typeof _e==`object`?_e.WebglAddon=Q():ue.WebglAddon=Q()})(self,(()=>(()=>{"use strict";var ue={965:(D,e,c)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.GlyphRenderer=void 0;let l=c(374),o=c(509),r=c(855),d=c(859),m=c(381),_=11,i=_*Float32Array.BYTES_PER_ELEMENT,t,g=0,R=0,C=0;class b extends d.Disposable{constructor(n,p,u,h){super(),this._terminal=n,this._gl=p,this._dimensions=u,this._optionsService=h,this._activeBuffer=0,this._vertices={count:0,attributes:new Float32Array(0),attributesBuffers:[new Float32Array(0),new Float32Array(0)]};let s=this._gl;o.TextureAtlas.maxAtlasPages===void 0&&(o.TextureAtlas.maxAtlasPages=Math.min(32,(0,l.throwIfFalsy)(s.getParameter(s.MAX_TEXTURE_IMAGE_UNITS))),o.TextureAtlas.maxTextureSize=(0,l.throwIfFalsy)(s.getParameter(s.MAX_TEXTURE_SIZE))),this._program=(0,l.throwIfFalsy)((0,m.createProgram)(s,`#version 300 es
|
|
2
2
|
layout (location = 0) in vec2 a_unitquad;
|
|
3
3
|
layout (location = 1) in vec2 a_cellpos;
|
|
4
4
|
layout (location = 2) in vec2 a_offset;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as t}from"./main-
|
|
1
|
+
import{n as t}from"./main-YPK6Y6LK.js";var f=t((n,o)=>{(function(i,t){typeof n==`object`&&typeof o==`object`?o.exports=t():typeof define==`function`&&define.amd?define([],t):typeof n==`object`?n.FitAddon=t():i.FitAddon=t()})(self,(()=>(()=>{"use strict";var i={};return(()=>{var t=i;Object.defineProperty(t,"__esModule",{value:!0}),t.FitAddon=void 0,t.FitAddon=class{activate(e){this._terminal=e}dispose(){}fit(){let e=this.proposeDimensions();if(!e||!this._terminal||isNaN(e.cols)||isNaN(e.rows))return;let r=this._terminal._core;this._terminal.rows===e.rows&&this._terminal.cols===e.cols||(r._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,r=e._renderService.dimensions;if(r.css.cell.width===0||r.css.cell.height===0)return;let a=this._terminal.options.scrollback===0?0:e.viewport.scrollBarWidth,l=window.getComputedStyle(this._terminal.element.parentElement),d=parseInt(l.getPropertyValue(`height`)),c=Math.max(0,parseInt(l.getPropertyValue(`width`))),s=window.getComputedStyle(this._terminal.element),p=d-(parseInt(s.getPropertyValue(`padding-top`))+parseInt(s.getPropertyValue(`padding-bottom`))),h=c-(parseInt(s.getPropertyValue(`padding-right`))+parseInt(s.getPropertyValue(`padding-left`)))-a;return{cols:Math.max(2,Math.floor(h/r.css.cell.width)),rows:Math.max(1,Math.floor(p/r.css.cell.height))}}}})(),i})()))});var chunk_JYMMYQCO_default=f();export{chunk_JYMMYQCO_default as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{n as t,t as r}from"./main-
|
|
1
|
+
import{n as t,t as r}from"./main-YPK6Y6LK.js";var Se=t((ce,ve)=>{(function(le,ee){if(typeof ce==`object`&&typeof ve==`object`)ve.exports=ee();else if(typeof define==`function`&&define.amd)define([],ee);else{var J=ee();for(var te in J)(typeof ce==`object`?ce:le)[te]=J[te]}})(globalThis,(()=>(()=>{"use strict";var le={4567:function(O,r,o){var l=this&&this.__decorate||function(e,t,a,u){var _,p=arguments.length,c=p<3?t:u===null?u=Object.getOwnPropertyDescriptor(t,a):u;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)c=Reflect.decorate(e,t,a,u);else for(var m=e.length-1;m>=0;m--)(_=e[m])&&(c=(p<3?_(c):p>3?_(t,a,c):_(t,a))||c);return p>3&&c&&Object.defineProperty(t,a,c),c},f=this&&this.__param||function(e,t){return function(a,u){t(a,u,e)}};Object.defineProperty(r,"__esModule",{value:!0}),r.AccessibilityManager=void 0;let n=o(9042),d=o(9924),v=o(844),g=o(4725),h=o(2585),i=o(3656),s=r.AccessibilityManager=class extends v.Disposable{constructor(e,t,a,u){super(),this._terminal=e,this._coreBrowserService=a,this._renderService=u,this._rowColumns=new WeakMap,this._liveRegionLineCount=0,this._charsToConsume=[],this._charsToAnnounce=``,this._accessibilityContainer=this._coreBrowserService.mainDocument.createElement(`div`),this._accessibilityContainer.classList.add(`xterm-accessibility`),this._rowContainer=this._coreBrowserService.mainDocument.createElement(`div`),this._rowContainer.setAttribute(`role`,`list`),this._rowContainer.classList.add(`xterm-accessibility-tree`),this._rowElements=[];for(let _=0;_<this._terminal.rows;_++)this._rowElements[_]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[_]);if(this._topBoundaryFocusListener=_=>this._handleBoundaryFocus(_,0),this._bottomBoundaryFocusListener=_=>this._handleBoundaryFocus(_,1),this._rowElements[0].addEventListener(`focus`,this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener(`focus`,this._bottomBoundaryFocusListener),this._refreshRowsDimensions(),this._accessibilityContainer.appendChild(this._rowContainer),this._liveRegion=this._coreBrowserService.mainDocument.createElement(`div`),this._liveRegion.classList.add(`live-region`),this._liveRegion.setAttribute(`aria-live`,`assertive`),this._accessibilityContainer.appendChild(this._liveRegion),this._liveRegionDebouncer=this.register(new d.TimeBasedDebouncer(this._renderRows.bind(this))),!this._terminal.element)throw new Error(`Cannot enable accessibility before Terminal.open`);this._terminal.element.insertAdjacentElement(`afterbegin`,this._accessibilityContainer),this.register(this._terminal.onResize((_=>this._handleResize(_.rows)))),this.register(this._terminal.onRender((_=>this._refreshRows(_.start,_.end)))),this.register(this._terminal.onScroll((()=>this._refreshRows()))),this.register(this._terminal.onA11yChar((_=>this._handleChar(_)))),this.register(this._terminal.onLineFeed((()=>this._handleChar(`
|
|
2
2
|
`)))),this.register(this._terminal.onA11yTab((_=>this._handleTab(_)))),this.register(this._terminal.onKey((_=>this._handleKey(_.key)))),this.register(this._terminal.onBlur((()=>this._clearLiveRegion()))),this.register(this._renderService.onDimensionsChange((()=>this._refreshRowsDimensions()))),this.register((0,i.addDisposableDomListener)(document,`selectionchange`,(()=>this._handleSelectionChange()))),this.register(this._coreBrowserService.onDprChange((()=>this._refreshRowsDimensions()))),this._refreshRows(),this.register((0,v.toDisposable)((()=>{this._accessibilityContainer.remove(),this._rowElements.length=0})))}_handleTab(e){for(let t=0;t<e;t++)this._handleChar(` `)}_handleChar(e){this._liveRegionLineCount<21&&(this._charsToConsume.length>0?this._charsToConsume.shift()!==e&&(this._charsToAnnounce+=e):this._charsToAnnounce+=e,e===`
|
|
3
3
|
`&&(this._liveRegionLineCount++,this._liveRegionLineCount===21&&(this._liveRegion.textContent+=n.tooMuchOutput)))}_clearLiveRegion(){this._liveRegion.textContent=``,this._liveRegionLineCount=0}_handleKey(e){this._clearLiveRegion(),new RegExp(`\\p{Control}`,`u`).test(e)||this._charsToConsume.push(e)}_refreshRows(e,t){this._liveRegionDebouncer.refresh(e,t,this._terminal.rows)}_renderRows(e,t){let a=this._terminal.buffer,u=a.lines.length.toString();for(let _=e;_<=t;_++){let p=a.lines.get(a.ydisp+_),c=[],m=p?.translateToString(!0,void 0,void 0,c)||``,E=(a.ydisp+_+1).toString(),k=this._rowElements[_];k&&(m.length===0?(k.innerText=`\xA0`,this._rowColumns.set(k,[0,1])):(k.textContent=m,this._rowColumns.set(k,c)),k.setAttribute(`aria-posinset`,E),k.setAttribute(`aria-setsize`,u))}this._announceCharacters()}_announceCharacters(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce=``)}_handleBoundaryFocus(e,t){let a=e.target,u=this._rowElements[t===0?1:this._rowElements.length-2];if(a.getAttribute(`aria-posinset`)===(t===0?`1`:`${this._terminal.buffer.lines.length}`)||e.relatedTarget!==u)return;let _,p;if(t===0?(_=a,p=this._rowElements.pop(),this._rowContainer.removeChild(p)):(_=this._rowElements.shift(),p=a,this._rowContainer.removeChild(_)),_.removeEventListener(`focus`,this._topBoundaryFocusListener),p.removeEventListener(`focus`,this._bottomBoundaryFocusListener),t===0){let c=this._createAccessibilityTreeNode();this._rowElements.unshift(c),this._rowContainer.insertAdjacentElement(`afterbegin`,c)}else{let c=this._createAccessibilityTreeNode();this._rowElements.push(c),this._rowContainer.appendChild(c)}this._rowElements[0].addEventListener(`focus`,this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener(`focus`,this._bottomBoundaryFocusListener),this._terminal.scrollLines(t===0?-1:1),this._rowElements[t===0?1:this._rowElements.length-2].focus(),e.preventDefault(),e.stopImmediatePropagation()}_handleSelectionChange(){if(this._rowElements.length===0)return;let e=document.getSelection();if(!e)return;if(e.isCollapsed)return void(this._rowContainer.contains(e.anchorNode)&&this._terminal.clearSelection());if(!e.anchorNode||!e.focusNode)return void console.error(`anchorNode and/or focusNode are null`);let t={node:e.anchorNode,offset:e.anchorOffset},a={node:e.focusNode,offset:e.focusOffset};if((t.node.compareDocumentPosition(a.node)&Node.DOCUMENT_POSITION_PRECEDING||t.node===a.node&&t.offset>a.offset)&&([t,a]=[a,t]),t.node.compareDocumentPosition(this._rowElements[0])&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_FOLLOWING)&&(t={node:this._rowElements[0].childNodes[0],offset:0}),!this._rowContainer.contains(t.node))return;let u=this._rowElements.slice(-1)[0];if(a.node.compareDocumentPosition(u)&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_PRECEDING)&&(a={node:u,offset:u.textContent?.length??0}),!this._rowContainer.contains(a.node))return;let _=({node:m,offset:E})=>{let k=m instanceof Text?m.parentNode:m,D=parseInt(k?.getAttribute(`aria-posinset`),10)-1;if(isNaN(D))return console.warn(`row is invalid. Race condition?`),null;let b=this._rowColumns.get(k);if(!b)return console.warn(`columns is null. Race condition?`),null;let x=E<b.length?b[E]:b.slice(-1)[0]+1;return x>=this._terminal.cols&&(++D,x=0),{row:D,column:x}},p=_(t),c=_(a);if(p&&c){if(p.row>c.row||p.row===c.row&&p.column>=c.column)throw new Error(`invalid range`);this._terminal.select(p.column,p.row,(c.row-p.row)*this._terminal.cols-p.column+c.column)}}_handleResize(e){this._rowElements[this._rowElements.length-1].removeEventListener(`focus`,this._bottomBoundaryFocusListener);for(let t=this._rowContainer.children.length;t<this._terminal.rows;t++)this._rowElements[t]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[t]);for(;this._rowElements.length>e;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener(`focus`,this._bottomBoundaryFocusListener),this._refreshRowsDimensions()}_createAccessibilityTreeNode(){let e=this._coreBrowserService.mainDocument.createElement(`div`);return e.setAttribute(`role`,`listitem`),e.tabIndex=-1,this._refreshRowDimensions(e),e}_refreshRowsDimensions(){if(this._renderService.dimensions.css.cell.height){this._accessibilityContainer.style.width=`${this._renderService.dimensions.css.canvas.width}px`,this._rowElements.length!==this._terminal.rows&&this._handleResize(this._terminal.rows);for(let e=0;e<this._terminal.rows;e++)this._refreshRowDimensions(this._rowElements[e])}}_refreshRowDimensions(e){e.style.height=`${this._renderService.dimensions.css.cell.height}px`}};r.AccessibilityManager=s=l([f(1,h.IInstantiationService),f(2,g.ICoreBrowserService),f(3,g.IRenderService)],s)},3614:(O,r)=>{function o(d){return d.replace(/\r?\n/g,`\r`)}function l(d,v){return v?`\x1B[200~`+d+`\x1B[201~`:d}function f(d,v,g,h){d=l(d=o(d),g.decPrivateModes.bracketedPasteMode&&h.rawOptions.ignoreBracketedPasteMode!==!0),g.triggerDataEvent(d,!0),v.value=``}function n(d,v,g){let h=g.getBoundingClientRect(),i=d.clientX-h.left-10,s=d.clientY-h.top-10;v.style.width=`20px`,v.style.height=`20px`,v.style.left=`${i}px`,v.style.top=`${s}px`,v.style.zIndex=`1000`,v.focus()}Object.defineProperty(r,"__esModule",{value:!0}),r.rightClickHandler=r.moveTextAreaUnderMouseCursor=r.paste=r.handlePasteEvent=r.copyHandler=r.bracketTextForPaste=r.prepareTextForTerminal=void 0,r.prepareTextForTerminal=o,r.bracketTextForPaste=l,r.copyHandler=function(d,v){d.clipboardData&&d.clipboardData.setData(`text/plain`,v.selectionText),d.preventDefault()},r.handlePasteEvent=function(d,v,g,h){d.stopPropagation(),d.clipboardData&&f(d.clipboardData.getData(`text/plain`),v,g,h)},r.paste=f,r.moveTextAreaUnderMouseCursor=n,r.rightClickHandler=function(d,v,g,h,i){n(d,v,g),i&&h.rightClickSelect(d),v.value=h.selectionText,v.select()}},7239:(O,r,o)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.ColorContrastCache=void 0;let l=o(1505);r.ColorContrastCache=class{constructor(){this._color=new l.TwoKeyMap,this._css=new l.TwoKeyMap}setCss(f,n,d){this._css.set(f,n,d)}getCss(f,n){return this._css.get(f,n)}setColor(f,n,d){this._color.set(f,n,d)}getColor(f,n){return this._color.get(f,n)}clear(){this._color.clear(),this._css.clear()}}},3656:(O,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.addDisposableDomListener=void 0,r.addDisposableDomListener=function(o,l,f,n){o.addEventListener(l,f,n);let d=!1;return{dispose:()=>{d||(d=!0,o.removeEventListener(l,f,n))}}}},3551:function(O,r,o){var l=this&&this.__decorate||function(s,e,t,a){var u,_=arguments.length,p=_<3?e:a===null?a=Object.getOwnPropertyDescriptor(e,t):a;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)p=Reflect.decorate(s,e,t,a);else for(var c=s.length-1;c>=0;c--)(u=s[c])&&(p=(_<3?u(p):_>3?u(e,t,p):u(e,t))||p);return _>3&&p&&Object.defineProperty(e,t,p),p},f=this&&this.__param||function(s,e){return function(t,a){e(t,a,s)}};Object.defineProperty(r,"__esModule",{value:!0}),r.Linkifier=void 0;let n=o(3656),d=o(8460),v=o(844),g=o(2585),h=o(4725),i=r.Linkifier=class extends v.Disposable{get currentLink(){return this._currentLink}constructor(s,e,t,a,u){super(),this._element=s,this._mouseService=e,this._renderService=t,this._bufferService=a,this._linkProviderService=u,this._linkCacheDisposables=[],this._isMouseOut=!0,this._wasResized=!1,this._activeLine=-1,this._onShowLinkUnderline=this.register(new d.EventEmitter),this.onShowLinkUnderline=this._onShowLinkUnderline.event,this._onHideLinkUnderline=this.register(new d.EventEmitter),this.onHideLinkUnderline=this._onHideLinkUnderline.event,this.register((0,v.getDisposeArrayDisposable)(this._linkCacheDisposables)),this.register((0,v.toDisposable)((()=>{this._lastMouseEvent=void 0,this._activeProviderReplies?.clear()}))),this.register(this._bufferService.onResize((()=>{this._clearCurrentLink(),this._wasResized=!0}))),this.register((0,n.addDisposableDomListener)(this._element,`mouseleave`,(()=>{this._isMouseOut=!0,this._clearCurrentLink()}))),this.register((0,n.addDisposableDomListener)(this._element,`mousemove`,this._handleMouseMove.bind(this))),this.register((0,n.addDisposableDomListener)(this._element,`mousedown`,this._handleMouseDown.bind(this))),this.register((0,n.addDisposableDomListener)(this._element,`mouseup`,this._handleMouseUp.bind(this)))}_handleMouseMove(s){this._lastMouseEvent=s;let e=this._positionFromMouseEvent(s,this._element,this._mouseService);if(!e)return;this._isMouseOut=!1;let t=s.composedPath();for(let a=0;a<t.length;a++){let u=t[a];if(u.classList.contains(`xterm`))break;if(u.classList.contains(`xterm-hover`))return}this._lastBufferCell&&e.x===this._lastBufferCell.x&&e.y===this._lastBufferCell.y||(this._handleHover(e),this._lastBufferCell=e)}_handleHover(s){if(this._activeLine!==s.y||this._wasResized)return this._clearCurrentLink(),this._askForLink(s,!1),void(this._wasResized=!1);this._currentLink&&this._linkAtPosition(this._currentLink.link,s)||(this._clearCurrentLink(),this._askForLink(s,!0))}_askForLink(s,e){this._activeProviderReplies&&e||(this._activeProviderReplies?.forEach((a=>{a?.forEach((u=>{u.link.dispose&&u.link.dispose()}))})),this._activeProviderReplies=new Map,this._activeLine=s.y);let t=!1;for(let[a,u]of this._linkProviderService.linkProviders.entries())e?this._activeProviderReplies?.get(a)&&(t=this._checkLinkProviderResult(a,s,t)):u.provideLinks(s.y,(_=>{if(this._isMouseOut)return;let p=_?.map((c=>({link:c})));this._activeProviderReplies?.set(a,p),t=this._checkLinkProviderResult(a,s,t),this._activeProviderReplies?.size===this._linkProviderService.linkProviders.length&&this._removeIntersectingLinks(s.y,this._activeProviderReplies)}))}_removeIntersectingLinks(s,e){let t=new Set;for(let a=0;a<e.size;a++){let u=e.get(a);if(u)for(let _=0;_<u.length;_++){let p=u[_],c=p.link.range.start.y<s?0:p.link.range.start.x,m=p.link.range.end.y>s?this._bufferService.cols:p.link.range.end.x;for(let E=c;E<=m;E++){if(t.has(E)){u.splice(_--,1);break}t.add(E)}}}}_checkLinkProviderResult(s,e,t){if(!this._activeProviderReplies)return t;let a=this._activeProviderReplies.get(s),u=!1;for(let _=0;_<s;_++)this._activeProviderReplies.has(_)&&!this._activeProviderReplies.get(_)||(u=!0);if(!u&&a){let _=a.find((p=>this._linkAtPosition(p.link,e)));_&&(t=!0,this._handleNewLink(_))}if(this._activeProviderReplies.size===this._linkProviderService.linkProviders.length&&!t)for(let _=0;_<this._activeProviderReplies.size;_++){let p=this._activeProviderReplies.get(_)?.find((c=>this._linkAtPosition(c.link,e)));if(p){t=!0,this._handleNewLink(p);break}}return t}_handleMouseDown(){this._mouseDownLink=this._currentLink}_handleMouseUp(s){if(!this._currentLink)return;let e=this._positionFromMouseEvent(s,this._element,this._mouseService);e&&this._mouseDownLink===this._currentLink&&this._linkAtPosition(this._currentLink.link,e)&&this._currentLink.link.activate(s,this._currentLink.link.text)}_clearCurrentLink(s,e){this._currentLink&&this._lastMouseEvent&&(!s||!e||this._currentLink.link.range.start.y>=s&&this._currentLink.link.range.end.y<=e)&&(this._linkLeave(this._element,this._currentLink.link,this._lastMouseEvent),this._currentLink=void 0,(0,v.disposeArray)(this._linkCacheDisposables))}_handleNewLink(s){if(!this._lastMouseEvent)return;let e=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);e&&this._linkAtPosition(s.link,e)&&(this._currentLink=s,this._currentLink.state={decorations:{underline:s.link.decorations===void 0||s.link.decorations.underline,pointerCursor:s.link.decorations===void 0||s.link.decorations.pointerCursor},isHovered:!0},this._linkHover(this._element,s.link,this._lastMouseEvent),s.link.decorations={},Object.defineProperties(s.link.decorations,{pointerCursor:{get:()=>this._currentLink?.state?.decorations.pointerCursor,set:t=>{this._currentLink?.state&&this._currentLink.state.decorations.pointerCursor!==t&&(this._currentLink.state.decorations.pointerCursor=t,this._currentLink.state.isHovered&&this._element.classList.toggle(`xterm-cursor-pointer`,t))}},underline:{get:()=>this._currentLink?.state?.decorations.underline,set:t=>{this._currentLink?.state&&this._currentLink?.state?.decorations.underline!==t&&(this._currentLink.state.decorations.underline=t,this._currentLink.state.isHovered&&this._fireUnderlineEvent(s.link,t))}}}),this._linkCacheDisposables.push(this._renderService.onRenderedViewportChange((t=>{if(!this._currentLink)return;let a=t.start===0?0:t.start+1+this._bufferService.buffer.ydisp,u=this._bufferService.buffer.ydisp+1+t.end;if(this._currentLink.link.range.start.y>=a&&this._currentLink.link.range.end.y<=u&&(this._clearCurrentLink(a,u),this._lastMouseEvent)){let _=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);_&&this._askForLink(_,!1)}}))))}_linkHover(s,e,t){this._currentLink?.state&&(this._currentLink.state.isHovered=!0,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(e,!0),this._currentLink.state.decorations.pointerCursor&&s.classList.add(`xterm-cursor-pointer`)),e.hover&&e.hover(t,e.text)}_fireUnderlineEvent(s,e){let t=s.range,a=this._bufferService.buffer.ydisp,u=this._createLinkUnderlineEvent(t.start.x-1,t.start.y-a-1,t.end.x,t.end.y-a-1,void 0);(e?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(u)}_linkLeave(s,e,t){this._currentLink?.state&&(this._currentLink.state.isHovered=!1,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(e,!1),this._currentLink.state.decorations.pointerCursor&&s.classList.remove(`xterm-cursor-pointer`)),e.leave&&e.leave(t,e.text)}_linkAtPosition(s,e){let t=s.range.start.y*this._bufferService.cols+s.range.start.x,a=s.range.end.y*this._bufferService.cols+s.range.end.x,u=e.y*this._bufferService.cols+e.x;return t<=u&&u<=a}_positionFromMouseEvent(s,e,t){let a=t.getCoords(s,e,this._bufferService.cols,this._bufferService.rows);if(a)return{x:a[0],y:a[1]+this._bufferService.buffer.ydisp}}_createLinkUnderlineEvent(s,e,t,a,u){return{x1:s,y1:e,x2:t,y2:a,cols:this._bufferService.cols,fg:u}}};r.Linkifier=i=l([f(1,h.IMouseService),f(2,h.IRenderService),f(3,g.IBufferService),f(4,h.ILinkProviderService)],i)},9042:(O,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.tooMuchOutput=r.promptLabel=void 0,r.promptLabel=`Terminal input`,r.tooMuchOutput=`Too much output to announce, navigate to rows manually to read`},3730:function(O,r,o){var l=this&&this.__decorate||function(h,i,s,e){var t,a=arguments.length,u=a<3?i:e===null?e=Object.getOwnPropertyDescriptor(i,s):e;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)u=Reflect.decorate(h,i,s,e);else for(var _=h.length-1;_>=0;_--)(t=h[_])&&(u=(a<3?t(u):a>3?t(i,s,u):t(i,s))||u);return a>3&&u&&Object.defineProperty(i,s,u),u},f=this&&this.__param||function(h,i){return function(s,e){i(s,e,h)}};Object.defineProperty(r,"__esModule",{value:!0}),r.OscLinkProvider=void 0;let n=o(511),d=o(2585),v=r.OscLinkProvider=class{constructor(h,i,s){this._bufferService=h,this._optionsService=i,this._oscLinkService=s}provideLinks(h,i){let s=this._bufferService.buffer.lines.get(h-1);if(!s)return void i(void 0);let e=[],t=this._optionsService.rawOptions.linkHandler,a=new n.CellData,u=s.getTrimmedLength(),_=-1,p=-1,c=!1;for(let m=0;m<u;m++)if(p!==-1||s.hasContent(m)){if(s.loadCell(m,a),a.hasExtendedAttrs()&&a.extended.urlId){if(p===-1){p=m,_=a.extended.urlId;continue}c=a.extended.urlId!==_}else p!==-1&&(c=!0);if(c||p!==-1&&m===u-1){let E=this._oscLinkService.getLinkData(_)?.uri;if(E){let k={start:{x:p+1,y:h},end:{x:m+(c||m!==u-1?0:1),y:h}},D=!1;if(!t?.allowNonHttpProtocols)try{let b=new URL(E);[`http:`,`https:`].includes(b.protocol)||(D=!0)}catch{D=!0}D||e.push({text:E,range:k,activate:(b,x)=>t?t.activate(b,x,k):g(0,x),hover:(b,x)=>t?.hover?.(b,x,k),leave:(b,x)=>t?.leave?.(b,x,k)})}c=!1,a.hasExtendedAttrs()&&a.extended.urlId?(p=m,_=a.extended.urlId):(p=-1,_=-1)}}i(e)}};function g(h,i){if(confirm(`Do you want to navigate to ${i}?
|
|
4
4
|
|
package/dist/ui/index.html
CHANGED
|
@@ -40,5 +40,5 @@
|
|
|
40
40
|
});
|
|
41
41
|
})();
|
|
42
42
|
</script>
|
|
43
|
-
<script src="main-
|
|
43
|
+
<script src="main-YPK6Y6LK.js" type="module"></script><script>document.querySelectorAll('link[data-beasties-media]').forEach(function(l){l.media=l.getAttribute('data-beasties-media');l.removeAttribute('data-beasties-media')})</script></body>
|
|
44
44
|
</html>
|