@zerohive/hive-viewer 2.0.4 → 2.0.5
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.cjs +8 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.mjs +8 -0
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
package/dist/index.d.ts
CHANGED
package/dist/index.mjs
CHANGED
|
@@ -9091,6 +9091,7 @@ function getFileNameHint(fileUrl, fileName) {
|
|
|
9091
9091
|
function DocumentViewer(props) {
|
|
9092
9092
|
const mode = props.mode ?? "view";
|
|
9093
9093
|
const theme = props.theme ?? "light";
|
|
9094
|
+
const externalLoading = props.loading ?? false;
|
|
9094
9095
|
const locale = useMemo9(
|
|
9095
9096
|
() => ({ ...defaultLocale, ...props.locale }),
|
|
9096
9097
|
[props.locale]
|
|
@@ -9240,6 +9241,12 @@ function DocumentViewer(props) {
|
|
|
9240
9241
|
let active = true;
|
|
9241
9242
|
let cleanupSource;
|
|
9242
9243
|
const loadFile = async () => {
|
|
9244
|
+
if (externalLoading) {
|
|
9245
|
+
setLoading(true);
|
|
9246
|
+
setError("");
|
|
9247
|
+
setResolved(null);
|
|
9248
|
+
return;
|
|
9249
|
+
}
|
|
9243
9250
|
setLoading(true);
|
|
9244
9251
|
setError("");
|
|
9245
9252
|
setResolved(null);
|
|
@@ -9285,6 +9292,7 @@ function DocumentViewer(props) {
|
|
|
9285
9292
|
cleanupSource?.();
|
|
9286
9293
|
};
|
|
9287
9294
|
}, [
|
|
9295
|
+
externalLoading,
|
|
9288
9296
|
hasIncomingSource,
|
|
9289
9297
|
isRequestedCreateUnsupported,
|
|
9290
9298
|
mode,
|