@slidev/client 0.23.2 → 0.25.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.
@@ -94,7 +94,7 @@ if (__SLIDEV_FEATURE_DRAWINGS__)
94
94
  </button>
95
95
  </template>
96
96
 
97
- <template v-if="__SLIDEV_FEATURE_DRAWINGS__ && !isEmbedded">
97
+ <template v-if="__SLIDEV_FEATURE_DRAWINGS__ && !configs.drawings.presenterOnly && !isEmbedded">
98
98
  <button class="icon-btn relative" title="Drawing" @click="drawingEnabled = !drawingEnabled">
99
99
  <carbon:pen />
100
100
  <div
@@ -4,7 +4,7 @@ import { showEditor, windowSize, isScreenVertical, slideScale } from '../state'
4
4
  import { isPrintMode, next, prev, useSwipeControls, isEmbedded } from '../logic/nav'
5
5
  import { isDrawing } from '../logic/drawings'
6
6
  import { registerShortcuts } from '../logic/shortcuts'
7
- import { themeVars } from '../env'
7
+ import { themeVars, configs } from '../env'
8
8
  import Controls from './Controls.vue'
9
9
  import SlideContainer from './SlideContainer.vue'
10
10
  import NavControls from './NavControls.vue'
@@ -61,7 +61,7 @@ if (__SLIDEV_FEATURE_DRAWINGS__)
61
61
  >
62
62
  <NavControls class="m-auto" :persist="presistNav" />
63
63
  </div>
64
- <template v-if="__SLIDEV_FEATURE_DRAWINGS__ && !isEmbedded && DrawingControls">
64
+ <template v-if="__SLIDEV_FEATURE_DRAWINGS__ && !configs.drawings.presenterOnly && !isEmbedded && DrawingControls">
65
65
  <DrawingControls class="ml-0" />
66
66
  </template>
67
67
  </template>
package/logic/drawings.ts CHANGED
@@ -1,8 +1,8 @@
1
- import { computed, markRaw, nextTick, reactive, ref, watch } from 'vue'
1
+ import { computed, markRaw, nextTick, reactive, ref, watch, watchEffect } from 'vue'
2
2
  import { Brush, createDrauu, DrawingMode, Options as DrauuOptions } from 'drauu'
3
3
  import { useStorage, toReactive } from '@vueuse/core'
4
- import { serverDrawingState as drawingState } from '../env'
5
- import { currentPage } from './nav'
4
+ import { serverDrawingState as drawingState, configs } from '../env'
5
+ import { currentPage, isPresenter } from './nav'
6
6
 
7
7
  export const brushColors = [
8
8
  '#ff595e',
@@ -98,6 +98,10 @@ if (__DEV__) {
98
98
  return
99
99
  loadCanvas()
100
100
  }, { immediate: true })
101
+
102
+ watchEffect(() => {
103
+ drawingState.$syncUp = configs.drawings.syncAll || isPresenter.value
104
+ })
101
105
  })
102
106
 
103
107
  drauu.on('start', () => isDrawing.value = true)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@slidev/client",
3
- "version": "0.23.2",
3
+ "version": "0.25.2",
4
4
  "description": "Presentation slides for developers",
5
5
  "homepage": "https://sli.dev",
6
6
  "bugs": "https://github.com/slidevjs/slidev/issues",
@@ -13,25 +13,25 @@
13
13
  "author": "antfu <anthonyfu117@hotmail.com>",
14
14
  "dependencies": {
15
15
  "@antfu/utils": "^0.3.0",
16
- "@slidev/parser": "0.23.2",
17
- "@slidev/types": "0.23.2",
18
- "@vueuse/core": "^6.3.3",
16
+ "@slidev/parser": "0.25.2",
17
+ "@slidev/types": "0.25.2",
18
+ "@vueuse/core": "^6.4.0",
19
19
  "@vueuse/head": "^0.6.0",
20
20
  "@vueuse/motion": "^1.6.0",
21
21
  "codemirror": "^5.62.3",
22
- "drauu": "^0.1.0",
22
+ "drauu": "0.1.0",
23
23
  "file-saver": "^2.0.5",
24
- "js-base64": "^3.7.0",
24
+ "js-base64": "^3.7.1",
25
25
  "js-yaml": "^4.1.0",
26
26
  "katex": "^0.13.18",
27
27
  "mermaid": "^8.12.1",
28
28
  "monaco-editor": "^0.27.0",
29
29
  "nanoid": "^3.1.25",
30
- "prettier": "^2.4.0",
30
+ "prettier": "^2.4.1",
31
31
  "recordrtc": "^5.6.2",
32
32
  "resolve": "^1.20.0",
33
- "vite-plugin-windicss": "^1.4.2",
34
- "vue": "^3.2.11",
33
+ "vite-plugin-windicss": "^1.4.3",
34
+ "vue": "^3.2.12",
35
35
  "vue-router": "^4.0.11",
36
36
  "windicss": "^3.1.7"
37
37
  },
package/styles/index.css CHANGED
@@ -39,3 +39,9 @@ html {
39
39
  .slidev-vclick-hidden {
40
40
  @apply !opacity-0 !pointer-events-none;
41
41
  }
42
+
43
+ .slidev-icon {
44
+ display: inline-block;
45
+ vertical-align: sub;
46
+ line-height: 1em;
47
+ }