@docsector/docsector-reader 0.12.0 → 0.12.1

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/bin/docsector.js CHANGED
@@ -23,7 +23,7 @@ const packageRoot = resolve(__dirname, '..')
23
23
  const args = process.argv.slice(2)
24
24
  const command = args[0]
25
25
 
26
- const VERSION = '0.12.0'
26
+ const VERSION = '0.12.1'
27
27
 
28
28
  const HELP = `
29
29
  Docsector Reader v${VERSION}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@docsector/docsector-reader",
3
- "version": "0.12.0",
3
+ "version": "0.12.1",
4
4
  "description": "A documentation rendering engine built with Vue 3, Quasar v2 and Vite. Transform Markdown into beautiful, navigable documentation sites.",
5
5
  "productName": "Docsector Reader",
6
6
  "author": "Rodrigo de Araujo Vieira",
@@ -1,7 +1,7 @@
1
1
  <script setup>
2
2
  import { computed, ref, watch, onMounted, onBeforeUnmount } from 'vue'
3
3
  import { useStore } from 'vuex'
4
- import { useQuasar, scroll as quasarScroll } from 'quasar'
4
+ import { useQuasar } from 'quasar'
5
5
  import { useRoute } from "vue-router";
6
6
 
7
7
  import useNavigator from '../composables/useNavigator'
@@ -56,15 +56,8 @@ const scrollToActiveAnchor = () => {
56
56
  const anchorEl = document.getElementById('anchor')
57
57
  if (anchorEl) {
58
58
  const activeNode = anchorEl.querySelector('.q-tree__node--selected')
59
- if (activeNode && typeof activeNode === 'object') {
60
- const target = quasarScroll.getScrollTarget(activeNode)
61
- const offsetTop = activeNode.offsetTop
62
- const innerHeightBy2 = window.innerHeight / 2
63
- const offset = offsetTop - innerHeightBy2
64
-
65
- if (offset > 0) {
66
- quasarScroll.setVerticalScrollPosition(target, offset, 300)
67
- }
59
+ if (activeNode) {
60
+ activeNode.scrollIntoView({ behavior: 'smooth', block: 'center' })
68
61
  }
69
62
  }
70
63
  scrolling.value = null