triiiceratops 0.9.12 → 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.
@@ -1,4 +1,4 @@
1
- import { M as De } from "./TriiiceratopsViewer-DpZQA17w.js";
1
+ import { M as De } from "./TriiiceratopsViewer-EViTQO_n.js";
2
2
  function Fe(oe, F) {
3
3
  for (var e = 0; e < F.length; e++) {
4
4
  const t = F[e];
@@ -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"
@@ -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 bg-base-100"
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 -->
@@ -45,7 +45,10 @@
45
45
  <!-- Drawer / Panel -->
46
46
  {#if viewerState.showSearchPanel}
47
47
  <div
48
- class="h-full bg-base-200 shadow-2xl z-100 flex flex-col border-l border-base-300 transition-[width] duration-200"
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'}"
49
52
  style="width: {width}"
50
53
  role="dialog"
51
54
  aria-label={m.search_panel_title()}
@@ -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 bg-base-100 overflow-hidden"
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 bg-base-200 border-r border-base-300 transition-all"
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 class="flex-1 relative min-h-0 w-full h-full bg-base-100">
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 bg-base-200 border-l border-base-300 transition-all"
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,6 +82,7 @@ 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";
@@ -84,6 +84,7 @@ 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'
@@ -0,0 +1,4 @@
1
+ export function settings_transparent_background(inputs?: {}, options?: {
2
+ locale?: "en" | "de";
3
+ }): LocalizedString;
4
+ export type LocalizedString = import("../runtime.js").LocalizedString;
@@ -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
+ };