Repository navigation
v0.13.0
The @markii/* packages and the VS Code extension ship this release as
0.13.0, the Obsidian plugin as 0.10.0.
Added
-
@markii/lua: ajsontable for scripts.json.decode(text)parses
JSON into ordinary Lua data, andjson.encode(value)converts a Lua value
back into JSON text. Both are present on every trigger tier and need no
capability grant, because neither does any I/O. They reuse the decoder and
the marshal walk the runtime already has rather than adding a second copy
of either, sojson.decodeis bound by the same size, depth, and
node-count budgetnet.fetch_jsonapplies, andjson.encoderejects a
cycle, a function, a non-string table key, or a non-finite number exactly
as a script's own return value is rejected. -
@markii/bundle:createMemoryBundleStorage(files). A third
BundleStorageform beside the zip and directory forms, backed by a plain
map of bundle-relative paths to strings or bytes. It routes every path
through the package's own jail and is exported from the browser-safe main
entry, so a host that already holds a bundle's files as values does not
need Node to use them. -
@markii/reactand@markii/html: aresolveImageSrcrender option.
renderMarkandrenderMarkNode, andrenderMarkToHtmland
renderMarkNodeToHtml, accept an optional function that turns a relative
<img src>into a URL the host can load. It covers both an ordinary
markdown image and a component that builds its own<img>, such as the
standard figure, and it is never asked about a source that already carries
a scheme. A resolver that returns nothing, or throws, leaves the source as
written. Ajavascript:orvbscript:result is refused, judged the way a
browser parses a URL rather than by the raw text, so a disguised scheme
cannot slip through.
Changed
- Both hosts resolve a note's images during the render instead of after
it. The VS Code preview and Obsidian's preview and Reading view pass
resolveImageSrcand no longer sweep the mounted DOM rewriting<img>
elements once React has finished. The images resolve the same way they did,
including Obsidian's report of a source that names nothing in the vault, but
the page no longer briefly requests the unresolved URL first.
Fixed
- Host-compiled packs no longer leave a
__markiiJSXglobal behind. The
pack builder passed its JSX shim through esbuild'sbanneroption, which
writes text outside theformat: 'iife'wrapper, so every pack the VS Code
extension compiled from source, and both hosts' bundledread,dash, and
preppacks, leaked that global. The shim is now an injected module inside
the wrapper. This also fixes a component that renders through a helper
module: because a banner cannot put the shim in scope of a non-entry
module, JSX in such a helper failed at render time. Packs rebuild once on
upgrade. @markii/bundle: the bundle write grant is spelledwrite:.cache/.
The writable directory is documented everywhere as.cache/, but the write
jail accepted only the undottedcache/prefix, sobundle.write(".cache/x")
was denied even with the grant while a write tocache/xlanded outside the
documented directory. The jail, the grant token, and the manifest grammar
now all use.cache/. Breaking for bundles: a manifest declaring the
retiredwrite:cache/no longer parses, and reports a diagnostic naming the
correct token instead of being silently accepted.
Install
The renderer pulls the rest in as dependencies:
npm install @markii/react@0.13.0
All eight packages, if you want them explicitly:
npm install @markii/core@0.13.0
npm install @markii/stdlib@0.13.0
npm install @markii/bundle@0.13.0
npm install @markii/pack@0.13.0
npm install @markii/runtime@0.13.0
npm install @markii/lua@0.13.0
npm install @markii/react@0.13.0
npm install @markii/html@0.13.0
Downloads
The attached tarballs are the packed npm packages. The names are
stable across releases, so the latest of each is always at a fixed URL:
https://github.com/markii-org/markii/releases/latest/download/markii-core.tgz
https://github.com/markii-org/markii/releases/latest/download/markii-stdlib.tgz
https://github.com/markii-org/markii/releases/latest/download/markii-bundle.tgz
https://github.com/markii-org/markii/releases/latest/download/markii-pack.tgz
https://github.com/markii-org/markii/releases/latest/download/markii-runtime.tgz
https://github.com/markii-org/markii/releases/latest/download/markii-lua.tgz
https://github.com/markii-org/markii/releases/latest/download/markii-react.tgz
https://github.com/markii-org/markii/releases/latest/download/markii-html.tgz