// Copyright 2026 Ivan Aliaga // SPDX-License-Identifier: Apache-2.0 // // React hooks over the DazzleWeb runtime. These are convenience // wrappers — the underlying API is `DazzleWeb` from ./dazzle_web, // which works fine without React if you prefer imperative control. import { useEffect, useState, useMemo, useCallback } from 'react'; import { DazzleWeb, DazzleWebHash, DazzleWebVectorIndex, VectorSearchHit } from './dazzle_web'; /** * Initialise the WASM module + restore an OPFS snapshot, exactly once. * * Returns: * - `ready` — true once initialise() resolved * - `error` — the Error if loading failed (e.g. missing