slidetake 0.5.2 → 0.5.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -98,14 +98,14 @@ window.SLIDETAKE = {
98
98
  recording: false // optional: true brings back ● Studio, for your own preview
99
99
  };
100
100
  </script>
101
- <script src="https://cdn.jsdelivr.net/npm/slidetake@0.5.2/dist/slidetake.js"></script>
101
+ <script src="https://cdn.jsdelivr.net/npm/slidetake@0.5.3/dist/slidetake.js"></script>
102
102
  ```
103
103
 
104
104
  `colors` takes any CSS colour per token, for both modes or under `light` / `dark`: `accent` (text and the current slide), `accentSoft` (smaller headings), `line` (borders and the active path), `ring` (the current slide's outline), `header` and `headerText` (a band of colour behind the header). A deck can also set its own with `accent:` in its top block.
105
105
 
106
106
  Load it from npm through a CDN (pin the version, as above), or copy `dist/slidetake.js` into your site, or `npm install slidetake` and serve `node_modules/slidetake/dist/slidetake.js`.
107
107
 
108
- The page then shows that deck as a viewer: read-only, with no editor, camera or Studio, and no bottom bar. The header carries Slidetake, the layouts, light/dark, Keys and Fullscreen. See [examples/embed.html](examples/embed.html); the [hugo-continuum](https://github.com/sakthipriyan/hugo-continuum) theme uses it for slide pages with `engine: slidetake`.
108
+ The page then shows that deck as a viewer: read-only, with no editor, camera or Studio, and no bottom bar. The header carries Slidetake, the layouts, and icons for light/dark, Keys and Fullscreen. See [examples/embed.html](examples/embed.html); the [hugo-continuum](https://github.com/sakthipriyan/hugo-continuum) theme uses it for slide pages with `engine: slidetake`.
109
109
 
110
110
  To record a video of an embedded deck, open its markdown on slidetake.com or with `npx slidetake`, or set `recording: true` on a page only you see, such as your site's local preview: the page gets ● Studio, Camera and the bottom bar, as on slidetake.com. hugo-continuum does this under `hugo server`, so the live site stays a viewer. `accent:`, `brand:` and `logo:` in a deck's top block give the video your site's look.
111
111
 
package/dist/index.html CHANGED
@@ -186,9 +186,11 @@
186
186
  #editor-resizer{flex:none;width:6px;margin-right:-3px;margin-left:-3px;z-index:5;cursor:col-resize;position:relative;}
187
187
  #editor-resizer:hover, main.resizing #editor-resizer{background:var(--accent-line, var(--accent));opacity:.6;}
188
188
  #editor-resizer:has(+ #editor-pane.collapsed){display:none;}
189
- .pane-bar{flex:none;display:flex;align-items:center;justify-content:space-between;gap:8px;padding:8px 10px 8px 14px;border-bottom:1px solid var(--panel-line);}
190
- .pane-actions{display:flex;gap:6px;flex-wrap:wrap;justify-content:flex-end;}
191
- #doc-state{text-transform:none;letter-spacing:.02em;font-size:11px;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
189
+ /* two lines: the buttons, then what the text below is (the deck, read-only or your copy) */
190
+ .pane-bar{flex:none;display:flex;flex-direction:column;align-items:stretch;gap:8px;padding:8px 10px 8px 14px;border-bottom:1px solid var(--panel-line);}
191
+ .pane-actions{display:flex;gap:6px;flex-wrap:wrap;}
192
+ .pane-state{display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:24px;}
193
+ #doc-state{text-transform:none;letter-spacing:.02em;font-size:11px;min-width:0;flex:1 1 auto;flex-shrink:1;}
192
194
  #doc-state .ro{color:var(--text-muted);}
193
195
  #doc-state .mine{color:var(--text);}
194
196
  #doc-state .edited{color:var(--accent);}
@@ -1242,15 +1244,18 @@
1242
1244
  <div id="editor-resizer" role="separator" aria-orientation="vertical" aria-label="Resize the editor" title="Drag to resize"></div>
1243
1245
  <div id="editor-pane" class="collapsed">
1244
1246
  <div class="pane-bar">
1245
- <span class="pane-label" id="doc-state" aria-live="polite"></span>
1246
1247
  <span class="pane-actions">
1247
- <a class="btn small" id="continue" href="/edit" hidden></a>
1248
1248
  <a class="btn small" id="btn-new" href="/new" title="Start from a template">New</a>
1249
1249
  <button class="btn small" id="btn-load" title="Load a deck from a link: GitHub, a gist or any URL">⇣ Load</button>
1250
1250
  <button class="btn small" id="btn-open" title="Open a markdown file from this computer">Open</button>
1251
1251
  <button class="btn small" id="btn-save" title="Save the markdown to a file on this computer">Save</button>
1252
1252
  <button class="btn small" id="btn-share" title="Copy a link to this deck">Share</button>
1253
1253
  </span>
1254
+ <!-- what the text below is: the deck, and whether typing makes your copy -->
1255
+ <span class="pane-state">
1256
+ <span class="pane-label" id="doc-state" aria-live="polite"></span>
1257
+ <a class="btn small" id="continue" href="/edit" hidden></a>
1258
+ </span>
1254
1259
  </div>
1255
1260
  <textarea id="editor" spellcheck="false"></textarea>
1256
1261
  <div id="status-line"><span id="status-count"></span><span id="status-err" class="err"></span><button id="btn-reset" hidden title="Discard your edits and go back to the original">reset to original</button></div>
@@ -6686,9 +6691,10 @@
6686
6691
  const actions = document.querySelector("header .hdr-actions");
6687
6692
  actions.insertBefore(credit, actions.firstChild);
6688
6693
  if (!RECORDING_UI) {
6694
+ const svg2 = (d) => '<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">' + d + "</svg>";
6689
6695
  actions.insertAdjacentHTML(
6690
6696
  "beforeend",
6691
- '<button class="btn" id="hdr-keys" title="Keyboard shortcuts (K)">\u2328 Keys</button><button class="btn" id="hdr-full" title="Fullscreen (F)">\u26F6 Fullscreen</button>'
6697
+ '<button class="btn icon" id="hdr-keys" title="Keyboard shortcuts (K)" aria-label="Keyboard shortcuts">' + svg2('<rect x="2" y="5" width="20" height="14" rx="2"/><path d="M6 9h.01M10 9h.01M14 9h.01M18 9h.01M6 13h.01M18 13h.01M8 16h8M10 13h4"/>') + '</button><button class="btn icon" id="hdr-full" title="Fullscreen (F)" aria-label="Fullscreen">' + svg2('<path d="M8 3H5a2 2 0 0 0-2 2v3M21 8V5a2 2 0 0 0-2-2h-3M3 16v3a2 2 0 0 0 2 2h3M16 21h3a2 2 0 0 0 2-2v-3"/>') + "</button>"
6692
6698
  );
6693
6699
  document.getElementById("hdr-keys").onclick = () => document.getElementById("help").classList.add("open");
6694
6700
  document.getElementById("hdr-full").onclick = () => setPresent(!presenting);
package/dist/slidetake.js CHANGED
@@ -1,4 +1,4 @@
1
- /* Slidetake 0.5.2 · https://slidetake.com · Apache-2.0 */
1
+ /* Slidetake 0.5.3 · https://slidetake.com · Apache-2.0 */
2
2
  "use strict";(()=>{var G=(e,t)=>()=>(e&&(t=e(e=0)),t);var xo,qr=G(()=>{xo=`---
3
3
  title: Slidetake \u2014 write in markdown with AI, record without timeline editing
4
4
  description: "Write a deck in markdown, with AI, present it on a spatial canvas, and record it slide by slide: retake any slide, pick the best take, download the video. Open source."
@@ -1481,7 +1481,7 @@ EOF
1481
1481
  }
1482
1482
  }
1483
1483
  `+e,_o={};Qe=0,Uo=null;et=document.getElementById("progress");et.innerHTML="<b></b><i></i>";_e={start:0,timer:null};pc=["x","y","xPercent","yPercent","scale","scaleX","scaleY","rotation","rotate","skewX","skewY"];At=null;me=null,Ai=null,Oe=!1;tt=null;Me=null;Yo.addEventListener("click",e=>{let t=e.target.closest("circle");t&&!h.active&&_(t.dataset.id)});Ha=null;se.addEventListener("input",()=>{if(Nr()){M.text=se.value,clearTimeout(Ha),Ha=setTimeout(()=>{hd(se.value),Bt(!0)},300);return}M.kind!=="copy"&&!cd()||(P.text=se.value,_t(),clearTimeout(Ha),Ha=setTimeout(()=>{wa(),Bt(!0)},300))});document.querySelectorAll("#layout-toggle .seg-btn").forEach(e=>{e.addEventListener("click",()=>{e.dataset.mode!==J&&br(e.dataset.mode)})});(function(){let e=new Map,t=0,a=!1,o=null,r=()=>{let[i,s]=[...e.values()];return Math.hypot(i.x-s.x,i.y-s.y)||1};N.addEventListener("pointerdown",i=>{i.pointerType==="mouse"&&i.button!==0||h.active||i.target.closest("a, pre, code, input, textarea")||(e.set(i.pointerId,{x:i.clientX,y:i.clientY}),t=0,a=!1,e.size===2&&(o={d:r(),zoom:z.zoom}))}),window.addEventListener("pointermove",i=>{let s=e.get(i.pointerId);if(!s)return;let l=i.clientX-s.x,c=i.clientY-s.y;e.set(i.pointerId,{x:i.clientX,y:i.clientY}),t+=Math.abs(l)+Math.abs(c),!a&&t>5&&(a=!0,fr(),N.classList.add("dragging")),a&&(e.size===2&&o?z.zoom=Pi(o.zoom*r()/o.d):(z.x-=l/z.zoom,z.y-=c/z.zoom),Lt())});let n=i=>{e.delete(i.pointerId),e.size<2&&(o=null),e.size||N.classList.remove("dragging")};window.addEventListener("pointerup",n),window.addEventListener("pointercancel",n),N.addEventListener("click",i=>{a&&(i.stopPropagation(),i.preventDefault(),a=!1)},!0)})();N.addEventListener("wheel",e=>{e.preventDefault(),!h.active&&zi(Math.exp(-e.deltaY*(e.ctrlKey?.01:.0015)),e.clientX,e.clientY)},{passive:!1});document.getElementById("nav-prev").onclick=()=>Ue(-1);document.getElementById("nav-next").onclick=()=>Ue(1);document.getElementById("btn-open").onclick=()=>document.getElementById("file-input").click();document.getElementById("file-input").addEventListener("change",e=>{let t=e.target.files[0];if(!t)return;let a=new FileReader;a.onload=()=>{Ms("a copy of "+t.name)&&(P=Ea(String(a.result),{kind:"file",name:t.name},{exported:!0}),wa(),We=null,g=null,dd())},a.readAsText(t),e.target.value=""});document.getElementById("btn-save").onclick=()=>{let e=new Blob([se.value],{type:"text/markdown"}),t=document.createElement("a");t.href=URL.createObjectURL(e),t.download=(ot[0]?mt(u.get(ot[0]).title):"deck")+".md",t.click(),setTimeout(()=>URL.revokeObjectURL(t.href),1e3),M.kind==="copy"&&(P.exported=P.text,wa(),_t())};document.getElementById("btn-reset").onclick=()=>{M.kind!=="copy"||Ma(P)||confirm("Discard your edits and go back to "+Ce(P.origin)+" as it was?")&&(P.text=P.originText,wa(),se.value=P.text,g=null,Bt(!0),_t())};document.getElementById("btn-edit-toggle").onclick=po;xt=document.querySelector("main"),bt=document.getElementById("editor-resizer"),ti=parseFloat(j("slidetake:editorWidth"));ti&&Ve.style.setProperty("--editor-w",ti+"px");bt.addEventListener("pointerdown",e=>{e.preventDefault(),bt.setPointerCapture(e.pointerId),xt.classList.add("resizing");let t=xt.getBoundingClientRect().right,a=r=>{let n=Math.round(Math.max(280,Math.min(window.innerWidth*.75,t-r.clientX)));Ve.style.setProperty("--editor-w",n+"px")},o=()=>{xt.classList.remove("resizing"),bt.removeEventListener("pointermove",a),W("slidetake:editorWidth",String(Ve.getBoundingClientRect().width))};bt.addEventListener("pointermove",a),bt.addEventListener("pointerup",o,{once:!0})});bt.addEventListener("dblclick",()=>{Ve.style.removeProperty("--editor-w");try{localStorage.removeItem("slidetake:editorWidth")}catch{}});document.getElementById("btn-mode").onclick=gi;document.getElementById("btn-present").onclick=()=>xe(!K);wc="https://cdn.jsdelivr.net/npm/obs-websocket-js@5.0.5/dist/obs-ws.min.js",ai=["ArrowRight","PageDown"," ","ArrowDown","Enter"],oi=["ArrowLeft","PageUp","ArrowUp","r","R"],ri=["b","B","."],Y=document.getElementById("review"),Qt=document.getElementById("rec-countdown"),er=document.getElementById("rec-paused"),$a=document.getElementById("obs-host"),Xa=document.getElementById("obs-port"),Qa=document.getElementById("obs-pass"),vr=document.getElementById("obs-remember"),oa=document.getElementById("obs-status"),ne=null,Ie=!1,at=null,wr=null,Ri="",h={active:!1,withObs:!1,counting:!1,paused:!1,finishing:!1,t0:0,pauseAt:0,pausedMs:0,events:[],outputPath:null,browser:null},sa=e=>new Promise(t=>setTimeout(t,e)),la=()=>Promise.race([new Promise(e=>requestAnimationFrame(()=>requestAnimationFrame(e))),sa(100)]);xc="G-3S9FY4MQLS",xr=document.getElementById("analytics-dialog"),kc=()=>j("slidetake:analytics")!=="off";xr.querySelectorAll("[data-analytics]").forEach(e=>e.onclick=()=>Sc(e.dataset.analytics==="on"));Fi=document.getElementById("btn-analytics");Fi.hidden=!/^(www\.)?slidetake\.com$/.test(location.hostname);Fi.onclick=()=>{Di(),fa(xr)};document.querySelectorAll(".modal").forEach(e=>{e.addEventListener("click",t=>{(t.target===e||t.target.closest("[data-close]"))&&e.classList.remove("open")})});Cc=e=>/^(localhost|127(\.\d+){3}|\[?::1\]?)$/i.test(e);Tc="Run OBS on this computer and connect to localhost: a secure (https) page can't reach OBS at any other address.";document.getElementById("obs-connect").onclick=kr;vr.addEventListener("change",Ni);Ac="https://cdn.jsdelivr.net/npm/mediabunny@1.64.0/+esm",kt=document.getElementById("rec-cam"),It=document.getElementById("rec-mic"),Pt=document.getElementById("rec-quality"),tr=document.getElementById("rec-meter"),wt=document.getElementById("rec-browser-check"),St=document.getElementById("rec-wave"),fe=j("slidetake:rec-mode")||"",Wa="",pe=null,Bc=96;ar=0;Sr=document.getElementById("rec-cam-preview"),ja=document.getElementById("rec-cam-none"),_a=null,or=0;It.onchange=()=>{W("slidetake:mic",It.value),Za(),Je()};to=document.getElementById("rec-mirror");to.onchange=()=>{W("slidetake:mirror",to.checked?"on":"off"),Er(),ze()};Er();kt.onchange=()=>{Ic(kt.value),kt.value!=="none"&&re&&(Dr(),ht()),jt()&&ji(),Je()};Oc=()=>(R.pip||"none").toLowerCase()!=="none"||!!R.camera||[...u.values()].some(e=>e.camera),_i=()=>"slidetake:rec-cam:"+Ye();Pt.onchange=()=>{W("slidetake:quality",Pt.value),Je()};ct=()=>!(Ee().ok&&(fe||"browser")==="browser");document.getElementById("btn-studio").onclick=()=>ca();Dc=()=>!!fe||dt().takes.length>0||mo().some(e=>e.key===Ye());document.getElementById("btn-record").onclick=()=>Mr();Gi=e=>{let t=Oa(e,Pe());return{width:t.w,height:t.h,aspectRatio:t.w/t.h,frameRate:yt,resizeMode:"crop-and-scale"}};new ResizeObserver(Vi).observe(xt);rt=!1;ni=600;qe="";Vc=e=>On(e,Xi),Yc=(e,t)=>In(e,t,{input:e.outputPath||qe||"recording.mov",outputName:Ye()+"-final.mp4",sectionOf:Xi,loudness:nt()}),Qi=document.querySelectorAll(".rv-loud"),nt=()=>j("slidetake:loudness")!=="off",Zi=()=>Qi.forEach(e=>{e.setAttribute("aria-pressed",String(nt())),e.classList.toggle("on",nt())}),rr=document.getElementById("rv-limiter"),ha=()=>j("slidetake:limiter")==="on",es=()=>{rr.setAttribute("aria-pressed",String(ha())),rr.classList.toggle("on",ha())};es();rr.onclick=()=>{W("slidetake:limiter",ha()?"off":"on"),es()};ts=()=>j("slidetake:mic-sound")==="raw"?"raw":"voice",as=e=>({...e?{deviceId:{ideal:e}}:{},echoCancellation:!1,autoGainControl:!1,noiseSuppression:ts()==="voice"}),os=document.querySelectorAll("[data-sound]"),rs=()=>os.forEach(e=>{let t=e.dataset.sound===ts();e.classList.toggle("active",t),e.setAttribute("aria-checked",String(t))});rs();os.forEach(e=>e.onclick=()=>{W("slidetake:mic-sound",e.dataset.sound),rs(),pe&&Za()});Zi();Qi.forEach(e=>e.onclick=()=>{W("slidetake:loudness",nt()?"off":"on"),Zi(),H&&fo()});H=null,Z=null,S=document.getElementById("rv-video"),Xt=document.getElementById("rv-now");Ua=-1,ns=()=>{let e=Da(v,Fe).length;return e?e+"/"+v.length+" slide"+(e===1?"":"s")+" up for a take":""};ss="";document.getElementById("rv-chapters").onclick=e=>cs(e.currentTarget,ss);document.getElementById("rv-ffmpeg-copy").onclick=e=>{!H||!H.events.length||(cs(e.currentTarget,Yc(H,document.getElementById("rv-mode").value)),O("Copied the ffmpeg command: run it in a terminal, in the folder with "+(gt(H.outputPath)||"the recording")+"."))};qa=new Map,qo=0;oo=document.getElementById("rv-fps");oo.onchange=()=>{H&&(H.fps=parseFloat(oo.value),Or(H),fo())};ro=null;S.addEventListener("timeupdate",()=>{if(!Z)return;let e=Z.ranges[Z.i];if(S.currentTime*1e3<e.end)return;if(Z.i++,Z.i>=Z.ranges.length){S.pause(),Z=null,O("");return}let t=Z.ranges[Z.i];S.currentTime=t.start/1e3,O("\u25B6 "+t.title)});hs=document.getElementById("rv-play-final"),Et=null;hs.onclick=()=>{if(!H)return;if(!H.inBrowser){no(Kt(H).map(a=>({start:a.start,end:a.end,title:a.title})));return}if(F&&!F.single){S.paused?S.play().catch(()=>{}):S.pause();return}let e=Jt(H),t=Math.max(0,Et?e.findIndex(a=>a.id===Et):0);Et=null,go(e.slice(t))};S.addEventListener("play",Ir);S.addEventListener("pause",()=>{F&&F.single&&S.currentTime<F.parts[0].keep-.05&&(Et=F.parts[0].id,O("Preview starts from "+F.parts[0].title.replace(/ · take \d+$/,"")+".")),Ir()});F=null;S.addEventListener("timeupdate",()=>{F&&S.currentTime>=F.parts[F.i].keep&&us()});S.addEventListener("ended",()=>{F&&us()});io=document.getElementById("rv-render-btn");io.onclick=()=>fs(!1);ms=0,Ze=e=>{clearTimeout(ms),e?io.textContent=e:io.innerHTML='\u2193 <span><u class="key">D</u>ownload</span>'},Go=e=>e.where?"\u201C"+e.where+"\u201D as "+e.name:"your downloads as "+e.name;Xc=e=>{let t=a=>String(a).padStart(2,"0");return e.getFullYear()+"-"+t(e.getMonth()+1)+"-"+t(e.getDate())+" "+t(e.getHours())+"-"+t(e.getMinutes())+"-"+t(e.getSeconds())};document.getElementById("rv-folder-change").onclick=async()=>{try{let e=await gs(!0);e&&O("Videos now go to "+e.name+".")}catch{}};I=null,nr="",si=null,Fe=new Set,ys=()=>"slidetake:board:"+Ye();ba=()=>W(ys(),JSON.stringify(I)),Qc=e=>{let t=u.get(e);return t?_n(t.title+`
1484
- `+t.html):""},yo=()=>Un(v,e=>({title:u.get(e).title,fp:Qc(e)}));it=document.getElementById("rv-setup-btn"),li=document.getElementById("setup-note"),jt=()=>Y.classList.contains("setup-view");new MutationObserver(()=>{Y.classList.contains("open")||vo()}).observe(Y,{attributes:!0,attributeFilter:["class"]});it.onclick=()=>{jt()?vo():bo()};document.getElementById("setup-record").onclick=()=>{ga(),fe||(fe=ct()?"obs":"browser",W("slidetake:rec-mode",fe)),Mr()};Y.addEventListener("click",e=>{(e.target===Y||e.target.closest("[data-close]"))&&uo()});Ga=(()=>{let e=(navigator.userAgentData&&navigator.userAgentData.brands||[]).map(a=>a.brand).filter(a=>!/chromium|not.?a.?brand/i.test(a));if(e.length)return e[0].replace(/^(Google|Microsoft) /,"");let t=navigator.userAgent;return/Firefox\//.test(t)?"Firefox":/Edg\//.test(t)?"Edge":/OPR\//.test(t)?"Opera":/Chrome\//.test(t)?"Chrome":/Safari\//.test(t)?"Safari":"this browser"})();document.querySelectorAll(".browser-name").forEach(e=>{e.textContent=Ga});document.getElementById("rv-rec").onclick=()=>{if(!ct()){ao("browser",Da(v,Fe));return}if(Ie){ao("obs");return}ir({note:"Connect to OBS first: OBS \u2192 Connect."})};vt=document.getElementById("rv-pro");vt.onclick=()=>{Ee().ok&&zc(ct()?"browser":"obs")};document.querySelectorAll(".rv-purge .rv-menu button").forEach(e=>e.addEventListener("click",()=>{e.closest("details").open=!1}));document.getElementById("rv-clean-unused").onclick=async()=>{let{rows:e}=bs(),t=new Set(e.map(o=>o.pick).filter(Boolean)),a=I.takes.filter(o=>!t.has(o.uid));if(!a.length){O("Every take is in use.");return}confirm("Purge "+a.length+" take"+(a.length===1?"":"s")+" the video doesn\u2019t use (earlier attempts and outdated takes)?")&&(await ad(a),O("Purged "+a.length+" unused take"+(a.length===1?"":"s")+"."))};document.getElementById("rv-clean").onclick=async()=>{if(!I.takes.length||!confirm("Purge all "+I.takes.length+" takes of this deck from this browser? Download the video first if you need it."))return;let e=new Set(I.takes.map(t=>t.clip.split("/")[0]));I.takes=[],I.picks={},ba();for(let t of e)await Lr(t);S.src&&(URL.revokeObjectURL(S.src),S.removeAttribute("src"),S.load()),F=null,Ht(),O("All takes purged."),lt()};document.getElementById("rv-clean-every").onclick=async()=>{let e,t=0,a=0;try{e=await navigator.storage.getDirectory()}catch{return}let o=async s=>{for await(let l of s.values())l.kind==="directory"?await o(l):(a++,t+=(await l.getFile()).size)};try{await o(await e.getDirectoryHandle("slidetake-takes"))}catch{}let r=[];try{for(let s=0;s<localStorage.length;s++){let l=localStorage.key(s);l&&l.startsWith("slidetake:board:")&&r.push(l)}}catch{}let n=r.filter(s=>{try{return JSON.parse(localStorage.getItem(s)||"{}").takes.length>0}catch{return!1}}).length;if(!a){O("No takes are kept in this browser.");return}let i=t>1e9?(t/1e9).toFixed(1)+" GB":Math.max(1,Math.round(t/1e6))+" MB";if(confirm("Purge "+i+" of takes ("+a+" file"+(a===1?"":"s")+") from "+(n||"no")+" deck"+(n===1?"":"s")+" and any left behind? Every deck loses its takes; download the videos you need first.")){try{await e.removeEntry("slidetake-takes",{recursive:!0})}catch{}r.forEach(s=>{try{localStorage.removeItem(s)}catch{}}),W("slidetake:sessions",JSON.stringify(mo().map(s=>s.inBrowser?{...s,cleaned:!0}:s))),I=null,nr="",dt(),qa.clear(),S.src&&(URL.revokeObjectURL(S.src),S.removeAttribute("src"),S.load()),F=null,Ht(),lt(),O("Purged "+i+" of takes from every deck.")}};Zt=null,sr=0,lr=!1;S.addEventListener("error",async()=>{if(S.getAttribute("src")){if(Zt&&sr<5){sr++,O("Reloading "+qe+" (OBS was still finishing it)\u2026"),await new Promise(e=>setTimeout(e,1500));try{va(await wo(Zt),Zt,!0);return}catch{}}O(Zt?"Chrome cannot play "+qe+". In OBS set Recording Format to Hybrid MP4 (or MP4) with H.264 video; the ffmpeg command still works with this file.":"Could not play "+(qe||"this file")+". If OBS was still finishing it when you opened it, open it again; if it still fails, set OBS to Hybrid MP4 (or MP4) with H.264 video.",{warn:!0})}});ea=document.getElementById("rv-file-input");ea.addEventListener("change",()=>{ea.files[0]&&va(ea.files[0]),ea.value=""});document.getElementById("rv-open").onclick=async()=>{if(!window.showOpenFilePicker)return ea.click();try{let[e]=await window.showOpenFilePicker({id:"obs-recordings",types:[{description:"Recordings",accept:{"video/*":[".mov",".mp4",".m4v",".mkv",".webm"]}}]});O("Opening "+e.name+"\u2026"),va(await wo(e),e)}catch(e){(!e||e.name!=="AbortError")&&O("Could not open that file.",{warn:!0})}};xs=document.getElementById("rv-folder");window.showDirectoryPicker||(xs.style.display="none");xs.onclick=async()=>{let e=H&&gt(H.outputPath);try{let t=await window.showDirectoryPicker({id:"obs-recordings",mode:"read"});if(ws("obs-folder",t),!e){O("Folder remembered. This session has no file name from OBS; open the file instead.");return}let a=await t.getFileHandle(e);va(await wo(a),a)}catch{}};Ec()&&new URLSearchParams(location.search).get("obs")&&kr();Le=document.getElementById("btn-camera"),ta=document.getElementById("pip-msg"),Va=null,ks=B.querySelector("span");nd='<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linejoin="round" aria-hidden="true"><rect x="2" y="6" width="14" height="12" rx="2"/><path d="M16 10.5 22 7v10l-6-3.5z"/></svg>';Le.onclick=()=>Wt(ae);Fr();ci=null;window.addEventListener("pointermove",Cs);document.addEventListener("fullscreenchange",()=>{document.fullscreenElement||(h.active?zt("Stopped: the browser left fullscreen"):K&&xe(!1))});ke=document.getElementById("help");new MutationObserver(()=>Es(document.getElementById("btn-keys"),ke.classList.contains("open"))).observe(ke,{attributes:!0,attributeFilter:["class"]});new MutationObserver(()=>{let e=Y.classList.contains("open");document.getElementById("btn-studio").classList.toggle("active",e),!e&&!S.paused&&S.pause()}).observe(Y,{attributes:!0,attributeFilter:["class"]});document.getElementById("btn-keys").onclick=()=>ke.classList.add("open");document.getElementById("help-close").onclick=()=>ke.classList.remove("open");ke.addEventListener("click",e=>{e.target===ke&&ke.classList.remove("open")});window.addEventListener("keydown",e=>{if(e.key==="F5"){e.preventDefault(),h.active||ca();return}if(h.active){Wc(e);return}if(document.querySelector(".modal.open")){let o=Y.classList.contains("open")&&jt();if(e.key==="Escape")ga();else if(Y.classList.contains("open")&&!e.metaKey&&!e.ctrlKey&&!e.altKey&&!/^(INPUT|TEXTAREA|SELECT)$/.test(document.activeElement?.tagName||"")){let r=e.key.toLowerCase(),n=r==="r"?o?"setup-record":"rv-rec":o?"":r==="p"?"rv-play-final":r==="d"?ct()?"rv-ffmpeg-copy":"rv-render-btn":"",i=n?document.getElementById(n):null;i&&!i.disabled&&(e.preventDefault(),i.click())}return}let t=document.activeElement&&document.activeElement.tagName;if(t==="TEXTAREA"||t==="INPUT"||e.metaKey||e.ctrlKey||e.altKey)return;if(ke.classList.contains("open")){/^(Escape|k|K|\?|\/)$/.test(e.key)&&ke.classList.remove("open");return}let a=e.key;a==="ArrowRight"||a===" "||a==="PageDown"?(e.preventDefault(),Ue(1)):a==="ArrowLeft"||a==="PageUp"?(e.preventDefault(),Ue(-1)):a==="ArrowDown"?(e.preventDefault(),bc()):a==="ArrowUp"?(e.preventDefault(),yc()):a==="Home"?v.length&&_(v[0]):a==="End"?v.length&&_(v[v.length-1]):a==="o"||a==="O"?gc():a==="e"||a==="E"?po():a==="f"||a==="F"||a==="p"||a==="P"?xe(!K):a==="r"||a==="R"?Mr():a==="s"||a==="S"?ca():/^[1-4]$/.test(a)?br(ur[+a-1]):a==="c"||a==="C"?Wt(ae):a==="v"||a==="V"?Ml():a==="l"||a==="L"?gi():a==="+"||a==="="?ei(1):a==="-"||a==="_"?ei(-1):a==="?"||a==="/"||a==="k"||a==="K"?ke.classList.add("open"):a==="Escape"&&!Oi()&&K&&xe(!1)});window.addEventListener("hashchange",()=>{let{data:e,slide:t}=Sa(location.hash);if(e&&!(M&&M.kind==="share"&&e===M.data)){location.reload();return}t&&t!==g&&u.has(t)&&_(t)});di="";new ResizeObserver(()=>{let e=N.clientWidth+"x"+N.clientHeight;e!==di&&(di=e,Lt(),ge(!0))}).observe(N);Mt=document.createElement("div");Mt.id="toast";Mt.setAttribute("role","status");document.body.appendChild(Mt);hi=null;id=document.getElementById("open-dialog"),dr=document.getElementById("open-url"),hr=document.getElementById("open-error");document.getElementById("btn-load").onclick=()=>{hr.hidden=!0,fa(id),dr.focus(),dr.select()};document.getElementById("open-form").onsubmit=e=>{e.preventDefault();let t=bn(dr.value);if(!t){hr.textContent="That doesn't look like a link.",hr.hidden=!1;return}location.href=cr(t)};document.getElementById("btn-share").onclick=async()=>{let{link:e,inside:t}=await sd(g&&g!==v[0]?g:""),a=t?"Link copied, with the whole deck inside it ("+(e.length/1024).toFixed(1)+" KB)"+(e.length>8e3?". Some chat apps cut long links short: a GitHub file or gist makes a shorter one.":"."):"Link copied.";try{await navigator.clipboard.writeText(e),Dt(a,5e3)}catch{prompt("Copy this link:",e)}M.kind==="copy"&&(P.exported=P.text,wa(),_t())};pi=j("slidetake:layout");J=ur.includes(pi)?pi:"path";document.querySelectorAll("#layout-toggle .seg-btn").forEach(e=>e.classList.toggle("active",e.dataset.mode===J));so=new URLSearchParams(location.search);ur.includes(so.get("layout"))&&(J=so.get("layout"),document.querySelectorAll("#layout-toggle .seg-btn").forEach(e=>e.classList.toggle("active",e.dataset.mode===J)));if(U){let e=(Array.isArray(U.trail)?U.trail:U.back?[U.back]:[]).filter(r=>r&&r.label),t=document.querySelector("header .brand");e.length&&(t.innerHTML='<nav class="trail" aria-label="Site">'+e.map((r,n)=>(n?'<span class="sep" aria-hidden="true">|</span>':"")+(r.url?'<a href="'+A(r.url)+'">'+A(r.label)+"</a>":"<span>"+A(r.label)+"</span>")).join("")+"</nav>");let a=document.createElement("a");a.id="credit",a.href="https://slidetake.com",a.target="_blank",a.rel="noopener",a.title="Made with Slidetake",a.setAttribute("aria-label","Made with Slidetake"),a.innerHTML=pr+'<span class="word">Slide<span>take</span></span>';let o=document.querySelector("header .hdr-actions");o.insertBefore(a,o.firstChild),Ke||(o.insertAdjacentHTML("beforeend",'<button class="btn" id="hdr-keys" title="Keyboard shortcuts (K)">\u2328 Keys</button><button class="btn" id="hdr-full" title="Fullscreen (F)">\u26F6 Fullscreen</button>'),document.getElementById("hdr-keys").onclick=()=>document.getElementById("help").classList.add("open"),document.getElementById("hdr-full").onclick=()=>xe(!K))}te=Sn(location.pathname,location.search,location.hash),ui=te.page==="pick"?"":te.slide,M=null,P=En(j("slidetake:copy"))||ld();window.addEventListener("popstate",()=>location.reload());ue&&window.EventSource&&(new EventSource(ue.events).onmessage=async e=>{if(!Nr())return;let t=(JSON.parse(e.data).file||"").replace(/\\/g,"/");if(t===ue.file){let a=await(await fetch(ue.deck,{cache:"no-store"})).text();if(a===se.value)return;se.value=M.text=a,Bt(!0);return}le.querySelectorAll("img").forEach(a=>{let o=new URL(a.src);decodeURIComponent(o.pathname).endsWith("/"+t)&&(o.searchParams.set("t",String(Date.now())),a.src=o.href)})});(so.get("edit")==="1"||te.page==="edit"&&P&&so.get("edit")!=="0")&&po();ud().then(e=>(se.value=e,_t(),bi(se.value),Si(),document.fonts?document.fonts.ready:null)).then(()=>{u.forEach(co),pa(),_(u.has(ui)?ui:v[0],!0),Ke&&j("slidetake:camera")==="on"&&Wt(!0,!0)})});var Wr=` /* Every colour comes from these tokens. Slidetake's own is seafoam green: bright on zinc in dark mode,
1484
+ `+t.html):""},yo=()=>Un(v,e=>({title:u.get(e).title,fp:Qc(e)}));it=document.getElementById("rv-setup-btn"),li=document.getElementById("setup-note"),jt=()=>Y.classList.contains("setup-view");new MutationObserver(()=>{Y.classList.contains("open")||vo()}).observe(Y,{attributes:!0,attributeFilter:["class"]});it.onclick=()=>{jt()?vo():bo()};document.getElementById("setup-record").onclick=()=>{ga(),fe||(fe=ct()?"obs":"browser",W("slidetake:rec-mode",fe)),Mr()};Y.addEventListener("click",e=>{(e.target===Y||e.target.closest("[data-close]"))&&uo()});Ga=(()=>{let e=(navigator.userAgentData&&navigator.userAgentData.brands||[]).map(a=>a.brand).filter(a=>!/chromium|not.?a.?brand/i.test(a));if(e.length)return e[0].replace(/^(Google|Microsoft) /,"");let t=navigator.userAgent;return/Firefox\//.test(t)?"Firefox":/Edg\//.test(t)?"Edge":/OPR\//.test(t)?"Opera":/Chrome\//.test(t)?"Chrome":/Safari\//.test(t)?"Safari":"this browser"})();document.querySelectorAll(".browser-name").forEach(e=>{e.textContent=Ga});document.getElementById("rv-rec").onclick=()=>{if(!ct()){ao("browser",Da(v,Fe));return}if(Ie){ao("obs");return}ir({note:"Connect to OBS first: OBS \u2192 Connect."})};vt=document.getElementById("rv-pro");vt.onclick=()=>{Ee().ok&&zc(ct()?"browser":"obs")};document.querySelectorAll(".rv-purge .rv-menu button").forEach(e=>e.addEventListener("click",()=>{e.closest("details").open=!1}));document.getElementById("rv-clean-unused").onclick=async()=>{let{rows:e}=bs(),t=new Set(e.map(o=>o.pick).filter(Boolean)),a=I.takes.filter(o=>!t.has(o.uid));if(!a.length){O("Every take is in use.");return}confirm("Purge "+a.length+" take"+(a.length===1?"":"s")+" the video doesn\u2019t use (earlier attempts and outdated takes)?")&&(await ad(a),O("Purged "+a.length+" unused take"+(a.length===1?"":"s")+"."))};document.getElementById("rv-clean").onclick=async()=>{if(!I.takes.length||!confirm("Purge all "+I.takes.length+" takes of this deck from this browser? Download the video first if you need it."))return;let e=new Set(I.takes.map(t=>t.clip.split("/")[0]));I.takes=[],I.picks={},ba();for(let t of e)await Lr(t);S.src&&(URL.revokeObjectURL(S.src),S.removeAttribute("src"),S.load()),F=null,Ht(),O("All takes purged."),lt()};document.getElementById("rv-clean-every").onclick=async()=>{let e,t=0,a=0;try{e=await navigator.storage.getDirectory()}catch{return}let o=async s=>{for await(let l of s.values())l.kind==="directory"?await o(l):(a++,t+=(await l.getFile()).size)};try{await o(await e.getDirectoryHandle("slidetake-takes"))}catch{}let r=[];try{for(let s=0;s<localStorage.length;s++){let l=localStorage.key(s);l&&l.startsWith("slidetake:board:")&&r.push(l)}}catch{}let n=r.filter(s=>{try{return JSON.parse(localStorage.getItem(s)||"{}").takes.length>0}catch{return!1}}).length;if(!a){O("No takes are kept in this browser.");return}let i=t>1e9?(t/1e9).toFixed(1)+" GB":Math.max(1,Math.round(t/1e6))+" MB";if(confirm("Purge "+i+" of takes ("+a+" file"+(a===1?"":"s")+") from "+(n||"no")+" deck"+(n===1?"":"s")+" and any left behind? Every deck loses its takes; download the videos you need first.")){try{await e.removeEntry("slidetake-takes",{recursive:!0})}catch{}r.forEach(s=>{try{localStorage.removeItem(s)}catch{}}),W("slidetake:sessions",JSON.stringify(mo().map(s=>s.inBrowser?{...s,cleaned:!0}:s))),I=null,nr="",dt(),qa.clear(),S.src&&(URL.revokeObjectURL(S.src),S.removeAttribute("src"),S.load()),F=null,Ht(),lt(),O("Purged "+i+" of takes from every deck.")}};Zt=null,sr=0,lr=!1;S.addEventListener("error",async()=>{if(S.getAttribute("src")){if(Zt&&sr<5){sr++,O("Reloading "+qe+" (OBS was still finishing it)\u2026"),await new Promise(e=>setTimeout(e,1500));try{va(await wo(Zt),Zt,!0);return}catch{}}O(Zt?"Chrome cannot play "+qe+". In OBS set Recording Format to Hybrid MP4 (or MP4) with H.264 video; the ffmpeg command still works with this file.":"Could not play "+(qe||"this file")+". If OBS was still finishing it when you opened it, open it again; if it still fails, set OBS to Hybrid MP4 (or MP4) with H.264 video.",{warn:!0})}});ea=document.getElementById("rv-file-input");ea.addEventListener("change",()=>{ea.files[0]&&va(ea.files[0]),ea.value=""});document.getElementById("rv-open").onclick=async()=>{if(!window.showOpenFilePicker)return ea.click();try{let[e]=await window.showOpenFilePicker({id:"obs-recordings",types:[{description:"Recordings",accept:{"video/*":[".mov",".mp4",".m4v",".mkv",".webm"]}}]});O("Opening "+e.name+"\u2026"),va(await wo(e),e)}catch(e){(!e||e.name!=="AbortError")&&O("Could not open that file.",{warn:!0})}};xs=document.getElementById("rv-folder");window.showDirectoryPicker||(xs.style.display="none");xs.onclick=async()=>{let e=H&&gt(H.outputPath);try{let t=await window.showDirectoryPicker({id:"obs-recordings",mode:"read"});if(ws("obs-folder",t),!e){O("Folder remembered. This session has no file name from OBS; open the file instead.");return}let a=await t.getFileHandle(e);va(await wo(a),a)}catch{}};Ec()&&new URLSearchParams(location.search).get("obs")&&kr();Le=document.getElementById("btn-camera"),ta=document.getElementById("pip-msg"),Va=null,ks=B.querySelector("span");nd='<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linejoin="round" aria-hidden="true"><rect x="2" y="6" width="14" height="12" rx="2"/><path d="M16 10.5 22 7v10l-6-3.5z"/></svg>';Le.onclick=()=>Wt(ae);Fr();ci=null;window.addEventListener("pointermove",Cs);document.addEventListener("fullscreenchange",()=>{document.fullscreenElement||(h.active?zt("Stopped: the browser left fullscreen"):K&&xe(!1))});ke=document.getElementById("help");new MutationObserver(()=>Es(document.getElementById("btn-keys"),ke.classList.contains("open"))).observe(ke,{attributes:!0,attributeFilter:["class"]});new MutationObserver(()=>{let e=Y.classList.contains("open");document.getElementById("btn-studio").classList.toggle("active",e),!e&&!S.paused&&S.pause()}).observe(Y,{attributes:!0,attributeFilter:["class"]});document.getElementById("btn-keys").onclick=()=>ke.classList.add("open");document.getElementById("help-close").onclick=()=>ke.classList.remove("open");ke.addEventListener("click",e=>{e.target===ke&&ke.classList.remove("open")});window.addEventListener("keydown",e=>{if(e.key==="F5"){e.preventDefault(),h.active||ca();return}if(h.active){Wc(e);return}if(document.querySelector(".modal.open")){let o=Y.classList.contains("open")&&jt();if(e.key==="Escape")ga();else if(Y.classList.contains("open")&&!e.metaKey&&!e.ctrlKey&&!e.altKey&&!/^(INPUT|TEXTAREA|SELECT)$/.test(document.activeElement?.tagName||"")){let r=e.key.toLowerCase(),n=r==="r"?o?"setup-record":"rv-rec":o?"":r==="p"?"rv-play-final":r==="d"?ct()?"rv-ffmpeg-copy":"rv-render-btn":"",i=n?document.getElementById(n):null;i&&!i.disabled&&(e.preventDefault(),i.click())}return}let t=document.activeElement&&document.activeElement.tagName;if(t==="TEXTAREA"||t==="INPUT"||e.metaKey||e.ctrlKey||e.altKey)return;if(ke.classList.contains("open")){/^(Escape|k|K|\?|\/)$/.test(e.key)&&ke.classList.remove("open");return}let a=e.key;a==="ArrowRight"||a===" "||a==="PageDown"?(e.preventDefault(),Ue(1)):a==="ArrowLeft"||a==="PageUp"?(e.preventDefault(),Ue(-1)):a==="ArrowDown"?(e.preventDefault(),bc()):a==="ArrowUp"?(e.preventDefault(),yc()):a==="Home"?v.length&&_(v[0]):a==="End"?v.length&&_(v[v.length-1]):a==="o"||a==="O"?gc():a==="e"||a==="E"?po():a==="f"||a==="F"||a==="p"||a==="P"?xe(!K):a==="r"||a==="R"?Mr():a==="s"||a==="S"?ca():/^[1-4]$/.test(a)?br(ur[+a-1]):a==="c"||a==="C"?Wt(ae):a==="v"||a==="V"?Ml():a==="l"||a==="L"?gi():a==="+"||a==="="?ei(1):a==="-"||a==="_"?ei(-1):a==="?"||a==="/"||a==="k"||a==="K"?ke.classList.add("open"):a==="Escape"&&!Oi()&&K&&xe(!1)});window.addEventListener("hashchange",()=>{let{data:e,slide:t}=Sa(location.hash);if(e&&!(M&&M.kind==="share"&&e===M.data)){location.reload();return}t&&t!==g&&u.has(t)&&_(t)});di="";new ResizeObserver(()=>{let e=N.clientWidth+"x"+N.clientHeight;e!==di&&(di=e,Lt(),ge(!0))}).observe(N);Mt=document.createElement("div");Mt.id="toast";Mt.setAttribute("role","status");document.body.appendChild(Mt);hi=null;id=document.getElementById("open-dialog"),dr=document.getElementById("open-url"),hr=document.getElementById("open-error");document.getElementById("btn-load").onclick=()=>{hr.hidden=!0,fa(id),dr.focus(),dr.select()};document.getElementById("open-form").onsubmit=e=>{e.preventDefault();let t=bn(dr.value);if(!t){hr.textContent="That doesn't look like a link.",hr.hidden=!1;return}location.href=cr(t)};document.getElementById("btn-share").onclick=async()=>{let{link:e,inside:t}=await sd(g&&g!==v[0]?g:""),a=t?"Link copied, with the whole deck inside it ("+(e.length/1024).toFixed(1)+" KB)"+(e.length>8e3?". Some chat apps cut long links short: a GitHub file or gist makes a shorter one.":"."):"Link copied.";try{await navigator.clipboard.writeText(e),Dt(a,5e3)}catch{prompt("Copy this link:",e)}M.kind==="copy"&&(P.exported=P.text,wa(),_t())};pi=j("slidetake:layout");J=ur.includes(pi)?pi:"path";document.querySelectorAll("#layout-toggle .seg-btn").forEach(e=>e.classList.toggle("active",e.dataset.mode===J));so=new URLSearchParams(location.search);ur.includes(so.get("layout"))&&(J=so.get("layout"),document.querySelectorAll("#layout-toggle .seg-btn").forEach(e=>e.classList.toggle("active",e.dataset.mode===J)));if(U){let e=(Array.isArray(U.trail)?U.trail:U.back?[U.back]:[]).filter(r=>r&&r.label),t=document.querySelector("header .brand");e.length&&(t.innerHTML='<nav class="trail" aria-label="Site">'+e.map((r,n)=>(n?'<span class="sep" aria-hidden="true">|</span>':"")+(r.url?'<a href="'+A(r.url)+'">'+A(r.label)+"</a>":"<span>"+A(r.label)+"</span>")).join("")+"</nav>");let a=document.createElement("a");a.id="credit",a.href="https://slidetake.com",a.target="_blank",a.rel="noopener",a.title="Made with Slidetake",a.setAttribute("aria-label","Made with Slidetake"),a.innerHTML=pr+'<span class="word">Slide<span>take</span></span>';let o=document.querySelector("header .hdr-actions");if(o.insertBefore(a,o.firstChild),!Ke){let r=n=>'<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">'+n+"</svg>";o.insertAdjacentHTML("beforeend",'<button class="btn icon" id="hdr-keys" title="Keyboard shortcuts (K)" aria-label="Keyboard shortcuts">'+r('<rect x="2" y="5" width="20" height="14" rx="2"/><path d="M6 9h.01M10 9h.01M14 9h.01M18 9h.01M6 13h.01M18 13h.01M8 16h8M10 13h4"/>')+'</button><button class="btn icon" id="hdr-full" title="Fullscreen (F)" aria-label="Fullscreen">'+r('<path d="M8 3H5a2 2 0 0 0-2 2v3M21 8V5a2 2 0 0 0-2-2h-3M3 16v3a2 2 0 0 0 2 2h3M16 21h3a2 2 0 0 0 2-2v-3"/>')+"</button>"),document.getElementById("hdr-keys").onclick=()=>document.getElementById("help").classList.add("open"),document.getElementById("hdr-full").onclick=()=>xe(!K)}}te=Sn(location.pathname,location.search,location.hash),ui=te.page==="pick"?"":te.slide,M=null,P=En(j("slidetake:copy"))||ld();window.addEventListener("popstate",()=>location.reload());ue&&window.EventSource&&(new EventSource(ue.events).onmessage=async e=>{if(!Nr())return;let t=(JSON.parse(e.data).file||"").replace(/\\/g,"/");if(t===ue.file){let a=await(await fetch(ue.deck,{cache:"no-store"})).text();if(a===se.value)return;se.value=M.text=a,Bt(!0);return}le.querySelectorAll("img").forEach(a=>{let o=new URL(a.src);decodeURIComponent(o.pathname).endsWith("/"+t)&&(o.searchParams.set("t",String(Date.now())),a.src=o.href)})});(so.get("edit")==="1"||te.page==="edit"&&P&&so.get("edit")!=="0")&&po();ud().then(e=>(se.value=e,_t(),bi(se.value),Si(),document.fonts?document.fonts.ready:null)).then(()=>{u.forEach(co),pa(),_(u.has(ui)?ui:v[0],!0),Ke&&j("slidetake:camera")==="on"&&Wt(!0,!0)})});var Wr=` /* Every colour comes from these tokens. Slidetake's own is seafoam green: bright on zinc in dark mode,
1485
1485
  deep on white in light mode. A host page passes its own (window.SLIDETAKE.colors) and a deck can carry
1486
1486
  its own (accent: in its top block); see applyColors in app.js. */
1487
1487
  :root{
@@ -1628,9 +1628,11 @@ EOF
1628
1628
  #editor-resizer{flex:none;width:6px;margin-right:-3px;margin-left:-3px;z-index:5;cursor:col-resize;position:relative;}
1629
1629
  #editor-resizer:hover, main.resizing #editor-resizer{background:var(--accent-line, var(--accent));opacity:.6;}
1630
1630
  #editor-resizer:has(+ #editor-pane.collapsed){display:none;}
1631
- .pane-bar{flex:none;display:flex;align-items:center;justify-content:space-between;gap:8px;padding:8px 10px 8px 14px;border-bottom:1px solid var(--panel-line);}
1632
- .pane-actions{display:flex;gap:6px;flex-wrap:wrap;justify-content:flex-end;}
1633
- #doc-state{text-transform:none;letter-spacing:.02em;font-size:11px;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
1631
+ /* two lines: the buttons, then what the text below is (the deck, read-only or your copy) */
1632
+ .pane-bar{flex:none;display:flex;flex-direction:column;align-items:stretch;gap:8px;padding:8px 10px 8px 14px;border-bottom:1px solid var(--panel-line);}
1633
+ .pane-actions{display:flex;gap:6px;flex-wrap:wrap;}
1634
+ .pane-state{display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:24px;}
1635
+ #doc-state{text-transform:none;letter-spacing:.02em;font-size:11px;min-width:0;flex:1 1 auto;flex-shrink:1;}
1634
1636
  #doc-state .ro{color:var(--text-muted);}
1635
1637
  #doc-state .mine{color:var(--text);}
1636
1638
  #doc-state .edited{color:var(--accent);}
@@ -2372,15 +2374,18 @@ EOF
2372
2374
  <div id="editor-resizer" role="separator" aria-orientation="vertical" aria-label="Resize the editor" title="Drag to resize"></div>
2373
2375
  <div id="editor-pane" class="collapsed">
2374
2376
  <div class="pane-bar">
2375
- <span class="pane-label" id="doc-state" aria-live="polite"></span>
2376
2377
  <span class="pane-actions">
2377
- <a class="btn small" id="continue" href="/edit" hidden></a>
2378
2378
  <a class="btn small" id="btn-new" href="/new" title="Start from a template">New</a>
2379
2379
  <button class="btn small" id="btn-load" title="Load a deck from a link: GitHub, a gist or any URL">\u21E3 Load</button>
2380
2380
  <button class="btn small" id="btn-open" title="Open a markdown file from this computer">Open</button>
2381
2381
  <button class="btn small" id="btn-save" title="Save the markdown to a file on this computer">Save</button>
2382
2382
  <button class="btn small" id="btn-share" title="Copy a link to this deck">Share</button>
2383
2383
  </span>
2384
+ <!-- what the text below is: the deck, and whether typing makes your copy -->
2385
+ <span class="pane-state">
2386
+ <span class="pane-label" id="doc-state" aria-live="polite"></span>
2387
+ <a class="btn small" id="continue" href="/edit" hidden></a>
2388
+ </span>
2384
2389
  </div>
2385
2390
  <textarea id="editor" spellcheck="false"></textarea>
2386
2391
  <div id="status-line"><span id="status-count"></span><span id="status-err" class="err"></span><button id="btn-reset" hidden title="Discard your edits and go back to the original">reset to original</button></div>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "slidetake",
3
- "version": "0.5.2",
3
+ "version": "0.5.3",
4
4
  "description": "Markdown to finished video: a spatial deck that records itself, take by take",
5
5
  "keywords": [
6
6
  "slides",