paginar 0.1.3 → 0.1.5

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/index.es.js CHANGED
@@ -9749,6 +9749,14 @@ function loadSavedSettings(settings) {
9749
9749
  ) {
9750
9750
  state.textFont = savedSettings.textFont;
9751
9751
  }
9752
+
9753
+ if (savedSettings.mode === 'dark') {
9754
+ const htmlRoot = document.querySelector('html');
9755
+ if (htmlRoot) {
9756
+ htmlRoot.classList.remove("light");
9757
+ htmlRoot.classList.add("dark");
9758
+ }
9759
+ }
9752
9760
  }
9753
9761
  }
9754
9762
 
@@ -9766,6 +9774,18 @@ function setFontSize(value) {
9766
9774
 
9767
9775
  function setMode(value) {
9768
9776
  state.mode = value;
9777
+
9778
+ const htmlRoot = document.querySelector('html');
9779
+ if (htmlRoot) {
9780
+ if (htmlRoot.classList.contains("dark")) {
9781
+ htmlRoot.classList.remove("dark");
9782
+ htmlRoot.classList.add("light");
9783
+
9784
+ } else {
9785
+ htmlRoot.classList.remove("light");
9786
+ htmlRoot.classList.add("dark");
9787
+ }
9788
+ }
9769
9789
  }
9770
9790
 
9771
9791
  function saveSettings() {
@@ -10265,13 +10285,17 @@ const { columns } = useReaderSettings;
10265
10285
  const { currentPage } = usePagination;
10266
10286
 
10267
10287
  const el = ref(null);
10288
+
10289
+ const { width } = useWindowSize();
10268
10290
  const { distanceX } = usePointerSwipe(el, {
10269
10291
  onSwipeEnd() {
10270
- if (distanceX.value > 150) {
10271
- usePagination.next();
10272
- }
10273
- if (distanceX.value < -150) {
10274
- usePagination.prev();
10292
+ if (width.value < 600) {
10293
+ if (distanceX.value > 100) {
10294
+ usePagination.next();
10295
+ }
10296
+ if (distanceX.value < -100) {
10297
+ usePagination.prev();
10298
+ }
10275
10299
  }
10276
10300
  }
10277
10301
  });
@@ -10398,6 +10422,10 @@ const _sfc_main = {
10398
10422
  bookTitle: String,
10399
10423
  bookContent: String,
10400
10424
  readerSettings: String,
10425
+ rootClass: {
10426
+ type: String,
10427
+ default: ''
10428
+ },
10401
10429
  cssFile: String
10402
10430
  },
10403
10431
  setup(__props) {
@@ -10448,7 +10476,7 @@ return (_ctx, _cache) => {
10448
10476
  id: "rootComponent",
10449
10477
  ref_key: "rootComponent",
10450
10478
  ref: rootComponent,
10451
- class: normalizeClass(unref(mode)),
10479
+ class: normalizeClass(`${unref(mode)} ${props.rootClass}`),
10452
10480
  style: normalizeStyle(`font-family: ${unref(baseFont)}`)
10453
10481
  }, [
10454
10482
  createVNode(_sfc_main$7, null, {