Builtin Library
README.md
docs
The editor's Docs panel: an index of every guide asset the engine can
reach, grouped by its identity segment and narrowed by a filter box, beside
the open guide rendered as markdown.
The index follows the guides the VFS holds. A guide written, copied, removed,
renamed or moved anywhere under /zero/source/ (the world's own guides, its
packages' and its libraries'), on its own or inside a folder that holds it, is
listed as it stands on the panel's next build, with no reopen or reload. The
open guide shows its current text, stays open through a move, and gives way to
the index when it is removed.
Links
A [text](target) in a guide is a link. Clicking it, or pressing Enter or
Space once Tab has brought the keyboard focus to it, goes where it points:
- another guide, by any spelling
opentakes ([Bindings](controlsKit.bindings)); - a heading, by its anchor:
#anchorin the same guide,guide#anchorin another ([Slots](save-kit#save-slots)). A heading's anchor is its text in lower case, with punctuation removed and spaces turned into-; - a file or an asset, by its VFS path, a path relative to the guide's own
folder (
[the module](../saveKit.module)), or its name, identity or guid, which opens in a tab of its own; - a web address (
https://...), which is copied to the clipboard for a browser.
A link that names nothing, or a heading the guide does not hold, puts a note above the guide saying so.
Exports
The panel record carries open(nameOrIdentity), invalidate(),
renderMarkdown(md, opts?) and followLink(target, from?). invalidate drops the index so the next build reads the
registry again; the panel does that itself on every guide change. open takes
any spelling guides.read opens a guide by: the name the index shows, the
guide's asset identity (controlsKit.my-guide), the path guides.list lists
it under (controlsKit.package/my-guide), its guid, the VFS path of its
folder, or a shorter spelling that names one guide. renderMarkdown is the
same markdown-to-widgets rendering the panel shows a guide with, for another
panel that shows prose (the World panel's body, a markdown file's preview);
its links are live, a relative path and a #anchor read against opts.from
alone, and a link that ends in a note brings the Docs panel forward to show
it. followLink
follows a link the way a click does and answers what it reached ("guide",
"heading", "file", "web", or nil with the note saying why).