triiiceratops 0.9.11 → 0.9.13
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/chunks/{TriiiceratopsViewer-D0uSIuXv.js → TriiiceratopsViewer-EViTQO_n.js} +2350 -2344
- package/dist/chunks/{openseadragon-Bv-h4t_t.js → openseadragon-CHvATAD9.js} +1 -1
- package/dist/components/DemoHeader.svelte +37 -0
- package/dist/components/OSDViewer.svelte +4 -1
- package/dist/components/SearchPanel.svelte +6 -1
- package/dist/components/TriiiceratopsViewer.svelte +18 -4
- package/dist/paraglide/messages/_index.d.ts +2 -0
- package/dist/paraglide/messages/_index.js +3 -1
- package/dist/paraglide/messages/settings_panel_width.d.ts +4 -0
- package/dist/paraglide/messages/settings_panel_width.js +34 -0
- package/dist/paraglide/messages/settings_transparent_background.d.ts +4 -0
- package/dist/paraglide/messages/settings_transparent_background.js +34 -0
- package/dist/triiiceratops-bundle.js +1546 -1540
- package/dist/triiiceratops-element-image.js +1 -1
- package/dist/triiiceratops-element.js +1 -1
- package/dist/triiiceratops.css +1 -1
- package/dist/types/config.d.ts +10 -0
- package/package.json +1 -1
|
@@ -238,6 +238,18 @@
|
|
|
238
238
|
<li class="menu-title px-4 py-2">
|
|
239
239
|
{m.settings_category_general()}
|
|
240
240
|
</li>
|
|
241
|
+
<li>
|
|
242
|
+
<label class="label cursor-pointer py-1">
|
|
243
|
+
<span class="label-text"
|
|
244
|
+
>{m.settings_transparent_background()}</span
|
|
245
|
+
>
|
|
246
|
+
<input
|
|
247
|
+
type="checkbox"
|
|
248
|
+
class="toggle toggle-sm"
|
|
249
|
+
bind:checked={config.transparentBackground}
|
|
250
|
+
/>
|
|
251
|
+
</label>
|
|
252
|
+
</li>
|
|
241
253
|
<li>
|
|
242
254
|
<label class="label cursor-pointer py-1">
|
|
243
255
|
<span class="label-text"
|
|
@@ -527,6 +539,31 @@
|
|
|
527
539
|
/>
|
|
528
540
|
</label>
|
|
529
541
|
</li>
|
|
542
|
+
<li>
|
|
543
|
+
<label class="label cursor-pointer py-1 gap-2">
|
|
544
|
+
<span class="label-text"
|
|
545
|
+
>{m.settings_panel_width()}</span
|
|
546
|
+
>
|
|
547
|
+
<input
|
|
548
|
+
type="range"
|
|
549
|
+
min="200"
|
|
550
|
+
max="800"
|
|
551
|
+
value={parseInt(
|
|
552
|
+
config.search?.width ?? '320',
|
|
553
|
+
)}
|
|
554
|
+
class="range range-xs range-primary w-32"
|
|
555
|
+
oninput={(e) => {
|
|
556
|
+
if (!config.search)
|
|
557
|
+
config.search = {};
|
|
558
|
+
config.search.width = `${e.currentTarget.value}px`;
|
|
559
|
+
}}
|
|
560
|
+
/>
|
|
561
|
+
<span
|
|
562
|
+
class="text-xs opacity-50 w-8 text-right"
|
|
563
|
+
>{config.search?.width ?? '320px'}</span
|
|
564
|
+
>
|
|
565
|
+
</label>
|
|
566
|
+
</li>
|
|
530
567
|
</ul>
|
|
531
568
|
</details>
|
|
532
569
|
</li>
|
|
@@ -218,7 +218,10 @@
|
|
|
218
218
|
<div class="w-full h-full relative">
|
|
219
219
|
<div
|
|
220
220
|
bind:this={container}
|
|
221
|
-
class="w-full h-full osd-background
|
|
221
|
+
class="w-full h-full osd-background {viewerState.config
|
|
222
|
+
.transparentBackground
|
|
223
|
+
? ''
|
|
224
|
+
: 'bg-base-100'}"
|
|
222
225
|
></div>
|
|
223
226
|
|
|
224
227
|
<!-- Render annotations -->
|
|
@@ -39,12 +39,17 @@
|
|
|
39
39
|
viewerState.setCanvas(canvas.id);
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
|
+
let width = $derived(viewerState.config.search?.width ?? '320px');
|
|
42
43
|
</script>
|
|
43
44
|
|
|
44
45
|
<!-- Drawer / Panel -->
|
|
45
46
|
{#if viewerState.showSearchPanel}
|
|
46
47
|
<div
|
|
47
|
-
class="h-full
|
|
48
|
+
class="h-full bg-base-200 shadow-2xl z-100 flex flex-col transition-[width] duration-200 {viewerState
|
|
49
|
+
.config.transparentBackground
|
|
50
|
+
? ''
|
|
51
|
+
: 'border-l border-base-300'}"
|
|
52
|
+
style="width: {width}"
|
|
48
53
|
role="dialog"
|
|
49
54
|
aria-label={m.search_panel_title()}
|
|
50
55
|
>
|
|
@@ -284,12 +284,18 @@
|
|
|
284
284
|
<div
|
|
285
285
|
bind:this={rootElement}
|
|
286
286
|
id="triiiceratops-viewer"
|
|
287
|
-
class="flex w-full h-full relative
|
|
287
|
+
class="flex w-full h-full relative overflow-hidden {internalViewerState
|
|
288
|
+
.config.transparentBackground
|
|
289
|
+
? ''
|
|
290
|
+
: 'bg-base-100'}"
|
|
288
291
|
>
|
|
289
292
|
<!-- Left Column -->
|
|
290
293
|
{#if isLeftSidebarVisible}
|
|
291
294
|
<div
|
|
292
|
-
class="flex-none flex flex-row z-20
|
|
295
|
+
class="flex-none flex flex-row z-20 transition-all {internalViewerState
|
|
296
|
+
.config.transparentBackground
|
|
297
|
+
? ''
|
|
298
|
+
: 'bg-base-200 border-r border-base-300'}"
|
|
293
299
|
>
|
|
294
300
|
<!-- Gallery (when docked left) -->
|
|
295
301
|
{#if internalViewerState.showThumbnailGallery && internalViewerState.dockSide === 'left'}
|
|
@@ -323,7 +329,12 @@
|
|
|
323
329
|
{/if}
|
|
324
330
|
|
|
325
331
|
<!-- Main Viewer Area -->
|
|
326
|
-
<div
|
|
332
|
+
<div
|
|
333
|
+
class="flex-1 relative min-h-0 w-full h-full {internalViewerState
|
|
334
|
+
.config.transparentBackground
|
|
335
|
+
? ''
|
|
336
|
+
: 'bg-base-100'}"
|
|
337
|
+
>
|
|
327
338
|
{#if manifestData?.isFetching}
|
|
328
339
|
<div class="w-full h-full flex items-center justify-center">
|
|
329
340
|
<span
|
|
@@ -405,7 +416,10 @@
|
|
|
405
416
|
<!-- Right Column -->
|
|
406
417
|
{#if isRightSidebarVisible}
|
|
407
418
|
<div
|
|
408
|
-
class="flex-none flex flex-row z-20
|
|
419
|
+
class="flex-none flex flex-row z-20 transition-all {internalViewerState
|
|
420
|
+
.config.transparentBackground
|
|
421
|
+
? ''
|
|
422
|
+
: 'bg-base-200 border-l border-base-300'}"
|
|
409
423
|
>
|
|
410
424
|
<!-- Search Panel -->
|
|
411
425
|
{#if internalViewerState.showSearchPanel}
|
|
@@ -82,8 +82,10 @@ export * from "./viewer_variant_svelte.js";
|
|
|
82
82
|
export * from "./language_select_label.js";
|
|
83
83
|
export * from "./no_canvases_loaded.js";
|
|
84
84
|
export * from "./try_your_own.js";
|
|
85
|
+
export * from "./settings_transparent_background.js";
|
|
85
86
|
export * from "./change_theme_label.js";
|
|
86
87
|
export * from "./theme_menu_title.js";
|
|
87
88
|
export * from "./error_prefix.js";
|
|
88
89
|
export * from "./no_image_found.js";
|
|
90
|
+
export * from "./settings_panel_width.js";
|
|
89
91
|
export type LocalizedString = import("../runtime.js").LocalizedString;
|
|
@@ -84,7 +84,9 @@ export * from './viewer_variant_svelte.js'
|
|
|
84
84
|
export * from './language_select_label.js'
|
|
85
85
|
export * from './no_canvases_loaded.js'
|
|
86
86
|
export * from './try_your_own.js'
|
|
87
|
+
export * from './settings_transparent_background.js'
|
|
87
88
|
export * from './change_theme_label.js'
|
|
88
89
|
export * from './theme_menu_title.js'
|
|
89
90
|
export * from './error_prefix.js'
|
|
90
|
-
export * from './no_image_found.js'
|
|
91
|
+
export * from './no_image_found.js'
|
|
92
|
+
export * from './settings_panel_width.js'
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
import { getLocale, trackMessageCall, experimentalMiddlewareLocaleSplitting, isServer } from '../runtime.js';
|
|
3
|
+
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
|
|
4
|
+
|
|
5
|
+
const en_settings_panel_width = /** @type {(inputs: {}) => LocalizedString} */ () => {
|
|
6
|
+
return /** @type {LocalizedString} */ (`Panel Width`)
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
const de_settings_panel_width = /** @type {(inputs: {}) => LocalizedString} */ () => {
|
|
10
|
+
return /** @type {LocalizedString} */ (`Panelbreite`)
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* This function has been compiled by [Paraglide JS](https://inlang.com/m/gerre34r).
|
|
15
|
+
*
|
|
16
|
+
* - Changing this function will be over-written by the next build.
|
|
17
|
+
*
|
|
18
|
+
* - If you want to change the translations, you can either edit the source files e.g. `en.json`, or
|
|
19
|
+
* use another inlang app like [Fink](https://inlang.com/m/tdozzpar) or the [VSCode extension Sherlock](https://inlang.com/m/r7kp499g).
|
|
20
|
+
*
|
|
21
|
+
* @param {{}} inputs
|
|
22
|
+
* @param {{ locale?: "en" | "de" }} options
|
|
23
|
+
* @returns {LocalizedString}
|
|
24
|
+
*/
|
|
25
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
26
|
+
export const settings_panel_width = (inputs = {}, options = {}) => {
|
|
27
|
+
if (experimentalMiddlewareLocaleSplitting && isServer === false) {
|
|
28
|
+
return /** @type {any} */ (globalThis).__paraglide_ssr.settings_panel_width(inputs)
|
|
29
|
+
}
|
|
30
|
+
const locale = options.locale ?? getLocale()
|
|
31
|
+
trackMessageCall("settings_panel_width", locale)
|
|
32
|
+
if (locale === "en") return en_settings_panel_width(inputs)
|
|
33
|
+
return de_settings_panel_width(inputs)
|
|
34
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
import { getLocale, trackMessageCall, experimentalMiddlewareLocaleSplitting, isServer } from '../runtime.js';
|
|
3
|
+
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
|
|
4
|
+
|
|
5
|
+
const en_settings_transparent_background = /** @type {(inputs: {}) => LocalizedString} */ () => {
|
|
6
|
+
return /** @type {LocalizedString} */ (`Transparent Background`)
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
const de_settings_transparent_background = /** @type {(inputs: {}) => LocalizedString} */ () => {
|
|
10
|
+
return /** @type {LocalizedString} */ (`Transparenter Hintergrund`)
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* This function has been compiled by [Paraglide JS](https://inlang.com/m/gerre34r).
|
|
15
|
+
*
|
|
16
|
+
* - Changing this function will be over-written by the next build.
|
|
17
|
+
*
|
|
18
|
+
* - If you want to change the translations, you can either edit the source files e.g. `en.json`, or
|
|
19
|
+
* use another inlang app like [Fink](https://inlang.com/m/tdozzpar) or the [VSCode extension Sherlock](https://inlang.com/m/r7kp499g).
|
|
20
|
+
*
|
|
21
|
+
* @param {{}} inputs
|
|
22
|
+
* @param {{ locale?: "en" | "de" }} options
|
|
23
|
+
* @returns {LocalizedString}
|
|
24
|
+
*/
|
|
25
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
26
|
+
export const settings_transparent_background = (inputs = {}, options = {}) => {
|
|
27
|
+
if (experimentalMiddlewareLocaleSplitting && isServer === false) {
|
|
28
|
+
return /** @type {any} */ (globalThis).__paraglide_ssr.settings_transparent_background(inputs)
|
|
29
|
+
}
|
|
30
|
+
const locale = options.locale ?? getLocale()
|
|
31
|
+
trackMessageCall("settings_transparent_background", locale)
|
|
32
|
+
if (locale === "en") return en_settings_transparent_background(inputs)
|
|
33
|
+
return de_settings_transparent_background(inputs)
|
|
34
|
+
};
|