birdclaw 0.9.5 → 0.10.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/CHANGELOG.md +25 -0
- package/README.md +22 -7
- package/dist/cli/birdclaw.js +6360 -4395
- package/dist/client/assets/FeedState-DhMv4zXD.js +1 -0
- package/dist/client/assets/ProfileAnalysisStream-B8zyyye-.js +1 -0
- package/dist/client/assets/SavedTimelineView-4QYaZ4CU.js +1 -0
- package/dist/client/assets/SyncNowButton-DDYT2jQT.js +1 -0
- package/dist/client/assets/TimelineRouteFrame-DJdUR7DX.js +1 -0
- package/dist/client/assets/TweetRichText-D-amgcEl.js +1 -0
- package/dist/client/assets/account-selection-h7m9xmzU.js +1 -0
- package/dist/client/assets/blocks-BpjvGwYq.js +2 -0
- package/dist/client/assets/blocks-C84MpzHq.js +1 -0
- package/dist/client/assets/{bookmarks-f8mrhE5v.js → bookmarks-Gy6MvAc9.js} +1 -1
- package/dist/client/assets/chevron-down-e-c5H12y.js +1 -0
- package/dist/client/assets/circle-DiJUdlek.js +1 -0
- package/dist/client/assets/data-sources-CqxgDfE3.js +1 -0
- package/dist/client/assets/database-Dl3XWRaa.js +1 -0
- package/dist/client/assets/discuss-C0CUMn6v.js +1 -0
- package/dist/client/assets/discuss-DKC6H1fN.js +2 -0
- package/dist/client/assets/dms-DWA5tvJS.js +1 -0
- package/dist/client/assets/dms-Q1a1kZ_P.js +2 -0
- package/dist/client/assets/external-link-CfdTAkvn.js +1 -0
- package/dist/client/assets/gauge-DP2ku9zz.js +1 -0
- package/dist/client/assets/heart-D-ERjZPN.js +1 -0
- package/dist/client/assets/inbox-C9zFrQ76.js +1 -0
- package/dist/client/assets/inbox-DjlVjj3K.js +2 -0
- package/dist/client/assets/index-B8hO98gL.js +31 -0
- package/dist/client/assets/lazyRouteComponent-CLLbUvMd.js +1 -0
- package/dist/client/assets/{likes-bYLP-Iur.js → likes-BXANVRCj.js} +1 -1
- package/dist/client/assets/links-6tWeHun_.js +2 -0
- package/dist/client/assets/links-D3Ut-aUB.js +1 -0
- package/dist/client/assets/mapbox-DfIoNJn2.js +2 -0
- package/dist/client/assets/mapbox-gl-BdaHQI9U.js +3220 -0
- package/dist/client/assets/{mentions-CceV_r9w.js → mentions-BKO40XiK.js} +1 -1
- package/dist/client/assets/message-circle-79LZr2oN.js +1 -0
- package/dist/client/assets/network-map-2EPsbMIT.js +2 -0
- package/dist/client/assets/network-map-CrXvY--k.css +1 -0
- package/dist/client/assets/network-map-DUpppygD.js +2 -0
- package/dist/client/assets/preload-helper-MpqUbZCn.js +1 -0
- package/dist/client/assets/profile-analyze-B5Rr41WP.js +2 -0
- package/dist/client/assets/profile-analyze-BqvM9hSa.js +1 -0
- package/dist/client/assets/{profile-hydration-client-kffyMcqf.js → profile-hydration-client-DoFW3yKH.js} +1 -1
- package/dist/client/assets/profiles._handle-DWyWAGG8.js +1 -0
- package/dist/client/assets/profiles._handle-DdZ9wAT-.js +2 -0
- package/dist/client/assets/query-client-CA-do_IS.js +17 -0
- package/dist/client/assets/rate-limits-DyRTb_U4.js +1 -0
- package/dist/client/assets/refresh-cw-IUfM9D_1.js +1 -0
- package/dist/client/assets/route-search-CmZT7pGD.js +1 -0
- package/dist/client/assets/{routes-DYUCTi0s.js → routes-ARIEjgq-.js} +1 -1
- package/dist/client/assets/styles-CjeA43Ci.css +2 -0
- package/dist/client/assets/today-DNAg-wnA.js +2 -0
- package/dist/client/assets/today-Q3xFx4cl.js +1 -0
- package/dist/client/assets/useDebouncedValue-BJLRInUq.js +1 -0
- package/dist/client/assets/useQuery-CL_NXLnc.js +1 -0
- package/dist/client/assets/useTimelineRouteData-DYhYLZY4.js +1 -0
- package/dist/client/assets/user-search-DL5_6EZd.js +1 -0
- package/dist/server/assets/{SavedTimelineView-BGZvQIYS.js → SavedTimelineView-Ern3q7LW.js} +1 -1
- package/dist/server/assets/{SyncNowButton-CsgOFaO_.js → SyncNowButton-C3OQghU4.js} +5 -3
- package/dist/server/assets/{TimelineRouteFrame-BWWFisJF.js → TimelineRouteFrame-CYD-qMuy.js} +1 -1
- package/dist/server/assets/_tanstack-start-manifest_v-CHtuH75x.js +221 -0
- package/dist/server/assets/{bookmarks-B-I4ELcA.js → bookmarks-DVCjWQPu.js} +1 -1
- package/dist/server/assets/{dms-BCI8W9u2.js → dms-Cr5heLhm.js} +2 -2
- package/dist/server/assets/{dms-BAKB1Mia.js → dms-DbJk33XB.js} +2 -2
- package/dist/server/assets/{empty-plugin-adapters-D9UWiqvJ.js → empty-plugin-adapters-YdH6Vqte.js} +1 -1
- package/dist/server/assets/{likes-CMQGc5bh.js → likes-C3EpsPbF.js} +1 -1
- package/dist/server/assets/{mentions-B2K8tGvx.js → mentions-BHd6N_OL.js} +1 -1
- package/dist/server/assets/{network-map-BLqLL8CR.js → network-map-S3bgKEDj.js} +1 -1
- package/dist/server/assets/{network-map-DvfpJQy1.js → network-map-rmU1NSHD.js} +1 -1
- package/dist/server/assets/{router-DeGdUXyx.js → router-BMfpBcBM.js} +2720 -2113
- package/dist/server/assets/{routes-C4caR_ZX.js → routes-Cyokiwx1.js} +1 -1
- package/dist/server/assets/start-P4i55asu.js +4 -0
- package/dist/server/server.js +3515 -51
- package/package.json +19 -19
- package/dist/client/assets/SavedTimelineView-HNbc1InN.js +0 -1
- package/dist/client/assets/TimelineRouteFrame-DUF8ETx2.js +0 -1
- package/dist/client/assets/blocks-CLV8UyL1.js +0 -1
- package/dist/client/assets/data-sources-obqEq3vx.js +0 -1
- package/dist/client/assets/discuss-IVQmzPlf.js +0 -1
- package/dist/client/assets/dms-Dz53c2A8.js +0 -1
- package/dist/client/assets/inbox-OtMwyDqg.js +0 -1
- package/dist/client/assets/index-bpFrQ5yG.css +0 -1
- package/dist/client/assets/index-gdLl886E.js +0 -31
- package/dist/client/assets/links-Calv868h.js +0 -1
- package/dist/client/assets/mapbox-D8DIktls.js +0 -2
- package/dist/client/assets/mapbox-gl-CL_i4VMi.js +0 -3215
- package/dist/client/assets/network-map-7r9If3kD.js +0 -2
- package/dist/client/assets/profile-analyze-BeyDxO7C.js +0 -1
- package/dist/client/assets/profiles._handle-BH11vR7-.js +0 -1
- package/dist/client/assets/query-client-CD880OPj.js +0 -17
- package/dist/client/assets/rate-limits-pf5ibAYx.js +0 -1
- package/dist/client/assets/styles-DAoXpgpq.css +0 -2
- package/dist/client/assets/today-CwzttriK.js +0 -1
- package/dist/client/assets/useTimelineRouteData-BE84vgO5.js +0 -1
- package/dist/server/assets/_tanstack-start-manifest_v-AFEKQ2i-.js +0 -148
- package/dist/server/assets/start-5Z2QO8AU.js +0 -4
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e}from"./rolldown-runtime-B-9mzPXz.js";import{t}from"./react-BwGzW7mM.js";import{Gt as n,Ht as r,Kt as i,M as a,Rn as o,Ut as s,Wt as c,cn as l,dn as u,dt as d,fn as f}from"./schemas-CMQMhQXI.js";import{t as p}from"./createLucideIcon-CMLcIxOz.js";import{t as m}from"./circle-check-BCK_qvXt.js";import{a as h,n as g,o as _,s as v,t as y}from"./client-stream-contracts-CNz2FSrQ.js";import{t as b}from"./refresh-cw-IUfM9D_1.js";import{t as x}from"./sparkles-Gx_BHkDX.js";import{b as S}from"./query-client-CA-do_IS.js";import{n as C,t as w}from"./profile-hydration-client-DoFW3yKH.js";import{s as T}from"./route-search-CmZT7pGD.js";import{t as E}from"./today-DNAg-wnA.js";var D=p(`file-down`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M12 18v-6`,key:`17g6i2`}],[`path`,{d:`m9 15 3 3 3-3`,key:`1npd3o`}]]),O=e(t()),k=o(),A=12,j=300,M={524:`Digest startup timed out at Cloudflare (524). Retry to open a new stream.`},N=[{value:`today`,label:`Today`},{value:`24h`,label:`24h`},{value:`yesterday`,label:`Yesterday`},{value:`week`,label:`Week`}];function P(e){return N.find(t=>t.value===e)?.label??`Digest`}function F(e){let t=document.title,n=!1,r=()=>{n||(n=!0,document.title=t,window.removeEventListener(`afterprint`,r))};document.title=e,window.addEventListener(`afterprint`,r,{once:!0}),window.setTimeout(r,3e3),window.print()}function I(e,t,n){let r=new URL(`/api/period-digest`,window.location.origin);return r.searchParams.set(`period`,e),r.searchParams.set(`includeDms`,String(t)),r.searchParams.set(`maxTweets`,`5000`),r.searchParams.set(`maxLinks`,`20`),r.searchParams.set(`liveSync`,`false`),n&&r.searchParams.set(`refresh`,`true`),r}function L(e,t){let n=e instanceof Error?e.message:String(e);return e instanceof TypeError&&/network error|failed to fetch|load failed/i.test(n)?`Digest connection was interrupted while ${t.toLowerCase()}. Retry to continue.`:e instanceof SyntaxError?`Digest stream returned invalid data while ${t.toLowerCase()}. Retry to continue.`:n||`Digest failed`}function R(e){if(!e)return`Local Twitter memory, summarized as it streams.`;let t=e.counts;return[`${String(t.home)} home`,`${String(t.mentions)} mentions`,`${String(t.links)} links`,e.includeDms?`${String(t.dms)} DMs`:null].filter(Boolean).join(` · `)}function z(e){let t=new Set,n=new Set;for(let t of e.digest.sourceTweetIds)n.add(t);for(let t of e.digest.keyTopics)for(let e of t.tweetIds)n.add(e);for(let t of e.digest.notableLinks)for(let e of t.sourceTweetIds)n.add(e);for(let t of e.digest.actionItems)t.tweetId&&n.add(t.tweetId);let r=new Map(e.context.tweets.flatMap(e=>[[e.id,e],[`tweet_${e.id}`,e]]));for(let e of n){let n=r.get(e);if(!n)continue;let i=C(n.author);i&&t.add(i)}for(let n of e.context.tweets){let e=C(n.author);e&&t.add(e)}return[...t]}function B(e,t){let n=!1,r=e.tweets.map(e=>{let r=t.get(C(e.author));return!r||r===e.authorProfile?e:(n=!0,{...e,author:r.handle,name:r.displayName,authorProfile:r})});return n?{...e,tweets:r}:e}function V(e,t){let n=new Map(t.map(e=>[C(e.handle),e]));if(n.size===0)return e;let r=B(e.context,n);return r===e.context?e:{...e,context:r}}function H(e,t){let n=S(),[r,i]=(0,O.useState)(``),[a,o]=(0,O.useState)(null),[s,c]=(0,O.useState)(null),[l,u]=(0,O.useState)(`Starting digest`),d=(0,O.useRef)(`Starting digest`),f=(0,O.useCallback)(()=>{i(``),o(null),c(null),u(`Starting digest`),d.current=`Starting digest`},[]),{error:p,loading:m,run:_}=h({schema:g,request:(0,O.useCallback)((n,r)=>fetch(I(e,t,r),{cache:`no-store`,signal:n}),[t,e]),onStart:f,onEvent:(0,O.useCallback)(e=>{if(e.type===`status`)d.current=e.detail?`${e.label} · ${e.detail}`:e.label,u(d.current);else if(e.type===`start`)o(e.context);else if(e.type===`delta`)d.current=`Streaming AI summary`,u(d.current),i(t=>t+e.delta);else if(e.type===`done`)c(e.result),o(e.result.context),i(e.result.markdown),u(e.result.cached?`Loaded cached report`:`Ready`);else if(e.type===`error`)throw Error(e.error)},[]),onError:(0,O.useCallback)(()=>u(`Digest failed`),[]),isTerminal:y,errorLabel:`Digest request failed`,emptyBodyMessage:`Digest request failed: empty response body`,prematureEofError:(0,O.useCallback)(()=>Error(`Digest connection closed while ${d.current.toLowerCase()}. Retry to continue.`),[]),formatError:(0,O.useCallback)(e=>L(e,d.current),[]),statusMessages:M});return(0,O.useEffect)(()=>{_(!1)},[_]),(0,O.useEffect)(()=>{if(!s)return;let e=z(s);if(e.length===0)return;let t=!0,r=null,i=()=>{w(n,e,{limit:A}).then(e=>{if(!t)return;let{profiles:n}=e;if(n.length===0)return;c(e=>e&&V(e,n));let r=new Map(n.map(e=>[C(e.handle),e]));o(e=>e&&B(e,r))}).catch(e=>{t&&console.warn(`Profile hydration failed`,e)})},a=window.setTimeout(()=>{`requestIdleCallback`in window?r=window.requestIdleCallback(i,{timeout:2500}):i()},j);return()=>{t=!1,window.clearTimeout(a),r!==null&&`cancelIdleCallback`in window&&window.cancelIdleCallback(r)}},[n,s]),{context:a,error:p,loading:m,markdown:r,result:s,run:_,status:l}}function U(){let e=E.useSearch(),t=E.useNavigate();return(0,k.jsx)(W,{searchState:e,onSearchChange:(e,n)=>void t({search:e,replace:n?.replace})})}function W({searchState:e,onSearchChange:t}={}){let[o,p]=(0,O.useState)(()=>T({})),h=e??o,g=(e,n)=>t?t(e,n):p(e),{period:y,includeDms:S}=h,{context:C,error:w,loading:E,markdown:A,result:j,run:M,status:I}=H(y,S);(0,O.useEffect)(()=>{let e=document.documentElement;return e.classList.add(`today-pdf-route`),()=>e.classList.remove(`today-pdf-route`)},[]);let L=(0,O.useMemo)(()=>R(j?.context??C),[C,j]),z=j?.context.window.label??C?.window.label??P(y),B=!!j?.markdown.trim()&&!E,V=`BirdClaw ${z} digest`,U=j?new Date(j.updatedAt).toLocaleString(void 0,{dateStyle:`medium`,timeStyle:`short`}):null,W=(0,O.useCallback)(()=>{B&&F(V)},[B,V]);return(0,k.jsxs)(`div`,{className:`today-pdf-root flex min-h-screen flex-col`,children:[(0,k.jsxs)(`header`,{className:a(`today-pdf-header`,s),children:[(0,k.jsxs)(`div`,{className:c,children:[(0,k.jsxs)(`div`,{className:`min-w-0`,children:[(0,k.jsx)(`h1`,{className:i,children:`What happened`}),(0,k.jsx)(`p`,{className:n,children:L})]}),(0,k.jsxs)(`div`,{className:a(`today-screen-only`,r),children:[B?(0,k.jsxs)(`button`,{type:`button`,className:l,onClick:W,children:[(0,k.jsx)(D,{className:`size-4`,"aria-hidden":`true`}),`Export PDF`]}):null,(0,k.jsxs)(`button`,{type:`button`,className:l,onClick:()=>M(!0),disabled:E,children:[(0,k.jsx)(b,{className:a(`size-4`,E&&`animate-spin`),"aria-hidden":`true`}),`Refresh`]})]})]}),(0,k.jsxs)(`div`,{className:`today-pdf-meta`,"aria-hidden":`true`,children:[(0,k.jsx)(`span`,{children:z}),(0,k.jsx)(`span`,{children:`·`}),(0,k.jsxs)(`span`,{children:[`Sources: `,L]}),U?(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(`span`,{children:`·`}),(0,k.jsxs)(`span`,{children:[`Generated `,U]})]}):null]}),(0,k.jsxs)(`div`,{className:`today-screen-only flex flex-wrap items-center gap-2 px-4 pb-3`,children:[(0,k.jsx)(`div`,{className:f,"aria-label":`Digest period`,children:N.map(e=>(0,k.jsx)(`button`,{type:`button`,"aria-pressed":y===e.value,className:a(u,y===e.value&&`bg-[var(--accent-soft)]! text-[var(--accent)]! shadow-[inset_0_0_0_1px_color-mix(in_srgb,var(--accent)_36%,transparent)]`),onClick:()=>g({...h,period:e.value}),children:e.label},e.value))}),(0,k.jsxs)(`label`,{className:`inline-flex items-center gap-2 rounded-full border border-[var(--line)] px-3 py-1 text-[13px] font-medium text-[var(--ink-soft)]`,children:[(0,k.jsx)(`input`,{type:`checkbox`,checked:S,onChange:e=>g({...h,includeDms:e.currentTarget.checked})}),`DMs`]})]})]}),w?(0,k.jsxs)(`div`,{className:a(d,`flex items-center justify-between gap-3`),role:`alert`,children:[(0,k.jsx)(`span`,{children:w}),(0,k.jsx)(`button`,{className:`shrink-0 font-semibold underline underline-offset-2`,onClick:()=>M(!0),type:`button`,children:`Retry`})]}):null,(0,k.jsx)(`div`,{className:`today-screen-only border-b border-[var(--line)] px-4 py-2 text-[13px] text-[var(--ink-soft)]`,children:(0,k.jsxs)(`span`,{className:`inline-flex items-center gap-1`,children:[E?(0,k.jsx)(v,{className:`size-4 animate-spin`,"aria-hidden":`true`}):A?(0,k.jsx)(m,{className:`size-4`,"aria-hidden":`true`}):(0,k.jsx)(x,{className:`size-4`,"aria-hidden":`true`}),E?I:j?`${j.cached?`Cached`:`Ready`} · ${j.context.window.label}`:w?`Digest failed`:`Ready`]})}),A?(0,k.jsx)(_,{context:j?.context??C,markdown:A}):(0,k.jsx)(`div`,{className:`px-4 py-5 text-[14px] text-[var(--ink-soft)]`,children:E?I:w?`No digest was generated. Retry to start a new run.`:`Waiting for the first tokens...`})]})}export{W as TodayRouteView,U as component};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e}from"./rolldown-runtime-B-9mzPXz.js";import{t}from"./react-BwGzW7mM.js";var n=e(t(),1);function r(e,t){let[r,i]=(0,n.useState)(e);return(0,n.useEffect)(()=>{let n=window.setTimeout(()=>i(e),t);return()=>window.clearTimeout(n)},[t,e]),r}export{r as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e}from"./rolldown-runtime-B-9mzPXz.js";import{t}from"./react-BwGzW7mM.js";import{Rn as n}from"./schemas-CMQMhQXI.js";import{B as r,D as i,E as a,F as o,I as s,L as c,M as l,N as u,P as d,R as f,S as p,T as m,b as h,j as g,k as _,z as v}from"./query-client-CA-do_IS.js";var y=class extends r{constructor(e,t){super(),this.options=t,this.#e=e,this.#s=null,this.#o=a(),this.bindMethods(),this.setOptions(t)}#e;#t=void 0;#n=void 0;#r=void 0;#i;#a;#o;#s;#c;#l;#u;#d;#f;#p;#m=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),x(this.#t,this.options)?this.#h():this.updateResult(),this.#y())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return S(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return S(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#b(),this.#x(),this.#t.removeObserver(this)}setOptions(e){let t=this.options,n=this.#t;if(this.options=this.#e.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!=`boolean`&&typeof this.options.enabled!=`function`&&typeof u(this.options.enabled,this.#t)!=`boolean`)throw Error(`Expected enabled to be a boolean or a callback that returns a boolean`);this.#S(),this.#t.setOptions(this.options),t._defaulted&&!o(this.options,t)&&this.#e.getQueryCache().notify({type:`observerOptionsUpdated`,query:this.#t,observer:this});let r=this.hasListeners();r&&C(this.#t,n,this.options,t)&&this.#h(),this.updateResult(),r&&(this.#t!==n||u(this.options.enabled,this.#t)!==u(t.enabled,this.#t)||d(this.options.staleTime,this.#t)!==d(t.staleTime,this.#t))&&this.#g();let i=this.#_();r&&(this.#t!==n||u(this.options.enabled,this.#t)!==u(t.enabled,this.#t)||i!==this.#p)&&this.#v(i)}getOptimisticResult(e){let t=this.#e.getQueryCache().build(this.#e,e),n=this.createResult(t,e);return T(this,n)&&(this.#r=n,this.#a=this.options,this.#i=this.#t.state),n}getCurrentResult(){return this.#r}trackResult(e,t){return new Proxy(e,{get:(e,n)=>(this.trackProp(n),t?.(n),n===`promise`&&(this.trackProp(`data`),!this.options.experimental_prefetchInRender&&this.#o.status===`pending`&&this.#o.reject(Error(`experimental_prefetchInRender feature flag is not enabled`))),Reflect.get(e,n))})}trackProp(e){this.#m.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){let t=this.#e.defaultQueryOptions(e),n=this.#e.getQueryCache().build(this.#e,t);return n.fetch().then(()=>this.createResult(n,t))}fetch(e){return this.#h({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#r))}#h(e){this.#S();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(g)),t}#g(){this.#b();let e=d(this.options.staleTime,this.#t);if(i.isServer()||this.#r.isStale||!_(e))return;let t=c(this.#r.dataUpdatedAt,e)+1;this.#d=f.setTimeout(()=>{this.#r.isStale||this.updateResult()},t)}#_(){return(typeof this.options.refetchInterval==`function`?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#v(e){this.#x(),this.#p=e,!(i.isServer()||u(this.options.enabled,this.#t)===!1||!_(this.#p)||this.#p===0)&&(this.#f=f.setInterval(()=>{(this.options.refetchIntervalInBackground||v.isFocused())&&this.#h()},this.#p))}#y(){this.#g(),this.#v(this.#_())}#b(){this.#d!==void 0&&(f.clearTimeout(this.#d),this.#d=void 0)}#x(){this.#f!==void 0&&(f.clearInterval(this.#f),this.#f=void 0)}createResult(e,t){let n=this.#t,r=this.options,i=this.#r,o=this.#i,s=this.#a,c=e===n?this.#n:e.state,{state:d}=e,f={...d},m=!1,h;if(t._optimisticResults){let i=this.hasListeners(),a=!i&&x(e,t),o=i&&C(e,n,t,r);(a||o)&&(f={...f,...p(d.data,e.options)}),t._optimisticResults===`isRestoring`&&(f.fetchStatus=`idle`)}let{error:g,errorUpdatedAt:_,status:v}=f;h=f.data;let y=!1;if(t.placeholderData!==void 0&&h===void 0&&v===`pending`){let e;i?.isPlaceholderData&&t.placeholderData===s?.placeholderData?(e=i.data,y=!0):e=typeof t.placeholderData==`function`?t.placeholderData(this.#u?.state.data,this.#u):t.placeholderData,e!==void 0&&(v=`success`,h=l(i?.data,e,t),m=!0)}if(t.select&&h!==void 0&&!y)if(i&&h===o?.data&&t.select===this.#c)h=this.#l;else try{this.#c=t.select,h=t.select(h),h=l(i?.data,h,t),this.#l=h,this.#s=null}catch(e){this.#s=e}this.#s&&(g=this.#s,h=this.#l,_=Date.now(),v=`error`);let b=f.fetchStatus===`fetching`,S=v===`pending`,T=v===`error`,E=S&&b,D=h!==void 0,O={status:v,fetchStatus:f.fetchStatus,isPending:S,isSuccess:v===`success`,isError:T,isInitialLoading:E,isLoading:E,data:h,dataUpdatedAt:f.dataUpdatedAt,error:g,errorUpdatedAt:_,failureCount:f.fetchFailureCount,failureReason:f.fetchFailureReason,errorUpdateCount:f.errorUpdateCount,isFetched:e.isFetched(),isFetchedAfterMount:f.dataUpdateCount>c.dataUpdateCount||f.errorUpdateCount>c.errorUpdateCount,isFetching:b,isRefetching:b&&!S,isLoadingError:T&&!D,isPaused:f.fetchStatus===`paused`,isPlaceholderData:m,isRefetchError:T&&D,isStale:w(e,t),refetch:this.refetch,promise:this.#o,isEnabled:u(t.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){let t=O.data!==void 0,r=O.status===`error`&&!t,i=e=>{r?e.reject(O.error):t&&e.resolve(O.data)},o=()=>{let e=this.#o=O.promise=a();i(e)},s=this.#o;switch(s.status){case`pending`:e.queryHash===n.queryHash&&i(s);break;case`fulfilled`:(r||O.data!==s.value)&&o();break;case`rejected`:(!r||O.error!==s.reason)&&o();break}}return O}updateResult(){let e=this.#r,t=this.createResult(this.#t,this.options);this.#i=this.#t.state,this.#a=this.options,this.#i.data!==void 0&&(this.#u=this.#t),!o(t,e)&&(this.#r=t,this.#C({listeners:(()=>{if(!e)return!0;let{notifyOnChangeProps:t}=this.options,n=typeof t==`function`?t():t;if(n===`all`||!n&&!this.#m.size)return!0;let r=new Set(n??this.#m);return this.options.throwOnError&&r.add(`error`),Object.keys(this.#r).some(t=>{let n=t;return this.#r[n]!==e[n]&&r.has(n)})})()}))}#S(){let e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#t)return;let t=this.#t;this.#t=e,this.#n=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#y()}#C(e){m.batch(()=>{e.listeners&&this.listeners.forEach(e=>{e(this.#r)}),this.#e.getQueryCache().notify({query:this.#t,type:`observerResultsUpdated`})})}};function b(e,t){return u(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status===`error`&&u(t.retryOnMount,e)===!1)}function x(e,t){return b(e,t)||e.state.data!==void 0&&S(e,t,t.refetchOnMount)}function S(e,t,n){if(u(t.enabled,e)!==!1&&d(t.staleTime,e)!==`static`){let r=typeof n==`function`?n(e):n;return r===`always`||r!==!1&&w(e,t)}return!1}function C(e,t,n,r){return(e!==t||u(r.enabled,e)===!1)&&(!n.suspense||e.state.status!==`error`)&&w(e,n)}function w(e,t){return u(t.enabled,e)!==!1&&e.isStaleByTime(d(t.staleTime,e))}function T(e,t){return!o(e.getCurrentResult(),t)}n();var E=e(t(),1),D=E.createContext(!1),O=()=>E.useContext(D);D.Provider;function k(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var A=E.createContext(k()),j=()=>E.useContext(A),M=(e,t,n)=>{let r=n?.state.error&&typeof e.throwOnError==`function`?s(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||r)&&(t.isReset()||(e.retryOnMount=!1))},N=e=>{E.useEffect(()=>{e.clearReset()},[e])},P=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(i&&e.data===void 0||s(n,[e.error,r])),F=e=>{if(e.suspense){let t=1e3,n=e=>e===`static`?e:Math.max(e??t,t),r=e.staleTime;e.staleTime=typeof r==`function`?(...e)=>n(r(...e)):n(r),typeof e.gcTime==`number`&&(e.gcTime=Math.max(e.gcTime,t))}},I=(e,t)=>e.isLoading&&e.isFetching&&!t,L=(e,t)=>e?.suspense&&t.isPending,R=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function z(e,t,n){let r=O(),a=j(),o=h(n),s=o.defaultQueryOptions(e);o.getDefaultOptions().queries?._experimental_beforeQuery?.(s);let c=o.getQueryCache().get(s.queryHash),l=e.subscribed!==!1;s._optimisticResults=r?`isRestoring`:l?`optimistic`:void 0,F(s),M(s,a,c),N(a);let u=!o.getQueryCache().get(s.queryHash),[d]=E.useState(()=>new t(o,s)),f=d.getOptimisticResult(s),p=!r&&l;if(E.useSyncExternalStore(E.useCallback(e=>{let t=p?d.subscribe(m.batchCalls(e)):g;return d.updateResult(),t},[d,p]),()=>d.getCurrentResult(),()=>d.getCurrentResult()),E.useEffect(()=>{d.setOptions(s)},[s,d]),L(s,f))throw R(s,d,a);if(P({result:f,errorResetBoundary:a,throwOnError:s.throwOnError,query:c,suspense:s.suspense}))throw f.error;return o.getDefaultOptions().queries?._experimental_afterQuery?.(s,f),s.experimental_prefetchInRender&&!i.isServer()&&I(f,r)&&(u?R(s,d,a):c?.promise)?.catch(g).finally(()=>{d.updateResult()}),s.notifyOnChangeProps?f:d.trackResult(f)}function B(e,t){return z(e,y,t)}export{z as n,y as r,B as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e}from"./rolldown-runtime-B-9mzPXz.js";import{t}from"./react-BwGzW7mM.js";import{At as n,Ct as r,Dt as i,Et as a,Fn as o,Gt as s,In as c,Kt as l,M as u,Mt as d,Rn as f,St as p,Tt as m,Ut as h,Wt as g,_t as _,an as v,at as y,bt as b,ct as x,ft as S,gt as C,ht as w,it as T,jt as E,kt as D,lt as O,mt as k,on as ee,ot as te,pt as A,rt as ne,sn as re,st as ie,vt as ae,wt as j,xt as oe,yt as se}from"./schemas-CMQMhQXI.js";import{t as M}from"./createLucideIcon-CMLcIxOz.js";import{t as ce}from"./circle-check-BCK_qvXt.js";import{t as le}from"./circle-DiJUdlek.js";import{t as ue}from"./external-link-CfdTAkvn.js";import{t as de}from"./heart-D-ERjZPN.js";import{t as N}from"./message-circle-79LZr2oN.js";import{t as fe}from"./repeat-2-CQ0lek01.js";import{t as pe}from"./search-C_LqodNa.js";import{t as me}from"./user-search-DL5_6EZd.js";import{C as he,a as ge,b as P,i as _e,l as ve,m as ye,n as F,o as be,r as xe,s as Se,v as Ce,w as we}from"./query-client-CA-do_IS.js";import{n as Te,r as Ee,t as I}from"./useQuery-CL_NXLnc.js";import{i as De,r as Oe}from"./account-selection-h7m9xmzU.js";import{r as L,t as R}from"./AvatarChip-DsHj3LT7.js";import{a as ke,n as Ae,o as je,r as Me,s as Ne,t as Pe}from"./FeedState-DhMv4zXD.js";import{c as Fe,i as z,s as Ie,t as B}from"./ProfilePreview-CaaMHV2N.js";import{t as V}from"./SmartTimestamp-CXaNLqN7.js";import{t as Le}from"./useDebouncedValue-BJLRInUq.js";import{t as H}from"./TweetRichText-D-amgcEl.js";var Re=M(`book-open`,[[`path`,{d:`M12 7v14`,key:`1akyts`}],[`path`,{d:`M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z`,key:`ruj8y`}]]),ze=M(`bookmark-check`,[[`path`,{d:`M17 3a2 2 0 0 1 2 2v15a1 1 0 0 1-1.496.868l-4.512-2.578a2 2 0 0 0-1.984 0l-4.512 2.578A1 1 0 0 1 5 20V5a2 2 0 0 1 2-2z`,key:`oz39mx`}],[`path`,{d:`m9 10 2 2 4-4`,key:`1gnqz4`}]]),Be=M(`image`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,ry:`2`,key:`1m3agn`}],[`circle`,{cx:`9`,cy:`9`,r:`2`,key:`af1f0g`}],[`path`,{d:`m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21`,key:`1xmnt7`}]]),Ve=M(`x`,[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]),He=class extends Ee{constructor(e,t){super(e,t)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e){e._type=`infinite`,super.setOptions(e)}getOptimisticResult(e){return e._type=`infinite`,super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:`forward`}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:`backward`}}})}createResult(e,t){let{state:n}=e,r=super.createResult(e,t),{isFetching:i,isRefetching:a,isError:o,isRefetchError:s}=r,c=n.fetchMeta?.fetchMore?.direction,l=o&&c===`forward`,u=i&&c===`forward`,d=o&&c===`backward`,f=i&&c===`backward`;return{...r,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:he(t,n.data),hasPreviousPage:we(t,n.data),isFetchNextPageError:l,isFetchingNextPage:u,isFetchPreviousPageError:d,isFetchingPreviousPage:f,isRefetchError:s&&!l&&!d,isRefetching:a&&!u&&!f}}};function Ue(e){return e}function We(e,t){return Te(e,He,t)}var U=e(t(),1),Ge=(0,U.createContext)(null);function Ke(e){return Ue({queryKey:[...F.conversations,e],queryFn:()=>ve(_e(`/api/conversation?tweetId=${encodeURIComponent(e)}`,void 0,Ce,`Conversation unavailable`)).then(e=>e.items),staleTime:1/0})}function qe({children:e}){let[t,n]=(0,U.useState)(null),r=(0,U.useMemo)(()=>({expandedSurfaceId:t,setExpandedSurfaceId:n}),[t]);return(0,U.createElement)(Ge.Provider,{value:r},e)}function Je(e,t=e){let n=(0,U.useContext)(Ge),[r,i]=(0,U.useState)(null),a=n?.expandedSurfaceId??r,o=n?.setExpandedSurfaceId??i,s=a===e,c=P(),l=I({...Ke(t),enabled:s}),u=(0,U.useCallback)(()=>{o(s?null:e)},[s,o,e]),d=(0,U.useCallback)(()=>{c.prefetchQuery(Ke(t))},[c,t]),f=l.isError?`error`:l.isFetching?`loading`:l.data?`ready`:`idle`;return{error:l.error instanceof Error?l.error.message:null,isOpen:s,items:l.data??[],loading:l.isFetching,prefetch:d,status:f,toggle:u}}var W=f();function Ye(e){let t=z(e);if(!t)return null;try{return new URL(t).hostname===`pbs.twimg.com`?t:null}catch{return null}}function G({article:e}){let t=z(e.url);if(!t)return null;let r=Ye(e.coverImageUrl);return(0,W.jsxs)(`a`,{"aria-label":`Read article: ${e.title}`,className:D,"data-perf":`tweet-article-card`,href:t,rel:`noreferrer`,target:`_blank`,children:[(0,W.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-col justify-center gap-1 px-3.5 py-3`,children:[(0,W.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[(0,W.jsx)(Re,{"aria-hidden":`true`,className:`size-3.5 shrink-0 text-[var(--ink-soft)]`,strokeWidth:1.8}),(0,W.jsx)(`span`,{className:E,children:`Article on X`}),(0,W.jsx)(ue,{"aria-hidden":`true`,className:`size-3.5 shrink-0 text-[var(--ink-soft)] opacity-0 transition-opacity group-hover/link-preview:opacity-100`,strokeWidth:1.8})]}),(0,W.jsx)(`span`,{className:d,children:e.title}),e.previewText?(0,W.jsx)(`span`,{className:n,children:e.previewText}):null]}),r?(0,W.jsx)(`div`,{className:`flex aspect-[1.45] w-40 shrink-0 overflow-hidden border-l border-[var(--line)] bg-[var(--bg-soft)] max-[720px]:w-28`,children:(0,W.jsx)(`img`,{alt:``,className:`size-full object-cover transition-transform duration-200 group-hover/link-preview:scale-[1.03]`,loading:`lazy`,src:r})}):null]})}function K({items:e}){let[t,n]=(0,U.useState)(null);if(e.length===0)return null;let r=e.slice(0,4),i=t===null?null:r[t]??null,a=i?.type===`video`||i?.type===`gif`?i.variants?.[0]?.url??Ze(i.url):null,s=r.length===1&&r[0]?.type===`image`?r[0]:null;return(0,W.jsxs)(W.Fragment,{children:[s?(0,W.jsx)(`button`,{"aria-label":`Open tweet media 1`,className:u(`tweet-media-single mt-2 max-w-full overflow-hidden rounded-2xl border border-[var(--line)] bg-[var(--bg-active)] p-0 text-left`,s.width&&s.height?`block`:`inline-block align-top`),onClick:e=>{e.stopPropagation(),n(0)},style:Xe(s),type:`button`,children:(0,W.jsx)(`img`,{alt:s.altText??`Tweet media 1`,className:u(`tweet-media-image block max-h-[720px] max-w-full`,s.width&&s.height?`size-full object-cover`:`h-auto w-auto object-contain`),height:s.height,loading:`lazy`,src:s.thumbnailUrl??s.url,width:s.width})}):(0,W.jsx)(`div`,{className:o(Math.min(e.length,4)),children:r.map((t,i)=>(0,W.jsx)(`button`,{"aria-label":`Open tweet media ${String(i+1)}`,className:c(i,Math.min(e.length,4)),onClick:e=>{e.stopPropagation(),n(i)},style:r.length===1&&t.width&&t.height?{aspectRatio:`${String(t.width)} / ${String(t.height)}`}:void 0,type:`button`,children:t.type===`image`?(0,W.jsx)(`img`,{alt:t.altText??`Tweet media ${String(i+1)}`,className:`tweet-media-image block size-full object-contain`,loading:`lazy`,src:t.thumbnailUrl??t.url}):(0,W.jsx)(`span`,{className:`tweet-media-fallback grid min-h-40 place-items-center font-semibold text-[var(--ink-soft)]`,children:t.type===`video`?`Video`:t.type===`gif`?`GIF`:`Media`})},t.url+String(i)))}),i?(0,W.jsxs)(`div`,{"aria-modal":`true`,className:`fixed inset-0 z-50 flex items-center justify-center bg-black/85 p-4`,onClick:e=>{e.stopPropagation(),n(null)},role:`dialog`,children:[(0,W.jsx)(`button`,{"aria-label":`Close media viewer`,className:`absolute right-4 top-4 grid size-10 place-items-center rounded-full bg-white/10 text-white transition-colors hover:bg-white/20`,onClick:e=>{e.stopPropagation(),n(null)},type:`button`,children:(0,W.jsx)(Ve,{className:`size-5`,strokeWidth:1.8})}),i.type===`image`?(0,W.jsx)(`img`,{alt:i.altText??`Tweet media`,className:`max-h-[92vh] max-w-[92vw] object-contain`,onClick:e=>e.stopPropagation(),src:i.url}):a?(0,W.jsx)(`video`,{autoPlay:i.type===`gif`,className:`max-h-[92vh] max-w-[92vw]`,controls:!0,loop:i.type===`gif`,muted:i.type===`gif`,onClick:e=>e.stopPropagation(),playsInline:!0,poster:i.thumbnailUrl,src:a}):(0,W.jsxs)(`div`,{className:`grid min-h-64 min-w-80 place-items-center gap-3 rounded-2xl border border-white/20 bg-black p-6 text-white`,onClick:e=>e.stopPropagation(),children:[(0,W.jsx)(`span`,{children:i.type===`video`?`Video`:i.type===`gif`?`GIF`:`Media`}),(0,W.jsx)(`a`,{className:`rounded-full bg-white/10 px-4 py-2 text-sm font-semibold text-white transition-colors hover:bg-white/20`,href:i.url,rel:`noreferrer`,target:`_blank`,children:`Open media`})]})]}):null]})}function Xe(e){if(!e.width||!e.height)return;let t=Math.min(e.width,Math.round(e.width/e.height*720));return{aspectRatio:`${String(e.width)} / ${String(e.height)}`,width:`${String(t)}px`}}function Ze(e){try{let t=new URL(e);return t.hostname===`video.twimg.com`||/\.(?:mp4|m3u8)(?:$|[?#])/i.test(t.pathname)?e:void 0}catch{return/\.(?:mp4|m3u8)(?:$|[?#])/i.test(e)?e:void 0}}function Qe({anchorId:e,error:t,items:n,loading:r}){return r?(0,W.jsx)(`section`,{className:`mt-3 rounded-2xl border border-[var(--line)] bg-[var(--bg-card)]`,children:(0,W.jsx)(Ne,{detail:`Finding archived replies around this post`,label:`Loading conversation`})}):t?(0,W.jsx)(`section`,{className:`mt-3 rounded-2xl border border-[var(--alert)] bg-[var(--alert-soft)] px-4 py-3 text-[14px] text-[var(--alert)]`,children:t}):n.length<=1?(0,W.jsx)(`section`,{className:`mt-3 rounded-2xl border border-[var(--line)]`,children:(0,W.jsx)(je,{detail:`This post has no other archived replies locally.`,label:`No thread context yet`})}):(0,W.jsxs)(`section`,{"aria-label":`Conversation`,className:`mt-3 overflow-hidden rounded-2xl border border-[var(--line)] bg-[var(--bg-card)]`,children:[(0,W.jsxs)(`div`,{className:`flex items-center gap-2 border-b border-[var(--line)] px-4 py-2.5 text-[13px] font-bold text-[var(--ink)]`,children:[(0,W.jsx)(N,{className:A,strokeWidth:1.8}),(0,W.jsxs)(`span`,{children:[n.length,` tweets in conversation`]})]}),(0,W.jsx)(`div`,{className:`flex flex-col`,children:n.map((t,r)=>{let a=t.id===e;return(0,W.jsxs)(`div`,{className:u(`flex gap-3 px-4 py-3`,r>0&&`border-t border-[var(--line)]`,a&&`bg-[var(--accent-soft)]`),children:[(0,W.jsxs)(`div`,{className:`flex flex-col items-center`,children:[(0,W.jsx)(R,{avatarUrl:t.author.avatarUrl,hue:t.author.avatarHue,name:t.author.displayName,profileId:t.author.id,size:`small`}),r<n.length-1?(0,W.jsx)(`span`,{className:`mt-2 w-px flex-1 bg-[var(--line)]`}):null]}),(0,W.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,W.jsxs)(`header`,{className:`flex min-w-0 items-center gap-1.5 text-[14px]`,children:[(0,W.jsx)(B,{profile:t.author,children:(0,W.jsxs)(`span`,{className:`flex min-w-0 items-center gap-1.5`,children:[(0,W.jsx)(`span`,{className:p,children:t.author.displayName}),(0,W.jsxs)(`span`,{className:b,children:[`@`,t.author.handle]})]})}),(0,W.jsx)(`span`,{className:`text-[var(--ink-soft)]`,children:`·`}),(0,W.jsx)(V,{className:i,value:t.createdAt}),a?(0,W.jsx)(`span`,{className:`ml-auto rounded-full bg-[var(--accent)] px-2 py-0.5 text-[11px] font-bold text-white`,children:`selected`}):null]}),(0,W.jsx)(H,{className:`mt-1 whitespace-pre-wrap break-words text-[14px] leading-[1.45] text-[var(--ink)] [overflow-wrap:anywhere]`,entities:t.entities,text:t.text}),(0,W.jsx)(K,{items:t.media}),t.entities.article?(0,W.jsx)(G,{article:t.entities.article}):null]})]},t.id)})})]})}function q({item:e,label:t}){return(0,W.jsxs)(`section`,{className:ne,children:[(0,W.jsx)(`p`,{className:x,children:t}),(0,W.jsxs)(`header`,{className:ie,children:[(0,W.jsx)(B,{profile:e.author,children:(0,W.jsxs)(`span`,{className:`flex min-w-0 items-center gap-1.5`,children:[(0,W.jsx)(`span`,{className:O,children:e.author.displayName}),(0,W.jsxs)(`span`,{className:te,children:[`@`,e.author.handle]})]})}),(0,W.jsx)(`span`,{className:`text-[var(--ink-soft)]`,children:`·`}),(0,W.jsx)(V,{className:i,value:e.createdAt})]}),(0,W.jsx)(H,{className:y,entities:e.entities,text:e.text}),(0,W.jsx)(K,{items:e.media}),e.entities.article?(0,W.jsx)(G,{article:e.entities.article}):null]})}var $e=2,J=0,Y=[];function et(e){let t=e.expandedUrl||``;return e.imageUrl&&e.siteName&&e.title&&it(t)?!1:!e.imageUrl||!e.title||!e.description||e.title===e.displayUrl||e.description===e.displayUrl}function tt(){for(;J<$e&&Y.length>0;)Y.shift()?.()}function nt(e){return new Promise((t,n)=>{Y.push(()=>{J+=1,e().then(t).catch(n).finally(()=>{J=Math.max(0,J-1),tt()})}),tt()})}function rt(e){let t=new URLSearchParams({url:e});return Ue({queryKey:[...F.linkPreviews,e],queryFn:()=>nt(()=>xe(`/api/link-preview?${t.toString()}`,void 0,ye,`Link preview unavailable`).then(e=>e.preview)),staleTime:30*6e4})}function X(e,t){try{return new URL(e).hostname.replace(/^www\./,``)}catch{return t}}function it(e){try{let t=new URL(e);return t.protocol===`https:`&&t.hostname===`pbs.twimg.com`&&(t.pathname.startsWith(`/media/`)||t.pathname.startsWith(`/amplify_video_thumb/`))}catch{return!1}}function at(e){if(!e)return null;try{let t=new URL(e);return t.protocol===`https:`&&t.hostname===`pbs.twimg.com`&&(t.pathname.startsWith(`/media/`)||t.pathname.startsWith(`/amplify_video_thumb/`))?t.toString():null}catch{return null}}function ot({entry:e,index:t}){let r=z(e.expandedUrl||e.url),i=r??``,a=e.displayUrl||(r?X(r,r):``),o=r&&it(r)?r:null,s=(0,U.useMemo)(()=>({expandedUrl:i,displayUrl:a,title:e.title??(o?X(i,a):void 0),description:e.description??(o?a:void 0),imageUrl:e.imageUrl??o,siteName:e.siteName??(o?X(i,a):void 0)}),[o,a,e.description,e.imageUrl,e.siteName,e.title,i]),[c,l]=(0,U.useState)(!1),[f,p]=(0,U.useState)(!1),[m,h]=(0,U.useState)(!1),g=(0,U.useRef)(null),_=!!(r&&et(s)),v=I({...rt(r??``),enabled:_&&f&&m}),y=(0,U.useMemo)(()=>{let e=v.data;return e?{expandedUrl:z(e.url)??s.expandedUrl,displayUrl:s.displayUrl,title:e.title??s.title,description:e.description??s.description,imageUrl:e.imageUrl??s.imageUrl,siteName:e.siteName??s.siteName}:s},[s,v.data]);if((0,U.useEffect)(()=>{l(!1),p(!1),h(!1)},[s]),(0,U.useEffect)(()=>{if(!r||!_)return;let e=g.current;if(!e||typeof IntersectionObserver>`u`){p(!0);return}let t=new IntersectionObserver(e=>{e.some(e=>e.isIntersecting)&&(p(!0),t.disconnect())},{rootMargin:`320px 0px`});return t.observe(e),()=>t.disconnect()},[_,r]),(0,U.useEffect)(()=>{if(!r||!f||!_)return;let e=window.setTimeout(()=>{h(!0)},100);return()=>window.clearTimeout(e)},[f,_,r]),!r)return null;let b=y.title||e.displayUrl,x=y.description&&y.description!==b?y.description:y.siteName||X(y.expandedUrl,e.displayUrl),S=y.siteName||X(y.expandedUrl,e.displayUrl),C=at(y.imageUrl),w=!!(C&&!c);return(0,W.jsxs)(`a`,{className:D,"data-perf":`link-preview-card`,href:z(y.expandedUrl)??r,ref:g,rel:`noreferrer`,target:`_blank`,children:[(0,W.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-col justify-center gap-1 px-3.5 py-3`,children:[(0,W.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[(0,W.jsx)(`span`,{className:E,children:S}),(0,W.jsx)(ue,{"aria-hidden":`true`,className:`size-3.5 shrink-0 text-[var(--ink-soft)] opacity-0 transition-opacity group-hover/link-preview:opacity-100`,strokeWidth:1.8})]}),(0,W.jsx)(`span`,{className:d,children:b}),(0,W.jsx)(`span`,{className:n,children:x}),(0,W.jsx)(`span`,{className:u(E,`text-[12px]`),children:e.displayUrl})]}),(0,W.jsx)(`div`,{className:`flex aspect-[1.45] w-40 shrink-0 items-center justify-center overflow-hidden border-l border-[var(--line)] bg-[var(--bg-soft)] max-[720px]:w-28`,children:w?(0,W.jsx)(`img`,{alt:b,className:`size-full object-cover transition-transform duration-200 group-hover/link-preview:scale-[1.03]`,loading:`lazy`,onError:()=>l(!0),src:C??``}):(0,W.jsx)(Be,{"aria-hidden":`true`,className:`size-8 text-[var(--ink-soft)]`,strokeWidth:1.7})})]},`${e.expandedUrl}-${String(t)}`)}function st(e){if(!e)return null;try{let t=new URL(e);return`${t.protocol}//${t.hostname}${t.pathname}`}catch{return e.split(`?`)[0]??e}}function ct(e){let t=new Set;for(let n of e)for(let e of[n.url,n.thumbnailUrl]){let n=st(e);n&&t.add(n)}return t}function lt(e,t,n){if(t.size>0&&ft(e.expandedUrl,n))return!0;for(let n of[e.url,e.expandedUrl,e.displayUrl]){let e=st(n);if(e&&t.has(e))return!0}return!1}function Z(e){if(!e)return!1;try{let t=e.includes(`://`)?e:`https://${e}`;return new URL(t).hostname.replace(/^www\./,``)===`t.co`}catch{return!1}}function Q(e){return Z(e.expandedUrl)?!0:e.expandedUrl?!1:Z(e.displayUrl)?!0:!e.displayUrl&&Z(e.url)}function ut(e,t){return(t.urls??[]).filter(Q).map(t=>Fe(e,t))}function dt(e,t){let n=0,r=``;for(let i of[...t].sort((e,t)=>e.start-t.start))i.start<n||i.end<=i.start||i.end>e.length||(r+=e.slice(n,i.start),n=i.end);return r+=e.slice(n),r}function $(e,t,n){if(n.size===0)return!1;let r=ut(e,t);return r.length!==0&&dt(e,r).trim().length===0}function ft(e,t){if(!e)return!1;try{let n=new URL(e),r=n.hostname.replace(/^www\./,``);if(r!==`x.com`&&r!==`twitter.com`)return!1;let i=n.pathname.split(`/`).filter(Boolean),a=i.indexOf(`status`);if(a<0||i[a+1]!==t)return!1;let o=i[a+2];return o===`photo`||o===`video`}catch{return!1}}function pt(e,t,n,r){let i=ct(t);if(i.size===0)return e;let a=$(r,e,i);return{...e,urls:(e.urls??[]).filter(e=>!lt(e,i,n)&&!(a&&Q(e)))}}function mt(e,t,n,r){let i=ct(t);if(i.size===0)return[];let a=$(r,e,i);return(e.urls??[]).filter(e=>lt(e,i,n)||a&&Q(e)).map(e=>Fe(r,e))}function ht(e,t){return(e.urls??[]).filter(n=>Q(n)||e.article&&Ie(n,e.article)?!1:!t||!n.expandedUrl.includes(t))}function gt(e){return e instanceof Element&&!!e.closest(`a,button,input,textarea,select,[role='button']`)}function _t({tweet:e,hiddenUrlRanges:t,visibleUrlCards:n,replyToTweet:r,quotedTweet:i}){return(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(H,{className:a,entities:e.entities,hiddenUrlRanges:t,text:e.text}),(0,W.jsx)(K,{items:e.media}),e.entities.article?(0,W.jsx)(G,{article:e.entities.article}):null,r?(0,W.jsx)(`div`,{className:T,children:(0,W.jsx)(q,{item:r,label:`In reply to`})}):null,i?(0,W.jsx)(`div`,{className:T,children:(0,W.jsx)(q,{item:i,label:`Quoted tweet`})}):null,n.map((e,t)=>(0,W.jsx)(ot,{entry:e,index:t},`${e.expandedUrl}-${String(t)}`))]})}function vt({item:e,onReply:t,showReplyControls:n=!0}){let a=n&&e.kind!==`like`&&e.kind!==`bookmark`,o=e.retweetedTweet??e,s=o.id,c=e.retweetedTweet&&s===`${e.id}:retweeted`?e.id:s,l=o.author,d=Je(e.id,c),f=pt(o.entities,o.media,o.id,o.text),h=mt(o.entities,o.media,o.id,o.text),g=ht(f,e.retweetedTweet?null:e.quotedTweet?.id??null),v=e.retweetedTweet?o.mediaCount??o.media.length:e.mediaCount,y=o.isReplied??e.isReplied,x=o.likeCount??e.likeCount,w=o.bookmarked??e.bookmarked,T=o.liked??e.liked,E=T||x>0,D=v>0,O=!!(e.retweetedTweet?o.replyToId:e.replyToTweet||e.replyToId);return(0,W.jsxs)(`article`,{className:u(ae,`cursor-pointer [content-visibility:auto] [contain-intrinsic-size:auto_280px]`),"data-perf":`timeline-card`,onFocus:d.prefetch,onMouseEnter:d.prefetch,onClick:e=>{gt(e.target)||d.toggle()},children:[(0,W.jsx)(R,{avatarUrl:l.avatarUrl,hue:l.avatarHue,name:l.displayName,profileId:l.id}),(0,W.jsxs)(`div`,{className:_,children:[e.retweetedTweet?(0,W.jsxs)(`div`,{className:`inline-flex items-center gap-2 text-[13px] font-medium text-[var(--ink-soft)]`,children:[(0,W.jsx)(fe,{className:`size-4`,strokeWidth:1.8}),(0,W.jsx)(B,{profile:e.author,children:(0,W.jsxs)(`span`,{children:[e.author.displayName,` reposted`]})})]}):null,(0,W.jsxs)(`header`,{className:oe,children:[(0,W.jsx)(B,{profile:l,children:(0,W.jsxs)(`span`,{className:`flex min-w-0 items-center gap-1.5`,children:[(0,W.jsx)(`span`,{className:p,children:l.displayName}),(0,W.jsxs)(`span`,{className:b,children:[`@`,l.handle]})]})}),(0,W.jsx)(`span`,{className:se,children:`·`}),(0,W.jsx)(V,{className:i,value:o.createdAt}),a||O?(0,W.jsxs)(`span`,{className:`ml-auto inline-flex items-center gap-1`,children:[O?(0,W.jsxs)(`span`,{"aria-label":`Part of a conversation`,className:u(j,r),title:`Part of a conversation`,children:[(0,W.jsx)(N,{className:`size-3.5`,strokeWidth:2}),`thread`]}):null,a?(0,W.jsxs)(`span`,{"aria-label":y?`We replied`:`Reply open`,className:u(j,y?r:m),title:y?`We replied`:`Reply open`,children:[y?(0,W.jsx)(ce,{className:`size-3.5`,strokeWidth:2}):(0,W.jsx)(le,{className:`size-3`,strokeWidth:2.2}),y?`replied`:`open`]}):null]}):null]}),(0,W.jsx)(_t,{hiddenUrlRanges:h,quotedTweet:e.retweetedTweet?null:e.quotedTweet,replyToTweet:e.retweetedTweet?null:e.replyToTweet,tweet:o,visibleUrlCards:g}),(0,W.jsx)(`footer`,{className:C,children:(0,W.jsxs)(`div`,{className:`flex items-center gap-3 text-[13px] text-[var(--ink-soft)]`,children:[(0,W.jsxs)(`button`,{"aria-expanded":d.isOpen,"aria-label":d.isOpen?`Hide conversation`:`Show conversation`,className:S,onClick:e=>{e.stopPropagation(),d.toggle()},type:`button`,children:[(0,W.jsx)(`span`,{className:k,children:(0,W.jsx)(N,{className:A,strokeWidth:1.7})}),(0,W.jsx)(`span`,{className:`text-[13px]`,children:d.isOpen?`Hide thread`:`Thread`})]}),a?(0,W.jsxs)(`button`,{className:S,onClick:e=>{e.stopPropagation(),t(c)},type:`button`,"aria-label":`Reply`,children:[(0,W.jsx)(`span`,{className:k,children:(0,W.jsx)(N,{className:A,strokeWidth:1.7})}),(0,W.jsx)(`span`,{className:`text-[13px]`,children:`Reply`})]}):null,(0,W.jsxs)(`a`,{"aria-label":`Analyse @${l.handle}`,className:S,href:`/profiles/${encodeURIComponent(l.handle)}`,onClick:e=>{e.stopPropagation()},title:`Analyse @${l.handle}`,children:[(0,W.jsx)(`span`,{className:k,children:(0,W.jsx)(me,{className:A,strokeWidth:1.7})}),(0,W.jsx)(`span`,{className:`text-[13px]`,children:`Analyse`})]}),E?(0,W.jsxs)(`span`,{"aria-label":`${L(x)} likes`,className:u(`inline-flex items-center gap-1 px-2 py-1 text-[13px]`,T&&`text-[var(--like)]`),title:`${L(x)} likes`,children:[(0,W.jsx)(de,{className:A,strokeWidth:1.7,fill:T?`currentColor`:`none`}),(0,W.jsx)(`span`,{children:L(x)})]}):null,w?(0,W.jsx)(`span`,{"aria-label":`Bookmarked`,className:`inline-flex items-center px-2 py-1`,title:`Bookmarked`,children:(0,W.jsx)(ze,{className:A,strokeWidth:1.7})}):null,D?(0,W.jsxs)(`span`,{"aria-label":`${String(v)} media attachments`,className:`inline-flex items-center gap-1 px-2 py-1 text-[13px]`,title:`${String(v)} media attachments`,children:[(0,W.jsx)(Be,{className:A,strokeWidth:1.7}),(0,W.jsx)(`span`,{children:v})]}):null]})}),d.isOpen?(0,W.jsx)(Qe,{anchorId:c,error:d.error,items:d.items,loading:d.loading}):null]})]})}function yt({title:e,subtitles:t,action:n,controls:r}){return(0,W.jsxs)(`header`,{className:h,children:[(0,W.jsxs)(`div`,{className:`${g} flex-wrap`,children:[(0,W.jsxs)(`div`,{className:`flex min-w-0 flex-col`,children:[(0,W.jsx)(`h1`,{className:l,children:e}),t]}),n]}),r]})}function bt({children:e}){return(0,W.jsx)(`p`,{className:s,children:e})}function xt({value:e,onChange:t,placeholder:n}){return(0,W.jsx)(`div`,{className:`px-4 pb-3`,children:(0,W.jsxs)(`label`,{className:re,children:[(0,W.jsx)(pe,{className:v,strokeWidth:2}),(0,W.jsx)(`input`,{className:ee,onChange:e=>t(e.target.value),placeholder:n,value:e})]})})}function St({header:e,notice:t,loading:n,loadingLabel:r,loadingDetail:i,error:a,errorTitle:o,onRetry:s,empty:c,emptyLabel:l,emptyDetail:u,children:d,hasMore:f,loadingMore:p,onLoadMore:m}){return(0,W.jsxs)(W.Fragment,{children:[e,t,(0,W.jsx)(qe,{children:(0,W.jsxs)(`section`,{className:w,children:[n?(0,W.jsx)(Me,{detail:i,label:r,children:(0,W.jsx)(ke,{})}):a?(0,W.jsx)(Ae,{action:(0,W.jsx)(`button`,{className:`rounded-full bg-[var(--accent)] px-4 py-1.5 text-[14px] font-bold text-white`,onClick:s,type:`button`,children:`Retry`}),message:a,title:o}):c?(0,W.jsx)(Pe,{detail:u,label:l}):null,d,!n&&!a&&f?(0,W.jsx)(`div`,{className:`flex justify-center py-4`,children:(0,W.jsx)(`button`,{className:`rounded-full bg-[var(--accent)] px-5 py-1.5 text-[14px] font-bold text-white disabled:opacity-60`,disabled:p,onClick:m,type:`button`,children:p?`Loading…`:`Load more`})}):null]})})]})}var Ct=50,wt=5*6e4;function Tt({resource:e,search:t,replyFilter:n,likedOnly:r,bookmarkedOnly:i,selectedAccountId:a,pageParam:o}){let s=new URLSearchParams({resource:e,limit:String(Ct)});a&&s.set(`account`,a),n&&s.set(`replyFilter`,n),r&&s.set(`liked`,`true`),i&&s.set(`bookmarked`,`true`),t.trim()&&s.set(`search`,t.trim()),o&&(s.set(`until`,o.until),s.set(`untilId`,o.untilId)),s.sort();let c=typeof window>`u`?`http://birdclaw.local`:window.location.origin;return new URL(`/api/query?${s.toString()}`,c).toString()}function Et({resource:e,search:t,errorFallback:n,replyFilter:r,likedOnly:i=!1,bookmarkedOnly:a=!1}){let o=P(),s=I({queryKey:F.status,queryFn:({signal:e})=>ge({signal:e})}).data??null,c=Oe(s?.accounts),l=Le(t,180),u=[...F.timelines,{resource:e,search:l,replyFilter:r??`all`,likedOnly:i,bookmarkedOnly:a,selectedAccountId:c??null}],d=We({queryKey:u,initialPageParam:void 0,queryFn:({pageParam:t,signal:n})=>be(Tt({resource:e,search:l,replyFilter:r,likedOnly:i,bookmarkedOnly:a,selectedAccountId:c,pageParam:t}),{signal:n}),getNextPageParam:e=>{if(e.resource===`dms`)return;let t=e.items,n=t.at(-1);return t.length>=Ct&&n?{until:n.createdAt,untilId:n.id}:void 0},staleTime:wt}),f=(0,U.useMemo)(()=>{let e=new Set,t=[];for(let n of d.data?.pages??[])if(n.resource!==`dms`)for(let r of n.items)e.has(r.id)||(e.add(r.id),t.push(r));return t},[d.data]),p=De({mutationFn:({tweetId:e,text:t})=>Se({kind:`replyTweet`,accountId:c??`acct_primary`,tweetId:e,text:t}),onSuccess:()=>o.invalidateQueries({queryKey:u})});function m(){d.refetch()}function h(){Promise.all([o.invalidateQueries({queryKey:F.timelines}),o.invalidateQueries({queryKey:F.status})])}async function g(e){let t=window.prompt(`Reply text`);t?.trim()&&await p.mutateAsync({tweetId:e,text:t.trim()}).catch(()=>{})}let _=d.error;return{meta:s,items:f,loading:d.isPending,error:_?_ instanceof Error?_.message:n:null,replyError:p.error?p.error instanceof Error?p.error.message:`Reply failed`:null,retry:m,refreshLocalView:h,replyToTweet:g,selectedAccountId:c,hasMore:d.hasNextPage,loadingMore:d.isFetchingNextPage,loadMore:()=>d.fetchNextPage().then(()=>void 0)}}export{xt as a,bt as i,yt as n,vt as o,St as r,Et as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./createLucideIcon-CMLcIxOz.js";var t=e(`user-search`,[[`circle`,{cx:`10`,cy:`7`,r:`4`,key:`e45bow`}],[`path`,{d:`M10.3 15H7a4 4 0 0 0-4 4v2`,key:`3bnktk`}],[`circle`,{cx:`17`,cy:`17`,r:`3`,key:`18b49y`}],[`path`,{d:`m21 21-1.9-1.9`,key:`1g2n9r`}]]);export{t};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as SyncNowButton } from "./SyncNowButton-
|
|
1
|
+
import { t as SyncNowButton } from "./SyncNowButton-C3OQghU4.js";
|
|
2
2
|
import { a as TimelineSearchField, i as TimelineHeaderSubtitle, n as TimelineFeedHeader, o as TimelineCard, r as TimelineFeedShell, t as useTimelineRouteData } from "./useTimelineRouteData-BWxx9yQl.js";
|
|
3
3
|
import { useMemo, useState } from "react";
|
|
4
4
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -84,9 +84,10 @@ function SyncNowButton({ kind, label, accounts, onSynced, allowAutoSync = false,
|
|
|
84
84
|
onSyncedRef.current = onSynced;
|
|
85
85
|
}, [onSynced]);
|
|
86
86
|
useEffect(() => {
|
|
87
|
+
const stored = readAutoSyncSettings(autoSyncKey);
|
|
87
88
|
setAutoSettings({
|
|
88
89
|
key: autoSyncKey,
|
|
89
|
-
...
|
|
90
|
+
...stored
|
|
90
91
|
});
|
|
91
92
|
setAutoSyncError(null);
|
|
92
93
|
setAutoSyncing(false);
|
|
@@ -172,10 +173,11 @@ function SyncNowButton({ kind, label, accounts, onSynced, allowAutoSync = false,
|
|
|
172
173
|
waitingForAccount
|
|
173
174
|
]);
|
|
174
175
|
function updateAutoSettings(next) {
|
|
175
|
-
|
|
176
|
+
const settings = {
|
|
176
177
|
key: autoSyncKey,
|
|
177
178
|
...next
|
|
178
|
-
}
|
|
179
|
+
};
|
|
180
|
+
setAutoSettings(settings);
|
|
179
181
|
window.localStorage.setItem(autoSyncKey, JSON.stringify({
|
|
180
182
|
enabled: next.enabled,
|
|
181
183
|
intervalMs: next.intervalMs
|
package/dist/server/assets/{TimelineRouteFrame-BWWFisJF.js → TimelineRouteFrame-CYD-qMuy.js}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { dn as tabStripClass, ln as tabButtonClass, m as cx, mn as timestampClass, un as tabButtonIndicatorClass } from "./ui-CL21-Ku0.js";
|
|
2
|
-
import { t as SyncNowButton } from "./SyncNowButton-
|
|
2
|
+
import { t as SyncNowButton } from "./SyncNowButton-C3OQghU4.js";
|
|
3
3
|
import { a as TimelineSearchField, i as TimelineHeaderSubtitle, n as TimelineFeedHeader, o as TimelineCard, r as TimelineFeedShell, t as useTimelineRouteData } from "./useTimelineRouteData-BWxx9yQl.js";
|
|
4
4
|
import { useMemo, useState } from "react";
|
|
5
5
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -0,0 +1,221 @@
|
|
|
1
|
+
//#region \0tanstack-start-manifest:v
|
|
2
|
+
var tsrStartManifest = () => ({ routes: {
|
|
3
|
+
__root__: {
|
|
4
|
+
filePath: "/Users/steipete/Projects/birdclaw/src/routes/__root.tsx",
|
|
5
|
+
children: [
|
|
6
|
+
"/",
|
|
7
|
+
"/blocks",
|
|
8
|
+
"/bookmarks",
|
|
9
|
+
"/data-sources",
|
|
10
|
+
"/discuss",
|
|
11
|
+
"/dms",
|
|
12
|
+
"/inbox",
|
|
13
|
+
"/likes",
|
|
14
|
+
"/links",
|
|
15
|
+
"/mentions",
|
|
16
|
+
"/network-map",
|
|
17
|
+
"/profile-analyze",
|
|
18
|
+
"/rate-limits",
|
|
19
|
+
"/today",
|
|
20
|
+
"/api/action",
|
|
21
|
+
"/api/avatar",
|
|
22
|
+
"/api/blocks",
|
|
23
|
+
"/api/conversation",
|
|
24
|
+
"/api/data-sources",
|
|
25
|
+
"/api/inbox",
|
|
26
|
+
"/api/link-insights",
|
|
27
|
+
"/api/link-preview",
|
|
28
|
+
"/api/network-map",
|
|
29
|
+
"/api/period-digest",
|
|
30
|
+
"/api/profile-analysis",
|
|
31
|
+
"/api/profile-hydrate",
|
|
32
|
+
"/api/query",
|
|
33
|
+
"/api/search-discussion",
|
|
34
|
+
"/api/status",
|
|
35
|
+
"/api/sync",
|
|
36
|
+
"/api/xurl-rate-limits",
|
|
37
|
+
"/profiles/$handle"
|
|
38
|
+
],
|
|
39
|
+
css: ["/assets/network-map-CrXvY--k.css"],
|
|
40
|
+
preloads: [
|
|
41
|
+
"/assets/index-B8hO98gL.js",
|
|
42
|
+
"/assets/rolldown-runtime-B-9mzPXz.js",
|
|
43
|
+
"/assets/react-BwGzW7mM.js",
|
|
44
|
+
"/assets/react-dom-DEMAB80t.js",
|
|
45
|
+
"/assets/lazyRouteComponent-CLLbUvMd.js",
|
|
46
|
+
"/assets/schemas-CMQMhQXI.js",
|
|
47
|
+
"/assets/createLucideIcon-CMLcIxOz.js",
|
|
48
|
+
"/assets/chevron-down-e-c5H12y.js",
|
|
49
|
+
"/assets/database-Dl3XWRaa.js",
|
|
50
|
+
"/assets/network-map-2EPsbMIT.js",
|
|
51
|
+
"/assets/gauge-DP2ku9zz.js",
|
|
52
|
+
"/assets/heart-D-ERjZPN.js",
|
|
53
|
+
"/assets/user-search-DL5_6EZd.js",
|
|
54
|
+
"/assets/query-client-CA-do_IS.js",
|
|
55
|
+
"/assets/useQuery-CL_NXLnc.js",
|
|
56
|
+
"/assets/account-selection-h7m9xmzU.js",
|
|
57
|
+
"/assets/AvatarChip-DsHj3LT7.js",
|
|
58
|
+
"/assets/FeedState-DhMv4zXD.js",
|
|
59
|
+
"/assets/preload-helper-MpqUbZCn.js",
|
|
60
|
+
"/assets/today-DNAg-wnA.js",
|
|
61
|
+
"/assets/profile-analyze-B5Rr41WP.js",
|
|
62
|
+
"/assets/links-6tWeHun_.js",
|
|
63
|
+
"/assets/inbox-DjlVjj3K.js",
|
|
64
|
+
"/assets/dms-Q1a1kZ_P.js",
|
|
65
|
+
"/assets/discuss-DKC6H1fN.js",
|
|
66
|
+
"/assets/blocks-BpjvGwYq.js",
|
|
67
|
+
"/assets/profiles._handle-DdZ9wAT-.js"
|
|
68
|
+
],
|
|
69
|
+
scripts: [{ attrs: {
|
|
70
|
+
type: "module",
|
|
71
|
+
async: !0,
|
|
72
|
+
src: "/assets/index-B8hO98gL.js"
|
|
73
|
+
} }]
|
|
74
|
+
},
|
|
75
|
+
"/": {
|
|
76
|
+
filePath: "/Users/steipete/Projects/birdclaw/src/routes/index.tsx",
|
|
77
|
+
children: void 0,
|
|
78
|
+
preloads: ["/assets/routes-ARIEjgq-.js", "/assets/TimelineRouteFrame-DJdUR7DX.js"]
|
|
79
|
+
},
|
|
80
|
+
"/blocks": {
|
|
81
|
+
filePath: "/Users/steipete/Projects/birdclaw/src/routes/blocks.tsx",
|
|
82
|
+
children: void 0,
|
|
83
|
+
preloads: [
|
|
84
|
+
"/assets/blocks-C84MpzHq.js",
|
|
85
|
+
"/assets/route-search-CmZT7pGD.js",
|
|
86
|
+
"/assets/useDebouncedValue-BJLRInUq.js"
|
|
87
|
+
]
|
|
88
|
+
},
|
|
89
|
+
"/bookmarks": {
|
|
90
|
+
filePath: "/Users/steipete/Projects/birdclaw/src/routes/bookmarks.tsx",
|
|
91
|
+
children: void 0,
|
|
92
|
+
preloads: ["/assets/bookmarks-Gy6MvAc9.js", "/assets/SavedTimelineView-4QYaZ4CU.js"]
|
|
93
|
+
},
|
|
94
|
+
"/data-sources": {
|
|
95
|
+
filePath: "/Users/steipete/Projects/birdclaw/src/routes/data-sources.tsx",
|
|
96
|
+
children: void 0,
|
|
97
|
+
preloads: [
|
|
98
|
+
"/assets/data-sources-CqxgDfE3.js",
|
|
99
|
+
"/assets/circle-check-BCK_qvXt.js",
|
|
100
|
+
"/assets/refresh-cw-IUfM9D_1.js",
|
|
101
|
+
"/assets/triangle-alert-DJPCW6jQ.js"
|
|
102
|
+
]
|
|
103
|
+
},
|
|
104
|
+
"/discuss": {
|
|
105
|
+
filePath: "/Users/steipete/Projects/birdclaw/src/routes/discuss.tsx",
|
|
106
|
+
children: void 0,
|
|
107
|
+
preloads: [
|
|
108
|
+
"/assets/discuss-C0CUMn6v.js",
|
|
109
|
+
"/assets/circle-check-BCK_qvXt.js",
|
|
110
|
+
"/assets/client-stream-contracts-CNz2FSrQ.js",
|
|
111
|
+
"/assets/refresh-cw-IUfM9D_1.js",
|
|
112
|
+
"/assets/search-C_LqodNa.js",
|
|
113
|
+
"/assets/sparkles-Gx_BHkDX.js",
|
|
114
|
+
"/assets/route-search-CmZT7pGD.js"
|
|
115
|
+
]
|
|
116
|
+
},
|
|
117
|
+
"/dms": {
|
|
118
|
+
filePath: "/Users/steipete/Projects/birdclaw/src/routes/dms.tsx",
|
|
119
|
+
children: void 0,
|
|
120
|
+
preloads: [
|
|
121
|
+
"/assets/dms-DWA5tvJS.js",
|
|
122
|
+
"/assets/search-C_LqodNa.js",
|
|
123
|
+
"/assets/route-search-CmZT7pGD.js",
|
|
124
|
+
"/assets/SyncNowButton-DDYT2jQT.js",
|
|
125
|
+
"/assets/useDebouncedValue-BJLRInUq.js"
|
|
126
|
+
]
|
|
127
|
+
},
|
|
128
|
+
"/inbox": {
|
|
129
|
+
filePath: "/Users/steipete/Projects/birdclaw/src/routes/inbox.tsx",
|
|
130
|
+
children: void 0,
|
|
131
|
+
preloads: [
|
|
132
|
+
"/assets/inbox-C9zFrQ76.js",
|
|
133
|
+
"/assets/sparkles-Gx_BHkDX.js",
|
|
134
|
+
"/assets/route-search-CmZT7pGD.js"
|
|
135
|
+
]
|
|
136
|
+
},
|
|
137
|
+
"/likes": {
|
|
138
|
+
filePath: "/Users/steipete/Projects/birdclaw/src/routes/likes.tsx",
|
|
139
|
+
children: void 0,
|
|
140
|
+
preloads: ["/assets/likes-BXANVRCj.js", "/assets/SavedTimelineView-4QYaZ4CU.js"]
|
|
141
|
+
},
|
|
142
|
+
"/links": {
|
|
143
|
+
filePath: "/Users/steipete/Projects/birdclaw/src/routes/links.tsx",
|
|
144
|
+
children: void 0,
|
|
145
|
+
preloads: [
|
|
146
|
+
"/assets/links-D3Ut-aUB.js",
|
|
147
|
+
"/assets/external-link-CfdTAkvn.js",
|
|
148
|
+
"/assets/message-circle-79LZr2oN.js",
|
|
149
|
+
"/assets/repeat-2-CQ0lek01.js",
|
|
150
|
+
"/assets/search-C_LqodNa.js",
|
|
151
|
+
"/assets/users-DI3w8Mol.js",
|
|
152
|
+
"/assets/ProfilePreview-CaaMHV2N.js",
|
|
153
|
+
"/assets/SmartTimestamp-CXaNLqN7.js",
|
|
154
|
+
"/assets/route-search-CmZT7pGD.js"
|
|
155
|
+
]
|
|
156
|
+
},
|
|
157
|
+
"/mentions": {
|
|
158
|
+
filePath: "/Users/steipete/Projects/birdclaw/src/routes/mentions.tsx",
|
|
159
|
+
children: void 0,
|
|
160
|
+
preloads: ["/assets/mentions-BKO40XiK.js", "/assets/TimelineRouteFrame-DJdUR7DX.js"]
|
|
161
|
+
},
|
|
162
|
+
"/network-map": {
|
|
163
|
+
filePath: "/Users/steipete/Projects/birdclaw/src/routes/network-map.tsx",
|
|
164
|
+
children: void 0,
|
|
165
|
+
preloads: [
|
|
166
|
+
"/assets/network-map-DUpppygD.js",
|
|
167
|
+
"/assets/refresh-cw-IUfM9D_1.js",
|
|
168
|
+
"/assets/search-C_LqodNa.js",
|
|
169
|
+
"/assets/users-DI3w8Mol.js",
|
|
170
|
+
"/assets/route-search-CmZT7pGD.js"
|
|
171
|
+
]
|
|
172
|
+
},
|
|
173
|
+
"/profile-analyze": {
|
|
174
|
+
filePath: "/Users/steipete/Projects/birdclaw/src/routes/profile-analyze.tsx",
|
|
175
|
+
children: void 0,
|
|
176
|
+
preloads: [
|
|
177
|
+
"/assets/profile-analyze-BqvM9hSa.js",
|
|
178
|
+
"/assets/client-stream-contracts-CNz2FSrQ.js",
|
|
179
|
+
"/assets/refresh-cw-IUfM9D_1.js",
|
|
180
|
+
"/assets/search-C_LqodNa.js",
|
|
181
|
+
"/assets/ProfileAnalysisStream-B8zyyye-.js"
|
|
182
|
+
]
|
|
183
|
+
},
|
|
184
|
+
"/rate-limits": {
|
|
185
|
+
filePath: "/Users/steipete/Projects/birdclaw/src/routes/rate-limits.tsx",
|
|
186
|
+
children: void 0,
|
|
187
|
+
preloads: [
|
|
188
|
+
"/assets/rate-limits-DyRTb_U4.js",
|
|
189
|
+
"/assets/refresh-cw-IUfM9D_1.js",
|
|
190
|
+
"/assets/triangle-alert-DJPCW6jQ.js"
|
|
191
|
+
]
|
|
192
|
+
},
|
|
193
|
+
"/today": {
|
|
194
|
+
filePath: "/Users/steipete/Projects/birdclaw/src/routes/today.tsx",
|
|
195
|
+
children: void 0,
|
|
196
|
+
preloads: [
|
|
197
|
+
"/assets/today-Q3xFx4cl.js",
|
|
198
|
+
"/assets/circle-check-BCK_qvXt.js",
|
|
199
|
+
"/assets/client-stream-contracts-CNz2FSrQ.js",
|
|
200
|
+
"/assets/refresh-cw-IUfM9D_1.js",
|
|
201
|
+
"/assets/sparkles-Gx_BHkDX.js",
|
|
202
|
+
"/assets/profile-hydration-client-DoFW3yKH.js",
|
|
203
|
+
"/assets/route-search-CmZT7pGD.js"
|
|
204
|
+
]
|
|
205
|
+
},
|
|
206
|
+
"/profiles/$handle": {
|
|
207
|
+
filePath: "/Users/steipete/Projects/birdclaw/src/routes/profiles.$handle.tsx",
|
|
208
|
+
children: void 0,
|
|
209
|
+
preloads: [
|
|
210
|
+
"/assets/profiles._handle-DWyWAGG8.js",
|
|
211
|
+
"/assets/external-link-CfdTAkvn.js",
|
|
212
|
+
"/assets/client-stream-contracts-CNz2FSrQ.js",
|
|
213
|
+
"/assets/refresh-cw-IUfM9D_1.js",
|
|
214
|
+
"/assets/ProfilePreview-CaaMHV2N.js",
|
|
215
|
+
"/assets/TweetRichText-D-amgcEl.js",
|
|
216
|
+
"/assets/ProfileAnalysisStream-B8zyyye-.js"
|
|
217
|
+
]
|
|
218
|
+
}
|
|
219
|
+
} });
|
|
220
|
+
//#endregion
|
|
221
|
+
export { tsrStartManifest };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as SavedTimelineView } from "./SavedTimelineView-
|
|
1
|
+
import { t as SavedTimelineView } from "./SavedTimelineView-Ern3q7LW.js";
|
|
2
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
3
|
//#region src/routes/bookmarks.tsx?tsr-split=component
|
|
4
4
|
function BookmarksRoute() {
|
|
@@ -3,8 +3,8 @@ import { a as fetchQueryEnvelope, n as queryKeys, r as fetchJson, s as postActio
|
|
|
3
3
|
import { r as useSelectedAccountId } from "./account-selection-CTdFGWRk.js";
|
|
4
4
|
import { n as FeedError, r as FeedLoading, t as FeedEmpty } from "./FeedState-YrMZ10Gf.js";
|
|
5
5
|
import { r as validateDmsSearch } from "./route-search-BUlQ5lGM.js";
|
|
6
|
-
import { n as DmWorkspace, t as Route$1 } from "./dms-
|
|
7
|
-
import { t as SyncNowButton } from "./SyncNowButton-
|
|
6
|
+
import { n as DmWorkspace, t as Route$1 } from "./dms-DbJk33XB.js";
|
|
7
|
+
import { t as SyncNowButton } from "./SyncNowButton-C3OQghU4.js";
|
|
8
8
|
import { t as useDebouncedValue } from "./useDebouncedValue-DOnA6Xcy.js";
|
|
9
9
|
import { useEffect, useMemo, useState } from "react";
|
|
10
10
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -5,7 +5,7 @@ import "./account-selection-CTdFGWRk.js";
|
|
|
5
5
|
import { o as BirdclawEmpty } from "./FeedState-YrMZ10Gf.js";
|
|
6
6
|
import { t as SmartTimestamp } from "./SmartTimestamp-sxGoy8Uj.js";
|
|
7
7
|
import { r as validateDmsSearch } from "./route-search-BUlQ5lGM.js";
|
|
8
|
-
import "./SyncNowButton-
|
|
8
|
+
import "./SyncNowButton-C3OQghU4.js";
|
|
9
9
|
import "./useDebouncedValue-DOnA6Xcy.js";
|
|
10
10
|
import "react";
|
|
11
11
|
import { createFileRoute, lazyRouteComponent } from "@tanstack/react-router";
|
|
@@ -231,7 +231,7 @@ function DmWorkspace({ conversations, selectedConversation, selectedMessages, on
|
|
|
231
231
|
}
|
|
232
232
|
//#endregion
|
|
233
233
|
//#region src/routes/dms.tsx
|
|
234
|
-
var $$splitComponentImporter = () => import("./dms-
|
|
234
|
+
var $$splitComponentImporter = () => import("./dms-Cr5heLhm.js");
|
|
235
235
|
var Route$1 = createFileRoute("/dms")({
|
|
236
236
|
component: lazyRouteComponent($$splitComponentImporter, "component"),
|
|
237
237
|
validateSearch: validateDmsSearch
|
package/dist/server/assets/{empty-plugin-adapters-D9UWiqvJ.js → empty-plugin-adapters-YdH6Vqte.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region node_modules/@tanstack/start-server-core/dist/esm/empty-plugin-adapters.js
|
|
1
|
+
//#region node_modules/.pnpm/@tanstack+start-server-core@1.169.17/node_modules/@tanstack/start-server-core/dist/esm/empty-plugin-adapters.js
|
|
2
2
|
var pluginSerializationAdapters = [];
|
|
3
3
|
var hasPluginAdapters = false;
|
|
4
4
|
//#endregion
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as TimelineRouteFrame } from "./TimelineRouteFrame-
|
|
1
|
+
import { t as TimelineRouteFrame } from "./TimelineRouteFrame-CYD-qMuy.js";
|
|
2
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
3
|
//#region src/routes/mentions.tsx?tsr-split=component
|
|
4
4
|
function mentionsSubtitle(meta) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Dt as pageSubtitleClass, Et as pageHeaderRowClass, Ht as searchFieldInputClass, Jt as segmentedClass, Ot as pageTitleClass, Tt as pageHeaderClass, Ut as searchFieldShellClass, Vt as searchFieldIconClass, Wt as secondaryButtonClass, m as cx, q as errorCopyClass, qt as segmentClass, sn as statusCopyClass, wt as pageHeaderActionsClass } from "./ui-CL21-Ku0.js";
|
|
2
2
|
import { o as validateNetworkMapSearch } from "./route-search-BUlQ5lGM.js";
|
|
3
|
-
import { a as avatarPath, c as compareClusterFeatures, d as getClusterDisplayAnchor, f as isCluster, i as avatarInitial, l as formatNumber, m as relationshipColor, n as useNetworkMapController, o as buildClusterIndex, p as readViewport, r as WORLD_VIEWPORT, s as clusterGradient, t as Route$1, u as formatRelationship } from "./network-map-
|
|
3
|
+
import { a as avatarPath, c as compareClusterFeatures, d as getClusterDisplayAnchor, f as isCluster, i as avatarInitial, l as formatNumber, m as relationshipColor, n as useNetworkMapController, o as buildClusterIndex, p as readViewport, r as WORLD_VIEWPORT, s as clusterGradient, t as Route$1, u as formatRelationship } from "./network-map-rmU1NSHD.js";
|
|
4
4
|
import { useCallback, useEffect, useMemo, useRef, useState } from "react";
|
|
5
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
6
|
import { Globe2, MapPin, RefreshCw, Search, Users, WifiOff } from "lucide-react";
|
|
@@ -215,7 +215,7 @@ function useNetworkMapController(filters, onFiltersChange) {
|
|
|
215
215
|
}
|
|
216
216
|
//#endregion
|
|
217
217
|
//#region src/routes/network-map.tsx
|
|
218
|
-
var $$splitComponentImporter = () => import("./network-map-
|
|
218
|
+
var $$splitComponentImporter = () => import("./network-map-S3bgKEDj.js");
|
|
219
219
|
var Route$1 = createFileRoute("/network-map")({
|
|
220
220
|
component: lazyRouteComponent($$splitComponentImporter, "component"),
|
|
221
221
|
validateSearch: validateNetworkMapSearch
|