File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11<script lang =" ts" >
22 import Table from " $lib/components/table/table.svelte" ;
33
4- import { catalog } from " $lib/stores/catalog.svelte" ;
4+ import { Catalog } from " $lib/stores/catalog.svelte" ;
55
66 import { mapConfig } from " $lib/utilities/catalog" ;
77
8+ const catalog = Catalog .use ();
9+
810 const config = $derived (mapConfig (catalog , " Search Results" , " Search all stores..." ));
911 </script >
1012
Original file line number Diff line number Diff line change 1+ import { setContext , getContext } from "svelte" ;
2+
13import SearchWorker from "$lib/workers/search.worker?worker" ;
24
35import type { Store } from "$lib/types/store" ;
@@ -6,7 +8,7 @@ import type { Status } from "$lib/types/status";
68import { SortStateSchema , type SortState } from "$lib/types/table" ;
79import type { WorkerToMainMessage } from "$lib/types/worker" ;
810
9- export class Catalog {
11+ export class CatalogStore {
1012 status = $state < Status > ( "pending" ) ;
1113 count = $state ( 0 ) ;
1214 total = $state ( 0 ) ;
@@ -127,4 +129,9 @@ export class Catalog {
127129 }
128130}
129131
130- export const catalog = new Catalog ( ) ;
132+ const key = Symbol ( "catalog" ) ;
133+
134+ export const Catalog = {
135+ init : ( ) => setContext ( key , new CatalogStore ( ) ) ,
136+ use : ( ) => getContext < CatalogStore > ( key )
137+ }
Original file line number Diff line number Diff line change 11<script lang =" ts" >
22 import Navbar from " $lib/components/layout/navbar.svelte" ;
3+
4+ import { Catalog } from " $lib/stores/catalog.svelte" ;
5+
6+ Catalog .init ();
37
48 let { children } = $props ();
59 </script >
Original file line number Diff line number Diff line change 11{
2- "number" : " 0.4.23 " ,
3- "lastUpdated" : " 2026-01-05T19:38:47.550654 +00:00" ,
4- "sheetLastFetched" : " 2026-01-05T19:38:47.550654 +00:00" ,
2+ "number" : " 0.4.30 " ,
3+ "lastUpdated" : " 2026-01-07T15:44:37.344082 +00:00" ,
4+ "sheetLastFetched" : " 2026-01-07T15:44:37.344082 +00:00" ,
55 "sheetLastUpdated" : " 2025-12-19T06:00:00+00:00"
66}
You can’t perform that action at this time.
0 commit comments