Repository navigation
v0.14.0
The @markii/* packages and the VS Code extension ship this release as
0.14.0, the Obsidian plugin as 0.11.0.
Added
@markii/stdlib: an./editorsubpath. The pure editor helpers move
here from the private@markii/host, so a third-party editor host can
install the behavior the two reference hosts have. It holds directive
completion and hover (completionAt,hoverAt, the directive-context
scanner), the Insert Component skeleton builder and the standard-set
catalog, and container fence lengthening. The package still has zero
dependencies, so a host that only wants to complete the standard
components does not pull in pack loading, a bundler, or the script
runtime.@markii/hostre-exports all of it unchanged.@markii/stdlib/editor:CompletionContext.tokenStart. The offset
where a directive name begins, after the colon run, beside the existing
replaceStart. A completion widget that filters candidates against typed
text anchors ontokenStartand edits fromreplaceStart; both reference
hosts previously derived this value themselves.@markii/stdlib/editor:closesOpenContainerFence. Tells a host's
completion trigger that a bare colon run closes a container already open
above it rather than starting a new one, so accepting a suggestion cannot
insert a component into a closing fence.completionAtis unchanged and
still offers the catalog for a bare opener.@markii/stdlib:INTERACTIVE_ATTRIBUTEand the diagnostic envelope.
INTERACTIVE_ATTRIBUTE(data-mk-interactive) is the one spelling both
renderers, and packs, mark a genuinely interactive element with.
DiagnosticEvent,DiagnosticKind,OnDiagnosticandreportDiagnostic
are the neutral shape behind both renderers'onDiagnosticoption;
reportDiagnostickeeps a throwing host callback from breaking a render.@markii/core:isRecognizedTextDirective. The post-parse word-start
rule that decides whether a tokenized inline directive is kept or demoted
back to plain text, exported for an editor grammar that has to make the
same call. It is the demotion rule only: the colon-run and bracket rules
live in the upstream directive parser.@markii/core:ScriptBlock.permissions. An optional list of
hostnames a script fence declares through apermissionsattribute. It is
display only, never an input to what is granted, mirroring how a bundle
manifest'spermissions.netis already treated.@markii/reactand@markii/html:resolveHref. The link twin of
resolveImageSrc, applied to an ordinary markdown link'shref, sharing
the same dangerous-scheme refusal rather than a second copy of it.@markii/reactand@markii/html: whole-document rendering.
renderMarkNodeandrenderMarkNodeToHtmlnow accept theRootparse
returns as well as a single node, so a host does not loop over top-level
children itself.@markii/reactand@markii/html:renderMarkInlineand
renderMarkInlineToHtml. Renders source that is exactly one paragraph
holding one inline directive without the paragraph wrapper; any other
source falls back to the ordinary render unchanged.@markii/reactand@markii/html:onDiagnostic. Called once for
each quiet marker a render produces for a value it recognized and
declined, with the kind, directive, attribute, and the marker's own
wording, so a host can route it to its diagnostics surface. An unknown
attribute name never triggers it.@markii/reactand@markii/html:storeandvaulton the render
options. The same values the third and fourth positional arguments take,
available on the options object instead. The option wins when both forms
are given.@markii/reactand@markii/html: a quiet marker for a recognized and
declined value. A known attribute whose value is outside its closed set,
and a figure source refused as unsafe, still render, now carrying a
data-mk-noticeattribute and atitleexplaining why instead of
discarding the value in silence.@markii/reactand@markii/html:data-mk-interactiveon tabs'
buttons, a details summary, and the collapsed script marker's summary.
Changed
@markii/react:loadPackreturns{ registry, dropped? }instead
of a bareRegistry, andinstallPacks's success result carries
dropped: { name, engine }[]. A pack built for another renderer was
previously discarded with no record a caller could read. This is a
breaking change toloadPack's return type.@markii/lua: an ungranted capability denies instead of vanishing.
With no grants at all,netand its methods exist and record a denial
through the same non-spoofable channel a wrong-host call already used, so
the run's outcome is a capability failure rather than a Lua nil-index
error. Observable: a script that feature-detects withif net thennow
always sees a table.
Fixed
@markii/pack: a.mkpzipped as a folder says so. An archive whose
entries all sit under one top-level directory is reported by naming that
directory, instead of claiming there is nopack.jsonwhen there is one a
level down.__MACOSXentries are ignored when making that call.doc.css: analign=wrapper no longer collapses a block inside a
:::row. The automatic inline margin is cancelled for a row grid item
that carries nowidth=preset, so the item keeps its column instead of
shrinking to its content.doc.css: a host that renders into its own container keeps the derived
tokens. The Tier 2 derivations and the other rules that were scoped to
.doc(vertical rhythm, base typography, tables, code, task lists) now
also apply under[data-mk-root], which a host adds to its own container.
The table rule is the scroll container a wide table needs, so a non-.doc
host was losing that too.
VS Code extension (0.14.0)
- Directive completion no longer opens on a line that closes a container,
and the popup filters on the directive name rather than on the colon run. - Insert Component and completion insert no empty
{}for a component with
no required attributes, and put the cursor in the body of a container or
after the name of a leaf. - Add Pack Folder validates the folder before adding it, says what it found,
and writes the reason for anything skipped to the Markii output channel. - Completion, hover and Insert Component only offer components from packs
built for this renderer. - A render's quiet markers reach the Markii output channel, deduplicated,
instead of living only in a tooltip.
Obsidian plugin (0.11.0)
- The Markii Preview header action appears on a freshly created
.mk.md
note, without the view having to be split first. - The Markii Preview pane converts wikilinks and image embeds the way
Reading view does, so a note renders the same on both surfaces. - Directive completion no longer opens on a line that closes a container.
- Insert Component and completion offer only components from packs built for
this renderer. - A render's quiet markers reach the console, deduplicated, alongside the
plugin's other diagnostics.
Install
The renderer pulls the rest in as dependencies:
npm install @markii/react@0.14.0
All eight packages, if you want them explicitly:
npm install @markii/core@0.14.0
npm install @markii/stdlib@0.14.0
npm install @markii/bundle@0.14.0
npm install @markii/pack@0.14.0
npm install @markii/runtime@0.14.0
npm install @markii/lua@0.14.0
npm install @markii/react@0.14.0
npm install @markii/html@0.14.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