Repository navigation
Releases: aicayzer/inkkit
Release list
Inkkit 0.3.0
Inkkit 0.3.0
More reliable continuation-line typing and list paste, with small appearance improvements.
Fixed
- Typing Markdown-looking markers at the start of a continuation line saves the literal text instead of refusing the edit. This includes headings, lists, quotes and code fences.
- Pasting HTML or Obsidian block comments into a tight list item preserves the complete content and its block structure, without changing authored list spacing.
- Dragging into the editor shows the drop position, including when re-entering at the same coordinates. Destroying the editor cancels the pending indicator timer.
- Focus styles reach code controls; reference definitions and wiki-link suggestions respect the configured fonts and sizes.
Appearance
- Tables have 4px outer corners with square internal cell divisions. Set
--inkkit-table-radius: 0pxto keep square corners. - Hosts can set unchecked checkbox borders with
--inkkit-checkbox-border-colorand the drop marker with--inkkit-drop-indicator-color.
Compatibility
This release adds documented appearance controls. No existing public methods or options are removed. Document contents and supported formats are unchanged. Apps must adopt the published package separately.
Inkkit 0.2.0
Inkkit 0.2.0
Image-import cancellation, paste reliability and pointer fixes.
Added
- Hosts can call
cancelPendingImports(expectedGeneration?)to cancel a stalled image paste or drop without changing editability. Cancellation immediately releases saving and discards the entire pending paste. - Image import adapters receive
ImageImportContext.signal, aborted on cancellation, document replacement, read-only transitions and destruction. Adapters should stop work and clean up unused bytes when aborted; late results cannot change the document.
Fixed
-
Ticking a checklist item preserves the writing selection and does not steal focus from another input.
-
Block-boundary selections show only their gap indicator, without a second native text caret.
-
Table drag handles show the grab pointer.
-
HTML pastes retain their surrounding text and an image placeholder when an adapter rejects with
image-unavailable. -
Tab-indented plain text no longer becomes a table solely because it contains a tab. Outside a table, plain TSV requires multiple rectangular rows and a nonblank first-column value; HTML without a table takes precedence over TSV fallback. Existing table filling remains supported.
-
Typing after pasted terminal comments or folded callouts goes after the pasted blocks. Paste placement respects callouts folded or opened by the reader.
Compatibility
This batch adds public API and intentionally changes TSV inference. Existing image adapters that accept DocumentContext can continue to do so; host test doubles constructing ImageImportContext must include a signal. Apps must adopt this release separately. Link-boundary typing, authored wiki-link raw, selection tokens, drop indication and table-corner polish remain separate work.
Inkkit 0.1.7
Inkkit 0.1.7
Editing and source-preservation fixes from the reduced first wave.
- Cut and Paste within the same editor and loaded document preserves private comments. External clipboard output excludes them (#217).
- Replacing a document leaves a safe insertion point after a final divider or atomic block (#219).
- Deletion immediately after Find and arrow movement follows the current caret (#166).
- Source edits discard obsolete Redo history while retaining valid Undo history (#128).
- Dragged image output excludes private references and display URLs while retaining internal movement (#152).
- Plain-text paste preserves actual line breaks and blank lines across insertion routes, including table cells (#73).
- Deleting introductory list text and manually wrapped paragraphs no longer becomes stuck; nested content and surrounding source remain intact (#129, #234).
- Spaces beside soft line breaks survive editing, saving and reopening. Encoded spaces remain spaces, without changing a soft break into a hard break (#145).
- File cards show the message supplied by an error presentation (#316).
Compatibility review: this release adds no public API and requires no host migration. The required complete-token raw contract for links and embeds (#308/#320), link-end typing (#133), paste-caret work (#221), selection appearance (#74) and drop-position feedback (#155) remain deferred. Apps must adopt this package version separately to receive these fixes.
Verification includes regression tests, the full Chromium and WebKit suites, and selected packed-candidate WKWebView checks on Atlas. The highlighting correctness test now uses a deterministic clock; separate coverage retains the production time-budget behavior (#318).
Verification and publication record.
Published from reviewed commit 4f6361ac484d9f8e7b22ce1a2b4701a66e55cab8 through release CI and npm trusted publishing. Registry verification confirms the published archive matches CI exactly and its decompressed contents match the native-tested candidate. Fresh exact-version consumers passed in Chromium and WebKit.
Wave 1 delivery: #312, #313, #314, #315, #317, #319, #321 and #329. Atlas verification: 3,669 unit tests, 959 Chromium tests and 942 WebKit tests, plus existing skips and selected packed WKWebView checks. See the milestone for archive hashes and evidence.
Inkkit 0.1.6
InkKit 0.1.6
Security update. No API or behavior changes.
- DOMPurify is updated from 3.4.16 to 3.4.17 for its security advisories: GHSA-cg2g-xh64-v4q7 (critical), GHSA-mrv2-3pqr-j5jr (high) and GHSA-c6gr-qvv4-5v3f (low). InkKit bundles DOMPurify into the package, so a host gets the fix only by adopting this release.
Compatibility review: 0.1.6 changes a bundled dependency without adding, removing or renaming API, so a patch version is appropriate. Existing calls need no migration.
Not changed: the low KaTeX advisory GHSA-238p-pmpm-9mq7. InkKit does not bundle KaTeX. It reaches the lockfile only through Mermaid, which InkKit pins at 12.1.0 and requires katex@^0.16.47. The fix is KaTeX 0.18.2, which needs Mermaid 12.2.0 and is a separate runtime dependency update.
InkKit 0.1.5
Code blocks now include a searchable language selector with Auto, plain text and explicit languages. Changing the language preserves code text, fence spelling, metadata and undo history. The copy button has a transparent idle background and remains visible when focused from the keyboard.
Switching between formatted and source modes keeps the caret and reading position near the corresponding text. Angle autolinks containing square brackets retain their complete destination.
The language menu respects host viewport insets and stays open while its own list scrolls. Four additive label keys are documented in the API reference; no host migration is required.
Validation includes focused Chromium and WebKit regressions, offline packed consumers and selected native WKWebView checks on AIC Atlas. Package publication and registry integrity are verified separately from app adoption.
0.1.4
Typing and paste fixes for links and addresses. No API changes.
- Typing a complete wiki link, such as
[[Note]], makes it a link when the host enableswikiLinks. Before, it was saved as escaped text. Text that was already escaped in a note stays text, including after an IME composition is cancelled. - Typing an angle autolink, such as
<https://example.com>, saves it as typed. Text typed after it stays outside the link, and code or bold typed around it keeps its own formatting.<xs:element>becomes a link, as CommonMark reads it; text such as<div>stays literal. - Typing
<and>around an address that is already in the note saves an angle autolink. Before, the>was refused. - Plain-text paste of an address wrapped in formatting characters, such as
**http://example.com**, is no longer refused. - Typing
|into an address in a table cell saves an explicit link with the pipe escaped. Before, the edit was refused. - An address typed inside backticks stays code and isn't linked. An address ends at its first backtick, so a pasted
`http://example.com`links to the address without the backtick. - The README shows how InkKit keeps Markdown as written.
Behavior changes: text typed at the end of a loaded angle autolink now lands outside it, and an address ends at its first backtick. In a block where an edit changes a link's form, another bare address in that block can be written in angle brackets.
Compatibility review: 0.1.4 fixes behavior without adding, removing or renaming API, so a patch version is appropriate. Existing calls need no migration. The native boundary is unchanged, so the native WebKit evidence from 0.1.3 still applies.
InkKit 0.1.3
Slash block commands and host-provided note suggestions share one suggestion pop-up.
- Offer block commands when
/is typed on an empty line withslashMenu, off by default. Hosts can select built-in commands withcommandsand supply their own withcustomCommands.SlashMenuOptions,SlashCommandNameandSlashCommandare exported. - Offer matching note names after
[[through the optionalWikiLinkAdapter.suggest(query, context)method. Requests support cancellation; obsolete results are ignored. Selecting a suggestion inserts an escaped wiki link in one checked edit. - Filter and choose suggestions with the keyboard or pointer in a shared, scrollable pop-up with combobox and listbox semantics.
- Customize suggestion text with the
suggestions*andslash*labels and appearance with the--inkkit-menu-*tokens.
Compatibility review: 0.1.3 is additive pre-1.0 work, so the planned 0.1.3 version is appropriate. No existing API is removed or renamed, and existing calls require no migration. The slash menu remains disabled unless a host enables it. Hosts without WikiLinkAdapter.suggest retain their existing behavior. See the API reference for signatures, defaults and guards.
One editing behavior also changes: a thematic break newly written inside a list item, quote, callout or footnote is written as ___ so it reopens unambiguously. Authored rules keep their spelling unless an edit rewrites their block.
Candidate checks include 3,394 unit tests, fresh offline consumers in Chromium and WebKit, the whole browser suite in both engines, and 25 selected native WKWebView cases on a separate test Mac. No suggestion or pop-up native group exists, so dedicated native suggestion behavior is unverified. The selected native cases cover the fixture bridge, focus, source input, text ranges and shared history; they do not establish consumer-app behavior, VoiceOver, external clipboard destinations or complete IME interoperability. No consumer-app adoption or print campaign was run.
InkKit 0.1.2
Editing conveniences and preservation fixes since InkKit 0.1.1, including its immediate-caret focus fix.
- Turn a typed table row into a table with Enter or Tab.
- Offer smart quotes and dashes through
textInput.smartPunctuation, off by default. - Move a block with Option-Up and Option-Down, or through
moveBlock. Hosts can configuremoveBlockUpandmoveBlockDowninKeymapand inspect them incommandState;BlockMoveDirectionis exported. - Preserve spaces, typed link addresses, plain-text paste and inline-code typing, including the first edit after composition.
- Preserve typing after Shift+Enter at the end of a paragraph and near formatting, and preserve callout and quote edge spaces.
- Allow
replaceTextRangeinside lists, quotes, callouts and table cells without losing their surrounding structure. - Center table grabbers and task checkboxes. Hosts can adjust task checkbox placement with
--inkkit-checkbox-offset. - Make browser performance checks distinguish whole-note work from runner noise.
Compatibility review: 0.1.2 is additive pre-1.0 work, so the planned 0.1.2 version is appropriate. The public API additions above require no migration of existing calls. Smart punctuation remains disabled unless a host enables it. Hosts that supply exhaustive keymaps or command-state handling should review the new block-move names. See the API reference for signatures, defaults and guards.
Three editing behaviors also change:
- Browser
historyUndoandhistoryRedobeforeinput events now go throughundo()andredo(). - Shift+Enter inside a literal Markdown block does nothing; it no longer rewrites the block as escaped text.
- A hard break directly before an inline HTML comment is written as
<br />.
Candidate checks include 3,050 unit tests, fresh offline consumers in Chromium and WebKit, and 25 selected native WKWebView cases on a separate test Mac. Native results cover the fixture bridge, focus, source input, text ranges and shared history; they do not establish consumer-app behavior, external clipboard destinations or complete IME interoperability.
InkKit 0.1.1
Focused maintenance release based on InkKit 0.1.0.
- Preserve immediate caret movement after editor focus. The delayed focus correction no longer overwrites a newer caret position when editing or navigation input begins.
- Retain normal focus correction for no input and modifier-only keys, and clear pending work on blur or destruction.
- No public API or supported-syntax changes. Upcoming table shortcuts and other editing features are excluded.
The regression was reproduced in PadPad's native WKWebView and verified with the corrected bundled runtime. Hosted CI passed, and the published archive was verified against both the CI artifact and the native-tested candidate, with fresh Chromium and WebKit consumer checks.
InkKit 0.1.0
InkKit 0.1.0 is the first release for apps to adopt: every call and output names its document, every failure is a coded InkKitError, the styling contract uses only inkkit- names, and tables, saving and long notes work better. It breaks the host API and CSS, so read "Moving from 0.0.x" before you update.
For people
- Tables. Tables draw borders, padded cells, a shaded header row and a scroller for wide tables. Controls on the active column and row align, add, delete and move them, by pointer or keyboard.
- Source stays as authored. Setext headings, the indentation of a paragraph's other lines, list and quote items before a split or join, and formatting around an inline comment keep their bytes. A block the parser cannot build opens as literal source, and typing into a literal block saves what you typed.
- Long notes. Enter, Backspace and paste across blocks cost about what typing a character costs. Code blocks over 5,000 characters stay unhighlighted so a note cannot freeze the editor.
- Callouts. Enter and Backspace in a callout work as in a quote.
- Comments. Hidden author comments survive Backspace and Delete beside them.
- Links. Mod-click opens Markdown and wiki links (Command on Apple platforms, Control elsewhere), a click never makes the web view follow a link, and a link keeps the form it was written in when you edit it.
- Paste and input. Text pasted inside a sentence joins the paragraph, pasted HTML imports only what it shows, and multi-character input inserts exactly its text.
- Accessibility. File cards, footnote definitions, author comments and preserved Markdown blocks have roles and names.
For hosts
- Document identity.
DocumentVersion(documentId,generation,revision) is on every output, andchangedreceives a fullDocumentSnapshot. Most calls takeexpectedGenerationand throwstale-documentwhen it is not the loaded one. - One error type. Every failure is an
InkKitErrorwith a code from one closed list. The API reference documents each code, where it arrives and whether to retry. - Settled signatures.
format,keyDown,insertImages,insertPaths,clipboardSnapshotandKeymaphave typed, validated arguments, andformatreports whether it applied. - Styling. Every class InkKit draws and every custom property it reads begins
inkkit-. New tokens are--inkkit-column-insetand--inkkit-surface-focus-width,-colorand-offset. - Files.
FileReference.targetis the reference without its fragment. - Labels.
commentandpreservedMarkdownare new labels. - Dependencies. The package bundles Milkdown, ProseMirror and every other runtime dependency except Mermaid, so a host runs the tree InkKit tested. Mermaid 12.1.0, pinned exactly, is the one runtime dependency.
- Engines. WebKit 17.5, Chromium 123 and Firefox 125 (untested) are the supported engines. Without the Custom Highlight API, the editor now mounts and uses the browser's selection.
Moving from 0.0.x
Each line is a change a host must make. The API reference describes every member named here.
Mounting and events
- Remove unknown names.
mountrejects withinvalid-argumentfor an unknowneventsname, an unknownlabelskey and an unknown option, so delete anything that is not inEditorEvents,EditorLabelsorEditorOptions. stateChangedis gone. Read caret state fromcommandStateChanged(state)asstate.caret; passingstateChangedmakesmountreject.changed(markdown, generation)is nowchanged(snapshot). Readsnapshot.text,snapshot.generationandsnapshot.revision.openLinkandcopyare optional. Withoutcopy, InkKit draws no Copy button, and withoutopenLink, links do not open. Delete stub handlers you added for them.- Your handlers' exceptions go to
reportError(). An exception fromchanged,commandStateChanged,openLink,copyorerrorno longer fails the InkKit call that raised it.
Documents and generations
- Use a greater generation on every load.
loadDocumentandreloadDocumentthrowinvalid-argumentunlessgenerationis greater than the loaded one, and the first load accepts any integer. - Pass
expectedGenerationlast. Replace hand-written generation checks andcommandState(expected)calls with the parameter onreloadDocument,paste,pasteAsPlainText,format,table,insertPaths,insertImages,insertFootnote,navigateFootnote,editReferenceDefinition,clipboardSnapshot,focusandblur. - Replace
.ProseMirrorblur code withblur(expected).
Calls
format('heading', n)isformat('heading' + n). Useheading1toheading6, and readcommands.format.heading1toheading6instead ofcommands.format.heading.formattakes an options object. Useformat('link', { destination })andformat('codeBlock', { language });format('link')without a destination now only removes a link, and the call returns whether it applied.keyDowntakes one object. ChangekeyDown(key, code, meta, ctrl, alt, shift, generation)tokeyDown({ key, code, metaKey, ctrlKey, altKey, shiftKey }, generation).insertImagestakes references and a point. ChangeinsertImages([{ path, alt }], x, y)toinsertImages([{ reference, alt, title? }], { clientX, clientY }?, generation?); it returnsfalseinstead of throwingimage-unavailable, and works with only aFileAdapter.insertPathstakes a point. ChangeinsertPaths(paths, x, y)toinsertPaths(paths, { clientX, clientY }, generation?).clipboardSnapshottakes a scope. ChangeclipboardSnapshot(true)toclipboardSnapshot('document', generation)andclipboardSnapshot(false)toclipboardSnapshot('selection', generation).- Two members are removed. Use
pasteAsPlainText(text, generation)instead ofpaste({ text, plainText: true }), andtextRangesRects([range])[0]instead oftextRangeRects(range). - Type keymaps as
Keymap. An unknown shortcut name now throwsinvalid-argumentinsetKeymapandEditorOptions.keymap.
Errors
- Branch on
error.codeonly. There is oneInkKitErrorwith a closed list of codes; stop matching messages or classes, and treat any code exceptdestroyedandinternalas an editor that still works. - A refused facade edit throws.
insertText,pasteAsPlainText,format,table,replaceTextRangeandpastethrow or reject withpreservationand no longer also callevents.error; edits the person makes still arrive there. - Replace
RangeErrorandTypeErrorhandling withinvalid-argument. Four codes are new:invalid-argument,file-unavailable,clipboard-unavailableandinternal. - Match file and clipboard failures by code. File and wiki-link failures are
file-unavailable, and a copy withoutevents.clipboardor a rejected handler isclipboard-unavailable. clipboardSnapshot()sends no error events for degraded output. Readimages[].erroranddiagrams[].error.- Drop
?? undefinedshims.nullcounts as omitted for an optional argument. - A failed call changes nothing and sends nothing. The
changedandcommandStateChangedevents a successful call raises arrive when it returns.
Files and links
- Read
FileReference.target. Stop slicing the fragment offreferenceyourself, and settargeton anyFileReferenceyour tests build. - Delete your
metaclass code. InkKit tracks Mod itself and no longer reads ametaclass on an ancestor; do not open links on Control-click yourself. - Expect fewer openable links. Only relative, fragment, query,
http,https,mailtoandteladdresses render and open, softp:no longer does, andopenLinkis never called with an empty address.
CSS
- Rename seven classes.
.copy,.empty,.image,.image-handle,.image-absent,.literal-markdownand.hljs-*are now.inkkit-copy,.inkkit-empty,.inkkit-image,.inkkit-image-handle,.inkkit-image-absent,.inkkit-literal-markdownand.inkkit-hljs-*. - Rename the custom properties.
--accent,--text,--muted,--rule,--code-bg,--monoand--reading-widthare now--inkkit-accent-color,--inkkit-text-color,--inkkit-muted-color,--inkkit-rule-color,--inkkit-code-background,--inkkit-monospace-fontand--inkkit-reading-width, and the old names are no longer read. - Set
--inkkit-column-insetinstead of overriding.ProseMirrorpadding. Delete host rules that restyle.ProseMirror, the renamed classes or.hljs-*, and check host table rules, because tables now draw their own borders and padding.
Verification
2,187 unit tests, 378 Chromium and 375 WebKit browser tests, and clean packed and registry consumers in Chromium and WebKit passed on the release commit. The native WKWebView runner was not run on this release, and browser WebKit does not prove WKWebView behavior, so check your bridge when you adopt it. Synthetic composition tests do not establish every operating-system input method.