@slidev/client 0.27.17 → 0.28.0

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.
Files changed (57) hide show
  1. package/builtin/AutoFitText.vue +4 -3
  2. package/builtin/CodeHighlightController.vue +1 -1
  3. package/builtin/Mermaid.vue +1 -1
  4. package/builtin/Monaco.vue +2 -2
  5. package/builtin/PlantUml.vue +1 -1
  6. package/builtin/Toc.vue +83 -0
  7. package/builtin/TocList.vue +27 -0
  8. package/builtin/Tweet.vue +3 -3
  9. package/builtin/VAfter.ts +2 -1
  10. package/builtin/VClicks.ts +2 -1
  11. package/builtin/Youtube.vue +1 -1
  12. package/constants.ts +1 -1
  13. package/env.ts +2 -2
  14. package/internals/Controls.vue +1 -1
  15. package/internals/DevicesList.vue +1 -1
  16. package/internals/Draggable.vue +2 -2
  17. package/internals/DrawingControls.vue +4 -4
  18. package/internals/DrawingLayer.vue +2 -2
  19. package/internals/DrawingPreview.vue +2 -2
  20. package/internals/Editor.vue +8 -8
  21. package/internals/Goto.vue +1 -1
  22. package/internals/InfoDialog.vue +2 -2
  23. package/internals/Modal.vue +1 -1
  24. package/internals/NavControls.vue +5 -5
  25. package/internals/NoteEditor.vue +2 -2
  26. package/internals/Play.vue +8 -8
  27. package/internals/Presenter.vue +5 -5
  28. package/internals/RecordingDialog.vue +5 -5
  29. package/internals/SlideContainer.vue +1 -1
  30. package/internals/SlideWrapper.ts +1 -1
  31. package/internals/SlidesShow.vue +3 -3
  32. package/internals/WebCamera.vue +2 -3
  33. package/layouts/iframe-left.vue +2 -11
  34. package/layouts/iframe-right.vue +2 -11
  35. package/layouts/iframe.vue +2 -8
  36. package/layouts/image-left.vue +1 -1
  37. package/layouts/image-right.vue +1 -1
  38. package/logic/drawings.ts +4 -3
  39. package/logic/nav.ts +68 -2
  40. package/logic/note.ts +4 -2
  41. package/logic/recording.ts +5 -4
  42. package/logic/shortcuts.ts +5 -3
  43. package/logic/utils.ts +1 -1
  44. package/modules/context.ts +4 -3
  45. package/modules/directives.ts +10 -9
  46. package/modules/mermaid.ts +1 -1
  47. package/package.json +18 -17
  48. package/routes.ts +5 -2
  49. package/setup/codemirror.ts +2 -1
  50. package/setup/main.ts +2 -2
  51. package/setup/mermaid.ts +2 -1
  52. package/setup/monaco.ts +3 -3
  53. package/setup/prettier.ts +4 -5
  54. package/setup/root.ts +2 -2
  55. package/setup/shortcuts.ts +4 -4
  56. package/shim.d.ts +1 -1
  57. package/state/index.ts +1 -1
@@ -2,7 +2,7 @@
2
2
  [Expiremental]
3
3
 
4
4
  Think this component as the TextBox you that will see
5
- in PowerPoint or Keynote. It will automaitcally resize
5
+ in PowerPoint or Keynote. It will automatically resize
6
6
  the font size based on it's content to fit them in.
7
7
 
8
8
  Usage:
@@ -18,7 +18,9 @@ or
18
18
  import { useElementSize, useVModel } from '@vueuse/core'
19
19
  import { computed, ref, watch } from 'vue'
20
20
 
21
- const emit = defineEmits<{}>()
21
+ const emit = defineEmits<{
22
+ (e: any): void
23
+ }>()
22
24
  const props = defineProps({
23
25
  modelValue: {
24
26
  default: '',
@@ -34,7 +36,6 @@ const props = defineProps({
34
36
  const container = ref<HTMLDivElement>()
35
37
  const inner = ref<HTMLDivElement>()
36
38
  const size = ref(100)
37
- // @ts-ignore
38
39
  const fontSize = computed(() => `${size.value}px`)
39
40
  const value = useVModel(props, 'modelValue', emit)
40
41
 
@@ -15,7 +15,7 @@ Learn more: https://sli.dev/guide/syntax.html#line-highlighting
15
15
  import { range, remove } from '@antfu/utils'
16
16
  import { parseRangeString } from '@slidev/parser/core'
17
17
  import { computed, getCurrentInstance, inject, onMounted, onUnmounted, ref, watchEffect } from 'vue'
18
- import { injectionClicks, injectionClicksElements, injectionClicksDisabled, CLASS_VCLICK_TARGET } from '../constants'
18
+ import { CLASS_VCLICK_TARGET, injectionClicks, injectionClicksDisabled, injectionClicksElements } from '../constants'
19
19
 
20
20
  const props = defineProps({
21
21
  ranges: {
@@ -51,5 +51,5 @@ watchEffect(() => {
51
51
  </script>
52
52
 
53
53
  <template>
54
- <div ref="el" class="mermaid" v-html="html"></div>
54
+ <div ref="el" class="mermaid" v-html="html" />
55
55
  </template>
@@ -12,11 +12,11 @@ Learn more: https://sli.dev/guide/syntax.html#monaco-editor
12
12
  -->
13
13
 
14
14
  <template>
15
- <iframe ref="iframe" class="text-base w-full rounded" :style="{ height }"></iframe>
15
+ <iframe ref="iframe" class="text-base w-full rounded" :style="{ height }" />
16
16
  </template>
17
17
 
18
18
  <script setup lang="ts">
19
- import { ref, onMounted, watchEffect, computed } from 'vue'
19
+ import { computed, onMounted, ref, watchEffect } from 'vue'
20
20
  import { useEventListener } from '@vueuse/core'
21
21
  import { decode } from 'js-base64'
22
22
  import { nanoid } from 'nanoid'
@@ -11,7 +11,7 @@ Alice -> Bob : Hello!
11
11
  ```
12
12
  -->
13
13
  <template>
14
- <img alt="PlantUML diagram" :src="uri" :style="{scale}" />
14
+ <img alt="PlantUML diagram" :src="uri" :style="{scale}">
15
15
  </template>
16
16
 
17
17
  <script setup lang="ts">
@@ -0,0 +1,83 @@
1
+ <!--
2
+ Table Of content
3
+
4
+ `mode` can be either 'all', 'onlyCurrentTree' or 'onlySiblings'
5
+
6
+ Usage:
7
+
8
+ <Toc columns='2' maxDepth='3' mode='onlySiblings'/>
9
+ -->
10
+ <script setup lang='ts'>
11
+ import { computed } from 'vue'
12
+ import type { TocItem } from '../logic/nav'
13
+ import { tree } from '../logic/nav'
14
+
15
+ const props = withDefaults(
16
+ defineProps<{
17
+ columns?: string | number
18
+ maxDepth?: string | number
19
+ minDepth?: string | number
20
+ mode?: 'all' | 'onlyCurrentTree' | 'onlySiblings'
21
+ }>(),
22
+ {
23
+ columns: 1,
24
+ maxDepth: Infinity,
25
+ minDepth: 1,
26
+ mode: 'all',
27
+ },
28
+ )
29
+
30
+ function filterTreeDepth(tree: TocItem[], level = 1): TocItem[] {
31
+ if (level > Number(props.maxDepth)) {
32
+ return []
33
+ }
34
+ else if (level < Number(props.minDepth)) {
35
+ const activeItem = tree.find((item: TocItem) => item.active || item.activeParent)
36
+ return activeItem ? filterTreeDepth(activeItem.children, level + 1) : []
37
+ }
38
+ return tree
39
+ .map((item: TocItem) => ({
40
+ ...item,
41
+ children: filterTreeDepth(item.children, level + 1),
42
+ }))
43
+ }
44
+
45
+ function filterOnlyCurrentTree(tree: TocItem[]): TocItem[] {
46
+ return tree
47
+ .filter(
48
+ (item: TocItem) =>
49
+ item.active || item.activeParent || item.hasActiveParent,
50
+ )
51
+ .map((item: TocItem) => ({
52
+ ...item,
53
+ children: filterOnlyCurrentTree(item.children),
54
+ }))
55
+ }
56
+
57
+ function filterOnlySiblings(tree: TocItem[]): TocItem[] {
58
+ const treehasActiveItem = tree.some(
59
+ (item: TocItem) => item.active || item.activeParent || item.hasActiveParent,
60
+ )
61
+ return tree
62
+ .filter(() => treehasActiveItem)
63
+ .map((item: TocItem) => ({
64
+ ...item,
65
+ children: filterOnlySiblings(item.children),
66
+ }))
67
+ }
68
+
69
+ const toc = computed(() => {
70
+ let tocTree = filterTreeDepth(tree.value)
71
+ if (props.mode === 'onlyCurrentTree')
72
+ tocTree = filterOnlyCurrentTree(tocTree)
73
+ else if (props.mode === 'onlySiblings')
74
+ tocTree = filterOnlySiblings(tocTree)
75
+ return tocTree
76
+ })
77
+ </script>
78
+
79
+ <template>
80
+ <div :style="`column-count:${columns}`">
81
+ <TocList :level="1" :list="toc" />
82
+ </div>
83
+ </template>
@@ -0,0 +1,27 @@
1
+ <!--
2
+ TOC list
3
+ (used by Toc component, you don't need to use this component directly)
4
+
5
+ Usage:
6
+
7
+ <TocList :list="list"/>
8
+ -->
9
+ <script setup lang="ts">
10
+ import type { TocItem } from '../logic/nav'
11
+
12
+ withDefaults(defineProps<{
13
+ level: number
14
+ list: TocItem[]
15
+ }>(), { level: 1 })
16
+ </script>
17
+
18
+ <template>
19
+ <ul v-if="list && list.length > 0" :class="['toc', `toc-level-${level}`]">
20
+ <li v-for="item in list" :key="item.path" :class="['toc-item', {'toc-item-active': item.active}, {'toc-item-parent-active': item.activeParent}]">
21
+ <RouterLink :to="item.path">
22
+ {{ item.title }}
23
+ </RouterLink>
24
+ <TocList :level="level + 1" :list="item.children" />
25
+ </li>
26
+ </ul>
27
+ </template>
package/builtin/Tweet.vue CHANGED
@@ -1,5 +1,5 @@
1
1
  <!--
2
- A simple wrapper for embeded Tweet
2
+ A simple wrapper for embedded Tweet
3
3
 
4
4
  Usage:
5
5
 
@@ -23,7 +23,7 @@ const vm = getCurrentInstance()!
23
23
  const loaded = ref(false)
24
24
 
25
25
  async function create() {
26
- // @ts-ignore
26
+ // @ts-expect-error global
27
27
  await window.twttr.widgets.createTweet(
28
28
  props.id.toString(),
29
29
  tweet.value,
@@ -35,7 +35,7 @@ async function create() {
35
35
  loaded.value = true
36
36
  }
37
37
 
38
- // @ts-ignore
38
+ // @ts-expect-error global
39
39
  if (window?.twttr?.widgets) {
40
40
  onMounted(create)
41
41
  }
package/builtin/VAfter.ts CHANGED
@@ -5,7 +5,8 @@
5
5
  */
6
6
 
7
7
  import { toArray } from '@antfu/utils'
8
- import { defineComponent, Directive, h, resolveDirective, VNode, withDirectives } from 'vue'
8
+ import type { Directive, VNode } from 'vue'
9
+ import { defineComponent, h, resolveDirective, withDirectives } from 'vue'
9
10
 
10
11
  export default defineComponent({
11
12
  render() {
@@ -5,7 +5,8 @@
5
5
  */
6
6
 
7
7
  import { toArray } from '@antfu/utils'
8
- import { defineComponent, Directive, h, isVNode, resolveDirective, VNode, VNodeArrayChildren, withDirectives } from 'vue'
8
+ import type { Directive, VNode, VNodeArrayChildren } from 'vue'
9
+ import { defineComponent, h, isVNode, resolveDirective, withDirectives } from 'vue'
9
10
 
10
11
  export default defineComponent({
11
12
  props: {
@@ -23,5 +23,5 @@ defineProps<{
23
23
  frameborder="0"
24
24
  allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
25
25
  allowfullscreen
26
- ></iframe>
26
+ />
27
27
  </template>
package/constants.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { ComputedRef, InjectionKey, Ref } from 'vue'
1
+ import type { ComputedRef, InjectionKey, Ref } from 'vue'
2
2
 
3
3
  export const injectionClicks: InjectionKey<Ref<number>> = Symbol('v-click-clicks')
4
4
  export const injectionClicksElements: InjectionKey<Ref<(Element | string)[]>> = Symbol('v-click-clicks-elements')
package/env.ts CHANGED
@@ -1,7 +1,7 @@
1
- import { SlidevConfig } from '@slidev/types'
1
+ import type { SlidevConfig } from '@slidev/types'
2
2
  import { computed } from 'vue'
3
3
  import { objectMap } from '@antfu/utils'
4
- // @ts-expect-error
4
+ // @ts-expect-error missing types
5
5
  import _configs from '/@slidev/configs'
6
6
  import _serverState from 'server-reactive:nav'
7
7
  import _serverDrawingState from 'server-reactive:drawings?diff'
@@ -1,6 +1,6 @@
1
1
  <script setup lang="ts">
2
2
  import { shallowRef } from 'vue'
3
- import { showOverview, showRecordingDialog, showInfoDialog } from '../state'
3
+ import { showInfoDialog, showOverview, showRecordingDialog } from '../state'
4
4
  import { configs } from '../env'
5
5
  import SlidesOverview from './SlidesOverview.vue'
6
6
  import InfoDialog from './InfoDialog.vue'
@@ -1,7 +1,7 @@
1
1
  <script setup lang="ts">
2
2
  import { computed } from 'vue'
3
3
  import { currentCamera, currentMic } from '../state'
4
- import { cameras, microphones, ensureDevicesListPermissions } from '../logic/recording'
4
+ import { cameras, ensureDevicesListPermissions, microphones } from '../logic/recording'
5
5
  import SelectList from './SelectList.vue'
6
6
  import type { SelectionItem } from './types'
7
7
 
@@ -1,10 +1,10 @@
1
1
  <script setup lang="ts">
2
2
  import { ref } from 'vue'
3
- import { useStorage, useDraggable } from '@vueuse/core'
3
+ import { useDraggable, useStorage } from '@vueuse/core'
4
4
 
5
5
  const props = defineProps<{
6
6
  storageKey?: string
7
- initial?: {x: number; y: number}
7
+ initial?: { x: number; y: number }
8
8
  }>()
9
9
 
10
10
  const el = ref<HTMLElement | null>(null)
@@ -1,8 +1,8 @@
1
1
  <script setup lang="ts">
2
2
  import {
3
- drawingMode, drauu, brush,
4
- brushColors, drawingEnabled, drawingPinned,
5
- canUndo, canRedo, canClear, clearDrauu,
3
+ brush, brushColors, canClear,
4
+ canRedo, canUndo, clearDrauu,
5
+ drauu, drawingEnabled, drawingMode, drawingPinned,
6
6
  } from '../logic/drawings'
7
7
  import VerticalDivider from './VerticalDivider.vue'
8
8
  import Draggable from './Draggable.vue'
@@ -36,7 +36,7 @@ function setBrushColor(color: typeof brush.color) {
36
36
  </button>
37
37
  <button class="icon-btn" :class="{ shallow: drawingMode != 'line' }" @click="setDrawingMode('line')">
38
38
  <svg width="1em" height="1em" class="-mt-0.5" preserveAspectRatio="xMidYMid meet" viewBox="0 0 24 24">
39
- <path d="M21.71 3.29a1 1 0 0 0-1.42 0l-18 18a1 1 0 0 0 0 1.42a1 1 0 0 0 1.42 0l18-18a1 1 0 0 0 0-1.42z" fill="currentColor"></path>
39
+ <path d="M21.71 3.29a1 1 0 0 0-1.42 0l-18 18a1 1 0 0 0 0 1.42a1 1 0 0 0 1.42 0l18-18a1 1 0 0 0 0-1.42z" fill="currentColor" />
40
40
  </svg>
41
41
  </button>
42
42
  <button class="icon-btn" :class="{ shallow: drawingMode != 'arrow' }" @click="setDrawingMode('arrow')">
@@ -1,5 +1,5 @@
1
1
  <script setup lang="ts">
2
- import { onMounted, ref, watch, inject, onBeforeUnmount } from 'vue'
2
+ import { inject, onBeforeUnmount, onMounted, ref, watch } from 'vue'
3
3
  import { drauu, loadCanvas } from '../logic/drawings'
4
4
  import { injectionSlideScale } from '../constants'
5
5
 
@@ -21,5 +21,5 @@ onBeforeUnmount(() => {
21
21
  <svg
22
22
  ref="svg"
23
23
  class="w-full h-full absolute top-0 pointer-events-none"
24
- ></svg>
24
+ />
25
25
  </template>
@@ -1,7 +1,7 @@
1
1
  <script setup lang="ts">
2
2
  import { drawingState } from '../logic/drawings'
3
3
 
4
- defineProps<{page: number}>()
4
+ defineProps<{ page: number }>()
5
5
  </script>
6
6
 
7
7
  <template>
@@ -10,5 +10,5 @@ defineProps<{page: number}>()
10
10
  ref="svg"
11
11
  class="w-full h-full absolute top-0 pointer-events-none"
12
12
  v-html="drawingState[page]"
13
- ></svg>
13
+ />
14
14
  </template>
@@ -1,7 +1,7 @@
1
1
  <script setup lang="ts">
2
- import { useEventListener, throttledWatch } from '@vueuse/core'
3
- import { computed, watch, ref, onMounted } from 'vue'
4
- import { activeElement, showEditor, editorWidth, isInputting } from '../state'
2
+ import { throttledWatch, useEventListener } from '@vueuse/core'
3
+ import { computed, onMounted, ref, watch } from 'vue'
4
+ import { activeElement, editorWidth, isInputting, showEditor } from '../state'
5
5
  import { useCodeMirror } from '../setup/codemirror'
6
6
  import { currentSlideId, openInEditor } from '../logic/nav'
7
7
  import { useDynamicSlideInfo } from '../logic/note'
@@ -66,7 +66,7 @@ onMounted(() => {
66
66
  {
67
67
  mode: 'markdown',
68
68
  lineWrapping: true,
69
- // @ts-ignore
69
+ // @ts-expect-error missing types
70
70
  highlightFormatting: true,
71
71
  fencedCodeBlockDefaultMode: 'javascript',
72
72
  },
@@ -84,7 +84,7 @@ onMounted(() => {
84
84
  {
85
85
  mode: 'markdown',
86
86
  lineWrapping: true,
87
- // @ts-ignore
87
+ // @ts-expect-error missing types
88
88
  highlightFormatting: true,
89
89
  fencedCodeBlockDefaultMode: 'javascript',
90
90
  },
@@ -100,7 +100,7 @@ function updateWidth(v: number) {
100
100
  }
101
101
  function switchTab(newTab: typeof tab.value) {
102
102
  tab.value = newTab
103
- // @ts-expect-error
103
+ // @ts-expect-error force cast
104
104
  document.activeElement?.blur?.()
105
105
  }
106
106
  useEventListener('pointermove', (e) => {
@@ -130,7 +130,7 @@ throttledWatch(
130
130
  :class="{'!opacity-30': handlerDown}"
131
131
  :style="{right: `${editorWidth - 5}px`, cursor: 'col-resize'}"
132
132
  @pointerdown="onHandlerDown"
133
- ></div>
133
+ />
134
134
  <div
135
135
  class="shadow bg-main p-4 grid grid-rows-[max-content,1fr] h-full overflow-hidden border-l border-gray-400 border-opacity-20"
136
136
  :style="{width: `${editorWidth}px`}"
@@ -147,7 +147,7 @@ throttledWatch(
147
147
  <span class="text-2xl pt-1">
148
148
  {{ tab === 'content' ? 'Slide' : 'Notes' }}
149
149
  </span>
150
- <div class="flex-auto"></div>
150
+ <div class="flex-auto" />
151
151
  <button class="icon-btn" @click="openInEditor()">
152
152
  <carbon:launch />
153
153
  </button>
@@ -46,7 +46,7 @@ whenever(showGotoDialog, async() => {
46
46
  @keydown.enter="goTo"
47
47
  @keydown.escape="close"
48
48
  @blur="close"
49
- />
49
+ >
50
50
  </div>
51
51
  </template>
52
52
 
@@ -4,7 +4,7 @@ import { computed } from 'vue'
4
4
  import { configs } from '../env'
5
5
  import Modal from './Modal.vue'
6
6
 
7
- const emit = defineEmits<{(name: 'modelValue', v: boolean): void}>()
7
+ const emit = defineEmits<{ (name: 'modelValue', v: boolean): void }>()
8
8
  const props = defineProps({
9
9
  modelValue: {
10
10
  default: false,
@@ -34,7 +34,7 @@ const hasInfo = computed(() => typeof configs.info === 'string')
34
34
  class="w-5 h-5"
35
35
  src="../assets/logo.png"
36
36
  alt="Slidev"
37
- />
37
+ >
38
38
  <div style="color: #2082A6">
39
39
  <b>Sli</b>dev
40
40
  </div>
@@ -1,7 +1,7 @@
1
1
  <script setup lang="ts">
2
2
  import { useVModel } from '@vueuse/core'
3
3
 
4
- const emit = defineEmits<{(name: 'modelValue', v: boolean): void}>()
4
+ const emit = defineEmits<{ (name: 'modelValue', v: boolean): void }>()
5
5
  const props = defineProps({
6
6
  modelValue: {
7
7
  default: false,
@@ -1,9 +1,9 @@
1
1
  <script setup lang="ts">
2
2
  import { computed, ref, shallowRef } from 'vue'
3
- import { isDark, toggleDark, isColorSchemaConfigured } from '../logic/dark'
4
- import { hasNext, hasPrev, prev, next, total, isPresenter, currentPage, downloadPDF, isEmbedded } from '../logic/nav'
5
- import { toggleOverview, showEditor, showInfoDialog, fullscreen, breakpoints, activeElement, showPresenterCursor } from '../state'
6
- import { drawingEnabled, brush } from '../logic/drawings'
3
+ import { isColorSchemaConfigured, isDark, toggleDark } from '../logic/dark'
4
+ import { currentPage, downloadPDF, hasNext, hasPrev, isEmbedded, isPresenter, next, prev, total } from '../logic/nav'
5
+ import { activeElement, breakpoints, fullscreen, showEditor, showInfoDialog, showPresenterCursor, toggleOverview } from '../state'
6
+ import { brush, drawingEnabled } from '../logic/drawings'
7
7
  import { configs } from '../env'
8
8
  import Settings from './Settings.vue'
9
9
  import MenuButton from './MenuButton.vue'
@@ -101,7 +101,7 @@ if (__SLIDEV_FEATURE_DRAWINGS__)
101
101
  v-if="drawingEnabled"
102
102
  class="absolute left-1 right-1 bottom-0 h-0.7 rounded-full"
103
103
  :style="{ background: brush.color }"
104
- ></div>
104
+ />
105
105
  </button>
106
106
  <VerticalDivider />
107
107
  </template>
@@ -66,14 +66,14 @@ onClickOutside(input, () => {
66
66
  :class="props.class"
67
67
  @click="switchNoteEdit"
68
68
  v-html="info?.notesHTML"
69
- ></div>
69
+ />
70
70
  <div
71
71
  v-else
72
72
  class="prose overflow-auto outline-none"
73
73
  :class="props.class"
74
74
  @click="switchNoteEdit"
75
75
  v-text="note"
76
- ></div>
76
+ />
77
77
  </template>
78
78
  <textarea
79
79
  v-else
@@ -1,10 +1,10 @@
1
1
  <script setup lang="ts">
2
- import { ref, computed, shallowRef } from 'vue'
3
- import { showEditor, windowSize, isScreenVertical, slideScale } from '../state'
4
- import { isPrintMode, next, prev, useSwipeControls, isEmbedded } from '../logic/nav'
2
+ import { computed, ref, shallowRef } from 'vue'
3
+ import { isScreenVertical, showEditor, slideScale, windowSize } from '../state'
4
+ import { isEmbedded, isPrintMode, next, prev, useSwipeControls } from '../logic/nav'
5
5
  import { isDrawing } from '../logic/drawings'
6
6
  import { registerShortcuts } from '../logic/shortcuts'
7
- import { themeVars, configs } from '../env'
7
+ import { configs, themeVars } from '../env'
8
8
  import Controls from './Controls.vue'
9
9
  import SlideContainer from './SlideContainer.vue'
10
10
  import NavControls from './NavControls.vue'
@@ -18,7 +18,7 @@ function onClick(e: MouseEvent) {
18
18
  return
19
19
 
20
20
  if ((e.target as HTMLElement)?.id === 'slide-container') {
21
- // click right to next, left to previouse
21
+ // click right to next, left to previous
22
22
  if ((e.screenX / window.innerWidth) > 0.6)
23
23
  next()
24
24
  else
@@ -28,7 +28,7 @@ function onClick(e: MouseEvent) {
28
28
 
29
29
  useSwipeControls(root)
30
30
 
31
- const presistNav = computed(() => isScreenVertical.value || showEditor.value)
31
+ const persistNav = computed(() => isScreenVertical.value || showEditor.value)
32
32
 
33
33
  const Editor = shallowRef<any>()
34
34
  if (__DEV__)
@@ -55,11 +55,11 @@ if (__SLIDEV_FEATURE_DRAWINGS__)
55
55
  <div
56
56
  class="absolute bottom-0 left-0 transition duration-300 opacity-0 hover:opacity-100"
57
57
  :class="[
58
- presistNav ? 'opacity-100 right-0' : 'oapcity-0 p-2',
58
+ persistNav ? 'opacity-100 right-0' : 'oapcity-0 p-2',
59
59
  isDrawing ? 'pointer-events-none': ''
60
60
  ]"
61
61
  >
62
- <NavControls class="m-auto" :persist="presistNav" />
62
+ <NavControls class="m-auto" :persist="persistNav" />
63
63
  </div>
64
64
  <template v-if="__SLIDEV_FEATURE_DRAWINGS__ && !configs.drawings.presenterOnly && !isEmbedded && DrawingControls">
65
65
  <DrawingControls class="ml-0" />
@@ -1,10 +1,10 @@
1
1
  <script setup lang="ts">
2
2
  import { useHead } from '@vueuse/head'
3
- import { ref, computed, reactive, watch, onMounted } from 'vue'
3
+ import { computed, onMounted, reactive, ref, watch } from 'vue'
4
4
  import { useMouse, useWindowFocus } from '@vueuse/core'
5
- import { total, currentPage, currentRoute, nextRoute, clicks, useSwipeControls, clicksTotal, hasNext } from '../logic/nav'
5
+ import { clicks, clicksTotal, currentPage, currentRoute, hasNext, nextRoute, total, useSwipeControls } from '../logic/nav'
6
6
  import { showOverview, showPresenterCursor } from '../state'
7
- import { configs, themeVars, serverState } from '../env'
7
+ import { configs, serverState, themeVars } from '../env'
8
8
  import { registerShortcuts } from '../logic/shortcuts'
9
9
  import { getSlideClass } from '../utils'
10
10
  import { useTimer } from '../logic/utils'
@@ -82,7 +82,7 @@ onMounted(() => {
82
82
  <div class="bg-main h-full slidev-presenter">
83
83
  <div class="grid-container">
84
84
  <div class="grid-section top flex">
85
- <img src="../assets/logo-title-horizontal.png" class="h-14 ml-2 py-2 my-auto" />
85
+ <img src="../assets/logo-title-horizontal.png" class="h-14 ml-2 py-2 my-auto">
86
86
  <div class="flex-auto" />
87
87
  <div
88
88
  class="timer-btn my-auto relative w-22px h-22px cursor-pointer text-lg"
@@ -133,7 +133,7 @@ onMounted(() => {
133
133
  <div
134
134
  class="progress h-2px bg-primary transition-all"
135
135
  :style="{ width: `${(currentPage - 1) / (total - 1) * 100}%` }"
136
- ></div>
136
+ />
137
137
  </div>
138
138
  </div>
139
139
  <Goto />
@@ -1,7 +1,7 @@
1
1
  <script setup lang="ts">
2
2
  import { useVModel } from '@vueuse/core'
3
3
  import { nextTick } from 'vue'
4
- import { recorder, recordingName, recordCamera, getFilename } from '../logic/recording'
4
+ import { getFilename, recordCamera, recorder, recordingName } from '../logic/recording'
5
5
  import Modal from './Modal.vue'
6
6
  import DevicesList from './DevicesList.vue'
7
7
 
@@ -42,7 +42,7 @@ async function start() {
42
42
  name="title"
43
43
  type="text"
44
44
  placeholder="Enter the title..."
45
- />
45
+ >
46
46
  <div class="text-xs w-full opacity-50 py-2">
47
47
  <div>This will be used in the output filename that might <br>help you better orangize your recording chips.</div>
48
48
  </div>
@@ -52,12 +52,12 @@ async function start() {
52
52
  v-model="recordCamera"
53
53
  name="record-camera"
54
54
  type="checkbox"
55
- />
55
+ >
56
56
  <label for="record-camera" @click="recordCamera = !recordCamera">Record camera separately</label>
57
57
  </div>
58
58
  <div class="text-xs w-full opacity-50">
59
59
  <div class="mt-2 opacity-50">
60
- Enumated filenames
60
+ Enumerated filenames
61
61
  </div>
62
62
  <div class="font-mono">
63
63
  {{ getFilename('screen') }}
@@ -73,7 +73,7 @@ async function start() {
73
73
  <button class="cancel" @click="close">
74
74
  Cancel
75
75
  </button>
76
- <div class="flex-auto"></div>
76
+ <div class="flex-auto" />
77
77
  <button @click="start">
78
78
  Start
79
79
  </button>
@@ -1,7 +1,7 @@
1
1
  <script setup lang="ts">
2
2
  import { useElementSize } from '@vueuse/core'
3
3
  import { computed, provide, ref, watchEffect } from 'vue'
4
- import { slideAspect, slideWidth, slideHeight, configs } from '../env'
4
+ import { configs, slideAspect, slideHeight, slideWidth } from '../env'
5
5
  import { injectionSlideScale } from '../constants'
6
6
 
7
7
  const props = defineProps({
@@ -1,5 +1,5 @@
1
1
  import { useVModel } from '@vueuse/core'
2
- import { provide, defineComponent, h } from 'vue'
2
+ import { defineComponent, h, provide } from 'vue'
3
3
  import { injectionClicks, injectionClicksDisabled, injectionClicksElements, injectionOrderMap } from '../constants'
4
4
 
5
5
  export default defineComponent({
@@ -1,11 +1,11 @@
1
1
  <script setup lang="ts">
2
2
  import { shallowRef, watch } from 'vue'
3
- import { currentRoute, clicks, rawRoutes, nextRoute, isPresenter } from '../logic/nav'
3
+ import { clicks, currentRoute, isPresenter, nextRoute, rawRoutes } from '../logic/nav'
4
4
  import { getSlideClass } from '../utils'
5
5
  import SlideWrapper from './SlideWrapper'
6
- // @ts-ignore
6
+ // @ts-expect-error virtual module
7
7
  import GlobalTop from '/@slidev/global-components/top'
8
- // @ts-ignore
8
+ // @ts-expect-error virtual module
9
9
  import GlobalBottom from '/@slidev/global-components/bottom'
10
10
  import PresenterMouse from './PresenterMouse.vue'
11
11