birdclaw 0.9.2 → 0.9.4
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 +12 -0
- package/dist/cli/birdclaw.js +1296 -1082
- package/dist/client/assets/AvatarChip-C8zELEVt.js +1 -0
- package/dist/client/assets/ProfilePreview-CsiLpFrb.js +1 -0
- package/dist/client/assets/SavedTimelineView-BSnwnujP.js +1 -0
- package/dist/client/assets/SmartTimestamp-BypN4KPq.js +1 -0
- package/dist/client/assets/TimelineRouteFrame-H3D4R0Xu.js +1 -0
- package/dist/client/assets/blocks-WsAOmHsv.js +1 -0
- package/dist/client/assets/{bookmarks-DZIMTKEp.js → bookmarks-B2I0kAWY.js} +1 -1
- package/dist/client/assets/circle-check-BCK_qvXt.js +1 -0
- package/dist/client/assets/{client-stream-contracts-DcKcyZhg.js → client-stream-contracts-D1QUdWfh.js} +1 -1
- package/dist/client/assets/createLucideIcon-CMLcIxOz.js +1 -0
- package/dist/client/assets/data-sources-DI5W9oVq.js +1 -0
- package/dist/client/assets/discuss-t2QxXK0h.js +1 -0
- package/dist/client/assets/dms-DjyXURaJ.js +1 -0
- package/dist/client/assets/inbox-CkHVoykL.js +1 -0
- package/dist/client/assets/index-BR860w88.js +31 -0
- package/dist/client/assets/likes-CenHqxQG.js +1 -0
- package/dist/client/assets/links-lDqy93u8.js +1 -0
- package/dist/client/assets/mapbox-CVPXIYUZ.js +2 -0
- package/dist/client/assets/{mapbox-gl-CPemBIlO.js → mapbox-gl-DRRiLKWb.js} +1 -1
- package/dist/client/assets/{mentions-DBrY-UPg.js → mentions-B6BXntri.js} +1 -1
- package/dist/client/assets/network-map-BCUtBk8G.js +2 -0
- package/dist/client/assets/profile-analyze-YExKd6Lx.js +1 -0
- package/dist/client/assets/{profile-hydration-client-BNe0sUmK.js → profile-hydration-client-BQyC5--e.js} +1 -1
- package/dist/client/assets/profiles._handle-idhd3kYo.js +1 -0
- package/dist/client/assets/query-client-DZ5C7UNo.js +17 -0
- package/dist/client/assets/rate-limits-jGxIfvUD.js +1 -0
- package/dist/client/assets/react-BwGzW7mM.js +1 -0
- package/dist/client/assets/react-dom-DEMAB80t.js +1 -0
- package/dist/client/assets/{repeat-2-xCwHM9hD.js → repeat-2-CQ0lek01.js} +1 -1
- package/dist/client/assets/rolldown-runtime-B-9mzPXz.js +1 -0
- package/dist/client/assets/{routes-Bl-Lw2hN.js → routes-6U4Cc79j.js} +1 -1
- package/dist/client/assets/schemas-CntsNLmN.js +64 -0
- package/dist/client/assets/search-C_LqodNa.js +1 -0
- package/dist/client/assets/{sparkles-CQVlvHsZ.js → sparkles-Gx_BHkDX.js} +1 -1
- package/dist/client/assets/{styles-zihNNCGg.css → styles-DT4Pxoi-.css} +1 -1
- package/dist/client/assets/today-COmNSYaE.js +1 -0
- package/dist/client/assets/{triangle-alert-CBL7s2pf.js → triangle-alert-DJPCW6jQ.js} +1 -1
- package/dist/client/assets/useTimelineRouteData-BpQzU16P.js +1 -0
- package/dist/client/assets/{users-CHbKlqUr.js → users-DI3w8Mol.js} +1 -1
- package/dist/server/assets/{_tanstack-start-manifest_v-CVfs07C8.js → _tanstack-start-manifest_v-mm-2VYBo.js} +35 -35
- package/dist/server/assets/{empty-plugin-adapters-DzrEkdBF.js → empty-plugin-adapters-D9UWiqvJ.js} +1 -1
- package/dist/server/assets/{router-D8AUR_Gz.js → router-DVQ3M870.js} +767 -710
- package/dist/server/assets/start-5Z2QO8AU.js +4 -0
- package/dist/server/server.js +50 -3413
- package/package.json +1 -1
- package/dist/client/assets/AvatarChip-BN3b4MhM.js +0 -1
- package/dist/client/assets/ProfilePreview-CHbT0U9a.js +0 -1
- package/dist/client/assets/SavedTimelineView-mGXE9EYJ.js +0 -1
- package/dist/client/assets/SmartTimestamp-DG8XJKUz.js +0 -1
- package/dist/client/assets/TimelineRouteFrame-BmMC7qLj.js +0 -1
- package/dist/client/assets/blocks-CawnB0mN.js +0 -1
- package/dist/client/assets/chunk-C0phanGV.js +0 -1
- package/dist/client/assets/circle-check-C_Vq3ElD.js +0 -1
- package/dist/client/assets/createLucideIcon-JV8isFFR.js +0 -1
- package/dist/client/assets/data-sources-BJUT2qaO.js +0 -1
- package/dist/client/assets/discuss-DMPJVaRk.js +0 -1
- package/dist/client/assets/dms-BfPFG4Qr.js +0 -1
- package/dist/client/assets/inbox-DmeYJ7tt.js +0 -1
- package/dist/client/assets/index-Bqmo4MbK.js +0 -31
- package/dist/client/assets/likes-BxVL-j_C.js +0 -1
- package/dist/client/assets/links-BeA1Wt8F.js +0 -1
- package/dist/client/assets/mapbox-BTSMNSry.js +0 -2
- package/dist/client/assets/network-map-MqbE164r.js +0 -2
- package/dist/client/assets/profile-analyze-DEA75Reh.js +0 -1
- package/dist/client/assets/profiles._handle-K34ofz9U.js +0 -1
- package/dist/client/assets/query-client-DUP1ZzP7.js +0 -17
- package/dist/client/assets/rate-limits-B8Wmpt9r.js +0 -1
- package/dist/client/assets/react-dom-DHl6Ug7F.js +0 -1
- package/dist/client/assets/react-nBylq1U5.js +0 -1
- package/dist/client/assets/schemas-CaALBBpc.js +0 -64
- package/dist/client/assets/search-Dq5kYsxA.js +0 -1
- package/dist/client/assets/today-DFvZ0Ys5.js +0 -1
- package/dist/client/assets/useTimelineRouteData-Cpf-Jqsx.js +0 -1
- package/dist/server/assets/start-FaDOTmto.js +0 -4
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as e}from"./chunk-C0phanGV.js";import{t}from"./react-nBylq1U5.js";import{M as n,Rn as r,y as i}from"./schemas-CaALBBpc.js";var a=e(t(),1);function o(e){return new Intl.NumberFormat(`en`,{notation:`compact`}).format(e)}var s=1e3,c=60*s,l=60*c,u=24*l,d=new Intl.DateTimeFormat(`en`,{hour:`numeric`,minute:`2-digit`}),f=new Intl.DateTimeFormat(`en`,{weekday:`long`}),p=new Intl.DateTimeFormat(`en`,{month:`short`,day:`numeric`}),m=new Intl.DateTimeFormat(`en`,{year:`numeric`,month:`short`,day:`numeric`}),h=new Intl.DateTimeFormat(`en`,{year:`numeric`,month:`long`,day:`numeric`,hour:`numeric`,minute:`2-digit`,second:`2-digit`,timeZoneName:`short`});function g(e){let t=new Date(e);return Number.isNaN(t.getTime())?null:t}function _(e){return Date.UTC(e.getFullYear(),e.getMonth(),e.getDate())/u}function v(e,t){let n=d.format(e),r=_(t)-_(e);return r===1?`Yesterday at ${n}`:r>=2&&r<=6?`${f.format(e)} at ${n}`:`${(e.getFullYear()===t.getFullYear()?p:m).format(e)} at ${n}`}function y(e){let t=g(e);return t?new Intl.DateTimeFormat(`en`,{hour:`numeric`,minute:`2-digit`,month:`short`,day:`numeric`}).format(t):e}function b(e){let t=g(e);return t?h.format(t):e}function x(e,t=Date.now()){let n=g(e),r=new Date(t);if(!n||Number.isNaN(r.getTime()))return e;let i=r.getTime()-n.getTime();if(i>=-45*s&&i<45*s)return`just now`;if(i<0)return v(n,r);if(i<l)return`${Math.max(1,Math.floor(i/c))} min ago`;if(i<u){let e=Math.max(1,Math.floor(i/l));return`${e} ${e===1?`hour`:`hours`} ago`}return v(n,r)}function S(e){return e.split(` `).map(e=>e[0]??``).join(``).slice(0,2)}var C=r();function w({profileId:e,avatarUrl:t,name:r,hue:o,size:s=`default`}){let c=e&&t?T(e,t):null,[l,u]=(0,a.useState)(null),d=c&&l!==c;return(0,C.jsx)(`span`,{className:n(i,s===`large`&&`avatar-chip-large size-16 text-[18px]`,s===`small`&&`avatar-chip-small size-8 text-[12px]`),style:{backgroundColor:`hsl(${String(o)} 72% 50%)`},children:d?(0,C.jsx)(`img`,{alt:r,className:`size-full rounded-[inherit] object-cover`,loading:`lazy`,onError:()=>u(c),src:c}):S(r)})}function T(e,t){return`/api/avatar?${new URLSearchParams({profileId:e,v:t}).toString()}`}export{y as a,b as i,T as n,x as o,o as r,w as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as e}from"./chunk-C0phanGV.js";import{t}from"./react-nBylq1U5.js";import{$t as n,M as r,Pn as i,Qt as a,Rn as o,Zt as s,en as c,in as l,nn as u,rn as d,tn as f}from"./schemas-CaALBBpc.js";import{n as p,r as m,t as h}from"./AvatarChip-BN3b4MhM.js";var g=e(t(),1),_=/https?:\/\/[^\s<>"'`]+/g,v=/[),.;:!?]+$/;function y(e){try{let t=new URL(e),n=t.hostname.replace(/^www\./,``),r=`${t.pathname}${t.search}${t.hash}`;return r===`/`?n:`${n}${r}`}catch{return e}}function b(e){try{let t=new URL(e);return`${t.protocol}//${t.hostname.replace(/^www\./,``)}${t.pathname}`}catch{return e.split(`?`)[0]??e}}function x(e,t){if(b(e.expandedUrl)===b(t.url))return!0;try{let t=new URL(e.expandedUrl),n=t.hostname.replace(/^www\./,``);return(n===`x.com`||n===`twitter.com`)&&t.pathname.startsWith(`/i/article/`)}catch{return!1}}function S(e){return e&&typeof e==`object`?e:{}}function ee(e){let t=S(e),n=Array.isArray(t.mentions)?t.mentions:[],r=Array.isArray(t.urls)?t.urls:[],i=Array.isArray(t.hashtags)?t.hashtags:[],a=S(t.article),o=String(a.title??``).trim(),s=String(a.url??``).trim();return{...n.length?{mentions:n.map(e=>{let t=S(e);return{username:String(t.username??``),id:typeof t.id==`string`?String(t.id):void 0,start:Number(t.start??0),end:Number(t.end??0)}})}:{},...r.length?{urls:r.map(e=>{let t=S(e),n=String(t.expandedUrl??t.expanded_url??t.url??``);return{url:String(t.url??``),expandedUrl:n,displayUrl:String(t.displayUrl??t.display_url??n??t.url??``),start:Number(t.start??0),end:Number(t.end??0),...typeof t.title==`string`?{title:t.title}:{},...typeof t.description==`string`||t.description===null?{description:t.description}:{},...typeof t.imageUrl==`string`?{imageUrl:t.imageUrl}:typeof t.image_url==`string`?{imageUrl:t.image_url}:{},...typeof t.siteName==`string`?{siteName:t.siteName}:typeof t.site_name==`string`?{siteName:t.site_name}:{}}})}:{},...i.length?{hashtags:i.map(e=>{let t=S(e);return{tag:String(t.tag??t.text??``),start:Number(t.start??0),end:Number(t.end??0)}})}:{},...o&&s?{article:{title:o,url:s,...typeof(a.previewText??a.preview_text)==`string`&&String(a.previewText??a.preview_text).trim()?{previewText:String(a.previewText??a.preview_text).trim()}:{},...typeof(a.coverImageUrl??a.cover_image_url)==`string`&&String(a.coverImageUrl??a.cover_image_url).trim()?{coverImageUrl:String(a.coverImageUrl??a.cover_image_url).trim()}:{}}}:{}}}function C(e){return ee(S(e).description)}function te(e,t,n,r){return e<r&&n<t}function w(e,t){if(t<=0)return 0;let n=0,r=0;for(let i of e){if(r>=t)break;n+=i.length,r+=1}return n}function T(e,t,n,r){let i=e.slice(n,r);return t.kind===`mention`?i.toLowerCase()===`@${t.username}`.toLowerCase():t.kind===`hashtag`?i.toLowerCase()===`#${t.tag}`.toLowerCase():i===t.url}function E(e,t){if(t.start>=0&&t.end>t.start&&t.end<=e.length&&T(e,t,t.start,t.end))return t;let n=w(e,t.start),r=w(e,t.end);return n>=0&&r>n&&r<=e.length&&T(e,t,n,r)?{...t,start:n,end:r}:t}function ne(e,t){let n=E(e,{...t,kind:`url`});return{start:n.start,end:n.end}}function D(e,t,n){let r=(t.urls??[]).map(e=>{let t=n?.(e.url),r=t?.expandedUrl||e.expandedUrl||e.url;return{...e,expandedUrl:r,displayUrl:t?.displayUrl||e.displayUrl||y(r),...t?.title?{title:t.title}:{},...t&&`description`in t?{description:t.description??null}:{},...t?.imageUrl?{imageUrl:t.imageUrl}:{},...t?.siteName?{siteName:t.siteName}:{}}}),i=[];for(let t of e.matchAll(_)){let e=t[0].replace(v,``),a=t.index??0,o=a+e.length;if(!e||r.some(e=>te(a,o,e.start,e.end)))continue;let s=n?.(e),c=s?.expandedUrl||e;i.push({url:e,expandedUrl:c,displayUrl:s?.displayUrl||y(c),start:a,end:o,...s?.title?{title:s.title}:{},...s&&`description`in s?{description:s.description??null}:{},...s?.imageUrl?{imageUrl:s.imageUrl}:{},...s?.siteName?{siteName:s.siteName}:{}})}return i.length===0?{...t,urls:r}:{...t,urls:[...r,...i].sort((e,t)=>e.start-t.start)}}function O(e){return[...e.mentions?.map(e=>({...e,kind:`mention`}))??[],...e.urls?.map(e=>({...e,kind:`url`}))??[],...e.hashtags?.map(e=>({...e,kind:`hashtag`}))??[]].sort((e,t)=>e.start-t.start)}function k(e,t){return O(t).map(t=>E(e,t)).sort((e,t)=>e.start-t.start)}function re(e,t,n){let r=k(e,t),i=0,a=``;for(let t of r){if(t.start<i||t.end<=t.start||t.end>e.length)continue;a+=e.slice(i,t.start);let r=e.slice(t.start,t.end);a+=n(t,r),i=t.end}return a+=e.slice(i),a}function ie(e,t){return re(e,t,(e,t)=>e.kind===`url`?e.expandedUrl:e.kind===`mention`?`@${e.username}`:e.kind===`hashtag`?`#${e.tag}`:t)}function A(e){if(!e)return null;try{let t=new URL(e);return t.protocol!==`http:`&&t.protocol!==`https:`?null:t.toString()}catch{return null}}var j=4,M=2500,N=`800px 0px`,P=[],F=new Set,I=new Set,L=0,R=!1,z=null,B=null;function V(e){I.delete(e)&&(--L,H())}function H(){for(;L<j&&P.length>0;){let e=P.shift();if(!e)return;let t=new Image;L+=1,I.add(t),t.decoding=`async`,t.onerror=()=>V(t),t.onload=()=>{if(typeof t.decode!=`function`){V(t);return}t.decode().catch(()=>void 0).finally(()=>V(t))},t.src=e}}function U(){z=null,B=null,H()}function W(){if(P.length===0||z!==null||B!==null)return;let e=window.requestIdleCallback?.bind(window);if(e){z=e(U,{timeout:M});return}B=window.setTimeout(U,0)}function G(){R=!1,W()}function K(){if(document.readyState===`complete`){W();return}R||(R=!0,window.addEventListener(`load`,G,{once:!0}))}function q(e,t){if(!e||!t||typeof window>`u`)return;let n=p(e,t);F.has(n)||(F.add(n),P.push(n),K())}function J(e,t,n){(0,g.useEffect)(()=>{if(!t||!n)return;let r=e.current;if(!r||typeof IntersectionObserver>`u`){q(t,n);return}let i=new IntersectionObserver(e=>{e.some(e=>e.isIntersecting)&&(i.disconnect(),q(t,n))},{rootMargin:N});return i.observe(r),()=>i.disconnect()},[n,t,e])}var ae=10,oe=12,se=120,Y={top:0,left:0,maxWidth:0,maxHeight:0,side:`bottom`,measured:!1,ready:!1};function ce(e,t){return e.reduce((e,n)=>t===`bottom`?n.bottom>e.bottom||n.bottom===e.bottom&&n.width>e.width?n:e:n.top<e.top||n.top===e.top&&n.width>e.width?n:e)}function le(e,t,n){return n<t?t:Math.min(Math.max(e,t),n)}function ue({referenceRects:e,floatingWidth:t,floatingHeight:n,viewport:r,gap:i=ae,gutter:a=oe}){let o=Math.min(...e.map(e=>e.top)),s=Math.max(...e.map(e=>e.bottom)),c=Math.max(0,r.bottom-a-s-i),l=Math.max(0,o-r.top-a-i),u=c>=n||c>=l?`bottom`:`top`,d=u===`bottom`?c:l,f=Math.min(n,d),p=ce(e,u),m=Math.max(0,r.width-a*2),h=Math.min(t,m),g=r.left+a,_=r.right-a-h,v=le(p.left+p.width/2-h/2,g,_);return{top:u===`bottom`?s+i:o-i-f,left:v,maxWidth:m,maxHeight:d,side:u,measured:!0,ready:!0}}function de(){let e=window.visualViewport,t=e?.offsetLeft??0,n=e?.offsetTop??0,r=e?.width??window.innerWidth,i=e?.height??window.innerHeight;return{top:n,right:t+r,bottom:n+i,left:t,width:r,height:i}}function fe(e){let t=Array.from(e.getClientRects()).filter(e=>e.width>0||e.height>0);return t.length>0?t:[e.getBoundingClientRect()]}function pe(e,t){return e.some(e=>e.right>=t.left&&e.left<=t.right&&e.bottom>=t.top&&e.top<=t.bottom)}function me(e,t){return e.top===t.top&&e.left===t.left&&e.maxWidth===t.maxWidth&&e.maxHeight===t.maxHeight&&e.side===t.side&&e.measured===t.measured&&e.ready===t.ready}function X(e){return{position:`fixed`,top:e.top,left:e.left,maxWidth:e.measured?e.maxWidth:void 0,maxHeight:e.measured?e.maxHeight:void 0,visibility:e.ready?`visible`:`hidden`}}function Z(e,...t){return e instanceof Node&&t.some(t=>t?.contains(e))}function Q(e={}){let t=e.closeDelayMs??se,[n,r]=(0,g.useState)(!1),[i,a]=(0,g.useState)(Y),o=(0,g.useId)(),s=(0,g.useRef)(null),c=(0,g.useRef)(null),l=(0,g.useRef)(null),u=(0,g.useCallback)(()=>{l.current!==null&&(window.clearTimeout(l.current),l.current=null)},[]),d=(0,g.useCallback)(()=>{u(),n||a(Y),r(!0)},[u,n]),f=(0,g.useCallback)(()=>{u(),r(!1)},[u]),p=(0,g.useCallback)(()=>{u(),l.current=window.setTimeout(()=>{l.current=null;let e=s.current,t=c.current,n=Z(document.activeElement,e,t),i=!!e?.matches(`:hover`)||!!t?.matches(`:hover`);!n&&!i&&r(!1)},t)},[u,t]),m=(0,g.useCallback)(e=>{Z(e.relatedTarget,s.current,c.current)||p()},[p]),h=(0,g.useCallback)(e=>{e.key===`Escape`&&(f(),s.current?.querySelector(`a,button`)?.focus())},[f]),_=(0,g.useCallback)(()=>{let e=s.current,t=c.current;if(!e||!t)return;let n=de(),r=fe(e);if(!pe(r,n)){a(e=>e.ready?{...e,ready:!1}:e);return}let i=t.getBoundingClientRect(),o=t.querySelector(`[data-floating-preview-content]`),l=window.getComputedStyle(t),u=[l.paddingTop,l.paddingBottom,l.borderTopWidth,l.borderBottomWidth].reduce((e,t)=>e+(Number.parseFloat(t)||0),0),d=Math.max(i.height,(o?.getBoundingClientRect().height??0)+u),f=ue({referenceRects:r,floatingWidth:i.width,floatingHeight:d,viewport:n});i.width>f.maxWidth+.5&&(f.ready=!1),a(e=>me(e,f)?e:f)},[]);(0,g.useLayoutEffect)(()=>{if(!n)return;_();let e=0,t=()=>{_(),e=window.requestAnimationFrame(t)};e=window.requestAnimationFrame(t);let r=window.visualViewport;window.addEventListener(`resize`,_),window.addEventListener(`scroll`,_,!0),r?.addEventListener(`resize`,_),r?.addEventListener(`scroll`,_);let i=typeof ResizeObserver>`u`?null:new ResizeObserver(_);return s.current&&i?.observe(s.current),c.current&&i?.observe(c.current),()=>{window.cancelAnimationFrame(e),window.removeEventListener(`resize`,_),window.removeEventListener(`scroll`,_,!0),r?.removeEventListener(`resize`,_),r?.removeEventListener(`scroll`,_),i?.disconnect()}},[n,_]),(0,g.useEffect)(()=>()=>u(),[u]);let v={onPointerEnter:e=>d(),onPointerLeave:e=>p(),onFocus:e=>d(),onBlur:m,onKeyDown:h};return{open:n,referenceRef:s,floatingRef:c,floatingStyle:X(i),referenceProps:v,floatingProps:v,floatingId:o,closePreview:f}}var $=o();function he({profile:e}){let t=k(e.bio,C(e.entities)),n=0;return(0,$.jsxs)(`span`,{className:s,children:[t.map((t,r)=>{if(t.kind!==`url`||t.start<n||t.end<=t.start||t.end>e.bio.length)return null;let a=e.bio.slice(n,t.start);n=t.end;let o=A(t.expandedUrl);return(0,$.jsxs)(g.Fragment,{children:[a,o?(0,$.jsx)(`a`,{className:i,href:o,rel:`noreferrer`,target:`_blank`,children:t.expandedUrl}):e.bio.slice(t.start,t.end)]},`${t.url}-${String(r)}`)}),e.bio.slice(n)]})}function ge({profile:e,children:t,className:i=``}){let o=Q();return J(o.referenceRef,e.id,e.avatarUrl),(0,$.jsxs)(`span`,{ref:o.referenceRef,className:r(n,i),...o.referenceProps,children:[(0,$.jsx)(`a`,{"aria-controls":o.open?o.floatingId:void 0,"aria-expanded":o.open,className:l,href:`/profiles/${encodeURIComponent(e.handle)}`,children:t}),o.open?(0,$.jsx)(`span`,{"aria-label":`${e.displayName} profile preview`,id:o.floatingId,ref:o.floatingRef,className:a,role:`group`,style:o.floatingStyle,...o.floatingProps,children:(0,$.jsxs)(`span`,{className:`grid gap-2`,"data-floating-preview-content":!0,children:[(0,$.jsxs)(`span`,{className:f,children:[(0,$.jsx)(h,{avatarUrl:e.avatarUrl,hue:e.avatarHue,name:e.displayName,profileId:e.id}),(0,$.jsxs)(`span`,{className:`flex min-w-0 flex-col`,children:[(0,$.jsx)(`span`,{className:d,children:e.displayName}),(0,$.jsxs)(`span`,{className:c,children:[`@`,e.handle]})]})]}),e.bio?(0,$.jsx)(he,{profile:e}):null,(0,$.jsxs)(`span`,{className:u,children:[m(e.followersCount),` followers`]})]})}):null]})}export{k as a,ne as c,A as i,C as l,Q as n,D as o,J as r,x as s,ge as t,ie as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as e}from"./chunk-C0phanGV.js";import{t}from"./react-nBylq1U5.js";import{Rn as n}from"./schemas-CaALBBpc.js";import{a as r,i,n as a,o,r as s,t as c}from"./useTimelineRouteData-Cpf-Jqsx.js";import{f as l}from"./index-Bqmo4MbK.js";var u=e(t(),1),d=n(),f={liked:`Likes`,bookmarked:`Bookmarks`};function p({filter:e,title:t,loadingLabel:n,searchPlaceholder:p}){let[m,h]=(0,u.useState)(``),{meta:g,items:_,loading:v,error:y,retry:b,refreshLocalView:x,replyToTweet:S,hasMore:C,loadingMore:w,loadMore:T}=c({resource:`home`,search:m,errorFallback:`${f[e]} unavailable`,likedOnly:e===`liked`,bookmarkedOnly:e===`bookmarked`}),E=(0,u.useMemo)(()=>g?`${String(_.length)} visible · ${g.transport.statusText}`:_.length>0?`${String(_.length)} visible`:n,[_.length,n,g]),D=e===`liked`?`likes`:`bookmarks`;return(0,d.jsx)(s,{header:(0,d.jsx)(a,{title:f[e],subtitles:(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(i,{children:t}),(0,d.jsx)(i,{children:E})]}),action:(0,d.jsx)(l,{accounts:g?.accounts,kind:D,label:e===`liked`?`Sync likes`:`Sync bookmarks`,onSynced:x}),controls:(0,d.jsx)(r,{onChange:h,placeholder:p,value:m})}),loading:v,loadingLabel:n,loadingDetail:`Reading local ${f[e].toLowerCase()}`,error:y,errorTitle:`Could not load ${f[e].toLowerCase()}`,onRetry:b,empty:_.length===0,emptyLabel:`Nothing saved here yet`,emptyDetail:`Sync this collection or broaden the search.`,hasMore:C,loadingMore:w,onLoadMore:T,children:_.map(e=>(0,d.jsx)(o,{item:e,onReply:S,showReplyControls:!1},e.id))})}export{p as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as e}from"./chunk-C0phanGV.js";import{t}from"./react-nBylq1U5.js";import{Rn as n}from"./schemas-CaALBBpc.js";import{a as r,i,o as a}from"./AvatarChip-BN3b4MhM.js";var o=e(t(),1),s=n(),c=3e4,l=new Set,u=Date.now(),d=null;function f(){u=Date.now();for(let e of l)e()}function p(e){return l.add(e),d===null&&(u=Date.now(),d=setInterval(f,c)),()=>{l.delete(e),l.size===0&&d!==null&&(clearInterval(d),d=null)}}function m(){return u}function h(){return null}function g({className:e,value:t}){let n=(0,o.useSyncExternalStore)(p,m,h),c=i(t);return(0,s.jsx)(`time`,{"aria-label":c,className:e,dateTime:t,title:c,children:n===null?r(t):a(t,n)})}export{g as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as e}from"./chunk-C0phanGV.js";import{t}from"./react-nBylq1U5.js";import{Dn as n,M as r,Mn as i,On as a,Rn as o,kn as s}from"./schemas-CaALBBpc.js";import{a as c,i as l,n as u,o as d,r as f,t as p}from"./useTimelineRouteData-Cpf-Jqsx.js";import{f as m}from"./index-Bqmo4MbK.js";var h=e(t(),1),g=o(),_=[{value:`all`,label:`All`},{value:`unreplied`,label:`Unreplied`},{value:`replied`,label:`Replied`}];function v({title:e,resource:t,initialReplyFilter:o,searchPlaceholder:v,syncKind:y,syncLabel:b,loadingLabel:x,loadingDetail:S,errorTitle:C,errorFallback:w,emptyLabel:T,emptyDetail:E,subtitle:D}){let[O,k]=(0,h.useState)(o),[A,j]=(0,h.useState)(``),{meta:M,items:N,loading:P,error:F,replyError:I,retry:L,refreshLocalView:R,replyToTweet:z,hasMore:B,loadingMore:V,loadMore:H}=p({resource:t,replyFilter:O,search:A,errorFallback:w});return(0,g.jsx)(f,{header:(0,g.jsx)(u,{title:e,subtitles:(0,g.jsx)(l,{children:(0,h.useMemo)(()=>D(M),[M,D])}),action:(0,g.jsx)(m,{accounts:M?.accounts,allowAutoSync:!0,autoSyncBlocked:P,kind:y,label:b,onSynced:R,showAccountPicker:!0}),controls:(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(c,{onChange:j,placeholder:v,value:A}),(0,g.jsx)(`div`,{className:s,children:_.map(e=>{let t=O===e.value;return(0,g.jsx)(`button`,{type:`button`,"aria-pressed":t,className:r(n,t&&`text-[var(--ink)] font-bold`),onClick:()=>k(e.value),children:(0,g.jsxs)(`span`,{className:`relative inline-flex flex-col items-center justify-center py-1`,children:[e.label,t?(0,g.jsx)(`span`,{className:a}):null]})},e.value)})})]})}),notice:I?(0,g.jsx)(`p`,{className:r(i,`px-4 py-2 text-red-500`),children:I}):null,loading:P,loadingLabel:x,loadingDetail:S,error:F,errorTitle:C,onRetry:L,empty:N.length===0,emptyLabel:T,emptyDetail:E,hasMore:B,loadingMore:V,onLoadMore:H,children:N.map(e=>(0,g.jsx)(d,{item:e,onReply:z},e.id))})}export{v as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as e}from"./chunk-C0phanGV.js";import{t}from"./react-nBylq1U5.js";import{An as n,C as r,Ft as i,Gt as a,Kt as ee,M as o,Mn as te,N as s,Rn as c,S as l,Tn as u,Ut as d,Wt as f,Xt as p,cn as m,dt as h,jn as ne,pn as re,ut as g}from"./schemas-CaALBBpc.js";import{A as _,a as v,b as y,n as b,r as ie,s as x,u as ae}from"./query-client-DUP1ZzP7.js";import{r as S,t as C}from"./AvatarChip-BN3b4MhM.js";import{Z as w,c as T,ct as E,d as D}from"./index-Bqmo4MbK.js";var O=e(t()),k=c();function A(){let e=T.useSearch(),t=T.useNavigate();return(0,k.jsx)(j,{searchState:e,onSearchChange:(e,n)=>void t({search:e,replace:n?.replace})})}function j({searchState:e,onSearchChange:t}={}){let c=y(),[T,A]=(0,O.useState)(()=>w({})),j=e??T,M=(e,n)=>t?t(e,n):A(e),N=j.account,P=j.q,[F,I]=(0,O.useState)(!1),[L,R]=(0,O.useState)(``),[z,B]=(0,O.useState)(``),V=E({queryKey:b.status,queryFn:({signal:e})=>v({signal:e})}),H=V.data??null,U=D(P,180),W=N.trim().length>0,G=!!H,K=E({queryKey:[...b.blocks,{accountId:N,search:U}],enabled:W,queryFn:async({signal:e})=>{let t=new URLSearchParams({account:N,limit:`12`});return U.trim()&&t.set(`search`,U.trim()),ie(`/api/blocks?${t.toString()}`,{signal:e},ae,`Blocklist request failed`)},placeholderData:_,staleTime:5*6e4}),q=K.data?.items??[],J=K.data?.matches??[],Y=E({queryKey:[...b.blockSync,N],enabled:W,retry:!1,queryFn:async()=>{let e=await x({kind:`syncBlocks`,accountId:N});if(e.ok===!1||e.transport?.ok===!1)throw Error(e.transport?.output??`Block sync failed`);return await c.invalidateQueries({queryKey:b.blocks}),e},staleTime:5*6e4}),X=Y.isFetching,Z=V.error??K.error??Y.error??null,Q=z||(Z instanceof Error?Z.message:Z?`Unable to load blocklist`:``);(0,O.useEffect)(()=>{H?.accounts.length&&(H.accounts.some(e=>e.id===N)||M({...j,account:H.accounts[0]?.id??`acct_primary`},{replace:!0}))},[N,H]),(0,O.useEffect)(()=>{let e=Y.data;!e||e.transport?.output?.includes(`disabled`)||R(e.transport?.output??`Synced ${String(e.syncedCount??0)} remote blocks`)},[Y.data]);let oe=(0,O.useMemo)(()=>H?X?`Syncing remote blocklist · ${H.transport.statusText}`:`${String(q.length)} blocked profiles · ${H.transport.statusText}`:q.length>0?`${String(q.length)} blocked profiles · loading transport...`:`Loading local blocklist...`,[X,q.length,H]);async function $(e,t){let n=t.trim();if(n){I(!0),B(``),R(``);try{let t=await x({kind:e,accountId:N,query:n});if(t.ok===!1||t.transport?.ok===!1){B(t.transport?.output??`Blocklist action failed`);return}R(`${e===`blockProfile`?`Blocked`:`Unblocked`} @${t.profile?.handle??n.replace(/^@/,``)} · ${t.transport?.output??`local`}`),await c.invalidateQueries({queryKey:b.blocks})}catch(e){B(e instanceof Error?e.message:`Blocklist action failed`)}finally{I(!1)}}}return(0,k.jsxs)(k.Fragment,{children:[(0,k.jsxs)(`header`,{className:d,children:[(0,k.jsx)(`div`,{className:f,children:(0,k.jsxs)(`div`,{className:`flex min-w-0 flex-col`,children:[(0,k.jsx)(`h1`,{className:ee,children:`Blocks`}),(0,k.jsx)(`h2`,{className:o(a,`text-[14px]`),children:`Maintain a clean blocklist locally.`}),(0,k.jsx)(`p`,{className:a,children:oe})]})}),(0,k.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2 px-4 pb-3`,children:[(0,k.jsx)(`select`,{className:o(re,ne),disabled:!G,onChange:e=>M({...j,account:e.target.value}),value:N,children:H?.accounts.map(e=>(0,k.jsx)(`option`,{value:e.id,children:e.handle},e.id))}),(0,k.jsx)(`input`,{className:o(n,`flex-1 min-w-[200px]`),disabled:!W,onChange:e=>M({...j,q:e.target.value},{replace:!0}),placeholder:`Handle, name, bio, or Twitter URL`,value:P}),(0,k.jsx)(`button`,{className:p,disabled:!W||F||!P.trim(),onClick:()=>void $(`blockProfile`,P),type:`button`,children:F?`Working...`:`Block`})]})]}),L?(0,k.jsx)(`p`,{className:u,children:L}):null,Q?(0,k.jsx)(`p`,{className:h,children:Q}):null,J.length>0?(0,k.jsxs)(`section`,{className:`flex flex-col`,children:[(0,k.jsx)(`h2`,{className:`px-4 pt-3 pb-1 text-[13px] font-semibold uppercase tracking-wide text-[var(--ink-soft)]`,children:`Search matches`}),J.map(e=>(0,k.jsxs)(`article`,{className:r,children:[(0,k.jsx)(C,{avatarUrl:e.profile.avatarUrl,hue:e.profile.avatarHue,name:e.profile.displayName,profileId:e.profile.id}),(0,k.jsxs)(`div`,{className:l,children:[(0,k.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[(0,k.jsxs)(`div`,{className:`flex min-w-0 flex-col`,children:[(0,k.jsx)(`strong`,{className:`truncate text-[15px] text-[var(--ink)]`,children:e.profile.displayName}),(0,k.jsxs)(`div`,{className:`flex flex-wrap items-center gap-1.5 text-[13px] text-[var(--ink-soft)]`,children:[(0,k.jsxs)(`span`,{children:[`@`,e.profile.handle]}),(0,k.jsx)(`span`,{className:i}),(0,k.jsxs)(`span`,{children:[S(e.profile.followersCount),` `,`followers`]})]})]}),(0,k.jsx)(`button`,{className:e.isBlocked?m:s,onClick:()=>void $(e.isBlocked?`unblockProfile`:`blockProfile`,e.profile.id),type:`button`,children:e.isBlocked?`Unblock`:`Block`})]}),(0,k.jsx)(`p`,{className:`text-[14px] leading-[1.4] text-[var(--ink)]`,children:e.profile.bio})]})]},e.profile.id))]}):null,(0,k.jsxs)(`section`,{className:`flex flex-col`,children:[q.length===0&&J.length===0?(0,k.jsx)(`div`,{className:g,children:`No blocks in this account.`}):null,q.map(e=>(0,k.jsxs)(`article`,{className:r,children:[(0,k.jsx)(C,{avatarUrl:e.profile.avatarUrl,hue:e.profile.avatarHue,name:e.profile.displayName,profileId:e.profile.id}),(0,k.jsxs)(`div`,{className:l,children:[(0,k.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[(0,k.jsxs)(`div`,{className:`flex min-w-0 flex-col`,children:[(0,k.jsx)(`strong`,{className:`truncate text-[15px] text-[var(--ink)]`,children:e.profile.displayName}),(0,k.jsxs)(`div`,{className:`flex flex-wrap items-center gap-1.5 text-[13px] text-[var(--ink-soft)]`,children:[(0,k.jsxs)(`span`,{children:[`@`,e.profile.handle]}),(0,k.jsx)(`span`,{className:i}),(0,k.jsx)(`span`,{children:e.accountHandle}),(0,k.jsx)(`span`,{className:i}),(0,k.jsxs)(`span`,{children:[S(e.profile.followersCount),` `,`followers`]})]})]}),(0,k.jsx)(`button`,{className:m,onClick:()=>void $(`unblockProfile`,e.profile.id),type:`button`,children:`Unblock`})]}),e.profile.bio?(0,k.jsx)(`p`,{className:`text-[14px] leading-[1.4] text-[var(--ink)]`,children:e.profile.bio}):null,(0,k.jsxs)(`p`,{className:te,children:[`Blocked `,new Date(e.blockedAt).toLocaleString(),` ·`,` `,e.source]})]})]},e.accountId+e.profile.id))]})]})}export{j as BlocksRouteView,A as component};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(e&&(t=e(e=0)),t),s=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),c=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},l=(n,r,a)=>(a=n==null?{}:e(i(n)),c(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n));export{o as n,l as r,s as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{t as e}from"./createLucideIcon-JV8isFFR.js";var t=e(`circle-check`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m9 12 2 2 4-4`,key:`dzmm74`}]]);export{t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as e}from"./chunk-C0phanGV.js";import{t}from"./react-nBylq1U5.js";var n=e(t(),1),r=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),i=e=>e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase(),a=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase()),o=e=>{let t=a(e);return t.charAt(0).toUpperCase()+t.slice(1)},s={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`},c=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},l=(0,n.createContext)({}),u=()=>(0,n.useContext)(l),d=(0,n.forwardRef)(({color:e,size:t,strokeWidth:i,absoluteStrokeWidth:a,className:o=``,children:l,iconNode:d,...f},p)=>{let{size:m=24,strokeWidth:h=2,absoluteStrokeWidth:g=!1,color:_=`currentColor`,className:v=``}=u()??{},y=a??g?Number(i??h)*24/Number(t??m):i??h;return(0,n.createElement)(`svg`,{ref:p,...s,width:t??m??s.width,height:t??m??s.height,stroke:e??_,strokeWidth:y,className:r(`lucide`,v,o),...!l&&!c(f)&&{"aria-hidden":`true`},...f},[...d.map(([e,t])=>(0,n.createElement)(e,t)),...Array.isArray(l)?l:[l]])}),f=(e,t)=>{let a=(0,n.forwardRef)(({className:a,...s},c)=>(0,n.createElement)(d,{ref:c,iconNode:t,className:r(`lucide-${i(o(e))}`,`lucide-${e}`,a),...s}));return a.displayName=o(e),a};export{f as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as e}from"./chunk-C0phanGV.js";import{t}from"./react-nBylq1U5.js";import{Gt as n,Ht as r,Kt as i,M as a,Rn as o,Tn as s,Ut as c,Wt as l,cn as u,dt as d}from"./schemas-CaALBBpc.js";import{t as f}from"./createLucideIcon-JV8isFFR.js";import{t as p}from"./circle-check-C_Vq3ElD.js";import{t as m}from"./triangle-alert-CBL7s2pf.js";import{h,n as g,r as _}from"./query-client-DUP1ZzP7.js";import{ct as v,ft as y,vt as b}from"./index-Bqmo4MbK.js";var x=f(`circle-x`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m15 9-6 6`,key:`1uzhvr`}],[`path`,{d:`m9 9 6 6`,key:`z0biqf`}]]),S=f(`route`,[[`circle`,{cx:`6`,cy:`19`,r:`3`,key:`1kj8tv`}],[`path`,{d:`M9 19h8.5a3.5 3.5 0 0 0 0-7h-11a3.5 3.5 0 0 1 0-7H15`,key:`1d8sl`}],[`circle`,{cx:`18`,cy:`5`,r:`3`,key:`gq8acd`}]]),C=f(`square-terminal`,[[`path`,{d:`m7 11 2-2-2-2`,key:`1lz0vl`}],[`path`,{d:`M11 13h4`,key:`1p7l4v`}],[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,ry:`2`,key:`1m3agn`}]]),w=e(t()),T=o();async function E(){return _(`/api/data-sources`,void 0,h,`Data source status failed`)}function D(e){return e===`birdclaw`?b:e===`bird`?C:S}function O(e){return e===`ok`?`border-[color:color-mix(in_srgb,#22c55e_45%,var(--line))] bg-[color:color-mix(in_srgb,#22c55e_10%,var(--bg))] text-[color:color-mix(in_srgb,#22c55e_82%,var(--ink))]`:e===`warning`?`border-[color:color-mix(in_srgb,#f59e0b_50%,var(--line))] bg-[color:color-mix(in_srgb,#f59e0b_12%,var(--bg))] text-[color:color-mix(in_srgb,#f59e0b_82%,var(--ink))]`:`border-[color:color-mix(in_srgb,var(--alert)_55%,var(--line))] bg-[var(--alert-soft)] text-[var(--alert)]`}function k(e){return e===`ok`?p:e===`warning`?m:x}function A(e){return e===`birdclaw`?`local`:e}function j({source:e}){let t=D(e.source),n=k(e.status);return(0,T.jsxs)(`section`,{className:`min-w-0 border-b border-[var(--line)] px-4 py-4`,children:[(0,T.jsxs)(`div`,{className:`flex items-start justify-between gap-3`,children:[(0,T.jsxs)(`div`,{className:`flex min-w-0 items-center gap-3`,children:[(0,T.jsx)(`div`,{className:`grid size-10 shrink-0 place-items-center rounded-md border border-[var(--line)] bg-[var(--bg-active)] text-[var(--ink)]`,children:(0,T.jsx)(t,{className:`size-5`,strokeWidth:1.9})}),(0,T.jsxs)(`div`,{className:`min-w-0`,children:[(0,T.jsx)(`h2`,{className:`truncate text-[16px] font-bold text-[var(--ink)]`,children:e.label}),(0,T.jsx)(`p`,{className:`truncate text-[13px] text-[var(--ink-soft)]`,children:e.installed===!1?`not installed`:e.detail})]})]}),(0,T.jsxs)(`span`,{className:a(`inline-flex shrink-0 items-center gap-1 rounded-full border px-2 py-0.5 text-[12px] font-bold`,O(e.status)),children:[(0,T.jsx)(n,{className:`size-3.5`,strokeWidth:2}),e.works?`works`:e.status]})]}),(0,T.jsx)(`div`,{className:`mt-4 flex flex-wrap gap-2`,children:e.accounts.length>0?e.accounts.map((e,t)=>(0,T.jsxs)(`span`,{className:`inline-flex max-w-full items-center gap-1.5 rounded-full border border-[var(--line)] bg-[var(--bg)] px-2.5 py-1 text-[12px] font-semibold text-[var(--ink-soft)]`,children:[e.app?(0,T.jsx)(`span`,{className:`text-[var(--ink-faint)]`,children:e.app}):null,(0,T.jsx)(`span`,{className:`truncate`,children:e.handle??(e.username?`@${e.username}`:e.id)}),e.isDefault?(0,T.jsx)(`span`,{className:`text-[var(--accent)]`,children:`default`}):null]},`${e.app??``}:${e.username??e.handle??e.id??String(t)}`)):(0,T.jsx)(`span`,{className:`text-[13px] text-[var(--ink-soft)]`,children:`no authenticated account detected`})})]})}function M({capability:e,sourcesByKind:t}){let n=[e.primary,...e.fallbacks];return(0,T.jsxs)(`div`,{className:`grid gap-3 border-b border-[var(--line)] px-4 py-4 min-[840px]:grid-cols-[220px_minmax(0,1fr)]`,children:[(0,T.jsxs)(`div`,{className:`min-w-0`,children:[(0,T.jsx)(`div`,{className:`font-bold text-[var(--ink)]`,children:e.label}),e.notes?(0,T.jsx)(`div`,{className:`mt-1 text-[12px] text-[var(--ink-soft)]`,children:e.notes}):null]}),(0,T.jsx)(`div`,{className:`flex min-w-0 flex-wrap items-center gap-2`,children:n.map((n,r)=>{let i=t.get(n);return(0,T.jsxs)(`div`,{className:a(`inline-flex items-center gap-2 rounded-full border px-3 py-1 text-[13px] font-semibold`,i?.works?`border-[color:color-mix(in_srgb,#22c55e_38%,var(--line))] text-[var(--ink)]`:`border-[var(--line)] text-[var(--ink-soft)]`),children:[(0,T.jsx)(`span`,{className:`text-[12px] text-[var(--ink-faint)]`,children:r===0?`primary`:`fallback ${String(r)}`}),(0,T.jsx)(`span`,{children:A(n)})]},`${e.key}:${n}:${String(r)}`)})})]})}function N(){let e=v({queryKey:g.dataSources,queryFn:E,staleTime:5*6e4}),t=e.data??null,o=e.isFetching,f=e.error,p=(0,w.useMemo)(()=>new Map((t?.sources??[]).map(e=>[e.source,e])),[t]);return(0,T.jsxs)(`section`,{className:`flex min-h-screen flex-col`,children:[(0,T.jsx)(`header`,{className:c,children:(0,T.jsxs)(`div`,{className:l,children:[(0,T.jsxs)(`div`,{children:[(0,T.jsx)(`h1`,{className:i,children:`Data Sources`}),(0,T.jsx)(`p`,{className:n,children:`Live auth, local archive, and automatic fallback order`})]}),(0,T.jsx)(`div`,{className:r,children:(0,T.jsxs)(`button`,{className:u,type:`button`,onClick:()=>void e.refetch(),disabled:o,children:[(0,T.jsx)(y,{className:a(`size-4`,o&&`animate-spin`)}),`Refresh`]})})]})}),f?(0,T.jsx)(`div`,{className:d,children:f instanceof Error?f.message:`Data sources unavailable`}):null,t?(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)(`div`,{className:`grid border-t border-[var(--line)]`,children:t.sources.map(e=>(0,T.jsx)(j,{source:e},e.source))}),(0,T.jsxs)(`section`,{className:`min-h-0 flex-1`,children:[(0,T.jsxs)(`header`,{className:`border-b border-[var(--line)] px-4 py-3`,children:[(0,T.jsx)(`h2`,{className:`text-[16px] font-bold text-[var(--ink)]`,children:`Fallbacks`}),(0,T.jsx)(`p`,{className:`text-[13px] text-[var(--ink-soft)]`,children:`Calls try the next source when the current source cannot serve the request.`})]}),t.capabilities.map(e=>(0,T.jsx)(M,{capability:e,sourcesByKind:p},e.key))]})]}):o?(0,T.jsx)(`div`,{className:s,children:`Checking data sources...`}):null]})}export{N as component};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as e}from"./chunk-C0phanGV.js";import{t}from"./react-nBylq1U5.js";import{An as n,Gt as r,Ht as i,Kt as a,M as o,Rn as s,Ut as c,Wt as l,Xt as u,an as d,cn as f,dt as p,on as m,pn as h,sn as g}from"./schemas-CaALBBpc.js";import{t as _}from"./circle-check-C_Vq3ElD.js";import{a as v,i as y,o as b,s as x,t as S}from"./client-stream-contracts-DcKcyZhg.js";import{t as C}from"./search-Dq5kYsxA.js";import{t as w}from"./sparkles-CQVlvHsZ.js";import{Q as T,bt as E,ft as D,l as O}from"./index-Bqmo4MbK.js";var k=e(t()),A=s(),j=[{value:`search`,label:`Live search`},{value:`all`,label:`All local`},{value:`home`,label:`Home`},{value:`mentions`,label:`Mentions`},{value:`authored`,label:`Authored`},{value:`likes`,label:`Likes`},{value:`bookmarks`,label:`Bookmarks`}],M=[{value:`auto`,label:`Auto`},{value:`bird`,label:`Bird`},{value:`xurl`,label:`xurl`},{value:`local`,label:`Local`}],N=2e4,P=200;function F(){return Error(`Discussion connection closed before completion. Retry to continue.`)}function I(e){return e instanceof Error?e.message:`Discussion failed`}function L(e,t){let n=new URL(`/api/search-discussion`,window.location.origin);return n.searchParams.set(`query`,e),n.searchParams.set(`source`,t.source),n.searchParams.set(`mode`,t.mode),n.searchParams.set(`includeDms`,String(t.includeDms)),n.searchParams.set(`limit`,String(N)),n.searchParams.set(`maxPages`,String(P)),t.question.trim()&&n.searchParams.set(`question`,t.question.trim()),t.refresh&&n.searchParams.set(`refresh`,`true`),n}function R({label:e,value:t,options:n,onChange:r}){return(0,A.jsxs)(`label`,{className:`relative min-w-0`,children:[(0,A.jsx)(`span`,{className:`pointer-events-none absolute left-3 top-1.5 z-10 text-[11px] font-semibold uppercase tracking-[0.08em] text-[var(--ink-soft)]`,children:e}),(0,A.jsx)(`select`,{"aria-label":e,className:o(h,`h-[54px] rounded-2xl bg-[var(--bg)] pb-1 pl-3 pr-9 pt-5 font-semibold text-[var(--ink)]`),value:t,onChange:e=>r(e.currentTarget.value),children:n.map(e=>(0,A.jsx)(`option`,{value:e.value,children:e.label},e.value))}),(0,A.jsx)(E,{"aria-hidden":`true`,className:`pointer-events-none absolute right-3 top-1/2 size-4 -translate-y-1/2 text-[var(--ink-soft)]`,strokeWidth:2})]})}function z(e){if(!e)return`Live keyword search with local memory.`;let t=e.counts;return[e.liveSearch?e.liveSearch.ok?`${e.liveSearch.source} ${String(e.liveSearch.count)} fetched`:`${e.liveSearch.source} failed`:`local`,`${String(t.search)} search`,`${String(t.home+t.mentions+t.authored)} timeline`,`${String(t.likes+t.bookmarks)} saved`,e.includeDms?`${String(t.dms)} DMs`:null].filter(Boolean).join(` · `)}function B(e,t,n,r,i){let[a,o]=(0,k.useState)(``),[s,c]=(0,k.useState)(null),[l,u]=(0,k.useState)(null),d=(0,k.useCallback)(()=>{o(``),c(null),u(null)},[]),{error:f,loading:p,run:m}=v({schema:y,request:(0,k.useCallback)((a,o)=>{let s=e.trim();return fetch(L(s,{source:t,mode:n,includeDms:r,question:i,refresh:o}),{signal:a})},[r,n,e,i,t]),onStart:d,onEvent:(0,k.useCallback)(e=>{if(e.type===`start`)c(e.context);else if(e.type===`delta`)o(t=>t+e.delta);else if(e.type===`done`)u(e.result),c(e.result.context),o(e.result.markdown);else if(e.type===`error`)throw Error(e.error)},[]),isTerminal:S,errorLabel:`Discussion request failed`,emptyBodyMessage:`Discussion request failed: empty response body`,prematureEofError:F,formatError:I});return{context:s,error:f,loading:p,markdown:a,result:l,run:(0,k.useCallback)((t=!1)=>{e.trim()&&m(t)},[e,m])}}function V(){let e=O.useSearch(),t=O.useNavigate();return(0,A.jsx)(H,{searchState:e,onSearchChange:(e,n)=>void t({search:e,replace:n?.replace})})}function H({searchState:e,onSearchChange:t}={}){let[s,h]=(0,k.useState)(()=>T({})),v=e??s,y=(e,n)=>t?t(e,n):h(e),{q:S,question:E,source:O,mode:N,includeDms:P}=v,[F,I]=(0,k.useState)(``),L=(0,k.useRef)(!1),{context:V,error:H,loading:U,markdown:W,result:G,run:K}=B(F,O,N,P,E),q=(0,k.useMemo)(()=>z(G?.context??V),[V,G]);function J(e){e.preventDefault();let t=S.trim();t&&(L.current=!0,I(t),t===F&&(L.current=!1,K(!1)))}return(0,k.useEffect)(()=>{!F||!L.current||(L.current=!1,K(!1))},[K,F]),(0,A.jsxs)(`div`,{className:`flex min-h-screen flex-col`,children:[(0,A.jsxs)(`header`,{className:c,children:[(0,A.jsxs)(`div`,{className:l,children:[(0,A.jsxs)(`div`,{className:`min-w-0`,children:[(0,A.jsx)(`h1`,{className:a,children:`Discuss`}),(0,A.jsx)(`p`,{className:r,children:q})]}),(0,A.jsx)(`div`,{className:i,children:(0,A.jsxs)(`button`,{type:`button`,className:f,onClick:()=>K(!0),disabled:U||!F,children:[(0,A.jsx)(D,{className:o(`size-4`,U&&`animate-spin`),"aria-hidden":`true`}),`Refresh`]})})]}),(0,A.jsxs)(`form`,{className:`grid gap-2 px-4 pb-3 md:grid-cols-[minmax(220px,1fr)_minmax(180px,0.8fr)_auto]`,onSubmit:J,children:[(0,A.jsxs)(`label`,{className:g,children:[(0,A.jsx)(C,{className:d,strokeWidth:2}),(0,A.jsx)(`input`,{className:m,placeholder:`Keywords`,value:S,onChange:e=>y({...v,q:e.currentTarget.value},{replace:!0})})]}),(0,A.jsx)(`input`,{className:n,placeholder:`Optional question`,value:E,onChange:e=>y({...v,question:e.currentTarget.value},{replace:!0})}),(0,A.jsxs)(`button`,{type:`submit`,className:u,disabled:U||!S.trim(),children:[(0,A.jsx)(w,{className:`size-4`,"aria-hidden":`true`}),`Discuss`]}),(0,A.jsxs)(`div`,{className:`grid gap-2 md:col-span-3 md:grid-cols-[minmax(0,1fr)_minmax(0,1fr)_auto]`,children:[(0,A.jsx)(R,{label:`Source`,options:j,value:O,onChange:e=>y({...v,source:e})}),(0,A.jsx)(R,{label:`Mode`,options:M,value:N,onChange:e=>y({...v,mode:e})}),(0,A.jsxs)(`label`,{className:`inline-flex h-[54px] items-center gap-2 rounded-2xl border border-[var(--line)] bg-[var(--bg)] px-3 text-[13px] font-medium text-[var(--ink-soft)]`,children:[(0,A.jsx)(`input`,{type:`checkbox`,checked:P,onChange:e=>y({...v,includeDms:e.currentTarget.checked})}),`DMs`]})]})]})]}),H?(0,A.jsx)(`div`,{className:p,children:H}):null,(0,A.jsx)(`div`,{className:`border-b border-[var(--line)] px-4 py-2 text-[13px] text-[var(--ink-soft)]`,children:(0,A.jsxs)(`span`,{className:`inline-flex items-center gap-1`,children:[U?(0,A.jsx)(x,{className:`size-4 animate-spin`,"aria-hidden":`true`}):W?(0,A.jsx)(_,{className:`size-4`,"aria-hidden":`true`}):(0,A.jsx)(w,{className:`size-4`,"aria-hidden":`true`}),U?`Searching and streaming`:G?`${G.cached?`Cached`:`Ready`} · ${G.context.query}`:`Ready`]})}),W?(0,A.jsx)(b,{context:G?.context??V,markdown:W}):(0,A.jsx)(`div`,{className:`px-4 py-5 text-[14px] text-[var(--ink-soft)]`,children:U?`Waiting for the first tokens...`:`Search to begin.`})]})}export{H as DiscussRouteView,V as component};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as e}from"./chunk-C0phanGV.js";import{t}from"./react-nBylq1U5.js";import{Dn as n,Gt as r,Kt as i,M as a,Mn as o,On as s,Rn as c,Ut as l,Wt as u,an as d,dn as f,fn as p,kn as ee,on as te,sn as ne}from"./schemas-CaALBBpc.js";import{t as re}from"./search-Dq5kYsxA.js";import{A as ie,a as ae,b as m,d as h,n as g,r as _,s as v}from"./query-client-DUP1ZzP7.js";import{$ as y,A as b,O as oe,ct as x,d as se,f as ce,k as le,ot as S,p as ue,st as C,u as w}from"./index-Bqmo4MbK.js";var T=e(t()),E=c(),de=[{value:`all`,label:`All`},{value:`unreplied`,label:`Unreplied`},{value:`replied`,label:`Replied`}],fe=[{value:`recent`,label:`Newest`},{value:`followers`,label:`Followers`}],pe=[{value:`all`,label:`All`},{value:`accepted`,label:`Accepted`},{value:`requests`,label:`Requests`}],D=`flex h-[46px] shrink-0 items-center gap-2 rounded-md border border-[var(--line)] bg-[var(--bg)] px-3 py-0 text-[14px] text-[var(--ink)] outline-none transition-colors duration-150 focus-within:border-[var(--accent)] focus-within:shadow-[0_0_0_1px_var(--accent)]`;function O(){let e=w.useSearch(),t=w.useNavigate();return(0,E.jsx)(k,{searchState:e,onSearchChange:(e,n)=>void t({search:e,replace:n?.replace})})}function k({searchState:e,onSearchChange:t}={}){let c=m(),[w,O]=(0,T.useState)(()=>y({})),k=e??w,A=(e,n)=>t?t(e,n):O(e),j=k.inbox,M=k.reply,N=k.minFollowers,P=k.minInfluence,F=k.sort,I=k.q,L=k.conversation||void 0,[R,z]=(0,T.useState)(``),B=x({queryKey:g.status,queryFn:({signal:e})=>ae({signal:e})}).data??null,V=S(B?.accounts),H=se(I,180),U=[...g.dms,{inboxFilter:j,replyFilter:M,minFollowers:N,minInfluenceScore:P,sort:F,search:H,selectedAccountId:V??null,selectedConversationId:L??null}],W=x({queryKey:U,queryFn:({signal:e})=>{let t=new URL(`/api/query`,window.location.origin);return t.searchParams.set(`resource`,`dms`),t.searchParams.set(`inbox`,j),t.searchParams.set(`replyFilter`,M),t.searchParams.set(`sort`,F),N.trim()&&t.searchParams.set(`minFollowers`,N.trim()),P.trim()&&t.searchParams.set(`minInfluenceScore`,P.trim()),V&&j!==`requests`&&t.searchParams.set(`account`,V),L&&t.searchParams.set(`conversationId`,L),H.trim()&&t.searchParams.set(`search`,H.trim()),_(t,{signal:e},h,`Direct messages unavailable`)},placeholderData:ie,staleTime:5*6e4}),G=W.data,K=G?.resource===`dms`?G:null,q=K?.items??[],me=K?.selectedConversation?.messages??[],J=K?.selectedConversation?.conversation.id;(0,T.useEffect)(()=>{if(!W.data)return;let e=J??q[0]?.id,t=L&&q.some(e=>e.id===L)?L:e;t&&t!==L&&A({...k,conversation:t},{replace:!0})},[W.data,q,J]);let Y=q.find(e=>e.id===L)??null,he=!!(!W.isError&&L&&J&&L!==J),X=(0,T.useMemo)(()=>B?`${String(B.stats.dms)} conversations cached locally`:`Loading direct messages...`,[B]),Z=C({mutationFn:({conversationId:e,text:t})=>v({kind:`replyDm`,conversationId:e,text:t}),onMutate:async({conversationId:e,text:t})=>{await c.cancelQueries({queryKey:U});let n=c.getQueryData(U);if(!n||n.resource!==`dms`||!Y)return{previous:n};let r=new Date().toISOString(),i=B?.accounts.find(e=>e.id===Y.accountId),a=(i?.handle??Y.accountHandle).replace(/^@/,``),o={id:`optimistic-${r}`,conversationId:e,text:t,createdAt:r,direction:`outbound`,isReplied:!0,mediaCount:0,sender:{id:`local-${Y.accountId}`,handle:a,displayName:i?.name??a,bio:``,followersCount:0,avatarHue:18,createdAt:r}};return c.setQueryData(U,{...n,items:n.items.map(n=>n.id===e?{...n,lastMessageAt:r,lastMessagePreview:t,needsReply:!1,unreadCount:0}:n),selectedConversation:n.selectedConversation?{...n.selectedConversation,messages:[...n.selectedConversation.messages,o]}:n.selectedConversation}),{previous:n}},onError:(e,t,n)=>{n?.previous&&c.setQueryData(U,n.previous)},onSettled:()=>Promise.all([c.invalidateQueries({queryKey:g.dms}),c.invalidateQueries({queryKey:g.status})])});async function ge(e){let t=R.trim();if(!(!t||!Y)){z(``);try{await Z.mutateAsync({conversationId:e,text:t}),A({...k,conversation:e})}catch{z(t)}}}function _e(){Promise.all([c.invalidateQueries({queryKey:g.dms}),c.invalidateQueries({queryKey:g.status})])}let ve=W.isPending,Q=W.error?W.error instanceof Error?W.error.message:`Messages unavailable`:null,$=Z.error?Z.error instanceof Error?Z.error.message:`Reply failed`:null;return(0,E.jsxs)(E.Fragment,{children:[(0,E.jsxs)(`header`,{className:l,children:[(0,E.jsxs)(`div`,{className:u,children:[(0,E.jsxs)(`div`,{className:`flex min-w-0 flex-col`,children:[(0,E.jsx)(`h1`,{className:i,children:`Messages`}),(0,E.jsx)(`p`,{className:r,children:X})]}),(0,E.jsx)(ce,{accounts:B?.accounts,kind:`dms`,label:`Sync DMs`,onSynced:_e,syncOptions:{inbox:j,limit:j===`requests`?200:50,maxPages:j===`requests`?3:1}})]}),(0,E.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2 px-4 pb-3`,children:[(0,E.jsx)(`div`,{className:p,"aria-label":`DM inbox`,children:pe.map(e=>(0,E.jsx)(`button`,{"aria-pressed":j===e.value,className:a(f,j===e.value&&`bg-[var(--bg-active)] text-[var(--ink)]`),onClick:()=>A({...k,inbox:e.value}),type:`button`,children:e.label},e.value))}),(0,E.jsxs)(`label`,{className:a(ne,`flex-1 min-w-[200px]`),children:[(0,E.jsx)(re,{className:d,strokeWidth:2}),(0,E.jsx)(`input`,{className:te,onChange:e=>A({...k,q:e.target.value},{replace:!0}),placeholder:`Search DMs`,value:I})]}),(0,E.jsxs)(`label`,{className:a(D,`w-[156px]`),children:[(0,E.jsx)(`span`,{className:`shrink-0 text-[12px] font-semibold text-[var(--ink-soft)]`,children:`Followers`}),(0,E.jsx)(`input`,{className:`min-w-0 flex-1 border-0 bg-transparent text-right text-[14px] text-[var(--ink)] outline-none placeholder:text-[var(--ink-soft)]`,inputMode:`numeric`,onChange:e=>A({...k,minFollowers:e.target.value},{replace:!0}),placeholder:`Any`,value:N})]}),(0,E.jsxs)(`label`,{className:a(D,`w-[132px]`),children:[(0,E.jsx)(`span`,{className:`shrink-0 text-[12px] font-semibold text-[var(--ink-soft)]`,children:`Score`}),(0,E.jsx)(`input`,{className:`min-w-0 flex-1 border-0 bg-transparent text-right text-[14px] text-[var(--ink)] outline-none placeholder:text-[var(--ink-soft)]`,inputMode:`numeric`,onChange:e=>A({...k,minInfluence:e.target.value},{replace:!0}),placeholder:`Any`,value:P})]}),(0,E.jsx)(`div`,{className:p,children:fe.map(e=>(0,E.jsx)(`button`,{className:a(f,e.value===F&&`bg-[var(--bg-active)] text-[var(--ink)]`),onClick:()=>A({...k,sort:e.value}),type:`button`,children:e.label},e.value))})]}),(0,E.jsx)(`div`,{className:ee,"aria-label":`DM reply filter`,children:de.map(e=>{let t=M===e.value;return(0,E.jsx)(`button`,{type:`button`,"aria-pressed":t,className:a(n,t&&`text-[var(--ink)] font-bold`),onClick:()=>A({...k,reply:e.value}),children:(0,E.jsxs)(`span`,{className:`relative inline-flex flex-col items-center justify-center py-1`,children:[e.value,t?(0,E.jsx)(`span`,{className:s}):null]})},e.value)})})]}),$?(0,E.jsx)(`p`,{className:a(o,`px-4 py-2 text-red-500`),children:$}):null,ve&&q.length===0||he?(0,E.jsx)(b,{detail:`Reading local conversations and reply state`,label:`Loading messages`}):Q?(0,E.jsx)(le,{action:(0,E.jsx)(`button`,{className:`rounded-full bg-[var(--accent)] px-4 py-1.5 text-[14px] font-bold text-white`,onClick:()=>void W.refetch(),type:`button`,children:`Retry`}),message:Q,title:`Could not load messages`}):q.length===0?(0,E.jsx)(oe,{detail:`Sync DMs or broaden the filters to find a conversation.`,label:`No conversations in this view`}):(0,E.jsx)(ue,{conversations:q,onReplyDraftChange:z,onReplySend:ge,onSelectConversation:e=>A({...k,conversation:e}),replyDraft:R,selectedConversation:Y,selectedMessages:me})]})}export{k as DmsRouteView,O as component};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as e}from"./chunk-C0phanGV.js";import{t}from"./react-nBylq1U5.js";import{An as n,Dn as r,Gt as i,Kt as a,M as o,Mn as s,On as c,Rn as l,Ut as u,Wt as d,Xt as f,cn as p,ht as m,jn as h,kn as g,ut as _}from"./schemas-CaALBBpc.js";import{t as v}from"./sparkles-CQVlvHsZ.js";import{A as y,a as b,b as x,f as S,n as C,r as ee,s as w}from"./query-client-DUP1ZzP7.js";import{ct as T,et as E,h as D,m as O,ot as k,st as A}from"./index-Bqmo4MbK.js";var j=e(t()),M=l(),N=[{value:`mixed`,label:`Mixed`},{value:`mentions`,label:`Mentions`},{value:`dms`,label:`DMs`}];function P(){let e=O.useSearch(),t=O.useNavigate();return(0,M.jsx)(F,{searchState:e,onSearchChange:(e,n)=>void t({search:e,replace:n?.replace})})}function F({searchState:e,onSearchChange:t}={}){let l=x(),[O,P]=(0,j.useState)(()=>E({})),F=e??O,I=(e,n)=>t?t(e,n):P(e),{kind:L,minScore:R,hideLowSignal:z}=F,[B,V]=(0,j.useState)(null),[H,U]=(0,j.useState)(``),[W,G]=(0,j.useState)(!1),[K,q]=(0,j.useState)(null),J=T({queryKey:C.status,queryFn:({signal:e})=>b({signal:e})}).data??null,Y=k(J?.accounts),X=T({queryKey:[...C.inbox,{hideLowSignal:z,kind:L,minScore:R,selectedAccountId:Y??null}],queryFn:async({signal:e})=>{let t=new URL(`/api/inbox`,window.location.origin);return t.searchParams.set(`kind`,L),t.searchParams.set(`minScore`,R),Y&&t.searchParams.set(`account`,Y),z&&t.searchParams.set(`hideLowSignal`,`1`),ee(t,{signal:e},S,`Inbox request failed`)},placeholderData:y,staleTime:5*6e4}),Z=X.data?.items??[],Q=X.data?.stats??null,$=A({mutationFn:()=>w({kind:`scoreInbox`,scoreKind:L,account:Y,limit:8}),onSuccess:()=>l.invalidateQueries({queryKey:C.inbox})}),te=(0,j.useMemo)(()=>!J||!Q?`Ranking unreplied mentions and DMs...`:`${String(Q.total)} in queue · ${String(Q.openai)} OpenAI scored · ${J.transport.statusText}`,[J,Q]);async function ne(){await $.mutateAsync()}async function re(e){if(H.trim()){G(!0),q(null);try{await w(e.entityKind===`dm`?{kind:`replyDm`,conversationId:e.entityId,text:H}:{kind:`replyTweet`,accountId:e.accountId,tweetId:e.entityId,text:H}),U(``),V(null),await l.invalidateQueries({queryKey:C.inbox})}catch(e){q(e instanceof Error?e.message:`Reply failed`)}finally{G(!1)}}}return(0,M.jsxs)(M.Fragment,{children:[(0,M.jsxs)(`header`,{className:u,children:[(0,M.jsxs)(`div`,{className:d,children:[(0,M.jsxs)(`div`,{className:`flex min-w-0 flex-col`,children:[(0,M.jsx)(`h1`,{className:a,children:`Inbox`}),(0,M.jsx)(`p`,{className:i,children:te})]}),(0,M.jsxs)(`button`,{className:f,disabled:$.isPending,onClick:()=>void ne(),type:`button`,children:[(0,M.jsx)(v,{className:`size-4`,strokeWidth:2.2}),$.isPending?`Scoring...`:`Score with OpenAI`]})]}),(0,M.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2 px-4 pb-3`,children:[(0,M.jsx)(`input`,{className:o(n,h),inputMode:`numeric`,onChange:e=>I({...F,minScore:e.target.value},{replace:!0}),placeholder:`Min AI score`,value:R}),(0,M.jsx)(`button`,{className:p,onClick:()=>I({...F,hideLowSignal:!z}),type:`button`,"aria-pressed":z,children:z?`Hide low-signal`:`Show all`})]}),(0,M.jsx)(`div`,{className:g,children:N.map(e=>{let t=L===e.value;return(0,M.jsx)(`button`,{type:`button`,"aria-pressed":t,className:o(r,t&&`text-[var(--ink)] font-bold`),onClick:()=>I({...F,kind:e.value}),children:(0,M.jsxs)(`span`,{className:`relative inline-flex flex-col items-center justify-center py-1`,children:[e.value,t?(0,M.jsx)(`span`,{className:c}):null]})},e.value)})})]}),K?(0,M.jsx)(`p`,{className:o(s,`px-4 py-2 text-red-500`),children:K}):null,(0,M.jsxs)(`section`,{className:m,children:[Z.length===0?(0,M.jsx)(`div`,{className:_,children:`Inbox clear.`}):null,Z.map(e=>(0,M.jsx)(D,{isReplying:B===e.id,item:e,onReplyChange:U,onReplySend:()=>void re(e),onReplyToggle:()=>{if(q(null),B===e.id){V(null),U(``);return}V(e.id),U(``)},replyDraft:B===e.id?H:``},e.id))]}),W?(0,M.jsx)(`p`,{className:o(s,`px-4 py-2`),children:`Sending reply...`}):null]})}export{F as InboxRouteView,P as component};
|