@berlysia/vertical-writing-slide-system 0.0.20 → 0.0.22
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/package.json +1 -1
- package/src/index.css +6 -6
- package/src/screen.css +1 -1
- package/src/vite-plugin-slides.ts +16 -16
package/package.json
CHANGED
package/src/index.css
CHANGED
|
@@ -40,7 +40,7 @@ code {
|
|
|
40
40
|
.wrapper {
|
|
41
41
|
width: 100%;
|
|
42
42
|
height: 100%;
|
|
43
|
-
padding:
|
|
43
|
+
padding: 2rem;
|
|
44
44
|
|
|
45
45
|
position: relative;
|
|
46
46
|
|
|
@@ -60,20 +60,20 @@ code {
|
|
|
60
60
|
}
|
|
61
61
|
|
|
62
62
|
h1 {
|
|
63
|
-
font-size: 1.
|
|
63
|
+
font-size: 1.4em;
|
|
64
64
|
font-weight: bold;
|
|
65
65
|
margin: 0;
|
|
66
|
-
margin-block-end: 0.
|
|
66
|
+
margin-block-end: 0.2em;
|
|
67
67
|
}
|
|
68
68
|
ul,
|
|
69
69
|
ol {
|
|
70
70
|
list-style-position: outside;
|
|
71
71
|
margin: 0;
|
|
72
|
-
margin-block-end:
|
|
72
|
+
margin-block-end: 1em;
|
|
73
73
|
}
|
|
74
74
|
ul ul,
|
|
75
75
|
ol ol {
|
|
76
|
-
margin-block-end:
|
|
76
|
+
margin-block-end: 1em;
|
|
77
77
|
}
|
|
78
78
|
ul ul ul,
|
|
79
79
|
ol ol ol {
|
|
@@ -81,7 +81,7 @@ code {
|
|
|
81
81
|
}
|
|
82
82
|
p {
|
|
83
83
|
margin: 0;
|
|
84
|
-
margin-block-end: 0.
|
|
84
|
+
margin-block-end: 0.5em;
|
|
85
85
|
}
|
|
86
86
|
|
|
87
87
|
.wm-toggle {
|
package/src/screen.css
CHANGED
|
@@ -534,14 +534,18 @@ export default async function slidesPlugin(
|
|
|
534
534
|
});
|
|
535
535
|
};
|
|
536
536
|
|
|
537
|
+
// Explicitly add external slides directory to watcher
|
|
538
|
+
const absoluteSlidesDir = path.resolve(config.slidesDir);
|
|
539
|
+
if (fs.existsSync(absoluteSlidesDir)) {
|
|
540
|
+
server.watcher.add(absoluteSlidesDir);
|
|
541
|
+
logger.info(`Added slides directory to watcher: ${absoluteSlidesDir}`);
|
|
542
|
+
}
|
|
543
|
+
|
|
537
544
|
// Use Vite's built-in watcher for better compatibility
|
|
538
545
|
server.watcher.on("change", (filePath: string) => {
|
|
539
|
-
//
|
|
540
|
-
const absolutePath = path.resolve(
|
|
541
|
-
const absoluteSlidesDir = path.resolve(
|
|
542
|
-
resolvedConfig.root,
|
|
543
|
-
config.slidesDir,
|
|
544
|
-
);
|
|
546
|
+
// filePath is already absolute when coming from watcher
|
|
547
|
+
const absolutePath = path.resolve(filePath);
|
|
548
|
+
const absoluteSlidesDir = path.resolve(config.slidesDir);
|
|
545
549
|
|
|
546
550
|
if (
|
|
547
551
|
absolutePath.includes(absoluteSlidesDir) &&
|
|
@@ -554,11 +558,9 @@ export default async function slidesPlugin(
|
|
|
554
558
|
|
|
555
559
|
// Also watch for new files
|
|
556
560
|
server.watcher.on("add", (filePath: string) => {
|
|
557
|
-
|
|
558
|
-
const
|
|
559
|
-
|
|
560
|
-
config.slidesDir,
|
|
561
|
-
);
|
|
561
|
+
// filePath is already absolute when coming from watcher
|
|
562
|
+
const absolutePath = path.resolve(filePath);
|
|
563
|
+
const absoluteSlidesDir = path.resolve(config.slidesDir);
|
|
562
564
|
|
|
563
565
|
if (
|
|
564
566
|
absolutePath.includes(absoluteSlidesDir) &&
|
|
@@ -571,11 +573,9 @@ export default async function slidesPlugin(
|
|
|
571
573
|
|
|
572
574
|
// Watch for deleted files
|
|
573
575
|
server.watcher.on("unlink", (filePath: string) => {
|
|
574
|
-
|
|
575
|
-
const
|
|
576
|
-
|
|
577
|
-
config.slidesDir,
|
|
578
|
-
);
|
|
576
|
+
// filePath is already absolute when coming from watcher
|
|
577
|
+
const absolutePath = path.resolve(filePath);
|
|
578
|
+
const absoluteSlidesDir = path.resolve(config.slidesDir);
|
|
579
579
|
|
|
580
580
|
if (
|
|
581
581
|
absolutePath.includes(absoluteSlidesDir) &&
|