/** * Lazy chunk loader for the client bundle. The heavy preview libraries * (CodeMirror's editor stack, mermaid — several MB) live in separate * build-time bundles (`lib/client-.js`) fetched only on first use of * the feature that needs them, so startup downloads/parses only the ~1MB * core bundle. (The office stack — Univer / docx-preview / * pptx-renderer — is no longer bundled here: Office previews moved to the * recommended office plugin, see plugins-viewers.ts.) * * How a chunk script works (see tsdown.config.ts chunkBundle): * * globalThis.__dshChunks__ = globalThis.__dshChunks__ || {}; * globalThis.__dshChunks__["editor"] = (require) => { ...exports }; * * The script registers its factory on a plugin-owned global registry (NOT * through window.__ModuleLoader__.load — the module loader's import() only * resolves seed words, shell-own modules, registered factories, and boot * graph rows; a chunk id is none of those, so resolution would be version- * dependent). Materialization is plugin-owned: * * 1. inject