@protobase/ui 0.46.7 → 0.46.9

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 (27) hide show
  1. package/dist/account/change-email-dialog.js +1 -1
  2. package/dist/account/two-factor-setup.js +1 -1
  3. package/dist/app/confirm-sign-in-messages.js +22 -0
  4. package/dist/app/confirm-sign-in.js +88 -0
  5. package/dist/app/sensitive-field.js +10 -2
  6. package/dist/auth/auth-messages.js +6 -3
  7. package/dist/auth/auth-provider.js +3 -1
  8. package/dist/auth/code-form.js +1 -1
  9. package/dist/auth/reset-password-page.js +2 -1
  10. package/dist/auth/two-factor-form.js +1 -1
  11. package/dist/index.js +1 -1
  12. package/dist/package.js +1 -1
  13. package/dist/shell/assets/app-axeIZ-10.js +9 -0
  14. package/dist/shell/assets/{index-Cjh9OH3F.js → index-1Ue_dZiA.js} +2 -2
  15. package/dist/shell/assets/{records-map-DFiu2MjE.js → records-map-DPA8Y3C8.js} +2 -2
  16. package/dist/shell/assets/shared-protobase-ui-dWIf89ff.js +2 -0
  17. package/dist/shell/index.html +3 -3
  18. package/dist/shell/protobase.shell.json +1 -1
  19. package/dist/shell/protobase.sw.js +2 -2
  20. package/dist/shell-source-maps/assets/app-axeIZ-10.js.map +1 -0
  21. package/dist/shell-source-maps/assets/{index-Cjh9OH3F.js.map → index-1Ue_dZiA.js.map} +1 -1
  22. package/dist/shell-source-maps/assets/{records-map-DFiu2MjE.js.map → records-map-DPA8Y3C8.js.map} +1 -1
  23. package/dist/shell-source-maps/assets/{shared-protobase-ui-CLCawVYs.js.map → shared-protobase-ui-dWIf89ff.js.map} +1 -1
  24. package/package.json +4 -4
  25. package/dist/shell/assets/app-BClUNT0O.js +0 -9
  26. package/dist/shell/assets/shared-protobase-ui-CLCawVYs.js +0 -2
  27. package/dist/shell-source-maps/assets/app-BClUNT0O.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-BzlIWwX2.js";import{$ as o,A as s,B as c,C as l,Ct as u,D as d,Dt as f,E as p,Et as m,F as ee,G as te,H as ne,I as re,J as ie,K as ae,L as h,M as g,N as _,O as v,P as y,Q as b,R as x,S,St as C,T as w,Tt as T,U 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-BClUNT0O.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=E(),a=V(),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,Q.jsx)(Y,{to:{kind:`record`,resource:o,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=D(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)(te,{"data-carousel-track":!0,carousel:o,swipe:r,slides:a.map(({image:e,alt:t})=>(0,Q.jsx)(P,{image:e,alt:t,loading:`lazy`,className:Z(`size-full`,n===`cover`?`object-cover`:`object-contain`)}))}),(0,Q.jsx)(ae,{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=T(),s=a(),c=[...new Set(n)].sort();return i({queryKey:f.pickedLabels(e.name,c.join(`,`)),enabled:c.length>0,placeholderData:r,queryFn:()=>O(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)(ie,{label:l(e),onRemove:()=>f(d.filter(t=>t!==e))},e))})]})};export{F as ActionCard,Se as ActionInputError,Oe as ApiProvider,xe as App,Y as AppLink,z as AssistantDock,Ne as AuthLayout,Me as Button,Le as Carousel,De as ChatMessage,l as ChatThread,Re as Choices,g as CodeForm,Te as CompactTable,S as Composer,Ee as Dialog,G as DiffView,he as Field,je as FieldList,L as Form,ue as Input,k as LogoMark,fe as Markdown,c as MenuSelect,x as OtpInput,me as PartView,$ as RecordLink,Ve as RecordPicker,_ as ResendCodeButton,M as ResponsiveDialog,U as Section,Pe as Segmented,ke as SidePanel,ge as SignInPrompt,C as Spinner,le as StepList,R as Textarea,y as allowDelayMs,I as buttonClass,ve as definePlugin,J as defineUi,W as diffStats,de as isConflict,ee as isFramed,s as mergeUi,j as parseDiff,d as pluginApi,v as protobaseVersion,oe as uiFromModule,p as useApiToken,we as useAppAddress,re as useArmedAfterFocus,Ce as useAssistant,ce as useAssistantClient,H as useBackendData,T as useClient,A as useFacets,K as useFieldControl,h as useGuardedPress,b as useHistogram,q as useInbox,V as useLayoutRecord,be as useList,ne as useListDisplay,N as useMarkNotificationsRead,u as useMeta,se as usePlugin,ye as usePushNotifications,w as useRecord,m as useResourceClient,o as useSeries,pe as useUnreadNotifications,_e as useUpdateRecord};
2
- //# debugId=8b09ac15-62cd-440b-b8a5-2a1b09d44f9c