@slidev/client 0.41.0 → 0.42.0

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.
@@ -107,7 +107,7 @@ watch(activeElement, () => {
107
107
  id="slidev-goto-dialog"
108
108
  ref="container"
109
109
  class="fixed right-5 transition-all"
110
- w-90
110
+ w-90 max-w-90 min-w-90
111
111
  :class="showGotoDialog ? 'top-5' : '-top-20'"
112
112
  >
113
113
  <div
@@ -117,6 +117,7 @@ watch(activeElement, () => {
117
117
  border="~ transparent rounded dark:main"
118
118
  >
119
119
  <input
120
+ id="slidev-goto-input"
120
121
  ref="input"
121
122
  :value="text"
122
123
  type="text"
@@ -148,6 +149,7 @@ watch(activeElement, () => {
148
149
  cursor-pointer
149
150
  hover="op100"
150
151
  flex="~ gap-2"
152
+ w-90
151
153
  items-center
152
154
  :border="index === 0 ? '' : 't main'"
153
155
  :class="selectedIndex === index ? 'bg-active op100' : 'op80'"
@@ -72,6 +72,7 @@ onClickOutside(input, () => {
72
72
  ref="input"
73
73
  v-model="note"
74
74
  class="prose resize-none overflow-auto outline-none bg-transparent block"
75
+ style="line-height: 1.75; margin: 1em 0;"
75
76
  :class="props.class"
76
77
  :placeholder="placeholder"
77
78
  @focus="editing = true"
@@ -84,7 +84,7 @@ onMounted(() => {
84
84
  <div class="bg-main h-full slidev-presenter">
85
85
  <div class="grid-container">
86
86
  <div class="grid-section top flex">
87
- <img src="../assets/logo-title-horizontal.png" class="ml-2 my-auto h-10 py-1 lg:h-14 lg:py-2">
87
+ <img src="../assets/logo-title-horizontal.png" class="ml-2 my-auto h-10 py-1 lg:h-14 lg:py-2" style="height: 3.5rem;">
88
88
  <div class="flex-auto" />
89
89
  <div
90
90
  class="timer-btn my-auto relative w-22px h-22px cursor-pointer text-lg"
@@ -132,8 +132,8 @@ onMounted(() => {
132
132
  </div>
133
133
  </div>
134
134
  <div class="grid-section note overflow-auto">
135
- <NoteEditor v-if="__DEV__" class="w-full h-full overflow-auto p-2 lg:p-4" />
136
- <NoteStatic v-else class="w-full h-full overflow-auto p-2 lg:p-4" />
135
+ <NoteEditor v-if="__DEV__" class="w-full max-w-full h-full overflow-auto p-2 lg:p-4" />
136
+ <NoteStatic v-else class="w-full max-w-full h-full overflow-auto p-2 lg:p-4" />
137
137
  </div>
138
138
  <div class="grid-section bottom">
139
139
  <NavControls :persist="true" />
@@ -27,7 +27,6 @@ html #page-root {
27
27
  useHead({ title: `Notes - ${configs.title}` })
28
28
 
29
29
  const slidesWithNote = computed(() => rawRoutes
30
- .slice(0, -1)
31
30
  .map(route => route.meta?.slide)
32
31
  .filter(slide => slide !== undefined && slide.noteHTML !== ''))
33
32
  </script>
@@ -21,8 +21,7 @@ const scale = computed(() => {
21
21
  return (height.value * slideAspect) / slideWidth
22
22
  })
23
23
 
24
- // Remove the "end" slide
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])
@@ -66,7 +66,7 @@ watchEffect(() => {
66
66
  :style="`grid-template-columns: repeat(auto-fit,minmax(${cardWidth}px,1fr))`"
67
67
  >
68
68
  <div
69
- v-for="(route, idx) of rawRoutes.slice(0, -1)"
69
+ v-for="(route, idx) of rawRoutes"
70
70
  :key="route.path"
71
71
  class="relative"
72
72
  >
@@ -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-columns w-full h-full">
27
- <div class="col-span-2">
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="grid grid-cols-2">
31
- <div class="col-left" :class="props.class">
32
- <slot name="left" />
33
- </div>
34
- <div class="col-right" :class="props.class">
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>
@@ -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.41.0",
3
+ "version": "0.42.0",
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.51.13",
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-beta.27",
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.1.0",
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.51.13",
38
+ "unocss": "^0.52.4",
39
39
  "vite-plugin-windicss": "^1.9.0",
40
- "vue": "^3.3.2",
41
- "vue-router": "^4.2.0",
40
+ "vue": "^3.3.4",
41
+ "vue-router": "^4.2.1",
42
42
  "vue-starport": "^0.3.0",
43
43
  "windicss": "^3.5.6",
44
- "@slidev/parser": "0.41.0",
45
- "@slidev/types": "0.41.0"
44
+ "@slidev/parser": "0.42.0",
45
+ "@slidev/types": "0.42.0"
46
46
  },
47
47
  "devDependencies": {
48
- "vite": "^4.3.7"
48
+ "vite": "^4.3.9"
49
49
  }
50
50
  }