triiiceratops 0.12.5 → 0.12.6

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,6 +1,6 @@
1
1
  import "svelte/internal/disclose-version";
2
2
  import * as a from "svelte/internal/client";
3
- import { g as N } from "./X-BsrpnzCK.js";
3
+ import { g as N } from "./X-B3XldraD.js";
4
4
  var O = a.from_svg('<path d="M228,128a100,100,0,0,1-98.66,100H128a99.39,99.39,0,0,1-68.62-27.29,12,12,0,0,1,16.48-17.45,76,76,0,1,0-1.57-109c-.13.13-.25.25-.39.37L54.89,92H72a12,12,0,0,1,0,24H24a12,12,0,0,1-12-12V56a12,12,0,0,1,24,0V76.72L57.48,57.06A100,100,0,0,1,228,128Z"></path>'), P = a.from_svg('<path d="M216,128a88,88,0,1,1-88-88A88,88,0,0,1,216,128Z" opacity="0.2"></path><path d="M224,128a96,96,0,0,1-94.71,96H128A95.38,95.38,0,0,1,62.1,197.8a8,8,0,0,1,11-11.63A80,80,0,1,0,71.43,71.39a3.07,3.07,0,0,1-.26.25L44.59,96H72a8,8,0,0,1,0,16H24a8,8,0,0,1-8-8V56a8,8,0,0,1,16,0V85.8L60.25,60A96,96,0,0,1,224,128Z"></path>', 1), Q = a.from_svg('<path d="M224,128a96,96,0,0,1-94.71,96H128A95.38,95.38,0,0,1,62.1,197.8a8,8,0,0,1,11-11.63A80,80,0,1,0,71.43,71.39a3.07,3.07,0,0,1-.26.25L60.63,81.29l17,17A8,8,0,0,1,72,112H24a8,8,0,0,1-8-8V56A8,8,0,0,1,29.66,50.3L49.31,70,60.25,60A96,96,0,0,1,224,128Z"></path>'), R = a.from_svg('<path d="M222,128a94,94,0,0,1-92.74,94H128a93.43,93.43,0,0,1-64.5-25.65,6,6,0,1,1,8.24-8.72A82,82,0,1,0,70,70l-.19.19L39.44,98H72a6,6,0,0,1,0,12H24a6,6,0,0,1-6-6V56a6,6,0,0,1,12,0V90.34L61.63,61.4A94,94,0,0,1,222,128Z"></path>'), S = a.from_svg('<path d="M224,128a96,96,0,0,1-94.71,96H128A95.38,95.38,0,0,1,62.1,197.8a8,8,0,0,1,11-11.63A80,80,0,1,0,71.43,71.39a3.07,3.07,0,0,1-.26.25L44.59,96H72a8,8,0,0,1,0,16H24a8,8,0,0,1-8-8V56a8,8,0,0,1,16,0V85.8L60.25,60A96,96,0,0,1,224,128Z"></path>'), T = a.from_svg('<path d="M220,128a92,92,0,0,1-90.77,92H128a91.47,91.47,0,0,1-63.13-25.1,4,4,0,1,1,5.5-5.82A84,84,0,1,0,68.6,68.57l-.13.12L34.3,100H72a4,4,0,0,1,0,8H24a4,4,0,0,1-4-4V56a4,4,0,0,1,8,0V94.89l35-32A92,92,0,0,1,220,128Z"></path>'), W = a.from_svg('<svg><!><rect width="256" height="256" fill="none"></rect><!></svg>');
5
5
  function $(L, r) {
6
6
  a.push(r, !0);
@@ -1,4 +1,4 @@
1
- import { a, g as W } from "./X-BsrpnzCK.js";
1
+ import { a, g as W } from "./X-B3XldraD.js";
2
2
  import "svelte/internal/disclose-version";
3
3
  import * as t from "svelte/internal/client";
4
4
  const F = (
@@ -146,7 +146,7 @@ class lt {
146
146
  this,
147
147
  U,
148
148
  // Pairing offset for paged mode: 0 = default (pairs start at 1+2), 1 = shifted (page 1 alone, pairs start at 2+3)
149
- t.state(0)
149
+ t.state(1)
150
150
  );
151
151
  h(this, q, t.state(t.proxy({ x: 20, y: 100 })));
152
152
  h(this, K, t.state(t.proxy({ width: 300, height: 400 })));
@@ -413,7 +413,7 @@ class lt {
413
413
  updateConfig(e) {
414
414
  var n;
415
415
  const s = this.config;
416
- if (this.config = e, e.toolbarOpen !== void 0 && (this.toolbarOpen = e.toolbarOpen), e.viewingMode && (this.viewingMode = e.viewingMode), e.gallery && (e.gallery.open !== void 0 && (this.showThumbnailGallery = e.gallery.open), e.gallery.dockPosition !== void 0 && (this.dockSide = e.gallery.dockPosition), e.gallery.width !== void 0 && (this.gallerySize.width = e.gallery.width), e.gallery.height !== void 0 && (this.gallerySize.height = e.gallery.height), e.gallery.x !== void 0 && (this.galleryPosition.x = e.gallery.x), e.gallery.y !== void 0 && (this.galleryPosition.y = e.gallery.y)), e.search) {
416
+ if (this.config = e, e.toolbarOpen !== void 0 && (this.toolbarOpen = e.toolbarOpen), e.viewingMode && (this.viewingMode = e.viewingMode), e.pagedViewOffset !== void 0 && (this.pagedOffset = e.pagedViewOffset ? 1 : 0), e.gallery && (e.gallery.open !== void 0 && (this.showThumbnailGallery = e.gallery.open), e.gallery.dockPosition !== void 0 && (this.dockSide = e.gallery.dockPosition), e.gallery.width !== void 0 && (this.gallerySize.width = e.gallery.width), e.gallery.height !== void 0 && (this.gallerySize.height = e.gallery.height), e.gallery.x !== void 0 && (this.galleryPosition.x = e.gallery.x), e.gallery.y !== void 0 && (this.galleryPosition.y = e.gallery.y)), e.search) {
417
417
  e.search.open !== void 0 && (this.showSearchPanel = e.search.open);
418
418
  const r = e.search.query, u = (n = s.search) == null ? void 0 : n.query;
419
419
  r !== void 0 && r !== u && r !== this.searchQuery && this._performSearch(r);
@@ -456,7 +456,7 @@ class lt {
456
456
  this.dispatchStateChange();
457
457
  }
458
458
  togglePagedOffset() {
459
- this.pagedOffset = this.pagedOffset === 0 ? 1 : 0;
459
+ this.pagedOffset = this.pagedOffset === 0 ? 1 : 0, this.config.pagedViewOffset = this.pagedOffset === 1;
460
460
  const e = this.pagedOffset;
461
461
  if (this.currentCanvasIndex >= e && (this.currentCanvasIndex - e) % 2 === 1) {
462
462
  const n = this.currentCanvasIndex - 1, r = this.canvases[n];
@@ -239,6 +239,22 @@
239
239
  </select>
240
240
  </label>
241
241
  </li>
242
+ <li>
243
+ <label class="label cursor-pointer py-1">
244
+ <span class="label-text"
245
+ >{m.settings_paged_view_offset()}</span
246
+ >
247
+ <input
248
+ type="checkbox"
249
+ class="checkbox checkbox-xs"
250
+ checked={config.pagedViewOffset ?? true}
251
+ onchange={(e) => {
252
+ config.pagedViewOffset =
253
+ e.currentTarget.checked;
254
+ }}
255
+ />
256
+ </label>
257
+ </li>
242
258
  </ul>
243
259
  </details>
244
260
  </li>
@@ -1,4 +1,4 @@
1
- import { a as t } from "./X-BsrpnzCK.js";
1
+ import { a as t } from "./X-B3XldraD.js";
2
2
  const s = (
3
3
  /** @type {(inputs: {}) => LocalizedString} */
4
4
  () => (
@@ -128,6 +128,7 @@ export * from "./viewing_mode_shift_pairing.js";
128
128
  export * from "./settings_toggle_show_viewing_mode.js";
129
129
  export * from "./demo_title.js";
130
130
  export * from "./settings_view_configuration.js";
131
+ export * from "./settings_paged_view_offset.js";
131
132
  export * from "./settings_thumbnail_height.js";
132
133
  export * from "./toggle_two_page_mode.js";
133
134
  export * from "./toggle_single_page_mode.js";
@@ -130,6 +130,7 @@ export * from './viewing_mode_shift_pairing.js'
130
130
  export * from './settings_toggle_show_viewing_mode.js'
131
131
  export * from './demo_title.js'
132
132
  export * from './settings_view_configuration.js'
133
+ export * from './settings_paged_view_offset.js'
133
134
  export * from './settings_thumbnail_height.js'
134
135
  export * from './toggle_two_page_mode.js'
135
136
  export * from './toggle_single_page_mode.js'
@@ -0,0 +1,4 @@
1
+ export function settings_paged_view_offset(inputs?: {}, options?: {
2
+ locale?: "en" | "de";
3
+ }): LocalizedString;
4
+ export type LocalizedString = import("../runtime.js").LocalizedString;
@@ -0,0 +1,33 @@
1
+ /* eslint-disable */
2
+ import { getLocale, trackMessageCall, experimentalMiddlewareLocaleSplitting, isServer } from '../runtime.js';
3
+ /** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
4
+
5
+ const en_settings_paged_view_offset = /** @type {(inputs: {}) => LocalizedString} */ () => {
6
+ return /** @type {LocalizedString} */ (`Paged View Offset`)
7
+ };
8
+
9
+ /** @type {(inputs: {}) => LocalizedString} */
10
+ const de_settings_paged_view_offset = en_settings_paged_view_offset;
11
+
12
+ /**
13
+ * This function has been compiled by [Paraglide JS](https://inlang.com/m/gerre34r).
14
+ *
15
+ * - Changing this function will be over-written by the next build.
16
+ *
17
+ * - If you want to change the translations, you can either edit the source files e.g. `en.json`, or
18
+ * use another inlang app like [Fink](https://inlang.com/m/tdozzpar) or the [VSCode extension Sherlock](https://inlang.com/m/r7kp499g).
19
+ *
20
+ * @param {{}} inputs
21
+ * @param {{ locale?: "en" | "de" }} options
22
+ * @returns {LocalizedString}
23
+ */
24
+ /* @__NO_SIDE_EFFECTS__ */
25
+ export const settings_paged_view_offset = (inputs = {}, options = {}) => {
26
+ if (experimentalMiddlewareLocaleSplitting && isServer === false) {
27
+ return /** @type {any} */ (globalThis).__paraglide_ssr.settings_paged_view_offset(inputs)
28
+ }
29
+ const locale = options.locale ?? getLocale()
30
+ trackMessageCall("settings_paged_view_offset", locale)
31
+ if (locale === "en") return en_settings_paged_view_offset(inputs)
32
+ return de_settings_paged_view_offset(inputs)
33
+ };
@@ -4,9 +4,9 @@ var B = (V, t, a) => Me(V, typeof t != "symbol" ? t + "" : t, a);
4
4
  import "svelte/internal/disclose-version";
5
5
  import * as e from "svelte/internal/client";
6
6
  import { getContext as He, untrack as Ce, onMount as Le, onDestroy as Se } from "svelte";
7
- import { m as _e, g as re, l as ze, s as Ie, X as we, c as Te, V as De } from "../X-BsrpnzCK.js";
8
- import { A as Ee } from "../ArrowCounterClockwise-Bcse6skq.js";
9
- import { q as je, h as Ue, c as Re, j as Pe, k as Oe, t as Be, u as Fe, v as qe, r as We, s as Ke, m as Ne, C as Je, i as Xe, g as Ye, a as Ge, n as Qe, f as $e, e as et, b as tt, d as at, o as ot, l as nt, p as rt } from "../Check-D3d2XX_P.js";
7
+ import { m as _e, g as re, l as ze, s as Ie, X as we, c as Te, V as De } from "../X-B3XldraD.js";
8
+ import { A as Ee } from "../ArrowCounterClockwise-BkrSndVO.js";
9
+ import { q as je, h as Ue, c as Re, j as Pe, k as Oe, t as Be, u as Fe, v as qe, r as We, s as Ke, m as Ne, C as Je, i as Xe, g as Ye, a as Ge, n as Qe, f as $e, e as et, b as tt, d as at, o as ot, l as nt, p as rt } from "../Check-CB_Zdp64.js";
10
10
  class ue {
11
11
  constructor() {
12
12
  B(this, "id", "localStorage");
@@ -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-BsrpnzCK.js";
5
- import { A as d0 } from "../ArrowCounterClockwise-Bcse6skq.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-Dw23NgOZ.js";
4
+ import { l as l0, s as i0, X as n0, c as o0, V as c0, g as v0 } from "../X-B3XldraD.js";
5
+ import { A as d0 } from "../ArrowCounterClockwise-BkrSndVO.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-jtpS22ff.js";
7
7
  const G = {
8
8
  brightness: 100,
9
9
  contrast: 100,
@@ -39,7 +39,7 @@ export class ViewerState {
39
39
  this.config.viewingMode = value;
40
40
  }
41
41
  // Pairing offset for paged mode: 0 = default (pairs start at 1+2), 1 = shifted (page 1 alone, pairs start at 2+3)
42
- pagedOffset = $state(0);
42
+ pagedOffset = $state(1);
43
43
  // Gallery State (Lifted for persistence during re-docking)
44
44
  galleryPosition = $state({ x: 20, y: 100 });
45
45
  gallerySize = $state({ width: 300, height: 400 });
@@ -251,6 +251,9 @@ export class ViewerState {
251
251
  // direct assignment works because of the setter
252
252
  this.viewingMode = newConfig.viewingMode;
253
253
  }
254
+ if (newConfig.pagedViewOffset !== undefined) {
255
+ this.pagedOffset = newConfig.pagedViewOffset ? 1 : 0;
256
+ }
254
257
  if (newConfig.gallery) {
255
258
  if (newConfig.gallery.open !== undefined) {
256
259
  this.showThumbnailGallery = newConfig.gallery.open;
@@ -356,6 +359,7 @@ export class ViewerState {
356
359
  }
357
360
  togglePagedOffset() {
358
361
  this.pagedOffset = this.pagedOffset === 0 ? 1 : 0;
362
+ this.config.pagedViewOffset = this.pagedOffset === 1;
359
363
  // Adjust current canvas position if needed
360
364
  const singlePages = this.pagedOffset;
361
365
  if (this.currentCanvasIndex >= singlePages) {