slidemind 0.2.3 → 0.3.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.
@@ -27,8 +27,19 @@ const LAUNCH_ARGS = [
27
27
  "--no-default-browser-check",
28
28
  ];
29
29
 
30
- /** True when the materialized bundle carries a capture engine to run locally. */
30
+ /**
31
+ * True when the materialized bundle carries a capture engine to run locally.
32
+ *
33
+ * `SLIDEMIND_FORCE_SERVER_RENDER=1` forces the server-render fallback even
34
+ * when the bundle has one. Escape hatch for the case where the two paths
35
+ * disagree: capture runs client-side and its output crosses a JSON wire to
36
+ * `/translate`, so an engine bug can lose data that the in-process server
37
+ * render keeps (this is how the base64 background-image fix was isolated —
38
+ * same deck, same asset, images only on the server path). It costs the
39
+ * pane-free speed win, so it is a diagnostic, not a default.
40
+ */
31
41
  export function bundleHasCaptureEngine(bundleDir) {
42
+ if (process.env.SLIDEMIND_FORCE_SERVER_RENDER === "1") return false;
32
43
  if (!bundleDir) return false;
33
44
  return fs.existsSync(path.join(bundleDir, "capture-engine.mjs"));
34
45
  }