ZDDC — Zero Day Document Control. A file-naming convention plus five single-file HTML tools (archive, transmittal, classifier, mdedit, landing) and an optional Go HTTP server (zddc-server) with ACL and a virtual archive index. Self-contained, offline-capable, dependency-free. See README.md for an overview, AGENTS.md and ARCHITECTURE.md for the build/release/architecture detail, bootstrap/README.md for the two-level deployment install pattern, and zddc/README.md for the HTTP server.
24 lines
651 B
JavaScript
24 lines
651 B
JavaScript
/**
|
|
* Global application state and constants
|
|
*/
|
|
|
|
// Set to true to enable verbose console logging for development.
|
|
const DEBUG = false;
|
|
|
|
// Check if File System Access API is available
|
|
const hasFileSystemAccess = 'showDirectoryPicker' in window;
|
|
|
|
// Directory and file handles
|
|
let directoryHandle = null;
|
|
let fileTree = {};
|
|
let currentFileHandle = null;
|
|
|
|
// Map to store editor instances for each file
|
|
// Key: file path, Value: { editor, container, tocContainer, etc. }
|
|
const editorInstances = new Map();
|
|
|
|
// Current TOC max depth (1-6)
|
|
let tocMaxDepth = 3;
|
|
|
|
// Scratchpad ID constant
|
|
const SCRATCHPAD_ID = '__scratchpad__';
|