@protobase/ui 0.59.2 → 0.59.3

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.
Files changed (42) hide show
  1. package/dist/app/app.js +11 -3
  2. package/dist/app-shell/app-shell.js +2 -1
  3. package/dist/app-shell/profile-menu.d.ts +1 -0
  4. package/dist/app-shell/profile-menu.js +25 -3
  5. package/dist/app-shell/sidebar.js +3 -2
  6. package/dist/data/api-provider.d.ts +12 -0
  7. package/dist/data/meta-data.d.ts +2 -0
  8. package/dist/data/query-keys.js +8 -0
  9. package/dist/data/use-meta.js +1 -0
  10. package/dist/index.d.ts +4 -2
  11. package/dist/index.js +3 -1
  12. package/dist/organizations/members-page.js +7 -3
  13. package/dist/package.js +1 -1
  14. package/dist/people/person-row.js +8 -2
  15. package/dist/people/use-members.d.ts +9 -4
  16. package/dist/people/use-members.js +19 -3
  17. package/dist/shell/assets/app-CA2weCDB.js +9 -0
  18. package/dist/shell/assets/{index-mZM1MZhj.css → index-D0sx7n9i.css} +1 -1
  19. package/dist/shell/assets/{index-C-4shB1O.js → index-Dto4tygi.js} +2 -2
  20. package/dist/shell/assets/{records-map-CnJCsPQi.js → records-map-lppqdLea.js} +2 -2
  21. package/dist/shell/assets/shared-protobase-ui-C99fw_w0.js +2 -0
  22. package/dist/shell/index.html +4 -4
  23. package/dist/shell/protobase.shell.json +2 -2
  24. package/dist/shell/protobase.sw.js +2 -2
  25. package/dist/shell-source-maps/assets/app-CA2weCDB.js.map +1 -0
  26. package/dist/shell-source-maps/assets/{index-C-4shB1O.js.map → index-Dto4tygi.js.map} +1 -1
  27. package/dist/shell-source-maps/assets/{records-map-CnJCsPQi.js.map → records-map-lppqdLea.js.map} +1 -1
  28. package/dist/shell-source-maps/assets/shared-protobase-ui-C99fw_w0.js.map +1 -0
  29. package/dist/status/clear-time.js +40 -0
  30. package/dist/status/messages.js +58 -0
  31. package/dist/status/status-dialog.js +190 -0
  32. package/dist/status/status-draft.js +40 -0
  33. package/dist/status/status-mark.d.ts +24 -0
  34. package/dist/status/status-mark.js +51 -0
  35. package/dist/status/use-status-menu.js +55 -0
  36. package/dist/status/use-statuses.d.ts +15 -0
  37. package/dist/status/use-statuses.js +43 -0
  38. package/package.json +4 -4
  39. package/dist/shell/assets/app-b2Amc-iC.js +0 -9
  40. package/dist/shell/assets/shared-protobase-ui-CQPxMGrM.js +0 -2
  41. package/dist/shell-source-maps/assets/app-b2Amc-iC.js.map +0 -1
  42. package/dist/shell-source-maps/assets/shared-protobase-ui-CQPxMGrM.js.map +0 -1
@@ -1,2 +0,0 @@
1
- import{r as e}from"./rolldown-runtime-hePW80VL.js";import{i as t,t as n}from"./react-CR5VJ85Q.js";import{G as r,V as i,q as a}from"./vendor-xNCj9Gc_.js";import{$ as o,A as s,At as c,B as l,C as u,Ct as d,D as f,Dt as p,E as m,Et as ee,F as te,Ft as ne,H as re,I as ie,It as ae,J as oe,K as se,L as ce,Lt as le,M as h,Mt as g,N as _,Nt as v,O as y,Ot as b,P as x,Pt as S,Q as C,R as w,S as T,St as E,T as D,U as O,V as k,W as A,X as j,Y as M,Z as N,_ as P,_t as F,a as I,at as L,b as R,bt as z,c as B,ct as V,d as H,dt as U,et as W,f as ue,ft as de,g as fe,gt as pe,h as me,ht as G,i as he,it as ge,j as _e,jt as ve,k as K,kt as ye,l as be,lt as q,m as xe,mt as Se,n as Ce,nt as we,o as Te,ot as Ee,p as De,pt as Oe,q as ke,r as Ae,rt as J,s as je,st as Me,t as Ne,tt as Pe,u as Fe,ut as Ie,v as Le,vt as Re,w as ze,wt as Y,x as Be,xt as Ve,y as He,yt as Ue,z as We}from"./app-b2Amc-iC.js";import{n as Ge}from"./preload-helper-SYSsmQ2O.js";import{t as X}from"./cn-Bi0ZEjD9.js";var Ke=e=>new Date(Date.parse(`${e}T00:00:00Z`)-864e5).toISOString().slice(0,10),qe=(e,t,n=Y())=>d(Date.parse(e),n)===d(Date.parse(t),n),Je=(e,t=Date.now(),n=Y())=>{let r=d(Date.parse(e),n),i=d(t,n);return r===i?K(`today`):r===Ke(i)?K(`yesterday`):E(Date.parse(`${r}T00:00:00Z`))},Z=e(n(),1),Ye=({tone:e=`day`,label:t})=>{let n=t??K(`newMessages`),r=X(`h-px flex-1`,e===`new`?`bg-danger`:`bg-border`);return(0,Z.jsxs)(`div`,{role:`separator`,"aria-label":n,"data-tone":e,"data-chat-divider":``,className:`flex items-center gap-3 text-xs font-medium`,children:[(0,Z.jsx)(`span`,{className:r}),(0,Z.jsx)(`span`,{className:e===`new`?`text-danger`:`text-muted-foreground`,children:n}),(0,Z.jsx)(`span`,{className:r})]})},Q=({row:e,resource:t,recordKey:n,...r})=>{let i=ke(),a=J(),o=t??i?.resource??a?.model.name;if(o===void 0)throw Error(`RecordLink needs a resource outside a list display or a record`);return(0,Z.jsx)(G,{to:{kind:`record`,resource:o,key:e?e.key:n},...r})},$=e(t(),1),Xe=e=>{if(e?.kind!==`signed-in`)return;let{id:t,name:n}=e.user;return{id:t,...n&&{name:n}}},Ze=()=>{let e=le()?.state;return(0,$.useMemo)(()=>Xe(e),[e])},Qe={width:640,height:480},$e=e=>e.flatMap(e=>{if(`src`in e)return[{image:{url:e.src},alt:e.alt}];let t=F(e,Qe);return t?[{image:t,alt:e.alt??``}]:[]}),et=({images:e,label:t,fit:n=`cover`,swipe:r=!0,className:i})=>{let a=$e(e),o=oe(a.length);return(0,Z.jsxs)(`div`,{role:`group`,"aria-roledescription":`carousel`,"aria-label":t,className:X(`group/carousel relative overflow-hidden`,i),children:[(0,Z.jsx)(M,{"data-carousel-track":!0,carousel:o,swipe:r,slides:a.map(({image:e,alt:t})=>(0,Z.jsx)(Me,{image:e,alt:t,loading:`lazy`,className:X(`size-full`,n===`cover`?`object-cover`:`object-contain`)}))}),(0,Z.jsx)(j,{carousel:o,count:a.length,swipe:r,reveal:`group-hover/carousel:opacity-100`,className:`inset-0`})]})},tt=({name:e,label:t,options:n,value:r,onChange:i})=>(0,Z.jsx)(`div`,{role:`radiogroup`,"aria-label":t,className:`flex flex-col gap-2`,children:n.map(t=>(0,Z.jsxs)(`label`,{className:X(`block rounded-lg border p-3 transition-colors has-[:focus-visible]:outline-2 has-[:focus-visible]:outline-offset-2 has-[:focus-visible]:outline-primary`,t.disabled?`cursor-default bg-background opacity-60`:t.value===r?`cursor-pointer border-primary bg-primary-soft`:`cursor-pointer bg-background hover:bg-surface`),children:[(0,Z.jsx)(`input`,{type:`radio`,name:e,value:t.value,checked:t.value===r,disabled:t.disabled,onChange:()=>i(t.value),className:`sr-only`}),(0,Z.jsx)(`span`,{className:X(`block font-medium`,t.value===r&&`text-primary-text`),children:t.label}),t.description&&(0,Z.jsx)(`span`,{className:`mt-0.5 block text-xs leading-snug text-muted-foreground`,children:t.description})]},t.value))}),nt=(e,t,n)=>{let s=S(),c=a(),l=[...new Set(n)].sort();return i({queryKey:ae.pickedLabels(e.name,l.join(`,`)),enabled:l.length>0,placeholderData:r,queryFn:()=>o(c,s,e,l,t)}).data??new Map},rt=e=>{let{resources:t,views:n}=c(),r=t[e.resource];if(!r)throw Error(`RecordPicker: the app has no resource named "${e.resource}"`);if(r.primaryKey.length!==1)throw Error(`RecordPicker: "${e.resource}" has a composite key, which a picker cannot name`);let i=n[e.resource],a=e.multiple?e.value:e.value===void 0?[]:[e.value],[o,s]=(0,$.useState)({}),l=nt(r,i,a),u=e=>o[e]??l.get(e)??e,d=(e,t)=>s(n=>({...n,[e]:t}));if(!e.multiple){let{value:t,onChange:n}=e;return(0,Z.jsx)(q,{target:r,view:i,value:t??``,label:t===void 0?void 0:u(t),invalid:e.invalid,onChange:(e,t)=>{d(e,t),n(e)}})}let{value:f,onChange:p}=e;return(0,Z.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,Z.jsx)(q,{target:r,view:i,value:``,chosen:f,several:!0,invalid:e.invalid,onChange:(e,t)=>{d(e,t),p(f.includes(e)?f.filter(t=>t!==e):[...f,e])}}),f.length>0&&(0,Z.jsx)(`div`,{className:`flex flex-wrap gap-1`,children:f.map(e=>(0,Z.jsx)(Ee,{label:u(e),onRemove:()=>p(f.filter(t=>t!==e))},e))})]})};export{R as ActionCard,ge as ActionInputError,v as ApiProvider,Ne as App,G as AppLink,H as AssistantDock,O as AuthLayout,b as Button,et as Carousel,Ye as ChatDivider,y as ChatMessage,f as ChatThread,tt as Choices,ce as CodeForm,Le as CompactTable,T as Composer,p as Dialog,me as DiffView,Ue as Field,He as FieldList,B as Form,z as Input,C as LogoMark,L as Markdown,ze as MentionBox,u as MentionedText,A as MenuSelect,V as OtpInput,De as PartView,Q as RecordLink,rt as RecordPicker,w as ResendCodeButton,ee as ResponsiveDialog,Re as Section,Ge as Segmented,Be as SidePanel,N as SignInPrompt,ve as Spinner,xe as StepList,Se as Textarea,We as allowDelayMs,ye as buttonClass,Je as chatDayLabel,Ie as definePlugin,U as defineUi,fe as diffStats,D as emptyDraft,Ce as isConflict,l as isFramed,m as mentionedIds,te as mergeUi,P as parseDiff,h as pluginApi,_ as protobaseVersion,qe as sameChatDay,ie as uiFromModule,_e as useApiToken,pe as useAppAddress,k as useArmedAfterFocus,Fe as useAssistant,be as useAssistantClient,ue as useBackendData,S as useClient,W as useFacets,Ve as useFieldControl,re as useGuardedPress,Pe as useHistogram,he as useInbox,J as useLayoutRecord,Oe as useList,se as useListDisplay,I as useMarkNotificationsRead,de as useMembers,g as useMeta,x as usePlugin,je as usePushNotifications,s as useRecord,ne as useResourceClient,we as useSeries,Ze as useSignedInUser,Te as useUnreadNotifications,Ae as useUpdateRecord};
2
- //# debugId=903f1306-acce-4d5b-aab4-209b413681ad