@protobase/ui 0.25.3 → 0.25.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.
- package/dist/account/account-section.js +1 -1
- package/dist/account/password-dialog.js +1 -1
- package/dist/account/sign-in-policy-form.js +3 -3
- package/dist/account/two-factor-setup.js +1 -1
- package/dist/action-card/field-list.js +1 -1
- package/dist/app/displays/board-column.js +1 -1
- package/dist/app/displays/board-display.js +6 -7
- package/dist/app/displays/board-place.js +24 -11
- package/dist/app/displays/timeline-row.js +1 -1
- package/dist/app/displays/use-board-move.js +55 -19
- package/dist/app/error-banner.js +1 -1
- package/dist/app/export/export-dialog.js +3 -3
- package/dist/app/hand-order/hand-sorted-list.js +2 -1
- package/dist/app/hand-order/use-hand-order.js +19 -5
- package/dist/app/import/import-check-step.js +2 -2
- package/dist/app/named-icon.js +3 -2
- package/dist/app/pages/blocks/field.js +1 -1
- package/dist/app/pages/blocks/progress.js +1 -1
- package/dist/app/rank-after/dependency-rule.js +17 -0
- package/dist/app/rank-after/messages.js +8 -0
- package/dist/app/rank-after/rank-bounds.js +54 -0
- package/dist/app/rank-after/ranked-place.js +45 -0
- package/dist/app/staff-banner.js +1 -1
- package/dist/app-shell/sidebar-group.js +1 -1
- package/dist/app-shell/sidebar-item.js +1 -1
- package/dist/app-shell/sidebar.js +1 -1
- package/dist/assistant-dock/assistant-dock.js +1 -1
- package/dist/auth/code-form.js +2 -2
- package/dist/auth/forgot-password-form.js +1 -1
- package/dist/auth/reset-password-form.js +1 -1
- package/dist/auth/setup-required-form.js +1 -1
- package/dist/auth/sign-in-form.js +3 -3
- package/dist/auth/sign-up-details-form.js +1 -1
- package/dist/auth/sign-up-email-form.js +1 -1
- package/dist/auth/staff-sign-in-form.js +2 -2
- package/dist/auth/two-factor-form.js +2 -2
- package/dist/data-grid/grid-header.js +1 -1
- package/dist/filter-panel/date-presets.js +1 -1
- package/dist/forms/public-form-page.js +1 -1
- package/dist/organizations/invitation-page.js +2 -2
- package/dist/organizations/members-page.js +1 -1
- package/dist/package.js +1 -1
- package/dist/primitives/button.js +1 -1
- package/dist/primitives/segmented.js +1 -1
- package/dist/record-view/field.js +2 -2
- package/dist/shell/assets/app-pH0OC9QP.js +69 -0
- package/dist/shell/assets/{index-B7cIjCuz.js → index-BPi_cyLV.js} +1 -1
- package/dist/shell/assets/{index-BRkDA5KD.css → index-Bkc7w8I4.css} +1 -1
- package/dist/shell/assets/{maplibre-CVG5L9FD.js → maplibre-DUTS_eJM.js} +1 -1
- package/dist/shell/assets/{preload-helper-BX9CcZkY.js → preload-helper-BZ3hrQDD.js} +1 -1
- package/dist/shell/assets/{record-map-Cw3_NcUl.js → record-map-DFy7sJEU.js} +1 -1
- package/dist/shell/assets/{records-map-D4f3ZeDL.js → records-map-EQVZhkY9.js} +1 -1
- package/dist/shell/assets/{shared-protobase-ui-CB_i50NP.js → shared-protobase-ui-BrUtMzdS.js} +1 -1
- package/dist/shell/index.html +5 -5
- package/dist/shell/protobase.shell.json +1 -1
- package/dist/shell/protobase.sw.js +2 -2
- package/package.json +4 -4
- package/dist/shell/assets/app-CW3U56yM.js +0 -69
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-hePW80VL.js";import{t}from"./react-Cvdyeg_0.js";import{t as n}from"./cn-Bi0ZEjD9.js";import{t as r}from"./jsx-runtime-NZYk81nU.js";var i=[`en`,`nl`],a=e=>i.includes(e),o=e=>e.map(e=>e.split(`-`)[0].toLowerCase()).find(a)??`en`,s=e(t(),1),c=`en`,l,u=()=>l??c,d=e=>{c=e},f=e=>{l=e},p=(e=globalThis.navigator?.languages??[])=>o(e),m={en:`en-GB`,nl:`nl-NL`},h=()=>m[u()],g=e=>e?.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase();function _(e,t,n=[]){if(t==null)throw Error(`[lucide]: iconNode is required when icon name is used`);return{name:g(e),size:24,node:t,...n.length>0?{aliases:n}:{}}}var v=e=>{let t=``,n=!1;for(let r of e){if(r===`-`||r===`_`||r<=` `){n=t.length>0;continue}t.length===0?t+=r.toLowerCase():t+=n?r.toUpperCase():r,n=!1}return t},y=e=>{let t=v(e);return t.charAt(0).toUpperCase()+t.slice(1)},b=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),x={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":2,"stroke-linecap":`round`,"stroke-linejoin":`round`};function S(e){return e!=null}function C(e,t={}){let n=t.attributeNames??{},r=e=>n[e]??e,i=e.size??e.width??x.width,a=e.size??e.height??x.height,o=e.aliases?.filter(e=>typeof e==`string`&&e.trim()!==``).map(e=>`lucide-${e}`)??[],s=[...e.name?[`lucide-${e.name}`]:[],...o],c=t.className?.split(` `).filter(Boolean)??[],l=t.includeDefaultClasses===!1?b(...c):b(`lucide`,...s,...c),u=t.absoluteStrokeWidth?Number(t.strokeWidth??x[`stroke-width`])*Number(e.size??e.width??x.width)/Number(t.size??t.width??x.width):t.strokeWidth??x[`stroke-width`];return[`svg`,{...Object.entries(x).reduce((e,[t,n])=>(e[r(t)]=n,e),{}),...`color`in t&&t.color&&{[r(`stroke`)]:t.color},...`size`in t&&S(t.size)&&{[r(`width`)]:t.size,[r(`height`)]:t.size},...`width`in t&&S(t.width)&&{[r(`width`)]:t.width},...`height`in t&&S(t.height)&&{[r(`height`)]:t.height},[r(`stroke-width`)]:u,...l&&{[r(`class`)]:l},[r(`viewBox`)]:`0 0 ${i} ${a}`,...t.hasA11yProp===!1?{[r(`aria-hidden`)]:`true`}:{},...`attributes`in t&&t.attributes},e.node.map(e=>{let[n,i,a]=e,o=t.nonScalingStroke?{[r(`vector-effect`)]:`non-scaling-stroke`,...i}:i;return a?[n,o,a]:[n,o]})]}function w(e,t={}){return C(e,{...t,attributeNames:{...t.attributeNames,class:`className`,"stroke-width":`strokeWidth`,"stroke-linecap":`strokeLinecap`,"stroke-linejoin":`strokeLinejoin`,"vector-effect":`vectorEffect`}})}var T=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},E=(0,s.createContext)({}),D=()=>(0,s.useContext)(E),O=(0,s.forwardRef)(({color:e,size:t,width:n,height:r,strokeWidth:i,absoluteStrokeWidth:a,nonScalingStroke:o,className:c=``,children:l,iconNode:u=[],icon:d={node:u,aliases:[],size:24},...f},p)=>{let{size:m=24,strokeWidth:h=2,absoluteStrokeWidth:g=!1,nonScalingStroke:_=!1,color:v=`currentColor`,className:y=``}=D()??{},x=!!l||T(f),[S,C,E=[]]=w(d,{color:e??v,width:n??t??m,height:r??t??m,strokeWidth:i??h,absoluteStrokeWidth:a??g,nonScalingStroke:o??_,className:b(y,c),hasA11yProp:x,attributes:f});return(0,s.createElement)(S,{ref:p,...C},[...E.map(([e,t])=>(0,s.createElement)(e,t)),...Array.isArray(l)?l:[l]])});function k(e,t=[],n=[]){let r=typeof e==`string`?_(e,t,n):e,i=(0,s.forwardRef)(({className:e,...t},n)=>(0,s.createElement)(O,{ref:n,icon:r,className:e,...t}));return r.name&&(i.displayName=y(r.name)),i}var A=e=>(t,...n)=>{let r=e[u()][t];return typeof r==`function`?r(...n):r},j=e(r(),1),M={sm:{group:`h-7`,option:`px-2.5 text-
|
|
1
|
+
import{r as e}from"./rolldown-runtime-hePW80VL.js";import{t}from"./react-Cvdyeg_0.js";import{t as n}from"./cn-Bi0ZEjD9.js";import{t as r}from"./jsx-runtime-NZYk81nU.js";var i=[`en`,`nl`],a=e=>i.includes(e),o=e=>e.map(e=>e.split(`-`)[0].toLowerCase()).find(a)??`en`,s=e(t(),1),c=`en`,l,u=()=>l??c,d=e=>{c=e},f=e=>{l=e},p=(e=globalThis.navigator?.languages??[])=>o(e),m={en:`en-GB`,nl:`nl-NL`},h=()=>m[u()],g=e=>e?.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase();function _(e,t,n=[]){if(t==null)throw Error(`[lucide]: iconNode is required when icon name is used`);return{name:g(e),size:24,node:t,...n.length>0?{aliases:n}:{}}}var v=e=>{let t=``,n=!1;for(let r of e){if(r===`-`||r===`_`||r<=` `){n=t.length>0;continue}t.length===0?t+=r.toLowerCase():t+=n?r.toUpperCase():r,n=!1}return t},y=e=>{let t=v(e);return t.charAt(0).toUpperCase()+t.slice(1)},b=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),x={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":2,"stroke-linecap":`round`,"stroke-linejoin":`round`};function S(e){return e!=null}function C(e,t={}){let n=t.attributeNames??{},r=e=>n[e]??e,i=e.size??e.width??x.width,a=e.size??e.height??x.height,o=e.aliases?.filter(e=>typeof e==`string`&&e.trim()!==``).map(e=>`lucide-${e}`)??[],s=[...e.name?[`lucide-${e.name}`]:[],...o],c=t.className?.split(` `).filter(Boolean)??[],l=t.includeDefaultClasses===!1?b(...c):b(`lucide`,...s,...c),u=t.absoluteStrokeWidth?Number(t.strokeWidth??x[`stroke-width`])*Number(e.size??e.width??x.width)/Number(t.size??t.width??x.width):t.strokeWidth??x[`stroke-width`];return[`svg`,{...Object.entries(x).reduce((e,[t,n])=>(e[r(t)]=n,e),{}),...`color`in t&&t.color&&{[r(`stroke`)]:t.color},...`size`in t&&S(t.size)&&{[r(`width`)]:t.size,[r(`height`)]:t.size},...`width`in t&&S(t.width)&&{[r(`width`)]:t.width},...`height`in t&&S(t.height)&&{[r(`height`)]:t.height},[r(`stroke-width`)]:u,...l&&{[r(`class`)]:l},[r(`viewBox`)]:`0 0 ${i} ${a}`,...t.hasA11yProp===!1?{[r(`aria-hidden`)]:`true`}:{},...`attributes`in t&&t.attributes},e.node.map(e=>{let[n,i,a]=e,o=t.nonScalingStroke?{[r(`vector-effect`)]:`non-scaling-stroke`,...i}:i;return a?[n,o,a]:[n,o]})]}function w(e,t={}){return C(e,{...t,attributeNames:{...t.attributeNames,class:`className`,"stroke-width":`strokeWidth`,"stroke-linecap":`strokeLinecap`,"stroke-linejoin":`strokeLinejoin`,"vector-effect":`vectorEffect`}})}var T=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},E=(0,s.createContext)({}),D=()=>(0,s.useContext)(E),O=(0,s.forwardRef)(({color:e,size:t,width:n,height:r,strokeWidth:i,absoluteStrokeWidth:a,nonScalingStroke:o,className:c=``,children:l,iconNode:u=[],icon:d={node:u,aliases:[],size:24},...f},p)=>{let{size:m=24,strokeWidth:h=2,absoluteStrokeWidth:g=!1,nonScalingStroke:_=!1,color:v=`currentColor`,className:y=``}=D()??{},x=!!l||T(f),[S,C,E=[]]=w(d,{color:e??v,width:n??t??m,height:r??t??m,strokeWidth:i??h,absoluteStrokeWidth:a??g,nonScalingStroke:o??_,className:b(y,c),hasA11yProp:x,attributes:f});return(0,s.createElement)(S,{ref:p,...C},[...E.map(([e,t])=>(0,s.createElement)(e,t)),...Array.isArray(l)?l:[l]])});function k(e,t=[],n=[]){let r=typeof e==`string`?_(e,t,n):e,i=(0,s.forwardRef)(({className:e,...t},n)=>(0,s.createElement)(O,{ref:n,icon:r,className:e,...t}));return r.name&&(i.displayName=y(r.name)),i}var A=e=>(t,...n)=>{let r=e[u()][t];return typeof r==`function`?r(...n):r},j=e(r(),1),M={sm:{group:`h-7`,option:`px-2.5 text-body`},md:{group:`h-8`,option:`px-3 text-body`}},N={group:(e=`sm`)=>n(`inline-flex`,M[e].group,`rounded-md bg-muted p-0.5`),option:(e,t=`sm`)=>n(`inline-flex items-center gap-1.5 rounded`,M[t].option,`font-medium transition-colors`,e?`bg-background text-foreground shadow-sm`:`text-muted-foreground hover:text-foreground`)},P=({value:e,options:t,onChange:n,label:r,size:i=`sm`,iconOnly:a=!1})=>(0,j.jsx)(`span`,{role:`group`,"aria-label":r,className:N.group(i),children:t.map(t=>(0,j.jsxs)(`button`,{type:`button`,"aria-pressed":t.value===e,...a&&{"aria-label":t.label,title:t.label},onClick:()=>n(t.value),className:N.option(t.value===e,i),children:[t.icon&&(0,j.jsx)(t.icon,{className:`size-3.5`}),!a&&t.label]},t.value))}),F=(e,t)=>{try{return e()}catch(e){if(!(e instanceof DOMException))throw e;return t}},I=`modulepreload`,L=function(e){return`/`+e},R={},z=function(e){return e.pathname.endsWith(`.css`)},B=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e,i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function s(e){return import.meta.resolve?new URL(import.meta.resolve(e)):new URL(e,import.meta.url)}r=o(t.map(t=>{t=L(t,n);let r=s(t);if(r.href in R)return;R[r.href]=!0;let i=z(r);if(e===void 0){e={all:new Set,styles:new Set};let t=document.getElementsByTagName(`link`);for(let n=t.length-1;n>=0;n--){let r=t[n];e.all.add(r.href),r.rel===`stylesheet`&&e.styles.add(r.href)}}if((i?e.styles:e.all).has(r.href))return;let o=document.createElement(`link`);if(o.rel=i?`stylesheet`:I,i||(o.as=`script`),o.crossOrigin=``,o.href=r.href,a&&o.setAttribute(`nonce`,a),document.head.appendChild(o),i)return new Promise((e,t)=>{o.addEventListener(`load`,e),o.addEventListener(`error`,()=>t(Error(`Unable to preload CSS for ${r}`)))})}).filter(e=>e!==void 0))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})};export{A as a,p as c,d,a as f,N as i,h as l,F as n,k as o,P as r,u as s,B as t,f as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-hePW80VL.js";import{a as t,c as n,n as r,o as i,s as a,t as o}from"./maplibre-
|
|
1
|
+
import{r as e}from"./rolldown-runtime-hePW80VL.js";import{a as t,c as n,n as r,o as i,s as a,t as o}from"./maplibre-DUTS_eJM.js";import{t as s}from"./jsx-runtime-NZYk81nU.js";var c=e(s(),1),l=({style:e,layers:s,position:l,zoom:u})=>(0,c.jsxs)(a,{mapLib:o,mapStyle:e,initialViewState:{...l,zoom:u},cooperativeGestures:!0,style:{width:`100%`,height:`100%`},children:[(0,c.jsx)(t,{showCompass:!1}),(0,c.jsx)(r,{layers:s}),(0,c.jsx)(i,{latitude:l.latitude,longitude:l.longitude,anchor:`bottom`,children:(0,c.jsx)(n,{"aria-hidden":!0,className:`size-8 fill-primary text-primary-foreground drop-shadow`,strokeWidth:1.5})})]});export{l as RecordMap};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-hePW80VL.js";import{t}from"./react-Cvdyeg_0.js";import{ft as n,o as r}from"./app-
|
|
1
|
+
import{r as e}from"./rolldown-runtime-hePW80VL.js";import{t}from"./react-Cvdyeg_0.js";import{ft as n,o as r}from"./app-pH0OC9QP.js";import{a as i,c as a,i as o,n as s,o as c,r as l,s as u,t as d}from"./maplibre-DUTS_eJM.js";import{t as f}from"./cn-Bi0ZEjD9.js";import{t as p}from"./jsx-runtime-NZYk81nU.js";var m=e(t(),1),h=512,g=85.051129,_=16,v=Array.from({length:23},(e,t)=>t),y=e=>e.type===`LineString`?e.coordinates:e.type===`MultiPolygon`?e.coordinates.flat(2):e.coordinates.flat(),b=e=>{let t=Math.max(-85.051129,Math.min(g,e))*Math.PI/180;return .5-Math.log(Math.tan(Math.PI/4+t/2))/(2*Math.PI)},x=e=>{let t=y(e),n=t.map(([e])=>e),r=t.map(([,e])=>b(e)),i=(Math.max(...n)-Math.min(...n))/360*h,a=(Math.max(...r)-Math.min(...r))*h;return Math.max(i,a)},S=(e,t)=>{let n=e.flatMap(e=>{if(!e.area)return[];let n=e.area.type===`LineString`||e.area.type===`MultiLineString`?`line`:`polygon`;return[{type:`Feature`,geometry:e.area,properties:{key:e.key,kind:n,span:x(e.area),chosen:t?.includes(e.key)??!1}}]});return{type:`FeatureCollection`,features:[...n.filter(e=>!e.properties.chosen),...n.filter(e=>e.properties.chosen)]}},C=e=>[`interpolate`,[`linear`],[`zoom`],...v.flatMap(t=>[t,[`*`,e,[`min`,1,[`max`,0,[`/`,[`-`,[`*`,[`get`,`span`],2**t],_],32]]]]])],w=e(p(),1),T=`position-area-fills`,E=[`==`,[`get`,`kind`],`polygon`],D=[`==`,[`get`,`kind`],`line`],O=(e,t)=>[`case`,[`get`,`chosen`],e,t],k=({points:e,selected:t,colors:n})=>{let r=S(e,t);if(r.features.length===0)return null;let i=[`case`,[`get`,`chosen`],n.chosen,n.area];return(0,w.jsxs)(o,{id:`position-areas`,type:`geojson`,data:r,children:[(0,w.jsx)(l,{id:T,type:`fill`,filter:E,paint:{"fill-color":i,"fill-opacity":C(O(.15,.1))}}),(0,w.jsx)(l,{id:`position-area-outlines`,type:`line`,filter:E,paint:{"line-color":i,"line-width":1.5,"line-dasharray":[3,2],"line-opacity":C(.8)}}),(0,w.jsx)(l,{id:`position-area-lines`,type:`line`,filter:D,layout:{"line-cap":`round`,"line-join":`round`},paint:{"line-color":i,"line-width":6,"line-opacity":C(O(.6,.35))}})]})},A=(e,t)=>{let n=document.createElement(`span`);n.style.color=`var(${t})`,e.append(n);let r=getComputedStyle(n).color;n.remove();let i=document.createElement(`canvas`);i.width=1,i.height=1;let a=i.getContext(`2d`,{willReadFrequently:!0});if(!a)return r;a.fillStyle=r,a.fillRect(0,0,1,1);let[o,s,c,l]=a.getImageData(0,0,1,1).data;return`rgba(${o}, ${s}, ${c}, ${l/255})`},j=28,M={padding:48,maxZoom:15,duration:0},N={padding:48,maxZoom:16,duration:300},P=32,F=()=>n(`compact`,e=>new Intl.NumberFormat(e,{notation:`compact`,maximumFractionDigits:1})),I=e=>[[e.west,e.south],[e.east,e.north]],L=({style:e,layers:t,initial:n,points:o,buckets:l,fit:p,onFitted:h,onMove:g,selected:_,covered:v,onSelect:y,onClear:b,markerLabel:x,bucketLabel:S})=>{let C=(0,m.useRef)(null),[E,D]=(0,m.useState)([]),[O,L]=(0,m.useState)(),R=new globalThis.Map(o.map(e=>[e.key,e])),z=o.map(e=>e.key).join(`,`),B=p&&JSON.stringify(p),V=()=>{let e=C.current?.getMap();e&&D(r(o.map(t=>({key:t.key,...e.project([t.longitude,t.latitude])})),j))},H=()=>{let e=C.current?.getMap();if(!e)return;let t=e.getBounds(),n=e.getCenter();g({bounds:{south:t.getSouth(),west:t.getWest(),north:t.getNorth(),east:t.getEast()},zoom:e.getZoom()},{latitude:n.lat,longitude:n.lng,zoom:e.getZoom()})},U=()=>{let e=C.current?.getMap();e&&p&&(e.fitBounds(I(p),M),h(),H())};(0,m.useEffect)(V,[z]),(0,m.useEffect)(U,[B]);let W=E.find(e=>_!==void 0&&e.keys.some(e=>_.includes(e)))?.at;return(0,m.useEffect)(()=>{let e=C.current?.getMap(),t=W===void 0?void 0:R.get(W);if(!e||!t||v===0)return;let{y:n}=e.project([t.longitude,t.latitude]),r=e.getContainer().clientHeight-v;n>P&&n<r||e.easeTo({center:[t.longitude,t.latitude],offset:[0,(P-v)/2],duration:300})},[W,v]),(0,w.jsxs)(u,{ref:C,mapLib:d,mapStyle:e,initialViewState:n??{latitude:0,longitude:0,zoom:1},style:{width:`100%`,height:`100%`},onLoad:()=>{let e=C.current.getMap().getContainer();L({area:A(e,`--primary`),chosen:A(e,`--foreground`)}),V(),p?U():H()},onZoomEnd:V,onMoveEnd:H,onClick:b,children:[(0,w.jsx)(i,{showCompass:!1}),(0,w.jsx)(s,{layers:t,below:T}),O&&(0,w.jsx)(k,{points:o,selected:_,colors:O}),l.map(e=>(0,w.jsx)(c,{latitude:e.latitude,longitude:e.longitude,anchor:`center`,children:(0,w.jsx)(`button`,{type:`button`,"aria-label":S(e.count),className:`flex size-10 cursor-pointer items-center justify-center rounded-full border-2 border-background bg-primary text-xs font-semibold text-primary-foreground tabular-nums shadow`,onClick:t=>{t.stopPropagation(),C.current?.getMap().fitBounds(I(e.bounds),N)},children:F().format(e.count)})},`${e.latitude},${e.longitude}`)),E.map(e=>{let t=R.get(e.at);if(!t)return null;let n=_!==void 0&&e.keys.some(e=>_.includes(e)),r=e.keys.every(e=>R.get(e)?.approximate);return(0,w.jsx)(c,{latitude:t.latitude,longitude:t.longitude,anchor:`bottom`,style:{zIndex:+!!n},children:(0,w.jsxs)(`button`,{type:`button`,"aria-label":x(e.keys),"aria-pressed":n,className:`relative block cursor-pointer`,onClick:t=>{t.stopPropagation(),y(e.keys)},children:[(0,w.jsx)(a,{"aria-hidden":!0,"data-approximate":r||void 0,className:f(`size-8 drop-shadow`,r?n?`fill-background text-foreground`:`fill-background text-primary`:n?`fill-foreground text-background`:`fill-primary text-primary-foreground`),strokeWidth:r?2:1.5,strokeDasharray:r?`3 2`:void 0}),e.keys.length>1&&(0,w.jsx)(`span`,{className:`absolute -right-2 -top-1 min-w-5 rounded-full border border-background bg-foreground px-1 text-center text-[11px] font-medium leading-4 text-background tabular-nums`,children:e.keys.length})]})},e.at)})]})};export{L as RecordsMap};
|
package/dist/shell/assets/{shared-protobase-ui-CB_i50NP.js → shared-protobase-ui-BrUtMzdS.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-hePW80VL.js";import{t}from"./react-Cvdyeg_0.js";import{$ as n,A as r,B as i,C as a,D as o,E as s,F as c,G as l,H as u,I as d,J as f,K as p,L as m,M as h,N as ee,O as te,P as ne,Q as re,R as g,S as _,T as v,U as y,V as b,W as x,X as S,Y as C,Z as w,_ as T,a as E,at as D,b as O,c as k,ct as A,d as j,dt as M,et as N,f as P,g as F,gt as I,h as L,ht as R,i as z,it as B,j as V,k as H,l as U,lt as ie,m as W,mt as G,n as K,nt as q,ot as J,p as Y,pt as ae,q as oe,r as se,rt as ce,s as le,st as ue,t as de,tt as fe,u as pe,ut as me,v as he,w as ge,x as X,y as _e,z as Z}from"./app-
|
|
1
|
+
import{r as e}from"./rolldown-runtime-hePW80VL.js";import{t}from"./react-Cvdyeg_0.js";import{$ as n,A as r,B as i,C as a,D as o,E as s,F as c,G as l,H as u,I as d,J as f,K as p,L as m,M as h,N as ee,O as te,P as ne,Q as re,R as g,S as _,T as v,U as y,V as b,W as x,X as S,Y as C,Z as w,_ as T,a as E,at as D,b as O,c as k,ct as A,d as j,dt as M,et as N,f as P,g as F,gt as I,h as L,ht as R,i as z,it as B,j as V,k as H,l as U,lt as ie,m as W,mt as G,n as K,nt as q,ot as J,p as Y,pt as ae,q as oe,r as se,rt as ce,s as le,st as ue,t as de,tt as fe,u as pe,ut as me,v as he,w as ge,x as X,y as _e,z as Z}from"./app-pH0OC9QP.js";import{r as ve}from"./preload-helper-BZ3hrQDD.js";import{t as Q}from"./cn-Bi0ZEjD9.js";import{t as ye}from"./jsx-runtime-NZYk81nU.js";var $=e(ye(),1),be=({row:e,resource:t,recordKey:n,...r})=>{let i=k(),a=L(),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)(Z,{to:{kind:`record`,resource:o,key:e?e.key:n},...r})},xe=({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:Q(`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:Q(`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))}),Se=(e,t,n)=>{let r=q(),i=ue(),a=[...new Set(n)].sort();return D({queryKey:B.pickedLabels(e.name,a.join(`,`)),enabled:a.length>0,placeholderData:J,queryFn:()=>j(i,r,e,a,t)}).data??new Map},Ce=e(t(),1),we=e=>{let{resources:t,views:n}=b(),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,Ce.useState)({}),c=Se(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,$.jsx)(d,{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:f,onChange:p}=e;return(0,$.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,$.jsx)(d,{target:r,view:i,value:``,chosen:f,several:!0,invalid:e.invalid,onChange:(e,t)=>{u(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)(pe,{label:l(e),onRemove:()=>p(f.filter(t=>t!==e))},e))})]})};export{H as ActionCard,F as ActionInputError,fe as ApiProvider,de as App,Z as AppLink,O as AssistantDock,N as AuthLayout,me as Button,ee as ChatMessage,h as ChatThread,xe as Choices,re as CodeForm,o as CompactTable,V as Composer,ie as Dialog,ge as DiffView,x as Field,te as FieldList,z as Form,G as Input,I as LogoMark,E as MenuSelect,A as OtpInput,_ as PartView,be as RecordLink,we as RecordPicker,n as ResendCodeButton,T as ResponsiveDialog,y as Section,ve as Segmented,r as SidePanel,U as SignInPrompt,ae as Spinner,a as StepList,g as Textarea,M as buttonClass,ne as definePlugin,c as defineUi,v as diffStats,K as isConflict,S as mergeUi,s as parseDiff,oe as pluginApi,f as protobaseVersion,w as uiFromModule,p as useApiToken,i as useAppAddress,_e as useAssistant,he as useAssistantClient,X as useBackendData,q as useClient,P as useFacets,R as useFieldControl,Y as useHistogram,L as useLayoutRecord,m as useList,le as useListDisplay,u as useMeta,C as usePlugin,l as useRecord,ce as useResourceClient,W as useSeries,se as useUpdateRecord};
|
package/dist/shell/index.html
CHANGED
|
@@ -18,17 +18,17 @@
|
|
|
18
18
|
}
|
|
19
19
|
document.documentElement.dataset.theme = stored === 'light' || stored === 'dark' ? stored : matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light'
|
|
20
20
|
</script>
|
|
21
|
-
<script type="importmap">{"imports":{"react":"/assets/shared-react-DhkZ2M4l.js","react/jsx-runtime":"/assets/shared-react-jsx-runtime-xPQrWk0g.js","react-dom":"/assets/shared-react-dom-D508a1cq.js","@protobase/ui":"/assets/shared-protobase-ui-
|
|
22
|
-
<script type="module" crossorigin src="/assets/index-
|
|
21
|
+
<script type="importmap">{"imports":{"react":"/assets/shared-react-DhkZ2M4l.js","react/jsx-runtime":"/assets/shared-react-jsx-runtime-xPQrWk0g.js","react-dom":"/assets/shared-react-dom-D508a1cq.js","@protobase/ui":"/assets/shared-protobase-ui-BrUtMzdS.js"}}</script>
|
|
22
|
+
<script type="module" crossorigin src="/assets/index-BPi_cyLV.js"></script>
|
|
23
23
|
<link rel="modulepreload" crossorigin href="/assets/rolldown-runtime-hePW80VL.js">
|
|
24
24
|
<link rel="modulepreload" crossorigin href="/assets/react-Cvdyeg_0.js">
|
|
25
25
|
<link rel="modulepreload" crossorigin href="/assets/react-dom-B-VxWsjA.js">
|
|
26
26
|
<link rel="modulepreload" crossorigin href="/assets/cn-Bi0ZEjD9.js">
|
|
27
27
|
<link rel="modulepreload" crossorigin href="/assets/jsx-runtime-NZYk81nU.js">
|
|
28
|
-
<link rel="modulepreload" crossorigin href="/assets/preload-helper-
|
|
29
|
-
<link rel="modulepreload" crossorigin href="/assets/app-
|
|
28
|
+
<link rel="modulepreload" crossorigin href="/assets/preload-helper-BZ3hrQDD.js">
|
|
29
|
+
<link rel="modulepreload" crossorigin href="/assets/app-pH0OC9QP.js">
|
|
30
30
|
<link rel="stylesheet" crossorigin href="/assets/app-GUjJKojE.css">
|
|
31
|
-
<link rel="stylesheet" crossorigin href="/assets/index-
|
|
31
|
+
<link rel="stylesheet" crossorigin href="/assets/index-Bkc7w8I4.css">
|
|
32
32
|
<link rel="stylesheet" href="/protobase.theme.css">
|
|
33
33
|
<link rel="icon" type="image/svg+xml" href="/protobase.favicon.svg">
|
|
34
34
|
</head>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const cacheName = "protobase-shell-
|
|
2
|
-
const precache = ["/index.html","/assets/shared-react-DhkZ2M4l.js","/assets/shared-react-jsx-runtime-xPQrWk0g.js","/assets/shared-react-dom-D508a1cq.js","/assets/shared-protobase-ui-
|
|
1
|
+
const cacheName = "protobase-shell-dfd51260a11932cc"
|
|
2
|
+
const precache = ["/index.html","/assets/shared-react-DhkZ2M4l.js","/assets/shared-react-jsx-runtime-xPQrWk0g.js","/assets/shared-react-dom-D508a1cq.js","/assets/shared-protobase-ui-BrUtMzdS.js","/assets/index-BPi_cyLV.js","/assets/rolldown-runtime-hePW80VL.js","/assets/react-Cvdyeg_0.js","/assets/react-dom-B-VxWsjA.js","/assets/cn-Bi0ZEjD9.js","/assets/jsx-runtime-NZYk81nU.js","/assets/preload-helper-BZ3hrQDD.js","/assets/app-pH0OC9QP.js","/assets/app-GUjJKojE.css","/assets/index-Bkc7w8I4.css","/protobase.theme.css","/protobase.favicon.svg"]
|
|
3
3
|
const revalidated = ["/protobase.theme.css","/protobase.favicon.svg"]
|
|
4
4
|
|
|
5
5
|
const fromCache = (request) =>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@protobase/ui",
|
|
3
|
-
"version": "0.25.
|
|
3
|
+
"version": "0.25.5",
|
|
4
4
|
"description": "The Protobase admin app and the React hooks and components for custom UI.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -39,9 +39,9 @@
|
|
|
39
39
|
"dependencies": {
|
|
40
40
|
"@dnd-kit/core": "^6.3.1",
|
|
41
41
|
"@dnd-kit/sortable": "^10.0.0",
|
|
42
|
-
"@protobase/client": "0.25.
|
|
43
|
-
"@protobase/layout": "0.25.
|
|
44
|
-
"@protobase/schema": "0.25.
|
|
42
|
+
"@protobase/client": "0.25.5",
|
|
43
|
+
"@protobase/layout": "0.25.5",
|
|
44
|
+
"@protobase/schema": "0.25.5",
|
|
45
45
|
"@sentry/browser": "^11.7.0",
|
|
46
46
|
"@tanstack/react-query": "^5.104.1",
|
|
47
47
|
"@tanstack/react-table": "^9.2.6",
|