triiiceratops 0.9.10 → 0.9.12
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-BZrckjZG.js → TriiiceratopsViewer-DpZQA17w.js} +2423 -2419
- package/dist/chunks/{openseadragon-DaOGg9G3.js → openseadragon-5MHeYuQz.js} +1 -1
- package/dist/components/DemoHeader.svelte +25 -0
- package/dist/components/SearchPanel.svelte +3 -1
- package/dist/paraglide/messages/_index.d.ts +1 -0
- package/dist/paraglide/messages/_index.js +2 -1
- package/dist/paraglide/messages/settings_panel_width.d.ts +4 -0
- package/dist/paraglide/messages/settings_panel_width.js +34 -0
- package/dist/triiiceratops-bundle.js +1505 -1501
- 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 +5 -0
- package/package.json +1 -1
|
@@ -527,6 +527,31 @@
|
|
|
527
527
|
/>
|
|
528
528
|
</label>
|
|
529
529
|
</li>
|
|
530
|
+
<li>
|
|
531
|
+
<label class="label cursor-pointer py-1 gap-2">
|
|
532
|
+
<span class="label-text"
|
|
533
|
+
>{m.settings_panel_width()}</span
|
|
534
|
+
>
|
|
535
|
+
<input
|
|
536
|
+
type="range"
|
|
537
|
+
min="200"
|
|
538
|
+
max="800"
|
|
539
|
+
value={parseInt(
|
|
540
|
+
config.search?.width ?? '320',
|
|
541
|
+
)}
|
|
542
|
+
class="range range-xs range-primary w-32"
|
|
543
|
+
oninput={(e) => {
|
|
544
|
+
if (!config.search)
|
|
545
|
+
config.search = {};
|
|
546
|
+
config.search.width = `${e.currentTarget.value}px`;
|
|
547
|
+
}}
|
|
548
|
+
/>
|
|
549
|
+
<span
|
|
550
|
+
class="text-xs opacity-50 w-8 text-right"
|
|
551
|
+
>{config.search?.width ?? '320px'}</span
|
|
552
|
+
>
|
|
553
|
+
</label>
|
|
554
|
+
</li>
|
|
530
555
|
</ul>
|
|
531
556
|
</details>
|
|
532
557
|
</li>
|
|
@@ -39,12 +39,14 @@
|
|
|
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 border-l border-base-300 transition-[width] duration-200"
|
|
49
|
+
style="width: {width}"
|
|
48
50
|
role="dialog"
|
|
49
51
|
aria-label={m.search_panel_title()}
|
|
50
52
|
>
|
|
@@ -86,4 +86,5 @@ export * from "./change_theme_label.js";
|
|
|
86
86
|
export * from "./theme_menu_title.js";
|
|
87
87
|
export * from "./error_prefix.js";
|
|
88
88
|
export * from "./no_image_found.js";
|
|
89
|
+
export * from "./settings_panel_width.js";
|
|
89
90
|
export type LocalizedString = import("../runtime.js").LocalizedString;
|
|
@@ -87,4 +87,5 @@ export * from './try_your_own.js'
|
|
|
87
87
|
export * from './change_theme_label.js'
|
|
88
88
|
export * from './theme_menu_title.js'
|
|
89
89
|
export * from './error_prefix.js'
|
|
90
|
-
export * from './no_image_found.js'
|
|
90
|
+
export * from './no_image_found.js'
|
|
91
|
+
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
|
+
};
|