@protobase/ui 0.55.2 → 0.55.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.
Files changed (48) hide show
  1. package/dist/app/create/create-page.js +11 -1
  2. package/dist/app/marks/marks-hook.d.ts +10 -0
  3. package/dist/app/nav-from-meta.js +19 -3
  4. package/dist/app/nav-recent.js +10 -1
  5. package/dist/app/pages/merge-ui.d.ts +1 -1
  6. package/dist/app/pages/merge-ui.js +3 -1
  7. package/dist/app/pages/project-ui.d.ts +4 -1
  8. package/dist/app/use-live-save.js +11 -4
  9. package/dist/app/use-nav-recent.js +10 -6
  10. package/dist/app-shell/index.d.ts +1 -1
  11. package/dist/app-shell/nav.d.ts +13 -1
  12. package/dist/app-shell/record-marks.js +18 -0
  13. package/dist/app-shell/sidebar-create-link.js +26 -0
  14. package/dist/app-shell/sidebar-group.js +15 -30
  15. package/dist/app-shell/sidebar-records.js +54 -0
  16. package/dist/app-shell/sidebar-rows.js +13 -0
  17. package/dist/app-shell/sidebar.js +11 -5
  18. package/dist/auth/auth-provider.d.ts +4 -0
  19. package/dist/auth/use-signed-in-user.d.ts +13 -0
  20. package/dist/auth/use-signed-in-user.js +22 -0
  21. package/dist/chat/chat-thread.d.ts +10 -4
  22. package/dist/chat/chat-thread.js +20 -6
  23. package/dist/chat/thread-scroll.js +4 -1
  24. package/dist/chat/use-read-to-end.js +32 -0
  25. package/dist/index.d.ts +5 -2
  26. package/dist/index.js +2 -1
  27. package/dist/notifications/bell/notification-bell.js +5 -8
  28. package/dist/notifications/bell/unread-label.js +1 -3
  29. package/dist/notifications/push/push-notifications.d.ts +1 -0
  30. package/dist/package.js +1 -1
  31. package/dist/plugins/plugin-ui.js +1 -0
  32. package/dist/primitives/count-badge.js +20 -0
  33. package/dist/shell/assets/app-NiljOxYe.js +9 -0
  34. package/dist/shell/assets/{index-CY05Rf2z.js → index-BIUTidjX.js} +2 -2
  35. package/dist/shell/assets/{records-map-DA9Zv2ST.js → records-map-BwX2z-di.js} +2 -2
  36. package/dist/shell/assets/shared-protobase-ui-BD_5D_Ot.js +2 -0
  37. package/dist/shell/index.html +3 -3
  38. package/dist/shell/protobase.shell.json +1 -1
  39. package/dist/shell/protobase.sw.js +2 -2
  40. package/dist/shell-source-maps/assets/app-NiljOxYe.js.map +1 -0
  41. package/dist/shell-source-maps/assets/{index-CY05Rf2z.js.map → index-BIUTidjX.js.map} +1 -1
  42. package/dist/shell-source-maps/assets/{records-map-DA9Zv2ST.js.map → records-map-BwX2z-di.js.map} +1 -1
  43. package/dist/shell-source-maps/assets/shared-protobase-ui-BD_5D_Ot.js.map +1 -0
  44. package/package.json +4 -4
  45. package/dist/shell/assets/app-CTbX0_B2.js +0 -9
  46. package/dist/shell/assets/shared-protobase-ui-DjAPl6MN.js +0 -2
  47. package/dist/shell-source-maps/assets/app-CTbX0_B2.js.map +0 -1
  48. package/dist/shell-source-maps/assets/shared-protobase-ui-DjAPl6MN.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,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 G,ft as le,g as ue,gt as de,h as fe,ht as K,i as pe,it as me,j as he,jt as ge,k as q,kt as _e,l as ve,lt as J,m as ye,mt as be,n as xe,nt as Se,o as Ce,ot as we,p as Te,pt as Ee,q as De,r as Oe,rt as Y,s as ke,st as Ae,t as je,tt as Me,u as Ne,ut as Pe,v as Fe,vt as Ie,w as Le,wt as X,x as Re,xt as ze,y as Be,yt as Ve,z as He}from"./app-CTbX0_B2.js";import{n as Ue}from"./preload-helper-SYSsmQ2O.js";import{t as Z}from"./cn-Bi0ZEjD9.js";var We=e=>new Date(Date.parse(`${e}T00:00:00Z`)-864e5).toISOString().slice(0,10),Ge=(e,t,n=X())=>d(Date.parse(e),n)===d(Date.parse(t),n),Q=(e,t=Date.now(),n=X())=>{let r=d(Date.parse(e),n),i=d(t,n);return r===i?q(`today`):r===We(i)?q(`yesterday`):E(Date.parse(`${r}T00:00:00Z`))},$=e(n(),1),Ke=({tone:e=`day`,label:t})=>{let n=t??q(`newMessages`),r=Z(`h-px flex-1`,e===`new`?`bg-danger`:`bg-border`);return(0,$.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,$.jsx)(`span`,{className:r}),(0,$.jsx)(`span`,{className:e===`new`?`text-danger`:`text-muted-foreground`,children:n}),(0,$.jsx)(`span`,{className:r})]})},qe=({row:e,resource:t,recordKey:n,...r})=>{let i=De(),a=Y(),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,$.jsx)(K,{to:{kind:`record`,resource:o,key:e?e.key:n},...r})},Je={width:640,height:480},Ye=e=>e.flatMap(e=>{if(`src`in e)return[{image:{url:e.src},alt:e.alt}];let t=F(e,Je);return t?[{image:t,alt:e.alt??``}]:[]}),Xe=({images:e,label:t,fit:n=`cover`,swipe:r=!0,className:i})=>{let a=Ye(e),o=oe(a.length);return(0,$.jsxs)(`div`,{role:`group`,"aria-roledescription":`carousel`,"aria-label":t,className:Z(`group/carousel relative overflow-hidden`,i),children:[(0,$.jsx)(M,{"data-carousel-track":!0,carousel:o,swipe:r,slides:a.map(({image:e,alt:t})=>(0,$.jsx)(Ae,{image:e,alt:t,loading:`lazy`,className:Z(`size-full`,n===`cover`?`object-cover`:`object-contain`)}))}),(0,$.jsx)(j,{carousel:o,count:a.length,swipe:r,reveal:`group-hover/carousel:opacity-100`,className:`inset-0`})]})},Ze=({name:e,label:t,options:n,value:r,onChange:i})=>(0,$.jsx)(`div`,{role:`radiogroup`,"aria-label":t,className:`flex flex-col gap-2`,children:n.map(t=>(0,$.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,$.jsx)(`input`,{type:`radio`,name:e,value:t.value,checked:t.value===r,disabled:t.disabled,onChange:()=>i(t.value),className:`sr-only`}),(0,$.jsx)(`span`,{className:Z(`block font-medium`,t.value===r&&`text-primary-text`),children:t.label}),t.description&&(0,$.jsx)(`span`,{className:`mt-0.5 block text-xs leading-snug text-muted-foreground`,children:t.description})]},t.value))}),Qe=(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},$e=e(t(),1),et=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,$e.useState)({}),l=Qe(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,$.jsx)(J,{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,$.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,$.jsx)(J,{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,$.jsx)(`div`,{className:`flex flex-wrap gap-1`,children:f.map(e=>(0,$.jsx)(we,{label:u(e),onRemove:()=>p(f.filter(t=>t!==e))},e))})]})};export{R as ActionCard,me as ActionInputError,v as ApiProvider,je as App,K as AppLink,H as AssistantDock,O as AuthLayout,b as Button,Xe as Carousel,Ke as ChatDivider,y as ChatMessage,f as ChatThread,Ze as Choices,ce as CodeForm,Fe as CompactTable,T as Composer,p as Dialog,fe as DiffView,Ve as Field,Be as FieldList,B as Form,z as Input,C as LogoMark,L as Markdown,Le as MentionBox,u as MentionedText,A as MenuSelect,V as OtpInput,Te as PartView,qe as RecordLink,et as RecordPicker,w as ResendCodeButton,ee as ResponsiveDialog,Ie as Section,Ue as Segmented,Re as SidePanel,N as SignInPrompt,ge as Spinner,ye as StepList,be as Textarea,He as allowDelayMs,_e as buttonClass,Q as chatDayLabel,Pe as definePlugin,U as defineUi,ue as diffStats,D as emptyDraft,xe as isConflict,l as isFramed,m as mentionedIds,te as mergeUi,P as parseDiff,h as pluginApi,_ as protobaseVersion,Ge as sameChatDay,ie as uiFromModule,he as useApiToken,de as useAppAddress,k as useArmedAfterFocus,Ne as useAssistant,ve as useAssistantClient,G as useBackendData,S as useClient,W as useFacets,ze as useFieldControl,re as useGuardedPress,Me as useHistogram,pe as useInbox,Y as useLayoutRecord,Ee as useList,se as useListDisplay,I as useMarkNotificationsRead,le as useMembers,g as useMeta,x as usePlugin,ke as usePushNotifications,s as useRecord,ne as useResourceClient,Se as useSeries,Ce as useUnreadNotifications,Oe as useUpdateRecord};
2
- //# debugId=e300f97a-30de-4a3f-9aaa-0c599e67c707