@slidev/client 0.49.3 → 0.49.4

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/VClick.ts CHANGED
@@ -36,6 +36,7 @@ export default defineComponent({
36
36
  at: this.at,
37
37
  hide: this.hide,
38
38
  fade: this.fade,
39
+ handleSpecialElements: false,
39
40
  },
40
41
  {
41
42
  default: () =>
@@ -34,6 +34,10 @@ export default defineComponent({
34
34
  type: Boolean,
35
35
  default: false,
36
36
  },
37
+ handleSpecialElements: {
38
+ type: Boolean,
39
+ default: true,
40
+ },
37
41
  },
38
42
  render() {
39
43
  const every = +this.every
@@ -120,21 +124,23 @@ export default defineComponent({
120
124
  size: +at + Math.ceil((globalIdx - 1) / every) - 1 - execIdx,
121
125
  })
122
126
 
123
- // handle ul, ol list
124
- if (elements.length === 1 && listTags.includes(elements[0].type as string) && Array.isArray(elements[0].children))
125
- return h(elements[0], {}, [...mapChildren(elements[0].children), lastGap()])
126
-
127
- if (elements.length === 1 && elements[0].type as string === 'table') {
128
- const tableNode = elements[0]
129
- if (Array.isArray(tableNode.children)) {
130
- return h(tableNode, {}, tableNode.children.map((i) => {
131
- if (!isVNode(i))
132
- return i
133
- else if (i.type === 'tbody' && Array.isArray(i.children))
134
- return h(i, {}, [...mapChildren(i.children), lastGap()])
135
- else
136
- return h(i)
137
- }))
127
+ if (this.handleSpecialElements) {
128
+ // handle ul, ol list
129
+ if (elements.length === 1 && listTags.includes(elements[0].type as string) && Array.isArray(elements[0].children))
130
+ return h(elements[0], {}, [...mapChildren(elements[0].children), lastGap()])
131
+
132
+ if (elements.length === 1 && elements[0].type as string === 'table') {
133
+ const tableNode = elements[0]
134
+ if (Array.isArray(tableNode.children)) {
135
+ return h(tableNode, {}, tableNode.children.map((i) => {
136
+ if (!isVNode(i))
137
+ return i
138
+ else if (i.type === 'tbody' && Array.isArray(i.children))
139
+ return h(i, {}, [...mapChildren(i.children), lastGap()])
140
+ else
141
+ return h(i)
142
+ }))
143
+ }
138
144
  }
139
145
  }
140
146
 
@@ -156,18 +156,22 @@ export function useNavBase(
156
156
 
157
157
  async function nextSlide(lastClicks = false) {
158
158
  clicksDirection.value = 1
159
- await go(
160
- Math.min(currentSlideNo.value + 1, slides.value.length),
161
- lastClicks && !isPrint.value ? CLICKS_MAX : undefined,
162
- )
159
+ if (currentSlideNo.value < slides.value.length) {
160
+ await go(
161
+ currentSlideNo.value + 1,
162
+ lastClicks && !isPrint.value ? CLICKS_MAX : undefined,
163
+ )
164
+ }
163
165
  }
164
166
 
165
167
  async function prevSlide(lastClicks = false) {
166
168
  clicksDirection.value = -1
167
- await go(
168
- Math.max(1, currentSlideNo.value - 1),
169
- lastClicks && !isPrint.value ? CLICKS_MAX : undefined,
170
- )
169
+ if (currentSlideNo.value > 1) {
170
+ await go(
171
+ currentSlideNo.value - 1,
172
+ lastClicks && !isPrint.value ? CLICKS_MAX : undefined,
173
+ )
174
+ }
171
175
  }
172
176
 
173
177
  function goFirst() {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@slidev/client",
3
3
  "type": "module",
4
- "version": "0.49.3",
4
+ "version": "0.49.4",
5
5
  "description": "Presentation slides for developers",
6
6
  "author": "antfu <anthonyfu117@hotmail.com>",
7
7
  "license": "MIT",
@@ -29,15 +29,15 @@
29
29
  },
30
30
  "dependencies": {
31
31
  "@antfu/utils": "^0.7.8",
32
- "@iconify-json/carbon": "^1.1.33",
32
+ "@iconify-json/carbon": "^1.1.34",
33
33
  "@iconify-json/ph": "^1.1.13",
34
34
  "@iconify-json/svg-spinners": "^1.1.2",
35
- "@shikijs/monaco": "^1.5.2",
36
- "@shikijs/vitepress-twoslash": "^1.5.2",
35
+ "@shikijs/monaco": "^1.6.0",
36
+ "@shikijs/vitepress-twoslash": "^1.6.0",
37
37
  "@slidev/rough-notation": "^0.1.0",
38
38
  "@typescript/ata": "^0.9.4",
39
- "@unhead/vue": "^1.9.10",
40
- "@unocss/reset": "^0.60.2",
39
+ "@unhead/vue": "^1.9.11",
40
+ "@unocss/reset": "^0.60.3",
41
41
  "@vueuse/core": "^10.9.0",
42
42
  "@vueuse/math": "^10.9.0",
43
43
  "@vueuse/motion": "^2.1.0",
@@ -49,18 +49,18 @@
49
49
  "katex": "^0.16.10",
50
50
  "lz-string": "^1.5.0",
51
51
  "mermaid": "^10.9.1",
52
- "monaco-editor": "^0.48.0",
52
+ "monaco-editor": "^0.49.0",
53
53
  "prettier": "^3.2.5",
54
54
  "recordrtc": "^5.6.2",
55
- "shiki": "^1.5.2",
55
+ "shiki": "^1.6.0",
56
56
  "shiki-magic-move": "^0.4.2",
57
57
  "typescript": "^5.4.5",
58
- "unocss": "^0.60.2",
58
+ "unocss": "^0.60.3",
59
59
  "vue": "^3.4.27",
60
60
  "vue-router": "^4.3.2",
61
61
  "yaml": "^2.4.2",
62
- "@slidev/parser": "0.49.3",
63
- "@slidev/types": "0.49.3"
62
+ "@slidev/types": "0.49.4",
63
+ "@slidev/parser": "0.49.4"
64
64
  },
65
65
  "devDependencies": {
66
66
  "vite": "^5.2.11"