@slidev/client 0.49.28 → 0.50.0-beta.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.
Files changed (86) hide show
  1. package/builtin/Arrow.vue +1 -1
  2. package/builtin/CodeBlockWrapper.vue +3 -3
  3. package/builtin/KaTexBlockWrapper.vue +2 -2
  4. package/builtin/Mermaid.vue +1 -1
  5. package/builtin/Monaco.vue +5 -5
  6. package/builtin/RenderWhen.vue +2 -2
  7. package/builtin/ShikiMagicMove.vue +5 -5
  8. package/builtin/SlidevVideo.vue +2 -2
  9. package/builtin/Toc.vue +1 -1
  10. package/builtin/TocList.vue +2 -2
  11. package/builtin/VAfter.ts +1 -1
  12. package/builtin/VClick.ts +1 -1
  13. package/builtin/VClickGap.vue +1 -1
  14. package/builtin/VClicks.ts +1 -1
  15. package/builtin/VDrag.vue +1 -1
  16. package/builtin/VDragArrow.vue +1 -1
  17. package/builtin/VSwitch.ts +4 -4
  18. package/composables/useClicks.ts +1 -1
  19. package/composables/useDragElements.ts +2 -2
  20. package/composables/useDrawings.ts +3 -3
  21. package/composables/useNav.ts +8 -8
  22. package/composables/useSlideInfo.ts +2 -2
  23. package/composables/useSwipeControls.ts +1 -1
  24. package/composables/useViewTransition.ts +1 -1
  25. package/constants.ts +2 -1
  26. package/context.ts +2 -2
  27. package/env.ts +2 -2
  28. package/index.ts +23 -5
  29. package/internals/CodeRunner.vue +4 -4
  30. package/internals/ContextMenu.vue +2 -2
  31. package/internals/Controls.vue +6 -6
  32. package/internals/DevicesList.vue +2 -2
  33. package/internals/DragControl.vue +2 -2
  34. package/internals/Draggable.vue +1 -1
  35. package/internals/DrawingControls.vue +140 -139
  36. package/internals/DrawingLayer.vue +1 -1
  37. package/internals/Goto.vue +3 -3
  38. package/internals/NavControls.vue +8 -8
  39. package/internals/NoteDisplay.vue +1 -1
  40. package/internals/NoteEditable.vue +2 -2
  41. package/internals/PrintContainer.vue +3 -3
  42. package/internals/PrintSlide.vue +1 -1
  43. package/internals/PrintSlideClick.vue +3 -3
  44. package/internals/QuickOverview.vue +9 -7
  45. package/internals/RecordingControls.vue +1 -1
  46. package/internals/RecordingDialog.vue +1 -1
  47. package/internals/SelectList.vue +1 -1
  48. package/internals/Settings.vue +1 -1
  49. package/internals/ShikiEditor.vue +1 -1
  50. package/internals/SideEditor.vue +12 -7
  51. package/internals/SlideContainer.vue +32 -3
  52. package/internals/SlideWrapper.vue +4 -4
  53. package/internals/SlidesShow.vue +6 -6
  54. package/internals/WebCamera.vue +1 -1
  55. package/logic/contextMenu.ts +3 -3
  56. package/logic/recording.ts +4 -4
  57. package/logic/shortcuts.ts +3 -3
  58. package/logic/slides.ts +2 -2
  59. package/logic/snapshot.ts +86 -0
  60. package/modules/context.ts +1 -1
  61. package/modules/mermaid.ts +3 -3
  62. package/modules/v-click.ts +1 -1
  63. package/modules/v-drag.ts +1 -1
  64. package/modules/v-mark.ts +2 -2
  65. package/modules/v-motion.ts +3 -3
  66. package/package.json +25 -24
  67. package/pages/notes.vue +7 -7
  68. package/pages/overview.vue +24 -11
  69. package/pages/play.vue +10 -10
  70. package/pages/presenter/print.vue +2 -2
  71. package/pages/presenter.vue +18 -18
  72. package/pages/print.vue +3 -3
  73. package/setup/code-runners.ts +4 -4
  74. package/setup/context-menu.ts +11 -11
  75. package/setup/main.ts +4 -4
  76. package/setup/mermaid.ts +1 -1
  77. package/setup/monaco.ts +13 -9
  78. package/setup/root.ts +9 -9
  79. package/setup/shortcuts.ts +5 -5
  80. package/state/drawings.ts +1 -0
  81. package/state/index.ts +1 -1
  82. package/state/shared.ts +2 -1
  83. package/state/snapshot.ts +13 -0
  84. package/state/syncState.ts +76 -24
  85. package/styles/index.css +1 -0
  86. package/uno.config.ts +3 -16
package/builtin/Arrow.vue CHANGED
@@ -9,8 +9,8 @@ Simple Arrow
9
9
  -->
10
10
 
11
11
  <script setup lang="ts">
12
- import { ref } from 'vue'
13
12
  import { onClickOutside } from '@vueuse/core'
13
+ import { ref } from 'vue'
14
14
  import { makeId } from '../logic/utils'
15
15
 
16
16
  defineProps<{
@@ -12,13 +12,13 @@ Learn more: https://sli.dev/guide/syntax.html#line-highlighting
12
12
  -->
13
13
 
14
14
  <script setup lang="ts">
15
+ import type { PropType } from 'vue'
15
16
  import { useClipboard } from '@vueuse/core'
16
17
  import { computed, onMounted, onUnmounted, ref, watchEffect } from 'vue'
17
- import type { PropType } from 'vue'
18
- import { configs } from '../env'
19
- import { makeId, updateCodeHighlightRange } from '../logic/utils'
20
18
  import { CLASS_VCLICK_HIDDEN, CLICKS_MAX } from '../constants'
21
19
  import { useSlideContext } from '../context'
20
+ import { configs } from '../env'
21
+ import { makeId, updateCodeHighlightRange } from '../logic/utils'
22
22
 
23
23
  const props = defineProps({
24
24
  ranges: {
@@ -20,12 +20,12 @@ Learn more: https://sli.dev/guide/syntax.html#latex-line-highlighting
20
20
  -->
21
21
 
22
22
  <script setup lang="ts">
23
- import { computed, onMounted, onUnmounted, ref, watchEffect } from 'vue'
24
23
  import type { PropType } from 'vue'
25
24
  import { parseRangeString } from '@slidev/parser'
25
+ import { computed, onMounted, onUnmounted, ref, watchEffect } from 'vue'
26
26
  import { CLASS_VCLICK_HIDDEN, CLASS_VCLICK_TARGET, CLICKS_MAX } from '../constants'
27
- import { makeId } from '../logic/utils'
28
27
  import { useSlideContext } from '../context'
28
+ import { makeId } from '../logic/utils'
29
29
 
30
30
  const props = defineProps({
31
31
  ranges: {
@@ -14,9 +14,9 @@ pie
14
14
 
15
15
  <script setup lang="ts">
16
16
  import { getCurrentInstance, ref, watch, watchEffect } from 'vue'
17
- import { renderMermaid } from '../modules/mermaid'
18
17
  import ShadowRoot from '../internals/ShadowRoot.vue'
19
18
  import { isDark } from '../logic/dark'
19
+ import { renderMermaid } from '../modules/mermaid'
20
20
 
21
21
  const props = defineProps<{
22
22
  codeLz: string
@@ -12,15 +12,15 @@ Learn more: https://sli.dev/guide/syntax.html#monaco-editor
12
12
  -->
13
13
 
14
14
  <script setup lang="ts">
15
+ import type { RawAtValue } from '@slidev/types'
16
+ import type * as monaco from 'monaco-editor'
15
17
  import { debounce } from '@antfu/utils'
18
+ import { whenever } from '@vueuse/core'
16
19
  import lz from 'lz-string'
17
- import type * as monaco from 'monaco-editor'
18
20
  import { computed, defineAsyncComponent, nextTick, onMounted, ref } from 'vue'
19
- import type { RawAtValue } from '@slidev/types'
20
- import { whenever } from '@vueuse/core'
21
- import { makeId } from '../logic/utils'
22
- import { useSlideContext } from '../context'
23
21
  import { useNav } from '../composables/useNav'
22
+ import { useSlideContext } from '../context'
23
+ import { makeId } from '../logic/utils'
24
24
 
25
25
  const props = withDefaults(defineProps<{
26
26
  codeLz: string
@@ -1,9 +1,9 @@
1
1
  <script setup lang="ts">
2
2
  import type { RenderContext } from '@slidev/types'
3
- import { computed, ref } from 'vue'
4
3
  import { useElementVisibility } from '@vueuse/core'
5
- import { useSlideContext } from '../context'
4
+ import { computed, ref } from 'vue'
6
5
  import { useNav } from '../composables/useNav'
6
+ import { useSlideContext } from '../context'
7
7
 
8
8
  type Context = 'main' | 'visible' | 'print' | RenderContext
9
9
 
@@ -1,15 +1,15 @@
1
1
  <script setup lang="ts">
2
- import { ShikiMagicMovePrecompiled } from 'shiki-magic-move/vue'
3
2
  import type { KeyedTokensInfo } from 'shiki-magic-move/types'
4
3
  import type { PropType } from 'vue'
5
- import { computed, nextTick, onMounted, onUnmounted, ref, watch } from 'vue'
6
- import lz from 'lz-string'
7
4
  import { sleep } from '@antfu/utils'
8
- import { useSlideContext } from '../context'
9
- import { makeId, updateCodeHighlightRange } from '../logic/utils'
5
+ import lz from 'lz-string'
6
+ import { ShikiMagicMovePrecompiled } from 'shiki-magic-move/vue'
7
+ import { computed, nextTick, onMounted, onUnmounted, ref, watch } from 'vue'
10
8
  import { useNav } from '../composables/useNav'
11
9
  import { CLICKS_MAX } from '../constants'
10
+ import { useSlideContext } from '../context'
12
11
  import { configs } from '../env'
12
+ import { makeId, updateCodeHighlightRange } from '../logic/utils'
13
13
 
14
14
  const props = defineProps({
15
15
  at: {
@@ -1,9 +1,9 @@
1
1
  <script setup lang="ts">
2
- import { computed, onMounted, ref, watch } from 'vue'
3
2
  import { and } from '@vueuse/math'
3
+ import { computed, onMounted, ref, watch } from 'vue'
4
+ import { useNav } from '../composables/useNav'
4
5
  import { useSlideContext } from '../context'
5
6
  import { resolvedClickMap } from '../modules/v-click'
6
- import { useNav } from '../composables/useNav'
7
7
 
8
8
  const props = defineProps<{
9
9
  autoplay?: boolean | 'once'
package/builtin/Toc.vue CHANGED
@@ -8,8 +8,8 @@ Usage:
8
8
  <Toc columns='2' maxDepth='3' mode='onlySiblings'/>
9
9
  -->
10
10
  <script setup lang='ts'>
11
- import { computed } from 'vue'
12
11
  import type { TocItem } from '@slidev/types'
12
+ import { computed } from 'vue'
13
13
  import { useSlideContext } from '../context'
14
14
  import TocList from './TocList.vue'
15
15
 
@@ -7,10 +7,10 @@ Usage:
7
7
  <TocList :list="list"/>
8
8
  -->
9
9
  <script setup lang="ts">
10
- import { computed } from 'vue'
11
- import { toArray } from '@antfu/utils'
12
10
  import type { TocItem } from '@slidev/types'
13
11
  import TitleRenderer from '#slidev/title-renderer'
12
+ import { toArray } from '@antfu/utils'
13
+ import { computed } from 'vue'
14
14
 
15
15
  const props = withDefaults(defineProps<{
16
16
  level: number
package/builtin/VAfter.ts CHANGED
@@ -4,8 +4,8 @@
4
4
  * Learn more: https://sli.dev/guide/animations.html#click-animation
5
5
  */
6
6
 
7
- import { toArray } from '@antfu/utils'
8
7
  import type { Directive, VNode } from 'vue'
8
+ import { toArray } from '@antfu/utils'
9
9
  import { defineComponent, h, resolveDirective, withDirectives } from 'vue'
10
10
 
11
11
  export default defineComponent({
package/builtin/VClick.ts CHANGED
@@ -5,7 +5,7 @@
5
5
  */
6
6
 
7
7
  import type { PropType, VNode } from 'vue'
8
- import { Text, defineComponent, h } from 'vue'
8
+ import { defineComponent, h, Text } from 'vue'
9
9
  import { CLICKS_MAX } from '../constants'
10
10
  import VClicks from './VClicks'
11
11
 
@@ -1,7 +1,7 @@
1
1
  <script setup lang="ts">
2
2
  import { Fragment, onMounted, onUnmounted } from 'vue'
3
- import { makeId } from '../logic/utils'
4
3
  import { useSlideContext } from '../context'
4
+ import { makeId } from '../logic/utils'
5
5
 
6
6
  const props = defineProps({
7
7
  size: {
@@ -4,8 +4,8 @@
4
4
  * Learn more: https://sli.dev/guide/animations.html#click-animation
5
5
  */
6
6
 
7
- import { toArray } from '@antfu/utils'
8
7
  import type { VNode, VNodeArrayChildren } from 'vue'
8
+ import { toArray } from '@antfu/utils'
9
9
  import { Comment, createVNode, defineComponent, h, isVNode, resolveDirective, withDirectives } from 'vue'
10
10
  import { normalizeSingleAtValue } from '../composables/useClicks'
11
11
  import VClickGap from './VClickGap.vue'
package/builtin/VDrag.vue CHANGED
@@ -1,6 +1,6 @@
1
1
  <script setup lang="ts">
2
- import { onMounted, onUnmounted } from 'vue'
3
2
  import type { DragElementMarkdownSource } from '../composables/useDragElements'
3
+ import { onMounted, onUnmounted } from 'vue'
4
4
  import { useDragElement } from '../composables/useDragElements'
5
5
 
6
6
  const props = defineProps<{
@@ -1,6 +1,6 @@
1
1
  <script setup lang="ts">
2
- import { computed, onMounted, onUnmounted } from 'vue'
3
2
  import type { DragElementMarkdownSource } from '../composables/useDragElements'
3
+ import { computed, onMounted, onUnmounted } from 'vue'
4
4
  import { useDragElement } from '../composables/useDragElements'
5
5
  import Arrow from './Arrow.vue'
6
6
 
@@ -1,11 +1,11 @@
1
1
  import type { PropType, Ref, Slot, TransitionGroupProps, VNode } from 'vue'
2
- import { TransitionGroup, defineComponent, h, onMounted, onUnmounted, ref, watchEffect } from 'vue'
3
2
  import { recomputeAllPoppers } from 'floating-vue'
3
+ import { defineComponent, h, onMounted, onUnmounted, ref, TransitionGroup, watchEffect } from 'vue'
4
+ import { CLASS_VCLICK_CURRENT, CLASS_VCLICK_DISPLAY_NONE, CLASS_VCLICK_PRIOR, CLASS_VCLICK_TARGET, CLICKS_MAX } from '../constants'
4
5
  import { useSlideContext } from '../context'
5
- import { makeId } from '../logic/utils'
6
- import { resolveTransition } from '../logic/transition'
7
6
  import { skipTransition } from '../logic/hmr'
8
- import { CLASS_VCLICK_CURRENT, CLASS_VCLICK_DISPLAY_NONE, CLASS_VCLICK_PRIOR, CLASS_VCLICK_TARGET, CLICKS_MAX } from '../constants'
7
+ import { resolveTransition } from '../logic/transition'
8
+ import { makeId } from '../logic/utils'
9
9
 
10
10
  export default defineComponent({
11
11
  props: {
@@ -1,6 +1,6 @@
1
- import { clamp, sum } from '@antfu/utils'
2
1
  import type { ClicksContext, NormalizedRangeClickValue, NormalizedSingleClickValue, RawAtValue, RawSingleAtValue, SlideRoute } from '@slidev/types'
3
2
  import type { Ref } from 'vue'
3
+ import { clamp, sum } from '@antfu/utils'
4
4
  import { computed, onMounted, onUnmounted, ref, shallowReactive } from 'vue'
5
5
 
6
6
  export function normalizeSingleAtValue(at: RawSingleAtValue): NormalizedSingleClickValue {
@@ -1,7 +1,7 @@
1
- import { debounce, ensureSuffix } from '@antfu/utils'
2
1
  import type { SlidePatch } from '@slidev/types'
3
- import { injectLocal, onClickOutside, useWindowFocus } from '@vueuse/core'
4
2
  import type { CSSProperties, DirectiveBinding, InjectionKey, WatchStopHandle } from 'vue'
3
+ import { debounce, ensureSuffix } from '@antfu/utils'
4
+ import { injectLocal, onClickOutside, useWindowFocus } from '@vueuse/core'
5
5
  import { computed, ref, watch } from 'vue'
6
6
  import { injectionCurrentPage, injectionFrontmatter, injectionRenderContext, injectionSlideElement, injectionSlideScale, injectionSlideZoom } from '../constants'
7
7
  import { makeId } from '../logic/utils'
@@ -1,10 +1,10 @@
1
- import { computed, markRaw, nextTick, reactive, ref, watch } from 'vue'
2
1
  import type { Brush, Options as DrauuOptions, DrawingMode } from 'drauu'
3
- import { createDrauu } from 'drauu'
4
2
  import { createSharedComposable, toReactive, useLocalStorage } from '@vueuse/core'
5
- import { drawingState, onPatchDrawingState, patchDrawingState } from '../state/drawings'
3
+ import { createDrauu } from 'drauu'
4
+ import { computed, markRaw, nextTick, reactive, ref, watch } from 'vue'
6
5
  import { configs } from '../env'
7
6
  import { isInputting } from '../state'
7
+ import { drawingState, onPatchDrawingState, patchDrawingState } from '../state/drawings'
8
8
  import { useNav } from './useNav'
9
9
 
10
10
  export const useDrawings = createSharedComposable(() => {
@@ -1,20 +1,20 @@
1
1
  import type { ClicksContext, SlideRoute, TocItem } from '@slidev/types'
2
2
  import type { ComputedRef, Ref, TransitionGroupProps, WritableComputedRef } from 'vue'
3
- import { computed, ref, watch } from 'vue'
4
- import { useRouter } from 'vue-router'
5
3
  import type { RouteLocationNormalized, Router } from 'vue-router'
4
+ import { slides } from '#slidev/slides'
5
+ import { clamp } from '@antfu/utils'
6
6
  import { createSharedComposable } from '@vueuse/core'
7
7
  import { logicOr } from '@vueuse/math'
8
- import { clamp } from '@antfu/utils'
9
- import { getCurrentTransition } from '../logic/transition'
10
- import { getSlide, getSlidePath } from '../logic/slides'
8
+ import { computed, ref, watch } from 'vue'
9
+ import { useRouter } from 'vue-router'
11
10
  import { CLICKS_MAX } from '../constants'
12
- import { skipTransition } from '../logic/hmr'
13
11
  import { configs } from '../env'
12
+ import { skipTransition } from '../logic/hmr'
14
13
  import { useRouteQuery } from '../logic/route'
15
- import { useTocTree } from './useTocTree'
14
+ import { getSlide, getSlidePath } from '../logic/slides'
15
+ import { getCurrentTransition } from '../logic/transition'
16
16
  import { createClicksContextBase } from './useClicks'
17
- import { slides } from '#slidev/slides'
17
+ import { useTocTree } from './useTocTree'
18
18
 
19
19
  export interface SlidevContextNav {
20
20
  slides: Ref<SlideRoute[]>
@@ -1,8 +1,8 @@
1
+ import type { SlideInfo, SlidePatch } from '@slidev/types'
1
2
  import type { MaybeRef } from '@vueuse/core'
2
- import { useFetch } from '@vueuse/core'
3
3
  import type { Ref } from 'vue'
4
+ import { useFetch } from '@vueuse/core'
4
5
  import { computed, ref, unref } from 'vue'
5
- import type { SlideInfo, SlidePatch } from '@slidev/types'
6
6
  import { getSlide } from '../logic/slides'
7
7
 
8
8
  export interface UseSlideInfo {
@@ -1,6 +1,6 @@
1
1
  import type { Ref } from 'vue'
2
- import { ref } from 'vue'
3
2
  import { timestamp, usePointerSwipe } from '@vueuse/core'
3
+ import { ref } from 'vue'
4
4
  import { useNav } from '../composables/useNav'
5
5
  import { useDrawings } from './useDrawings'
6
6
 
@@ -1,7 +1,7 @@
1
1
  import { ref } from 'vue'
2
2
  import { useRouter } from 'vue-router'
3
- import { getSlide } from '../logic/slides'
4
3
  import { configs } from '../env'
4
+ import { getSlide } from '../logic/slides'
5
5
 
6
6
  export function useViewTransition() {
7
7
  const router = useRouter()
package/constants.ts CHANGED
@@ -1,5 +1,5 @@
1
- import type { ComputedRef, InjectionKey, Ref, UnwrapNestedRefs } from 'vue'
2
1
  import type { ClicksContext, RenderContext, SlideRoute } from '@slidev/types'
2
+ import type { ComputedRef, InjectionKey, Ref, UnwrapNestedRefs } from 'vue'
3
3
  import type { SlidevContext } from './modules/context'
4
4
 
5
5
  // Here we use string literal instead of symbols to make HMR more stable
@@ -81,4 +81,5 @@ export const HEADMATTER_FIELDS = [
81
81
  'mdc',
82
82
  'contextMenu',
83
83
  'wakeLock',
84
+ 'overviewSnapshots',
84
85
  ]
package/context.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { computed, ref, toRef } from 'vue'
2
1
  import { injectLocal, objectOmit } from '@vueuse/core'
2
+ import { computed, ref, toRef } from 'vue'
3
3
  import {
4
4
  FRONTMATTER_FIELDS,
5
5
  HEADMATTER_FIELDS,
@@ -9,8 +9,8 @@ import {
9
9
  injectionRenderContext,
10
10
  injectionRoute,
11
11
  injectionSlideScale,
12
- injectionSlideZoom,
13
12
  injectionSlidevContext,
13
+ injectionSlideZoom,
14
14
  } from './constants'
15
15
 
16
16
  /**
package/env.ts CHANGED
@@ -1,6 +1,6 @@
1
- import { computed } from 'vue'
2
- import { objectMap } from '@antfu/utils'
3
1
  import configs from '#slidev/configs'
2
+ import { objectMap } from '@antfu/utils'
3
+ import { computed } from 'vue'
4
4
 
5
5
  export { configs }
6
6
 
package/index.ts CHANGED
@@ -3,11 +3,29 @@
3
3
  *
4
4
  * The other files despite they are accessable, are not meant to be used directly, breaking changes might happen.
5
5
  */
6
- export { useSlideContext } from './context'
7
- export { useNav } from './composables/useNav'
8
- export { useDrawings } from './composables/useDrawings'
6
+
9
7
  export { useDarkMode } from './composables/useDarkMode'
10
- export { useIsSlideActive, onSlideEnter, onSlideLeave } from './logic/slides'
8
+ export { useDrawings } from './composables/useDrawings'
9
+ export { useNav } from './composables/useNav'
10
+
11
+ export { useSlideContext } from './context'
11
12
 
12
- export * from './layoutHelper'
13
13
  export * from './env'
14
+ export * from './layoutHelper'
15
+
16
+ export {
17
+ onSlideEnter,
18
+ onSlideLeave,
19
+ useIsSlideActive,
20
+ } from './logic/slides'
21
+
22
+ export type { DrawingsState } from './state/drawings'
23
+ export { drawingState, onDrawingUpdate } from './state/drawings'
24
+ export type { SharedState } from './state/shared'
25
+ export { onSharedUpdate, sharedState } from './state/shared'
26
+
27
+ export {
28
+ addSyncMethod,
29
+ createSyncState,
30
+ disableBuiltinSync,
31
+ } from './state/syncState'
@@ -1,14 +1,14 @@
1
1
  <script setup lang="ts">
2
+ import type { CodeRunnerOutputs, RawAtValue } from '@slidev/types'
2
3
  import { debounce, toArray } from '@antfu/utils'
3
4
  import { useVModel } from '@vueuse/core'
4
- import type { CodeRunnerOutputs, RawAtValue } from '@slidev/types'
5
5
  import { computed, onMounted, onUnmounted, ref, shallowRef, toValue, watch, watchSyncEffect } from 'vue'
6
- import { useSlideContext } from '../context'
7
- import setupCodeRunners from '../setup/code-runners'
8
6
  import { useNav } from '../composables/useNav'
7
+ import { useSlideContext } from '../context'
9
8
  import { makeId } from '../logic/utils'
10
- import IconButton from './IconButton.vue'
9
+ import setupCodeRunners from '../setup/code-runners'
11
10
  import DomElement from './DomElement.vue'
11
+ import IconButton from './IconButton.vue'
12
12
 
13
13
  const props = defineProps<{
14
14
  modelValue: string
@@ -1,10 +1,10 @@
1
1
  <script setup lang="ts">
2
2
  import { onClickOutside, useElementBounding, useEventListener, useWindowFocus } from '@vueuse/core'
3
3
  import { computed, ref, watch } from 'vue'
4
- import { closeContextMenu, currentContextMenu } from '../logic/contextMenu'
5
4
  import { useDynamicSlideInfo } from '../composables/useSlideInfo'
6
- import { windowSize } from '../state'
7
5
  import { configs } from '../env'
6
+ import { closeContextMenu, currentContextMenu } from '../logic/contextMenu'
7
+ import { windowSize } from '../state'
8
8
 
9
9
  const container = ref<HTMLElement>()
10
10
 
@@ -1,12 +1,12 @@
1
1
  <script setup lang="ts">
2
2
  import { shallowRef } from 'vue'
3
- import { showInfoDialog, showRecordingDialog } from '../state'
4
- import { configs } from '../env'
5
3
  import { useNav } from '../composables/useNav'
6
- import QuickOverview from './QuickOverview.vue'
7
- import InfoDialog from './InfoDialog.vue'
8
- import Goto from './Goto.vue'
4
+ import { configs } from '../env'
5
+ import { showInfoDialog, showRecordingDialog } from '../state'
9
6
  import ContextMenu from './ContextMenu.vue'
7
+ import Goto from './Goto.vue'
8
+ import InfoDialog from './InfoDialog.vue'
9
+ import QuickOverview from './QuickOverview.vue'
10
10
 
11
11
  const { isEmbedded } = useNav()
12
12
  const drawingEnabled = __SLIDEV_FEATURE_DRAWINGS__ && !configs.drawings.presenterOnly && !isEmbedded.value
@@ -23,7 +23,7 @@ if (__SLIDEV_FEATURE_RECORD__) {
23
23
  </script>
24
24
 
25
25
  <template>
26
- <DrawingControls v-if="drawingEnabled && DrawingControls" />
26
+ <DrawingControls v-if="DrawingControls" />
27
27
  <QuickOverview />
28
28
  <Goto />
29
29
  <WebCamera v-if="WebCamera" />
@@ -1,6 +1,6 @@
1
1
  <script setup lang="ts">
2
+ import type { SelectionItem } from './types'
2
3
  import { computed } from 'vue'
3
- import { currentCamera, currentMic } from '../state'
4
4
  import {
5
5
  cameras,
6
6
  ensureDevicesListPermissions,
@@ -9,8 +9,8 @@ import {
9
9
  mimeType,
10
10
  supportedMimeTypes,
11
11
  } from '../logic/recording'
12
+ import { currentCamera, currentMic } from '../state'
12
13
  import SelectList from './SelectList.vue'
13
- import type { SelectionItem } from './types'
14
14
 
15
15
  const camerasItems = computed<SelectionItem<string>[]>(() => [
16
16
  {
@@ -1,9 +1,9 @@
1
1
  <script setup lang="ts">
2
- import { clamp } from '@antfu/utils'
3
2
  import type { Pausable } from '@vueuse/core'
3
+ import type { DragElementState } from '../composables/useDragElements'
4
+ import { clamp } from '@antfu/utils'
4
5
  import { useIntervalFn } from '@vueuse/core'
5
6
  import { computed, inject, ref, watchEffect } from 'vue'
6
- import type { DragElementState } from '../composables/useDragElements'
7
7
  import { useSlideBounds } from '../composables/useSlideBounds'
8
8
  import { injectionSlideScale } from '../constants'
9
9
  import { slideHeight, slideWidth } from '../env'
@@ -1,6 +1,6 @@
1
1
  <script setup lang="ts">
2
- import { ref } from 'vue'
3
2
  import { useDraggable, useLocalStorage } from '@vueuse/core'
3
+ import { ref } from 'vue'
4
4
 
5
5
  const props = defineProps<{
6
6
  storageKey?: string