@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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@berlysia/vertical-writing-slide-system",
3
- "version": "0.0.20",
3
+ "version": "0.0.22",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "vertical-slides": "./cli.js"
package/src/index.css CHANGED
@@ -40,7 +40,7 @@ code {
40
40
  .wrapper {
41
41
  width: 100%;
42
42
  height: 100%;
43
- padding: 1.2rem 1.2rem;
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.4rem;
63
+ font-size: 1.4em;
64
64
  font-weight: bold;
65
65
  margin: 0;
66
- margin-block-end: 0.2rem;
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: 1rem;
72
+ margin-block-end: 1em;
73
73
  }
74
74
  ul ul,
75
75
  ol ol {
76
- margin-block-end: 1rem;
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.5rem;
84
+ margin-block-end: 0.5em;
85
85
  }
86
86
 
87
87
  .wm-toggle {
package/src/screen.css CHANGED
@@ -86,7 +86,7 @@ body,
86
86
  bottom: 16px;
87
87
  background-color: rgba(255, 255, 255, 0.9);
88
88
  opacity: 0;
89
- padding: 1rem;
89
+ padding: 16px;
90
90
  border-radius: 8px;
91
91
  transition: opacity 0.2s ease-out;
92
92
  }
@@ -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
- // Convert to absolute path for comparison
540
- const absolutePath = path.resolve(resolvedConfig.root, filePath);
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
- const absolutePath = path.resolve(resolvedConfig.root, filePath);
558
- const absoluteSlidesDir = path.resolve(
559
- resolvedConfig.root,
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
- const absolutePath = path.resolve(resolvedConfig.root, filePath);
575
- const absoluteSlidesDir = path.resolve(
576
- resolvedConfig.root,
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) &&