Skip to content
QuireKit MSFE
Developer docs
v0.0.0 · Experimental
API referenceView Markdown ↗

Source and component API

Look up syntax readers, field updates, and the guarded actions available to components.

Field codec

read derives fields from confirmed syntax ranges, while patch encodes precise source edits. You can install semantics without supplying a view.

@quirekit/msfe-core

Parser-neutral semantic codec; rendering is optional and never owns persistence.

SourceDefinitionts

Documents and syntax ranges

Ranges use UTF-16 offsets with an exclusive end. Syntax access is a derived query, not a second persistent document.

@quirekit/msfe-core

Read-only accepted document access independent of the parser and view implementation.

SourceDocumentts
@quirekit/msfe-core

Lazy parser-neutral syntax access; no duplicated persistent AST is allocated.

SourceNodets

Node components

attrs are derived from source. Use the supplied guarded actions to update fields, delete nodes, or reveal source. Previously held props may become stale after document changes.

@quirekit/msfe-core

Source-derived component inputs; actions validate this snapshot before changing source.

MsfeNodeViewPropsts

Definitions and parse demand

DefineSource separates reading, writing, fingerprints and resource acquisition. Resources do not replace persistent fields. See the node tutorial.

@quirekit/msfe-core

@param definition - Typed source contract. @returns Installable source definition.

defineSourcets

When semantic queries are pending, request parse demand and retry after accepted-state changes. This does not synchronously scan the whole file.

@quirekit/msfe-core

@param state - Incomplete accepted snapshot. Records demand without synchronously advancing the parser.

requestMarkdownParsets

Query results

editor.querySource(name, range?) returns status and matches containing name, extension kind, attributes, range and SourceNode; read node.kind for the actual syntax name. Use UTF-16 logical coordinates. The default queries current selections, not every node in the file.

decodeMarkdownString, decodeMarkdownDestination and encodeMarkdownField serve distinct Markdown fields. Encode only changed fields instead of normalizing the entire file. See Command API for positions and captured intent.

MSFE · QuireKitYour Markdown source stays yours.