ltcai 10.9.0 → 11.0.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/README.md +46 -64
- package/docs/CHANGELOG.md +72 -237
- package/docs/COMMUNITY_AND_PLUGINS.md +1 -1
- package/docs/DEVELOPMENT.md +1 -1
- package/docs/ONBOARDING.md +1 -1
- package/docs/OPERATIONS.md +1 -1
- package/docs/PERFORMANCE.md +78 -7
- package/docs/TRUST_MODEL.md +1 -1
- package/docs/WHY_LATTICE.md +1 -1
- package/docs/kg-schema.md +1 -1
- package/docs/v11.1.0_PRODUCT_INTELLIGENCE_PLAN.md +313 -0
- package/lattice_brain/__init__.py +1 -1
- package/lattice_brain/graph/_kg_contract.py +11 -0
- package/lattice_brain/graph/curator.py +1 -1
- package/lattice_brain/graph/fusion.py +184 -3
- package/lattice_brain/graph/proactive.py +138 -1
- package/lattice_brain/graph/projection.py +10 -2
- package/lattice_brain/graph/retrieval.py +137 -7
- package/lattice_brain/graph/retrieval_docgen.py +20 -20
- package/lattice_brain/graph/retrieval_policy.py +6 -0
- package/lattice_brain/graph/retrieval_reads.py +188 -1
- package/lattice_brain/graph/retrieval_vector.py +474 -110
- package/lattice_brain/graph/schema.py +125 -2
- package/lattice_brain/graph/vector_index/__init__.py +85 -0
- package/lattice_brain/graph/vector_index/base.py +170 -0
- package/lattice_brain/graph/vector_index/brute_force.py +114 -0
- package/lattice_brain/graph/vector_index/hnsw.py +293 -0
- package/lattice_brain/graph/vector_index/jobs.py +287 -0
- package/lattice_brain/graph/vector_index/quantized.py +151 -0
- package/lattice_brain/graph/vector_index/selector.py +131 -0
- package/lattice_brain/ingestion.py +50 -3
- package/lattice_brain/portability.py +654 -2
- package/lattice_brain/runtime/agent_runtime.py +1 -1
- package/lattice_brain/runtime/contracts.py +1 -1
- package/lattice_brain/runtime/multi_agent.py +1 -1
- package/lattice_brain/self_model.py +620 -0
- package/lattice_brain/synthesis.py +801 -0
- package/latticeai/__init__.py +1 -1
- package/latticeai/api/brain_intelligence.py +83 -1
- package/latticeai/api/chat_stream.py +4 -1
- package/latticeai/api/local_files.py +62 -0
- package/latticeai/api/models.py +1 -1
- package/latticeai/api/portability.py +130 -1
- package/latticeai/api/security_dashboard.py +48 -13
- package/latticeai/api/voice_capture.py +4 -1
- package/latticeai/api/workspace.py +11 -5
- package/latticeai/core/embedding_providers.py +20 -1
- package/latticeai/core/legacy_compatibility.py +1 -1
- package/latticeai/core/marketplace.py +1 -1
- package/latticeai/core/messages.py +14 -0
- package/latticeai/core/model_compat.py +2 -2
- package/latticeai/core/tool_registry.py +0 -7
- package/latticeai/core/workspace_os_constants.py +1 -1
- package/latticeai/core/workspace_os_utils.py +4 -50
- package/latticeai/core/workspace_review_items.py +12 -1
- package/latticeai/integrations/telegram_bot.py +28 -10
- package/latticeai/models/router.py +1 -1
- package/latticeai/runtime/access_runtime.py +1 -1
- package/latticeai/runtime/network_boundary_wiring.py +9 -5
- package/latticeai/runtime/permission_mode_wiring.py +9 -6
- package/latticeai/runtime/router_registration.py +3 -0
- package/latticeai/services/architecture_readiness.py +1 -1
- package/latticeai/services/brain_intelligence.py +253 -0
- package/latticeai/services/memory_service.py +1 -1
- package/latticeai/services/model_catalog.py +4 -3
- package/latticeai/services/model_engines.py +28 -14
- package/latticeai/services/obsidian_bridge.py +618 -0
- package/latticeai/services/product_readiness.py +5 -3
- package/latticeai/tools/filesystem.py +4 -1
- package/package.json +1 -1
- package/scripts/bench_vector_index.py +295 -0
- package/scripts/check_current_release_docs.mjs +4 -2
- package/scripts/release_screen_claims.json +31 -0
- package/src-tauri/Cargo.lock +1 -1
- package/src-tauri/Cargo.toml +1 -1
- package/src-tauri/tauri.conf.json +1 -1
- package/static/app/asset-manifest.json +37 -37
- package/static/app/assets/{Act-CS9IeqUX.js → Act-D4zSxFR-.js} +1 -1
- package/static/app/assets/{AdminConsole-3UkIEWGA.js → AdminConsole-w5jBfPt2.js} +1 -1
- package/static/app/assets/{Brain-B22EmNqS.js → Brain-C2EqQg74.js} +2 -2
- package/static/app/assets/BrainHome-CvXS6XiQ.js +2 -0
- package/static/app/assets/BrainSignals-DOE_KhOU.js +1 -0
- package/static/app/assets/Capture-DPqpGK8d.js +1 -0
- package/static/app/assets/{CommandPalette-86m4FCcN.js → CommandPalette-CNf7h5fp.js} +1 -1
- package/static/app/assets/Library-BN0HYOfc.js +1 -0
- package/static/app/assets/LivingBrain-Dfq_wEDI.js +1 -0
- package/static/app/assets/ProductFlow-B-3O0rNV.js +1 -0
- package/static/app/assets/{ReviewCard-BepjSDpN.js → ReviewCard-gZ-tdqFM.js} +1 -1
- package/static/app/assets/System-BElUcSSw.js +1 -0
- package/static/app/assets/arrow-left-CFNIMjhv.js +1 -0
- package/static/app/assets/{bot-DQj0-LkM.js → bot--qYHMtkP.js} +1 -1
- package/static/app/assets/brain-DDCLjRqO.js +1 -0
- package/static/app/assets/{button-CmTknyAP.js → button-51Z3rsuv.js} +1 -1
- package/static/app/assets/{circle-pause-yTCWRziJ.js → circle-pause-CMIiMaQl.js} +1 -1
- package/static/app/assets/{circle-play-Ccrva84R.js → circle-play-DZoO_cfG.js} +1 -1
- package/static/app/assets/{cpu-CbJqWTlS.js → cpu-Bs6uc9W9.js} +1 -1
- package/static/app/assets/{download-CkSzbzU-.js → download-G-2olkWz.js} +1 -1
- package/static/app/assets/{folder-open-CKyjQ4PU.js → folder-open-CTOspnmb.js} +1 -1
- package/static/app/assets/{hard-drive-DAzk9um0.js → hard-drive-CewHWJhn.js} +1 -1
- package/static/app/assets/index-CkzokZAj.css +2 -0
- package/static/app/assets/{index-CxOcwsHV.js → index-D7Rr-J2Y.js} +3 -3
- package/static/app/assets/{input-DcMETmZ7.js → input-D4w_BZWl.js} +1 -1
- package/static/app/assets/{permissionCopy-BVf13_25.js → permissionCopy-CosBEXAZ.js} +1 -1
- package/static/app/assets/primitives-d0g9pvzS.js +1 -0
- package/static/app/assets/search-BLCYt75v.js +1 -0
- package/static/app/assets/{share-2-COWCHNZm.js → share-2-NmD7e_oV.js} +1 -1
- package/static/app/assets/{shield-alert-BDrvilyK.js → shield-alert-CcQeMuju.js} +1 -1
- package/static/app/assets/{textarea-rUmsc8cP.js → textarea-BPAJDc-0.js} +1 -1
- package/static/app/assets/{useFocusTrap-Bi5UY_8v.js → useFocusTrap-C7YLdTBC.js} +1 -1
- package/static/app/assets/{useQuery-C-AicB-3.js → useQuery-DRyD9opW.js} +1 -1
- package/static/app/assets/{utils-BMwWg78e.js → utils-DG1_ExrP.js} +3 -3
- package/static/app/assets/{workspace-Y93tls8P.js → workspace-CWVf3gsI.js} +1 -1
- package/static/app/index.html +4 -4
- package/static/sw.js +1 -1
- package/static/app/assets/BrainHome-CMDqgJF4.js +0 -2
- package/static/app/assets/BrainSignals-BeE8RJo3.js +0 -1
- package/static/app/assets/Capture-ZX9bQh68.js +0 -1
- package/static/app/assets/Library-Bhz5LUca.js +0 -1
- package/static/app/assets/LivingBrain-BSa0wpFG.js +0 -1
- package/static/app/assets/ProductFlow-IP4Q-5aQ.js +0 -1
- package/static/app/assets/System-Bwx1h_jT.js +0 -1
- package/static/app/assets/arrow-left-ig7AZU8B.js +0 -1
- package/static/app/assets/brain-D8OEwmVj.js +0 -1
- package/static/app/assets/index-BfD-jhA9.css +0 -2
- package/static/app/assets/primitives-CQV9Q2YM.js +0 -1
- package/static/app/assets/search-CXGASMMH.js +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{C as e,_ as t,a as n,b as r,c as i,i as a,l as o,m as s,o as c,r as l,s as u,t as d,v as f,x as p}from"./utils-BMwWg78e.js";import{r as m}from"./useQuery-C-AicB-3.js";import{t as ee}from"./workspace-Y93tls8P.js";import{n as h}from"./input-DcMETmZ7.js";import{t as g}from"./button-CmTknyAP.js";var _=t(`circle-alert`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`line`,{x1:`12`,x2:`12`,y1:`8`,y2:`12`,key:`1pkeuh`}],[`line`,{x1:`12`,x2:`12.01`,y1:`16`,y2:`16`,key:`4dfq90`}]]),v=t(`loader-circle`,[[`path`,{d:`M21 12a9 9 0 1 1-6.219-8.56`,key:`13zald`}]]),y=t(`lock-keyhole`,[[`circle`,{cx:`12`,cy:`16`,r:`1`,key:`1au0dj`}],[`rect`,{x:`3`,y:`10`,width:`18`,height:`12`,rx:`2`,key:`6s8ecr`}],[`path`,{d:`M7 10V7a5 5 0 0 1 10 0v3`,key:`1pqi11`}]]),b=t(`sparkles`,[[`path`,{d:`M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z`,key:`1s2grr`}],[`path`,{d:`M20 2v4`,key:`1rf3ol`}],[`path`,{d:`M22 4h-4`,key:`gwowj6`}],[`circle`,{cx:`4`,cy:`20`,r:`2`,key:`6kqj1y`}]]),x=e(p()),S=r(),C={default:`border-primary/25 bg-primary/12 text-primary`,success:`border-success/30 bg-success/12 text-success`,warning:`border-warning/30 bg-warning/12 text-warning`,muted:`border-border bg-muted/70 text-muted-foreground`,danger:`border-destructive/30 bg-destructive/12 text-destructive`};function w({className:e,variant:t=`default`,...n}){return(0,S.jsx)(`span`,{className:l(`inline-flex min-h-6 max-w-full items-center whitespace-nowrap rounded-md border px-2 py-0.5 text-xs font-semibold leading-none`,C[t],e),...n})}function T({className:e,...t}){return(0,S.jsx)(`section`,{className:l(`premium-surface rounded-lg text-card-foreground`,e),...t})}function E({className:e,...t}){return(0,S.jsx)(`div`,{className:l(`flex flex-col gap-1.5 p-5`,e),...t})}function D({className:e,...t}){return(0,S.jsx)(`h2`,{className:l(`text-base font-semibold tracking-normal`,e),...t})}function O({className:e,...t}){return(0,S.jsx)(`p`,{className:l(`text-sm leading-6 text-muted-foreground`,e),...t})}function k({className:e,...t}){return(0,S.jsx)(`div`,{className:l(`p-5 pt-0`,e),...t})}function A({result:e}){let t=f(e=>e.mode),n=f(e=>e.language);return e?e.source===`live`&&e.ok?(0,S.jsx)(w,{variant:`success`,children:t===`basic`?s(n,`ui.status.ready`):s(n,`ui.status.connected`)}):(0,S.jsx)(w,{variant:`warning`,children:t===`basic`?s(n,`ui.status.needsSetup`):s(n,`ui.status.unavailable`)}):(0,S.jsx)(w,{variant:`muted`,children:s(n,`ui.status.notLoaded`)})}function j({title:e,detail:t}){let n=f(e=>e.language);return(0,S.jsxs)(`div`,{className:`product-empty-state flex min-h-36 flex-col items-center justify-center gap-2 rounded-lg border border-dashed border-border bg-muted/24 p-6 text-center text-sm text-muted-foreground`,children:[(0,S.jsx)(`div`,{className:`grid h-10 w-10 place-items-center rounded-md border border-border bg-card`,children:(0,S.jsx)(b,{className:`h-5 w-5 text-primary`})}),(0,S.jsx)(`div`,{className:`text-base font-semibold text-foreground`,children:e||s(n,`ui.empty.title`)}),t?(0,S.jsx)(`div`,{className:`max-w-md leading-6`,children:t}):null]})}function M({title:e,description:t,result:n,children:r,className:i}){let a=f(e=>e.mode),o=f(e=>e.language);return(0,S.jsxs)(T,{className:l(`data-panel overflow-hidden`,i),children:[(0,S.jsxs)(E,{className:`flex-row items-start justify-between gap-3`,children:[(0,S.jsxs)(`div`,{children:[(0,S.jsx)(D,{children:e}),t?(0,S.jsx)(O,{children:t}):null]}),a===`basic`?null:(0,S.jsx)(A,{result:n})]}),(0,S.jsx)(k,{children:n?.ok?r(n.data):(0,S.jsx)(j,{detail:a===`basic`?s(o,`ui.empty.basicDetail`):n?.error||s(o,`ui.empty.advancedDetail`)})})]})}function N({title:e}){let t=f(e=>e.language);return(0,S.jsxs)(T,{children:[(0,S.jsx)(E,{children:(0,S.jsx)(D,{children:e})}),(0,S.jsx)(k,{children:(0,S.jsxs)(`div`,{className:`flex items-center gap-2 text-sm text-muted-foreground`,children:[(0,S.jsx)(v,{className:`h-4 w-4 animate-spin`}),` `,s(t,`ui.loading`)]})})]})}function P({stats:e}){return(0,S.jsx)(`div`,{className:`data-stat-grid grid gap-3 sm:grid-cols-2 xl:grid-cols-4`,children:e.map(e=>(0,S.jsxs)(`div`,{className:`rounded-lg border border-border bg-background/55 p-4`,children:[(0,S.jsx)(`div`,{className:`text-xs uppercase text-muted-foreground`,children:e.label}),(0,S.jsx)(`div`,{className:`mt-2 text-2xl font-semibold leading-tight`,children:typeof e.value==`number`?a(e.value):String(e.value??`-`)}),e.hint?(0,S.jsx)(`div`,{className:`mt-2 text-xs leading-5 text-muted-foreground`,children:e.hint}):null]},e.label))})}function F(e){return e==null||e===``?`-`:typeof e==`number`?Number.isFinite(e)?a(e):`-`:typeof e==`boolean`?e?`Enabled`:`Disabled`:String(e)}var I=/(^id$|_id$|token|secret|passphrase|fingerprint|public_key|private_key|dsn|schema|endpoint|base_url|localhost|127\.0\.0\.1|stack|trace|raw|runtime|engine|module|port|host|api|internal)/i;function L(e){return I.test(e)}var R=[`status`,`state`,`name`,`title`,`label`,`summary`,`version`,`ready`];function z(e){for(let t of R){let n=e[t];if(n==null||n===``||typeof n==`object`)continue;let r=F(n);if(r&&r!==`-`)return r.length>96?i(r,96):r}return``}function B(e){let t=F(e);return t===`-`||t.includes(`/`)||t.includes(`@`)||/\.[a-z0-9]{2,5}$/i.test(t)?t:o(t.replace(/^agent:/i,``).replace(/^tool:/i,``))}function V(e){for(let t of[`documents`,`sources`,`items`,`agents`,`workflows`,`runs`,`events`,`permissions`,`models`,`peers`,`invitations`,`roles`,`policies`,`hooks`,`tools`,`templates`,`plugins`,`recent_events`]){let n=d(e[t]);if(n.length)return n}return[]}function H({value:e}){let t=f(e=>e.language);if(typeof e==`boolean`)return(0,S.jsx)(w,{variant:e?`success`:`muted`,children:s(t,e?`ui.value.enabled`:`ui.value.disabled`)});if(Array.isArray(e))return e.length?e.every(e=>e===null||[`string`,`number`,`boolean`].includes(typeof e))?(0,S.jsxs)(`span`,{className:`flex flex-wrap gap-1`,children:[e.slice(0,5).map((e,t)=>(0,S.jsx)(w,{variant:`muted`,children:F(e)},`${String(e)}-${t}`)),e.length>5?(0,S.jsxs)(w,{variant:`muted`,children:[`+`,e.length-5]}):null]}):(0,S.jsx)(`span`,{className:`text-muted-foreground`,children:s(t,`ui.value.records`,{count:a(e.length)})}):(0,S.jsx)(`span`,{className:`text-muted-foreground`,children:s(t,`ui.value.none`)});if(c(e)){let n=Object.keys(e);if(!n.length)return(0,S.jsx)(`span`,{className:`text-muted-foreground`,children:s(t,`ui.value.noFields`)});let r=z(e);return r?(0,S.jsx)(`span`,{className:`break-words`,children:r}):(0,S.jsx)(`span`,{className:`text-muted-foreground`,children:s(t,`ui.value.fields`,{count:a(n.length)})})}let n=F(e);return(0,S.jsx)(`span`,{className:`break-words`,children:n.length>96?i(n,96):n})}function U({data:e,limit:t=8}){let n=f(e=>e.mode),r=f(e=>e.language),i=Object.entries(e||{}).filter(([e])=>n!==`basic`||!L(e)).slice(0,t);return i.length?(0,S.jsx)(`div`,{className:`divide-y divide-border rounded-md border border-border`,children:i.map(([e,t])=>(0,S.jsxs)(`div`,{className:`grid grid-cols-[minmax(9rem,0.5fr)_1fr] gap-3 p-3 text-sm`,children:[(0,S.jsx)(`span`,{className:`font-medium text-muted-foreground`,children:q(e,r)}),(0,S.jsx)(`span`,{className:`min-w-0 break-words`,children:(0,S.jsx)(H,{value:J(e,t)})})]},e))}):(0,S.jsx)(j,{title:s(r,`ui.noValues`)})}function W({value:e,titleKey:t=`title`,metaKey:n=`status`,limit:r=8}){let i=f(e=>e.mode),a=f(e=>e.language);return i===`basic`?(0,S.jsx)(G,{value:e,titleKey:t,metaKey:n,limit:r}):Array.isArray(e)?e.length?e.every(e=>c(e))?(0,S.jsx)($,{items:e,titleKey:t,metaKey:n,limit:r}):(0,S.jsxs)(`div`,{className:`flex flex-wrap gap-1 rounded-md border border-border bg-background p-3`,children:[e.slice(0,r).map((e,t)=>(0,S.jsx)(w,{variant:`muted`,children:F(e)},`${String(e)}-${t}`)),e.length>r?(0,S.jsxs)(w,{variant:`muted`,children:[`+`,e.length-r]}):null]}):(0,S.jsx)(j,{detail:s(a,`ui.empty.listDetail`)}):c(e)?(0,S.jsx)(U,{data:e,limit:r}):(0,S.jsx)(`div`,{className:`rounded-md border border-border bg-background p-3 text-sm`,children:(0,S.jsx)(H,{value:e})})}function G({value:e,titleKey:t=`title`,metaKey:n=`status`,limit:r=6}){let i=f(e=>e.language);if(Array.isArray(e))return e.length?e.every(e=>c(e))?(0,S.jsx)($,{items:e,titleKey:t,metaKey:n,limit:r}):(0,S.jsxs)(`div`,{className:`flex flex-wrap gap-1 rounded-md border border-border bg-background/55 p-3`,children:[e.slice(0,r).map((e,t)=>(0,S.jsx)(w,{variant:`muted`,children:B(e)},`${String(e)}-${t}`)),e.length>r?(0,S.jsxs)(w,{variant:`muted`,children:[`+`,e.length-r]}):null]}):(0,S.jsx)(j,{detail:s(i,`ui.empty.listDetail`)});if(c(e)){let i=V(e);return i.length?(0,S.jsx)($,{items:i,titleKey:t,metaKey:n,limit:r}):(0,S.jsx)(U,{data:Object.fromEntries(Object.entries(e).filter(([e])=>!L(e)).map(([e,t])=>[e,Array.isArray(t)?`${a(t.length)} items`:c(t)?`available`:t])),limit:r})}return(0,S.jsx)(`div`,{className:`rounded-md border border-border bg-background/55 p-3 text-sm`,children:B(e)})}function K({result:e,successLabel:t}){let n=f(e=>e.mode),r=f(e=>e.language);return e?e.ok?(0,S.jsxs)(`div`,{className:`space-y-2 rounded-md border border-border bg-background p-3`,children:[(0,S.jsx)(w,{variant:`success`,children:t||s(r,`ui.requestCompleted`)}),n===`basic`?(0,S.jsx)(G,{value:e.data}):(0,S.jsx)(W,{value:e.data})]}):(0,S.jsx)(j,{title:s(r,`ui.requestUnavailable`),detail:e.error||(0,S.jsx)(H,{value:e.data})}):null}function q(e,t){let n=`ui.field.${e.toLowerCase()}`,r=s(t,n);return r===n?o(e):r}function J(e,t){return/model/i.test(e)?typeof t==`string`&&t.includes(`/`)?n(t):Array.isArray(t)?t.map(e=>typeof e==`string`&&e.includes(`/`)?n(e):e):t:t}function Y(e,t){let n=F(e),r=n.charAt(0).toUpperCase()+n.slice(1).toLowerCase();for(let e of[n,r]){let n=`ui.entity.${e}`,r=s(t,n);if(r!==n)return r}return B(n)}function X(e,t,n,r){if(!e)return``;let i=[t.type,t.id,t.name].map(e=>String(e||``).toLowerCase().split(`:`).pop()||``).filter(Boolean);for(let t of i){let i=`${e}.${t}${n}`,a=s(r,i);if(a!==i)return a}return``}function Z(e,t,n,r){for(let n of[e[t],e.name,e.label,r===`basic`?``:e.id]){let e=u(n);if(e)return e}return`#${n+1}`}function Q(e,t,n,r){let i=Z(e,t,n,r);for(let t of[e.summary,e.description,e.path]){let e=u(t);if(e&&e!==i)return e}return``}function $({items:e,titleKey:t=`title`,metaKey:n=`type`,limit:r=8,labelPrefix:a}){let o=f(e=>e.mode),c=f(e=>e.language),l=d(e).slice(0,r);return l.length?(0,S.jsx)(`div`,{className:`entity-list grid gap-2`,children:l.map((e,r)=>{let s=X(a,e,``,c),l=s||Z(e,t,r,o),u=s?``:Y(e[n]||e.status||e.state||`ready`,c);return(0,S.jsxs)(`div`,{className:`entity-list-row rounded-lg border border-border bg-background/55 p-3`,children:[(0,S.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-2`,children:[(0,S.jsx)(`div`,{className:`font-medium`,children:l}),u&&u.toLowerCase()!==l.toLowerCase()?(0,S.jsx)(w,{variant:`muted`,children:u}):null]}),X(a,e,`.detail`,c)||Q(e,t,r,o)?(0,S.jsx)(`p`,{className:`mt-1 text-sm text-muted-foreground`,children:X(a,e,`.detail`,c)||Q(e,t,r,o)}):null,o!==`basic`&&e.id&&e[t]!==e.id?(0,S.jsx)(`div`,{className:`mt-1 text-xs text-muted-foreground`,children:i(e.id,48)}):null]},String(e.id||e.name||r))})}):(0,S.jsx)(j,{detail:s(c,`ui.empty.listDetail`)})}function te({title:e,detail:t,target:n=`advanced`}){let r=f(e=>e.setMode),i=f(e=>e.language);return(0,S.jsx)(T,{children:(0,S.jsxs)(k,{className:`flex flex-col items-start gap-3 p-6`,children:[(0,S.jsx)(`div`,{className:`grid h-10 w-10 place-items-center rounded-md border border-border bg-background/70`,children:(0,S.jsx)(y,{className:`h-5 w-5 text-primary`})}),(0,S.jsxs)(`div`,{children:[(0,S.jsx)(`div`,{className:`text-lg font-semibold`,children:e||s(i,`ui.modeGate.title`)}),(0,S.jsx)(`p`,{className:`mt-1 max-w-2xl text-sm leading-6 text-muted-foreground`,children:t||s(i,`ui.modeGate.detail`)})]}),(0,S.jsx)(g,{onClick:()=>r(n),children:n===`admin`?s(i,`ui.modeGate.admin`):s(i,`ui.modeGate.advanced`)})]})})}function ne({label:e,successLabel:t,action:n,onSuccess:r,invalidate:i,variant:a=`outline`,disabled:o}){let c=m(),u=f(e=>e.language),d=t||s(u,`ui.done`),[p,y]=x.useState(null),b=ee({mutationFn:n,onSuccess:async e=>{y(e.ok?d:e.error||s(u,`ui.status.unavailable`)),e.ok&&(await r?.(e),i&&await Promise.all(i.map(e=>c.invalidateQueries({queryKey:[e]}))))}});return(0,S.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,S.jsxs)(g,{variant:a,disabled:o||b.isPending,onClick:()=>b.mutate(),children:[b.isPending?(0,S.jsx)(v,{className:`h-4 w-4 animate-spin`}):null,e]}),p?(0,S.jsxs)(`span`,{className:l(`inline-flex items-center gap-1 text-xs`,p===d?`text-success`:`text-warning`),children:[p===d?(0,S.jsx)(h,{className:`h-3.5 w-3.5`}):(0,S.jsx)(_,{className:`h-3.5 w-3.5`}),p]}):null]})}function re({tabs:e,value:t,onChange:n,ariaLabel:r,ariaLabelledBy:i}){let a=x.useRef([]),o=(t,r)=>{let i=(t+r+e.length)%e.length;a.current[i]?.focus(),n(e[i].id)},s=e.findIndex(e=>e.id===t),c=s>=0?s:0;return(0,S.jsx)(`div`,{className:`product-tabs inline-flex max-w-full flex-wrap gap-1 rounded-lg border border-border bg-muted/28 p-1`,role:`tablist`,"aria-label":r,"aria-labelledby":i,children:e.map((r,i)=>(0,S.jsx)(`button`,{ref:e=>{a.current[i]=e},type:`button`,role:`tab`,"aria-selected":t===r.id,tabIndex:i===c?0:-1,onClick:()=>n(r.id),onKeyDown:t=>{t.key===`ArrowRight`||t.key===`ArrowDown`?(t.preventDefault(),o(i,1)):t.key===`ArrowLeft`||t.key===`ArrowUp`?(t.preventDefault(),o(i,-1)):t.key===`Home`?(t.preventDefault(),a.current[0]?.focus(),n(e[0].id)):t.key===`End`&&(t.preventDefault(),a.current[e.length-1]?.focus(),n(e[e.length-1].id))},className:l(`h-9 rounded-md px-3.5 text-sm font-semibold transition`,t===r.id?`bg-card text-foreground shadow-sm`:`text-muted-foreground hover:bg-card/60 hover:text-foreground`),children:r.label},r.id))})}export{D as _,U as a,v as b,K as c,re as d,H as f,E as g,O as h,$ as i,P as l,k as m,M as n,N as o,T as p,j as r,te as s,ne as t,W as u,w as v,_ as x,b as y};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{_ as e}from"./utils-BMwWg78e.js";var t=e(`search`,[[`path`,{d:`m21 21-4.34-4.34`,key:`14j7rj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}]]);export{t};
|