Introducing The Sweep: OX’s New Live Security Research Series
Register Now
Breaking: The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?
Read the Report
Are you exposed? Connect your apps in minutes.
Scan your apps free

@stll/folio-core

Latest version: v0.84.0

Overview

Last scanned
28 Nov 2026
Published
28 Nov 2026
npm package Publisher: jan-kubica
36 Stars
10 Forks
101 Versions
484.8K Downloads
TypeScript Repo language

Scan summary

@stll/folio-core was last scanned on 28 Nov 2026 at version 0.84.0. Risk score 0 of 100. No malicious behavior was detected.

  • Releases: 101 versions; the latest 5 were published within 2 days (27 and 28 Nov 2026).
  • Findings: 1 rule fired in version 0.84.0 (1 low). The score describes this version only.
  • Downloads: 484,839 downloads.

Versions

101 versions published
Versions and the rules that fired in each
VersionPublishedStatus
0.84.0 LATEST 28 Nov 2026 1 rule fired
0.82.0 28 Nov 2026 1 rule fired
0.81.0 28 Nov 2026 1 rule fired
0.80.0 27 Nov 2026 Not shown
0.79.0 27 Nov 2026 Not shown

Rules fired in 0.84.0: 1

Findings

1 Low

Findings for v0.84.0. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.

WebAssembly module included

The package includes a WebAssembly (.wasm) module. It cannot be reviewed as source, but it runs sandboxed inside the JavaScript runtime and can access only what the host code gives it. WebAssembly is common in parsers, codecs and cryptography libraries. Shown for awareness.

LOW
Checking access…

🔒 Create a free account to see all 1 finding with descriptions and instance counts

The score describes 0.84.0; other versions have their own rules, not their own score.

README

The publisher’s own README, as collected from the registry.

@stll/folio-core

The headless DOCX engine behind folio. It reads a .docx into a typed OOXML model, applies every edit as a validated operation on that model, paginates it, and writes a valid .docx back. Parts of the package that no edit touched are written back byte for byte.

Typing in the editor, tracked changes, comments, AI suggestions, collaborative edits and server-side review all go through the same operations, so the same edit gives the same document wherever it runs. An edit the engine cannot make is refused whole, never half-applied. In the browser editors, ProseMirror handles keyboard input and selection; the document model is the source of truth, and folio lays out and paints the pages itself.

There is no React in the import graph, so the core runs on a server or under any framework. The React editor lives in @stll/folio-react, and the Vue editor lives in @stll/folio-vue.

Part of stella, an open-source legal workspace.

Install

bun add @stll/folio-core \
  prosemirror-commands@^1.7.1 prosemirror-dropcursor@^1.8.2 prosemirror-gapcursor@^1.4.1 prosemirror-history@^1.5.0 \
  prosemirror-inputrules@^1.5.0 prosemirror-keymap@^1.2.3 prosemirror-model@^1.25.9 prosemirror-state@^1.4.4 \
  prosemirror-tables@^1.8.5 prosemirror-transform@^1.12.0 prosemirror-view@^1.42.6 \
  y-protocols@^1.0.6 yjs@^13.6.31

ProseMirror and Yjs packages are required peers, including the collaboration package y-protocols. Install one compatible copy of each in the host application so schemas, plugins, editor states, and collaborative documents share the same runtime. The command above includes the complete editor peer closure.

Exports

Import What it is
@stll/folio-core the headless public API — document creation, representation-neutral comparison, the document model, AI-suggestion primitives, and editor decoration plugins
@stll/folio-core/markdown DOCX ↔ Markdown conversion
@stll/folio-core/server DOM-free document review, explicit tracked edits, comparison, creation, and package helpers
@stll/folio-core/redline Compare two .docx buffers and generate a native Word redline
@stll/folio-core/* the source-mirrored module tree (e.g. @stll/folio-core/types/document, @stll/folio-core/prosemirror/schema) for adapters that need lower-level building blocks

Review display configuration

ReviewDisplayMode is all-markup | final | original. reviewDisplayModeToDisplayMode in managers/reviewDisplayMode maps it to the layout pipeline's markupView input. The shared projection reuses the accept-all/reject-all resolver without changing editor state. Layout and search consume that projection; saved DOCX always uses the authored state. getEditorReadOnlyReason in managers/EditorModeManager makes projected review views read-only. Both adapters expose the resulting EditorReadOnlyReason through getReadOnlyReason() and onReadonlyEditAttempt(reason). showCommentHighlights on the layout pipeline defaults to true; final (no-markup) and original suppress comment highlights regardless of it.

New documents and reusable style sets

Create a legal-shaped blank document with the built-in preset:

import {
  createDocx,
  createEmptyDocument,
  createStellaStyleDocumentPreset,
} from "@stll/folio-core";

const document = createEmptyDocument({
  preset: createStellaStyleDocumentPreset(),
});
const docx = await createDocx(document);

A document built from scratch states no author and no application unless the host names them. Pass either to write it:

const docx = await createDocx(document, {
  creator: "Marie Nováková",
  application: "Example Host",
});

creator becomes dc:creator in docProps/core.xml; application becomes Application in docProps/app.xml, alongside the AppVersion the schema form requires. An omitted value writes no element at all. Both are ignored for a document that carries a source package: that package keeps the properties it already states.

Style sets are content-free JSON values. Inspect a source file before presenting styles for selection, extract the selected dependency closure, persist the result, and load it into any later document:

import {
  createEmptyDocument,
  extractDocumentStyleSetFromDocx,
  inspectDocumentStylesFromDocx,
} from "@stll/folio-core";

const catalog = await inspectDocumentStylesFromDocx(sourceDocx);
const styleSet = await extractDocumentStyleSetFromDocx(sourceDocx, {
  name: "Firm contract styles",
  styleIds: catalog.styles
    .filter(({ role }) => role === "default" || role === "quick")
    .map(({ styleId }) => styleId),
});

const document = createEmptyDocument({ styleSet });

Extraction excludes document content, metadata, relationships, media, comments, and revision data. It keeps only the selected styles and the numbering, theme, font-table, and settings data required to reproduce their formatting.

Representation-neutral comparison

compareContent compares ordered blocks from any document model without first serializing them to another format. Map durable source anchors to stable block IDs and include structural ancestry when blocks live in containers:

import { compareContent, type FolioContentBlock } from "@stll/folio-core";

type SourceBlock = {
  anchorId: string;
  type: "clause" | "heading";
  text: string;
  sectionId: string;
};

type ComparableSourceBlock = FolioContentBlock<SourceBlock["type"]> & {
  source: SourceBlock;
};

const toFolioBlocks = (blocks: readonly SourceBlock[]) =>
  blocks.map(
    (source) =>
      ({
        id: source.anchorId,
        idStability: "stable",
        kind: source.type,
        text: source.text,
        containerPath: [{ kind: "section", id: source.sectionId }],
        source,
      }) satisfies ComparableSourceBlock,
  );

const result = compareContent({
  base: { blocks: toFolioBlocks(baseRevision) },
  revised: { blocks: toFolioBlocks(revisedRevision) },
});
if (result.isErr()) throw result.error;

for (const event of result.value.events) {
  renderComparisonEvent(event);
  const revisedSource = event.revisedBlocks.at(0)?.source;
  if (revisedSource) persistSourceAnchor(revisedSource.anchorId);
}

const rejectedBlocks = result.value.events.flatMap(
  ({ baseBlocks }) => baseBlocks,
);
const acceptedBlocks = result.value.events.flatMap(
  ({ revisedBlocks }) => revisedBlocks,
);

Events retain the caller's complete block subtype, including custom metadata, and are already in full-document render order. Modified and edited-move segments use UTF-16 offsets compatible with JavaScript string slicing; move halves share a moveId, and table row or column events reference their grouped entry in structuralChanges. FOLIO_CONTENT_COMPARISON_LIMITS publishes the block, text, attribute, container, run, and result ceilings. Input ceilings are checked before alignment; the result ceiling returns the same typed FolioContentComparisonLimitError while constructing the ordered stream.

Native Word redlines

Generate a reviewable .docx whose text and supported inline-formatting differences are native tracked changes:

import { generateRedlineDocx } from "@stll/folio-core/redline";

const result = await generateRedlineDocx(originalDocx, revisedDocx, {
  author: "Reviewer",
});

await store(result.buffer);
console.log(result.applied, result.skipped, result.unprocessedStories);

For deterministic operations against one document, use FolioDocxReviewer from @stll/folio-core/server. Its operations default to tracked changes and can be enumerated, accepted, or rejected before saving. getChanges() includes inline edits, formatting, paragraph marks, and paragraph, section, table, row, and cell property changes.

Pending suggestions

Apply operations in "suggested" mode to show proposed edits without writing them into the DOCX. Persist reviewer.exportPendingSuggestions() in a host store as JSON alongside the document. After reopening the saved DOCX, call reopened.loadPendingSuggestions(records) to revalidate and restage them:

import type { FolioPendingSuggestionRecord } from "@stll/folio-core/ai-edits";
import { FolioDocxReviewer } from "@stll/folio-core/server";

const records: FolioPendingSuggestionRecord[] =
  reviewer.exportPendingSuggestions();
await saveRecords(records);
const reopened = await FolioDocxReviewer.fromBuffer(savedDocx, {
  author: "Reviewer",
});
const results = reopened.loadPendingSuggestions(await loadRecords());

Each result is restaged or stale with a reason. A stale record leaves the document untouched; the host should keep it for review. The host must scope stored records to its document identity and authorized owner before loading them. acceptAll() resolves ordinary tracked changes and leaves suggestions pending. Use acceptSuggestion(suggestionId) to commit one explicitly.

License

Apache-2.0

folio began as a private fork of Eigenpal's docx-editor; the original license and copyright are preserved in NOTICE.md.

OX Radar and Response Center

Find threats in your stack.

OX Radar can check high-priority threats, like critical package CVEs, against your context.

Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.

Where it’s listed

The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).

  • npm @stll/folio-core

References

The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.

Powered by Read the latest findings

Scan your whole stack

Group 1261154050 1
Group 1261154050
 

From OX Research Newsroom

Copy of Template Design OX Blog (2)
Research

NGINX2Root: Five Critical NGINX Flaws Expose Web Servers to Remote Code Execution

Ethersphere Hijacked With Crypto Stealing Malware (1)
npm

Ethersphere Hijacked With Crypto Stealing Malware Via Github & npm

The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?
Vulnerability Insights

The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?

Frame 2085668439 (1)
Group 1261154229