triiiceratops 0.10.5 → 0.11.1
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/{ArrowCounterClockwise-C2bPi1fL.js → ArrowCounterClockwise-CN8KGaI0.js} +1 -1
- package/dist/{X-Hy7z8RKI.js → X-i_EmjXwW.js} +376 -359
- package/dist/actions/tooltip.d.ts +10 -0
- package/dist/actions/tooltip.js +107 -0
- package/dist/{annotation_tool_point-CVRtOCN5.js → annotation_tool_point-BpZXtX5D.js} +1 -1
- package/dist/components/CanvasNavigation.svelte +57 -21
- package/dist/components/DemoHeader.svelte +81 -40
- package/dist/components/OSDViewer.svelte +2 -1
- package/dist/components/Toolbar.svelte +295 -0
- package/dist/components/Toolbar.svelte.d.ts +3 -0
- package/dist/components/TriiiceratopsViewer.svelte +7 -13
- package/dist/{image_filters_reset-BOxhPxhP.js → image_filters_reset-CyWg622b.js} +1 -1
- package/dist/paraglide/messages/_index.d.ts +6 -3
- package/dist/paraglide/messages/_index.js +6 -3
- package/dist/paraglide/messages/{settings_toggle_right_menu.d.ts → open_menu.d.ts} +1 -1
- package/dist/paraglide/messages/open_menu.js +33 -0
- package/dist/paraglide/messages/{settings_submenu_right_menu_items.d.ts → settings_submenu_toolbar.d.ts} +1 -1
- package/dist/paraglide/messages/{settings_toggle_right_menu.js → settings_submenu_toolbar.js} +9 -9
- package/dist/paraglide/messages/settings_toggle_show_toggle.d.ts +4 -0
- package/dist/paraglide/messages/{settings_submenu_right_menu_items.js → settings_toggle_show_toggle.js} +9 -9
- package/dist/paraglide/messages/settings_toggle_zoom_controls.d.ts +4 -0
- package/dist/paraglide/messages/settings_toggle_zoom_controls.js +34 -0
- package/dist/paraglide/messages/settings_toolbar_open.d.ts +4 -0
- package/dist/paraglide/messages/settings_toolbar_open.js +34 -0
- package/dist/paraglide/messages/{settings_toggle_left_menu.d.ts → settings_toolbar_position.d.ts} +1 -1
- package/dist/paraglide/messages/{settings_toggle_left_menu.js → settings_toolbar_position.js} +9 -9
- package/dist/plugins/annotation-editor.js +3 -3
- package/dist/plugins/image-manipulation.js +3 -3
- package/dist/state/viewer.svelte.d.ts +7 -2
- package/dist/state/viewer.svelte.js +26 -5
- package/dist/triiiceratops-bundle.js +2768 -2533
- package/dist/triiiceratops-element.iife.js +17 -17
- package/dist/triiiceratops.css +1 -1
- package/dist/types/config.d.ts +24 -18
- package/dist/utils/annotationAdapter.test.js +32 -29
- package/package.json +1 -1
- package/dist/components/FloatingMenu.svelte +0 -208
- package/dist/components/FloatingMenu.svelte.d.ts +0 -3
- package/dist/components/LeftFab.svelte +0 -81
- package/dist/components/LeftFab.svelte.d.ts +0 -3
package/dist/paraglide/messages/{settings_toggle_left_menu.js → settings_toolbar_position.js}
RENAMED
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
import { getLocale, trackMessageCall, experimentalMiddlewareLocaleSplitting, isServer } from '../runtime.js';
|
|
3
3
|
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
|
|
4
4
|
|
|
5
|
-
const
|
|
6
|
-
return /** @type {LocalizedString} */ (`
|
|
5
|
+
const en_settings_toolbar_position = /** @type {(inputs: {}) => LocalizedString} */ () => {
|
|
6
|
+
return /** @type {LocalizedString} */ (`Toolbar Position`)
|
|
7
7
|
};
|
|
8
8
|
|
|
9
|
-
const
|
|
10
|
-
return /** @type {LocalizedString} */ (`
|
|
9
|
+
const de_settings_toolbar_position = /** @type {(inputs: {}) => LocalizedString} */ () => {
|
|
10
|
+
return /** @type {LocalizedString} */ (`Werkzeugleisten-Position`)
|
|
11
11
|
};
|
|
12
12
|
|
|
13
13
|
/**
|
|
@@ -23,12 +23,12 @@ const de_settings_toggle_left_menu = /** @type {(inputs: {}) => LocalizedString}
|
|
|
23
23
|
* @returns {LocalizedString}
|
|
24
24
|
*/
|
|
25
25
|
/* @__NO_SIDE_EFFECTS__ */
|
|
26
|
-
export const
|
|
26
|
+
export const settings_toolbar_position = (inputs = {}, options = {}) => {
|
|
27
27
|
if (experimentalMiddlewareLocaleSplitting && isServer === false) {
|
|
28
|
-
return /** @type {any} */ (globalThis).__paraglide_ssr.
|
|
28
|
+
return /** @type {any} */ (globalThis).__paraglide_ssr.settings_toolbar_position(inputs)
|
|
29
29
|
}
|
|
30
30
|
const locale = options.locale ?? getLocale()
|
|
31
|
-
trackMessageCall("
|
|
32
|
-
if (locale === "en") return
|
|
33
|
-
return
|
|
31
|
+
trackMessageCall("settings_toolbar_position", locale)
|
|
32
|
+
if (locale === "en") return en_settings_toolbar_position(inputs)
|
|
33
|
+
return de_settings_toolbar_position(inputs)
|
|
34
34
|
};
|
|
@@ -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-
|
|
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-i_EmjXwW.js";
|
|
8
8
|
import Hs from "openseadragon";
|
|
9
|
-
import { A as Bf } from "../ArrowCounterClockwise-
|
|
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-
|
|
9
|
+
import { A as Bf } from "../ArrowCounterClockwise-CN8KGaI0.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-BpZXtX5D.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-
|
|
5
|
-
import { A as d0 } from "../ArrowCounterClockwise-
|
|
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-
|
|
4
|
+
import { l as l0, s as i0, X as n0, c as o0, V as c0, g as v0 } from "../X-i_EmjXwW.js";
|
|
5
|
+
import { A as d0 } from "../ArrowCounterClockwise-CN8KGaI0.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-CyWg622b.js";
|
|
7
7
|
const G = {
|
|
8
8
|
brightness: 100,
|
|
9
9
|
contrast: 100,
|
|
@@ -11,6 +11,7 @@ export interface ViewerStateSnapshot {
|
|
|
11
11
|
showAnnotations: boolean;
|
|
12
12
|
showThumbnailGallery: boolean;
|
|
13
13
|
showSearchPanel: boolean;
|
|
14
|
+
toolbarOpen: boolean;
|
|
14
15
|
searchQuery: string;
|
|
15
16
|
isFullScreen: boolean;
|
|
16
17
|
dockSide: string;
|
|
@@ -20,6 +21,7 @@ export declare class ViewerState {
|
|
|
20
21
|
canvasId: string | null;
|
|
21
22
|
showAnnotations: boolean;
|
|
22
23
|
showThumbnailGallery: boolean;
|
|
24
|
+
toolbarOpen: boolean;
|
|
23
25
|
isGalleryDockedBottom: boolean;
|
|
24
26
|
isGalleryDockedRight: boolean;
|
|
25
27
|
isFullScreen: boolean;
|
|
@@ -27,9 +29,9 @@ export declare class ViewerState {
|
|
|
27
29
|
dockSide: string;
|
|
28
30
|
visibleAnnotationIds: Set<string>;
|
|
29
31
|
config: ViewerConfig;
|
|
30
|
-
get
|
|
31
|
-
get showLeftMenu(): boolean;
|
|
32
|
+
get showToggle(): boolean;
|
|
32
33
|
get showCanvasNav(): boolean;
|
|
34
|
+
get showZoomControls(): boolean;
|
|
33
35
|
galleryPosition: {
|
|
34
36
|
x: number;
|
|
35
37
|
y: number;
|
|
@@ -80,10 +82,13 @@ export declare class ViewerState {
|
|
|
80
82
|
get hasPrevious(): boolean;
|
|
81
83
|
nextCanvas(): void;
|
|
82
84
|
previousCanvas(): void;
|
|
85
|
+
zoomIn(): void;
|
|
86
|
+
zoomOut(): void;
|
|
83
87
|
setManifest(manifestId: string): void;
|
|
84
88
|
setCanvas(canvasId: string): void;
|
|
85
89
|
updateConfig(newConfig: ViewerConfig): void;
|
|
86
90
|
toggleAnnotations(): void;
|
|
91
|
+
toggleToolbar(): void;
|
|
87
92
|
toggleThumbnailGallery(): void;
|
|
88
93
|
/**
|
|
89
94
|
* Reference to the main viewer DOM element.
|
|
@@ -4,6 +4,7 @@ export class ViewerState {
|
|
|
4
4
|
canvasId = $state(null);
|
|
5
5
|
showAnnotations = $state(false);
|
|
6
6
|
showThumbnailGallery = $state(false);
|
|
7
|
+
toolbarOpen = $state(false);
|
|
7
8
|
isGalleryDockedBottom = $state(false);
|
|
8
9
|
isGalleryDockedRight = $state(false);
|
|
9
10
|
isFullScreen = $state(false);
|
|
@@ -13,15 +14,15 @@ export class ViewerState {
|
|
|
13
14
|
// UI Configuration
|
|
14
15
|
config = $state({});
|
|
15
16
|
// Derived configuration specific getters
|
|
16
|
-
get
|
|
17
|
-
return this.config.
|
|
18
|
-
}
|
|
19
|
-
get showLeftMenu() {
|
|
20
|
-
return this.config.showLeftMenu ?? true;
|
|
17
|
+
get showToggle() {
|
|
18
|
+
return this.config.showToggle ?? true;
|
|
21
19
|
}
|
|
22
20
|
get showCanvasNav() {
|
|
23
21
|
return this.config.showCanvasNav ?? true;
|
|
24
22
|
}
|
|
23
|
+
get showZoomControls() {
|
|
24
|
+
return this.config.showZoomControls ?? true;
|
|
25
|
+
}
|
|
25
26
|
// Gallery State (Lifted for persistence during re-docking)
|
|
26
27
|
galleryPosition = $state({ x: 20, y: 100 });
|
|
27
28
|
gallerySize = $state({ width: 300, height: 400 });
|
|
@@ -69,6 +70,7 @@ export class ViewerState {
|
|
|
69
70
|
showAnnotations: this.showAnnotations,
|
|
70
71
|
showThumbnailGallery: this.showThumbnailGallery,
|
|
71
72
|
showSearchPanel: this.showSearchPanel,
|
|
73
|
+
toolbarOpen: this.toolbarOpen,
|
|
72
74
|
searchQuery: this.searchQuery,
|
|
73
75
|
isFullScreen: this.isFullScreen,
|
|
74
76
|
dockSide: this.dockSide,
|
|
@@ -158,6 +160,18 @@ export class ViewerState {
|
|
|
158
160
|
this.setCanvas(canvas.id);
|
|
159
161
|
}
|
|
160
162
|
}
|
|
163
|
+
zoomIn() {
|
|
164
|
+
if (this.osdViewer && this.osdViewer.viewport) {
|
|
165
|
+
this.osdViewer.viewport.zoomBy(1.2);
|
|
166
|
+
this.osdViewer.viewport.applyConstraints();
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
zoomOut() {
|
|
170
|
+
if (this.osdViewer && this.osdViewer.viewport) {
|
|
171
|
+
this.osdViewer.viewport.zoomBy(0.8);
|
|
172
|
+
this.osdViewer.viewport.applyConstraints();
|
|
173
|
+
}
|
|
174
|
+
}
|
|
161
175
|
setManifest(manifestId) {
|
|
162
176
|
this.manifestId = manifestId;
|
|
163
177
|
this.canvasId = null;
|
|
@@ -172,6 +186,9 @@ export class ViewerState {
|
|
|
172
186
|
const oldConfig = this.config;
|
|
173
187
|
this.config = newConfig;
|
|
174
188
|
// Sync state from config
|
|
189
|
+
if (newConfig.toolbarOpen !== undefined) {
|
|
190
|
+
this.toolbarOpen = newConfig.toolbarOpen;
|
|
191
|
+
}
|
|
175
192
|
if (newConfig.gallery) {
|
|
176
193
|
if (newConfig.gallery.open !== undefined) {
|
|
177
194
|
this.showThumbnailGallery = newConfig.gallery.open;
|
|
@@ -208,6 +225,10 @@ export class ViewerState {
|
|
|
208
225
|
this.showAnnotations = !this.showAnnotations;
|
|
209
226
|
this.dispatchStateChange();
|
|
210
227
|
}
|
|
228
|
+
toggleToolbar() {
|
|
229
|
+
this.toolbarOpen = !this.toolbarOpen;
|
|
230
|
+
this.dispatchStateChange();
|
|
231
|
+
}
|
|
211
232
|
toggleThumbnailGallery() {
|
|
212
233
|
this.showThumbnailGallery = !this.showThumbnailGallery;
|
|
213
234
|
this.dispatchStateChange();
|