triiiceratops 0.10.4 → 0.10.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.
@@ -1,4 +1,4 @@
1
- import { a as t } from "./X-DuHUJc5I.js";
1
+ import { a as t } from "./X-Hy7z8RKI.js";
2
2
  const a = (
3
3
  /** @type {(inputs: {}) => LocalizedString} */
4
4
  () => (
@@ -49,6 +49,7 @@
49
49
  $effect(() => {
50
50
  if (rootElement) {
51
51
  applyTheme(rootElement, theme, themeConfig);
52
+ internalViewerState.setViewerElement(rootElement);
52
53
  }
53
54
  });
54
55
 
@@ -1,4 +1,4 @@
1
- import { a as t } from "./X-DuHUJc5I.js";
1
+ import { a as t } from "./X-Hy7z8RKI.js";
2
2
  const s = (
3
3
  /** @type {(inputs: {}) => LocalizedString} */
4
4
  () => (
@@ -4,10 +4,10 @@ var nt = (s, e, t) => Mf(s, typeof e != "symbol" ? e + "" : e, t);
4
4
  import "svelte/internal/disclose-version";
5
5
  import * as d from "svelte/internal/client";
6
6
  import { getContext as Rf, onMount as If, onDestroy as Cf } from "svelte";
7
- import { m as xl, g as as, l as Pf, s as Df, X as bl, c as Lf, V as Of } from "../X-DuHUJc5I.js";
7
+ import { m as xl, g as as, l as Pf, s as Df, X as bl, c as Lf, V as Of } from "../X-Hy7z8RKI.js";
8
8
  import Hs from "openseadragon";
9
- import { A as Bf } from "../ArrowCounterClockwise-Bqd8M_aJ.js";
10
- import { q as Nf, h as Ff, c as kf, j as Uf, k as $f, t as Gf, u as Hf, v as Vf, r as Xf, s as zf, m as jf, i as Yf, g as Wf, a as Zf, n as qf, f as Kf, e as Jf, b as Qf, d as ep, o as tp, l as sp, p as ip } from "../annotation_tool_point-r6erVcAH.js";
9
+ import { A as Bf } from "../ArrowCounterClockwise-C2bPi1fL.js";
10
+ import { q as Nf, h as Ff, c as kf, j as Uf, k as $f, t as Gf, u as Hf, v as Vf, r as Xf, s as zf, m as jf, i as Yf, g as Wf, a as Zf, n as qf, f as Kf, e as Jf, b as Qf, d as ep, o as tp, l as sp, p as ip } from "../annotation_tool_point-CVRtOCN5.js";
11
11
  import "manifesto.js";
12
12
  var np = Object.defineProperty, rp = (s, e, t) => e in s ? np(s, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[e] = t, El = (s, e, t) => rp(s, typeof e != "symbol" ? e + "" : e, t), wl = Object.prototype.hasOwnProperty;
13
13
  function Vs(s, e) {
@@ -1,9 +1,9 @@
1
1
  import "svelte/internal/disclose-version";
2
2
  import * as e from "svelte/internal/client";
3
3
  import { getContext as s0 } from "svelte";
4
- import { l as l0, s as i0, X as n0, c as o0, V as c0, g as v0 } from "../X-DuHUJc5I.js";
5
- import { A as d0 } from "../ArrowCounterClockwise-Bqd8M_aJ.js";
6
- import { i as _0, a as g0, b as f0, g as u0, c as h0, e as m0, d as p0, f as b0 } from "../image_filters_reset-GRY5dmGP.js";
4
+ import { l as l0, s as i0, X as n0, c as o0, V as c0, g as v0 } from "../X-Hy7z8RKI.js";
5
+ import { A as d0 } from "../ArrowCounterClockwise-C2bPi1fL.js";
6
+ import { i as _0, a as g0, b as f0, g as u0, c as h0, e as m0, d as p0, f as b0 } from "../image_filters_reset-BOxhPxhP.js";
7
7
  const G = {
8
8
  brightness: 100,
9
9
  contrast: 100,
@@ -85,6 +85,12 @@ export declare class ViewerState {
85
85
  updateConfig(newConfig: ViewerConfig): void;
86
86
  toggleAnnotations(): void;
87
87
  toggleThumbnailGallery(): void;
88
+ /**
89
+ * Reference to the main viewer DOM element.
90
+ * Used for fullscreen toggling.
91
+ */
92
+ private viewerElement;
93
+ setViewerElement(element: HTMLElement): void;
88
94
  toggleFullScreen(): void;
89
95
  toggleMetadataDialog(): void;
90
96
  searchQuery: string;
@@ -212,14 +212,27 @@ export class ViewerState {
212
212
  this.showThumbnailGallery = !this.showThumbnailGallery;
213
213
  this.dispatchStateChange();
214
214
  }
215
+ /**
216
+ * Reference to the main viewer DOM element.
217
+ * Used for fullscreen toggling.
218
+ */
219
+ viewerElement = null;
220
+ setViewerElement(element) {
221
+ this.viewerElement = element;
222
+ }
215
223
  toggleFullScreen() {
216
224
  if (!document.fullscreenElement) {
217
- const el = document.getElementById('triiiceratops-viewer');
225
+ // Use stored reference if available, fallback to ID lookup (legacy/Svelte-only)
226
+ const el = this.viewerElement ||
227
+ document.getElementById('triiiceratops-viewer');
218
228
  if (el) {
219
229
  el.requestFullscreen().catch((e) => {
220
230
  console.warn('Fullscreen request failed', e);
221
231
  });
222
232
  }
233
+ else {
234
+ console.warn('Cannot toggle fullscreen: Viewer element not found');
235
+ }
223
236
  }
224
237
  else {
225
238
  document.exitFullscreen();