@coffer-org/web 7.3.1 → 7.4.1
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/assets/ChatWidget-BW8sd6S7.js +5 -0
- package/dist/assets/DiagnosticsPage-3Ci43gZY.js +1 -0
- package/dist/assets/{GeoMap-B1DFGu6_.js → GeoMap-BQoT3_cw.js} +1 -1
- package/dist/assets/{MarkdownEditor-CANj53YF.js → MarkdownEditor-BYwRzrYg.js} +2 -2
- package/dist/assets/NewRecordView-BMaNGbcK.js +1 -0
- package/dist/assets/PluginSettingsPage-DA7ghBJP.js +1 -0
- package/dist/assets/ScanSummary-TlkBfsiq.js +1 -0
- package/dist/assets/SettingsForm-DMvn412d.js +1 -0
- package/dist/assets/SettingsPage-CTxF2X4G.js +3 -0
- package/dist/assets/ThemeSwitcher-Dd8tYTor.js +1 -0
- package/dist/assets/auth-context-Bo2wqUzm.js +1 -0
- package/dist/assets/{data-size-BMG0D59K.js → data-size-CO-LGHbN.js} +1 -1
- package/dist/assets/{extend-yQ8zoqGc.js → extend-CHOe1AVl.js} +1 -1
- package/dist/assets/{fields-CV3RQg0Y.js → fields-Ce51pRua.js} +1 -1
- package/dist/assets/{file-text-BdYRF4MO.js → file-text-CTdt_-uv.js} +1 -1
- package/dist/assets/{ilamy-view-Bb5692yT.js → ilamy-view-CCdCZX7g.js} +2 -2
- package/dist/assets/index-2id7xr9t.css +2 -0
- package/dist/assets/index-92nqE7hd.js +22 -0
- package/dist/assets/{input-BFMNMo6y.js → input-rjfudbd0.js} +1 -1
- package/dist/assets/{list-cache-DOhsI_p2.js → list-cache-wPeWyKg1.js} +1 -1
- package/dist/assets/phone-input-Dbuvvup1.js +1 -0
- package/dist/assets/{phone-input-8QtHMHO_.js → phone-input-u4b7_wtf.js} +2 -2
- package/dist/assets/popover-DCXlclK7.js +1 -0
- package/dist/assets/{registration-BBxYynR4.js → registration-43gjHJ3X.js} +1 -1
- package/dist/assets/settings-BEzSaRjz.js +1 -0
- package/dist/assets/{shelf-Cj_pNvd-.js → shelf-DjiUBfgQ.js} +1 -1
- package/dist/assets/{src-Q4BhkNtH.js → src-B-FFwJ-G.js} +1 -1
- package/dist/assets/{src-C46sbhiF.js → src-B1LWYTOR.js} +1 -1
- package/dist/assets/{src-B2aXBzDf.js → src-B7dY0wwO.js} +2 -2
- package/dist/assets/{src-Bhz_DXRd.js → src-BDP8FIN_.js} +1 -1
- package/dist/assets/{src-DnN2GqEI.js → src-BPuTgDYD.js} +1 -1
- package/dist/assets/{src-Bl8rYgUt2.js → src-BRP-DLVM2.js} +1 -1
- package/dist/assets/src-BU56fYCH2.js +1 -0
- package/dist/assets/src-B_6cwa-v.js +1 -0
- package/dist/assets/{src-qJ0szNVM.js → src-BmgYgIDb.js} +1 -1
- package/dist/assets/{src-DgQcfYnz.js → src-BpG7q6Ng.js} +1 -1
- package/dist/assets/{src-BrHtOaqX.js → src-C06O0ceD.js} +1 -1
- package/dist/assets/src-CCeQIMl_.js +1 -0
- package/dist/assets/{src-BHz-TcxU.js → src-CXEKm9OW.js} +1 -1
- package/dist/assets/{src-D14fQdLH.js → src-CbyyWbeT.js} +1 -1
- package/dist/assets/{src-CQOQ3BNT.js → src-CgXkpslu.js} +1 -1
- package/dist/assets/{src-tKMBP4Dv.js → src-CtQWxdaS.js} +1 -1
- package/dist/assets/src-DDtMlZ03.js +1 -0
- package/dist/assets/{src-rMuD7zD4.js → src-DNx0vmvI.js} +1 -1
- package/dist/assets/src-DfQ6cuPE.js +7 -0
- package/dist/assets/{src-4bmZI2h_.js → src-DjrjxzQu.js} +1 -1
- package/dist/assets/{src-CE1TPDES.js → src-Dsh4Yd_x.js} +1 -1
- package/dist/assets/{src-xh_qAK43.js → src-Du26RLvk.js} +1 -1
- package/dist/assets/{src-BmyfVP9z.js → src-aPsTM6Fr.js} +1 -1
- package/dist/assets/{src-0TBpEeKK.js → src-iJXhTwKd.js} +1 -1
- package/dist/assets/{src-Dr_dOgc9.js → src-rXsbV4Ce.js} +1 -1
- package/dist/assets/ui-9Rp0TqUO.js +2 -0
- package/dist/assets/ui-ByltCpi4.js +2 -0
- package/dist/assets/ui-CFyjU_NB.js +2 -0
- package/dist/assets/ui-S_PopF4y.js +2 -0
- package/dist/index.html +14 -14
- package/dist-vendor/web-ui.js +12374 -12272
- package/package.json +1 -1
- package/dist/assets/ChatWidget-vl_ApeDr.js +0 -5
- package/dist/assets/DiagnosticsPage-DVAqVVLa.js +0 -1
- package/dist/assets/NewRecordView-Y6PoWPB9.js +0 -1
- package/dist/assets/PluginSettingsPage-d0LhYfXE.js +0 -1
- package/dist/assets/ScanSummary-xxY2oZVM.js +0 -1
- package/dist/assets/SettingsForm-ChaqrcJM.js +0 -1
- package/dist/assets/SettingsPage-4_Gqty1-.js +0 -3
- package/dist/assets/ThemeSwitcher-eMEFNoJq.js +0 -1
- package/dist/assets/auth-context-CoCE5oPD.js +0 -1
- package/dist/assets/index-Brc5FUYA.css +0 -2
- package/dist/assets/index-C98p9ash.js +0 -22
- package/dist/assets/phone-input-3xV95mM6.js +0 -1
- package/dist/assets/popover-UkAmHo3Y.js +0 -1
- package/dist/assets/settings-Bo5IOwVg.js +0 -1
- package/dist/assets/src-B0pL3dGf.js +0 -7
- package/dist/assets/src-BZK1QVol.js +0 -1
- package/dist/assets/src-CD1zBxk2.js +0 -1
- package/dist/assets/src-Ds6m7Evp2.js +0 -1
- package/dist/assets/src-Mln-mCD3.js +0 -1
- package/dist/assets/ui-3phlsSm1.js +0 -2
- package/dist/assets/ui-B21VM1St.js +0 -2
- package/dist/assets/ui-BfN7X5UB.js +0 -2
- package/dist/assets/ui-DxLuYjTk.js +0 -2
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{a as t}from"./i18n-vendor-T6EnJ_TL.js";import{t as n}from"./react-vendor-CzSUaSLk.js";import{i as r,r as i}from"./input-rjfudbd0.js";import{At as a,Dt as o,Mt as s,Nt as c,Ot as l,jt as u,kt as d,zt as f}from"./ui-vendor-ByG3otld.js";var p=i(`code`,[[`path`,{d:`m16 18 6-6-6-6`,key:`eg8j8`}],[`path`,{d:`m8 6-6 6 6 6`,key:`ppft3o`}]]),m=i(`link`,[[`path`,{d:`M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71`,key:`1cjeqo`}],[`path`,{d:`M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71`,key:`19qd67`}]]),h=i(`list-checks`,[[`path`,{d:`M13 5h8`,key:`a7qcls`}],[`path`,{d:`M13 12h8`,key:`h98zly`}],[`path`,{d:`M13 19h8`,key:`c3s6r1`}],[`path`,{d:`m3 17 2 2 4-4`,key:`1jhpwq`}],[`path`,{d:`m3 7 2 2 4-4`,key:`1obspn`}]]),g=i(`list`,[[`path`,{d:`M3 5h.01`,key:`18ugdj`}],[`path`,{d:`M3 12h.01`,key:`nlz23k`}],[`path`,{d:`M3 19h.01`,key:`noohij`}],[`path`,{d:`M8 5h13`,key:`1pao27`}],[`path`,{d:`M8 12h13`,key:`1za7za`}],[`path`,{d:`M8 19h13`,key:`m83p4d`}]]),_=i(`minus`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}]]),v=i(`rows-3`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M21 9H3`,key:`1338ky`}],[`path`,{d:`M21 15H3`,key:`9uk58r`}]]),y=e(t(),1),b=n(),x=`/home/grigorii/Projects/GitHub/grigorii-horos/coffer/.claude/worktrees/release-7-7/packages/web-ui/src/components/ui/popover.tsx`,S=y.createContext(null);function C({...e}){let[t,n]=y.useState(null),r=y.useMemo(()=>({anchor:t,setAnchor:n}),[t]);return(0,b.jsxDEV)(S.Provider,{value:r,children:(0,b.jsxDEV)(c,{"data-slot":`popover`,...e},void 0,!1,{fileName:x,lineNumber:30,columnNumber:7},this)},void 0,!1,{fileName:x,lineNumber:29,columnNumber:5},this)}function w({...e}){return(0,b.jsxDEV)(s,{"data-slot":`popover-trigger`,...e},void 0,!1,{fileName:x,lineNumber:36,columnNumber:10},this)}function T({className:e,render:t,...n}){return o({defaultTagName:`span`,ref:y.useContext(S)?.setAnchor,props:f({className:e},n),render:t,state:{slot:`popover-anchor`}})}function E({className:e,align:t=`center`,alignOffset:n=0,side:i=`bottom`,sideOffset:o=4,anchor:s,...c}){let l=y.useContext(S);return(0,b.jsxDEV)(u,{children:(0,b.jsxDEV)(a,{align:t,alignOffset:n,side:i,sideOffset:o,anchor:s??l?.anchor??void 0,className:`isolate z-50`,children:(0,b.jsxDEV)(d,{"data-slot":`popover-content`,className:r(`relative z-50 w-72 origin-(--transform-origin) rounded-xl border border-border bg-card p-4 text-foreground shadow-xl outline-hidden duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95`,e),...c},void 0,!1,{fileName:x,lineNumber:73,columnNumber:9},this)},void 0,!1,{fileName:x,lineNumber:65,columnNumber:7},this)},void 0,!1,{fileName:x,lineNumber:64,columnNumber:5},this)}function D({className:e,...t}){return(0,b.jsxDEV)(l,{"data-slot":`popover-arrow`,className:r(`relative z-50 block h-1.5 w-3 overflow-clip`,`data-[side=bottom]:-top-[6px]`,`data-[side=top]:-bottom-[6px] data-[side=top]:rotate-180`,`data-[side=left]:-right-[9px] data-[side=left]:rotate-90`,`data-[side=inline-start]:-right-[9px] data-[side=inline-start]:rotate-90`,`data-[side=right]:-left-[9px] data-[side=right]:-rotate-90`,`data-[side=inline-end]:-left-[9px] data-[side=inline-end]:-rotate-90`,`before:absolute before:bottom-0 before:left-1/2 before:size-[calc(6px*sqrt(2))] before:content-['']`,`before:border-t before:border-l before:border-border before:bg-card`,`before:[transform:translate(-50%,50%)_rotate(45deg)]`,e),...t},void 0,!1,{fileName:x,lineNumber:109,columnNumber:5},this)}export{w as a,g as c,p as d,E as i,h as l,T as n,v as o,D as r,_ as s,C as t,m as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{s as e,t}from"./shelf-
|
|
1
|
+
import{s as e,t}from"./shelf-DjiUBfgQ.js";import{n,t as r}from"./ical-FRtCagm-.js";var i=new Set([`period`,`date`,`datetime`]);function a(t,n){let r=e(t.fields);return n.filter(e=>i.has(String(r[e]?.kind)))}function o(e,t){let n=a(e,t);return n.length===1?n[0]:null}function s(t){let n=Object.entries(e(t.fields)).filter(([,e])=>e.kind===`recurrence`).map(([e])=>e);return n.length===1?n[0]:null}function c(t,n){let r=e(t.fields),i=n[0];if(!i||!r[i])return`views.list: shelf has no text field for its title (titleKey fell back to "id")`;let o=a(t,n);if(o.length===0)return`views.list contains no date, datetime or period field`;if(o.length>1)return`views.list contains multiple time fields: ${o.join(`, `)}`;let c=s(t);if(c){let e=r[c].hints;if(e.exdates&&!r[e.exdates])return`${c} declares exdates '${e.exdates}', which does not exist`;if(e.allDay&&!r[e.allDay])return`${c} declares allDay '${e.allDay}', which does not exist`;if(e.overrides){for(let[t,n]of Object.entries(e.overrides))if(!r[n])return`${c} declares overrides.${t} '${n}', which does not exist`}}return null}function l(i,a,c,l,u,d){let f=e(a.fields),p=o(a,c);if(!p)return[];let m=c[0],h=s(a),g=h?f[h].hints:{},_=(e,n)=>n&&f[n]?t(f[n],n,e):void 0,v=e=>{let t=_(e,p),n=typeof t==`string`?t:t?.from,r=typeof t==`string`?void 0:t?.until;if(!n)return null;let i=g.allDay?!!_(e,g.allDay):!n.includes(`T`),a=e=>e&&i?e.slice(0,10):e;return{kind:`event`,uid:String(e.id),start:a(n),end:a(r),allDay:i,recurrenceId:g.overrides?a(_(e,g.overrides.at)||void 0):void 0,rrule:h&&_(e,h)||void 0,exdates:((g.exdates?_(e,g.exdates):void 0)??[]).map(e=>a(e)),categories:[],raw:``,summary:String(_(e,m)??e.id)}},y=e=>!!(g.overrides&&_(e,g.overrides.master)),b=i.filter(e=>!y(e)),x=[];for(let e of b){let t=v(e);if(!t)continue;let a=(g.overrides?i.filter(t=>String(_(t,g.overrides.master))===String(e.id)):[]).map(e=>({row:e,comp:v(e)})).filter(e=>e.comp!==null);for(let i of r(t,a.map(e=>e.comp),u,d)){let t=i.recurrenceId?a.find(e=>e.comp.recurrenceId&&n(e.comp.recurrenceId)===n(i.recurrenceId))?.row??e:e;x.push({id:String(t.id),title:String(_(t,m)??t.id),start:i.start,end:i.end,allDay:i.allDay,href:`${l}/${t.id}`})}}return x.sort((e,t)=>e.start.localeCompare(t.start))}function u(e,n,r){return e.filter(e=>{let i=t(n[r],r,e);return!(typeof i==`string`?i:i?.from)})}var d=e=>String(e).padStart(2,`0`),f=(e,t,n)=>`${e}-${d(t+1)}-${d(n)}`;function p(e){return{y:Number(e.slice(0,4)),m:Number(e.slice(5,7))-1,d:Number(e.slice(8,10))}}function m(){let e=new Date;return f(e.getFullYear(),e.getMonth(),e.getDate())}function h(e){if(!e||!/^\d{4}-\d{2}-\d{2}$/.test(e))return m();let{y:t,m:n,d:r}=p(e),i=new Date(t,n,r);return i.getFullYear()===t&&i.getMonth()===n&&i.getDate()===r?e:m()}function g(e,t){let{y:n,m:r,d:i}=p(e),a=new Date(n,r,i+t);return f(a.getFullYear(),a.getMonth(),a.getDate())}function _(e,t){let{y:n,m:r,d:i}=p(e),a=new Date(n,r+t+1,0).getDate(),o=new Date(n,r+t,Math.min(i,a));return f(o.getFullYear(),o.getMonth(),o.getDate())}function v(e,t){let{y:n,m:r,d:i}=p(e),a=new Date(n+t,r+1,0).getDate();return f(n+t,r,Math.min(i,a))}function y(e){let{y:t,m:n,d:r}=p(e);return g(e,-((new Date(t,n,r).getDay()+6)%7))}function b(e){let t=y(e);return Array.from({length:7},(e,n)=>g(t,n))}function x(e){let t=y(e);return{from:t,to:g(t,7)}}function S(e,t){let n=t===11?{y:e+1,m:0}:{y:e,m:t+1};return{from:f(e,t,1),to:f(n.y,n.m,1)}}function C(e){let{y:t,m:n}=p(e);return S(t,n)}function w(e){let{y:t}=p(e);return{from:f(t,0,1),to:f(t+1,0,1)}}function T(e,t){let n=(new Date(e,t,1).getDay()+6)%7,r=new Date(e,t+1,0).getDate(),i=[];for(let a=0;a<42;a++){let o=a-n+1;i.push({date:o>=1&&o<=r?f(e,t,o):null})}return i}function E(e,t,n){let{y:r,m:i,d:a}=p(e);return new Date(r,i,a).toLocaleDateString(t,n)}var D=`mt-4 mb-1 text-sm font-semibold`;function O(e){return e&&e[0].toLocaleUpperCase()+e.slice(1)}var k={kind:`calendar-ilamy`,check:c};export{l as _,E as a,o as b,C as c,_ as d,v as f,w as g,x as h,p as i,h as l,b as m,D as n,f as o,m as p,O as r,T as s,k as t,g as u,u as v,c as y};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{x as e}from"./fields-Ce51pRua.js";function t(t){return e(t)}export{t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{C as e,a as t,b as n,c as r,d as i,i as a,l as o,x as s}from"./fields-
|
|
1
|
+
import{C as e,a as t,b as n,c as r,d as i,i as a,l as o,x as s}from"./fields-Ce51pRua.js";function c(t){let s=[];for(let l of t){let t=e(l)?n(l):l;if(i(t))s.push([t.key,t.type]);else if(a(t)){if(r(t))continue;let e=o(t)?`${t.key}__`:``;for(let[n,r]of c(t.fields))s.push([e+n,r])}}return s}function l(e,t){return t.columns?Object.entries(t.columns).map(([t,n])=>[`${e}__${t}`,n]):[[e,t.column]]}function u(e,t,n,r){let i={},a=!1;for(let o of e.parts??[]){let e=`${t}__${o.key}`;if(o.meta.parts){let t=u(o.meta,e,n,r);t!==void 0&&(i[o.key]=t,a=!0);continue}if(!(e in n))continue;let s=n[e];r?.(e),i[o.key]=s,s!=null&&s!==``&&(a=!0)}return a?i:void 0}function d(e,t,n){return!e.columns||n[t]!==void 0?n[t]:u(e,t,n)}function f(e){if(e.columns)return Object.keys(e.columns)[0]}function p(e,t){let n=e;for(let e of t.split(`__`)){if(typeof n!=`object`||!n||Array.isArray(n))return;n=n[e]}return n}function m(e,t,n){let r=e=>e&&typeof e==`object`&&!Array.isArray(e)?{...e}:{},i=t.split(`__`),a=r(e),o=a;for(let e of i.slice(0,-1))o[e]=r(o[e]),o=o[e];return o[i[i.length-1]]=n,a}function h(t){let i=[];for(let o of t){let t=e(o)?n(o):o;a(t)&&(r(t)?i.push({key:t.key,group:t}):i.push(...h(t.fields)))}return i}var g=new WeakMap;function _(e){let t=g.get(e);return t||(t=Object.fromEntries(c(e)),g.set(e,t)),t}function v(e,t){for(let n of e){if(`value`in n&&typeof n.value==`function`)throw Error(`${t}: computed element needs a key — the server computes it and needs a name to return it under`);a(n)&&v(n.fields,t)}}function y(e,t){v(e,t)}function b(e){let t=s(e),n=c(t.fields).map(([e])=>e),r=n.find((e,t)=>n.indexOf(e)!==t);if(r)throw Error(`[shelf] ${t.library}/${t.shelf}: duplicate key '${r}'`);if(t.single&&!t.agent)throw Error(`[shelf] ${t.library}/${t.shelf}: single shelf requires \`agent\` — the agent cannot find it otherwise`);if(t.views?.list!==void 0&&!Array.isArray(t.views.list))throw Error(`[shelf] ${t.library}/${t.shelf}: views.list is a flat array of field keys — the { kind, fields } form is gone; use views.list: [...] plus views.listKind`);if(t.standalone!==!1&&!t.single&&!t.views?.list?.length&&console.warn(`[shelf] ${t.library}/${t.shelf}: standalone shelf without an explicit views.list`),t.views?.title&&!x(t.fields).some(([e])=>e===t.views.title))throw Error(`[shelf] ${t.library}/${t.shelf}: views.title '${t.views.title}' is not a field`);t.views?.list?.includes(S(t))&&console.warn(`[shelf] ${t.library}/${t.shelf}: views.list repeats the title '${S(t)}' — the title is declared separately`);let i=x(t.fields).filter(([,e])=>e.kind===`title`);return i.length>1&&console.warn(`[shelf] ${t.library}/${t.shelf}: ${i.length} title fields (${i.map(([e])=>e).join(`, `)}) — '${i[0][0]}' wins`),t.standalone!==!1&&!t.single&&S(t)===`id`&&console.warn(`[shelf] ${t.library}/${t.shelf}: no title declared (field.title() or views.title) — the record renders no heading`),y(t.fields,`[shelf] ${t.library}/${t.shelf}`),t}function x(e){let t=[];for(let n of e)i(n)?t.push([n.key,n.type]):a(n)&&!r(n)&&!o(n)&&t.push(...x(n.fields));return t}function S(e){if(e.views?.title)return e.views.title;let t=x(e.fields).find(([,e])=>e.kind===`title`);return t?t[0]:`id`}function C(e,t){let n=S(e);if(n===`id`)return String(t.id??``);let r=t[n];return r==null?``:String(r)}function w(e,t){let n=_(e.fields);return t.filter(e=>n[e])}var T=new Set([`image`,`media`,`avatar`,`cover`]),E=e=>T.has(e);function D(e){let t=e.views?.inline?.length?w(e,e.views.inline):[];return t.length?t:[S(e)]}function O(e){let t=_(e.fields);return D(e).find(e=>t[e]&&E(t[e].kind))}function k(e,t){let n=_(e.fields);return D(e).reduce((e,r)=>{if(!n[r]||!E(n[r].kind)){let n=t[r];n!=null&&n!==``&&e.push(String(n))}return e},[]).join(` `).trim()||C(e,t)}function A(e){let t=S(e);return[t,...e.views?.list?.length?w(e,e.views.list.filter(e=>e!==t)):[]]}function j(e){return e.views?.listKind??`table`}var M=new Set([`checkbox`,`relation`]),N=new Set([`tag`]);function P(e){return e.views?.groupBy?.length?w(e,e.views.groupBy):c(e.fields).filter(([,e])=>M.has(e.prim)||N.has(e.kind)||t(e)).map(([e])=>e)}function F(e){let t=e.views?.defaultGroupBy;return t&&_(e.fields)[t]?t:P(e)[0]}function I(e){return c(e.fields).find(([,e])=>e.kind===`cover`)?.[0]}function L(e){let t=_(e.fields),n=[],r=e=>{!e||e===`id`||n.includes(e)||t[e]&&n.push(e)};r(S(e)),A(e).forEach(r),P(e).forEach(r),D(e).forEach(r),r(O(e)),r(I(e));let i=e.views?.select;return i&&(r(i.icon),(Array.isArray(i.title)?i.title:[i.title]).forEach(r),r(i.subtitle)),[`id`,...n]}export{p as _,b as a,m as b,P as c,E as d,L as f,l as g,C as h,F as i,O as l,f as m,y as n,c as o,j as p,h as r,_ as s,d as t,k as u,S as v,A as y};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as e,n as t,r as n}from"./fields-CV3RQg0Y.js";import{a as r}from"./shelf-Cj_pNvd-.js";import{i,n as a}from"./plugin-Cjr7lgQH.js";import{t as o}from"./extend-yQ8zoqGc.js";import{t as s}from"./settings-Bo5IOwVg.js";var c=new Map(e.map((e,t)=>[e.value,t])),l=864e5,u=7;function d(e){let t=[0,0,0,0,0,0,0];if(!Array.isArray(e))return t;for(let n of e){let e=n?.value;if(Array.isArray(e))for(let n of e){let e=n,r=typeof e?.day==`string`?c.get(e.day):void 0;if(r===void 0)continue;let i=Number(e?.value);Number.isFinite(i)&&i>0&&(t[r]=t[r]+i)}}return t}function f(){return new Date().toISOString().slice(0,10)}var p=e=>String(e).padStart(2,`0`);function m(e){let t=e instanceof Date?`${e.getFullYear()}-${p(e.getMonth()+1)}-${p(e.getDate())}`:typeof e==`string`?e.slice(0,10):null;if(t===null||!/^\d{4}-\d{2}-\d{2}$/.test(t))return null;let n=Date.parse(t);return Number.isNaN(n)?null:n}function h(e,t,n){let r=Math.round((n-t)/l);if(!Number.isFinite(r)||r<=0)return 0;let i=e.reduce((e,t)=>e+t,0),a=Math.floor(r/u)*i,o=(new Date(t).getUTCDay()+6)%u;for(let t=1;t<=r%u;t++)a+=e[(o+t)%u];return a}function g(e,t,n,r){let i=Number(e);if(!Number.isFinite(i))return null;let a=d(t),o=a.reduce((e,t)=>e+t,0);if(o<=0)return null;let s=m(n),c=m(r),l=s===null||c===null?0:h(a,s,c),f=Math.max(0,i-l);return Math.floor(f/(o/u))}function _(e){return typeof e!=`number`||!Number.isFinite(e)?null:e<=0?`out`:e<7?`low`:`enough`}var v=({record:e})=>g(e.quantity,e.dose,e.quantityCheckedAt,f()),y=r({shelf:`medicine`,library:`health`,label:`health.medicine.label`,icon:`lucide:pill`,views:{list:[`type`,`form`,`quantity`]},fields:{name:t.title({label:`core.fields.name`}),stock:t.stats({fields:{quantity:t.int({label:`health.medicine.fields.quantity`,rules:{min:0,max:1e5},mutate:[`daysLeft`,`quantityCheckedAt`]}),meter:t.meter({source:{daysLeft:t.int({label:`health.medicine.fields.daysLeft`,value:v,cache:3600,mutate:[`supply_state`]})},min:0,max:30}),status:t.status({source:{supply_state:t.string({label:`health.medicine.fields.supply_state`,options:[{value:`enough`,title:`health.medicine.options.supply_state.enough`,icon:{kind:`icon`,value:`lucide:check`},tone:`success`},{value:`low`,title:`health.medicine.options.supply_state.low`,icon:{kind:`icon`,value:`lucide:minus`},tone:`warning`},{value:`out`,title:`health.medicine.options.supply_state.out`,icon:{kind:`icon`,value:`lucide:x`},tone:`danger`}],value:e=>_(v(e)),cache:3600,strict:!0,noSearch:!0})}}),countdown:t.countdown({source:{quantityCheckedAt:t.date({label:`health.medicine.fields.quantityCheckedAt`,value:e=>e.now.slice(0,10),mutate:[`daysLeft`]})},caption:`units.days`})}}),hairline:t.divider({}),about:t.illustrated({label:`health.medicine.fields.about`,fields:{image:t.image({}),text:t.text({rules:{max:1e3}})}}),photos:t.image({label:`health.medicine.fields.photos`,multiple:!0}),dose:t.keyed({label:`health.medicine.fields.dose`,icon:`lucide:pill`,fields:{person:t.relation({label:`health.medicine.fields.dose_person`,options:n({library:`people`,shelf:`person`})}),value:t.perWeekday({label:`health.medicine.fields.dose_value`,rules:{min:0,max:20,step:.5},mutate:[`daysLeft`]})},by:`person`}),intakeTimes:t.string({label:`health.medicine.fields.intakeTimes`,options:`day-periods`,multiple:!0,strict:!0,noSearch:!0}),intakePeriods:t.period({label:`health.medicine.fields.intakePeriods`,multiple:!0}),properties:t.properties({columns:2,fields:{type:t.string({label:`core.fields.type`,strict:!0,noSearch:!0,ui:{span:6},options:[{value:`vitamin`,title:`health.medicine.options.type.vitamin`},{value:`supplement`,title:`health.medicine.options.type.supplement`},{value:`medication`,title:`health.medicine.options.type.medication`},{value:`antibiotic`,title:`health.medicine.options.type.antibiotic`},{value:`hormone`,title:`health.medicine.options.type.hormone`},{value:`painkiller`,title:`health.medicine.options.type.painkiller`},{value:`homeopathy`,title:`health.medicine.options.type.homeopathy`},{value:`herbal`,title:`health.medicine.options.type.herbal`}]}),form:t.string({label:`health.medicine.fields.form`,strict:!0,noSearch:!0,ui:{span:6},options:[{value:`tablet`,title:`health.medicine.options.form.tablet`},{value:`capsule`,title:`health.medicine.options.form.capsule`},{value:`syrup`,title:`health.medicine.options.form.syrup`},{value:`drops`,title:`health.medicine.options.form.drops`},{value:`ointment`,title:`health.medicine.options.form.ointment`},{value:`gel`,title:`health.medicine.options.form.gel`},{value:`spray`,title:`health.medicine.options.form.spray`},{value:`injection`,title:`health.medicine.options.form.injection`},{value:`powder`,title:`health.medicine.options.form.powder`},{value:`suppository`,title:`health.medicine.options.form.suppository`}]})}}),purchase:t.group({label:`health.medicine.groups.purchase`,icon:`lucide:shopping-cart`,scope:`hoist`,fields:{link:t.link({label:`health.medicine.fields.link`,ui:{span:12}}),store:t.relation({label:`health.medicine.fields.store`,options:n({library:`things`,shelf:`store`}),ui:{span:6}}),orderNumber:t.string({label:`health.medicine.fields.orderNumber`,rules:{max:100},ui:{span:6}}),purchaseDate:t.date({label:`health.medicine.fields.purchaseDate`,ui:{span:4}}),purchasePrice:t.money({label:`health.medicine.fields.purchasePrice`,ui:{span:4}}),currency:t.currency({label:`core.fields.currency`,default:`UAH`,ui:{span:4}})}}),notes:t.text({label:`health.medicine.fields.notes`,rules:{max:2e3}})}}),b=r({shelf:`health_visit`,library:`health`,label:`health.health_visit.label`,icon:`lucide:stethoscope`,views:{list:[`date`,`person`,`specialty`]},fields:{name:t.title({label:`core.fields.name`}),description:t.text({label:`health.health_visit.fields.description`,rules:{max:1e3}}),timeline:t.timeline({fields:{date:t.date({label:`health.health_visit.fields.date`}),nextVisit:t.reminder({label:`health.health_visit.fields.nextVisit`,rules:{lead:14}})}}),reason:t.text({label:`health.health_visit.fields.reason`,rules:{max:1e3}}),result:t.text({label:`health.health_visit.fields.result`,rules:{max:2e3}}),next_step:t.text({label:`health.health_visit.fields.next_step`,rules:{max:1e3}}),specialist:t.string({label:`health.health_visit.fields.specialist`,rules:{max:200},ui:{span:4}}),specialty:t.string({label:`health.health_visit.fields.specialty`,rules:{max:100},ui:{span:4}}),clinic:t.string({label:`health.health_visit.fields.clinic`,rules:{max:200},ui:{span:4}}),cost:t.money({label:`health.health_visit.fields.cost`,ui:{span:3}}),currency:t.currency({label:`core.fields.currency`,default:`UAH`,ui:{span:3}}),medicines:t.relation({label:`health.health_visit.fields.medicines`,options:n({library:`health`,shelf:`medicine`}),multiple:!0,ui:{span:6}}),people:t.people({source:{person:t.relation({label:`health.health_visit.fields.person`,options:n({library:`people`,shelf:`person`})})}}),files:t.file({label:`health.health_visit.fields.files`,multiple:!0}),photos:t.image({label:`health.health_visit.fields.photos`,multiple:!0}),notes:t.text({label:`health.health_visit.fields.notes`,rules:{max:2e3}})}}),x=r({shelf:`health_test`,library:`health`,label:`health.health_test.label`,icon:`lucide:flask-conical`,views:{list:[`date`,`person`,`status`]},fields:{name:t.title({label:`core.fields.name`}),description:t.text({label:`health.health_test.fields.description`,rules:{max:1e3}}),date:t.date({label:`health.health_test.fields.date`,ui:{span:4}}),clinic:t.string({label:`health.health_test.fields.clinic`,rules:{max:200},ui:{span:4}}),person:t.relation({label:`health.health_test.fields.person`,options:n({library:`people`,shelf:`person`}),ui:{span:4}}),indicators:t.assay({label:`health.health_test.fields.indicators`,icon:`lucide:activity`,analyte:`analyte`,value:`value`,unit:`unit`,low:`low`,high:`high`,source:{indicators:t.group({scope:`nest`,multiple:!0,fields:{analyte:t.string({label:`health.health_test.fields.analyte`,rules:{max:100}}),value:t.real({label:`health.health_test.fields.value`}),unit:t.string({label:`health.health_test.fields.unit`,rules:{max:20}}),low:t.real({label:`health.health_test.fields.low`}),high:t.real({label:`health.health_test.fields.high`})}})}}),result:t.text({label:`health.health_test.fields.result`,rules:{max:5e3}}),attachments:t.image({label:`health.health_test.fields.attachments`,multiple:!0}),properties:t.properties({columns:2,fields:{status:t.string({label:`health.health_test.fields.status`,strict:!0,noSearch:!0,ui:{span:6},options:[{value:`ordered`,title:`health.health_test.options.status.ordered`},{value:`completed`,title:`health.health_test.options.status.completed`},{value:`cancelled`,title:`health.health_test.options.status.cancelled`}]}),test_type:t.string({label:`health.health_test.fields.test_type`,strict:!0,noSearch:!0,ui:{span:6},options:[{value:`blood`,title:`health.health_test.options.test_type.blood`},{value:`urine`,title:`health.health_test.options.test_type.urine`},{value:`ultrasound`,title:`health.health_test.options.test_type.ultrasound`},{value:`xray`,title:`health.health_test.options.test_type.xray`},{value:`mri`,title:`health.health_test.options.test_type.mri`},{value:`other`,title:`health.health_test.options.test_type.other`}]})}}),notes:t.text({label:`health.health_test.fields.notes`,rules:{max:2e3}})}}),S=o({id:`person_body`,label:`health.person_body.label`,icon:`lucide:ruler`,attachTo:[{library:`people`,shelf:`person`}],agent:`Person's body measurements. weightKg — weight in kg. heightCm — height in cm. bloodGroup — ABO/Rh blood type. allergies — list of allergens.`,fields:{weightKg:t.real({label:`health.person_body.fields.weightKg`,rules:{min:1,max:500}}),heightCm:t.int({label:`health.person_body.fields.heightCm`,rules:{min:50,max:250}}),bloodGroup:t.string({label:`health.person_body.fields.bloodGroup`,strict:!0,noSearch:!0,options:[`O-`,`O+`,`A-`,`A+`,`B-`,`B+`,`AB-`,`AB+`]}),allergies:t.string({label:`health.person_body.fields.allergies`,multiple:!0})}}),C=[{value:`any`,title:`health.dayPeriods.any`},{value:`before_breakfast`,title:`health.dayPeriods.before_breakfast`},{value:`with_breakfast`,title:`health.dayPeriods.with_breakfast`},{value:`after_breakfast`,title:`health.dayPeriods.after_breakfast`},{value:`with_food`,title:`health.dayPeriods.with_food`},{value:`after_lunch`,title:`health.dayPeriods.after_lunch`},{value:`evening`,title:`health.dayPeriods.evening`},{value:`before_bed`,title:`health.dayPeriods.before_bed`},{value:`as_needed`,title:`health.dayPeriods.as_needed`}],w=a({id:`health`,version:`1.0.0`,dependsOn:[`people`,`things`],label:`health.plugin.label`,description:`health.plugin.description`,optionLists:[{name:`day-periods`,options:[...C]}],libraries:[{meta:i({id:`health`,label:`health.library.label`,icon:`lucide:hospital`,agent:{description:`Medical tests, doctor visits, and medicines — each linked to a person.`,instructions:`Records link to a person (relation to people). Count upcoming/overdue visits by the date field. medicine.quantity is a SNAPSHOT dated by medicine.quantityCheckedAt ("this many as of that date"), and daysLeft subtracts everything the dose schedule has consumed since it — so when a medicine is taken or restocked, ALWAYS write quantityCheckedAt (today) in the same update_record call as quantity. Writing quantity alone dates the new count to the old checkpoint and can immediately report the pack as out. After a visit — result/nextVisit.`},starterHint:`appointments coming up, or test results worth revisiting`}),shelves:[y,b,x]}],extends_:[S],settings:s({label:`health.settings.label`,fields:{caldav_calendar:t.string({label:`health.settings.caldav_calendar`}),caldav_url:t.string({label:`health.settings.caldav_url`}),caldav_username:t.string({label:`health.settings.caldav_username`}),caldav_password:t.password({label:`health.settings.caldav_password`}),...Object.fromEntries(C.filter(e=>e.value!==`as_needed`).map(e=>[`time_${e.value}`,t.time({label:`health.settings.time_${e.value}`,rules:{granularity:`minute`}})]))}})});export{w as default};
|
|
1
|
+
import{_ as e,n as t,r as n}from"./fields-Ce51pRua.js";import{a as r}from"./shelf-DjiUBfgQ.js";import{i,n as a}from"./plugin-Cjr7lgQH.js";import{t as o}from"./extend-CHOe1AVl.js";import{t as s}from"./settings-BEzSaRjz.js";var c=new Map(e.map((e,t)=>[e.value,t])),l=864e5,u=7;function d(e){let t=[0,0,0,0,0,0,0];if(!Array.isArray(e))return t;for(let n of e){let e=n?.value;if(Array.isArray(e))for(let n of e){let e=n,r=typeof e?.day==`string`?c.get(e.day):void 0;if(r===void 0)continue;let i=Number(e?.value);Number.isFinite(i)&&i>0&&(t[r]=t[r]+i)}}return t}function f(){return new Date().toISOString().slice(0,10)}var p=e=>String(e).padStart(2,`0`);function m(e){let t=e instanceof Date?`${e.getFullYear()}-${p(e.getMonth()+1)}-${p(e.getDate())}`:typeof e==`string`?e.slice(0,10):null;if(t===null||!/^\d{4}-\d{2}-\d{2}$/.test(t))return null;let n=Date.parse(t);return Number.isNaN(n)?null:n}function h(e,t,n){let r=Math.round((n-t)/l);if(!Number.isFinite(r)||r<=0)return 0;let i=e.reduce((e,t)=>e+t,0),a=Math.floor(r/u)*i,o=(new Date(t).getUTCDay()+6)%u;for(let t=1;t<=r%u;t++)a+=e[(o+t)%u];return a}function g(e,t,n,r){let i=Number(e);if(!Number.isFinite(i))return null;let a=d(t),o=a.reduce((e,t)=>e+t,0);if(o<=0)return null;let s=m(n),c=m(r),l=s===null||c===null?0:h(a,s,c),f=Math.max(0,i-l);return Math.floor(f/(o/u))}function _(e){return typeof e!=`number`||!Number.isFinite(e)?null:e<=0?`out`:e<7?`low`:`enough`}var v=({record:e})=>g(e.quantity,e.dose,e.quantityCheckedAt,f()),y=r({shelf:`medicine`,library:`health`,label:`health.medicine.label`,icon:`lucide:pill`,views:{list:[`type`,`form`,`quantity`]},fields:{name:t.title({label:`core.fields.name`}),stock:t.stats({fields:{quantity:t.int({label:`health.medicine.fields.quantity`,rules:{min:0,max:1e5},mutate:[`daysLeft`,`quantityCheckedAt`]}),meter:t.meter({source:{daysLeft:t.int({label:`health.medicine.fields.daysLeft`,value:v,cache:3600,mutate:[`supply_state`]})},min:0,max:30}),status:t.status({source:{supply_state:t.string({label:`health.medicine.fields.supply_state`,options:[{value:`enough`,title:`health.medicine.options.supply_state.enough`,icon:{kind:`icon`,value:`lucide:check`},tone:`success`},{value:`low`,title:`health.medicine.options.supply_state.low`,icon:{kind:`icon`,value:`lucide:minus`},tone:`warning`},{value:`out`,title:`health.medicine.options.supply_state.out`,icon:{kind:`icon`,value:`lucide:x`},tone:`danger`}],value:e=>_(v(e)),cache:3600,strict:!0,noSearch:!0})}}),countdown:t.countdown({source:{quantityCheckedAt:t.date({label:`health.medicine.fields.quantityCheckedAt`,value:e=>e.now.slice(0,10),mutate:[`daysLeft`]})},caption:`units.days`})}}),hairline:t.divider({}),about:t.illustrated({label:`health.medicine.fields.about`,fields:{image:t.image({}),text:t.text({rules:{max:1e3}})}}),photos:t.image({label:`health.medicine.fields.photos`,multiple:!0}),dose:t.keyed({label:`health.medicine.fields.dose`,icon:`lucide:pill`,fields:{person:t.relation({label:`health.medicine.fields.dose_person`,options:n({library:`people`,shelf:`person`})}),value:t.perWeekday({label:`health.medicine.fields.dose_value`,rules:{min:0,max:20,step:.5},mutate:[`daysLeft`]})},by:`person`}),intakeTimes:t.string({label:`health.medicine.fields.intakeTimes`,options:`day-periods`,multiple:!0,strict:!0,noSearch:!0}),intakePeriods:t.period({label:`health.medicine.fields.intakePeriods`,multiple:!0}),properties:t.properties({columns:2,fields:{type:t.string({label:`core.fields.type`,strict:!0,noSearch:!0,ui:{span:6},options:[{value:`vitamin`,title:`health.medicine.options.type.vitamin`},{value:`supplement`,title:`health.medicine.options.type.supplement`},{value:`medication`,title:`health.medicine.options.type.medication`},{value:`antibiotic`,title:`health.medicine.options.type.antibiotic`},{value:`hormone`,title:`health.medicine.options.type.hormone`},{value:`painkiller`,title:`health.medicine.options.type.painkiller`},{value:`homeopathy`,title:`health.medicine.options.type.homeopathy`},{value:`herbal`,title:`health.medicine.options.type.herbal`}]}),form:t.string({label:`health.medicine.fields.form`,strict:!0,noSearch:!0,ui:{span:6},options:[{value:`tablet`,title:`health.medicine.options.form.tablet`},{value:`capsule`,title:`health.medicine.options.form.capsule`},{value:`syrup`,title:`health.medicine.options.form.syrup`},{value:`drops`,title:`health.medicine.options.form.drops`},{value:`ointment`,title:`health.medicine.options.form.ointment`},{value:`gel`,title:`health.medicine.options.form.gel`},{value:`spray`,title:`health.medicine.options.form.spray`},{value:`injection`,title:`health.medicine.options.form.injection`},{value:`powder`,title:`health.medicine.options.form.powder`},{value:`suppository`,title:`health.medicine.options.form.suppository`}]})}}),purchase:t.group({label:`health.medicine.groups.purchase`,icon:`lucide:shopping-cart`,scope:`hoist`,fields:{link:t.link({label:`health.medicine.fields.link`,ui:{span:12}}),store:t.relation({label:`health.medicine.fields.store`,options:n({library:`things`,shelf:`store`}),ui:{span:6}}),orderNumber:t.string({label:`health.medicine.fields.orderNumber`,rules:{max:100},ui:{span:6}}),purchaseDate:t.date({label:`health.medicine.fields.purchaseDate`,ui:{span:4}}),purchasePrice:t.money({label:`health.medicine.fields.purchasePrice`,ui:{span:4}}),currency:t.currency({label:`core.fields.currency`,default:`UAH`,ui:{span:4}})}}),notes:t.text({label:`health.medicine.fields.notes`,rules:{max:2e3}})}}),b=r({shelf:`health_visit`,library:`health`,label:`health.health_visit.label`,icon:`lucide:stethoscope`,views:{list:[`date`,`person`,`specialty`]},fields:{name:t.title({label:`core.fields.name`}),description:t.text({label:`health.health_visit.fields.description`,rules:{max:1e3}}),timeline:t.timeline({fields:{date:t.date({label:`health.health_visit.fields.date`}),nextVisit:t.reminder({label:`health.health_visit.fields.nextVisit`,rules:{lead:14}})}}),reason:t.text({label:`health.health_visit.fields.reason`,rules:{max:1e3}}),result:t.text({label:`health.health_visit.fields.result`,rules:{max:2e3}}),next_step:t.text({label:`health.health_visit.fields.next_step`,rules:{max:1e3}}),specialist:t.string({label:`health.health_visit.fields.specialist`,rules:{max:200},ui:{span:4}}),specialty:t.string({label:`health.health_visit.fields.specialty`,rules:{max:100},ui:{span:4}}),clinic:t.string({label:`health.health_visit.fields.clinic`,rules:{max:200},ui:{span:4}}),cost:t.money({label:`health.health_visit.fields.cost`,ui:{span:3}}),currency:t.currency({label:`core.fields.currency`,default:`UAH`,ui:{span:3}}),medicines:t.relation({label:`health.health_visit.fields.medicines`,options:n({library:`health`,shelf:`medicine`}),multiple:!0,ui:{span:6}}),people:t.people({source:{person:t.relation({label:`health.health_visit.fields.person`,options:n({library:`people`,shelf:`person`})})}}),files:t.file({label:`health.health_visit.fields.files`,multiple:!0}),photos:t.image({label:`health.health_visit.fields.photos`,multiple:!0}),notes:t.text({label:`health.health_visit.fields.notes`,rules:{max:2e3}})}}),x=r({shelf:`health_test`,library:`health`,label:`health.health_test.label`,icon:`lucide:flask-conical`,views:{list:[`date`,`person`,`status`]},fields:{name:t.title({label:`core.fields.name`}),description:t.text({label:`health.health_test.fields.description`,rules:{max:1e3}}),date:t.date({label:`health.health_test.fields.date`,ui:{span:4}}),clinic:t.string({label:`health.health_test.fields.clinic`,rules:{max:200},ui:{span:4}}),person:t.relation({label:`health.health_test.fields.person`,options:n({library:`people`,shelf:`person`}),ui:{span:4}}),indicators:t.assay({label:`health.health_test.fields.indicators`,icon:`lucide:activity`,analyte:`analyte`,value:`value`,unit:`unit`,low:`low`,high:`high`,source:{indicators:t.group({scope:`nest`,multiple:!0,fields:{analyte:t.string({label:`health.health_test.fields.analyte`,rules:{max:100}}),value:t.real({label:`health.health_test.fields.value`}),unit:t.string({label:`health.health_test.fields.unit`,rules:{max:20}}),low:t.real({label:`health.health_test.fields.low`}),high:t.real({label:`health.health_test.fields.high`})}})}}),result:t.text({label:`health.health_test.fields.result`,rules:{max:5e3}}),attachments:t.image({label:`health.health_test.fields.attachments`,multiple:!0}),properties:t.properties({columns:2,fields:{status:t.string({label:`health.health_test.fields.status`,strict:!0,noSearch:!0,ui:{span:6},options:[{value:`ordered`,title:`health.health_test.options.status.ordered`},{value:`completed`,title:`health.health_test.options.status.completed`},{value:`cancelled`,title:`health.health_test.options.status.cancelled`}]}),test_type:t.string({label:`health.health_test.fields.test_type`,strict:!0,noSearch:!0,ui:{span:6},options:[{value:`blood`,title:`health.health_test.options.test_type.blood`},{value:`urine`,title:`health.health_test.options.test_type.urine`},{value:`ultrasound`,title:`health.health_test.options.test_type.ultrasound`},{value:`xray`,title:`health.health_test.options.test_type.xray`},{value:`mri`,title:`health.health_test.options.test_type.mri`},{value:`other`,title:`health.health_test.options.test_type.other`}]})}}),notes:t.text({label:`health.health_test.fields.notes`,rules:{max:2e3}})}}),S=o({id:`person_body`,label:`health.person_body.label`,icon:`lucide:ruler`,attachTo:[{library:`people`,shelf:`person`}],agent:`Person's body measurements. weightKg — weight in kg. heightCm — height in cm. bloodGroup — ABO/Rh blood type. allergies — list of allergens.`,fields:{weightKg:t.real({label:`health.person_body.fields.weightKg`,rules:{min:1,max:500}}),heightCm:t.int({label:`health.person_body.fields.heightCm`,rules:{min:50,max:250}}),bloodGroup:t.string({label:`health.person_body.fields.bloodGroup`,strict:!0,noSearch:!0,options:[`O-`,`O+`,`A-`,`A+`,`B-`,`B+`,`AB-`,`AB+`]}),allergies:t.string({label:`health.person_body.fields.allergies`,multiple:!0})}}),C=[{value:`any`,title:`health.dayPeriods.any`},{value:`before_breakfast`,title:`health.dayPeriods.before_breakfast`},{value:`with_breakfast`,title:`health.dayPeriods.with_breakfast`},{value:`after_breakfast`,title:`health.dayPeriods.after_breakfast`},{value:`with_food`,title:`health.dayPeriods.with_food`},{value:`after_lunch`,title:`health.dayPeriods.after_lunch`},{value:`evening`,title:`health.dayPeriods.evening`},{value:`before_bed`,title:`health.dayPeriods.before_bed`},{value:`as_needed`,title:`health.dayPeriods.as_needed`}],w=a({id:`health`,version:`1.0.0`,dependsOn:[`people`,`things`],label:`health.plugin.label`,description:`health.plugin.description`,optionLists:[{name:`day-periods`,options:[...C]}],libraries:[{meta:i({id:`health`,label:`health.library.label`,icon:`lucide:hospital`,agent:{description:`Medical tests, doctor visits, and medicines — each linked to a person.`,instructions:`Records link to a person (relation to people). Count upcoming/overdue visits by the date field. medicine.quantity is a SNAPSHOT dated by medicine.quantityCheckedAt ("this many as of that date"), and daysLeft subtracts everything the dose schedule has consumed since it — so when a medicine is taken or restocked, ALWAYS write quantityCheckedAt (today) in the same update_record call as quantity. Writing quantity alone dates the new count to the old checkpoint and can immediately report the pack as out. After a visit — result/nextVisit.`},starterHint:`appointments coming up, or test results worth revisiting`}),shelves:[y,b,x]}],extends_:[S],settings:s({label:`health.settings.label`,fields:{caldav_calendar:t.string({label:`health.settings.caldav_calendar`}),caldav_url:t.string({label:`health.settings.caldav_url`}),caldav_username:t.string({label:`health.settings.caldav_username`}),caldav_password:t.password({label:`health.settings.caldav_password`}),...Object.fromEntries(C.filter(e=>e.value!==`as_needed`).map(e=>[`time_${e.value}`,t.time({label:`health.settings.time_${e.value}`,rules:{granularity:`minute`}})]))}})});export{w as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{n as e,r as t}from"./fields-
|
|
1
|
+
import{n as e,r as t}from"./fields-Ce51pRua.js";import{a as n}from"./shelf-DjiUBfgQ.js";import{i as r,n as i}from"./plugin-Cjr7lgQH.js";import{t as a}from"./extend-CHOe1AVl.js";var o=n({shelf:`personal_document`,library:`documents`,label:`documents.personal_document.label`,icon:`lucide:id-card`,views:{list:[`owner`,`type`,`surname`,`expires`]},fields:{name:e.title({label:`core.fields.name`}),about:e.illustrated({label:`documents.personal_document.fields.about`,fields:{image:e.avatar({}),text:e.text({rules:{max:1e3}})}}),idcard:e.idcard({overline:{type:e.string({label:`core.fields.type`,strict:!0,noSearch:!0,options:[{value:`P`,title:`documents.personal_document.options.type.P`,face:`passport`},{value:`PA`,title:`documents.personal_document.options.type.PA`,face:`biometric`},{value:`ID`,title:`documents.personal_document.options.type.ID`,face:`idcard`},{value:`DL`,title:`documents.personal_document.options.type.DL`,face:`licence`},{value:`RP`,title:`documents.personal_document.options.type.RP`,face:`residence`},{value:`TP`,title:`documents.personal_document.options.type.TP`,face:`protection`},{value:`MIL`,title:`documents.personal_document.options.type.MIL`,face:`military`},{value:`TIN`,title:`documents.personal_document.options.type.TIN`,face:`tax`},{value:`SSN`,title:`documents.personal_document.options.type.SSN`,face:`social`},{value:`V`,title:`documents.personal_document.options.type.V`,face:`visa`},{value:`WP`,title:`documents.personal_document.options.type.WP`,face:`workpermit`},{value:`MC`,title:`documents.personal_document.options.type.MC`,face:`medical`},{value:`INS`,title:`documents.personal_document.options.type.INS`,face:`insurance`},{value:`BR`,title:`documents.personal_document.options.type.BR`,face:`birth`},{value:`MAR`,title:`documents.personal_document.options.type.MAR`,face:`marriage`},{value:`DIV`,title:`documents.personal_document.options.type.DIV`,face:`divorce`},{value:`DEA`,title:`documents.personal_document.options.type.DEA`,face:`death`},{value:`EDU`,title:`documents.personal_document.options.type.EDU`,face:`diploma`},{value:`VAC`,title:`documents.personal_document.options.type.VAC`,face:`vaccination`},{value:`OT`,title:`documents.personal_document.options.type.OT`}]})},number:{number:e.identifier({label:`documents.personal_document.fields.number`,rules:{max:50}})},photo:{portrait:e.image({label:`documents.personal_document.fields.portrait`})},meta:{surname:e.string({label:`documents.personal_document.fields.surname`,rules:{max:100},ui:{span:6}}),given_names:e.string({label:`documents.personal_document.fields.given_names`,rules:{max:200},ui:{span:6}}),birth_date:e.date({label:`documents.personal_document.fields.birth_date`,ui:{span:4}}),sex:e.string({label:`documents.personal_document.fields.sex`,strict:!0,noSearch:!0,options:[{value:`M`,title:`documents.personal_document.options.sex.M`},{value:`F`,title:`documents.personal_document.options.sex.F`}],ui:{span:4,faces:[`passport`,`biometric`,`idcard`,`licence`,`residence`,`protection`,`military`,`visa`]}}),nationality:e.string({label:`documents.personal_document.fields.nationality`,options:`countries`,strict:!0,noSearch:!0,ui:{span:4,faces:[`passport`,`biometric`,`idcard`,`licence`,`residence`,`protection`,`military`,`visa`]}})},footer:{issued:e.date({label:`documents.personal_document.fields.issued`,ui:{span:4}}),authority:e.string({label:`documents.personal_document.fields.authority`,rules:{max:200},ui:{span:4}}),record_no:e.string({label:`documents.personal_document.fields.record_no`,rules:{max:50},ui:{span:4}})},mrz:{mrz:e.mrz({label:`documents.personal_document.fields.mrz`,rules:{max:200}})}}),expires:e.reminder({label:`documents.personal_document.fields.expires`,rules:{lead:60}}),owner:e.relation({label:`documents.personal_document.fields.owner`,options:t({library:`people`,shelf:`person`}),ui:{span:6}}),storage:e.relation({label:`documents.personal_document.fields.storage`,options:t({library:`things`,shelf:`storage_location`}),ui:{span:6}}),photos:e.image({label:`documents.personal_document.fields.photos`,multiple:!0}),tags:e.tags({label:`documents.personal_document.fields.tags`}),notes:e.text({label:`documents.personal_document.fields.notes`,rules:{max:1e3}})}}),s=a({id:`person_identity`,label:`documents.person_identity.label`,icon:`lucide:globe`,attachTo:[{library:`people`,shelf:`person`}],agent:`Canonical person identity (not tied to a physical document).
|
|
2
2
|
nationality — ISO alpha-2. variants — given/family name per language (field.keyed by lang: name+surname).`,fields:{nationality:e.string({label:`documents.person_identity.fields.nationality`,options:`countries`,strict:!0,noSearch:!0}),variants:e.keyed({label:`documents.person_identity.fields.variants`,icon:`lucide:languages`,fields:{lang:e.string({label:`documents.person_identity.variants.lang`,options:`languages`,strict:!0,noSearch:!0}),name:e.string({label:`documents.person_identity.variants.name`}),surname:e.string({label:`documents.person_identity.variants.surname`})},by:`lang`})}}),c=i({id:`documents`,version:`1.0.0`,dependsOn:[`people`,`things`],label:`documents.plugin.label`,description:`documents.plugin.description`,libraries:[{meta:r({id:`documents`,label:`documents.library.label`,icon:`lucide:id-card`,agent:{description:`Personal documents — IDs, passports, licences (personal_document); tracks expiry.`,instructions:`Expiring documents — count by expires. When a document is reissued — update number/issued/expires via update_record.`},starterHint:`documents that are about to expire`}),shelves:[o]}],extends_:[s]});export{c as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{n as e,r as t}from"./fields-
|
|
1
|
+
import{n as e,r as t}from"./fields-Ce51pRua.js";import{a as n}from"./shelf-DjiUBfgQ.js";import{i as r,n as i}from"./plugin-Cjr7lgQH.js";var a=n({shelf:`meter_reading`,library:`home`,label:`home.meter_reading.label`,icon:`lucide:gauge`,agent:`Utility meter readings for a date. name — reading period, e.g. "2026-05".
|
|
2
2
|
date — reading date. cold_water/hot_water — water meter readings (m³).
|
|
3
3
|
electricity — electricity meter reading (kWh). gas — gas meter reading (m³).
|
|
4
|
-
Stores RAW cumulative readings, not consumption (the difference is a derived calculation).`,views:{title:`date`,inline:[`date`],list:[`cold_water`,`hot_water`,`electricity`,`gas`]},fields:{date:e.date({label:`home.meter_reading.fields.date`,rules:{min:`2000-01-01`,max:`today`},ui:{span:12}}),cold_water:e.real({label:`home.meter_reading.fields.cold_water`,rules:{min:0},ui:{span:3}}),hot_water:e.real({label:`home.meter_reading.fields.hot_water`,rules:{min:0},ui:{span:3}}),electricity:e.real({label:`home.meter_reading.fields.electricity`,rules:{min:0},ui:{span:3}}),gas:e.real({label:`home.meter_reading.fields.gas`,rules:{min:0},ui:{span:3}}),notes:e.text({label:`home.meter_reading.fields.notes`,rules:{max:500}})}}),o=n({shelf:`room`,library:`home`,label:`home.room.label`,icon:`lucide:door-open`,agent:`A room/space in the apartment. name — name (Bedroom, Kitchen). area — area (m²). This is a reference list of places: a target for relations from material (where a material was used). Does not store the materials themselves.`,views:{inline:[`name`],list:[`area`]},fields:{name:e.title({label:`core.fields.name`}),description:e.text({label:`home.room.fields.description`,rules:{max:1e3}}),area:e.measured({label:`home.room.fields.area`,units:`area`,rules:{min:0}}),notes:e.text({label:`home.room.fields.notes`,rules:{max:500}})}}),s=n({shelf:`material`,library:`home`,label:`home.material.label`,icon:`lucide:paint-roller`,agent:`A material/paint used in renovation. One record = a specific product (e.g. "Dulux Easycare, RAL 9010"). name — name, type — category, brand — manufacturer, color/color_code — color and tint code. rooms — relation to home/room (where used, can be several). price/quantity/store/bought_date/link — purchase data. photo/rating/notes — photos and impressions. Does NOT store a work log/timeline — only a catalog of "what was bought and where it is used".`,views:{inline:[`name`,`color`],list:[`type`,`color`,`brand`,`rooms`]},fields:{name:e.title({label:`core.fields.name`}),description:e.text({label:`home.material.fields.description`,rules:{max:1e3}}),group:e.group({label:`home.material.group.identity`,icon:`lucide:tag`,scope:`hoist`,fields:{type:e.string({label:`core.fields.type`,strict:!0,noSearch:!0,options:[{value:`paint`,title:`home.material.options.type.paint`},{value:`primer`,title:`home.material.options.type.primer`},{value:`lacquer`,title:`home.material.options.type.lacquer`},{value:`enamel`,title:`home.material.options.type.enamel`},{value:`plaster`,title:`home.material.options.type.plaster`},{value:`tile`,title:`home.material.options.type.tile`},{value:`laminate`,title:`home.material.options.type.laminate`},{value:`wallpaper`,title:`home.material.options.type.wallpaper`},{value:`skirting`,title:`home.material.options.type.skirting`},{value:`panel`,title:`home.material.options.type.panel`},{value:`putty`,title:`home.material.options.type.putty`},{value:`glue`,title:`home.material.options.type.glue`},{value:`cement`,title:`home.material.options.type.cement`},{value:`drywall`,title:`home.material.options.type.drywall`},{value:`insulation`,title:`home.material.options.type.insulation`},{value:`fixture`,title:`home.material.options.type.fixture`},{value:`plumbing`,title:`home.material.options.type.plumbing`},{value:`other`,title:`home.material.options.type.other`}]}),brand:e.string({label:`home.material.fields.brand`,rules:{max:120}}),color:e.color({label:`home.material.fields.color`}),color_code:e.string({label:`home.material.fields.color_code`,rules:{max:60}}),rooms:e.relation({label:`home.material.fields.rooms`,options:t({library:`home`,shelf:`room`}),multiple:!0})}}),ledger:e.ledger({label:`home.material.group.purchase`,icon:`lucide:shopping-cart`,fields:{price:e.
|
|
4
|
+
Stores RAW cumulative readings, not consumption (the difference is a derived calculation).`,views:{title:`date`,inline:[`date`],list:[`cold_water`,`hot_water`,`electricity`,`gas`]},fields:{date:e.date({label:`home.meter_reading.fields.date`,rules:{min:`2000-01-01`,max:`today`},ui:{span:12}}),cold_water:e.real({label:`home.meter_reading.fields.cold_water`,rules:{min:0},ui:{span:3}}),hot_water:e.real({label:`home.meter_reading.fields.hot_water`,rules:{min:0},ui:{span:3}}),electricity:e.real({label:`home.meter_reading.fields.electricity`,rules:{min:0},ui:{span:3}}),gas:e.real({label:`home.meter_reading.fields.gas`,rules:{min:0},ui:{span:3}}),notes:e.text({label:`home.meter_reading.fields.notes`,rules:{max:500}})}}),o=n({shelf:`room`,library:`home`,label:`home.room.label`,icon:`lucide:door-open`,agent:`A room/space in the apartment. name — name (Bedroom, Kitchen). area — area (m²). This is a reference list of places: a target for relations from material (where a material was used). Does not store the materials themselves.`,views:{inline:[`name`],list:[`area`]},fields:{name:e.title({label:`core.fields.name`}),description:e.text({label:`home.room.fields.description`,rules:{max:1e3}}),area:e.measured({label:`home.room.fields.area`,units:`area`,rules:{min:0}}),notes:e.text({label:`home.room.fields.notes`,rules:{max:500}})}}),s=n({shelf:`material`,library:`home`,label:`home.material.label`,icon:`lucide:paint-roller`,agent:`A material/paint used in renovation. One record = a specific product (e.g. "Dulux Easycare, RAL 9010"). name — name, type — category, brand — manufacturer, color/color_code — color and tint code. rooms — relation to home/room (where used, can be several). price/quantity/store/bought_date/link — purchase data. photo/rating/notes — photos and impressions. Does NOT store a work log/timeline — only a catalog of "what was bought and where it is used".`,views:{inline:[`name`,`color`],list:[`type`,`color`,`brand`,`rooms`]},fields:{name:e.title({label:`core.fields.name`}),description:e.text({label:`home.material.fields.description`,rules:{max:1e3}}),group:e.group({label:`home.material.group.identity`,icon:`lucide:tag`,scope:`hoist`,fields:{type:e.string({label:`core.fields.type`,strict:!0,noSearch:!0,options:[{value:`paint`,title:`home.material.options.type.paint`},{value:`primer`,title:`home.material.options.type.primer`},{value:`lacquer`,title:`home.material.options.type.lacquer`},{value:`enamel`,title:`home.material.options.type.enamel`},{value:`plaster`,title:`home.material.options.type.plaster`},{value:`tile`,title:`home.material.options.type.tile`},{value:`laminate`,title:`home.material.options.type.laminate`},{value:`wallpaper`,title:`home.material.options.type.wallpaper`},{value:`skirting`,title:`home.material.options.type.skirting`},{value:`panel`,title:`home.material.options.type.panel`},{value:`putty`,title:`home.material.options.type.putty`},{value:`glue`,title:`home.material.options.type.glue`},{value:`cement`,title:`home.material.options.type.cement`},{value:`drywall`,title:`home.material.options.type.drywall`},{value:`insulation`,title:`home.material.options.type.insulation`},{value:`fixture`,title:`home.material.options.type.fixture`},{value:`plumbing`,title:`home.material.options.type.plumbing`},{value:`other`,title:`home.material.options.type.other`}]}),brand:e.string({label:`home.material.fields.brand`,rules:{max:120}}),color:e.color({label:`home.material.fields.color`}),color_code:e.string({label:`home.material.fields.color_code`,rules:{max:60}}),rooms:e.relation({label:`home.material.fields.rooms`,options:t({library:`home`,shelf:`room`}),multiple:!0})}}),ledger:e.ledger({label:`home.material.group.purchase`,icon:`lucide:shopping-cart`,fields:{price:e.measured({label:`home.material.fields.price`,units:`currency`,rules:{min:0}}),quantity:e.measured({label:`home.material.fields.quantity`,units:[{value:`l`,label:`core.units.l`},{value:`kg`,label:`core.units.kg`},{value:`m2`,label:`core.units.m2`},{value:`pcs`,label:`core.units.pcs`}],rules:{min:0}}),store:e.string({label:`home.material.fields.store`,rules:{max:120}}),bought_date:e.date({label:`home.material.fields.bought_date`,rules:{max:`today`}}),link:e.link({label:`home.material.fields.link`})}}),group2:e.group({label:`home.material.group.media`,icon:`lucide:image`,scope:`hoist`,fields:{photo:e.image({label:`home.material.fields.photo`,multiple:!0}),rating:e.rating({label:`home.material.fields.rating`,rules:{max:5}})}}),notes:e.text({label:`home.material.fields.notes`,rules:{max:2e3}})}}),c=i({id:`home`,version:`1.0.0`,dependsOn:[],label:`home.plugin.label`,description:`home.plugin.description`,libraries:[{meta:r({id:`home`,label:`home.library.label`,icon:`lucide:house`,agent:{description:`The home itself — renovation materials, utility meter readings, rooms.`,instructions:`meter_reading readings are cumulative; consumption over a period = difference between adjacent dates. New meter readings — create_record meter_reading (do NOT edit old ones); used up a material — update material.quantity via update_record.`},starterHint:`meter readings that are overdue, or renovation materials running low`}),shelves:[a,o,s]}]});export{c as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e}from"./fields-
|
|
1
|
+
import{n as e}from"./fields-Ce51pRua.js";import{n as t}from"./plugin-Cjr7lgQH.js";import{t as n}from"./settings-BEzSaRjz.js";var r=1800,i=32e3,a=64e3,o=`claude-sonnet-5`,s=`claude-opus-5`,c=[{value:`haiku`,id:`claude-haiku-4-5`,name:`Haiku 4.5`,effort:``,reasoning:!1,maxOutput:a},{value:`sonnet-low`,id:o,name:`Sonnet 5`,effort:`low`,reasoning:!1,maxOutput:i},{value:`sonnet-medium`,id:o,name:`Sonnet 5`,effort:`medium`,reasoning:!1,maxOutput:i},{value:`sonnet-high`,id:o,name:`Sonnet 5`,effort:`high`,reasoning:!0,maxOutput:i},{value:`opus-low`,id:s,name:`Opus 5`,effort:`low`,reasoning:!1,maxOutput:i},{value:`opus-medium`,id:s,name:`Opus 5`,effort:`medium`,reasoning:!0,maxOutput:i},{value:`opus-high`,id:s,name:`Opus 5`,effort:`high`,reasoning:!0,maxOutput:i}];function l(e){return[e.effort,e.reasoning?`thinking`:``].filter(Boolean).join(` · `)}var u=t({id:`claude-agent`,version:`1.0.0`,dependsOn:[],label:`claude-agent.plugin.label`,description:`claude-agent.plugin.description`,fieldContribs:[{library:`_settings`,shelf:`system`,field:`agent_id`,options:[{value:`claude-agent`,title:`claude-agent.plugin.label`}]}],settings:n({label:`claude-agent.settings.label`,fields:{group:e.group({label:`claude-agent.settings.groups.runtime`,icon:`lucide:bot`,scope:`hoist`,fields:{auth_mode:e.string({label:`claude-agent.settings.auth_mode`,default:`subscription`,strict:!0,noSearch:!0,options:[{value:`subscription`,title:`claude-agent.settings.auth_mode_subscription`},{value:`api_key`,title:`claude-agent.settings.auth_mode_api_key`}]}),anthropic_api_key:e.password({label:`claude-agent.settings.anthropic_api_key`,ui:{hidden:{auth_mode:{$ne:`api_key`}}}}),claude_model:e.string({label:`claude-agent.settings.claude_model`,default:`haiku`,strict:!0,noSearch:!0,options:c.map(e=>{let t=l(e);return{value:e.value,title:e.name,...t?{subtitle:t}:{}}})}),skip_permissions:e.boolean({label:`claude-agent.settings.skip_permissions`,default:!0}),response_timeout:e.int({label:`claude-agent.settings.response_timeout`,default:r})}}),group2:e.group({label:`claude-agent.settings.groups.rag`,icon:`lucide:search`,scope:`hoist`,fields:{rag_enabled:e.boolean({label:`claude-agent.settings.rag_enabled`,default:!0}),openai_api_key:e.password({label:`claude-agent.settings.openai_api_key`})}}),group3:e.group({label:`claude-agent.settings.groups.langfuse`,icon:`lucide:activity`,scope:`hoist`,fields:{tracing_enabled:e.boolean({label:`claude-agent.settings.tracing_enabled`}),langfuse_base_url:e.string({label:`claude-agent.settings.langfuse_base_url`}),langfuse_public_key:e.password({label:`claude-agent.settings.langfuse_public_key`}),langfuse_secret_key:e.password({label:`claude-agent.settings.langfuse_secret_key`})}})}})});export{u as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e}from"./fields-
|
|
1
|
+
import{n as e}from"./fields-Ce51pRua.js";import{n as t}from"./plugin-Cjr7lgQH.js";import{t as n}from"./settings-BEzSaRjz.js";var r=t({id:`http`,version:`1.0.0`,dependsOn:[],label:`http.plugin.label`,description:`http.plugin.description`,settings:n({label:`http.settings.label`,fields:{port:e.int({label:`http.settings.port`})}})});export{r as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e}from"./fields-
|
|
1
|
+
import{n as e}from"./fields-Ce51pRua.js";import{a as t}from"./shelf-DjiUBfgQ.js";import{i as n,n as r}from"./plugin-Cjr7lgQH.js";var i=t({shelf:`person`,library:`people`,label:`people.person.label`,icon:`lucide:user`,agent:`A person card. fullName — the full name (first + last), used as the title.`,views:{inline:[`logo`,`fullName`],list:[`birthDate`],select:{icon:`logo`,title:`fullName`,subtitle:`birthDate`}},fields:{identity:e.identity({avatar:{logo:e.avatar({label:`people.person.fields.logo`})},name:{fullName:e.title({label:`people.person.fields.fullName`})}}),bio:e.prose({fields:{description:e.text({label:`people.person.fields.description`,rules:{max:500}})}}),hairline:e.divider(),properties:e.properties({columns:4,fields:{occupation:e.string({label:`people.person.fields.occupation`,rules:{max:200},ui:{span:3}}),birthDate:e.age({label:`people.person.fields.birthDate`,rules:{min:`1900-01-01`,max:`today`},ui:{span:3}}),sex:e.string({label:`people.person.fields.sex`,strict:!0,noSearch:!0,options:`sex`,ui:{span:3}}),phone:e.tel({label:`people.person.fields.phone`,ui:{span:3}}),email:e.email({label:`people.person.fields.email`,ui:{span:6}}),address:e.text({label:`people.person.fields.address`,rules:{max:300},ui:{span:6}})}}),photos:e.image({label:`people.person.fields.photos`,multiple:!0}),tags:e.tags({label:`people.person.fields.tags`}),notes:e.text({label:`people.person.fields.notes`,rules:{max:1e3}})}}),a=r({id:`people`,version:`1.0.0`,dependsOn:[],label:`people.plugin.label`,description:`people.plugin.description`,libraries:[{meta:n({id:`people`,label:`people.library.label`,icon:`lucide:users`,agent:{description:`People (person) — contacts, birthdays, jobs; referenced by health, travel, and others.`,instructions:`Count birthdays by birthDate. When contacts/address/job change — update the relevant fields via update_record.`}}),shelves:[i]}]});export{a as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e}from"./fields-Ce51pRua.js";import{a as t}from"./shelf-DjiUBfgQ.js";import{i as n,n as r}from"./plugin-Cjr7lgQH.js";import{t as i}from"./settings-BEzSaRjz.js";var a=t({shelf:`title`,library:`media`,label:`media.title.label`,icon:`lucide:clapperboard`,agent:`A movie or series in the watchlist. name — the title. kind — movie/series. status — viewing intent (want=added to the list, not in Jellyfin yet / unwatched=in Jellyfin, not watched / watching / watched / dropped). in_library, jellyfin_id and source are mirrored from Jellyfin — do not edit manually when source=jellyfin (sync will overwrite).`,views:{list:[`kind`,`status`,`year`,`imdb_rating`],groupBy:[`kind`,`status`,`genres`,`year`,`source`]},fields:{name:e.title({label:`core.fields.name`}),about:e.illustrated({label:`media.title.fields.about`,fields:{image:e.poster({}),text:e.text({rules:{max:2e3}})}}),top_meta:e.stats({fields:{year:e.int({label:`media.title.fields.year`}),kind:e.string({label:`media.title.fields.kind`,strict:!0,noSearch:!0,options:[{value:`movie`,title:`media.title.options.kind.movie`},{value:`series`,title:`media.title.options.kind.series`}]}),status:e.string({label:`media.title.fields.status`,strict:!0,noSearch:!0,options:[{value:`want`,title:`media.title.options.status.want`},{value:`unwatched`,title:`media.title.options.status.unwatched`},{value:`watching`,title:`media.title.options.status.watching`},{value:`watched`,title:`media.title.options.status.watched`},{value:`dropped`,title:`media.title.options.status.dropped`}]}),runtime:e.duration({label:`media.title.fields.runtime`})}}),split_progress:e.split({ratio:[1,1],columns:[{scores:e.mediaRating({label:`media.title.fields.scores`,max:10,source:{imdb_rating:e.real({label:`media.title.fields.imdb_rating`}),tmdb_rating:e.real({label:`media.title.fields.tmdb_rating`})}})},{progress:e.facets({fields:{seasons:e.int({label:`media.title.fields.seasons`,rules:{min:0},ui:{hidden:{kind:{$ne:`series`}}}}),episodes:e.int({label:`media.title.fields.episodes`,rules:{min:0},ui:{hidden:{kind:{$ne:`series`}}}}),watched_date:e.date({label:`media.title.fields.watched_date`})}})}]}),properties:e.properties({columns:3,fields:{tmdb_id:e.identifier({label:`media.title.fields.tmdb_id`,rules:{max:32}}),imdb_id:e.identifier({label:`media.title.fields.imdb_id`,rules:{max:32}}),jellyfin_id:e.link({label:`media.title.fields.jellyfin_id`,rules:{max:300}}),link:e.link({label:`media.title.fields.link`})}}),split_meta:e.grid({columns:3,fields:{genres:e.tags({label:`media.title.fields.genres`}),in_library:e.boolean({label:`media.title.fields.in_library`}),source:e.string({label:`media.title.fields.source`,default:`manual`,strict:!0,noSearch:!0,options:[{value:`manual`,title:`media.title.options.source.manual`},{value:`jellyfin`,title:`media.title.options.source.jellyfin`},{value:`agent`,title:`media.title.options.source.agent`}]})}}),notes:e.text({label:`media.title.fields.notes`,rules:{max:2e3}})}}),o=r({id:`media`,version:`1.0.0`,dependsOn:[],label:`media.plugin.label`,description:`media.plugin.description`,libraries:[{meta:n({id:`media`,label:`media.library.label`,icon:`lucide:clapperboard`,agent:{description:`Movies and series watchlist (title) — tracked against a Jellyfin library.`,instructions:`status: want=added to the list, not in Jellyfin yet; unwatched=in Jellyfin, not watched; watching; watched; dropped. in_library, jellyfin_id and source are mirrored from Jellyfin — do not edit manually when source=jellyfin. To add a movie by name — search_titles (review candidates) then add_title.`}}),shelves:[a]}],settings:i({label:`media.settings.label`,fields:{tmdb_key:e.password({label:`media.settings.tmdb_key`}),omdb_key:e.password({label:`media.settings.omdb_key`}),jellyfin_url:e.string({label:`media.settings.jellyfin_url`}),jellyfin_token:e.password({label:`media.settings.jellyfin_token`}),jellyfin_user_id:e.string({label:`media.settings.jellyfin_user_id`}),button:e.button({label:`media.settings.test_button`,value:`media.testJellyfin`,icon:`lucide:wifi`}),button2:e.button({label:`media.settings.sync_button`,value:`media.syncJellyfin`,icon:`lucide:refresh-cw`})}})});export{o as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e,r as t,t as n}from"./src-BpG7q6Ng.js";export{e as cal,n as default,t as recurrence};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e}from"./fields-
|
|
1
|
+
import{n as e}from"./fields-Ce51pRua.js";import{n as t}from"./plugin-Cjr7lgQH.js";import{t as n}from"./settings-BEzSaRjz.js";var r=t({id:`webexport`,version:`1.0.0`,dependsOn:[],label:`webexport.plugin.label`,description:`webexport.plugin.description`,libraries:[],settings:n({label:`webexport.settings.label`,icon:`lucide:folder-output`,fields:{output_dir:e.localDir({label:`webexport.settings.output_dir`})}})});export{r as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{D as e,N as t,R as n,j as r,k as i,n as a,r as o,w as s}from"./fields-
|
|
1
|
+
import{D as e,N as t,R as n,j as r,k as i,n as a,r as o,w as s}from"./fields-Ce51pRua.js";import{a as c}from"./shelf-DjiUBfgQ.js";import{i as l,n as u}from"./plugin-Cjr7lgQH.js";import{t as d}from"./extend-CHOe1AVl.js";import{i as f}from"./ical-FRtCagm-.js";function p(a){if(a.multiple)throw Error("cal.recurrence: `multiple` is not supported — a record holds one series");let o=s(a),c=n().superRefine((e,n)=>{f(e)&&n.addIssue({code:t.custom,message:r(`pattern`,{messageKey:`calendar.validation.rrule`})})});return e(void 0,o,{kind:`recurrence`,label:o.label??``,prim:`recurrence`,column:`text`,hints:{...a.exdates?{exdates:a.exdates}:{},...a.overrides?{overrides:a.overrides}:{},...a.allDay?{allDay:a.allDay}:{}},zod:i(c)})}var m={recurrence:p},h=c({shelf:`entry`,library:`calendar`,label:`calendar.entry.label`,icon:`lucide:calendar-days`,agent:"An event or a task on the household calendar. `type` decides which: an event has a start and an end in `when`; a task has its due date in `when.until` and priority/percent/completed in its task_details extend. Recurrence is an RRULE in `recurrence` with exceptions in `exdates`; a per-instance change is a separate record with `master` = the series and `recurrenceId` = the instance it replaces. The shelf is served to phones over CalDAV at /dav/calendars/entry/. Leave `uid` and `ics` alone: they belong to the sync.",views:{listKind:`calendar-ilamy`,list:[`when`,`type`,`location`,`status`],inline:[`summary`,`when`],groupBy:[`type`,`status`],defaultGroupBy:`type`},fields:{summary:a.title({label:`calendar.entry.fields.summary`}),description:a.text({label:`calendar.entry.fields.description`,rules:{max:5e3}}),when:a.period({label:`calendar.entry.fields.when`,rules:{granularity:`datetime`}}),allDay:a.boolean({label:`calendar.entry.fields.allDay`}),location:a.string({label:`calendar.entry.fields.location`,rules:{max:300}}),recurrence:m.recurrence({label:`calendar.entry.fields.recurrence`,exdates:`exdates`,overrides:{master:`master`,at:`recurrenceId`},allDay:`allDay`}),exdates:a.datetime({label:`calendar.entry.fields.exdates`,multiple:!0}),master:a.relation({label:`calendar.entry.fields.master`,options:o({library:`calendar`,shelf:`entry`})}),recurrenceId:a.datetime({label:`calendar.entry.fields.recurrenceId`}),type:a.string({label:`core.fields.type`,strict:!0,noSearch:!0,default:`event`,options:[{value:`event`,title:`calendar.entry.options.type.event`},{value:`task`,title:`calendar.entry.options.type.task`}]}),status:a.string({label:`calendar.entry.fields.status`,strict:!0,noSearch:!0,options:[{value:`tentative`,title:`calendar.entry.options.status.tentative`,when:{type:`event`}},{value:`confirmed`,title:`calendar.entry.options.status.confirmed`,when:{type:`event`}},{value:`needs-action`,title:`calendar.entry.options.status.needs_action`,when:{type:`task`}},{value:`in-process`,title:`calendar.entry.options.status.in_process`,when:{type:`task`}},{value:`completed`,title:`calendar.entry.options.status.completed`,when:{type:`task`}},{value:`cancelled`,title:`calendar.entry.options.status.cancelled`}]}),uid:a.string({label:`calendar.entry.fields.uid`,rules:{max:255},ui:{emphasis:`muted`}}),ics:a.source({label:`calendar.entry.fields.ics`,rules:{ext:`ics`},ui:{emphasis:`muted`}}),tags:a.tags({label:`calendar.entry.fields.tags`}),notes:a.text({label:`calendar.entry.fields.notes`,rules:{max:2e3}})}}),g=d({id:`task_details`,label:`calendar.task_details.label`,icon:`lucide:check-square`,attachTo:[{library:`calendar`,shelf:`entry`}],showWhen:{type:`task`},fields:{priority:a.int({label:`calendar.task_details.fields.priority`,rules:{min:0,max:9}}),percent:a.percent({label:`calendar.task_details.fields.percent`}),completed:a.datetime({label:`calendar.task_details.fields.completed`})}}),_=u({id:`calendar`,version:`1.0.0`,dependsOn:[`dav`],label:`calendar.plugin.label`,description:`calendar.plugin.description`,libraries:[{meta:l({id:`calendar`,label:`calendar.library.label`,icon:`lucide:calendar-days`,agent:`The household calendar: events and tasks, also served to phones over CalDAV.`}),shelves:[h]}],extends_:[g]});export{m as n,p as r,_ as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{B as e,D as t,F as n,I as r,L as i,N as a,O as o,P as s,R as c,T as l,j as u,k as d,n as f,r as p,w as m,z as h}from"./fields-CV3RQg0Y.js";import{a as g}from"./shelf-Cj_pNvd-.js";import{i as _,n as v}from"./plugin-Cjr7lgQH.js";import{t as y}from"./extend-yQ8zoqGc.js";import{t as b}from"./settings-Bo5IOwVg.js";import{i as x,r as S,s as C}from"./data-size-BMG0D59K.js";import{t as w}from"./showcase-BeBnutzT.js";var T=(t,n)=>e().superRefine((e,r)=>{t.safeParse(o(e)).success||r.addIssue({code:a.custom,message:u(n)})}),E=()=>r().int().min(0).max(255),D=()=>r().int().min(0).max(65535),O=h([E(),E(),E(),E()]),k=h([D(),D(),D(),D(),D(),D(),D(),D()]),A=i({v:n(4),a:O}),j=i({v:n(6),a:k}),M=s(`v`,[A,j]);function N(e){let n=m(e),r=T(M,`ip_structure`);return t(void 0,n,l({kind:`ip`,label:n.label??``,prim:`ip`,column:`text`,hints:{},zod:d(r)},n.multiple??!1))}var P=/^([0-9A-Fa-f]{2}[:-]){5}[0-9A-Fa-f]{2}$/;function F(e){let n=m(e),r=c().regex(P,{message:u(`pattern`,{messageKey:`core.presets.mac`})});return t(void 0,n,l({kind:`text`,label:n.label??``,prim:`text`,column:`text`,hints:{mask:`macAddress`,voice:`data`},zod:d(r)},n.multiple??!1))}var I=/^[A-Za-z0-9_]([A-Za-z0-9_-]{0,61}[A-Za-z0-9_])?(\.[A-Za-z0-9_]([A-Za-z0-9_-]{0,61}[A-Za-z0-9_])?)*$/;function L(e){let n=m(e),r=c().regex(I,{message:u(`pattern`,{messageKey:`core.presets.hostname`})});return t(void 0,n,l({kind:`text`,label:n.label??``,prim:`text`,column:`text`,hints:{voice:`data`},zod:d(r)},n.multiple??!1))}var R=/^\d{15}$/;function z(e){let t=0,n=!1;for(let r=e.length-1;r>=0;r--){let i=e.charCodeAt(r)-48;n&&(i*=2,i>9&&(i-=9)),t+=i,n=!n}return t%10==0}function B(e){let n=m(e),r=c().regex(R,{message:u(`pattern`,{messageKey:`core.presets.imei`})}).refine(z,{message:u(`pattern`,{messageKey:`core.presets.imei`})});return t(void 0,n,l({kind:`text`,label:n.label??``,prim:`text`,column:`text`,hints:{voice:`data`},zod:d(r)},n.multiple??!1))}var V=s(`v`,[A.extend({p:r().int().min(0).max(32)}),j.extend({p:r().int().min(0).max(128)})]);function H(e){let n=m(e),r=T(V,`cidr_structure`);return t(void 0,n,l({kind:`cidr`,label:n.label??``,prim:`cidr`,column:`text`,hints:{},zod:d(r)},n.multiple??!1))}var U=g({shelf:`network`,library:`devices`,label:`devices.network.label`,icon:`lucide:globe`,agent:`A network segment. subnet — CIDR. gateway — the gateway. domain — the segment's DNS suffix (e.g. lan → host FQDN = hostname.lan).`,views:{list:[`subnet`,`gateway`,`dnsPrimary`]},fields:{name:f.title({label:`core.fields.name`}),description:f.text({label:`devices.network.fields.description`,rules:{max:1e3}}),facets:f.facets({fields:{vlan:f.int({label:`devices.network.fields.vlan`,rules:{min:1,max:4094}}),domain:L({label:`devices.network.fields.domain`})}}),ledger:f.ledger({fields:{subnet:H({label:`devices.network.fields.subnet`}),gateway:N({label:`devices.network.fields.gateway`}),dnsPrimary:N({label:`devices.network.fields.dnsPrimary`}),dnsFallback:N({label:`devices.network.fields.dnsFallback`}),poolStart:N({label:`devices.network.fields.poolStart`}),poolEnd:N({label:`devices.network.fields.poolEnd`})}}),notes:f.text({label:`devices.network.fields.notes`,rules:{max:2e3}})}}),W=[`access`,`infra`,`monitoring`,`database`,`automation`,`network`,`media`,`lighting`,`files`,`backup`,`downloads`,`finance`,`calendars`,`communication`,`web`,`ai`,`devices`,`other`].map(e=>({value:e,title:`devices.service.cat.${e}`})),G=[{value:`http`,title:`devices.accessTypes.http`},{value:`https`,title:`devices.accessTypes.https`},{value:`ssh`,title:`devices.accessTypes.ssh`},{value:`mysql`,title:`devices.accessTypes.mysql`},{value:`mqtt`,title:`devices.accessTypes.mqtt`},{value:`ws`,title:`devices.accessTypes.ws`},{value:`dns`,title:`devices.accessTypes.dns`},{value:`other`,title:`devices.accessTypes.other`}],K={http:`http`,https:`https`,ssh:`ssh`,mysql:`mysql`,mqtt:`mqtt`,ws:`ws`,wss:`ws`,dns:`dns`},q=g({shelf:`service`,library:`devices`,label:`devices.service_catalog.label`,icon:`lucide:layers`,agent:`Catalog of network service types. name — human-readable name (custom, not translated). code — slug (auto-link key from the scanner). category — tag slugs (multi; SERVICE_CATEGORIES as hints). description_mode — description source: 'key' (i18n key in the description field) or 'own' (free text in the description_text field). SERVICE_META defaults → 'key' + devices.service.desc.<code>; user records are usually 'own'.`,views:{list:[`code`,`category`]},fields:{name:f.title({label:`core.fields.name`}),description_mode:f.string({label:`devices.service.description_mode`,options:[{value:`key`,title:`devices.service.description_mode_key`},{value:`own`,title:`devices.service.description_mode_own`}],default:`key`,strict:!0,noSearch:!0}),description:f.i18n({label:`devices.service.description`,rules:{max:1e3},ui:{hidden:{description_mode:{$ne:`key`}}}}),description_text:f.text({label:`devices.service.description`,rules:{max:1e3},ui:{hidden:{description_mode:{$ne:`own`}}}}),code:f.string({label:`devices.service.code`,rules:{max:60}}),category:f.string({label:`devices.service.category`,options:[...W],multiple:!0,strict:!0,noSearch:!0})}}),J=(e,t)=>{let n=e?.[t];return typeof n==`number`&&Number.isFinite(n)&&n>=0?n:null},Y=({parent:e})=>{let t=J(e,`used`),n=J(e,`free`);return t==null||n==null||t+n===0?null:Math.round(t/(t+n)*1e3)/10},X=80,Z=95,Q=y({id:`device_info`,label:`devices.device_info.label`,icon:`lucide:monitor`,attachTo:[{library:`things`,shelf:`item`}],showWhen:{type:`device`},agent:{description:`Network and technical specs of a device. hostname — FQDN on the LAN. addresses[] — network addresses (ip/mac, multi-NIC). group — human-friendly. services[] — inline services (type/title/links[]/secrets[]). disks_usage[] — disk usage (SSH).`,instructions:`Find a host via list_records things/item with filters: { type: "device" } — network fields live under _extends.device_info on each returned record. When the software/address/location changes — update via update_record.`},fields:{facets:f.facets({fields:{group:f.string({label:`devices.device_info.fields.group`,options:`device-groups`,strict:!0,noSearch:!0}),arch:f.string({label:`devices.device_info.fields.arch`,rules:{max:30}})}}),ledger:f.ledger({fields:{hostname:f.string({label:`devices.device_info.fields.hostname`,rules:{max:120}}),vendor:f.string({label:`devices.device_info.fields.vendor`,rules:{max:80}}),model:f.string({label:`devices.device_info.fields.model`,rules:{max:120}}),os:f.string({label:`devices.device_info.fields.os`,rules:{max:100}}),kernel:f.string({label:`devices.device_info.fields.kernel`,rules:{max:100}}),cpu:f.string({label:`devices.device_info.fields.cpu`,rules:{max:150}}),gpu:f.string({label:`devices.device_info.fields.gpu`,rules:{max:150}}),ram:C({label:`devices.device_info.fields.ram`})}}),addresses:f.row({scope:`nest`,multiple:!0,label:`devices.device_info.fields.addresses`,icon:`lucide:network`,fields:{ip:N({label:`devices.device_info.fields.ip`}),mac:F({label:`devices.device_info.fields.mac`})}}),disks_usage:f.group({scope:`nest`,label:`devices.device_info.fields.disks_usage`,icon:`lucide:hard-drive`,multiple:!0,fields:{mount:f.string({label:`devices.device_info.disk.mount`,rules:{max:255}}),size:S({label:`devices.device_info.disk.size`,system:`binary`,unit:`GiB`}),used:S({label:`devices.device_info.disk.used`,system:`binary`,unit:`GiB`,mutate:[`.usage`]}),free:S({label:`devices.device_info.disk.free`,system:`binary`,unit:`GiB`,mutate:[`.usage`]}),usage:f.real({label:`devices.device_info.disk.usage`,rules:{min:0,max:100},value:Y,mutate:[`.state`]}),state:f.string({label:`devices.device_info.disk.state`,options:[{value:`ok`,title:`devices.device_info.disk_state.ok`,icon:{kind:`icon`,value:`lucide:check`}},{value:`warn`,title:`devices.device_info.disk_state.warn`,icon:{kind:`icon`,value:`lucide:minus`}},{value:`full`,title:`devices.device_info.disk_state.full`,icon:{kind:`icon`,value:`lucide:x`}}],value:e=>{let t=Y(e);return typeof t==`number`?t>=Z?`full`:t>=X?`warn`:`ok`:null},strict:!0,noSearch:!0})}}),services:f.keyed({label:`devices.device_info.fields.services`,icon:`lucide:server`,fields:{service:f.relation({label:`devices.service.type`,options:p({library:`devices`,shelf:`service`})}),description:f.smallText({label:`devices.service.description`,rules:{max:500}}),hide:f.boolean({label:`devices.service.hide`}),links:f.row({scope:`nest`,multiple:!0,label:`devices.service.links`,icon:`lucide:link`,fields:{url:f.url({label:`devices.service.url`}),access:f.string({label:`devices.service.access`,options:`access-types`,strict:!0,noSearch:!0}),visibility:f.string({label:`devices.service.visibility`,options:`visibility-types`,strict:!0,noSearch:!0})}}),secrets:f.keyValue({label:`devices.service.secrets`,fields:{value:f.password({})},multiple:!0,ui:{keyLabel:`devices.service.secretName`,valueLabel:`devices.service.secretValue`}})},by:`service`})}}),$={ssh_config_path:`~/.ssh/config`,pihole_conf_path:``,syncthing_ini_path:`~/.config/syncthingtray.ini`,gtk_bookmarks_path:`~/.config/gtk-3.0/bookmarks`,kodi_sources_path:`~/.local/share/kodi/userdata/sources.xml`,krdc_bookmarks_path:`~/.local/share/krdc/bookmarks.xml`,rclone_config_path:`~/.config/rclone/rclone.conf`,remmina_dir:`~/.local/share/remmina`,remoteview_dir:`~/.local/share/remoteview`,delfin_config_path:`~/.config/delfin/config.toml`},ee=`docker compose exec pihole pihole reloaddns`,te={ip:N,cidr:H,mac:F,hostname:L,imei:B,dataSize:S,ram:C,diskSize:x},ne=v({id:`devices`,version:`1.0.0`,dependsOn:[`things`],label:`devices.plugin.label`,description:`devices.plugin.description`,settings:b({label:`devices.settings.label`,icon:`lucide:radar`,fields:{info:f.info(`devices.settings.scan_info`),button:f.button({label:`devices.settings.scan_button`,value:`devices.runScan`,icon:`lucide:radar`}),info2:f.info(`devices.settings.secrets_help`),info3:f.info(`devices.settings.sync_targets_info`),ssh_config_path:f.localFile({label:`devices.settings.ssh_config_path`,default:$.ssh_config_path}),pihole_conf_path:f.localFile({label:`devices.settings.pihole_conf_path`,default:$.pihole_conf_path}),pihole_reload_cmd:f.string({label:`devices.settings.pihole_reload_cmd`,default:ee}),syncthing_ini_path:f.localFile({label:`devices.settings.syncthing_ini_path`,default:$.syncthing_ini_path}),gtk_bookmarks_path:f.localFile({label:`devices.settings.gtk_bookmarks_path`,default:$.gtk_bookmarks_path}),kodi_sources_path:f.localFile({label:`devices.settings.kodi_sources_path`,default:$.kodi_sources_path}),krdc_bookmarks_path:f.localFile({label:`devices.settings.krdc_bookmarks_path`,default:$.krdc_bookmarks_path}),rclone_config_path:f.localFile({label:`devices.settings.rclone_config_path`,default:$.rclone_config_path}),remmina_dir:f.localDir({label:`devices.settings.remmina_dir`,default:$.remmina_dir}),remoteview_dir:f.localDir({label:`devices.settings.remoteview_dir`,default:$.remoteview_dir}),delfin_config_path:f.localFile({label:`devices.settings.delfin_config_path`,default:$.delfin_config_path})}}),libraries:[{meta:_({id:`devices`,label:`devices.library.label`,icon:`lucide:globe`,agent:`Network subnets and the service catalog (network, service).`}),shelves:[U,q]},{meta:_({id:`hardware`,label:`devices.hardware.label`,icon:`lucide:monitor`,agent:`All owned devices (a view over things/item where type=device). No shelves of its own.`}),shelves:[]}],extends_:[Q],showcases:[w({id:`fleet`,library:`devices`,label:`devices.fleet.label`,icon:`lucide:server`,source:{library:`things`,shelf:`item`},filter:{type:`device`,tags:{$contains:`network`}},columns:[`subtype`,`brand`,`model`,`location`,`condition`],createDefaults:{type:`device`}}),w({id:`all`,library:`hardware`,label:`devices.all.label`,icon:`lucide:monitor`,source:{library:`things`,shelf:`item`},filter:{type:`device`},columns:[`subtype`,`brand`,`model`,`location`,`condition`],createDefaults:{type:`device`}})],fieldContribs:[{library:`things`,shelf:`item`,field:`type`,options:[{value:`device`,title:`devices.device_info.label`}]},{library:`things`,shelf:`item`,field:`subtype`,options:[{value:`pc`,title:`devices.deviceGroups.pc`,when:{type:`device`}},{value:`server`,title:`devices.deviceGroups.server`,when:{type:`device`}},{value:`mobile`,title:`devices.deviceGroups.mobile`,when:{type:`device`}},{value:`tv`,title:`devices.deviceGroups.tv`,when:{type:`device`}},{value:`printer`,title:`devices.deviceGroups.printer`,when:{type:`device`}},{value:`iot`,title:`devices.deviceGroups.iot`,when:{type:`device`}},{value:`network`,title:`devices.deviceGroups.network`,when:{type:`device`}},{value:`other`,title:`devices.deviceGroups.other`,when:{type:`device`}}]}],optionLists:[{name:`access-types`,options:[...G]},{name:`visibility-types`,options:[{value:`lan`,title:`devices.visibilityTypes.lan`},{value:`public`,title:`devices.visibilityTypes.public`},{value:`other`,title:`devices.visibilityTypes.other`}]},{name:`device-groups`,options:[{value:`pc`,title:`devices.deviceGroups.pc`},{value:`server`,title:`devices.deviceGroups.server`},{value:`mobile`,title:`devices.deviceGroups.mobile`},{value:`tv`,title:`devices.deviceGroups.tv`},{value:`printer`,title:`devices.deviceGroups.printer`},{value:`iot`,title:`devices.deviceGroups.iot`},{value:`network`,title:`devices.deviceGroups.network`},{value:`other`,title:`devices.deviceGroups.other`}]}]});export{L as a,F as c,H as i,ne as n,B as o,K as r,N as s,te as t};
|
|
1
|
+
import{B as e,D as t,F as n,I as r,L as i,N as a,O as o,P as s,R as c,T as l,j as u,k as d,n as f,r as p,w as m,z as h}from"./fields-Ce51pRua.js";import{a as g}from"./shelf-DjiUBfgQ.js";import{i as _,n as v}from"./plugin-Cjr7lgQH.js";import{t as y}from"./extend-CHOe1AVl.js";import{t as b}from"./settings-BEzSaRjz.js";import{i as x,r as S,s as C}from"./data-size-CO-LGHbN.js";import{t as w}from"./showcase-BeBnutzT.js";var T=(t,n)=>e().superRefine((e,r)=>{t.safeParse(o(e)).success||r.addIssue({code:a.custom,message:u(n)})}),E=()=>r().int().min(0).max(255),D=()=>r().int().min(0).max(65535),O=h([E(),E(),E(),E()]),k=h([D(),D(),D(),D(),D(),D(),D(),D()]),A=i({v:n(4),a:O}),j=i({v:n(6),a:k}),M=s(`v`,[A,j]);function N(e){let n=m(e),r=T(M,`ip_structure`);return t(void 0,n,l({kind:`ip`,label:n.label??``,prim:`ip`,column:`text`,hints:{},zod:d(r)},n.multiple??!1))}var P=/^([0-9A-Fa-f]{2}[:-]){5}[0-9A-Fa-f]{2}$/;function F(e){let n=m(e),r=c().regex(P,{message:u(`pattern`,{messageKey:`core.presets.mac`})});return t(void 0,n,l({kind:`text`,label:n.label??``,prim:`text`,column:`text`,hints:{mask:`macAddress`,voice:`data`},zod:d(r)},n.multiple??!1))}var I=/^[A-Za-z0-9_]([A-Za-z0-9_-]{0,61}[A-Za-z0-9_])?(\.[A-Za-z0-9_]([A-Za-z0-9_-]{0,61}[A-Za-z0-9_])?)*$/;function L(e){let n=m(e),r=c().regex(I,{message:u(`pattern`,{messageKey:`core.presets.hostname`})});return t(void 0,n,l({kind:`text`,label:n.label??``,prim:`text`,column:`text`,hints:{voice:`data`},zod:d(r)},n.multiple??!1))}var R=/^\d{15}$/;function z(e){let t=0,n=!1;for(let r=e.length-1;r>=0;r--){let i=e.charCodeAt(r)-48;n&&(i*=2,i>9&&(i-=9)),t+=i,n=!n}return t%10==0}function B(e){let n=m(e),r=c().regex(R,{message:u(`pattern`,{messageKey:`core.presets.imei`})}).refine(z,{message:u(`pattern`,{messageKey:`core.presets.imei`})});return t(void 0,n,l({kind:`text`,label:n.label??``,prim:`text`,column:`text`,hints:{voice:`data`},zod:d(r)},n.multiple??!1))}var V=s(`v`,[A.extend({p:r().int().min(0).max(32)}),j.extend({p:r().int().min(0).max(128)})]);function H(e){let n=m(e),r=T(V,`cidr_structure`);return t(void 0,n,l({kind:`cidr`,label:n.label??``,prim:`cidr`,column:`text`,hints:{},zod:d(r)},n.multiple??!1))}var U=g({shelf:`network`,library:`devices`,label:`devices.network.label`,icon:`lucide:globe`,agent:`A network segment. subnet — CIDR. gateway — the gateway. domain — the segment's DNS suffix (e.g. lan → host FQDN = hostname.lan).`,views:{list:[`subnet`,`gateway`,`dnsPrimary`]},fields:{name:f.title({label:`core.fields.name`}),description:f.text({label:`devices.network.fields.description`,rules:{max:1e3}}),facets:f.facets({fields:{vlan:f.int({label:`devices.network.fields.vlan`,rules:{min:1,max:4094}}),domain:L({label:`devices.network.fields.domain`})}}),ledger:f.ledger({fields:{subnet:H({label:`devices.network.fields.subnet`}),gateway:N({label:`devices.network.fields.gateway`}),dnsPrimary:N({label:`devices.network.fields.dnsPrimary`}),dnsFallback:N({label:`devices.network.fields.dnsFallback`}),poolStart:N({label:`devices.network.fields.poolStart`}),poolEnd:N({label:`devices.network.fields.poolEnd`})}}),notes:f.text({label:`devices.network.fields.notes`,rules:{max:2e3}})}}),W=[`access`,`infra`,`monitoring`,`database`,`automation`,`network`,`media`,`lighting`,`files`,`backup`,`downloads`,`finance`,`calendars`,`communication`,`web`,`ai`,`devices`,`other`].map(e=>({value:e,title:`devices.service.cat.${e}`})),G=[{value:`http`,title:`devices.accessTypes.http`},{value:`https`,title:`devices.accessTypes.https`},{value:`ssh`,title:`devices.accessTypes.ssh`},{value:`mysql`,title:`devices.accessTypes.mysql`},{value:`mqtt`,title:`devices.accessTypes.mqtt`},{value:`ws`,title:`devices.accessTypes.ws`},{value:`dns`,title:`devices.accessTypes.dns`},{value:`other`,title:`devices.accessTypes.other`}],K={http:`http`,https:`https`,ssh:`ssh`,mysql:`mysql`,mqtt:`mqtt`,ws:`ws`,wss:`ws`,dns:`dns`},q=g({shelf:`service`,library:`devices`,label:`devices.service_catalog.label`,icon:`lucide:layers`,agent:`Catalog of network service types. name — human-readable name (custom, not translated). code — slug (auto-link key from the scanner). category — tag slugs (multi; SERVICE_CATEGORIES as hints). description_mode — description source: 'key' (i18n key in the description field) or 'own' (free text in the description_text field). SERVICE_META defaults → 'key' + devices.service.desc.<code>; user records are usually 'own'.`,views:{list:[`code`,`category`]},fields:{name:f.title({label:`core.fields.name`}),description_mode:f.string({label:`devices.service.description_mode`,options:[{value:`key`,title:`devices.service.description_mode_key`},{value:`own`,title:`devices.service.description_mode_own`}],default:`key`,strict:!0,noSearch:!0}),description:f.i18n({label:`devices.service.description`,rules:{max:1e3},ui:{hidden:{description_mode:{$ne:`key`}}}}),description_text:f.text({label:`devices.service.description`,rules:{max:1e3},ui:{hidden:{description_mode:{$ne:`own`}}}}),code:f.string({label:`devices.service.code`,rules:{max:60}}),category:f.string({label:`devices.service.category`,options:[...W],multiple:!0,strict:!0,noSearch:!0})}}),J=(e,t)=>{let n=e?.[t];return typeof n==`number`&&Number.isFinite(n)&&n>=0?n:null},Y=({parent:e})=>{let t=J(e,`used`),n=J(e,`free`);return t==null||n==null||t+n===0?null:Math.round(t/(t+n)*1e3)/10},X=80,Z=95,Q=y({id:`device_info`,label:`devices.device_info.label`,icon:`lucide:monitor`,attachTo:[{library:`things`,shelf:`item`}],showWhen:{type:`device`},agent:{description:`Network and technical specs of a device. hostname — FQDN on the LAN. addresses[] — network addresses (ip/mac, multi-NIC). group — human-friendly. services[] — inline services (type/title/links[]/secrets[]). disks_usage[] — disk usage (SSH).`,instructions:`Find a host via list_records things/item with filters: { type: "device" } — network fields live under _extends.device_info on each returned record. When the software/address/location changes — update via update_record.`},fields:{facets:f.facets({fields:{group:f.string({label:`devices.device_info.fields.group`,options:`device-groups`,strict:!0,noSearch:!0}),arch:f.string({label:`devices.device_info.fields.arch`,rules:{max:30}})}}),ledger:f.ledger({fields:{hostname:f.string({label:`devices.device_info.fields.hostname`,rules:{max:120}}),vendor:f.string({label:`devices.device_info.fields.vendor`,rules:{max:80}}),model:f.string({label:`devices.device_info.fields.model`,rules:{max:120}}),os:f.string({label:`devices.device_info.fields.os`,rules:{max:100}}),kernel:f.string({label:`devices.device_info.fields.kernel`,rules:{max:100}}),cpu:f.string({label:`devices.device_info.fields.cpu`,rules:{max:150}}),gpu:f.string({label:`devices.device_info.fields.gpu`,rules:{max:150}}),ram:C({label:`devices.device_info.fields.ram`})}}),addresses:f.row({scope:`nest`,multiple:!0,label:`devices.device_info.fields.addresses`,icon:`lucide:network`,fields:{ip:N({label:`devices.device_info.fields.ip`}),mac:F({label:`devices.device_info.fields.mac`})}}),disks_usage:f.group({scope:`nest`,label:`devices.device_info.fields.disks_usage`,icon:`lucide:hard-drive`,multiple:!0,fields:{mount:f.string({label:`devices.device_info.disk.mount`,rules:{max:255}}),size:S({label:`devices.device_info.disk.size`,system:`binary`,unit:`GiB`}),used:S({label:`devices.device_info.disk.used`,system:`binary`,unit:`GiB`,mutate:[`.usage`]}),free:S({label:`devices.device_info.disk.free`,system:`binary`,unit:`GiB`,mutate:[`.usage`]}),usage:f.real({label:`devices.device_info.disk.usage`,rules:{min:0,max:100},value:Y,mutate:[`.state`]}),state:f.string({label:`devices.device_info.disk.state`,options:[{value:`ok`,title:`devices.device_info.disk_state.ok`,icon:{kind:`icon`,value:`lucide:check`}},{value:`warn`,title:`devices.device_info.disk_state.warn`,icon:{kind:`icon`,value:`lucide:minus`}},{value:`full`,title:`devices.device_info.disk_state.full`,icon:{kind:`icon`,value:`lucide:x`}}],value:e=>{let t=Y(e);return typeof t==`number`?t>=Z?`full`:t>=X?`warn`:`ok`:null},strict:!0,noSearch:!0})}}),services:f.keyed({label:`devices.device_info.fields.services`,icon:`lucide:server`,fields:{service:f.relation({label:`devices.service.type`,options:p({library:`devices`,shelf:`service`})}),description:f.smallText({label:`devices.service.description`,rules:{max:500}}),hide:f.boolean({label:`devices.service.hide`}),links:f.row({scope:`nest`,multiple:!0,label:`devices.service.links`,icon:`lucide:link`,fields:{url:f.url({label:`devices.service.url`}),access:f.string({label:`devices.service.access`,options:`access-types`,strict:!0,noSearch:!0}),visibility:f.string({label:`devices.service.visibility`,options:`visibility-types`,strict:!0,noSearch:!0})}}),secrets:f.keyValue({label:`devices.service.secrets`,fields:{value:f.password({})},multiple:!0,ui:{keyLabel:`devices.service.secretName`,valueLabel:`devices.service.secretValue`}})},by:`service`})}}),$={ssh_config_path:`~/.ssh/config`,pihole_conf_path:``,syncthing_ini_path:`~/.config/syncthingtray.ini`,gtk_bookmarks_path:`~/.config/gtk-3.0/bookmarks`,kodi_sources_path:`~/.local/share/kodi/userdata/sources.xml`,krdc_bookmarks_path:`~/.local/share/krdc/bookmarks.xml`,rclone_config_path:`~/.config/rclone/rclone.conf`,remmina_dir:`~/.local/share/remmina`,remoteview_dir:`~/.local/share/remoteview`,delfin_config_path:`~/.config/delfin/config.toml`},ee=`docker compose exec pihole pihole reloaddns`,te={ip:N,cidr:H,mac:F,hostname:L,imei:B,dataSize:S,ram:C,diskSize:x},ne=v({id:`devices`,version:`1.0.0`,dependsOn:[`things`],label:`devices.plugin.label`,description:`devices.plugin.description`,settings:b({label:`devices.settings.label`,icon:`lucide:radar`,fields:{info:f.info(`devices.settings.scan_info`),button:f.button({label:`devices.settings.scan_button`,value:`devices.runScan`,icon:`lucide:radar`}),info2:f.info(`devices.settings.secrets_help`),info3:f.info(`devices.settings.sync_targets_info`),ssh_config_path:f.localFile({label:`devices.settings.ssh_config_path`,default:$.ssh_config_path}),pihole_conf_path:f.localFile({label:`devices.settings.pihole_conf_path`,default:$.pihole_conf_path}),pihole_reload_cmd:f.string({label:`devices.settings.pihole_reload_cmd`,default:ee}),syncthing_ini_path:f.localFile({label:`devices.settings.syncthing_ini_path`,default:$.syncthing_ini_path}),gtk_bookmarks_path:f.localFile({label:`devices.settings.gtk_bookmarks_path`,default:$.gtk_bookmarks_path}),kodi_sources_path:f.localFile({label:`devices.settings.kodi_sources_path`,default:$.kodi_sources_path}),krdc_bookmarks_path:f.localFile({label:`devices.settings.krdc_bookmarks_path`,default:$.krdc_bookmarks_path}),rclone_config_path:f.localFile({label:`devices.settings.rclone_config_path`,default:$.rclone_config_path}),remmina_dir:f.localDir({label:`devices.settings.remmina_dir`,default:$.remmina_dir}),remoteview_dir:f.localDir({label:`devices.settings.remoteview_dir`,default:$.remoteview_dir}),delfin_config_path:f.localFile({label:`devices.settings.delfin_config_path`,default:$.delfin_config_path})}}),libraries:[{meta:_({id:`devices`,label:`devices.library.label`,icon:`lucide:globe`,agent:`Network subnets and the service catalog (network, service).`}),shelves:[U,q]},{meta:_({id:`hardware`,label:`devices.hardware.label`,icon:`lucide:monitor`,agent:`All owned devices (a view over things/item where type=device). No shelves of its own.`}),shelves:[]}],extends_:[Q],showcases:[w({id:`fleet`,library:`devices`,label:`devices.fleet.label`,icon:`lucide:server`,source:{library:`things`,shelf:`item`},filter:{type:`device`,tags:{$contains:`network`}},columns:[`subtype`,`brand`,`model`,`location`,`condition`],createDefaults:{type:`device`}}),w({id:`all`,library:`hardware`,label:`devices.all.label`,icon:`lucide:monitor`,source:{library:`things`,shelf:`item`},filter:{type:`device`},columns:[`subtype`,`brand`,`model`,`location`,`condition`],createDefaults:{type:`device`}})],fieldContribs:[{library:`things`,shelf:`item`,field:`type`,options:[{value:`device`,title:`devices.device_info.label`}]},{library:`things`,shelf:`item`,field:`subtype`,options:[{value:`pc`,title:`devices.deviceGroups.pc`,when:{type:`device`}},{value:`server`,title:`devices.deviceGroups.server`,when:{type:`device`}},{value:`mobile`,title:`devices.deviceGroups.mobile`,when:{type:`device`}},{value:`tv`,title:`devices.deviceGroups.tv`,when:{type:`device`}},{value:`printer`,title:`devices.deviceGroups.printer`,when:{type:`device`}},{value:`iot`,title:`devices.deviceGroups.iot`,when:{type:`device`}},{value:`network`,title:`devices.deviceGroups.network`,when:{type:`device`}},{value:`other`,title:`devices.deviceGroups.other`,when:{type:`device`}}]}],optionLists:[{name:`access-types`,options:[...G]},{name:`visibility-types`,options:[{value:`lan`,title:`devices.visibilityTypes.lan`},{value:`public`,title:`devices.visibilityTypes.public`},{value:`other`,title:`devices.visibilityTypes.other`}]},{name:`device-groups`,options:[{value:`pc`,title:`devices.deviceGroups.pc`},{value:`server`,title:`devices.deviceGroups.server`},{value:`mobile`,title:`devices.deviceGroups.mobile`},{value:`tv`,title:`devices.deviceGroups.tv`},{value:`printer`,title:`devices.deviceGroups.printer`},{value:`iot`,title:`devices.deviceGroups.iot`},{value:`network`,title:`devices.deviceGroups.network`},{value:`other`,title:`devices.deviceGroups.other`}]}]});export{L as a,F as c,H as i,ne as n,B as o,K as r,N as s,te as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e,r as t,t as n}from"./src-CtQWxdaS.js";export{e as default,n as fin,t as iban};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e,r as t}from"./fields-CV3RQg0Y.js";import{a as n}from"./shelf-Cj_pNvd-.js";import{i as r,n as i}from"./plugin-Cjr7lgQH.js";import{t as a}from"./extend-yQ8zoqGc.js";import{n as o}from"./src-DgQcfYnz.js";import{t as s}from"./settings-Bo5IOwVg.js";import{t as c}from"./src-BrHtOaqX.js";import{t as l}from"./src-tKMBP4Dv.js";var u=n({shelf:`field_demo`,library:`lab`,label:`lab.field_demo.label`,icon:`lucide:flask-conical`,views:{inline:[`name`,`select`],listKind:`map`,list:[`place`,`text_minmax`,`integer`,`boolean`,`select`,`rating_5`,`measured_currency`]},fields:{name:e.title({label:`core.fields.name`}),image:e.cover({label:`lab.field_demo.fields.image`}),avatar:e.avatar({label:`lab.field_demo.fields.avatar`}),info:e.info(`lab.field_demo.info.intro`),button:e.button({label:`lab.field_demo.fields.button_demo`,value:`lab.demoAction`,icon:`lucide:zap`,variant:`outline`}),properties:e.properties({label:`lab.field_demo.groups.properties_inspector`,icon:`lucide:sliders-horizontal`,columns:4,fields:{demo_status:e.string({label:`lab.field_demo.fields.demo_status`,ui:{span:3}}),demo_author:e.string({label:`lab.field_demo.fields.demo_author`,ui:{span:3}}),demo_prop_rating:e.rating({label:`lab.field_demo.fields.rating_5`,ui:{span:3}}),demo_prop_date:e.date({label:`lab.field_demo.fields.date`,ui:{span:3}})}}),stack:e.stack({label:`lab.field_demo.groups.vertical_stack`,icon:`lucide:layers`,fields:{stack_note_1:e.string({label:`lab.field_demo.fields.stack_note_1`}),stack_note_2:e.string({label:`lab.field_demo.fields.stack_note_2`})}}),group:e.group({label:`lab.field_demo.groups.embeds`,icon:`lucide:tv`,scope:`hoist`,fields:{embed_wide:e.embed({label:`lab.field_demo.fields.embed_wide`,multiple:!0}),embed_narrow:e.embed({label:`lab.field_demo.fields.embed_narrow`,multiple:!0})}}),group2:e.group({label:`lab.field_demo.groups.text_pattern`,icon:`lucide:type`,scope:`hoist`,fields:{text_pattern:e.string({label:`lab.field_demo.fields.text_pattern`,rules:{pattern:`^[A-Za-z]+$`,messageKey:`lab.field_demo.validation.letters_only`}})}}),group3:e.group({label:`lab.field_demo.groups.text_email`,icon:`lucide:mail`,scope:`hoist`,fields:{text_emails:e.email({label:`lab.field_demo.fields.text_emails`,multiple:!0})}}),group4:e.group({label:`lab.field_demo.groups.text_url`,icon:`lucide:link`,scope:`hoist`,fields:{text_url:e.url({label:`lab.field_demo.fields.text_url`})}}),group5:e.group({label:`lab.field_demo.groups.text_password`,icon:`lucide:key-round`,scope:`hoist`,fields:{text_password:e.password({label:`lab.field_demo.fields.text_password`})}}),group6:e.group({label:`lab.field_demo.groups.slug_link`,icon:`lucide:link-2`,scope:`hoist`,fields:{demo_slug:e.slug({label:`lab.field_demo.fields.demo_slug`}),demo_link:e.link({label:`lab.field_demo.fields.demo_link`})}}),group7:e.group({label:`lab.field_demo.groups.string_mask`,icon:`lucide:credit-card`,scope:`hoist`,fields:{demo_mask_card:e.string({label:`lab.field_demo.fields.demo_mask_card`,rules:{pattern:`^\\d{4} \\d{4} \\d{4} \\d{4}$`}})}}),group8:e.group({label:`lab.field_demo.groups.percent_year`,icon:`lucide:percent`,scope:`hoist`,fields:{demo_percent:e.percent({label:`lab.field_demo.fields.demo_percent`}),demo_year:e.year({label:`lab.field_demo.fields.demo_year`})}}),group9:e.group({label:`lab.field_demo.groups.local_paths`,icon:`lucide:folder-tree`,scope:`hoist`,fields:{demo_local_dir:e.localDir({label:`lab.field_demo.fields.demo_local_dir`}),demo_local_file:e.localFile({label:`lab.field_demo.fields.demo_local_file`})}}),group10:e.group({label:`lab.field_demo.groups.tag_i18n`,icon:`lucide:tags`,scope:`hoist`,fields:{demo_tag:e.tag({label:`lab.field_demo.fields.demo_tag`,options:[`new`,`sale`,`featured`]}),demo_i18n:e.i18n({label:`lab.field_demo.fields.demo_i18n`})}}),group11:e.group({label:`lab.field_demo.groups.source_poster`,icon:`lucide:file-code`,scope:`hoist`,fields:{demo_source:e.source({label:`lab.field_demo.fields.demo_source`}),demo_poster:e.poster({label:`lab.field_demo.fields.demo_poster`})}}),group12:e.group({label:`lab.field_demo.groups.ranges`,icon:`lucide:chevrons-left-right`,scope:`hoist`,fields:{demo_number_range:e.numberRange({label:`lab.field_demo.fields.demo_number_range`}),demo_real_range:e.realRange({label:`lab.field_demo.fields.demo_real_range`})}}),group13:e.group({label:`lab.field_demo.groups.date_month`,icon:`lucide:calendar`,scope:`hoist`,fields:{demo_month:e.date({label:`lab.field_demo.fields.demo_month`,rules:{granularity:`month`}})}}),group14:e.group({label:`lab.field_demo.groups.ratings`,icon:`lucide:star`,scope:`hoist`,fields:{rating_5:e.rating({label:`lab.field_demo.fields.rating_5`}),rating_10:e.rating({label:`lab.field_demo.fields.rating_10`,rules:{max:10}})}}),group15:e.group({label:`lab.field_demo.groups.hostname`,icon:`lucide:globe`,scope:`hoist`,fields:{demo_hostname:c.hostname({label:`lab.field_demo.fields.demo_hostname`})}}),group16:e.group({label:`lab.field_demo.groups.unit_amount`,icon:`lucide:calculator`,scope:`hoist`,fields:{demo_unit:e.unit({label:`lab.field_demo.fields.demo_unit`,options:`weight`}),demo_amount:e.amount({label:`lab.field_demo.fields.demo_amount`,unitFrom:`demo_unit`})}}),group17:e.group({label:`lab.field_demo.groups.datetimes`,icon:`lucide:calendar-clock`,scope:`hoist`,fields:{datetimes_multi:e.datetime({label:`lab.field_demo.fields.datetimes_multi`,multiple:!0})}}),group18:e.group({label:`lab.field_demo.groups.times_multi`,icon:`lucide:alarm-clock`,scope:`hoist`,fields:{times_multi:e.time({label:`lab.field_demo.fields.times_multi`,multiple:!0})}}),group18b:e.group({label:`lab.field_demo.groups.recurrence`,icon:`lucide:repeat`,scope:`hoist`,fields:{demo_recurrence:o.recurrence({label:`lab.field_demo.fields.demo_recurrence`,exdates:`demo_exdates`}),demo_exdates:e.datetime({label:`lab.field_demo.fields.demo_exdates`,multiple:!0})}}),sheet:e.sheet({label:`lab.field_demo.fields.demo_sheet`,icon:`lucide:grid-2x2`,fields:{row1:{sheet_a1:e.string({label:`lab.field_demo.fields.sheet_a1`}),sheet_b1:e.string({label:`lab.field_demo.fields.sheet_b1`})},row2:{sheet_a2:e.string({label:`lab.field_demo.fields.sheet_a2`}),sheet_b2:e.string({label:`lab.field_demo.fields.sheet_b2`})}}}),demo_table_specs:e.row({scope:`nest`,multiple:!0,label:`lab.field_demo.fields.demo_table_specs`,icon:`lucide:table`,fields:{param:e.string({label:`lab.field_demo.per_row.param`}),val:e.string({label:`lab.field_demo.per_row.val`})}}),demo_check_multi:e.check({label:`lab.field_demo.fields.demo_check_multi`,multiple:!0}),demo_check_stages:e.check({label:`lab.field_demo.fields.demo_check_stages`,slots:[`lab.field_demo.fields.stage_ordered`,`lab.field_demo.fields.stage_paid`,`lab.field_demo.fields.stage_shipped`],multiple:!0}),demo_stepper:e.stepper({label:`lab.field_demo.fields.demo_stepper`,options:[{value:`ordered`,title:`lab.field_demo.options.stage.ordered`},{value:`packed`,title:`lab.field_demo.options.stage.packed`},{value:`shipped`,title:`lab.field_demo.options.stage.shipped`},{value:`delivered`,title:`lab.field_demo.options.stage.delivered`}]}),divider:e.divider({label:`lab.field_demo.blocks.divider`}),bento:e.bento({label:`lab.field_demo.blocks.bento`,icon:`lucide:layout-grid`,fields:{number_int:{span:`2x1`,el:e.int({label:`lab.field_demo.fields.number_int`,rules:{min:0,max:100}})},color_multi:e.color({label:`lab.field_demo.fields.color_multi`,multiple:!0}),numbers_multi:e.real({label:`lab.field_demo.fields.numbers_multi`,multiple:!0}),dates_multi:{span:`2x1`,el:e.date({label:`lab.field_demo.fields.dates_multi`,multiple:!0})}}}),group19:e.group({label:`lab.field_demo.groups.split_rating`,icon:`lucide:columns-2`,fields:{split:e.split({ratio:[1,1],columns:[{rating_split_5:e.rating({label:`lab.field_demo.fields.rating_split_5`})},{rating_split_10:e.rating({label:`lab.field_demo.fields.rating_split_10`,rules:{max:10}})}]})},scope:`hoist`}),grid:e.grid({label:`lab.field_demo.blocks.grid`,icon:`lucide:clock`,columns:2,fields:{time_field:e.time({label:`lab.field_demo.fields.time_field`})}}),group20:e.group({label:`lab.field_demo.groups.spread`,icon:`lucide:newspaper`,fields:{spread:e.spread({visual:{cover:e.cover({label:`lab.field_demo.fields.cover`})},quote:{nolabel_note:e.string({ui:{noEditControl:!0}})},facts:{origin:e.country({label:`lab.field_demo.fields.origin`}),tags_field:e.tags({label:`lab.field_demo.fields.tags_field`,options:[`alpha`,`beta`,`gamma`,`delta`]})}})},scope:`hoist`}),group21:e.group({label:`lab.field_demo.groups.aside`,icon:`lucide:panel-right`,scope:`hoist`,fields:{aside:e.aside({fields:{demo_weight:e.weight({label:`lab.field_demo.fields.demo_weight`})},aside:{demo_dimensions:e.dimensions({label:`lab.field_demo.fields.demo_dimensions`})}})}}),tabs:e.tabs({tabs:[{name:`tab1`,label:`lab.field_demo.blocks.tab1`,fields:{demo_datasize:c.dataSize({label:`lab.field_demo.fields.demo_datasize`}),demo_ram:c.ram({label:`lab.field_demo.fields.demo_ram`})}},{name:`tab2`,label:`lab.field_demo.blocks.tab2`,fields:{demo_disk:c.diskSize({label:`lab.field_demo.fields.demo_disk`}),ip_addr:c.ip({label:`lab.field_demo.fields.ip_addr`})}}]}),accordion:e.accordion({sections:[{name:`section1`,label:`lab.field_demo.blocks.section1`,open:!0,fields:{demo_weekday:e.string({label:`lab.field_demo.fields.demo_weekday`,options:`weekdays`,strict:!0,noSearch:!0}),demo_weekdays:e.string({label:`lab.field_demo.fields.demo_weekdays`,options:`weekdays`,multiple:!0,strict:!0,noSearch:!0})}},{name:`section2`,label:`lab.field_demo.blocks.section2`,fields:{cidr_subnet:c.cidr({label:`lab.field_demo.fields.cidr_subnet`}),ip_addrs:c.ip({label:`lab.field_demo.fields.ip_addrs`,multiple:!0})}}]}),divider2:e.divider({label:`lab.field_demo.blocks.leaves`}),prose:e.prose({label:`lab.field_demo.blocks.prose`,icon:`lucide:file-text`,dropCap:`markdown`,fields:{markdown:e.markdown({label:`lab.field_demo.fields.markdown`,rules:{max:5e3}}),text_multiline:e.text({label:`lab.field_demo.fields.text_multiline`,rules:{max:500}})}}),plaque:e.plaque({label:`lab.field_demo.blocks.plaque`,icon:`lucide:cpu`,title:{mac:c.mac({label:`lab.field_demo.fields.mac`})},subtitle:{imei:c.imei({label:`lab.field_demo.fields.imei`})}}),ledger:e.ledger({label:`lab.field_demo.blocks.ledger`,icon:`lucide:list`,fields:{duration_short:e.duration({label:`lab.field_demo.fields.duration_short`,rules:{max:28800,step:300}}),measured_weight:e.measured({label:`lab.field_demo.fields.measured_weight`,units:`weight`})}}),stats:e.stats({label:`lab.field_demo.blocks.stats`,icon:`lucide:thermometer`,fields:{tempRange:e.realRange({label:`lab.field_demo.fields.tempRange`})}}),facets:e.facets({label:`lab.field_demo.blocks.facets`,icon:`lucide:sun-medium`,fields:{day_period:e.string({label:`lab.field_demo.fields.day_period`,options:`day-periods`,strict:!0,noSearch:!0})}}),terminal:e.terminal({label:`lab.field_demo.blocks.terminal`,icon:`lucide:terminal`,caption:`lab.field_demo.blocks.terminal_caption`,fields:{code:e.snippet({label:`lab.field_demo.fields.code`,rules:{language:`yaml`,max:5e3}})}}),callout:e.callout({label:`lab.field_demo.blocks.callout`,icon:`lucide:shield-check`,tone:`warn`,fields:{agree:e.triState({label:`lab.field_demo.fields.agree`}),boolean:e.boolean({label:`lab.field_demo.fields.boolean`})}}),compare:e.compare({label:`lab.field_demo.blocks.compare`,icon:`lucide:git-compare`,leftLabel:`lab.field_demo.blocks.compare_left`,rightLabel:`lab.field_demo.blocks.compare_right`,left:{country_multi:e.string({label:`lab.field_demo.fields.country_multi`,options:`countries`,multiple:!0,strict:!0,noSearch:!0})},right:{demo_check:e.check({label:`lab.field_demo.fields.demo_check`}),select_multi:e.string({label:`lab.field_demo.fields.select_multi`,multiple:!0,strict:!0,noSearch:!0,options:[{value:`red`,title:`lab.field_demo.options.select.red`},{value:`green`,title:`lab.field_demo.options.select.green`},{value:`blue`,title:`lab.field_demo.options.select.blue`}]})}}),group22:e.group({label:`lab.field_demo.groups.figure`,icon:`lucide:image`,fields:{figure:e.figure({image:{image_gallery:e.image({label:`lab.field_demo.fields.image_gallery`,multiple:!0})},caption:{small_text:e.smallText({label:`lab.field_demo.fields.small_text`,rules:{max:500}})}})},scope:`hoist`}),group23:e.group({label:`lab.field_demo.groups.illustrated`,icon:`lucide:image`,scope:`hoist`,fields:{illustrated_one:e.illustrated({label:`lab.field_demo.fields.illustrated_one`}),illustrated_many:e.illustrated({label:`lab.field_demo.fields.illustrated_many`,multiple:!0,fields:{text:e.markdown({}),image:e.image({})}})}}),group24:e.group({label:`lab.field_demo.groups.epigraph`,icon:`lucide:quote`,fields:{epigraph:e.epigraph({source:{textarea:e.text({label:`lab.field_demo.fields.textarea`,rules:{max:1e3},ui:{noLabel:!0}})},attribution:{compact_note:e.string({label:`lab.field_demo.fields.compact_note`,ui:{noEditControl:!0}})}})},scope:`hoist`}),group25:e.group({label:`lab.field_demo.groups.masthead`,icon:`lucide:calendar-days`,fields:{masthead:e.masthead({overline:{day_period_multi:e.string({label:`lab.field_demo.fields.day_period_multi`,options:`day-periods`,multiple:!0,strict:!0,noSearch:!0})},title:{birthYear:e.date({label:`lab.field_demo.fields.birthYear`,rules:{granularity:`year`}})}})},scope:`hoist`}),divider3:e.divider({label:`lab.field_demo.blocks.domain`}),group26:e.group({label:`lab.field_demo.groups.timeline`,icon:`lucide:history`,fields:{timeline:e.timeline({fields:{date_future:e.date({label:`lab.field_demo.fields.date_future`,rules:{min:`today`}}),demo_reminder:e.reminder({label:`lab.field_demo.fields.demo_reminder`,rules:{lead:14}})}})},scope:`hoist`}),group27:e.group({label:`lab.field_demo.groups.countdown`,icon:`lucide:timer`,fields:{countdown:e.countdown({source:{datetime:e.datetime({label:`lab.field_demo.fields.datetime`})},caption:`lab.field_demo.blocks.countdown_caption`})},scope:`hoist`}),group28:e.group({label:`lab.field_demo.groups.deck`,icon:`lucide:layers`,fields:{deck:e.deck({source:{relation_multi:e.relation({label:`lab.field_demo.fields.relation_multi`,options:t({library:`lab`,shelf:`field_demo_child`}),multiple:!0})}})},scope:`hoist`}),group29:e.group({label:`lab.field_demo.groups.people`,icon:`lucide:user`,fields:{people:e.people({source:{relation_single:e.relation({label:`lab.field_demo.fields.relation_single`,options:t({library:`lab`,shelf:`field_demo_child`})})}})},scope:`hoist`}),group30:e.group({label:`lab.field_demo.groups.identity`,icon:`lucide:contact`,fields:{identity:e.identity({name:{text_plain:e.string({label:`lab.field_demo.fields.text_plain`,rules:{max:200}})},role:{text_minmax:e.string({label:`lab.field_demo.fields.text_minmax`,rules:{min:3,max:20}})},channels:{text_tel:e.tel({label:`lab.field_demo.fields.text_tel`}),text_email:e.email({label:`lab.field_demo.fields.text_email`})}})},scope:`hoist`}),group31:e.group({label:`lab.field_demo.groups.score`,icon:`lucide:gauge`,fields:{score:e.score({source:{integer:e.int({label:`lab.field_demo.fields.integer`,rules:{min:1,max:12}})},max:12})},scope:`hoist`}),group32:e.group({label:`lab.field_demo.groups.status`,icon:`lucide:check-circle`,fields:{status:e.status({source:{select:e.string({label:`lab.field_demo.fields.select`,strict:!0,noSearch:!0,options:[{value:`red`,title:`lab.field_demo.options.select.red`},{value:`green`,title:`lab.field_demo.options.select.green`},{value:`blue`,title:`lab.field_demo.options.select.blue`}]})}})},scope:`hoist`}),group33:e.group({label:`lab.field_demo.groups.meter`,icon:`lucide:sliders-horizontal`,fields:{meter:e.meter({source:{meter_value:e.int({label:`lab.field_demo.fields.meter_value`,rules:{min:0,max:50}})},min:0,max:50})},scope:`hoist`}),group34:e.group({label:`lab.field_demo.groups.receipt`,icon:`lucide:receipt`,scope:`hoist`,fields:{receipt:e.receipt({fields:{number_decimal:e.real({label:`lab.field_demo.fields.number_decimal`,rules:{min:0,max:1e3}})},total:{price:e.money({label:`lab.field_demo.fields.price`})}}),currency:e.currency({label:`core.fields.currency`,default:`UAH`})}}),group35:e.group({label:`lab.field_demo.groups.balance`,icon:`lucide:scale`,fields:{balance:e.balance({source:{measured_currency:e.measured({label:`lab.field_demo.fields.measured_currency`,units:`currency`})},caption:`lab.field_demo.blocks.balance_caption`})},scope:`hoist`}),group36:e.group({label:`lab.field_demo.groups.route`,icon:`lucide:map-pin`,fields:{route:e.route({from:{country:e.string({label:`lab.field_demo.fields.country`,options:`countries`,strict:!0,noSearch:!0})},to:{place:e.geo({label:`lab.field_demo.fields.place`})}})},scope:`hoist`}),calendar:e.calendar({source:{calendar_dates:e.group({scope:`nest`,label:`lab.field_demo.fields.calendar_dates`,icon:`lucide:calendar`,multiple:!0,fields:{occurs_on:e.date({label:`lab.field_demo.per_row.occurs_on`})}})},date:`occurs_on`}),journal:e.journal({source:{journal_log:e.group({scope:`nest`,label:`lab.field_demo.fields.journal_log`,icon:`lucide:book-open`,multiple:!0,fields:{logged_at:e.date({label:`lab.field_demo.per_row.logged_at`}),entry:e.text({label:`lab.field_demo.per_row.entry`,rules:{max:500}})}})},date:`logged_at`,text:`entry`}),group37:e.group({label:`lab.field_demo.groups.nutrition`,icon:`lucide:flame`,scope:`hoist`,fields:{nutrition:e.nutrition({energy:{ageRange:e.numberRange({label:`lab.field_demo.fields.ageRange`,rules:{min:0,max:120}})},fields:{measured_custom:e.measured({label:`lab.field_demo.fields.measured_custom`,units:[{value:`shot`,label:`lab.field_demo.units.shot`},{value:`scoop`,label:`lab.field_demo.units.scoop`}]})}})}}),group38:e.group({label:`lab.field_demo.groups.specimen`,icon:`lucide:palette`,fields:{specimen:e.specimen({title:{color_name:e.string({label:`lab.field_demo.fields.color_name`,options:`colors`,strict:!0,noSearch:!0})},subtitle:{color_hex:e.color({label:`lab.field_demo.fields.color_hex`})}})},scope:`hoist`}),manifest:e.manifest({source:{row_ingredients:e.group({scope:`nest`,label:`lab.field_demo.fields.row_ingredients`,icon:`lucide:carrot`,multiple:!0,rules:{unique:[`product`]},fields:{product:e.relation({label:`lab.field_demo.per_row.product`,options:t({library:`kitchen`,shelf:`food_item`})}),amount:e.real({label:`lab.field_demo.per_row.amount`,rules:{min:0}}),stock:e.measured({label:`lab.field_demo.per_row.stock`,units:`cooking`,cache:0,value:async e=>(await e.ref?.(`product`))?.quantity??null})}})},quantity:`amount`,item:`product`}),table:e.table({label:`lab.field_demo.fields.demo_table`,source:{demo_table_rows:e.row({scope:`nest`,label:`lab.field_demo.fields.demo_table`,multiple:!0,fields:{part:e.string({label:`lab.field_demo.table.part`}),vendor:e.string({label:`lab.field_demo.table.vendor`}),qty:e.int({label:`lab.field_demo.table.qty`})}})},sort:`qty`,dir:`desc`,groupBy:`vendor`,totals:{qty:`sum`},numbered:!0}),group39:e.group({label:`lab.field_demo.groups.idcard`,icon:`lucide:credit-card`,fields:{idcard:e.idcard({number:{iban:l.iban({label:`lab.field_demo.fields.iban`})},meta:{date:e.date({label:`lab.field_demo.fields.date`})}})},scope:`hoist`}),divider4:e.divider({label:`lab.field_demo.blocks.computed`}),chart:e.chart({source:{chart_readings:e.group({scope:`nest`,label:`lab.field_demo.fields.chart_readings`,icon:`lucide:trending-up`,multiple:!0,fields:{measured_on:e.date({label:`lab.field_demo.per_row.measured_on`}),reading:e.real({label:`lab.field_demo.per_row.reading`})}})},value:`reading`,date:`measured_on`,delta:!0}),heatmap:e.heatmap({source:{heatmap_sessions:e.group({scope:`nest`,label:`lab.field_demo.fields.heatmap_sessions`,icon:`lucide:calendar-check`,multiple:!0,fields:{happened_on:e.date({label:`lab.field_demo.per_row.happened_on`})}})},date:`happened_on`}),divider5:e.divider(),group40:e.group({label:`lab.field_demo.groups.periods`,icon:`lucide:calendar-range`,scope:`hoist`,fields:{periods:e.period({label:`lab.field_demo.fields.periods`,multiple:!0})}}),group41:e.group({label:`lab.field_demo.groups.json`,icon:`lucide:code-2`,scope:`hoist`,fields:{json:e.json({label:`lab.field_demo.fields.json`,ui:{emphasis:`muted`}})}}),row_single:e.group({scope:`nest`,label:`lab.field_demo.fields.row_single`,icon:`lucide:rows-3`,fields:{env:e.string({label:`lab.field_demo.per_row.env`,strict:!0,noSearch:!0,options:[{value:`dev`,title:`lab.field_demo.options.env.dev`},{value:`prod`,title:`lab.field_demo.options.env.prod`}]}),url:e.url({label:`lab.field_demo.per_row.url`}),token:e.password({label:`lab.field_demo.per_row.token`})}}),variants:e.keyed({label:`lab.field_demo.fields.variants`,icon:`lucide:languages`,fields:{lang:e.string({label:`lab.field_demo.per_row.lang`,options:`languages`,strict:!0,noSearch:!0}),name:e.string({label:`lab.field_demo.per_row.name`}),surname:e.string({label:`lab.field_demo.per_row.surname`})},by:`lang`}),perkey_fixed:e.keyed({label:`lab.field_demo.fields.perkey_fixed`,icon:`lucide:key`,fixed:!0,fields:{size:e.string({label:`lab.field_demo.per_row.size`,strict:!0,noSearch:!0,options:[{value:`s`,title:`lab.field_demo.options.size.s`},{value:`m`,title:`lab.field_demo.options.size.m`},{value:`l`,title:`lab.field_demo.options.size.l`}]}),qty:e.int({label:`lab.field_demo.per_row.qty`,rules:{min:0}})},by:`size`}),coll_text:e.group({scope:`nest`,label:`lab.field_demo.fields.coll_text`,icon:`lucide:type`,multiple:!0,fields:{person:e.relation({label:`lab.field_demo.fields.pp_person`,options:t({library:`people`,shelf:`person`})}),value:e.string({label:`lab.field_demo.fields.pp_value`})}}),coll_integer:e.group({scope:`nest`,label:`lab.field_demo.fields.coll_integer`,icon:`lucide:hash`,multiple:!0,fields:{person:e.relation({label:`lab.field_demo.fields.pp_person`,options:t({library:`people`,shelf:`person`})}),value:e.int({label:`lab.field_demo.fields.pp_value`})}}),coll_select:e.group({scope:`nest`,label:`lab.field_demo.fields.coll_select`,icon:`lucide:list-checks`,multiple:!0,fields:{person:e.relation({label:`lab.field_demo.fields.pp_person`,options:t({library:`people`,shelf:`person`})}),value:e.string({label:`lab.field_demo.fields.pp_value`,strict:!0,noSearch:!0,options:[{value:`s`,title:`lab.field_demo.options.pp_select.s`},{value:`m`,title:`lab.field_demo.options.pp_select.m`},{value:`l`,title:`lab.field_demo.options.pp_select.l`}]})}}),group42:e.group({label:`lab.field_demo.groups.per_weekday`,icon:`lucide:calendar-days`,scope:`hoist`,fields:{per_weekday:e.perWeekday({label:`lab.field_demo.fields.per_weekday`,rules:{min:0,max:5,step:.5}})}}),per_weekday_per_person:e.group({scope:`nest`,label:`lab.field_demo.fields.per_weekday_per_person`,icon:`lucide:users`,multiple:!0,fields:{person:e.relation({label:`lab.field_demo.fields.pp_person`,options:t({library:`people`,shelf:`person`})}),value:e.perWeekday({label:`lab.field_demo.fields.pp_value`,rules:{min:0,max:10,step:1}})}}),group43:e.group({label:`lab.field_demo.groups.media_carousel`,icon:`lucide:images`,scope:`hoist`,fields:{avatar_row:e.avatar({label:`lab.field_demo.fields.avatar_row`,multiple:!0}),cover_carousel:e.cover({label:`lab.field_demo.fields.cover_carousel`,multiple:!0})}}),group44:e.group({label:`lab.field_demo.groups.files`,icon:`lucide:paperclip`,scope:`hoist`,fields:{attachment:e.file({label:`lab.field_demo.fields.attachment`}),doc:e.document({label:`lab.field_demo.fields.doc`}),voice:e.audio({label:`lab.field_demo.fields.voice`}),clip:e.video({label:`lab.field_demo.fields.clip`}),gallery:e.media({label:`lab.field_demo.fields.gallery`,multiple:!0}),attachment_one:e.attachment({label:`lab.field_demo.fields.attachment_one`}),attachment_many:e.attachment({label:`lab.field_demo.fields.attachment_many`,multiple:!0,fields:{file:e.document({})}})}}),group45:e.group({label:`lab.field_demo.groups.key_value`,icon:`lucide:key-round`,scope:`hoist`,fields:{key_value:e.keyValue({label:`lab.field_demo.fields.key_value`,multiple:!0}),key_value_secret:e.keyValue({label:`lab.field_demo.fields.key_value_secret`,fields:{value:e.password({label:``})}})}}),services_bylist:e.group({scope:`nest`,label:`lab.field_demo.fields.services_bylist`,icon:`lucide:server`,multiple:!0,fields:{type:e.string({label:`devices.service.type`,options:`service-types`,strict:!0,noSearch:!0}),url:e.url({label:`devices.service.url`}),login:e.string({label:`devices.service.login`}),password:e.password({label:`devices.service.password`,ui:{emphasis:`muted`}}),token:e.password({label:`devices.service.token`})}}),group47:e.group({label:`lab.field_demo.groups.catalogue_gap`,icon:`lucide:scan-line`,scope:`hoist`,fields:{identifier:e.identifier({label:`lab.field_demo.fields.identifier`,rules:{max:50},ui:{span:4}}),colorname:e.colorname({label:`lab.field_demo.fields.colorname`,ui:{span:4}}),age:e.age({label:`lab.field_demo.fields.age`,rules:{min:`1900-01-01`,max:`today`},ui:{span:4}}),path:e.path({label:`lab.field_demo.fields.path`,rules:{max:120},ui:{span:6}}),mrz:e.mrz({label:`lab.field_demo.fields.mrz`,rules:{max:200},ui:{span:6}}),timetable:e.timetable({label:`lab.field_demo.fields.timetable`,ui:{span:12}})}}),assay:e.assay({label:`lab.field_demo.groups.assay`,icon:`lucide:activity`,analyte:`analyte`,value:`value`,unit:`unit`,low:`low`,high:`high`,source:{readings:e.group({scope:`nest`,multiple:!0,fields:{analyte:e.string({label:`lab.field_demo.fields.analyte`,rules:{max:100}}),value:e.real({label:`lab.field_demo.fields.value`}),unit:e.string({label:`lab.field_demo.fields.unit`,rules:{max:20}}),low:e.real({label:`lab.field_demo.fields.low`}),high:e.real({label:`lab.field_demo.fields.high`})}})}}),flow:e.flow({amount:{flow_amount:e.money({label:`lab.field_demo.fields.flow_amount`})},from:{flow_from:e.relation({label:`lab.field_demo.fields.flow_from`,options:t({library:`lab`,shelf:`field_demo_child`})})},to:{flow_to:e.relation({label:`lab.field_demo.fields.flow_to`,options:t({library:`lab`,shelf:`field_demo_child`})})}}),children:e.backrefs({label:`lab.field_demo.fields.children`,from:{library:`lab`,shelf:`field_demo_child`,field:`demo_id`}}),group46:e.group({label:`lab.field_demo.groups.classifier`,icon:`lucide:toggle-right`,scope:`hoist`,fields:{type:e.string({label:`lab.field_demo.fields.type`,strict:!0,noSearch:!0,options:[{value:`basic`,title:`lab.field_demo.options.type.basic`},{value:`advanced`,title:`lab.field_demo.options.type.advanced`}]})}})}}),d=n({shelf:`field_demo_child`,library:`lab`,label:`lab.field_demo_child.label`,icon:`lucide:link`,standalone:!1,fields:{name:e.title({label:`core.fields.name`}),demo_id:e.relation({label:`lab.field_demo_child.fields.demo_id`,options:t({library:`lab`,shelf:`field_demo`})}),notes:e.text({label:`lab.field_demo_child.fields.notes`,rules:{max:500}})}}),f=a({id:`demo_extra`,label:`lab.demo_extra.label`,icon:`lucide:plus`,attachTo:[{library:`lab`,shelf:`field_demo`}],showWhen:{type:`advanced`},fields:{extra_text:e.string({label:`lab.demo_extra.fields.extra_text`,rules:{max:200}}),extra_number:e.int({label:`lab.demo_extra.fields.extra_number`,rules:{min:0}}),extra_flag:e.boolean({label:`lab.demo_extra.fields.extra_flag`})}}),p=i({id:`lab`,version:`1.0.0`,dependsOn:[`people`,`kitchen`,`devices`,`finance`,`geo`,`calendar`],label:`lab.plugin.label`,description:`lab.plugin.description`,settings:s({label:`lab.settings.label`,icon:`lucide:flask-conical`,fields:{info:e.info(`lab.settings.intro`),greeting:e.string({label:`lab.settings.fields.greeting`,rules:{max:80}}),enabled:e.boolean({label:`lab.settings.fields.enabled`}),mode:e.string({label:`lab.settings.fields.mode`,strict:!0,noSearch:!0,options:[{value:`fast`,title:`lab.settings.modes.fast`},{value:`safe`,title:`lab.settings.modes.safe`},{value:`debug`,title:`lab.settings.modes.debug`}]}),retries:e.int({label:`lab.settings.fields.retries`,rules:{min:0,max:10}}),divider:e.divider(),info2:e.info(`lab.settings.actions_info`),button:e.button({label:`lab.settings.run_button`,value:`lab.demoAction`,icon:`lucide:play`}),button2:e.button({label:`lab.settings.fail_button`,value:`lab.demoFail`,icon:`lucide:bug`,variant:`destructive`}),button3:e.button({label:`lab.settings.variants.default`,value:`lab.demoAction`,icon:`lucide:check`,variant:`default`}),button4:e.button({label:`lab.settings.variants.secondary`,value:`lab.demoAction`,icon:`lucide:settings`,variant:`secondary`}),button5:e.button({label:`lab.settings.variants.ghost`,value:`lab.demoAction`,icon:`lucide:ghost`,variant:`ghost`}),button6:e.button({label:`lab.settings.variants.link`,value:`lab.demoAction`,icon:`lucide:link`,variant:`link`})}}),libraries:[{meta:r({id:`lab`,label:`lab.library.label`,icon:`lucide:flask-conical`,agent:`Developer demo of field types — not real household data; ignore unless explicitly asked.`}),shelves:[u,d]}],extends_:[f]});export{p as default};
|
|
1
|
+
import{n as e,r as t}from"./fields-Ce51pRua.js";import{a as n}from"./shelf-DjiUBfgQ.js";import{i as r,n as i}from"./plugin-Cjr7lgQH.js";import{t as a}from"./extend-CHOe1AVl.js";import{n as o}from"./src-BpG7q6Ng.js";import{t as s}from"./settings-BEzSaRjz.js";import{t as c}from"./src-C06O0ceD.js";import{t as l}from"./src-CtQWxdaS.js";var u=n({shelf:`field_demo`,library:`lab`,label:`lab.field_demo.label`,icon:`lucide:flask-conical`,views:{inline:[`name`,`select`],listKind:`map`,list:[`place`,`text_minmax`,`integer`,`boolean`,`select`,`rating_5`,`measured_currency`]},fields:{name:e.title({label:`core.fields.name`}),image:e.cover({label:`lab.field_demo.fields.image`}),avatar:e.avatar({label:`lab.field_demo.fields.avatar`}),info:e.info(`lab.field_demo.info.intro`),button:e.button({label:`lab.field_demo.fields.button_demo`,value:`lab.demoAction`,icon:`lucide:zap`,variant:`outline`}),properties:e.properties({label:`lab.field_demo.groups.properties_inspector`,icon:`lucide:sliders-horizontal`,columns:4,fields:{demo_status:e.string({label:`lab.field_demo.fields.demo_status`,ui:{span:3}}),demo_author:e.string({label:`lab.field_demo.fields.demo_author`,ui:{span:3}}),demo_prop_rating:e.rating({label:`lab.field_demo.fields.rating_5`,ui:{span:3}}),demo_prop_date:e.date({label:`lab.field_demo.fields.date`,ui:{span:3}})}}),stack:e.stack({label:`lab.field_demo.groups.vertical_stack`,icon:`lucide:layers`,fields:{stack_note_1:e.string({label:`lab.field_demo.fields.stack_note_1`}),stack_note_2:e.string({label:`lab.field_demo.fields.stack_note_2`})}}),group:e.group({label:`lab.field_demo.groups.embeds`,icon:`lucide:tv`,scope:`hoist`,fields:{embed_wide:e.embed({label:`lab.field_demo.fields.embed_wide`,multiple:!0}),embed_narrow:e.embed({label:`lab.field_demo.fields.embed_narrow`,multiple:!0})}}),group2:e.group({label:`lab.field_demo.groups.text_pattern`,icon:`lucide:type`,scope:`hoist`,fields:{text_pattern:e.string({label:`lab.field_demo.fields.text_pattern`,rules:{pattern:`^[A-Za-z]+$`,messageKey:`lab.field_demo.validation.letters_only`}})}}),group3:e.group({label:`lab.field_demo.groups.text_email`,icon:`lucide:mail`,scope:`hoist`,fields:{text_emails:e.email({label:`lab.field_demo.fields.text_emails`,multiple:!0})}}),group4:e.group({label:`lab.field_demo.groups.text_url`,icon:`lucide:link`,scope:`hoist`,fields:{text_url:e.url({label:`lab.field_demo.fields.text_url`})}}),group5:e.group({label:`lab.field_demo.groups.text_password`,icon:`lucide:key-round`,scope:`hoist`,fields:{text_password:e.password({label:`lab.field_demo.fields.text_password`})}}),group6:e.group({label:`lab.field_demo.groups.slug_link`,icon:`lucide:link-2`,scope:`hoist`,fields:{demo_slug:e.slug({label:`lab.field_demo.fields.demo_slug`}),demo_link:e.link({label:`lab.field_demo.fields.demo_link`})}}),group7:e.group({label:`lab.field_demo.groups.string_mask`,icon:`lucide:credit-card`,scope:`hoist`,fields:{demo_mask_card:e.string({label:`lab.field_demo.fields.demo_mask_card`,rules:{pattern:`^\\d{4} \\d{4} \\d{4} \\d{4}$`}})}}),group8:e.group({label:`lab.field_demo.groups.percent_year`,icon:`lucide:percent`,scope:`hoist`,fields:{demo_percent:e.percent({label:`lab.field_demo.fields.demo_percent`}),demo_year:e.year({label:`lab.field_demo.fields.demo_year`})}}),group9:e.group({label:`lab.field_demo.groups.local_paths`,icon:`lucide:folder-tree`,scope:`hoist`,fields:{demo_local_dir:e.localDir({label:`lab.field_demo.fields.demo_local_dir`}),demo_local_file:e.localFile({label:`lab.field_demo.fields.demo_local_file`})}}),group10:e.group({label:`lab.field_demo.groups.tag_i18n`,icon:`lucide:tags`,scope:`hoist`,fields:{demo_tag:e.tag({label:`lab.field_demo.fields.demo_tag`,options:[`new`,`sale`,`featured`]}),demo_i18n:e.i18n({label:`lab.field_demo.fields.demo_i18n`})}}),group11:e.group({label:`lab.field_demo.groups.source_poster`,icon:`lucide:file-code`,scope:`hoist`,fields:{demo_source:e.source({label:`lab.field_demo.fields.demo_source`}),demo_poster:e.poster({label:`lab.field_demo.fields.demo_poster`})}}),group12:e.group({label:`lab.field_demo.groups.ranges`,icon:`lucide:chevrons-left-right`,scope:`hoist`,fields:{demo_number_range:e.numberRange({label:`lab.field_demo.fields.demo_number_range`}),demo_real_range:e.realRange({label:`lab.field_demo.fields.demo_real_range`})}}),group13:e.group({label:`lab.field_demo.groups.date_month`,icon:`lucide:calendar`,scope:`hoist`,fields:{demo_month:e.date({label:`lab.field_demo.fields.demo_month`,rules:{granularity:`month`}})}}),group14:e.group({label:`lab.field_demo.groups.ratings`,icon:`lucide:star`,scope:`hoist`,fields:{rating_5:e.rating({label:`lab.field_demo.fields.rating_5`}),rating_10:e.rating({label:`lab.field_demo.fields.rating_10`,rules:{max:10}})}}),group15:e.group({label:`lab.field_demo.groups.hostname`,icon:`lucide:globe`,scope:`hoist`,fields:{demo_hostname:c.hostname({label:`lab.field_demo.fields.demo_hostname`})}}),group16:e.group({label:`lab.field_demo.groups.unit_amount`,icon:`lucide:calculator`,scope:`hoist`,fields:{demo_unit:e.unit({label:`lab.field_demo.fields.demo_unit`,options:`weight`}),demo_amount:e.amount({label:`lab.field_demo.fields.demo_amount`,unitFrom:`demo_unit`})}}),group17:e.group({label:`lab.field_demo.groups.datetimes`,icon:`lucide:calendar-clock`,scope:`hoist`,fields:{datetimes_multi:e.datetime({label:`lab.field_demo.fields.datetimes_multi`,multiple:!0})}}),group18:e.group({label:`lab.field_demo.groups.times_multi`,icon:`lucide:alarm-clock`,scope:`hoist`,fields:{times_multi:e.time({label:`lab.field_demo.fields.times_multi`,multiple:!0})}}),group18b:e.group({label:`lab.field_demo.groups.recurrence`,icon:`lucide:repeat`,scope:`hoist`,fields:{demo_recurrence:o.recurrence({label:`lab.field_demo.fields.demo_recurrence`,exdates:`demo_exdates`}),demo_exdates:e.datetime({label:`lab.field_demo.fields.demo_exdates`,multiple:!0})}}),sheet:e.sheet({label:`lab.field_demo.fields.demo_sheet`,icon:`lucide:grid-2x2`,fields:{row1:{sheet_a1:e.string({label:`lab.field_demo.fields.sheet_a1`}),sheet_b1:e.string({label:`lab.field_demo.fields.sheet_b1`})},row2:{sheet_a2:e.string({label:`lab.field_demo.fields.sheet_a2`}),sheet_b2:e.string({label:`lab.field_demo.fields.sheet_b2`})}}}),demo_table_specs:e.row({scope:`nest`,multiple:!0,label:`lab.field_demo.fields.demo_table_specs`,icon:`lucide:table`,fields:{param:e.string({label:`lab.field_demo.per_row.param`}),val:e.string({label:`lab.field_demo.per_row.val`})}}),demo_check_multi:e.check({label:`lab.field_demo.fields.demo_check_multi`,multiple:!0}),demo_check_stages:e.check({label:`lab.field_demo.fields.demo_check_stages`,slots:[`lab.field_demo.fields.stage_ordered`,`lab.field_demo.fields.stage_paid`,`lab.field_demo.fields.stage_shipped`],multiple:!0}),demo_stepper:e.stepper({label:`lab.field_demo.fields.demo_stepper`,options:[{value:`ordered`,title:`lab.field_demo.options.stage.ordered`},{value:`packed`,title:`lab.field_demo.options.stage.packed`},{value:`shipped`,title:`lab.field_demo.options.stage.shipped`},{value:`delivered`,title:`lab.field_demo.options.stage.delivered`}]}),divider:e.divider({label:`lab.field_demo.blocks.divider`}),bento:e.bento({label:`lab.field_demo.blocks.bento`,icon:`lucide:layout-grid`,fields:{number_int:{span:`2x1`,el:e.int({label:`lab.field_demo.fields.number_int`,rules:{min:0,max:100}})},color_multi:e.color({label:`lab.field_demo.fields.color_multi`,multiple:!0}),numbers_multi:e.real({label:`lab.field_demo.fields.numbers_multi`,multiple:!0}),dates_multi:{span:`2x1`,el:e.date({label:`lab.field_demo.fields.dates_multi`,multiple:!0})}}}),group19:e.group({label:`lab.field_demo.groups.split_rating`,icon:`lucide:columns-2`,fields:{split:e.split({ratio:[1,1],columns:[{rating_split_5:e.rating({label:`lab.field_demo.fields.rating_split_5`})},{rating_split_10:e.rating({label:`lab.field_demo.fields.rating_split_10`,rules:{max:10}})}]})},scope:`hoist`}),grid:e.grid({label:`lab.field_demo.blocks.grid`,icon:`lucide:clock`,columns:2,fields:{time_field:e.time({label:`lab.field_demo.fields.time_field`})}}),group20:e.group({label:`lab.field_demo.groups.spread`,icon:`lucide:newspaper`,fields:{spread:e.spread({visual:{cover:e.cover({label:`lab.field_demo.fields.cover`})},quote:{nolabel_note:e.string({ui:{noEditControl:!0}})},facts:{origin:e.country({label:`lab.field_demo.fields.origin`}),tags_field:e.tags({label:`lab.field_demo.fields.tags_field`,options:[`alpha`,`beta`,`gamma`,`delta`]})}})},scope:`hoist`}),group21:e.group({label:`lab.field_demo.groups.aside`,icon:`lucide:panel-right`,scope:`hoist`,fields:{aside:e.aside({fields:{demo_weight:e.weight({label:`lab.field_demo.fields.demo_weight`})},aside:{demo_dimensions:e.dimensions({label:`lab.field_demo.fields.demo_dimensions`})}})}}),tabs:e.tabs({tabs:[{name:`tab1`,label:`lab.field_demo.blocks.tab1`,fields:{demo_datasize:c.dataSize({label:`lab.field_demo.fields.demo_datasize`}),demo_ram:c.ram({label:`lab.field_demo.fields.demo_ram`})}},{name:`tab2`,label:`lab.field_demo.blocks.tab2`,fields:{demo_disk:c.diskSize({label:`lab.field_demo.fields.demo_disk`}),ip_addr:c.ip({label:`lab.field_demo.fields.ip_addr`})}}]}),accordion:e.accordion({sections:[{name:`section1`,label:`lab.field_demo.blocks.section1`,open:!0,fields:{demo_weekday:e.string({label:`lab.field_demo.fields.demo_weekday`,options:`weekdays`,strict:!0,noSearch:!0}),demo_weekdays:e.string({label:`lab.field_demo.fields.demo_weekdays`,options:`weekdays`,multiple:!0,strict:!0,noSearch:!0})}},{name:`section2`,label:`lab.field_demo.blocks.section2`,fields:{cidr_subnet:c.cidr({label:`lab.field_demo.fields.cidr_subnet`}),ip_addrs:c.ip({label:`lab.field_demo.fields.ip_addrs`,multiple:!0})}}]}),divider2:e.divider({label:`lab.field_demo.blocks.leaves`}),prose:e.prose({label:`lab.field_demo.blocks.prose`,icon:`lucide:file-text`,dropCap:`markdown`,fields:{markdown:e.markdown({label:`lab.field_demo.fields.markdown`,rules:{max:5e3}}),text_multiline:e.text({label:`lab.field_demo.fields.text_multiline`,rules:{max:500}})}}),plaque:e.plaque({label:`lab.field_demo.blocks.plaque`,icon:`lucide:cpu`,title:{mac:c.mac({label:`lab.field_demo.fields.mac`})},subtitle:{imei:c.imei({label:`lab.field_demo.fields.imei`})}}),ledger:e.ledger({label:`lab.field_demo.blocks.ledger`,icon:`lucide:list`,fields:{duration_short:e.duration({label:`lab.field_demo.fields.duration_short`,rules:{max:28800,step:300}}),measured_weight:e.measured({label:`lab.field_demo.fields.measured_weight`,units:`weight`})}}),stats:e.stats({label:`lab.field_demo.blocks.stats`,icon:`lucide:thermometer`,fields:{tempRange:e.realRange({label:`lab.field_demo.fields.tempRange`})}}),facets:e.facets({label:`lab.field_demo.blocks.facets`,icon:`lucide:sun-medium`,fields:{day_period:e.string({label:`lab.field_demo.fields.day_period`,options:`day-periods`,strict:!0,noSearch:!0})}}),terminal:e.terminal({label:`lab.field_demo.blocks.terminal`,icon:`lucide:terminal`,caption:`lab.field_demo.blocks.terminal_caption`,fields:{code:e.snippet({label:`lab.field_demo.fields.code`,rules:{language:`yaml`,max:5e3}})}}),callout:e.callout({label:`lab.field_demo.blocks.callout`,icon:`lucide:shield-check`,tone:`warn`,fields:{agree:e.triState({label:`lab.field_demo.fields.agree`}),boolean:e.boolean({label:`lab.field_demo.fields.boolean`})}}),compare:e.compare({label:`lab.field_demo.blocks.compare`,icon:`lucide:git-compare`,leftLabel:`lab.field_demo.blocks.compare_left`,rightLabel:`lab.field_demo.blocks.compare_right`,left:{country_multi:e.string({label:`lab.field_demo.fields.country_multi`,options:`countries`,multiple:!0,strict:!0,noSearch:!0})},right:{demo_check:e.check({label:`lab.field_demo.fields.demo_check`}),select_multi:e.string({label:`lab.field_demo.fields.select_multi`,multiple:!0,strict:!0,noSearch:!0,options:[{value:`red`,title:`lab.field_demo.options.select.red`},{value:`green`,title:`lab.field_demo.options.select.green`},{value:`blue`,title:`lab.field_demo.options.select.blue`}]})}}),group22:e.group({label:`lab.field_demo.groups.figure`,icon:`lucide:image`,fields:{figure:e.figure({image:{image_gallery:e.image({label:`lab.field_demo.fields.image_gallery`,multiple:!0})},caption:{small_text:e.smallText({label:`lab.field_demo.fields.small_text`,rules:{max:500}})}})},scope:`hoist`}),group23:e.group({label:`lab.field_demo.groups.illustrated`,icon:`lucide:image`,scope:`hoist`,fields:{illustrated_one:e.illustrated({label:`lab.field_demo.fields.illustrated_one`}),illustrated_many:e.illustrated({label:`lab.field_demo.fields.illustrated_many`,multiple:!0,fields:{text:e.markdown({}),image:e.image({})}})}}),group24:e.group({label:`lab.field_demo.groups.epigraph`,icon:`lucide:quote`,fields:{epigraph:e.epigraph({source:{textarea:e.text({label:`lab.field_demo.fields.textarea`,rules:{max:1e3},ui:{noLabel:!0}})},attribution:{compact_note:e.string({label:`lab.field_demo.fields.compact_note`,ui:{noEditControl:!0}})}})},scope:`hoist`}),group25:e.group({label:`lab.field_demo.groups.masthead`,icon:`lucide:calendar-days`,fields:{masthead:e.masthead({overline:{day_period_multi:e.string({label:`lab.field_demo.fields.day_period_multi`,options:`day-periods`,multiple:!0,strict:!0,noSearch:!0})},title:{birthYear:e.date({label:`lab.field_demo.fields.birthYear`,rules:{granularity:`year`}})}})},scope:`hoist`}),divider3:e.divider({label:`lab.field_demo.blocks.domain`}),group26:e.group({label:`lab.field_demo.groups.timeline`,icon:`lucide:history`,fields:{timeline:e.timeline({fields:{date_future:e.date({label:`lab.field_demo.fields.date_future`,rules:{min:`today`}}),demo_reminder:e.reminder({label:`lab.field_demo.fields.demo_reminder`,rules:{lead:14}})}})},scope:`hoist`}),group27:e.group({label:`lab.field_demo.groups.countdown`,icon:`lucide:timer`,fields:{countdown:e.countdown({source:{datetime:e.datetime({label:`lab.field_demo.fields.datetime`})},caption:`lab.field_demo.blocks.countdown_caption`})},scope:`hoist`}),group28:e.group({label:`lab.field_demo.groups.deck`,icon:`lucide:layers`,fields:{deck:e.deck({source:{relation_multi:e.relation({label:`lab.field_demo.fields.relation_multi`,options:t({library:`lab`,shelf:`field_demo_child`}),multiple:!0})}})},scope:`hoist`}),group29:e.group({label:`lab.field_demo.groups.people`,icon:`lucide:user`,fields:{people:e.people({source:{relation_single:e.relation({label:`lab.field_demo.fields.relation_single`,options:t({library:`lab`,shelf:`field_demo_child`})})}})},scope:`hoist`}),group30:e.group({label:`lab.field_demo.groups.identity`,icon:`lucide:contact`,fields:{identity:e.identity({name:{text_plain:e.string({label:`lab.field_demo.fields.text_plain`,rules:{max:200}})},role:{text_minmax:e.string({label:`lab.field_demo.fields.text_minmax`,rules:{min:3,max:20}})},channels:{text_tel:e.tel({label:`lab.field_demo.fields.text_tel`}),text_email:e.email({label:`lab.field_demo.fields.text_email`})}})},scope:`hoist`}),group31:e.group({label:`lab.field_demo.groups.score`,icon:`lucide:gauge`,fields:{score:e.score({source:{integer:e.int({label:`lab.field_demo.fields.integer`,rules:{min:1,max:12}})},max:12})},scope:`hoist`}),group48:e.group({label:`lab.field_demo.groups.media_rating`,icon:`lucide:bar-chart-horizontal`,fields:{media_rating:e.mediaRating({source:{imdb_rating:e.real({label:`lab.field_demo.fields.imdb_rating`,rules:{min:0,max:10}}),tmdb_rating:e.real({label:`lab.field_demo.fields.tmdb_rating`,rules:{min:0,max:10}})},max:10})},scope:`hoist`}),group32:e.group({label:`lab.field_demo.groups.status`,icon:`lucide:check-circle`,fields:{status:e.status({source:{select:e.string({label:`lab.field_demo.fields.select`,strict:!0,noSearch:!0,options:[{value:`red`,title:`lab.field_demo.options.select.red`},{value:`green`,title:`lab.field_demo.options.select.green`},{value:`blue`,title:`lab.field_demo.options.select.blue`}]})}})},scope:`hoist`}),group33:e.group({label:`lab.field_demo.groups.meter`,icon:`lucide:sliders-horizontal`,fields:{meter:e.meter({source:{meter_value:e.int({label:`lab.field_demo.fields.meter_value`,rules:{min:0,max:50}})},min:0,max:50})},scope:`hoist`}),group34:e.group({label:`lab.field_demo.groups.receipt`,icon:`lucide:receipt`,scope:`hoist`,fields:{receipt:e.receipt({fields:{number_decimal:e.real({label:`lab.field_demo.fields.number_decimal`,rules:{min:0,max:1e3}})},total:{price:e.money({label:`lab.field_demo.fields.price`})}}),currency:e.currency({label:`core.fields.currency`,default:`UAH`})}}),group35:e.group({label:`lab.field_demo.groups.balance`,icon:`lucide:scale`,fields:{balance:e.balance({source:{measured_currency:e.measured({label:`lab.field_demo.fields.measured_currency`,units:`currency`})},caption:`lab.field_demo.blocks.balance_caption`})},scope:`hoist`}),group36:e.group({label:`lab.field_demo.groups.route`,icon:`lucide:map-pin`,fields:{route:e.route({from:{country:e.string({label:`lab.field_demo.fields.country`,options:`countries`,strict:!0,noSearch:!0})},to:{place:e.geo({label:`lab.field_demo.fields.place`})}})},scope:`hoist`}),calendar:e.calendar({source:{calendar_dates:e.group({scope:`nest`,label:`lab.field_demo.fields.calendar_dates`,icon:`lucide:calendar`,multiple:!0,fields:{occurs_on:e.date({label:`lab.field_demo.per_row.occurs_on`})}})},date:`occurs_on`}),journal:e.journal({source:{journal_log:e.group({scope:`nest`,label:`lab.field_demo.fields.journal_log`,icon:`lucide:book-open`,multiple:!0,fields:{logged_at:e.date({label:`lab.field_demo.per_row.logged_at`}),entry:e.text({label:`lab.field_demo.per_row.entry`,rules:{max:500}})}})},date:`logged_at`,text:`entry`}),group37:e.group({label:`lab.field_demo.groups.nutrition`,icon:`lucide:flame`,scope:`hoist`,fields:{nutrition:e.nutrition({energy:{ageRange:e.numberRange({label:`lab.field_demo.fields.ageRange`,rules:{min:0,max:120}})},fields:{measured_custom:e.measured({label:`lab.field_demo.fields.measured_custom`,units:[{value:`shot`,label:`lab.field_demo.units.shot`},{value:`scoop`,label:`lab.field_demo.units.scoop`}]})}})}}),group38:e.group({label:`lab.field_demo.groups.specimen`,icon:`lucide:palette`,fields:{specimen:e.specimen({title:{color_name:e.string({label:`lab.field_demo.fields.color_name`,options:`colors`,strict:!0,noSearch:!0})},subtitle:{color_hex:e.color({label:`lab.field_demo.fields.color_hex`})}})},scope:`hoist`}),manifest:e.manifest({source:{row_ingredients:e.group({scope:`nest`,label:`lab.field_demo.fields.row_ingredients`,icon:`lucide:carrot`,multiple:!0,rules:{unique:[`product`]},fields:{product:e.relation({label:`lab.field_demo.per_row.product`,options:t({library:`kitchen`,shelf:`food_item`})}),amount:e.real({label:`lab.field_demo.per_row.amount`,rules:{min:0}}),stock:e.measured({label:`lab.field_demo.per_row.stock`,units:`cooking`,cache:0,value:async e=>(await e.ref?.(`product`))?.quantity??null})}})},quantity:`amount`,item:`product`}),table:e.table({label:`lab.field_demo.fields.demo_table`,source:{demo_table_rows:e.row({scope:`nest`,label:`lab.field_demo.fields.demo_table`,multiple:!0,fields:{part:e.string({label:`lab.field_demo.table.part`}),vendor:e.string({label:`lab.field_demo.table.vendor`}),qty:e.int({label:`lab.field_demo.table.qty`})}})},sort:`qty`,dir:`desc`,groupBy:`vendor`,totals:{qty:`sum`},numbered:!0}),group39:e.group({label:`lab.field_demo.groups.idcard`,icon:`lucide:credit-card`,fields:{idcard:e.idcard({number:{iban:l.iban({label:`lab.field_demo.fields.iban`})},meta:{date:e.date({label:`lab.field_demo.fields.date`})}})},scope:`hoist`}),divider4:e.divider({label:`lab.field_demo.blocks.computed`}),chart:e.chart({source:{chart_readings:e.group({scope:`nest`,label:`lab.field_demo.fields.chart_readings`,icon:`lucide:trending-up`,multiple:!0,fields:{measured_on:e.date({label:`lab.field_demo.per_row.measured_on`}),reading:e.real({label:`lab.field_demo.per_row.reading`})}})},value:`reading`,date:`measured_on`,delta:!0}),heatmap:e.heatmap({source:{heatmap_sessions:e.group({scope:`nest`,label:`lab.field_demo.fields.heatmap_sessions`,icon:`lucide:calendar-check`,multiple:!0,fields:{happened_on:e.date({label:`lab.field_demo.per_row.happened_on`})}})},date:`happened_on`}),divider5:e.divider(),group40:e.group({label:`lab.field_demo.groups.periods`,icon:`lucide:calendar-range`,scope:`hoist`,fields:{periods:e.period({label:`lab.field_demo.fields.periods`,multiple:!0})}}),group41:e.group({label:`lab.field_demo.groups.json`,icon:`lucide:code-2`,scope:`hoist`,fields:{json:e.json({label:`lab.field_demo.fields.json`,ui:{emphasis:`muted`}})}}),row_single:e.group({scope:`nest`,label:`lab.field_demo.fields.row_single`,icon:`lucide:rows-3`,fields:{env:e.string({label:`lab.field_demo.per_row.env`,strict:!0,noSearch:!0,options:[{value:`dev`,title:`lab.field_demo.options.env.dev`},{value:`prod`,title:`lab.field_demo.options.env.prod`}]}),url:e.url({label:`lab.field_demo.per_row.url`}),token:e.password({label:`lab.field_demo.per_row.token`})}}),variants:e.keyed({label:`lab.field_demo.fields.variants`,icon:`lucide:languages`,fields:{lang:e.string({label:`lab.field_demo.per_row.lang`,options:`languages`,strict:!0,noSearch:!0}),name:e.string({label:`lab.field_demo.per_row.name`}),surname:e.string({label:`lab.field_demo.per_row.surname`})},by:`lang`}),perkey_fixed:e.keyed({label:`lab.field_demo.fields.perkey_fixed`,icon:`lucide:key`,fixed:!0,fields:{size:e.string({label:`lab.field_demo.per_row.size`,strict:!0,noSearch:!0,options:[{value:`s`,title:`lab.field_demo.options.size.s`},{value:`m`,title:`lab.field_demo.options.size.m`},{value:`l`,title:`lab.field_demo.options.size.l`}]}),qty:e.int({label:`lab.field_demo.per_row.qty`,rules:{min:0}})},by:`size`}),coll_text:e.group({scope:`nest`,label:`lab.field_demo.fields.coll_text`,icon:`lucide:type`,multiple:!0,fields:{person:e.relation({label:`lab.field_demo.fields.pp_person`,options:t({library:`people`,shelf:`person`})}),value:e.string({label:`lab.field_demo.fields.pp_value`})}}),coll_integer:e.group({scope:`nest`,label:`lab.field_demo.fields.coll_integer`,icon:`lucide:hash`,multiple:!0,fields:{person:e.relation({label:`lab.field_demo.fields.pp_person`,options:t({library:`people`,shelf:`person`})}),value:e.int({label:`lab.field_demo.fields.pp_value`})}}),coll_select:e.group({scope:`nest`,label:`lab.field_demo.fields.coll_select`,icon:`lucide:list-checks`,multiple:!0,fields:{person:e.relation({label:`lab.field_demo.fields.pp_person`,options:t({library:`people`,shelf:`person`})}),value:e.string({label:`lab.field_demo.fields.pp_value`,strict:!0,noSearch:!0,options:[{value:`s`,title:`lab.field_demo.options.pp_select.s`},{value:`m`,title:`lab.field_demo.options.pp_select.m`},{value:`l`,title:`lab.field_demo.options.pp_select.l`}]})}}),group42:e.group({label:`lab.field_demo.groups.per_weekday`,icon:`lucide:calendar-days`,scope:`hoist`,fields:{per_weekday:e.perWeekday({label:`lab.field_demo.fields.per_weekday`,rules:{min:0,max:5,step:.5}})}}),per_weekday_per_person:e.group({scope:`nest`,label:`lab.field_demo.fields.per_weekday_per_person`,icon:`lucide:users`,multiple:!0,fields:{person:e.relation({label:`lab.field_demo.fields.pp_person`,options:t({library:`people`,shelf:`person`})}),value:e.perWeekday({label:`lab.field_demo.fields.pp_value`,rules:{min:0,max:10,step:1}})}}),group43:e.group({label:`lab.field_demo.groups.media_carousel`,icon:`lucide:images`,scope:`hoist`,fields:{avatar_row:e.avatar({label:`lab.field_demo.fields.avatar_row`,multiple:!0}),cover_carousel:e.cover({label:`lab.field_demo.fields.cover_carousel`,multiple:!0})}}),group44:e.group({label:`lab.field_demo.groups.files`,icon:`lucide:paperclip`,scope:`hoist`,fields:{attachment:e.file({label:`lab.field_demo.fields.attachment`}),doc:e.document({label:`lab.field_demo.fields.doc`}),voice:e.audio({label:`lab.field_demo.fields.voice`}),clip:e.video({label:`lab.field_demo.fields.clip`}),gallery:e.media({label:`lab.field_demo.fields.gallery`,multiple:!0}),attachment_one:e.attachment({label:`lab.field_demo.fields.attachment_one`}),attachment_many:e.attachment({label:`lab.field_demo.fields.attachment_many`,multiple:!0,fields:{file:e.document({})}})}}),group45:e.group({label:`lab.field_demo.groups.key_value`,icon:`lucide:key-round`,scope:`hoist`,fields:{key_value:e.keyValue({label:`lab.field_demo.fields.key_value`,multiple:!0}),key_value_secret:e.keyValue({label:`lab.field_demo.fields.key_value_secret`,fields:{value:e.password({label:``})}})}}),services_bylist:e.group({scope:`nest`,label:`lab.field_demo.fields.services_bylist`,icon:`lucide:server`,multiple:!0,fields:{type:e.string({label:`devices.service.type`,options:`service-types`,strict:!0,noSearch:!0}),url:e.url({label:`devices.service.url`}),login:e.string({label:`devices.service.login`}),password:e.password({label:`devices.service.password`,ui:{emphasis:`muted`}}),token:e.password({label:`devices.service.token`})}}),group47:e.group({label:`lab.field_demo.groups.catalogue_gap`,icon:`lucide:scan-line`,scope:`hoist`,fields:{identifier:e.identifier({label:`lab.field_demo.fields.identifier`,rules:{max:50},ui:{span:4}}),colorname:e.colorname({label:`lab.field_demo.fields.colorname`,ui:{span:4}}),age:e.age({label:`lab.field_demo.fields.age`,rules:{min:`1900-01-01`,max:`today`},ui:{span:4}}),path:e.path({label:`lab.field_demo.fields.path`,rules:{max:120},ui:{span:6}}),mrz:e.mrz({label:`lab.field_demo.fields.mrz`,rules:{max:200},ui:{span:6}}),timetable:e.timetable({label:`lab.field_demo.fields.timetable`,ui:{span:12}})}}),assay:e.assay({label:`lab.field_demo.groups.assay`,icon:`lucide:activity`,analyte:`analyte`,value:`value`,unit:`unit`,low:`low`,high:`high`,source:{readings:e.group({scope:`nest`,multiple:!0,fields:{analyte:e.string({label:`lab.field_demo.fields.analyte`,rules:{max:100}}),value:e.real({label:`lab.field_demo.fields.value`}),unit:e.string({label:`lab.field_demo.fields.unit`,rules:{max:20}}),low:e.real({label:`lab.field_demo.fields.low`}),high:e.real({label:`lab.field_demo.fields.high`})}})}}),flow:e.flow({amount:{flow_amount:e.money({label:`lab.field_demo.fields.flow_amount`})},from:{flow_from:e.relation({label:`lab.field_demo.fields.flow_from`,options:t({library:`lab`,shelf:`field_demo_child`})})},to:{flow_to:e.relation({label:`lab.field_demo.fields.flow_to`,options:t({library:`lab`,shelf:`field_demo_child`})})}}),children:e.backrefs({label:`lab.field_demo.fields.children`,from:{library:`lab`,shelf:`field_demo_child`,field:`demo_id`}}),group46:e.group({label:`lab.field_demo.groups.classifier`,icon:`lucide:toggle-right`,scope:`hoist`,fields:{type:e.string({label:`lab.field_demo.fields.type`,strict:!0,noSearch:!0,options:[{value:`basic`,title:`lab.field_demo.options.type.basic`},{value:`advanced`,title:`lab.field_demo.options.type.advanced`}]})}})}}),d=n({shelf:`field_demo_child`,library:`lab`,label:`lab.field_demo_child.label`,icon:`lucide:link`,standalone:!1,fields:{name:e.title({label:`core.fields.name`}),demo_id:e.relation({label:`lab.field_demo_child.fields.demo_id`,options:t({library:`lab`,shelf:`field_demo`})}),notes:e.text({label:`lab.field_demo_child.fields.notes`,rules:{max:500}})}}),f=a({id:`demo_extra`,label:`lab.demo_extra.label`,icon:`lucide:plus`,attachTo:[{library:`lab`,shelf:`field_demo`}],showWhen:{type:`advanced`},fields:{extra_text:e.string({label:`lab.demo_extra.fields.extra_text`,rules:{max:200}}),extra_number:e.int({label:`lab.demo_extra.fields.extra_number`,rules:{min:0}}),extra_flag:e.boolean({label:`lab.demo_extra.fields.extra_flag`})}}),p=i({id:`lab`,version:`1.0.0`,dependsOn:[`people`,`kitchen`,`devices`,`finance`,`geo`,`calendar`],label:`lab.plugin.label`,description:`lab.plugin.description`,settings:s({label:`lab.settings.label`,icon:`lucide:flask-conical`,fields:{info:e.info(`lab.settings.intro`),greeting:e.string({label:`lab.settings.fields.greeting`,rules:{max:80}}),enabled:e.boolean({label:`lab.settings.fields.enabled`}),mode:e.string({label:`lab.settings.fields.mode`,strict:!0,noSearch:!0,options:[{value:`fast`,title:`lab.settings.modes.fast`},{value:`safe`,title:`lab.settings.modes.safe`},{value:`debug`,title:`lab.settings.modes.debug`}]}),retries:e.int({label:`lab.settings.fields.retries`,rules:{min:0,max:10}}),divider:e.divider(),info2:e.info(`lab.settings.actions_info`),button:e.button({label:`lab.settings.run_button`,value:`lab.demoAction`,icon:`lucide:play`}),button2:e.button({label:`lab.settings.fail_button`,value:`lab.demoFail`,icon:`lucide:bug`,variant:`destructive`}),button3:e.button({label:`lab.settings.variants.default`,value:`lab.demoAction`,icon:`lucide:check`,variant:`default`}),button4:e.button({label:`lab.settings.variants.secondary`,value:`lab.demoAction`,icon:`lucide:settings`,variant:`secondary`}),button5:e.button({label:`lab.settings.variants.ghost`,value:`lab.demoAction`,icon:`lucide:ghost`,variant:`ghost`}),button6:e.button({label:`lab.settings.variants.link`,value:`lab.demoAction`,icon:`lucide:link`,variant:`link`})}}),libraries:[{meta:r({id:`lab`,label:`lab.library.label`,icon:`lucide:flask-conical`,agent:`Developer demo of field types — not real household data; ignore unless explicitly asked.`}),shelves:[u,d]}],extends_:[f]});export{p as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e}from"./fields-
|
|
1
|
+
import{n as e}from"./fields-Ce51pRua.js";import{a as t}from"./shelf-DjiUBfgQ.js";import{i as n,n as r}from"./plugin-Cjr7lgQH.js";import{t as i}from"./settings-BEzSaRjz.js";var a=t({shelf:`bus_route`,library:`transit`,label:`transit.bus_route.label`,icon:`lucide:bus`,views:{list:[`route_number`,`from`,`to`]},fields:{name:e.title({label:`core.fields.name`}),route:e.stats({fields:{route_number:e.int({label:`transit.bus_route.fields.route_number`}),from:e.string({label:`transit.bus_route.fields.from`,rules:{max:100}}),to:e.string({label:`transit.bus_route.fields.to`,rules:{max:100}}),stop:e.string({label:`transit.bus_route.fields.stop`,rules:{max:200}})}}),hairline:e.divider({}),description:e.text({label:`transit.bus_route.fields.description`,rules:{max:1e3}}),weekday_times:e.timetable({label:`transit.bus_route.fields.weekday_times`,ui:{span:12}}),saturday_times:e.timetable({label:`transit.bus_route.fields.saturday_times`,ui:{span:6}}),sunday_times:e.timetable({label:`transit.bus_route.fields.sunday_times`,ui:{span:6}}),tags:e.tags({label:`transit.bus_route.fields.tags`}),notes:e.text({label:`transit.bus_route.fields.notes`,rules:{max:500}})}}),o=r({id:`transit`,version:`1.0.0`,dependsOn:[],label:`transit.plugin.label`,description:`transit.plugin.description`,libraries:[{meta:n({id:`transit`,label:`transit.library.label`,icon:`lucide:bus`,agent:{description:`Local bus routes and their departure schedules (bus_route).`,instructions:`bus_route: weekday_times/saturday_times/sunday_times — departure schedule. When the schedule changes, update *_times via update_record.`},starterHint:`the next departures on the saved routes`}),shelves:[a]}],settings:i({label:`transit.settings.label`,fields:{caldav_calendar:e.string({label:`transit.settings.caldav_calendar`}),caldav_url:e.string({label:`transit.settings.caldav_url`}),caldav_username:e.string({label:`transit.settings.caldav_username`}),caldav_password:e.password({label:`transit.settings.caldav_password`})}})});export{o as default};
|