@slidev/client 0.41.1 → 0.42.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.
- package/builtin/Mermaid.vue +1 -1
- package/internals/Goto.vue +1 -0
- package/internals/PresenterPrint.vue +0 -1
- package/internals/PrintContainer.vue +1 -2
- package/internals/ShadowRoot.vue +1 -1
- package/internals/SlidesOverview.vue +1 -1
- package/layouts/two-cols-header.vue +22 -9
- package/layouts/two-cols.vue +4 -1
- package/package.json +10 -10
package/builtin/Mermaid.vue
CHANGED
package/internals/Goto.vue
CHANGED
|
@@ -21,8 +21,7 @@ const scale = computed(() => {
|
|
|
21
21
|
return (height.value * slideAspect) / slideWidth
|
|
22
22
|
})
|
|
23
23
|
|
|
24
|
-
|
|
25
|
-
let routes = rawRoutes.slice(0, -1)
|
|
24
|
+
let routes = rawRoutes
|
|
26
25
|
if (currentRoute.value.query.range) {
|
|
27
26
|
const r = parseRangeString(routes.length, currentRoute.value.query.range as string)
|
|
28
27
|
routes = r.map(i => routes[i - 1])
|
package/internals/ShadowRoot.vue
CHANGED
|
@@ -12,7 +12,7 @@ const emit = defineEmits<{
|
|
|
12
12
|
const el = ref<HTMLDivElement>()
|
|
13
13
|
const shadow = computed(() => el.value ? (el.value.shadowRoot || el.value.attachShadow({ mode: 'open' })) : null)
|
|
14
14
|
watchEffect(() => {
|
|
15
|
-
if (shadow.value) {
|
|
15
|
+
if (shadow.value && props.innerHtml) {
|
|
16
16
|
emit('shadow', shadow.value)
|
|
17
17
|
shadow.value.innerHTML = props.innerHtml
|
|
18
18
|
}
|
|
@@ -19,21 +19,34 @@ const props = defineProps({
|
|
|
19
19
|
class: {
|
|
20
20
|
type: String,
|
|
21
21
|
},
|
|
22
|
+
layoutClass: {
|
|
23
|
+
type: String,
|
|
24
|
+
},
|
|
22
25
|
})
|
|
23
26
|
</script>
|
|
24
27
|
|
|
25
28
|
<template>
|
|
26
|
-
<div class="slidev-layout two-
|
|
27
|
-
<div class="col-
|
|
29
|
+
<div class="slidev-layout two-cols-header w-full h-full" :class="layoutClass">
|
|
30
|
+
<div class="col-header">
|
|
28
31
|
<slot />
|
|
29
32
|
</div>
|
|
30
|
-
<div class="
|
|
31
|
-
<
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
<
|
|
35
|
-
<slot name="right" />
|
|
36
|
-
</div>
|
|
33
|
+
<div class="col-left" :class="props.class">
|
|
34
|
+
<slot name="left" />
|
|
35
|
+
</div>
|
|
36
|
+
<div class="col-right" :class="props.class">
|
|
37
|
+
<slot name="right" />
|
|
37
38
|
</div>
|
|
38
39
|
</div>
|
|
39
40
|
</template>
|
|
41
|
+
|
|
42
|
+
<style scoped>
|
|
43
|
+
.two-cols-header {
|
|
44
|
+
display: grid;
|
|
45
|
+
grid-template-columns: repeat(2, 1fr);
|
|
46
|
+
grid-template-rows: repeat(2, 1fr);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.col-header { grid-area: 1 / 1 / 2 / 3; }
|
|
50
|
+
.col-left { grid-area: 2 / 1 / 3 / 2; }
|
|
51
|
+
.col-right { grid-area: 2 / 2 / 3 / 3; }
|
|
52
|
+
</style>
|
package/layouts/two-cols.vue
CHANGED
|
@@ -24,11 +24,14 @@ const props = defineProps({
|
|
|
24
24
|
class: {
|
|
25
25
|
type: String,
|
|
26
26
|
},
|
|
27
|
+
layoutClass: {
|
|
28
|
+
type: String,
|
|
29
|
+
},
|
|
27
30
|
})
|
|
28
31
|
</script>
|
|
29
32
|
|
|
30
33
|
<template>
|
|
31
|
-
<div class="slidev-layout two-columns w-full h-full grid grid-cols-2">
|
|
34
|
+
<div class="slidev-layout two-columns w-full h-full grid grid-cols-2" :class="props.layoutClass">
|
|
32
35
|
<div class="col-left" :class="props.class">
|
|
33
36
|
<slot />
|
|
34
37
|
</div>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@slidev/client",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.42.1",
|
|
4
4
|
"description": "Presentation slides for developers",
|
|
5
5
|
"author": "antfu <anthonyfu117@hotmail.com>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -16,11 +16,11 @@
|
|
|
16
16
|
},
|
|
17
17
|
"dependencies": {
|
|
18
18
|
"@antfu/utils": "^0.7.2",
|
|
19
|
-
"@unocss/reset": "^0.
|
|
19
|
+
"@unocss/reset": "^0.52.4",
|
|
20
20
|
"@vueuse/core": "^10.1.2",
|
|
21
21
|
"@vueuse/head": "^1.1.26",
|
|
22
22
|
"@vueuse/math": "^10.1.2",
|
|
23
|
-
"@vueuse/motion": "^2.0.0
|
|
23
|
+
"@vueuse/motion": "^2.0.0",
|
|
24
24
|
"codemirror": "^5.65.5",
|
|
25
25
|
"defu": "^6.1.2",
|
|
26
26
|
"drauu": "^0.3.2",
|
|
@@ -29,22 +29,22 @@
|
|
|
29
29
|
"js-base64": "^3.7.5",
|
|
30
30
|
"js-yaml": "^4.1.0",
|
|
31
31
|
"katex": "^0.16.7",
|
|
32
|
-
"mermaid": "^10.
|
|
32
|
+
"mermaid": "^10.2.0",
|
|
33
33
|
"monaco-editor": "^0.37.1",
|
|
34
34
|
"nanoid": "^4.0.2",
|
|
35
35
|
"prettier": "^2.8.8",
|
|
36
36
|
"recordrtc": "^5.6.2",
|
|
37
37
|
"resolve": "^1.22.2",
|
|
38
|
-
"unocss": "^0.
|
|
38
|
+
"unocss": "^0.52.4",
|
|
39
39
|
"vite-plugin-windicss": "^1.9.0",
|
|
40
|
-
"vue": "^3.3.
|
|
41
|
-
"vue-router": "^4.2.
|
|
40
|
+
"vue": "^3.3.4",
|
|
41
|
+
"vue-router": "^4.2.2",
|
|
42
42
|
"vue-starport": "^0.3.0",
|
|
43
43
|
"windicss": "^3.5.6",
|
|
44
|
-
"@slidev/parser": "0.
|
|
45
|
-
"@slidev/types": "0.
|
|
44
|
+
"@slidev/parser": "0.42.1",
|
|
45
|
+
"@slidev/types": "0.42.1"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
|
-
"vite": "^4.3.
|
|
48
|
+
"vite": "^4.3.9"
|
|
49
49
|
}
|
|
50
50
|
}
|