@protobase/ui 0.53.3 → 0.53.5

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 (55) hide show
  1. package/dist/app/change-confirm/asks-to-confirm.js +10 -0
  2. package/dist/app/change-confirm/messages.js +16 -0
  3. package/dist/app/change-confirm/use-change-confirm.js +51 -0
  4. package/dist/app/comments/comment-body.js +5 -8
  5. package/dist/app/comments/comment-composer.js +29 -114
  6. package/dist/app/comments/messages.js +0 -4
  7. package/dist/app/field-editor.js +15 -6
  8. package/dist/app/list-edit/cell-field-editor.js +3 -1
  9. package/dist/app/list-page.js +1 -0
  10. package/dist/app-shell/page-header.js +34 -10
  11. package/dist/chat/chat-day.d.ts +6 -0
  12. package/dist/chat/chat-day.js +17 -0
  13. package/dist/chat/chat-divider.d.ts +15 -0
  14. package/dist/chat/chat-divider.js +25 -0
  15. package/dist/chat/chat-message.d.ts +26 -4
  16. package/dist/chat/chat-message.js +65 -5
  17. package/dist/chat/chat-thread.d.ts +13 -3
  18. package/dist/chat/chat-thread.js +85 -16
  19. package/dist/chat/composer.d.ts +12 -4
  20. package/dist/chat/composer.js +30 -15
  21. package/dist/chat/index.d.ts +4 -2
  22. package/dist/chat/messages.js +10 -2
  23. package/dist/chat/thread-scroll.js +15 -0
  24. package/dist/data/query-keys.js +0 -7
  25. package/dist/index.d.ts +10 -3
  26. package/dist/index.js +6 -1
  27. package/dist/mentions/index.d.ts +5 -0
  28. package/dist/mentions/mention-box.d.ts +27 -0
  29. package/dist/mentions/mention-box.js +125 -0
  30. package/dist/mentions/mention-text.d.ts +9 -0
  31. package/dist/{app/comments → mentions}/mention-text.js +1 -1
  32. package/dist/mentions/mentioned-text.d.ts +9 -0
  33. package/dist/mentions/mentioned-text.js +13 -0
  34. package/dist/mentions/messages.js +16 -0
  35. package/dist/mentions/people-list.js +26 -0
  36. package/dist/mentions/use-people-search.d.ts +5 -0
  37. package/dist/mentions/use-people-search.js +26 -0
  38. package/dist/package.js +1 -1
  39. package/dist/shell/assets/app-Bro4-Qj6.js +9 -0
  40. package/dist/shell/assets/{index-CymocR26.css → index-BX1N2n2W.css} +1 -1
  41. package/dist/shell/assets/{index-DuPd6UFq.js → index-vxLWACI4.js} +2 -2
  42. package/dist/shell/assets/{records-map-D74AlE1K.js → records-map-HVtj4Vna.js} +2 -2
  43. package/dist/shell/assets/shared-protobase-ui-BXqStot-.js +2 -0
  44. package/dist/shell/index.html +4 -4
  45. package/dist/shell/protobase.shell.json +1 -1
  46. package/dist/shell/protobase.sw.js +2 -2
  47. package/dist/shell-source-maps/assets/app-Bro4-Qj6.js.map +1 -0
  48. package/dist/shell-source-maps/assets/{index-DuPd6UFq.js.map → index-vxLWACI4.js.map} +1 -1
  49. package/dist/shell-source-maps/assets/{records-map-D74AlE1K.js.map → records-map-HVtj4Vna.js.map} +1 -1
  50. package/dist/shell-source-maps/assets/{shared-protobase-ui-DyYG0cfq.js.map → shared-protobase-ui-BXqStot-.js.map} +1 -1
  51. package/package.json +4 -4
  52. package/dist/app/comments/use-mentionable.js +0 -18
  53. package/dist/shell/assets/app-BgvLGqeW.js +0 -9
  54. package/dist/shell/assets/shared-protobase-ui-DyYG0cfq.js +0 -2
  55. package/dist/shell-source-maps/assets/app-BgvLGqeW.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,C as c,Ct as l,D as u,Dt as d,E as f,Et as p,F as ee,G as te,H as ne,I as re,J as ie,K as ae,L as m,M as h,N as g,O as _,P as v,Q as y,R as b,S as x,St as S,T as C,Tt as w,U as T,V as E,W as D,X as O,Y as k,Z as A,_ as j,_t as M,a as N,at as P,b as F,bt as I,c as L,ct as R,d as z,dt as B,et as V,f as H,ft as U,g as W,h as G,ht as K,i as q,it as J,j as oe,k as se,l as ce,lt as Y,m as le,mt as ue,n as de,nt as fe,o as pe,ot as X,p as me,pt as he,q as ge,r as _e,rt as ve,s as ye,st as be,t as xe,tt as Se,u as Ce,ut as we,v as Te,vt as Ee,w as De,wt as Oe,x as ke,xt as Ae,y as je,yt as Me,z as Ne}from"./app-BgvLGqeW.js";import{n as Pe}from"./preload-helper-SYSsmQ2O.js";import{t as Z}from"./cn-Bi0ZEjD9.js";var Q=e(n(),1),$=({row:e,resource:t,recordKey:n,...r})=>{let i=ne(),a=o(),s=t??i?.resource??a?.model.name;if(s===void 0)throw Error(`RecordLink needs a resource outside a list display or a record`);return(0,Q.jsx)(Y,{to:{kind:`record`,resource:s,key:e?e.key:n},...r})},Fe={width:640,height:480},Ie=e=>e.flatMap(e=>{if(`src`in e)return[{image:{url:e.src},alt:e.alt}];let t=B(e,Fe);return t?[{image:t,alt:e.alt??``}]:[]}),Le=({images:e,label:t,fit:n=`cover`,swipe:r=!0,className:i})=>{let a=Ie(e),o=T(a.length);return(0,Q.jsxs)(`div`,{role:`group`,"aria-roledescription":`carousel`,"aria-label":t,className:Z(`group/carousel relative overflow-hidden`,i),children:[(0,Q.jsx)(D,{"data-carousel-track":!0,carousel:o,swipe:r,slides:a.map(({image:e,alt:t})=>(0,Q.jsx)(J,{image:e,alt:t,loading:`lazy`,className:Z(`size-full`,n===`cover`?`object-cover`:`object-contain`)}))}),(0,Q.jsx)(te,{carousel:o,count:a.length,swipe:r,reveal:`group-hover/carousel:opacity-100`,className:`inset-0`})]})},Re=({name:e,label:t,options:n,value:r,onChange:i})=>(0,Q.jsx)(`div`,{role:`radiogroup`,"aria-label":t,className:`flex flex-col gap-2`,children:n.map(t=>(0,Q.jsxs)(`label`,{className:Z(`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,Q.jsx)(`input`,{type:`radio`,name:e,value:t.value,checked:t.value===r,disabled:t.disabled,onChange:()=>i(t.value),className:`sr-only`}),(0,Q.jsx)(`span`,{className:Z(`block font-medium`,t.value===r&&`text-primary-text`),children:t.label}),t.description&&(0,Q.jsx)(`span`,{className:`mt-0.5 block text-xs leading-snug text-muted-foreground`,children:t.description})]},t.value))}),ze=(e,t,n)=>{let o=w(),s=a(),c=[...new Set(n)].sort();return i({queryKey:d.pickedLabels(e.name,c.join(`,`)),enabled:c.length>0,placeholderData:r,queryFn:()=>k(s,o,e,c,t)}).data??new Map},Be=e(t(),1),Ve=e=>{let{resources:t,views:n}=Ae(),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,Be.useState)({}),c=ze(r,i,a),l=e=>o[e]??c.get(e)??e,u=(e,t)=>s(n=>({...n,[e]:t}));if(!e.multiple){let{value:t,onChange:n}=e;return(0,Q.jsx)(X,{target:r,view:i,value:t??``,label:t===void 0?void 0:l(t),invalid:e.invalid,onChange:(e,t)=>{u(e,t),n(e)}})}let{value:d,onChange:f}=e;return(0,Q.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,Q.jsx)(X,{target:r,view:i,value:``,chosen:d,several:!0,invalid:e.invalid,onChange:(e,t)=>{u(e,t),f(d.includes(e)?d.filter(t=>t!==e):[...d,e])}}),d.length>0&&(0,Q.jsx)(`div`,{className:`flex flex-wrap gap-1`,children:d.map(e=>(0,Q.jsx)(ge,{label:l(e),onRemove:()=>f(d.filter(t=>t!==e))},e))})]})};export{F as ActionCard,V as ActionInputError,Oe as ApiProvider,xe as App,Y as AppLink,z as AssistantDock,b as AuthLayout,Me as Button,Le as Carousel,De as ChatMessage,c as ChatThread,Re as Choices,h as CodeForm,Te as CompactTable,x as Composer,Ee as Dialog,G as DiffView,he as Field,je as FieldList,L as Form,ue as Input,ie as LogoMark,Se as Markdown,Ne as MenuSelect,P as OtpInput,me as PartView,$ as RecordLink,Ve as RecordPicker,g as ResendCodeButton,M as ResponsiveDialog,U as Section,Pe as Segmented,ke as SidePanel,ae as SignInPrompt,S as Spinner,le as StepList,R as Textarea,v as allowDelayMs,I as buttonClass,fe as definePlugin,ve as defineUi,W as diffStats,de as isConflict,ee as isFramed,s as mergeUi,j as parseDiff,u as pluginApi,_ as protobaseVersion,oe as uiFromModule,f as useApiToken,we as useAppAddress,re as useArmedAfterFocus,Ce as useAssistant,ce as useAssistantClient,H as useBackendData,w as useClient,O as useFacets,K as useFieldControl,m as useGuardedPress,A as useHistogram,q as useInbox,o as useLayoutRecord,be as useList,E as useListDisplay,N as useMarkNotificationsRead,l as useMeta,se as usePlugin,ye as usePushNotifications,C as useRecord,p as useResourceClient,y as useSeries,pe as useUnreadNotifications,_e as useUpdateRecord};
2
- //# debugId=f2606d1c-7ea7-4ab9-b62f-14f64aeca985