sessiongraph 1.0.19 → 1.0.21
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/PRIVACY.md +7 -0
- package/dist/assets/{index-ZvQzUBK1.css → index-BROemBuT.css} +1 -1
- package/dist/assets/{index--OQ4NiAJ.js → index-ClDHxy66.js} +1 -1
- package/dist/assets/index-DK0pBf-7.js +192 -0
- package/dist/assets/{index-ZwvTaIqn.js → index-DWWZZL6C.js} +1 -1
- package/dist/assets/{index-DZcMVUpG.js → index-tIWYckIn.js} +1 -1
- package/dist/assets/{public-viewer-DVqMq2gi.js → public-viewer-B1aKDYpa.js} +1 -1
- package/dist/assets/{scene-B94ITHcm.js → scene-BCuZ73oU.js} +1 -1
- package/dist/assets/{share-DnZuWOzh.js → share-mJrTMarx.js} +3 -3
- package/dist/index.html +2 -2
- package/dist-server/cli.mjs +449 -869
- package/dist-server/server.mjs +2930 -890
- package/docs/cli.md +6 -0
- package/docs/guide.md +12 -0
- package/package.json +7 -7
- package/dist/assets/index-DCSeQKMi.js +0 -186
|
@@ -1 +1 @@
|
|
|
1
|
-
import{R as a,j as i,C as R}from"./index-
|
|
1
|
+
import{R as a,j as i,C as R}from"./index-DK0pBf-7.js";var w;(function(n){n[n.Audio=1]="Audio",n[n.Cache=2]="Cache",n[n.Config=3]="Config",n[n.Data=4]="Data",n[n.LocalData=5]="LocalData",n[n.Document=6]="Document",n[n.Download=7]="Download",n[n.Picture=8]="Picture",n[n.Public=9]="Public",n[n.Video=10]="Video",n[n.Resource=11]="Resource",n[n.Temp=12]="Temp",n[n.AppConfig=13]="AppConfig",n[n.AppData=14]="AppData",n[n.AppLocalData=15]="AppLocalData",n[n.AppCache=16]="AppCache",n[n.AppLog=17]="AppLog",n[n.Desktop=18]="Desktop",n[n.Executable=19]="Executable",n[n.Font=20]="Font",n[n.Home=21]="Home",n[n.Runtime=22]="Runtime",n[n.Template=23]="Template"})(w||(w={}));var d;(function(n){n[n.Start=0]="Start",n[n.Current=1]="Current",n[n.End=2]="End"})(d||(d={}));function u(n){return{isFile:n.isFile,isDirectory:n.isDirectory,isSymlink:n.isSymlink,size:n.size,mtime:n.mtime!==null?new Date(n.mtime):null,atime:n.atime!==null?new Date(n.atime):null,birthtime:n.birthtime!==null?new Date(n.birthtime):null,readonly:n.readonly,fileAttributes:n.fileAttributes,dev:n.dev,ino:n.ino,mode:n.mode,nlink:n.nlink,uid:n.uid,gid:n.gid,rdev:n.rdev,blksize:n.blksize,blocks:n.blocks}}function U(n){const e=new Uint8ClampedArray(n),t=e.byteLength;let o=0;for(let r=0;r<t;r++){const s=e[r];o*=256,o+=s}return o}class g extends a{async read(e){if(e.byteLength===0)return 0;const t=await i("plugin:fs|read",{rid:this.rid,len:e.byteLength}),o=U(t.slice(-8)),r=t instanceof ArrayBuffer?new Uint8Array(t):t;return e.set(r.slice(0,r.length-8)),o===0?null:o}async seek(e,t){return await i("plugin:fs|seek",{rid:this.rid,offset:e,whence:t})}async stat(){const e=await i("plugin:fs|fstat",{rid:this.rid});return u(e)}async truncate(e){await i("plugin:fs|ftruncate",{rid:this.rid,len:e})}async write(e){return await i("plugin:fs|write",{rid:this.rid,data:e})}}async function b(n,e){if(n instanceof URL&&n.protocol!=="file:")throw new TypeError("Must be a file URL.");const t=await i("plugin:fs|create",{path:n instanceof URL?n.toString():n,options:e});return new g(t)}async function p(n,e){if(n instanceof URL&&n.protocol!=="file:")throw new TypeError("Must be a file URL.");const t=await i("plugin:fs|open",{path:n instanceof URL?n.toString():n,options:e});return new g(t)}async function S(n,e,t){if(n instanceof URL&&n.protocol!=="file:"||e instanceof URL&&e.protocol!=="file:")throw new TypeError("Must be a file URL.");await i("plugin:fs|copy_file",{fromPath:n instanceof URL?n.toString():n,toPath:e instanceof URL?e.toString():e,options:t})}async function A(n,e){if(n instanceof URL&&n.protocol!=="file:")throw new TypeError("Must be a file URL.");await i("plugin:fs|mkdir",{path:n instanceof URL?n.toString():n,options:e})}async function T(n,e){if(n instanceof URL&&n.protocol!=="file:")throw new TypeError("Must be a file URL.");return await i("plugin:fs|read_dir",{path:n instanceof URL?n.toString():n,options:e})}async function E(n,e){if(n instanceof URL&&n.protocol!=="file:")throw new TypeError("Must be a file URL.");const t=await i("plugin:fs|read_file",{path:n instanceof URL?n.toString():n,options:e});return t instanceof ArrayBuffer?new Uint8Array(t):Uint8Array.from(t)}async function _(n,e){if(n instanceof URL&&n.protocol!=="file:")throw new TypeError("Must be a file URL.");const t=await i("plugin:fs|read_text_file",{path:n instanceof URL?n.toString():n,options:e}),o=t instanceof ArrayBuffer?t:Uint8Array.from(t);return new TextDecoder(e?.encoding??"utf-8").decode(o)}async function x(n,e){if(n instanceof URL&&n.protocol!=="file:")throw new TypeError("Must be a file URL.");const t=n instanceof URL?n.toString():n;return await Promise.resolve({path:t,rid:null,async next(){const o=new TextDecoder(e?.encoding??"utf-8");if(this.rid===null){const l=o.encoding;this.rid=await i("plugin:fs|read_text_file_lines",{path:t,options:e!=null?{...e,encoding:l}:void 0})}let r;try{r=await i("plugin:fs|read_text_file_lines_next",{rid:this.rid})}catch(l){throw this.rid=null,l}const s=r instanceof ArrayBuffer?new Uint8Array(r):Uint8Array.from(r),f=s[s.byteLength-1]===1;return f?(this.rid=null,{value:null,done:f}):{value:o.decode(s.slice(0,s.byteLength-1)),done:f}},async return(){if(this.rid!==null){const o=this.rid;this.rid=null,await new a(o).close()}return{value:null,done:!0}},[Symbol.asyncIterator](){return this}})}async function v(n,e){if(n instanceof URL&&n.protocol!=="file:")throw new TypeError("Must be a file URL.");await i("plugin:fs|remove",{path:n instanceof URL?n.toString():n,options:e})}async function M(n,e,t){if(n instanceof URL&&n.protocol!=="file:"||e instanceof URL&&e.protocol!=="file:")throw new TypeError("Must be a file URL.");await i("plugin:fs|rename",{oldPath:n instanceof URL?n.toString():n,newPath:e instanceof URL?e.toString():e,options:t})}async function C(n,e){const t=await i("plugin:fs|stat",{path:n instanceof URL?n.toString():n,options:e});return u(t)}async function k(n,e){const t=await i("plugin:fs|lstat",{path:n instanceof URL?n.toString():n,options:e});return u(t)}async function F(n,e,t){if(n instanceof URL&&n.protocol!=="file:")throw new TypeError("Must be a file URL.");await i("plugin:fs|truncate",{path:n instanceof URL?n.toString():n,len:e,options:t})}async function z(n,e,t){if(n instanceof URL&&n.protocol!=="file:")throw new TypeError("Must be a file URL.");if(e instanceof ReadableStream){const o=await p(n,{read:!1,create:!0,write:!0,...t,truncate:!t?.append}),r=e.getReader();try{for(;;){const{done:s,value:f}=await r.read();if(s)break;await o.write(f)}}finally{r.releaseLock(),await o.close()}}else await i("plugin:fs|write_file",e,{headers:{path:encodeURIComponent(n instanceof URL?n.toString():n),options:JSON.stringify(t)}})}async function I(n,e,t){if(n instanceof URL&&n.protocol!=="file:")throw new TypeError("Must be a file URL.");const o=new TextEncoder;await i("plugin:fs|write_text_file",o.encode(e),{headers:{path:encodeURIComponent(n instanceof URL?n.toString():n),options:JSON.stringify(t)}})}async function H(n,e){if(n instanceof URL&&n.protocol!=="file:")throw new TypeError("Must be a file URL.");return await i("plugin:fs|exists",{path:n instanceof URL?n.toString():n,options:e})}class y extends a{}async function L(n,e,t){const o=Array.isArray(n)?n:[n];for(const c of o)if(c instanceof URL&&c.protocol!=="file:")throw new TypeError("Must be a file URL.");const r=new R;r.onmessage=e;const s=await i("plugin:fs|watch",{paths:o.map(c=>c instanceof URL?c.toString():c),options:t,onEvent:r}),f=new y(s);return()=>{f.close()}}async function J(n,e,t){return await L(n,e,{delayMs:2e3,...t})}async function N(n,e,t){return await L(n,e,{...t,delayMs:void 0})}async function O(n,e){if(n instanceof URL&&n.protocol!=="file:")throw new TypeError("Must be a file URL.");return await i("plugin:fs|size",{path:n instanceof URL?n.toString():n,options:e})}async function V(n){if(n instanceof URL&&n.protocol!=="file:")throw new TypeError("Must be a file URL.");await i("plugin:fs|start_accessing_security_scoped_resource",{path:n instanceof URL?n.toString():n})}async function h(n){if(n instanceof URL&&n.protocol!=="file:")throw new TypeError("Must be a file URL.");await i("plugin:fs|stop_accessing_security_scoped_resource",{path:n instanceof URL?n.toString():n})}export{w as BaseDirectory,g as FileHandle,d as SeekMode,S as copyFile,b as create,H as exists,k as lstat,A as mkdir,p as open,T as readDir,E as readFile,_ as readTextFile,x as readTextFileLines,v as remove,M as rename,O as size,V as startAccessingSecurityScopedResource,C as stat,h as stopAccessingSecurityScopedResource,F as truncate,J as watch,N as watchImmediate,z as writeFile,I as writeTextFile};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as a,R as i,C as o}from"./index-
|
|
1
|
+
import{j as a,R as i,C as o}from"./index-DK0pBf-7.js";class l extends i{constructor(e){super(e.rid),this.available=!0,this.currentVersion=e.currentVersion,this.version=e.version,this.date=e.date,this.body=e.body,this.rawJson=e.rawJson}async download(e,n){const d=new o;e&&(d.onmessage=e);const r=await a("plugin:updater|download",{onEvent:d,rid:this.rid,...n,headers:t(n?.headers)});await this.downloadedBytes?.close().catch(()=>{}),this.downloadedBytes=new i(r)}async install(e){if(!this.downloadedBytes)throw new Error("Update.install called before Update.download");await a("plugin:updater|install",{updateRid:this.rid,bytesRid:this.downloadedBytes.rid,...e}),this.downloadedBytes=void 0}async downloadAndInstall(e,n){const d=new o;e&&(d.onmessage=e),await a("plugin:updater|download_and_install",{onEvent:d,rid:this.rid,...n,headers:t(n?.headers)})}async close(){await this.downloadedBytes?.close(),await super.close()}}async function w(s){const e=await a("plugin:updater|check",{...s,headers:t(s?.headers)});return e?new l(e):null}function t(s){return s?Array.from(new Headers(s).entries()):void 0}export{l as Update,w as check};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{v as ge,k as te,l as k,m as Ee,n as L,q as Le,r as Me,u as De,D as Te,I as Ie,c as he,b as ye,V as Pe,w as ve,x as ke,y as Ne,h as Be,z as Fe,A as je,B as He,E as qe,F as Se,G as Oe,t as Re,d as Ge,P as Ke,H as we,J as _e}from"./index-
|
|
1
|
+
import{v as ge,k as te,l as k,m as Ee,n as L,q as Le,r as Me,u as De,D as Te,I as Ie,c as he,b as ye,V as Pe,w as ve,x as ke,y as Ne,h as Be,z as Fe,A as je,B as He,E as qe,F as Se,G as Oe,t as Re,d as Ge,P as Ke,H as we,J as _e}from"./index-DK0pBf-7.js";import{TimelineScene as Ue}from"./scene-BCuZ73oU.js";import"./three-DDiuFd7k.js";function We(s){const h=s.settings.tokens?s.sessions.filter(l=>typeof l.tokens=="number"):[],m=h.reduce((l,i)=>l+i.tokens,0);return{sessionCount:s.sessions.length,tokenCount:h.length&&Number.isSafeInteger(m)?m:null,tokensPartial:h.length>0&&h.length<s.sessions.length}}function Xe(s){const h=We(s),m=[`${h.sessionCount.toLocaleString()} sessions`];if(s.settings.tokens&&m.push(h.tokenCount===null?"Tokens unknown":`${h.tokenCount.toLocaleString()} tokens`),s.settings.messageCounts){const l=s.sessions.filter(i=>i.messages?.count!=null);m.push(l.length?`${l.reduce((i,x)=>i+x.messages.count,0).toLocaleString()} messages`:"Messages unknown")}return m.join(" · ")}const A=s=>s==null?"unknown":s.toLocaleString(),z=s=>s===null?"unknown":new Date(s).toLocaleString(),se=(s,h=!1)=>new Date(s).toLocaleDateString("en",{month:"short",day:"numeric",...h?{year:"numeric"}:{}}),Ye=new Intl.NumberFormat("en",{notation:"compact",maximumFractionDigits:1});let Ve=0;function Ze(s,h,m={}){let l=ge(h),i=te(l),x=new Map(i.lanes.flatMap(e=>e.nodes.map(t=>[Number(t.session.projectID),e.label])));s.classList.add("public-viewer"),s.dataset.graphAudio="";const ne=`public-graph-help-${++Ve}`;s.classList.toggle("public-viewer-full",!!m.fullscreen),s.innerHTML=`
|
|
2
2
|
<div class="public-canvas" aria-label="Interactive public session graph"></div>
|
|
3
3
|
<nav class="public-view-controls" aria-label="Graph controls">
|
|
4
4
|
${k("center-focus","Fit view",{"data-fit":!0},"Fit view (F)")}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{R as De,W as Ae,H as Ce,T as Ee,M as ve,C as V,S as xe,a as k,G as X,P as he,I as ge,b as F,D,c as L,A as H,d as Z,e as j,B as E,F as I,f as re,g as U,V as v,h as O,i as ne,j as Fe,k as Ge,l as Ue,O as Oe,E as ze,U as Xe,m as Le,n as He,o as _e,p as Ve,q as Ne,r as se,s as $e,t as We,u as ue,v as je,w as qe,x as ae,y as de,z as Ye,L as Ze,J as we,K as Me,N as Ke}from"./three-DDiuFd7k.js";import{K as te,L as P,D as Re,M as le,N as B,a as Qe,O as Je,Q as oe,T as et,U as tt,W as it}from"./index-
|
|
1
|
+
import{R as De,W as Ae,H as Ce,T as Ee,M as ve,C as V,S as xe,a as k,G as X,P as he,I as ge,b as F,D,c as L,A as H,d as Z,e as j,B as E,F as I,f as re,g as U,V as v,h as O,i as ne,j as Fe,k as Ge,l as Ue,O as Oe,E as ze,U as Xe,m as Le,n as He,o as _e,p as Ve,q as Ne,r as se,s as $e,t as We,u as ue,v as je,w as qe,x as ae,y as de,z as Ye,L as Ze,J as we,K as Me,N as Ke}from"./three-DDiuFd7k.js";import{K as te,L as P,D as Re,M as le,N as B,a as Qe,O as Je,Q as oe,T as et,U as tt,W as it}from"./index-DK0pBf-7.js";class st extends De{target=new Ae(1,1,{type:Ce});copy=new Ee(this.target.texture);setSamples(e){this.target.samples!==e&&(this.target.samples=e,this.target.dispose())}setSize(e,t){this.target.setSize(e,t)}render(e,t,s,o,i){if(!this.target.samples){super.render(e,t,s,o,i);return}super.render(e,t,this.target,o,i),this.copy.render(e,t,s,o,i)}dispose(){this.copy.dispose(),this.target.dispose()}}const ot=new Intl.DateTimeFormat("en",{month:"short"}),rt=new Intl.DateTimeFormat("en",{month:"short",year:"numeric"});function nt(u){if(u.calendarTime===!1||!(u.end>u.start))return[];const e=new Date(u.start),t=new Date(u.end);if(!Number.isFinite(+e)||!Number.isFinite(+t))return[];const s=h=>h.getFullYear()*12+h.getMonth(),o=s(e),i=s(t),r=Math.ceil((i-o+1)/24),a=[1,2,3,6,12].find(h=>h>=r)??Math.ceil(r/12)*12,n=o===i||e.getFullYear()!==t.getFullYear()?rt:ot,l=[];for(let h=Math.ceil(o/a)*a;h<=i;h+=a){const c=new Date(0);c.setFullYear(Math.floor(h/12),h%12,1),c.setHours(0,0,0,0),+c>=u.start&&+c<=u.end&&l.push({x:te(+c,u),label:n.format(c)})}return!l.length&&o===i&&l.push({x:te(u.start,u),label:n.format(e)}),l}const Te=`
|
|
2
2
|
attribute float nodeIndex;
|
|
3
3
|
uniform float uSelected;
|
|
4
4
|
uniform float uHovered;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index
|
|
2
|
-
import{p as z,i as j,_ as H,s as K,a as V,o as J,b as Q,c as Y,t as Z,d as ee,S as L,e as te,f as ae,g as se,h as oe}from"./index-
|
|
3
|
-
https://sessiongraph.ai`,ye=`https://x.com/intent/tweet?text=${encodeURIComponent(T)}`,G=e=>e instanceof Error&&e.name==="AbortError";async function me(e,l,a){const{label:n,description:i,mime:y,filename:h}=$[a];try{if(j()){const[{save:d},{writeFile:s}]=await Promise.all([H(()=>import("./index
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-ClDHxy66.js","assets/index-DK0pBf-7.js","assets/index-BROemBuT.css","assets/index-DWWZZL6C.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{p as z,i as j,_ as H,s as K,a as V,o as J,b as Q,c as Y,t as Z,d as ee,S as L,e as te,f as ae,g as se,h as oe}from"./index-DK0pBf-7.js";import{TimelineScene as re}from"./scene-BCuZ73oU.js";import"./three-DDiuFd7k.js";const ne="#b0e9d6",ie="#dbe7e3",O=128,le=10,de="M102 24 86 40H36a14 14 0 0 0 0 28h40a14 14 0 0 1 0 28H22",ce=[[102,24],[36,40],[22,96]],ue=10;let U;function he(e,l,a,n,i=ne){U??=new Path2D(de),e.save(),e.translate(l,a),e.scale(n/O,n/O),e.strokeStyle=e.fillStyle=i,e.lineWidth=le,e.lineCap=e.lineJoin="round",e.stroke(U);for(const[y,h]of ce)e.beginPath(),e.arc(y,h,ue,0,Math.PI*2),e.fill();e.restore()}function pe(e){const l=z(e.lanes.length),a=new Map(e.lanes.flatMap(s=>s.nodes.map(t=>[t.session.id,s.key]))),n=new Map;for(const s of e.nodes.map(t=>t.session).sort((t,r)=>t.created-r.created||t.id.localeCompare(r.id))){const t=a.get(s.id);t!==void 0&&!n.has(t)&&n.set(t,n.size)}const i=new Map(e.nodes.map((s,t)=>[s.session.id,`session-${t}`])),y=new Map(e.lanes.flatMap((s,t)=>s.nodes.map(r=>[r.session.id,`project-${t}`]))),h=e.nodes.map(s=>{const t=s.session,r={id:i.get(t.id),title:"Session",projectID:y.get(t.id),directory:"",created:t.created,updated:t.created,activity:t.activity&&{firstMessageAt:t.activity.firstMessageAt,lastMessageAt:t.activity.lastMessageAt,userMessages:t.activity.userMessages,untimedUserMessages:t.activity.untimedUserMessages},archived:!1,model:"",provider:"",agent:"",cost:null,source:t.source==="continue"?"continue":t.source==="opencode"||!t.source?"opencode":"unknown",tokens:t.tokens};return t.parentID&&i.has(t.parentID)&&(r.parentID=i.get(t.parentID)),t.forkID&&i.has(t.forkID)&&(r.forkID=i.get(t.forkID)),{session:r,position:[...s.position],startPosition:[...s.startPosition],color:s.color,radius:s.radius}}),d=new Map(h.map(s=>[s.session.id,s]));return{start:e.start,end:e.end,timeFrame:e.timeFrame&&{...e.timeFrame},nodes:h,edges:e.edges.map(s=>({from:i.get(s.from),to:i.get(s.to),kind:s.kind})),lanes:e.lanes.map((s,t)=>({key:`project-${t}`,label:l[n.get(s.key)],color:s.color,kind:"directory",y:s.y,z:s.z,nodes:s.nodes.map(r=>d.get(i.get(r.session.id)))}))}}const $={mp4:{label:"MP4",description:"MP4 video",mime:"video/mp4",filename:"sessiongraph-playback.mp4"}},T=`My coding sessions, visualized with SessionGraph.
|
|
3
|
+
https://sessiongraph.ai`,ye=`https://x.com/intent/tweet?text=${encodeURIComponent(T)}`,G=e=>e instanceof Error&&e.name==="AbortError";async function me(e,l,a){const{label:n,description:i,mime:y,filename:h}=$[a];try{if(j()){const[{save:d},{writeFile:s}]=await Promise.all([H(()=>import("./index-ClDHxy66.js"),__vite__mapDeps([0,1,2])),H(()=>import("./index-DWWZZL6C.js"),__vite__mapDeps([3,1,2]))]),t=await d({title:`Save SessionGraph ${n}`,defaultPath:h,filters:[{name:i,extensions:[a]}]});if(!t)return"cancelled";await s(t,new Uint8Array(await e.arrayBuffer()))}else{const d=window.showSaveFilePicker;if(d){const t=await(await d.call(window,{suggestedName:h,types:[{description:i,accept:{[y]:[`.${a}`]}}]})).createWritable();try{await t.write(e),await t.close()}catch(r){throw await t.abort().catch(()=>{}),r}}else{const s=document.createElement("a");return s.href=l,s.download=h,document.body.append(s),s.click(),s.remove(),"downloaded"}}return"saved"}catch(d){if(G(d))return"cancelled";throw d}}const g=960,P=600,q='"Katagami Sans", sans-serif',fe=e=>Intl.NumberFormat("en",{notation:"compact",maximumFractionDigits:1}).format(e);function ve(e,l,a,n,i,y){const s=P-122,t=Math.max(1,...n);e.save(),he(e,24,14,28),e.fillStyle=ie,e.font=`600 14px ${q}`,e.textAlign="left",e.textBaseline="middle",e.fillText("SessionGraph",58,28),e.restore();for(let u=0;u<n.length;u++){const m=Math.max(2,n[u]/t*22);e.fillStyle=u/n.length<=a?"#91bfae":"#253d39",e.fillRect(260+u/n.length*440,s-m,440/n.length-2,m)}e.fillStyle="#d6f4e8",e.fillRect(260+440*a,s-27,1,31);const r=l.start+(l.end-l.start)*a,k=i.at(r,a===1).tokens;e.textAlign="center",e.fillStyle="#a0baae",e.font='12px "IBM Plex Mono", monospace',e.fillText(oe(r,l.end-l.start),g/2,s+23),e.fillStyle="#e7f5ee",e.font=`36px ${q}`,e.fillText(y(r,a===1).toLocaleString("en"),g/2-105,s+66),e.fillText(i.recorded?fe(k):"—",g/2+105,s+66),e.font=`12px ${q}`,e.fillStyle="#92b0a3",e.fillText("Sessions",g/2-105,s+87),e.fillText("Burnt tokens",g/2+105,s+87),e.textAlign="left"}async function be(e,l,a,n){a.throwIfAborted();const{label:i,mime:y}=$.mp4,h=Q(e.nodes.map(p=>p.session)),d=Y(e.nodes.map(p=>p.session)),s=Z(e.nodes.map(p=>ee(p.session)),e.start,e.end),t=document.createElement("div");t.className="share-render-host",t.setAttribute("aria-hidden","true"),t.style.cssText=`position:fixed;left:-12000px;top:0;width:${g}px;height:${P}px;pointer-events:none;visibility:hidden`,document.body.append(t);const r=document.createElement("canvas");r.width=g,r.height=P;const k=r.getContext("2d",{willReadFrequently:!0});let u,m;try{if(!k)throw new Error("Canvas export is unavailable.");u=new re(t,{onSelect(){},onHover(){},onPlaybackInterrupt(){},onEvent(){},onEventHover(){}},{manual:!0}),u.applyPreferences({...l,quality:"balanced",motion:"on",labels:!0,focusDimming:!1,trails:l.trails==="selected"?"all":l.trails}),u.setGraph(e,!0),u.prepareCapture(),await document.fonts.ready,a.throwIfAborted(),m=new Worker(new URL("/assets/mp4-worker-Dc_1QUwS.js",import.meta.url),{type:"module"});const p=(v,A=[])=>new Promise((b,w)=>{a.throwIfAborted();const f=()=>{clearTimeout(M),a.removeEventListener("abort",C),m.onmessage=null,m.onerror=null},C=()=>{f(),w(a.reason)},M=setTimeout(()=>{f(),w(new Error(`${i} encoding timed out. Please try again.`))},6e4);a.addEventListener("abort",C,{once:!0}),m.onmessage=E=>{f(),E.data.error?w(new Error(E.data.error)):b(E.data)},m.onerror=()=>{f(),w(new Error(`Could not start the ${i} encoder.`))},m.postMessage(v,A)});await p({init:!0,width:g,height:P});for(let v=0;v<L;v++){a.throwIfAborted();const A=te(v);u.captureFrame(A,1/ae,k,se(v)),ve(k,e,A,s,h,d);const b=k.getImageData(0,0,g,P).data.buffer;await p({rgba:b,width:g,height:P},[b]),n((v+1)/L)}const I=await p({finish:!0});return new Blob([I.bytes],{type:y})}finally{m?.terminate(),u?.dispose(),t.remove()}}function ke(e,l){const a=document.createElement("dialog");a.className="share-dialog",a.setAttribute("aria-labelledby","share-title"),a.innerHTML=`<p>Create a private MP4 video. Project and session names are hidden, and nothing is uploaded.</p>
|
|
4
4
|
<div class="share-preview"><video aria-label="SessionGraph playback with hidden project and session names" muted loop playsinline controls hidden></video><div class="share-progress"><progress max="100" value="0" aria-label="Creating video"></progress><span role="status">Creating video… 0%</span></div></div>
|
|
5
5
|
<p class="share-notice" role="status" hidden></p>
|
|
6
6
|
<div class="share-actions"><button class="text-button share-close">Cancel</button><button class="secondary-button share-retry" hidden>Try again</button><a class="secondary-button share-x" target="_blank" rel="noopener noreferrer" hidden>Share in X</a><button class="secondary-button share-system" aria-label="Open share tray" aria-controls="playback-share-tray" aria-expanded="false" hidden>Share…</button><button class="primary-button share-save" hidden>Save MP4</button></div>
|
package/dist/index.html
CHANGED
|
@@ -12,8 +12,8 @@
|
|
|
12
12
|
<link rel="icon" sizes="any" href="/favicon.ico" />
|
|
13
13
|
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
|
|
14
14
|
<link rel="apple-touch-icon" href="/apple-touch-icon.png" />
|
|
15
|
-
<script type="module" crossorigin src="/assets/index-
|
|
16
|
-
<link rel="stylesheet" crossorigin href="/assets/index-
|
|
15
|
+
<script type="module" crossorigin src="/assets/index-DK0pBf-7.js"></script>
|
|
16
|
+
<link rel="stylesheet" crossorigin href="/assets/index-BROemBuT.css">
|
|
17
17
|
</head>
|
|
18
18
|
<body>
|
|
19
19
|
<div id="app"></div>
|