Skip to content

Releases

v0.13.0

Choose a tag to compare

@github-actions github-actions released this 17 Nov 12:12

Editor only. The document format, schema and Markdown are unchanged.

Added

  • Editor takes a fragment prop: a Y.XmlFragment of a shared Y.Doc, such as one text box
    nested in a Y.Map. When set, it is the source of truth instead of the root default fragment,
    ydoc may be left out (the editor uses fragment.doc), and carets still work with a
    provider. Undo covers that fragment only. CollabOptions takes the same fragment, and its
    document is now optional when fragment is set.

v0.12.1

Choose a tag to compare

@github-actions github-actions released this 14 Nov 12:15
2eae88a

Renderer only. The document format, schema and Markdown are unchanged.

Fixed

  • A rendered table no longer squeezes its columns to the page width and wraps cell text. It takes
    its natural width (at least the full width), cells stay on one line, and a wide table scrolls
    sideways inside its wrapper. The editor's tables are unchanged.

v0.12.0

Choose a tag to compare

@github-actions github-actions released this 13 Nov 22:02
da4fb66

Editor only. The document format, schema and Markdown are unchanged.

Added

  • Every BlockCommand has an icon: a muse Icon name (Solar linear glyphs, plus three
    heading glyphs drawn in the same stroke). The slash menu, the toolbar block menu and the bubble
    menu "Turn into" menu show it before the label.
  • BLOCK_ICONS (command id to icon name) and blockIcon(id) are exported. Importing encre
    registers the glyphs with muse, so a host reuses them in its own menus, such as a right-click
    "Turn into" submenu: blockCommands(labels).map((c) => ({ label: c.label, icon: c.icon, ... })).
  • The slash menu offers one embed entry per Facile app after "Link / embed": Toile board,
    Feuilles spreadsheet, Vision dashboard, Docs page and Nuage file (French: "Tableau Toile",
    "Classeur Feuilles", "Tableau de bord Vision", "Page Docs", "Fichier Nuage"). Each shows the
    app's bold duotone brand logo, is found by the app name (/toile, /feuilles, /vision,
    /docs, /nuage), asks for the address and inserts an embed of that kind. New exports
    embedCommands(onerror, labels) and the optional kind argument of embedCommand; new labels
    embedToile, embedFeuilles, embedVision, embedDocs, embedNuage in the four catalogues.
  • EMBED_LOGOS and embedLogo(kind): the app logo of each embed kind (the glyph of muse's brand
    catalog, bundled, no network fetch), the link glyph for link. A framed embed's "Open" link and
    a Facile app's link card show it in place of the site favicon.

Changed

  • muse v0.21.2. Icon-only controls show a muse tooltip: the mark buttons, the link buttons and
    the toolbar undo and redo through IconButton (the extra Tooltip wrappers are gone, so each
    shows one tooltip), the embed resize handle, and each Presence avatar (was a native title).
  • embedCommand moved from files.ts to embed-commands.ts; the package export is unchanged.
  • BlockCommand.icon is required. A host that builds its own BlockCommand adds an icon.

Fixed

  • The slash menu scrolls the highlighted entry into view as the arrow keys move it. Before, the
    highlight left the visible part of the list and only the mouse wheel reached the entries below.
  • The slash menu closes on a press anywhere outside its list (the editor included), when focus
    leaves the editor or the window, and when the page scrolls. The typed /query stays as plain
    text, Enter then splits the paragraph as usual, and typing / again reopens the menu. Escape
    still closes it. Closing exits the suggestion plugin, so no decoration is left behind.

v0.11.0

Choose a tag to compare

@github-actions github-actions released this 13 Nov 18:47
8cf807b

Schema 3. Strictly additive: every valid schema 1 or 2 document is a valid schema 3 document,
unchanged, and migrate(doc, 2) is the identity. Stores that record the schema version should
write 3 from now on.

Added

  • Schema 3 adds two atom blocks, marked "since": 3: embed {id, url, kind, title} and
    file {id, src, name, size, mime}. url is a new attribute type: an https address with a
    host. kind is link, toile, feuilles, vision, docs or nuage.
  • Facile Markdown reads and writes them as data-only fences, like stat:
    ```embed holding {"url": "…", "kind": "…", "title": "…"} and ```file
    holding {"src": "…", "name": "…", "size": 0, "mime": "…"}. The CommonMark export, plain text
    and Typst show each as one link, labelled by its title or name.
  • Editor: embed and file node views. Toile, Feuilles, Vision and Docs embeds show the page in
    a lazy frame (?embed=1 added, Vision as is) with an "Open" link and a drag handle for the
    height; other links show a card that resolveEmbed can enrich. A file is a row that downloads
    src. Document renders both.
  • Editor props onfile, onembed, resolveEmbed, oncontextmenu and extras, and the methods
    selectionMarkdown(), run(id), turnInto(id), duplicateBlock(), deleteSelection() and
    copyBlockLink(base). A lone https URL pasted on an empty paragraph becomes an embed unless
    onembed answers false; non-image files pasted, dropped or picked go through onfile.
  • The bubble menu shows for block and node selections too, with a "Turn into" menu, the mark
    buttons, the link button and the host's extras.
  • The slash menu gains "Lien / intégration" and, with onfile, "Fichier".
  • embedKind(url, hosts?) and the embed and file helpers, exported; copy for every new string in
    fr, en, es and de.

Changed

  • The link button edits an existing link instead of removing it; an empty address or the new
    remove button removes it.
  • Presence renders nothing while this client is the only one connected.
  • A fence named embed or file holding a valid JSON object now reads as that block. A code
    block whose language starts with embed or file is written with a tilde fence, as other
    custom block names are.

v0.10.1

Choose a tag to compare

@github-actions github-actions released this 13 Nov 13:15
31f5119

No change to the library, the CLI or the Go module: consumers need not bump.

Fixed

  • sh scripts/check.sh with no mode stopped on nothing in its check half: it ran
    check && test_suites, and sh ignores set -e inside a function called on the left of
    &&, so a failing cargo fmt, clippy, bun run check, wasm diff or go vet was skipped
    past unless filet check, the last step, failed too.
  • A clippy dead_code error in the CLI tests that the gate above let through.

Changed

  • filet.yml drops six settings no rule reads for .rs, .ts, .svelte or .sh
    (returns, structFields, interfaceMethods, requireDocComments, banGlobalMutable,
    banInit).
  • The Yjs and OpenUI nesting tests move to crates/encre/tests/nesting.rs and the markdown
    validation tests to crates/encre-cli/tests/validate_markdown.rs, under filet's
    eight-functions-per-file limit.

v0.10.0

Choose a tag to compare

@github-actions github-actions released this 12 Nov 10:59

Changed

  • Breaking: the pdf feature compiles with typst 0.15.1 (was 0.14.2), so PDF bytes differ
    from 0.9.x. On the sample documents the page count and extracted text are unchanged, the files
    are about 10 % smaller and Creator reads Typst 0.15.1. The vendored muse-typst (e0bb711)
    compiles unchanged. The feature also depends on typst-layout.
  • The workspace patches citationberg to upstream commit 06a591e (0.7.0 plus quick-xml 0.41), so
    quick-xml 0.38 and its advisories leave the build. A [patch] does not reach dependents: a
    workspace that uses encre with pdf needs the same entry, shown in docs/development.md.

Fixed

  • After a wasm trap (memory access out of bounds, unreachable, a stack overflow), the next
    encre function or loadEncre call runs on a fresh instance built from the compiled module.
    Before, every later call failed until the page reloaded. A trap inside validateDocument or
    parseMarkdown now reaches the caller instead of reading as a refusal.
  • Editor node views follow a change of locale, labels or renderDiagram; they kept the copy
    from mount. placeholder, ydoc, provider and user stay read at mount, as docs/api.md
    now says.
  • Callout, column, stat and chart title inputs and the chart labels and series drop every control
    character but tab, so a pasted U+0007 no longer makes exports refuse the document.
  • An empty chart entry (web: 1, , 2 or a trailing comma) no longer becomes a 0.
  • Go: the tests fail instead of skipping when CI is set and no encre binary is found, or when
    ENCRE_BIN names a missing file.

v0.9.4

Choose a tag to compare

@github-actions github-actions released this 11 Nov 12:20

Fixed

  • yjs::read, yjs::from_update and ops::apply_yjs refuse an update nested past 48 levels with
    YjsError::Invalid, the message validate gives, before they recurse. A 115 KB update nested
    5 000 deep overflowed the stack and aborted the process.
  • openui::to_document counts nesting through references, so x0 = [x1], x1 = [x2] chains stop
    at 64 levels with the new Error::TooDeep. Long chains overflowed the stack in the CLI and broke
    the browser's wasm instance for every later call.
  • patch gives ids only to the blocks it inserts, so its cost is linear in the number of matching
    blocks. 4 000 matching blocks took 113 s in a debug build.
  • Pasted or setContent HTML always validates: the editor rewrites a table with plain td header
    cells, colspan rows or mixed column alignment into a rectangular GFM table aligned like its
    header row, maps any text-align other than left, center and right to none, and clamps an
    ordered list start to 0 to 999 999 999.
  • caretColor returns a #rrggbb color from muse's chart palette. y-tiptap draws only that form,
    so carets and selections without a user.color were transparent.
  • loadEncre forgets a failed load, so the next call tries again.
  • PDF export writes a link only for http, https, mailto, tel and relative targets, as Document
    does; other links become plain text.
  • Go: PDF passes --title=, --footer= and --image-dir= values, so a title starting with -
    is not read as a flag.
  • Go: Validate returns an invalid Verdict for input larger than the size limit instead of an
    *Error. The new package variable MaxBytes sets --max-bytes on every call.

v0.9.3

Choose a tag to compare

@github-actions github-actions released this 11 Nov 11:56

Fixed

  • Editor methods revealPath and revealBlock scrolled the node to the top of the scroll
    container, under the editor's sticky toolbar. They now keep it below the toolbar's measured
    height.

v0.9.2

Choose a tag to compare

@github-actions github-actions released this 11 Nov 01:29

Added

  • serializeMarkdown and serializeCommonMark throw an EncreDocumentError, exported, when the
    document is invalid. It extends Error with the same message as before, and carries path, the
    tree path of the failing node, and blockId, the id of that node or of the nearest block around
    it that has one.
  • Editor methods revealPath(path) and revealBlock(blockId) select a node and scroll to it, so
    an app can jump to the spot an EncreDocumentError names. A textblock's text is selected.
  • Editor.exportMarkdown and exportCommonMark hand an EncreDocumentError to onerror before
    they reject with it.
  • A markdown paste that parseMarkdown refuses still lands as literal text, and the editor now
    hands the EncreMarkdownError (line, column, path) to onerror.

v0.9.1

Choose a tag to compare

@github-actions github-actions released this 11 Nov 00:11

Added

  • encre-wasm validateMarkdown(markdown) and the TypeScript validateMarkdown, backed by
    markdown::validate: { valid, errors: [{ path, message, line, column }] }, the same verdict as
    encre validate --from markdown --json. A CLI test compares both on the CLI's inputs.
  • parseMarkdown throws an EncreMarkdownError, exported, which extends Error and carries
    line, column and path when the source position is known. The message is the same text as
    before, so code that catches and shows it keeps working. Nine nested custom blocks after a
    heading now report line 11, column 1, as the CLI does.