Rebuilt dist/ and api release bundle, with the migration for catalog paging indexes. Fix Less build error: fade(@token, N%) on theme tokens failed in both user-app and user-app-v2 CustomerChoiceView; use alpha(), the project's token-aware helper. Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
2 lines
624 B
JavaScript
2 lines
624 B
JavaScript
import{q as d,U as f,K as c,aI as g,h as p,i as v,s as y}from"./index-Fj5Qv9qV.js";const m=d("catalog",()=>{const o=f(),s=o.peek(c.catalog),e=g(s??[]),n=p(s!==void 0),i=v(()=>{const t=new Map;for(const a of e.value)a.category&&!t.has(a.category.id)&&t.set(a.category.id,{id:a.category.id,title:a.category.title});return[...t.values()]});async function r(t=!1){const a=await o.fetch(c.catalog,y.listProducts,{force:t});return e.value=a,n.value=!0,a}function l(t){return e.value.find(a=>a.id===t)??null}function u(){o.invalidate(c.catalog)}return{products:e,loaded:n,categories:i,load:r,byId:l,invalidate:u}});export{m as u};
|