@lensmap/language-server 0.2.0 → 0.3.0

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Lensmap contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/dist/main.js CHANGED
@@ -21,7 +21,7 @@ if (values.help) {
21
21
  }
22
22
  else if (values["configure-zed"]) {
23
23
  process.stdout.write(`${JSON.stringify({
24
- file_types: { YAML: ["lensmap"] },
24
+ file_types: { YAML: ["lensmap", "lenstypes"] },
25
25
  languages: { YAML: { language_servers: ["lensmap", "..."] } },
26
26
  lsp: {
27
27
  lensmap: {
@@ -1,7 +1,7 @@
1
- import{a as e,d as t,f as n,h as r,i,l as a,m as o,n as s,o as c,p as l,r as u,s as d,t as f,u as p}from"./styles-Bnie2-Dn.js";var m=r(),h=o();function g(e){try{let n=new t(`playground`,e).snapshot();return!n.valid||!n.graph?{ok:!1,error:n.diagnostics.map(e=>e.message).join(`
1
+ import{a as e,d as t,f as n,h as r,i,l as a,m as o,n as s,o as c,p as l,r as u,s as d,t as f,u as p}from"./styles-BEj3ZVHM.js";var m=r(),h=o();function g(e){try{let n=new t(`playground`,e).snapshot();return!n.valid||!n.graph?{ok:!1,error:n.diagnostics.map(e=>e.message).join(`
2
2
  `)}:{ok:!0,graph:p(n.graph)}}catch(e){return{ok:!1,error:e instanceof Error?e.message:`The document could not be parsed.`}}}var _=c();function v({graph:t,thoughtHref:r,active:a,onFocus:o,onFragment:s,onActivatePortal:c,source:u,applied:d,error:f,status:p,onSourceChange:m,onApply:h,onLoadSample:g}){let v=t.edges.filter(e=>e.from===a?.key);return(0,_.jsxs)(`aside`,{className:`notes`,id:`lensmap-sidebar`,"aria-label":`Sidebar`,children:[(0,_.jsxs)(`div`,{className:`note-eyebrow`,children:[(0,_.jsx)(`span`,{children:`THOUGHTS & SOURCE`}),(0,_.jsx)(`span`,{children:`v1 / incomplete`})]}),(0,_.jsxs)(`details`,{className:`sidebar-section`,open:!0,children:[(0,_.jsx)(`summary`,{children:`Selected thought`}),(0,_.jsxs)(`div`,{className:`note-content`,children:[a?(0,_.jsx)(e,{components:{h1:({children:e})=>(0,_.jsx)(`h2`,{children:e}),a:({href:e,children:t})=>(0,_.jsx)(`a`,{href:e,onClick:t=>{e?.startsWith(`#`)&&(t.preventDefault(),s(e.slice(1)))},children:t})},children:a.markdown||(a.unresolved?`# Unresolved thought
3
3
 
4
- This thought has not been named yet.`:a.title)}):(0,_.jsx)(`p`,{children:`No thought selected.`}),a&&(0,_.jsx)(`a`,{href:r??`#${encodeURIComponent(l(t.nodes).get(a.key)??a.key)}`,onClick:e=>{e.preventDefault(),s(encodeURIComponent(l(t.nodes).get(a.key)??a.key))},children:`Link to this thought`}),a?.destination&&(0,_.jsxs)(`div`,{className:`portal-actions`,children:[(0,_.jsx)(`p`,{children:a.destination.url}),(0,_.jsxs)(`button`,{type:`button`,onClick:()=>c?.(a),disabled:!c,children:[`Open`,` `,a.destination.kind===`map_link`?`destination map`:`external link`]})]})]})]}),(0,_.jsxs)(`details`,{className:`sidebar-section outgoing`,open:!0,children:[(0,_.jsx)(`summary`,{children:`Explicit connections`}),v.map(e=>{let r=t.nodes.find(t=>t.key===e.to);return r&&(0,_.jsxs)(`button`,{type:`button`,onClick:()=>o(e.to),children:[(0,_.jsxs)(`span`,{children:[n(e.type,`outgoing`),` · `,i(r)]}),(0,_.jsx)(`span`,{"aria-hidden":`true`,children:`↗`})]},e.key)}),!v.length&&(0,_.jsx)(`p`,{children:`No outgoing connections yet.`})]}),(0,_.jsxs)(`details`,{className:`sidebar-section outgoing`,open:!0,children:[(0,_.jsx)(`summary`,{children:`Incoming connections`}),t.edges.filter(e=>e.to===a?.key).map(e=>{let r=t.nodes.find(t=>t.key===e.from);return r&&(0,_.jsxs)(`button`,{type:`button`,onClick:()=>o(r.key),children:[n(e.type,`incoming`),` · `,i(r)]},e.key)})]}),(0,_.jsxs)(`details`,{className:`sidebar-section playground`,children:[(0,_.jsx)(`summary`,{children:`YAML playground`}),(0,_.jsxs)(`p`,{className:`editor-help`,id:`source-help`,children:[`Experimental `,(0,_.jsx)(`code`,{children:`version: v1`}),`. This is an incomplete schema, not a frozen format. Write thoughts first; positions and IDs are optional.`]}),(0,_.jsxs)(`form`,{onSubmit:e=>{e.preventDefault(),h()},children:[(0,_.jsx)(`label`,{className:`source-label`,htmlFor:`yaml-source`,children:`YAML source`}),(0,_.jsx)(`textarea`,{id:`yaml-source`,"aria-describedby":`source-help source-lifetime`,spellCheck:!1,value:u,onChange:e=>m(e.target.value)}),(0,_.jsxs)(`div`,{className:`editor-actions`,children:[(0,_.jsx)(`button`,{type:`submit`,children:`Apply YAML`}),(0,_.jsx)(`button`,{type:`button`,onClick:g,children:`Load sample`})]}),(0,_.jsx)(`p`,{className:`editor-state`,children:u===d?`Draft matches the map.`:`Unapplied changes — the map still shows the last valid document.`}),f&&(0,_.jsx)(`pre`,{className:`source-error`,role:`alert`,children:f}),(0,_.jsx)(`p`,{className:`editor-state`,role:`status`,children:p})]}),(0,_.jsx)(`p`,{className:`editor-help`,id:`source-lifetime`,children:`Drafts stay here while you navigate or collapse sections. Reloading the page discards them; saving and editor language tooling are not implemented yet.`})]})]})}var y=`# Lensmap v1 is incomplete and experimental. This sample is editable.
4
+ This thought has not been named yet.`:a.title)}):(0,_.jsx)(`p`,{children:`No thought selected.`}),a&&(0,_.jsx)(`a`,{href:r??`#${encodeURIComponent(l(t.nodes).get(a.key)??a.key)}`,onClick:e=>{e.preventDefault(),s(encodeURIComponent(l(t.nodes).get(a.key)??a.key))},children:`Link to this thought`}),a?.destination&&(0,_.jsxs)(`div`,{className:`portal-actions`,children:[(0,_.jsx)(`p`,{children:a.destination.url}),(0,_.jsxs)(`button`,{type:`button`,onClick:()=>c?.(a),disabled:!c,children:[`Open`,` `,a.destination.kind===`map_link`?`destination map`:`external link`]})]})]})]}),(0,_.jsxs)(`details`,{className:`sidebar-section outgoing`,open:!0,children:[(0,_.jsx)(`summary`,{children:`Explicit connections`}),v.map(e=>{let r=t.nodes.find(t=>t.key===e.to);return r&&(0,_.jsxs)(`button`,{type:`button`,onClick:()=>o(e.to),children:[(0,_.jsxs)(`span`,{children:[n(e.type,`outgoing`,e.presentation),` `,`· `,i(r)]}),(0,_.jsx)(`span`,{"aria-hidden":`true`,children:`↗`})]},e.key)}),!v.length&&(0,_.jsx)(`p`,{children:`No outgoing connections yet.`})]}),(0,_.jsxs)(`details`,{className:`sidebar-section outgoing`,open:!0,children:[(0,_.jsx)(`summary`,{children:`Incoming connections`}),t.edges.filter(e=>e.to===a?.key).map(e=>{let r=t.nodes.find(t=>t.key===e.from);return r&&(0,_.jsxs)(`button`,{type:`button`,onClick:()=>o(r.key),children:[n(e.type,`incoming`,e.presentation),` `,`· `,i(r)]},e.key)})]}),(0,_.jsxs)(`details`,{className:`sidebar-section playground`,children:[(0,_.jsx)(`summary`,{children:`YAML playground`}),(0,_.jsxs)(`p`,{className:`editor-help`,id:`source-help`,children:[`Experimental `,(0,_.jsx)(`code`,{children:`version: v1`}),`. This is an incomplete schema, not a frozen format. Write thoughts first; positions and IDs are optional.`]}),(0,_.jsxs)(`form`,{onSubmit:e=>{e.preventDefault(),h()},children:[(0,_.jsx)(`label`,{className:`source-label`,htmlFor:`yaml-source`,children:`YAML source`}),(0,_.jsx)(`textarea`,{id:`yaml-source`,"aria-describedby":`source-help source-lifetime`,spellCheck:!1,value:u,onChange:e=>m(e.target.value)}),(0,_.jsxs)(`div`,{className:`editor-actions`,children:[(0,_.jsx)(`button`,{type:`submit`,children:`Apply YAML`}),(0,_.jsx)(`button`,{type:`button`,onClick:g,children:`Load sample`})]}),(0,_.jsx)(`p`,{className:`editor-state`,children:u===d?`Draft matches the map.`:`Unapplied changes — the map still shows the last valid document.`}),f&&(0,_.jsx)(`pre`,{className:`source-error`,role:`alert`,children:f}),(0,_.jsx)(`p`,{className:`editor-state`,role:`status`,children:p})]}),(0,_.jsx)(`p`,{className:`editor-help`,id:`source-lifetime`,children:`Drafts stay here while you navigate or collapse sections. Reloading the page discards them; saving and editor language tooling are not implemented yet.`})]})]})}var y=`# Lensmap v1 is incomplete and experimental. This sample is editable.
5
5
  version: v1
6
6
  nodes:
7
7
  - id: ferry
@@ -1 +1 @@
1
- import{c as e,h as t,l as n,m as r,n as i,o as a,r as o,t as s,u as c}from"./styles-Bnie2-Dn.js";var l=t(),u=r();function d(e,t){let n=!1,r,i=new URLSearchParams(location.hash.slice(1)).get(`token`);i&&history.replaceState(null,``,location.pathname+location.search);let a=new AbortController;return(async()=>{if(i&&!(await fetch(`/api/auth`,{method:`POST`,credentials:`same-origin`,headers:{"Content-Type":`application/json`},body:JSON.stringify({token:i}),signal:a.signal})).ok)throw Error(`Preview authorization failed. Reopen the preview from Zed.`);n||(r=new EventSource(`/api/events`),r.onopen=()=>t(!0),r.onerror=()=>t(!1,`Disconnected or unauthorized. Reopen the preview from Zed after a server restart.`),r.onmessage=n=>{try{e(JSON.parse(n.data))}catch{t(!1,`The bridge sent an invalid update.`)}})})().catch(e=>{n||t(!1,e instanceof Error?e.message:`Preview connection failed.`)}),()=>{n=!0,a.abort(),r?.close()}}async function f(e,t){let n=await fetch(`/api/reveal`,{method:`POST`,credentials:`same-origin`,headers:{"Content-Type":`application/json`},body:JSON.stringify({uri:e,key:t})});if(!n.ok){let e=await n.json();throw Error(e.error??`Source reveal failed.`)}}async function p(e,t){let n=await fetch(`/api/open-destination`,{method:`POST`,credentials:`same-origin`,headers:{"Content-Type":`application/json`},body:JSON.stringify({uri:e.uri,key:t,baseRevision:e.revision,attachmentId:e.attachmentId})});if(!n.ok){let e=await n.json();throw Error(e.error??`Host destination opening failed.`)}}var m=a(),h=e=>{try{return decodeURIComponent(new URL(e).pathname.split(`/`).at(-1)??e)}catch{return e}};function g(){let[t,r]=(0,l.useState)([]),a=(0,l.useRef)(new Map),u=(0,l.useRef)(new Map),[g,_]=(0,l.useState)(null),v=o({uri:``,graph:{nodes:[],edges:[]},attachment:``},e=>{e.current.uri&&_(e.current.uri)}),[y,b]=(0,l.useState)(!1),[x,S]=(0,l.useState)(``),[C,w]=(0,l.useState)(``),[T,E]=(0,l.useState)(!1),[D,O]=(0,l.useState)(!1),k=(0,l.useRef)(void 0),[A,j]=(0,l.useState)(),M=(0,l.useRef)(0),N=(e,t)=>{_(e),j({key:t,sequence:++M.current})},P=(0,l.useEffectEvent)(e=>{if(e.type===`session`){let t=a.current;a.current=new Map(e.documents.map(e=>[e.uri,e]));for(let e of u.current.keys())a.current.has(e)||u.current.delete(e);k.current&&(!a.current.has(k.current.uri)||t.get(k.current.uri)?.attachmentId!==a.current.get(k.current.uri)?.attachmentId)&&(k.current=void 0),g&&(!a.current.has(g)||t.get(g)?.attachmentId!==a.current.get(g)?.attachmentId)&&j(void 0),r(e.documents),_(t=>t&&a.current.has(t)?t:e.activeUri??e.documents[0]?.uri??null)}else if(e.type===`snapshot`)a.current.get(e.snapshot.uri)?.attachmentId!==e.snapshot.attachmentId&&(k.current?.uri===e.snapshot.uri&&(k.current=void 0),g===e.snapshot.uri&&j(void 0)),a.current.set(e.snapshot.uri,e.snapshot),r([...a.current.values()]),_(t=>t??e.snapshot.uri);else if(e.type===`focus`)a.current.get(e.uri)?.graph?.nodes.some(t=>t.key===e.key)&&N(e.uri,e.key);else if(e.type===`caret`){let t=a.current.get(e.uri);if(!t||t.revision!==e.revision||!t.valid||t.pending){k.current=void 0;return}let n=k.current?.uri!==e.uri||k.current?.key!==e.key;k.current={uri:e.uri,key:e.key},T&&n&&e.key&&N(e.uri,e.key)}});(0,l.useEffect)(()=>d(P,(e,t)=>{b(e),S(t??``)}),[]);let F=t.find(e=>e.uri===g),I=(0,l.useMemo)(()=>{if(!F?.graph)return null;let e=u.current.get(F.uri);if(e?.attachmentId===F.attachmentId&&e?.revision===F.graphRevision&&JSON.stringify(e.semantic)===JSON.stringify(F.graph))return e.layout;let t=c(F.graph,e?.attachmentId===F.attachmentId?e:void 0);return u.current.set(F.uri,{attachmentId:F.attachmentId,revision:F.graphRevision,semantic:F.graph,layout:t}),t},[F]),L=async e=>{let t=a.current.get(e);if(!t)throw Error(`Destination map is not attached. Open it in the editor before navigating; the current map is retained.`);if(!t.valid||t.pending||!t.graph)throw Error(`Destination attached analysis is not currently valid.`);return{uri:e,graph:c(t.graph),attachment:t.attachmentId??``}};if(F&&I){if(v.current.uri!==F.uri)v.cancel(),v.entries=[...v.entries.slice(0,v.index+1),{uri:F.uri,graph:I,attachment:F.attachmentId??``}],v.index++;else{if(v.current.attachment!==(F.attachmentId??``)){let t=e(v.current,{uri:F.uri,graph:I,attachment:F.attachmentId??``},v.current.view);v.current.view&&!t&&(v.error=`Previous view target is removed or unavailable.`),v.current.view=t,v.current.target=void 0}v.current.graph=I,v.current.attachment=F.attachmentId??``}}let R=async(e,t)=>{await v.go(e,L,t)&&(_(v.current.uri),j(void 0))},z=(0,l.useRef)(!1);(0,l.useEffect)(()=>{if(z.current||!F?.valid||!I)return;z.current=!0;let e=new URL(location.href).searchParams.get(`map`),t=e?e.split(`#`,1)[0]+location.hash:location.hash;t&&R(t)},[F,I]);let B=y?F?F.pending?`Analyzing r${F.revision} · showing r${F.graphRevision??`—`}`:F.valid?`Live · r${F.revision}`:`Source r${F.revision} invalid · showing r${F.graphRevision??`—`} · stale`:`Waiting for a .lensmap document`:`Disconnected`;return(0,m.jsxs)(`div`,{className:`bridge-shell`,children:[(0,m.jsxs)(`header`,{className:`bridge-bar`,children:[(0,m.jsx)(`strong`,{children:`◎ Lensmap`}),(0,m.jsx)(`button`,{type:`button`,disabled:v.index<=1,onClick:()=>{let e=v.index-1;R(v.entries[e].uri,e)},children:`Back`}),(0,m.jsx)(`button`,{type:`button`,disabled:v.index>=v.entries.length-1,onClick:()=>{let e=v.index+1;R(v.entries[e].uri,e)},children:`Forward`}),(0,m.jsxs)(`select`,{"aria-label":`Document`,value:g??``,onChange:e=>{R(e.target.value),j(void 0),w(``)},children:[!t.length&&(0,m.jsx)(`option`,{value:``,children:`No attached document`}),t.map(e=>(0,m.jsx)(`option`,{value:e.uri,children:h(e.uri)},e.uri))]}),(0,m.jsxs)(`label`,{children:[(0,m.jsx)(`input`,{type:`checkbox`,checked:T,onChange:e=>{E(e.target.checked);let t=k.current;e.target.checked&&t?.key&&N(t.uri,t.key)}}),`Follow editor caret`]}),(0,m.jsx)(`button`,{type:`button`,"aria-pressed":D,onClick:()=>O(e=>!e),children:`Thought details`}),(0,m.jsx)(`span`,{role:`status`,"data-testid":`bridge-status`,children:B})]}),(0,m.jsx)(i,{navigation:v,openAnyway:()=>{v.fallback&&R(v.fallback)}}),(x||C)&&(0,m.jsxs)(`p`,{className:`bridge-notice`,children:[C||x,` The last map is retained.`]}),F&&!F.pending&&F.diagnostics.length>0&&(0,m.jsx)(`div`,{className:`bridge-errors`,role:`alert`,children:F.diagnostics.map(e=>(0,m.jsx)(`p`,{children:e.message},`${e.range.start.line}:${e.range.start.character}:${e.message}`))}),I&&g?(0,m.jsx)(s,{thoughtLink:e=>n(location.href,g,e),initialState:v.current.view,initialTarget:v.current.target,initialOverview:v.current.overview,onStateChange:e=>{v.current.view=e},onActivatePortal:e=>{if(!e.destination)return;if(e.destination.kind===`map_link`){R(e.destination.url);return}let t=a.current.get(g);t&&p(t,e.key).catch(e=>w(e instanceof Error?e.message:`Host opening failed.`))},graph:I,updateMode:`live`,focusRequest:A,showInspector:D,onRevealSource:e=>{w(``),f(g,e).catch(e=>w(e instanceof Error?e.message:`Source reveal failed.`))}},`${g}:${F?.attachmentId??``}:${v.serial}`):(0,m.jsxs)(`section`,{className:`bridge-empty`,children:[(0,m.jsx)(`h1`,{children:`Open a .lensmap document in Zed`}),(0,m.jsx)(`p`,{children:`Unsaved buffer contents drive this preview. Use the Lensmap code actions to open or centre it.`}),(0,m.jsx)(`p`,{children:`The format and integration are experimental. Source editing stays in your editor.`})]})]})}var _=document.getElementById(`root`);if(!_)throw Error(`Lensmap could not find its preview root.`);(0,u.createRoot)(_).render((0,m.jsx)(g,{}));
1
+ import{c as e,h as t,l as n,m as r,n as i,o as a,r as o,t as s,u as c}from"./styles-BEj3ZVHM.js";var l=t(),u=r();function d(e,t){let n=!1,r,i=new URLSearchParams(location.hash.slice(1)).get(`token`);i&&history.replaceState(null,``,location.pathname+location.search);let a=new AbortController;return(async()=>{if(i&&!(await fetch(`/api/auth`,{method:`POST`,credentials:`same-origin`,headers:{"Content-Type":`application/json`},body:JSON.stringify({token:i}),signal:a.signal})).ok)throw Error(`Preview authorization failed. Reopen the preview from Zed.`);n||(r=new EventSource(`/api/events`),r.onopen=()=>t(!0),r.onerror=()=>t(!1,`Disconnected or unauthorized. Reopen the preview from Zed after a server restart.`),r.onmessage=n=>{try{e(JSON.parse(n.data))}catch{t(!1,`The bridge sent an invalid update.`)}})})().catch(e=>{n||t(!1,e instanceof Error?e.message:`Preview connection failed.`)}),()=>{n=!0,a.abort(),r?.close()}}async function f(e,t){let n=await fetch(`/api/reveal`,{method:`POST`,credentials:`same-origin`,headers:{"Content-Type":`application/json`},body:JSON.stringify({uri:e,key:t})});if(!n.ok){let e=await n.json();throw Error(e.error??`Source reveal failed.`)}}async function p(e,t){let n=await fetch(`/api/open-destination`,{method:`POST`,credentials:`same-origin`,headers:{"Content-Type":`application/json`},body:JSON.stringify({uri:e.uri,key:t,baseRevision:e.revision,attachmentId:e.attachmentId})});if(!n.ok){let e=await n.json();throw Error(e.error??`Host destination opening failed.`)}}var m=a(),h=e=>{try{return decodeURIComponent(new URL(e).pathname.split(`/`).at(-1)??e)}catch{return e}};function g(){let[t,r]=(0,l.useState)([]),a=(0,l.useRef)(new Map),u=(0,l.useRef)(new Map),[g,_]=(0,l.useState)(null),v=o({uri:``,graph:{nodes:[],edges:[]},attachment:``},e=>{e.current.uri&&_(e.current.uri)}),[y,b]=(0,l.useState)(!1),[x,S]=(0,l.useState)(``),[C,w]=(0,l.useState)(``),[T,E]=(0,l.useState)(!1),[D,O]=(0,l.useState)(!1),k=(0,l.useRef)(void 0),[A,j]=(0,l.useState)(),M=(0,l.useRef)(0),N=(e,t)=>{_(e),j({key:t,sequence:++M.current})},P=(0,l.useEffectEvent)(e=>{if(e.type===`session`){let t=a.current;a.current=new Map(e.documents.map(e=>[e.uri,e]));for(let e of u.current.keys())a.current.has(e)||u.current.delete(e);k.current&&(!a.current.has(k.current.uri)||t.get(k.current.uri)?.attachmentId!==a.current.get(k.current.uri)?.attachmentId)&&(k.current=void 0),g&&(!a.current.has(g)||t.get(g)?.attachmentId!==a.current.get(g)?.attachmentId)&&j(void 0),r(e.documents),_(t=>t&&a.current.has(t)?t:e.activeUri??e.documents[0]?.uri??null)}else if(e.type===`snapshot`)a.current.get(e.snapshot.uri)?.attachmentId!==e.snapshot.attachmentId&&(k.current?.uri===e.snapshot.uri&&(k.current=void 0),g===e.snapshot.uri&&j(void 0)),a.current.set(e.snapshot.uri,e.snapshot),r([...a.current.values()]),_(t=>t??e.snapshot.uri);else if(e.type===`focus`)a.current.get(e.uri)?.graph?.nodes.some(t=>t.key===e.key)&&N(e.uri,e.key);else if(e.type===`caret`){let t=a.current.get(e.uri);if(!t||t.revision!==e.revision||!t.valid||t.pending){k.current=void 0;return}let n=k.current?.uri!==e.uri||k.current?.key!==e.key;k.current={uri:e.uri,key:e.key},T&&n&&e.key&&N(e.uri,e.key)}});(0,l.useEffect)(()=>d(P,(e,t)=>{b(e),S(t??``)}),[]);let F=t.find(e=>e.uri===g),I=(0,l.useMemo)(()=>{if(!F?.graph)return null;let e=u.current.get(F.uri);if(e?.attachmentId===F.attachmentId&&e?.revision===F.graphRevision&&e?.generation===F.graphGeneration&&JSON.stringify(e.semantic)===JSON.stringify(F.graph))return e.layout;let t=c(F.graph,e?.attachmentId===F.attachmentId?e:void 0);return u.current.set(F.uri,{attachmentId:F.attachmentId,revision:F.graphRevision,generation:F.graphGeneration,semantic:F.graph,layout:t}),t},[F]),L=async e=>{let t=a.current.get(e);if(!t)throw Error(`Destination map is not attached. Open it in the editor before navigating; the current map is retained.`);if(!t.valid||t.pending||!t.graph)throw Error(`Destination attached analysis is not currently valid.`);return{uri:e,graph:c(t.graph),attachment:t.attachmentId??``}};if(F&&I){if(v.current.uri!==F.uri)v.cancel(),v.entries=[...v.entries.slice(0,v.index+1),{uri:F.uri,graph:I,attachment:F.attachmentId??``}],v.index++;else{if(v.current.attachment!==(F.attachmentId??``)){let t=e(v.current,{uri:F.uri,graph:I,attachment:F.attachmentId??``},v.current.view);v.current.view&&!t&&(v.error=`Previous view target is removed or unavailable.`),v.current.view=t,v.current.target=void 0}v.current.graph=I,v.current.attachment=F.attachmentId??``}}let R=async(e,t)=>{await v.go(e,L,t)&&(_(v.current.uri),j(void 0))},z=(0,l.useRef)(!1);(0,l.useEffect)(()=>{if(z.current||!F?.valid||!I)return;z.current=!0;let e=new URL(location.href).searchParams.get(`map`),t=e?e.split(`#`,1)[0]+location.hash:location.hash;t&&R(t)},[F,I]);let B=y?F?F.pending?`Analyzing r${F.revision} · showing r${F.graphRevision??`—`}`:F.valid?`Live · r${F.revision}`:`Source r${F.revision} invalid · showing r${F.graphRevision??`—`} · stale`:`Waiting for a .lensmap document`:`Disconnected`;return(0,m.jsxs)(`div`,{className:`bridge-shell`,children:[(0,m.jsxs)(`header`,{className:`bridge-bar`,children:[(0,m.jsx)(`strong`,{children:`◎ Lensmap`}),(0,m.jsx)(`button`,{type:`button`,disabled:v.index<=1,onClick:()=>{let e=v.index-1;R(v.entries[e].uri,e)},children:`Back`}),(0,m.jsx)(`button`,{type:`button`,disabled:v.index>=v.entries.length-1,onClick:()=>{let e=v.index+1;R(v.entries[e].uri,e)},children:`Forward`}),(0,m.jsxs)(`select`,{"aria-label":`Document`,value:g??``,onChange:e=>{R(e.target.value),j(void 0),w(``)},children:[!t.length&&(0,m.jsx)(`option`,{value:``,children:`No attached document`}),t.map(e=>(0,m.jsx)(`option`,{value:e.uri,children:h(e.uri)},e.uri))]}),(0,m.jsxs)(`label`,{children:[(0,m.jsx)(`input`,{type:`checkbox`,checked:T,onChange:e=>{E(e.target.checked);let t=k.current;e.target.checked&&t?.key&&N(t.uri,t.key)}}),`Follow editor caret`]}),(0,m.jsx)(`button`,{type:`button`,"aria-pressed":D,onClick:()=>O(e=>!e),children:`Thought details`}),(0,m.jsx)(`span`,{role:`status`,"data-testid":`bridge-status`,children:B})]}),(0,m.jsx)(i,{navigation:v,openAnyway:()=>{v.fallback&&R(v.fallback)}}),(x||C)&&(0,m.jsxs)(`p`,{className:`bridge-notice`,children:[C||x,` The last map is retained.`]}),F&&!F.pending&&F.diagnostics.length>0&&(0,m.jsx)(`div`,{className:`bridge-errors`,role:`alert`,children:F.diagnostics.map(e=>(0,m.jsx)(`p`,{children:e.message},`${e.range.start.line}:${e.range.start.character}:${e.message}`))}),I&&g?(0,m.jsx)(s,{thoughtLink:e=>n(location.href,g,e),initialState:v.current.view,initialTarget:v.current.target,initialOverview:v.current.overview,onStateChange:e=>{v.current.view=e},onActivatePortal:e=>{if(!e.destination)return;if(e.destination.kind===`map_link`){R(e.destination.url);return}let t=a.current.get(g);t&&p(t,e.key).catch(e=>w(e instanceof Error?e.message:`Host opening failed.`))},graph:I,updateMode:`live`,focusRequest:A,showInspector:D,onRevealSource:e=>{w(``),f(g,e).catch(e=>w(e instanceof Error?e.message:`Source reveal failed.`))}},`${g}:${F?.attachmentId??``}:${v.serial}`):(0,m.jsxs)(`section`,{className:`bridge-empty`,children:[(0,m.jsx)(`h1`,{children:`Open a .lensmap document in Zed`}),(0,m.jsx)(`p`,{children:`Unsaved buffer contents drive this preview. Use the Lensmap code actions to open or centre it.`}),(0,m.jsx)(`p`,{children:`The format and integration are experimental. Source editing stays in your editor.`})]})]})}var _=document.getElementById(`root`);if(!_)throw Error(`Lensmap could not find its preview root.`);(0,u.createRoot)(_).render((0,m.jsx)(g,{}));
@@ -1 +1 @@
1
- :where(.lensmap-viewer){color:#e7eef4;--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark;font-synthesis:none;background:#10171f;font-family:Inter,ui-sans-serif,system-ui,sans-serif}:where(.lensmap-viewer),:where(.lensmap-viewer) *{box-sizing:border-box}:where(.lensmap-viewer) button,:where(.lensmap-viewer) input,:where(.lensmap-viewer) textarea{font:inherit}:where(.lensmap-viewer) button{color:inherit;cursor:pointer;background:#202c38;border:1px solid #374451;border-radius:8px;padding:8px 12px}:where(.lensmap-viewer) button:hover{background:#2b3a49}:where(.lensmap-viewer) button:disabled{opacity:.4;cursor:default}:where(.lensmap-viewer) button:focus-visible,:where(.lensmap-viewer) a:focus-visible,:where(.lensmap-viewer) input:focus-visible,:where(.lensmap-viewer) textarea:focus-visible,:where(.lensmap-viewer) summary:focus-visible,:where(.lensmap-viewer) .sidebar-resizer:focus-visible,:where(.lensmap-viewer) .map:focus-visible{outline-offset:4px;outline:3px solid #f7c46c}:where(.lensmap-viewer){max-width:1800px;margin:auto;padding:28px 36px 18px}:where(.lensmap-viewer) .masthead{align-items:center;gap:24px;margin-bottom:26px;display:flex}:where(.lensmap-viewer) .brand{align-items:center;gap:10px;display:flex}:where(.lensmap-viewer) h1{letter-spacing:-1px;margin:0;font-size:25px}:where(.lensmap-viewer) .brand-mark{color:#a9d7d2;font-size:34px}:where(.lensmap-viewer) .tag,:where(.lensmap-viewer) .phase,:where(.lensmap-viewer) .note-eyebrow,:where(.lensmap-viewer) .map-caption,:where(.lensmap-viewer) .page-footer{letter-spacing:.07em;font-family:ui-monospace,monospace;font-size:11px}:where(.lensmap-viewer) .tag{color:#abc4c8;background:#233238;border-radius:5px;margin-left:6px;padding:6px 8px}:where(.lensmap-viewer) .masthead>p{color:#9aaab8;font-size:13px}:where(.lensmap-viewer) .phase{color:#b4bec9;white-space:nowrap;margin-left:auto}:where(.lensmap-viewer) .workspace{grid-template-columns:minmax(0, 1fr) 10px var(--sidebar-width,340px);background:#16212b;border:1px solid #35434f;border-radius:16px;display:grid;overflow:hidden}:where(.lensmap-viewer) .workspace.canvas-only{grid-template-columns:minmax(0,1fr)}:where(.lensmap-viewer) .map-column{min-width:0}:where(.lensmap-viewer) .toolbar{background:#1b2732;border-bottom:1px solid #35434f;flex-wrap:wrap;align-items:center;gap:14px;padding:14px 18px;display:flex}:where(.lensmap-viewer) .segmented{background:#101b25;border:none;border-radius:9px;gap:3px;min-width:0;margin:0;padding:3px;display:flex}:where(.lensmap-viewer) .segmented button{color:#a7b7c6;background:0 0;border:none;font-size:12px}:where(.lensmap-viewer) .segmented button[aria-pressed=true]{color:#edf8f7;background:#365054}:where(.lensmap-viewer) .strength{color:#bdcbd6;align-items:center;gap:8px;font-size:12px;display:flex}:where(.lensmap-viewer) .strength input{accent-color:#9ad6c9;width:88px}:where(.lensmap-viewer) .strength output{font-variant-numeric:tabular-nums;min-width:28px}:where(.lensmap-viewer) .quiet{background:0 0;margin-left:auto;font-size:12px}:where(.lensmap-viewer) .map{isolation:isolate;cursor:grab;touch-action:none;-webkit-user-select:none;user-select:none;background-color:#14202a;background-image:radial-gradient(#3b4a553d 1px,#0000 1px);background-size:24px 24px;height:clamp(490px,67vh,780px);position:relative;overflow:hidden}:where(.lensmap-viewer) .map.dragging{cursor:grabbing}:where(.lensmap-viewer) .map.overview{cursor:default}:where(.lensmap-viewer) .graph-scene{transform-origin:50%;position:absolute;inset:0}:where(.lensmap-viewer) .focus-ring{pointer-events:none;border:1px solid #99cfcf15;border-radius:50%;width:260px;height:260px;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);box-shadow:0 0 100px 65px #9edbc704}:where(.lensmap-viewer) .map-caption{color:#98adb9;font-size:10px}:where(.lensmap-viewer) .connections{pointer-events:none;position:absolute;inset:0;overflow:visible}:where(.lensmap-viewer) .edge{fill:none;stroke-width:2.5px;opacity:.92}:where(.lensmap-viewer) .edge-hit{fill:none;stroke:#0000;stroke-width:16px;pointer-events:stroke}:where(.lensmap-viewer) .destination-icon{font-size:1.4em;display:block}:where(.lensmap-viewer) .portal-actions p{overflow-wrap:anywhere}:where(.lensmap-viewer) .edge.context{opacity:.45}:where(.lensmap-viewer) .neighbourhood-action{font-size:12px}:where(.lensmap-viewer) .neighbourhood-label{color:#a9d7d2;font-size:11px}:where(.lensmap-viewer) .edge.connected{stroke-width:3.5px;opacity:1;filter:drop-shadow(0 0 2px)drop-shadow(0 0 6px)}:where(.lensmap-viewer) .edge.connection-preview{stroke-width:4px;opacity:1;filter:drop-shadow(0 0 2px #d5f4ed)drop-shadow(0 0 7px)}:where(.lensmap-viewer) .connection-chooser{z-index:6;-webkit-user-select:text;user-select:text;background:#162832f5;border:1px solid #89bfb3;border-radius:10px;flex-direction:column;width:min(290px,100% - 24px);max-height:45%;padding:12px;font-size:11px;display:flex;position:absolute;top:12px;right:12px}:where(.lensmap-viewer) .connection-chooser h2{margin:0 0 6px;font-size:13px}:where(.lensmap-viewer) .connection-chooser p{margin:0 0 8px;line-height:1.4}:where(.lensmap-viewer) .connection-chooser ol{min-height:0;margin:0 0 8px;padding:0;list-style:none;overflow:auto}:where(.lensmap-viewer) .connection-chooser li+li{margin-top:5px}:where(.lensmap-viewer) .connection-option{text-align:left;overflow-wrap:anywhere;width:100%;padding:7px 9px}:where(.lensmap-viewer) .connection-chooser strong,:where(.lensmap-viewer) .connection-chooser span{display:block}:where(.lensmap-viewer) .connection-chooser span{color:#bdcbd6;margin-top:3px}:where(.lensmap-viewer) .connection-option[aria-pressed=true]{background:#304c51;border-color:#d5f4ed}:where(.lensmap-viewer) .connection-chooser .outside-view{color:#f7c46c}:where(.lensmap-viewer) .connection-actions{flex-wrap:wrap;gap:6px;display:flex}:where(.lensmap-viewer) .connection-actions button{padding:6px 8px;font-size:11px}:where(.lensmap-viewer) .edge-halo{fill:none;stroke:#14202a;stroke-width:8px}:where(.lensmap-viewer) .node{text-align:center;transform-origin:50%;background:#1d303d;border:1.8px solid;border-radius:50%;justify-content:center;align-items:center;width:86px;height:86px;padding:10px;font-size:12px;line-height:1.3;display:flex;position:absolute;box-shadow:0 5px 12px #0003}:where(.lensmap-viewer) .node>span{-webkit-line-clamp:3;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}:where(.lensmap-viewer) .node.connected,:where(.lensmap-viewer) .node.selected{box-shadow:0 0 5px 1px var(--branch-colour), 0 0 18px color-mix(in srgb, var(--branch-colour) 80%, transparent), inset 0 0 8px color-mix(in srgb, var(--branch-colour) 30%, transparent);border-width:2.5px}:where(.lensmap-viewer) .node:hover{z-index:3;background:#334754}:where(.lensmap-viewer) .node.selected{filter:brightness(1.15);z-index:2;background:#2d4651}:where(.lensmap-viewer) .node:focus-visible{z-index:4;outline-offset:5px;outline:3px solid #f7c46c}:where(.lensmap-viewer) .node[data-keyboard-target=true]:after{content:"";pointer-events:none;border:2px dashed #d5f4ed;border-radius:50%;position:absolute;inset:-10px}:where(.lensmap-viewer) .keyboard-target-label{color:#d5f4ed}:where(.lensmap-viewer) .node.unresolved{border-style:dashed;font-size:26px}:where(.lensmap-viewer) .map.dragging .node{cursor:grabbing}:where(.lensmap-viewer) .zoom-controls{z-index:5;background:#18242ff5;border:1px solid #3b4a55;border-radius:10px;align-items:center;gap:6px;padding:4px;display:flex;position:absolute;bottom:18px;left:18px}:where(.lensmap-viewer) .zoom-controls button{background:0 0;border:none;padding:3px 10px;font-size:20px}:where(.lensmap-viewer) .zoom-controls output{text-align:center;min-width:42px;font-size:12px}:where(.lensmap-viewer) .map-footer{color:#aebfca;border-top:1px solid #35434f;padding:13px 18px;font-size:11px}:where(.lensmap-viewer) .map-footer p{margin:0 0 9px;line-height:1.6}:where(.lensmap-viewer) .legend{color:#d4dfeb;gap:22px;display:flex}:where(.lensmap-viewer) .notes{background:#1c2833;flex-direction:column;min-width:0;max-height:calc(clamp(490px,67vh,780px) + 200px);padding:24px;display:flex;overflow:auto}:where(.lensmap-viewer) .sidebar-resizer{cursor:col-resize;touch-action:none;-webkit-user-select:none;user-select:none;background:#23333f;border:none;width:10px;margin:0}:where(.lensmap-viewer) .sidebar-resizer:hover,:where(.lensmap-viewer) .sidebar-resizer:focus-visible{background:#659a9b}:where(.lensmap-viewer) .sidebar-section{border-top:1px solid #3a4855;padding:14px 0}:where(.lensmap-viewer) .sidebar-section>summary{color:#c3d5dc;cursor:pointer;font-size:12px;font-weight:600}:where(.lensmap-viewer) .sidebar-section[open]>summary{margin-bottom:16px}:where(.lensmap-viewer) .source-label{margin-bottom:8px;font-size:12px;display:block}:where(.lensmap-viewer) .playground textarea{resize:vertical;color:#dce9ed;tab-size:2;background:#101b24;border:1px solid #536b78;border-radius:6px;width:100%;height:360px;min-height:220px;padding:12px;font:12px/1.65 ui-monospace,monospace;display:block}:where(.lensmap-viewer) .editor-help,:where(.lensmap-viewer) .editor-state{color:#b0c2cd;font-size:11px;line-height:1.7}:where(.lensmap-viewer) .editor-state{overflow-wrap:anywhere}:where(.lensmap-viewer) .editor-actions{flex-wrap:wrap;gap:8px;margin-top:12px;display:flex}:where(.lensmap-viewer) .editor-actions button{font-size:12px}:where(.lensmap-viewer) .source-error{color:#ffc2b5;white-space:pre-wrap;overflow-wrap:anywhere;background:#412c2b;border-radius:6px;padding:12px;font-size:11px}:where(.lensmap-viewer) .empty-map{text-align:center;color:#b6cbd5;place-content:center;padding:32px;display:grid;position:absolute;inset:0}:where(.lensmap-viewer) .empty-map h2{font-family:Georgia,serif;font-weight:400}:where(.lensmap-viewer) .note-eyebrow{color:#a3c7c7;justify-content:space-between;margin-bottom:26px;display:flex}:where(.lensmap-viewer) .note-content{color:#c9d5df;overflow-wrap:anywhere;font-size:14px;line-height:1.8}:where(.lensmap-viewer) .note-content h2{color:#f0f4f6;margin:0 0 18px;font-family:Georgia,serif;font-size:30px;font-weight:400;line-height:1.25}:where(.lensmap-viewer) .note-content ul{padding-left:20px}:where(.lensmap-viewer) .note-content blockquote{border-left:2px solid #a9d7d2;margin-left:0;padding-left:16px;font-style:italic}:where(.lensmap-viewer) a{color:#a3d7ff;text-underline-offset:3px}:where(.lensmap-viewer) .outgoing{margin-top:0}:where(.lensmap-viewer) .outgoing button{text-align:left;background:0 0;border:none;justify-content:space-between;width:100%;padding:9px 0;font-size:13px;display:flex}:where(.lensmap-viewer) .outgoing button:hover{color:#aee2d7}:where(.lensmap-viewer) .outgoing p{color:#a4b5c2;font-size:12px}:where(.lensmap-viewer) .page-footer{color:#93a5b4;justify-content:space-between;gap:16px;padding-top:18px;font-size:10px;display:flex}:where(.lensmap-viewer) .sr-only{clip-path:inset(50%);white-space:nowrap;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}@media (width<=1100px){:where(.lensmap-viewer){padding:20px}:where(.lensmap-viewer) .masthead>p{display:none}:where(.lensmap-viewer) .toolbar{gap:9px}:where(.lensmap-viewer) .quiet{margin-left:0}}@media (width<=760px){:where(.lensmap-viewer){padding:14px}:where(.lensmap-viewer) .masthead{flex-wrap:wrap;gap:8px;margin-bottom:14px}:where(.lensmap-viewer) .phase{display:none}:where(.lensmap-viewer) .tag{font-size:10px}:where(.lensmap-viewer) .workspace{grid-template-columns:minmax(0,1fr)}:where(.lensmap-viewer) .map{height:510px}:where(.lensmap-viewer) .notes{border-top:1px solid #35434f;max-height:none}:where(.lensmap-viewer) .sidebar-resizer{display:none}:where(.lensmap-viewer) .note-eyebrow{margin-bottom:18px}:where(.lensmap-viewer) .page-footer{flex-direction:column;gap:7px}:where(.lensmap-viewer) .map-caption{font-size:9px}:where(.lensmap-viewer) .toolbar{padding:12px}:where(.lensmap-viewer) .strength{font-size:11px}:where(.lensmap-viewer) .strength input{width:70px}}:where(.lensmap-viewer).lensmap-embedded{max-width:none;margin:0;padding:0}:root{color:#e7eef4;--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark;font-synthesis:none;background:#10171f;font-family:Inter,ui-sans-serif,system-ui,sans-serif}*{box-sizing:border-box}body{min-width:320px;margin:0}button,input,textarea{font:inherit}button{color:inherit;cursor:pointer;background:#202c38;border:1px solid #374451;border-radius:8px;padding:8px 12px}button:hover{background:#2b3a49}button:disabled{opacity:.4;cursor:default}button:focus-visible,a:focus-visible,input:focus-visible,textarea:focus-visible,summary:focus-visible{outline-offset:4px;outline:3px solid #f7c46c}
1
+ :where(.lensmap-viewer){color:#e7eef4;--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark;font-synthesis:none;background:#10171f;font-family:Inter,ui-sans-serif,system-ui,sans-serif}:where(.lensmap-viewer),:where(.lensmap-viewer) *{box-sizing:border-box}:where(.lensmap-viewer) button,:where(.lensmap-viewer) input,:where(.lensmap-viewer) textarea{font:inherit}:where(.lensmap-viewer) button{color:inherit;cursor:pointer;background:#202c38;border:1px solid #374451;border-radius:8px;padding:8px 12px}:where(.lensmap-viewer) button:hover{background:#2b3a49}:where(.lensmap-viewer) button:disabled{opacity:.4;cursor:default}:where(.lensmap-viewer) button:focus-visible,:where(.lensmap-viewer) a:focus-visible,:where(.lensmap-viewer) input:focus-visible,:where(.lensmap-viewer) textarea:focus-visible,:where(.lensmap-viewer) summary:focus-visible,:where(.lensmap-viewer) .sidebar-resizer:focus-visible,:where(.lensmap-viewer) .map:focus-visible{outline-offset:4px;outline:3px solid #f7c46c}:where(.lensmap-viewer){max-width:1800px;margin:auto;padding:28px 36px 18px}:where(.lensmap-viewer) .masthead{align-items:center;gap:24px;margin-bottom:26px;display:flex}:where(.lensmap-viewer) .brand{align-items:center;gap:10px;display:flex}:where(.lensmap-viewer) h1{letter-spacing:-1px;margin:0;font-size:25px}:where(.lensmap-viewer) .brand-mark{color:#a9d7d2;font-size:34px}:where(.lensmap-viewer) .tag,:where(.lensmap-viewer) .phase,:where(.lensmap-viewer) .note-eyebrow,:where(.lensmap-viewer) .map-caption,:where(.lensmap-viewer) .page-footer{letter-spacing:.07em;font-family:ui-monospace,monospace;font-size:11px}:where(.lensmap-viewer) .tag{color:#abc4c8;background:#233238;border-radius:5px;margin-left:6px;padding:6px 8px}:where(.lensmap-viewer) .masthead>p{color:#9aaab8;font-size:13px}:where(.lensmap-viewer) .phase{color:#b4bec9;white-space:nowrap;margin-left:auto}:where(.lensmap-viewer) .workspace{grid-template-columns:minmax(0, 1fr) 10px var(--sidebar-width,340px);background:#16212b;border:1px solid #35434f;border-radius:16px;display:grid;overflow:hidden}:where(.lensmap-viewer) .workspace.canvas-only{grid-template-columns:minmax(0,1fr)}:where(.lensmap-viewer) .map-column{min-width:0}:where(.lensmap-viewer) .toolbar{background:#1b2732;border-bottom:1px solid #35434f;flex-wrap:wrap;align-items:center;gap:14px;padding:14px 18px;display:flex}:where(.lensmap-viewer) .segmented{background:#101b25;border:none;border-radius:9px;gap:3px;min-width:0;margin:0;padding:3px;display:flex}:where(.lensmap-viewer) .segmented button{color:#a7b7c6;background:0 0;border:none;font-size:12px}:where(.lensmap-viewer) .segmented button[aria-pressed=true]{color:#edf8f7;background:#365054}:where(.lensmap-viewer) .strength{color:#bdcbd6;align-items:center;gap:8px;font-size:12px;display:flex}:where(.lensmap-viewer) .strength input{accent-color:#9ad6c9;width:88px}:where(.lensmap-viewer) .strength output{font-variant-numeric:tabular-nums;min-width:28px}:where(.lensmap-viewer) .quiet{background:0 0;margin-left:auto;font-size:12px}:where(.lensmap-viewer) .map{isolation:isolate;cursor:grab;touch-action:none;-webkit-user-select:none;user-select:none;background-color:#14202a;background-image:radial-gradient(#3b4a553d 1px,#0000 1px);background-size:24px 24px;height:clamp(490px,67vh,780px);position:relative;overflow:hidden}:where(.lensmap-viewer) .map.dragging{cursor:grabbing}:where(.lensmap-viewer) .map.overview{cursor:default}:where(.lensmap-viewer) .graph-scene{transform-origin:50%;position:absolute;inset:0}:where(.lensmap-viewer) .focus-ring{pointer-events:none;border:1px solid #99cfcf15;border-radius:50%;width:260px;height:260px;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);box-shadow:0 0 100px 65px #9edbc704}:where(.lensmap-viewer) .map-caption{color:#98adb9;font-size:10px}:where(.lensmap-viewer) .connections{pointer-events:none;position:absolute;inset:0;overflow:visible}:where(.lensmap-viewer) .edge{fill:none;stroke-width:2.5px;opacity:.92}:where(.lensmap-viewer) .edge-hit{fill:none;stroke:#0000;stroke-width:16px;pointer-events:stroke}:where(.lensmap-viewer) .destination-icon{font-size:1.4em;display:block}:where(.lensmap-viewer) .portal-actions p{overflow-wrap:anywhere}:where(.lensmap-viewer) .edge.context{opacity:.45}:where(.lensmap-viewer) .neighbourhood-action{font-size:12px}:where(.lensmap-viewer) .neighbourhood-label{color:#a9d7d2;font-size:11px}:where(.lensmap-viewer) .edge.connected{stroke-width:3.5px;opacity:1;filter:drop-shadow(0 0 2px)drop-shadow(0 0 6px)}:where(.lensmap-viewer) .edge.connection-preview{stroke-width:4px;opacity:1;filter:drop-shadow(0 0 2px #d5f4ed)drop-shadow(0 0 7px)}:where(.lensmap-viewer) .connection-chooser{z-index:6;-webkit-user-select:text;user-select:text;background:#162832f5;border:1px solid #89bfb3;border-radius:10px;flex-direction:column;width:min(290px,100% - 24px);max-height:45%;padding:12px;font-size:11px;display:flex;position:absolute;top:12px;right:12px}:where(.lensmap-viewer) .connection-chooser h2{margin:0 0 6px;font-size:13px}:where(.lensmap-viewer) .connection-chooser p{margin:0 0 8px;line-height:1.4}:where(.lensmap-viewer) .connection-chooser ol{min-height:0;margin:0 0 8px;padding:0;list-style:none;overflow:auto}:where(.lensmap-viewer) .connection-chooser li+li{margin-top:5px}:where(.lensmap-viewer) .connection-option{text-align:left;overflow-wrap:anywhere;width:100%;padding:7px 9px}:where(.lensmap-viewer) .connection-chooser strong,:where(.lensmap-viewer) .connection-chooser span{display:block}:where(.lensmap-viewer) .connection-chooser span{color:#bdcbd6;margin-top:3px}:where(.lensmap-viewer) .connection-option[aria-pressed=true]{background:#304c51;border-color:#d5f4ed}:where(.lensmap-viewer) .connection-chooser .outside-view{color:#f7c46c}:where(.lensmap-viewer) .connection-actions{flex-wrap:wrap;gap:6px;display:flex}:where(.lensmap-viewer) .connection-actions button{padding:6px 8px;font-size:11px}:where(.lensmap-viewer) .edge-halo{fill:none;stroke:#14202a;stroke-width:8px}:where(.lensmap-viewer) .node{text-align:center;transform-origin:50%;background:#1d303d;border:1.8px solid;border-radius:50%;justify-content:center;align-items:center;width:86px;height:86px;padding:10px;font-size:12px;line-height:1.3;display:flex;position:absolute;box-shadow:0 5px 12px #0003}:where(.lensmap-viewer) .node>span{-webkit-line-clamp:3;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}:where(.lensmap-viewer) .node.connected,:where(.lensmap-viewer) .node.selected{box-shadow:0 0 5px 1px var(--branch-colour), 0 0 18px color-mix(in srgb, var(--branch-colour) 80%, transparent), inset 0 0 8px color-mix(in srgb, var(--branch-colour) 30%, transparent);border-width:2.5px}:where(.lensmap-viewer) .node:hover{z-index:3;background:#334754}:where(.lensmap-viewer) .node.selected{filter:brightness(1.15);z-index:2;background:#2d4651}:where(.lensmap-viewer) .node:focus-visible{z-index:4;outline-offset:5px;outline:3px solid #f7c46c}:where(.lensmap-viewer) .node[data-keyboard-target=true]:after{content:"";pointer-events:none;border:2px dashed #d5f4ed;border-radius:50%;position:absolute;inset:-10px}:where(.lensmap-viewer) .keyboard-target-label{color:#d5f4ed}:where(.lensmap-viewer) .node.unresolved{border-style:dashed;font-size:26px}:where(.lensmap-viewer) .map.dragging .node{cursor:grabbing}:where(.lensmap-viewer) .zoom-controls{z-index:5;background:#18242ff5;border:1px solid #3b4a55;border-radius:10px;align-items:center;gap:6px;padding:4px;display:flex;position:absolute;bottom:18px;left:18px}:where(.lensmap-viewer) .zoom-controls button{background:0 0;border:none;padding:3px 10px;font-size:20px}:where(.lensmap-viewer) .zoom-controls output{text-align:center;min-width:42px;font-size:12px}:where(.lensmap-viewer) .map-footer{color:#aebfca;border-top:1px solid #35434f;padding:13px 18px;font-size:11px}:where(.lensmap-viewer) .map-footer p{margin:0 0 9px;line-height:1.6}:where(.lensmap-viewer) .legend{color:#d4dfeb;gap:22px;display:flex}:where(.lensmap-viewer) .notes{background:#1c2833;flex-direction:column;min-width:0;max-height:calc(clamp(490px,67vh,780px) + 200px);padding:24px;display:flex;overflow:auto}:where(.lensmap-viewer) .sidebar-resizer{cursor:col-resize;touch-action:none;-webkit-user-select:none;user-select:none;background:#23333f;border:none;width:10px;margin:0}:where(.lensmap-viewer) .sidebar-resizer:hover,:where(.lensmap-viewer) .sidebar-resizer:focus-visible{background:#659a9b}:where(.lensmap-viewer) .sidebar-section{border-top:1px solid #3a4855;padding:14px 0}:where(.lensmap-viewer) .sidebar-section>summary{color:#c3d5dc;cursor:pointer;font-size:12px;font-weight:600}:where(.lensmap-viewer) .sidebar-section[open]>summary{margin-bottom:16px}:where(.lensmap-viewer) .source-label{margin-bottom:8px;font-size:12px;display:block}:where(.lensmap-viewer) .playground textarea{resize:vertical;color:#dce9ed;tab-size:2;background:#101b24;border:1px solid #536b78;border-radius:6px;width:100%;height:360px;min-height:220px;padding:12px;font:12px/1.65 ui-monospace,monospace;display:block}:where(.lensmap-viewer) .editor-help,:where(.lensmap-viewer) .editor-state{color:#b0c2cd;font-size:11px;line-height:1.7}:where(.lensmap-viewer) .editor-state{overflow-wrap:anywhere}:where(.lensmap-viewer) .editor-actions{flex-wrap:wrap;gap:8px;margin-top:12px;display:flex}:where(.lensmap-viewer) .editor-actions button{font-size:12px}:where(.lensmap-viewer) .source-error{color:#ffc2b5;white-space:pre-wrap;overflow-wrap:anywhere;background:#412c2b;border-radius:6px;padding:12px;font-size:11px}:where(.lensmap-viewer) .empty-map{text-align:center;color:#b6cbd5;place-content:center;padding:32px;display:grid;position:absolute;inset:0}:where(.lensmap-viewer) .empty-map h2{font-family:Georgia,serif;font-weight:400}:where(.lensmap-viewer) .note-eyebrow{color:#a3c7c7;justify-content:space-between;margin-bottom:26px;display:flex}:where(.lensmap-viewer) .note-content{color:#c9d5df;overflow-wrap:anywhere;font-size:14px;line-height:1.8}:where(.lensmap-viewer) .note-content h2{color:#f0f4f6;margin:0 0 18px;font-family:Georgia,serif;font-size:30px;font-weight:400;line-height:1.25}:where(.lensmap-viewer) .note-content ul{padding-left:20px}:where(.lensmap-viewer) .note-content blockquote{border-left:2px solid #a9d7d2;margin-left:0;padding-left:16px;font-style:italic}:where(.lensmap-viewer) a{color:#a3d7ff;text-underline-offset:3px}:where(.lensmap-viewer) .outgoing{margin-top:0}:where(.lensmap-viewer) .outgoing button{text-align:left;background:0 0;border:none;justify-content:space-between;width:100%;padding:9px 0;font-size:13px;display:flex}:where(.lensmap-viewer) .outgoing button:hover{color:#aee2d7}:where(.lensmap-viewer) .outgoing p{color:#a4b5c2;font-size:12px}:where(.lensmap-viewer) .page-footer{color:#93a5b4;justify-content:space-between;gap:16px;padding-top:18px;font-size:10px;display:flex}:where(.lensmap-viewer) .sr-only{clip-path:inset(50%);white-space:nowrap;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}@media (width<=1100px){:where(.lensmap-viewer){padding:20px}:where(.lensmap-viewer) .masthead>p{display:none}:where(.lensmap-viewer) .toolbar{gap:9px}:where(.lensmap-viewer) .quiet{margin-left:0}}@media (width<=760px){:where(.lensmap-viewer){padding:14px}:where(.lensmap-viewer) .masthead{flex-wrap:wrap;gap:8px;margin-bottom:14px}:where(.lensmap-viewer) .phase{display:none}:where(.lensmap-viewer) .tag{font-size:10px}:where(.lensmap-viewer) .workspace{grid-template-columns:minmax(0,1fr)}:where(.lensmap-viewer) .map{height:510px}:where(.lensmap-viewer) .notes{border-top:1px solid #35434f;max-height:none}:where(.lensmap-viewer) .sidebar-resizer{display:none}:where(.lensmap-viewer) .note-eyebrow{margin-bottom:18px}:where(.lensmap-viewer) .page-footer{flex-direction:column;gap:7px}:where(.lensmap-viewer) .map-caption{font-size:9px}:where(.lensmap-viewer) .toolbar{padding:12px}:where(.lensmap-viewer) .strength{font-size:11px}:where(.lensmap-viewer) .strength input{width:70px}}:where(.lensmap-viewer).lensmap-embedded{max-width:none;margin:0;padding:0}:where(.lensmap-viewer) .node[data-auto-size=true]>.node-summary{-webkit-line-clamp:unset;overflow-wrap:anywhere;display:block;overflow:visible}:where(.lensmap-viewer) .node-icon{flex-shrink:0}:where(.lensmap-viewer) .node .destination-icon{color:#e7eef4;background:#14202a;border-radius:4px;flex-shrink:0}:root{color:#e7eef4;--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark;font-synthesis:none;background:#10171f;font-family:Inter,ui-sans-serif,system-ui,sans-serif}*{box-sizing:border-box}body{min-width:320px;margin:0}button,input,textarea{font:inherit}button{color:inherit;cursor:pointer;background:#202c38;border:1px solid #374451;border-radius:8px;padding:8px 12px}button:hover{background:#2b3a49}button:disabled{opacity:.4;cursor:default}button:focus-visible,a:focus-visible,input:focus-visible,textarea:focus-visible,summary:focus-visible{outline-offset:4px;outline:3px solid #f7c46c}