@slidev/client 0.49.29 → 0.50.0-beta.2
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/builtin/Arrow.vue +1 -1
- package/builtin/CodeBlockWrapper.vue +3 -3
- package/builtin/KaTexBlockWrapper.vue +2 -2
- package/builtin/Mermaid.vue +1 -1
- package/builtin/Monaco.vue +5 -5
- package/builtin/RenderWhen.vue +2 -2
- package/builtin/ShikiMagicMove.vue +5 -5
- package/builtin/SlidevVideo.vue +2 -2
- package/builtin/Toc.vue +1 -1
- package/builtin/TocList.vue +2 -2
- package/builtin/VAfter.ts +1 -1
- package/builtin/VClick.ts +1 -1
- package/builtin/VClickGap.vue +1 -1
- package/builtin/VClicks.ts +1 -1
- package/builtin/VDrag.vue +1 -1
- package/builtin/VDragArrow.vue +1 -1
- package/builtin/VSwitch.ts +4 -4
- package/composables/useClicks.ts +1 -1
- package/composables/useDragElements.ts +2 -2
- package/composables/useDrawings.ts +3 -3
- package/composables/useNav.ts +8 -8
- package/composables/useSlideInfo.ts +2 -2
- package/composables/useSwipeControls.ts +1 -1
- package/composables/useViewTransition.ts +1 -1
- package/constants.ts +2 -1
- package/context.ts +2 -2
- package/env.ts +2 -2
- package/index.ts +23 -5
- package/internals/CodeRunner.vue +4 -4
- package/internals/ContextMenu.vue +2 -2
- package/internals/Controls.vue +6 -6
- package/internals/DevicesList.vue +2 -2
- package/internals/DragControl.vue +2 -2
- package/internals/Draggable.vue +1 -1
- package/internals/DrawingControls.vue +140 -139
- package/internals/DrawingLayer.vue +1 -1
- package/internals/Goto.vue +3 -3
- package/internals/NavControls.vue +8 -8
- package/internals/NoteDisplay.vue +1 -1
- package/internals/NoteEditable.vue +2 -2
- package/internals/PrintContainer.vue +3 -3
- package/internals/PrintSlide.vue +1 -1
- package/internals/PrintSlideClick.vue +3 -3
- package/internals/QuickOverview.vue +9 -7
- package/internals/RecordingControls.vue +1 -1
- package/internals/RecordingDialog.vue +1 -1
- package/internals/SelectList.vue +1 -1
- package/internals/Settings.vue +1 -1
- package/internals/ShikiEditor.vue +1 -1
- package/internals/SideEditor.vue +1 -1
- package/internals/SlideContainer.vue +32 -3
- package/internals/SlideWrapper.vue +4 -4
- package/internals/SlidesShow.vue +6 -6
- package/internals/WebCamera.vue +1 -1
- package/logic/contextMenu.ts +3 -3
- package/logic/recording.ts +4 -4
- package/logic/shortcuts.ts +3 -3
- package/logic/slides.ts +2 -2
- package/logic/snapshot.ts +86 -0
- package/modules/context.ts +1 -1
- package/modules/mermaid.ts +3 -3
- package/modules/v-click.ts +1 -1
- package/modules/v-drag.ts +1 -1
- package/modules/v-mark.ts +2 -2
- package/modules/v-motion.ts +3 -3
- package/package.json +23 -22
- package/pages/notes.vue +7 -7
- package/pages/overview.vue +24 -11
- package/pages/play.vue +10 -10
- package/pages/presenter/print.vue +2 -2
- package/pages/presenter.vue +18 -18
- package/pages/print.vue +3 -3
- package/setup/code-runners.ts +4 -4
- package/setup/context-menu.ts +11 -11
- package/setup/main.ts +4 -4
- package/setup/mermaid.ts +1 -1
- package/setup/monaco.ts +13 -9
- package/setup/root.ts +9 -9
- package/setup/shortcuts.ts +5 -5
- package/state/drawings.ts +1 -0
- package/state/index.ts +1 -1
- package/state/shared.ts +2 -1
- package/state/snapshot.ts +13 -0
- package/state/syncState.ts +76 -24
- package/styles/index.css +1 -0
- package/uno.config.ts +2 -2
package/builtin/Arrow.vue
CHANGED
|
@@ -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: {
|
package/builtin/Mermaid.vue
CHANGED
|
@@ -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
|
package/builtin/Monaco.vue
CHANGED
|
@@ -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
|
package/builtin/RenderWhen.vue
CHANGED
|
@@ -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 {
|
|
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
|
|
9
|
-
import {
|
|
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: {
|
package/builtin/SlidevVideo.vue
CHANGED
|
@@ -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
|
|
package/builtin/TocList.vue
CHANGED
|
@@ -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
package/builtin/VClickGap.vue
CHANGED
package/builtin/VClicks.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 { 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<{
|
package/builtin/VDragArrow.vue
CHANGED
|
@@ -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
|
|
package/builtin/VSwitch.ts
CHANGED
|
@@ -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 {
|
|
7
|
+
import { resolveTransition } from '../logic/transition'
|
|
8
|
+
import { makeId } from '../logic/utils'
|
|
9
9
|
|
|
10
10
|
export default defineComponent({
|
|
11
11
|
props: {
|
package/composables/useClicks.ts
CHANGED
|
@@ -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 {
|
|
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(() => {
|
package/composables/useNav.ts
CHANGED
|
@@ -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 {
|
|
9
|
-
import {
|
|
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 {
|
|
14
|
+
import { getSlide, getSlidePath } from '../logic/slides'
|
|
15
|
+
import { getCurrentTransition } from '../logic/transition'
|
|
16
16
|
import { createClicksContextBase } from './useClicks'
|
|
17
|
-
import {
|
|
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 {
|
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
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
|
-
|
|
7
|
-
export { useNav } from './composables/useNav'
|
|
8
|
-
export { useDrawings } from './composables/useDrawings'
|
|
6
|
+
|
|
9
7
|
export { useDarkMode } from './composables/useDarkMode'
|
|
10
|
-
export {
|
|
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'
|
package/internals/CodeRunner.vue
CHANGED
|
@@ -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
|
|
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
|
|
package/internals/Controls.vue
CHANGED
|
@@ -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
|
|
7
|
-
import
|
|
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="
|
|
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'
|