tabby-tab-notes 0.1.0 โ 0.1.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/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("@angular/core"),require("tabby-core"),require("rxjs"),require("rxjs/operators"),require("os"),require("path"),require("fs"),require("child_process"));else if("function"==typeof define&&define.amd)define(["@angular/core","tabby-core","rxjs","rxjs/operators","os","path","fs","child_process"],t);else{var n="object"==typeof exports?t(require("@angular/core"),require("tabby-core"),require("rxjs"),require("rxjs/operators"),require("os"),require("path"),require("fs"),require("child_process")):t(e["@angular/core"],e["tabby-core"],e.rxjs,e["rxjs/operators"],e.os,e.path,e.fs,e.child_process);for(var o in n)("object"==typeof exports?exports:e)[o]=n[o]}}(global,(e,t,n,o,r,i,s,a)=>(()=>{"use strict";var l={860(t){t.exports=e},660(e){e.exports=a},947(e){e.exports=s},234(e){e.exports=r},911(e){e.exports=i},961(e){e.exports=n},439(e){e.exports=o},650(e){e.exports=t}},c={};function d(e){var t=c[e];if(void 0!==t)return t.exports;var n=c[e]={exports:{}};return l[e](n,n.exports,d),n.exports}d.d=(e,t)=>{for(var n in t)d.o(t,n)&&!d.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},d.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),d.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var u={};d.r(u),d.d(u,{default:()=>z});var h=d(860),p=d(650),f=d(961),b=d(439),v=d(234),y=d(911),x=d(947);const g="\x3c!-- tab-notes:header --\x3e",m="\x3c!-- tab-notes:end-header --\x3e";class P{constructor(e){this.notesDir=e}indexPath(){return y.join(this.notesDir,"index.json")}notePath(e){if(/[/\\]/.test(e))throw new Error(`Invalid noteId: "${e}"`);return y.join(this.notesDir,`${e}.md`)}ensureDir(){x.mkdirSync(this.notesDir,{recursive:!0})}readIndex(){var e,t;try{const n=JSON.parse(x.readFileSync(this.indexPath(),"utf8"));return{meta:null!==(e=n.meta)&&void 0!==e?e:{},pins:null!==(t=n.pins)&&void 0!==t?t:{}}}catch(e){return{meta:{},pins:{}}}}writeIndex(e){this.ensureDir();const t=this.indexPath()+".tmp";x.writeFileSync(t,JSON.stringify(e,null,2),"utf8"),x.renameSync(t,this.indexPath())}load(e){if(/[/\\]/.test(e))throw new Error(`Invalid noteId: "${e}"`);try{return function(e){const t=e.indexOf(g),n=e.indexOf(m);return-1===t||-1===n||n<t?{header:"",body:e.trim()}:{header:e.slice(t+25,n).trim(),body:e.slice(n+29).trim()}}(x.readFileSync(this.notePath(e),"utf8"))}catch(e){return{header:"",body:""}}}write(e,t){this.ensureDir(),x.writeFileSync(this.notePath(e),function(e){if(e.header.includes(m))throw new Error("Note header must not contain the end-sentinel");return`${g}\n${e.header}\n${m}\n\n${e.body}\n`}(t),"utf8")}saveBody(e,t){this.write(e,{header:this.load(e).header,body:t})}saveHeader(e,t){this.write(e,{header:t,body:this.load(e).body})}getMeta(e){var t;return null!==(t=this.readIndex().meta[e])&&void 0!==t?t:null}setMeta(e,t){const n=this.readIndex();n.meta[e]=t,this.writeIndex(n)}getPins(){return this.readIndex().pins}setPin(e,t){const n=this.readIndex();n.pins[e]=t,this.writeIndex(n)}removePin(e){const t=this.readIndex();delete t.pins[e],this.writeIndex(t)}}class w{constructor(e){this.store=e}resolve(e){if(e.repoPath){const t=this.store.getPins()[e.repoPath];if(t)return t}return e.noteId}pinToRepo(e,t){this.store.setPin(e,t)}unpin(e){this.store.removePin(e)}isPinned(e){return!!e&&e in this.store.getPins()}}var j=d(660);const R=(e,t,n)=>new Promise((o,r)=>{(0,j.execFile)(e,t,{cwd:n},(e,t)=>e?r(e):o(t))});var I,E,T;let S=class{constructor(e,t,n){this.app=e,this.config=t,this.hotkeys=n,this.currentNoteId=null,this.currentRepoPath=null,this.bodyInput$=new f.Subject,this.visible=!1,this.header="",this.body="",this.panelWidth=340,this.panelEl=null,this.headerEl=null,this.textareaEl=null,this.pinBtnEl=null}init(){var e,t;this.store=new P(this.resolveFolder()),this.binding=new w(this.store),this.bodyInput$.pipe((0,b.debounceTime)(400)).subscribe(e=>this.persistBody(e)),this.app.activeTabChange$.subscribe(e=>{this.loadForTab(e)}),this.hotkeys.hotkey$.subscribe(e=>{"tab-notes-toggle"===e&&this.toggle(),"tab-notes-pin"===e&&this.pinCurrentToRepo()}),(null===(t=null===(e=this.config.store)||void 0===e?void 0:e.tabNotes)||void 0===t?void 0:t.panelVisible)&&this.toggle()}resolveFolder(){var e,t;const n=null===(t=null===(e=this.config.store)||void 0===e?void 0:e.tabNotes)||void 0===t?void 0:t.folder,o=y.join(v.homedir(),".config","tabby","tab-notes"),r=n||o;try{return new P(r).ensureDir(),r}catch(e){return console.warn("[tab-notes] notes folder unwritable, falling back to config dir:",e),o}}toggle(){this.visible=!this.visible,this.visible?(this.mountPanel(),this.loadForTab(this.app.activeTab)):this.unmountPanel()}mountPanel(){if(this.panelEl)return;const e=document.createElement("div");e.style.cssText=["position:fixed","top:0","right:0","bottom:0",`width:${this.panelWidth}px`,"z-index:99998","display:flex","flex-direction:column","background:rgba(24,24,27,0.97)","color:#e4e4e7","border-left:1px solid #3f3f46","box-shadow:-4px 0 16px rgba(0,0,0,0.35)",'font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif'].join(";");const t=document.createElement("div");t.style.cssText=["display:flex","align-items:center","justify-content:space-between","padding:8px 10px","background:#18181b","border-bottom:1px solid #3f3f46","font-size:12px","font-weight:600","letter-spacing:.02em"].join(";");const n=document.createElement("span");n.textContent="Tab Notes";const o=document.createElement("div");o.style.cssText="display:flex;gap:4px";const r=document.createElement("button");r.textContent="๐ Pin",r.title="Pin this note to the current repo",this.styleButton(r),r.addEventListener("click",()=>this.pinCurrentToRepo()),this.pinBtnEl=r;const i=document.createElement("button");i.textContent="โ",i.title="Close (toggle with the toolbar button)",this.styleButton(i),i.addEventListener("click",()=>this.toggle()),o.appendChild(r),o.appendChild(i),t.appendChild(n),t.appendChild(o);const s=document.createElement("div");s.style.cssText=["padding:6px 10px","font-size:11px","color:#a1a1aa","white-space:pre-wrap","word-break:break-all","border-bottom:1px solid #27272a"].join(";"),this.headerEl=s;const a=document.createElement("textarea");a.placeholder="What were you doing in this tab? What's next?",a.style.cssText=["flex:1","resize:none","border:0","outline:none","padding:10px","background:transparent","color:#e4e4e7","font-size:13px","line-height:1.5","font-family:ui-monospace,SFMono-Regular,Menlo,monospace"].join(";"),a.addEventListener("input",()=>this.onBodyChanged(a.value)),this.textareaEl=a,e.appendChild(t),e.appendChild(s),e.appendChild(a),document.body.appendChild(e),this.panelEl=e,this.applyLayout(!0),this.renderState(),setTimeout(()=>{var e;return null===(e=this.textareaEl)||void 0===e?void 0:e.focus()},0)}applyLayout(e){const t=document.querySelector("app-root"),n=document.querySelector("app-root .content");t&&(t.style.transition="width 0.15s ease",t.style.width=e?`calc(100vw - ${this.panelWidth}px)`:""),n&&(n.style.width=e?"100%":""),setTimeout(()=>window.dispatchEvent(new Event("resize")),160)}styleButton(e){e.style.cssText=["background:transparent","border:1px solid #3f3f46","border-radius:4px","color:#d4d4d8","font-size:11px","padding:2px 6px","cursor:pointer"].join(";")}unmountPanel(){var e;null===(e=this.panelEl)||void 0===e||e.remove(),this.panelEl=null,this.headerEl=null,this.textareaEl=null,this.pinBtnEl=null,this.applyLayout(!1)}renderState(){if(this.headerEl&&(this.headerEl.textContent=this.header||"> ๐ unknown"),this.textareaEl&&this.textareaEl.value!==this.body&&(this.textareaEl.value=this.body),this.pinBtnEl){const e=this.binding.isPinned(this.currentRepoPath);this.pinBtnEl.textContent=e?"๐ Pinned":"๐ Pin",this.pinBtnEl.style.opacity=this.currentRepoPath?"1":"0.4"}}async loadForTab(e){if(!e||!e.__tabNotesId)return this.currentNoteId=null,void this.renderState();const t=await this.readCwd(e),n=t?await async function(e,t){try{return{repoPath:(await t("git",["-C",e,"rev-parse","--show-toplevel"],e)).trim()||null,branch:function(e){const t=e.trim();return t.length>0?t:null}(await t("git",["-C",e,"branch","--show-current"],e))}}catch(e){return{repoPath:null,branch:null}}}(t,R):{repoPath:null,branch:null};this.currentRepoPath=n.repoPath;const o=this.binding.resolve({noteId:e.__tabNotesId,repoPath:n.repoPath});this.currentNoteId=o;const r=this.store.load(o),i=function(e){var t;const n=[`๐ ${null!==(t=e.cwd)&&void 0!==t?t:"unknown"}`];return e.branch&&n.push(e.branch),e.lastCommand&&n.push(`last: ${e.lastCommand}`),`> ${n.join(" ยท ")}`}({cwd:t,branch:n.branch,lastCommand:null});this.store.saveHeader(o,i),this.header=i,this.body=r.body,this.renderState()}async readCwd(e){var t,n,o,r;const i=null!==(n=null===(t=null==e?void 0:e.getFocusedTab)||void 0===t?void 0:t.call(e))&&void 0!==n?n:e,s=null==i?void 0:i.session;try{return(null===(o=null==s?void 0:s.supportsWorkingDirectory)||void 0===o?void 0:o.call(s))&&null!==(r=await s.getWorkingDirectory())&&void 0!==r?r:null}catch(e){return null}}onBodyChanged(e){this.body=e,this.bodyInput$.next(e)}persistBody(e){if(!this.currentNoteId)return;this.store.saveBody(this.currentNoteId,e);const t=e.split("\n")[0].slice(0,60);this.store.setMeta(this.currentNoteId,{title:t,lastActive:(new Date).toISOString()})}pinCurrentToRepo(){this.currentNoteId&&this.currentRepoPath&&(this.binding.isPinned(this.currentRepoPath)?this.binding.unpin(this.currentRepoPath):this.binding.pinToRepo(this.currentRepoPath,this.currentNoteId),this.loadForTab(this.app.activeTab))}};S=function(e,t,n,o){var r,i=arguments.length,s=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,o);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(i<3?r(s):i>3?r(t,n,s):r(t,n))||s);return i>3&&s&&Object.defineProperty(t,n,s),s}([(0,h.Injectable)({providedIn:"root"}),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",["function"==typeof(I=void 0!==p.AppService&&p.AppService)?I:Object,"function"==typeof(E=void 0!==p.ConfigService&&p.ConfigService)?E:Object,"function"==typeof(T=void 0!==p.HotkeysService&&p.HotkeysService)?T:Object])],S);const C=require("crypto");var O;let N=class{constructor(e){this.tabRecovery=e}init(e){this.patchRecovery(),e.tabOpened$.subscribe(e=>this.attach(e));for(const t of e.tabs)this.attach(t)}patchRecovery(){var e;const t=this.tabRecovery;if(t.__tabNotesPatched)return;const n=null===(e=t.recoverTab)||void 0===e?void 0:e.bind(t);n&&(t.recoverTab=async e=>{var t;const o=await n(e);return o&&(null==e?void 0:e.tabNotesId)&&(o.inputs={...null!==(t=o.inputs)&&void 0!==t?t:{},__tabNotesId:e.tabNotesId}),o},t.__tabNotesPatched=!0)}attach(e){var t;if(e.__tabNotesId||(e.__tabNotesId=(0,C.randomUUID)()),e.__tabNotesGetTokenPatched)return;const n=null===(t=e.getRecoveryToken)||void 0===t?void 0:t.bind(e);n&&(e.getRecoveryToken=async()=>{const t=await n();return t&&(t.tabNotesId=e.__tabNotesId),t},e.__tabNotesGetTokenPatched=!0)}};N=function(e,t,n,o){var r,i=arguments.length,s=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,o);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(i<3?r(s):i>3?r(t,n,s):r(t,n))||s);return i>3&&s&&Object.defineProperty(t,n,s),s}([(0,h.Injectable)({providedIn:"root"}),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",["function"==typeof(O=void 0!==p.TabRecoveryService&&p.TabRecoveryService)?O:Object])],N);var k;let _=class extends p.ToolbarButtonProvider{constructor(e){super(),this.panel=e}provide(){return[{icon:"note",title:"Tab Notes",weight:5,click:()=>this.panel.toggle()}]}};_=function(e,t,n,o){var r,i=arguments.length,s=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,o);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(i<3?r(s):i>3?r(t,n,s):r(t,n))||s);return i>3&&s&&Object.defineProperty(t,n,s),s}([(0,h.Injectable)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",["function"==typeof(k=void 0!==S&&S)?k:Object])],_);class q extends p.ConfigProvider{constructor(){super(...arguments),this.defaults={tabNotes:{folder:null,panelVisible:!1}}}}class B extends p.HotkeyProvider{async provide(){return[{id:"tab-notes-toggle",name:"Toggle tab notes panel"},{id:"tab-notes-pin",name:"Pin this tab note to its repo"}]}}var $,D,F;let M=class{constructor(e,t,n){n.init(e),t.init()}};M=function(e,t,n,o){var r,i=arguments.length,s=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,o);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(i<3?r(s):i>3?r(t,n,s):r(t,n))||s);return i>3&&s&&Object.defineProperty(t,n,s),s}([(0,h.NgModule)({providers:[S,N,{provide:p.ToolbarButtonProvider,useClass:_,multi:!0},{provide:p.ConfigProvider,useClass:q,multi:!0},{provide:p.HotkeyProvider,useClass:B,multi:!0}]}),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",["function"==typeof($=void 0!==p.AppService&&p.AppService)?$:Object,"function"==typeof(D=void 0!==S&&S)?D:Object,"function"==typeof(F=void 0!==N&&N)?F:Object])],M);const z=M;return u})());
|
|
1
|
+
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("@angular/core"),require("tabby-core"),require("rxjs"),require("rxjs/operators"),require("os"),require("fs"),require("path"),require("child_process"));else if("function"==typeof define&&define.amd)define(["@angular/core","tabby-core","rxjs","rxjs/operators","os","fs","path","child_process"],t);else{var n="object"==typeof exports?t(require("@angular/core"),require("tabby-core"),require("rxjs"),require("rxjs/operators"),require("os"),require("fs"),require("path"),require("child_process")):t(e["@angular/core"],e["tabby-core"],e.rxjs,e["rxjs/operators"],e.os,e.fs,e.path,e.child_process);for(var o in n)("object"==typeof exports?exports:e)[o]=n[o]}}(global,(e,t,n,o,r,i,s,a)=>(()=>{"use strict";var c={860(t){t.exports=e},660(e){e.exports=a},947(e){e.exports=i},234(e){e.exports=r},911(e){e.exports=s},961(e){e.exports=n},439(e){e.exports=o},650(e){e.exports=t}},l={};function d(e){var t=l[e];if(void 0!==t)return t.exports;var n=l[e]={exports:{}};return c[e](n,n.exports,d),n.exports}d.d=(e,t)=>{for(var n in t)d.o(t,n)&&!d.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},d.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),d.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var u={};d.r(u),d.d(u,{default:()=>M});var p=d(860),h=d(650),b=d(961),f=d(439),y=d(234),v=d(947),g=d(911);const x="\x3c!-- tab-notes:header --\x3e",m="\x3c!-- tab-notes:end-header --\x3e";class P{constructor(e){this.notesDir=e}indexPath(){return g.join(this.notesDir,"index.json")}notePath(e){if(/[/\\]/.test(e))throw new Error(`Invalid noteId: "${e}"`);return g.join(this.notesDir,`${e}.md`)}ensureDir(){v.mkdirSync(this.notesDir,{recursive:!0})}readIndex(){var e,t;try{const n=JSON.parse(v.readFileSync(this.indexPath(),"utf8"));return{meta:null!==(e=n.meta)&&void 0!==e?e:{},pins:null!==(t=n.pins)&&void 0!==t?t:{}}}catch(e){return{meta:{},pins:{}}}}writeIndex(e){this.ensureDir();const t=this.indexPath()+".tmp";v.writeFileSync(t,JSON.stringify(e,null,2),"utf8"),v.renameSync(t,this.indexPath())}load(e){if(/[/\\]/.test(e))throw new Error(`Invalid noteId: "${e}"`);try{return function(e){const t=e.indexOf(x),n=e.indexOf(m);return-1===t||-1===n||n<t?{header:"",body:e.trim()}:{header:e.slice(t+25,n).trim(),body:e.slice(n+29).trim()}}(v.readFileSync(this.notePath(e),"utf8"))}catch(e){return{header:"",body:""}}}write(e,t){this.ensureDir(),v.writeFileSync(this.notePath(e),function(e){if(e.header.includes(m))throw new Error("Note header must not contain the end-sentinel");return`${x}\n${e.header}\n${m}\n\n${e.body}\n`}(t),"utf8")}saveBody(e,t){this.write(e,{header:this.load(e).header,body:t})}saveHeader(e,t){this.write(e,{header:t,body:this.load(e).body})}getMeta(e){var t;return null!==(t=this.readIndex().meta[e])&&void 0!==t?t:null}setMeta(e,t){const n=this.readIndex();n.meta[e]=t,this.writeIndex(n)}getPins(){return this.readIndex().pins}setPin(e,t){const n=this.readIndex();n.pins[e]=t,this.writeIndex(n)}removePin(e){const t=this.readIndex();delete t.pins[e],this.writeIndex(t)}}class w{constructor(e){this.store=e}resolve(e){if(e.repoPath){const t=this.store.getPins()[e.repoPath];if(t)return t}return e.noteId}pinToRepo(e,t){this.store.setPin(e,t)}unpin(e){this.store.removePin(e)}isPinned(e){return!!e&&e in this.store.getPins()}}var j=d(660);const R=(e,t,n)=>new Promise((o,r)=>{(0,j.execFile)(e,t,{cwd:n},(e,t)=>e?r(e):o(t))});var I,E,S;let T=class{constructor(e,t,n){this.app=e,this.config=t,this.hotkeys=n,this.currentNoteId=null,this.currentRepoPath=null,this.bodyInput$=new b.Subject,this.visible=!1,this.header="",this.body="",this.panelWidth=340,this.panelEl=null,this.headerEl=null,this.textareaEl=null,this.pinBtnEl=null}init(){var e,t;this.store=new P(this.resolveFolder()),this.binding=new w(this.store),this.bodyInput$.pipe((0,f.debounceTime)(400)).subscribe(e=>this.persistBody(e)),this.app.activeTabChange$.subscribe(e=>{this.loadForTab(e)}),this.hotkeys.hotkey$.subscribe(e=>{"tab-notes-toggle"===e&&this.toggle(),"tab-notes-pin"===e&&this.pinCurrentToRepo()}),(null===(t=null===(e=this.config.store)||void 0===e?void 0:e.tabNotes)||void 0===t?void 0:t.panelVisible)&&this.toggle()}resolveFolder(){var e,t;const n=null===(t=null===(e=this.config.store)||void 0===e?void 0:e.tabNotes)||void 0===t?void 0:t.folder,o=n||function(e,t,n){if("darwin"===e)return g.join(n,"Library","Application Support","tabby","tab-notes");if("win32"===e){const e=t.APPDATA||g.join(n,"AppData","Roaming");return g.join(e,"tabby","tab-notes")}const o=t.XDG_CONFIG_HOME||g.join(n,".config");return g.join(o,"tabby","tab-notes")}(process.platform,process.env,y.homedir());n||this.migrateLegacyNotes(o);try{return new P(o).ensureDir(),o}catch(e){const t=g.join(y.tmpdir(),"tabby-tab-notes");return console.warn("[tab-notes] notes folder unwritable, falling back to",t,e),t}}migrateLegacyNotes(e){try{const n=(t=y.homedir(),g.join(t,".config","tabby","tab-notes"));if(n===e)return;!v.existsSync(e)&&v.existsSync(n)&&(v.mkdirSync(g.dirname(e),{recursive:!0}),v.renameSync(n,e),console.log("[tab-notes] migrated notes",n,"->",e))}catch(e){console.warn("[tab-notes] notes migration skipped:",e)}var t}toggle(){this.visible=!this.visible,this.visible?(this.mountPanel(),this.loadForTab(this.app.activeTab)):this.unmountPanel()}mountPanel(){if(this.panelEl)return;const e=document.createElement("div");e.style.cssText=["position:fixed","top:0","right:0","bottom:0",`width:${this.panelWidth}px`,"z-index:99998","display:flex","flex-direction:column","background:rgba(24,24,27,0.97)","color:#e4e4e7","border-left:1px solid #3f3f46","box-shadow:-4px 0 16px rgba(0,0,0,0.35)",'font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif'].join(";");const t=document.createElement("div");t.style.cssText=["display:flex","align-items:center","justify-content:space-between","padding:8px 10px","background:#18181b","border-bottom:1px solid #3f3f46","font-size:12px","font-weight:600","letter-spacing:.02em"].join(";");const n=document.createElement("span");n.textContent="Tab Notes";const o=document.createElement("div");o.style.cssText="display:flex;gap:4px";const r=document.createElement("button");r.textContent="๐ Pin",r.title="Pin this note to the current repo",this.styleButton(r),r.addEventListener("click",()=>this.pinCurrentToRepo()),this.pinBtnEl=r;const i=document.createElement("button");i.textContent="โ",i.title="Close (toggle with the toolbar button)",this.styleButton(i),i.addEventListener("click",()=>this.toggle()),o.appendChild(r),o.appendChild(i),t.appendChild(n),t.appendChild(o);const s=document.createElement("div");s.style.cssText=["padding:6px 10px","font-size:11px","color:#a1a1aa","white-space:pre-wrap","word-break:break-all","border-bottom:1px solid #27272a"].join(";"),this.headerEl=s;const a=document.createElement("textarea");a.placeholder="What were you doing in this tab? What's next?",a.style.cssText=["flex:1","resize:none","border:0","outline:none","padding:10px","background:transparent","color:#e4e4e7","font-size:13px","line-height:1.5","font-family:ui-monospace,SFMono-Regular,Menlo,monospace"].join(";"),a.addEventListener("input",()=>this.onBodyChanged(a.value)),this.textareaEl=a,e.appendChild(t),e.appendChild(s),e.appendChild(a),document.body.appendChild(e),this.panelEl=e,this.applyLayout(!0),this.renderState(),setTimeout(()=>{var e;return null===(e=this.textareaEl)||void 0===e?void 0:e.focus()},0)}applyLayout(e){const t=document.querySelector("app-root"),n=document.querySelector("app-root .content");t&&(t.style.transition="width 0.15s ease",t.style.width=e?`calc(100vw - ${this.panelWidth}px)`:""),n&&(n.style.width=e?"100%":""),setTimeout(()=>window.dispatchEvent(new Event("resize")),160)}styleButton(e){e.style.cssText=["background:transparent","border:1px solid #3f3f46","border-radius:4px","color:#d4d4d8","font-size:11px","padding:2px 6px","cursor:pointer"].join(";")}unmountPanel(){var e;null===(e=this.panelEl)||void 0===e||e.remove(),this.panelEl=null,this.headerEl=null,this.textareaEl=null,this.pinBtnEl=null,this.applyLayout(!1)}renderState(){if(this.headerEl&&(this.headerEl.textContent=this.header||"> ๐ unknown"),this.textareaEl&&this.textareaEl.value!==this.body&&(this.textareaEl.value=this.body),this.pinBtnEl){const e=this.binding.isPinned(this.currentRepoPath);this.pinBtnEl.textContent=e?"๐ Pinned":"๐ Pin",this.pinBtnEl.style.opacity=this.currentRepoPath?"1":"0.4"}}async loadForTab(e){if(!e||!e.__tabNotesId)return this.currentNoteId=null,void this.renderState();const t=await this.readCwd(e),n=t?await async function(e,t){try{return{repoPath:(await t("git",["-C",e,"rev-parse","--show-toplevel"],e)).trim()||null,branch:function(e){const t=e.trim();return t.length>0?t:null}(await t("git",["-C",e,"branch","--show-current"],e))}}catch(e){return{repoPath:null,branch:null}}}(t,R):{repoPath:null,branch:null};this.currentRepoPath=n.repoPath;const o=this.binding.resolve({noteId:e.__tabNotesId,repoPath:n.repoPath});this.currentNoteId=o;const r=this.store.load(o),i=function(e){var t;const n=[`๐ ${null!==(t=e.cwd)&&void 0!==t?t:"unknown"}`];return e.branch&&n.push(e.branch),e.lastCommand&&n.push(`last: ${e.lastCommand}`),`> ${n.join(" ยท ")}`}({cwd:t,branch:n.branch,lastCommand:null});this.store.saveHeader(o,i),this.header=i,this.body=r.body,this.renderState()}async readCwd(e){var t,n,o,r;const i=null!==(n=null===(t=null==e?void 0:e.getFocusedTab)||void 0===t?void 0:t.call(e))&&void 0!==n?n:e,s=null==i?void 0:i.session;try{return(null===(o=null==s?void 0:s.supportsWorkingDirectory)||void 0===o?void 0:o.call(s))&&null!==(r=await s.getWorkingDirectory())&&void 0!==r?r:null}catch(e){return null}}onBodyChanged(e){this.body=e,this.bodyInput$.next(e)}persistBody(e){if(!this.currentNoteId)return;this.store.saveBody(this.currentNoteId,e);const t=e.split("\n")[0].slice(0,60);this.store.setMeta(this.currentNoteId,{title:t,lastActive:(new Date).toISOString()})}pinCurrentToRepo(){this.currentNoteId&&this.currentRepoPath&&(this.binding.isPinned(this.currentRepoPath)?this.binding.unpin(this.currentRepoPath):this.binding.pinToRepo(this.currentRepoPath,this.currentNoteId),this.loadForTab(this.app.activeTab))}};T=function(e,t,n,o){var r,i=arguments.length,s=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,o);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(i<3?r(s):i>3?r(t,n,s):r(t,n))||s);return i>3&&s&&Object.defineProperty(t,n,s),s}([(0,p.Injectable)({providedIn:"root"}),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",["function"==typeof(I=void 0!==h.AppService&&h.AppService)?I:Object,"function"==typeof(E=void 0!==h.ConfigService&&h.ConfigService)?E:Object,"function"==typeof(S=void 0!==h.HotkeysService&&h.HotkeysService)?S:Object])],T);const C=require("crypto");var N;let O=class{constructor(e){this.tabRecovery=e}init(e){this.patchRecovery(),e.tabOpened$.subscribe(e=>this.attach(e));for(const t of e.tabs)this.attach(t)}patchRecovery(){var e;const t=this.tabRecovery;if(t.__tabNotesPatched)return;const n=null===(e=t.recoverTab)||void 0===e?void 0:e.bind(t);n&&(t.recoverTab=async e=>{var t;const o=await n(e);return o&&(null==e?void 0:e.tabNotesId)&&(o.inputs={...null!==(t=o.inputs)&&void 0!==t?t:{},__tabNotesId:e.tabNotesId}),o},t.__tabNotesPatched=!0)}attach(e){var t;if(e.__tabNotesId||(e.__tabNotesId=(0,C.randomUUID)()),e.__tabNotesGetTokenPatched)return;const n=null===(t=e.getRecoveryToken)||void 0===t?void 0:t.bind(e);n&&(e.getRecoveryToken=async()=>{const t=await n();return t&&(t.tabNotesId=e.__tabNotesId),t},e.__tabNotesGetTokenPatched=!0)}};O=function(e,t,n,o){var r,i=arguments.length,s=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,o);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(i<3?r(s):i>3?r(t,n,s):r(t,n))||s);return i>3&&s&&Object.defineProperty(t,n,s),s}([(0,p.Injectable)({providedIn:"root"}),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",["function"==typeof(N=void 0!==h.TabRecoveryService&&h.TabRecoveryService)?N:Object])],O);var k;let _=class extends h.ToolbarButtonProvider{constructor(e){super(),this.panel=e}provide(){return[{icon:"note",title:"Tab Notes",weight:5,click:()=>this.panel.toggle()}]}};_=function(e,t,n,o){var r,i=arguments.length,s=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,o);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(i<3?r(s):i>3?r(t,n,s):r(t,n))||s);return i>3&&s&&Object.defineProperty(t,n,s),s}([(0,p.Injectable)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",["function"==typeof(k=void 0!==T&&T)?k:Object])],_);class q extends h.ConfigProvider{constructor(){super(...arguments),this.defaults={tabNotes:{folder:null,panelVisible:!1}}}}class D extends h.HotkeyProvider{async provide(){return[{id:"tab-notes-toggle",name:"Toggle tab notes panel"},{id:"tab-notes-pin",name:"Pin this tab note to its repo"}]}}var B,$,F;let A=class{constructor(e,t,n){n.init(e),t.init()}};A=function(e,t,n,o){var r,i=arguments.length,s=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,o);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(i<3?r(s):i>3?r(t,n,s):r(t,n))||s);return i>3&&s&&Object.defineProperty(t,n,s),s}([(0,p.NgModule)({providers:[T,O,{provide:h.ToolbarButtonProvider,useClass:_,multi:!0},{provide:h.ConfigProvider,useClass:q,multi:!0},{provide:h.HotkeyProvider,useClass:D,multi:!0}]}),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",["function"==typeof(B=void 0!==h.AppService&&h.AppService)?B:Object,"function"==typeof($=void 0!==T&&T)?$:Object,"function"==typeof(F=void 0!==O&&O)?F:Object])],A);const M=A;return u})());
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","mappings":"CAAA,SAAAA,EAAAC,GACA,oBAAAC,SAAA,iBAAAC,OACAA,OAAAD,QAAAD,EAAAG,QAAA,iBAAAA,QAAA,cAAAA,QAAA,QAAAA,QAAA,kBAAAA,QAAA,MAAAA,QAAA,QAAAA,QAAA,MAAAA,QAAA,uBACA,sBAAAC,QAAAA,OAAAC,IACAD,OAAA,wFAAAJ,OACA,CACA,IAAAM,EAAA,iBAAAL,QAAAD,EAAAG,QAAA,iBAAAA,QAAA,cAAAA,QAAA,QAAAA,QAAA,kBAAAA,QAAA,MAAAA,QAAA,QAAAA,QAAA,MAAAA,QAAA,kBAAAH,EAAAD,EAAA,iBAAAA,EAAA,cAAAA,EAAA,KAAAA,EAAA,kBAAAA,EAAA,GAAAA,EAAA,KAAAA,EAAA,GAAAA,EAAA,eACA,QAAAQ,KAAAD,GAAA,iBAAAL,QAAAA,QAAAF,GAAAQ,GAAAD,EAAAC,EACA,CACC,CATD,CASCC,OAAA,CAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,qCCTDd,EAAAD,QAAAQ,UCAAP,EAAAD,QAAAe,UCAAd,EAAAD,QAAAc,UCAAb,EAAAD,QAAAY,UCAAX,EAAAD,QAAAa,UCAAZ,EAAAD,QAAAU,UCAAT,EAAAD,QAAAW,UCAAV,EAAAD,QAAAS,ICCAO,EAAA,GAGA,SAAAC,EAAAC,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1BgP,OAA0B,IAAjB1J,GAAAA,GAAiB0J,EAAAhP,OAAsB,mBAAtBiP,OAAsB,IAAZ7C,GAAAA,GAAY6C,EAAAjP,UADxDwO","sources":["webpack-tabby-tab-notes:///webpack/universalModuleDefinition","webpack-tabby-tab-notes:///external umd \"@angular/core\"","webpack-tabby-tab-notes:///external umd \"child_process\"","webpack-tabby-tab-notes:///external umd \"fs\"","webpack-tabby-tab-notes:///external umd \"os\"","webpack-tabby-tab-notes:///external umd \"path\"","webpack-tabby-tab-notes:///external umd \"rxjs\"","webpack-tabby-tab-notes:///external umd \"rxjs/operators\"","webpack-tabby-tab-notes:///external umd \"tabby-core\"","webpack-tabby-tab-notes:///webpack/bootstrap","webpack-tabby-tab-notes:///webpack/runtime/define property getters","webpack-tabby-tab-notes:///webpack/runtime/hasOwnProperty shorthand","webpack-tabby-tab-notes:///webpack/runtime/make namespace object","webpack-tabby-tab-notes:///./src/lib/noteStore.ts","webpack-tabby-tab-notes:///./src/lib/noteBinding.ts","webpack-tabby-tab-notes:///./src/services/nodeExec.ts","webpack-tabby-tab-notes:///./src/services/notesPanel.service.ts","webpack-tabby-tab-notes:///./src/lib/contextStamper.ts","webpack-tabby-tab-notes:///external node-commonjs \"crypto\"","webpack-tabby-tab-notes:///./src/services/tabId.service.ts","webpack-tabby-tab-notes:///./src/providers/toolbarButton.ts","webpack-tabby-tab-notes:///./src/providers/config.ts","webpack-tabby-tab-notes:///./src/providers/hotkeys.ts","webpack-tabby-tab-notes:///./src/index.ts"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"@angular/core\"), require(\"tabby-core\"), require(\"rxjs\"), require(\"rxjs/operators\"), require(\"os\"), require(\"path\"), require(\"fs\"), require(\"child_process\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([\"@angular/core\", \"tabby-core\", \"rxjs\", \"rxjs/operators\", \"os\", \"path\", \"fs\", \"child_process\"], factory);\n\telse {\n\t\tvar a = typeof exports === 'object' ? factory(require(\"@angular/core\"), require(\"tabby-core\"), require(\"rxjs\"), require(\"rxjs/operators\"), require(\"os\"), require(\"path\"), require(\"fs\"), require(\"child_process\")) : factory(root[\"@angular/core\"], root[\"tabby-core\"], root[\"rxjs\"], root[\"rxjs/operators\"], root[\"os\"], root[\"path\"], root[\"fs\"], root[\"child_process\"]);\n\t\tfor(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i];\n\t}\n})(global, (__WEBPACK_EXTERNAL_MODULE__860__, __WEBPACK_EXTERNAL_MODULE__650__, __WEBPACK_EXTERNAL_MODULE__961__, __WEBPACK_EXTERNAL_MODULE__439__, __WEBPACK_EXTERNAL_MODULE__234__, __WEBPACK_EXTERNAL_MODULE__911__, __WEBPACK_EXTERNAL_MODULE__947__, __WEBPACK_EXTERNAL_MODULE__660__) => {\nreturn ","module.exports = __WEBPACK_EXTERNAL_MODULE__860__;","module.exports = __WEBPACK_EXTERNAL_MODULE__660__;","module.exports = __WEBPACK_EXTERNAL_MODULE__947__;","module.exports = __WEBPACK_EXTERNAL_MODULE__234__;","module.exports = __WEBPACK_EXTERNAL_MODULE__911__;","module.exports = __WEBPACK_EXTERNAL_MODULE__961__;","module.exports = __WEBPACK_EXTERNAL_MODULE__439__;","module.exports = __WEBPACK_EXTERNAL_MODULE__650__;","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","import * as fs from 'fs'\nimport * as path from 'path'\n\nexport interface NoteContent { header: string; body: string }\nexport interface NoteMeta { title: string; lastActive: string }\ninterface IndexShape { meta: Record<string, NoteMeta>; pins: Record<string, string> }\n\nconst HEADER_START = '<!-- tab-notes:header -->'\nconst HEADER_END = '<!-- tab-notes:end-header -->'\n\nexport function parseNoteFile(raw: string): NoteContent {\n const start = raw.indexOf(HEADER_START)\n const end = raw.indexOf(HEADER_END)\n if (start === -1 || end === -1 || end < start) {\n return { header: '', body: raw.trim() }\n }\n const header = raw.slice(start + HEADER_START.length, end).trim()\n const body = raw.slice(end + HEADER_END.length).trim()\n return { header, body }\n}\n\nexport function serializeNoteFile(content: NoteContent): string {\n if (content.header.includes(HEADER_END)) {\n throw new Error('Note header must not contain the end-sentinel')\n }\n return `${HEADER_START}\\n${content.header}\\n${HEADER_END}\\n\\n${content.body}\\n`\n}\n\nexport class NoteStore {\n constructor(private notesDir: string) {}\n\n private indexPath(): string { return path.join(this.notesDir, 'index.json') }\n private notePath(noteId: string): string {\n if (/[/\\\\]/.test(noteId)) { throw new Error(`Invalid noteId: \"${noteId}\"`) }\n return path.join(this.notesDir, `${noteId}.md`)\n }\n\n ensureDir(): void { fs.mkdirSync(this.notesDir, { recursive: true }) }\n\n private readIndex(): IndexShape {\n try {\n const parsed = JSON.parse(fs.readFileSync(this.indexPath(), 'utf8'))\n return { meta: parsed.meta ?? {}, pins: parsed.pins ?? {} }\n } catch { return { meta: {}, pins: {} } }\n }\n\n private writeIndex(index: IndexShape): void {\n this.ensureDir()\n const tmp = this.indexPath() + '.tmp'\n fs.writeFileSync(tmp, JSON.stringify(index, null, 2), 'utf8')\n fs.renameSync(tmp, this.indexPath())\n }\n\n load(noteId: string): NoteContent {\n if (/[/\\\\]/.test(noteId)) { throw new Error(`Invalid noteId: \"${noteId}\"`) }\n try { return parseNoteFile(fs.readFileSync(this.notePath(noteId), 'utf8')) }\n catch { return { header: '', body: '' } }\n }\n\n private write(noteId: string, content: NoteContent): void {\n this.ensureDir()\n fs.writeFileSync(this.notePath(noteId), serializeNoteFile(content), 'utf8')\n }\n\n saveBody(noteId: string, body: string): void {\n this.write(noteId, { header: this.load(noteId).header, body })\n }\n\n saveHeader(noteId: string, header: string): void {\n this.write(noteId, { header, body: this.load(noteId).body })\n }\n\n getMeta(noteId: string): NoteMeta | null { return this.readIndex().meta[noteId] ?? null }\n\n setMeta(noteId: string, meta: NoteMeta): void {\n const index = this.readIndex(); index.meta[noteId] = meta; this.writeIndex(index)\n }\n\n getPins(): Record<string, string> { return this.readIndex().pins }\n\n setPin(repoPath: string, noteId: string): void {\n const index = this.readIndex(); index.pins[repoPath] = noteId; this.writeIndex(index)\n }\n\n removePin(repoPath: string): void {\n const index = this.readIndex(); delete index.pins[repoPath]; this.writeIndex(index)\n }\n}\n","import { NoteStore } from './noteStore'\n\nexport interface TabRef { noteId: string; repoPath: string | null }\n\nexport class NoteBinding {\n constructor(private store: NoteStore) {}\n\n resolve(tab: TabRef): string {\n if (tab.repoPath) {\n const pinned = this.store.getPins()[tab.repoPath]\n if (pinned) { return pinned }\n }\n return tab.noteId\n }\n\n pinToRepo(repoPath: string, noteId: string): void { this.store.setPin(repoPath, noteId) }\n unpin(repoPath: string): void { this.store.removePin(repoPath) }\n isPinned(repoPath: string | null): boolean {\n return repoPath ? repoPath in this.store.getPins() : false\n }\n}\n","import { execFile } from 'child_process'\nimport { ExecFn } from '../lib/contextStamper'\n\nexport const nodeExec: ExecFn = (cmd, args, cwd) => new Promise((resolve, reject) => {\n execFile(cmd, args, { cwd }, (err, stdout) => err ? reject(err) : resolve(stdout))\n})\n","import { Injectable } from '@angular/core'\nimport { Subject } from 'rxjs'\nimport { debounceTime } from 'rxjs/operators'\nimport * as os from 'os'\nimport * as path from 'path'\nimport { AppService, ConfigService, HotkeysService } from 'tabby-core'\nimport { NoteStore } from '../lib/noteStore'\nimport { NoteBinding } from '../lib/noteBinding'\nimport { formatHeader, getRepoContext } from '../lib/contextStamper'\nimport { nodeExec } from './nodeExec'\n\n@Injectable({ providedIn: 'root' })\nexport class NotesPanelService {\n private store!: NoteStore\n private binding!: NoteBinding\n private currentNoteId: string | null = null\n private currentRepoPath: string | null = null\n private bodyInput$ = new Subject<string>()\n\n visible = false\n header = ''\n body = ''\n\n // Plain-DOM panel (avoids Angular dynamic-component API differences across Tabby versions).\n private readonly panelWidth = 340\n private panelEl: HTMLElement | null = null\n private headerEl: HTMLElement | null = null\n private textareaEl: HTMLTextAreaElement | null = null\n private pinBtnEl: HTMLButtonElement | null = null\n\n constructor(\n private app: AppService,\n private config: ConfigService,\n private hotkeys: HotkeysService,\n ) {}\n\n init(): void {\n this.store = new NoteStore(this.resolveFolder())\n this.binding = new NoteBinding(this.store)\n\n this.bodyInput$.pipe(debounceTime(400)).subscribe(body => this.persistBody(body))\n\n this.app.activeTabChange$.subscribe((tab: any) => { void this.loadForTab(tab) })\n\n this.hotkeys.hotkey$.subscribe((id: string) => {\n if (id === 'tab-notes-toggle') { this.toggle() }\n if (id === 'tab-notes-pin') { this.pinCurrentToRepo() }\n })\n\n if ((this.config.store as any)?.tabNotes?.panelVisible) {\n this.toggle()\n }\n }\n\n private resolveFolder(): string {\n const configured = (this.config.store as any)?.tabNotes?.folder\n const fallback = path.join(os.homedir(), '.config', 'tabby', 'tab-notes')\n const folder = configured || fallback\n try {\n new NoteStore(folder).ensureDir()\n return folder\n } catch (e) {\n console.warn('[tab-notes] notes folder unwritable, falling back to config dir:', e)\n return fallback\n }\n }\n\n // ---- panel lifecycle ----\n\n toggle(): void {\n this.visible = !this.visible\n if (this.visible) {\n this.mountPanel()\n void this.loadForTab(this.app.activeTab)\n } else {\n this.unmountPanel()\n }\n }\n\n private mountPanel(): void {\n if (this.panelEl) { return }\n\n const panel = document.createElement('div')\n panel.style.cssText = [\n 'position:fixed', 'top:0', 'right:0', 'bottom:0', `width:${this.panelWidth}px`,\n 'z-index:99998', 'display:flex', 'flex-direction:column',\n 'background:rgba(24,24,27,0.97)', 'color:#e4e4e7',\n 'border-left:1px solid #3f3f46', 'box-shadow:-4px 0 16px rgba(0,0,0,0.35)',\n 'font-family:-apple-system,BlinkMacSystemFont,\"Segoe UI\",sans-serif',\n ].join(';')\n\n const titlebar = document.createElement('div')\n titlebar.style.cssText = [\n 'display:flex', 'align-items:center', 'justify-content:space-between',\n 'padding:8px 10px', 'background:#18181b', 'border-bottom:1px solid #3f3f46',\n 'font-size:12px', 'font-weight:600', 'letter-spacing:.02em',\n ].join(';')\n\n const title = document.createElement('span')\n title.textContent = 'Tab Notes'\n\n const actions = document.createElement('div')\n actions.style.cssText = 'display:flex;gap:4px'\n\n const pinBtn = document.createElement('button')\n pinBtn.textContent = '๐ Pin'\n pinBtn.title = 'Pin this note to the current repo'\n this.styleButton(pinBtn)\n pinBtn.addEventListener('click', () => this.pinCurrentToRepo())\n this.pinBtnEl = pinBtn\n\n const closeBtn = document.createElement('button')\n closeBtn.textContent = 'โ'\n closeBtn.title = 'Close (toggle with the toolbar button)'\n this.styleButton(closeBtn)\n closeBtn.addEventListener('click', () => this.toggle())\n\n actions.appendChild(pinBtn)\n actions.appendChild(closeBtn)\n titlebar.appendChild(title)\n titlebar.appendChild(actions)\n\n const header = document.createElement('div')\n header.style.cssText = [\n 'padding:6px 10px', 'font-size:11px', 'color:#a1a1aa',\n 'white-space:pre-wrap', 'word-break:break-all', 'border-bottom:1px solid #27272a',\n ].join(';')\n this.headerEl = header\n\n const textarea = document.createElement('textarea')\n textarea.placeholder = \"What were you doing in this tab? What's next?\"\n textarea.style.cssText = [\n 'flex:1', 'resize:none', 'border:0', 'outline:none', 'padding:10px',\n 'background:transparent', 'color:#e4e4e7', 'font-size:13px', 'line-height:1.5',\n 'font-family:ui-monospace,SFMono-Regular,Menlo,monospace',\n ].join(';')\n textarea.addEventListener('input', () => this.onBodyChanged(textarea.value))\n this.textareaEl = textarea\n\n panel.appendChild(titlebar)\n panel.appendChild(header)\n panel.appendChild(textarea)\n document.body.appendChild(panel)\n this.panelEl = panel\n\n this.applyLayout(true)\n this.renderState()\n setTimeout(() => this.textareaEl?.focus(), 0)\n }\n\n // Reflow Tabby's content so the terminal shrinks to the left of the panel instead of\n // being covered. Inline styles override the stylesheet's width:100vw; Tabby's own\n // terminal ResizeObserver re-fits the PTY to the new width. Clearing them restores\n // the original layout exactly.\n private applyLayout(open: boolean): void {\n const appRoot = document.querySelector('app-root') as HTMLElement | null\n const content = document.querySelector('app-root .content') as HTMLElement | null\n if (appRoot) {\n appRoot.style.transition = 'width 0.15s ease'\n appRoot.style.width = open ? `calc(100vw - ${this.panelWidth}px)` : ''\n }\n if (content) {\n content.style.width = open ? '100%' : ''\n }\n // Nudge a resize so the terminal re-fits immediately rather than on next focus.\n setTimeout(() => window.dispatchEvent(new Event('resize')), 160)\n }\n\n private styleButton(btn: HTMLButtonElement): void {\n btn.style.cssText = [\n 'background:transparent', 'border:1px solid #3f3f46', 'border-radius:4px',\n 'color:#d4d4d8', 'font-size:11px', 'padding:2px 6px', 'cursor:pointer',\n ].join(';')\n }\n\n private unmountPanel(): void {\n this.panelEl?.remove()\n this.panelEl = null\n this.headerEl = null\n this.textareaEl = null\n this.pinBtnEl = null\n this.applyLayout(false)\n }\n\n private renderState(): void {\n if (this.headerEl) { this.headerEl.textContent = this.header || '> ๐ unknown' }\n if (this.textareaEl && this.textareaEl.value !== this.body) {\n this.textareaEl.value = this.body\n }\n if (this.pinBtnEl) {\n const pinned = this.binding.isPinned(this.currentRepoPath)\n this.pinBtnEl.textContent = pinned ? '๐ Pinned' : '๐ Pin'\n this.pinBtnEl.style.opacity = this.currentRepoPath ? '1' : '0.4'\n }\n }\n\n // ---- note loading / saving ----\n\n async loadForTab(tab: any): Promise<void> {\n if (!tab || !tab['__tabNotesId']) { this.currentNoteId = null; this.renderState(); return }\n const cwd = await this.readCwd(tab)\n const repo = cwd ? await getRepoContext(cwd, nodeExec) : { repoPath: null, branch: null }\n this.currentRepoPath = repo.repoPath\n const noteId = this.binding.resolve({ noteId: tab['__tabNotesId'], repoPath: repo.repoPath })\n this.currentNoteId = noteId\n const note = this.store.load(noteId)\n const header = formatHeader({ cwd, branch: repo.branch, lastCommand: null })\n this.store.saveHeader(noteId, header)\n this.header = header\n this.body = note.body\n this.renderState()\n }\n\n private async readCwd(tab: any): Promise<string | null> {\n // VERIFIED against Tabby typings (tabby-core splitTab.component.d.ts + tabby-terminal\n // baseTerminalTab.component.d.ts / session.d.ts): app.activeTab is a SplitTabComponent\n // whose focused child pane (getFocusedTab()) is the BaseTerminalTabComponent that holds\n // `session: BaseSession | null`. The session exposes\n // supportsWorkingDirectory(): boolean\n // getWorkingDirectory(): Promise<string | null>\n const pane = tab?.getFocusedTab?.() ?? tab\n const session = pane?.session\n try {\n if (session?.supportsWorkingDirectory?.()) {\n return (await session.getWorkingDirectory()) ?? null\n }\n return null\n } catch { return null }\n }\n\n onBodyChanged(body: string): void { this.body = body; this.bodyInput$.next(body) }\n\n private persistBody(body: string): void {\n if (!this.currentNoteId) { return }\n this.store.saveBody(this.currentNoteId, body)\n const title = body.split('\\n')[0].slice(0, 60)\n this.store.setMeta(this.currentNoteId, { title, lastActive: new Date().toISOString() })\n }\n\n pinCurrentToRepo(): void {\n if (!this.currentNoteId || !this.currentRepoPath) { return }\n if (this.binding.isPinned(this.currentRepoPath)) {\n this.binding.unpin(this.currentRepoPath)\n } else {\n this.binding.pinToRepo(this.currentRepoPath, this.currentNoteId)\n }\n void this.loadForTab(this.app.activeTab)\n }\n}\n","export interface RepoContext { repoPath: string | null; branch: string | null }\nexport interface HeaderInput { cwd: string | null; branch: string | null; lastCommand: string | null }\nexport type ExecFn = (cmd: string, args: string[], cwd: string) => Promise<string>\n\nexport function formatHeader(input: HeaderInput): string {\n const parts: string[] = [`๐ ${input.cwd ?? 'unknown'}`]\n if (input.branch) { parts.push(input.branch) }\n if (input.lastCommand) { parts.push(`last: ${input.lastCommand}`) }\n return `> ${parts.join(' ยท ')}`\n}\n\nexport function parseBranch(stdout: string): string | null {\n const trimmed = stdout.trim()\n return trimmed.length > 0 ? trimmed : null\n}\n\nexport async function getRepoContext(cwd: string, exec: ExecFn): Promise<RepoContext> {\n try {\n const top = (await exec('git', ['-C', cwd, 'rev-parse', '--show-toplevel'], cwd)).trim()\n const branch = parseBranch(await exec('git', ['-C', cwd, 'branch', '--show-current'], cwd))\n return { repoPath: top || null, branch }\n } catch {\n return { repoPath: null, branch: null }\n }\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"crypto\");","import { Injectable } from '@angular/core'\nimport { AppService, TabRecoveryService } from 'tabby-core'\nimport { randomUUID } from 'crypto'\n\n// Owns the stable per-tab noteId and makes it survive a Tabby restart.\n//\n// Persistence chain (verified against Tabby's bundled code/typings):\n// 1. attach() wraps a tab's getRecoveryToken() so the saved token carries `tabNotesId`.\n// RecoveryToken allows arbitrary fields, so Tabby persists it in the saved-tabs file.\n// 2. On relaunch, patchRecovery() hooks TabRecoveryService.recoverTab(): it copies\n// token.tabNotesId into the rebuilt tab's params.inputs.\n// 3. TabsService.create() does `Object.assign(tab, params.inputs)`, so the restored tab\n// instance comes back with its original __tabNotesId โ and loadForTab resolves it to\n// the same note file.\n@Injectable({ providedIn: 'root' })\nexport class TabIdService {\n constructor(private tabRecovery: TabRecoveryService) {}\n\n init(app: AppService): void {\n this.patchRecovery()\n app.tabOpened$.subscribe((tab: any) => this.attach(tab))\n for (const tab of app.tabs) { this.attach(tab) }\n }\n\n private patchRecovery(): void {\n const svc: any = this.tabRecovery\n if (svc.__tabNotesPatched) { return }\n const original = svc.recoverTab?.bind(svc)\n if (!original) { return }\n svc.recoverTab = async (token: any) => {\n const params = await original(token)\n if (params && token?.tabNotesId) {\n params.inputs = { ...(params.inputs ?? {}), __tabNotesId: token.tabNotesId }\n }\n return params\n }\n svc.__tabNotesPatched = true\n }\n\n attach(tab: any): void {\n if (!tab['__tabNotesId']) { tab['__tabNotesId'] = randomUUID() }\n if (tab['__tabNotesGetTokenPatched']) { return }\n const original = tab.getRecoveryToken?.bind(tab)\n if (!original) { return }\n tab.getRecoveryToken = async () => {\n const token = await original()\n if (token) { token.tabNotesId = tab['__tabNotesId'] }\n return token\n }\n tab['__tabNotesGetTokenPatched'] = true\n }\n}\n","import { Injectable } from '@angular/core'\nimport { ToolbarButtonProvider, ToolbarButton } from 'tabby-core'\nimport { NotesPanelService } from '../services/notesPanel.service'\n\n// CONFIRM: ToolbarButtonProvider.provide() return type โ verify ToolbarButton shape has\n// { icon, title, weight, click } fields against tabby-clippy. The `icon` value 'note'\n// may need to match a specific icon set (FontAwesome, Material Icons, etc.) used by Tabby;\n// check tabby-clippy for the correct icon identifier format.\n@Injectable()\nexport class NotesButtonProvider extends ToolbarButtonProvider {\n constructor(private panel: NotesPanelService) { super() }\n provide(): ToolbarButton[] {\n return [{ icon: 'note', title: 'Tab Notes', weight: 5, click: () => this.panel.toggle() }]\n }\n}\n","import { ConfigProvider } from 'tabby-core'\n\n// CONFIRM ConfigProvider base class and the shape of the `defaults` property against\n// tabby-clippy (https://github.com/Eugeny/tabby-clippy). Specifically verify:\n// - whether `defaults` should be a plain object literal assigned as a class property,\n// or returned from an overridden method (e.g. getDefaults())\n// - the exact import path and that ConfigProvider is exported from 'tabby-core'\nexport class TabNotesConfigProvider extends ConfigProvider {\n defaults = { tabNotes: { folder: null, panelVisible: false } }\n}\n","import { HotkeyProvider, HotkeyDescription } from 'tabby-core'\n\n// CONFIRM HotkeyProvider base class and provide() return shape against tabby-clippy.\n// Specifically verify:\n// - that HotkeyDescription has { id: string; name: string } shape (no required additional fields)\n// - that HotkeyProvider is exported from 'tabby-core' (not tabby-settings)\n// - that the method is async provide(): Promise<HotkeyDescription[]> (vs provide(): HotkeyDescription[])\nexport class TabNotesHotkeyProvider extends HotkeyProvider {\n async provide(): Promise<HotkeyDescription[]> {\n return [\n { id: 'tab-notes-toggle', name: 'Toggle tab notes panel' },\n { id: 'tab-notes-pin', name: 'Pin this tab note to its repo' },\n ]\n }\n}\n","import { NgModule } from '@angular/core'\nimport {\n AppService, ToolbarButtonProvider, ConfigProvider, HotkeyProvider,\n} from 'tabby-core'\nimport { NotesPanelService } from './services/notesPanel.service'\nimport { TabIdService } from './services/tabId.service'\nimport { NotesButtonProvider } from './providers/toolbarButton'\nimport { TabNotesConfigProvider } from './providers/config'\nimport { TabNotesHotkeyProvider } from './providers/hotkeys'\n\n// CONFIRM: module-constructor bootstrap is the right hook in this Tabby version\n// (tabby-clippy uses this pattern). If a dedicated bootstrap provider is preferred\n// (e.g. a BootstrapProvider multi-token), switch to it and register it here.\n// Verify against tabby-clippy's NgModule definition.\n@NgModule({\n providers: [\n NotesPanelService,\n TabIdService,\n { provide: ToolbarButtonProvider, useClass: NotesButtonProvider, multi: true },\n { provide: ConfigProvider, useClass: TabNotesConfigProvider, multi: true },\n { provide: HotkeyProvider, useClass: TabNotesHotkeyProvider, multi: true },\n ],\n})\nexport default class TabNotesModule {\n constructor(app: AppService, panel: NotesPanelService, tabIds: TabIdService) {\n tabIds.init(app)\n panel.init()\n }\n}\n"],"names":["root","factory","exports","module","require","define","amd","a","i","global","__WEBPACK_EXTERNAL_MODULE__860__","__WEBPACK_EXTERNAL_MODULE__650__","__WEBPACK_EXTERNAL_MODULE__961__","__WEBPACK_EXTERNAL_MODULE__439__","__WEBPACK_EXTERNAL_MODULE__234__","__WEBPACK_EXTERNAL_MODULE__911__","__WEBPACK_EXTERNAL_MODULE__947__","__WEBPACK_EXTERNAL_MODULE__660__","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","__webpack_modules__","d","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","r","Symbol","toStringTag","value","HEADER_START","HEADER_END","NoteStore","constructor","notesDir","this","indexPath","external_path_","join","notePath","noteId","test","Error","ensureDir","external_fs_","mkdirSync","recursive","readIndex","parsed","JSON","parse","readFileSync","meta","_a","pins","_b","_c","writeIndex","index","tmp","writeFileSync","stringify","renameSync","load","raw","start","indexOf","end","header","body","trim","slice","parseNoteFile","write","content","includes","serializeNoteFile","saveBody","saveHeader","getMeta","setMeta","getPins","setPin","repoPath","removePin","NoteBinding","store","resolve","tab","pinned","pinToRepo","unpin","isPinned","nodeExec","cmd","args","cwd","Promise","reject","external_child_process_","execFile","err","stdout","NotesPanelService","app","config","hotkeys","currentNoteId","currentRepoPath","bodyInput$","external_rxjs_","Subject","visible","panelWidth","panelEl","headerEl","textareaEl","pinBtnEl","init","resolveFolder","binding","pipe","operators_","debounceTime","subscribe","persistBody","activeTabChange$","loadForTab","hotkey$","id","toggle","pinCurrentToRepo","tabNotes","panelVisible","configured","folder","fallback","external_os_","homedir","e","console","warn","mountPanel","activeTab","unmountPanel","panel","document","createElement","style","cssText","titlebar","title","textContent","actions","pinBtn","styleButton","addEventListener","closeBtn","appendChild","textarea","placeholder","onBodyChanged","applyLayout","renderState","setTimeout","focus","open","appRoot","querySelector","transition","width","window","dispatchEvent","Event","btn","remove","opacity","readCwd","repo","async","exec","branch","trimmed","length","parseBranch","getRepoContext","note","input","parts","push","lastCommand","formatHeader","pane","getFocusedTab","session","supportsWorkingDirectory","_d","getWorkingDirectory","_e","next","split","lastActive","Date","toISOString","__decorate","core_","Injectable","providedIn","external_tabby_core_","AppService","ConfigService","HotkeysService","external_crypto_namespaceObject","TabIdService","tabRecovery","patchRecovery","tabOpened$","attach","tabs","svc","__tabNotesPatched","original","recoverTab","bind","token","params","tabNotesId","inputs","__tabNotesId","randomUUID","getRecoveryToken","tabId_service_decorate","TabRecoveryService","tabId_service_a","NotesButtonProvider","ToolbarButtonProvider","super","provide","icon","weight","click","toolbarButton_decorate","toolbarButton_a","TabNotesConfigProvider","ConfigProvider","defaults","TabNotesHotkeyProvider","HotkeyProvider","name","TabNotesModule","tabIds","src_decorate","NgModule","providers","useClass","multi","src_a","src_b","src_c"],"sourceRoot":""}
|
|
1
|
+
{"version":3,"file":"index.js","mappings":"CAAA,SAAAA,EAAAC,GACA,oBAAAC,SAAA,iBAAAC,OACAA,OAAAD,QAAAD,EAAAG,QAAA,iBAAAA,QAAA,cAAAA,QAAA,QAAAA,QAAA,kBAAAA,QAAA,MAAAA,QAAA,MAAAA,QAAA,QAAAA,QAAA,uBACA,sBAAAC,QAAAA,OAAAC,IACAD,OAAA,wFAAAJ,OACA,CACA,IAAAM,EAAA,iBAAAL,QAAAD,EAAAG,QAAA,iBAAAA,QAAA,cAAAA,QAAA,QAAAA,QAAA,kBAAAA,QAAA,MAAAA,QAAA,MAAAA,QAAA,QAAAA,QAAA,kBAAAH,EAAAD,EAAA,iBAAAA,EAAA,cAAAA,EAAA,KAAAA,EAAA,kBAAAA,EAAA,GAAAA,EAAA,GAAAA,EAAA,KAAAA,EAAA,eACA,QAAAQ,KAAAD,GAAA,iBAAAL,QAAAA,QAAAF,GAAAQ,GAAAD,EAAAC,EACA,CACC,CATD,CASCC,OAAA,CAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,qCCTDd,EAAAD,QAAAQ,UCAAP,EAAAD,QAAAe,UCAAd,EAAAD,QAAAa,UCAAZ,EAAAD,QAAAY,UCAAX,EAAAD,QAAAc,UCAAb,EAAAD,QAAAU,UCAAT,EAAAD,QAAAW,UCAAV,EAAAD,QAAAS,ICCAO,EAAA,GAGA,SAAAC,EAAAC,GAEA,IAAAC,EAAAH,EAAAE,GACA,QAAAE,IAAAD,EACA,OAAAA,EAAAnB,QAGA,IAAAC,EAAAe,EAAAE,GAA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EAAAC,gJAE6C,8BAAjBtH,GAAAA,GAAiB0J,EAAAhP,UADjCwO,GCFN,MAAMS,UAA+BnC,EAAAoC,eAA5C,WAAAlO,uBACEE,KAAAiO,SAAW,CAAEhI,SAAU,CAAEG,OAAQ,KAAMF,cAAc,GACvD,ECFO,MAAMgI,UAA+BtC,EAAAuC,eAC1C,aAAMV,GACJ,MAAO,CACL,CAAE3H,GAAI,mBAAoBsI,KAAM,0BAChC,CAAEtI,GAAI,gBAAiBsI,KAAM,iCAEjC,YCUa,IAAMC,EAAN,MACb,WAAAvO,CAAYuE,EAAiBwD,EAA0ByG,GACrDA,EAAOnJ,KAAKd,GACZwD,EAAM1C,MACR,GAJmBkJ,qUAAcE,CAAA,EATlC,EAAA9C,EAAA+C,UAAS,CACRC,UAAW,CACTrK,EACA6H,EACA,CAAEwB,QAAS7B,EAAA2B,sBAAuBmB,SAAUpB,EAAqBqB,OAAO,GACxE,CAAElB,QAAS7B,EAAAoC,eAAgBU,SAAUX,EAAwBY,OAAO,GACpE,CAAElB,QAAS7B,EAAAuC,eAAgBO,SAAUR,EAAwBS,OAAO,wIAI3C,8BAAV/C,EAAAC,YAAAD,EAAAC,YAAU+C,EAAA9P,OAA0B,mBAA1B+P,OAA0B,IAAjBzK,GAAAA,GAAiByK,EAAA/P,OAAsB,mBAAtBgQ,OAAsB,IAAZ7C,GAAAA,GAAY6C,EAAAhQ,UADxDuP","sources":["webpack-tabby-tab-notes:///webpack/universalModuleDefinition","webpack-tabby-tab-notes:///external umd \"@angular/core\"","webpack-tabby-tab-notes:///external umd \"child_process\"","webpack-tabby-tab-notes:///external umd \"fs\"","webpack-tabby-tab-notes:///external umd \"os\"","webpack-tabby-tab-notes:///external umd \"path\"","webpack-tabby-tab-notes:///external umd \"rxjs\"","webpack-tabby-tab-notes:///external umd \"rxjs/operators\"","webpack-tabby-tab-notes:///external umd \"tabby-core\"","webpack-tabby-tab-notes:///webpack/bootstrap","webpack-tabby-tab-notes:///webpack/runtime/define property getters","webpack-tabby-tab-notes:///webpack/runtime/hasOwnProperty shorthand","webpack-tabby-tab-notes:///webpack/runtime/make namespace object","webpack-tabby-tab-notes:///./src/lib/noteStore.ts","webpack-tabby-tab-notes:///./src/lib/noteBinding.ts","webpack-tabby-tab-notes:///./src/services/nodeExec.ts","webpack-tabby-tab-notes:///./src/services/notesPanel.service.ts","webpack-tabby-tab-notes:///./src/lib/defaultPaths.ts","webpack-tabby-tab-notes:///./src/lib/contextStamper.ts","webpack-tabby-tab-notes:///external node-commonjs \"crypto\"","webpack-tabby-tab-notes:///./src/services/tabId.service.ts","webpack-tabby-tab-notes:///./src/providers/toolbarButton.ts","webpack-tabby-tab-notes:///./src/providers/config.ts","webpack-tabby-tab-notes:///./src/providers/hotkeys.ts","webpack-tabby-tab-notes:///./src/index.ts"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"@angular/core\"), require(\"tabby-core\"), require(\"rxjs\"), require(\"rxjs/operators\"), require(\"os\"), require(\"fs\"), require(\"path\"), require(\"child_process\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([\"@angular/core\", \"tabby-core\", \"rxjs\", \"rxjs/operators\", \"os\", \"fs\", \"path\", \"child_process\"], factory);\n\telse {\n\t\tvar a = typeof exports === 'object' ? factory(require(\"@angular/core\"), require(\"tabby-core\"), require(\"rxjs\"), require(\"rxjs/operators\"), require(\"os\"), require(\"fs\"), require(\"path\"), require(\"child_process\")) : factory(root[\"@angular/core\"], root[\"tabby-core\"], root[\"rxjs\"], root[\"rxjs/operators\"], root[\"os\"], root[\"fs\"], root[\"path\"], root[\"child_process\"]);\n\t\tfor(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i];\n\t}\n})(global, (__WEBPACK_EXTERNAL_MODULE__860__, __WEBPACK_EXTERNAL_MODULE__650__, __WEBPACK_EXTERNAL_MODULE__961__, __WEBPACK_EXTERNAL_MODULE__439__, __WEBPACK_EXTERNAL_MODULE__234__, __WEBPACK_EXTERNAL_MODULE__947__, __WEBPACK_EXTERNAL_MODULE__911__, __WEBPACK_EXTERNAL_MODULE__660__) => {\nreturn ","module.exports = __WEBPACK_EXTERNAL_MODULE__860__;","module.exports = __WEBPACK_EXTERNAL_MODULE__660__;","module.exports = __WEBPACK_EXTERNAL_MODULE__947__;","module.exports = __WEBPACK_EXTERNAL_MODULE__234__;","module.exports = __WEBPACK_EXTERNAL_MODULE__911__;","module.exports = __WEBPACK_EXTERNAL_MODULE__961__;","module.exports = __WEBPACK_EXTERNAL_MODULE__439__;","module.exports = __WEBPACK_EXTERNAL_MODULE__650__;","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","import * as fs from 'fs'\nimport * as path from 'path'\n\nexport interface NoteContent { header: string; body: string }\nexport interface NoteMeta { title: string; lastActive: string }\ninterface IndexShape { meta: Record<string, NoteMeta>; pins: Record<string, string> }\n\nconst HEADER_START = '<!-- tab-notes:header -->'\nconst HEADER_END = '<!-- tab-notes:end-header -->'\n\nexport function parseNoteFile(raw: string): NoteContent {\n const start = raw.indexOf(HEADER_START)\n const end = raw.indexOf(HEADER_END)\n if (start === -1 || end === -1 || end < start) {\n return { header: '', body: raw.trim() }\n }\n const header = raw.slice(start + HEADER_START.length, end).trim()\n const body = raw.slice(end + HEADER_END.length).trim()\n return { header, body }\n}\n\nexport function serializeNoteFile(content: NoteContent): string {\n if (content.header.includes(HEADER_END)) {\n throw new Error('Note header must not contain the end-sentinel')\n }\n return `${HEADER_START}\\n${content.header}\\n${HEADER_END}\\n\\n${content.body}\\n`\n}\n\nexport class NoteStore {\n constructor(private notesDir: string) {}\n\n private indexPath(): string { return path.join(this.notesDir, 'index.json') }\n private notePath(noteId: string): string {\n if (/[/\\\\]/.test(noteId)) { throw new Error(`Invalid noteId: \"${noteId}\"`) }\n return path.join(this.notesDir, `${noteId}.md`)\n }\n\n ensureDir(): void { fs.mkdirSync(this.notesDir, { recursive: true }) }\n\n private readIndex(): IndexShape {\n try {\n const parsed = JSON.parse(fs.readFileSync(this.indexPath(), 'utf8'))\n return { meta: parsed.meta ?? {}, pins: parsed.pins ?? {} }\n } catch { return { meta: {}, pins: {} } }\n }\n\n private writeIndex(index: IndexShape): void {\n this.ensureDir()\n const tmp = this.indexPath() + '.tmp'\n fs.writeFileSync(tmp, JSON.stringify(index, null, 2), 'utf8')\n fs.renameSync(tmp, this.indexPath())\n }\n\n load(noteId: string): NoteContent {\n if (/[/\\\\]/.test(noteId)) { throw new Error(`Invalid noteId: \"${noteId}\"`) }\n try { return parseNoteFile(fs.readFileSync(this.notePath(noteId), 'utf8')) }\n catch { return { header: '', body: '' } }\n }\n\n private write(noteId: string, content: NoteContent): void {\n this.ensureDir()\n fs.writeFileSync(this.notePath(noteId), serializeNoteFile(content), 'utf8')\n }\n\n saveBody(noteId: string, body: string): void {\n this.write(noteId, { header: this.load(noteId).header, body })\n }\n\n saveHeader(noteId: string, header: string): void {\n this.write(noteId, { header, body: this.load(noteId).body })\n }\n\n getMeta(noteId: string): NoteMeta | null { return this.readIndex().meta[noteId] ?? null }\n\n setMeta(noteId: string, meta: NoteMeta): void {\n const index = this.readIndex(); index.meta[noteId] = meta; this.writeIndex(index)\n }\n\n getPins(): Record<string, string> { return this.readIndex().pins }\n\n setPin(repoPath: string, noteId: string): void {\n const index = this.readIndex(); index.pins[repoPath] = noteId; this.writeIndex(index)\n }\n\n removePin(repoPath: string): void {\n const index = this.readIndex(); delete index.pins[repoPath]; this.writeIndex(index)\n }\n}\n","import { NoteStore } from './noteStore'\n\nexport interface TabRef { noteId: string; repoPath: string | null }\n\nexport class NoteBinding {\n constructor(private store: NoteStore) {}\n\n resolve(tab: TabRef): string {\n if (tab.repoPath) {\n const pinned = this.store.getPins()[tab.repoPath]\n if (pinned) { return pinned }\n }\n return tab.noteId\n }\n\n pinToRepo(repoPath: string, noteId: string): void { this.store.setPin(repoPath, noteId) }\n unpin(repoPath: string): void { this.store.removePin(repoPath) }\n isPinned(repoPath: string | null): boolean {\n return repoPath ? repoPath in this.store.getPins() : false\n }\n}\n","import { execFile } from 'child_process'\nimport { ExecFn } from '../lib/contextStamper'\n\nexport const nodeExec: ExecFn = (cmd, args, cwd) => new Promise((resolve, reject) => {\n execFile(cmd, args, { cwd }, (err, stdout) => err ? reject(err) : resolve(stdout))\n})\n","import { Injectable } from '@angular/core'\nimport { Subject } from 'rxjs'\nimport { debounceTime } from 'rxjs/operators'\nimport * as os from 'os'\nimport * as fs from 'fs'\nimport * as path from 'path'\nimport { AppService, ConfigService, HotkeysService } from 'tabby-core'\nimport { NoteStore } from '../lib/noteStore'\nimport { NoteBinding } from '../lib/noteBinding'\nimport { formatHeader, getRepoContext } from '../lib/contextStamper'\nimport { defaultNotesDir, legacyNotesDir } from '../lib/defaultPaths'\nimport { nodeExec } from './nodeExec'\n\n@Injectable({ providedIn: 'root' })\nexport class NotesPanelService {\n private store!: NoteStore\n private binding!: NoteBinding\n private currentNoteId: string | null = null\n private currentRepoPath: string | null = null\n private bodyInput$ = new Subject<string>()\n\n visible = false\n header = ''\n body = ''\n\n // Plain-DOM panel (avoids Angular dynamic-component API differences across Tabby versions).\n private readonly panelWidth = 340\n private panelEl: HTMLElement | null = null\n private headerEl: HTMLElement | null = null\n private textareaEl: HTMLTextAreaElement | null = null\n private pinBtnEl: HTMLButtonElement | null = null\n\n constructor(\n private app: AppService,\n private config: ConfigService,\n private hotkeys: HotkeysService,\n ) {}\n\n init(): void {\n this.store = new NoteStore(this.resolveFolder())\n this.binding = new NoteBinding(this.store)\n\n this.bodyInput$.pipe(debounceTime(400)).subscribe(body => this.persistBody(body))\n\n this.app.activeTabChange$.subscribe((tab: any) => { void this.loadForTab(tab) })\n\n this.hotkeys.hotkey$.subscribe((id: string) => {\n if (id === 'tab-notes-toggle') { this.toggle() }\n if (id === 'tab-notes-pin') { this.pinCurrentToRepo() }\n })\n\n if ((this.config.store as any)?.tabNotes?.panelVisible) {\n this.toggle()\n }\n }\n\n private resolveFolder(): string {\n const configured = (this.config.store as any)?.tabNotes?.folder\n const target = configured || defaultNotesDir(process.platform, process.env, os.homedir())\n if (!configured) { this.migrateLegacyNotes(target) }\n try {\n new NoteStore(target).ensureDir()\n return target\n } catch (e) {\n const fallback = path.join(os.tmpdir(), 'tabby-tab-notes')\n console.warn('[tab-notes] notes folder unwritable, falling back to', fallback, e)\n return fallback\n }\n }\n\n // One-time move of notes written by pre-0.1.1 (which always used ~/.config/tabby/tab-notes)\n // to the new platform-correct default. No-op on Linux (where the paths coincide) or once moved.\n private migrateLegacyNotes(target: string): void {\n try {\n const legacy = legacyNotesDir(os.homedir())\n if (legacy === target) { return }\n if (!fs.existsSync(target) && fs.existsSync(legacy)) {\n fs.mkdirSync(path.dirname(target), { recursive: true })\n fs.renameSync(legacy, target)\n console.log('[tab-notes] migrated notes', legacy, '->', target)\n }\n } catch (e) {\n console.warn('[tab-notes] notes migration skipped:', e)\n }\n }\n\n // ---- panel lifecycle ----\n\n toggle(): void {\n this.visible = !this.visible\n if (this.visible) {\n this.mountPanel()\n void this.loadForTab(this.app.activeTab)\n } else {\n this.unmountPanel()\n }\n }\n\n private mountPanel(): void {\n if (this.panelEl) { return }\n\n const panel = document.createElement('div')\n panel.style.cssText = [\n 'position:fixed', 'top:0', 'right:0', 'bottom:0', `width:${this.panelWidth}px`,\n 'z-index:99998', 'display:flex', 'flex-direction:column',\n 'background:rgba(24,24,27,0.97)', 'color:#e4e4e7',\n 'border-left:1px solid #3f3f46', 'box-shadow:-4px 0 16px rgba(0,0,0,0.35)',\n 'font-family:-apple-system,BlinkMacSystemFont,\"Segoe UI\",sans-serif',\n ].join(';')\n\n const titlebar = document.createElement('div')\n titlebar.style.cssText = [\n 'display:flex', 'align-items:center', 'justify-content:space-between',\n 'padding:8px 10px', 'background:#18181b', 'border-bottom:1px solid #3f3f46',\n 'font-size:12px', 'font-weight:600', 'letter-spacing:.02em',\n ].join(';')\n\n const title = document.createElement('span')\n title.textContent = 'Tab Notes'\n\n const actions = document.createElement('div')\n actions.style.cssText = 'display:flex;gap:4px'\n\n const pinBtn = document.createElement('button')\n pinBtn.textContent = '๐ Pin'\n pinBtn.title = 'Pin this note to the current repo'\n this.styleButton(pinBtn)\n pinBtn.addEventListener('click', () => this.pinCurrentToRepo())\n this.pinBtnEl = pinBtn\n\n const closeBtn = document.createElement('button')\n closeBtn.textContent = 'โ'\n closeBtn.title = 'Close (toggle with the toolbar button)'\n this.styleButton(closeBtn)\n closeBtn.addEventListener('click', () => this.toggle())\n\n actions.appendChild(pinBtn)\n actions.appendChild(closeBtn)\n titlebar.appendChild(title)\n titlebar.appendChild(actions)\n\n const header = document.createElement('div')\n header.style.cssText = [\n 'padding:6px 10px', 'font-size:11px', 'color:#a1a1aa',\n 'white-space:pre-wrap', 'word-break:break-all', 'border-bottom:1px solid #27272a',\n ].join(';')\n this.headerEl = header\n\n const textarea = document.createElement('textarea')\n textarea.placeholder = \"What were you doing in this tab? What's next?\"\n textarea.style.cssText = [\n 'flex:1', 'resize:none', 'border:0', 'outline:none', 'padding:10px',\n 'background:transparent', 'color:#e4e4e7', 'font-size:13px', 'line-height:1.5',\n 'font-family:ui-monospace,SFMono-Regular,Menlo,monospace',\n ].join(';')\n textarea.addEventListener('input', () => this.onBodyChanged(textarea.value))\n this.textareaEl = textarea\n\n panel.appendChild(titlebar)\n panel.appendChild(header)\n panel.appendChild(textarea)\n document.body.appendChild(panel)\n this.panelEl = panel\n\n this.applyLayout(true)\n this.renderState()\n setTimeout(() => this.textareaEl?.focus(), 0)\n }\n\n // Reflow Tabby's content so the terminal shrinks to the left of the panel instead of\n // being covered. Inline styles override the stylesheet's width:100vw; Tabby's own\n // terminal ResizeObserver re-fits the PTY to the new width. Clearing them restores\n // the original layout exactly.\n private applyLayout(open: boolean): void {\n const appRoot = document.querySelector('app-root') as HTMLElement | null\n const content = document.querySelector('app-root .content') as HTMLElement | null\n if (appRoot) {\n appRoot.style.transition = 'width 0.15s ease'\n appRoot.style.width = open ? `calc(100vw - ${this.panelWidth}px)` : ''\n }\n if (content) {\n content.style.width = open ? '100%' : ''\n }\n // Nudge a resize so the terminal re-fits immediately rather than on next focus.\n setTimeout(() => window.dispatchEvent(new Event('resize')), 160)\n }\n\n private styleButton(btn: HTMLButtonElement): void {\n btn.style.cssText = [\n 'background:transparent', 'border:1px solid #3f3f46', 'border-radius:4px',\n 'color:#d4d4d8', 'font-size:11px', 'padding:2px 6px', 'cursor:pointer',\n ].join(';')\n }\n\n private unmountPanel(): void {\n this.panelEl?.remove()\n this.panelEl = null\n this.headerEl = null\n this.textareaEl = null\n this.pinBtnEl = null\n this.applyLayout(false)\n }\n\n private renderState(): void {\n if (this.headerEl) { this.headerEl.textContent = this.header || '> ๐ unknown' }\n if (this.textareaEl && this.textareaEl.value !== this.body) {\n this.textareaEl.value = this.body\n }\n if (this.pinBtnEl) {\n const pinned = this.binding.isPinned(this.currentRepoPath)\n this.pinBtnEl.textContent = pinned ? '๐ Pinned' : '๐ Pin'\n this.pinBtnEl.style.opacity = this.currentRepoPath ? '1' : '0.4'\n }\n }\n\n // ---- note loading / saving ----\n\n async loadForTab(tab: any): Promise<void> {\n if (!tab || !tab['__tabNotesId']) { this.currentNoteId = null; this.renderState(); return }\n const cwd = await this.readCwd(tab)\n const repo = cwd ? await getRepoContext(cwd, nodeExec) : { repoPath: null, branch: null }\n this.currentRepoPath = repo.repoPath\n const noteId = this.binding.resolve({ noteId: tab['__tabNotesId'], repoPath: repo.repoPath })\n this.currentNoteId = noteId\n const note = this.store.load(noteId)\n const header = formatHeader({ cwd, branch: repo.branch, lastCommand: null })\n this.store.saveHeader(noteId, header)\n this.header = header\n this.body = note.body\n this.renderState()\n }\n\n private async readCwd(tab: any): Promise<string | null> {\n // VERIFIED against Tabby typings (tabby-core splitTab.component.d.ts + tabby-terminal\n // baseTerminalTab.component.d.ts / session.d.ts): app.activeTab is a SplitTabComponent\n // whose focused child pane (getFocusedTab()) is the BaseTerminalTabComponent that holds\n // `session: BaseSession | null`. The session exposes\n // supportsWorkingDirectory(): boolean\n // getWorkingDirectory(): Promise<string | null>\n const pane = tab?.getFocusedTab?.() ?? tab\n const session = pane?.session\n try {\n if (session?.supportsWorkingDirectory?.()) {\n return (await session.getWorkingDirectory()) ?? null\n }\n return null\n } catch { return null }\n }\n\n onBodyChanged(body: string): void { this.body = body; this.bodyInput$.next(body) }\n\n private persistBody(body: string): void {\n if (!this.currentNoteId) { return }\n this.store.saveBody(this.currentNoteId, body)\n const title = body.split('\\n')[0].slice(0, 60)\n this.store.setMeta(this.currentNoteId, { title, lastActive: new Date().toISOString() })\n }\n\n pinCurrentToRepo(): void {\n if (!this.currentNoteId || !this.currentRepoPath) { return }\n if (this.binding.isPinned(this.currentRepoPath)) {\n this.binding.unpin(this.currentRepoPath)\n } else {\n this.binding.pinToRepo(this.currentRepoPath, this.currentNoteId)\n }\n void this.loadForTab(this.app.activeTab)\n }\n}\n","import * as path from 'path'\n\n// Tabby's per-platform config directory + /tab-notes. Mirrors where Tabby itself\n// stores its config so notes live alongside it by default.\n// macOS: ~/Library/Application Support/tabby/tab-notes\n// Windows: %APPDATA%/tabby/tab-notes\n// Linux: $XDG_CONFIG_HOME (or ~/.config)/tabby/tab-notes\nexport function defaultNotesDir(\n platform: NodeJS.Platform,\n env: NodeJS.ProcessEnv,\n home: string,\n): string {\n if (platform === 'darwin') {\n return path.join(home, 'Library', 'Application Support', 'tabby', 'tab-notes')\n }\n if (platform === 'win32') {\n const base = env.APPDATA || path.join(home, 'AppData', 'Roaming')\n return path.join(base, 'tabby', 'tab-notes')\n }\n const base = env.XDG_CONFIG_HOME || path.join(home, '.config')\n return path.join(base, 'tabby', 'tab-notes')\n}\n\n// The pre-0.1.1 location (always ~/.config/tabby/tab-notes regardless of OS).\n// Used to migrate notes written by older versions.\nexport function legacyNotesDir(home: string): string {\n return path.join(home, '.config', 'tabby', 'tab-notes')\n}\n","export interface RepoContext { repoPath: string | null; branch: string | null }\nexport interface HeaderInput { cwd: string | null; branch: string | null; lastCommand: string | null }\nexport type ExecFn = (cmd: string, args: string[], cwd: string) => Promise<string>\n\nexport function formatHeader(input: HeaderInput): string {\n const parts: string[] = [`๐ ${input.cwd ?? 'unknown'}`]\n if (input.branch) { parts.push(input.branch) }\n if (input.lastCommand) { parts.push(`last: ${input.lastCommand}`) }\n return `> ${parts.join(' ยท ')}`\n}\n\nexport function parseBranch(stdout: string): string | null {\n const trimmed = stdout.trim()\n return trimmed.length > 0 ? trimmed : null\n}\n\nexport async function getRepoContext(cwd: string, exec: ExecFn): Promise<RepoContext> {\n try {\n const top = (await exec('git', ['-C', cwd, 'rev-parse', '--show-toplevel'], cwd)).trim()\n const branch = parseBranch(await exec('git', ['-C', cwd, 'branch', '--show-current'], cwd))\n return { repoPath: top || null, branch }\n } catch {\n return { repoPath: null, branch: null }\n }\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"crypto\");","import { Injectable } from '@angular/core'\nimport { AppService, TabRecoveryService } from 'tabby-core'\nimport { randomUUID } from 'crypto'\n\n// Owns the stable per-tab noteId and makes it survive a Tabby restart.\n//\n// Persistence chain (verified against Tabby's bundled code/typings):\n// 1. attach() wraps a tab's getRecoveryToken() so the saved token carries `tabNotesId`.\n// RecoveryToken allows arbitrary fields, so Tabby persists it in the saved-tabs file.\n// 2. On relaunch, patchRecovery() hooks TabRecoveryService.recoverTab(): it copies\n// token.tabNotesId into the rebuilt tab's params.inputs.\n// 3. TabsService.create() does `Object.assign(tab, params.inputs)`, so the restored tab\n// instance comes back with its original __tabNotesId โ and loadForTab resolves it to\n// the same note file.\n@Injectable({ providedIn: 'root' })\nexport class TabIdService {\n constructor(private tabRecovery: TabRecoveryService) {}\n\n init(app: AppService): void {\n this.patchRecovery()\n app.tabOpened$.subscribe((tab: any) => this.attach(tab))\n for (const tab of app.tabs) { this.attach(tab) }\n }\n\n private patchRecovery(): void {\n const svc: any = this.tabRecovery\n if (svc.__tabNotesPatched) { return }\n const original = svc.recoverTab?.bind(svc)\n if (!original) { return }\n svc.recoverTab = async (token: any) => {\n const params = await original(token)\n if (params && token?.tabNotesId) {\n params.inputs = { ...(params.inputs ?? {}), __tabNotesId: token.tabNotesId }\n }\n return params\n }\n svc.__tabNotesPatched = true\n }\n\n attach(tab: any): void {\n if (!tab['__tabNotesId']) { tab['__tabNotesId'] = randomUUID() }\n if (tab['__tabNotesGetTokenPatched']) { return }\n const original = tab.getRecoveryToken?.bind(tab)\n if (!original) { return }\n tab.getRecoveryToken = async () => {\n const token = await original()\n if (token) { token.tabNotesId = tab['__tabNotesId'] }\n return token\n }\n tab['__tabNotesGetTokenPatched'] = true\n }\n}\n","import { Injectable } from '@angular/core'\nimport { ToolbarButtonProvider, ToolbarButton } from 'tabby-core'\nimport { NotesPanelService } from '../services/notesPanel.service'\n\n// CONFIRM: ToolbarButtonProvider.provide() return type โ verify ToolbarButton shape has\n// { icon, title, weight, click } fields against tabby-clippy. The `icon` value 'note'\n// may need to match a specific icon set (FontAwesome, Material Icons, etc.) used by Tabby;\n// check tabby-clippy for the correct icon identifier format.\n@Injectable()\nexport class NotesButtonProvider extends ToolbarButtonProvider {\n constructor(private panel: NotesPanelService) { super() }\n provide(): ToolbarButton[] {\n return [{ icon: 'note', title: 'Tab Notes', weight: 5, click: () => this.panel.toggle() }]\n }\n}\n","import { ConfigProvider } from 'tabby-core'\n\n// CONFIRM ConfigProvider base class and the shape of the `defaults` property against\n// tabby-clippy (https://github.com/Eugeny/tabby-clippy). Specifically verify:\n// - whether `defaults` should be a plain object literal assigned as a class property,\n// or returned from an overridden method (e.g. getDefaults())\n// - the exact import path and that ConfigProvider is exported from 'tabby-core'\nexport class TabNotesConfigProvider extends ConfigProvider {\n defaults = { tabNotes: { folder: null, panelVisible: false } }\n}\n","import { HotkeyProvider, HotkeyDescription } from 'tabby-core'\n\n// CONFIRM HotkeyProvider base class and provide() return shape against tabby-clippy.\n// Specifically verify:\n// - that HotkeyDescription has { id: string; name: string } shape (no required additional fields)\n// - that HotkeyProvider is exported from 'tabby-core' (not tabby-settings)\n// - that the method is async provide(): Promise<HotkeyDescription[]> (vs provide(): HotkeyDescription[])\nexport class TabNotesHotkeyProvider extends HotkeyProvider {\n async provide(): Promise<HotkeyDescription[]> {\n return [\n { id: 'tab-notes-toggle', name: 'Toggle tab notes panel' },\n { id: 'tab-notes-pin', name: 'Pin this tab note to its repo' },\n ]\n }\n}\n","import { NgModule } from '@angular/core'\nimport {\n AppService, ToolbarButtonProvider, ConfigProvider, HotkeyProvider,\n} from 'tabby-core'\nimport { NotesPanelService } from './services/notesPanel.service'\nimport { TabIdService } from './services/tabId.service'\nimport { NotesButtonProvider } from './providers/toolbarButton'\nimport { TabNotesConfigProvider } from './providers/config'\nimport { TabNotesHotkeyProvider } from './providers/hotkeys'\n\n// CONFIRM: module-constructor bootstrap is the right hook in this Tabby version\n// (tabby-clippy uses this pattern). If a dedicated bootstrap provider is preferred\n// (e.g. a BootstrapProvider multi-token), switch to it and register it here.\n// Verify against tabby-clippy's NgModule definition.\n@NgModule({\n providers: [\n NotesPanelService,\n TabIdService,\n { provide: ToolbarButtonProvider, useClass: NotesButtonProvider, multi: true },\n { provide: ConfigProvider, useClass: TabNotesConfigProvider, multi: true },\n { provide: HotkeyProvider, useClass: TabNotesHotkeyProvider, multi: true },\n ],\n})\nexport default class TabNotesModule {\n constructor(app: AppService, panel: NotesPanelService, tabIds: TabIdService) {\n tabIds.init(app)\n panel.init()\n }\n}\n"],"names":["root","factory","exports","module","require","define","amd","a","i","global","__WEBPACK_EXTERNAL_MODULE__860__","__WEBPACK_EXTERNAL_MODULE__650__","__WEBPACK_EXTERNAL_MODULE__961__","__WEBPACK_EXTERNAL_MODULE__439__","__WEBPACK_EXTERNAL_MODULE__234__","__WEBPACK_EXTERNAL_MODULE__947__","__WEBPACK_EXTERNAL_MODULE__911__","__WEBPACK_EXTERNAL_MODULE__660__","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","__webpack_modules__","d","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","r","Symbol","toStringTag","value","HEADER_START","HEADER_END","NoteStore","constructor","notesDir","this","indexPath","external_path_","join","notePath","noteId","test","Error","ensureDir","external_fs_","mkdirSync","recursive","readIndex","parsed","JSON","parse","readFileSync","meta","_a","pins","_b","_c","writeIndex","index","tmp","writeFileSync","stringify","renameSync","load","raw","start","indexOf","end","header","body","trim","slice","parseNoteFile","write","content","includes","serializeNoteFile","saveBody","saveHeader","getMeta","setMeta","getPins","setPin","repoPath","removePin","NoteBinding","store","resolve","tab","pinned","pinToRepo","unpin","isPinned","nodeExec","cmd","args","cwd","Promise","reject","external_child_process_","execFile","err","stdout","NotesPanelService","app","config","hotkeys","currentNoteId","currentRepoPath","bodyInput$","external_rxjs_","Subject","visible","panelWidth","panelEl","headerEl","textareaEl","pinBtnEl","init","resolveFolder","binding","pipe","operators_","debounceTime","subscribe","persistBody","activeTabChange$","loadForTab","hotkey$","id","toggle","pinCurrentToRepo","tabNotes","panelVisible","configured","folder","target","platform","env","home","base","APPDATA","XDG_CONFIG_HOME","defaultNotesDir","process","external_os_","homedir","migrateLegacyNotes","e","fallback","tmpdir","console","warn","legacy","existsSync","dirname","log","mountPanel","activeTab","unmountPanel","panel","document","createElement","style","cssText","titlebar","title","textContent","actions","pinBtn","styleButton","addEventListener","closeBtn","appendChild","textarea","placeholder","onBodyChanged","applyLayout","renderState","setTimeout","focus","open","appRoot","querySelector","transition","width","window","dispatchEvent","Event","btn","remove","opacity","readCwd","repo","async","exec","branch","trimmed","length","parseBranch","getRepoContext","note","input","parts","push","lastCommand","formatHeader","pane","getFocusedTab","session","supportsWorkingDirectory","_d","getWorkingDirectory","_e","next","split","lastActive","Date","toISOString","__decorate","core_","Injectable","providedIn","external_tabby_core_","AppService","ConfigService","HotkeysService","external_crypto_namespaceObject","TabIdService","tabRecovery","patchRecovery","tabOpened$","attach","tabs","svc","__tabNotesPatched","original","recoverTab","bind","token","params","tabNotesId","inputs","__tabNotesId","randomUUID","getRecoveryToken","tabId_service_decorate","TabRecoveryService","tabId_service_a","NotesButtonProvider","ToolbarButtonProvider","super","provide","icon","weight","click","toolbarButton_decorate","toolbarButton_a","TabNotesConfigProvider","ConfigProvider","defaults","TabNotesHotkeyProvider","HotkeyProvider","name","TabNotesModule","tabIds","src_decorate","NgModule","providers","useClass","multi","src_a","src_b","src_c"],"sourceRoot":""}
|