@inkandswitch/patchwork-pkg-base 0.0.128 → 0.0.130
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/module-settings-url +1 -1
- package/package.json +1 -1
- package/packages/account/dist/{AccountPicker-TCOUU4YK.js → AccountPicker-SBCGXHRS.js} +13 -44
- package/packages/account/dist/AccountPicker-SBCGXHRS.js.map +7 -0
- package/packages/account/dist/{ContactAvatar-MKDWQC6G.js → ContactAvatar-IVYTJ7M4.js} +5 -2
- package/packages/account/dist/ContactAvatar-IVYTJ7M4.js.map +7 -0
- package/packages/account/dist/{ContactCursor-4FYCATG5.js → ContactCursor-2FVKF5QA.js} +5 -2
- package/packages/account/dist/ContactCursor-2FVKF5QA.js.map +7 -0
- package/packages/account/dist/chunk-L6JWPAD3.js +52 -0
- package/packages/account/dist/chunk-L6JWPAD3.js.map +7 -0
- package/packages/account/dist/index.js +3 -3
- package/packages/codemirror-base/dist/{chunk-A2WBDY3J.js → chunk-REXVGJ53.js} +27 -2
- package/packages/codemirror-base/dist/{chunk-A2WBDY3J.js.map → chunk-REXVGJ53.js.map} +2 -2
- package/packages/codemirror-base/dist/lib/codemirror.js +1 -1
- package/packages/codemirror-base/dist/tool.js +30 -5
- package/packages/codemirror-base/dist/tool.js.map +2 -2
- package/packages/codemirror-markdown/dist/extensions/embed.js +11 -6
- package/packages/codemirror-markdown/dist/extensions/embed.js.map +2 -2
- package/packages/codemirror-markdown/dist/extensions/markdown.js +302 -43
- package/packages/codemirror-markdown/dist/extensions/markdown.js.map +3 -3
- package/packages/theming/dist/{active-theme-6H5UANUR.js → active-theme-WA6XMDTP.js} +2 -2
- package/packages/theming/dist/{chunk-HHCCYVOT.js → chunk-4GOF67HA.js} +2 -2
- package/packages/theming/dist/{chunk-VJZ4NPK4.js → chunk-T7VWPJQG.js} +26 -1
- package/packages/theming/dist/chunk-T7VWPJQG.js.map +7 -0
- package/packages/theming/dist/main.js +4 -4
- package/packages/theming/dist/{theme-HE7ECLIW.css → theme-HV4IDVYM.css} +44 -0
- package/packages/theming/dist/{theme-editor-datatype-TJ6LYT2U.js → theme-editor-datatype-DZFQK7HV.js} +2 -2
- package/packages/theming/dist/theme-editor.js +1 -1
- package/packages/theming/dist/{theme-titlebar-UX4BND5Z.js → theme-titlebar-LG6PFBKR.js} +2 -2
- package/packages/theming/dist/{theme-tray-B477G2WR.js → theme-tray-R3PJDYCL.js} +2 -2
- package/packages/theming/dist/tool.js +1 -1
- package/packages/threepane/dist/IsolatedDocumentArea-JJMLEL4O.js +2 -0
- package/packages/threepane/dist/{PatchworkFrame-22ABHJVG.js → PatchworkFrame-HMA5KZLY.js} +2 -2
- package/packages/threepane/dist/chunk-UOTRB26X.js +846 -0
- package/packages/threepane/dist/chunk-UOTRB26X.js.map +7 -0
- package/packages/threepane/dist/index.js +1 -1
- package/plugin-registry-url +1 -1
- package/packages/account/dist/AccountPicker-TCOUU4YK.js.map +0 -7
- package/packages/account/dist/ContactAvatar-MKDWQC6G.js.map +0 -7
- package/packages/account/dist/ContactCursor-4FYCATG5.js.map +0 -7
- package/packages/theming/dist/chunk-VJZ4NPK4.js.map +0 -7
- package/packages/threepane/dist/IsolatedDocumentArea-3HGASUGM.js +0 -2
- package/packages/threepane/dist/chunk-34WWZW2V.js +0 -1215
- package/packages/threepane/dist/chunk-34WWZW2V.js.map +0 -7
- /package/packages/theming/dist/{active-theme-6H5UANUR.js.map → active-theme-WA6XMDTP.js.map} +0 -0
- /package/packages/theming/dist/{chunk-HHCCYVOT.js.map → chunk-4GOF67HA.js.map} +0 -0
- /package/packages/theming/dist/{theme-editor-datatype-TJ6LYT2U.js.map → theme-editor-datatype-DZFQK7HV.js.map} +0 -0
- /package/packages/theming/dist/{theme-titlebar-UX4BND5Z.js.map → theme-titlebar-LG6PFBKR.js.map} +0 -0
- /package/packages/theming/dist/{theme-tray-B477G2WR.js.map → theme-tray-R3PJDYCL.js.map} +0 -0
- /package/packages/threepane/dist/{IsolatedDocumentArea-3HGASUGM.js.map → IsolatedDocumentArea-JJMLEL4O.js.map} +0 -0
- /package/packages/threepane/dist/{PatchworkFrame-22ABHJVG.js.map → PatchworkFrame-HMA5KZLY.js.map} +0 -0
|
@@ -0,0 +1,846 @@
|
|
|
1
|
+
import{a as se,b as _t}from"./chunk-FW4363Y4.js";var Ie=se((tn,Ae)=>{var I=1e3,F=I*60,R=F*60,E=R*24,Ht=E*7,qt=E*365.25;Ae.exports=function(e,r){r=r||{};var t=typeof e;if(t==="string"&&e.length>0)return Bt(e);if(t==="number"&&isFinite(e))return r.long?Vt(e):Jt(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function Bt(e){if(e=String(e),!(e.length>100)){var r=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(r){var t=parseFloat(r[1]),o=(r[2]||"ms").toLowerCase();switch(o){case"years":case"year":case"yrs":case"yr":case"y":return t*qt;case"weeks":case"week":case"w":return t*Ht;case"days":case"day":case"d":return t*E;case"hours":case"hour":case"hrs":case"hr":case"h":return t*R;case"minutes":case"minute":case"mins":case"min":case"m":return t*F;case"seconds":case"second":case"secs":case"sec":case"s":return t*I;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return t;default:return}}}}function Jt(e){var r=Math.abs(e);return r>=E?Math.round(e/E)+"d":r>=R?Math.round(e/R)+"h":r>=F?Math.round(e/F)+"m":r>=I?Math.round(e/I)+"s":e+"ms"}function Vt(e){var r=Math.abs(e);return r>=E?K(e,r,E,"day"):r>=R?K(e,r,R,"hour"):r>=F?K(e,r,F,"minute"):r>=I?K(e,r,I,"second"):e+" ms"}function K(e,r,t,o){var n=r>=t*1.5;return Math.round(e/t)+" "+o+(n?"s":"")}});var Re=se((rn,Fe)=>{function Yt(e){t.debug=t,t.default=t,t.coerce=h,t.disable=a,t.enable=n,t.enabled=u,t.humanize=Ie(),t.destroy=p,Object.keys(e).forEach(s=>{t[s]=e[s]}),t.names=[],t.skips=[],t.formatters={};function r(s){let c=0;for(let f=0;f<s.length;f++)c=(c<<5)-c+s.charCodeAt(f),c|=0;return t.colors[Math.abs(c)%t.colors.length]}t.selectColor=r;function t(s){let c,f=null,g,v;function b(...l){if(!b.enabled)return;let d=b,m=Number(new Date),w=m-(c||m);d.diff=w,d.prev=c,d.curr=m,c=m,l[0]=t.coerce(l[0]),typeof l[0]!="string"&&l.unshift("%O");let y=0;l[0]=l[0].replace(/%([a-zA-Z%])/g,(S,xt)=>{if(S==="%%")return"%";y++;let xe=t.formatters[xt];if(typeof xe=="function"){let yt=l[y];S=xe.call(d,yt),l.splice(y,1),y--}return S}),t.formatArgs.call(d,l),(d.log||t.log).apply(d,l)}return b.namespace=s,b.useColors=t.useColors(),b.color=t.selectColor(s),b.extend=o,b.destroy=t.destroy,Object.defineProperty(b,"enabled",{enumerable:!0,configurable:!1,get:()=>f!==null?f:(g!==t.namespaces&&(g=t.namespaces,v=t.enabled(s)),v),set:l=>{f=l}}),typeof t.init=="function"&&t.init(b),b}function o(s,c){let f=t(this.namespace+(typeof c>"u"?":":c)+s);return f.log=this.log,f}function n(s){t.save(s),t.namespaces=s,t.names=[],t.skips=[];let c=(typeof s=="string"?s:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(let f of c)f[0]==="-"?t.skips.push(f.slice(1)):t.names.push(f)}function i(s,c){let f=0,g=0,v=-1,b=0;for(;f<s.length;)if(g<c.length&&(c[g]===s[f]||c[g]==="*"))c[g]==="*"?(v=g,b=f,g++):(f++,g++);else if(v!==-1)g=v+1,b++,f=b;else return!1;for(;g<c.length&&c[g]==="*";)g++;return g===c.length}function a(){let s=[...t.names,...t.skips.map(c=>"-"+c)].join(",");return t.enable(""),s}function u(s){for(let c of t.skips)if(i(s,c))return!1;for(let c of t.names)if(i(s,c))return!0;return!1}function h(s){return s instanceof Error?s.stack||s.message:s}function p(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return t.enable(t.load()),t}Fe.exports=Yt});var Oe=se((x,G)=>{x.formatArgs=Kt;x.save=Gt;x.load=Zt;x.useColors=Xt;x.storage=Qt();x.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})();x.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function Xt(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let e;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&(e=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(e[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function Kt(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+G.exports.humanize(this.diff),!this.useColors)return;let r="color: "+this.color;e.splice(1,0,r,"color: inherit");let t=0,o=0;e[0].replace(/%[a-zA-Z%]/g,n=>{n!=="%%"&&(t++,n==="%c"&&(o=t))}),e.splice(o,0,r)}x.log=console.debug||console.log||(()=>{});function Gt(e){try{e?x.storage.setItem("debug",e):x.storage.removeItem("debug")}catch{}}function Zt(){let e;try{e=x.storage.getItem("debug")||x.storage.getItem("DEBUG")}catch{}return!e&&typeof process<"u"&&"env"in process&&(e=process.env.DEBUG),e}function Qt(){try{return localStorage}catch{}}G.exports=Re()(x);var{formatters:er}=G.exports;er.j=function(e){try{return JSON.stringify(e)}catch(r){return"[UnexpectedJSONParseError]: "+r.message}}});import{template as vt}from"solid-js/web";import{createComponent as wo}from"solid-js/web";import{setAttribute as xo}from"solid-js/web";import{effect as yo}from"solid-js/web";import{insert as wt}from"solid-js/web";import{getOwner as _o}from"solid-js/web";import{createMemo as gt}from"solid-js";import{createStore as So,reconcile as $o}from"solid-js/store";import{render as Eo}from"solid-js/web";import{template as V}from"solid-js/web";import{insert as T}from"solid-js/web";import{getOwner as B}from"solid-js/web";import{use as J}from"solid-js/web";import{createComponent as _}from"solid-js/web";import{createUniqueId as Ct,untrack as ye}from"solid-js";import{isServer as kt,isDev as _e}from"solid-js/web";import{reconcile as St}from"solid-js/store";function le(e,r={}){let t=r.storage||globalThis.localStorage,o=r.name||`storage-${Ct()}`;if(!t)return Object.assign(e,{2:null});let n=r.storageOptions,i=r.serialize||JSON.stringify.bind(JSON),a=r.deserialize||JSON.parse.bind(JSON),u=t.getItem(o,n),h=typeof e[0]=="function"?s=>{try{let c=a(s);e[1](()=>c)}catch(c){_e&&console.warn(c)}}:s=>{try{let c=a(s);e[1](St(c))}catch(c){_e&&console.warn(c)}},p=!0;if(u instanceof Promise?u.then(s=>p&&s&&h(s)):u&&h(u),typeof r.sync?.[0]=="function"){let s=typeof e[0]=="function"?e[0]:()=>e[0];r.sync[0](c=>{c.key!==o||!kt&&(c.url||globalThis.location.href)!==globalThis.location.href||c.newValue===i(ye(s))||h(c.newValue)})}return Object.assign([],e,{1:typeof e[0]=="function"?s=>{let c=e[1](s),f=s!=null?i(c):s;return r.sync?.[1](o,f),f!=null?t.setItem(o,f,n):t.removeItem(o,n),p=!1,c}:(...s)=>{e[1](...s);let c=ye(()=>i(e[0]));r.sync?.[1](o,c),t.setItem(o,c,n),p=!1},2:u})}import{createEffect as ut,createMemo as we,createSignal as k,on as ft,onCleanup as mo,onMount as go,Show as P}from"solid-js";import{createEffect as Ce,createSignal as ke,on as Se}from"solid-js";var C={leftCollapsed:"patchwork:leftSidebarCollapsed",rightCollapsed:"patchwork:rightSidebarCollapsed",leftWidth:"patchwork:leftSidebarWidth",rightWidth:"patchwork:rightSidebarWidth",contextToolId:"patchwork:contextSidebarToolId"},Y="patchwork:collapse-context-sidebar",X=400;function $e(e,r){let t=localStorage.getItem(e);return t?parseInt(t,10):r}function Ee(e){return localStorage.getItem(e)==="true"}function $t(){let[e,r]=ke(Ee(C.leftCollapsed)),[t,o]=ke($e(C.leftWidth,X));return Ce(Se(e,n=>{localStorage.setItem(C.leftCollapsed,String(n))})),Ce(Se(t,n=>{localStorage.setItem(C.leftWidth,String(n))})),{isSidebarCollapsed:e,setIsSidebarCollapsed:r,leftSidebarWidth:t,setLeftSidebarWidth:o}}import{onCleanup as Et,onMount as Tt}from"solid-js";var Te=180,Dt=720,At=120,De=3;function de(e,{isCollapsed:r,setCollapsed:t,setWidth:o}){let n=!1,i=null,a=!1,u=null,h=d=>{if(d<At){r()||t(!0),u=null;return}r()&&t(!1);let m=Math.min(Dt,d);o(m),u=m},p=()=>{r()||u!==null&&u<Te&&o(Te)},s=null,c=()=>{document.body.setAttribute("data-sidebar-resizing",e),s=document.createElement("div"),s.style.cssText="position:fixed;inset:0;z-index:2147483647;cursor:col-resize;",document.body.appendChild(s)},f=()=>{n=!1,i=null,document.body.style.userSelect="",document.body.removeAttribute("data-sidebar-resizing"),s?.remove(),s=null},g=d=>{d.preventDefault(),i={x:d.clientX,y:d.clientY},a=!1,u=null,n=!0,document.body.style.userSelect="none"},v=()=>{let d=n,m=a;f(),d&&m&&p()},b=d=>{if(!n||!i)return;let m=Math.abs(d.clientX-i.x),w=Math.abs(d.clientY-i.y);!a&&(m>De||w>De)&&(a=!0,c()),h(e==="left"?d.clientX:window.innerWidth-d.clientX)},l=d=>{if(a){d.preventDefault(),d.stopPropagation(),a=!1;return}t(m=>!m)};return Tt(()=>{document.addEventListener("mousemove",b),document.addEventListener("mouseup",v),Et(()=>{document.removeEventListener("mousemove",b),document.removeEventListener("mouseup",v),n&&f()})}),{handleMouseDown:g,handleToggleClick:l}}import{createEffect as It,createSignal as Ft,onCleanup as Rt}from"solid-js";var $=(e,r)=>{let[t,o]=Ft(!1);return It(()=>{let n=r();if(!n)return;o(!1);let i=a=>{a.detail?.componentId===e&&o(!0)};n.addEventListener("patchwork:mounted",i),Rt(()=>n.removeEventListener("patchwork:mounted",i))}),t};import{createEffect as Ot,createSignal as Lt,onCleanup as Mt}from"solid-js";var zt=5e3,Pt=(e,r)=>{let[t,o]=Lt(!1);return Ot(()=>{if(t())return;let n=e(),i=r();if(!n||!i)return;let a=h=>{let p=h.detail;p?.url&&p.url!==i||o(!0)};n.addEventListener("patchwork:mounted",a),n.addEventListener("patchwork:no-tool",a);let u=setTimeout(()=>o(!0),zt);Mt(()=>{n.removeEventListener("patchwork:mounted",a),n.removeEventListener("patchwork:no-tool",a),clearTimeout(u)})}),t};import{getRegistry as Ut}from"@inkandswitch/patchwork-plugins";import{createMemo as Nt,createSignal as jt,onCleanup as Wt}from"solid-js";function A(e){let r=Ut("patchwork:component"),[t,o]=jt(0),n=r.on("changed",()=>o(i=>i+1));return Wt(n),Nt(()=>(t(),(r.all?.()??[]).filter(i=>(i.tags??[]).includes(e)).map(i=>({id:i.id,name:i.name||i.id,icon:i.icon})).sort((i,a)=>i.name.localeCompare(a.name))))}import{template as q}from"solid-js/web";import{delegateEvents as Br}from"solid-js/web";import{getOwner as Jr}from"solid-js/web";import{effect as it}from"solid-js/web";import{setAttribute as Vr}from"solid-js/web";import{memo as st}from"solid-js/web";import{insert as M}from"solid-js/web";import{createComponent as z}from"solid-js/web";import{For as Qr,Show as be}from"solid-js";import{template as We}from"solid-js/web";import{delegateEvents as pr}from"solid-js/web";import{insert as hr}from"solid-js/web";import"solid-js/web";import{setAttribute as Ne}from"solid-js/web";import{effect as je}from"solid-js/web";import{use as He}from"solid-js/web";import{createComponent as fe}from"solid-js/web";var Me=_t(Oe(),1),ce=(0,Me.default)("cabbages");function ue(e){return typeof e=="object"&&e!=null&&Object.getPrototypeOf(e)==Object.prototype}function Z(e){if(Array.isArray(e))return e.map(Z);if(ue(e)){let r={};for(let t of Object.keys(e))r[t]=Z(e[t]);return r}return e instanceof Date?new Date(e):ArrayBuffer.isView(e)?e.slice():e}var tr="\uFFFC";function ze(e,...r){if(r.length==0){ce("empty patch");return}let[t,o,n]=r,i=[...t];for(;;){let a=i.shift();if(!i.length){let h=Array.isArray(o);if(ue(e)&&h&&typeof a>"u"&&typeof o[0]=="string"){delete e[o[0]];return}if(h||typeof o=="number"){if(typeof a>"u")throw new Error("cant treat top level as a seq");a=a;let[p,s]=Array.isArray(o)?o:[o,o+1],c=Array.isArray(o)&&o.length==0;if(!c&&(p==null||s==null))throw new RangeError("it's all or nothing, no half measures");let f=typeof n>"u",g=p===s&&!f,v=c&&!f,b=!g&&!f&&!v;if(typeof e[a]>"u"){if(typeof e=="string")return;typeof n=="string"?e[a]="":e[a]=[]}let l=e[a];if(Array.isArray(l)){if(v){Array.isArray(n)?l.push(...n):l.push(n);return}if(g||b){Array.isArray(n)?l.splice(p,s-p,...n):l.splice(p,s-p,n);return}if(f){l.splice(p,s-p);return}throw new Error("i don't know what happened")}if(typeof l=="string"){if(v){e[a]=l+n;return}if(b||g){e[a]=l.slice(0,p)+(typeof n=="string"?n:n.map(d=>typeof d=="string"?d:tr).join(""))+l.slice(s);return}if(f){e[a]=l.slice(0,p)+l.slice(s);return}throw new Error("i don't know what happened")}if(ue(l)&&h&&typeof o[0]=="string"){delete l[o[0]];return}throw new Error("not implemented")}if(typeof a>"u"){if(typeof o!="string")throw new Error(`can't index top-level map with ${o}`);typeof n>"u"?delete e[o]:e[o]=n;return}if(typeof e[a]>"u"&&(e[a]={}),h){let[p,s]=o;p!=null&&s!=null&&(typeof n>"u"&&p!=null&&s!=null?delete e[a][p||s]:e[a][p||s]=n)}else if(typeof n>"u")delete e[a][o];else{if(typeof e[a]=="string")return;e[a][o]=n}return}if(typeof a>"u")throw new Error("cant treat top level as a seq");a=a;let u=i[0];if(typeof e[a]>"u")if(typeof u=="string")e[a]={};else if(typeof u=="number")e[a]=[];else throw new Error(`can't go down this road ${e}.${a}.${u}`);if(e=e[a],typeof e=="string"){ce("ignoring patch to a block marker in a string",t,o);return}if(e==null||typeof e!="object"&&typeof e!="function")throw new TypeError(`invalid path ${JSON.stringify(t)}: ${String(a)} is ${e}`)}}function Le(e,r){for(let t=0;t<r.length;t++)e=e?e[r[t]]:void 0;return e}function Pe(e,r){let t=e.path.slice(0,-1),o=e.path[e.path.length-1];switch(e.action){case"mark":case"unmark":return ce(`skipping ${e.action} because it doesn't affect material reality`),[];case"inc":if(r)return[t,o,Le(r.patchInfo.after,e.path)];throw new Error(`can't apply ${e.action} without payload argument`);case"conflict":if(r)return[t,o,Le(r.patchInfo.after,e.path)];throw new Error(`can't apply ${e.action} without payload argument`);case"del":return typeof o=="string"?[t,o]:[t,[o,o+(e.length||1)]];case"insert":return[t,[o,o],Z(e.values)];case"splice":return[t,[o,o],[e.value]];case"put":return[t,o,Z(e.value)]}}function Q(e){return r=>{for(let t of e.patches)ze(r,...Pe(t,e))}}import{createMemo as ar}from"solid-js";import{onCleanup as rr}from"solid-js";import{createStore as or,produce as nr,reconcile as Ue}from"solid-js/store";var U=new WeakMap;function ee(e){if(rr(()=>{let i=U.get(e);i&&(i.refs--||i.cleanup())}),U.has(e)){let i=U.get(e);return i.refs++,i.store}let[r,t]=or(structuredClone(e.doc()));U.set(e,{refs:0,store:r,cleanup(){e.off("change",o),e.off("delete",n),U.delete(e)}});function o(i){if(i.scopeReplaced){t(Ue(i.doc??{}));return}t(nr(Q(i)))}function n(){t(Ue({}))}return e.on("change",o),e.on("delete",n),r}import{getOwner as fn,onCleanup as pn,createSignal as hn,untrack as mn,sharedConfig as gn,onMount as bn,DEV as vn,equalFn as wn}from"solid-js";import{isServer as yn}from"solid-js/web";var O=e=>typeof e=="function"&&!e.length?e():e;function te(e){return ar(()=>O(e)&&ee(O(e)))}import{createEffect as sr,createResource as lr,useContext as dr}from"solid-js";import{createContext as ir}from"solid-js";var re=ir(null);function N(e,r){let t=dr(re);if(!r?.repo&&!t)throw new Error("use outside <RepoContext> requires options.repo");let o=r?.repo||t;function n(){if(r?.["~skipInitialValue"])return;let u=O(e);if(u)return ur(o,u)}let[i,{mutate:a}]=lr(e,u=>o.find(u),{initialValue:n()});return sr(()=>{O(e)||a()}),i}function cr(e){return typeof e.query=="function"}function ur(e,r){if(cr(e)){let o=e.query(r).state();return o.status=="ready"?o.handle:void 0}let t=e.findWithProgress(r).peek();return t.state=="ready"?t.handle:void 0}function oe(e,r){let t=N(e,r);return[te(t),t]}import{onCleanup as Pn}from"solid-js";import{createSignal as Nn}from"solid-js";import{createEffect as Hn,onCleanup as qn}from"solid-js";import{createSignal as Jn}from"solid-js";import{useContext as Qn}from"solid-js";import{getType as gr}from"@inkandswitch/patchwork-filesystem";import{getRegistry as br,isLoadedPlugin as vr}from"@inkandswitch/patchwork-plugins";import{createEffect as wr,createMemo as ne,createSignal as pe,onCleanup as xr,onMount as Be,Show as Je}from"solid-js";var qe=We("<span class=threepane__title-text>"),mr=We("<input class=threepane__title-input type=text>");function Ve(e){let r,[t,o]=pe();return Be(()=>{o(r.closest("repo-provider")?.repo)}),fe(Je,{get when(){return t()},get fallback(){return(()=>{var n=qe(),i=r;return typeof i=="function"?He(i,n):r=n,n})()},children:n=>fe(yr,{get docUrl(){return e.docUrl},get repo(){return n()}})})}function yr(e){let[r,t]=oe(()=>e.docUrl(),{repo:e.repo}),o=br("patchwork:datatype"),[n,i]=pe(0);Be(()=>{let l=o.on("changed",()=>i(d=>d+1));xr(l)});let a=ne(()=>{let l=r();return l?gr(l):void 0});wr(()=>{let l=a();l&&o.load(l)});let u=ne(()=>{n();let l=a();if(!l)return;let d=o.get(l);return d&&vr(d)?d:void 0}),h=ne(()=>{let l=r(),d=u();if(!(!l||!d))return d.module.getTitle(l)}),p=ne(()=>!!t()&&typeof u()?.module.setTitle=="function"),[s,c]=pe(!1),f;function g(){p()&&(c(!0),queueMicrotask(()=>{f?.focus(),f?.select()}))}function v(l){if(!s()||(c(!1),!l))return;let d=f?.value.trim();if(!d||d===h())return;let m=t(),w=u()?.module.setTitle;!m||!w||m.change(y=>{w(y,d);let D=y["@patchwork"];D&&(D.title=d)})}function b(l){let d=e.docUrl(),m=l.dataTransfer;if(!d||!m)return;let w=h()??"Untitled",y=a();m.effectAllowed="copyLink",m.setData("text/x-patchwork-dnd",JSON.stringify({source:"threepane",items:[{url:d,name:w,type:y}]})),m.setData("text/x-patchwork-urls",JSON.stringify([d])),m.setData("text/uri-list",`${location.origin}${location.pathname}#doc=${d}\r
|
|
2
|
+
`),m.setData("text/plain",d)}return fe(Je,{get when(){return s()},get fallback(){return(()=>{var l=qe();return l.$$click=g,l.addEventListener("dragstart",b),Ne(l,"draggable",!0),hr(l,()=>h()??"Untitled"),je(d=>{var m=!!p(),w=p()?"Rename":void 0;return m!==d.e&&l.classList.toggle("threepane__title-text--editable",d.e=m),w!==d.t&&Ne(l,"title",d.t=w),d},{e:void 0,t:void 0}),l})()},get children(){var l=mr();l.$$keydown=m=>{m.key==="Enter"?(m.preventDefault(),v(!0)):m.key==="Escape"&&(m.preventDefault(),v(!1))},l.addEventListener("blur",()=>v(!0));var d=f;return typeof d=="function"?He(d,l):f=l,je(()=>l.value=h()??""),l}})}pr(["keydown","click"]);import{template as H}from"solid-js/web";import{delegateEvents as Or}from"solid-js/web";import{getOwner as Lr}from"solid-js/web";import{insert as W}from"solid-js/web";import{createComponent as L}from"solid-js/web";import{Show as he}from"solid-js";import{template as Ge}from"solid-js/web";import{delegateEvents as _r}from"solid-js/web";import{setStyleProperty as Cr}from"solid-js/web";import{insert as kr}from"solid-js/web";import{setAttribute as ae}from"solid-js/web";import{effect as Ye}from"solid-js/web";import{memo as j}from"solid-js/web";import{createComponent as Xe}from"solid-js/web";import{Show as Ke}from"solid-js";var Sr=Ge('<button class="sidebar-toggle sidebar-toggle--resizable">'),$r=Ge("<div class=sidebar>");function Ze(e){let r=()=>`${e.isCollapsed()?0:e.width()}px`,t=()=>e.canExpand?.()??!0,o=()=>Xe(Ke,{get when(){return!e.isCollapsed()},get children(){return e.children}}),n=()=>Xe(Ke,{get when(){return!e.isCollapsed()||t()},get children(){var i=Sr();return i.$$mousedown=a=>e.onMouseDown(a),i.$$click=a=>e.onToggleClick(a),Ye(a=>{var u=e.isCollapsed()?"Expand sidebar":"Toggle or resize sidebar",h=e.isCollapsed()?"Click to expand, drag to resize":"Click to toggle, drag to resize";return u!==a.e&&ae(i,"aria-label",a.e=u),h!==a.t&&ae(i,"title",a.t=h),a},{e:void 0,t:void 0}),i}});return(()=>{var i=$r();return kr(i,(()=>{var a=j(()=>e.side==="left");return()=>a()?[j(o),j(n)]:[j(n),j(o)]})()),Ye(a=>{var u=e.side,h=e.isCollapsed()?"":void 0,p=r();return u!==a.e&&ae(i,"data-side",a.e=u),h!==a.t&&ae(i,"data-collapsed",a.t=h),p!==a.a&&Cr(i,"width",a.a=p),a},{e:void 0,t:void 0,a:void 0}),i})()}_r(["click","mousedown"]);import{template as et}from"solid-js/web";import{delegateEvents as Er}from"solid-js/web";import{setAttribute as Tr}from"solid-js/web";import{effect as Dr}from"solid-js/web";import{insert as Qe}from"solid-js/web";import{createComponent as Ar}from"solid-js/web";import{For as Rr}from"solid-js";var Ir=et("<div role=tablist class=context-sidebar__tablist>"),Fr=et("<button type=button role=tab class=context-sidebar__tab>");function tt(e){let r=()=>{let t=e.items().map(n=>n.id),o=e.selectedToolId();return o&&t.includes(o)?o:t[0]};return(()=>{var t=Ir();return Qe(t,Ar(Rr,{get each(){return e.items()},children:o=>(()=>{var n=Fr();return n.$$click=()=>e.setSelectedToolId(o.id),Qe(n,()=>o.name),Dr(()=>Tr(n,"data-active",r()===o.id?"":void 0)),n})()})),t})()}Er(["click"]);var Mr=H('<div class=context-sidebar__tabs><button type=button class=context-sidebar__close title="Hide context sidebar"aria-label="Hide context sidebar">'),zr=H("<div class=context-sidebar__content>"),Pr=H("<div class=context-sidebar>"),Ur=H("<patchwork-view>",!0,!1,!1),Nr=H('<svg xmlns=http://www.w3.org/2000/svg width=18 height=18 viewBox="0 0 24 24"fill=none stroke=var(--studio-chrome-line) stroke-width=1.75 stroke-linecap=round stroke-linejoin=round><rect width=18 height=18 x=3 y=3 rx=2></rect><path d="M15 3v18">');function rt(e){let r=A("context-tool"),t=()=>{let o=r().map(i=>i.id),n=e.selectedToolId();return n&&o.includes(n)?n:o[0]};return L(Ze,{side:"right",get isCollapsed(){return e.isCollapsed},get width(){return e.width},get onMouseDown(){return e.onMouseDown},get onToggleClick(){return e.onToggleClick},get canExpand(){return e.canExpand},get children(){var o=Pr();return W(o,L(he,{get when(){return r().length},get children(){var n=Mr(),i=n.firstChild;return W(n,L(tt,{items:r,get selectedToolId(){return e.selectedToolId},get setSelectedToolId(){return e.setSelectedToolId}}),i),i.$$click=()=>e.onCollapse(),W(i,L(me,{})),n}}),null),W(o,L(he,{get when(){return!e.isCollapsed()},get children(){var n=zr();return W(n,L(he,{get when(){return t()},keyed:!0,children:i=>(()=>{var a=Ur();return a.component=i,a._$owner=Lr(),a})()})),n}}),null),o}})}function me(){return Nr()}Or(["click"]);import{template as jr}from"solid-js/web";import{effect as ot}from"solid-js/web";import{getOwner as nt}from"solid-js/web";import{createComponent as Wr}from"solid-js/web";import{memo as Hr}from"solid-js/web";import{Show as qr}from"solid-js";var at=jr("<patchwork-view>",!0,!1,!1),ge=e=>Array.isArray(e)?String(e[0]):String(e);function di(e){let r=new Set;return e.filter(t=>{let o=ge(t);return r.has(o)?!1:(r.add(o),!0)})}function ci(e){return Wr(qr,{get when(){return Hr(()=>!!Array.isArray(e.slot))()?e.slot:!1},get fallback(){return(()=>{var r=at();return r._$owner=nt(),ot(()=>r.component=String(e.slot)),r})()},children:r=>(()=>{var t=at();return t._$owner=nt(),ot(o=>{var n=r()[1],i=r()[0];return n!==o.e&&(t.docUrl=o.e=n),i!==o.t&&(t.toolId=o.t=i),o},{e:void 0,t:void 0}),t})()})}var Yr=q("<div class=threepane__title>"),Xr=q("<div class=threepane__doctitle-tools>"),Kr=q('<button type=button class=frame__sidebar-toggle title="Show context sidebar"aria-label="Show context sidebar">'),Gr=q("<div class=frame__topbar><div class=threepane__spacer>"),Zr=q("<patchwork-view>",!0,!1,!1);function lt(e){let r=()=>e.toolSlots()??[];return(()=>{var t=Gr(),o=t.firstChild;return M(t,z(be,{get when(){return e.docUrl()},get children(){var n=Yr();return M(n,z(Ve,{get docUrl(){return e.docUrl}})),n}}),o),M(t,z(be,{get when(){return st(()=>!!e.docUrl())()&&r().length},get children(){var n=Xr();return M(n,z(Qr,{get each(){return r()},children:i=>(()=>{var a=Zr();return a._$owner=Jr(),it(u=>{var h=ge(i),p=e.docUrl();return h!==u.e&&(a.toolId=u.e=h),p!==u.t&&(a.docUrl=u.t=p),u},{e:void 0,t:void 0}),a})()})),n}}),null),M(t,z(be,{get when(){return st(()=>!!e.hasContext())()&&e.isRightCollapsed()},get children(){var n=Kr();return n.$$click=()=>e.onToggleRight(),Vr(n,"aria-pressed",!1),M(n,z(me,{})),n}}),null),it(()=>t.classList.toggle("frame__topbar--left-collapsed",!!e.isLeftCollapsed())),t})()}Br(["click"]);import{template as ve}from"solid-js/web";import{effect as eo}from"solid-js/web";import{getOwner as to}from"solid-js/web";import{insert as dt}from"solid-js/web";import{memo as ro}from"solid-js/web";import{createComponent as oo}from"solid-js/web";import{use as no}from"solid-js/web";import{Show as lo}from"solid-js";var ao=ve("<div class=document-view>"),io=ve("<patchwork-view>",!0,!1,!1),so=ve("<div class=placeholder>Select a document in the sidebar");function ct({viewKey:e,selectedDocUrl:r,toolId:t,ref:o}){return(()=>{var n=ao(),i=o;return typeof i=="function"?no(i,n):o=n,dt(n,oo(lo,{get when(){return e()},keyed:!0,children:a=>(()=>{var u=io();return u._$owner=to(),eo(h=>{var p=r(),s=t();return p!==h.e&&(u.docUrl=h.e=p),s!==h.t&&(u.toolId=h.t=s),h},{e:void 0,t:void 0}),u})()}),null),dt(n,(()=>{var a=ro(()=>!r());return()=>a()&&so()})(),null),n})()}var co=V("<patchwork-view component=patchwork-draft-state-provider>",!0,!1,!1),uo=V("<patchwork-view component=patchwork-draft-overlay-provider>",!0,!1,!1),fo=V("<div class=frame__main-column><div class=frame__doc-column><div class=main-area>"),po=V("<patchwork-view component=patchwork-comments-provider><patchwork-view component=patchwork-focus-provider>",!0,!1,!1),ho=V("<patchwork-view>",!0,!1,!1);function pt(e){let[r,t]=k(e.initialRightCollapsed()),[o,n]=k(e.initialRightWidth());ut(ft(r,f=>{try{localStorage.setItem(C.rightCollapsed,String(f))}catch{}},{defer:!0})),ut(ft(o,f=>{try{localStorage.setItem(C.rightWidth,String(f))}catch{}},{defer:!0}));let i=de("right",{isCollapsed:r,setCollapsed:t,setWidth:n});go(()=>{let f=()=>t(!0);window.addEventListener(Y,f),mo(()=>window.removeEventListener(Y,f))});let[a,u]=le(k(),{name:C.contextToolId}),[h,p]=k(),s=$("patchwork-draft-state-provider",h),c=()=>s()?h():void 0;return _(P,{get when(){return e.selectedDocUrl()},keyed:!0,children:f=>(()=>{var g=co();return J(p,g),g.docUrl=f,g._$owner=B(),T(g,_(P,{get when(){return c()},children:v=>_(bo,{get host(){return v()},get setMainDocElement(){return e.setMainDocElement},get selectedDocUrl(){return e.selectedDocUrl},get selectedToolId(){return e.selectedToolId},get doctitleSlots(){return e.doctitleSlots},get isLeftCollapsed(){return e.isLeftCollapsed},isRightSidebarCollapsed:r,setIsRightSidebarCollapsed:t,rightSidebarWidth:o,get handleMouseDown(){return i.handleMouseDown},get handleToggleClick(){return i.handleToggleClick},selectedContextToolId:a,setSelectedContextToolId:u})})),g})()})}function bo(e){let r=A("context-tool"),t=()=>r().length>0,o=we(()=>e.selectedDocUrl()),[n,i]=k(),a=$("patchwork-draft-overlay-provider",n),[u,h]=k(),p=$("patchwork-comments-provider",u),[s,c]=k(),f=$("patchwork-focus-provider",s),g=we(()=>a()&&p()&&f()),v=A("document-provider"),b=we(()=>v().map(l=>l.id),[],{equals:(l,d)=>l.length===d.length&&l.every((m,w)=>m===d[w])});return(()=>{var l=uo();return J(i,l),l._$owner=B(),T(l,_(ht,{get ids(){return b()},render:()=>(()=>{var d=po(),m=d.firstChild;return J(h,d),d._$owner=B(),J(c,m),m._$owner=B(),T(m,_(P,{get when(){return g()},get children(){var w=fo(),y=w.firstChild,D=y.firstChild;return T(y,_(lt,{get docUrl(){return e.selectedDocUrl},get toolSlots(){return e.doctitleSlots},get isLeftCollapsed(){return e.isLeftCollapsed},hasContext:t,get isRightCollapsed(){return e.isRightSidebarCollapsed},onToggleRight:()=>e.setIsRightSidebarCollapsed(S=>!S)}),D),T(D,_(ct,{viewKey:o,get selectedDocUrl(){return e.selectedDocUrl},get toolId(){return e.selectedToolId},ref:S=>e.setMainDocElement?.(S)})),T(w,_(P,{get when(){return t()},get children(){return _(rt,{get selectedToolId(){return e.selectedContextToolId},get setSelectedToolId(){return e.setSelectedContextToolId},get isCollapsed(){return e.isRightSidebarCollapsed},get width(){return e.rightSidebarWidth},get onMouseDown(){return e.handleMouseDown},get onToggleClick(){return e.handleToggleClick},onCollapse:()=>e.setIsRightSidebarCollapsed(!0)})}}),null),w}})),d})()})),l})()}function ht(e){return _(P,{get when(){return e.ids[0]},keyed:!0,get fallback(){return e.render()},children:r=>{let[t,o]=k(),n=$(r,t);return(()=>{var i=ho();return J(o,i),i.component=r,i._$owner=B(),T(i,_(P,{get when(){return n()},get children(){return _(ht,{get ids(){return e.ids.slice(1)},get render(){return e.render}})}})),i})()}})}var ie=`:root,
|
|
3
|
+
:host,
|
|
4
|
+
[theme] {
|
|
5
|
+
--threepane-bg: var(--studio-fill, white);
|
|
6
|
+
--threepane-sidebar-fill: var(--studio-chrome, var(--studio-fill, white));
|
|
7
|
+
--threepane-fg: var(--studio-line, black);
|
|
8
|
+
/* ink for text sitting ON the sidebar/account-bar chrome surface. mirrors the
|
|
9
|
+
toolbar/context-sidebar fg: it rides --studio-chrome-line (the chrome's own
|
|
10
|
+
ink) so it tracks the chrome palette, not the content page. --threepane-fg
|
|
11
|
+
is content ink and only belongs on --threepane-bg surfaces. */
|
|
12
|
+
--threepane-sidebar-fg: var(--studio-chrome-line, var(--studio-line, black));
|
|
13
|
+
--threepane-muted: var(--studio-line-offset-50, #999);
|
|
14
|
+
--threepane-family: var(--studio-family-sans, system-ui, sans-serif);
|
|
15
|
+
--threepane-family-code: var(--studio-family-code, ui-monospace, monospace);
|
|
16
|
+
|
|
17
|
+
/* spacing scale, aliased from the base theme */
|
|
18
|
+
--threepane-space-3xs: var(--studio-space-3xs, 0.125rem);
|
|
19
|
+
--threepane-space-2xs: var(--studio-space-2xs, 0.25rem);
|
|
20
|
+
--threepane-space-xs: var(--studio-space-xs, 0.375rem);
|
|
21
|
+
--threepane-space-sm: var(--studio-space-sm, 0.5rem);
|
|
22
|
+
--threepane-space: var(--studio-space, 0.75rem);
|
|
23
|
+
--threepane-space-md: var(--studio-space-md, 1rem);
|
|
24
|
+
--threepane-space-2xl: var(--studio-space-2xl, 3rem);
|
|
25
|
+
|
|
26
|
+
/* radius scale, aliased from the base theme */
|
|
27
|
+
--threepane-radius-xs: var(--studio-radius-xs, 2px);
|
|
28
|
+
--threepane-radius-sm: var(--studio-radius-sm, 4px);
|
|
29
|
+
--threepane-radius-md: var(--studio-radius-md, 8px);
|
|
30
|
+
--threepane-radius-round: var(--studio-radius-round, 9999px);
|
|
31
|
+
|
|
32
|
+
/* Height of the frame's top strip: the top bar over the main column, and the
|
|
33
|
+
matching empty space reserved above the left sidebar's widgets so the two
|
|
34
|
+
line up and the left toggle has a home. */
|
|
35
|
+
--threepane-header-height: calc(
|
|
36
|
+
env(safe-area-inset-top, 0px) + var(--threepane-space-2xl)
|
|
37
|
+
);
|
|
38
|
+
|
|
39
|
+
/* the left footer and right tray boxes share one height so they line up. */
|
|
40
|
+
--threepane-tray-height: var(--threepane-space-2xl);
|
|
41
|
+
/* sidebar toggles ride a touch paler than the line (first ink offset). they
|
|
42
|
+
sit on chrome (left toggle over the sidebar, right over the toolbar), so
|
|
43
|
+
they use the chrome ink ramp, not the content one. */
|
|
44
|
+
--threepane-toggle-fg: var(--studio-chrome-line-offset-10, var(--studio-line-offset-10, #333));
|
|
45
|
+
|
|
46
|
+
--threepane-toolbar: var(--studio-chrome, white);
|
|
47
|
+
/* toolbar text rides on the chrome surface, so it uses the chrome ink */
|
|
48
|
+
--threepane-toolbar-fg: var(--studio-chrome-line, var(--studio-line, black));
|
|
49
|
+
--threepane-toolbar-border: var(--studio-chrome-offset-10, #ddd);
|
|
50
|
+
/* Resize handle: a faint 1px divider that tracks the chrome ramp's contrast
|
|
51
|
+
(it mixes toward the chrome ink, so it reads darker on light themes and
|
|
52
|
+
lighter on dark ones), plus a primary-tinted glow + grab pill on hover. */
|
|
53
|
+
--threepane-sidebar-divider: var(--studio-chrome-offset-20, #d4d4d4);
|
|
54
|
+
--threepane-resize-glow: color-mix(in oklch, var(--studio-primary-fill, var(--studio-primary, #35f7ca)), transparent 35%);
|
|
55
|
+
--threepane-resize-pill: var(--studio-primary-fill, var(--studio-primary, #35f7ca));
|
|
56
|
+
|
|
57
|
+
/* The context (right) sidebar sits on a chrome surface stepped one offset off
|
|
58
|
+
the toolbar's flat chrome, so the two chrome regions read as distinct. */
|
|
59
|
+
--threepane-context-sidebar-fill: var(--studio-chrome-offset-10, #ececec);
|
|
60
|
+
|
|
61
|
+
/* Context sidebar (tabbed) */
|
|
62
|
+
--context-sidebar-bg: var(--threepane-context-sidebar-fill);
|
|
63
|
+
/* the tab-bar header rides on the same flat chrome as the toolbar above it,
|
|
64
|
+
so the two chrome strips read as one continuous band */
|
|
65
|
+
--context-sidebar-header-bg: var(--studio-chrome, #f2f2f2);
|
|
66
|
+
--context-sidebar-fg: var(--studio-chrome-line, var(--studio-line, black));
|
|
67
|
+
/* match the lines drawn around the document-view so tab/tray edges read as
|
|
68
|
+
one continuous frame */
|
|
69
|
+
--context-sidebar-border: var(--threepane-toolbar-border);
|
|
70
|
+
--context-sidebar-tab-fg: var(--studio-chrome-line-offset-40, var(--studio-line-offset-40, #666));
|
|
71
|
+
--context-sidebar-tab-hover: var(--studio-chrome-offset-10, #e5e5e5);
|
|
72
|
+
--context-sidebar-tab-active-bg: var(--studio-fill, white);
|
|
73
|
+
--context-sidebar-tab-active-fg: var(--studio-line, black);
|
|
74
|
+
--context-sidebar-tab-active-accent: var(--studio-primary-line, var(--studio-primary, #35f7ca));
|
|
75
|
+
/* the content panel shares the active tab's surface so the selected tab
|
|
76
|
+
connects seamlessly into the tool view below it */
|
|
77
|
+
--context-sidebar-content-bg: var(--context-sidebar-tab-active-bg);
|
|
78
|
+
--context-sidebar-family: var(--studio-family-sans, system-ui, sans-serif);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.frame-shell {
|
|
82
|
+
display: flex;
|
|
83
|
+
flex-direction: column;
|
|
84
|
+
width: 100%;
|
|
85
|
+
height: 100%;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.frame-warning-banner {
|
|
89
|
+
flex: none;
|
|
90
|
+
padding: var(--threepane-space-2xs) var(--threepane-space-sm);
|
|
91
|
+
text-align: center;
|
|
92
|
+
text-transform: uppercase;
|
|
93
|
+
font-family: var(--studio-family-ui, var(--threepane-family));
|
|
94
|
+
font-size: 0.75rem;
|
|
95
|
+
background: var(--studio-warning-fill, yellow);
|
|
96
|
+
color: var(--studio-warning-line);
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.frame {
|
|
100
|
+
position: relative;
|
|
101
|
+
display: flex;
|
|
102
|
+
width: 100%;
|
|
103
|
+
flex: 1;
|
|
104
|
+
min-height: 0;
|
|
105
|
+
font-family: var(--threepane-family);
|
|
106
|
+
color: var(--threepane-fg);
|
|
107
|
+
background: var(--threepane-bg);
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.frame__version {
|
|
111
|
+
position: absolute;
|
|
112
|
+
top: var(--threepane-space-2xs);
|
|
113
|
+
right: var(--threepane-space-sm);
|
|
114
|
+
z-index: var(--studio-layer-raised, 10);
|
|
115
|
+
color: var(--threepane-muted);
|
|
116
|
+
font-size: 0.75rem;
|
|
117
|
+
font-weight: 500;
|
|
118
|
+
pointer-events: none;
|
|
119
|
+
user-select: none;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
.sidebar {
|
|
123
|
+
position: relative;
|
|
124
|
+
display: flex;
|
|
125
|
+
flex: none;
|
|
126
|
+
/* visible so the resize handle can straddle the boundary (sit on *both*
|
|
127
|
+
sides of the divider line); the content clips itself instead. z-index lifts
|
|
128
|
+
the handle's outer half above the main area so it stays grabbable. */
|
|
129
|
+
overflow: visible;
|
|
130
|
+
z-index: 1;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
.sidebar[data-collapsed] {
|
|
134
|
+
overflow: visible;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
.sidebar[data-side="left"] {
|
|
138
|
+
background: var(--threepane-sidebar-fill);
|
|
139
|
+
color: var(--threepane-sidebar-fg);
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
.sidebar[data-side="right"] {
|
|
143
|
+
background: var(--threepane-context-sidebar-fill);
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
.main-area {
|
|
147
|
+
flex: 1;
|
|
148
|
+
min-width: 0;
|
|
149
|
+
display: flex;
|
|
150
|
+
flex-direction: column;
|
|
151
|
+
height: 100%;
|
|
152
|
+
overflow: hidden;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
/* The main column (right of the left sidebar): a row of
|
|
156
|
+
[document column | right sidebar], so the right sidebar spans the full frame
|
|
157
|
+
height and its resize divider runs top-to-bottom exactly like the left one. */
|
|
158
|
+
.frame__main-column {
|
|
159
|
+
position: relative;
|
|
160
|
+
flex: 1;
|
|
161
|
+
min-width: 0;
|
|
162
|
+
display: flex;
|
|
163
|
+
flex-direction: row;
|
|
164
|
+
height: 100%;
|
|
165
|
+
overflow: hidden;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
/* The document column: the top bar over the main document view. Sits left of the
|
|
169
|
+
full-height context sidebar. */
|
|
170
|
+
.frame__doc-column {
|
|
171
|
+
flex: 1;
|
|
172
|
+
min-width: 0;
|
|
173
|
+
width: 100%;
|
|
174
|
+
display: flex;
|
|
175
|
+
flex-direction: column;
|
|
176
|
+
height: 100%;
|
|
177
|
+
overflow: hidden;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
.frame__doc-column > patchwork-view,
|
|
181
|
+
.frame__doc-column > patchwork-view > patchwork-view,
|
|
182
|
+
.frame__doc-column > patchwork-view > patchwork-view > patchwork-view,
|
|
183
|
+
.frame__doc-column
|
|
184
|
+
> patchwork-view
|
|
185
|
+
> patchwork-view
|
|
186
|
+
> patchwork-view
|
|
187
|
+
> patchwork-view {
|
|
188
|
+
display: contents;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
/* The full-width top toolbar. Its height + top safe-area inset match the
|
|
192
|
+
sideboard's reserved top margin so the bar reads as continuous across the top
|
|
193
|
+
(the left sidebar's empty top region lines up with it). */
|
|
194
|
+
.frame__topbar {
|
|
195
|
+
display: flex;
|
|
196
|
+
align-items: stretch;
|
|
197
|
+
box-sizing: border-box;
|
|
198
|
+
min-height: var(--threepane-space-2xl);
|
|
199
|
+
padding-top: env(safe-area-inset-top, 0px);
|
|
200
|
+
padding-inline: var(--threepane-space-2xs);
|
|
201
|
+
gap: var(--threepane-space-2xs);
|
|
202
|
+
background: var(--threepane-toolbar);
|
|
203
|
+
color: var(--threepane-toolbar-fg);
|
|
204
|
+
/* A hairline along the bottom, in the same colour as the document-view's
|
|
205
|
+
border, so the line under the bar runs unbroken across the whole width
|
|
206
|
+
(document column + context tabs). The active tab pulls down 1px to break
|
|
207
|
+
through it and connect to its panel below. */
|
|
208
|
+
border-bottom: var(--studio-border-width, 1px) var(--studio-border-style, solid) var(--threepane-toolbar-border);
|
|
209
|
+
/* Animate the collapsed left-slot in step with the sidebar's width transition
|
|
210
|
+
so the title glides up against the pinned toggle instead of jumping. */
|
|
211
|
+
transition: padding-left var(--studio-transition-slow, 0.25s ease);
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
/* When the left sidebar is collapsed the bar's left edge reaches the frame edge,
|
|
215
|
+
where the pinned left toggle lives; reserve a matching slot so the title slides
|
|
216
|
+
up against the toggle rather than under it. */
|
|
217
|
+
.frame__topbar--left-collapsed {
|
|
218
|
+
padding-left: var(--threepane-space-2xl);
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
/* The left sidebar toggle, pinned to the frame's top-left corner so it keeps the
|
|
222
|
+
same spot whether the sidebar is open or closed. Square, filling the top strip;
|
|
223
|
+
sits over the sidebar's reserved (empty) top area when open. */
|
|
224
|
+
.frame__left-toggle {
|
|
225
|
+
position: absolute;
|
|
226
|
+
top: 0;
|
|
227
|
+
left: 0;
|
|
228
|
+
z-index: 5;
|
|
229
|
+
width: var(--threepane-space-2xl);
|
|
230
|
+
height: var(--threepane-header-height);
|
|
231
|
+
padding-top: env(safe-area-inset-top, 0px);
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
/* A sidebar toggle at either end of the top bar (always present). */
|
|
235
|
+
.frame__sidebar-toggle {
|
|
236
|
+
display: flex;
|
|
237
|
+
align-items: center;
|
|
238
|
+
justify-content: center;
|
|
239
|
+
flex-shrink: 0;
|
|
240
|
+
padding-inline: var(--threepane-space-sm);
|
|
241
|
+
border: none;
|
|
242
|
+
background: transparent;
|
|
243
|
+
color: var(--threepane-toggle-fg);
|
|
244
|
+
cursor: var(--studio-cursor-pointer, pointer);
|
|
245
|
+
transition: color var(--studio-transition-fast, 0.1s ease);
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
.frame__sidebar-toggle:hover {
|
|
249
|
+
color: var(--threepane-sidebar-fg);
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
/* The document title, rendered intrinsically: shrinks to the title's width but
|
|
253
|
+
never past half the bar; ellipsis beyond. */
|
|
254
|
+
.threepane__title {
|
|
255
|
+
display: flex;
|
|
256
|
+
align-items: center;
|
|
257
|
+
flex: 0 1 auto;
|
|
258
|
+
min-width: 0;
|
|
259
|
+
max-width: 50%;
|
|
260
|
+
overflow: hidden;
|
|
261
|
+
padding-inline: var(--threepane-space-sm);
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
.threepane__title-text {
|
|
265
|
+
font-weight: 600;
|
|
266
|
+
white-space: nowrap;
|
|
267
|
+
min-width: 0;
|
|
268
|
+
overflow: hidden;
|
|
269
|
+
text-overflow: ellipsis;
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
.threepane__title-text[draggable="true"] {
|
|
273
|
+
-webkit-user-drag: element;
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
.threepane__title-text--editable {
|
|
277
|
+
cursor: var(--studio-cursor-text, text);
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
.threepane__title-text--editable:hover {
|
|
281
|
+
opacity: 0.7;
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
.threepane__title-input {
|
|
285
|
+
font: inherit;
|
|
286
|
+
font-weight: 600;
|
|
287
|
+
color: inherit;
|
|
288
|
+
min-width: 0;
|
|
289
|
+
width: 100%;
|
|
290
|
+
padding: 0;
|
|
291
|
+
margin: 0;
|
|
292
|
+
border: none;
|
|
293
|
+
outline: none;
|
|
294
|
+
background: transparent;
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
/* built-in spacer between the title and the right-hand tools */
|
|
298
|
+
.threepane__spacer {
|
|
299
|
+
flex: 1;
|
|
300
|
+
min-width: var(--threepane-space-sm);
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
/* configured doctitle tools at the right end; scroll horizontally when they
|
|
304
|
+
overflow rather than squashing. */
|
|
305
|
+
.threepane__doctitle-tools {
|
|
306
|
+
display: flex;
|
|
307
|
+
align-items: center;
|
|
308
|
+
gap: var(--threepane-space-sm);
|
|
309
|
+
min-width: 0;
|
|
310
|
+
padding-inline: var(--threepane-space-sm);
|
|
311
|
+
overflow-x: auto;
|
|
312
|
+
overflow-y: hidden;
|
|
313
|
+
scrollbar-width: none;
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
.threepane__doctitle-tools::-webkit-scrollbar {
|
|
317
|
+
display: none;
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
.threepane__doctitle-tools patchwork-view {
|
|
321
|
+
display: flex;
|
|
322
|
+
align-items: center;
|
|
323
|
+
height: 2rem;
|
|
324
|
+
flex-shrink: 0;
|
|
325
|
+
width: auto;
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
.document-view {
|
|
329
|
+
flex: 1;
|
|
330
|
+
min-height: 0;
|
|
331
|
+
overflow: hidden;
|
|
332
|
+
/* Left divider only, square corners. The top line is the top bar's
|
|
333
|
+
border-bottom and the bottom is open to the frame edge. The right divider
|
|
334
|
+
(to the context sidebar) is the sidebar's own full-height border-left, so
|
|
335
|
+
it runs the whole frame height rather than just the document view. When the
|
|
336
|
+
left sidebar is collapsed the left divider is dropped (see the :has rule
|
|
337
|
+
below) so nothing rides the frame edge. */
|
|
338
|
+
border-left: var(--studio-border-width, 1px) var(--studio-border-style, solid) var(--threepane-toolbar-border);
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
/* Left sidebar collapsed to 0: drop the document-view's left divider so there's
|
|
342
|
+
no stray line hugging the frame's left edge. */
|
|
343
|
+
.frame:has(.sidebar[data-side="left"][data-collapsed]) .document-view {
|
|
344
|
+
border-left: none;
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
.document-view patchwork-view {
|
|
348
|
+
display: block;
|
|
349
|
+
width: 100%;
|
|
350
|
+
height: 100%;
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
.placeholder {
|
|
354
|
+
display: flex;
|
|
355
|
+
align-items: center;
|
|
356
|
+
justify-content: center;
|
|
357
|
+
height: 100%;
|
|
358
|
+
color: var(--threepane-fg);
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
.sidebar patchwork-view {
|
|
362
|
+
display: block;
|
|
363
|
+
width: 100%;
|
|
364
|
+
height: 100%;
|
|
365
|
+
/* the sidebar itself doesn't clip, so the content does */
|
|
366
|
+
overflow: hidden;
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
/* Context sidebar (tabbed): lifted tabs with a top accent bar and surface fill
|
|
370
|
+
on the active tab, a hover surface, and a bottom-border separator between the
|
|
371
|
+
tab bar and the mounted tool view. */
|
|
372
|
+
.context-sidebar {
|
|
373
|
+
flex: 1;
|
|
374
|
+
min-width: 0;
|
|
375
|
+
width: 100%;
|
|
376
|
+
height: 100%;
|
|
377
|
+
display: flex;
|
|
378
|
+
flex-direction: column;
|
|
379
|
+
overflow: hidden;
|
|
380
|
+
font-family: var(--context-sidebar-family);
|
|
381
|
+
color: var(--context-sidebar-fg);
|
|
382
|
+
background: var(--context-sidebar-bg);
|
|
383
|
+
/* The full-height divider between the document column and the sidebar. Lives
|
|
384
|
+
here (not on the document view) so it runs the whole frame height \u2014 top bar
|
|
385
|
+
level included \u2014 and the resize handle straddling this edge is grabbable end
|
|
386
|
+
to end, matching the left sidebar. */
|
|
387
|
+
border-left: var(--studio-border-width, 1px) var(--studio-border-style, solid) var(--context-sidebar-border);
|
|
388
|
+
}
|
|
389
|
+
|
|
390
|
+
/* Tab bar: the row holding the tab list and the collapse button. Its height +
|
|
391
|
+
top safe-area inset match the document column's top bar so the two header
|
|
392
|
+
strips line up and their bottom hairlines read as one continuous line across
|
|
393
|
+
the divider. */
|
|
394
|
+
.context-sidebar__tabs {
|
|
395
|
+
display: flex;
|
|
396
|
+
align-items: flex-end;
|
|
397
|
+
box-sizing: border-box;
|
|
398
|
+
min-height: var(--threepane-space-2xl);
|
|
399
|
+
padding-top: env(safe-area-inset-top, 0px);
|
|
400
|
+
background: var(--context-sidebar-header-bg);
|
|
401
|
+
border-bottom: var(--studio-border-width, 1px) var(--studio-border-style, solid) var(--context-sidebar-border);
|
|
402
|
+
}
|
|
403
|
+
|
|
404
|
+
.context-sidebar__tablist {
|
|
405
|
+
display: flex;
|
|
406
|
+
flex: 1;
|
|
407
|
+
min-width: 0;
|
|
408
|
+
align-items: flex-end;
|
|
409
|
+
gap: var(--threepane-space-2xs);
|
|
410
|
+
padding-inline: var(--threepane-space-2xs);
|
|
411
|
+
/* when there are more tabs than fit, scroll them horizontally rather than
|
|
412
|
+
letting them shrink/wrap; scrollbar hidden for a clean header. */
|
|
413
|
+
overflow-x: auto;
|
|
414
|
+
overflow-y: hidden;
|
|
415
|
+
scrollbar-width: none;
|
|
416
|
+
/* extend the clip box 1px past the tab-bar border (compensated by the
|
|
417
|
+
negative margin so layout is unchanged) so the active tab's -1px overflow
|
|
418
|
+
isn't clipped by the horizontal scroll container, and it can still cover
|
|
419
|
+
the border-bottom to connect into the panel. */
|
|
420
|
+
padding-bottom: 1px;
|
|
421
|
+
margin-bottom: -1px;
|
|
422
|
+
}
|
|
423
|
+
.context-sidebar__tablist::-webkit-scrollbar {
|
|
424
|
+
display: none;
|
|
425
|
+
}
|
|
426
|
+
|
|
427
|
+
/* A single tab. */
|
|
428
|
+
.context-sidebar__tab {
|
|
429
|
+
display: flex;
|
|
430
|
+
align-items: center;
|
|
431
|
+
flex-shrink: 0;
|
|
432
|
+
padding: var(--threepane-space-xs) var(--threepane-space-sm);
|
|
433
|
+
border: var(--studio-border-width, 1px) var(--studio-border-style, solid) transparent;
|
|
434
|
+
border-bottom: none;
|
|
435
|
+
border-top-left-radius: var(--threepane-radius-xs);
|
|
436
|
+
border-top-right-radius: var(--threepane-radius-xs);
|
|
437
|
+
background: transparent;
|
|
438
|
+
font-family: inherit;
|
|
439
|
+
font-size: 0.875rem;
|
|
440
|
+
white-space: nowrap;
|
|
441
|
+
color: var(--context-sidebar-tab-fg);
|
|
442
|
+
cursor: var(--studio-cursor-pointer, pointer);
|
|
443
|
+
user-select: none;
|
|
444
|
+
transition: background var(--studio-transition-fast, 0.1s ease),
|
|
445
|
+
color var(--studio-transition-fast, 0.1s ease);
|
|
446
|
+
}
|
|
447
|
+
|
|
448
|
+
.context-sidebar__tab:hover {
|
|
449
|
+
background: var(--studio-chrome-hover-fill, var(--context-sidebar-tab-hover));
|
|
450
|
+
color: var(--context-sidebar-tab-active-fg);
|
|
451
|
+
}
|
|
452
|
+
|
|
453
|
+
/* Exception: the selected tab. Pulled down 1px so its fill covers the tab-bar's
|
|
454
|
+
bottom border, connecting the tab seamlessly into the panel below. */
|
|
455
|
+
.context-sidebar__tab[data-active] {
|
|
456
|
+
position: relative;
|
|
457
|
+
margin-bottom: -1px;
|
|
458
|
+
background: var(--context-sidebar-tab-active-bg);
|
|
459
|
+
color: var(--context-sidebar-tab-active-fg);
|
|
460
|
+
border-color: var(--context-sidebar-border);
|
|
461
|
+
box-shadow: inset 0 1px 0 0 var(--context-sidebar-tab-active-accent);
|
|
462
|
+
}
|
|
463
|
+
|
|
464
|
+
/* The close (collapse) button. Centred vertically in the tab header (the header
|
|
465
|
+
is otherwise flex-end for the tabs) so it lands at the same height as the
|
|
466
|
+
reopen toggle in the top bar when the sidebar is collapsed. */
|
|
467
|
+
.context-sidebar__close {
|
|
468
|
+
display: flex;
|
|
469
|
+
align-items: center;
|
|
470
|
+
justify-content: center;
|
|
471
|
+
align-self: center;
|
|
472
|
+
flex-shrink: 0;
|
|
473
|
+
padding-inline: var(--threepane-space-sm);
|
|
474
|
+
margin-right: var(--threepane-space-2xs);
|
|
475
|
+
border: none;
|
|
476
|
+
background: transparent;
|
|
477
|
+
color: var(--context-sidebar-fg);
|
|
478
|
+
cursor: var(--studio-cursor-pointer, pointer);
|
|
479
|
+
opacity: 0.5;
|
|
480
|
+
transition: opacity var(--studio-transition-fast, 0.1s ease);
|
|
481
|
+
}
|
|
482
|
+
|
|
483
|
+
.context-sidebar__close:hover {
|
|
484
|
+
opacity: 1;
|
|
485
|
+
}
|
|
486
|
+
|
|
487
|
+
/* The mounted tool view. */
|
|
488
|
+
.context-sidebar__content {
|
|
489
|
+
flex: 1;
|
|
490
|
+
min-height: 0;
|
|
491
|
+
overflow: auto;
|
|
492
|
+
background: var(--context-sidebar-content-bg);
|
|
493
|
+
contain: content;
|
|
494
|
+
}
|
|
495
|
+
|
|
496
|
+
.context-sidebar__content patchwork-view {
|
|
497
|
+
display: block;
|
|
498
|
+
width: 100%;
|
|
499
|
+
height: 100%;
|
|
500
|
+
}
|
|
501
|
+
|
|
502
|
+
/* Left sidebar body: a stack of widgets with the account footer pinned below. */
|
|
503
|
+
.threepane-sidebar {
|
|
504
|
+
display: flex;
|
|
505
|
+
flex-direction: column;
|
|
506
|
+
width: 100%;
|
|
507
|
+
height: 100%;
|
|
508
|
+
min-height: 0;
|
|
509
|
+
}
|
|
510
|
+
|
|
511
|
+
/* Reserve the docked tray's height at the sidebar's bottom so the account bar
|
|
512
|
+
sits above the tray (which is pinned outside this collapsing column). */
|
|
513
|
+
.threepane-sidebar--has-tray {
|
|
514
|
+
padding-bottom: calc(
|
|
515
|
+
var(--threepane-tray-height) + env(safe-area-inset-bottom, 0px)
|
|
516
|
+
);
|
|
517
|
+
}
|
|
518
|
+
|
|
519
|
+
/* account / packages / settings footer, pinned to the sidebar bottom */
|
|
520
|
+
.threepane-sidebar--has-tray .threepane-sidebar__footer {
|
|
521
|
+
flex: none;
|
|
522
|
+
margin-bottom: calc(var(--threepane-tray-height) + env(safe-area-inset-bottom, 0px));
|
|
523
|
+
}
|
|
524
|
+
|
|
525
|
+
/* The inlined account bar: avatar (account picker) + Packages + Settings. */
|
|
526
|
+
.threepane-account-bar {
|
|
527
|
+
container-type: inline-size;
|
|
528
|
+
display: flex;
|
|
529
|
+
align-items: center;
|
|
530
|
+
gap: var(--threepane-space-md);
|
|
531
|
+
min-height: var(--threepane-space-2xl);
|
|
532
|
+
box-sizing: border-box;
|
|
533
|
+
background: var(--threepane-sidebar-fill);
|
|
534
|
+
color: var(--threepane-sidebar-fg);
|
|
535
|
+
border-top: var(--studio-border-width, 1px) var(--studio-border-style, solid) var(--threepane-sidebar-divider);
|
|
536
|
+
padding-block: var(--threepane-space-2xs);
|
|
537
|
+
padding-bottom: calc(var(--threepane-space-2xs) + env(safe-area-inset-bottom));
|
|
538
|
+
padding-left: calc(env(safe-area-inset-left) + var(--threepane-space-md));
|
|
539
|
+
padding-right: calc(env(safe-area-inset-right) + var(--threepane-space-md));
|
|
540
|
+
justify-content: space-between;
|
|
541
|
+
overflow: hidden;
|
|
542
|
+
}
|
|
543
|
+
|
|
544
|
+
.threepane-account-bar__button {
|
|
545
|
+
display: flex;
|
|
546
|
+
align-items: center;
|
|
547
|
+
border: var(--studio-border-width, 1px) var(--studio-border-style, solid) transparent;
|
|
548
|
+
padding-inline: var(--threepane-space-2xs);
|
|
549
|
+
padding-block: var(--threepane-space-3xs);
|
|
550
|
+
border-radius: var(--threepane-radius-xs);
|
|
551
|
+
background: transparent;
|
|
552
|
+
color: inherit;
|
|
553
|
+
font: inherit;
|
|
554
|
+
white-space: nowrap;
|
|
555
|
+
cursor: var(--studio-cursor-pointer, pointer);
|
|
556
|
+
}
|
|
557
|
+
|
|
558
|
+
.threepane-account-bar__button:hover {
|
|
559
|
+
border-color: var(--threepane-sidebar-divider);
|
|
560
|
+
}
|
|
561
|
+
|
|
562
|
+
.threepane-account-bar__avatar {
|
|
563
|
+
padding: 0;
|
|
564
|
+
}
|
|
565
|
+
|
|
566
|
+
.threepane-account-bar__avatar patchwork-view {
|
|
567
|
+
display: block;
|
|
568
|
+
width: 100%;
|
|
569
|
+
height: 100%;
|
|
570
|
+
}
|
|
571
|
+
|
|
572
|
+
/* Left sidebar: a stack of configured widgets. The widgets start below the
|
|
573
|
+
frame's top strip (the empty space matching the top bar), so the frame owns
|
|
574
|
+
that spacing rather than each widget reserving its own top margin. */
|
|
575
|
+
.threepane-widgets {
|
|
576
|
+
flex: 1;
|
|
577
|
+
display: flex;
|
|
578
|
+
flex-direction: column;
|
|
579
|
+
width: 100%;
|
|
580
|
+
min-height: 0;
|
|
581
|
+
padding-top: var(--threepane-header-height);
|
|
582
|
+
gap: 1rem;
|
|
583
|
+
}
|
|
584
|
+
|
|
585
|
+
.threepane-widget {
|
|
586
|
+
position: relative;
|
|
587
|
+
flex: 1;
|
|
588
|
+
min-height: 0;
|
|
589
|
+
overflow: hidden;
|
|
590
|
+
}
|
|
591
|
+
|
|
592
|
+
.threepane-widget patchwork-view {
|
|
593
|
+
display: block;
|
|
594
|
+
width: 100%;
|
|
595
|
+
height: 100%;
|
|
596
|
+
}
|
|
597
|
+
|
|
598
|
+
/* empty state: offer to add the document list */
|
|
599
|
+
.threepane-widgets__empty {
|
|
600
|
+
flex: 1;
|
|
601
|
+
display: flex;
|
|
602
|
+
align-items: flex-start;
|
|
603
|
+
justify-content: center;
|
|
604
|
+
}
|
|
605
|
+
|
|
606
|
+
.threepane-widgets__add {
|
|
607
|
+
padding: var(--threepane-space-xs) var(--threepane-space-sm);
|
|
608
|
+
border: var(--studio-border-width, 1px) dashed var(--threepane-sidebar-divider);
|
|
609
|
+
border-radius: var(--threepane-radius-sm);
|
|
610
|
+
background: transparent;
|
|
611
|
+
color: var(--threepane-muted);
|
|
612
|
+
font: inherit;
|
|
613
|
+
cursor: var(--studio-cursor-pointer, pointer);
|
|
614
|
+
white-space: nowrap;
|
|
615
|
+
}
|
|
616
|
+
|
|
617
|
+
.threepane-widgets__add:hover:not(:disabled) {
|
|
618
|
+
color: var(--threepane-sidebar-fg);
|
|
619
|
+
border-color: var(--threepane-sidebar-fg);
|
|
620
|
+
}
|
|
621
|
+
|
|
622
|
+
.threepane-widgets__add:disabled {
|
|
623
|
+
opacity: var(--studio-disabled-opacity, 0.5);
|
|
624
|
+
cursor: var(--studio-cursor-default, default);
|
|
625
|
+
}
|
|
626
|
+
|
|
627
|
+
/* System tray dock: pinned to the frame's bottom-left. Lives outside the
|
|
628
|
+
collapsing left sidebar so it isn't torn down when the sidebar closes. When
|
|
629
|
+
the sidebar is open the dock spans its width (set inline) and fills the space
|
|
630
|
+
reserved by \`threepane-sidebar--has-tray\`; when the sidebar closes the dock is
|
|
631
|
+
hidden (\`display: none\`) but stays mounted, so the tray is invisible while its
|
|
632
|
+
tools keep running. */
|
|
633
|
+
.frame__tray-dock {
|
|
634
|
+
position: absolute;
|
|
635
|
+
left: 0;
|
|
636
|
+
bottom: 0;
|
|
637
|
+
z-index: 4;
|
|
638
|
+
box-sizing: border-box;
|
|
639
|
+
/* Fade the tray in only *after* the sidebar's width animation completes, so it
|
|
640
|
+
doesn't flash at full size over the still-expanding sidebar. The delay equals
|
|
641
|
+
the sidebar's transition duration; collapsing overrides this to hide at once. */
|
|
642
|
+
opacity: 1;
|
|
643
|
+
transition: opacity var(--studio-transition-fast, 0.1s ease) 0.25s;
|
|
644
|
+
}
|
|
645
|
+
|
|
646
|
+
.frame__tray-dock--collapsed {
|
|
647
|
+
opacity: 0;
|
|
648
|
+
pointer-events: none;
|
|
649
|
+
/* Hide immediately on collapse \u2014 no wait, no fade. */
|
|
650
|
+
transition: opacity 0s;
|
|
651
|
+
}
|
|
652
|
+
|
|
653
|
+
/* A row of tray-tagged tools, filling the dock. */
|
|
654
|
+
.frame-tray {
|
|
655
|
+
display: flex;
|
|
656
|
+
align-items: center;
|
|
657
|
+
gap: var(--threepane-space-2xs);
|
|
658
|
+
box-sizing: border-box;
|
|
659
|
+
/* min-height includes the safe-area inset (border-box), and the matching
|
|
660
|
+
padding-bottom lifts the tray's contents clear of it while the tray's own
|
|
661
|
+
background fills the inset down to the very bottom edge. */
|
|
662
|
+
min-height: calc(
|
|
663
|
+
var(--threepane-tray-height) + env(safe-area-inset-bottom, 0px)
|
|
664
|
+
);
|
|
665
|
+
padding-inline: var(--threepane-space-sm);
|
|
666
|
+
padding-bottom: env(safe-area-inset-bottom, 0px);
|
|
667
|
+
border-top: var(--studio-border-width, 1px) var(--studio-border-style, solid) var(--threepane-sidebar-divider);
|
|
668
|
+
background: var(--threepane-sidebar-fill);
|
|
669
|
+
}
|
|
670
|
+
|
|
671
|
+
.frame-tray__item {
|
|
672
|
+
display: flex;
|
|
673
|
+
align-items: center;
|
|
674
|
+
}
|
|
675
|
+
|
|
676
|
+
.frame-tray patchwork-view {
|
|
677
|
+
display: flex;
|
|
678
|
+
width: auto;
|
|
679
|
+
height: auto;
|
|
680
|
+
}
|
|
681
|
+
|
|
682
|
+
/* Isolation-mode chrome popover.
|
|
683
|
+
In isolation the main document area is a sandboxed iframe, so host-realm tools
|
|
684
|
+
opened from the account bar (account picker / Packages / Settings) are floated
|
|
685
|
+
over the frame here instead of being routed into the iframe. The backdrop is a
|
|
686
|
+
lowish-opacity, theme-tinted ink wash (dims the frame + picks up the theme's
|
|
687
|
+
ink hue); the panel carries a soft drop shadow so it reads as lifted. Absolute
|
|
688
|
+
inset:0 resolves to the \`.frame\` (its nearest positioned ancestor). */
|
|
689
|
+
.frame__popover-backdrop {
|
|
690
|
+
position: absolute;
|
|
691
|
+
inset: 0;
|
|
692
|
+
z-index: var(--studio-layer-modal, 1000);
|
|
693
|
+
display: flex;
|
|
694
|
+
align-items: center;
|
|
695
|
+
justify-content: center;
|
|
696
|
+
padding: var(--threepane-space-2xl);
|
|
697
|
+
background: var(--studio-backdrop, color-mix(in oklch, var(--threepane-fg), transparent 82%));
|
|
698
|
+
animation: frame-popover-fade var(--studio-transition, 0.15s ease);
|
|
699
|
+
}
|
|
700
|
+
|
|
701
|
+
.frame__popover {
|
|
702
|
+
display: flex;
|
|
703
|
+
flex-direction: column;
|
|
704
|
+
width: min(1100px, 100%);
|
|
705
|
+
height: min(900px, 100%);
|
|
706
|
+
overflow: hidden;
|
|
707
|
+
background: var(--threepane-bg);
|
|
708
|
+
color: var(--threepane-fg);
|
|
709
|
+
border: var(--studio-border-width, 1px) var(--studio-border-style, solid) var(--threepane-toolbar-border);
|
|
710
|
+
border-radius: var(--threepane-radius-md);
|
|
711
|
+
box-shadow:
|
|
712
|
+
0 32px 80px color-mix(in oklch, var(--threepane-fg), transparent 45%),
|
|
713
|
+
0 12px 32px color-mix(in oklch, var(--threepane-fg), transparent 60%),
|
|
714
|
+
0 2px 8px color-mix(in oklch, var(--threepane-fg), transparent 70%);
|
|
715
|
+
animation: frame-popover-pop var(--studio-transition, 0.15s ease);
|
|
716
|
+
}
|
|
717
|
+
|
|
718
|
+
/* The "Open with" picker, docked to the popover's top. Sits at its natural
|
|
719
|
+
height above the tool body; the doc-openwith tool renders a small titlebar
|
|
720
|
+
button, so this is left-aligned chrome rather than a full-height view. */
|
|
721
|
+
.frame__popover-toolbar {
|
|
722
|
+
display: flex;
|
|
723
|
+
align-items: center;
|
|
724
|
+
flex: 0 0 auto;
|
|
725
|
+
gap: var(--threepane-space-sm);
|
|
726
|
+
padding: var(--threepane-space-sm) var(--threepane-space-md);
|
|
727
|
+
border-bottom: var(--studio-border-width, 1px) var(--studio-border-style, solid) var(--threepane-toolbar-border);
|
|
728
|
+
}
|
|
729
|
+
|
|
730
|
+
.frame__popover-toolbar patchwork-view {
|
|
731
|
+
display: block;
|
|
732
|
+
}
|
|
733
|
+
|
|
734
|
+
.frame__popover-body {
|
|
735
|
+
flex: 1 1 auto;
|
|
736
|
+
min-height: 0;
|
|
737
|
+
overflow: auto;
|
|
738
|
+
}
|
|
739
|
+
|
|
740
|
+
.frame__popover-body patchwork-view {
|
|
741
|
+
display: block;
|
|
742
|
+
width: 100%;
|
|
743
|
+
height: 100%;
|
|
744
|
+
overflow: auto;
|
|
745
|
+
}
|
|
746
|
+
|
|
747
|
+
@keyframes frame-popover-fade {
|
|
748
|
+
from {
|
|
749
|
+
opacity: 0;
|
|
750
|
+
}
|
|
751
|
+
to {
|
|
752
|
+
opacity: 1;
|
|
753
|
+
}
|
|
754
|
+
}
|
|
755
|
+
|
|
756
|
+
@keyframes frame-popover-pop {
|
|
757
|
+
from {
|
|
758
|
+
opacity: 0;
|
|
759
|
+
transform: translateY(8px) scale(0.98);
|
|
760
|
+
}
|
|
761
|
+
to {
|
|
762
|
+
opacity: 1;
|
|
763
|
+
transform: none;
|
|
764
|
+
}
|
|
765
|
+
}
|
|
766
|
+
|
|
767
|
+
.frame {
|
|
768
|
+
.sidebar-toggle {
|
|
769
|
+
position: relative;
|
|
770
|
+
align-self: stretch;
|
|
771
|
+
height: 100%;
|
|
772
|
+
padding: 0;
|
|
773
|
+
/* 1px wide, overlapping the divider border while reserving no layout column
|
|
774
|
+
(content stays flush against the view's border - no offset-bg seam). The
|
|
775
|
+
divider border is painted inside the following column, so a centered 2px
|
|
776
|
+
strip reads half a pixel left of the line. */
|
|
777
|
+
width: 1px;
|
|
778
|
+
margin-inline: 0 -1px;
|
|
779
|
+
margin-block: 0;
|
|
780
|
+
border: 0;
|
|
781
|
+
z-index: 1;
|
|
782
|
+
cursor: var(--studio-cursor-pointer, pointer);
|
|
783
|
+
/* transparent at rest - the visible divider is the main view's border; the
|
|
784
|
+
handle lights up (full-height glow + pill) on hover to signal resize. */
|
|
785
|
+
background: transparent;
|
|
786
|
+
transition: background-color var(--studio-transition, 0.15s ease);
|
|
787
|
+
/* invisible hit target straddling the divider. The toggle sits on opposite
|
|
788
|
+
edges of the two sidebars (right edge of the left pane, left edge of the
|
|
789
|
+
right pane). The grab area reaches 6px past the line on both sides, so it
|
|
790
|
+
works the same on either edge without per-side rules. */
|
|
791
|
+
&::before {
|
|
792
|
+
content: "";
|
|
793
|
+
position: absolute;
|
|
794
|
+
inset-block: 0;
|
|
795
|
+
inset-inline: -6px;
|
|
796
|
+
}
|
|
797
|
+
&::after {
|
|
798
|
+
content: "";
|
|
799
|
+
position: absolute;
|
|
800
|
+
top: 50%;
|
|
801
|
+
left: 50%;
|
|
802
|
+
width: 5px;
|
|
803
|
+
height: 44px;
|
|
804
|
+
border-radius: var(--threepane-radius-round);
|
|
805
|
+
background: var(--threepane-resize-pill);
|
|
806
|
+
opacity: 0;
|
|
807
|
+
transform: translate(-50%, -50%) scaleY(0.55);
|
|
808
|
+
transition: opacity var(--studio-transition, 0.15s ease),
|
|
809
|
+
transform var(--studio-transition, 0.15s ease);
|
|
810
|
+
pointer-events: none;
|
|
811
|
+
}
|
|
812
|
+
/* on hover the divider line lights up in the frame primary */
|
|
813
|
+
&:hover,
|
|
814
|
+
&:active {
|
|
815
|
+
background: var(--threepane-resize-glow);
|
|
816
|
+
}
|
|
817
|
+
&:hover::after,
|
|
818
|
+
&:active::after {
|
|
819
|
+
opacity: 1;
|
|
820
|
+
transform: translate(-50%, -50%) scaleY(1);
|
|
821
|
+
}
|
|
822
|
+
}
|
|
823
|
+
|
|
824
|
+
.sidebar-toggle--resizable {
|
|
825
|
+
cursor: var(--studio-cursor-resize-col, col-resize);
|
|
826
|
+
&:hover {
|
|
827
|
+
cursor: var(--studio-cursor-resize-col, col-resize);
|
|
828
|
+
}
|
|
829
|
+
&:active {
|
|
830
|
+
cursor: var(--studio-cursor-resize-col, col-resize);
|
|
831
|
+
}
|
|
832
|
+
}
|
|
833
|
+
|
|
834
|
+
}
|
|
835
|
+
|
|
836
|
+
/* Animate sidebar width on collapse/expand, but never while the handle is being
|
|
837
|
+
actively dragged - the width must track the pointer 1:1 with no easing lag.
|
|
838
|
+
The body flag is set for the duration of a drag by \`useSidebarResize\`. */
|
|
839
|
+
.sidebar {
|
|
840
|
+
transition: width var(--studio-transition-slow, 0.25s ease);
|
|
841
|
+
}
|
|
842
|
+
body[data-sidebar-resizing] .sidebar {
|
|
843
|
+
transition: none;
|
|
844
|
+
}
|
|
845
|
+
`;function mt(){let e="patchwork-frame-styles",r=document.getElementById(e);if(r){r.textContent!==ie&&(r.textContent=ie);return}let t=document.createElement("style");t.id=e,t.textContent=ie,document.head.append(t)}var Co=vt("<patchwork-view component=patchwork-isolation root-component=threepane-isolation-root shared-providers=patchwork:contact,patchwork:selected-doc,patchwork:worker-channel shared-tools=llm-config-tray style=display:contents><script type=application/json data-root-component-data>",!0,!1,!1),ko=vt("<div class=frame>");function ls(e){let r=gt(()=>{let o=new Set,n=e.selectedDocUrl();return n&&o.add(n),e.contactUrl&&o.add(e.contactUrl),[...o]}),t=gt(()=>JSON.stringify({selectedDocUrl:e.selectedDocUrl(),selectedToolId:e.selectedToolId(),doctitleSlots:e.doctitleSlots(),isLeftCollapsed:e.isLeftCollapsed(),initialRightWidth:e.initialRightWidth(),initialRightCollapsed:e.initialRightCollapsed()}));return(()=>{var o=Co(),n=o.firstChild;return o._$owner=_o(),wt(n,t),yo(()=>xo(o,"automerge-allowlist",r().join(","))),o})()}function bt(e){if(!e?.textContent)return{};try{return JSON.parse(e.textContent)}catch(r){return console.error("[threepane-isolation-root] bad props JSON:",r),{}}}function ds(e){mt();let r=e.querySelector('script[type="application/json"]'),[t,o]=So(bt(r)),n=new MutationObserver(()=>{o($o(bt(r)))});r&&n.observe(r,{characterData:!0,childList:!0,subtree:!0});let i=Eo(()=>(()=>{var a=ko();return wt(a,wo(pt,{selectedDocUrl:()=>t.selectedDocUrl,selectedToolId:()=>t.selectedToolId,doctitleSlots:()=>t.doctitleSlots,isLeftCollapsed:()=>t.isLeftCollapsed??!1,initialRightWidth:()=>t.initialRightWidth??X,initialRightCollapsed:()=>t.initialRightCollapsed??!1})),a})(),e);return()=>{n.disconnect(),i()}}export{Oe as a,N as b,C as c,Y as d,X as e,$e as f,Ee as g,$t as h,de as i,Pt as j,Ze as k,ge as l,di as m,ci as n,ct as o,pt as p,mt as q,ls as r,ds as s};
|
|
846
|
+
//# sourceMappingURL=chunk-UOTRB26X.js.map
|