graview 0.1.59 → 0.1.60
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -2
- package/dist/preview/chunk.2K4TT2BV.js +1 -0
- package/dist/preview/{chunk.J4HTSXUA.js → chunk.2USDHXB4.js} +1 -1
- package/dist/preview/{chunk.LHJWII6C.js → chunk.37TVS7CA.js} +1 -1
- package/dist/preview/chunk.3IZ3ABII.js +1 -0
- package/dist/preview/{chunk.E22DDEQI.js → chunk.3MOJF7BA.js} +1 -1
- package/dist/preview/{chunk.2XTCDFWU.js → chunk.3UOKUF5Z.js} +1 -1
- package/dist/preview/{chunk.MOAUE3N2.js → chunk.3V4WP7RY.js} +3 -3
- package/dist/preview/{chunk.IZ2ZTNEV.js → chunk.3XGA65Y3.js} +1 -1
- package/dist/preview/{chunk.TCPTVTFU.js → chunk.3ZT5WQYL.js} +1 -1
- package/dist/preview/{chunk.DWHPZBPZ.js → chunk.4LR64TPU.js} +1 -1
- package/dist/preview/{chunk.VNJKGSGZ.js → chunk.4MP72LPR.js} +1 -1
- package/dist/preview/{chunk.IPPZEGBX.js → chunk.4TCKEG6I.js} +1 -1
- package/dist/preview/{chunk.EZ3CRUBU.js → chunk.5DD62IOW.js} +2 -2
- package/dist/preview/{chunk.DGM3Y2FB.js → chunk.5YOLUDVO.js} +1 -1
- package/dist/preview/{chunk.VFRURRNI.js → chunk.67U6M7OV.js} +1 -1
- package/dist/preview/{chunk.2NJDT47T.js → chunk.6C2MHWSX.js} +1 -1
- package/dist/preview/{chunk.CYUMQPMH.js → chunk.6HF6POIX.js} +1 -1
- package/dist/preview/{chunk.KOGUYWHG.js → chunk.6WHAWOO7.js} +1 -1
- package/dist/preview/{chunk.N4LOI3YA.js → chunk.6ZQAR5ZA.js} +1 -1
- package/dist/preview/{chunk.2QESVWUW.js → chunk.7MHCGVGM.js} +1 -1
- package/dist/preview/{chunk.VNBEAF62.js → chunk.7N32AVIJ.js} +1 -1
- package/dist/preview/{chunk.CIB65YO6.js → chunk.7OPM55I2.js} +1 -1
- package/dist/preview/chunk.7TFLRR7D.js +1 -0
- package/dist/preview/{chunk.Q6LLURRM.js → chunk.7VKSXGTX.js} +1 -1
- package/dist/preview/{chunk.CLR6KAA3.js → chunk.A3ZXDG6V.js} +1 -1
- package/dist/preview/{chunk.2FOIJ5ID.js → chunk.A5PDXNY6.js} +1 -1
- package/dist/preview/{chunk.6O3YPUW3.js → chunk.AVBTPSQF.js} +1 -1
- package/dist/preview/{chunk.ZT3NEAFI.js → chunk.BF6S5UE4.js} +1 -1
- package/dist/preview/chunk.BLPYNNR4.js +1 -0
- package/dist/preview/{chunk.BDBLGGFJ.js → chunk.BQIHNT7C.js} +1 -1
- package/dist/preview/{chunk.B5HLA45D.js → chunk.BRT27WON.js} +1 -1
- package/dist/preview/{chunk.DO45KXLM.js → chunk.BXDM3UMN.js} +1 -1
- package/dist/preview/chunk.BYKD5RLA.js +1 -0
- package/dist/preview/chunk.C7OLSEWK.js +1 -0
- package/dist/preview/{chunk.WGTBQHHE.js → chunk.CC5BJH5A.js} +1 -1
- package/dist/preview/{chunk.HF5SNUTK.js → chunk.CFKZXLXS.js} +1 -1
- package/dist/preview/chunk.CMN6BBAD.js +1 -0
- package/dist/preview/{chunk.Z4CJJ4QP.js → chunk.CQT3W2SF.js} +1 -1
- package/dist/preview/{chunk.NOLGJFA4.js → chunk.D7YSL3NK.js} +2 -2
- package/dist/preview/{chunk.G2TCFWYX.js → chunk.DCHQHKSA.js} +1 -1
- package/dist/preview/{chunk.UFTAGUTU.js → chunk.EL5ICOOM.js} +1 -1
- package/dist/preview/{chunk.OVSZXILB.js → chunk.ENL2JJ47.js} +1 -1
- package/dist/preview/chunk.EQXB7LKI.js +1 -0
- package/dist/preview/{chunk.KE6ZRUMP.js → chunk.ERFT54HT.js} +1 -1
- package/dist/preview/{chunk.P6CHNBRR.js → chunk.F6V7RWDK.js} +1 -1
- package/dist/preview/{chunk.GDUM2UOM.js → chunk.FBJARKDT.js} +1 -1
- package/dist/preview/{chunk.QL555VQ2.js → chunk.FC6AF6CC.js} +1 -1
- package/dist/preview/{chunk.HVUUJQRE.js → chunk.FFTYMBBT.js} +1 -1
- package/dist/preview/chunk.FLUK3UXF.js +1 -0
- package/dist/preview/{chunk.UM5H2VVR.js → chunk.FRYBMS3W.js} +1 -1
- package/dist/preview/chunk.G3R4BTI7.js +1 -0
- package/dist/preview/{chunk.GQHFLOTZ.js → chunk.G4YJPKRG.js} +2 -2
- package/dist/preview/{chunk.MHILFBK6.js → chunk.GLWSVSQL.js} +1 -1
- package/dist/preview/{chunk.WTUB7W2D.js → chunk.GNBIVVL3.js} +1 -1
- package/dist/preview/{chunk.SU6WKQ73.js → chunk.GTKJJYQH.js} +1 -1
- package/dist/preview/{chunk.VS25R6R2.js → chunk.H45Q3O4F.js} +1 -1
- package/dist/preview/{chunk.6N7LNTB6.js → chunk.HDP3PS7N.js} +1 -1
- package/dist/preview/{chunk.QLTHHWBA.js → chunk.HDUO2USQ.js} +1 -1
- package/dist/preview/{chunk.2MFXP3FB.js → chunk.HUJ6YTWE.js} +1 -1
- package/dist/preview/{chunk.2FP4KEEG.js → chunk.I4XQBQRC.js} +1 -1
- package/dist/preview/chunk.IBOKXVWN.js +1 -0
- package/dist/preview/{chunk.4T5QIZKB.js → chunk.IGJZ4UH3.js} +2 -2
- package/dist/preview/{chunk.4QWTSI7V.js → chunk.IGVASEZU.js} +1 -1
- package/dist/preview/{chunk.CZH27V2R.js → chunk.IHBUBZQT.js} +1 -1
- package/dist/preview/chunk.IOK4GVJC.js +1 -0
- package/dist/preview/{chunk.ZUKYMU6C.js → chunk.JEYQBH33.js} +1 -1
- package/dist/preview/{chunk.S6VON4LU.js → chunk.JJGCTGWA.js} +1 -1
- package/dist/preview/{chunk.LKE2FBXL.js → chunk.JPONLMU7.js} +1 -1
- package/dist/preview/{chunk.Q3Y5EV5A.js → chunk.KBVTLNS5.js} +3 -3
- package/dist/preview/{chunk.YMRVKG6W.js → chunk.KDRLUBVF.js} +1 -1
- package/dist/preview/{chunk.YGZCESXY.js → chunk.KGW75Z5L.js} +1 -1
- package/dist/preview/{chunk.R4YDAJRL.js → chunk.KI37ZEV3.js} +1 -1
- package/dist/preview/chunk.L6AWE76F.js +1 -0
- package/dist/preview/{chunk.NIFQDN6R.js → chunk.LGEA5257.js} +1 -1
- package/dist/preview/{chunk.KKQXGN5U.js → chunk.LLYRFVIN.js} +1 -1
- package/dist/preview/{chunk.WEGPDJTB.js → chunk.LQVAABPS.js} +1 -1
- package/dist/preview/{chunk.4OMOP77U.js → chunk.LSY256J4.js} +1 -1
- package/dist/preview/{chunk.OLW44AP5.js → chunk.LZIBQ3VX.js} +1 -1
- package/dist/preview/{chunk.W2VOD6SD.js → chunk.M4UD4ARP.js} +1 -1
- package/dist/preview/chunk.MDJWK5W2.js +1 -0
- package/dist/preview/{chunk.QT6UV7HN.js → chunk.MJVYWLQQ.js} +1 -1
- package/dist/preview/{chunk.NSGQXCH6.js → chunk.MSWWWLEA.js} +1 -1
- package/dist/preview/{chunk.XOTES3PI.js → chunk.MVWC3VR3.js} +2 -2
- package/dist/preview/{chunk.V6EEDYYW.js → chunk.NC7FXY2H.js} +1 -1
- package/dist/preview/{chunk.MRYN42EQ.js → chunk.NGTRL5U4.js} +1 -1
- package/dist/preview/{chunk.ZLMI2NHC.js → chunk.NHUQ2N6J.js} +1 -1
- package/dist/preview/{chunk.LDYOQCY7.js → chunk.OLFJH4RK.js} +1 -1
- package/dist/preview/{chunk.3UTRR5YM.js → chunk.P6RORYOT.js} +1 -1
- package/dist/preview/{chunk.T227XQIO.js → chunk.PFSYXD6Q.js} +1 -1
- package/dist/preview/chunk.PHJ6WPWH.js +1 -0
- package/dist/preview/{chunk.HKINU7VO.js → chunk.PI44XMY2.js} +1 -1
- package/dist/preview/{chunk.P3CUCDHO.js → chunk.PNW5K7BW.js} +1 -1
- package/dist/preview/{chunk.6VNKGTLF.js → chunk.QBLKTFF4.js} +1 -1
- package/dist/preview/{chunk.ATVPAYS6.js → chunk.QDSEVPF3.js} +1 -1
- package/dist/preview/chunk.QFUMFQJU.js +1 -0
- package/dist/preview/{chunk.JPNBQFJ3.js → chunk.QHDCTAD7.js} +1 -1
- package/dist/preview/{chunk.P52UTBNO.js → chunk.QI4SLPQ4.js} +2 -2
- package/dist/preview/{chunk.ATSKKTUO.js → chunk.RQOX5YDW.js} +1 -1
- package/dist/preview/{chunk.VDGMFX5C.js → chunk.RXYNW5QB.js} +1 -1
- package/dist/preview/{chunk.ROHSF4WM.js → chunk.SB2PZKN5.js} +1 -1
- package/dist/preview/{chunk.3XIIJHQ6.js → chunk.SRVQJZRT.js} +1 -1
- package/dist/preview/{chunk.BPC4XQFZ.js → chunk.T7LQD67N.js} +2 -2
- package/dist/preview/{chunk.D3AISGQH.js → chunk.TAT2IQUR.js} +1 -1
- package/dist/preview/{chunk.E2REVMAG.js → chunk.TFWIG6LL.js} +1 -1
- package/dist/preview/{chunk.U5PX2ECA.js → chunk.TKVLNBRD.js} +1 -1
- package/dist/preview/{chunk.KSVJHSRH.js → chunk.TLJOZSDD.js} +1 -1
- package/dist/preview/{chunk.VGHZQEHS.js → chunk.TLWT67ON.js} +1 -1
- package/dist/preview/{chunk.AXXYJCSW.js → chunk.TY4GQJKC.js} +1 -1
- package/dist/preview/{chunk.SZG6HJWH.js → chunk.UITT6JWW.js} +1 -1
- package/dist/preview/{chunk.UHUBQ4EX.js → chunk.UJTE7UAP.js} +1 -1
- package/dist/preview/{chunk.GR2B7SKI.js → chunk.ULL6ZIJJ.js} +1 -1
- package/dist/preview/{chunk.HJOVOA52.js → chunk.UQWTZJBV.js} +1 -1
- package/dist/preview/{chunk.7JOG6XFC.js → chunk.URWAFZHF.js} +1 -1
- package/dist/preview/{chunk.BFN6B4C4.js → chunk.VADQ7ZGA.js} +1 -1
- package/dist/preview/chunk.VDMDPZ6U.js +1 -0
- package/dist/preview/{chunk.ZFH4SCCF.js → chunk.VFOON3Z3.js} +1 -1
- package/dist/preview/{chunk.QXMQUIQZ.js → chunk.VMV464JK.js} +1 -1
- package/dist/preview/{chunk.CUJX3IVA.js → chunk.VNDKKTED.js} +1 -1
- package/dist/preview/chunk.VSCIXAHN.js +5 -0
- package/dist/preview/{chunk.IIESMHXY.js → chunk.VUBNBTJP.js} +2 -2
- package/dist/preview/{chunk.MZJ3KTEU.js → chunk.VWJGQDCE.js} +1 -1
- package/dist/preview/{chunk.UITZ74YJ.js → chunk.VZJWJ5XM.js} +1 -1
- package/dist/preview/{chunk.RKZ4J3H2.js → chunk.W3W54DSX.js} +1 -1
- package/dist/preview/{chunk.6IUEGPCZ.js → chunk.WC3DENU4.js} +2 -2
- package/dist/preview/chunk.WQ6RCEUQ.js +1 -0
- package/dist/preview/{chunk.QC4YXFF7.js → chunk.WXUFATY5.js} +1 -1
- package/dist/preview/{chunk.QHU3KUZZ.js → chunk.X6A4VSSD.js} +1 -1
- package/dist/preview/{chunk.U7G56KXT.js → chunk.XGASJAV2.js} +1 -1
- package/dist/preview/{chunk.M3JIIF32.js → chunk.XR6YR6RV.js} +1 -1
- package/dist/preview/chunk.XZPKBHJT.js +1 -0
- package/dist/preview/{chunk.S7ZLGODY.js → chunk.Y5C4RXG7.js} +1 -1
- package/dist/preview/{chunk.L3K25NCS.js → chunk.Y7G3OGDE.js} +1 -1
- package/dist/preview/{chunk.E4SYOBGB.js → chunk.YEBGI6ED.js} +1 -1
- package/dist/preview/{chunk.G7HIAUEA.js → chunk.YFSBVZTG.js} +1 -1
- package/dist/preview/chunk.YFVJUHAK.js +1 -0
- package/dist/preview/{chunk.7XSDXX5Z.js → chunk.YH63KQ2G.js} +1 -1
- package/dist/preview/{chunk.F6P3WSMW.js → chunk.YZ7FUKAL.js} +1 -1
- package/dist/preview/{chunk.7AMBLGVB.js → chunk.Z2ERZ4S6.js} +1 -1
- package/dist/preview/{chunk.X2G4ZRB2.js → chunk.ZP5RT2EK.js} +1 -1
- package/dist/preview/{chunk.PS5SEND3.js → chunk.ZXOT3IXJ.js} +1 -1
- package/dist/preview/{chunk.EGJUFZD5.js → chunk.ZYM2SSGW.js} +1 -1
- package/dist/preview/index.html +50 -50
- package/dist/preview/page.js +2 -2
- package/package.json +6 -6
- package/dist/preview/chunk.3XLOFZRM.js +0 -1
- package/dist/preview/chunk.6BLNFVB4.js +0 -1
- package/dist/preview/chunk.6E36I2GC.js +0 -1
- package/dist/preview/chunk.CJUIJ6TL.js +0 -1
- package/dist/preview/chunk.FJTVY6AE.js +0 -1
- package/dist/preview/chunk.KHZA5F7A.js +0 -1
- package/dist/preview/chunk.LDLTQNJ2.js +0 -1
- package/dist/preview/chunk.MMWLLWFS.js +0 -1
- package/dist/preview/chunk.PCVPH5KM.js +0 -1
- package/dist/preview/chunk.QDZAITMN.js +0 -1
- package/dist/preview/chunk.U37WZMUO.js +0 -1
- package/dist/preview/chunk.U5JFW2YM.js +0 -1
- package/dist/preview/chunk.V5MOMBZG.js +0 -1
- package/dist/preview/chunk.VUSJ7HPC.js +0 -1
- package/dist/preview/chunk.VXRECLX6.js +0 -1
- package/dist/preview/chunk.W66VMALY.js +0 -1
- package/dist/preview/chunk.WGVIJDV5.js +0 -1
- package/dist/preview/chunk.X3MMJ3QC.js +0 -5
- package/dist/preview/chunk.X5YRNNHU.js +0 -1
- package/dist/preview/chunk.YMC2T2HN.js +0 -1
- package/dist/preview/chunk.YN6BXZHO.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
var __graviewPreload=(base,files)=>{if(typeof document>"u")return;const asked=globalThis.__graviewPreloaded??=new Set;for(const file of files){const href=new URL(file,base).href;if(asked.has(href))continue;asked.add(href);const link=document.createElement("link");link.rel="modulepreload";link.href=href;document.head.append(link)}};import{b as v}from"./chunk.
|
|
1
|
+
var __graviewPreload=(base,files)=>{if(typeof document>"u")return;const asked=globalThis.__graviewPreloaded??=new Set;for(const file of files){const href=new URL(file,base).href;if(asked.has(href))continue;asked.add(href);const link=document.createElement("link");link.rel="modulepreload";link.href=href;document.head.append(link)}};import{b as v}from"./chunk.VUBNBTJP.js";import"./chunk.WC3DENU4.js";import"./chunk.VNDKKTED.js";import{G as S,S as y,T as b}from"./chunk.4MP72LPR.js";import"./chunk.SDO3U72B.js";import"./chunk.VSCIXAHN.js";import"./chunk.FQLNBIQ5.js";import{b as u}from"./chunk.AJZBJBMO.js";var r=u(S(),1);var t=u(b(),1);function E(o){let a=(0,r.useContext)(y),l=(0,t.jsx)(C,{...o});return!a||o.nodeId===void 0?l:(0,t.jsx)(P,{nodeId:o.nodeId,field:o.field,label:o.label,...o.markdown?{markdown:!0}:{},live:a,onDone:d=>o.onDone?o.onDone(d):o.onCancel(),writtenWhole:l})}var P=(0,r.lazy)(()=>(__graviewPreload(import.meta.url,["./chunk.VUBNBTJP.js","./chunk.WC3DENU4.js","./chunk.VNDKKTED.js","./chunk.4MP72LPR.js","./chunk.SDO3U72B.js","./chunk.VSCIXAHN.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.VDMDPZ6U.js")));function C({field:o,label:a,value:l,markdown:d,onSave:s,onCancel:c}){let[i,h]=(0,r.useState)(l),[n,w]=(0,r.useState)(!1),f=(0,r.useRef)(null);return(0,r.useEffect)(()=>f.current?.focus(),[n]),(0,r.useLayoutEffect)(()=>{let e=f.current;if(!e||n||typeof CSS<"u"&&CSS.supports?.("field-sizing","content"))return;let p=()=>{e.style.height="auto";let m=getComputedStyle(e);e.style.height=`${e.scrollHeight+parseFloat(m.borderTopWidth)+parseFloat(m.borderBottomWidth)}px`};p();let x=requestAnimationFrame(p);return()=>cancelAnimationFrame(x)},[i,n]),(0,t.jsxs)("form",{style:{display:"grid",gap:8,minWidth:0},onSubmit:e=>{e.preventDefault(),s(i,!1)},children:[n?(0,t.jsx)("div",{"data-graview-preview":o,"aria-label":`${a}, as it will read`,role:"region",style:k,children:(0,t.jsx)(v,{text:i,markdown:!0})}):(0,t.jsx)("textarea",{ref:f,"aria-label":a,"data-graview-field":o,value:i,rows:3,onChange:e=>h(e.target.value),onKeyDown:e=>{e.key==="Escape"?(e.preventDefault(),c()):e.key==="Enter"&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),s(i,!1))},onBlur:e=>{e.relatedTarget instanceof Node&&e.currentTarget.form?.contains(e.relatedTarget)||s(i,!0)},style:T}),(0,t.jsxs)("div",{style:{display:"flex",flexWrap:"wrap",alignItems:"center",gap:8},children:[(0,t.jsx)("button",{type:"submit",style:g,children:"Save"}),(0,t.jsx)("button",{type:"button",onClick:c,style:g,children:"Cancel"}),d?(0,t.jsx)("button",{type:"button","aria-pressed":n,onClick:()=>w(!n),style:g,children:n?"Write":"Preview"}):null,(0,t.jsx)("span",{style:{fontSize:"0.75rem",color:"var(--graview-ink-faint)"},children:"Ctrl or \u2318 Enter saves \xB7 Esc puts it back"})]})]})}var k={minHeight:"7.5em",padding:"8px 10px",border:"1px dashed var(--graview-edge-bright)",borderRadius:6,lineHeight:1.6,minWidth:0},g={font:"inherit",fontSize:"0.8125rem",minHeight:28,padding:"2px 12px"},T={font:"inherit",lineHeight:1.5,width:"100%",boxSizing:"border-box",minHeight:"7.5em",padding:"8px 10px",resize:"vertical",fieldSizing:"content",color:"var(--graview-ink)",background:"var(--graview-panel, transparent)",border:"1px solid var(--graview-edge-bright)",borderRadius:6};export{E as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{E as b,N as w,O as N,P as S,R as O,S as W,W as m}from"./chunk.
|
|
1
|
+
import{E as b,N as w,O as N,P as S,R as O,S as W,W as m}from"./chunk.VSCIXAHN.js";var x=864e5,L=/^(\d{4})-(\d{2})-(\d{2})/,g=e=>String(e).padStart(2,"0"),A=e=>new Date(e).toISOString().slice(0,10),a=e=>Date.UTC(+e.slice(0,4),+e.slice(5,7)-1,+e.slice(8,10)),p=(e,n)=>A(a(e)+n*x),F=e=>new Date(a(e)).getUTCDay();function c(e,n,r){if(!(n>=1&&n<=12&&r>=1&&r<=31))return;let i=`${String(e).padStart(4,"0")}-${g(n)}-${g(r)}`;return A(a(i))===i?i:void 0}function I(e=new Date){let n=N();return n?O(e.getTime(),n):{day:`${e.getFullYear()}-${g(e.getMonth()+1)}-${g(e.getDate())}`,minutes:e.getHours()*60+e.getMinutes()}}var h=e=>/T\d\d:\d\d(:[\d.]+)?(Z|[+-]\d\d:?\d\d)$/.test(e);function l(e){if(typeof e!="string")return;if(h(e)){let i=new Date(e);return Number.isNaN(i.getTime())?void 0:I(i)}let n=/^(\d{4})-(\d{2})-(\d{2})(?:[T ](\d{2}):(\d{2}))?/.exec(e);if(!n||!c(Number(n[1]),Number(n[2]),Number(n[3])))return;let r=e.slice(0,10);return n[4]===void 0?{day:r}:{day:r,minutes:Number(n[4])*60+Number(n[5])}}function D(e,n){if(!n.time)return e.day;let r=e.minutes??9*60;if(!n.instant)return`${e.day}T${g(Math.floor(r/60))}:${g(r%60)}`;let i=N(),[,t,o,d]=L.exec(e.day);return(i?new Date(W(e.day,r,i)):new Date(Number(t),Number(o)-1,Number(d),Math.floor(r/60),r%60)).toISOString().replace(/\.\d{3}Z$/,"Z")}function P(e,n=new Date){let r=S(),i=r;try{i=new Intl.DateTimeFormat(e??b,{timeZoneName:"short",timeZone:r}).formatToParts(n).find(t=>t.type==="timeZoneName")?.value??r}catch{i=r}return{zone:r,short:i}}function z(e,n,r,i){let t=l(n);if(!t)return r;let o=e===void 0?void 0:l(e),d=r===void 0?void 0:l(r),u=s=>a(s.day)+(s.minutes??0)*6e4,f=(s,$)=>{let y=u(s)+$;return{day:A(y),...i.time?{minutes:Math.round(y%x/6e4)}:{}}};return o&&d?D(f(d,u(t)-u(o)),i):d&&u(d)>=u(t)?r:i.time?D(f(t,36e5),i):r}var Y=/^(start|starts|startsAt|startsOn|startAt|begins|from|opens|checkIn)$/i,B=/^(end|ends|endsAt|endsOn|endAt|until|to|finish|finishes|closes|through|checkOut)$/i;function Z(e,n={}){let r=(n.start&&e.includes(n.start)?n.start:void 0)??e.find(t=>Y.test(t)),i=(n.end&&e.includes(n.end)?n.end:void 0)??e.find(t=>t!==r&&B.test(t));return r&&i?{start:r,end:i}:void 0}var C=["jan","feb","mar","apr","may","jun","jul","aug","sep","oct","nov","dec"],H=["sun","mon","tue","wed","thu","fri","sat"],T="(jan(?:uary)?|feb(?:ruary)?|mar(?:ch)?|apr(?:il)?|may|june?|july?|aug(?:ust)?|sept?(?:ember)?|oct(?:ober)?|nov(?:ember)?|dec(?:ember)?)",E="(sun(?:day)?|mon(?:day)?|tue(?:s|sday)?|wed(?:nesday)?|thu(?:r|rs|rsday)?|fri(?:day)?|sat(?:urday)?)",_=e=>C.indexOf(e.slice(0,3))+1,M=e=>e===void 0?void 0:e.length===2?2e3+Number(e):Number(e);function U(e){try{let n=new Intl.DateTimeFormat(e,{month:"numeric",day:"numeric"}).formatToParts(0).map(r=>r.type);return n.indexOf("month")<n.indexOf("day")}catch{return!0}}function v(e){let n=(t,o)=>({minutes:o,rest:`${e.slice(0,t.index)} ${e.slice(t.index+t[0].length)}`}),r=/\b(noon|midday)\b/.exec(e);if(r)return n(r,12*60);if(r=/\bmidnight\b/.exec(e),r)return n(r,0);if(r=/\b(\d{1,2})(?::(\d{2}))?\s*([ap])\.?m?\.?(?=\s|$)/.exec(e),r){let t=Number(r[1]),o=Number(r[2]??0);return t<1||t>12||o>59?{rest:e,bad:!0}:n(r,(t%12+(r[3]==="p"?12:0))*60+o)}if(r=/\b(\d{1,2}):(\d{2})\b/.exec(e),r){let t=Number(r[1]),o=Number(r[2]);return t>23||o>59?{rest:e,bad:!0}:n(r,t*60+o)}if(r=/\bat\s+(\d{1,2})\b/.exec(e),r){let t=Number(r[1]);return t>23?{rest:e,bad:!0}:n(r,(t>=1&&t<=7?t+12:t)*60)}let i=/\b(morning|afternoon|evening|tonight)\b/.exec(e);return i?{minutes:{morning:9,afternoon:15,evening:18,tonight:20}[i[1]]*60,rest:i[1]==="tonight"?`${e.slice(0,i.index)} today ${e.slice(i.index+i[0].length)}`:`${e.slice(0,i.index)} ${e.slice(i.index+i[0].length)}`}:{rest:e}}function K(e,n,r){let i=e.replace(/\b(on|at|the|of|this)\b/g," ").replace(/\s+/g," ").trim();if(i==="")return null;if(i==="today"||i==="now")return n;if(i==="tomorrow"||i==="tmrw"||i==="tmr")return p(n,1);if(i==="yesterday")return p(n,-1);if(i==="next week")return p(n,7);let t=/^in (\d{1,3}) (day|days|week|weeks)$/.exec(i);if(t)return p(n,Number(t[1])*(t[2].startsWith("week")?7:1));if(t=new RegExp(`^(next )?${E}$`).exec(i),t){let s=(H.indexOf(t[2].slice(0,3))-F(n)+7)%7;return p(n,t[1]&&s===0?7:s)}if(t=/^(\d{4})-(\d{1,2})-(\d{1,2})$/.exec(i),t)return c(Number(t[1]),Number(t[2]),Number(t[3]));let o=i.replace(new RegExp(`^${E} `),"");t=new RegExp(`^(\\d{1,2})(?:st|nd|rd|th)? ${T}(?: (\\d{4}))?$`).exec(o);let d=t?{date:t[1],month:t[2],year:t[3]}:void 0;t=new RegExp(`^${T} (\\d{1,2})(?:st|nd|rd|th)?(?: (\\d{4}))?$`).exec(o);let u=d??(t?{date:t[2],month:t[1],year:t[3]}:void 0);if(u)return R(n,M(u.year),_(u.month),Number(u.date));if(t=/^(\d{1,2})[/.-](\d{1,2})(?:[/.-](\d{2}|\d{4}))?$/.exec(o),t){let[f,s]=[Number(t[1]),Number(t[2])],[$,y]=U(r)?[f,s]:[s,f];return R(n,M(t[3]),$,y)}}function R(e,n,r,i){if(n!==void 0)return c(n,r,i);let t=Number(e.slice(0,4)),o=c(t,r,i);return o===void 0?c(t+1,r,i):a(e)-a(o)>183*x?c(t+1,r,i):o}function q(e){if(typeof e=="number")return Number.isInteger(e)&&e>=1e3&&e<=9999?String(e):void 0;let n=String(e).trim().toLowerCase().replace(/,/g," ").replace(/\s+/g," ");if(/^\d{4}$/.test(n))return Number(n)>=1e3?n:void 0;let r=(t,o)=>o>=1&&o<=12&&Number(t)>=1e3?`${t}-${String(o).padStart(2,"0")}`:void 0,i=/^(\d{4})[-/](\d{1,2})$/.exec(n);if(i)return r(i[1],Number(i[2]));if(i=/^(\d{1,2})\/(\d{4})$/.exec(n),i)return r(i[2],Number(i[1]));if(i=new RegExp(`^${T}\\.? (\\d{4})$`).exec(n),i)return r(i[2],_(i[1]))}function G(e,n){let r=e.trim();if(h(r)){let u=l(r);if(u)return n.time?u:{day:u.day}}let i=e.toLowerCase().replace(/,/g," ").replace(/(\d{4}-\d{2}-\d{2})t(\d\d:\d\d)(:\d\d(\.\d+)?)?/,"$1 $2").replace(/\s+/g," ").trim();if(i==="")return;let t=v(i);if(t.bad)return;let o=K(t.rest,n.today,n.locale??b);if(o===void 0||o===null&&t.minutes===void 0)return;let d=o??n.base?.day??n.today;return n.time?{day:d,minutes:t.minutes??n.base?.minutes??9*60}:{day:d}}function J(e){if(e===void 0||e==="web"||e.startsWith("ai:")||e.startsWith("app:"))return;if(e==="api")return"via the API";if(e==="cli")return"via the command line";let[n,...r]=e.split(":"),i=r.join(":");return(n==="mcp"||n==="view")&&i?`via ${i}`:n==="mcp"?"via an agent's tools":`via ${e}`}var j=e=>{if(!e.currency)return{before:!0};try{let n=w(e.locale),r=new Intl.NumberFormat(n,{style:"currency",currency:e.currency}).formatToParts(1),i=r.findIndex(d=>d.type==="currency"),t=r.findIndex(d=>d.type==="integer"),o;try{o=new Intl.DisplayNames([n],{type:"currency"}).of(e.currency)}catch{}return{...i>=0?{symbol:r[i].value}:{},before:i<t,...o?{name:o}:{}}}catch{return{symbol:e.currency,before:!0}}};function Q(e){let n=e.locale;if(e.format==="money"){let{symbol:r,before:i,name:t}=j(e),o=m(1250,n,{minimumFractionDigits:2,maximumFractionDigits:2});return{...r?i?{prefix:r}:{suffix:r}:{},placeholder:o,hint:t?`in ${t}`:e.currency?`in ${e.currency}`:"an amount of money"}}return e.format==="percent"?{suffix:"%",placeholder:m(15,n),hint:"as a percent"}:{...e.unit?{suffix:e.unit}:{},placeholder:"",hint:e.unit?`in ${e.unit}`:"a number"}}function V(e,n){return e===void 0||!Number.isFinite(e)?"":n.format==="money"?m(e,n.locale,Number.isInteger(e)?{maximumFractionDigits:0}:{minimumFractionDigits:2,maximumFractionDigits:2}):n.format==="percent"?m(e*100,n.locale,{maximumFractionDigits:4}):m(e,n.locale,{maximumFractionDigits:6})}function X(e){try{let n=new Intl.NumberFormat(w(e)).formatToParts(12345.6);return{group:n.find(r=>r.type==="group")?.value??",",decimal:n.find(r=>r.type==="decimal")?.value??"."}}catch{return{group:",",decimal:"."}}}function k(e,n){let{group:r,decimal:i}=X(n),t=e.replace(/[\s ']/g,"").replace(/[−–]/g,"-");if(i!=="."&&!t.includes(i)&&/^-?\d+\.\d{1,2}$/.test(t))return Number(t);if(r&&(t=t.split(r).join("")),i!=="."&&(t=t.replace(i,".")),!/^-?(\d+\.?\d*|\.\d+)$/.test(t))return;let o=Number(t);return Number.isFinite(o)?o:void 0}function ee(e,n){let r=e.trim();if(r==="")return;let i=n?.format==="money"&&n.currency?j(n).symbol:void 0,t=r;i&&(t=t.split(i).join("")),n?.currency&&(t=t.replace(new RegExp(n.currency,"gi"),"")),t=t.replace(/^[$€£¥₹]|[$€£¥₹]$/g,""),/%\s*$/.test(t)&&(t=t.replace(/%\s*$/,"")),n?.unit&&n.format!=="money"&&(t=t.replace(new RegExp(`\\s*${n.unit.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}\\s*$`),""));let d=k(t,n?.locale);if(d!==void 0)return n?.format==="percent"?d/100:d}export{J as a,Q as b,V as c,ee as d,I as e,h as f,l as g,D as h,P as i,z as j,Z as k,q as l,G as m};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
var __graviewPreload=(base,files)=>{if(typeof document>"u")return;const asked=globalThis.__graviewPreloaded??=new Set;for(const file of files){const href=new URL(file,base).href;if(asked.has(href))continue;asked.add(href);const link=document.createElement("link");link.rel="modulepreload";link.href=href;document.head.append(link)}};import{G as C,Ga as K,T as k}from"./chunk.
|
|
1
|
+
var __graviewPreload=(base,files)=>{if(typeof document>"u")return;const asked=globalThis.__graviewPreloaded??=new Set;for(const file of files){const href=new URL(file,base).href;if(asked.has(href))continue;asked.add(href);const link=document.createElement("link");link.rel="modulepreload";link.href=href;document.head.append(link)}};import{G as C,Ga as K,T as k}from"./chunk.4MP72LPR.js";import{a as H}from"./chunk.SDO3U72B.js";import{b}from"./chunk.AJZBJBMO.js";var n=b(C(),1),N=450,_=10,O=t=>t instanceof HTMLInputElement?t.dataset.graviewChooseBox??void 0:void 0,q={ArrowDown:1,ArrowRight:1,ArrowUp:-1,ArrowLeft:-1,Home:-1/0,End:1/0},S=t=>t instanceof Element?t.closest("[data-graview-choose]"):null,G=t=>t instanceof HTMLElement&&(t.isContentEditable||t instanceof HTMLInputElement&&t.type!=="checkbox"||t instanceof HTMLTextAreaElement||t instanceof HTMLSelectElement);function Y(t){let[i,d]=(0,n.useState)(()=>new Set),l=(0,n.useRef)(null),x=(0,n.useRef)(null),[E,P]=(0,n.useState)(null),R=E!==null&&t.includes(E)?E:t[0],L=(0,n.useMemo)(()=>t.filter(e=>i.has(e)),[t,i]),M=(0,n.useMemo)(()=>new Set(t),[t]);(0,n.useEffect)(()=>{[...i].some(e=>!M.has(e))&&d(e=>new Set([...e].filter(o=>M.has(o))))},[M,i]);let u=(0,n.useCallback)((e,o=!1)=>{let a=l.current;d(s=>{let r=new Set(s),f=a===null?-1:t.indexOf(a),y=t.indexOf(e);if(o&&f>=0&&y>=0){let T=s.has(a);for(let p of t.slice(Math.min(f,y),Math.max(f,y)+1))T?r.add(p):r.delete(p)}else r.has(e)?r.delete(e):r.add(e);return r}),l.current=e},[t]),v=(0,n.useCallback)(e=>d(new Set(e)),[]),A=(0,n.useCallback)(()=>{l.current=null,d(new Set)},[]),c=(0,n.useRef)(null),g=(0,n.useRef)(!1),m=L.length>0,h=()=>{c.current&&clearTimeout(c.current.timer),c.current=null};(0,n.useEffect)(()=>h,[]);let B={ref:x,onKeyDown:e=>{if(G(e.target))return;let o=O(e.target);if(e.key==="Tab"&&!e.shiftKey&&!e.metaKey&&!e.ctrlKey&&!e.altKey&&o!==void 0&&m){let s=document.querySelector('[data-testid="several-bar"]'),r=s?.querySelector("[data-mutation]:not([disabled])")??s?.querySelector("button:not([disabled])");if(r){e.preventDefault(),e.stopPropagation(),r.focus();return}}let a=q[e.key];if(o!==void 0&&a!==void 0&&!e.metaKey&&!e.ctrlKey&&!e.altKey){let s=t.indexOf(o),r=t[Math.max(0,Math.min(t.length-1,s+(Number.isFinite(a)?a:a>0?t.length:-t.length)))];if(e.preventDefault(),e.stopPropagation(),r===void 0||r===o)return;if(e.shiftKey){let f=l.current!==null&&t.includes(l.current)?l.current:o,[y,T]=[t.indexOf(f),t.indexOf(r)].sort((p,F)=>p-F);d(p=>new Set([...p,...t.slice(y,T+1)])),l.current=f}P(r),x.current?.querySelector(`[data-graview-choose-box="${CSS.escape(r)}"]`)?.focus();return}if((e.metaKey||e.ctrlKey)&&!e.altKey&&e.key.toLowerCase()==="a"){e.preventDefault(),e.stopPropagation(),v(t);return}if(e.key===" "&&!e.metaKey&&!e.ctrlKey){let s=S(e.target),r=e.target instanceof HTMLButtonElement||e.target instanceof HTMLInputElement&&e.target.type==="checkbox";if(!s||r)return;e.preventDefault(),u(s.dataset.graviewChoose,e.shiftKey)}},onFocus:e=>{let o=O(e.target);o!==void 0&&P(o)},onPointerDown:e=>{if(g.current=!1,e.pointerType==="mouse"||e.button>0)return;let o=S(e.target);if(!o||e.target instanceof HTMLInputElement&&e.target.type==="checkbox")return;let a=o.dataset.graviewChoose;h(),c.current={id:a,x:e.clientX,y:e.clientY,timer:setTimeout(()=>{c.current=null,g.current=!0,u(a)},N)}},onPointerMove:e=>{let o=c.current;o&&Math.hypot(e.clientX-o.x,e.clientY-o.y)>_&&h()},onPointerUp:h,onPointerCancel:h,onClickCapture:e=>{let o=S(e.target);if(!o||e.target instanceof HTMLInputElement&&e.target.type==="checkbox"&&e.target.hasAttribute("data-graview-choose-box"))return;if(g.current){g.current=!1,e.preventDefault(),e.stopPropagation();return}let s=o.dataset.graviewChoose;if(e.shiftKey&&(m||l.current!==null)){e.preventDefault(),e.stopPropagation(),u(s,!0);return}m&&matchMedia?.("(pointer: coarse)").matches&&(e.preventDefault(),e.stopPropagation(),u(s))},onContextMenu:e=>{(g.current||c.current)&&(e.preventDefault(),e.stopPropagation())},...m?{"data-graview-choosing":""}:{}},j=(0,n.useCallback)(e=>i.has(e),[i]);return{chosen:L,has:j,toggle:u,choose:v,clear:A,listProps:B,boxProps:(e,o)=>({type:"checkbox",className:"graview-choose-box","data-graview-choose-box":e,"aria-label":`Choose ${o}`,tabIndex:e===R?0:-1,checked:i.has(e),onChange:()=>{},onClick:a=>{a.stopPropagation(),u(e,a.shiftKey)}}),list:x}}var $=`
|
|
2
2
|
.graview-choose-box{width:24px;height:24px;margin:0;accent-color:var(--graview-accent);cursor:pointer;opacity:0}
|
|
3
3
|
[data-graview-choose]:hover .graview-choose-box,[data-graview-choose]:focus-within .graview-choose-box,.graview-choose-box:focus-visible,.graview-choose-box:checked,[data-graview-choosing] .graview-choose-box{opacity:1}
|
|
4
4
|
[data-graview-choose]{-webkit-touch-callout:none}
|
|
5
5
|
[data-graview-choosing] [data-graview-choose]{-webkit-user-select:none;user-select:none}
|
|
6
|
-
`;var D=b(C(),1),w=b(k(),1),I=K(H(()=>(__graviewPreload(import.meta.url,["./chunk.
|
|
6
|
+
`;var D=b(C(),1),w=b(k(),1),I=K(H(()=>(__graviewPreload(import.meta.url,["./chunk.IGVASEZU.js","./chunk.IHBUBZQT.js","./chunk.ENL2JJ47.js","./chunk.BQIHNT7C.js","./chunk.2K4TT2BV.js","./chunk.67U6M7OV.js","./chunk.ZP5RT2EK.js","./chunk.VZJWJ5XM.js","./chunk.GLWSVSQL.js","./chunk.MB7LKKUD.js","./chunk.7VKSXGTX.js","./chunk.TY4GQJKC.js","./chunk.6ZQAR5ZA.js","./chunk.W3W54DSX.js","./chunk.PI44XMY2.js","./chunk.KGW75Z5L.js","./chunk.MSWWWLEA.js","./chunk.UITT6JWW.js","./chunk.A5PDXNY6.js","./chunk.WC3DENU4.js","./chunk.VNDKKTED.js","./chunk.4MP72LPR.js","./chunk.SDO3U72B.js","./chunk.VSCIXAHN.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.Y7G3OGDE.js")))),U=I.part((t,i)=>(0,w.jsx)(t.SeveralBar,{...i}),{what:"The selection bar"});function Q(t){return t.chosen.length===0?null:(0,w.jsx)(D.Suspense,{fallback:null,children:(0,w.jsx)(U,{...t})})}var W=()=>I.prefetch();export{Y as a,$ as b,Q as c,W as d};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import"./chunk.
|
|
1
|
+
import"./chunk.WC3DENU4.js";import"./chunk.VNDKKTED.js";import{T as o,ba as n}from"./chunk.4MP72LPR.js";import"./chunk.SDO3U72B.js";import"./chunk.VSCIXAHN.js";import"./chunk.FQLNBIQ5.js";import{b as t}from"./chunk.AJZBJBMO.js";var a=t(o(),1),d=[["waiting","Waiting"],["active","Under way: darker and taller"],["done","Done: flat and pale"],["flagged","A problem, or past its due date"],["recent","Changed since you were last here"],["own","Yours"]],g=i=>{let e=r=>`color-mix(in oklab,var(--graview-ink) ${r}%,var(--graview-panel))`;return`.graview-map-key{display:grid;gap:4px;padding:2px 4px 8px;margin-bottom:6px;border-bottom:1px solid var(--graview-edge);font-size:.8125rem;color:var(--graview-ink-muted)}
|
|
2
2
|
.graview-map-key>div{display:flex;align-items:center;gap:8px}
|
|
3
3
|
.graview-map-key>div:first-child{color:var(--graview-ink)}
|
|
4
4
|
.graview-map-key i{flex:none;width:14px;height:10px;border-radius:2px;background:${e(i?34:42)}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as a}from"./chunk.
|
|
1
|
+
import{e as a}from"./chunk.3MOJF7BA.js";import{l as i}from"./chunk.4MP72LPR.js";import{Jd as o}from"./chunk.VSCIXAHN.js";function p(t){let r=t.within??{};return o({...r.sort?{sort:r.sort}:{},...r.filter?{filter:r.filter}:{},...r.group?{group:r.group}:{},...r.q?{q:r.q}:{},...r.archived?{archived:r.archived}:{}})}function c(t,r){let m=a(r),e=t;for(let n of["sort","filter","group","q","archived"])e=i(e,n,m[n]??null);return e}export{p as a,c as b};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{E as $}from"./chunk.
|
|
1
|
+
import{E as $}from"./chunk.WC3DENU4.js";import{G as L,Oa as U,a as I,b as R,c as E,d as f,e as k,j as W,m as F,v as j}from"./chunk.4MP72LPR.js";import{$d as r,Td as s,_d as b}from"./chunk.VSCIXAHN.js";import{b as H}from"./chunk.AJZBJBMO.js";var u=H(L(),1),_=e=>typeof e=="object"&&e!==null&&"idx"in e;function S(e){let n=r(window.location.pathname,e);return n===null?null:n!==s&&n!=="/"?"pages":n===s||window.location.href.includes("#")?f(window.location.hash).overview?"graview":"scene":_(window.history.state)?"pages":null}function K(e){let n=e.face??(e.stop&&E(e.stop).overview?"graview":"scene");return e.routing!=="address"||typeof window>"u"?n:S(e.basePath)??n}function Q(e){return e.routing!=="address"||typeof window>"u"?!1:r(window.location.pathname,e.basePath)==="/"&&S(e.basePath)===null}function X(e){if(typeof window>"u")return;let n=r(window.location.pathname,e);return n===s||n==="/"&&window.location.href.includes("#")?R(f(window.location.hash)):void 0}function Z({basePath:e,pagesWere:n,shown:t,onFace:i,toggle:l,kinds:N,places:w,opens:B,landed:V}){let{view:O,go:p}=U(),g=(0,u.useRef)({shown:t,view:O,onFace:i,landed:V});g.current={shown:t,view:O,onFace:i,landed:V};let m=(0,u.useRef)(n??"/"),P=()=>{m.current=`${r(window.location.pathname,e)??"/"}${window.location.search}`};return l.current=(o,c,a)=>{let{shown:d,view:h,onFace:A}=g.current;if(o==="pages"&&d!=="pages")window.history.pushState(null,"",b(c??m.current,{basePath:e}));else if(o!=="pages"&&d==="pages"){P();let y=a===void 0?h:M(E(a),w),v=q(y)?z(B):y,T=v!==y&&v.overview?"graview":o,x=Y(T,v,N);p(x),window.history.pushState(null,"",`${b(s,{basePath:e})}${k(x)}`),A?.(T);return}A?.(o)},(0,u.useEffect)(()=>{let o=()=>{if(r(window.location.pathname,e)===null)return;let c=S(e)??"pages",{shown:a,onFace:d,landed:h}=g.current;if(c==="pages"){P(),h?.(m.current),a!=="pages"&&d?.("pages");return}a==="pages"&&(p(M(f(window.location.hash),w)),d?.(c))};return window.addEventListener("popstate",o),()=>window.removeEventListener("popstate",o)},[e,p,w]),null}function M(e,n){let t=e.within?.view,i=t!==void 0&&!e.focusId?n.find(l=>l.as===t):void 0;return i?{...e,focusId:j(i.kind)}:e}function Y(e,n,t){return e==="graview"?F(n,!0):n.overview?W(F(n,!1),$(n,t)):n}function q(e){return e.focusId===null&&e.overview!==!0}function z(e){return e??{...I,overview:!0}}export{K as a,Q as b,X as c,Z as d,M as e,Y as f,q as g,z as h};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{Xb as w,ic as S}from"./chunk.VSCIXAHN.js";function v(s){return[...s.mutations??[],...S(s.schema,s.mutations??[])]}function B(s){let i=[...s.schema.kinds],a=v(s),d=new Map,c=new Map;for(let e of a){c.set(e.name,e.creates??[]);let n=w(e.input).filter(t=>!t.optional&&!t.kinds.includes("*")).flatMap(t=>t.kinds);d.set(e.name,[...new Set(n)])}let g=new Map;for(let e of i)g.set(e,[]);for(let e of a)for(let n of c.get(e.name)??[])g.get(n)?.push(e.name);let p=new Map,l=new Set;for(let e=0;;e+=1){let n=[];for(let t of a)if((d.get(t.name)??[]).every(o=>l.has(o)))for(let o of c.get(t.name)??[])l.has(o)||n.push(o);if(n.length===0)break;for(let t of n)l.add(t),p.set(t,e)}let h=e=>{let n=g.get(e)??[];if(n.length===0)return[];let t=n.map(r=>d.get(r)??[]).sort((r,o)=>r.length-o.length)[0];return[...new Set(t)].filter(r=>r!==e)},y=new Map,u=e=>{let n=y.get(e);if(n)return n;let t=new Set;y.set(e,t);for(let r of h(e)){t.add(r);for(let o of u(r))t.add(o)}return t.delete(e),t},f=new Map(i.map(e=>[e,0]));for(let e of i)for(let n of u(e))f.set(n,(f.get(n)??0)+1);let m=i.map(e=>({kind:e,madeBy:[...g.get(e)??[]].sort(),needs:[...h(e)].sort(),depth:p.get(e)??null})).sort((e,n)=>(e.depth??Number.MAX_SAFE_INTEGER)-(n.depth??Number.MAX_SAFE_INTEGER)||(f.get(n.kind)??0)-(f.get(e.kind)??0)||e.kind.localeCompare(n.kind)),k=m.filter(e=>e.depth===0).map(e=>e.kind),A=[...new Set(a.filter(e=>(d.get(e.name)??[]).length===0).filter(e=>(c.get(e.name)??[]).length>0).map(e=>e.name))].sort(),M=m.filter(e=>e.depth===null).map(e=>({kind:e.kind,why:e.madeBy.length===0?"no act declares that it creates this kind":`every act that makes it needs ${e.needs.map(n=>`"${n}"`).join(", ")}, which nothing can make first`}));return{order:m,roots:k,doors:A,unreachable:M}}export{B as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as k,b as A,c as L,d as _,e as E,r as B,s as V,t as H,u as N,v as q}from"./chunk.OJGHDWI6.js";import"./chunk.
|
|
1
|
+
import{a as k,b as A,c as L,d as _,e as E,r as B,s as V,t as H,u as N,v as q}from"./chunk.OJGHDWI6.js";import"./chunk.VSCIXAHN.js";import"./chunk.FQLNBIQ5.js";import"./chunk.AJZBJBMO.js";var W=["drawElementImageToTexture","copyElementImageToTexture"],S=null,P=(r,e)=>r==="texture"?{texture:e}:{destination:{texture:e}};function Z(){return typeof globalThis>"u"?void 0:globalThis}function v(r,e){let t=[],n=Z(),o=!!(n?.navigator&&"gpu"in n.navigator);o||t.push("navigator.gpu is absent \u2014 WebGPU is unavailable.");let i=r??n?.GPUQueue?.prototype??void 0,a=null;if(i){for(let d of W)if(typeof i[d]=="function"){a=d;break}}a||t.push("No element-capture method on GPUQueue. Run Chromium 147+ with --enable-blink-features=CanvasDrawElement.");let c=e??n?.HTMLCanvasElement?.prototype??void 0,l=typeof c?.updateElementGeometry=="function";l||t.push("canvas.updateElementGeometry is absent \u2014 geometry cannot be reported.");let p=typeof c?.requestPaint=="function";p||t.push("canvas.requestPaint is absent \u2014 there is no capture-safe moment to hook.");let w=!1,h="unknown";if(typeof document<"u"){let d=document.createElement("canvas");w="layoutSubtree"in d||typeof d.captureElementImage=="function","layoutSubtree"in d?h="no":typeof d.captureElementImage=="function"&&(h="yes")}return{available:a!==null,captureMethod:a,geometrySync:l,hitTestFollowsGeometry:l?h:"no",layoutSubtree:w,paintEvents:p,webgpu:o,usable:o&&a!==null,notes:t}}var g=class extends Error{constructor(t){super(`HTML-in-Canvas is unavailable:
|
|
2
2
|
${t.notes.join(`
|
|
3
3
|
`)}`);this.capabilities=t;this.name="PlatformUnavailableError"}};function G(r,e,t){let n=r;for(let o of W){let i=n[o];if(typeof i=="function"){if(S){i.call(n,{source:e},P(S,t));return}try{i.call(n,{source:e},P("texture",t)),S="texture"}catch(a){if(!(a instanceof TypeError)||!/texture/i.test(a.message))throw a;i.call(n,{source:e},P("destination",t)),S="destination"}return}}throw new g(v(r))}function M(r,e=!0){e?r.setAttribute("drawable",""):r.removeAttribute("drawable")}function F(r){let e=r.changedElements;return e?new Set(Array.from(e)):null}function ee(r,e){let t=r;if(typeof t.captureElementImage!="function")throw new g(v(void 0,r));return t.captureElementImage(e)}function O(r,e,t){let n=r;if(typeof n.updateElementGeometry!="function")throw new g(v(void 0,r));n.updateElementGeometry(e,t)}function te(r,e){r.clearElementGeometry?.(e)}function m(r){r.requestPaint?.()}function D(r,e=!0){let t=r;e?t.setAttribute("content","drawable"):t.removeAttribute("content"),"layoutSubtree"in t?t.layoutSubtree=e:e?t.setAttribute("layoutsubtree",""):t.removeAttribute("layoutsubtree")}var I=`
|
|
4
4
|
struct Plane {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var __graviewPreload=(base,files)=>{if(typeof document>"u")return;const asked=globalThis.__graviewPreloaded??=new Set;for(const file of files){const href=new URL(file,base).href;if(asked.has(href))continue;asked.add(href);const link=document.createElement("link");link.rel="modulepreload";link.href=href;document.head.append(link)}};import{Cb as L,N as H,P as N,
|
|
1
|
+
var __graviewPreload=(base,files)=>{if(typeof document>"u")return;const asked=globalThis.__graviewPreloaded??=new Set;for(const file of files){const href=new URL(file,base).href;if(asked.has(href))continue;asked.add(href);const link=document.createElement("link");link.rel="modulepreload";link.href=href;document.head.append(link)}};import{Cb as L,N as H,P as N,Wc as j}from"./chunk.VSCIXAHN.js";var D=()=>(__graviewPreload(import.meta.url,["./chunk.I4XQBQRC.js","./chunk.PXQVXBNG.js","./chunk.B3WVCSW5.js","./chunk.VSCIXAHN.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.VMV464JK.js"));function W(n,l,c){let i=new Map;for(let u of c?.kinds??[])for(let o of n.nodesOfKind(u))l.has(o.id)||i.set(o.id,o);let t=new Set([...l,...i.keys()]),p=new Set(c?.edges??[]),k=new Set;if(p.size>0&&l.size>0){for(let u of l)for(let o of n.outEdges(u))p.has(o.kind)&&i.has(o.to)&&k.add(o.to);for(let u of i.keys())n.outEdges(u).some(o=>p.has(o.kind)&&l.has(o.to))&&k.add(u)}let S=new Map([...[...i].filter(([u])=>k.has(u)),...[...i].filter(([u])=>!k.has(u))]),h=[];if(p.size>0)for(let u of t)for(let o of n.outEdges(u))p.has(o.kind)&&t.has(o.to)&&h.push({kind:o.kind,from:o.from,to:o.to});return{nodes:[...S.values()],edges:h}}function E(n,l,c){let i=[];return()=>{let t=c();for(;i.length>0&&i[0]<=t-l;)i.shift();return i.length>=n?!1:(i.push(t),!0)}}function C(n={},l=Date.now){return{act:E(n.acts??30,n.actWindowMs??6e4,l),message:E(n.messages??120,n.messageWindowMs??1e3,l)}}var A=n=>typeof n=="object"&&n!==null&&!Array.isArray(n);function K(n,l){let c=l.flatMap(t=>A(t)&&typeof t.kind=="string"?[t.kind]:[]),i=j(n,c);return Object.keys(i).length>0?{choices:i}:{}}function J(n,l){let c=structuredClone(l),i=n.schema.tryDefinition(c.kind),t=c.label;return{...c,label:i?.label?i.label(c):typeof t=="string"&&t.length>0?t:c.id}}function I(n){let l=n.limiter??C(n.limits,n.now),c=n.limits?.maxHeight??4e3,i=`view:${n.view}`,t={applied:0,refused:0,dropped:0},p=()=>n.store.seenBy(n.principal),k=e=>J(n.store,e),S=()=>{if(n.props)return n.props();let e=p(),d=e.graph,r=n.input?.()??{},y=r.node?d.getNode(r.node.id):void 0,a=r.nodes?.flatMap(s=>{let m=d.getNode(s.id);return m?[m]:[]}),g=new Set([...y?[y.id]:[],...(a??[]).map(s=>s.id)]),f=[];for(let s of g)for(let m of d.outEdges(s))g.has(m.to)&&f.push({kind:m.kind,from:m.from,to:m.to});let G=W(d,g,n.reads),b=new Set(f.map(s=>`${s.kind} ${s.from} ${s.to}`));for(let s of G.edges)b.has(`${s.kind} ${s.from} ${s.to}`)||f.push(s);let v=G.nodes.length>0?[...a??[],...G.nodes]:a,M=s=>s?.filter(m=>d.has(m)),$=e.permittedMutations(n.principal).map(s=>({name:s.name,title:s.title??s.name,...s.description!==void 0?{description:s.description}:{},...s.subject?{subject:{kinds:s.subject.kinds,arg:s.subject.arg}}:{}}));return{view:n.view,...y?{node:k(y)}:{},...v?{nodes:v.map(k)}:{},edges:f,...r.label!==void 0?{label:r.label}:{},...r.fidelity!==void 0?{fidelity:r.fidelity}:{},...r.cardinality!==void 0?{cardinality:r.cardinality}:{},...r.mode!==void 0?{mode:r.mode}:{},...r.selected!==void 0?{selected:r.selected}:{},...r.implicated?{implicated:M(r.implicated)}:{},...r.flagged?{flagged:M(r.flagged)}:{},acts:$,...n.theme?{theme:n.theme()}:{},locale:H(),timeZone:N(),...K(n.store.schema,[...y?[y]:[],...v??[]]),...n.placesShown?{places:n.placesShown().map(({as:s,title:m,kind:F})=>({as:s,title:m,kind:F}))}:{}}},h=!1,u=0,o=new Set,x=()=>{if(h)return;u+=1,o.add(u),o.size>100&&o.delete(o.values().next().value);let e=S();n.send({type:"props",props:n.hand?n.hand(e):e,push:u})},R=!1,O=n.store.subscribe(()=>{R||(R=!0,queueMicrotask(()=>{R=!1,x()}))}),w=(e,d)=>(t.refused+=1,{ok:!1,reason:e,message:d}),z=(e,d,r)=>P([{name:e,args:d}],r),P=(e,d,r)=>{if(!l.act())return w("rate-limited","Too many acts asked for at once; this one was not applied.");let y=[];for(let{name:a,args:g}of e){if(d){let f=d(a,g);if(!f.ok)return w(f.reason,f.message);a=f.name,g=f.args}if(!n.store.allMutations().some(f=>f.name===a))return w("unknown-act","There is no act by that name here.");y.push({name:a,args:g})}try{let a=n.store.applyAll(y,{author:n.principal,via:i,...r?{intent:r}:{}});return t.applied+=1,{ok:!0,intent:a.intent}}catch(a){return a instanceof L?w("refused",a.refusal.message):w("failed","The act could not be applied.")}},T=(e,d,r)=>{let y=Array.isArray(r);if(typeof d!="string"||(y?r.length===0||r.length>100||!r.every(A):!A(r)))return t.refused+=1,n.send({type:"answer",id:e,ok:!1,reason:"malformed",message:"An act is asked for by name, with its arguments as an object, or a list of 1 to 100 of them for several as one change."});let a=P((y?r:[r]).map(g=>({name:d,args:g})),n.judgeAct);n.send(a.ok?{type:"answer",id:e,ok:!0,intent:a.intent}:{type:"answer",id:e,ok:!1,reason:a.reason,message:a.message})};return{receive(e){if(h)return;if(!(A(e)&&e.nonce===n.nonce&&e.type==="pushed"&&typeof e.push=="number"&&o.delete(e.push))&&!l.message()){t.dropped+=1,n.onFlood?.();return}if(!A(e)||e.nonce!==n.nonce){t.dropped+=1;return}if(e.type==="act"&&(typeof e.id=="string"||typeof e.id=="number"))return T(e.id,e.name,e.args);if(e.type==="navigate"&&n.onArrive&&(typeof e.place=="string"||typeof e.to=="string")){let r={...e.where!==void 0?{where:e.where}:{},...e.section!==void 0?{section:e.section}:{}},y=typeof e.place=="string"?{place:e.place,...r}:{record:e.to,...r},a=n.onArrive;D().then(({judgeDestination:g,listsOf:f})=>{if(h)return;let G=new Set([...n.store.kindsKeptFrom(n.principal),...n.store.modules.disabledKinds]),b=g(y,{sees:v=>p().graph.has(v),places:n.placesShown?.()??[],lists:f(n.store.schema,G),schema:n.store.schema});b.ok?a(b.arrival):(t.dropped+=1,n.onLost?.(b.says))});return}if(e.type==="navigate"&&typeof e.place=="string"){n.places?.().includes(e.place)?n.onNavigatePlace?.(e.place):t.dropped+=1;return}if(e.type==="navigate"&&typeof e.to=="string"){p().graph.has(e.to)?n.onNavigate?.(e.to):t.dropped+=1;return}if(e.type==="render"&&Array.isArray(e.records)&&n.onRender){n.onRender(e.records);return}if(e.type==="style"&&Array.isArray(e.sheets)&&e.sheets.every(r=>typeof r=="string")&&n.onStyle){n.onStyle(e.sheets);return}if(e.type==="hears"&&Array.isArray(e.events)&&n.onHears){n.onHears(e.events.filter(r=>typeof r=="string").slice(0,20));return}if(e.type==="clicks"&&Array.isArray(e.selectors)){n.onClicks?.(e.selectors.filter(r=>typeof r=="string"&&r.length<=500).slice(0,200));return}if(e.type==="gestures"&&Array.isArray(e.bound)&&n.onGestures){n.onGestures(e.bound.slice(0,32));return}if(e.type==="pushed"&&typeof e.push=="number"&&typeof e.ms=="number"&&n.onPushed){n.onPushed(e.push,e.ms);return}if(e.type==="size"&&typeof e.height=="number"&&Number.isFinite(e.height)){n.onSize?.(Math.max(0,Math.min(c,Math.round(e.height))));return}t.dropped+=1},push:x,pressed(e){return h?{ok:!1,reason:"refused",message:"The view has gone."}:e.ok?z(e.name,e.args):(t.refused+=1,e)},change(e,d){return h?{ok:!1,reason:"refused",message:"The view has gone."}:P(e,void 0,d)},get stats(){return t},dispose(){h=!0,O()}}}export{W as a,C as b,K as c,J as d,I as e};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a,b,c,d,e,f,g,h,i,j,k}from"./chunk.IHBUBZQT.js";import"./chunk.67U6M7OV.js";import"./chunk.GLWSVSQL.js";import"./chunk.7VKSXGTX.js";import"./chunk.TY4GQJKC.js";import"./chunk.6ZQAR5ZA.js";import"./chunk.W3W54DSX.js";import"./chunk.PI44XMY2.js";import"./chunk.KGW75Z5L.js";import"./chunk.UITT6JWW.js";import"./chunk.A5PDXNY6.js";import"./chunk.VSCIXAHN.js";import"./chunk.FQLNBIQ5.js";import"./chunk.AJZBJBMO.js";export{g as columnActs,d as columnChoices,c as columnMoves,b as columnOf,e as columnReach,f as columnSteps,j as describePlace,k as placeText,h as resolveFor,i as shadowedPageSlots,a as statusColumns};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{g as F,l as b}from"./chunk.
|
|
1
|
+
import{g as F,l as b}from"./chunk.KGW75Z5L.js";function L(t,o){return o===1&&["every","some","sum","min","max","sort"].includes(t.fn)}function M(t){let o=new Set,e=new Set,r=[],s=[],a=new Set(F),i=(l,f)=>{switch(l.t){case"lit":return;case"ident":f||o.add(l.name);return;case"list":l.items.forEach(c=>i(c,f));return;case"member":i(l.object,f);return;case"unary":i(l.operand,f);return;case"binary":i(l.left,f),i(l.right,f);return;case"where":i(l.set,f),i(l.filter,!0);return;case"call":{e.add(l.fn);let c=(l.fn==="out"||l.fn==="in")&&l.args.length===2?l.args[1]:l.args[0],m=c?.t==="lit"&&typeof c.value=="string"?c.value:void 0;l.fn==="all"&&m&&r.push(m),(l.fn==="out"||l.fn==="in")&&m&&s.push(m),l.args.forEach((v,k)=>i(v,f||L(l,k)));return}}};return i(t,!1),{names:o,functions:e,unknownFunctions:[...e].filter(l=>!a.has(l)),sweeps:r,edges:s}}var p=class extends Error{constructor(e,r,s){super(`${e} (at character ${r+1} of "${s}")`);this.sentence=e;this.at=r;this.source=s}},D=["||","&&","==","!=","<=",">=","<",">","!","|","&","+","-","*","/","%","(",")","[","]",",","."],j={and:"&&",or:"||",not:"!"},T=2e3;function H(t){let o=[],e=0;for(;e<t.length;){let r=t[e];if(r===" "||r===" "||r===`
|
|
2
2
|
`||r==="\r"){e++;continue}if(r>="0"&&r<="9"){let a=e;for(;e<t.length&&/[0-9.]/.test(t[e]);)e++;let i=t.slice(a,e),l=Number(i);if(!Number.isFinite(l)||i.split(".").length>2)throw new p(`"${i}" is not a number`,a,t);o.push({k:"num",v:l,at:a});continue}if(r==="'"||r==='"'){let a=e++,i="";for(;e<t.length&&t[e]!==r;)t[e]==="\\"&&e+1<t.length&&e++,i+=t[e++];if(e>=t.length)throw new p("a quoted word is never closed",a,t);e++,o.push({k:"str",v:i,at:a});continue}if(/[A-Za-z_]/.test(r)){let a=e;for(;e<t.length&&/[A-Za-z0-9_]/.test(t[e]);)e++;let i=t.slice(a,e),l=Object.hasOwn(j,i)?j[i]:void 0;o.push(l?{k:"op",v:l,at:a}:{k:"id",v:i,at:a});continue}let s=D.find(a=>t.startsWith(a,e));if(!s)throw new p(`"${r}" is not part of the rule language`,e,t);o.push({k:"op",v:s,at:e}),e+=s.length}return o.push({k:"end",at:t.length}),o}function w(t){if(t.length>T)throw new p(`an expression may be at most ${T} characters`,0,t.slice(0,40));let o=H(t),e=0,r=()=>o[e],s=n=>{let d=r();return d.k==="op"&&d.v===n},a=n=>{let d=r();return d.k==="id"&&d.v===n},i=(n,d)=>{if(!s(n))throw new p(`expected ${d}`,r().at,t);e++},l=0,f=(n,d)=>{if(++l>64)throw new p("the expression nests too deeply",n,t);try{return d()}finally{l--}},c=(n,d)=>()=>{let g=d();for(;;){let y=r(),S=y.k==="op"?n.find(q=>q===y.v):y.k==="id"&&y.v==="in"&&n.includes("in")?"in":void 0;if(!S)return g;e++,g={t:"binary",op:S,left:g,right:d(),at:y.at}}},m=()=>{let n=r();if(n.k==="num")return e++,{t:"lit",value:n.v,at:n.at};if(n.k==="str")return e++,{t:"lit",value:n.v,at:n.at};if(n.k==="id"){if(e++,n.v==="true"||n.v==="false")return{t:"lit",value:n.v==="true",at:n.at};if(n.v==="null")return{t:"lit",value:null,at:n.at};if(s("(")){e++;let d=[];if(!s(")"))for(;;){if(d.push(h()),s(",")){e++;continue}break}return i(")",`")" to close ${n.v}(\u2026)`),{t:"call",fn:n.v,args:d,at:n.at}}return{t:"ident",name:n.v,at:n.at}}if(n.k==="op"&&n.v==="("){e++;let d=f(n.at,h);return i(")",'a ")"'),d}if(n.k==="op"&&n.v==="["){e++;let d=[];if(!s("]"))for(;;){if(d.push(h()),s(",")){e++;continue}break}return i("]",'a "]" to close the list'),{t:"list",items:d,at:n.at}}throw n.k==="end"?new p("the expression ends too soon",n.at,t):new p(`"${n.k==="op"?n.v:""}" cannot start a value here`,n.at,t)},v=()=>{let n=m();for(;;){if(s(".")){let d=r();e++;let g=r();if(g.k!=="id")throw new p('expected a field name after "."',g.at,t);e++,n={t:"member",object:n,name:g.v,at:d.at};continue}if(a("where")){let d=r().at;e++,n={t:"where",set:n,filter:f(d,h),at:d};continue}return n}},k=()=>{let n=r();return n.k==="op"&&(n.v==="!"||n.v==="-")?(e++,{t:"unary",op:n.v,operand:f(n.at,k),at:n.at}):v()},P=c(["*","/","%"],k),z=c(["+","-"],P),N=c(["&"],z),R=c(["|"],N),_=()=>{let n=R(),d=r(),g=d.k==="op"&&["==","!=","<","<=",">",">="].includes(d.v)?d.v:d.k==="id"&&d.v==="in"?"in":void 0;return g?(e++,{t:"binary",op:g,left:n,right:R(),at:d.at}):n},O=()=>{let n=r();return n.k==="op"&&n.v==="!"?(e++,{t:"unary",op:"!",operand:f(n.at,O),at:n.at}):_()},B=c(["&&"],O),I=c(["||"],B);function h(){return I()}let K=h();if(r().k!=="end")throw new p("there is more after the end of the expression",r().at,t);return K}function E(t){let o,e=-1,r=0;for(let s=0;s<t.length;s++){let a=t[s];if(o){a==="\\"?s++:a===o&&(o=void 0);continue}a==="'"||a==='"'?o=a:a==="("||a==="["?r++:a===")"||a==="]"?r--:a==="|"&&r===0&&(t[s+1]==="|"?s++:e=s)}if(e>0&&t.slice(e+1).trim()===x){let s=E(t.slice(0,e));if(s>=0)return s}return e}var x="capital",$=/\s*(?:'((?:[^'\\]|\\.)*)'|"((?:[^"\\]|\\.)*)")\s*(,|$)/y;function U(t){let o=E(t);if(o>=0){if(t.slice(o+1).trim()!==x)throw new u('only "capital" may follow another formatter, like {n | words | capital}');let e=t.slice(0,o);if(e.trim()===x)throw new u('"capital" is said once');return{...C(e),capital:!0}}return t.trim()===x?{args:[],capital:!0}:C(t)}function C(t){let o=t.indexOf(":"),e=(o>=0?t.slice(0,o):t).trim();if(!b.includes(e))throw new u(`"${e}" is not a formatter; use one of ${[...b,x].join(", ")}`);let r=[];if(o>=0&&e==="excerpt"){let s=t.slice(o+1).trim();if(!/^\d+$/.test(s)||Number(s)<20||Number(s)>1e3)throw new u("excerpt is told at most how many characters, 20 to 1000: {summary | excerpt: 80}");r.push(s)}else if(o>=0){let s=t.slice(o+1),a=0;for(;a<s.length;){$.lastIndex=a;let i=$.exec(s);if(!i)throw new u(`"${e}" is told quoted words, like ${e}: 'offer'`);if(r.push((i[1]??i[2]??"").replace(/\\(.)/g,"$1")),a=$.lastIndex,i[3]==="")break}}if(e==="plural"&&(r.length<1||r.length>2))throw new u("plural is told its noun, like {count | plural: 'offer'}, and its plural where English does not make it: plural: 'person', 'people'");if(e!=="plural"&&e!=="excerpt"&&r.length>0)throw new u(`"${e}" takes nothing after it`);return{format:e,args:r}}var u=class extends Error{constructor(e){super(e);this.sentence=e}};function Y(t){let o=[],e=0;for(;e<t.length;){let r=t.indexOf("{",e);if(r<0){o.push({text:t.slice(e)});break}r>e&&o.push({text:t.slice(e,r)});let s=t.indexOf("}",r);if(s<0)throw new u(`a "{" at character ${r+1} is never closed`);let a=t.slice(r+1,s),i=E(a),l=(i>=0?a.slice(0,i):a).trim(),f=i>=0?U(a.slice(i+1)):void 0,c=E(l);if(c>=0&&b.includes(l.slice(c+1).split(":")[0].trim()))throw new u('only "capital" may follow another formatter, like {n | words | capital}');o.push({expr:w(l),source:l,...f?.format?{format:f.format}:{},...f&&f.args.length>0?{formatArgs:f.args}:{},...f?.capital?{capital:!0}:{}}),e=s+1}return o}function A(t){let o=new Map;for(let[e,r]of Object.entries(t?.computed??{}))o.set(e,typeof r=="string"?{expr:r}:r);return o}function re(t){let o=A(t);if(o.size===0)return;let e=new Map;for(let[r,s]of o)try{e.set(r,w(s.expr))}catch(a){if(!(a instanceof p))throw a}return e}function Z(t,o,e=new Set){let r=A(t).get(o);if(!r||e.has(o))return!1;let s;try{s=w(r.expr)}catch{return!1}let a=M(s);if(a.edges.length>0||a.sweeps.length>0||[...a.functions].some(c=>c==="out"||c==="in"||c==="all"))return!1;let i=t.fields,l=c=>i instanceof Set?i.has(c):Object.hasOwn(i,c),f=new Set([...e,o]);return[...a.names].every(c=>l(c)||Z(t,c,f))}export{M as a,p as b,w as c,u as d,Y as e,A as f,re as g,Z as h};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{K as k,O as I,R as M,V as A,Y as R,
|
|
1
|
+
import{K as k,O as I,R as M,V as A,Y as R,hb as j,ib as f,ma as P,mc as T,pc as N,vb as B,vc as K,yc as b}from"./chunk.VSCIXAHN.js";import{j as h}from"./chunk.FQLNBIQ5.js";var O=(e,i)=>e.expiresAt!==void 0&&Date.parse(e.expiresAt)<=Date.parse(i),L=(e,i,n)=>(e??[]).some(t=>t.suggestion===i&&(t.until===void 0||Date.parse(t.until)>Date.parse(n)));function $(e,i=()=>!0,n={}){let t=T(e),o=new Set(e.map(r=>r.lineage?.suggestion)),s=n.now??new Date().toISOString();return e.filter(r=>r.suggests&&!r.withheld&&!t.has(r.id)&&!o.has(r.id)&&!O(r,s)&&!L(n.dismissed,r.id,s)).map(({id:r,batch:g,suggests:p,intent:c,author:a,lineage:d,at:l,expiresAt:y})=>{let u=new Set;return JSON.stringify(p.map(D=>D.args),(D,x)=>(typeof x=="string"&&i(x)&&u.add(x),x)),{id:r,batch:g,calls:p,intent:c,author:a,...d?{lineage:d}:{},at:l,expiresAt:y,about:[...u]}})}function W(e,i){return e.ops.length>0&&e.ops.every(n=>n.suggests!==void 0||n.undoes!==void 0&&i(n.undoes)?.suggests!==void 0)}var v=e=>[...e].length;function F(e){let i,n=0,t=0;for(let o of e.ops){let s=o.mutation?.name===B&&o.withheld!==!0&&o.undoes===void 0?o.mutation.args:void 0;if(typeof s?.node!="string"||typeof s.field!="string"||i&&(i.node!==s.node||i.field!==s.field))return;i={node:s.node,field:s.field};for(let r of o.primitives)r.op==="splice-text"?(n+=v(r.inserted),t+=v(r.removed)):r.op==="patch-node"&&typeof r.after[s.field]=="string"&&(n+=v(r.after[s.field]))}return i&&{...i,inserted:n,removed:t}}function V(e,i,n){let t=n.getNode(e.node)?.kind,o=[...e.inserted>0||e.removed===0?[`+${e.inserted}`]:[],...e.removed>0?[`\u2212${e.removed}`]:[]];return`Wrote in ${P(t?i.tryDefinition(t):void 0,e.field)} (${o.join(" ")})`}var m=e=>JSON.stringify([e.kind,e.id??"",e.name??""]),_=e=>e.ops.find(i=>i.lineage?.run!==void 0)?.lineage?.run;function J(e,i=()=>{}){let n=[];for(let t of e){if(W(t,i))continue;if(!K(t.author)){let a=F(t),d=n.at(-1),l=a&&d&&"batch"in d&&m(d.batch.author)===m(t.author)&&d.typed?.node===a.node&&d.typed.field===a.field?d.typed:void 0;l?n[n.length-1]={batch:t,typed:{...l,batches:[...l.batches,t],inserted:l.inserted+a.inserted,removed:l.removed+a.removed}}:n.push(a?{batch:t,typed:{batches:[t],...a}}:{batch:t});continue}let o=_(t),s=m(t.author),r=o!==void 0?n.findIndex(a=>"digest"in a&&a.digest.run===o&&m(a.digest.author)===s):n.length-1,g=n[r],p=g!==void 0&&"digest"in g&&m(g.digest.author)===s&&g.digest.run===o?g.digest:void 0,c=[...p?.batches??[],t];p&&n.splice(r,1),n.push({digest:{author:t.author,batches:c,things:Y(c),at:t.at,...o!==void 0?{run:o}:{}}})}return n}var Y=e=>e.reduce((i,n)=>i+(n.undone?0:n.ops.length),0),q=e=>{let i=Date.parse(e);if(Number.isNaN(i))return!1;let{minutes:n}=M(i,I());return n<6*60||n>=21*60};function z(e,i=A(new Date().toISOString())??k()){let n=A(e.at)??e.at.slice(0,10),o=e.run!==void 0&&n===i&&[e.at,...(e.batches??[]).map(s=>s.at)].every(q)?"overnight":n===i?"today":`on ${R(n)}`;return`Tidied ${e.things===1?"one thing":`${e.things} things`} ${o}`}var S=e=>e,w=(e,i)=>i===void 0?{}:{[e]:i};function de(e,i,n){let t=h(e)?.store??e,o=S(t),s=N(n.lineage);if(s===void 0)throw new f("A suggestion says what it is based on: { basis, confidence? }");let r=n.author??o.by;if(n.expiresAt!==void 0&&Number.isNaN(Date.parse(n.expiresAt)))throw new f(`A suggestion expires at a time: "${n.expiresAt}" is not one (an ISO time, like 2026-10-23T06:00:00Z).`);let g=o.actMeanings(),p=b(i,g),c=C(t).find(u=>b(u.calls,g)===p);if(c)return t.log.get(c.id);o.refuseDeclined(i,r);let a=o.rehearsal();a.suggesting=!0;let d=a.applying(i,{author:r,lineage:s,...w("via",n.via)});if(d.ops.length===0)return;let l=[...new Set(d.ops.flatMap(u=>u.described??[]))],y={id:o.nextId(),seq:t.log.length,batch:o.mintBatch("batch"),author:r,intent:d.ops.map(u=>u.intent).join("; "),...w("batchIntent",n.intent),mutation:null,primitives:[],reads:[],writes:[],...l.length>0?{described:l}:{},at:o.now(),...w("via",n.via),lineage:s,suggests:i,...w("expiresAt",n.expiresAt)};return t.log.append(y),t.notify(j,[y]),y}function C(e,i,n={}){let t=h(e),o=t?.store??e,s=i??t?.principal,r=(s!==void 0?o.seenBy(s):o).log.all();return $(r,g=>o.graph.has(g),{now:S(o).now(),dismissed:n.dismissed})}function E(e,i,n){let t=C(e,n).find(s=>s.id===i),o=t?void 0:e.log.get(i);if(o?.suggests&&O(o,S(e).now()))throw new f(`That suggestion expired on ${o.expiresAt.slice(0,10)}.`);if(!t)throw new f("That suggestion is no longer waiting: it was accepted or declined, or it is not one you can see.");return t}function ge(e,i,n={}){let t=h(e)?.store??e,o=n.author??S(t).by,s=E(t,i,o);return t.applyAll(s.calls,{...n,author:o,lineage:{...s.lineage,suggestion:i}})}function le(e,i,n={}){let t=h(e)?.store??e,o=n.author??S(t).by,s=E(t,i,o);return t.undo(s.batch,{...n,author:o})}export{V as a,J as b,z as c,de as d,C as e,ge as f,le as g};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import"./chunk.
|
|
1
|
+
import"./chunk.QI4SLPQ4.js";import{a as _,b as ge,c as me,e as fe}from"./chunk.7MHCGVGM.js";import"./chunk.FRYBMS3W.js";import"./chunk.3MOJF7BA.js";import"./chunk.LZIBQ3VX.js";import"./chunk.HJCQ6I3S.js";import{a as ve,d as ye}from"./chunk.QDSEVPF3.js";import"./chunk.7N32AVIJ.js";import{a as de}from"./chunk.3XGA65Y3.js";import{d as he}from"./chunk.BYKD5RLA.js";import"./chunk.2K4TT2BV.js";import"./chunk.VUBNBTJP.js";import"./chunk.OLFJH4RK.js";import"./chunk.67U6M7OV.js";import"./chunk.ZP5RT2EK.js";import"./chunk.VZJWJ5XM.js";import"./chunk.VFOON3Z3.js";import"./chunk.WVUJXDXZ.js";import"./chunk.7VKSXGTX.js";import"./chunk.TY4GQJKC.js";import"./chunk.6ZQAR5ZA.js";import"./chunk.W3W54DSX.js";import"./chunk.PI44XMY2.js";import"./chunk.KGW75Z5L.js";import"./chunk.GZHZLJBF.js";import{o as ue,r as K}from"./chunk.IOK4GVJC.js";import"./chunk.OJGHDWI6.js";import{a as ce}from"./chunk.TLJOZSDD.js";import"./chunk.MSWWWLEA.js";import"./chunk.UITT6JWW.js";import{c as le}from"./chunk.A5PDXNY6.js";import{o as pe}from"./chunk.WC3DENU4.js";import"./chunk.VNDKKTED.js";import{G as xe,K as I,Na as se,Oa as W,T as re,W as ie,ba as T,da as R,j as M,l as ne,m as B,ma as G,r as P,v as ae,z as oe}from"./chunk.4MP72LPR.js";import"./chunk.SDO3U72B.js";import{W as D,ad as te,fa as $,ga as F,ia as q,ka as L,oa as ee}from"./chunk.VSCIXAHN.js";import"./chunk.FQLNBIQ5.js";import{b as V}from"./chunk.AJZBJBMO.js";var l=V(xe(),1);var e=V(re(),1),Se=pe.part((t,u)=>(0,e.jsx)(t.ProblemRows,{...u}),{what:"The problems",as:"li"}),A="var(--graview-gap, 8px)",ke=720;function Fe({showing:t}){return t.what==="lens"?(0,e.jsx)(Ae,{kind:t.kind},`lens:${t.kind}`):t.what==="record"?(0,e.jsx)(Pe,{id:t.id},`record:${t.id}`):(0,e.jsx)(Ne,{kind:t.kind},`district:${t.kind}`)}function Y({label:t,wide:u,testId:a,head:o,onClose:s,children:d,sheetHeight:p}){let i=(0,l.useRef)(null),[h,m]=(0,l.useState)(!1);(0,l.useLayoutEffect)(()=>{let r=i.current?.parentElement;if(!r)return;let f=()=>m(r.getBoundingClientRect().width<ke);if(f(),typeof ResizeObserver>"u")return;let x=new ResizeObserver(f);return x.observe(r),()=>x.disconnect()},[]);let v=(0,l.useRef)(s);return v.current=s,(0,l.useEffect)(()=>{let r=k=>{if(k.key!=="Escape"||k.defaultPrevented)return;let y=document.activeElement;y instanceof HTMLInputElement||y instanceof HTMLTextAreaElement||document.querySelector("[data-graview-popover]:popover-open")||f||v.current()},f=!1,x=()=>{f=document.querySelector('[data-testid="following-who"]')!==null};return window.addEventListener("keydown",x,!0),document.addEventListener("keydown",r),()=>{window.removeEventListener("keydown",x,!0),document.removeEventListener("keydown",r)}},[]),(0,e.jsxs)("section",{ref:i,"aria-label":t,"data-testid":a,"data-graview-map-panel":h?"sheet":"dock","data-graview-overlay":"","data-graview-offstage":"",className:"graview-map-panel",style:{position:"absolute",zIndex:te("rail"),boxSizing:"border-box",display:"flex",flexDirection:"column",background:"var(--graview-panel)",color:"var(--graview-ink)",overflow:"hidden",border:"1px solid var(--graview-edge)",borderRadius:"var(--graview-radius, 12px)",boxShadow:"var(--graview-lift-high)",...h?{left:A,right:A,bottom:`calc(${A} + env(safe-area-inset-bottom, 0px))`,height:p}:{top:A,right:A,bottom:A,width:u}},children:[h?(0,e.jsx)("style",{children:`:has(> [data-graview-map-panel="sheet"]) { --graview-sheet: calc(${p} + 2 * ${A} + env(safe-area-inset-bottom, 0px)); }`}):(0,e.jsx)("style",{children:`:has(> [data-graview-map-panel="dock"]) { --graview-dock: calc(${u} + 2 * ${A}); }`}),(0,e.jsxs)("header",{style:{display:"flex",alignItems:"flex-start",gap:10,padding:"14px 14px 10px 18px",borderBottom:"1px solid var(--graview-edge)"},children:[(0,e.jsx)("div",{style:{flex:"1 1 auto",minWidth:0},children:o}),(0,e.jsx)("button",{type:"button","data-testid":"map-panel-close","aria-label":"Close",title:"Close (Escape)",onClick:s,style:{flex:"0 0 auto",minWidth:32,height:32,borderRadius:8,fontSize:"1.1rem",lineHeight:1},children:"\xD7"})]}),(0,e.jsx)("div",{style:{flex:"1 1 auto",minHeight:0,overflow:"auto"},children:d})]})}var U={fontSize:"0.75rem",letterSpacing:"0.09em",textTransform:"uppercase",color:"var(--graview-ink-faint)"},J={margin:"2px 0 0",fontSize:"1.125rem",fontWeight:600,lineHeight:1.3,overflowWrap:"anywhere"},Q={margin:"4px 0 0",fontSize:"0.875rem",color:"var(--graview-ink-muted)"},j={margin:"14px 18px 6px",fontSize:"0.8125rem",fontWeight:600,color:"var(--graview-ink-muted)"},z={listStyle:"none",margin:0,padding:"0 10px 6px"},X={all:"unset",outline:"revert-layer",boxSizing:"border-box",display:"flex",alignItems:"baseline",gap:8,width:"100%",padding:"6px 8px",borderRadius:6,cursor:"pointer",fontSize:"0.875rem"},H={minHeight:30,padding:"0 12px",borderRadius:8,fontSize:"0.8125rem"};function Z(){let{setSelection:t,setMenuAt:u}=T();return(a,o)=>{a.preventDefault(),t([o]),u({x:a.clientX,y:a.clientY,on:o})}}function we({on:t,about:u}){let{setSelection:a,setMenuAt:o}=T();return(0,e.jsx)("button",{type:"button","data-testid":"map-panel-acts","aria-label":`What can be done with ${u}`,"aria-haspopup":"menu",style:H,onClick:s=>{let d=s.currentTarget.getBoundingClientRect();a([t]),o({x:Math.round(d.left),y:Math.round(d.bottom+4),on:t})},children:"Acts\u2026"})}var be=(t,u)=>({...M(B(t,!1),u),relation:null});function Ee(t,u){let a=`[data-graview-stage] [data-graview-view="${CSS.escape(t)}"][tabindex]`,o=null;for(let i=u?.parentElement??null;i&&!o;i=i.parentElement)o=i.querySelector(".graview-ground");o??=document.querySelector(".graview-ground");let s=o!==null&&!o.hasAttribute("tabindex");o&&s&&(o.setAttribute("tabindex","-1"),o.addEventListener("focusout",i=>{i.target===o&&o.removeAttribute("tabindex")},{once:!0})),o?.focus({preventScroll:!0});let d=performance.now()+5e3,p=()=>{let i=document.activeElement;if(!(i===null||i===document.body||i===document.documentElement||i===u||i===o))return;let m=document.querySelector(a);if(m&&m.isConnected&&!m.closest("[inert]"))return m.focus({preventScroll:!0});performance.now()<d&&requestAnimationFrame(p)};requestAnimationFrame(p)}function Ae({kind:t}){let u=Z(),{store:a,views:o,view:s,selection:d,setSelection:p}=T(),{go:i}=W(),h=R(),m=s.within?.view,v=o.places().filter(w=>w.kind===t),r=(m!==void 0?v.find(w=>w.as===m):void 0)??v.at(-1),f=o.resolve(t,{cardinality:"many",fidelity:"full"},r?.as??m),x=f?.view,k=a.schema.tryDefinition(t),y=(0,l.useMemo)(()=>a.graph.nodesOfKind(t).filter(w=>s.past===!0||$(k,w)),[a,t,h,s.past,k]),E=f?.title??r?.title??L(a.schema,t),C=x!==void 0&&G(x),c=d.filter(w=>a.graph.getNode(w)!==void 0),g=ce();return(0,e.jsxs)(Y,{label:E,testId:"lens-panel",wide:"min(max(440px, 46%), 760px)",sheetHeight:"60%",onClose:()=>i(ne(M(s,null),"view",null)),head:C?null:(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("div",{style:U,children:L(a.schema,t)}),(0,e.jsx)("h2",{style:J,"data-testid":"lens-panel-title",children:E}),(0,e.jsxs)("p",{style:Q,children:[q(a.schema,t,y.length),k?.description?` \xB7 ${k.description}`:""]}),r?(0,e.jsx)("div",{style:{marginTop:10},children:(0,e.jsx)("button",{type:"button","data-testid":"lens-panel-open",style:H,title:`Open ${E} on its own`,onClick:()=>i(oe(s,t,r.as)),children:"Open \u2197"})}):null]}),children:[(0,e.jsx)("style",{children:`.graview-ground[data-graview-altitude] .graview-plot:not([data-graview-plot="${P(t)}"]) { opacity: 0.35; }
|
|
2
2
|
.graview-ground[data-graview-altitude] [data-graview-view^="kind:"]:not([data-graview-view="${P(t)}"]) { opacity: 0.4; }`}),(0,e.jsx)("div",{"data-graview-lens":r?.as??"",style:{padding:"8px 12px 16px",minHeight:"100%",boxSizing:"border-box",display:"grid",gridTemplateRows:"1fr",gridTemplateColumns:"minmax(0, 1fr)",alignItems:"start"},onClick:w=>{let n=I(w.target);if(!n||a.graph.getNode(n)===void 0)return;let b=w.target.closest("button, a, input, select, textarea, [contenteditable='true']");b&&!b.hasAttribute("data-graview-pick")||p([n])},onDoubleClick:w=>{let n=I(w.target);!n||a.graph.getNode(n)===void 0||i(be(s,n))},onContextMenu:w=>{let n=I(w.target);!n||a.graph.getNode(n)===void 0||u(w,n)},children:x?(0,e.jsx)(de.Provider,{value:E,children:(0,e.jsx)(ie,{mode:"fullscreen",children:(0,e.jsx)(K,{kind:t,...f?.title?{view:f.title}:{},children:(0,e.jsx)(x,{nodes:y,label:E,fidelity:"full",cardinality:"many",mode:"fullscreen",selected:!1,...c.length>0?{implicated:c}:{},...g.length>0?{flagged:g}:{}})})})}):null})]})}function Ce(t,u,a,o){let s=o(a),d=new Map;for(let p of u){let i=p.from===a;if(!i&&p.to!==a)continue;let h=i?p.to:p.from,m=o(h);if(m===void 0||s===void 0)continue;let v=`${p.kind}|${i?"out":"in"}|${m}`,r=d.get(v);if(r){r.others.includes(h)||r.others.push(h);continue}d.set(v,{key:v,edge:p.kind,words:le(t,i?s:m,p.kind,i?"out":"in"),kind:m,others:[h]})}return[...d.values()]}function Pe({id:t}){let u=Z(),{store:a,views:o,view:s,setSelection:d}=T(),{go:p}=W(),i=R(),h=a.graph.getNode(t),m=c=>a.graph.getNode(c)?.kind,v=(0,l.useMemo)(()=>Ce(a.schema,a.graph.allEdges(),t,m),[a,t,i]);if(!h)return null;let r=h.kind,f=c=>{let g=a.graph.getNode(c);return g?F(a.schema.tryDefinition(g.kind),g):c},x=ee(a.schema.tryDefinition(r),r),y=o.resolve(r,{cardinality:"one",fidelity:"full"})?.view,E=y!==void 0&&!G(y),C=()=>s.focusId===t?p({...M(s,null),selection:[]}):d([]);return(0,e.jsxs)(Y,{label:`${f(t)}: its links`,testId:"record-panel",wide:E?"min(max(440px, 46%), 760px)":"min(360px, 40%)",sheetHeight:"52%",onClose:C,head:(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("div",{style:U,children:x}),(0,e.jsx)("h2",{style:J,"data-testid":"record-panel-title",children:f(t)}),(0,e.jsxs)("div",{style:{display:"flex",gap:8,flexWrap:"wrap",marginTop:10},children:[(0,e.jsx)("button",{type:"button","data-testid":"record-panel-go",style:H,onClick:c=>{p(be(s,t)),Ee(t,c.currentTarget)},children:"Go to it"}),(0,e.jsx)(we,{on:t,about:f(t)}),(0,e.jsxs)("button",{type:"button","data-testid":"record-panel-district",style:H,onClick:()=>d([P(r)]),children:["All ",L(a.schema,r).toLowerCase()]})]})]}),children:[(0,e.jsx)("div",{"data-graview-record-card":t,style:{padding:"8px 18px 0"},children:E?(0,e.jsx)(K,{kind:r,children:(0,e.jsx)(y,{node:h,fidelity:"full",cardinality:"one",mode:"fullscreen",selected:!1})}):(0,e.jsx)(he,{id:t,shown:[f(t)]})}),v.length===0?(0,e.jsx)("p",{style:{...Q,margin:"14px 18px"},children:"No links yet."}):null,v.map(c=>(0,e.jsxs)("section",{"aria-label":c.words,"data-graview-links":c.edge,children:[(0,e.jsxs)("h3",{style:j,children:[c.words.charAt(0).toUpperCase()+c.words.slice(1)," ",(0,e.jsxs)("span",{style:{fontWeight:400,color:"var(--graview-ink-faint)"},children:["\xB7 ",c.others.length]})]}),(0,e.jsx)("ul",{style:z,children:c.others.map(g=>(0,e.jsx)("li",{children:(0,e.jsxs)("button",{type:"button",className:"graview-map-panel-row","data-graview-record":g,style:X,onClick:()=>d([g]),onContextMenu:N=>u(N,g),children:[(0,e.jsx)("span",{style:{flex:"1 1 auto",minWidth:0,overflowWrap:"anywhere"},children:f(g)}),c.kind!==r?null:(0,e.jsx)("span",{style:{fontSize:"0.75rem",color:"var(--graview-ink-faint)"},children:x})]})},g))})]},c.key))]})}var Te=24;function Ne({kind:t}){let u=Z(),{store:a,view:o,setSelection:s,setEmphasis:d}=T(),{go:p}=W(),i=R(),[h,m]=(0,l.useState)(""),v=a.schema.tryDefinition(t),r=(0,l.useMemo)(()=>a.graph.nodesOfKind(t).filter(n=>o.past===!0||$(v,n)).map(n=>({id:n.id,name:F(v,n)})).sort((n,b)=>n.name.localeCompare(b.name)),[a,t,i,o.past,v]),f=(0,l.useMemo)(()=>{let n=S=>{let O=a.graph.getNode(S);return O!==void 0&&(o.past===!0||$(a.schema.tryDefinition(O.kind),O))},b=a.graph.allEdges().filter(S=>n(S.from)&&n(S.to));return ve(b,S=>a.graph.getNode(S)?.kind).filter(S=>S.from===t||S.to===t)},[a,t,i,o.past]);(0,l.useEffect)(()=>()=>d(null),[d]);let x=se(),k=ue().marks.flag,y=(0,l.useMemo)(()=>{let n=new Set(r.map(b=>b.id));return x.filter(b=>b.nodeIds.some(S=>n.has(S)))},[x,r]),E=(0,l.useMemo)(()=>[...new Set(y.flatMap(n=>n.nodeIds))].filter(n=>a.graph.getNode(n)?.kind===t).slice(0,300),[y,a,t]),C=(0,l.useRef)(null),c=(0,l.useSyncExternalStore)(ge,_,_);(0,l.useEffect)(()=>{c?.kind!==t||y.length===0||(C.current?.scrollIntoView?.({block:"start"}),C.current?.focus({preventScroll:!0}))},[c?.n,c?.kind,t,y.length>0]),(0,l.useEffect)(()=>()=>{me(),setTimeout(()=>{let n=document.activeElement;if(n&&n!==document.body)return;let b=CSS.escape(t);document.querySelector(`[data-testid="district-problems-${b}"]`)?.focus({preventScroll:!0})??document.querySelector(`[data-graview-view="${P(t).replace(/["\\]/g,"\\$&")}"]`)?.focus({preventScroll:!0})},0)},[t]);let g=L(a.schema,t),N=h.trim().toLowerCase(),w=N?r.filter(n=>n.name.toLowerCase().includes(N)):r;return(0,e.jsxs)(Y,{label:g,testId:"district-panel",wide:"min(360px, 40%)",sheetHeight:"52%",onClose:()=>s([]),head:(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("div",{style:U,children:"District"}),(0,e.jsx)("h2",{style:J,"data-testid":"district-panel-title",children:g}),(0,e.jsxs)("p",{style:Q,children:[q(a.schema,t,r.length),v?.description?` \xB7 ${v.description}`:""]}),(0,e.jsxs)("div",{style:{display:"flex",gap:8,flexWrap:"wrap",marginTop:10},children:[(0,e.jsx)("button",{type:"button","data-testid":"district-panel-go",style:H,onClick:()=>p({...M(B(o,!1),ae(t)),relation:null}),children:"Go in"}),(0,e.jsx)(we,{on:P(t),about:`the ${g.toLowerCase()}`})]})]}),children:[y.length>0?(0,e.jsxs)("section",{"aria-label":"Problems","data-testid":"district-problems","data-graview-problems":y.length,children:[(0,e.jsx)("style",{children:`${E.map(n=>`.graview-ground[data-graview-altitude] .graview-building[data-graview-building="${CSS.escape(n)}"] polygon`).join(`,
|
|
3
3
|
`)} { stroke: var(--graview-accent); stroke-width: 2.2; stroke-opacity: 1; }`}),(0,e.jsxs)("h3",{ref:C,tabIndex:-1,"data-testid":"district-problems-heading",style:{display:"flex",alignItems:"baseline",gap:8,margin:0,padding:"14px 18px 8px",fontSize:"0.9375rem",fontWeight:600,color:"var(--graview-warn)",borderTop:"1px solid var(--graview-edge)",scrollMarginTop:0,outlineOffset:-2},children:[(0,e.jsx)("span",{"aria-hidden":"true",children:k}),(0,e.jsx)("span",{style:{color:"var(--graview-ink)"},children:fe(y.length,g)})]}),(0,e.jsx)("ol",{style:z,"data-testid":"district-problem-rows",children:(0,e.jsx)(l.Suspense,{fallback:null,children:(0,e.jsx)(Se,{violations:y,pick:n=>{let b=n.subjectId??n.nodeIds[0];b!==void 0&&s([b])}})})})]}):null,f.length>0?(0,e.jsxs)("section",{"aria-label":"Relations",children:[(0,e.jsx)("h3",{style:j,children:"Relations"}),(0,e.jsx)("ul",{style:z,children:f.map(n=>(0,e.jsx)("li",{children:(0,e.jsxs)("div",{"data-graview-relation-said":n.edge,tabIndex:0,style:{...X,cursor:"default"},onPointerEnter:()=>d(n.edge),onPointerLeave:()=>d(null),onFocus:()=>d(n.edge),onBlur:()=>d(null),children:[(0,e.jsx)("span",{style:{flex:"1 1 auto",minWidth:0},children:ye(a.schema,n)}),(0,e.jsx)("span",{style:{fontSize:"0.75rem",color:"var(--graview-ink-faint)",fontVariantNumeric:"tabular-nums"},title:`${D(n.links)} links`,children:D(n.links)})]})},n.key))})]}):null,(0,e.jsxs)("div",{role:"group","aria-label":g,children:[(0,e.jsxs)("h3",{style:j,children:[g," ",(0,e.jsxs)("span",{style:{fontWeight:400,color:"var(--graview-ink-faint)"},children:["\xB7 ",r.length]})]}),r.length>Te?(0,e.jsx)("div",{style:{padding:"0 18px 6px"},children:(0,e.jsx)("input",{type:"search","data-testid":"district-panel-narrow","aria-label":`Narrow the ${g.toLowerCase()} by name`,placeholder:"Narrow by name",value:h,onChange:n=>m(n.target.value),style:{width:"100%",boxSizing:"border-box",minHeight:32}})}):null,(0,e.jsx)("ul",{style:z,children:w.map(n=>(0,e.jsx)("li",{children:(0,e.jsx)("button",{type:"button",className:"graview-map-panel-row","data-graview-record":n.id,style:X,onClick:()=>s([n.id]),onContextMenu:b=>u(b,n.id),children:(0,e.jsx)("span",{style:{flex:"1 1 auto",minWidth:0,overflowWrap:"anywhere"},children:n.name})})},n.id))})]})]})}export{Fe as MapPanelFor};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as u}from"./chunk.
|
|
1
|
+
import{c as u}from"./chunk.A5PDXNY6.js";import{ia as l}from"./chunk.VSCIXAHN.js";function a(e,n){let s=new Map;for(let o of e){let t=n(o.from),i=n(o.to);if(t===void 0||i===void 0)continue;let d=`${o.kind}|${t}|${i}`,r=s.get(d);r||s.set(d,r={edge:o.kind,from:t,to:i,links:0,froms:new Set,tos:new Set}),r.links+=1,r.froms.add(o.from),r.tos.add(o.to)}return[...s.entries()].sort(([o],[t])=>o<t?-1:o>t?1:0).map(([o,t])=>({key:o,edge:t.edge,from:t.from,to:t.to,links:t.links,fromCount:t.froms.size,toCount:t.tos.size}))}function m(e,n,s){let o=[],t=[];for(let d of e){let r=f(d);if(r!==null){o.includes(r)||o.push(r);continue}s(d)!==void 0&&t.push(d)}let i=n.overview&&n.focusId!==null?f(n.focusId):null;return n.beside&&n.overview&&i===null&&n.focusId!==null&&t.length===0&&o.length===0&&s(n.focusId)!==void 0&&t.push(n.focusId),{districts:o,records:t,lens:i}}function f(e){return e.startsWith("kind:")?e.slice(5)||null:e.startsWith("aggregate:")&&!e.includes("|")&&e.slice(10)||null}function y(e,n){let s=u(e,n.from,n.edge,"out"),o=n.from===n.to?" of their own":"";return`${l(e,n.from,n.fromCount)} \u2192 ${l(e,n.to,n.toCount)}${o}, ${s}`}export{a,m as b,f as c,y as d};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o}from"./chunk.LGEA5257.js";import"./chunk.G4JJXA63.js";import"./chunk.OLFJH4RK.js";import"./chunk.67U6M7OV.js";import"./chunk.6C2MHWSX.js";import"./chunk.XOZU4OFA.js";import"./chunk.GLWSVSQL.js";import"./chunk.VFOON3Z3.js";import"./chunk.WVUJXDXZ.js";import"./chunk.7VKSXGTX.js";import"./chunk.TY4GQJKC.js";import"./chunk.6ZQAR5ZA.js";import"./chunk.W3W54DSX.js";import"./chunk.PI44XMY2.js";import"./chunk.KGW75Z5L.js";import"./chunk.MSWWWLEA.js";import"./chunk.UITT6JWW.js";import"./chunk.A5PDXNY6.js";import"./chunk.VSCIXAHN.js";import"./chunk.FQLNBIQ5.js";import"./chunk.AJZBJBMO.js";export{i as draftAnswer,h as draftFromLens,b as draftSight,l as draftView,a as isDraftFailure,c as judgeLens,d as lensEditOf,f as lensFromSpec,j as recipeDraft,g as recipeOfLens,m as refineDraft,o as runDraftTool,e as takeBackEditOf,k as templateDraft,n as withReaderLenses};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var __graviewPreload=(base,files)=>{if(typeof document>"u")return;const asked=globalThis.__graviewPreloaded??=new Set;for(const file of files){const href=new URL(file,base).href;if(asked.has(href))continue;asked.add(href);const link=document.createElement("link");link.rel="modulepreload";link.href=href;document.head.append(link)}};import{e as $,g as F,h as P,i as B,l as K,m as H}from"./chunk.
|
|
1
|
+
var __graviewPreload=(base,files)=>{if(typeof document>"u")return;const asked=globalThis.__graviewPreloaded??=new Set;for(const file of files){const href=new URL(file,base).href;if(asked.has(href))continue;asked.add(href);const link=document.createElement("link");link.rel="modulepreload";link.href=href;document.head.append(link)}};import{e as $,g as F,h as P,i as B,l as K,m as H}from"./chunk.MSWWWLEA.js";import"./chunk.UITT6JWW.js";import"./chunk.A5PDXNY6.js";import"./chunk.WC3DENU4.js";import"./chunk.VNDKKTED.js";import{G as se,Ga as A,T as S}from"./chunk.4MP72LPR.js";import{a as q}from"./chunk.SDO3U72B.js";import"./chunk.VSCIXAHN.js";import"./chunk.FQLNBIQ5.js";import{b as T}from"./chunk.AJZBJBMO.js";var r=T(se(),1);var j=T(S(),1),Z=A(q(()=>(__graviewPreload(import.meta.url,["./chunk.WC3DENU4.js","./chunk.VNDKKTED.js","./chunk.4MP72LPR.js","./chunk.SDO3U72B.js","./chunk.VSCIXAHN.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.HDP3PS7N.js")))),U={Part:Z.part((n,t)=>(0,j.jsx)(n.WhenMonth,{...t}),{quiet:!0}),prefetch:()=>Z.prefetch()};var o=T(S(),1),E="try \u201Ctomorrow 3pm\u201D, \u201CFri 10:30\u201D or \u201C17 Oct\u201D";function _(n,t,i,b=!1){let y=Date.UTC(+n.day.slice(0,4),+n.day.slice(5,7)-1,+n.day.slice(8,10),0,t?n.minutes??0:0),x={weekday:b?"long":"short",year:"numeric",month:b?"long":"short",day:"numeric",...t?{hour:"numeric",minute:"2-digit"}:{},timeZone:"UTC"},h;try{h=new Intl.DateTimeFormat(i??"en-US",x)}catch{h=new Intl.DateTimeFormat("en-US",x)}return h.format(y).replace(/ /g," ")}function V(n,t){if(n.length===4)return n;let i=Date.UTC(+n.slice(0,4),+n.slice(5,7)-1,1);try{return new Intl.DateTimeFormat(t??"en-US",{month:"long",year:"numeric",timeZone:"UTC"}).format(i)}catch{return new Intl.DateTimeFormat("en-US",{month:"long",year:"numeric",timeZone:"UTC"}).format(i)}}function me({value:n,time:t,instant:i=!1,partial:b=!1,label:y,name:x,required:h,autoFocus:G,autoSelect:N,locale:s,onChange:J,onLeave:Q,onCancel:X,inputRef:W,boxStyle:Y}){let k=(0,r.useId)(),p=(0,r.useRef)(null),O=(0,r.useRef)(null),I=e=>b&&!t&&e!==void 0?K(e):void 0,C=e=>{let a=I(e);if(a!==void 0)return V(a,s);let l=F(e);return l?_(l,t,s):e??""},[g,D]=(0,r.useState)(()=>C(n)),[R,w]=(0,r.useState)(!1),[ee,L]=(0,r.useState)(n),[ne,te]=(0,r.useState)(n);n!==ne&&(te(n),n!==ee&&(L(n),D(C(n)))),(0,r.useEffect)(()=>{N&&(p.current?.focus(),p.current?.select())},[N]);let d=t&&i?B(s):void 0,M=g===C(n),u=F(n),c=I(M?n:g),f=c!==void 0?void 0:M?u:H(g,{today:$().day,time:t,...u?{base:u}:{},...s?{locale:s}:{}}),re=M?n:c!==void 0?c:f?P(f,{time:t,instant:i}):void 0,v=g.trim()==="",m=!v&&f===void 0&&c===void 0;(0,r.useEffect)(()=>{p.current?.setCustomValidity(m?`Not a date this reads \u2014 ${E}`:"")},[m]);let z=e=>{L(e),J(e)},oe=e=>{D(e);let a=I(e);if(a!==void 0)return z(a);let l=e.trim()===""?void 0:H(e,{today:$().day,time:t,...u?{base:u}:{},...s?{locale:s}:{}});z(l?P(l,{time:t,instant:i}):void 0)},ae=e=>{let a=t?{day:e,minutes:f?.minutes??u?.minutes??540}:{day:e},l=P(a,{time:t,instant:i});D(C(l)),z(l),w(!1),requestAnimationFrame(()=>{p.current?.focus(),p.current?.select()})},ie=v?`Type a date, or pick one \u2014 ${E}`:m?`Not a date this reads \u2014 ${E}`:c!==void 0?`${V(c,s)} (${c.length===4?"a year":"a month"} alone)`:f?`${_(f,t,s,!0)}${d?` ${d.short}`:""}`:"";return(0,o.jsxs)("span",{"data-graview-when":t?i?"instant":"moment":"day",style:{display:"inline-flex",flex:"1 1 14rem",flexWrap:"wrap",alignItems:"center",gap:"4px 6px",maxWidth:"100%",minWidth:0},onBlur:e=>{let a=e.relatedTarget;a&&e.currentTarget.contains(a)||!a&&typeof document<"u"&&!document.hasFocus()||(w(!1),Q?.(re))},children:[(0,o.jsx)("input",{ref:e=>{p.current=e,typeof W=="function"?W(e):W&&(W.current=e)},type:"text",name:x,required:h,autoFocus:G,"aria-label":y,"aria-describedby":`${k}-said`,"aria-invalid":m||void 0,autoComplete:"off",spellCheck:!1,enterKeyHint:"done",placeholder:t?"tomorrow 3pm":"17 Oct",value:g,"data-graview-part":"control",onChange:e=>oe(e.target.value),onKeyDown:e=>{e.key==="Escape"?(e.preventDefault(),X?.()):e.key==="ArrowDown"&&e.altKey&&(e.preventDefault(),w(!0))},style:{flex:"1 1 12ch",minWidth:"10ch",maxWidth:"100%",boxSizing:"border-box",font:"inherit",...Y}}),(0,o.jsx)("button",{ref:O,type:"button","aria-label":`Pick a date for ${y}`,"aria-expanded":R,"aria-controls":`${k}-month`,"data-graview-part":"when-pick",onClick:()=>w(e=>!e),onPointerEnter:()=>U.prefetch(),style:{display:"inline-flex",alignItems:"center",justifyContent:"center",minWidth:32,minHeight:32,padding:0,borderRadius:6},children:(0,o.jsxs)("svg",{"aria-hidden":"true",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.4",children:[(0,o.jsx)("rect",{x:"2",y:"3",width:"12",height:"11",rx:"1.5"}),(0,o.jsx)("path",{d:"M2 6.5h12M5.5 1.5v3M10.5 1.5v3"})]})}),(0,o.jsxs)("span",{id:`${k}-said`,"aria-live":"polite","data-graview-part":"when-said",...d?{"data-graview-zone":d.zone,title:`Times are in ${d.zone.replace(/_/g," ")} (${d.short})`}:{},style:{flexBasis:"100%",fontSize:"0.75rem",color:m?"var(--graview-bad)":"var(--graview-ink-faint)"},children:[ie,d&&!m&&!v?(0,o.jsx)("span",{"data-graview-part":"when-zone",children:` \xB7 ${(d.zone.split("/").at(-1)??d.zone).replace(/_/g," ")} time`}):null]}),R?(0,o.jsx)(r.Suspense,{fallback:null,children:(0,o.jsx)(U.Part,{id:`${k}-month`,label:y,selected:f?.day??u?.day,today:$().day,locale:s,onPick:ae,onClose:()=>{w(!1),O.current?.focus()}})}):null]})}export{me as WhenInput,_ as wallAsRead};
|