pdfjs-reader-core 0.2.7 → 0.2.8

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/index.js CHANGED
@@ -9988,12 +9988,13 @@ var init_PDFViewerClient = __esm({
9988
9988
  currentDoc.destroy();
9989
9989
  viewerStore.getState().setDocument(null);
9990
9990
  }
9991
+ viewerStore.getState().setLoading(true, { phase: "initializing" });
9992
+ viewerStore.getState().setError(null);
9993
+ setLoadState("loading");
9991
9994
  const loadDoc = async () => {
9992
9995
  if (!mountedRef.current) return;
9993
9996
  try {
9994
- viewerStore.getState().setLoading(true, { phase: "fetching" });
9995
- viewerStore.getState().setError(null);
9996
- setLoadState("loading");
9997
+ viewerStore.getState().setLoadingProgress({ phase: "fetching" });
9997
9998
  const { document: document2, numPages } = await loadDocument({
9998
9999
  src,
9999
10000
  workerSrc,