Repository navigation
Releases
Releases · FacileStudio/encre
v0.13.0
Editor only. The document format, schema and Markdown are unchanged.
Added
Editortakes afragmentprop: aY.XmlFragmentof a sharedY.Doc, such as one text box
nested in aY.Map. When set, it is the source of truth instead of the rootdefaultfragment,
ydocmay be left out (the editor usesfragment.doc), and carets still work with a
provider. Undo covers that fragment only.CollabOptionstakes the samefragment, and its
documentis now optional whenfragmentis set.
v0.12.1
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
Editor only. The document format, schema and Markdown are unchanged.
Added
- Every
BlockCommandhas anicon: a museIconname (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) andblockIcon(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 optionalkindargument ofembedCommand; new labels
embedToile,embedFeuilles,embedVision,embedDocs,embedNuagein the four catalogues. EMBED_LOGOSandembedLogo(kind): the app logo of each embed kind (the glyph of muse's brand
catalog, bundled, no network fetch), the link glyph forlink. 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 throughIconButton(the extraTooltipwrappers are gone, so each
shows one tooltip), the embed resize handle, and eachPresenceavatar (was a nativetitle). embedCommandmoved fromfiles.tstoembed-commands.ts; the package export is unchanged.BlockCommand.iconis required. A host that builds its ownBlockCommandadds anicon.
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/querystays 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
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}.urlis a new attribute type: an https address with a
host.kindislink,toile,feuilles,vision,docsornuage. - Facile Markdown reads and writes them as data-only fences, like
stat:
```embedholding{"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:
embedandfilenode views. Toile, Feuilles, Vision and Docs embeds show the page in
a lazy frame (?embed=1added, Vision as is) with an "Open" link and a drag handle for the
height; other links show a card thatresolveEmbedcan enrich. A file is a row that downloads
src.Documentrenders both. - Editor props
onfile,onembed,resolveEmbed,oncontextmenuandextras, 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
onembedanswers false; non-image files pasted, dropped or picked go throughonfile. - The bubble menu shows for block and node selections too, with a "Turn into" menu, the mark
buttons, the link button and the host'sextras. - 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,esandde.
Changed
- The link button edits an existing link instead of removing it; an empty address or the new
remove button removes it. Presencerenders nothing while this client is the only one connected.- A fence named
embedorfileholding a valid JSON object now reads as that block. A code
block whose language starts withembedorfileis written with a tilde fence, as other
custom block names are.
v0.10.1
No change to the library, the CLI or the Go module: consumers need not bump.
Fixed
sh scripts/check.shwith no mode stopped on nothing in itscheckhalf: it ran
check && test_suites, andshignoresset -einside a function called on the left of
&&, so a failingcargo fmt, clippy,bun run check, wasm diff orgo vetwas skipped
past unlessfilet check, the last step, failed too.- A clippy
dead_codeerror in the CLI tests that the gate above let through.
Changed
filet.ymldrops six settings no rule reads for.rs,.ts,.svelteor.sh
(returns,structFields,interfaceMethods,requireDocComments,banGlobalMutable,
banInit).- The Yjs and OpenUI nesting tests move to
crates/encre/tests/nesting.rsand the markdown
validation tests tocrates/encre-cli/tests/validate_markdown.rs, under filet's
eight-functions-per-file limit.
v0.10.0
Changed
- Breaking: the
pdffeature 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 andCreatorreadsTypst 0.15.1. The vendored muse-typst (e0bb711)
compiles unchanged. The feature also depends ontypst-layout. - The workspace patches
citationbergto 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 withpdfneeds the same entry, shown indocs/development.md.
Fixed
- After a wasm trap (
memory access out of bounds,unreachable, a stack overflow), the next
encre function orloadEncrecall runs on a fresh instance built from the compiled module.
Before, every later call failed until the page reloaded. A trap insidevalidateDocumentor
parseMarkdownnow reaches the caller instead of reading as a refusal. Editornode views follow a change oflocale,labelsorrenderDiagram; they kept the copy
from mount.placeholder,ydoc,provideranduserstay read at mount, asdocs/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, , 2or a trailing comma) no longer becomes a 0. - Go: the tests fail instead of skipping when
CIis set and noencrebinary is found, or when
ENCRE_BINnames a missing file.
v0.9.4
Fixed
yjs::read,yjs::from_updateandops::apply_yjsrefuse an update nested past 48 levels with
YjsError::Invalid, the messagevalidategives, before they recurse. A 115 KB update nested
5 000 deep overflowed the stack and aborted the process.openui::to_documentcounts nesting through references, sox0 = [x1],x1 = [x2]chains stop
at 64 levels with the newError::TooDeep. Long chains overflowed the stack in the CLI and broke
the browser's wasm instance for every later call.patchgives 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
setContentHTML always validates: the editor rewrites a table with plaintdheader
cells,colspanrows or mixed column alignment into a rectangular GFM table aligned like its
header row, maps anytext-alignother than left, center and right to none, and clamps an
ordered liststartto 0 to 999 999 999. caretColorreturns a#rrggbbcolor from muse's chart palette. y-tiptap draws only that form,
so carets and selections without auser.colorwere transparent.loadEncreforgets 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:
PDFpasses--title=,--footer=and--image-dir=values, so a title starting with-
is not read as a flag. - Go:
Validatereturns an invalidVerdictfor input larger than the size limit instead of an
*Error. The new package variableMaxBytessets--max-byteson every call.
v0.9.3
Fixed
EditormethodsrevealPathandrevealBlockscrolled 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
Added
serializeMarkdownandserializeCommonMarkthrow anEncreDocumentError, exported, when the
document is invalid. It extendsErrorwith the same message as before, and carriespath, the
tree path of the failing node, andblockId, the id of that node or of the nearest block around
it that has one.EditormethodsrevealPath(path)andrevealBlock(blockId)select a node and scroll to it, so
an app can jump to the spot anEncreDocumentErrornames. A textblock's text is selected.Editor.exportMarkdownandexportCommonMarkhand anEncreDocumentErrortoonerrorbefore
they reject with it.- A markdown paste that
parseMarkdownrefuses still lands as literal text, and the editor now
hands theEncreMarkdownError(line,column,path) toonerror.
v0.9.1
Added
- encre-wasm
validateMarkdown(markdown)and the TypeScriptvalidateMarkdown, 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. parseMarkdownthrows anEncreMarkdownError, exported, which extendsErrorand carries
line,columnandpathwhen 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.