living-documentation 3.3.0 → 3.5.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.
package/dist/bin/cli.js CHANGED
@@ -10,12 +10,12 @@ const fs_1 = __importDefault(require("fs"));
10
10
  const server_1 = require("../src/server");
11
11
  const program = new commander_1.Command();
12
12
  program
13
- .name('living-documentation')
14
- .description('Serve a local Markdown documentation viewer')
15
- .version('1.0.0')
16
- .argument('[folder]', 'Path to documentation folder', '.')
17
- .option('-p, --port <number>', 'Port to listen on', '4321')
18
- .option('-o, --open', 'Open browser automatically')
13
+ .name("living-documentation")
14
+ .description("Serve a local Markdown documentation viewer")
15
+ .version("1.0.0")
16
+ .argument("[folder]", "Path to documentation folder", ".")
17
+ .option("-p, --port <number>", "Port to listen on", "4321")
18
+ .option("-o, --open", "Open browser automatically")
19
19
  .action(async (folder, options) => {
20
20
  const docsPath = path_1.default.resolve(process.cwd(), folder);
21
21
  if (!fs_1.default.existsSync(docsPath)) {
@@ -29,7 +29,7 @@ program
29
29
  }
30
30
  const port = parseInt(options.port, 10);
31
31
  if (isNaN(port) || port < 1 || port > 65535) {
32
- console.error('\nError: Invalid port number\n');
32
+ console.error("\nError: Invalid port number\n");
33
33
  process.exit(1);
34
34
  }
35
35
  await (0, server_1.startServer)({ docsPath, port, openBrowser: options.open ?? false });
@@ -146,6 +146,14 @@
146
146
  </select>
147
147
  <p class="text-xs text-gray-400 dark:text-gray-500">Users can always override with the toggle button.</p>
148
148
  </div>
149
+ <div class="px-5 py-4">
150
+ <label class="flex items-center gap-3 cursor-pointer">
151
+ <input id="field-debug" name="showDiagramDebug" type="checkbox"
152
+ class="w-4 h-4 rounded border-gray-300 dark:border-gray-600 text-blue-600 focus:ring-blue-500" />
153
+ <span class="text-sm font-medium text-gray-700 dark:text-gray-300">Show debug button in diagram editor</span>
154
+ </label>
155
+ <p class="mt-1 text-xs text-gray-400 dark:text-gray-500 ml-7">Displays a Debug button that overlays raw position and size info on each node — useful for diagnosing snap-to-grid issues.</p>
156
+ </div>
149
157
  <div class="px-5 py-4 space-y-1.5">
150
158
  <label class="block text-sm font-medium text-gray-700 dark:text-gray-300" for="field-pattern">Filename Pattern</label>
151
159
  <input id="field-pattern" name="filenamePattern" type="text"
@@ -211,6 +219,7 @@
211
219
  document.getElementById("field-theme").value = cfg.theme || "system";
212
220
  document.getElementById("field-pattern").value =
213
221
  cfg.filenamePattern || "";
222
+ document.getElementById("field-debug").checked = !!cfg.showDiagramDebug;
214
223
  updatePreview(cfg.filenamePattern);
215
224
  initExtraFiles(cfg);
216
225
  } catch {
@@ -236,6 +245,7 @@
236
245
  title: document.getElementById("field-title").value.trim(),
237
246
  theme: document.getElementById("field-theme").value,
238
247
  filenamePattern,
248
+ showDiagramDebug: document.getElementById("field-debug").checked,
239
249
  };
240
250
 
241
251
  try {