@slidev/client 51.8.0 → 51.8.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.
@@ -0,0 +1,661 @@
1
+ /* eslint-disable eslint-comments/no-unlimited-disable */
2
+ /* eslint-disable */
3
+ export default [
4
+ "!backdrop-blur-0px",
5
+ "!bg-opacity-75",
6
+ "!bg-transparent",
7
+ "!border-none",
8
+ "!hidden",
9
+ "!opacity-0",
10
+ "!opacity-100",
11
+ "!p-4",
12
+ "!px-0",
13
+ "!text-current",
14
+ "!text-sm",
15
+ "-mt-0.5",
16
+ "-mt-1",
17
+ "-rotate-45",
18
+ "-top-15px",
19
+ "-top-20",
20
+ "-translate-y-1/2",
21
+ "-z-1",
22
+ "<md:hidden",
23
+ "[absolute=\"\"]",
24
+ "[align-top=\"\"]",
25
+ "[b=\"\"]",
26
+ "[bg-cyan:10=\"\"]",
27
+ "[bg-gray:4=\"\"]",
28
+ "[bg-gray:5=\"\"]",
29
+ "[bg-gray=\"\"]",
30
+ "[bg-opacity-30=\"\"]",
31
+ "[bg-primary=\"\"]",
32
+ "[bg~=\"black\"]",
33
+ "[bg~=\"opacity-80\"]",
34
+ "[border-collapse=\"\"]",
35
+ "[border-gray=\"\"]",
36
+ "[border-main=\"\"]",
37
+ "[border-t=\"\"]",
38
+ "[border=\"\"]",
39
+ "[border~=\"0\"]",
40
+ "[border~=\"1\"]",
41
+ "[border~=\"b\"]",
42
+ "[border~=\"dark:main\"]",
43
+ "[border~=\"main\"]",
44
+ "[border~=\"r\"]",
45
+ "[border~=\"red\"]",
46
+ "[border~=\"rounded\"]",
47
+ "[border~=\"rounded-lg\"]",
48
+ "[border~=\"rounded-md\"]",
49
+ "[border~=\"t\"]",
50
+ "[border~=\"transparent\"]",
51
+ "[border~=\"y\"]",
52
+ "[border~=\"~\"]",
53
+ "[bottom-0=\"\"]",
54
+ "[bottom-1=\"\"]",
55
+ "[bottom-5=\"\"]",
56
+ "[b~=\"100%\"]",
57
+ "[b~=\"2\"]",
58
+ "[b~=\"50%\"]",
59
+ "[b~=\"x\"]",
60
+ "[b~=\"y\"]",
61
+ "[color~=\"green\"]",
62
+ "[container=\"\"]",
63
+ "[cursor-pointer=\"\"]",
64
+ "[dark:bg-gray-800=\"\"]",
65
+ "[dark:border-gray-500=\"\"]",
66
+ "[dark:border~=\"main\"]",
67
+ "[dark:border~=\"~\"]",
68
+ "[fixed=\"\"]",
69
+ "[flex-auto=\"\"]",
70
+ "[flex=\"\"]",
71
+ "[flex~=\"col\"]",
72
+ "[flex~=\"gap-1\"]",
73
+ "[flex~=\"gap-2\"]",
74
+ "[flex~=\"gap-3\"]",
75
+ "[flex~=\"gap-4\"]",
76
+ "[flex~=\"items-center\"]",
77
+ "[flex~=\"justify-center\"]",
78
+ "[flex~=\"row\"]",
79
+ "[flex~=\"~\"]",
80
+ "[font-bold=\"\"]",
81
+ "[font-mono=\"\"]",
82
+ "[grid=\"\"]",
83
+ "[h-1.5=\"\"]",
84
+ "[h-1.5em=\"\"]",
85
+ "[h-1px=\"\"]",
86
+ "[h-22px=\"\"]",
87
+ "[h-2=\"\"]",
88
+ "[h-5=\"\"]",
89
+ "[h-8=\"\"]",
90
+ "[h-full=\"\"]",
91
+ "[h1=\"\"]",
92
+ "[h5=\"\"]",
93
+ "[hidden=\"\"]",
94
+ "[hover:bg-active=\"\"]",
95
+ "[hover~=\"op100\"]",
96
+ "[inline-flex=\"\"]",
97
+ "[inset-0=\"\"]",
98
+ "[italic=\"\"]",
99
+ "[items-center=\"\"]",
100
+ "[justify-center=\"\"]",
101
+ "[left-0=\"\"]",
102
+ "[m--1=\"\"]",
103
+ "[m0=\"\"]",
104
+ "[marker-start~=\"none\"]",
105
+ "[max-w-90=\"\"]",
106
+ "[min-w-30=\"\"]",
107
+ "[min-w-90=\"\"]",
108
+ "[my2=\"\"]",
109
+ "[of-hidden=\"\"]",
110
+ "[op0=\"\"]",
111
+ "[op25=\"\"]",
112
+ "[op40=\"\"]",
113
+ "[op50=\"\"]",
114
+ "[op75=\"\"]",
115
+ "[opacity-10=\"\"]",
116
+ "[p0.5=\"\"]",
117
+ "[p1=\"\"]",
118
+ "[p2=\"\"]",
119
+ "[p3=\"\"]",
120
+ "[pl-4=\"\"]",
121
+ "[pl1=\"\"]",
122
+ "[pl2=\"\"]",
123
+ "[pointer-events-none=\"\"]",
124
+ "[pr-3=\"\"]",
125
+ "[pr-4=\"\"]",
126
+ "[print:hidden=\"\"]",
127
+ "[pt-2px=\"\"]",
128
+ "[px2=\"\"]",
129
+ "[px3=\"\"]",
130
+ "[px4=\"\"]",
131
+ "[px=\"\"]",
132
+ "[py-2=\"\"]",
133
+ "[py0=\"\"]",
134
+ "[py2=\"\"]",
135
+ "[p~=\"l-1\"]",
136
+ "[p~=\"r-2\"]",
137
+ "[p~=\"t-0.5\"]",
138
+ "[p~=\"x-4\"]",
139
+ "[p~=\"y-2\"]",
140
+ "[relative=\"\"]",
141
+ "[resize=\"\"]",
142
+ "[right--2=\"\"]",
143
+ "[right-0.5=\"\"]",
144
+ "[right-0=\"\"]",
145
+ "[right-1=\"\"]",
146
+ "[right-5=\"\"]",
147
+ "[rounded-full=\"\"]",
148
+ "[rounded=\"\"]",
149
+ "[scale~=\"0.5\"]",
150
+ "[scale~=\"1\"]",
151
+ "[select-none=\"\"]",
152
+ "[shadow=\"\"]",
153
+ "[shadow~=\"$event\"]",
154
+ "[shadow~=\"~\"]",
155
+ "[slidev-glass-effect=\"\"]",
156
+ "[start~=\"1\"]",
157
+ "[stroke-width~=\"1\"]",
158
+ "[stroke-width~=\"2\"]",
159
+ "[stroke-width~=\"20\"]",
160
+ "[stroke-width~=\"3\"]",
161
+ "[stroke~=\"transparent\"]",
162
+ "[table-cell=\"\"]",
163
+ "[table-row=\"\"]",
164
+ "[table=\"\"]",
165
+ "[text-cyan:75=\"\"]",
166
+ "[text-main=\"\"]",
167
+ "[text-primary=\"\"]",
168
+ "[text-right=\"\"]",
169
+ "[text-sm=\"\"]",
170
+ "[text-xs=\"\"]",
171
+ "[text~=\"sm\"]",
172
+ "[top-0.5=\"\"]",
173
+ "[top-0=\"\"]",
174
+ "[vertical-middle=\"\"]",
175
+ "[visible=\"\"]",
176
+ "[w-1.5=\"\"]",
177
+ "[w-1px=\"\"]",
178
+ "[w-20=\"\"]",
179
+ "[w-2=\"\"]",
180
+ "[w-30=\"\"]",
181
+ "[w-5=\"\"]",
182
+ "[w-60=\"\"]",
183
+ "[w-90=\"\"]",
184
+ "[w-full=\"\"]",
185
+ "[w1=\"\"]",
186
+ "[ws-nowrap=\"\"]",
187
+ "[z-10=\"\"]",
188
+ "[z-1=\"\"]",
189
+ "[z-label=\"\"]",
190
+ "absolute",
191
+ "align-middle",
192
+ "align-top",
193
+ "animate-duration-100",
194
+ "animate-fade-in",
195
+ "animate-pulse",
196
+ "aspect-initial",
197
+ "aspect-ratio-initial",
198
+ "auto-rows-fr",
199
+ "b",
200
+ "b-dark",
201
+ "b-dashed",
202
+ "backdrop-blur-5px",
203
+ "bg-active",
204
+ "bg-black",
205
+ "bg-blue-400",
206
+ "bg-current",
207
+ "bg-cyan:10",
208
+ "bg-gray",
209
+ "bg-gray-400",
210
+ "bg-gray/10",
211
+ "bg-gray/20",
212
+ "bg-gray/5",
213
+ "bg-gray:10",
214
+ "bg-gray:4",
215
+ "bg-gray:5",
216
+ "bg-main",
217
+ "bg-opacity-10",
218
+ "bg-opacity-30",
219
+ "bg-opacity-50",
220
+ "bg-orange/10",
221
+ "bg-primary",
222
+ "bg-transparent",
223
+ "block",
224
+ "border",
225
+ "border-2",
226
+ "border-b",
227
+ "border-b-2",
228
+ "border-blue-600",
229
+ "border-current",
230
+ "border-dashed",
231
+ "border-gray",
232
+ "border-gray-300/50",
233
+ "border-gray-400",
234
+ "border-l",
235
+ "border-main",
236
+ "border-opacity-20",
237
+ "border-orange",
238
+ "border-primary",
239
+ "border-r",
240
+ "border-r-2",
241
+ "border-t",
242
+ "border-transparent",
243
+ "border-white",
244
+ "bottom-0",
245
+ "bottom-1",
246
+ "bottom-10",
247
+ "bottom-5",
248
+ "break-after-page",
249
+ "break-all",
250
+ "break-inside-avoid-page",
251
+ "caret-black",
252
+ "children:my-auto",
253
+ "container",
254
+ "cursor-default",
255
+ "cursor-pointer",
256
+ "cursor-text",
257
+ "dark:b-gray-400",
258
+ "dark:bg-gray-800",
259
+ "dark:border",
260
+ "dark:border-gray-500",
261
+ "dark:border-true-gray-700",
262
+ "dark:caret-white",
263
+ "dark:stroke-black",
264
+ "dark:text-gray-200",
265
+ "dark:text-green",
266
+ "dark:text-red-500",
267
+ "duration-150",
268
+ "duration-200",
269
+ "duration-300",
270
+ "duration-400",
271
+ "duration-500",
272
+ "ease-in",
273
+ "ease-out",
274
+ "filter",
275
+ "fixed",
276
+ "flex",
277
+ "flex-1",
278
+ "flex-auto",
279
+ "flex-col",
280
+ "flex-grow",
281
+ "flex-none",
282
+ "flex-nowrap",
283
+ "flex-wrap",
284
+ "flex-wrap-reverse",
285
+ "focus-visible:opacity-100",
286
+ "focus-within:opacity-100",
287
+ "focus:outline-none",
288
+ "font-$slidev-code-font-family",
289
+ "font-500",
290
+ "font-bold",
291
+ "font-light",
292
+ "font-mono",
293
+ "gap-0.2",
294
+ "gap-0.5",
295
+ "gap-1",
296
+ "gap-2",
297
+ "gap-3",
298
+ "gap-4",
299
+ "gap-5",
300
+ "gap-x-8",
301
+ "gap-y-4",
302
+ "grid",
303
+ "grid-cols-2",
304
+ "grid-cols-[1fr_max-content]",
305
+ "grid-cols-[35px_1fr]",
306
+ "grid-rows-[1fr_max-content]",
307
+ "grid-rows-[1fr_min-content]",
308
+ "grid-rows-[auto_max-content]",
309
+ "grid-rows-[max-content_1fr]",
310
+ "group-hover:hidden",
311
+ "group-hover:op100",
312
+ "group-hover:op80",
313
+ "group-hover:opacity-20",
314
+ "group-not-hover:hidden",
315
+ "h-0.7",
316
+ "h-1.5",
317
+ "h-10px",
318
+ "h-1px",
319
+ "h-2",
320
+ "h-22px",
321
+ "h-3.5",
322
+ "h-30",
323
+ "h-3px",
324
+ "h-40",
325
+ "h-40px",
326
+ "h-5",
327
+ "h-6",
328
+ "h-8",
329
+ "h-9",
330
+ "h-[40px]",
331
+ "h-[calc(var(--vh,1vh)*100)]",
332
+ "h-full",
333
+ "h-max",
334
+ "h-screen",
335
+ "h1",
336
+ "h2",
337
+ "h5",
338
+ "hidden",
339
+ "hover:!opacity-100",
340
+ "hover:bg-active",
341
+ "hover:bg-gray-400",
342
+ "hover:bg-gray/20",
343
+ "hover:bg-opacity-10",
344
+ "hover:border-primary",
345
+ "hover:border-solid",
346
+ "hover:op-100",
347
+ "hover:op100",
348
+ "hover:opacity-10",
349
+ "hover:opacity-100",
350
+ "hover:opacity-90",
351
+ "hover:text-primary",
352
+ "important-text-op-50",
353
+ "important:[&_*]:select-none",
354
+ "important:op0",
355
+ "inline",
356
+ "inline-block",
357
+ "inline-flex",
358
+ "inset-0",
359
+ "inset-0.5",
360
+ "inset-y-2",
361
+ "italic",
362
+ "items-center",
363
+ "items-end",
364
+ "justify-center",
365
+ "justify-items-start",
366
+ "leading-1.6em",
367
+ "leading-1em",
368
+ "leading-2",
369
+ "leading-5",
370
+ "leading-[.8rem]",
371
+ "left-0",
372
+ "left-1",
373
+ "left-1/2",
374
+ "left-110%",
375
+ "left-3",
376
+ "lg:m-2",
377
+ "lg:p-2",
378
+ "lg:p-4",
379
+ "list-disc",
380
+ "lt-md:flex-col",
381
+ "lt-md:hidden",
382
+ "m-1",
383
+ "m-4",
384
+ "m-auto",
385
+ "m0",
386
+ "ma",
387
+ "max-h-full",
388
+ "max-w-100",
389
+ "max-w-150",
390
+ "max-w-250",
391
+ "max-w-300",
392
+ "max-w-90",
393
+ "max-w-full",
394
+ "max-w-xs",
395
+ "mb--.5",
396
+ "mb-10",
397
+ "mb-2",
398
+ "mb-4",
399
+ "mb-8",
400
+ "mb2",
401
+ "md:flex-col",
402
+ "md:flex-nowrap",
403
+ "md:flex-row",
404
+ "md:gap-8",
405
+ "md:my-4",
406
+ "md:of-y-auto",
407
+ "min-h-50",
408
+ "min-h-full",
409
+ "min-w-16",
410
+ "min-w-30",
411
+ "min-w-40",
412
+ "min-w-90",
413
+ "min-w-fit",
414
+ "min-w-full",
415
+ "min-w-max",
416
+ "ml--4",
417
+ "ml-1",
418
+ "mr--3",
419
+ "mr--8",
420
+ "mr-1",
421
+ "mr-2",
422
+ "mr-4",
423
+ "mr1",
424
+ "mt-0.5",
425
+ "mt-1",
426
+ "mt-2",
427
+ "mt-3",
428
+ "mt1",
429
+ "mx--1.2",
430
+ "mx-auto",
431
+ "my-1",
432
+ "my-10px",
433
+ "my-4",
434
+ "my-auto",
435
+ "my1",
436
+ "my2",
437
+ "my4",
438
+ "my5",
439
+ "mya",
440
+ "object-contain",
441
+ "object-cover",
442
+ "of-auto",
443
+ "of-hidden",
444
+ "of-x-visible",
445
+ "of-y-auto",
446
+ "op-40",
447
+ "op-60",
448
+ "op-70",
449
+ "op-80",
450
+ "op0",
451
+ "op100",
452
+ "op15",
453
+ "op20",
454
+ "op25",
455
+ "op30",
456
+ "op35",
457
+ "op40",
458
+ "op50",
459
+ "op75",
460
+ "op80",
461
+ "opacity-0",
462
+ "opacity-10",
463
+ "opacity-25",
464
+ "opacity-40",
465
+ "opacity-5",
466
+ "opacity-50",
467
+ "opacity-80",
468
+ "origin-tl",
469
+ "outline",
470
+ "outline-none",
471
+ "overflow-auto",
472
+ "overflow-hidden",
473
+ "overflow-visible",
474
+ "overflow-x-hidden",
475
+ "overflow-y-auto",
476
+ "overflow-y-hidden",
477
+ "p-1",
478
+ "p-16",
479
+ "p-2",
480
+ "p-6",
481
+ "p0.5",
482
+ "p1",
483
+ "p2",
484
+ "p3",
485
+ "p4",
486
+ "pa-3",
487
+ "pb-2",
488
+ "pb2",
489
+ "pie",
490
+ "pl-0",
491
+ "pl-4",
492
+ "pl1",
493
+ "pl2",
494
+ "place-content-center",
495
+ "pointer-events-none",
496
+ "pr-12",
497
+ "pr-3",
498
+ "pr-4",
499
+ "print-container",
500
+ "print:block",
501
+ "print:hidden",
502
+ "print:inset-0",
503
+ "print:min-h-max",
504
+ "print:position-unset",
505
+ "prose",
506
+ "pt-.5",
507
+ "pt-1",
508
+ "pt-15%",
509
+ "pt-2",
510
+ "pt-4",
511
+ "pt5",
512
+ "px",
513
+ "px-1.5",
514
+ "px-2",
515
+ "px-3",
516
+ "px-4",
517
+ "px-5",
518
+ "px-6",
519
+ "px1",
520
+ "px2",
521
+ "px3",
522
+ "px4",
523
+ "py-1",
524
+ "py-10",
525
+ "py-2",
526
+ "py-20",
527
+ "py-3",
528
+ "py-4",
529
+ "py0",
530
+ "py0.5",
531
+ "py1",
532
+ "py1.5",
533
+ "py2",
534
+ "py3",
535
+ "relative",
536
+ "resize",
537
+ "resize-none",
538
+ "right--2",
539
+ "right-0",
540
+ "right-0.5",
541
+ "right-1",
542
+ "right-3",
543
+ "right-4",
544
+ "right-5",
545
+ "rounded",
546
+ "rounded-1/2",
547
+ "rounded-b",
548
+ "rounded-full",
549
+ "rounded-l",
550
+ "rounded-lb",
551
+ "rounded-lg",
552
+ "rounded-md",
553
+ "rounded-r",
554
+ "rounded-tl",
555
+ "scale-102",
556
+ "scale-85",
557
+ "scale-x-80",
558
+ "select-none",
559
+ "select-text",
560
+ "shadow",
561
+ "shadow-xl",
562
+ "slidev-glass-effect",
563
+ "sr-only",
564
+ "stroke-white",
565
+ "tab",
566
+ "table",
567
+ "table-cell",
568
+ "table-row",
569
+ "tabular-nums",
570
+ "text-$slidev-controls-foreground",
571
+ "text-1.2em",
572
+ "text-11px",
573
+ "text-2xl",
574
+ "text-3em",
575
+ "text-3xl",
576
+ "text-4xl",
577
+ "text-9xl",
578
+ "text-base",
579
+ "text-blue-500",
580
+ "text-center",
581
+ "text-current",
582
+ "text-cyan:75",
583
+ "text-gray-400",
584
+ "text-gray-500",
585
+ "text-green",
586
+ "text-green-500",
587
+ "text-green6",
588
+ "text-lg",
589
+ "text-main",
590
+ "text-nowrap",
591
+ "text-opacity-50!",
592
+ "text-opacity-85",
593
+ "text-orange-500",
594
+ "text-orange/100",
595
+ "text-primary",
596
+ "text-red-400",
597
+ "text-red-500",
598
+ "text-red-700",
599
+ "text-right",
600
+ "text-sm",
601
+ "text-teal-700",
602
+ "text-transparent",
603
+ "text-white",
604
+ "text-wrap",
605
+ "text-xl",
606
+ "text-xs",
607
+ "top-0",
608
+ "top-0.5",
609
+ "top-1",
610
+ "top-1/2",
611
+ "top-10",
612
+ "top-4",
613
+ "top-5",
614
+ "top-50%",
615
+ "touch-none",
616
+ "tracking-widest",
617
+ "transform",
618
+ "transition",
619
+ "transition-all",
620
+ "transition-opacity",
621
+ "translate-0",
622
+ "translate-y--50%",
623
+ "underline",
624
+ "uppercase",
625
+ "view-transition-name",
626
+ "visible",
627
+ "w-0",
628
+ "w-1.5",
629
+ "w-10px",
630
+ "w-13",
631
+ "w-1px",
632
+ "w-2",
633
+ "w-20",
634
+ "w-200",
635
+ "w-22px",
636
+ "w-250",
637
+ "w-3.5",
638
+ "w-30",
639
+ "w-5",
640
+ "w-6",
641
+ "w-60",
642
+ "w-7",
643
+ "w-8",
644
+ "w-9",
645
+ "w-90",
646
+ "w-[40px]",
647
+ "w-full",
648
+ "w-screen",
649
+ "w1",
650
+ "whitespace-nowrap",
651
+ "ws-nowrap",
652
+ "z-1",
653
+ "z-10",
654
+ "z-camera",
655
+ "z-context-menu",
656
+ "z-dragging",
657
+ "z-label",
658
+ "z-menu",
659
+ "z-modal",
660
+ "z-nav"
661
+ ]
@@ -9,6 +9,7 @@ import { useNav } from '../composables/useNav'
9
9
  import { CLICKS_MAX } from '../constants'
10
10
  import { useSlideContext } from '../context'
11
11
  import { configs } from '../env'
12
+ import TitleIcon from '../internals/TitleIcon.vue'
12
13
  import { makeId, updateCodeHighlightRange } from '../logic/utils'
13
14
 
14
15
  const props = defineProps({
@@ -28,6 +29,10 @@ const props = defineProps({
28
29
  type: Boolean,
29
30
  default: configs.lineNumbers,
30
31
  },
32
+ title: {
33
+ type: String,
34
+ default: '',
35
+ },
31
36
  })
32
37
 
33
38
  const steps = JSON.parse(lz.decompressFromBase64(props.stepsLz)) as KeyedTokensInfo[]
@@ -112,6 +117,12 @@ onMounted(() => {
112
117
 
113
118
  <template>
114
119
  <div ref="container" class="slidev-code-wrapper slidev-code-magic-move relative">
120
+ <div v-if="title" class="slidev-code-block-title">
121
+ <TitleIcon :title="title" />
122
+ <div class="leading-1em">
123
+ {{ title.replace(/~([^~]+)~/g, '').trim() }}
124
+ </div>
125
+ </div>
115
126
  <ShikiMagicMovePrecompiled
116
127
  class="slidev-code relative shiki overflow-visible"
117
128
  :steps="steps"
@@ -15,6 +15,10 @@ export function normalizeSingleAtValue(at: RawSingleAtValue): NormalizedSingleCl
15
15
  console.error(`Invalid "at" prop value: ${at}`)
16
16
  return null
17
17
  }
18
+ if (v <= 0) {
19
+ console.warn(`[Slidev] "at" prop value must be greater than 0, but got ${at}, has been set to 1`)
20
+ return 1
21
+ }
18
22
  return v
19
23
  }
20
24
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@slidev/client",
3
3
  "type": "module",
4
- "version": "51.8.0",
4
+ "version": "51.8.2",
5
5
  "description": "Presentation slides for developers",
6
6
  "author": "Anthony Fu <anthonyfu117@hotmail.com>",
7
7
  "license": "MIT",
@@ -29,18 +29,18 @@
29
29
  },
30
30
  "dependencies": {
31
31
  "@antfu/utils": "^9.2.0",
32
- "@iconify-json/carbon": "^1.2.8",
32
+ "@iconify-json/carbon": "^1.2.9",
33
33
  "@iconify-json/ph": "^1.2.2",
34
34
  "@iconify-json/svg-spinners": "^1.2.2",
35
- "@shikijs/engine-javascript": "^3.4.2",
36
- "@shikijs/monaco": "^3.4.2",
37
- "@shikijs/vitepress-twoslash": "^3.4.2",
35
+ "@shikijs/engine-javascript": "^3.6.0",
36
+ "@shikijs/monaco": "^3.6.0",
37
+ "@shikijs/vitepress-twoslash": "^3.6.0",
38
38
  "@slidev/rough-notation": "^0.1.0",
39
39
  "@typescript/ata": "^0.9.8",
40
40
  "@unhead/vue": "^2.0.10",
41
- "@unocss/reset": "^66.1.2",
42
- "@vueuse/core": "^13.2.0",
43
- "@vueuse/math": "^13.2.0",
41
+ "@unocss/reset": "^66.2.0",
42
+ "@vueuse/core": "^13.3.0",
43
+ "@vueuse/math": "^13.3.0",
44
44
  "@vueuse/motion": "^3.0.3",
45
45
  "drauu": "^0.4.3",
46
46
  "file-saver": "^2.0.5",
@@ -54,15 +54,15 @@
54
54
  "pptxgenjs": "^4.0.0",
55
55
  "prettier": "^3.5.3",
56
56
  "recordrtc": "^5.6.2",
57
- "shiki": "^3.4.2",
57
+ "shiki": "^3.6.0",
58
58
  "shiki-magic-move": "^1.1.0",
59
59
  "typescript": "^5.8.3",
60
- "unocss": "^66.1.2",
61
- "vue": "^3.5.14",
60
+ "unocss": "^66.2.0",
61
+ "vue": "^3.5.16",
62
62
  "vue-router": "^4.5.1",
63
63
  "yaml": "^2.8.0",
64
- "@slidev/parser": "51.8.0",
65
- "@slidev/types": "51.8.0"
64
+ "@slidev/types": "51.8.2",
65
+ "@slidev/parser": "51.8.2"
66
66
  },
67
67
  "devDependencies": {
68
68
  "vite": "^6.3.5"
@@ -2,7 +2,7 @@
2
2
  import { useHead } from '@unhead/vue'
3
3
  import { useLocalStorage, useMouse, useWindowFocus } from '@vueuse/core'
4
4
  import { computed, onMounted, reactive, ref, shallowRef, watch } from 'vue'
5
- import { createFixedClicks } from '../composables/useClicks'
5
+ import { createClicksContextBase } from '../composables/useClicks'
6
6
  import { useDrawings } from '../composables/useDrawings'
7
7
  import { useNav } from '../composables/useNav'
8
8
  import { useSwipeControls } from '../composables/useSwipeControls'
@@ -57,7 +57,7 @@ const { timer, isTimerActive, resetTimer, toggleTimer } = useTimer()
57
57
  const clicksCtxMap = computed(() => slides.value.map((route) => {
58
58
  const clicks = ref(0)
59
59
  return {
60
- context: createFixedClicks(route, clicks),
60
+ context: createClicksContextBase(clicks, route?.meta.slide?.frontmatter.clicksStart ?? 0, route?.meta.clicks),
61
61
  clicks,
62
62
  }
63
63
  }))
@@ -0,0 +1,38 @@
1
+ import fs from 'node:fs/promises'
2
+ import { fileURLToPath } from 'node:url'
3
+ import { createGenerator } from '@unocss/core'
4
+ import fg from 'fast-glob'
5
+ import config from '../uno.config'
6
+
7
+ const uno = await createGenerator(config)
8
+
9
+ const files = await fg(
10
+ '**/*.vue',
11
+ {
12
+ cwd: fileURLToPath(new URL('..', import.meta.url)),
13
+ ignore: ['**/*.generated/**', '**/node_modules/**'],
14
+ absolute: true,
15
+ },
16
+ )
17
+
18
+ const tokens = new Set<string>()
19
+ for (const file of files) {
20
+ const content = await fs.readFile(file, 'utf-8')
21
+ await uno.applyExtractors(
22
+ content,
23
+ file,
24
+ tokens,
25
+ )
26
+ }
27
+
28
+ const result = await uno.generate(tokens)
29
+
30
+ await fs.writeFile(
31
+ fileURLToPath(new URL('../.generated/unocss-tokens.ts', import.meta.url)),
32
+ [
33
+ '/* eslint-disable eslint-comments/no-unlimited-disable */',
34
+ '/* eslint-disable */',
35
+ `export default ${JSON.stringify(Array.from(result.matched).sort(), null, 2)}`,
36
+ ].join('\n'),
37
+ 'utf-8',
38
+ )