phirepass-widgets 0.0.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.
Files changed (51) hide show
  1. package/LICENSE +661 -0
  2. package/dist/cjs/app-globals-V2Kpy_OQ.js +5 -0
  3. package/dist/cjs/index-DEqYBozk.js +1399 -0
  4. package/dist/cjs/index.cjs.js +2 -0
  5. package/dist/cjs/loader.cjs.js +13 -0
  6. package/dist/cjs/phirepass-sftp-client.cjs.entry.js +17 -0
  7. package/dist/cjs/phirepass-terminal.cjs.entry.js +1349 -0
  8. package/dist/cjs/phirepass-widgets.cjs.js +25 -0
  9. package/dist/collection/collection-manifest.json +13 -0
  10. package/dist/collection/common/protocol.js +2 -0
  11. package/dist/collection/components/phirepass-sftp-client/phirepass-sftp-client.css +3 -0
  12. package/dist/collection/components/phirepass-sftp-client/phirepass-sftp-client.js +18 -0
  13. package/dist/collection/components/phirepass-terminal/phirepass-terminal.css +297 -0
  14. package/dist/collection/components/phirepass-terminal/phirepass-terminal.js +532 -0
  15. package/dist/collection/index.js +1 -0
  16. package/dist/collection/phirepass-channel_bg.wasm +0 -0
  17. package/dist/components/index.d.ts +35 -0
  18. package/dist/components/index.js +1 -0
  19. package/dist/components/phirepass-sftp-client.d.ts +11 -0
  20. package/dist/components/phirepass-sftp-client.js +1 -0
  21. package/dist/components/phirepass-terminal.d.ts +11 -0
  22. package/dist/components/phirepass-terminal.js +49 -0
  23. package/dist/esm/app-globals-DQuL1Twl.js +3 -0
  24. package/dist/esm/index-DvJqTeLJ.js +1391 -0
  25. package/dist/esm/index.js +1 -0
  26. package/dist/esm/loader.js +11 -0
  27. package/dist/esm/phirepass-sftp-client.entry.js +15 -0
  28. package/dist/esm/phirepass-terminal.entry.js +1346 -0
  29. package/dist/esm/phirepass-widgets.js +21 -0
  30. package/dist/index.cjs.js +1 -0
  31. package/dist/index.js +1 -0
  32. package/dist/phirepass-widgets/index.esm.js +0 -0
  33. package/dist/phirepass-widgets/p-5bdfe1f8.entry.js +49 -0
  34. package/dist/phirepass-widgets/p-DQuL1Twl.js +1 -0
  35. package/dist/phirepass-widgets/p-DvJqTeLJ.js +2 -0
  36. package/dist/phirepass-widgets/p-b070cf72.entry.js +1 -0
  37. package/dist/phirepass-widgets/phirepass-channel_bg.wasm +0 -0
  38. package/dist/phirepass-widgets/phirepass-widgets.esm.js +1 -0
  39. package/dist/types/common/protocol.d.ts +31 -0
  40. package/dist/types/components/phirepass-sftp-client/phirepass-sftp-client.d.ts +3 -0
  41. package/dist/types/components/phirepass-terminal/phirepass-terminal.d.ts +75 -0
  42. package/dist/types/components.d.ts +92 -0
  43. package/dist/types/index.d.ts +10 -0
  44. package/dist/types/stencil-public-runtime.d.ts +1839 -0
  45. package/loader/cdn.js +1 -0
  46. package/loader/index.cjs.js +1 -0
  47. package/loader/index.d.ts +24 -0
  48. package/loader/index.es2017.js +1 -0
  49. package/loader/index.js +2 -0
  50. package/package.json +61 -0
  51. package/readme.md +111 -0
@@ -0,0 +1 @@
1
+ const o=()=>{};export{o as g}
@@ -0,0 +1,2 @@
1
+ var t,e=(t,e)=>{var n;Object.entries(null!=(n=e.o.t)?n:{}).map((([n,[o]])=>{if(31&o||32&o){const o=t[n],l=function(t,e){for(;t;){const n=Object.getOwnPropertyDescriptor(t,e);if(null==n?void 0:n.get)return n;t=Object.getPrototypeOf(t)}}(Object.getPrototypeOf(t),n)||Object.getOwnPropertyDescriptor(t,n);l&&Object.defineProperty(t,n,{get(){return l.get.call(this)},set(t){l.set.call(this,t)},configurable:!0,enumerable:!0}),t[n]=e.l.has(n)?e.l.get(n):o}}))},n=t=>{if(t.__stencil__getHostRef)return t.__stencil__getHostRef()},o=(t,n)=>{n&&(t.__stencil__getHostRef=()=>n,n.i=t,512&n.o.u&&e(t,n))},l=(t,e)=>(0,console.error)(t,e),i=new Map,s=new Map,r="undefined"!=typeof window?window:{},c={u:0,h:"",jmp:t=>t(),raf:t=>requestAnimationFrame(t),ael:(t,e,n,o)=>t.addEventListener(e,n,o),rel:(t,e,n,o)=>t.removeEventListener(e,n,o),ce:(t,e)=>new CustomEvent(t,e)},u=t=>Promise.resolve(t),a=(()=>{try{return!!r.document.adoptedStyleSheets&&(new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync)}catch(t){}return!1})(),f=!!a&&(()=>!!r.document&&Object.getOwnPropertyDescriptor(r.document.adoptedStyleSheets,"length").writable)(),d=!1,h=[],p=[],m=(t,e)=>n=>{t.push(n),d||(d=!0,e&&4&c.u?b(y):c.raf(y))},v=t=>{for(let e=0;e<t.length;e++)try{t[e](performance.now())}catch(t){l(t)}t.length=0},y=()=>{v(h),v(p),(d=h.length>0)&&c.raf(y)},b=t=>u().then(t),$=m(p,!0);function w(){const e=this.attachShadow({mode:"open"});void 0===t&&(t=null),t&&(f?e.adoptedStyleSheets.push(t):e.adoptedStyleSheets=[...e.adoptedStyleSheets,t])}function g(t){var e,n,o;return null!=(o=null==(n=null==(e=t.head)?void 0:e.querySelector('meta[name="csp-nonce"]'))?void 0:n.getAttribute("content"))?o:void 0}var j,S=new WeakMap,O=t=>"sc-"+t.p,k=t=>"object"==(t=typeof t)||"function"===t,M=(t,e,...n)=>{let o=null,l=null,i=!1,s=!1;const r=[],c=e=>{for(let n=0;n<e.length;n++)o=e[n],Array.isArray(o)?c(o):null!=o&&"boolean"!=typeof o&&((i="function"!=typeof t&&!k(o))&&(o+=""),i&&s?r[r.length-1].m+=o:r.push(i?C(null,o):o),s=i)};c(n),e&&e.key&&(l=e.key);const u=C(t,null);return u.v=e,r.length>0&&(u.$=r),u.j=l,u},C=(t,e)=>({u:0,S:t,m:null!=e?e:null,O:null,$:null,v:null,j:null}),E={},N=(t,e)=>null==t||k(t)?t:4&e?"false"!==t&&(""===t||!!t):2&e?"string"==typeof t?parseFloat(t):"number"==typeof t?t:NaN:1&e?t+"":t,x=t=>{var e;return null==(e=n(t))?void 0:e.$hostElement$},A=(t,e,n,o,l,i)=>{if(n===o)return;let s=((t,e)=>e in t)(t,e);if(e.toLowerCase(),"key"===e);else{const r=k(o);if(s||r&&null!==o)try{if(t.tagName.includes("-"))t[e]!==o&&(t[e]=o);else{const l=null==o?"":o;"list"===e?s=!1:null!=n&&t[e]==l||("function"==typeof t.__lookupSetter__(e)?t[e]=l:t.setAttribute(e,l))}}catch(t){}null==o||!1===o?!1===o&&""!==t.getAttribute(e)||t.removeAttribute(e):(!s||4&i||l)&&!r&&1===t.nodeType&&t.setAttribute(e,o=!0===o?"":o)}},D=(t,e,n)=>{const o=11===e.O.nodeType&&e.O.host?e.O.host:e.O,l=t&&t.v||{},i=e.v||{};for(const t of P(Object.keys(l)))t in i||A(o,t,l[t],void 0,n,e.u);for(const t of P(Object.keys(i)))A(o,t,l[t],i[t],n,e.u)};function P(t){return t.includes("ref")?[...t.filter((t=>"ref"!==t)),"ref"]:t}var R=!1,L=!1,U=(t,e,n)=>{const o=e.$[n];let l,i,s=0;if(!r.document)throw Error("You are trying to render a Stencil component in an environment that doesn't support the DOM.");if(l=o.O=r.document.createElement(o.S),D(null,o,L),o.$){const e="template"===o.S?l.content:l;for(s=0;s<o.$.length;++s)i=U(t,o,s),i&&e.appendChild(i)}return l["s-hn"]=j,l},H=(t,e,n,o,l,i)=>{let s,r=t;for(r.shadowRoot&&r.tagName===j&&(r=r.shadowRoot),"template"===n.S&&(r=r.content);l<=i;++l)o[l]&&(s=U(null,n,l),s&&(o[l].O=s,q(r,s,e)))},T=(t,e,n)=>{for(let o=e;o<=n;++o){const e=t[o];if(e){const t=e.O;t&&t.remove()}}},W=(t,e,n=!1)=>t.S===e.S&&(n?(n&&!t.j&&e.j&&(t.j=e.j),!0):t.j===e.j),F=(t,e,n=!1)=>{const o=e.O=t.O,l=t.$,i=e.$;"slot"!==e.S||R||t.k!==e.k&&(e.O["s-sn"]=e.k||"",(t=>{c.u|=1;const e=t.closest(j.toLowerCase());if(null!=e){const n=Array.from(e.__childNodes||e.childNodes).find((t=>t["s-cr"])),o=Array.from(t.__childNodes||t.childNodes);for(const t of n?o.reverse():o)null!=t["s-sh"]&&(q(e,t,null!=n?n:null),t["s-sh"]=void 0)}c.u&=-2})(e.O.parentElement)),D(t,e,L),null!==l&&null!==i?((t,e,n,o,l=!1)=>{let i,s,r=0,c=0,u=0,a=0,f=e.length-1,d=e[0],h=e[f],p=o.length-1,m=o[0],v=o[p];const y="template"===n.S?t.content:t;for(;r<=f&&c<=p;)if(null==d)d=e[++r];else if(null==h)h=e[--f];else if(null==m)m=o[++c];else if(null==v)v=o[--p];else if(W(d,m,l))F(d,m,l),d=e[++r],m=o[++c];else if(W(h,v,l))F(h,v,l),h=e[--f],v=o[--p];else if(W(d,v,l))F(d,v,l),q(y,d.O,h.O.nextSibling),d=e[++r],v=o[--p];else if(W(h,m,l))F(h,m,l),q(y,h.O,d.O),h=e[--f],m=o[++c];else{for(u=-1,a=r;a<=f;++a)if(e[a]&&null!==e[a].j&&e[a].j===m.j){u=a;break}u>=0?(s=e[u],s.S!==m.S?i=U(e&&e[c],n,u):(F(s,m,l),e[u]=void 0,i=s.O),m=o[++c]):(i=U(e&&e[c],n,c),m=o[++c]),i&&q(d.O.parentNode,i,d.O)}r>f?H(t,null==o[p+1]?null:o[p+1].O,n,o,c,p):c>p&&T(e,r,f)})(o,l,e,i,n):null!==i?H(o,null,e,i,0,i.length-1):!n&&null!==l&&T(l,0,l.length-1)},q=(t,e,n)=>t.__insertBefore?t.__insertBefore(e,n):null==t?void 0:t.insertBefore(e,n),z=(t,e)=>{if(e&&!t.M&&e["s-p"]){const n=e["s-p"].push(new Promise((o=>t.M=()=>{e["s-p"].splice(n-1,1),o()})))}},V=(t,e)=>{if(t.u|=16,4&t.u)return void(t.u|=512);z(t,t.C);const n=()=>G(t,e);if(!e)return $(n);queueMicrotask((()=>{n()}))},G=(t,e)=>{const n=t.$hostElement$,o=t.i;if(!o)throw Error(`Can't render component <${n.tagName.toLowerCase()} /> with invalid Stencil runtime! Make sure this imported component is compiled with a \`externalRuntime: true\` flag. For more information, please refer to https://stenciljs.com/docs/custom-elements#externalruntime`);let l;return e?(t.N.length&&t.N.forEach((t=>t(n))),l=Q(o,"componentWillLoad",void 0,n)):l=Q(o,"componentWillUpdate",void 0,n),l=Y(l,(()=>Q(o,"componentWillRender",void 0,n))),Y(l,(()=>B(t,o,e)))},Y=(t,e)=>_(t)?t.then(e).catch((t=>{console.error(t),e()})):e(),_=t=>t instanceof Promise||t&&t.then&&"function"==typeof t.then,B=async(t,e,n)=>{var o;const l=t.$hostElement$,i=l["s-rc"];n&&(t=>{const e=t.o,n=t.$hostElement$,o=e.u,l=((t,e)=>{var n,o,l;const i=O(e),u=s.get(i);if(!r.document)return i;if(t=11===t.nodeType?t:r.document,u)if("string"==typeof u){let l,s=S.get(t=t.head||t);if(s||S.set(t,s=new Set),!s.has(i)){l=r.document.createElement("style"),l.textContent=u;const d=null!=(n=c.A)?n:g(r.document);if(null!=d&&l.setAttribute("nonce",d),!(1&e.u))if("HEAD"===t.nodeName){const e=t.querySelectorAll("link[rel=preconnect]"),n=e.length>0?e[e.length-1].nextSibling:t.querySelector("style");t.insertBefore(l,(null==n?void 0:n.parentNode)===t?n:null)}else if("host"in t)if(a){const e=new(null!=(o=t.defaultView)?o:t.ownerDocument.defaultView).CSSStyleSheet;e.replaceSync(u),f?t.adoptedStyleSheets.unshift(e):t.adoptedStyleSheets=[e,...t.adoptedStyleSheets]}else{const e=t.querySelector("style");e?e.textContent=u+e.textContent:t.prepend(l)}else t.append(l);1&e.u&&t.insertBefore(l,null),4&e.u&&(l.textContent+="slot-fb{display:contents}slot-fb[hidden]{display:none}"),s&&s.add(i)}}else{let e=S.get(t);if(e||S.set(t,e=new Set),!e.has(i)){const n=null!=(l=t.defaultView)?l:t.ownerDocument.defaultView;let o;if(u.constructor===n.CSSStyleSheet)o=u;else{o=new n.CSSStyleSheet;for(let t=0;t<u.cssRules.length;t++)o.insertRule(u.cssRules[t].cssText,t)}f?t.adoptedStyleSheets.push(o):t.adoptedStyleSheets=[...t.adoptedStyleSheets,o],e.add(i)}}return i})(n.shadowRoot?n.shadowRoot:n.getRootNode(),e);10&o&&(n["s-sc"]=l,n.classList.add(l+"-h"))})(t);I(t,e,l,n),i&&(i.map((t=>t())),l["s-rc"]=void 0);{const e=null!=(o=l["s-p"])?o:[],n=()=>J(t);0===e.length?n():(Promise.all(e).then(n),t.u|=4,e.length=0)}},I=(t,e,n,o)=>{try{e=e.render(),t.u&=-17,t.u|=2,((t,e,n=!1)=>{const o=t.$hostElement$,l=t.o,i=t.D||C(null,null),s=(t=>t&&t.S===E)(e)?e:M(null,null,e);if(j=o.tagName,n&&s.v)for(const t of Object.keys(s.v))o.hasAttribute(t)&&!["key","ref","style","class"].includes(t)&&(s.v[t]=o[t]);s.S=null,s.u|=4,t.D=s,s.O=i.O=o.shadowRoot||o,R=!(!(1&l.u)||128&l.u),F(i,s,n)})(t,e,o)}catch(e){l(e,t.$hostElement$)}return null},J=t=>{const e=t.$hostElement$,n=t.i,o=t.C;Q(n,"componentDidRender",void 0,e),64&t.u?Q(n,"componentDidUpdate",void 0,e):(t.u|=64,X(e),Q(n,"componentDidLoad",void 0,e),t.P(e),o||K()),t.M&&(t.M(),t.M=void 0),512&t.u&&b((()=>V(t,!1))),t.u&=-517},K=()=>{b((()=>(t=>{const e=c.ce("appload",{detail:{namespace:"phirepass-widgets"}});return t.dispatchEvent(e),e})(r)))},Q=(t,e,n,o)=>{if(t&&t[e])try{return t[e](n)}catch(t){l(t,o)}},X=t=>t.classList.add("hydrated"),Z=(t,e,o,i)=>{const s=n(t);if(!s)return;if(!s)throw Error(`Couldn't find host element for "${i.p}" as it is unknown to this Stencil runtime. This usually happens when integrating a 3rd party Stencil component with another Stencil component or application. Please reach out to the maintainers of the 3rd party Stencil component or report this on the Stencil Discord server (https://chat.stenciljs.com) or comment on this similar [GitHub issue](https://github.com/stenciljs/core/issues/5457).`);const r=s.$hostElement$,c=s.l.get(e),u=s.u,a=s.i;if(o=N(o,i.t[e][0]),!(8&u&&void 0!==c||o===c||Number.isNaN(c)&&Number.isNaN(o))){if(s.l.set(e,o),i.R){const t=i.R[e];t&&t.map((t=>{try{const[[n,l]]=Object.entries(t);(128&u||1&l)&&(a?a[n](o,c,e):s.N.push((()=>{s.i[n](o,c,e)})))}catch(t){l(t,r)}}))}if(2==(18&u)){if(a.componentShouldUpdate&&!1===a.componentShouldUpdate(o,c,e))return;V(s,!1)}}},tt=(t,e,o)=>{var l,i;const s=t.prototype;{t.watchers&&!e.R&&(e.R=t.watchers),t.deserializers&&!e.L&&(e.L=t.deserializers),t.serializers&&!e.U&&(e.U=t.serializers);const r=Object.entries(null!=(l=e.t)?l:{});if(r.map((([t,[l]])=>{if(31&l||2&o&&32&l){const{get:i,set:r}=Object.getOwnPropertyDescriptor(s,t)||{};i&&(e.t[t][0]|=2048),r&&(e.t[t][0]|=4096),(1&o||!i)&&Object.defineProperty(s,t,{get(){{if(!(2048&e.t[t][0]))return((t,e)=>n(this).l.get(e))(0,t);const o=n(this),l=o?o.i:s;if(!l)return;return l[t]}},configurable:!0,enumerable:!0}),Object.defineProperty(s,t,{set(i){const s=n(this);if(s){if(r)return void 0===(32&l?this[t]:s.$hostElement$[t])&&s.l.get(t)&&(i=s.l.get(t)),r.call(this,N(i,l)),void Z(this,t,i=32&l?this[t]:s.$hostElement$[t],e);{if(!(1&o&&4096&e.t[t][0]))return Z(this,t,i,e),void(1&o&&!s.i&&s.N.push((()=>{4096&e.t[t][0]&&s.i[t]!==s.l.get(t)&&(s.i[t]=i)})));const n=()=>{const n=s.i[t];!s.l.get(t)&&n&&s.l.set(t,n),s.i[t]=N(i,l),Z(this,t,s.i[t],e)};s.i?n():s.N.push((()=>{n()}))}}}})}})),1&o){const o=new Map;s.attributeChangedCallback=function(t,l,i){c.jmp((()=>{var c;const u=o.get(t),a=n(this);if(this.hasOwnProperty(u)&&(i=this[u],delete this[u]),s.hasOwnProperty(u)&&"number"==typeof this[u]&&this[u]==i)return;if(null==u){const n=null==a?void 0:a.u;if(a&&n&&!(8&n)&&i!==l){const o=a.i,s=null==(c=e.R)?void 0:c[t];null==s||s.forEach((e=>{const[[s,r]]=Object.entries(e);null!=o[s]&&(128&n||1&r)&&o[s].call(o,i,l,t)}))}return}const f=r.find((([t])=>t===u));f&&4&f[1][0]&&(i=null!==i&&"false"!==i);const d=Object.getOwnPropertyDescriptor(s,u);i==this[u]||d.get&&!d.set||(this[u]=i)}))},t.observedAttributes=Array.from(new Set([...Object.keys(null!=(i=e.R)?i:{}),...r.filter((([t,e])=>31&e[0])).map((([t,e])=>{const n=e[1]||t;return o.set(n,t),n}))]))}}return t},et=(t,e)=>{Q(t,"connectedCallback",void 0,e)},nt=(t,e)=>{Q(t,"disconnectedCallback",void 0,e||t)},ot=(t,e={})=>{var o;if(!r.document)return void console.warn("Stencil: No document found. Skipping bootstrapping lazy components.");const u=[],f=e.exclude||[],d=r.customElements,h=r.document.head,p=h.querySelector("meta[charset]"),m=r.document.createElement("style"),v=[];let y,b=!0;if(Object.assign(c,e),c.h=new URL(e.resourcesUrl||"./",r.document.baseURI).href,t.map((t=>{t[1].map((e=>{var o,r,h;const p={u:e[0],p:e[1],t:e[2],H:e[3]};p.t=e[2],p.R=null!=(o=e[4])?o:{},p.U=null!=(r=e[5])?r:{},p.L=null!=(h=e[6])?h:{};const m=p.p,$=class extends HTMLElement{"s-p";"s-rc";hasRegisteredEventListeners=!1;constructor(t){if(super(t),((t,e)=>{const n={u:0,$hostElement$:t,o:e,l:new Map,T:new Map};n.W=new Promise((t=>n.P=t)),t["s-p"]=[],t["s-rc"]=[],n.N=[];const o=n;t.__stencil__getHostRef=()=>o})(t=this,p),1&p.u)if(t.shadowRoot){if("open"!==t.shadowRoot.mode)throw Error(`Unable to re-use existing shadow root for ${p.p}! Mode is set to ${t.shadowRoot.mode} but Stencil only supports open shadow roots.`)}else w.call(t,p)}connectedCallback(){n(this)&&(this.hasRegisteredEventListeners||(this.hasRegisteredEventListeners=!0),y&&(clearTimeout(y),y=null),b?v.push(this):c.jmp((()=>(t=>{if(!(1&c.u)){const e=n(t);if(!e)return;const o=e.o,r=()=>{};if(1&e.u)(null==e?void 0:e.i)?et(e.i,t):(null==e?void 0:e.W)&&e.W.then((()=>et(e.i,t)));else{e.u|=1;{let n=t;for(;n=n.parentNode||n.host;)if(n["s-p"]){z(e,e.C=n);break}}o.t&&Object.entries(o.t).map((([e,[n]])=>{if(31&n&&e in t&&t[e]!==Object.prototype[e]){const n=t[e];delete t[e],t[e]=n}})),(async(t,e,n)=>{let o;if(!(32&e.u)){if(e.u|=32,n.F){const s=((t,e)=>{const n=t.p.replace(/-/g,"_"),o=t.F;if(!o)return;const s=i.get(o);return s?s[n]:import(`./${o}.entry.js`).then((t=>(i.set(o,t),t[n])),(t=>{l(t,e.$hostElement$)}))
2
+ /*!__STENCIL_STATIC_IMPORT_SWITCH__*/})(n,e);if(s&&"then"in s){const t=()=>{};o=await s,t()}else o=s;if(!o)throw Error(`Constructor for "${n.p}#${e.q}" was not found`);o.isProxied||(n.R=o.watchers,n.U=o.serializers,n.L=o.deserializers,tt(o,n,2),o.isProxied=!0);const r=()=>{};e.u|=8;try{new o(e)}catch(e){l(e,t)}e.u&=-9,e.u|=128,r(),et(e.i,t)}else o=t.constructor,customElements.whenDefined(t.localName).then((()=>e.u|=128));if(o&&o.style){let t;"string"==typeof o.style&&(t=o.style);const e=O(n);if(!s.has(e)){const o=()=>{};((t,e,n)=>{let o=s.get(t);a&&n?(o=o||new CSSStyleSheet,"string"==typeof o?o=e:o.replaceSync(e)):o=e,s.set(t,o)})(e,t,!!(1&n.u)),o()}}}const r=e.C,c=()=>V(e,!0);r&&r["s-rc"]?r["s-rc"].push(c):c()})(t,e,o)}r()}})(this))))}disconnectedCallback(){c.jmp((()=>(async t=>{if(!(1&c.u)){const e=n(t);(null==e?void 0:e.i)?nt(e.i,t):(null==e?void 0:e.W)&&e.W.then((()=>nt(e.i,t)))}S.has(t)&&S.delete(t),t.shadowRoot&&S.has(t.shadowRoot)&&S.delete(t.shadowRoot)})(this))),c.raf((()=>{var t;const e=n(this);if(!e)return;const o=v.findIndex((t=>t===this));o>-1&&v.splice(o,1),(null==(t=null==e?void 0:e.D)?void 0:t.O)instanceof Node&&!e.D.O.isConnected&&delete e.D.O}))}componentOnReady(){var t;return null==(t=n(this))?void 0:t.W}};p.F=t[0],f.includes(m)||d.get(m)||(u.push(m),d.define(m,tt($,p,1)))}))})),u.length>0&&(m.textContent+=u.sort()+"{visibility:hidden}.hydrated{visibility:inherit}",m.innerHTML.length)){m.setAttribute("data-styles","");const t=null!=(o=c.A)?o:g(r.document);null!=t&&m.setAttribute("nonce",t),h.insertBefore(m,p?p.nextSibling:h.firstChild)}b=!1,v.length?v.map((t=>t.connectedCallback())):c.jmp((()=>y=setTimeout(K,30)))},lt=t=>c.A=t;export{E as H,ot as b,x as g,M as h,u as p,o as r,lt as s}
@@ -0,0 +1 @@
1
+ import{r as e,h as s,H as r}from"./p-DvJqTeLJ.js";const t=class{constructor(s){e(this,s)}render(){return s(r,{key:"d03ff09e3636f79d699c7462e121abe7d08c6683"},s("slot",{key:"bd7285e70384558e4cbf0600b89a57fa4ec3406d"}))}};t.style=":host{display:block}";export{t as phirepass_sftp_client}
@@ -0,0 +1 @@
1
+ import{p as e,b as r}from"./p-DvJqTeLJ.js";export{s as setNonce}from"./p-DvJqTeLJ.js";import{g as t}from"./p-DQuL1Twl.js";(()=>{const r=import.meta.url,s={};return""!==r&&(s.resourcesUrl=new URL(".",r).href),e(s)})().then((async e=>(await t(),r([["p-b070cf72",[[257,"phirepass-sftp-client"]]],["p-5bdfe1f8",[[513,"phirepass-terminal",{terminalOptions:[16],serverHost:[1,"server-host"],serverPort:[2,"server-port"],allowInsecure:[4,"allow-insecure"],heartbeatInterval:[2,"heartbeat-interval"],nodeId:[1,"node-id"]},null,{nodeId:[{onNodeIdChange:0}]}]]]],e))));
@@ -0,0 +1,31 @@
1
+ import { ErrorType } from "phirepass-channel";
2
+ export type ProtocolMessageWebError = {
3
+ kind: ErrorType;
4
+ message: String;
5
+ msg_id?: number;
6
+ type: "Error";
7
+ };
8
+ export type ProtocolMessageWebTunnelOpened = {
9
+ sid: number;
10
+ msg_id?: number;
11
+ type: "TunnelOpened";
12
+ };
13
+ export type ProtocolMessageWebTunnelClosed = {
14
+ sid: number;
15
+ msg_id?: number;
16
+ type: "TunnelClosed";
17
+ };
18
+ export type ProtocolMessageWebTunnelData = {
19
+ node_id: String;
20
+ sid: number;
21
+ data: Uint8Array;
22
+ type: "TunnelData";
23
+ };
24
+ export type ProtocolMessage = {
25
+ version: number;
26
+ encoding: "MessagePack" | "JSON";
27
+ data: {
28
+ web: ProtocolMessageWebError | ProtocolMessageWebTunnelOpened | ProtocolMessageWebTunnelData | ProtocolMessageWebTunnelClosed;
29
+ };
30
+ };
31
+ export { ErrorType as ProtocolMessageError };
@@ -0,0 +1,3 @@
1
+ export declare class PhirepassSftpClient {
2
+ render(): any;
3
+ }
@@ -0,0 +1,75 @@
1
+ import { ProtocolMessageWebError } from '../../common/protocol';
2
+ export declare class PhirepassTerminal {
3
+ private terminal;
4
+ private fitAddon;
5
+ private webLinksAddon?;
6
+ private searchAddon?;
7
+ private webglAddon?;
8
+ private serializeAddon?;
9
+ private imageAddon?;
10
+ private channel;
11
+ private inputMode;
12
+ private resizeObserver;
13
+ private resizeDebounceHandle?;
14
+ private session_id?;
15
+ private usernameBuffer;
16
+ private passwordBuffer;
17
+ private xtermImageSettings;
18
+ el: HTMLElement;
19
+ terminalOptions: {
20
+ termName: string;
21
+ rendererType: string;
22
+ allowTransparency: boolean;
23
+ fontFamily: string;
24
+ fontSize: number;
25
+ letterSpacing: number;
26
+ lineHeight: number;
27
+ allowProposedApi: boolean;
28
+ cursorBlink: boolean;
29
+ cursorWidth: number;
30
+ theme: {
31
+ background: string;
32
+ foreground: string;
33
+ cursor: string;
34
+ };
35
+ scrollback: number;
36
+ fastScrollModifier: string;
37
+ fastScrollSensitivity: number;
38
+ bellStyle: string;
39
+ convertEol: boolean;
40
+ disableStdin: boolean;
41
+ rightClickSelectsWord: boolean;
42
+ drawBoldTextInBrightColors: boolean;
43
+ minimumContrastRatio: number;
44
+ windowsMode: boolean;
45
+ macOptionIsMeta: boolean;
46
+ altClickMovesCursor: boolean;
47
+ };
48
+ serverHost: string;
49
+ serverPort: number;
50
+ allowInsecure: boolean;
51
+ heartbeatInterval: number;
52
+ nodeId?: string;
53
+ onNodeIdChange(newValue?: string, _oldValue?: string): void;
54
+ createWebSocketEndpoint(): string;
55
+ connectedCallback(): Promise<void>;
56
+ disconnectedCallback(): Promise<void>;
57
+ setup_terminal(): void;
58
+ destroy_terminal(): void;
59
+ open_comms(): void;
60
+ send_ssh_terminal_resize(): void;
61
+ send_ssh_data(data: string): void;
62
+ handle_error(error: ProtocolMessageWebError): void;
63
+ close_comms(): void;
64
+ cancelCredentialEntry(): void;
65
+ private resetSessionState;
66
+ handleTunnelClosed(): void;
67
+ connect(): void;
68
+ setupResizeObserver(): void;
69
+ handleTerminalData(data: string): void;
70
+ handleUsernameInput(data: string): void;
71
+ submitUsername(): void;
72
+ handlePasswordInput(data: string): void;
73
+ submitPassword(): void;
74
+ render(): any;
75
+ }
@@ -0,0 +1,92 @@
1
+ /* eslint-disable */
2
+ /* tslint:disable */
3
+ /**
4
+ * This is an autogenerated file created by the Stencil compiler.
5
+ * It contains typing information for all components that exist in this project.
6
+ */
7
+ import { HTMLStencilElement, JSXBase } from "./stencil-public-runtime";
8
+ export namespace Components {
9
+ interface PhirepassSftpClient {
10
+ }
11
+ interface PhirepassTerminal {
12
+ /**
13
+ * @default false
14
+ */
15
+ "allowInsecure": boolean;
16
+ /**
17
+ * @default 30_000
18
+ */
19
+ "heartbeatInterval": number;
20
+ "nodeId"?: string;
21
+ /**
22
+ * @default "phirepass.io"
23
+ */
24
+ "serverHost": string;
25
+ /**
26
+ * @default 443
27
+ */
28
+ "serverPort": number;
29
+ /**
30
+ * @default { // Terminal identification termName: 'xterm-256color', // Rendering rendererType: 'canvas', // Better performance allowTransparency: false, fontFamily: '"Berkeley Mono", "Fira Code", "SFMono-Regular", Menlo, monospace', fontSize: 12, // fontWeight: 'normal', // fontWeightBold: 'bold', letterSpacing: 0, lineHeight: 1.0, allowProposedApi: true, // needed for bracketed paste // Cursor cursorBlink: true, // cursorStyle: 'block', cursorWidth: 1, // Colors theme: { background: "#0b1021", foreground: "#e2e8f0", cursor: "#67e8f9", }, // Scrolling scrollback: 10000, fastScrollModifier: 'shift', fastScrollSensitivity: 5, // Behavior bellStyle: 'sound', // or 'none' if you prefer convertEol: false, // true to treat \n as \r\n disableStdin: false, // Selection rightClickSelectsWord: true, // Performance drawBoldTextInBrightColors: true, minimumContrastRatio: 1, // Advanced windowsMode: false, // Important for Linux macOptionIsMeta: false, altClickMovesCursor: true }
31
+ */
32
+ "terminalOptions": { termName: string; rendererType: string; allowTransparency: boolean; fontFamily: string; fontSize: number; letterSpacing: number; lineHeight: number; allowProposedApi: boolean; cursorBlink: boolean; cursorWidth: number; theme: { background: string; foreground: string; cursor: string; }; scrollback: number; fastScrollModifier: string; fastScrollSensitivity: number; bellStyle: string; convertEol: boolean; disableStdin: boolean; rightClickSelectsWord: boolean; drawBoldTextInBrightColors: boolean; minimumContrastRatio: number; windowsMode: boolean; macOptionIsMeta: boolean; altClickMovesCursor: boolean; };
33
+ }
34
+ }
35
+ declare global {
36
+ interface HTMLPhirepassSftpClientElement extends Components.PhirepassSftpClient, HTMLStencilElement {
37
+ }
38
+ var HTMLPhirepassSftpClientElement: {
39
+ prototype: HTMLPhirepassSftpClientElement;
40
+ new (): HTMLPhirepassSftpClientElement;
41
+ };
42
+ interface HTMLPhirepassTerminalElement extends Components.PhirepassTerminal, HTMLStencilElement {
43
+ }
44
+ var HTMLPhirepassTerminalElement: {
45
+ prototype: HTMLPhirepassTerminalElement;
46
+ new (): HTMLPhirepassTerminalElement;
47
+ };
48
+ interface HTMLElementTagNameMap {
49
+ "phirepass-sftp-client": HTMLPhirepassSftpClientElement;
50
+ "phirepass-terminal": HTMLPhirepassTerminalElement;
51
+ }
52
+ }
53
+ declare namespace LocalJSX {
54
+ interface PhirepassSftpClient {
55
+ }
56
+ interface PhirepassTerminal {
57
+ /**
58
+ * @default false
59
+ */
60
+ "allowInsecure"?: boolean;
61
+ /**
62
+ * @default 30_000
63
+ */
64
+ "heartbeatInterval"?: number;
65
+ "nodeId"?: string;
66
+ /**
67
+ * @default "phirepass.io"
68
+ */
69
+ "serverHost"?: string;
70
+ /**
71
+ * @default 443
72
+ */
73
+ "serverPort"?: number;
74
+ /**
75
+ * @default { // Terminal identification termName: 'xterm-256color', // Rendering rendererType: 'canvas', // Better performance allowTransparency: false, fontFamily: '"Berkeley Mono", "Fira Code", "SFMono-Regular", Menlo, monospace', fontSize: 12, // fontWeight: 'normal', // fontWeightBold: 'bold', letterSpacing: 0, lineHeight: 1.0, allowProposedApi: true, // needed for bracketed paste // Cursor cursorBlink: true, // cursorStyle: 'block', cursorWidth: 1, // Colors theme: { background: "#0b1021", foreground: "#e2e8f0", cursor: "#67e8f9", }, // Scrolling scrollback: 10000, fastScrollModifier: 'shift', fastScrollSensitivity: 5, // Behavior bellStyle: 'sound', // or 'none' if you prefer convertEol: false, // true to treat \n as \r\n disableStdin: false, // Selection rightClickSelectsWord: true, // Performance drawBoldTextInBrightColors: true, minimumContrastRatio: 1, // Advanced windowsMode: false, // Important for Linux macOptionIsMeta: false, altClickMovesCursor: true }
76
+ */
77
+ "terminalOptions"?: { termName: string; rendererType: string; allowTransparency: boolean; fontFamily: string; fontSize: number; letterSpacing: number; lineHeight: number; allowProposedApi: boolean; cursorBlink: boolean; cursorWidth: number; theme: { background: string; foreground: string; cursor: string; }; scrollback: number; fastScrollModifier: string; fastScrollSensitivity: number; bellStyle: string; convertEol: boolean; disableStdin: boolean; rightClickSelectsWord: boolean; drawBoldTextInBrightColors: boolean; minimumContrastRatio: number; windowsMode: boolean; macOptionIsMeta: boolean; altClickMovesCursor: boolean; };
78
+ }
79
+ interface IntrinsicElements {
80
+ "phirepass-sftp-client": PhirepassSftpClient;
81
+ "phirepass-terminal": PhirepassTerminal;
82
+ }
83
+ }
84
+ export { LocalJSX as JSX };
85
+ declare module "@stencil/core" {
86
+ export namespace JSX {
87
+ interface IntrinsicElements {
88
+ "phirepass-sftp-client": LocalJSX.PhirepassSftpClient & JSXBase.HTMLAttributes<HTMLPhirepassSftpClientElement>;
89
+ "phirepass-terminal": LocalJSX.PhirepassTerminal & JSXBase.HTMLAttributes<HTMLPhirepassTerminalElement>;
90
+ }
91
+ }
92
+ }
@@ -0,0 +1,10 @@
1
+ /**
2
+ * @fileoverview entry point for your component library
3
+ *
4
+ * This is the entry point for your component library. Use this file to export utilities,
5
+ * constants or data structure that accompany your components.
6
+ *
7
+ * DO NOT use this file to export your components. Instead, use the recommended approaches
8
+ * to consume components of this package as outlined in the `README.md`.
9
+ */
10
+ export type * from './components.d.ts';