Docs / build (push) Canceled after 0s
Docs / deploy (push) Canceled after 0s
CI / go (Server) (push) Failing after 8m12s
CI / go (Web-App) (push) Successful in 11m16s
CI / frontend (push) Failing after 7m33s
CI / desktop (ubuntu-latest) (push) Successful in 1h25m49s
CI / mobile (push) Failing after 5m48s
CI / docker (push) Successful in 41m19s
CI / desktop (macos-latest) (push) Canceled after 0s
CI / desktop (windows-latest) (push) Canceled after 0s
Phase D of docs/AFFINE.md (ADR-14).
The canvas lives in the page's Y.Doc next to its text, in
ydoc.getMap("surface"): one Y.Map per element, each field its own entry so
concurrent edits merge. The page's text is a note on the canvas bound to
the same "default" fragment, so typing on the canvas is typing in the page.
Canvas edits have their own undo history through a Y.UndoManager.
- New package @docwell/canvas: viewport with pan, zoom and pinch;
selection, marquee, snapping, resize and rotate; notes, text, shapes
(plain or scribbled), connectors (straight, curve, elbow, with arrowheads
and labels), pen and eraser, frames, groups, pictures, embeds and link
cards, and mind maps (right, left or both sides; Tab, Enter, arrows).
A style bar over the selection; the last style per kind is the default.
- Presentation through frames, stickers and templates, PNG and SVG export.
- Page/Edgeless switch in the header, ?mode= in page and share links, a
per-page default (pages.default_mode) and a per-device default for new
pages; share links show the canvas read-only.
- Server: yrs writes the canvas into the document JSON as "surface",
adds its text to search, and writes it back on restores and templates.
- Phone: the bridge draws the canvas read-only (protocol 3) and the page
screen has a canvas button.
Strings are translated into all five languages and the user guide covers
edgeless mode.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
62 lines
1.8 KiB
JSON
62 lines
1.8 KiB
JSON
{
|
|
"name": "@docwell/editor",
|
|
"version": "0.0.1",
|
|
"private": true,
|
|
"license": "AGPL-3.0-or-later",
|
|
"type": "module",
|
|
"main": "./src/index.ts",
|
|
"exports": {
|
|
".": "./src/index.ts",
|
|
"./extensions": "./src/extensions.ts",
|
|
"./provider": "./src/provider.ts",
|
|
"./hashlinks": "./src/hashlinks.ts",
|
|
"./editor.css": "./src/editor.css",
|
|
"./edgeless": "./src/edgeless.ts"
|
|
},
|
|
"scripts": {
|
|
"test": "vitest run"
|
|
},
|
|
"dependencies": {
|
|
"@docwell/canvas": "*",
|
|
"@docwell/ui": "*",
|
|
"@excalidraw/excalidraw": "^0.18.1",
|
|
"@floating-ui/dom": "^1.8.0",
|
|
"@tiptap/core": "^3.32.2",
|
|
"@tiptap/extension-bubble-menu": "^3.32.2",
|
|
"@tiptap/extension-code-block": "^3.32.2",
|
|
"@tiptap/extension-collaboration": "^3.32.2",
|
|
"@tiptap/extension-collaboration-caret": "^3.32.2",
|
|
"@tiptap/extension-details": "^3.32.2",
|
|
"@tiptap/extension-highlight": "^3.32.2",
|
|
"@tiptap/extension-image": "^3.32.2",
|
|
"@tiptap/extension-list": "^3.32.2",
|
|
"@tiptap/extension-mathematics": "^3.32.2",
|
|
"@tiptap/extension-mention": "^3.32.2",
|
|
"@tiptap/extension-table": "^3.32.2",
|
|
"@tiptap/extension-text-align": "^3.32.2",
|
|
"@tiptap/extensions": "^3.32.2",
|
|
"@tiptap/pm": "^3.32.2",
|
|
"@tiptap/starter-kit": "^3.32.2",
|
|
"@tiptap/suggestion": "^3.32.2",
|
|
"@tiptap/vue-3": "^3.32.2",
|
|
"@tiptap/y-tiptap": "^3.0.12",
|
|
"katex": "^0.18.10",
|
|
"lib0": "^0.2.119",
|
|
"mermaid": "^12.2.0",
|
|
"pdfjs-dist": "^5.4.149",
|
|
"react": "^18.3.1",
|
|
"react-dom": "^18.3.1",
|
|
"y-protocols": "^1.0.7",
|
|
"yjs": "^13.6.33"
|
|
},
|
|
"peerDependencies": {
|
|
"vue": "^3.5.0"
|
|
},
|
|
"devDependencies": {
|
|
"@types/react": "^18.3.31",
|
|
"@types/react-dom": "^18.3.7",
|
|
"jsdom": "^30.1.3",
|
|
"vitest": "^5.0.5"
|
|
}
|
|
}
|