Skip to content

armgit / bento

Public Imported from GitHub
0

Bento, the office suite that fits in a file

spaces: the build-out — content blocks, formatting, dark mode, collaboration, and a starter that shows them (#344)

nyblnet231d3f0101d8
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index c1b453ab..330cdaf7 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -118,6 +118,22 @@ jobs:
# build rather than shipping a half-translated interface.
run: node scripts/build-spaces-i18n.mjs --check
+ - name: Spaces invite rig
+ # "Invite someone…" was `saveAs('copy')`, which serializes store.doc —
+ # so everyone invited to a space received `collab.ownerPriv`, the room's
+ # ROOT key: they could write, and they could revoke the person who
+ # invited them. Nothing about the copy looked wrong. This runs the real
+ # share functions against real WebCrypto keys and asserts on the bytes:
+ # the owner private key appears NOWHERE in an invite, the invite is a
+ # separate keypair that the owner actually signed (verified the way the
+ # relay verifies it), and a view-only copy holds no signing key at all.
+ # (Bundled: the kernel transport uses parameter properties, which node's
+ # strip-only TypeScript loader refuses.)
+ run: |
+ slides/node_modules/.bin/esbuild scripts/test-spaces-invite.ts --bundle --platform=node --format=esm \
+ --outfile="$RUNNER_TEMP/test-spaces-invite.mjs"
+ node "$RUNNER_TEMP/test-spaces-invite.mjs"
+
- name: Spaces undo rig
# Every checkpoint used to stringify the WHOLE document: measured on a
# 200-page, 2.5 MB handbook, fifty edits left an undo depth of NINE,
diff --git a/docs/DECISIONS.md b/docs/DECISIONS.md
index b3aeaf08..909b97f5 100644
--- a/docs/DECISIONS.md
+++ b/docs/DECISIONS.md
@@ -8,6 +8,44 @@ Reversing a decision = a new entry that supersedes the old one, not an edit.
Format:
```
+## 2026-08-19 — Page width has TWO settings, because it answers two questions
+
+The per-page control shipped in #325 answered "this page needs the room". It
+did not answer "I have a wide screen", and it made somebody say so on every
+page in a space one page at a time. Reported as still-narrow after it shipped,
+and MEASURED at a 2560px viewport: a 720px column using 31% of the area with
+1,591px empty beside it.
+
+Two settings now, and the split is the whole point:
+
+ · `Page.width` — DOCUMENT data. What this page needs; travels with the file.
+ · `bento-sp-width` — VIEWER data, in localStorage. What this reader's SCREEN
+ is; never written to the file.
+
+Precedence: the page, then the reader, then the board default, then the
+measure. A reader who sets it once gets it on every page that has not asked for
+something specific, and the document is byte-unchanged — verified: four pages
+at 1500px with no `width` key stored on any of them and no `"width"` anywhere
+in the serialized doc.
+
+That split is the rule locale and reduced motion already follow (PLATFORM §8):
+two people opening one space on a laptop and a 27-inch monitor should each get
+their own answer, and neither should write theirs into the file the other
+opens.
+
+THE BUILT-IN DEFAULT ALSO GROWS, `min(max(measure, 42vw), measure × 1.25)` —
+720px on a laptop, 900px at 2560px. Capped deliberately: 720px is already ~88
+characters at 16px, and past ~95 a line gets harder to read rather than easier,
+so the cap is a typographic limit and not a shortage of nerve. Filling a 2560px
+screen with one column of prose is not the goal; not showing a ribbon in the
+middle of it is.
+
+PRINT DOES NOT INHERIT THE READER WIDTH. Paper has a fixed width, and the size
+of the monitor somebody happens to be sitting at is not a fact about the page
+they are printing. Pinned in the rig.
+
+---
+
## YYYY-MM-DD — Title
Decision. Why. Pointers.
```
@@ -59,6 +97,308 @@ NOT done here, and worth weighing first: making **Download** the primary action
on the landing page (it is currently `btn primary` on "Try it in your browser")
would avoid the situation for most people and costs nothing. That is a site
change, not an app one.
+## 2026-08-23 — Sharing a space is a DERIVED document, and the sharer stays the owner
+
+bento/spaces' "Invite someone…" was `saveAs('copy')`, which serializes
+`store.doc`. `collab.ownerPriv` rides in that document and is the room's ROOT
+key — it signs writes and it signs revocations — so everyone invited to a space
+received the power to remove the person who invited them. Measured on the
+branch: the bytes that button wrote contained `ownerPriv` in full, and nothing
+about the copy looked wrong.
+
+**Every share copy is now derived, never the open document.**
+`spaces/src/share.ts` is the one place that says what a copy may carry:
+
+ invite room + read key + owner PUBLIC key + an owner-signed INVITE
+ (a delegation keypair). Revocable per device, and per invite.
+ view-only room + read key + public keys, and NO private half at all.
+ anything no `collab` block, by dropping it whole — a template, a page
+ else extract, the JSON on the clipboard.
+
+The stripper DELETES rather than rebuilds, so a private field added to
+`CollabCreds` later is covered without anyone acting. That is the same
+derive-by-removing rule `docForExport` already follows, and the two are NOT the
+same case: the clipboard copy must carry no capability, an invite must carry
+exactly one. Do not merge them.
+
+NO RELAY CHANGE WAS NEEDED OR MADE. v2 rooms, the owner → invite → member
+chain, per-socket key pinning and `rev.${pub}` are already deployed and already
+verified by the worker (docs/collab-design.md, "Phase 1 wire format"); this app
+was simply not using them. A new client that DEPENDS on relay behaviour still
+has to be sequenced after a relay deploy — that rule is unchanged and did not
+bind here.
+
+**Read-only is the relay's, the lock is a courtesy.** A view-only copy holds no
+signing key, so its socket presents no `?w=` and the relay stores and fans out
+nothing it sends. `main.ts` also opens it locked (`collab.role === 'reader'` →
+`store.readOnly`) with a banner, which is a THIRD reason to lock alongside
+`doc.readonly` (a sealed reading copy, no session) and `frozen` (a file this
+build does not understand). Only this one keeps receiving.
+
+**Five connection states, not two, and they must be repainted.** offline /
+view-only / live / connecting / off. Measured in a browser against the live
+relay: the button read "Connecting…" while the panel two inches below it read
+"Live — 1 connected". Both call the same `state()`; the panel is rebuilt on
+every open and the button was painted once at boot, because `onPeersChanged`
+was the only thing calling `sync()` — and in a room where nobody has arrived
+yet, that never fires. The transport's `onStatus` now drives it. Honest states
+are worth nothing if they are painted once.
+
+**Wording is lifted from bento/slides wherever the English string exists** —
+24 of the 31 new strings, including every sharing tooltip. Two apps must not
+describe one guarantee in two ways, and a reworded sentence costs eight fresh
+translations to say the same thing. The seven that were adapted say "space"
+where slides says "deck". (Noted in passing, not fixed here: the slides
+catalogs give "Editor copy saved — recipients join live with edit access" the
+translation of the ROLE word "Editor" in seven of eight locales. The spaces
+catalogs carry the correct sentence for that key.)
+
+Pinned by `scripts/test-spaces-invite.ts` — real WebCrypto keys, real
+functions, asserting on the bytes: the owner private key appears nowhere in an
+invite (the whole serialization is scanned, not the field), the owner's
+signature over the invite verifies the way the relay verifies it, and a member
+copy cannot mint invites. `scripts/test-export-secrets.ts` carries the cheap
+half, so a new button cannot route around the first rig.
+
+
+---
+
+## 2026-08-22 — The starter space is a release gate, not a document somebody updates when they remember
+
+`spaces/src/starter.ts` had been written once and left. Everything that shipped
+after it — tables, clips, link cards, comments, calculating lines, daily notes,
+page width, export-a-page, subtree import, the mark palette with its colours,
+live collaboration and presence, the properties panel — was absent from the one
+document every new user reads first, and its "Sharing & limits" page still said
+live collaboration was coming, months after it arrived. A starter that silent is
+not neutral: **a feature the starter does not demonstrate is a feature the
+starter denies**, and the tour was denying about half the app.
+
+So the doctrine is now ASSERTED rather than remembered. `scripts/test-spaces-agent.ts`
+structurally requires the starter to carry a table, a clip, a link card, an
+`asset:` picture, a page-link card, a callout, a FOLDED toggle, a calculating
+line, a palette colour, a comment thread, an archived page, a journal home and a
+page that sets its own width — plus determinism (two calls, byte-identical: ids
+here are CRDT node keys), every parent resolving IN PRE-ORDER, every `#p/` and
+pagelink target existing, no orphaned page, and assets and references agreeing.
+Adding a feature and not the demonstration now fails a rig instead of shipping.
+
+WRITING THE STARTER IS HOW THE CLAIMS GET TESTED, which is the whole argument
+for the doctrine. Two defects fell straight out of writing this one. A hand-authored
+table with `rows` and no fallback `html` put a working link on a page that
+back-linked to nothing — `buildIndex` reads `html`, and `writeTable` is the one
+writer that keeps the two in step, so the starter goes through it exactly as the
+issues go through `propBlock`. And `validate()` asked every AUDIO block for
+intrinsic `w`/`h`: pixels an audio player does not have, on a finding that would
+have fired for every correctly-authored clip in existence.
+
+THE ARCHIVED PAGE IS THE ⌘K DEMONSTRATION, one page doing both jobs the brief
+asked for: it is out of the sidebar, so search is the way in, and "Sharing &
+limits" names it by name because sending the file sends it too.
+
+IT COST 7,000 B, measured on the stack: 5,336 B of prose and 1,664 B of the two
+files it ships (`spaces/src/starterdata.ts` — a hand-written SVG drawing and a
+1.2 s test tone, both chosen so that deflate reduces them to almost nothing: the
+tone is exactly periodic and packs to 204 B). The ceiling moved 216 → 224 KiB in
+the same commit, with the numbers in `scripts/size-budgets.json`.
+
+THE STARTER IS NOT TRANSLATED, and that is deliberate rather than pending. The
+interface follows the reader (PLATFORM §8); a document is written in a language,
+and this one is written in English. Nine starters would be nine feature tours to
+keep in step, and the space a user then writes in would be the only untranslated
+one of the ten.
+
+---
+
+## 2026-08-22 — Inline marks: one canonical form, and the format's SECOND attribute
+
+Two decisions, taken together because the second only makes sense inside the
+first. Details in `spaces/src/marks.ts`; pinned in `scripts/test-spaces-model.ts`.
+
+**A block's marks have ONE canonical spelling.** §2.3 asked for "fixed mark
+nesting order, adjacent runs coalesced, no style" and only the middle third was
+implemented: `canonicalize` was a fixed-point loop of `</b><b>` → `''` string
+replacements, which cannot ask whether an `<i>` is inside or outside a `<b>`. So
+`<b><i>x</i></b>` and `<i><b>x</b></i>` were both canonical — one visible string,
+two byte spellings, and therefore a conflict in every diff and every future CRDT
+merge. The order, outermost first, is
+
+ a > mark > span > strong > em > u > s > sub > sup > code
+
+and `b`/`i` FOLD to `strong`/`em` on parse (the markdown importer already emitted
+the semantic pair; contentEditable emitted the presentational one, so files
+already carry a mix). `a` is outermost because a link split in two by a bold
+boundary is two links; `code` is innermost so its box hugs the text.
+
+**The engine is a pure string function, not DOM surgery.** `document.execCommand`
+is forbidden by §2.4(b) and ⌘B/I/U were calling it anyway. The replacement takes
+(inline html, plain-text offsets) and returns inline html — so the hard case,
+un-bolding half of a bold run, is pinned in a `node` rig instead of only in a
+browser. The DOM appears in two functions at the bottom of the file that convert
+a live Range to those offsets and back. `canonicalize` is now
+`canonicalMarks(sanitizeInline(html))`: what is ALLOWED needs a browser, what
+SHAPE it takes does not.
+
+**Colour is a CLASS on SPAN/MARK, matched by PATTERN, and never a `style`.** The
+vocabulary is Notion's — nine colours in two roles, `sp-fg-<name>` for the ink
+and `sp-bg-<name>` for the band behind it — and a closed vocabulary is the whole
+safety argument: the sanitizer matches a NAME instead of parsing CSS, and CSS is
+a language with `url()` in it. The allowlist is `/^sp-(fg|bg)-[a-z0-9-]{1,16}$/`
+and NOT an enumeration of today's nine, because of PLATFORM §3: with no server to
+migrate anything, a build that strips what it does not recognise DESTROYS
+documents written by a later one, so an enumeration would delete a tenth colour
+added in two years, silently, on the next edit touching the block. A pattern
+keeps it, round-trips it byte-for-byte, and renders it unstyled — degraded, which
+is recoverable. Values live in the app's stylesheet, so they can be tuned for the
+surface; an arbitrary hex in the document could not be.
+
+**Colour survives printing, and this is deliberately the opposite of the callout
+ruling.** A callout keeps its box, its rule, its tone's shape and its tone's
+name, so dropping the fill costs nothing. An inline colour has no second cue:
+drop it and the distinction the author drew is silently gone. `print-color-adjust:
+exact`, scoped to inline marks only.
+
+**Markdown: every mark the toolbar can apply exports, and imports back.** `mark`
+→ `==x==`, which is native Obsidian syntax and a Pandoc extension, so it
+round-trips outside this app too — the same standard the callout tones were held
+to. `u`, `sub`, `sup` and colour → raw inline html, which GFM permits and which
+is what Obsidian users fall back to as well; `_x_` for underline was rejected
+outright because it re-imports as ITALIC, and a mark that comes back as a
+DIFFERENT mark is worse than one that comes back as nothing. `htmlToMd` moved out
+of about.ts (where it was a DOM walk and therefore untestable, and where it had
+been silently dropping four marks) into marks.ts, over the same run list.
+
+---
+
+## 2026-08-22 — bento/spaces gets a CONTENT table, and its cells are strings
+
+**Decision.** A `table` block: `rows` (row-major, each cell INLINE HTML), `cols`
+(fractional column weights), `colAlign` (per COLUMN), `header` (absent = TRUE).
+No formulas, no recalculation, no cross-document references — the line from
+`working/spaces-design.md` §2.6. The database case is unaffected: it already
+shipped as the tracker (`doc.fields` + `prop` + `view`), and this is not a
+second one.
+
+**A cell is a bare string, not slides' `{html, color, bg, bold}`.** Slides' cells
+carry presentation because a canvas has no cascade; a space has a theme and a
+stylesheet, and a spaces cell's content is already rich — bold in a cell is
+`<b>`, through the same allowlist as every other block. So the entire `style`
+object and every per-cell override go away, and the only thing left in a cell is
+what someone typed. Alignment stays per COLUMN because that is exactly what a
+GFM rule row can say; per-cell alignment would export as a lie on every row.
+
+**`header` absent means TRUE**, which is the opposite of every other boolean in
+the model and is deliberate: a pipe table always has a header, so the header case
+is the one that should need no field, and a minimal hand-written
+`{type:'table', rows:[[…]]}` is then a first-class document. A headerless table
+exports with an EMPTY header row (GFM has no other way to say it) and the
+importer reads that back as `header:false`, dropping the empty row — otherwise a
+round trip grows a blank row each time.
+
+**The `html` fallback is the whole of format additivity for a block type**, so it
+is derived and rewritten on every table edit by the ONE writer (`writeTable`),
+never authored. It is the cells' own inline html joined, not their text, so a
+`#p/` link in a cell still produces a backlink (`buildIndex` reads `html`) and
+still exports as a link from a build that has no table case. It costs a second
+copy of the table's text in the file; a table that VANISHES in the build someone
+already has is not the cheaper option.
+
+**Shape is normalised at READ time (`tableOf`), never by repairing the file** —
+the same rule as `effectiveParents`, so two readers agree without exchanging an
+op and opening a space repairs nothing. Under collaboration `rows` is one
+last-writer-wins register: two people editing different cells at once keep one of
+the two edits. Slides' table has the identical limitation; the fix is a node per
+cell, which is a format change, so it is written down rather than half-built.
+
+**Editor chrome never goes inside an editable host.** The column grips first went
+into the first row's cells and were written into the document as cell content —
+and `caretToEnd` put the caret INSIDE the trailing `<button>`, so the first word
+typed in a column landed in the button and was eaten by the sanitizer on blur.
+They live in the wrapper now, absolutely positioned over each boundary. A cell is
+`data-cell` + `data-r`/`data-c`, never `data-edit`: that name means "this
+element's html IS the block's html", and the generic input handler would write
+one cell over the whole table.
+
+Details: `spaces/src/model.ts` (`tableOf`, `writeTable`, `tableFallbackHtml`),
+`spaces/src/blocks.ts` (the registry entry and `tableToMd`), `spaces/src/render.ts`
+(`renderTable`), `spaces/src/editor.ts` (`wireTables`, `tableKey`,
+`startColResize`), `spaces/src/markdown.ts` (the pipe-table branch, which replaced
+the "kept verbatim in a code block, mechanically upgradable the day a table block
+ships" workaround), and the table section of `scripts/test-spaces-model.ts`.
+## 2026-08-22 — spaces comments: the anchor IS where the thread is stored, and the block is why
+
+**Two anchors, and no third.** A thread is about a BLOCK or about a PAGE. A
+deck is a canvas, so slides can anchor a comment to an (x, y) and to nothing
+else; a space is a tree of pages of blocks, and the block is the thing that
+already has durable identity — ids are unique document-wide, never reused, and
+are what links, backlinks and the CRDT key on. A text RANGE inside a block is
+deliberately not an anchor: an offset pair has no meaning after the concurrent
+edit that moved it, the format is permanent, and shipping the wrong answer now
+would put it in every file. It is listed under "Not built yet" in
+`spaces/README.md` rather than half-built.
+
+**The anchor is expressed as STORAGE, not as a field.** `Block.comments` is a
+thread about that block; `Page.comments` is a thread about the page. That is a
+collaboration decision rather than a filing one. Under the shared engine
+(`kernel/src/sync/crdt.ts`) every non-container property is one
+last-writer-wins register per (node, key), so ONE `Page.comments` array — the
+slides shape, transliterated — would make every thread on a page contend for a
+single register: two people commenting on two different paragraphs in the same
+moment, and one comment is gone with nothing said. Per block, that case
+converges, because each block is its own CRDT node.
+
+**The caveat that remains, stated rather than pretended away.** Two people
+commenting on the SAME block concurrently, or on the same page, is still
+last-writer-wins on that one array — the same limitation slides' table `rows`
+carries, and for the same reason. Replies and resolve are in the array too, so
+a reply that races another reply on the same thread can lose. Making that
+converge means threads as their own CRDT nodes, which is an engine change, and
+kernel changes are serialized (docs/PARALLEL-WORK.md). It is not shipped
+blind: it is written in `model.ts` beside the type.
+
+Storing on the block also settles two lifecycle questions for free: deleting a
+block takes its threads with it (undoably, in the same step), and moving a
+block to another page carries them along.
+
+**Where the UI lives.** Not the gutter — a block already has one at the start
+edge, and it holds exactly two controls because a phone reserves 44px and fits
+one (2026-08-10, above); a third affordance there is a control no thumb can
+reach. Not a sidebar panel — the sidebar is the page tree, the one navigation
+this app has. Markers sit in the END margin, opposite the gutter, outside the
+text column so they never reflow the prose they are about (measured: block
+column ends at x = 1124.5, the marker sits at 1137.5). Page-level threads sit
+in a row under the title. The thread itself is the editor's existing popover —
+bottom sheet on a phone — so it dismisses like every other menu. The page tree
+carries only a COUNT of unresolved threads, which is the one comment fact worth
+knowing from another page.
+
+**Editor-only, structurally.** `render.ts` — the single renderer behind the
+editor, the reading view and print — has never heard of comments, and the
+editor paints markers only when it is not in the reading view. Verified in a
+real browser on the actual print tree: the whole-space print root rendered 11
+pages, 0 markers, and no occurrence of the substring at all. The print
+stylesheet drops them anyway, as a second line. `scripts/test-spaces-model.ts`
+pins all three as source assertions.
+
+**Comment text is PLAIN TEXT.** Not "sanitized like block html" — there is
+nothing to sanitize, because nothing is ever parsed as html: the model stores a
+string and the UI writes it with `textContent`. A comment arrives in a file
+somebody mailed you, written by a person who is by definition not the author of
+the document, and it has nothing to gain from bold. Verified in the browser: a
+comment reading `plain <b>text</b> please` renders as those characters.
+
+**The agent verb is READ-ONLY.** `bento.comments({resolved?, pageId?})` returns
+every thread, flat, each stating its anchor. Acting on a remark is the agent's
+job; resolving it is the commenter's — an agent that closed the thread it was
+asked to address would make the record untrue. Every field is coerced to the
+type the report promises, so a hand-edited file cannot make it throw halfway
+through and tell the caller the first two pages are all there is.
+
+**The name is `bento-author`**, the key the people panel already reads and
+writes. Two keys would let one file disagree with itself about who you are.
+
+**Cost.** +4,396 B on the shipped shell (166,482 → 170,878 B), inside the
+existing 176,128 B ceiling (97.0%); no budget change.
## 2026-08-19 — The shells are packed with zopfli, and the format does not move
@@ -4490,3 +4830,400 @@ document carrying `theme.dir: 'rtl'` the padding therefore went left while the
gutter went right — measured at 390px, the gutter landed at x = 378…412 and the
column scrolled to 412. It is reserved on `.sp-page-inner` now, so the two flip
together; the ltr metrics are byte-identical.
+
+## 2026-08-22 — spaces plays video and audio, and nothing in it ever autoplays
+
+`bento/spaces` gains a `media` block: ONE type carrying `kind: 'video' |
+'audio'`, mirroring `image` down to the hybrid `src` (`asset:` · `data:` ·
+`https:`), the remote-consent gate and the percentage width. Two types would
+have meant two registry entries, two renderer cases and two exporters kept
+saying the same thing, and everything that actually differs between a clip and
+a soundtrack is one branch wide.
+
+**Autoplay is recorded and never obeyed, and that lives in a FUNCTION.** Slides
+learned the shape of this the expensive way: autoplay set at render time fires
+on the editing canvas and in every thumbnail, so it belongs to present mode —
+the one surface that owns playback. A space has no such surface. It has an
+editor, a reading view, a printout and a file-manager still, and a clip that
+starts itself is wrong in all four: the reading view because a page you scrolled
+past should not start talking, the still because it is a picture.
+
+So the rule is not "the renderer happens not to set it", which is a property of
+one function that the next surface would have to rediscover. `blocks.ts
+mediaPlayback(b)` returns the flags a surface may apply and its `autoplay` is
+typed `false` — it cannot return anything else. `Block.autoplay` still
+round-trips untouched (PLATFORM §3), because a build that DOES have a
+playback-owning surface may legitimately write it. Pinned three ways in
+`scripts/test-spaces-model.ts`, including against a block that asks for it, plus
+a source assertion that `render.ts` never sets the attribute by any spelling.
+
+**Paper and thumbnails get a still, gated on `printing`.** That flag already
+means "this output cannot be interacted with", and both surfaces pass it —
+print, and `preview.ts`'s file-manager render. The still is the author's poster
+frame if there is one and a labelled box if not; never nothing, because a
+printed handbook that silently omits the paragraph where the demo video was is
+the same class of bug as a toggle that prints shut. `preview.ts` also bans
+`video,audio` outright, which is now defence in depth rather than the mechanism:
+by the time it runs there is nothing to ban.
+
+**A linked clip needs the reader's consent more than a linked image does.** A
+remote `<video>` asks its host for byte ranges the moment the element is parsed,
+so no autoplay is needed to make it a beacon — opening the space is the ping.
+Same gate, same host named, different words ("Video from {host}" / "Load this
+video"). The preview passes no `allowRemote` at all, so a still built for a file
+manager can never make a request: verified, the emitted preview carries zero
+`src` attributes.
+
+**The URL box is its own gate.** `src` is not inline html, so it never passes
+through `sanitize.ts` — a `javascript:` typed into "Use a link…" would be
+written straight onto the element. It is an `^https?://` ALLOWLIST, never a
+`javascript:` blocklist, matching the reasoning behind `HREF_OK`.
+
+**A clip exports as a markdown LINK.** Markdown has no video. `![](clip.mp4)` is
+image syntax and draws a broken-image glyph in every renderer that has ever
+existed; a bare URL becomes a player on github.com and on nothing else. A link
+is correct everywhere: it says what the thing is and where it is. The target is
+`src` verbatim, `asset:` and `data:` included, exactly as the image exporter
+already writes it — a link that does not resolve outside the space is the truth
+about an embedded clip, and a truthful dead link beats a dropped block.
+
+**Nothing is re-encoded.** `prepareImage` exists because a phone photo is 4000px
+wide in a 720px column; there is no equivalent cheap win for video, and
+transcoding in a browser tab means shipping an encoder and taking minutes over
+it. So `MEDIA_EMBED_BUDGET` (8MB, twice the image budget, matching slides) is
+the point at which the question is worth asking rather than a size we can
+rescue. A browser file picker hands over bytes and never a path, so "keep it on
+disk and point at it" cannot be offered — the URL field is the whole escape
+hatch, and it is where a "no" lands you.
+
+**Cost.** 166,482 → 172,722 B on the shipped shell (+6,240 B, +3.7%), and the
+`scripts/size-budgets.json` ceiling moves 172 → 176 KiB. That is the zopfli
+headroom being spent on a feature, which is what it was left for.
+## 2026-08-22 — A link card is what the author typed; nothing is fetched, ever
+
+**Decision.** bento/spaces gets a `link` block: a card for an address on the
+web, carrying `url`, `title`, `desc`, `site`, `icon` and an optional `image`.
+**Every field is stored in the file.** There is no fetch at render time, and
+there is no fetch at authoring time either — not even an explicit, opt-in one.
+The author fills the card in, and the dialog says so in the first line the eye
+lands on: "Nothing is fetched. A card shows what you type here — opening this
+space never contacts the site."
+
+**Why not at render.** Settled already: PLATFORM §1 (no network to open, edit,
+read or save) and "A space does not phone home when it is opened"
+(2026-08-03). A card that fetched on open would be the tracking pixel that
+decision was written about, wearing a card for a hat.
+
+**Why not an opt-in fetch in the EDITOR either** — the interesting half, since
+about.ts's update check is precedent that an explicit, documented, opt-out
+network touch can be on-platform. Three reasons, in order of weight.
+
+1. **It cannot work.** Reading a url's OpenGraph tags means reading a
+ cross-origin HTML body. `fetch` gets an opaque response under `no-cors` and
+ a CORS failure otherwise; from `file://` — the origin this format exists for
+ — it fails outright. Notion and Slack do this on a SERVER, which is exactly
+ the component Bento does not have. The only way to ship it is a proxy we
+ run, i.e. a backend, i.e. off-platform. A feature that needs a server is not
+ a feature this app can have a debate about.
+2. **The update check is a different shape.** It contacts ONE origin we
+ control, on a schedule the reader can turn off, to verify a signature
+ against a key already in the file. A metadata fetch contacts an ARBITRARY
+ third party named by the document — the author's choice, made with the
+ editor's user's IP address. That is a category the update channel is not in.
+3. **The honest v1 is the one that stays honest.** A stored card is legible in
+ the JSON, diffable, works offline, and cannot rot into a request when
+ someone later "just adds a refresh button".
+
+**The url is untrusted input.** It is a block FIELD, so it never passes through
+`sanitizeInline` — `sanitize.ts` exports `externalHref()` for it, the outward
+half of `HREF_OK` (`https:`, `http:`, `mailto:`), tested against the RAW string
+for the documented `.href` reason. An allowlist, not a blocklist: the URL
+parser strips tabs, newlines and leading whitespace from a scheme, so
+`ja\tvascript:` and ` javascript:` are both `javascript:` when followed and
+neither starts with `https:`. A url outside the list renders as a DEAD card
+that keeps its title — it degrades, it does not vanish, and it is never an `<a>`
+that goes nowhere. Pinned with eleven hostile forms in the model rig.
+
+**No remote images, and no placeholder either.** `image` is `asset:` or `data:`
+and nothing else; a remote one is DROPPED by `linkCard()` rather than deferred
+behind a "load this image" button. The image block's placeholder stands in for
+the block's entire content, so a reader has something to consent TO; a card's
+thumbnail is decoration beside a link that already works. The editor's picker
+runs the same `prepareImage` → `internAsset` path an image block does, so a
+picked thumbnail is embedded bytes.
+
+**`html` is written beside the fields**, exactly as a `prop` block does it, by
+ONE writer (`editor.applyLinkCard`). Format additivity is a promise about what
+OLD builds do, and it is only kept if the readable fallback is written at the
+same moment as the fields.
+
+**In Markdown a link card is a link** — `[title](url) — description`, with
+brackets escaped and the angle form for a url holding a space. Not a table, not
+an html `<div>`: every card-shaped export stops being a link the moment it
+leaves this app, and where it points is the one fact that cannot be
+reconstructed. A card with no valid url exports as its plain text, so a reader
+is never handed something to click that goes nowhere.
+
+**Deliberately NOT in this change:** pasting a bare url as a card. That belongs
+to the paste pipeline, which is another agent's zone right now, and a second
+document-level `paste` listener would race the first. The insert paths are the
+`/` menu and the Insert dropdown.
+
+**Verified.** 514/514 in `scripts/test-spaces-model.ts` (up from 460), which
+now includes the negative: `linkCard()` drops six shapes of remote image, and
+`render.ts` contains no `fetch`/XHR/`new Image()` and reads its only `img.src`
+from the filtered value. In Chrome, on a served copy carrying four cards —
+including one whose `image` is `https://tracker.invalid/pixel.png` and one
+whose url is `javascript:alert(1)` — `performance.getEntriesByType('resource')`
+was EMPTY and the network panel showed one `blob:` (the shell's own inflated
+module) and nothing else. Shell 166,482 → 171,074 B, inside the 176,128 ceiling;
+no budget change.
+
+## 2026-08-22 — The two portability exits for bento/spaces, and what each one refuses to carry
+
+**Decision.** `spaces/src/portable.ts` owns both directions of "a space is never
+a dead end": `extractSpace()` cuts one page (optionally its subtree) out as a
+complete `bento/spaces` file, and `planGraft()` nests another space's pages
+under a page of this one. Pure and DOM-free like `markdown.ts`; the browser
+halves are `editor.openExportSpace` / `editor.importSpace` and one hook in
+`main.ts`. Five things were settled, all of them the kind that fail silently.
+
+**A fresh `docId`, and no `collab` whatsoever.** An extract that kept the parent
+document's id is a FORK of it: `SyncSession` keys BroadcastChannel on `docId`
+and the saved file IS the capability, so a three-page extract would join the
+two-hundred-page space's room and sync into it. Keeping `collab` is worse than
+that — `room`, `key`, `writerPriv`, `ownerPriv` and the invite chain are the
+capability to read and write the WHOLE space, and handing them to someone you
+sent three pages to is the leak the reader-copy paths already strip for. So the
+extract mints a new id and carries no credential at all. `template` goes too (it
+re-mints `docId` on every open, which would undo the identity just given);
+`readonly` STAYS, because upgrading a reading copy is not the exporter's call.
+
+**A link out of the extracted set becomes the literal `[[Page title]]`** — the
+same thing an unresolvable wikilink becomes on the way IN (`resolveWikilinks`).
+Text that names the page is honest, searchable, exports as correct Markdown, and
+re-resolves if the halves are reunited. The alternatives are worse in both
+directions: a silently unlinked label lies about what the file said, and a live
+`#p/<id>` that resolves to nothing looks fine until it is clicked — and after an
+import it can land on a STRANGER page that happens to hold that id.
+
+**Only referenced assets travel.** Images are the only thing in a space with
+real weight; an export carrying the whole document's assets is a copy with pages
+hidden. Fonts are the exception and not really one: `doc.fonts` is named by the
+theme, so every page references them.
+
+**Ids on the way in: keep, and rename only a collision** — via model.ts's
+`repairId`, now exported. Ids are unique across a document and never reused, so
+pages and blocks are claimed from one namespace; keeping the ones that do not
+collide means links, backlinks and future CRDT node keys survive an import that
+did not have to touch them, and the derivation is FROM THE BYTES for exactly the
+reason written beside `repairId` (never `Math.random`, never `docId`, which
+`template: true` moves). Links inside the import follow the rename in the same
+pass, so nothing arrives pre-broken. Assets merge on content addressing, with
+the byte-compare and `~n` variant `internAsset` already uses — trusting a key
+alone would replace the host's image with the visitor's, silently, in a file the
+author then mails.
+
+**The imported file is untrusted and gets no side door.** Its document block is
+read from an inert `DOMParser` document (no browsing context: nothing runs, no
+resource loads), `parseDoc` decides whether it is a space and REFUSES rather
+than degrading (the load contract), an encrypted envelope is reported instead of
+guessed at, and `sanitizeInline` runs over every arriving block before any of it
+reaches the document. The graft is one `store.commit`, so it is one ⌘Z, like the
+Markdown import.
+
+**Guarded.** `scripts/test-spaces-model.ts` runs the whole round trip — extract a
+subtree, import it into a space that collides on every id and on an asset key —
+and asserts no id collision, no dangling link, no credential in the bytes, the
+asset merge in both directions, and additivity through both legs. The one-undo-
+step half is in `scripts/test-spaces-undo.ts`, which is bundled and has the real
+Store.
+
+**Cost.** Shell 166,482 → 175,690 B (+9,208, 5.5%); `scripts/size-budgets.json`
+raised 176,128 → 184,320 in the same commit, because 438 B of headroom is inside
+the packer's own cross-node-version spread and would fail CI for no reason.
+
+## 2026-08-22 — bento/spaces: a properties panel that defaults to closed
+
+**Decision.** bento/spaces gets a right-hand properties panel (`spaces/src/props.ts`),
+structurally the page tree's mirror image — same `.sp-resizer` strip, same
+chevron, same drag-to-resize and double-click-to-reset, same
+`localStorage`-only state. It shows BLOCK properties for the block the caret or
+the last click was in, and PAGE properties underneath, in accordion sections
+whose open state is remembered per title exactly as slides' `.ed-section`
+retrofit does.
+
+**Why a panel at all.** The settings existed; the place to look for them did
+not. A table's shape came from a bar above the table, a code block's language
+from a hover chip, an image's width from a floating tool row, a link card's
+fields from a per-block menu, and the page's own width from the PAGE menu. Each
+is discoverable only by someone who already knows it is there, and none of them
+answers the question in the general case. **The old surfaces stay** — the chip
+on a callout is still the fastest way to change a tone, and deleting it to
+justify a panel would be a worse editor with a tidier diagram.
+
+**CLOSED BY DEFAULT, and this is the load-bearing part.** `spaces: a wide screen
+gets a wide page` (aacf7e2) had just given the reading column the window's
+slack, after the complaint that a 720px column on a 2560px screen used 31% of
+the area. A panel holding 280px of that open on every screen forever, for
+settings most people change once a month, takes the fix straight back. So:
+`inspClosed = true`, and only an explicit `'0'` in `bento-sp-insp-closed`
+(written when somebody opens it) makes it open — an absent key, a new browser
+or a storage exception all mean closed. While closed the panel is
+`flex-basis: 0` with no inline padding and no border, so `.sp-main`'s
+`flex: 1 1 auto` takes the width straight back.
+
+MEASURED, closed, against the same shell without this change: at 1280px the
+reading column is 720px either way; at 2560px it is 900px either way. The whole
+cost is the 5px chevron strip (main 1031 → 1026 and 2311 → 2306), which is what
+buys a control on the panel's own edge instead of one in a toolbar across the
+room.
+
+**Below 820px it is an overlay, not a column** — the bargain the page list
+already makes at the same breakpoint, with the same `.sp-scrim` to tap away.
+
+**Its topbar button exists only where the chevron cannot.** Above 820px the
+strip carries the control, so a second one in the bar would be the duplication
+`.sp-panel-toggle` already documents avoiding. Below 820px the button leads —
+until `fitTopbar` folds the bar, when it moves into ⋯ with undo/redo and the
+export actions. MEASURED at 375px: leaving the 40px button in a folded bar took
+the document title from 70px to 26px, which is a title nobody can read in
+exchange for a control that is one row of an already-open menu.
+
+**One control, one commit, one ⌘Z.** Every block edit goes through a single
+helper wrapping one `store.commit`, and every text field commits on `change`
+rather than `input` — `input` would buy an undo entry per keystroke, which is
+the exact thing `store.ts`'s typing run exists to avoid.
+
+**Which block the panel means** is tracked on `focusin` AND `mousedown`, capture
+phase, on `.sp-main`. `focusin` alone answers for text and stays silent for
+tables, images, clips and cards — exactly the types with settings worth a panel.
+`mousedown` rather than `pointerdown` because a real click fires both while a
+driven one may not, the same wall CLAUDE.md records for Gesto in slides.
+
+**Guarded.** `scripts/test-spaces-model.ts` pins the default-closed preference,
+the three properties of the closed geometry, that nothing about the panel
+reaches the document, the overlay below the breakpoint, the accordion's
+persistence, the one-commit rule, and that the block chips survived.
+
+**Cost.** Shell 196,950 → 203,654 B (+6,704, 3.4%); `scripts/size-budgets.json`
+raised 204,800 → 212,992 in the same commit, because 1,146 B of headroom is
+inside the packer's own cross-node-version spread and would fail CI for no
+reason.
+
+## 2026-08-22 — bento/spaces goes dark, and its reading column goes with it
+
+**The theme is a VIEWER preference and never document data.** localStorage
+`bento-theme`, through `kernel/src/theme.ts`, which slides already shipped
+(#285) — the same rule the interface locale and reduced motion follow, and
+PLATFORM §8's. Two people opening one space are two readers in two rooms; a
+theme in the file would travel to the recipient and override theirs, and it
+would make a file's bytes depend on who last looked at it. `startTheme()` runs
+AFTER `capturePristine()` in main.ts for exactly that reason, and the saved
+`<html>` tag was measured bare: no `data-theme`, no `color-scheme`.
+
+**WHERE THIS DIVERGES FROM SLIDES, AND WHY.** slides themes only the chrome
+AROUND the deck: a slide is a bounded page on a canvas, its background is data
+the author chose, and someone proofing at midnight still needs to see what will
+be projected. Spaces has no such page. `--bg` is THE ONE GROUND — bar, both
+panels and the reading column all sit on it with hairlines and nothing else
+between them, which is what the chrome-reads-as-one-document work settled one
+commit earlier. A dark interface with a white reading column would be a white
+rectangle filling most of the window: not a dark interface, and a
+re-introduction of the floating-card look that was deliberately removed. So in
+spaces the reading surface IS chrome and it follows the reader.
+
+`doc.theme.background/color/accent` still exist in the format and are still the
+DOCUMENT's colours — but nothing in the live app paints them; the only consumer
+is `preview.ts`, the static file-manager still. That surface stays the author's
+in both themes, unconditionally: it renders with scripting off, so there is no
+localStorage, no reader and no preference to honour — only a file manager
+drawing a thumbnail. A `prefers-color-scheme` block there would be a guess made
+on someone's behalf. If it ever changes it changes with the FORMAT.
+
+**The document's own colour VOCABULARY does follow the reader**, and that is
+the same ruling read from the other side. The nine `sp-fg-*`/`sp-bg-*` marks
+and the five callout tones are a closed vocabulary of NAMES — the author picked
+"red", not `#c0392b` — which is precisely why the value under each name can be
+tuned per surface, as the palette comment has said since the marks shipped. An
+ink measured to clear 4.5:1 on white is a smudge on a near-black ground, so
+each `--c-*` carries a light value and a dark one. The BANDS need only one set:
+they mix into `transparent` and land correctly on either.
+
+**Callout tones are ONE HUE each, and the box derives from it.** The fill is
+that hue mixed into `--bg`, the label is it mixed into `--ink` — a pale tint
+with a dark label on white, a deep tint with a lifted label on near-black, from
+five numbers instead of thirty. Measured both ways: labels 4.98–6.49:1 light,
+6.5–8.4:1 dark.
+
+**THREE STATES, so the dark values appear TWICE.** A reader chose light, chose
+dark, or chose nothing. The choice stamps `data-theme`; the default follows the
+OS. So dark is stated under `@media (prefers-color-scheme: dark)` guarded
+`:not([data-theme="light"])` AND under `[data-theme="dark"]`, or the picker
+only works in one direction. Verified with the attribute removed: dark OS →
+dark, light OS → white, `data-theme="light"` under a dark OS → white.
+
+**BOTH ARE @media screen, AND THAT IS HOW PAPER STAYS LIGHT.** Print matches
+neither, so on paper the unconditional light block is simply what applies and
+the print sheet needs no third copy of the palette. It carries one line the
+media query cannot: `color-scheme: light only !important`, because theme.ts
+writes `color-scheme` INLINE on `<html>` and an author `!important` is the only
+thing that beats an inline style.
+
+**An image gets a white ground in both themes.** Document content is never
+inverted, dimmed or filtered — but a diagram or logo exported against a
+transparent background is a shape floating in nothing on a dark page, and
+black-on-transparent artwork vanishes outright. So `.sp-b-image img` paints
+white behind itself and takes a hairline, in light as well, so the two themes
+frame a picture the same way.
+
+**Where the control lives.** About → Appearance, directly above Language: they
+are the same kind of thing, preferences belonging to whoever opened the file.
+It is built in its own `spaces/src/appearance.ts` and costs about.ts one import
+and one `card.append(...)` — about.ts is a 355-line function that several
+branches edit at once, and this is the smallest seam that still puts the
+control in the right place.
+
+**Guarded.** `scripts/test-spaces-model.ts` gained twelve checks: both dark
+blocks exist and are byte-identical, they define every role light does and
+invent none, every themed role is actually referenced by a rule, the light
+palette has not forked from slides and type, no literal colour survives outside
+the token blocks and the print sheet (three named exceptions), `startTheme()`
+runs after `capturePristine()`, the Appearance control never touches the store,
+and the still preview has no theme of its own.
+
+**Cost.** Shell 213,434 → 215,002 B (+1,568, 0.7%). No budget raise: the
+ceiling stays 221,184.
+
+## 2026-08-22 — bento/spaces checks for updates at launch, and the About dialog says so
+
+**Decision.** bento/spaces asks its release server for a signed manifest once at
+launch, gated on the kernel's `bento-auto-check` preference, and the About
+dialog carries the switch that turns it off. It was manual-only before, which
+left the switch nothing to switch.
+
+**Why this is not "phoning home."** The 2026-08-03 rule ("A space does not phone
+home when it is opened") is about the DOCUMENT: an author who mails you a file
+must not learn your address and the moment you opened it, which is what a remote
+`<img>` in a page delivers. This is the APP asking its own release origin
+whether it is current, on the reader's behalf and under the reader's switch. It
+sends no id and carries nothing from the document; a remote `src` in a document
+still renders as a placeholder naming the host, unchanged. The two rules answer
+different questions and both still hold.
+
+**Same preference as slides,** which has checked at launch since v0.9. One key,
+`bento-auto-check`, so turning it off in one app turns it off in both — a suite
+where the same switch means different things in two apps is worse than a suite
+with no switch.
+
+**The result only changes a sentence.** The check is `void`ed and its failure
+swallowed: a launch with no network reads "Launch check couldn't reach the
+release server (…). Check manually below." and nothing else about the app
+differs. There is no badge, no banner and no automatic download; updating is
+still a button somebody presses.
+
+**Where it is stated.** In the dialog, beside the switch, in the reader's own
+language: "An update check is the only network this app makes on its own. It
+asks the release server for a signed manifest and sends nothing about you or
+this document — no ids, no telemetry." Live collaboration is network too, but
+it is network the reader started.
diff --git a/docs/spaces-agents.md b/docs/spaces-agents.md
index 0f22ff45..8d151b43 100644
--- a/docs/spaces-agents.md
+++ b/docs/spaces-agents.md
@@ -77,6 +77,7 @@ unique ids the first time.
| `divider` | — | `<hr>` |
| `image` | `src` (see below), `alt`, `caption`, `width` (10–100 **%**), `w`/`h` (intrinsic px) | `<figure>` |
| `pagelink` | `page` | a card linking to another page |
+| `link` | `url`, `title`, `desc`, `site`, `icon`, `image`, `html` | a card linking OUT of the space — see **Link cards** |
| `prop` | `key`, `value`, `html` | one field value — see **The issue tracker** |
| `view` | `layout`, `groupBy`, `html` | a board or list of this space's issues |
@@ -84,6 +85,29 @@ unique ids the first time.
and renders its `html` as a fallback. Properties are **flat on the block** —
there is no `props` object.
+### Link cards
+
+A `link` block is a card for somewhere on the web. **Every field is stored in
+the file and nothing is ever fetched** — there is no server to read a url's
+OpenGraph tags with, and opening a space must never contact a third party
+(PLATFORM §1). So write the card yourself:
+
+```jsonc
+{ "id": "b7", "type": "link",
+ "url": "https://example.com/docs", // https:, http: or mailto: — nothing else is made clickable
+ "title": "The guide", // absent falls back to the url
+ "desc": "Everything about the thing",
+ "site": "example.com", // absent is derived from the url's host
+ "icon": "📘", // one emoji
+ "image": "asset:<key>", // OPTIONAL, and asset:/data: only — a remote one is DROPPED
+ "html": "<a href=\"https://example.com/docs\">The guide</a> — Everything about the thing" }
+```
+
+Write `html` too: it is what a build that predates this type renders, exactly
+as it is for `prop`. A `javascript:` or `data:` url renders as a dead card that
+keeps its title rather than as a link — `validate()` reports both that and a
+remote `image`. Use `pagelink`, not this, for a page inside the space.
+
### Callouts
`tone` is one of `note` `tip` `important` `warning` `caution` — GitHub's alert
@@ -273,6 +297,7 @@ bento.search(q) // [{pageId, title, blockId}]
bento.outline() // the whole space as a tree
bento.validate() // what is wrong or suspect
bento.stats() // pages, blocks, words, bytes, biggest assets
+bento.comments(query?) // review threads, flat, with a typed anchor
// write — each one is ONE undoable step
bento.fields() // the field schema in force
@@ -382,6 +407,25 @@ This answers "why is this file 30 MB". It is always the images: prose is free
asset — `0` means it is dead weight, and deleting the key is pure savings. The
app shell adds a fixed ~80 KB on top of `bytes.document`.
+### `bento.comments()`
+
+```js
+bento.comments({ resolved, pageId })
+// [{ id, anchor:'block'|'page', pageId, pageTitle, blockId?, url:'#p/<id>',
+// author, at, text, resolved, replies:[{id, author, at, text}] }]
+```
+
+What a person flagged, from every page, in document order. `anchor` says what
+the thread is about: a `block` (and `blockId` names it) or the `page` as a
+whole. `text` is **plain text** — never html, in or out. Start with
+`bento.comments({ resolved: false })`: those are the ones still asking for
+something.
+
+It is **read-only, deliberately**. Acting on a remark is your job; marking it
+resolved is the commenter's, and an agent that closed the thread it was asked
+to address would make the record untrue. Say what you did in a block, and leave
+the thread open.
+
### The patch verbs, exactly
```js
diff --git a/scripts/size-budgets.json b/scripts/size-budgets.json
index 5add789a..56028e47 100644
--- a/scripts/size-budgets.json
+++ b/scripts/size-budgets.json
@@ -3,8 +3,8 @@
"shells": {
"spaces": {
"path": "spaces/dist-single/Bento_Spaces.bento.html",
- "max": 176128,
- "//": "172 KiB, and there is real headroom under it again. Zopfli (scripts/postbuild-compress.mjs) took the shell from 173,598 to 166,482 B — 7,116 B, 4.1% — WITHOUT dropping a feature, so the ceiling deliberately stays where the collaboration UI put it: the next feature spends genuine headroom instead of triggering a fifth raise. Measured savings elsewhere from the same change: slides 26,300 B, dash 4,804 B, type 616 B. Headroom is also deliberate for a duller reason — the shell is mostly one compressed block and the packer's output differs across node versions (one commit measured 130,095 B on node 26 locally and 131,246 B on CI node 24), so a tight ceiling fails in CI for no reason. CI is the number that counts."
+ "max": 262144,
+ "//": "256 KiB, raised from 240 KiB by the collaboration build-out. Measured on this branch, node 26: 238,862 B before, 250,594 B after, +11,732 B. Split, by building the same tree twice with the OLD packed catalog swapped back in: CODE is +2,308 B (share.ts, the People panel with roles and per-member Remove, the five honest connection states, the view-only lock) and LANGUAGE is +9,424 B — 31 new strings x 8 locales, four fifths of the raise. That ratio is the same one the previous note recorded and it is the honest cost of an app that opens in eight languages out of one file; twenty-four of the thirty-one strings were LIFTED from the bento/slides catalogs rather than reworded, which is what kept it to this. Headroom stays deliberate: the shell is mostly one compressed block and the packer's output differs across node versions (one commit measured 130,095 B on node 26 locally and 131,246 B on CI node 24), so a tight ceiling fails in CI for no reason. Earlier history: 166,482 B before the M3/M4 content work, the formatting UI, dark mode, the rebuilt About and the starter space, 238,862 B after."
}
}
}
diff --git a/scripts/test-export-secrets.ts b/scripts/test-export-secrets.ts
index 7d997aae..b5acc5dc 100644
--- a/scripts/test-export-secrets.ts
+++ b/scripts/test-export-secrets.ts
@@ -281,5 +281,107 @@ for (const app of CLIP_APPS) {
`${app}/src/model.ts: docForExport strips by REMOVING collab, not by listing fields to keep`)
}
+// ---------------------------------------------------------------------------
+// SHARE COPIES, in every app that can send one.
+//
+// The clipboard checks above are about a copy that must carry NO capability.
+// An invite is the opposite case and the harder one: it has to carry SOME
+// capability or it cannot join, so "did this path strip?" is not the question —
+// the question is WHICH capability it kept.
+//
+// Measured on bento/spaces, 2026-08-22: "Invite someone…" was
+// `invite: () => { void this.saveAs('copy') }`, and `saveAs` serializes
+// `store.doc`. Everyone invited to a space therefore received `ownerPriv` —
+// the root key of the room, which signs writes AND revocations — so an invited
+// person could remove the person who invited them. The hint under the button
+// read "Saves a copy that joins this session", which was true and was not the
+// whole truth.
+//
+// What is checked here is the SHAPE of the call site: a share copy is written
+// from a DERIVED document, never from the live one. The cryptographic proof
+// that the derived document holds no owner key lives in
+// scripts/test-spaces-invite.ts, which runs the real functions against real
+// keys; this is the cheap check that stops a new button from routing around
+// them.
+
+console.log('\nshare copies')
+
+/**
+ * The body of a MODULE-LEVEL `export function NAME(…)`.
+ *
+ * `bodies()` above cannot be used here and the reason is worth recording: its
+ * declaration pattern also matches any two-space-indented `name(` — which in a
+ * class file is a method and in a module file is an ordinary CALL. share.ts
+ * calls `stripCollabSecrets(out, …)` from inside two other functions, so the
+ * map's last-wins would hand back a call site, and the checks below would then
+ * pass or fail against the wrong text. Anchoring on `export function` is exact.
+ */
+function exportedBody(src: string, name: string): string {
+ const masked = mask(src)
+ const decl = new RegExp(`^export (?:async )?function ${name}\\s*\\(`, 'm')
+ const m = decl.exec(masked)
+ if (!m) return ''
+ let p = m.index + m[0].length - 1
+ for (let depth = 0; p < masked.length; p++) {
+ if (masked[p] === '(') depth++
+ else if (masked[p] === ')' && --depth === 0) break
+ }
+ const open = masked.indexOf('{', p)
+ if (open < 0) return ''
+ let depth = 0
+ let i = open
+ for (; i < masked.length; i++) {
+ if (masked[i] === '{') depth++
+ else if (masked[i] === '}' && --depth === 0) break
+ }
+ return src.slice(open, i + 1)
+}
+
+const SHARE_APPS = ['spaces']
+for (const app of SHARE_APPS) {
+ const rel = `${app}/src/share.ts`
+ let src: string
+ try { src = read(rel) } catch {
+ ok(false, `${rel} exists — share copies must be minted in one place`)
+ continue
+ }
+ const stripper = exportedBody(src, 'stripCollabSecrets')
+ ok(!!stripper, `${rel}: found stripCollabSecrets() — the checks below are worthless without it`)
+ ok(/delete doc\.collab\.ownerPriv\b/.test(stripper), `${rel}: the stripper drops ownerPriv`)
+ ok(/delete doc\.collab\.writerPriv\b/.test(stripper), `${rel}: the stripper drops writerPriv`)
+ ok(/delete doc\.collab\.invite\b/.test(stripper), `${rel}: the stripper drops any invite it holds`)
+ ok(/delete doc\.collab\b(?!\.)/.test(stripper),
+ `${rel}: the stripper drops the whole block by default — the room key is a capability too`)
+
+ const inviteFn = exportedBody(src, 'inviteCopy')
+ ok(/stripCollabSecrets\(\s*out\s*,\s*\{\s*keepRoom:\s*true\s*\}\s*\)/.test(inviteFn),
+ `${rel}: inviteCopy strips before it delegates`)
+ ok(/mintInvite\(/.test(inviteFn), `${rel}: inviteCopy mints a SCOPED invite rather than passing the room's own keys`)
+ const masked = mask(inviteFn)
+ ok(masked.indexOf('stripCollabSecrets(') < masked.indexOf('mintInvite('),
+ `${rel}: it strips FIRST — a stray writerPriv beside an invite is a second, unrevokable way in`)
+ ok(!/ownerPriv\s*[,}]/.test(mask(exportedBody(src, 'readerCopy'))),
+ `${rel}: readerCopy never re-attaches a private key`)
+
+ // The call site. A share copy must reach the file through a writer that takes
+ // a DOCUMENT — the ordinary save path serializes the open one.
+ const ed = read(`${app}/src/editor.ts`)
+ const share = bodies(ed).get('shareCopy') ?? ''
+ ok(!!share, `${app}/src/editor.ts has a shareCopy()`)
+ ok(/inviteCopy\(|readerCopy\(/.test(share),
+ `${app}: the share button derives its document (inviteCopy/readerCopy)`)
+ ok(!/saveAs\(/.test(mask(share)),
+ `${app}: the share button does NOT reach the ordinary copy path — that path writes store.doc, credentials and all`)
+ ok(/onShareCopy\?\.\(/.test(share), `${app}: it writes through the share-copy hook`)
+
+ // …and that hook must encrypt, and must not become the ⌘S target.
+ const main = read(`${app}/src/main.ts`)
+ const hook = main.slice(main.indexOf('editor.onShareCopy'), main.indexOf('editor.onShareCopy') + 400)
+ ok(/serializeAuto\(/.test(hook),
+ `${app}: onShareCopy writes through serializeAuto — an active password reaches the shared copy`)
+ ok(!/keepHandle:\s*true/.test(hook),
+ `${app}: onShareCopy does not retain the file handle — the next ⌘S must not overwrite the copy with the full document`)
+}
+
console.log(`\n${checks - failures}/${checks} checks passed`)
if (failures) process.exit(1)
diff --git a/scripts/test-spaces-agent.ts b/scripts/test-spaces-agent.ts
index 2ec0507a..3f188ef2 100644
--- a/scripts/test-spaces-agent.ts
+++ b/scripts/test-spaces-agent.ts
@@ -33,13 +33,13 @@
// construction (it plans mutations; the editor applies them), which is what
// makes this rig possible at all — and is worth preserving.
-import { parseDoc, FORMAT, type SpacesDoc } from '../spaces/src/model.ts'
+import { parseDoc, buildIndex, FORMAT, type SpacesDoc } from '../spaces/src/model.ts'
import { starterDoc } from '../spaces/src/starter.ts'
import {
validateDoc, outlineDoc, statsDoc,
planInsertBlocks, planUpdateBlock, planRemoveBlocks, planMoveBlock,
planUpdatePage, planRemovePage,
- fieldsReport, issuesReport, planSetField, planNewIssue,
+ fieldsReport, issuesReport, planSetField, planNewIssue, commentsReport,
} from '../spaces/src/agent.ts'
import { DEFAULT_FIELDS, ISSUE_FIELDS, propHtml, isIssue, valuesOf, columnMoves } from '../spaces/src/fields.ts'
@@ -150,6 +150,120 @@ console.log('bento/spaces agent surface\n')
'every starter issue is nested under a page that exists')
}
+// ---- the starter is DETERMINISTIC -----------------------------------------
+// Ids here are CRDT node keys, not tidiness. Two people opening the shipped
+// file have to agree on every one of them, and `starterDoc()` mints them from
+// a counter — so anything that reads the clock, calls uid() or depends on an
+// iteration order gives two readers two documents that look identical and
+// cannot merge. Compared as JSON because that is exactly what gets saved.
+{
+ ok(JSON.stringify(starterDoc()) === JSON.stringify(starterDoc()),
+ 'starterDoc() emits the same document twice, byte for byte')
+}
+
+// ---- the starter's own links all land -------------------------------------
+// The starter is the one document nobody proof-reads twice, and every defect in
+// it ships to every new user. validate() covers broken links and dead hrefs
+// already; these are the structural invariants it does NOT check.
+{
+ const starter = starterDoc() as unknown as SpacesDoc
+ const byId = new Map(starter.pages.map((pg) => [pg.id, pg]))
+
+ // PRE-ORDER, not merely "the parent exists": a child that precedes its parent
+ // in doc.pages breaks the invariant the sidebar, the export and the journal
+ // insertion all rest on.
+ const seen = new Set<string>()
+ const badParents: string[] = []
+ for (const pg of starter.pages) {
+ const parent = (pg as { parent?: string }).parent
+ if (parent && !seen.has(parent)) badParents.push(`${pg.title} → ${parent}`)
+ seen.add(pg.id)
+ }
+ ok(badParents.length === 0,
+ `every page's parent exists and comes before it (${badParents.join('; ') || 'all good'})`)
+
+ // and no page is stranded: walking parents from anywhere reaches a root
+ const orphans = starter.pages.filter((pg) => {
+ let cur: string | undefined = (pg as { parent?: string }).parent
+ for (let i = 0; cur && i < starter.pages.length; i++) {
+ const up: unknown = byId.get(cur)
+ if (!up) return true
+ cur = (up as { parent?: string }).parent
+ }
+ return !!cur
+ })
+ ok(orphans.length === 0, `no starter page is orphaned (${orphans.map((pg) => pg.title).join(', ') || 'all reachable'})`)
+
+ // every `#p/` href and every pagelink card lands on a page that is here
+ const dead: string[] = []
+ for (const pg of starter.pages) {
+ for (const bl of pg.blocks) {
+ for (const m of String(bl.html ?? '').matchAll(/href="#p\/([^"]+)"/g)) {
+ const raw = m[1]
+ const cut = raw.lastIndexOf('/')
+ const target = byId.has(raw) || cut <= 0 ? raw : raw.slice(0, cut)
+ if (!byId.has(target)) dead.push(`${pg.title}: #p/${raw}`)
+ }
+ if (bl.type === 'pagelink' && !byId.has(String((bl as { page?: unknown }).page))) {
+ dead.push(`${pg.title}: pagelink → ${String((bl as { page?: unknown }).page)}`)
+ }
+ }
+ }
+ ok(dead.length === 0, `every starter link resolves (${dead.join('; ') || 'all good'})`)
+
+ // …and the ones the starter CLAIMS produce backlinks actually do. The table
+ // on "Tables, pictures and clips" says its link shows up in Writing's
+ // "Linked from", which is only true because the table went through
+ // writeTable and its fallback html carries the cell's link: a hand-written
+ // `rows` puts a working link on the page that back-links to nothing.
+ const ix = buildIndex(starter)
+ const from = new Set((ix.backlinks.get('sd-writing') ?? []).map((r) => r.pageId))
+ ok(from.has('sd-media'), `the link in the starter's table back-links (from: ${[...from].join(', ') || 'nobody'})`)
+}
+
+// ---- the starter DEMONSTRATES what shipped --------------------------------
+// "A feature the starter does not demonstrate is a feature the starter denies"
+// (spaces/src/starter.ts). Every one of these arrived AFTER the starter was
+// written and was absent from it until somebody read the changelog beside it —
+// which is the failure this asserts against, because it is silent: the app
+// works, the tour simply stops mentioning half of it.
+{
+ const starter = starterDoc() as unknown as SpacesDoc
+ const blocks = starter.pages.flatMap((pg) => pg.blocks)
+ const has = (type: string) => blocks.some((bl) => bl.type === type)
+
+ const demos: Array<[string, boolean]> = [
+ ['a table', has('table')],
+ ['a clip', has('media')],
+ ['a link card', has('link')],
+ ['a picture, embedded as an asset', blocks.some((bl) => bl.type === 'image' && String(bl.src ?? '').startsWith('asset:'))],
+ ['a page-link card', has('pagelink')],
+ ['a callout', has('callout')],
+ ['a toggle that starts FOLDED, so print-expanded is visible', blocks.some((bl) => bl.type === 'toggle' && bl.open === false)],
+ ['a calculating line', blocks.some((bl) => /=\s*$/.test(String(bl.html ?? '')))],
+ ['a highlight and a colour from the palette', blocks.some((bl) => /class="sp-(bg|fg)-/.test(String(bl.html ?? '')))],
+ ['a comment thread', blocks.some((bl) => Array.isArray(bl.comments) && bl.comments.length > 0)],
+ ['an archived page', starter.pages.some((pg) => pg.archived === true)],
+ ['a journal home for ⌘⇧J to hang entries from', starter.pages.some((pg) => pg.journalHome === true)],
+ ['a page that sets its own width', starter.pages.some((pg) => !!pg.width)],
+ ]
+ for (const [what, present] of demos) ok(present, `the starter shows ${what}`)
+
+ // the archived page is the ⌘K-only one: nothing may link to it, or the
+ // demonstration on the Welcome page is a lie
+ const archived = starter.pages.filter((pg) => pg.archived === true).map((pg) => pg.id)
+ const linked = blocks.some((bl) =>
+ archived.some((id) => String(bl.html ?? '').includes(`#p/${id}`) || bl.page === id))
+ ok(!linked, 'nothing links to the archived page — ⌘K is the way in, as the starter says')
+
+ // every asset it ships is used, and every used asset ships
+ const keys = Object.keys(starter.assets ?? {})
+ const refs = new Set(blocks.flatMap((bl) => [String(bl.src ?? ''), String(bl.poster ?? '')])
+ .filter((s) => s.startsWith('asset:')).map((s) => s.slice(6)))
+ ok(keys.length > 0 && keys.every((k) => refs.has(k)) && [...refs].every((k) => keys.includes(k)),
+ `the starter's assets and its references agree (${keys.length} asset(s))`)
+}
+
// ---- a title has to BE a title --------------------------------------------
// `{ title: 'Tracker' }` is the object shape every other verb here takes, so it
// is the mistake a caller actually makes — and coercion answered it with a page
@@ -750,5 +864,65 @@ const issue = (id: string, values: Record<string, unknown>, extra: Record<string
ok(columnMoves(col, 'newcomer', { before: 'i3' } as never), 'a card from another column always moves')
}
+
+// ---- comments(): the flat typed-anchor list ---------------------------------
+// This is what an agent reads before it acts on what a human flagged, so the
+// two things that must be true are that the ANCHOR is stated rather than
+// implied by where the thread was stored, and that a hostile or hand-edited
+// file cannot make the report throw halfway through — a verb that dies on the
+// third page has told the agent the first two are all there is.
+{
+ const doc = load([
+ p('p1', [
+ { id: 'b1', type: 'p', html: 'one', comments: [
+ { id: 'c1', author: 'Ada', at: '2026-08-20T10:00:00Z', text: 'is this right?',
+ replies: [{ id: 'c2', author: 'Bo', at: '2026-08-20T11:00:00Z', text: 'no' }] },
+ ] },
+ { id: 'b2', type: 'p', html: 'two', comments: [
+ { id: 'c3', author: 'Bo', at: '2026-08-20T12:00:00Z', text: 'settled', resolved: true },
+ ] },
+ ]),
+ p('p2', [b('b3')]),
+ ])
+ ;(doc.pages[1] as { comments?: unknown }).comments = [
+ { id: 'c4', author: 'Ada', at: '2026-08-20T13:00:00Z', text: 'this page needs a title' },
+ ]
+
+ const all = commentsReport(doc)
+ ok(all.length === 3, `every thread on every page, flat (${all.length})`)
+ const c1 = all.find((c) => c.id === 'c1')!
+ ok(c1.anchor === 'block' && c1.blockId === 'b1' && c1.pageId === 'p1',
+ 'a block thread reports anchor "block", its block and its page')
+ ok(c1.url === '#p/p1', 'and the href that reaches it')
+ ok(c1.replies.length === 1 && c1.replies[0].author === 'Bo', 'replies come with it')
+ const c4 = all.find((c) => c.id === 'c4')!
+ ok(c4.anchor === 'page' && c4.blockId === undefined,
+ 'a page thread reports anchor "page" and NO block id')
+ ok(all.every((c) => typeof c.resolved === 'boolean'),
+ 'resolved is always a boolean — absent means open, never undefined')
+
+ ok(commentsReport(doc, { resolved: false }).length === 2, 'the open ones filter out the settled')
+ ok(commentsReport(doc, { resolved: true }).map((c) => c.id).join() === 'c3', '…and back again')
+ ok(commentsReport(doc, { pageId: 'p2' }).map((c) => c.id).join() === 'c4', 'one page at a time')
+
+ // The one thing this must not do is act. A comment is half a conversation,
+ // and a verb that resolved the remark it was asked to address would make the
+ // record untrue.
+ ok(commentsReport(doc).length === 3 && doc.pages[0].blocks[0].comments!.length === 1,
+ 'reporting changes nothing in the document')
+
+ // hostile shapes: everything below arrives in a file somebody mailed you
+ const nasty = load([p('h1', [
+ { id: 'x1', type: 'p', html: 'a', comments: 'yes' },
+ { id: 'x2', type: 'p', html: 'b', comments: [null, 7, { noId: true }] },
+ { id: 'x3', type: 'p', html: 'c', comments: [{ id: 'k1', author: 3, at: null, text: { evil: 1 }, replies: 3 }] },
+ ])])
+ const rep = commentsReport(nasty)
+ ok(rep.length === 1 && rep[0].id === 'k1',
+ 'a comments field that is not an array, and entries with no id, are ignored')
+ ok(rep[0].author === '' && rep[0].text === '' && rep[0].at === '' && rep[0].replies.length === 0,
+ 'every field is coerced to the type the report promises')
+}
+
console.log(`\n${checks - failures}/${checks} checks passed`)
if (failures) process.exit(1)
diff --git a/scripts/test-spaces-invite.ts b/scripts/test-spaces-invite.ts
new file mode 100644
index 00000000..7f38ab8e
--- /dev/null
+++ b/scripts/test-spaces-invite.ts
@@ -0,0 +1,200 @@
+#!/usr/bin/env node
+// SPDX-License-Identifier: MIT
+// Copyright (c) 2026 The Bento authors
+// bento/spaces share-copy rig — what an invite carries, and what it must not.
+//
+// slides/node_modules/.bin/esbuild scripts/test-spaces-invite.ts --bundle \
+// --platform=node --format=esm --outfile=$TMP/test-spaces-invite.mjs
+// node $TMP/test-spaces-invite.mjs
+//
+// (Bundled, not run directly: the kernel transport uses TypeScript parameter
+// properties, which node's strip-only loader refuses. Same reason the spaces
+// undo rig is bundled.)
+//
+// WHAT THIS PROVES, and why it is a rig rather than a code review.
+//
+// "Invite someone…" in bento/spaces was `saveAs('copy')`, which serializes
+// `store.doc` — the whole document, `collab` included. `collab.ownerPriv` is
+// the ROOT key of the room: it signs writes and it signs REVOCATIONS. So every
+// person invited to a space received the power to remove the person who had
+// invited them, and to remove everybody else, and there is no way to take it
+// back short of re-keying the room and re-sending every copy. Measured on the
+// branch before this rig existed: the bytes written by that button contained
+// `ownerPriv` in full.
+//
+// The failure is invisible in the product — the copy opens, syncs, and looks
+// exactly like a correct invite — which is precisely the shape of bug that
+// needs a machine to notice it. scripts/test-export-secrets.ts reads SOURCE and
+// covers "does this call site strip"; this rig runs the real functions against
+// real WebCrypto keys and asserts on the actual bytes that would reach the
+// file, including a full-text scan for the private key material.
+//
+// It also verifies the invite the way the RELAY does — checking the owner's
+// signature over `inv.${pub}.${role}.${exp}` — so "the copy carries an invite"
+// is not taken on the word of a field name. If that chain ever stopped
+// verifying, every invite would silently fail to join instead of joining with
+// too much power, and this is the one place that would say so.
+
+// --- a browser, reduced to what the module graph touches at import time -----
+// The kernel reaches localStorage for the relay-host override and the device
+// key. Nothing here connects: no socket is opened by any function under test.
+const store = new Map<string, string>()
+const shim = {
+ getItem: (k: string) => (store.has(k) ? store.get(k)! : null),
+ setItem: (k: string, v: string) => { store.set(k, String(v)) },
+ removeItem: (k: string) => { store.delete(k) },
+ clear: () => store.clear(),
+ key: (i: number) => [...store.keys()][i] ?? null,
+ get length() { return store.size },
+}
+const g = globalThis as unknown as Record<string, unknown>
+g.localStorage = shim
+g.window = g.window ?? { localStorage: shim, addEventListener() {}, setTimeout, clearTimeout }
+
+const { inviteCopy, readerCopy, stripCollabSecrets, isOwner, canWrite } = await import('../spaces/src/share.ts')
+const { mintCollab } = await import('../kernel/src/sync/online.ts')
+import type { SpacesDoc } from '../spaces/src/model.ts'
+
+let failures = 0
+let checks = 0
+function ok(cond: boolean, msg: string) {
+ checks++
+ if (cond) console.log(` ✓ ${msg}`)
+ else { failures++; console.error(` ✗ ${msg}`) }
+}
+
+const b64uDec = (s: string): Uint8Array => {
+ const b = atob(s.replace(/-/g, '+').replace(/_/g, '/'))
+ const out = new Uint8Array(b.length)
+ for (let i = 0; i < b.length; i++) out[i] = b.charCodeAt(i)
+ return out
+}
+
+/** A space with real credentials — the document the buttons actually see. */
+async function freshDoc(): Promise<SpacesDoc> {
+ const collab = await mintCollab()
+ return {
+ docId: 'doc-under-test',
+ title: 'Handbook',
+ home: 'p1',
+ pages: [{ id: 'p1', title: 'Home', blocks: [{ id: 'b1', type: 'p', html: 'hello' }] }],
+ collab,
+ } as unknown as SpacesDoc
+}
+
+// ---------------------------------------------------------------------------
+console.log('\nthe premise: the open document really does hold the owner key')
+
+const doc = await freshDoc()
+const c = doc.collab!
+ok(!!c.ownerPriv && !!c.owner && c.v === 2, 'a fresh space is minted as a v2 room with an owner keypair')
+ok(JSON.stringify(doc).includes(c.ownerPriv!),
+ 'serializing the OPEN document carries ownerPriv — this is what the old Invite button wrote')
+ok(isOwner(doc) && canWrite(doc), 'this copy reads as the owner, and as a writer')
+
+// ---------------------------------------------------------------------------
+console.log('\nan invite copy')
+
+const invite = await inviteCopy(doc)
+ok(!!invite, 'the owner can mint an invite copy')
+const ic = invite!.collab!
+const inviteText = JSON.stringify(invite)
+
+// THE ASSERTION THIS RIG EXISTS FOR. Not "the field is absent" — the whole
+// serialized copy is scanned, so a private key smuggled anywhere in the
+// document (a stray backup under another name, a stamped sync blob that
+// happens to embed it) fails too.
+ok(!inviteText.includes(c.ownerPriv!),
+ 'the owner PRIVATE key appears NOWHERE in the invite copy')
+ok(ic.ownerPriv === undefined, 'collab.ownerPriv is absent')
+ok(ic.writerPriv === undefined, 'collab.writerPriv is absent — no room-wide write key either')
+ok(ic.invite?.priv !== c.ownerPriv, 'the invite key is a DIFFERENT keypair, not the owner key renamed')
+
+// What it must still carry, or it cannot join at all.
+ok(ic.room === c.room && ic.key === c.key, 'it keeps the room and the symmetric read key')
+ok(ic.owner === c.owner, 'it keeps the owner PUBLIC key — the room id commits to it')
+ok(ic.on === true, 'sharing is armed, so opening the copy joins')
+ok(!!ic.invite?.pub && !!ic.invite?.priv && !!ic.invite?.sig, 'it carries a complete invite')
+ok(ic.invite?.role === 'writer', 'the invite delegates WRITE, not owner')
+
+// Verified the way the relay verifies it (server/sync-worker: `inv.…` over the
+// owner pubkey). A field named `sig` proves nothing on its own.
+const ownerKey = await crypto.subtle.importKey(
+ 'raw', b64uDec(c.owner!) as BufferSource, { name: 'ECDSA', namedCurve: 'P-256' }, false, ['verify'],
+)
+const iv = ic.invite!
+const chainOk = await crypto.subtle.verify(
+ { name: 'ECDSA', hash: 'SHA-256' }, ownerKey,
+ b64uDec(iv.sig) as BufferSource,
+ new TextEncoder().encode(`inv.${iv.pub}.${iv.role}.${iv.exp ?? 0}`),
+)
+ok(chainOk, 'the invite is signed BY THE OWNER — the chain the relay checks actually verifies')
+
+// A revocation is signed with the owner key. Holding only the invite, the
+// recipient cannot produce one — which is the property the whole design buys.
+ok(!inviteText.includes('"ownerPriv"'), 'no ownerPriv field survives under any value')
+
+ok(doc.collab!.ownerPriv === c.ownerPriv,
+ 'minting an invite does not disturb the OPEN document (it is a clone, not a move)')
+
+const second = await inviteCopy(doc)
+ok(second!.collab!.invite!.pub !== ic.invite!.pub,
+ 'each invite is a fresh keypair, so revoking one does not cut off the other')
+
+// ---------------------------------------------------------------------------
+console.log('\na view-only copy')
+
+const viewer = readerCopy(doc)
+ok(!!viewer, 'a view-only copy can be made')
+const vc = viewer!.collab!
+const viewText = JSON.stringify(viewer)
+ok(!viewText.includes(c.ownerPriv!), 'the owner private key appears nowhere in it')
+ok(vc.ownerPriv === undefined && vc.writerPriv === undefined && vc.invite === undefined,
+ 'it holds NO private key of any kind — so it can sign nothing, so the relay stores nothing from it')
+ok(vc.role === 'reader', 'it is marked reader, which is what locks the editor for the person holding it')
+ok(vc.room === c.room && vc.key === c.key, 'it keeps the room and the read key — it still receives')
+ok(vc.sync === undefined, 'the stamped CRDT state is dropped — a viewer must not rejoin as a fork')
+ok(!canWrite(viewer!), 'canWrite() reports false for it')
+
+// ---------------------------------------------------------------------------
+console.log('\nthe stripper')
+
+const dropped = JSON.parse(JSON.stringify(doc)) as SpacesDoc
+stripCollabSecrets(dropped)
+ok(dropped.collab === undefined,
+ 'by default the whole block goes — room + key together ARE the read capability')
+
+// Derived from the KERNEL type, not typed out here: a new private field added
+// to CollabCreds fails this until inviteCopy stops carrying it.
+const { readFileSync, existsSync } = await import('node:fs')
+const { dirname, join, resolve } = await import('node:path')
+// Located from the CWD, walking up — NOT from import.meta.url. This rig is
+// BUNDLED to a temp directory before it runs (CI does exactly that), so the
+// module's own path points at the build output and not at the repo.
+const REL = 'kernel/src/sync/crdt.ts'
+let root = resolve(process.cwd())
+while (!existsSync(join(root, REL)) && dirname(root) !== root) root = dirname(root)
+ok(existsSync(join(root, REL)), `found the repo (${REL}) by walking up from the working directory`)
+const credsSrc = readFileSync(join(root, REL), 'utf8')
+const block = credsSrc.slice(credsSrc.indexOf('export interface CollabCreds {'))
+const fields = [...block.slice(0, block.indexOf('\n}')).matchAll(/^ {2}([A-Za-z_$][\w$]*)\??:/gm)].map((m) => m[1])
+const privateFields = fields.filter((f) => /Priv$/.test(f))
+ok(privateFields.length >= 2, `CollabCreds declares ${fields.length} fields, ${privateFields.length} private (${privateFields.join(', ')})`)
+for (const f of privateFields) {
+ ok((ic as Record<string, unknown>)[f] === undefined, `an invite copy carries no ${f}`)
+ ok((vc as Record<string, unknown>)[f] === undefined, `a view-only copy carries no ${f}`)
+}
+
+// ---------------------------------------------------------------------------
+console.log('\na member copy cannot mint invites')
+
+// Opening an invite makes you an editor, not an owner. If a member could mint
+// invites, "you stay the owner" in the button's own hint would be false: the
+// person you invited could invite the world and you could not tell.
+const memberDoc = JSON.parse(inviteText) as SpacesDoc
+ok(!isOwner(memberDoc), 'an invited copy does not read as the owner')
+ok((await inviteCopy(memberDoc)) === null, 'inviteCopy() refuses — it holds no key to root a chain in')
+ok(canWrite(memberDoc), '…but it can still write, which is the point of an invite')
+
+console.log(`\n${checks - failures}/${checks} checks passed`)
+if (failures) process.exit(1)
diff --git a/scripts/test-spaces-model.ts b/scripts/test-spaces-model.ts
index 4eabb031..66a46a76 100644
--- a/scripts/test-spaces-model.ts
+++ b/scripts/test-spaces-model.ts
@@ -29,8 +29,12 @@
import {
parseDoc, buildIndex, docContentKey, homePage, FORMAT, isRemote,
effectiveParents, descendantsOf,
+ tableOf, writeTable, tableFallbackHtml, TABLE_MAX_COLS, TABLE_MAX_ROWS,
+ linkCard, linkCardHtml,
+ commentsOn, unresolvedOn,
type SpacesDoc,
} from '../spaces/src/model.ts'
+import nodeFs from 'node:fs'
import { countOutsideTags, replaceOutsideTags } from '../spaces/src/findreplace.ts'
import {
DEFAULT_FIELDS, fieldsOf, fieldByKey, optionOf, propHtml, propBlock,
@@ -39,11 +43,16 @@ import {
sortRows, unknownSortKeys, type IssueRow,
} from '../spaces/src/fields.ts'
import { inlineHtml, parseNote, planImport } from '../spaces/src/markdown.ts'
+import {
+ canonicalMarks, applyMark, clearMarks, markActive, linkAt, linkAttrs, htmlToMd,
+ CLASS_OK, keepClasses,
+} from '../spaces/src/marks.ts'
+import { extractSpace, planGraft, subtreeIds } from '../spaces/src/portable.ts'
import { planUpdatePage } from '../spaces/src/agent.ts'
import { tokenize, normLang, langLabel, CODE_LANGS } from '../spaces/src/highlight.ts'
-import { escText } from '../spaces/src/sanitize.ts'
+import { escText, externalHref } from '../spaces/src/sanitize.ts'
import {
- SPECS, SPEC, MENU_SPECS, MD_SPECS, TAG_OF, LIST_OF, CALLOUT_TONES, mdLayout,
+ SPECS, SPEC, MENU_SPECS, MD_SPECS, TAG_OF, LIST_OF, CALLOUT_TONES, mdLayout, mediaPlayback,
} from '../spaces/src/blocks.ts'
import type { Block, Page } from '../spaces/src/model.ts'
@@ -401,10 +410,15 @@ for (const [label, input, err] of [
'a board page is still the DEFAULT wide case')
ok(/page\.width === 'wide' \|\| page\.width === 'full' \? page\.width/.test(render),
'…and an explicit page width wins over it')
- ok(/page\.width === undefined \? auto/.test(render),
- '…while an absent key falls through to the board default')
+ // These two were written against the FIRST version, where an absent key fell
+ // straight through to the board default and the prose case was a flat
+ // `theme.measure` in px. Both changed when the reader preference and the
+ // growing default landed; the intent they were pinning has not.
+ ok(/page\.width === undefined \? \(opts\.readerWidth \?\? auto\)/.test(render),
+ '…while an absent key falls through to the reader, and then to the board default')
ok(/maxWidth = 'none'/.test(render), "'full' removes the cap rather than picking a big number")
- ok(/maxWidth = `\$\{doc\.theme\.measure\}px`/.test(render), 'and the prose default is still the theme measure')
+ ok(/theme\.measure/.test(render) && /42vw/.test(render),
+ 'and the prose default is still built from the theme measure, now growing with the viewport')
// THE DEFAULT IS AN ABSENT KEY. A page set to wide and back must be
// byte-identical to one never touched — the same rule editView follows.
@@ -686,6 +700,139 @@ for (const [label, input, err] of [
'an icon NAME from a document is matched with hasOwn, never `in` (which finds Object.prototype)')
}
+// ---- the table block -------------------------------------------------------
+// A table is CONTENT (working/spaces-design.md §2.6) — no formulas, nothing
+// that recalculates, and not the database case, which already shipped as the
+// tracker. What is pinned here is the part that is PERMANENT: the shape of the
+// model, the `html` fallback that is the whole of format additivity for a new
+// block type, and the pipe-table round trip.
+{
+ const spec = SPEC.get('table')!
+ ok(!!spec && spec.tag === 'div' && spec.custom === true && spec.text !== true,
+ 'table is a custom div whose text lives in its cells, not in a block host')
+ ok(!MD_SPECS.some(([, type]) => type === 'table'),
+ 'a table has no markdown autoformat trigger — `|` is punctuation people type')
+
+ // THE SHAPE IS READ, NEVER REPAIRED. Every field is optional in the format
+ // and the file may be hand-written, agent-written or written by a build that
+ // is not this one, so a ragged table is an ordinary input.
+ const t = (b: Partial<Block>) => tableOf({ id: 'x', type: 'table', ...b } as Block)
+ ok(t({ rows: [['a', 'b'], ['c']] }).rows[1][1] === '',
+ 'a ragged row is padded to the widest row, at read time')
+ ok(t({ rows: [['a'], ['b', 'c']] }).w === 2, '…and the width is the widest row, not the first')
+ ok(t({}).rows.length === 1 && t({}).rows[0].length === 1,
+ 'a table with no rows at all still has one cell to click in')
+ ok(t({ rows: 'nope' as never }).w === 1, 'a `rows` that is not an array does not throw')
+ ok(t({ rows: [[1 as never, 'b']] }).rows[0][0] === '', 'a cell that is not a string reads as empty')
+ ok(t({ rows: [['a', 'b']] }).cols.length === 2 && t({ rows: [['a', 'b']] }).cols[0] === 1,
+ 'absent cols means equal columns, one weight per column')
+ ok(t({ rows: [['a', 'b', 'c']], cols: [3] }).cols.join() === '3,1,1',
+ 'a cols of the wrong length is filled out rather than believed')
+ ok(t({ rows: [['a']], cols: [0] }).cols[0] === 1 && t({ rows: [['a']], cols: [-4] }).cols[0] === 1,
+ 'a zero or negative weight would divide the table by zero — it reads as 1')
+ ok(t({ rows: [['a', 'b']], colAlign: ['centre', 'right'] }).colAlign.join() === ',right',
+ 'an alignment this build does not know reads as none, and the known one survives')
+ ok(t({}).header === true && t({ header: false }).header === false,
+ 'ABSENT header means TRUE — a pipe table always has one, so that is the case with no field')
+ ok(t({ rows: Array.from({ length: 500 }, () => ['a']) }).h === TABLE_MAX_ROWS,
+ 'a generated file cannot ask the renderer for an unbounded number of rows')
+ ok(t({ rows: [Array.from({ length: 80 }, () => 'a')] }).w === TABLE_MAX_COLS, '…or columns')
+
+ // THE FALLBACK IS THE WHOLE OF ADDITIVITY FOR A NEW BLOCK TYPE. A build that
+ // predates this one has no 'table' case, so it renders `html` — and if there
+ // is no html it renders nothing, which is a table that VANISHES when the
+ // space is opened by the build someone already has.
+ {
+ const b: Block = { id: 'x', type: 'table' }
+ writeTable(b, { rows: [['Name', 'Ships'], ['<b>Slides</b>', 'yes']], cols: [1, 1], colAlign: ['', ''], header: true })
+ ok(b.html === 'Name · Ships<br><b>Slides</b> · yes',
+ 'the fallback html is the cells joined — what a build with no table case shows')
+ ok(b.cols === undefined && b.colAlign === undefined && b.header === undefined,
+ 'defaults are OMITTED, so a minimal hand-written table is byte-identical to one made here')
+ ok(tableFallbackHtml([['see <a href="#p/p1">that page</a>']]).includes('#p/p1'),
+ 'the fallback keeps a cell’s LINKS, so buildIndex still finds the backlink')
+ // and it really does: the index reads block.html and knows nothing of rows
+ const idx = buildIndex({
+ format: FORMAT, version: 1, docId: 'd', title: 'T', theme: {} as never,
+ pages: [
+ { id: 'p1', title: 'One', blocks: [] },
+ { id: 'p2', title: 'Two', blocks: [{ id: 'b1', type: 'table', html: tableFallbackHtml([['<a href="#p/p1">One</a>']]) }] },
+ ],
+ } as unknown as SpacesDoc)
+ ok((idx.backlinks.get('p1') ?? []).length === 1, 'a link typed in a CELL produces a backlink')
+ }
+
+ // …and the writer is the ONLY writer, so html can never drift from rows
+ {
+ const src = fsTable('editor.ts') + fsTable('markdown.ts')
+ ok(/writeTable\(/.test(src) && !/\.rows\s*=[^=]/.test(src),
+ 'nothing assigns a block’s rows directly — every table write goes through writeTable, so the html fallback cannot drift')
+ }
+
+ // MARKDOWN. A pipe table is the interchange format for a content table, and
+ // this app both writes and reads one.
+ const md = (b: Partial<Block>, indent = '') =>
+ spec.toMd!({ id: 'x', type: 'table', ...b } as Block, '', indent,
+ { titleOf: () => undefined, rowsOf: () => [], inline: (h) => h }).join('\n')
+ ok(md({ rows: [['A', 'B'], ['1', '2']] }) === '| A | B |\n| --- | --- |\n| 1 | 2 |',
+ 'a table exports as a GitHub-flavoured pipe table')
+ ok(md({ rows: [['A', 'B']], colAlign: ['center', 'right'] }).split('\n')[1] === '| :---: | ---: |',
+ 'column alignment exports in the rule row, which is the only place GFM can say it')
+ ok(md({ rows: [['A'], ['1']], header: false }).split('\n')[0] === '| |',
+ 'a headerless table exports an EMPTY header row — GFM has no other way to say it')
+ ok(md({ rows: [['a | b']] }).split('\n')[0] === '| a \\| b |',
+ 'a pipe inside a cell is escaped, or it becomes a column boundary')
+ ok(md({ rows: [['a\nb']] }).split('\n')[0] === '| a<br>b |',
+ 'a line break inside a cell cannot become a row break')
+ ok(md({ rows: [['', 'b']] }).split('\n')[0] === '| | b |',
+ 'an empty cell is a space, never `||` — that is a column count nobody meant')
+ ok(md({ rows: [['A']] }, ' ').split('\n')[0] === ' | A |', 'a nested table carries its indent')
+
+ // …and back. The importer USED to keep a pipe table verbatim in a code block,
+ // under a comment saying it was "mechanically upgradable the day a table
+ // block ships".
+ {
+ const note = parseNote('| Name | Qty |\n| :--- | ---: |\n| Rice | 2 |\n| Salt | 1 |\n', 'F')
+ const b = note.blocks[0]
+ ok(b.type === 'table', 'a pipe table imports as a table, not as a code block')
+ ok(JSON.stringify(b.rows) === JSON.stringify([['Name', 'Qty'], ['Rice', '2'], ['Salt', '1']]),
+ '…with its rows')
+ ok(JSON.stringify(b.colAlign) === JSON.stringify(['left', 'right']), '…and its column alignment')
+ ok(b.html === 'Name · Qty<br>Rice · 2<br>Salt · 1', '…and a fallback for older builds')
+ ok(parseNote('Name | Qty\n--- | ---\nRice | 2\n', 'F').blocks[0].rows?.[0].join() === 'Name,Qty',
+ 'the outer pipes are optional in GFM, so a row without them is still a row')
+ ok(parseNote('| a \\| b |\n| --- |\n', 'F').blocks[0].rows?.[0][0] === 'a | b',
+ 'an escaped pipe is one cell, not two')
+ ok(parseNote('| A | B |\n| --- | --- |\n| 1 |\n', 'F').blocks[0].rows?.[1].join() === '1,',
+ 'a short body row is padded against the header, which is GFM’s own rule')
+ ok(parseNote('| **a** |\n| --- |\n', 'F').blocks[0].rows?.[0][0] === '<strong>a</strong>',
+ 'a cell is INLINE HTML through the same converter every other block uses')
+ // the round trip the two halves owe each other
+ const round = parseNote(md({ rows: [['A', 'B'], ['1', '2']], colAlign: ['', 'center'] }) + '\n', 'F').blocks[0]
+ ok(JSON.stringify(round.rows) === JSON.stringify([['A', 'B'], ['1', '2']]) &&
+ JSON.stringify(round.colAlign) === JSON.stringify(['', 'center']),
+ 'export → import is the identity on rows and alignment')
+ const headless = parseNote(md({ rows: [['1', '2']], header: false }) + '\n', 'F').blocks[0]
+ ok(headless.header === false && JSON.stringify(headless.rows) === JSON.stringify([['1', '2']]),
+ '…including a headerless table, whose empty header row reads back as headerless')
+ }
+
+ // A CELL IS NOT A BLOCK HOST. `data-edit` means "this element's html IS the
+ // block's html", so a cell carrying it would make the generic input handler
+ // write one cell over the whole table.
+ {
+ const ren = fsTable('render.ts')
+ ok(/td\.dataset\.cell = b\.id/.test(ren) && !/td\.dataset\.edit/.test(ren),
+ 'a table cell is data-cell, never data-edit')
+ ok(/createElement\(head \? 'th' : 'td'\)/.test(ren),
+ 'a header cell is a real <th> — that is what buys row/column announcement and a repeating header in print')
+ }
+}
+
+function fsTable(f: string): string {
+ return nodeFs.readFileSync(new URL(`../spaces/src/${f}`, import.meta.url), 'utf8')
+}
+
// ---- four things that were wrong in a shipped file ------------------------
{
const fs2 = await import('node:fs')
@@ -719,8 +866,15 @@ for (const [label, input, err] of [
// 2. doc.readonly was declared in the format and read by nothing: a space
// saved as a reading copy opened fully editable.
- ok(/if \(frozen \|\| doc\.readonly\) store\.readOnly = true/.test(main),
+ ok(/if \(frozen \|\| doc\.readonly(?: \|\| .+?)?\) store\.readOnly = true/.test(main),
'doc.readonly opens the space read-only')
+ // …and so does a LIVE view-only copy, which is a different thing: a
+ // reading copy is sealed and has no session, while `collab.role:'reader'`
+ // keeps receiving and can never send. The editor lock is a courtesy to
+ // whoever holds it; the enforcement is the relay refusing to store or fan
+ // out anything from a socket that presented no signing key.
+ ok(/isReaderCopy\(doc\)\) store\.readOnly = true/.test(main),
+ 'a view-only copy (collab.role: reader) also opens locked')
// 3. the agent API must not report ids for blocks it did not write —
// store.commit early-returns on a read-only document, and the ids came
@@ -1628,5 +1782,910 @@ for (const [label, input, err] of [
'Store.tree carries a visited set')
}
+
+// ---- video and audio: the model, and the rule about autoplay ---------------
+//
+// The MEDIA block is one type with a `kind`, and the one thing about it that
+// can never be got wrong is that nothing in this app starts playing by itself.
+// A space has no surface that owns playback — an editor, a reading view, a
+// printout and a file-manager still, and a clip that starts itself is wrong in
+// all four. That rule is a pure function (blocks.ts mediaPlayback) precisely so
+// it can be pinned here rather than asserted about one renderer that the next
+// surface would have to rediscover.
+{
+ const spec = SPEC.get('media')
+ ok(!!spec, 'there is a media block spec')
+ ok(spec?.custom === true, 'media renders through its own case, not tag + inline host')
+ ok(MENU_SPECS.some((s) => s.type === 'media'), 'and it is reachable from the / menu')
+ ok(TAG_OF.media === 'div' && !LIST_OF.media, 'a clip is a block, not a list item')
+
+ // init sets the kind that degrades usefully, and never clobbers one that is
+ // already there — the same rule every other init follows (a bullet turned
+ // into a to-do keeps a `done` someone ticked)
+ const fresh: Block = { id: 'm1', type: 'media' }
+ spec?.init?.(fresh)
+ ok(fresh.kind === 'video', 'a fresh media block is a video until a file says otherwise')
+ const already: Block = { id: 'm2', type: 'media', kind: 'audio' }
+ spec?.init?.(already)
+ ok(already.kind === 'audio', '…and init never overwrites a kind that is already set')
+
+ // THE AUTOPLAY RULE. Stated three ways, because a file someone mailed you can
+ // say anything and a future build may legitimately write this field.
+ ok(mediaPlayback({ id: 'x', type: 'media' }).autoplay === false,
+ 'playback never autoplays by default')
+ ok(mediaPlayback({ id: 'x', type: 'media', autoplay: true }).autoplay === false,
+ 'a block that ASKS to autoplay still does not — the field round-trips, it is not obeyed')
+ ok(mediaPlayback({ id: 'x', type: 'media', autoplay: true, kind: 'audio', loop: true }).autoplay === false,
+ '…and no combination of the other flags unlocks it')
+
+ // the flags that ARE honoured, and their defaults
+ ok(mediaPlayback({ id: 'x', type: 'media' }).controls === true,
+ 'controls are shown unless the document says otherwise — a player with none is a rectangle')
+ ok(mediaPlayback({ id: 'x', type: 'media', controls: false }).controls === false,
+ 'and controls: false is honoured')
+ const flags = mediaPlayback({ id: 'x', type: 'media', loop: true, muted: true })
+ ok(flags.loop === true && flags.muted === true, 'loop and muted are plain author choices')
+ ok(mediaPlayback({ id: 'x', type: 'media', kind: 'audio' }).kind === 'audio', 'kind audio is audio')
+ ok(mediaPlayback({ id: 'x', type: 'media', kind: 'holo-tape' }).kind === 'video',
+ 'a kind from a newer build degrades to video, which plays an audio file anyway')
+
+ // MARKDOWN HAS NO VIDEO. A link is the one form correct in every renderer;
+ // `![](clip.mp4)` is image syntax and draws a broken-image glyph everywhere.
+ const md = (b: Block): string =>
+ (SPEC.get('media')!.toMd!(b, '', '', { titleOf: () => undefined, rowsOf: () => [] })).join('\n')
+ ok(md({ id: 'x', type: 'media', src: 'asset:k1' }) === '[Video](asset:k1)',
+ 'a clip exports as a markdown LINK, not as an image')
+ ok(md({ id: 'x', type: 'media', kind: 'audio', src: 'https://h/x.mp3' }) === '[Audio](https://h/x.mp3)',
+ '…named for what it is')
+ ok(md({ id: 'x', type: 'media', src: 'asset:k1', alt: 'The demo' }) === '[The demo](asset:k1)',
+ '…using alt as the label when there is one, exactly as the image exporter does')
+ ok(md({ id: 'x', type: 'media' }) === '_Video_',
+ 'and a block with no source yet exports as a word, never as an empty link')
+
+ // ADDITIVITY: every playback field survives a round trip untouched, including
+ // the one this build refuses to obey. There is no server to migrate a file.
+ const round = parseDoc(JSON.stringify({
+ format: FORMAT, version: 1, docId: 'd1', title: 'T',
+ pages: [{ id: 'p1', title: 'One', blocks: [{
+ id: 'b1', type: 'media', kind: 'audio', src: 'asset:k',
+ autoplay: true, loop: true, muted: true, controls: false,
+ poster: 'asset:p', captions: 'asset:vtt',
+ }] }],
+ }))
+ const back = round.ok ? round.doc.pages[0].blocks[0] : undefined
+ ok(back?.autoplay === true, 'autoplay survives the round trip even though nothing reads it')
+ ok(back?.poster === 'asset:p' && (back as Record<string, unknown>)?.captions === 'asset:vtt',
+ '…as does a field this build has never heard of')
+}
+
+// ---- the surfaces obey the rule, checked as SOURCE -------------------------
+//
+// mediaPlayback cannot return autoplay:true, but a renderer could still set the
+// attribute by hand, and the whole point of the field being in the format is
+// that someone later will be tempted to. These are the two files that draw a
+// clip; a node rig cannot run them (they need a DOM), so they are read.
+{
+ const fs3 = await import('node:fs')
+ const src = (f: string) => fs3.readFileSync(new URL(`../spaces/src/${f}`, import.meta.url), 'utf8')
+ const render = src('render.ts')
+ ok(/mediaPlayback/.test(render), 'render.ts asks the registry what it may apply')
+ ok(!/\.autoplay\s*=/.test(render) && !/autoplay\s*=\s*['"]/.test(render),
+ 'render.ts never sets autoplay — on any element, by any spelling')
+ ok(/opts\.printing[\s\S]{0,400}mediaStill/.test(render),
+ 'paper and thumbnails get a still, and the branch is BEFORE any player is built')
+ ok(/preload\s*=\s*'metadata'/.test(render),
+ 'a clip fetches metadata, never the whole file, for a page nobody pressed play on')
+ // the remote gate is the image gate, and a clip needs it MORE: a <video> asks
+ // its host for byte ranges the moment it is parsed
+ ok(/isRemote\(rawSrc\)[\s\S]{0,200}remotePlaceholder/.test(render),
+ 'a linked clip is not loaded until the reader agrees, naming the host')
+
+ const preview = src('preview.ts')
+ ok(/video,audio/.test(preview),
+ 'the file-manager still bans player tags outright, as defence in depth')
+
+ // `src` is not inline html, so it never passes through sanitize.ts — the URL
+ // box is the only gate between a typed `javascript:` and an element attribute
+ const editor = src('editor.ts')
+ ok(/\^https\?:/.test(editor),
+ 'the clip URL box allowlists http(s) rather than blocklisting javascript:')
+}
+
+// ---- HOW WIDE A PAGE IS, and whose business that is ------------------------
+// The per-page control answered "this page needs the room". It did not answer
+// "I have a wide screen", and making somebody set a width on every page in a
+// space to say so is the wrong shape of work. MEASURED at a 2560px viewport
+// before this: a 720px column using 31% of the area, 1,591px of it empty.
+//
+// So there are two settings, and the split is the point: the PAGE says what it
+// needs (document data, travels with the file), the READER says what their
+// screen is (viewer data, localStorage, never written to the file) — the same
+// rule locale and reduced motion already follow.
+{
+ const render = nodeFs.readFileSync(new URL('../spaces/src/render.ts', import.meta.url), 'utf8')
+ const editor = nodeFs.readFileSync(new URL('../spaces/src/editor.ts', import.meta.url), 'utf8')
+
+ ok(/readerWidth\?: 'wide' \| 'full'/.test(render), 'the renderer takes a reader width')
+ ok(/page\.width === undefined \? \(opts\.readerWidth \?\? auto\)/.test(render),
+ 'the PAGE wins over the reader, and the reader wins over the board default')
+ // The cap moved from PIXELS to CHARACTERS, and that is the assertion worth
+ // having: a px cap does not hold a line length. Capped at measure x 1.25 =
+ // 900px, a 5120px screen rendered 110 characters — past the range this very
+ // comment claimed to enforce. In `ch` it is ~94 at every width, because `ch`
+ // scales with the reading size and the reading size is what grows.
+ ok(/min\(75ch, max\(\$\{m\}px, 42vw\)\)/.test(render),
+ 'the column is capped in CHARACTERS, so a wide screen buys bigger type rather than a longer line')
+ const cssSrc = (await import('node:fs')).readFileSync(
+ new URL('../spaces/src/styles.css', import.meta.url), 'utf8')
+ ok(/--sp-read: clamp\(16px,/.test(cssSrc),
+ 'and the reading size grows with the viewport from a PX floor')
+ ok(/@media print[\s\S]{0,400}--sp-read: 16px/.test(cssSrc),
+ '…but paper is pinned: a document must not set larger because the window was wide')
+
+ ok(/localStorage\.getItem\('bento-sp-width'\)/.test(editor),
+ "the reader's width is viewer state, in localStorage beside the language")
+ ok(!/theme\.width|doc\.width|\.width = readerWidth/.test(editor),
+ '…and is NEVER written into the document')
+
+ // PRINT MUST NOT INHERIT IT. Paper has a fixed width; the size of the
+ // monitor somebody happens to be sitting at is not a fact about the page
+ // they are printing.
+ const printCall = editor.slice(editor.indexOf('printing: true'))
+ ok(!/readerWidth/.test(printCall.slice(0, 400)),
+ 'the print path does not take the reader width')
+}
+
+// ---- LINK CARDS point outward, and never reach outward ----------------------
+// A link card in Notion or Slack is a server fetching a url for its OpenGraph
+// tags. bento/spaces has no server and must not phone home (PLATFORM §1;
+// DECISIONS 2026-08-03), so every field is stored and the card is resolved from
+// the file alone. The three things that can fail SILENTLY here — a hostile url
+// becoming clickable, a remote thumbnail becoming a request on open, and an
+// empty card becoming an empty box — are each pinned below.
+{
+ const card = (over: Record<string, unknown>): Block => ({ id: 'l1', type: 'link', ...over })
+
+ // --- the url allowlist, on the raw string --------------------------------
+ ok(externalHref('https://example.com/a') === 'https://example.com/a', 'an https url is a link')
+ ok(externalHref('http://example.com') === 'http://example.com', '…so is http')
+ ok(externalHref('MAILTO:[email protected]') === 'MAILTO:[email protected]', '…and mailto, whatever its case')
+ ok(externalHref(' https://example.com ') === 'https://example.com', 'surrounding space is trimmed, not rejected')
+ for (const hostile of [
+ 'javascript:alert(1)',
+ ' javascript:alert(1)',
+ '\tjavascript:alert(1)',
+ 'JaVaScRiPt:alert(1)',
+ 'ja\tvascript:alert(1)',
+ 'data:text/html,<script>alert(1)</script>',
+ 'vbscript:msgbox(1)',
+ 'blob:https://example.com/x',
+ '//evil.example/x',
+ '/relative/path',
+ '#p/p1',
+ ]) {
+ ok(externalHref(hostile) === '', `"${hostile.slice(0, 22)}" never becomes a clickable link`)
+ }
+ ok(externalHref(undefined) === '' && externalHref(42) === '', 'a non-string url is not a link either')
+
+ // --- graceful degradation: an empty field is never an empty box ----------
+ const bare = linkCard(card({ url: 'https://example.com/docs' }))
+ ok(bare.title === 'https://example.com/docs', 'a card with no title falls back to its url')
+ ok(bare.site === 'example.com', '…and derives its site from the host, with no lookup')
+ ok(linkCard(card({ url: 'https://www.example.com/x' })).site === 'example.com', 'a www. prefix is dropped')
+ ok(linkCard(card({ url: 'https://a.b/x', site: ' Acme ' })).site === 'Acme', 'a stored site name wins over the host')
+ const empty = linkCard(card({}))
+ ok(empty.url === '' && empty.title === '' && empty.site === '',
+ 'a card with nothing in it resolves to nothing — the renderer draws a dead card, not an <a> to nowhere')
+ const hostileCard = linkCard(card({ url: 'javascript:alert(1)', title: 'Click me' }))
+ ok(hostileCard.url === '' && hostileCard.title === 'Click me',
+ 'a hostile url loses its link and KEEPS its title — the card degrades, it does not vanish')
+ ok(linkCard(card({ icon: '🙂'.repeat(40) })).icon.length <= 8,
+ 'a 400-character "emoji" out of a mailed file cannot blow out the card')
+
+ // --- NO NETWORK AT RENDER: the thumbnail ---------------------------------
+ // The gate is here, in a pure function, rather than in the renderer, because
+ // a check that lives in one of four rendering surfaces is a check that will
+ // be missed in the fifth.
+ for (const remote of [
+ 'https://tracker.example/pixel.png',
+ 'http://tracker.example/pixel.png',
+ '//tracker.example/pixel.png',
+ '/attachments/local.png',
+ 'blob:https://example.com/abc',
+ 'filesystem:https://example.com/x',
+ ]) {
+ ok(linkCard(card({ url: 'https://a.b', image: remote })).image === '',
+ `a card's remote image (${remote.slice(0, 26)}) is DROPPED, so rendering it makes no request`)
+ }
+ ok(linkCard(card({ image: 'asset:k1' })).image === 'asset:k1', 'an interned asset thumbnail is kept')
+ ok(linkCard(card({ image: 'data:image/webp;base64,AA' })).image.startsWith('data:'), '…and so are embedded bytes')
+
+ // --- the html fallback an older build renders ----------------------------
+ const html = linkCardHtml(linkCard(card({ url: 'https://a.b/x', title: 'Docs', desc: 'The manual' })))
+ ok(html === '<a href="https://a.b/x">Docs</a> — The manual',
+ 'the readable form is a plain inline link, so a build predating this type still shows one')
+ // The fallback link has to SURVIVE the inline sanitizer, which is what
+ // re-reads it on the next edit. sanitize.ts's own comment names the hazard: an
+ // href written under a permissive build gets stripped by a stricter later one,
+ // silently. So the two allowlists are cross-checked against each other rather
+ // than trusted to stay in step by eye. (sanitizeInline itself needs a DOM and
+ // is exercised in the browser, not here.)
+ const fs3 = await import('node:fs')
+ const ssrc = fs3.readFileSync(new URL('../spaces/src/sanitize.ts', import.meta.url), 'utf8')
+ const inlineOk = new RegExp(/const HREF_OK = (\/.+\/)i/.exec(ssrc)![1].slice(1, -1), 'i')
+ for (const u of ['https://a.b/x', 'http://a.b/x', 'mailto:[email protected]', 'MAILTO:[email protected]']) {
+ ok(externalHref(u) !== '' && inlineOk.test(u),
+ `"${u}" is accepted by BOTH allowlists, so the html fallback keeps its link`)
+ }
+ ok(!linkCardHtml(linkCard(card({ url: 'javascript:alert(1)', title: 'x' }))).includes('javascript'),
+ 'a hostile url never reaches the html fallback either')
+ ok(linkCardHtml(linkCard(card({ title: '<b>hi</b>' }))) === '&lt;b&gt;hi&lt;/b&gt;',
+ 'a title is escaped, not interpreted — these fields are untrusted input')
+
+ // --- markdown: a link card is a link -------------------------------------
+ const linkSpec = SPEC.get('link')!
+ const md = (b: Block) => linkSpec.toMd!(b, '', '', { titleOf: () => undefined, rowsOf: () => [] }).join('\n')
+ ok(md(card({ url: 'https://a.b/x', title: 'Docs' })) === '[Docs](https://a.b/x)',
+ 'a link card exports as a markdown link')
+ ok(md(card({ url: 'https://a.b/x', title: 'Docs', desc: 'The manual' })) === '[Docs](https://a.b/x) — The manual',
+ '…with its description alongside')
+ ok(md(card({ url: 'https://a.b/x' })) === '[https://a.b/x](https://a.b/x)',
+ 'an untitled card exports the url as its own label, never an empty link text')
+ ok(md(card({ url: 'https://a.b/x', title: 'A [thing]' })) === '[A \\[thing\\]](https://a.b/x)',
+ 'brackets in a title are escaped, or they end the link early')
+ ok(md(card({ url: 'https://a.b/a (1)', title: 'T' })) === '[T](<https://a.b/a (1)>)',
+ 'a url holding a space or a bracket takes the angle form')
+ ok(md(card({ title: 'Just words', desc: 'no url' })) === 'Just words — no url',
+ 'a card that is not clickable does not export as something a reader will click')
+
+ // --- and the renderer really is on that path ------------------------------
+ const rsrc = fs3.readFileSync(new URL('../spaces/src/render.ts', import.meta.url), 'utf8')
+ ok(!/\bfetch\s*\(|XMLHttpRequest|new Image\s*\(|navigator\.sendBeacon/.test(rsrc),
+ 'render.ts contains no fetch, no XHR and no image preloader — the render path cannot reach the network')
+ const linkCase = rsrc.slice(rsrc.indexOf("case 'link':"), rsrc.indexOf("case 'todo':"))
+ ok(linkCase.length > 200, 'the link case was found in render.ts')
+ ok(/img\.src = resolveSrc\(c\.image, doc\)/.test(linkCase),
+ "…and its only img src comes from linkCard's already-filtered image, never from the raw block")
+ ok(!/b\.image|b\.url/.test(linkCase),
+ '…so the renderer never reads a card field around the gate')
+}
+
+// ---- 8. review comments ----------------------------------------------------
+// Two properties, and both of them fail silently. A thread is DOCUMENT DATA
+// that no build before this one has heard of, so it has to survive a build
+// that does not understand it; and it is EDITOR-ONLY, so it must never reach
+// the reading view or a printed handbook — a private remark on somebody's
+// draft, printed into the copy they hand a customer, is not a cosmetic bug.
+{
+ const withComments = doc({
+ pages: [{
+ id: 'p1', title: 'One',
+ comments: [{ id: 'c0', author: 'Ada', at: '2026-08-20T09:00:00Z', text: 'about the page' }],
+ blocks: [{
+ id: 'b1', type: 'p', html: 'hi',
+ comments: [
+ { id: 'c1', author: 'Ada', at: '2026-08-20T10:00:00Z', text: 'open one', mood: 'from a later build' },
+ { id: 'c2', author: 'Bo', at: '2026-08-20T11:00:00Z', text: 'settled', resolved: true },
+ ],
+ }],
+ }],
+ })
+ const r = parseDoc(withComments)
+ ok(r.ok === true, 'a document carrying comments parses')
+ const page = (r as { doc: SpacesDoc }).doc.pages[0]
+ ok(JSON.stringify(page.comments) === JSON.stringify(JSON.parse(withComments).pages[0].comments),
+ 'a page thread round-trips byte-for-byte')
+ ok((page.blocks[0].comments as Array<{ mood?: string }>)[0].mood === 'from a later build',
+ 'and an unknown field INSIDE a comment survives too (PLATFORM §3)')
+
+ const at = commentsOn(page)
+ ok(at.length === 3, 'commentsOn reads both anchors')
+ ok(at[0].blockId === undefined && at[0].comment.id === 'c0',
+ 'the page thread comes first, with no block id — that IS the anchor')
+ ok(at[1].blockId === 'b1' && at[2].blockId === 'b1', 'block threads carry the block they are on')
+ ok(unresolvedOn(page) === 2, 'the badge counts what is still open, not what has been settled')
+
+ // this data arrives in a file somebody mailed you
+ const hostile = { id: 'h', title: 'H', comments: 'yes', blocks: [
+ { id: 'hb', type: 'p', html: '', comments: [null, { noId: 1 }, { id: 'k', author: 'A', at: '', text: 'x' }] },
+ ] } as unknown as Page
+ ok(commentsOn(hostile).length === 1 && commentsOn(hostile)[0].comment.id === 'k',
+ 'a comments field that is not an array, and entries with no id, are ignored rather than iterated')
+ ok(unresolvedOn(hostile) === 1, 'and the count agrees with the list')
+
+ // EDITOR-ONLY, as source. The behaviour needs a DOM and a print dialog; the
+ // mistake is made in the source, which is where the model rig checks the
+ // other four properties of this shape.
+ const fs3 = await import('node:fs')
+ const spSrc = (f: string) => fs3.readFileSync(new URL(`../spaces/src/${f}`, import.meta.url), 'utf8')
+ // `comments` as a PROPERTY or a class, not the word — render.ts's own prose
+ // discusses html comments, and a gate that trips on its documentation gets
+ // deleted rather than fixed.
+ ok(!/\.comments\b|\bsp-cm-/.test(spSrc('render.ts')),
+ 'render.ts — the ONE renderer behind the editor, the reading view and print — never reads a thread')
+ ok(/if \(!this\.reading\) this\.comments\?\.refresh\(\)/.test(spSrc('editor.ts')),
+ 'the editor paints markers only when it is not in the reading view')
+ ok(/@media print \{ \.sp-cm-mark, \.sp-cm-row \{ display: none/.test(spSrc('styles.css')),
+ 'and the print sheet drops them even if a future path paints them anyway')
+ // PLAIN TEXT, and the sanitizer discipline that follows from it: there is
+ // nothing to sanitize because nothing is ever parsed as html.
+ ok(!/innerHTML/.test(spSrc('comments.ts')),
+ 'no comment text ever reaches innerHTML — it is written with textContent')
+}
+
+// ---- 12. the portability round trip ----------------------------------------
+//
+// A page LEAVES as its own space, and a space ARRIVES inside another one. Both
+// directions move ids, links and images between documents, and every way they
+// can go wrong is silent: an id that collides makes two pages one node, a link
+// that is not repointed either dies or — worse — lands on a STRANGER page that
+// happens to hold that id, and a credential that rides along in an extract
+// hands over the whole space it came from.
+//
+// So this is a real round trip: extract a subtree out of one space, import it
+// into a DIFFERENT space that deliberately collides with it on every id and on
+// an asset key, and assert on what came out. (The remaining property — that
+// the import is ONE undo step — needs the real Store, which imports './model'
+// extensionless; it is asserted in scripts/test-spaces-undo.ts, which is
+// bundled.)
+{
+ const IMG_A = 'data:image/png;base64,AAAA'
+ const IMG_B = 'data:image/png;base64,BBBB'
+ const source: SpacesDoc = JSON.parse(JSON.stringify({
+ format: FORMAT, version: 1, docId: 'doc-source', title: 'Whole space',
+ home: 'p-root', theme: {},
+ // a future build's field, at the top level and on a page: additivity is
+ // not suspended because a document is being cut in half
+ futureThing: { keep: 'me' },
+ assets: { imgA: IMG_A, imgB: IMG_B },
+ collab: {
+ room: 'w-room', key: 'read-cap', on: true,
+ writerPub: 'WP', writerPriv: 'WS', owner: 'OP', ownerPriv: 'OS',
+ invite: { pub: 'IP', priv: 'IS', role: 'writer', sig: 'SIG' },
+ sync: { v: 2 },
+ },
+ pages: [
+ { id: 'p-root', title: 'Handbook', futurePageField: 7, blocks: [
+ { id: 'b-1', type: 'p', html: 'see <a href="#p/p-kid">the kid</a> and <a href="#p/p-away">Elsewhere</a>' },
+ ] },
+ { id: 'p-kid', title: 'Kid', parent: 'p-root', blocks: [
+ { id: 'b-2', type: 'image', src: 'asset:imgA', alt: 'a picture' },
+ { id: 'b-3', type: 'pagelink', page: 'p-away' },
+ { id: 'b-4', type: 'kanban', html: 'a type this build has never heard of' },
+ ] },
+ { id: 'p-away', title: 'Elsewhere', blocks: [
+ { id: 'b-5', type: 'image', src: 'asset:imgB' },
+ ] },
+ ],
+ }))
+
+ ok(subtreeIds(source, 'p-root').join(',') === 'p-root,p-kid',
+ 'a subtree is the page and its descendants, in document order')
+ ok(subtreeIds(source, 'p-root', false).join(',') === 'p-root',
+ '…and just the page when the subtree is not asked for')
+
+ const cut = extractSpace(source, 'p-root', { docId: 'doc-extract', now: '2026-08-22T00:00:00.000Z' })
+ const out = cut.doc
+
+ // IDENTITY. A fork joins the room it forked from; an extract must not.
+ ok(out.docId === 'doc-extract' && out.docId !== source.docId,
+ 'the extract carries a FRESH docId, so it is a new document and not a fork')
+ ok(out.collab === undefined,
+ 'and no collaboration credentials at all — the room, the read key and every private key')
+ ok(!JSON.stringify(out).includes('WS') && !JSON.stringify(out).includes('OS') &&
+ !JSON.stringify(out).includes('read-cap'),
+ 'no writer, owner or invite secret survives anywhere in the bytes')
+
+ // WHAT TRAVELLED.
+ ok(out.pages.map((p) => p.id).join(',') === 'p-root,p-kid', 'the subtree travelled, and nothing else')
+ ok(out.home === 'p-root' && out.pages.some((p) => p.id === out.home),
+ 'doc.home names a page that exists in the new file')
+ ok(out.pages[0].parent === undefined, 'the root of the extract is a root page')
+ ok(out.title === 'Handbook', 'the new space is named after the page it was cut from')
+
+ // LINKS. Out of the set is not left dangling and not silently unlinked.
+ const rootHtml = out.pages[0].blocks[0].html ?? ''
+ ok(rootHtml.includes('href="#p/p-kid"'), 'a link INSIDE the extract still resolves')
+ ok(!rootHtml.includes('#p/p-away') && rootHtml.includes('[[Elsewhere]]'),
+ 'a link OUT of it becomes the literal [[Elsewhere]] — text that still says what it meant')
+ const kid = out.pages[1]
+ ok(kid.blocks[1].type === 'p' && !('page' in kid.blocks[1]) &&
+ (kid.blocks[1].html ?? '').includes('[[Elsewhere]]'),
+ 'a pagelink whose target stayed behind becomes the same honest text')
+ ok(cut.stats.unlinked === 2, 'and both are counted for the report')
+
+ // ASSETS. An extract that carries the whole document is a copy.
+ ok(Object.keys(out.assets ?? {}).join(',') === 'imgA',
+ 'only the images the extracted pages reference travel')
+
+ // ADDITIVITY, in both halves.
+ ok((out as Record<string, unknown>).futureThing !== undefined &&
+ (out.pages[0] as Record<string, unknown>).futurePageField === 7,
+ 'unknown top-level and per-page fields survive the extract untouched')
+ ok(kid.blocks[2].type === 'kanban', 'an unknown block type travels as itself')
+
+ // The extract must be a document this app can OPEN — the load contract, not
+ // an approximation of it.
+ const reread = parseDoc(JSON.stringify(out))
+ ok(reread.ok === true, 'the extracted document parses as a bento/spaces file')
+ ok(reread.ok === true && reread.repaired.length === 0,
+ '…with no ids to repair: the extract is internally consistent')
+
+ // ---- and back IN, to a space that collides on everything ----------------
+ const hostDoc: SpacesDoc = JSON.parse(JSON.stringify({
+ format: FORMAT, version: 1, docId: 'doc-host', title: 'Somewhere else',
+ home: 'p-root', theme: {},
+ // the SAME key holding DIFFERENT bytes: a content-addressed store cannot
+ // produce this, a hand-written file can, and trusting the key would replace
+ // the host's picture with the visitor's
+ assets: { imgA: 'data:image/png;base64,ZZZZ' },
+ pages: [
+ { id: 'p-root', title: 'Host root', blocks: [{ id: 'b-1', type: 'p', html: 'mine' }] },
+ { id: 'p-target', title: 'Put it here', blocks: [{ id: 'b-9', type: 'p', html: '' }] },
+ ],
+ }))
+
+ const plan = planGraft(hostDoc, out, { under: 'p-target' })
+
+ // IDS. Unique across the WHOLE merged document, and never reused.
+ const merged = [...hostDoc.pages, ...plan.pages]
+ const allIds = merged.flatMap((p) => [p.id, ...p.blocks.map((b) => b.id)])
+ ok(new Set(allIds).size === allIds.length, 'NO ID COLLISION: every id in the merged document is unique')
+ ok(plan.stats.renamed === 2, 'the two ids this space already used were renamed, and only those')
+ ok(plan.pages[1].id === 'p-kid' && plan.pages[1].blocks[0].id === 'b-2',
+ 'ids that did NOT collide are kept, so links and node keys outside the collision survive')
+
+ // …and deterministically, from the bytes: two readers of one file agree.
+ const again = planGraft(hostDoc, JSON.parse(JSON.stringify(out)), { under: 'p-target' })
+ ok(JSON.stringify(again.pages) === JSON.stringify(plan.pages),
+ 'the same import planned twice produces the same ids (derived from the bytes, never Math.random)')
+
+ // LINKS. Nothing arrives pre-broken, and nothing points at a stranger.
+ const pageIds = new Set(merged.map((p) => p.id))
+ const dangling: string[] = []
+ for (const p of plan.pages) {
+ for (const b of p.blocks) {
+ for (const m of (b.html ?? '').matchAll(/href="#p\/([^"]+)"/g)) {
+ if (!pageIds.has(m[1])) dangling.push(m[1])
+ }
+ }
+ }
+ ok(dangling.length === 0, `NO DANGLING LINK: every #p/ target in the import resolves (${dangling.join(',') || 'none'})`)
+ const grafted = plan.pages[0].blocks[0].html ?? ''
+ ok(grafted.includes(`href="#p/${plan.pages[1].id}"`),
+ 'the internal link followed the rename rather than pointing at the HOST page that took its id')
+ ok(!grafted.includes('href="#p/p-root"'),
+ '…and specifically does not point at the host page it collided with')
+ ok((plan.pages[1].blocks[1].html ?? '').includes('[[Elsewhere]]'),
+ 'text left by the extract stays text — an import invents no links')
+
+ // WHERE IT LANDED.
+ ok(plan.pages[0].parent === 'p-target', 'the import nests under the page that was chosen')
+ ok(plan.pages[1].parent === plan.pages[0].id, 'and its own tree is preserved inside that')
+
+ // ASSETS. Merged without collision, and without duplicating what is shared.
+ ok(plan.assets['imgA'] === undefined && plan.assets['imgA~1'] === IMG_A,
+ 'a key clash with DIFFERENT bytes mints a variant rather than overwriting the host image')
+ ok((plan.pages[1].blocks[0].src) === 'asset:imgA~1',
+ '…and the block that referenced it now points at the variant')
+ ok(hostDoc.assets!['imgA'] === 'data:image/png;base64,ZZZZ',
+ 'the host keeps its own bytes: planGraft mutates nothing it was handed')
+
+ const shared: SpacesDoc = JSON.parse(JSON.stringify(hostDoc))
+ shared.assets = { imgA: IMG_A }
+ const dedupe = planGraft(shared, out, {})
+ ok(Object.keys(dedupe.assets).length === 0 && dedupe.pages[1].blocks[0].src === 'asset:imgA',
+ 'the SAME image already in the host is reused, not stored twice — content addressing does the work')
+
+ // ADDITIVITY survives the second leg too.
+ ok((plan.pages[0] as Record<string, unknown>).futurePageField === 7 &&
+ plan.pages[1].blocks[2].type === 'kanban',
+ 'unknown fields and unknown block types survive the import as well')
+
+ // The merged document is one this app can open.
+ const mergedDoc = { ...hostDoc, pages: merged, assets: { ...hostDoc.assets, ...plan.assets } }
+ const rr = parseDoc(JSON.stringify(mergedDoc))
+ ok(rr.ok === true && rr.repaired.length === 0,
+ 'the merged document parses with NOTHING to repair — the import needed no rescue')
+}
+// ---- A BARE-KEY SHORTCUT MUST NOT EAT A CHARACTER ---------------------------
+// `[` collapses the page list. It was unguarded, and the text path that would
+// have claimed the key first sits ~90 lines BELOW it — so every `[` typed in a
+// block was preventDefault()ed into a sidebar toggle. `[[` is how this app
+// makes links and is what the starter space tells you to type; it could not be
+// typed at all. Shipped since #237, found while building the properties panel.
+{
+ const fs = await import('node:fs')
+ const ed = fs.readFileSync(new URL('../spaces/src/editor.ts', import.meta.url), 'utf8')
+
+ ok(/if \(!mod && e\.key === '\[' && !isTyping\(\)\)/.test(ed),
+ 'the bare `[` shortcut is guarded by whether text is being edited')
+ ok(/if \(!mod && e\.key === '\]' && !isTyping\(\)\)/.test(ed),
+ "…and so is `]`, which arrived with the properties panel")
+ ok(/function isTyping\(\): boolean/.test(ed), 'and that guard exists')
+ ok((ed.match(/function isTyping\(\): boolean/g) ?? []).length === 1 &&
+ !/editingText/.test(ed.replace(/\/\*[\s\S]*?\*\//g, '').replace(/^\s*\/\/.*$/gm, '')),
+ 'exactly ONE guard, not one per shortcut — two answers to one question drift')
+ ok(/a\.isContentEditable/.test(ed) && /a\.tagName === 'SELECT'/.test(ed),
+ '…covering contenteditable, inputs, textareas and selects alike')
+
+ // the general rule, so the next bare-key shortcut cannot reintroduce this:
+ // every unmodified single-character binding in onKey must ask the guard.
+ const onKey = ed.slice(ed.indexOf('private onKey('), ed.indexOf('private onKey(') + 4000)
+ // NB the tail is captured up to the line end, not up to the first ')': the
+ // guard's own parentheses are inside it, and a lazier pattern silently
+ // matched nothing and failed its own assertion.
+ const bare = [...onKey.matchAll(/if \(!mod && e\.key === '(.)'(.*)$/gm)]
+ for (const m of bare) {
+ ok(/isTyping/.test(m[2]),
+ `the bare \`${m[1]}\` binding asks isTyping() before it swallows the key`)
+ }
+ ok(bare.length > 0, 'and there is at least one such binding to check')
+}
+
+
+// ---- THE PROPERTIES PANEL COSTS NOTHING UNTIL IT IS ASKED FOR ---------------
+// The wide-page work one commit earlier gave the reading column the window's
+// slack. A right-hand panel is the obvious way to undo that: 280px held open on
+// every screen, forever, for settings most readers change once a month. So the
+// panel's DEFAULT-CLOSED and its zero-cost-while-closed geometry are pinned
+// here rather than left to whoever next edits the stylesheet.
+//
+// This is a SOURCE scan, deliberately. There is no DOM in node, so the honest
+// thing to assert is the two rules the browser then follows — what the stored
+// preference has to say before the panel opens, and what the closed panel
+// contributes to the flex row — rather than a mock that would agree with
+// whatever it was written beside.
+{
+ const props = fsTable('props.ts')
+ const editor = fsTable('editor.ts')
+ const css = fsTable('styles.css')
+
+ // 1. CLOSED UNLESS THIS READER OPENED IT. The field initialises to true and
+ // only the explicit '0' — written by toggleInsp — opens it, so an absent
+ // key (a fresh file, a new browser, a locked-down origin that threw)
+ // means closed.
+ ok(/private inspClosed = true/.test(editor),
+ 'the properties panel is CLOSED by default')
+ ok(/localStorage\.getItem\('bento-sp-insp-closed'\) !== '0'/.test(editor),
+ "…and only an explicit '0' opens it, so an absent preference is still closed")
+ ok(/localStorage\.setItem\('bento-sp-insp-closed'/.test(editor),
+ 'the open/closed state PERSISTS, so it is chosen once and not every session')
+
+ // 2. WHILE CLOSED IT TAKES NO WIDTH. `.sp-main` is `flex: 1 1 auto`, so a
+ // closed panel that zeroes its basis, its inline padding and its border is
+ // a panel the reading column cannot feel. Any one of the three left in
+ // place is width off the page on every screen.
+ const shut = css.slice(css.indexOf('.sp-insp.sp-pane-closed'))
+ const rule = shut.slice(0, shut.indexOf('}') + 1)
+ ok(/flex-basis:\s*0/.test(rule), 'a closed properties panel has flex-basis 0')
+ ok(/padding-inline:\s*0/.test(rule), '…no inline padding')
+ ok(/border-inline-start-width:\s*0/.test(rule), '…and no border')
+ ok(/\.sp-main \{\s*\n?\s*flex: 1 1 auto/.test(css),
+ 'the reading column is flex:1 1 auto, so the width a closed panel gives up goes back to it')
+
+ // 3. THE PANEL IS THE READER'S, NEVER THE DOCUMENT'S — the same rule the page
+ // list's width, the language and the reader width already follow. A panel
+ // state written into the file would arrive open in somebody else's copy.
+ ok(!/doc\.(insp|panel)|theme\.(insp|panel)/.test(editor + props),
+ 'nothing about the panel is written into the document')
+
+ // 4. BELOW THE DRAWER BREAKPOINT IT IS AN OVERLAY, not a third column — the
+ // bargain the page list already makes at the same 820px.
+ const phone = css.slice(css.indexOf('@media (max-width: 820px) {\n .sp-insp-rz'))
+ ok(/\.sp-insp \{ display: none; \}/.test(phone.slice(0, 400)),
+ 'below 820px the panel is absent until asked for')
+ ok(/\.sp-insp\.sp-open \{[^}]*position: fixed/.test(phone.slice(0, 800)),
+ '…and then it is a fixed overlay, never a column')
+
+ // 5. THE ACCORDION IS SLIDES', including the persisted-per-title open state,
+ // so a section added below is collapsible without anyone remembering.
+ ok(/querySelectorAll<HTMLElement>\('\.sp-insp-sec'\)/.test(props) &&
+ /localStorage\.setItem\(OPEN_KEY/.test(props),
+ 'sections collapse and their open state is remembered per title')
+
+ // 6. ONE CHANGE IS ONE UNDO STEP. Every control commits through one helper
+ // that wraps a single `store.commit`, and every text field commits on
+ // `change` rather than on `input` — an undo entry per keystroke is what
+ // `input` would buy.
+ ok(/private commit\(id: string, fn: \(b: Block\) => void\): void \{[\s\S]{0,300}?s\.commit\(/.test(props),
+ 'block edits go through ONE store.commit')
+ ok(!/addEventListener\('input'/.test(props),
+ 'no control commits on every keystroke')
+
+ // 7. IT DOES NOT REPLACE THE SURFACES IT DUPLICATES. The chip on a callout
+ // and the language chip on a code block are still the fast route; a panel
+ // that justified itself by removing them would be a worse editor.
+ ok(/sp-callout-chip/.test(editor) && /sp-langchip/.test(editor),
+ 'the block chips survive the panel')
+}
+
+// ---------------------------------------------------------------------------
+// INLINE MARKS — the canonical form, and the cases that go wrong quietly.
+//
+// The mark engine is a pure function over (inline html, plain-text offsets) so
+// that it can be pinned HERE rather than only in a browser. The
+// partial-selection group is the one that silently produced plausible garbage
+// in every naive implementation of this: half a bold run, unbolded, either
+// takes the whole run with it or does nothing, and for one character both look
+// fine.
+{
+ // ---- canonical form ----------------------------------------------------
+ // ONE nesting order, whatever order the tags arrived in. Two spellings of
+ // the same visible text is a conflict in every diff and every CRDT merge.
+ ok(canonicalMarks('<b><i>x</i></b>') === '<strong><em>x</em></strong>',
+ 'b/i fold to strong/em, the spelling the markdown importer already emits')
+ ok(canonicalMarks('<i><b>x</b></i>') === canonicalMarks('<b><i>x</i></b>'),
+ 'the SAME html whichever way round the author nested it')
+ ok(canonicalMarks('<code><em><strong>q</strong></em></code>') === '<strong><em><code>q</code></em></strong>',
+ 'the order is a > mark > strong > em > u > s > sub > sup > code, outermost first')
+ ok(canonicalMarks('<b>a</b><b>b</b><b>c</b>') === '<strong>abc</strong>',
+ 'adjacent identical runs coalesce all the way, not one pass deep')
+ ok(canonicalMarks('<b></b>hi<span>there</span>') === 'hithere',
+ 'empty runs and attribute-less spans are debris, not content')
+ ok(canonicalMarks(canonicalMarks('<i><b>x</b></i><b>y</b>')) === canonicalMarks('<i><b>x</b></i><b>y</b>'),
+ 'IDEMPOTENT — a materialize→DOM→re-serialize round trip must not keep changing it')
+ ok(canonicalMarks('a&amp;b&nbsp;c&lt;d') === 'a&amp;b&nbsp;c&lt;d',
+ 'entities round-trip byte-identically to what innerHTML hands back — NBSP verbatim')
+ ok(canonicalMarks('<a href="https://x/">a</a><a href="https://x/">b</a>') === '<a href="https://x/">ab</a>',
+ 'two links to the same address coalesce; a link is one hover target, not two')
+
+ // ---- apply -------------------------------------------------------------
+ ok(applyMark('hello world', 0, 5, 'strong') === '<strong>hello</strong> world',
+ 'a mark over part of a plain run wraps exactly that part')
+ ok(applyMark('<strong>hello</strong> world', 0, 11, 'strong') === '<strong>hello world</strong>',
+ 'extending a mark over its neighbour leaves ONE run, not two abutting ones')
+
+ // ---- THE PARTIAL-SELECTION CASE ----------------------------------------
+ ok(applyMark('<strong>hello world</strong>', 0, 5, 'strong') === 'hello<strong> world</strong>',
+ 'unbolding the HEAD of a bold run splits it and keeps the tail bold')
+ ok(applyMark('<strong>hello world</strong>', 6, 11, 'strong') === '<strong>hello </strong>world',
+ 'unbolding the TAIL splits the other way')
+ ok(applyMark('<strong>hello world</strong>', 2, 5, 'strong') === '<strong>he</strong>llo<strong> world</strong>',
+ 'unbolding the MIDDLE leaves three runs — the case that needs a real split')
+ ok(applyMark('<em>abcdef</em>', 2, 4, 'em') === '<em>ab</em>cd<em>ef</em>',
+ '…and it is the TAG that moves: not one character of text changes')
+ ok(markActive('<strong>hello</strong> world', 0, 5, 'strong') === true &&
+ markActive('<strong>hello</strong> world', 0, 7, 'strong') === false,
+ 'a mark is ACTIVE only when it covers the whole selection')
+ ok(applyMark('<strong>hello</strong> world', 0, 7, 'strong') === '<strong>hello w</strong>orld',
+ '…so toggling a half-covered selection EXTENDS the mark rather than removing it')
+
+ // ---- links and clearing -------------------------------------------------
+ const linked = applyMark('abc', 1, 2, 'a', { op: 'on', attrs: linkAttrs('https://x/?a=1&b=2') })
+ ok(linked === 'a<a href="https://x/?a=1&amp;b=2" rel="noopener noreferrer" target="_blank">b</a>c',
+ 'a new link is spelled EXACTLY as sanitizeInline would leave it, ampersand and all')
+ ok(linkAt(linked, 1, 2) === 'https://x/?a=1&b=2' && linkAt(linked, 0, 3) === '',
+ 'linkAt reports a link only when it covers the whole selection')
+ ok(clearMarks('<a href="https://x/"><strong>hi</strong></a> there', 0, 2) === 'hi there',
+ 'clear formatting takes the link with it — a link is formatting too')
+ ok(applyMark('a<br>b', 0, 3, 'em') === '<em>a<br>b</em>',
+ 'a <br> is ONE character of offset, so a mark after a line break lands on the right words')
+
+ // ---- markdown, both ways ------------------------------------------------
+ // EVERY mark the toolbar can apply must survive an export. A control that
+ // produces something the exporter drops is worse than no control, because
+ // the loss only shows up in a file somebody has already sent. Four of these
+ // WERE dropped before this rig existed.
+ const MARK_MD: Array<[string, string]> = [
+ ['<strong>x</strong>', '**x**'],
+ ['<em>x</em>', '*x*'],
+ ['<u>x</u>', '<u>x</u>'],
+ ['<s>x</s>', '~~x~~'],
+ ['<code>x</code>', '`x`'],
+ ['<mark>x</mark>', '==x=='],
+ ['<sub>x</sub>', '<sub>x</sub>'],
+ ['<sup>x</sup>', '<sup>x</sup>'],
+ ['<a href="https://x/">x</a>', '[x](https://x/)'],
+ ]
+ for (const [html, md] of MARK_MD) {
+ ok(htmlToMd(html) === md, `${html} exports as ${md}`)
+ ok(canonicalMarks(inlineHtml(md)) === canonicalMarks(html),
+ `…and ${md} imports back as the same mark — export→import is the identity`)
+ }
+ ok(htmlToMd('<a href="https://x/"><strong>x</strong></a>') === '[**x**](https://x/)',
+ 'the canonical order puts the link outermost, which is the only nesting markdown can spell')
+ ok(htmlToMd('a<br>b') === 'a\nb', 'a line break exports as one')
+}
+
+// ---------------------------------------------------------------------------
+// TEXT AND BACKGROUND COLOUR — the format's SECOND attribute.
+//
+// The vocabulary is closed (marks.ts PALETTE) and the sanitizer matches a
+// PATTERN rather than the nine names, so a colour added in a later build
+// survives an older one instead of being deleted by it. That is the property
+// worth pinning: everything else about colour is a stylesheet.
+{
+ const red = ' class="sp-fg-red"'
+ ok(applyMark('hello', 0, 5, 'span', { op: 'on', attrs: red }) === '<span class="sp-fg-red">hello</span>',
+ 'ink colour is a class on a SPAN, never a style attribute')
+ ok(applyMark('<span class="sp-fg-red">hello</span>', 0, 5, 'span', { op: 'off' }) === 'hello',
+ 'and "Default" REMOVES it — a paragraph coloured back to default is byte-identical to one never coloured')
+ ok(applyMark('<span class="sp-fg-red">hello</span>', 0, 5, 'span', { op: 'on', attrs: ' class="sp-fg-blue"' })
+ === '<span class="sp-fg-blue">hello</span>',
+ 'a second colour REPLACES the first rather than nesting two spans')
+ ok(applyMark('<span class="sp-fg-red">hello</span>', 0, 2, 'span', { op: 'off' })
+ === 'he<span class="sp-fg-red">llo</span>',
+ 'colour splits on a partial selection exactly as bold does')
+ ok(canonicalMarks('<span>a</span><span class="sp-fg-red">b</span>') === 'a<span class="sp-fg-red">b</span>',
+ 'a span with NO palette class is contentEditable debris and is dropped; one with a class is content')
+ ok(canonicalMarks('<span class="sp-fg-red">a</span><span class="sp-fg-red">b</span>')
+ === '<span class="sp-fg-red">ab</span>',
+ 'two runs of the same colour coalesce; two different ones cannot')
+ ok(canonicalMarks('<strong><span class="sp-fg-red">x</span></strong>')
+ === '<span class="sp-fg-red"><strong>x</strong></span>',
+ 'colour sits outside the emphasis marks in the canonical order, whichever way it was written')
+ ok(canonicalMarks('<mark class="sp-bg-green">x</mark>') === '<mark class="sp-bg-green">x</mark>' &&
+ canonicalMarks('<mark>x</mark>') === '<mark>x</mark>',
+ 'a background is a class on MARK, and a plain highlight stays exactly what it was')
+
+ // THE ADDITIVITY PROPERTY, which is the reason CLASS_OK is a pattern.
+ ok(CLASS_OK.test('sp-fg-teal') && CLASS_OK.test('sp-bg-teal'),
+ 'a colour this build has never heard of still MATCHES — an old build must not delete a new palette')
+ ok(canonicalMarks('<span class="sp-fg-teal">x</span>') === '<span class="sp-fg-teal">x</span>',
+ '…and round-trips byte-for-byte through a build with no rule for it: unstyled, not lost')
+ ok(!CLASS_OK.test('sp-fg-') && !CLASS_OK.test('sp-xx-red') && !CLASS_OK.test('anything-else') &&
+ !CLASS_OK.test('sp-fg-0123456789abcdefg'),
+ 'and the pattern is still bounded: two roles, a short name, nothing else')
+ ok(keepClasses('sp-fg-red not-ours sp-bg-blue') === 'sp-fg-red sp-bg-blue',
+ 'a class list is filtered per TOKEN — one bad name must not cost the colour beside it')
+
+ // MARKDOWN. Colour has no syntax at all, so it exports as the raw inline
+ // html GFM permits, and the importer keeps the class — otherwise "export,
+ // edit the .md, import" would be a colour-stripping round trip.
+ const COLOUR_MD: Array<[string, string]> = [
+ ['<span class="sp-fg-red">x</span>', '<span class="sp-fg-red">x</span>'],
+ ['<mark class="sp-bg-green">x</mark>', '<mark class="sp-bg-green">x</mark>'],
+ ]
+ for (const [html, md] of COLOUR_MD) {
+ ok(htmlToMd(html) === md, `${html} exports as itself`)
+ ok(canonicalMarks(inlineHtml(md)) === canonicalMarks(html),
+ `…and imports back with the class intact — export→import is the identity`)
+ }
+ ok(htmlToMd('<mark>x</mark>') === '==x==',
+ 'the PLAIN highlight keeps ==x==, which Obsidian and Pandoc both read')
+}
+
+// ---- the theme gate --------------------------------------------------------
+//
+// EVERY FAILURE HERE IS INVISIBLE IN THE LIGHT THEME, which is the one the
+// author is looking at while they write the rule. A surface pinned to `#fff`
+// keeps its white background when the chrome goes dark and puts light text on
+// it; slides measured that at 1.21:1 against WCAG AA's 4.5 floor before its own
+// gate existed, and it looked perfect the whole time.
+//
+// Three properties, and the third is the one that is not about contrast at all:
+// a theme is a VIEWER preference (PLATFORM §8), so it must never reach the
+// document — not through doc.theme, and not through the pristine clone every
+// save re-serializes.
+{
+ const fs = await import('node:fs')
+ const src = (f: string) =>
+ fs.readFileSync(new URL(`../spaces/src/${f}`, import.meta.url), 'utf8')
+ const css = src('styles.css')
+
+ // Strip comments first: prose about `#fff` is not a rule painting `#fff`,
+ // and a failure that names a comment sends the reader to the wrong line.
+ const bare = css.replace(/\/\*[\s\S]*?\*\//g, '')
+
+ // ---- 1. both dark blocks exist, and they are the same block --------------
+ // Three states: a reader chose light, chose dark, or chose nothing. The
+ // choice stamps data-theme; the default follows the OS. So dark has to be
+ // stated under the MEDIA QUERY (guarded, so an explicit light still wins)
+ // AND under the ATTRIBUTE, or the picker only works in one direction.
+ const body = (sel: string): string | null => {
+ const i = bare.indexOf(sel)
+ if (i < 0) return null
+ const open = bare.indexOf('{', i)
+ return bare.slice(open + 1, bare.indexOf('}', open))
+ }
+ const roles = (b: string) =>
+ new Map([...b.matchAll(/(--[a-z0-9-]+)\s*:\s*([^;]+);/gi)]
+ .map((m) => [m[1], m[2].trim().toLowerCase()] as [string, string]))
+
+ const light = body(':root, :root[data-theme="light"]')
+ const media = body(':root:not([data-theme="light"])')
+ const attr = body(':root[data-theme="dark"]')
+ ok(!!light && !!media && !!attr,
+ 'dark is defined BOTH under prefers-color-scheme and under [data-theme="dark"]')
+ ok(/@media screen and \(prefers-color-scheme: dark\)/.test(css),
+ '…and the media block is a screen block, which is what keeps paper light')
+ if (light && media && attr) {
+ const L = roles(light), M = roles(media), A = roles(attr)
+ // byte-identical, or the picker and the OS default drift apart silently
+ const drift = [...M].filter(([k, v]) => A.get(k) !== v).map(([k]) => k)
+ ok(drift.length === 0 && M.size === A.size,
+ `the two dark blocks are identical${drift.length ? ` — ${drift.join(', ')}` : ''}`)
+ // --sp-read and --radius are GEOMETRY. They live in the light block
+ // because that is where the tokens are, but a reading size and a corner
+ // radius are the same in the dark; only colour has two answers.
+ const METRIC = /^--(sp-read|radius)$/
+ const missing = [...L.keys()].filter((r) => !M.has(r) && !METRIC.test(r))
+ ok(missing.length === 0,
+ `dark defines every role light does${missing.length ? ` — missing ${missing.join(', ')}` : ''}`)
+ const extra = [...M.keys()].filter((r) => !L.has(r))
+ ok(extra.length === 0,
+ `dark invents no role light lacks${extra.length ? ` — extra ${extra.join(', ')}` : ''}`)
+ // A token defined twice and referenced nowhere is not harmless: it is a
+ // wire that was never connected, and the literal it was meant to replace
+ // is still in the sheet painting a light value in dark.
+ const unused = [...L.keys()].filter((r) => !new RegExp(`var\\(${r}[,)]`).test(css))
+ ok(unused.length === 0,
+ `every themed role is referenced by a rule${unused.length ? ` — unused: ${unused.join(', ')}` : ''}`)
+ // and the light palette has not forked from slides and type
+ const SUITE: Record<string, string> = {
+ '--ink': '#1e2a3a', '--ink-2': '#31445c', '--chrome': '#f5f7fa',
+ '--chrome-2': '#eceff4', '--line': '#e3e8ef', '--muted': '#5b6472',
+ '--accent': '#f7a600', '--accent-ink': '#7a5200', '--blue': '#5b8def',
+ }
+ const wrong = Object.entries(SUITE)
+ .filter(([k, v]) => L.get(k) !== v)
+ .map(([k, v]) => `${k} is ${L.get(k) ?? 'missing'}, suite says ${v}`)
+ ok(wrong.length === 0,
+ `the light palette still matches the suite${wrong.length ? `\n ${wrong.join('\n ')}` : ''}`)
+ }
+
+ // ---- 2. no literal colour survives outside the tokens and the paper -----
+ // The token blocks are where a colour is allowed to be written down; the
+ // print sheet is the other place, because paper is white for reasons that
+ // have nothing to do with anybody's preference. Everywhere else a literal is
+ // a value that will not move when the theme does.
+ //
+ // The listed exceptions are surfaces that deliberately do not follow the
+ // chrome, each named rather than silently tolerated:
+ // .sp-b-image img a picture gets a white ground of its own in BOTH
+ // themes — a transparent-background diagram exported
+ // against white vanishes on a dark one
+ // .sp-b-media video the letterbox behind a clip, black in both
+ // .sp-dot the fill is a generated hue set inline by collabui, so
+ // the initial on it is white on either ground
+ const HEX = /#[0-9a-fA-F]{3,8}\b/
+ const EXEMPT = /^(\.sp-b-image img|\.sp-b-media video|\.sp-dot)\b/
+ // everything up to the first token block, then everything after the last —
+ // simpler and more honest than trying to parse nesting: cut the three token
+ // blocks and both @media print blocks out, and audit what is left
+ let audit = bare
+ for (const cut of [/:root, :root\[data-theme="light"\][\s\S]*?\n}\n/,
+ /@media screen and \(prefers-color-scheme: dark\)[\s\S]*?\n}\n/,
+ /@media screen \{\s*\n :root\[data-theme="dark"\][\s\S]*?\n}\n/]) {
+ const m = audit.match(cut)
+ ok(!!m, `the theme gate can find its token block (${String(cut).slice(0, 46)}…)`)
+ if (m) audit = audit.replace(cut, '\n')
+ }
+ audit = audit.replace(/@media print \{[\s\S]*?\n}\n/g, '\n')
+ const stray: string[] = []
+ for (const [, sel, decls] of audit.matchAll(/(^|\n)([^@{}\n][^{}]*)\{([^}]*)\}/g)) {
+ if (!HEX.test(decls)) continue
+ const s0 = sel.trim().split(',')[0].trim()
+ if (EXEMPT.test(s0)) continue
+ stray.push(`${s0} → ${decls.trim().replace(/\s+/g, ' ').slice(0, 60)}`)
+ }
+ ok(stray.length === 0,
+ `no literal colour outside the token blocks and the print sheet${stray.length ? `\n ${stray.join('\n ')}` : ''}`)
+
+ // ---- 3. the preference never reaches the document ----------------------
+ // startTheme() writes data-theme + color-scheme onto <html>. capturePristine
+ // clones the LIVE document and every save re-serializes that clone, so the
+ // call has to come AFTER it — otherwise a reader's theme ships inside every
+ // file they save and lands on whoever they send it to. Same ordering
+ // applyDirection already depends on for dir/lang.
+ const main = src('main.ts')
+ ok(main.indexOf('startTheme()') > main.indexOf('capturePristine()'),
+ 'startTheme() runs after capturePristine(), so no theme reaches a saved file')
+ // and nothing writes it into the model
+ const app = src('appearance.ts')
+ ok(!/store|doc\.|commit/.test(app.replace(/\/\/[^\n]*/g, '')),
+ 'the Appearance control never touches the store or the document')
+ ok(!/theme/i.test(src('model.ts').match(/export interface Theme[\s\S]*?\n}/)?.[0]
+ .replace(/^export interface Theme/, '') ?? '') ||
+ !/data-theme|bento-theme|prefers-color-scheme/.test(src('model.ts')),
+ 'the FORMAT knows nothing about the interface theme')
+ // the still preview renders the AUTHOR's colours, in both themes
+ // the prose above it says exactly this, so audit the CODE, not the comment
+ const previewCode = src('preview.ts').replace(/^\s*\/\/[^\n]*$/gm, '')
+ ok(!/prefers-color-scheme|data-theme/.test(previewCode),
+ 'the static file-manager preview has no theme of its own — it is the author’s document')
+}
+
console.log(`\n${checks - failures}/${checks} checks passed`)
if (failures) process.exit(1)
diff --git a/scripts/test-spaces-undo.ts b/scripts/test-spaces-undo.ts
index 163e0d52..24130470 100644
--- a/scripts/test-spaces-undo.ts
+++ b/scripts/test-spaces-undo.ts
@@ -27,6 +27,7 @@
import { Store } from '../spaces/src/store.ts'
import { parseDoc, FORMAT, type SpacesDoc } from '../spaces/src/model.ts'
+import { planGraft } from '../spaces/src/portable.ts'
let checks = 0
let failures = 0
@@ -168,5 +169,52 @@ console.log('bento/spaces undo\n')
ok(!s.canUndo && textOf(s, 'a') === 'A0', 'a read-only space neither changes nor records')
}
+// ---- importing a whole space is ONE undo step ------------------------------
+//
+// The Markdown import is one step and says so in its own summary; a subtree
+// import moves more — pages, blocks, images and fonts — and a half-applied one
+// is not something a single ⌘Z could put back. This is the assertion that the
+// commit is genuinely one entry and that undoing it leaves the space exactly as
+// it was, ids and all. It lives here rather than in the model rig because it
+// needs the real Store, which imports './model' without an extension.
+{
+ const host = load([page('a', 'A0'), page('b', 'B0')])
+ const s = new Store(host)
+ const before = JSON.stringify(s.doc.pages)
+
+ const incoming = load([
+ // collides with the host on BOTH ids, which is the interesting case
+ { id: 'a', title: 'Arriving', blocks: [
+ { id: 'ab', type: 'p', html: 'see <a href="#p/a2">the other</a>' },
+ { id: 'ac', type: 'image', src: 'asset:k1' },
+ ] },
+ { id: 'a2', title: 'The other', parent: 'a', blocks: [{ id: 'a2b', type: 'p', html: 'x' }] },
+ ])
+ incoming.assets = { k1: 'data:image/png;base64,AAAA' }
+
+ const plan = planGraft(s.doc, incoming, { under: 'b' })
+ s.commit(() => {
+ s.doc.pages.push(...plan.pages)
+ Object.assign((s.doc.assets ??= {}), plan.assets)
+ })
+
+ ok(s.doc.pages.length === 4, 'the import landed')
+ const ids = s.doc.pages.flatMap((p) => [p.id, ...p.blocks.map((b) => b.id)])
+ ok(new Set(ids).size === ids.length, 'and every id in the merged space is still unique')
+ ok(s.doc.assets?.k1 === 'data:image/png;base64,AAAA', 'the image came with it')
+
+ s.undo()
+ ok(s.doc.pages.length === 2, 'ONE ⌘Z removes the whole import — pages, blocks and all')
+ ok(JSON.stringify(s.doc.pages) === before, 'and what is left is byte-identical to the space before it')
+ ok(!s.canUndo, 'the import took exactly one undo entry, not one per page')
+ // Deliberately NOT asserted the other way: undo snapshots exclude `assets`
+ // (store.ts), so the image bytes stay behind exactly as they do after undoing
+ // a Markdown import. Pruning them would break REDO, which re-inserts blocks
+ // pointing at those very keys — the importer's summary says "removes the
+ // imported pages" for this reason.
+ s.redo()
+ ok(s.doc.pages.length === 4 && s.doc.assets?.k1 !== undefined, 'redo brings the import back intact')
+}
+
console.log(`\n${checks - failures}/${checks} checks passed`)
if (failures) process.exit(1)
diff --git a/spaces/CHANGELOG.md b/spaces/CHANGELOG.md
index ade96021..e4c7d1ab 100644
--- a/spaces/CHANGELOG.md
+++ b/spaces/CHANGELOG.md
@@ -14,6 +14,182 @@ Versions follow `0.MINOR.PATCH` while pre-1.0.
## [Unreleased]
+- **A dark interface.** About → Appearance offers *Match my system*, *Light* or
+ *Dark*, follows the OS by default, and tracks it live if the OS flips while
+ the file is open.
+
+ **The theme is yours, not the file's.** It lives in this browser
+ (localStorage), exactly as the interface language already does — send someone
+ a space and they read it in their own theme, in their own room. Nothing about
+ it is written into the document, so the same bytes come back whoever last
+ looked at them.
+
+ **Dark covers the whole window, including the page you are reading.** That is
+ deliberately not what bento/slides does, where a slide keeps the background
+ its author chose. A space has no such page: the toolbar, the page list and
+ the column are one surface with hairlines between them, and a white reading
+ column inside a dark window would be a white rectangle over most of the
+ screen. The colours the document itself carries — the nine text and highlight
+ colours, and the five callout tones — keep their NAMES and change their
+ values with the ground, because "red" measured against white is a smudge
+ against near-black. Measured: every one of them, plus body text, muted text,
+ code, tables and callout labels, clears WCAG AA in both themes.
+
+ **A picture now sits on a white card of its own, in both themes.** A
+ screenshot or diagram exported with a transparent background used to be a
+ shape floating in nothing; black-on-transparent artwork disappeared entirely
+ on a dark ground.
+
+ **Paper stays light**, and a file-manager thumbnail still shows the
+ document's own colours: neither of those has a reader to have a preference.
+- **A new space opens showing what it can actually do.** The starter space was
+ written once and left, and about half of what shipped since had never appeared
+ in it: no table, no clip, no link card, no comment, no calculating line, no
+ daily notes, no colour, nothing about page width, exporting a page, importing
+ a space, or the properties panel — and its limits page still said live
+ collaboration was coming, months after it arrived.
+
+ It is eight pages now, and each one demonstrates the thing it describes rather
+ than describing it. The page about tables holds one, with a link in a cell that
+ really does turn up in the linked page's backlinks. The page about pictures
+ holds an embedded drawing and a clip you can press play on. The page about
+ archiving *is* the archived page — out of the sidebar, found by typing ⌘K, and
+ named on the limits page because sending someone the file sends them that too.
+ There is a comment thread with a reply on it, waiting in the margin. The
+ Journal page is where ⌘⇧J puts today.
+
+ **The limits page says what is true now.** Live collaboration exists, so it
+ explains it — including the awkward part, which is that a session is a room
+ whose keys live in the file: whoever holds a copy holds the room, and rotating
+ the keys is what revocation looks like when there are no accounts.
+
+ The demonstration pages are meant to be deleted, and say so.
+
+- **Fixed: a link in a table cell could be a link to nowhere in the backlinks.**
+ A table written by hand — by an agent, or in a file somebody edited — carried
+ its cells but not the readable fallback the rest of the app reads, so a link
+ inside one worked when clicked and appeared in no page's "Linked from". Tables
+ made in the editor were never affected. Found by writing a starter space that
+ claims the feature and watching the claim fail.
+
+- **Fixed: `validate()` asked audio clips for their pixel size.** Every
+ correctly-authored audio block was told it had no intrinsic width and height —
+ numbers an audio player does not have. A validator that is wrong about good
+ documents is a validator agents learn to ignore.
+
+- **A properties panel, on the right.** One place that answers "what can I
+ change about this thing". The block the caret is in gets its own settings —
+ a table's rows, columns and header row; a code block's language; a callout's
+ tone and mark; an image's width and alt text; a clip's poster, loop, mute and
+ controls; every field of a link card — and the page underneath it gets its
+ icon, its width, whether it is archived, and what is actually in it. Sections
+ collapse and remember whether you left them open, the way slides' panel does.
+
+ **It starts closed, and while it is closed it costs the page nothing.** The
+ column you read in is the same width with the panel there as without it —
+ measured at 1280px and at 2560px, and pinned by the model rig. Open it from
+ the chevron on its edge or with `]`; it remembers what you chose. On a narrow
+ screen it is an overlay reached from ⋯, never a third column.
+
+ Nothing was taken away to make room for it: the language chip on a code
+ block, the mark on a callout and the tools on an image are all still there.
+- **A formatting toolbar, over the text you selected.** Select any words and a
+ small bar appears above them: bold, italic, underline, strikethrough, inline
+ code, highlight, colour, link, and clear formatting. Before this the only
+ formatting a space had was ⌘B, ⌘I and ⌘U — which you had to already know
+ about — and there was no strikethrough, no inline code, no link and no
+ highlight at all.
+
+ Shortcuts come with it: ⇧⌘S strikethrough, ⌘E inline code, ⇧⌘H highlight,
+ and ⌘K makes a link out of whatever is selected (with nothing selected it
+ still opens search, as before). On a phone or tablet the same buttons dock to
+ the bottom of the screen instead of floating over the words, where they would
+ fight the selection handles and the system Copy menu. The bar never appears in
+ reading view, in a read-only file, or on paper.
+
+- **Text and background colour**, in the palette shape Notion uses: nine
+ colours, each usable as the ink or as the band behind the words. Not a colour
+ picker — a fixed set means the colours can be chosen to stay readable on the
+ page and on a printout, and it means the file never carries a stylesheet of
+ its own. Colour prints, deliberately: unlike a callout, which keeps its box
+ and its name on paper, a coloured phrase has no second cue, so dropping the
+ colour would silently drop the distinction the writer drew.
+
+- **Formatting now has one spelling.** Marks are stored in a fixed nesting
+ order and adjacent runs of the same mark are merged, so the same visible
+ sentence is always the same bytes — which keeps diffs honest and will keep
+ collaborative merges from fighting over text nobody changed. Un-formatting
+ part of a formatted run now splits it correctly, which the old ⌘B could not
+ do: it handed the job to the browser, whose markup this format does not
+ accept.
+
+- **Markdown export no longer drops formatting.** Underline, highlight,
+ subscript, superscript and colour were exported as plain text; every mark now
+ round-trips, and re-importing the exported file gives back what you had.
+ Highlights use `==this==`, which Obsidian and Pandoc both read.
+
+- **Wide screens get wide pages.** The column grows with the window instead of
+ sitting at a fixed 720px, and "Use this width for every page" in the page
+ menu makes your choice stick across the whole space. It is remembered for
+ your screen, not written into the file — someone opening the same space on a
+ laptop is unaffected.
+
+- **Tables.** A real table block: `/` → Table, then type. Tab walks the cells
+ and appends a row when it runs off the end; rows and columns are added and
+ removed from the bar above the table, column widths drag, and the header row
+ can be turned off. Cells hold ordinary rich text, so a cell can be bold, hold
+ code, or link to another page — and a link in a cell shows up in that page's
+ backlinks like any other.
+
+ It exports as a GitHub pipe table, alignment included, and a Markdown file
+ you import now becomes a table instead of being kept as text. Older builds of
+ bento/spaces show the table's contents as a line of text rather than nothing
+ at all, so a space with tables in it is still readable in a copy of the app
+ that predates them.
+
+ What this is NOT is a spreadsheet: no formulas, nothing that recalculates.
+ That is bento/dash's job, and typed properties with saved views are already
+ here as the tracker.
+- **Link cards.** `/` → *Link to the web* makes a card for an address: title,
+ description, site, an emoji and (if you want one) a picture, laid out like
+ the page card it sits beside. Nothing is fetched — not when you make the
+ card and not when someone opens the space. Other apps build this card on a
+ server that reads the page's OpenGraph tags; a Bento file has no server and
+ must not contact one, so the card shows what you type and the dialog says
+ so. A card with empty fields is still a working link; a card with no address
+ is a plain box that offers to become one. In Markdown it exports as a link,
+ because that is what it is.
+- **Comments.** Leave a remark on a block (Block options → Comment) or on a
+ whole page (the page's ⋯ → Comment on this page), reply to it, and resolve it
+ when it is settled. Markers sit in the margin beside what they are about, so
+ they never move the writing; a page with something still open shows a count
+ in the page list.
+
+ A comment is workspace, not document: it is saved in the file so it travels
+ with it, and it never appears in the reading view or on paper. The text is
+ plain text — a comment cannot carry formatting, and cannot carry anything
+ else either. Your name is the one the people panel already knows.
+
+ Agents get the whole list in one call: `bento.comments()`, each thread saying
+ whether it is about a block or a page.
+- **A page leaves as its own space, and a space arrives inside another one.**
+ "Export page as a space…" writes the page you choose — and, if you want, the
+ pages under it — as a new .bento.html file: a whole space, not an attachment.
+ It gets a new document id and none of this file's sharing keys, so it is a
+ new document rather than a fork that would try to join this one's session.
+ Only the images those pages use travel with them, and a link pointing at a
+ page that stayed behind becomes text naming that page rather than a link to
+ nowhere.
+
+ The import does the same trip backwards: choose a .bento.html space (or drop
+ it on the window) and its pages arrive under any page you pick. Ids that this
+ space already uses are renamed — derived from the bytes, so the answer is the
+ same everywhere — and the links inside the import follow them, so nothing
+ arrives pre-broken and no link lands on a stranger page that happened to hold
+ that id. Shared images are stored once. It is one ⌘Z, as the Markdown import
+ is, and the imported file goes through exactly the same load contract and
+ sanitizer as any other file you open.
+
- **A page can be as wide as it needs to be.** Column, Wide or Full width, in
the page menu. Pages of writing keep a comfortable line; a page with a board
on it can have the room. Boards already widened themselves — now they say so,
diff --git a/spaces/README.md b/spaces/README.md
index 4e068520..a0945a27 100644
--- a/spaces/README.md
+++ b/spaces/README.md
@@ -77,10 +77,14 @@ load contract and format additivity.
| `src/highlight.ts` | the code lexer — text → `{kind, a, b}` ranges, no DOM, no strings |
| `src/markdown.ts` | markdown → blocks, the folder tree → the page tree, `[[wikilinks]]` → `#p/` links. Pure and DOM-free, so the import is tested in node |
| `src/editor.ts` | topbar, sidebar, block menu, `[[` picker, ⌘K, ⌘F, archive |
+| `src/props.ts` | the right-hand properties panel — what a block and a page can be, and the one thing it must not cost: the page's width |
| `src/collabui.ts` | who else is here — presence in the tree, the people panel, the live control |
+| `src/comments.ts` | review threads — markers in the end margin, the thread popover, the tree badge |
| `src/sync/session.ts` | the five answers the kernel cannot work out: what "empty" means, where a reader lands, what presence reports |
| `src/agent.ts` | the agent surface — `validate()`, `outline()`, `stats()`, and the patch verbs behind `window.bento` |
+| `src/assets.ts` | content-addressed images and clips, and the image downscale |
| `src/assets.ts` | content-addressed images and the downscale |
+| `src/portable.ts` | the two exits: a page out as its own space, another space in under a page |
| `src/about.ts` | updates, language, password, exports |
| `src/i18n/` | per-locale catalogs; `packed.ts` is generated and is what ships |
@@ -112,6 +116,37 @@ actually selected; when it is not there, the block becomes text quoting the
path, because a browser cannot open `../attachments/x.png` and a broken `<img>`
would be a lie about what is in the file.
+### Getting notes out again, and back in
+
+`src/portable.ts` is both exits, pure and DOM-free like `markdown.ts`, so the
+round trip is asserted in node rather than clicked through.
+
+**Out:** `extractSpace(doc, pageId, {subtree, docId})` returns a complete
+`bento/spaces` document holding one page and, if asked, its subtree. It carries
+a **fresh `docId`** and **no `collab` at all** — an extract that kept either
+would be a fork of the space it came from, and opening it would join that room
+and sync three pages over two hundred. Only the assets those pages reference
+travel (fonts excepted — the theme names them, so every page references them).
+A link out of the extracted set becomes the literal `[[Page title]]`, the same
+thing an unresolvable wikilink becomes on the way in, so it is honest, still
+searchable, and resolves again if the two halves are ever reunited.
+
+**In:** `planGraft(host, incoming, {under})` nests another space's pages under a
+page of this one. An arriving id is KEPT when this space does not use it and
+only a collision is renamed — through `repairId`, the same derivation-from-the-
+bytes the load path uses, for the same reason. Links inside the import follow
+the rename; a link naming a page that was not in the file becomes text rather
+than a live link onto whatever host page holds that id. Assets are
+content-addressed, so a shared image merges to nothing; a key holding DIFFERENT
+bytes (which the store cannot produce, but a hand-written file can) mints a
+`~n` variant instead of overwriting the host's image. The whole graft is ONE
+`store.commit`, so it is one ⌘Z.
+
+The imported file is UNTRUSTED and gets no side door: its document block is
+read from an inert `DOMParser` document, `parseDoc` decides whether it is a
+space (refusing rather than degrading), and `sanitizeInline` runs over every
+arriving block before any of it reaches the document.
+
### Links are fragments
`#p/<id>`, and navigation is `history.pushState(null, '', '#p/id')`. Measured:
@@ -141,6 +176,27 @@ pages are one document rather than one file each.
- **Fine-grained sharing.** There is a people panel, presence in the page tree
and a live session, but no per-person roles or invite links yet — the file is
still the capability, so anyone you send it to can edit.
+- **Embeds.** Deliberate: the format is permanent, so a block type ships when
+ its model is right, not when its UI is ready.
+
+ Tables and databases DID ship, as two separate things, which is the whole of
+ working/spaces-design.md §2.6. A **table** is content — a `table` block whose
+ `rows` are inline html, with no formulas and nothing that recalculates
+ (`tableOf`/`writeTable` in `src/model.ts`, the pipe-table export in
+ `src/blocks.ts`). A **database** is the tracker: `doc.fields` is the schema, a
+ `prop` block is a value, and a `view` block is a board or a list of them
+ (`src/fields.ts`). Recalculation is bento/dash's, and cross-app data arrives
+ as a snapshot with provenance, never as a nested runtime.
+- **Fetched link previews.** A `link` block is a card for an address on the
+ web, and every field in it is typed by the author and stored. Nothing is
+ fetched — not at render and not in the editor: reading a url's OpenGraph tags
+ means a cross-origin HTML body, which needs a server, which is the component
+ this format does not have. See `docs/DECISIONS.md`.
+- **Comments on a text RANGE.** A thread anchors to a block or to a page. A
+ range inside a block needs an offset pair that survives the concurrent edit
+ that moved it, and the format is permanent — so the anchor ships when its
+ model is right.
+
- **Tables and embeds.** Deliberate: the format is permanent, so a block type
ships when its model is right, not when its UI is ready. (Databases DID ship —
as the tracker: `doc.fields` is the schema, a `prop` block is a value, and a
diff --git a/spaces/index.html b/spaces/index.html
index 5885103f..774f132a 100644
--- a/spaces/index.html
+++ b/spaces/index.html
@@ -7,7 +7,12 @@
editor visibly stops short of the screen edges. The app fills the screen
and positions its own chrome; it never needs the browser to pad it. -->
<meta name="viewport" content="width=device-width, initial-scale=1.0, viewport-fit=cover" />
- <meta name="color-scheme" content="only light" />
+ <!-- The app ships a dark interface (styles.css theme tokens), so it tells
+ the browser it handles both. kernel/src/theme.ts restates the resolved
+ value inline on <html> at boot, which is what makes an explicit choice
+ beat the OS setting; this meta is what covers the moment before that.
+ The SPLASH is dark in both themes and says so in its own rules. -->
+ <meta name="color-scheme" content="light dark" />
<meta name="generator" content="bento-spaces" />
<title>bento/spaces</title>
<!-- NOTICE
diff --git a/spaces/src/about.ts b/spaces/src/about.ts
index 1b8a1881..2a14a002 100644
--- a/spaces/src/about.ts
+++ b/spaces/src/about.ts
@@ -1,27 +1,54 @@
// SPDX-License-Identifier: MIT
// Copyright (c) 2026 The Bento authors
-// The About surface: what this file is, updating it, its language, its
-// password, and the ways out of it.
+// The About surface: what this file is, what is in it, updating it, its
+// language, its password, and the ways in and out of it.
//
// PLATFORM §10 requires a signed self-update path, an encryption story and an
// AI round-trip. All three live behind one button, because a self-contained
// document has nowhere else to put them.
+//
+// BUILT FROM SLIDES' DIALOG, deliberately. Two apps in one suite must not
+// teach two different dialogs: same opening mark, same section order (what
+// this is → what is in it → updates → viewer preferences → the document →
+// the ways out), same register, same restraint. What differs is only what the
+// app IS — a space is measured in pages, blocks and words where a deck is
+// measured in slides.
+//
+// TWO LAYOUT RULES THIS DIALOG LIVES UNDER (CLAUDE.md, hard-won #9 and #10):
+// · The card SCROLLS (`overflow: auto`), and `overflow-y: auto` clips
+// HORIZONTALLY too — there is no such thing as scrolling one axis while
+// the other overflows visibly. So nothing in here may be a floating
+// popover: everything that opens (the update card, the replace-from-JSON
+// panel, every confirmation) opens IN FLOW as a block of the list, and the
+// card scrolls to it. A 250px popover anchored inside a scrolling menu is
+// the bug that cost this project a day in slides' phone chrome.
+// · `.sp-overlay` carries z-index 60, which is a CEILING on every descendant
+// rather than merely an order. Nothing in this dialog tries to escape it,
+// and nothing added later can be made to by raising its own z-index.
-import { checkForUpdates, applyUpdate, APP_VERSION, type ReleaseInfo } from '../../kernel/src/update.ts'
+import {
+ checkForUpdates, applyUpdate, applyUpdateInPlace, canUpdateInPlace,
+ autoCheckEnabled, setAutoCheck, compareVersions,
+ APP_VERSION, type ReleaseInfo, type UpdateCheck,
+} from '../../kernel/src/update.ts'
import {
setEncryptionPassword, isEncryptionActive,
canWriteInPlace, openedFileName,
} from '../../kernel/src/save.ts'
import { clearVersions, clearRecovery } from '../../kernel/src/autosave.ts'
import { t, localeChoices, locale, setLocale } from './i18n'
-import { inertBody, esc } from './sanitize'
+import { appearanceSection } from './appearance'
+import { esc, textOf } from './sanitize'
import { docForExport } from './model'
+import { htmlToMd } from './marks.ts'
+import { humanBytes } from './assets'
import { SPEC, mdLayout, type MdCtx } from './blocks'
+import { parseDoc, uid } from './model'
import {
issuesOf, passesFilter, sortRows, fieldByKey, optionOf, fieldsOf,
} from './fields'
import type { Store } from './store'
-import type { Block } from './model'
+import type { Block, SpacesDoc } from './model'
export interface AboutHooks {
store: Store
@@ -36,25 +63,88 @@ export interface AboutHooks {
* buttons, and the assertion now reads every file.
*/
onSaveCopy: () => void
- /** open the markdown importer — the way IN, opposite the ways out below */
+ /** open the importer — the way IN, opposite the ways out below */
onImport?: () => void
+ /** take ONE page out as a space of its own */
+ onExportSpace?: () => void
+ /**
+ * Write a DIFFERENT document out as its own file, leaving this one open.
+ * The same writer the page extract uses (keepHandle false), so a duplicate
+ * never becomes the ⌘S target.
+ */
+ onWriteCopy?: (doc: SpacesDoc) => Promise<boolean>
+ /** the editor's status line, for the confirmations that outlive the dialog */
+ onStatus?: (message: string) => void
+}
+
+/**
+ * The launch check's result, for the line the dialog opens on.
+ *
+ * Module-level and not in the doc: whether this READER checked for updates is
+ * no business of the document, exactly as the locale is not.
+ */
+let lastAutoCheck: UpdateCheck | null = null
+
+/**
+ * Check at launch, if the reader left that on.
+ *
+ * The preference (`bento-auto-check`, kernel/src/update.ts) is the one slides
+ * uses, so a person who turned it off in one app has turned it off in both.
+ * Nothing about the reader or the document goes out with the request — it is a
+ * plain GET of a signed manifest — and the dialog says so where the switch is.
+ */
+export async function launchUpdateCheck(): Promise<void> {
+ if (!autoCheckEnabled()) return
+ lastAutoCheck = await checkForUpdates()
}
-export function openAbout({ store, onRepaint, onSaveCopy, onImport }: AboutHooks): void {
+export function openAbout(hooks: AboutHooks): void {
+ const { store, onRepaint, onSaveCopy, onImport, onExportSpace, onWriteCopy, onStatus } = hooks
+ const doc = store.doc
+ const returnFocus = document.activeElement as HTMLElement | null
+
const back = document.createElement('div')
- back.className = 'sp-overlay'
+ back.className = 'sp-overlay sp-overlay-about'
const card = document.createElement('div')
card.className = 'sp-card sp-about'
card.setAttribute('role', 'dialog')
+ card.setAttribute('aria-modal', 'true')
card.setAttribute('aria-label', t('About this space'))
- const close = () => back.remove()
+ const close = () => {
+ back.remove()
+ document.removeEventListener('keydown', onKey, true)
+ returnFocus?.focus?.()
+ }
+ // Capture-phase and on the DOCUMENT, as slides does: a dialog whose Escape
+ // handler hangs off its own element stops working the moment focus leaves it
+ // — which a <select> dropdown does on every platform.
+ const onKey = (e: KeyboardEvent) => {
+ if (e.key === 'Escape') { e.stopPropagation(); close() }
+ }
+
+ // ---- small builders ----------------------------------------------------
const h = (text: string) => {
const n = document.createElement('h2')
n.className = 'sp-card-h'
n.textContent = text
return n
}
+ /** A section with a real heading, not one more control in a flat stack. */
+ const section = (title: string, ...kids: Array<Node | null>) => {
+ const s = document.createElement('section')
+ s.className = 'sp-ab-sec'
+ s.append(h(title))
+ for (const k of kids) if (k) s.append(k)
+ card.append(s)
+ return s
+ }
+ const note = (text: string, cls = '') => {
+ const p = document.createElement('p')
+ p.className = 'sp-note' + (cls ? ' ' + cls : '')
+ p.textContent = text
+ return p
+ }
const row = (label: string, node: HTMLElement) => {
const r = document.createElement('div')
r.className = 'sp-row'
@@ -70,6 +160,29 @@ export function openAbout({ store, onRepaint, onSaveCopy, onImport }: AboutHooks
b.addEventListener('click', fn)
return b
}
+ const actions = (...kids: HTMLElement[]) => {
+ const d = document.createElement('div')
+ d.className = 'sp-actions'
+ d.append(...kids)
+ return d
+ }
+ const mono = (s: string) => {
+ const n = document.createElement('span')
+ n.className = 'sp-mono'
+ n.textContent = s
+ return n
+ }
+ const check = (label: string, on: boolean, fn: (v: boolean) => void) => {
+ const l = document.createElement('label')
+ l.className = 'sp-ab-check'
+ const cb = document.createElement('input')
+ cb.type = 'checkbox'
+ cb.checked = on
+ cb.addEventListener('change', () => fn(cb.checked))
+ l.append(cb, document.createTextNode(' ' + label))
+ return l
+ }
+ const say = (message: string) => { onStatus?.(message) }
// ---- what this is ------------------------------------------------------
// The same head slides uses: the suite's mark, the app, the version, and a
@@ -85,58 +198,253 @@ export function openAbout({ store, onRepaint, onSaveCopy, onImport }: AboutHooks
'<rect x="14" y="5" width="13" height="10" rx="2.5" fill="#FF9E8A"/>' +
'<rect x="14" y="17" width="13" height="10" rx="2.5" fill="#F0EBE0"/>' +
'</svg><div><b>bento<span style="color:#FF9E8A">/</span>spaces</b>' +
- `<span>v${APP_VERSION} · ${esc(t('format v{v}', { v: String(store.doc.version ?? 1) }))}</span></div></a>`
+ `<span>v${esc(APP_VERSION)} · ${esc(t('format v{v}', { v: String(doc.version ?? 1) }))}</span></div></a>`
head.querySelector('a')?.setAttribute('title', t('Visit bento.page (opens in a new tab)'))
card.append(head)
- card.append(h(t('This file')))
- const blurb = document.createElement('p')
- blurb.className = 'sp-about-blurb'
- const pages = store.doc.pages.length
- const blocks = store.doc.pages.reduce((n, p) => n + p.blocks.length, 0)
- blurb.textContent = t(
- 'bento/spaces {version} · {pages} page(s), {blocks} block(s). The document, the editor and the search are all in this one file.',
- { version: APP_VERSION, pages, blocks },
+ const promo = document.createElement('p')
+ promo.className = 'sp-ab-promo'
+ // The one innerHTML with markup in it, and the markup is OURS: two anchors
+ // built here and interpolated into a translated sentence. Nothing from the
+ // document, the network or a catalog's placeholder value reaches it.
+ promo.innerHTML = t(
+ 'New to Bento? Find templates, the gallery and the AI editing guide at {home} — or ⭐ it on {gh}.',
+ {
+ home: '<a href="https://bento.page" target="_blank" rel="noopener">bento.page</a>',
+ gh: '<a href="https://github.com/nyblnet/bento" target="_blank" rel="noopener">GitHub</a>',
+ },
)
- card.append(blurb)
+ card.append(promo)
+ // ---- what is in it -----------------------------------------------------
+ // The numbers a person actually wants, and then the one that explains the
+ // others: where the weight is. A space is big because of its images, always,
+ // and a readout that says "4.2 MB" without saying that has told you nothing
+ // you can act on.
+ const pages = doc.pages.length
+ const blocks = doc.pages.reduce((n, p) => n + p.blocks.length, 0)
+ let words = 0
+ for (const p of doc.pages) {
+ words += countWords(p.title)
+ for (const b of p.blocks) words += countWords(textOf(b.html))
+ }
+ const assetBytes = Object.values(doc.assets ?? {}).reduce((n, v) => n + v.length, 0)
+ const assetCount = Object.keys(doc.assets ?? {}).length
+ const docBytes = byteLength(doc)
+
+ const stats = document.createElement('div')
+ stats.className = 'sp-ab-stats'
+ for (const [value, label] of [
+ [String(pages), t('Pages')],
+ [String(blocks), t('Blocks')],
+ [String(words), t('Words')],
+ [humanBytes(docBytes), t('Document')],
+ ] as Array<[string, string]>) {
+ const s = document.createElement('div')
+ s.className = 'sp-ab-stat'
+ const b = document.createElement('b')
+ b.textContent = value
+ const l = document.createElement('span')
+ l.textContent = label
+ s.append(b, l)
+ stats.append(s)
+ }
+
+ const weight = note(
+ assetCount
+ ? t('{n} embedded image(s) and clip(s) account for {size} of that — {pct}%. Everything else is text.', {
+ n: assetCount, size: humanBytes(assetBytes),
+ pct: docBytes ? Math.round((assetBytes / docBytes) * 100) : 0,
+ })
+ : t('All text. Nothing is embedded, so this file is as small as a space gets.'),
+ )
const fileName = openedFileName()
- if (fileName) card.append(row(t('File'), text(fileName)))
+ const sec1 = section(t('This file'), stats, weight)
+ if (fileName) sec1.append(row(t('File'), mono(fileName)))
+ sec1.append(note(t('The document, the editor and the search are all in this one file. Opening it needs nothing else — no server, no account, no install.')))
if (!canWriteInPlace()) {
- const note = document.createElement('p')
- note.className = 'sp-note'
// stated up front rather than discovered on the first save
- note.textContent = t('This browser cannot write back to the file, so every save makes a new copy. Chrome and Edge on a computer can save in place.')
- card.append(note)
+ sec1.append(note(t('This browser cannot write back to the file, so every save makes a new copy. Chrome and Edge on a computer can save in place.')))
}
+ // ---- the document itself ------------------------------------------------
+ // Its name is the one property of a space anybody edits here; the rest are
+ // facts about it, shown because a file you cannot identify is a file you
+ // cannot support.
+ const titleIn = document.createElement('input')
+ titleIn.type = 'text'
+ titleIn.className = 'sp-input'
+ titleIn.value = doc.title
+ titleIn.disabled = store.readOnly
+ titleIn.addEventListener('change', () => {
+ const next = titleIn.value.trim() || 'Untitled'
+ titleIn.value = next
+ store.runEdit('__title', () => { store.doc.title = next })
+ onRepaint()
+ })
+ const props = section(t('Document properties'))
+ const titleRow = document.createElement('div')
+ titleRow.className = 'sp-ab-field'
+ const titleLbl = document.createElement('label')
+ titleLbl.textContent = t('Title')
+ titleRow.append(titleLbl, titleIn)
+ props.append(titleRow)
+ props.append(row(t('Document id'), mono(doc.docId)))
+ if (doc.modified) props.append(row(t('Last saved'), mono(shortStamp(doc.modified))))
+
// ---- updates -----------------------------------------------------------
- card.append(h(t('Updates')))
- const upStatus = document.createElement('p')
- upStatus.className = 'sp-note'
- upStatus.textContent = t('Checking is manual and verified: the download is signed, and its signature is checked against a key inside this file before anything is rewritten.')
- card.append(upStatus)
-
- const checkBtn = button(t('Check for updates'), async () => {
- upStatus.textContent = t('Checking…')
- let res: Awaited<ReturnType<typeof checkForUpdates>>
- try { res = await checkForUpdates() } catch { upStatus.textContent = t('Could not reach the update channel.'); return }
- if (res.status === 'current') { upStatus.textContent = t('You have the newest version ({v}).', { v: APP_VERSION }); return }
- if (res.status !== 'update') { upStatus.textContent = t('Could not verify an update, so nothing was changed.'); return }
- const rel: ReleaseInfo = res.release
- upStatus.textContent = t('Version {v} is available.', { v: rel.version })
- const apply = button(t('Update this file'), async () => {
- // the update writes a NEW file and leaves this one untouched, so a bad
- // update is undone by deleting the download
- await applyUpdate(rel, store.doc)
- upStatus.textContent = t('Downloaded. Open the new file — this one is unchanged.')
+ const upSec = section(t('Updates'))
+ const upStatus = document.createElement('div')
+ upStatus.className = 'sp-ab-status'
+ const upLine = document.createElement('p')
+ upLine.className = 'sp-note'
+ upStatus.append(upLine)
+ upLine.textContent =
+ lastAutoCheck?.status === 'current'
+ ? t("Checked automatically at launch — you're on the latest version (v{v}).", { v: APP_VERSION })
+ : lastAutoCheck?.status === 'error'
+ ? t("Launch check couldn't reach the release server ({m}). Check manually below.", { m: lastAutoCheck.message })
+ : t('This file carries its own app — it works offline, forever, as is.')
+
+ const checkBtn = button(t('Check for updates'), () => { void runCheck() })
+ upSec.append(actions(checkBtn), upStatus)
+ upSec.append(check(t('Check for updates automatically at launch'), autoCheckEnabled(), (on) => setAutoCheck(on)))
+ upSec.append(note(t('An update check is the only network this app makes on its own. It asks the release server for a signed manifest and sends nothing about you or this document — no ids, no telemetry.')))
+
+ async function runCheck(): Promise<void> {
+ checkBtn.disabled = true
+ upStatus.textContent = ''
+ upStatus.append(upLine)
+ upLine.textContent = t('Checking…')
+ const res = await checkForUpdates()
+ lastAutoCheck = res
+ checkBtn.disabled = false
+ if (res.status === 'current') {
+ upLine.textContent = t('You have the newest version ({v}).', { v: APP_VERSION })
+ return
+ }
+ if (res.status === 'error') {
+ upLine.textContent = t('Could not reach the update channel.')
+ return
+ }
+ upLine.textContent = ''
+ upStatus.append(updateCard(res.release))
+ }
+
+ /**
+ * One card for the one moment in this dialog with a decision in it.
+ *
+ * Grouped rather than left as five loose children of the status block — the
+ * layout lesson slides paid for, where a heading, the notes and three
+ * buttons squeezed between the section above and the controls below and a
+ * five-bullet changelog read as one line plus two scrollbars.
+ */
+ function updateCard(rel: ReleaseInfo): HTMLElement {
+ const box = document.createElement('div')
+ box.className = 'sp-ab-update'
+ const line = document.createElement('div')
+ line.className = 'sp-ab-new'
+ line.textContent = t('Version {v} is available.', { v: rel.version })
+ box.append(line)
+
+ // Per-version notes filtered to what THIS file actually skipped: a reader
+ // two versions behind should see both, and one version behind should not
+ // see the older one again. `notes` is the fallback for a manifest that
+ // predates the field.
+ const skipped = rel.notesFrom
+ ? Object.keys(rel.notesFrom)
+ .filter((v) => compareVersions(v, APP_VERSION) > 0)
+ .sort((a, b) => compareVersions(b, a))
+ : []
+ if (skipped.length) {
+ const lines = skipped.flatMap((v) =>
+ (rel.notesFrom![v] ?? []).map((n) => (skipped.length > 1 ? `• ${n} (${v})` : `• ${n}`)))
+ box.append(releaseNotes(lines.join('\n')))
+ } else if (rel.notes) {
+ box.append(releaseNotes(rel.notes))
+ }
+
+ const link = document.createElement('a')
+ link.className = 'sp-btn sp-ab-link'
+ link.href = `https://github.com/nyblnet/bento/releases/tag/v${encodeURIComponent(rel.version)}`
+ link.target = '_blank'
+ link.rel = 'noopener'
+ link.textContent = t('What’s new →')
+ link.title = t('Read the release notes for v{v} (opens in a new tab)', { v: rel.version })
+
+ const inPlace = button(canUpdateInPlace() ? t('Update this file') : t('Update this file…'), () => {
+ void (async () => {
+ inPlace.disabled = true
+ inPlace.textContent = t('Verifying…')
+ try {
+ const written = await applyUpdateInPlace(rel, store.doc)
+ if (written) {
+ box.replaceChildren(updatedCard(rel, written.backup))
+ } else {
+ inPlace.disabled = false
+ inPlace.textContent = t('Update this file…')
+ }
+ } catch (err) {
+ inPlace.disabled = false
+ inPlace.textContent = t('Update this file…')
+ upLine.textContent = t('Update failed: {m}', { m: String((err as Error)?.message ?? err) })
+ }
+ })()
}, true)
- card.insertBefore(apply, upStatus.nextSibling)
- })
- card.append(checkBtn)
+ inPlace.title = canUpdateInPlace()
+ ? t('Downloads a backup of the current version, then rewrites this file on disk as the new version — document untouched.')
+ : t('Verifies and builds the new version with this document inside, then asks where to save it — pick the file you have open to update it.')
+
+ const get = button(t('Download updated copy'), () => {
+ void (async () => {
+ get.disabled = true
+ get.textContent = t('Verifying…')
+ try {
+ // the update writes a NEW file and leaves this one untouched, so a
+ // bad update is undone by deleting the download
+ await applyUpdate(rel, store.doc)
+ get.textContent = t('Downloaded ✓')
+ box.append(note(t('This window keeps running v{v} until you open the downloaded file.', { v: APP_VERSION })))
+ } catch (err) {
+ get.disabled = false
+ get.textContent = t('Download updated copy')
+ upLine.textContent = t('Update failed: {m}', { m: String((err as Error)?.message ?? err) })
+ }
+ })()
+ })
+
+ box.append(actions(link, inPlace, get))
+ return box
+ }
+
+ function updatedCard(rel: ReleaseInfo, backup: 'beside' | 'downloaded' | 'none'): HTMLElement {
+ const done = document.createElement('div')
+ done.className = 'sp-ab-update'
+ const ok = document.createElement('div')
+ ok.className = 'sp-ab-new'
+ ok.textContent = t('Updated to v{v} on disk.', { v: rel.version })
+ done.append(ok)
+ // Say where the rollback went. A backup nobody can find is not a backup.
+ done.append(note(
+ backup === 'beside'
+ ? t('This window is still running v{v} — reload to finish. A v{v} backup was saved beside this file.', { v: APP_VERSION })
+ : backup === 'downloaded'
+ ? t('This window is still running v{v} — reload to finish. A v{v} backup was downloaded.', { v: APP_VERSION })
+ : t("This window is still running v{v}. If you overwrote the file that's open here, reload; otherwise open the file you saved.", { v: APP_VERSION }),
+ ))
+ done.append(actions(button(t('Reload into new version'), () => {
+ store.dirty = false // disk already holds this exact document
+ location.reload()
+ }, true)))
+ return done
+ }
+
+ // ---- appearance --------------------------------------------------------
+ // Beside Language, because they are the same kind of thing: preferences that
+ // belong to whoever opened the file, not to the file.
+ card.append(...appearanceSection())
// ---- language ----------------------------------------------------------
- card.append(h(t('Language')))
const sel = document.createElement('select')
sel.className = 'sp-select'
for (const c of localeChoices()) {
@@ -151,88 +459,290 @@ export function openAbout({ store, onRepaint, onSaveCopy, onImport }: AboutHooks
close()
onRepaint()
})
- card.append(row(t('Interface language'), sel))
- const langNote = document.createElement('p')
- langNote.className = 'sp-note'
- // the same rule as slides: language follows the READER, never the document
- langNote.textContent = t('Language follows whoever opens the file. It is never written into the document.')
- card.append(langNote)
+ section(
+ t('Language'),
+ row(t('Interface language'), sel),
+ // the same rule as slides: language follows the READER, never the document
+ note(t('Language follows whoever opens the file. It is never written into the document.')),
+ )
// ---- password ----------------------------------------------------------
- card.append(h(t('Password')))
- const pwNote = document.createElement('p')
- pwNote.className = 'sp-note'
- pwNote.textContent = isEncryptionActive()
+ const pwSec = section(t('Password'))
+ const pwNote = note(isEncryptionActive()
? t('This space is encrypted. Saves stay encrypted.')
- : t('A password encrypts the document inside the file. There is no recovery — lose it and the space is gone.')
- card.append(pwNote)
-
- card.append(button(isEncryptionActive() ? t('Remove password…') : t('Set a password…'), async () => {
- if (isEncryptionActive()) {
- if (!confirm(t('Remove the password? The next save writes the document in the clear.'))) return
- setEncryptionPassword(null)
- pwNote.textContent = t('Password removed. Save to write the space unencrypted.')
- return
- }
+ : t('A password encrypts the document inside the file. There is no recovery — lose it and the space is gone.'))
+ pwSec.append(pwNote)
+
+ const setPw = async (): Promise<void> => {
const pw = prompt(t('Choose a password. There is no way to recover it.'))
if (!pw) return
setEncryptionPassword(pw)
// Plaintext snapshots written BEFORE encryption was turned on would defeat
// the encryption the author just enabled. Both stores: the version timeline
// and the single recovery snapshot. From here on main.ts writes neither.
- await clearVersions(store.doc.docId)
- await clearRecovery(store.doc.docId)
+ await clearVersions(doc.docId)
+ await clearRecovery(doc.docId)
pwNote.textContent = t('Password set. Save to write the space encrypted.')
- }))
+ say(t('Password set. Save to write the space encrypted.'))
+ }
+
+ const pwActions = actions()
+ if (isEncryptionActive()) {
+ pwActions.append(button(t('Change password…'), () => { void setPw() }))
+ pwActions.append(danger(t('Remove password…'), pwSec, {
+ what: t('Remove the password?'),
+ why: t('The next save writes this space as plain, readable JSON — anybody who opens the file can read every page.'),
+ go: t('Remove the password'),
+ run: () => {
+ setEncryptionPassword(null)
+ pwNote.textContent = t('Password removed. Save to write the space unencrypted.')
+ say(t('Password removed. Save to write the space unencrypted.'))
+ },
+ }))
+ } else {
+ pwActions.append(button(t('Set a password…'), () => { void setPw() }))
+ }
+ pwSec.append(pwActions)
// ---- the way in ---------------------------------------------------------
// Beside the ways out on purpose: a format that can only be left is a
// format nobody arrives in.
if (onImport) {
- card.append(h(t('Bring notes in')))
- card.append(button(t('Import Markdown…'), () => { close(); onImport() }))
- const inNote = document.createElement('p')
- inNote.className = 'sp-note'
- inNote.textContent = t('A folder of .md files becomes pages, with the folder tree and the [[wikilinks]] intact.')
- card.append(inNote)
+ section(
+ t('Bring notes in'),
+ actions(button(t('Import Markdown…'), () => { close(); onImport() })),
+ note(t('A folder of .md files becomes pages, with the folder tree and the [[wikilinks]] intact.')),
+ // Said HERE because this is where somebody looks for it, and because the
+ // same dialog claims below that a space is never a dead end. A promise
+ // made in one direction only is half a promise.
+ note(t('Another bento/spaces file can arrive the same way, nested under any page.')),
+ )
}
// ---- ways out ----------------------------------------------------------
- card.append(h(t('Take it elsewhere')))
- const exports = document.createElement('div')
- exports.className = 'sp-actions'
- exports.append(
- button(t('Copy document JSON'), () => {
- // STRIPPED. This lands on a clipboard, and the note two lines below
- // invites the copy — "the whole document is plain JSON in this file" —
- // so the next stop is very often a chat window. The document's collab
- // block holds the read key, the write key and the owner key that can
- // also revoke.
- void navigator.clipboard?.writeText(JSON.stringify(docForExport(store.doc), null, 2))
- }),
+ const outSec = section(t('Take it elsewhere'))
+ const copyJson = button(t('Copy document JSON'), () => {
+ // The clipboard copy is a HAND-OUT. Every field under `collab` is a bearer
+ // capability — the room, the read key and the private halves that grant
+ // writing and revoking — so the copy strips the block outright, the way
+ // the page extract does. It used to copy the live document whole.
+ //
+ // Through model.docForExport, not a local clone-and-delete: this landed on
+ // main independently while this dialog was being rebuilt, and two strippers
+ // for one rule is how the two of them start to disagree. The shared one
+ // also strips by REMOVING, so a private field added to the credentials
+ // later is covered without either call site being touched.
+ navigator.clipboard?.writeText(JSON.stringify(docForExport(store.doc), null, 2))
+ .then(() => { copyJson.textContent = t('Copied ✓'); say(t('Document JSON copied')) })
+ .catch(() => { copyJson.textContent = t('Couldn’t access the clipboard') })
+ .finally(() => { setTimeout(() => { copyJson.textContent = t('Copy document JSON') }, 1800) })
+ })
+ outSec.append(actions(
+ copyJson,
button(t('Export as Markdown'), () => downloadMarkdown(store)),
+ ...(onExportSpace ? [button(t('Export page as a space…'), () => { close(); onExportSpace() })] : []),
button(t('Save a copy…'), () => { close(); onSaveCopy() }),
- )
- card.append(exports)
- const outNote = document.createElement('p')
- outNote.className = 'sp-note'
- outNote.textContent = t('A space is never a dead end: the whole document is plain JSON in this file, and every page exports as Markdown.')
- card.append(outNote)
+ ...(onWriteCopy ? [button(t('Duplicate as a new space…'), () => {
+ // A DUPLICATE, not a copy: a fresh docId and no collaboration
+ // credentials, so it can never sync with the space it came from. You
+ // keep editing this one — the writer holds no handle (portable.ts).
+ const clone = JSON.parse(JSON.stringify(store.doc)) as SpacesDoc
+ clone.docId = uid('doc')
+ delete clone.collab
+ clone.modified = new Date().toISOString()
+ close()
+ void onWriteCopy(clone)
+ })] : []),
+ ))
+ outSec.append(note(t('A space is never a dead end: the whole document is plain JSON in this file, and every page exports as Markdown.')))
+
+ // ---- the two that cannot be taken back -----------------------------------
+ // Its own section, its own weight, and every action here says what it will
+ // do before it does it. Replace-from-JSON is the one control in this dialog
+ // that can lose a document.
+ if (!store.readOnly) {
+ const risky = section(t('Careful'))
+ risky.classList.add('sp-ab-risky')
+ risky.append(danger(t('Replace from JSON…'), risky, {
+ what: t('Replace every page from pasted JSON?'),
+ why: t('Everything in this space is replaced by what you paste. ⌘Z undoes it, but only while this window stays open.'),
+ go: t('Replace'),
+ form: replaceForm,
+ }))
+ risky.append(note(t('The counterpart of Copy document JSON: edit a space in another tool, then bring it back.')))
+ }
+
+ /**
+ * The paste box, IN FLOW.
+ *
+ * Not a popover, and not a second overlay: the card scrolls, so a floating
+ * child of it would be clipped on both axes (CLAUDE.md #10). It is a block
+ * of the list that pushes the rest down, and the card scrolls to it.
+ */
+ function replaceForm(host: HTMLElement, dismiss: () => void): HTMLElement {
+ const wrap = document.createElement('div')
+ const ta = document.createElement('textarea')
+ ta.className = 'sp-ab-json'
+ ta.rows = 7
+ ta.placeholder = t('Paste document JSON here…')
+ const apply = button(t('Replace'), () => {
+ const res = parseDoc(ta.value)
+ if (!res.ok) {
+ ta.classList.add('sp-ab-bad')
+ apply.textContent = t('That is not a bento/spaces document')
+ setTimeout(() => { apply.textContent = t('Replace') }, 2000)
+ return
+ }
+ // The live session belongs to THIS document, not to the pasted text.
+ // Content is imported; identity and capability are not — adopting the
+ // pasted `collab` would either wipe the room credentials or silently
+ // move this space into somebody else's room.
+ const keep = store.doc.collab
+ if (keep) res.doc.collab = keep
+ else delete res.doc.collab
+ store.replaceDoc(res.doc)
+ onRepaint()
+ close()
+ say(t('Document replaced — ⌘Z undoes'))
+ })
+ apply.classList.add('sp-ab-go')
+ wrap.append(ta, actions(apply, button(t('Cancel'), dismiss)))
+ host.append(wrap)
+ ta.focus()
+ return wrap
+ }
+
+ /**
+ * A weightier control: it states the consequence, then asks again.
+ *
+ * The confirmation is a BLOCK, not a `confirm()` and not a popover — see the
+ * header. The button that finally does the thing is the second one you
+ * press, and it is labelled with the verb rather than "OK".
+ */
+ function danger(
+ label: string,
+ host: HTMLElement,
+ opts: {
+ what: string
+ why: string
+ go?: string
+ run?: () => void
+ form?: (host: HTMLElement, dismiss: () => void) => HTMLElement
+ },
+ ): HTMLElement {
+ let open: HTMLElement | null = null
+ const b = button(label, () => {
+ if (open) { open.remove(); open = null; b.setAttribute('aria-expanded', 'false'); return }
+ const panel = document.createElement('div')
+ panel.className = 'sp-ab-confirm'
+ const what = document.createElement('strong')
+ what.textContent = opts.what
+ panel.append(what, note(opts.why))
+ const dismiss = () => { panel.remove(); open = null; b.setAttribute('aria-expanded', 'false'); b.focus() }
+ if (opts.form) opts.form(panel, dismiss)
+ else {
+ const go = button(opts.go ?? label, () => { opts.run?.(); dismiss() })
+ go.classList.add('sp-ab-go')
+ panel.append(actions(go, button(t('Cancel'), dismiss)))
+ }
+ host.append(panel)
+ open = panel
+ b.setAttribute('aria-expanded', 'true')
+ panel.scrollIntoView({ block: 'nearest' })
+ })
+ b.classList.add('sp-ab-danger')
+ b.setAttribute('aria-expanded', 'false')
+ return b
+ }
- card.append(button(t('Close'), close, true))
+ // ---- fine print ---------------------------------------------------------
+ const fine = document.createElement('p')
+ fine.className = 'sp-ab-fine'
+ fine.textContent = t('bento/spaces is MIT-licensed and carries no third-party runtime — the full notices travel in this file’s source.')
+ card.append(fine)
+
+ const foot = document.createElement('div')
+ foot.className = 'sp-ab-foot'
+ foot.append(button(t('Close'), close, true))
+ card.append(foot)
+
+ // ---- focus ---------------------------------------------------------------
+ // Trapped, because this is a modal: Tab off either end wraps rather than
+ // walking into an editor the reader cannot see.
+ card.addEventListener('keydown', (e) => {
+ if (e.key !== 'Tab') return
+ const f = [...card.querySelectorAll<HTMLElement>(
+ 'a[href], button:not([disabled]), input:not([disabled]), select, textarea')]
+ .filter((el) => el.offsetParent !== null)
+ if (!f.length) return
+ const first = f[0]
+ const last = f[f.length - 1]
+ if (e.shiftKey && document.activeElement === first) { e.preventDefault(); last.focus() }
+ else if (!e.shiftKey && document.activeElement === last) { e.preventDefault(); first.focus() }
+ })
back.append(card)
back.addEventListener('mousedown', (e) => { if (e.target === back) close() })
- back.addEventListener('keydown', (e) => { if (e.key === 'Escape') close() })
+ document.addEventListener('keydown', onKey, true)
document.body.append(back)
- card.querySelector('button')?.focus()
+ checkBtn.focus()
+}
- function text(s: string): HTMLElement {
- const n = document.createElement('span')
- n.className = 'sp-mono'
- n.textContent = s
- return n
+/**
+ * Release notes → a real list.
+ *
+ * The manifest carries them as PLAIN TEXT, one "• " bullet per line, capped at
+ * five plus an "…and N more" tail (scripts/release.mjs). A pre-wrap block gave
+ * every wrapped bullet a flush-left second line, which at 375px is most of them
+ * — so one item read as two and the box looked like a wall. Split per line and
+ * hang the indent instead.
+ *
+ * Always textContent, never innerHTML: the manifest is signed, but a signature
+ * says who wrote a string, not that it is safe to run.
+ */
+function releaseNotes(notes: string): HTMLElement {
+ const box = document.createElement('div')
+ box.className = 'sp-ab-release'
+ for (const raw of notes.split('\n')) {
+ const text = raw.trim()
+ if (!text) continue
+ const bullet = /^[•*-]\s+/.test(text)
+ const item = document.createElement('div')
+ item.className = bullet ? 'sp-ab-note' : 'sp-ab-more'
+ item.textContent = bullet ? text.replace(/^[•*-]\s+/, '') : text
+ box.append(item)
}
+ return box
+}
+
+/**
+ * Words, in a way that is not wrong outside Europe.
+ *
+ * Splitting on whitespace counts a whole Japanese paragraph as one word. CJK
+ * has no inter-word space, so its characters are counted individually — the
+ * convention every word processor uses — and the rest splits on whitespace.
+ */
+const CJK = /[\u3040-\u30ff\u3400-\u4dbf\u4e00-\u9fff\uf900-\ufaff\uac00-\ud7af]/g
+function countWords(text: string): number {
+ if (!text) return 0
+ const cjk = text.match(CJK)?.length ?? 0
+ const rest = text.replace(CJK, ' ').trim()
+ return cjk + (rest ? rest.split(/\s+/).length : 0)
+}
+
+/** Real UTF-8 bytes of the document, not characters — MB is a promise. */
+function byteLength(doc: SpacesDoc): number {
+ const json = JSON.stringify(doc)
+ try { return new Blob([json]).size } catch { return json.length }
+}
+
+/** A timestamp a person can read, in the reader's own locale. */
+function shortStamp(iso: string): string {
+ const d = new Date(iso)
+ if (Number.isNaN(d.getTime())) return iso
+ try {
+ return d.toLocaleString(locale(), { dateStyle: 'medium', timeStyle: 'short' })
+ } catch { return d.toISOString().slice(0, 16).replace('T', ' ') }
}
/**
@@ -245,6 +755,10 @@ export function toMarkdown(store: Store): string {
const out: string[] = []
const ctx: MdCtx = {
titleOf: (id) => store.index.page.get(id)?.title,
+ // THE SAME converter every other block's text goes through, handed to the
+ // one type whose text is not a single string. A table with its own inline
+ // rules would be the second place `**bold**` is decided.
+ inline: htmlToMd,
// DERIVED THE SAME WAY THE SCREEN DERIVES IT — same filter, same sort, same
// grouping — so the file you download is the board you were looking at. A
// second traversal here is how an export starts quietly disagreeing with
@@ -324,29 +838,17 @@ export function toMarkdown(store: Store): string {
return out.join('\n').replace(/\n{3,}/g, '\n\n')
}
-/** Inline html → inline markdown. Links become `[text](#p/id)` so a reader can
- * still see which page was meant even outside the space. */
-function htmlToMd(html: string): string {
- // INERT parse — exporting must not run what it is exporting. A detached div
- // still loads its own resources, so `<img src="404" onerror>` in a block
- // would fire on "Download as Markdown". See sanitize.ts inertBody().
- const d = inertBody(html)
- const walk = (n: Node): string => {
- if (n.nodeType === Node.TEXT_NODE) return n.textContent ?? ''
- if (!(n instanceof HTMLElement)) return ''
- const inner = [...n.childNodes].map(walk).join('')
- switch (n.tagName) {
- case 'B': case 'STRONG': return `**${inner}**`
- case 'I': case 'EM': return `*${inner}*`
- case 'CODE': return `\`${inner}\``
- case 'S': return `~~${inner}~~`
- case 'BR': return '\n'
- case 'A': return `[${inner}](${n.getAttribute('href') ?? ''})`
- default: return inner
- }
- }
- return [...d.childNodes].map(walk).join('').trim()
-}
+/**
+ * Inline html → inline markdown.
+ *
+ * Lives in marks.ts now, with the mark table it has to agree with. It used to
+ * be a DOM walk here, which meant it could not be tested — the rigs are plain
+ * node — so "does every mark survive an export" was a question only a human
+ * with a browser could answer. Four of them did not: `u`, `mark`, `sub` and
+ * `sup` fell through to their text. It is a pure function over the same run
+ * list the canonicaliser uses, so a mark the model can hold and the exporter
+ * cannot spell is now a rig failure.
+ */
export function downloadMarkdown(store: Store): void {
const blob = new Blob([toMarkdown(store)], { type: 'text/markdown' })
diff --git a/spaces/src/agent.ts b/spaces/src/agent.ts
index ce6b5a6c..01b36086 100644
--- a/spaces/src/agent.ts
+++ b/spaces/src/agent.ts
@@ -30,7 +30,7 @@
// an undo entry that undoes nothing. Planning first also makes the whole write
// path testable in node, where there is no store and no DOM.
-import { type SpacesDoc, type Page, type Block, buildIndex, isRemote, newBlock, newPage, uid, descendantsOf } from './model.ts'
+import { type SpacesDoc, type Page, type Block, buildIndex, isRemote, newBlock, newPage, uid, descendantsOf, linkCard, commentsOn } from './model.ts'
import { SPECS, SPEC } from './blocks.ts'
import { sanitizeInline, textOf, inertBody, esc, UNWRAP } from './sanitize.ts'
import { orphanAssets, humanBytes } from './assets.ts'
@@ -49,6 +49,11 @@ import {
const KNOWN_BLOCK_TYPES = SPECS.map((s) => s.type)
const KNOWN = new Set<string>(KNOWN_BLOCK_TYPES)
+/** A media block whose kind is audio — anything else is drawn as video, which
+ * is the same rule renderers and exporters here already apply. */
+const isAudio = (b: Block): boolean =>
+ b.type === 'media' && String((b as { kind?: unknown }).kind ?? 'video') === 'audio'
+
const words = (s: string): number => (s.trim() ? s.trim().split(/\s+/).length : 0)
const utf8len = (s: string): number =>
@@ -279,7 +284,7 @@ export function validateDoc(doc: SpacesDoc): ValidateResult {
add({ page: p.id, code: 'no-blocks', severity: 'error', path: 'blocks',
message: `Page "${p.title}" has no blocks, so there is nothing in it to put a caret in — it cannot be typed into.`,
fix: 'Give it at least one block, e.g. { "type": "p", "html": "" }.' })
- } else if (!blocks.some((b) => textOf(b.html).trim() || b.type === 'image' || b.type === 'pagelink' || b.type === 'divider')) {
+ } else if (!blocks.some((b) => textOf(b.html).trim() || b.type === 'image' || b.type === 'media' || b.type === 'pagelink' || b.type === 'link' || b.type === 'divider')) {
add({ page: p.id, code: 'empty-page', severity: 'info',
message: `Page "${p.title}" has blocks but no content.`,
fix: 'Write something, or remove the page. A deliberately blank page (an inbox, a stub) is fine — this is only a note.' })
@@ -326,6 +331,11 @@ export function validateDoc(doc: SpacesDoc): ValidateResult {
fix: 'Use a block type that can carry it (image, code, quote), or inline tags only: b i u s em strong code a span mark sub sup br.' })
}
}
+ // A TABLE CELL'S LINKS ARE IN `html` TOO, so this scan already sees
+ // them: `writeTable` is the one writer and it keeps the fallback html
+ // as the cells joined, links intact — which is also how buildIndex
+ // finds a backlink from a cell. Scanning `rows` as well would report
+ // the same dead link twice.
for (const m of b.html.matchAll(LINK_RE)) {
const href = m[1]
if (href.startsWith('#p/')) {
@@ -362,6 +372,27 @@ export function validateDoc(doc: SpacesDoc): ValidateResult {
}
}
+ if (b.type === 'link') {
+ // A CARD IS NOT A LINK UNTIL ITS URL IS ONE. `linkCard` returns '' for
+ // an empty url and for anything outside https:/http:/mailto: — and a
+ // card that is not clickable renders as a dead card rather than as a
+ // link that silently goes nowhere, so this is the only way to find out.
+ const c = linkCard(b)
+ if (!c.url) {
+ const raw = String(b.url ?? '')
+ add({ ...at, code: raw ? 'dead-href' : 'link-no-url', severity: raw ? 'warning' : 'error', path: 'url',
+ message: raw
+ ? `A link card's url "${raw.slice(0, 40)}" is outside the allowlist (https:, mailto:), so the card renders but is not clickable.`
+ : 'A link card has no url, so it renders as an empty card that goes nowhere.',
+ fix: 'Set url to an https: or mailto: address. Use a pagelink block for a page in this space.' })
+ }
+ if (isRemote(String(b.image ?? ''))) {
+ add({ ...at, code: 'remote-image', severity: 'warning', path: 'image',
+ message: `A link card's image (${String(b.image).slice(0, 48)}) is remote, so it is DROPPED at render — opening a space never contacts a third party.`,
+ fix: 'Embed the bytes: put the data: URI in doc.assets and reference it as asset:<key>.' })
+ }
+ }
+
// ---- field values ----------------------------------------------------
// An ISSUE IS A PAGE and its values are `prop` blocks. Everything that
// can be wrong here is wrong SILENTLY: the page still renders, the board
@@ -419,26 +450,46 @@ export function validateDoc(doc: SpacesDoc): ValidateResult {
const src = typeof b.src === 'string' ? b.src : ''
if (src.startsWith('asset:')) usedAssets.add(src.slice(6))
- if (b.type === 'image') {
+ // a video's poster is a second reference into the asset table, and one
+ // this sweep did not see — so the still an author picked would read as an
+ // orphan and validate() would advise deleting it
+ const posterRef = typeof b.poster === 'string' ? b.poster : ''
+ if (posterRef.startsWith('asset:')) usedAssets.add(posterRef.slice(6))
+ if (b.type === 'image' || b.type === 'media') {
+ const what = b.type === 'media'
+ ? (String(b.kind ?? 'video') === 'audio' ? 'An audio' : 'A video')
+ : 'An image'
if (!src) {
- add({ ...at, code: 'image-no-src', severity: 'error', path: 'src',
- message: 'An image block has no src, so nothing renders.',
- fix: 'Set src to asset:<key>, or a data: URI.' })
+ add({ ...at, code: `${b.type}-no-src`, severity: b.type === 'media' ? 'warning' : 'error', path: 'src',
+ // a media block with no src is a CHOOSER, not a hole: the editor
+ // inserts one and asks for the file second, so an unfinished block
+ // is a normal intermediate state rather than a broken document
+ message: b.type === 'media'
+ ? `${what} block has no src, so it renders as a "choose a file" box.`
+ : 'An image block has no src, so nothing renders.',
+ fix: 'Set src to asset:<key>, a data: URI, or an https: address.' })
} else if (src.startsWith('asset:') && !(src.slice(6) in assets)) {
add({ ...at, code: 'missing-asset', severity: 'error', path: 'src',
message: `src references asset "${src.slice(6)}", which is not in doc.assets — nothing renders.`,
fix: 'Add the data: URI to doc.assets under that key, or point src at one that is there.' })
} else if (isRemote(src)) {
- add({ ...at, code: 'remote-image', severity: 'warning', path: 'src',
- message: `src is remote (${src.slice(0, 48)}), so it shows a placeholder naming the host until the reader clicks "Load this image". Opening a document never contacts a third party.`,
+ add({ ...at, code: b.type === 'media' ? 'remote-media' : 'remote-image', severity: 'warning', path: 'src',
+ message: `src is remote (${src.slice(0, 48)}), so it shows a placeholder naming the host until the reader agrees to load it. Opening a document never contacts a third party.`,
fix: 'Embed the bytes: put the data: URI in doc.assets and reference it as asset:<key>.' })
}
if (!String(b.alt ?? '').trim()) {
add({ ...at, code: 'image-no-alt', severity: 'warning', path: 'alt',
- message: 'This image has no alt text — screen readers get nothing, and alt is what a reader SEES if the image is remote and unloaded.',
- fix: 'Write what the image shows, in a sentence.' })
+ message: `${what} block has no alt text — screen readers get nothing, and alt is what a reader SEES if it is remote and unloaded.`,
+ fix: 'Write what it shows, in a sentence.' })
}
- if (!b.w || !b.h) {
+ // AUDIO HAS NO PIXELS. The intrinsic size is about the aspect box that
+ // holds the layout still while a picture decodes, and an audio player
+ // is a fixed-height control that never reflows anything — so asking for
+ // w/h on one is asking an author to write down a number that does not
+ // exist. Every correctly-authored audio block would have carried this
+ // finding, which is the false positive that teaches an agent to stop
+ // reading them.
+ if (!isAudio(b) && (!b.w || !b.h)) {
add({ ...at, code: 'image-no-size', severity: 'info', path: 'w',
message: 'No intrinsic w/h, so the page reflows under the reader as the image decodes.',
fix: 'Set w and h to the image\'s pixel size.' })
@@ -1333,3 +1384,77 @@ export function planNewIssue(doc: SpacesDoc, spec: unknown): Plan<NewIssueResult
apply() { doc.pages.push(page) },
}
}
+
+
+// ---------------------------------------------------------------------------
+// review comments
+// ---------------------------------------------------------------------------
+
+/** One thread, with the anchor spelled out rather than implied by where it sat. */
+export interface CommentReport {
+ id: string
+ /** 'block' = about that block, 'page' = about the page as a whole */
+ anchor: 'block' | 'page'
+ pageId: string
+ pageTitle: string
+ /** present only for an anchor of 'block' */
+ blockId?: string
+ /** the href that reaches the page it is on */
+ url: string
+ author: string
+ at: string
+ /** PLAIN TEXT (model.ts CommentEntry) — never html, in or out */
+ text: string
+ resolved: boolean
+ replies: Array<{ id: string; author: string; at: string; text: string }>
+}
+
+export interface CommentQuery {
+ /** only open threads (`false`) or only settled ones (`true`) */
+ resolved?: boolean
+ /** one page's threads */
+ pageId?: string
+}
+
+/**
+ * Every review thread in the space, flat, with a TYPED ANCHOR.
+ *
+ * This is the entry point for an agent working through what a human flagged:
+ * one call gives the whole backlog of remarks, in document order, each one
+ * saying what it is about. Flat rather than nested because the caller's
+ * question is "what is outstanding", not "what does this page hold" — and
+ * because the two anchors live in two places in the file, which is a storage
+ * decision (model.ts explains why) and no business of the reader's.
+ *
+ * Defensive about every field: a comment arrives in a file somebody mailed
+ * you, so a hostile or hand-edited `replies: 3` must read as no replies rather
+ * than throw inside a report an agent is about to branch on.
+ */
+export function commentsReport(doc: SpacesDoc, query: CommentQuery = {}): CommentReport[] {
+ const str = (v: unknown): string => (typeof v === 'string' ? v : '')
+ const out: CommentReport[] = []
+ for (const page of doc.pages) {
+ if (query.pageId && page.id !== query.pageId) continue
+ for (const at of commentsOn(page)) {
+ const c = at.comment
+ const resolved = c.resolved === true
+ if (query.resolved !== undefined && query.resolved !== resolved) continue
+ out.push({
+ id: c.id,
+ anchor: at.blockId ? 'block' : 'page',
+ pageId: page.id,
+ pageTitle: page.title,
+ ...(at.blockId ? { blockId: at.blockId } : {}),
+ url: `#p/${page.id}`,
+ author: str(c.author),
+ at: str(c.at),
+ text: str(c.text),
+ resolved,
+ replies: (Array.isArray(c.replies) ? c.replies : [])
+ .filter((r) => r && typeof r === 'object')
+ .map((r) => ({ id: str(r.id), author: str(r.author), at: str(r.at), text: str(r.text) })),
+ })
+ }
+ }
+ return out
+}
diff --git a/spaces/src/appearance.ts b/spaces/src/appearance.ts
new file mode 100644
index 00000000..40a31ce5
--- /dev/null
+++ b/spaces/src/appearance.ts
@@ -0,0 +1,62 @@
+// SPDX-License-Identifier: MIT
+// Copyright (c) 2026 The Bento authors
+//
+// The Appearance control: Match my system / Light / Dark.
+//
+// WHY IT IS ITS OWN FILE, and not eleven lines inside about.ts. It renders one
+// section of the About dialog, which is where the other VIEWER preferences
+// already live — the interface language sits directly below it, and both
+// follow the reader rather than the file. But about.ts is a 355-line function
+// that several branches are editing at once, and a section built here costs
+// that file one import and one `card.append(...)`. The seam is the smallest
+// one that puts the control in the right place.
+//
+// The choice itself is kernel/src/theme.ts's: localStorage, never the
+// document. See the theme-token comment at the top of styles.css for what dark
+// covers in this app and what it deliberately does not.
+
+import { THEME_CHOICES, setTheme, themeChoice, type ThemeChoice } from '../../kernel/src/theme.ts'
+import { t } from './i18n'
+
+const label = (c: ThemeChoice): string =>
+ c === 'auto' ? t('Match my system') : c === 'light' ? t('Light') : t('Dark')
+
+/**
+ * The heading, the picker and its note, ready to append.
+ *
+ * Returns nodes rather than mounting them so the caller decides where the
+ * section sits — and so nothing here needs to know what a dialog is.
+ */
+export function appearanceSection(): HTMLElement[] {
+ const h = document.createElement('h2')
+ h.className = 'sp-card-h'
+ h.textContent = t('Appearance')
+
+ const sel = document.createElement('select')
+ sel.className = 'sp-select'
+ for (const c of THEME_CHOICES) {
+ const o = document.createElement('option')
+ o.value = c
+ o.textContent = label(c)
+ if (c === themeChoice()) o.selected = true
+ sel.append(o)
+ }
+ // No repaint and no dialog close: the theme is CSS variables, so the whole
+ // window — the dialog included — changes under the picker while it is still
+ // open. That is the point of doing it in tokens; it is also how you compare
+ // the two without losing your place.
+ sel.addEventListener('change', () => setTheme(sel.value as ThemeChoice))
+
+ const row = document.createElement('div')
+ row.className = 'sp-row'
+ const lbl = document.createElement('span')
+ lbl.textContent = t('Interface theme')
+ row.append(lbl, sel)
+
+ const note = document.createElement('p')
+ note.className = 'sp-note'
+ // the same rule as the language below it, and PLATFORM §8's
+ note.textContent = t('The theme follows whoever opens the file. It is never written into the document.')
+
+ return [h, row, note]
+}
diff --git a/spaces/src/assets.ts b/spaces/src/assets.ts
index 68f40f4e..272a53f7 100644
--- a/spaces/src/assets.ts
+++ b/spaces/src/assets.ts
@@ -14,6 +14,18 @@ import type { SpacesDoc } from './model'
export const MAX_EDGE = 1600
/** Above this, ask before embedding rather than silently making a 30MB file. */
export const IMAGE_EMBED_BUDGET = 4 * 1024 * 1024
+/**
+ * The same question for a video or an audio clip, at twice the threshold.
+ *
+ * Higher than the image budget ON PURPOSE, and the reason is that nothing here
+ * can be made smaller. A photo off a phone is downscaled before it travels
+ * (prepareImage), so 4MB is a number an author almost never meets; a clip is
+ * embedded byte for byte, because re-encoding video in a browser tab means
+ * shipping an encoder and taking minutes over it. So the budget is the point
+ * at which the question is worth asking rather than a size we can rescue, and
+ * it matches slides' MEDIA_EMBED_BUDGET so the two apps ask at the same place.
+ */
+export const MEDIA_EMBED_BUDGET = 8 * 1024 * 1024
/** Where a space stops being comfortable to mail. Warn, never block. */
export const SPACE_WEIGHT_WARN = 25 * 1024 * 1024
diff --git a/spaces/src/blocks.ts b/spaces/src/blocks.ts
index 7465a868..618ef072 100644
--- a/spaces/src/blocks.ts
+++ b/spaces/src/blocks.ts
@@ -21,7 +21,7 @@
// `custom: true`; everything the registry can express lives here.
import type { Block } from './model'
-import { effectiveParents } from './model.ts'
+import { effectiveParents, tableOf, writeTable, linkCard } from './model.ts'
import type { IconName } from './icons'
export interface BlockSpec {
@@ -103,6 +103,16 @@ export interface MdCtx {
titleOf: (id: string) => string | undefined
/** the rows a `view` block stands for, already filtered and ordered */
rowsOf: (b: Block) => Array<{ id: string; title: string; group?: string; fields: string }>
+ /**
+ * Inline html → inline markdown.
+ *
+ * The exporter hands every block its own `html` already converted, which is
+ * the whole of the text for every type that HAS one string of it. A table has
+ * one per cell, and the converter needs a DOM (about.ts htmlToMd parses
+ * inert), which this file deliberately does not — so it arrives through the
+ * context, exactly like the two questions above.
+ */
+ inline: (html: string) => string
}
export const SPECS: BlockSpec[] = [
@@ -205,11 +215,67 @@ export const SPECS: BlockSpec[] = [
tag: 'div', custom: true, md: [/^--- $/],
toMd: () => ['---'],
},
+ {
+ // A CONTENT table: rows and columns of inline html, no formulas and nothing
+ // that recalculates (working/spaces-design.md §2.6). Custom, because a
+ // <table> is structure the default tag-plus-inline-host renderer cannot
+ // express, and `text: false` because its editable text lives in the CELLS —
+ // a block-level inline host beside them would be a second place to type
+ // that nothing displays.
+ type: 'table', label: 'Table', hint: 'Rows and columns', icon: 'table',
+ tag: 'div', custom: true,
+ // Also the CONVERSION path (editor.setType), so it must not clobber: a
+ // table turned into a paragraph and back keeps its rows. A paragraph turned
+ // INTO a table keeps its words, in the first header cell — the alternative
+ // is a block menu entry that silently discards the line you typed.
+ init: (b) => {
+ if (Array.isArray(b.rows) && b.rows.length) return
+ const first = typeof b.html === 'string' ? b.html : ''
+ writeTable(b, {
+ rows: [[first, '', ''], ['', '', ''], ['', '', '']],
+ cols: [1, 1, 1], colAlign: ['', '', ''], header: true,
+ })
+ },
+ toMd: (b, _text, indent, ctx) => tableToMd(b, indent, ctx.inline),
+ },
{
type: 'pagelink', label: 'Link to page', hint: 'A card that opens a page', icon: 'link',
tag: 'div', custom: true,
toMd: (b, _text, _indent, ctx) => [`→ [[${ctx.titleOf(String(b.page)) ?? '?'}]]`],
},
+ {
+ // A LINK TO SOMEWHERE ON THE WEB — the outward-facing sibling of pagelink.
+ //
+ // Every field is STORED. Notion and Slack build this card by fetching the
+ // url on a server and reading its OpenGraph tags; there is no server here
+ // and there is not going to be one, so what the card shows is what the
+ // author typed. See docs/DECISIONS.md for why not even an editor-time,
+ // opt-in fetch is on the table.
+ type: 'link', label: 'Link to the web', hint: 'A card for an address you type', icon: 'globe',
+ tag: 'div', custom: true,
+ // A LINK CARD IN MARKDOWN IS A LINK. Not a table, not a blockquote, not an
+ // html <div> — every one of those is a card-shaped thing that stops being a
+ // link the moment it leaves this app, and the ONE fact a link card carries
+ // that cannot be reconstructed is where it points.
+ //
+ // Built from the FIELDS rather than from `text`. `html` holds the same
+ // link, so the default export would already be close — but `html` is a
+ // fallback for old builds, and an export that reads it would silently
+ // export nothing at all for a card an agent wrote fields-only.
+ toMd: (b) => {
+ const c = linkCard(b)
+ // no url, no link: a card that is not clickable must not export as
+ // something a reader will click
+ if (!c.url) return [[c.title, c.desc].filter(Boolean).join(' — ')]
+ const tail = c.desc ? ` — ${c.desc}` : ''
+ // `[` and `]` in a title end the link text early and leave the url as
+ // loose parenthesised prose; a url holding a space or a bracket needs the
+ // angle form, which is what <> is FOR in CommonMark
+ const label = c.title.replace(/([[\]])/g, '\\$1')
+ const href = /[\s()<>]/.test(c.url) ? `<${c.url}>` : c.url
+ return [`[${label}](${href})${tail}`]
+ },
+ },
{
// A FIELD VALUE on a page. Unlisted: fields are added from the issue header,
// not the / menu — "Field" in a block list would be a block whose value you
@@ -269,8 +335,110 @@ export const SPECS: BlockSpec[] = [
tag: 'div', custom: true,
toMd: (b) => [`![${String(b.alt ?? '')}](${String(b.src ?? '')})`],
},
+ {
+ type: 'media', label: 'Video or audio', hint: 'Plays in the page', icon: 'play',
+ tag: 'div', custom: true,
+ // A fresh block has no src yet — the renderer draws a chooser and the
+ // editor wires it. `kind` is set the moment a file or a link arrives, from
+ // what the file actually IS, so the default here only has to be the shape
+ // that degrades usefully.
+ init: (b) => { if (b.kind === undefined) b.kind = 'video' },
+ // MARKDOWN HAS NO VIDEO, and pretending otherwise loses the block.
+ //
+ // Three candidates, and only one of them is right in more than one place.
+ // `![](clip.mp4)` is IMAGE syntax: every renderer that has ever existed
+ // draws a broken-image glyph for it. A bare URL on its own line becomes a
+ // player on github.com and on nothing else, so it exports as a naked
+ // string everywhere a reader is likelier to open the file. A LINK is
+ // correct in all of them: it says what the thing is and where it is, and
+ // the one renderer that could do better still shows something you can
+ // click.
+ //
+ // The target is `src` verbatim, `asset:` and data: included, exactly as
+ // the image exporter already writes it. That link does not resolve outside
+ // the space — which is the truth about an embedded clip, and a truthful
+ // dead link beats a silently dropped block.
+ toMd: (b) => {
+ const kind = String(b.kind ?? 'video') === 'audio' ? 'Audio' : 'Video'
+ const label = String(b.alt ?? '') || kind
+ const src = String(b.src ?? '')
+ return [src ? `[${label}](${src})` : `_${kind}_`]
+ },
+ },
]
+/** The `:---:` rule row's four forms, which are the whole of what GFM can say
+ * about alignment — and the reason `colAlign` is per column, not per cell. */
+const RULE: Record<string, string> = { left: ':---', center: ':---:', right: '---:' }
+
+/**
+ * A table as a GitHub-flavoured pipe table.
+ *
+ * THE HEADER ROW IS NOT OPTIONAL IN GFM: a table without one is not a table,
+ * it is three lines of prose full of pipes. So a `header: false` table exports
+ * with an EMPTY header row, which is the form every generator uses and which
+ * this app's own importer reads back as `header: false`.
+ *
+ * Two characters end a cell early and both can arrive from a file someone
+ * mailed you: a literal `|` (escaped) and a newline, which `<br>` in a cell
+ * becomes on the way through the inline converter (turned back into `<br>`,
+ * which GFM renders inside a cell — a real newline would end the row).
+ * An EMPTY cell is emitted as a space: `||` is a column count nobody meant.
+ */
+export function tableToMd(b: Block, indent: string, inline: (html: string) => string): string[] {
+ const t = tableOf(b)
+ const cell = (html: string): string =>
+ inline(html).replace(/\|/g, '\\|').replace(/\n/g, '<br>').trim() || ' '
+ const line = (cells: string[]): string => `${indent}| ${cells.join(' | ')} |`
+ const head = t.header ? t.rows[0] : Array<string>(t.w).fill('')
+ const body = t.header ? t.rows.slice(1) : t.rows
+ return [
+ line(head.map(cell)),
+ line(t.colAlign.map((a) => RULE[a] ?? '---')),
+ ...body.map((r) => line(r.map(cell))),
+ ]
+}
+
+/**
+ * THE PLAYBACK FLAGS A SURFACE MAY APPLY — and the one it may not.
+ *
+ * `autoplay` IS ALWAYS FALSE HERE, whatever the block says. Slides learned
+ * this the expensive way: autoplay set at render time fires on the editing
+ * canvas and in every thumbnail, so it lives in present mode, which is the one
+ * surface that owns playback. A space has no such surface. It has an editor, a
+ * reading view, a printout and a file-manager still, and a clip that starts
+ * itself is wrong in every one of them — the reading view because a page you
+ * scrolled past should not start talking, the still because it is a picture.
+ *
+ * So the rule is not "the renderer happens not to set it" — that is a property
+ * of one function that the next surface would have to rediscover. It is this
+ * function, which every surface goes through, and which cannot return true.
+ * `Block.autoplay` still round-trips (PLATFORM §3); it is simply not obeyed.
+ *
+ * Pure and DOM-free, so scripts/test-spaces-model.ts pins it directly.
+ */
+export interface MediaPlayback {
+ kind: 'video' | 'audio'
+ /** absent = shown: a player with no controls is a rectangle you cannot use */
+ controls: boolean
+ loop: boolean
+ /** browsers require muted for video autoplay — kept as a plain author choice
+ * here, because nothing in this app autoplays for it to unlock */
+ muted: boolean
+ /** ALWAYS false. See above. */
+ autoplay: false
+}
+
+export function mediaPlayback(b: Block): MediaPlayback {
+ return {
+ kind: String(b.kind ?? 'video') === 'audio' ? 'audio' : 'video',
+ controls: b.controls !== false,
+ loop: b.loop === true,
+ muted: b.muted === true,
+ autoplay: false,
+ }
+}
+
/**
* Callout tones — a PERMANENT vocabulary.
*
diff --git a/spaces/src/collabui.ts b/spaces/src/collabui.ts
index c6e0ae63..649040d7 100644
--- a/spaces/src/collabui.ts
+++ b/spaces/src/collabui.ts
@@ -29,7 +29,9 @@ import { t } from './i18n.ts'
import { ICONS } from './icons.ts'
import type { Store } from './store.ts'
import type { SyncSession } from './sync/session.ts'
-import { sharingOn, onlineTransport, joinFromDoc, startSharing, stopSharing } from '../../kernel/src/sync/online.ts'
+import { sharingOn, onlineTransport, joinFromDoc, stopSharing, rotateKeys } from '../../kernel/src/sync/online.ts'
+import { offlineEnabled } from '../../kernel/src/net.ts'
+import { canWrite, fingerprint, isOwner, isReaderCopy, type ShareKind } from './share.ts'
export interface Peerish {
actor: string
@@ -37,6 +39,16 @@ export interface Peerish {
color: string
/** the page this person is on — `slide` on the wire, for the reason the kernel records */
slide: string
+ /**
+ * The public key this person's copy SIGNS with, when it has one.
+ *
+ * A name is a claim (localStorage, typed by its owner); a `pub` is a proof —
+ * the relay verified it per socket before accepting a single op. It is also
+ * what Remove revokes, which is why the roster is keyed on it and not on the
+ * actor id: an actor is one tab, a key is one device.
+ */
+ pub?: string
+ role?: 'owner' | 'editor' | 'viewer'
}
const el = (tag: string, cls = '', text = ''): HTMLElement => {
@@ -71,8 +83,19 @@ export interface CollabUiHost {
popover(anchor: HTMLElement, build: (pop: HTMLElement, close: () => void) => void): void
/** navigate, for "click a person to go where they are" */
goToPage(id: string): void
- /** save a copy that carries this session */
- invite(): void
+ /**
+ * Save a copy that carries a SCOPED capability — an owner-signed invite, or
+ * a view-only follower. Never the open document: see share.ts.
+ */
+ shareCopy(kind: ShareKind): void
+ /**
+ * Connect to the live session WITHOUT saving a new copy.
+ *
+ * The editor owns it rather than this module because sharing a copy has to
+ * do it first, and two call sites arming the same session from two places is
+ * how "Start" and "Invite" end up disagreeing about whether it is on.
+ */
+ goLive(): Promise<void>
}
export class CollabUi {
@@ -121,28 +144,64 @@ export class CollabUi {
return b
}
+ /**
+ * What this copy's connection actually is, in one word.
+ *
+ * FIVE states, not two, and every one of them is a different thing to do
+ * next. The button used to answer "on or off", which merges "the relay
+ * refused us" into "you have not shared yet" — the one case where the user
+ * must act and the one where nothing is wrong.
+ *
+ * offline the hard no-network switch is on; nothing will connect
+ * viewer this is a view-only copy: it follows, it never sends
+ * live connected to the relay
+ * connecting dialling, or retrying after a drop — NOT a failure yet
+ * off not shared (peers, if any, are windows on this computer)
+ */
+ state(): 'offline' | 'viewer' | 'live' | 'connecting' | 'off' {
+ if (offlineEnabled()) return 'offline'
+ if (isReaderCopy(this.host.store.doc)) return 'viewer'
+ const tr = onlineTransport()
+ if (!tr || !sharingOn(this.host.store)) return 'off'
+ return tr.status === 'open' ? 'live' : 'connecting'
+ }
+
/** Reflect connection + population onto the button. Cheap; called often. */
sync(): void {
const b = this.btn
if (!b) return
- const tr = onlineTransport()
const n = this.peers().length
- // THREE states, not two. Same-machine tabs sync over BroadcastChannel with
- // no relay at all, so "has peers" and "is online" are different facts — the
- // first version reported a peer count of 1 under the words "Not sharing
- // yet", which is the button contradicting itself in one glance.
- const online = !!tr && sharingOn(this.host.store)
- b.classList.toggle('sp-live-on', online)
+ const st = this.state()
+ // "has peers" and "is online" remain DIFFERENT FACTS: same-machine tabs
+ // sync over BroadcastChannel with no relay at all. The first version of
+ // this button reported a peer count of 1 under the words "Not sharing
+ // yet", which is a control contradicting itself in one glance.
+ const online = st === 'live' || st === 'connecting' || st === 'viewer'
+ b.classList.toggle('sp-live-on', st === 'live' || st === 'viewer')
b.classList.toggle('sp-live-off', !online)
+ b.classList.toggle('sp-live-wait', st === 'connecting')
const count = b.querySelector('.sp-live-n')
if (count) count.textContent = n > 0 ? String(n) : ''
- b.title = online
- ? (n > 0
+ b.title = this.buttonTitle(st, n)
+ }
+
+ private buttonTitle(st: ReturnType<CollabUi['state']>, n: number): string {
+ switch (st) {
+ case 'offline':
+ return t('Offline mode is on — nothing leaves this computer.')
+ case 'viewer':
+ return t('View-only copy — it follows the live session but can’t change this space.')
+ case 'connecting':
+ return t('Connecting…')
+ case 'live':
+ return n > 0
? t('Live — {n} other people are here', { n: String(n) })
- : t('Live — nobody else is here yet'))
- : n > 0
- ? t('Also open in another window on this computer — not shared online')
- : t('Not sharing yet — click to start a live session')
+ : t('Live — nobody else is here yet')
+ default:
+ return n > 0
+ ? t('Also open in another window on this computer — not shared online')
+ : t('Not sharing yet — click to start a live session')
+ }
}
/**
@@ -166,13 +225,43 @@ export class CollabUi {
this.known = now
}
+ /**
+ * THIS device's identity in the room: the key it signs with, and its role.
+ *
+ * Per-device by design. The same person on a second machine mints a second
+ * member key and shows up as a second entry the owner can admit or remove
+ * independently — which is what makes Remove mean "this laptop" rather than
+ * "this human, everywhere, until I re-key the room".
+ */
+ private me(): { role?: 'owner' | 'editor' | 'viewer'; pub?: string } {
+ const doc = this.host.store.doc
+ const c = doc.collab
+ if (!c) return {}
+ if (c.role === 'reader') return { role: 'viewer' }
+ if (isOwner(doc)) return { role: 'owner', pub: c.owner }
+ if (c.v === 2 && c.invite) {
+ let pub: string | undefined
+ try { pub = JSON.parse(localStorage.getItem(`bento-member-${doc.docId}`) || 'null')?.pub } catch { /* no storage */ }
+ return { role: 'editor', pub }
+ }
+ if (c.writerPriv) return { role: 'editor', pub: c.writerPub }
+ return {}
+ }
+
+ private roleLabel(r?: string): string {
+ return r === 'owner' ? t('Owner') : r === 'editor' ? t('Editor') : r === 'viewer' ? t('Viewer') : ''
+ }
+
private openPanel(anchor: HTMLElement): void {
this.host.popover(anchor, (pop, close) => {
pop.classList.add('sp-people')
const store = this.host.store
- const live = !!onlineTransport() && sharingOn(store)
-
+ const doc = store.doc
+ const st = this.state()
const peers = this.peers()
+ const mine = this.me()
+ const iAmOwner = isOwner(doc)
+
// The LIST follows who is actually here; the ACTIONS follow whether this
// copy is on the relay. Gating the list on the relay too was the same
// mistake as the button: another window of this file is a person in this
@@ -189,12 +278,32 @@ export class CollabUi {
name.className = 'sp-input'
try { name.value = localStorage.getItem('bento-author') || '' } catch { /* locked-down origin */ }
name.placeholder = t('Guest')
+ name.title = t('Shown next to your cursor and in the People list — stored only in this browser.')
name.addEventListener('input', () => {
try { localStorage.setItem('bento-author', name.value) } catch { /* no storage */ }
})
+ // push the new name to peers right away, or it lands on their screens
+ // only at the next heartbeat
+ name.addEventListener('change', () => this.host.session.hello())
row.append(name)
pop.append(row)
+ // YOU, with the key you sign with. A fingerprint is the only thing in
+ // this panel two people can verify out of band, so it is rendered the
+ // same way bento/slides renders it — a code grouped differently in each
+ // app is a code they cannot compare over a call.
+ if (mine.role) {
+ const meRow = el('div', 'sp-pitem sp-pme')
+ let myName = t('Guest')
+ try { myName = localStorage.getItem('bento-author') || myName } catch { /* no storage */ }
+ meRow.append(el('span', 'sp-pname', `${myName} (${t('you')})`))
+ meRow.append(el('span', 'sp-ppage', [this.roleLabel(mine.role), fingerprint(mine.pub)].filter(Boolean).join(' · ')))
+ meRow.title = mine.pub
+ ? t('Your key on THIS device: {fp}. Another device counts as a new person until the owner removes it.', { fp: fingerprint(mine.pub) })
+ : t('View-only copy — it holds no signing key.')
+ pop.append(meRow)
+ }
+
if (peers.length) {
const list = el('div', 'sp-plist')
for (const p of peers) {
@@ -205,37 +314,119 @@ export class CollabUi {
d.style.background = p.color
item.append(d, el('span', 'sp-pname', p.name))
const page = store.index.page.get(p.slide)
- if (page) item.append(el('span', 'sp-ppage', page.title || t('Untitled')))
+ const where = [this.roleLabel(p.role), page ? (page.title || t('Untitled')) : ''].filter(Boolean).join(' · ')
+ if (where) item.append(el('span', 'sp-ppage', where))
+ // a pub-carrying peer's name is bound to a key the relay verified per
+ // socket, not merely typed into the field above
+ if (p.pub) item.title = `${t('Key-verified identity')} · ${fingerprint(p.pub)}`
// clicking a person GOES to them — the whole reason to list where
// they are rather than merely that they exist
item.addEventListener('click', () => { close(); if (page) this.host.goToPage(page.id) })
+ // Remove is the OWNER's, and it is a signed revocation of ONE device
+ // key: the relay drops that key's writes, refuses its reconnects and
+ // tells it to stand down. Nobody else is disturbed and no file is
+ // re-sent — the difference between this and Reset access.
+ if (iAmOwner && p.pub && p.pub !== doc.collab!.owner) {
+ const kick = el('span', 'sp-pkick', '✕')
+ kick.title = t('Remove {name} — revokes this device’s access; everyone else is unaffected', { name: p.name })
+ kick.addEventListener('click', (ev) => {
+ ev.stopPropagation()
+ if (!confirm(t('Remove {name} from this space? Their copy drops to read-only.', { name: p.name }))) return
+ close()
+ const tr = onlineTransport()
+ void Promise.resolve(tr ? tr.revokeKey(p.pub!, doc.collab!.owner!, doc.collab!.ownerPriv!) : false)
+ .then((done) => this.host.status(done
+ ? t('{name} was removed', { name: p.name })
+ : t('Couldn’t reach the live session')))
+ })
+ item.append(kick)
+ }
list.append(item)
}
pop.append(list)
}
- const acts = el('div', 'sp-pacts')
- if (live) {
- acts.append(this.action(t('Invite someone…'), t('Saves a copy that joins this session'), () => {
- close(); this.host.invite()
- }))
- acts.append(this.action(t('Stop sharing'), t('This copy goes offline; the others carry on'), () => {
- close()
- stopSharing(this.host.session, store)
- this.sync(); this.host.paintTree()
- this.host.status(t('Stopped sharing'))
- }))
+ // ONE status line, and it says which of the five states this is. A
+ // "connecting" that reads as "off" sends people to fix a session that is
+ // already dialling; a view-only copy that reads as "off" sends them to
+ // press Start, which is the one thing that cannot help.
+ if (st === 'offline') {
+ pop.append(el('div', 'sp-pnote', t('Offline mode is on — nothing leaves this computer.')))
+ pop.append(el('div', 'sp-pnote', t('Windows on this computer still sync; turn offline mode off in About to work with someone elsewhere.')))
+ return
+ }
+ const status = el('div', 'sp-pstatus')
+ if (st === 'live') {
+ status.classList.add('ok')
+ status.textContent = `● ${t('Live')} — ${t('{n} connected', { n: String(peers.length + 1) })}`
+ } else if (st === 'connecting') {
+ status.textContent = `◐ ${t('Connecting…')}`
+ } else if (st === 'viewer') {
+ status.classList.add('ok')
+ status.textContent = `● ${t('Following — view only')}`
} else {
+ status.textContent = `○ ${t('Not live — turns on when you share')}`
+ }
+ pop.append(status)
+
+ // A view-only copy holds no signing key, so there is nothing here it
+ // could do. Saying why is the point: the relay refuses its writes, and a
+ // person who does not know that will keep trying.
+ if (!canWrite(doc)) {
+ pop.append(el('div', 'sp-pnote', t('This is a view-only copy — it follows the live session but can’t change this space.')))
+ return
+ }
+
+ if (st === 'off') {
pop.append(el('div', 'sp-pnote', peers.length
? t('These windows are on this computer. Start a session to work with someone elsewhere.')
: t('Nothing leaves this file until you start a session.')))
- acts.append(this.action(t('Start live session'), t('Then send someone the file'), () => {
+ }
+
+ // SHARING IS FILES. Each of these saves a copy to send, and turns the
+ // live session on — there is no separate start-a-session step.
+ const acts = el('div', 'sp-pacts')
+ acts.append(this.action(t('Invite to edit…'),
+ t('Saves a copy to send. Whoever opens it edits this space live with you (end-to-end encrypted); you stay the owner and can remove them from the People list.'),
+ () => { close(); this.host.shareCopy('invite') }))
+ acts.append(this.action(t('View-only copy…'),
+ t('A live viewer: follows every edit as it happens but can never change this space — the relay enforces it.'),
+ () => { close(); this.host.shareCopy('viewonly') }))
+
+ if (st === 'off') {
+ // Reconnecting WITHOUT saving another copy. Without this the only way
+ // back into a session you had stopped was to save a copy, which is how
+ // one space becomes four files.
+ acts.append(this.action(t('Start live session'), t('Connect to the live session without saving a new copy — copies you sent earlier will meet you there.'), () => {
close()
- void startSharing(this.host.session, store).then(() => {
+ void this.host.goLive().then(() => {
this.sync(); this.host.paintTree()
this.host.status(t('Live — send someone the file to bring them in'))
})
}))
+ } else {
+ acts.append(this.action(t('Stop sharing'), t('This copy goes offline; the others carry on'), () => {
+ close()
+ stopSharing(this.host.session, store)
+ this.sync(); this.host.paintTree()
+ this.host.status(t('Stopped sharing'))
+ }))
+ }
+
+ // Quiet at the bottom, because it is the nuclear option: rotation
+ // re-mints the room, so every copy already sent stops syncing for good.
+ // Remove (above) is the scalpel; this is the amputation.
+ if (iAmOwner) {
+ acts.append(this.action(t('Reset access…'),
+ t('Mints brand-new keys. Every previously sent copy stops syncing for good; share fresh copies afterwards.'),
+ () => {
+ if (!confirm(t('Reset access? Every copy you’ve sent stops syncing; only copies saved after this can join.'))) return
+ close()
+ void rotateKeys(this.host.session, store).then(() => {
+ this.sync(); this.host.paintTree()
+ this.host.status(t('Access reset — only copies saved from now on can join'))
+ })
+ }))
}
pop.append(acts)
})
@@ -263,6 +454,36 @@ export class CollabUi {
if (sharingOn(this.host.store) && s.shareEligible() && !onlineTransport()) {
joinFromDoc(s, this.host.store)
}
+ this.watchStatus()
this.sync()
}
+
+ /**
+ * Repaint the button when the CONNECTION changes, not only when the room's
+ * population does.
+ *
+ * Measured in a browser on a real relay: the button read "Connecting…" while
+ * the panel two inches under it read "Live — 1 connected". Both call
+ * `state()`; the panel is rebuilt every time it opens and the button was not
+ * — it was last painted at boot, before the socket opened, and nothing since
+ * had touched it. `onPeersChanged` was the only thing that called `sync()`,
+ * and in a room where nobody else has arrived yet that never fires.
+ *
+ * Which is the exact failure the five states exist to prevent: a control
+ * saying one thing while the truth is elsewhere on the same screen. Honest
+ * states are worth nothing if they are painted once.
+ *
+ * Also called from `goLive()` via the editor, because a transport created
+ * after boot is a different object with its own callback slot.
+ */
+ watchStatus(): void {
+ const tr = onlineTransport()
+ if (!tr || tr === this.watched) return
+ this.watched = tr
+ const prev = tr.onStatus
+ tr.onStatus = (s) => { prev?.(s); this.sync() }
+ }
+
+ /** the transport whose status we are already listening to */
+ private watched: unknown = null
}
diff --git a/spaces/src/comments.ts b/spaces/src/comments.ts
new file mode 100644
index 00000000..c4cee77e
--- /dev/null
+++ b/spaces/src/comments.ts
@@ -0,0 +1,292 @@
+// SPDX-License-Identifier: MIT
+// Copyright (c) 2026 The Bento authors
+// Review comments — the markers, and the thread behind one.
+//
+// WHAT IS SETTLED IN THE MODEL, not here: a thread is anchored by WHERE IT IS
+// STORED (`Block.comments` = about that block, `Page.comments` = about the
+// page), it is plain text, and it is saved in the file. model.ts carries the
+// reasoning for all three, including the collaboration one.
+//
+// WHERE THE UI LIVES, and why it is not slides' answer:
+//
+// · NOT the gutter. A block already has one, at the start edge, and it holds
+// exactly two controls because a phone reserves 44px for it and fits one.
+// A third affordance there is a control nobody on a touch device can reach.
+// · NOT a sidebar panel. The sidebar is the page TREE — the one navigation
+// this app has — and a second thing living in it would be competing with
+// the thing people open it for. The tree carries a COUNT instead: the badge
+// says a page has unread argument, which is the only comment fact worth
+// knowing from another page.
+// · THE END MARGIN, opposite the gutter. A marker sits outside the text
+// column, so it never reflows the prose it is about, and it is beside the
+// line it refers to, which is the whole point of a margin note. Page-level
+// threads sit in a row under the title, where the page's own identity is.
+//
+// The thread itself is the editor's ordinary popover (or bottom sheet on a
+// phone) — the same dismissal behaviour as every other menu in this app,
+// because a panel that closes differently from the one beside it reads as a
+// bug.
+
+import { uid, commentsOn, type Comment, type CommentAt } from './model.ts'
+import type { Store } from './store.ts'
+import { t } from './i18n.ts'
+import { lsGet, lsSet } from '../../kernel/src/storage.ts'
+
+/** Hooks the editor provides, so this module stays out of editor internals. */
+export interface CommentsHost {
+ store: Store
+ /** the surface the current page was just painted into */
+ main(): HTMLElement
+ /** the editor's popover — anchored menu on a desktop, bottom sheet on a phone */
+ popover(anchor: HTMLElement, build: (pop: HTMLElement, close: () => void) => void): void
+ /** repaint the page tree; the unresolved badge lives there */
+ paintTree(): void
+}
+
+/**
+ * The commenter's name, remembered per browser and never sent anywhere.
+ *
+ * `bento-author` is the key the People panel already reads and writes
+ * (collabui.ts), deliberately: the name on your comments and the name beside
+ * your cursor are the same fact, and two keys would let one file disagree with
+ * itself about who you are.
+ */
+export function commentAuthor(): string | null {
+ let name = lsGet('bento-author')
+ if (!name) {
+ name = window.prompt(t('Your name (shown on comments):'))?.trim() || ''
+ if (!name) return null
+ lsSet('bento-author', name)
+ }
+ return name
+}
+
+/** Re-ask for the name; existing threads keep the author they were written by. */
+export function changeCommentAuthor(): string | null {
+ const next = window.prompt(t('Your name (shown on new comments):'), lsGet('bento-author') ?? '')?.trim()
+ if (!next) return null
+ lsSet('bento-author', next)
+ return next
+}
+
+function relTime(iso: string): string {
+ const s = (Date.now() - new Date(iso).getTime()) / 1000
+ if (!Number.isFinite(s) || s < 45) return t('just now')
+ if (s < 3600) return t('{n}m ago', { n: Math.round(s / 60) })
+ if (s < 86400) return t('{n}h ago', { n: Math.round(s / 3600) })
+ if (s < 86400 * 30) return t('{n}d ago', { n: Math.round(s / 86400) })
+ return new Date(iso).toLocaleDateString()
+}
+
+const now = (): string => new Date().toISOString()
+
+export class CommentsUi {
+ private host: CommentsHost
+ private fresh: string | null = null
+
+ constructor(host: CommentsHost) {
+ this.host = host
+ }
+
+ /**
+ * Rebuild the markers for the page on screen.
+ *
+ * Called after every page paint, and never in the reading view or on paper —
+ * the editor holds that gate, because it is the thing that knows which view
+ * it is in. `render.ts` has never heard of comments, so print (which renders
+ * its own tree) cannot show one however this is called.
+ */
+ refresh(): void {
+ const main = this.host.main()
+ for (const old of main.querySelectorAll('.sp-cm-mark, .sp-cm-row')) old.remove()
+ const page = this.host.store.page
+ if (!page) return
+
+ let row: HTMLElement | null = null
+ for (const at of commentsOn(page)) {
+ const mark = this.marker(at)
+ if (at.blockId) {
+ const node = main.querySelector<HTMLElement>(`[data-block-id="${CSS.escape(at.blockId)}"]`)
+ // A thread on a block that is not on screen (a collapsed toggle) is not
+ // lost — it is in the file, and `window.bento.comments()` lists it.
+ node?.append(mark)
+ } else {
+ if (!row) {
+ row = document.createElement('div')
+ row.className = 'sp-cm-row'
+ const title = main.querySelector('[data-page-title]')
+ if (title) title.after(row)
+ else main.querySelector('.sp-page-inner')?.prepend(row)
+ }
+ row.append(mark)
+ }
+ }
+ }
+
+ private marker(at: CommentAt): HTMLButtonElement {
+ const c = at.comment
+ const b = document.createElement('button')
+ b.type = 'button'
+ b.className = 'sp-cm-mark' + (c.resolved ? ' sp-cm-done' : '') + (c.id === this.fresh ? ' sp-cm-new' : '')
+ if (c.id === this.fresh) setTimeout(() => { this.fresh = null }, 1200)
+ b.textContent = String(1 + (Array.isArray(c.replies) ? c.replies.length : 0))
+ b.title = `${c.author}: ${String(c.text).slice(0, 80)}`
+ b.setAttribute('aria-label', t('Comment'))
+ b.addEventListener('click', (e) => { e.stopPropagation(); this.open(at.comment.id, b) })
+ return b
+ }
+
+ /** Start a thread on a block, or — with no block id — on the page itself. */
+ openNew(blockId?: string): void {
+ const s = this.host.store
+ const page = s.page
+ if (!page || s.readOnly) return
+ const author = commentAuthor()
+ if (!author) return
+ const text = window.prompt(t('Comment:'))?.trim()
+ if (!text) return
+ const comment: Comment = { id: uid('cm'), author, at: now(), text }
+ this.fresh = comment.id
+ // PAGE SCOPE: a thread is on the page in view by construction, and the
+ // store's page entry snapshots exactly that page (store.ts entry()).
+ s.commit(() => {
+ const host = blockId ? page.blocks.find((b) => b.id === blockId) : page
+ if (!host) return
+ host.comments = [...(host.comments ?? []), comment]
+ }, { scope: 'page' })
+ this.refresh()
+ }
+
+ /** Find the thread again in the LIVE document, and change it in one step. */
+ private edit(id: string, fn: (list: Comment[], at: number, owner: { comments?: Comment[] }) => void): void {
+ const s = this.host.store
+ const page = s.page
+ if (!page || s.readOnly) return
+ s.commit(() => {
+ const live = s.index.page.get(page.id)
+ if (!live) return
+ for (const owner of [live as { comments?: Comment[] }, ...live.blocks]) {
+ const list = owner.comments
+ if (!Array.isArray(list)) continue
+ const at = list.findIndex((c) => c.id === id)
+ if (at < 0) continue
+ const next = [...list]
+ fn(next, at, owner)
+ // An absent key, never a stored empty array: a block somebody
+ // commented on and un-commented is byte-identical to one that was
+ // never touched, and a file written before comments existed stays that
+ // way.
+ if (next.length) owner.comments = next
+ else delete owner.comments
+ return
+ }
+ }, { scope: 'page' })
+ this.refresh()
+ }
+
+ private open(id: string, anchor: HTMLElement): void {
+ const page = this.host.store.page
+ const at = page && commentsOn(page).find((x) => x.comment.id === id)
+ if (!at) return
+ const c = at.comment
+ const readOnly = this.host.store.readOnly
+
+ this.host.popover(anchor, (pop, close) => {
+ pop.classList.add('sp-cm-pop')
+
+ const head = document.createElement('div')
+ head.className = 'sp-cm-head'
+ head.append(Object.assign(document.createElement('span'), {
+ textContent: at.blockId ? t('Comment · block') : t('Comment · page'),
+ }))
+ if (!readOnly) {
+ const me = document.createElement('button')
+ me.type = 'button'
+ me.className = 'sp-cm-me'
+ me.textContent = t('you: {name} ✎', { name: lsGet('bento-author') ?? '—' })
+ me.title = t('Change the name used for your new comments and replies')
+ me.addEventListener('click', () => {
+ const next = changeCommentAuthor()
+ if (next) me.textContent = t('you: {name} ✎', { name: next })
+ })
+ head.append(me)
+ }
+ pop.append(head)
+
+ const entries = document.createElement('div')
+ entries.className = 'sp-cm-entries'
+ // textContent, ALWAYS: comment text is plain text and this is the only
+ // place it reaches a screen. See model.ts CommentEntry.text.
+ const entry = (author: string, iso: string, text: string) => {
+ const e = document.createElement('div')
+ e.className = 'sp-cm-entry'
+ const who = document.createElement('b')
+ who.textContent = String(author ?? '')
+ const when = document.createElement('span')
+ when.className = 'sp-cm-time'
+ when.textContent = relTime(String(iso ?? ''))
+ const body = document.createElement('p')
+ body.textContent = String(text ?? '')
+ e.append(who, when, body)
+ entries.append(e)
+ }
+ entry(c.author, c.at, c.text)
+ for (const r of Array.isArray(c.replies) ? c.replies : []) entry(r.author, r.at, r.text)
+ pop.append(entries)
+
+ if (readOnly) return
+
+ const reply = document.createElement('textarea')
+ reply.className = 'sp-cm-reply'
+ reply.rows = 2
+ reply.placeholder = t('Reply…')
+ pop.append(reply)
+
+ const foot = document.createElement('div')
+ foot.className = 'sp-cm-foot'
+ const btn = (label: string, run: () => void) => {
+ const b = document.createElement('button')
+ b.type = 'button'
+ b.className = 'sp-btn'
+ b.textContent = label
+ b.addEventListener('click', run)
+ foot.append(b)
+ }
+ btn(t('Reply'), () => {
+ const text = reply.value.trim()
+ const author = text ? commentAuthor() : null
+ if (!text || !author) return
+ close()
+ this.edit(id, (list, i) => {
+ list[i] = { ...list[i], replies: [...(list[i].replies ?? []), { id: uid('cm'), author, at: now(), text }] }
+ })
+ })
+ btn(c.resolved ? t('Reopen') : t('Resolve'), () => {
+ close()
+ this.edit(id, (list, i) => {
+ const next = { ...list[i] }
+ if (next.resolved) delete next.resolved
+ else next.resolved = true
+ list[i] = next
+ })
+ })
+ btn(t('Delete'), () => {
+ close()
+ this.edit(id, (list, i) => { list.splice(i, 1) })
+ })
+ pop.append(foot)
+
+ setTimeout(() => reply.focus(), 0)
+ })
+ }
+}
+
+/** The badge for one page in the tree, or null when nothing is open there. */
+export function commentBadge(count: number): HTMLElement | null {
+ if (!count) return null
+ const b = document.createElement('span')
+ b.className = 'sp-cm-badge'
+ b.textContent = String(count)
+ b.title = t('{n} unresolved comment(s)', { n: count })
+ return b
+}
diff --git a/spaces/src/editor.ts b/spaces/src/editor.ts
index ab001530..0dbdf33f 100644
--- a/spaces/src/editor.ts
+++ b/spaces/src/editor.ts
@@ -8,13 +8,20 @@
// and merging blocks can never re-mint an id, and ids are what links,
// backlinks and (later) collaboration key on.
-import { type Block, newBlock, newPage, effectiveParents } from './model'
+import {
+ type Block, type TableShape, type SpacesDoc, newBlock, newPage, effectiveParents, isRemote,
+ tableOf, writeTable, TABLE_MAX_COLS, TABLE_MAX_ROWS, linkCard, linkCardHtml, unresolvedOn,
+ parseDoc, uid,
+} from './model'
+import { CommentsUi, commentBadge } from './comments.ts'
import * as collabUi from './collabui.ts'
import { syncNoticeText } from './syncnotice.ts'
import { Store } from './store'
import { renderPage, toneLabel, paintCode } from './render'
import { CODE_LANGS, langLabel, normLang } from './highlight'
import { canonicalize, escText, sanitizeInline, textOf } from './sanitize'
+import { FormatBar } from './formatbar'
+import type { MarkTag } from './marks'
import { MENU_SPECS, MD_SPECS, SPEC, CALLOUT_TONES } from './blocks'
import {
fieldByKey, fieldsOf, propHtml, propBlock, propBlockOf, isIssue, headerLength,
@@ -22,6 +29,7 @@ import {
type DropAim, type FieldSpec, type ViewFilter, type ViewSort,
} from './fields'
import { planImport, type SourceFile } from './markdown'
+import { extractSpace, planGraft } from './portable'
import { countOutsideTags, replaceOutsideTags } from './findreplace'
import { asksForAnswer, evaluate, format, pageContext } from './calc'
import { t, locale } from './i18n'
@@ -29,9 +37,15 @@ import { openAbout } from './about'
import {
todayISO, stepDay, journalLabel, journalShort, isJournal, planJournal,
} from './journal'
-import { canWriteInPlace } from '../../kernel/src/save.ts'
+import { canWriteInPlace, parseEnvelope } from '../../kernel/src/save.ts'
+import { offlineEnabled } from '../../kernel/src/net.ts'
+import { startSharing } from '../../kernel/src/sync/online.ts'
+import * as shareModule from './share.ts'
import { ICONS, type IconName } from './icons'
-import { internAsset, prepareImage, humanBytes, IMAGE_EMBED_BUDGET, blobToDataUri } from './assets'
+import { PropsPanel } from './props'
+import {
+ internAsset, prepareImage, humanBytes, IMAGE_EMBED_BUDGET, MEDIA_EMBED_BUDGET, blobToDataUri,
+} from './assets'
const CTRL = navigator.platform.toLowerCase().includes('mac') ? 'metaKey' : 'ctrlKey'
@@ -43,6 +57,9 @@ const AUTOFORMAT = MD_SPECS
const SLASH_ITEMS = MENU_SPECS
/** What counts as a note when a folder is dropped on the app. */
const NOTE_EXT = /\.(md|markdown|mdown|mkd)$/i
+/** …and what counts as another SPACE: a saved shell, or the bare document JSON
+ * the AI round-trip hands around. Both carry the same `#bento-doc` payload. */
+const SPACE_EXT = /\.(html|htm|json)$/i
/**
* When an import stops embedding images by itself and ASKS.
@@ -58,6 +75,29 @@ const IMPORT_IMAGE_BUDGET = 12 * 1024 * 1024
interface PickedFile { path: string; file: File }
+/**
+ * This reader's preferred page width, or undefined for the built-in default.
+ *
+ * VIEWER-SCOPED, in localStorage beside the language and the pane width, and
+ * never in the document: it describes the screen somebody is sitting at, not
+ * anything about the space. Two people opening one file on a laptop and a
+ * 27-inch monitor should each get their own answer, and neither should write
+ * theirs into a file the other opens.
+ */
+export function readerWidth(): 'wide' | 'full' | undefined {
+ try {
+ const v = localStorage.getItem('bento-sp-width')
+ return v === 'wide' || v === 'full' ? v : undefined
+ } catch { return undefined }
+}
+
+export function setReaderWidth(v: 'wide' | 'full' | undefined): void {
+ try {
+ if (v) localStorage.setItem('bento-sp-width', v)
+ else localStorage.removeItem('bento-sp-width')
+ } catch { /* a locked-down origin just gets the default */ }
+}
+
export class Editor {
readonly store: Store
private root: HTMLElement
@@ -88,8 +128,47 @@ export class Editor {
private static readonly PANE_DEFAULT = 244
private paneW = Editor.PANE_DEFAULT
private paneClosed = false
+
+ // The properties panel — the reader's, like the page list, and CLOSED unless
+ // this reader has opened it. See props.ts on why the default is that way
+ // round.
+ private inspector!: HTMLElement
+ private inspTab: HTMLButtonElement | null = null
+ private inspRz: HTMLElement | null = null
+ private props: PropsPanel | null = null
+ private static readonly INSP_MIN = 200
+ private static readonly INSP_MAX = 420
+ private static readonly INSP_DEFAULT = 280
+ private inspW = Editor.INSP_DEFAULT
+ private inspClosed = true
+ /** the block the panel is describing: the last one the caret or a click was in */
+ private inspOn: string | null = null
+ /** review threads — markers in the end margin, badges in the tree */
+ private comments: CommentsUi
+ private format!: FormatBar
onSave: (() => void) | null = null
onSaveAs: ((suffix: string) => void) | null = null
+ /**
+ * Write a DIFFERENT document out as its own file — the page extract.
+ *
+ * Supplied by main.ts, because serializing a shell is a boot-time concern
+ * (the pristine capture) and the editor has no business holding it. It is
+ * separate from `onSaveAs` on purpose: every suffix there writes THIS
+ * document, and an export that went through it would have to smuggle the
+ * extract in through a global.
+ */
+ onExportSpace: ((doc: SpacesDoc) => Promise<boolean>) | null = null
+ /**
+ * Write a SHARE copy — a different document, under this space's name plus a
+ * suffix that says which kind of copy it is.
+ *
+ * Separate from `onExportSpace` (which names the file after the extracted
+ * page) and from `onSaveAs` (every suffix there serializes THIS document,
+ * credentials and all — which is precisely how "Invite someone…" came to
+ * hand out the owner key). A share copy is always a derived document, so it
+ * needs a writer that takes one.
+ */
+ onShareCopy: ((doc: SpacesDoc, suffix: string) => Promise<boolean>) | null = null
onPrint: (() => void) | null = null
constructor(root: HTMLElement, store: Store) {
@@ -100,9 +179,46 @@ export class Editor {
const w = Number(localStorage.getItem('bento-sp-pane'))
if (Number.isFinite(w) && w > 0) this.paneW = Math.min(Editor.PANE_MAX, Math.max(Editor.PANE_MIN, w))
this.paneClosed = localStorage.getItem('bento-sp-pane-closed') === '1'
+ const iw = Number(localStorage.getItem('bento-sp-insp'))
+ if (Number.isFinite(iw) && iw > 0) this.inspW = Math.min(Editor.INSP_MAX, Math.max(Editor.INSP_MIN, iw))
+ // ABSENT MEANS CLOSED. Only an explicit '0' — this reader opened it once —
+ // gives the panel any width, so a fresh file opens as the page and nothing
+ // else.
+ this.inspClosed = localStorage.getItem('bento-sp-insp-closed') !== '0'
} catch { /* storage throws on a locked-down origin; the defaults are fine */ }
this.build()
+ // AFTER build(): `main` exists by then, and the marker layer is painted
+ // into whatever the page paint just produced.
+ this.comments = new CommentsUi({
+ store: this.store,
+ main: () => this.main,
+ popover: (anchor, build) => this.popover(anchor, (pop) => build(pop, () => this.closeOverlay())),
+ paintTree: () => this.paintTree(),
+ })
+ // Also after build(). `editable()` is asked on every selectionchange, and
+ // it is the ONE place the bar is kept out of the reading view, out of a
+ // readonly/reader-role file, and out from under an open modal.
+ this.format = new FormatBar({
+ store: this.store,
+ main: () => this.main,
+ editable: () => !this.store.readOnly && !this.reading && !this.overlay,
+ })
if (this.paneClosed) this.sidebar.classList.add('sp-pane-closed')
+ this.props = new PropsPanel(this.inspector, {
+ store: this.store,
+ target: () => this.inspOn,
+ locked: () => this.store.readOnly || this.reading,
+ repaint: () => this.paintPage(),
+ pickPoster: (id) => void this.pickPoster(id),
+ pickMedia: (id) => void this.pickMedia(id),
+ openIconPicker: (pageId, anchor) => this.openIconPicker(pageId, anchor),
+ pageIcon: (icon) => pageIcon(icon),
+ openLinkCard: (id) => this.openLinkCard(id),
+ addTableRow: (id, at) => this.addTableRow(id, at),
+ removeTableRow: (id, at) => this.removeTableRow(id, at),
+ addTableCol: (id, at) => this.addTableCol(id, at),
+ removeTableCol: (id, at) => this.removeTableCol(id, at),
+ })
this.store.on('tree', () => this.paintTree())
this.store.on('page', () => { this.paintPage(); this.paintTree() })
this.store.on('doc', () => { this.status(t('Edited')); this.syncHistoryButtons(); this.syncDirty() })
@@ -162,7 +278,17 @@ export class Editor {
this.store.commit(() => { page.blocks.push(fresh) })
this.paintPage()
if (item.type === 'pagelink') this.insertPageCard(fresh.id)
+ // the block is already a `link` — dismissing the dialog leaves an
+ // empty card with its own way back in, never a half-made block
+ else if (item.type === 'link') this.openLinkCard(fresh.id)
else if (item.type === 'image') void this.pickImage(fresh.id)
+ // a table has no block-level host to focus — the caret belongs in the
+ // first cell, which is also where a person starts typing
+ else if (item.type === 'table') this.focusCell(fresh.id, 0, 0)
+ // straight to the picker, exactly like Image. Cancelling is not a
+ // dead end: the block renders its own chooser (render.ts 'media'),
+ // which is also the only route the / menu needs.
+ else if (item.type === 'media') void this.pickMedia(fresh.id)
else this.focusBlock(fresh.id)
}))
}
@@ -216,6 +342,17 @@ export class Editor {
// (35px) and the save caret (48px) are what a phone gives up so that the
// document title beside them is still wide enough to read. Nothing is
// lost: they are all one tap away, here.
+ // THE PROPERTIES PANEL, ONCE THE BAR HAS FOLDED. Its inline button is a
+ // 40px control, and measured at 375px it took the document title from
+ // 70px to 26px — a title nobody can read, to reach a panel that is one
+ // more row in a menu that is already open. So below the fold it comes
+ // here, the way undo/redo and the other ways to save already do.
+ if (this.isFolded()) {
+ menu.append(this.menuItem('panelRight', t('Properties'),
+ t('This block’s settings, and the page’s'), () => {
+ close(); this.toggleInsp()
+ }))
+ }
if (this.isFolded()) {
menu.append(this.menuItem('undo', t('Undo (⌘Z)'), '', () => {
close(); this.store.undo(); this.repaint()
@@ -234,6 +371,9 @@ export class Editor {
menu.append(this.menuItem('markdown', t('Export as Markdown…'), t('Every page, as one .md file'), () => {
close(); this.exportMarkdown()
}))
+ menu.append(this.menuItem('page', t('Export page as a space…'), t('One page and what is under it, as its own file'), () => {
+ close(); this.openExportSpace()
+ }))
}
})
more.classList.add('sp-more', 'sp-dd-end')
@@ -265,6 +405,9 @@ export class Editor {
menu.append(this.menuItem('markdown', t('Export as Markdown…'), t('Every page, as one .md file'), () => {
close(); this.exportMarkdown()
}))
+ menu.append(this.menuItem('page', t('Export page as a space…'), t('One page and what is under it, as its own file'), () => {
+ close(); this.openExportSpace()
+ }))
menu.append(this.menuItem('print', t('Print / PDF…'), t('The whole space, or just this page'), () => {
close(); this.openPrint()
}))
@@ -281,8 +424,12 @@ export class Editor {
history.append(this.undoB, this.redoB)
const saveGroup = el('div', 'sp-split')
saveGroup.append(saveB, saveMore)
+ const inspB = iconBtn('panelRight', t('Properties — show or hide this block’s settings'),
+ () => this.toggleInsp())
+ inspB.classList.add('sp-insp-toggle')
+
const right = el('div', 'sp-group sp-group-right')
- right.append(insert, search, ...inlineSecondary, this.liveSlot, more, saveGroup)
+ right.append(insert, search, ...inlineSecondary, inspB, this.liveSlot, more, saveGroup)
bar.append(pagesB, mark, title, this.statusEl, history, right)
@@ -314,11 +461,37 @@ export class Editor {
this.sidebar.setAttribute('aria-label', t('Pages'))
this.main = el('main', 'sp-main')
+ this.inspector = el('aside', 'sp-insp')
+ this.inspector.setAttribute('aria-label', t('Properties'))
+ if (this.inspClosed) this.inspector.classList.add('sp-pane-closed')
+
const body = el('div', 'sp-body')
- body.append(this.sidebar, this.makeResizer(), this.main)
+ body.append(this.sidebar, this.makeResizer(), this.main, this.makeInspResizer(), this.inspector)
this.root.append(bar, body)
this.applyPaneWidth()
this.syncPaneChevron()
+ this.applyInspWidth()
+ this.syncInspChevron()
+
+ // WHICH BLOCK THE PANEL MEANS. Capture-phase on the page, because the
+ // interesting blocks are the ones with no editable host to focus — a table,
+ // an image, a clip, a card. `focusin` alone would answer for text and stay
+ // silent for exactly the types that have settings worth a panel.
+ //
+ // `mousedown` rather than `pointerdown`: a real click fires both, so the
+ // two are the same to a user, but only the mouse event is reliably what a
+ // driven click produces — CLAUDE.md's testing note records the same wall in
+ // slides, where synthetic pointer events never reach Gesto. Choosing the
+ // one both a hand and a rig emit costs nothing.
+ for (const ev of ['focusin', 'mousedown'] as const) {
+ this.main.addEventListener(ev, (e: Event) => {
+ const n = e.target as Node | null
+ const host = (n instanceof HTMLElement ? n : n?.parentElement)
+ ?.closest<HTMLElement>('[data-block-id]')
+ this.inspOn = host?.dataset.blockId ?? null
+ this.props?.retarget()
+ }, true)
+ }
this.paintTree()
this.paintPage()
@@ -359,6 +532,7 @@ export class Editor {
this.readB?.setAttribute('aria-pressed', String(this.reading))
document.querySelector('.sp-findbar')?.remove()
this.paintPage()
+ this.props?.refresh()
this.status(this.reading ? t('Reading view — press Esc or the eye to edit') : t('Editing'))
}
@@ -497,6 +671,102 @@ export class Editor {
this.sidebar.style.setProperty('--sp-panew', `${this.paneW}px`)
}
+ /**
+ * The properties panel's edge — the page list's strip, mirrored.
+ *
+ * Deliberately a second small method rather than a parameterised one: the two
+ * differ in which direction widens (the panel is docked to the END edge, so a
+ * drag toward the start makes it bigger) and in which way the chevron points,
+ * and a `side` flag threaded through both would be harder to read than this.
+ */
+ private makeInspResizer(): HTMLElement {
+ const handle = el('div', 'sp-resizer sp-insp-rz')
+ handle.title = t('Drag to resize · double-click to reset')
+ if (this.inspClosed) handle.classList.add('sp-shut')
+ this.inspRz = handle
+
+ const tab = document.createElement('button')
+ tab.className = 'sp-pane-tab'
+ tab.type = 'button'
+ tab.addEventListener('click', (e) => { e.stopPropagation(); this.toggleInsp() })
+ this.inspTab = tab
+ handle.append(tab)
+
+ handle.addEventListener('mousedown', (down) => {
+ if (down.target === tab) return
+ if (this.inspClosed) return
+ down.preventDefault()
+ const startX = down.clientX
+ const startW = this.inspW
+ this.inspector.classList.add('sp-noanim')
+ document.body.classList.add('sp-col-resizing')
+ const move = (ev: MouseEvent) => {
+ // the panel is on the END edge, so dragging toward the START widens it
+ const dx = startX - ev.clientX
+ const widens = document.dir === 'rtl' ? -dx : dx
+ this.inspW = Math.min(Editor.INSP_MAX, Math.max(Editor.INSP_MIN, startW + widens))
+ this.applyInspWidth()
+ }
+ const up = () => {
+ window.removeEventListener('mousemove', move)
+ window.removeEventListener('mouseup', up)
+ this.inspector.classList.remove('sp-noanim')
+ document.body.classList.remove('sp-col-resizing')
+ try { localStorage.setItem('bento-sp-insp', String(this.inspW)) } catch { /* storage can throw */ }
+ }
+ window.addEventListener('mousemove', move)
+ window.addEventListener('mouseup', up)
+ })
+
+ handle.addEventListener('dblclick', () => {
+ this.inspW = Editor.INSP_DEFAULT
+ this.applyInspWidth()
+ try { localStorage.setItem('bento-sp-insp', String(this.inspW)) } catch { /* storage can throw */ }
+ })
+ return handle
+ }
+
+ private applyInspWidth(): void {
+ this.inspector.style.setProperty('--sp-inspw', `${this.inspW}px`)
+ }
+
+ private syncInspChevron(): void {
+ if (!this.inspTab) return
+ const rtl = document.dir === 'rtl'
+ // points the way it will MOVE the panel
+ const closing = this.inspClosed === rtl
+ this.inspTab.innerHTML = closing ? ICONS.chevronRight : ICONS.chevronLeft
+ this.inspTab.title = this.inspClosed ? t('Show properties (])') : t('Hide properties (])')
+ this.inspTab.setAttribute('aria-label', this.inspTab.title)
+ this.inspTab.setAttribute('aria-expanded', String(!this.inspClosed))
+ }
+
+ /** Collapse or restore the properties panel. On a phone it is an overlay. */
+ toggleInsp(force?: boolean): void {
+ if (this.isDrawer()) {
+ const open = force !== undefined ? force : !this.inspector.classList.contains('sp-open')
+ this.inspector.classList.toggle('sp-open', open)
+ // The same scrim the page list gets, for the same reason: an overlay you
+ // can only close from the menu you opened it from is one people leave
+ // open over the page they wanted to read.
+ document.querySelector('.sp-scrim')?.remove()
+ if (open) {
+ const scrim = el('div', 'sp-scrim')
+ scrim.addEventListener('click', () => this.toggleInsp(false))
+ document.body.append(scrim)
+ }
+ return
+ }
+ this.inspector.classList.remove('sp-open')
+ this.inspClosed = force !== undefined ? !force : !this.inspClosed
+ this.inspector.classList.toggle('sp-pane-closed', this.inspClosed)
+ this.inspRz?.classList.toggle('sp-shut', this.inspClosed)
+ this.syncInspChevron()
+ // '0' means OPEN. Absent is closed, which is what a reader who has never
+ // touched this gets — see the constructor.
+ try { localStorage.setItem('bento-sp-insp-closed', this.inspClosed ? '1' : '0') } catch { /* storage can throw */ }
+ }
+
private syncPaneChevron(): void {
if (!this.paneTab) return
// points the way it will MOVE the panel, which is the only thing a chevron
@@ -619,6 +889,7 @@ export class Editor {
*/
connectSync(session: import('./sync/session.ts').SyncSession): void {
const { CollabUi } = collabUi
+ this.session = session
this.collab = new CollabUi({
store: this.store,
session,
@@ -626,7 +897,8 @@ export class Editor {
paintTree: () => this.paintTree(),
popover: (anchor, build) => this.popover(anchor, (pop) => build(pop, () => this.closeOverlay())),
goToPage: (id) => { this.store.goToPage(id); this.closeDrawer() },
- invite: () => { void this.saveAs('copy') },
+ shareCopy: (kind) => { void this.shareCopy(kind) },
+ goLive: () => this.goLive(),
})
session.onPeers(() => this.collab?.onPeersChanged())
// The relay refuses things the user can act on — too large, room full. For
@@ -687,6 +959,10 @@ export class Editor {
// spaces answer to the cursors slides paints on its canvas.
const dots = this.collab?.dotsFor(page.id)
if (dots) a.append(dots)
+ // Unresolved threads badge the page they are on: the tree is the only
+ // place you can see that another page is waiting on you.
+ const badge = commentBadge(unresolvedOn(page))
+ if (badge) a.append(badge)
a.draggable = true
a.addEventListener('click', (e) => { e.preventDefault(); s.goToPage(page.id); this.closeDrawer() })
a.addEventListener('dragstart', (e) => e.dataTransfer?.setData('text/bento-page', page.id))
@@ -844,6 +1120,9 @@ export class Editor {
private paintPage(): void {
const s = this.store
const page = s.page
+ // The bar holds a reference to the block host it is floating over, and this
+ // is about to replace every one of them.
+ this.format?.close()
this.main.innerHTML = ''
if (!page) { this.main.append(el('p', 'sp-empty', t('This space has no pages.'))); return }
@@ -859,6 +1138,7 @@ export class Editor {
editable: !s.readOnly && !this.reading,
titleOf: (id) => s.index.page.get(id)?.title,
allowRemote: (src) => this.allowedRemote.has(src),
+ readerWidth: readerWidth(),
})
// the icon lives beside the title, where changing it is discoverable
const inner = view.querySelector('.sp-page-inner')
@@ -933,6 +1213,11 @@ export class Editor {
this.main.append(view)
this.wire(view)
view.querySelector('.sp-page-inner')?.append(this.backlinks(page.id))
+ // Comments are EDITOR-ONLY. The gate is here rather than in comments.ts
+ // because this is the object that knows which view it is in — and the
+ // renderer, which print and the reading view share, has never heard of
+ // them at all.
+ if (!this.reading) this.comments?.refresh()
this.painting = false
}
@@ -1030,6 +1315,14 @@ export class Editor {
const si = sibs.findIndex((b) => b.id === id)
return [
+ // FIRST, and only for a link card. The card's own edit button appears on
+ // hover, which is a gesture a touch screen does not have — this menu is
+ // the touch sheet too, so without an entry here a card could be made on a
+ // phone and never changed.
+ ...(blocks[at]?.type === 'link'
+ ? [{ icon: 'globe' as const, label: t('Edit this link card'), hint: '',
+ run: () => this.openLinkCard(id) }]
+ : []),
{ icon: 'text', label: t('Turn into…'), hint: t('Change this block’s type'),
run: () => this.openSlash(id) },
{ icon: 'plus', label: t('Add below'), hint: '⏎', run: () => this.insertAfter(id) },
@@ -1038,6 +1331,9 @@ export class Editor {
{ icon: 'down', label: t('Move down'), hint: '', off: si < 0 || si >= sibs.length - 1,
run: () => { if (si >= 0 && si < sibs.length - 1) this.moveBlock(id, sibs[si + 1].id) } },
{ icon: 'copy', label: t('Duplicate'), hint: '', run: () => this.duplicateBlock(id) },
+ // The gutter holds two controls and a phone fits one, so commenting
+ // lives in the menu BOTH of them open — which is also the touch sheet.
+ { icon: 'comment', label: t('Comment'), hint: '', run: () => this.comments.openNew(id) },
{ icon: 'trash', label: t('Delete'), hint: '⌫', run: () => this.deleteBlock(id) },
]
}
@@ -1852,6 +2148,7 @@ export class Editor {
})
}
this.wireBoard(view)
+ this.wireTables(view)
}
// "Load this image" — the reader's consent to contact one remote host.
@@ -1871,7 +2168,7 @@ export class Editor {
const cur = this.blockAt(document.activeElement)
if (e.clipboardData?.files?.length) {
e.preventDefault()
- void this.imageFromTransfer(e.clipboardData, cur?.id)
+ void this.fileFromTransfer(e.clipboardData, cur?.id)
}
})
view.addEventListener('dragover', (e) => {
@@ -1886,7 +2183,7 @@ export class Editor {
if (isImportDrop(e.dataTransfer)) return
e.preventDefault()
const near = (e.target as HTMLElement)?.closest?.('[data-block-id]') as HTMLElement | null
- void this.imageFromTransfer(e.dataTransfer, near?.dataset.blockId)
+ void this.fileFromTransfer(e.dataTransfer, near?.dataset.blockId)
})
// The language chip. It belongs to the EDITOR, not the renderer: a reader
@@ -1937,6 +2234,100 @@ export class Editor {
fig.append(tools)
}
+ // VIDEO AND AUDIO. The chooser on an empty block, and the playback
+ // switches on a full one. All of it is editor chrome, deliberately: the
+ // renderer draws the clip, and a reader, a printout and a locked space get
+ // the clip without the switches that change it — the same rule the callout
+ // chip and the language chip follow.
+ for (const node of view.querySelectorAll<HTMLElement>('.sp-b-media')) {
+ const id = node.dataset.blockId!
+ for (const btn of node.querySelectorAll<HTMLElement>('[data-pick-media]')) {
+ btn.addEventListener('click', () => void this.pickMedia(id))
+ }
+ for (const btn of node.querySelectorAll<HTMLElement>('[data-link-media]')) {
+ btn.addEventListener('click', () => this.linkMedia(id))
+ }
+ const b = s.block(id)
+ if (s.readOnly || this.reading || !b || !b.src) continue
+ const kind = String(b.kind ?? 'video') === 'audio' ? 'audio' : 'video'
+ const tools = el('div', 'sp-mediatools')
+ const flip = (label: string, title: string, on: boolean, set: (v: boolean) => void) => {
+ const btn = document.createElement('button')
+ btn.className = 'sp-btn' + (on ? ' sp-on' : '')
+ btn.type = 'button'
+ btn.textContent = label
+ btn.title = title
+ btn.setAttribute('aria-pressed', String(on))
+ btn.addEventListener('click', () => {
+ s.commit(() => { const bb = s.block(id); if (bb) set(!on) })
+ this.paintPage()
+ })
+ tools.append(btn)
+ }
+
+ // WIDTH IS A VIDEO QUESTION. An <audio> is a control bar of the
+ // browser's own height; a percentage of the measure would only make it
+ // a shorter control bar.
+ if (kind === 'video') {
+ const sizeBtn = document.createElement('button')
+ sizeBtn.className = 'sp-btn'
+ sizeBtn.type = 'button'
+ sizeBtn.textContent = `${b.width ?? 100}%`
+ sizeBtn.title = t('Width in the text column')
+ sizeBtn.addEventListener('click', () => {
+ const steps = [100, 75, 50, 33]
+ const cur = Number(b.width ?? 100)
+ const next = steps[(steps.indexOf(cur) + 1) % steps.length]
+ s.commit(() => { const bb = s.block(id); if (bb) bb.width = next })
+ this.paintPage()
+ })
+ tools.append(sizeBtn)
+
+ const poster = document.createElement('button')
+ poster.className = 'sp-btn' + (b.poster ? ' sp-on' : '')
+ poster.type = 'button'
+ poster.textContent = t('Poster…')
+ poster.title = t('A still frame, shown before play — and what a printout or a file preview shows')
+ poster.addEventListener('click', () => void this.pickPoster(id))
+ tools.append(poster)
+
+ flip(t('Muted'), t('Start silent'), b.muted === true,
+ (v) => { const bb = s.block(id); if (bb) bb.muted = v })
+ }
+ flip(t('Loop'), t('Repeat when it reaches the end'), b.loop === true,
+ (v) => { const bb = s.block(id); if (bb) bb.loop = v })
+ // absent means shown, so the OFF state is the one that is written down
+ flip(t('Controls'), t('Show playback controls to the reader'), b.controls !== false,
+ (v) => { const bb = s.block(id); if (bb) { if (v) delete bb.controls; else bb.controls = false } })
+
+ const replace = document.createElement('button')
+ replace.className = 'sp-btn'
+ replace.type = 'button'
+ replace.textContent = t('Replace…')
+ replace.title = t('Choose a different file')
+ replace.addEventListener('click', () => void this.pickMedia(id))
+ tools.append(replace)
+
+ // a linked clip says so, because it is the one that stops working on a
+ // train — and the badge is the only place that fact is visible
+ if (typeof b.src === 'string' && isRemote(b.src)) {
+ const badge = document.createElement('span')
+ badge.className = 'sp-btn sp-badge'
+ badge.textContent = t('Linked')
+ badge.title = t('Not in this file: it needs the network, and the site is told when someone opens the page')
+ tools.append(badge)
+ }
+ node.append(tools)
+ }
+ // A link card OPENS its link, so its editing control is a separate button —
+ // rendered only where there is an editor (render.ts), wired here.
+ view.addEventListener('click', (e) => {
+ const btn = (e.target as HTMLElement).closest<HTMLElement>('[data-edit-link]')
+ if (!btn) return
+ e.preventDefault()
+ this.openLinkCard(btn.dataset.editLink!)
+ })
+
// intra-space links navigate without leaving the document
view.addEventListener('click', (e) => {
const a = (e.target as HTMLElement).closest('a')
@@ -1992,6 +2383,323 @@ export class Editor {
host.addEventListener('blur', () => { if (!this.painting) s.endRun() })
}
+ // ---- tables -------------------------------------------------------------
+ //
+ // A block editor edits a table differently from a canvas: there is no
+ // properties panel to put row and column controls in, and the block IS the
+ // table, so the controls ride on the block the way the image tools do. What
+ // is copied from slides is the MODEL (fractional weights, rows of cells, a
+ // header flag, whole-value LWW under collab); what is not is any of this.
+
+ /** The cell the caret is in — `data-cell` is the block, `data-r`/`data-c` the
+ * seat. Deliberately NOT `data-edit`: that name means "this element's html
+ * IS the block's html", and the generic input handler would then write one
+ * cell over the whole table. */
+ private cellAt(node: Node | null): { id: string; r: number; c: number; td: HTMLElement } | null {
+ const td = (node instanceof HTMLElement ? node : node?.parentElement)?.closest<HTMLElement>('[data-cell]')
+ if (!td) return null
+ return { id: td.dataset.cell!, r: Number(td.dataset.r), c: Number(td.dataset.c), td }
+ }
+
+ private focusCell(id: string, r: number, c: number): void {
+ afterPaint(() => {
+ const td = this.main.querySelector<HTMLElement>(
+ `[data-cell="${CSS.escape(id)}"][data-r="${r}"][data-c="${c}"]`)
+ if (!td) return
+ td.focus()
+ caretToEnd(td)
+ })
+ }
+
+ /**
+ * Change a table's shape, then put the caret back where the change means it
+ * should be.
+ *
+ * Every table write goes through here and through model.writeTable, so the
+ * derived `html` fallback — the thing a build that predates tables shows —
+ * can never drift from the cells. It is a `commit`, so it is one undo step.
+ */
+ private editTable(id: string, fn: (t: TableShape) => { r: number; c: number } | void): void {
+ const s = this.store
+ const b = s.block(id)
+ if (!b || s.readOnly || this.reading) return
+ let seat: { r: number; c: number } | undefined
+ const shape = tableOf(b)
+ s.commit(() => { seat = fn(shape) || undefined; writeTable(b, shape) })
+ this.paintPage()
+ // where the change means the caret should be, or where it already was —
+ // clamped, because the row it was in may be the row that just went
+ const here = this.cell?.id === id ? this.cell : null
+ const to = seat ?? here
+ if (!to) return
+ const t = tableOf(b)
+ this.focusCell(id, Math.min(to.r, t.h - 1), Math.min(to.c, t.w - 1))
+ }
+
+ /** The last cell the caret was in, so a toolbar button knows which row and
+ * column it means. A toolbar click blurs the cell, so this cannot be read
+ * from the Selection at the moment the button fires. */
+ private cell: { id: string; r: number; c: number } | null = null
+
+ /** A fresh row or column of the right width. */
+ private static blank(n: number): string[] { return Array<string>(n).fill('') }
+
+ addTableRow(id: string, at?: number): void {
+ this.editTable(id, (t) => {
+ if (t.h >= TABLE_MAX_ROWS) return
+ const r = at === undefined ? t.h : at + 1
+ t.rows.splice(r, 0, Editor.blank(t.w))
+ return { r, c: 0 }
+ })
+ }
+
+ addTableCol(id: string, at?: number): void {
+ this.editTable(id, (t) => {
+ if (t.w >= TABLE_MAX_COLS) return
+ const c = at === undefined ? t.w : at + 1
+ for (const row of t.rows) row.splice(c, 0, '')
+ t.cols.splice(c, 0, t.cols[Math.min(c, t.cols.length - 1)] ?? 1)
+ t.colAlign.splice(c, 0, '')
+ return { r: 0, c }
+ })
+ }
+
+ /** A table always keeps one row and one column: a table with none is not an
+ * empty table, it is a block with nothing to click on and no way back. */
+ removeTableRow(id: string, at: number): void {
+ this.editTable(id, (t) => {
+ if (t.h <= 1) return
+ t.rows.splice(Math.min(at, t.h - 1), 1)
+ return { r: Math.max(0, Math.min(at, t.rows.length - 1)), c: 0 }
+ })
+ }
+
+ removeTableCol(id: string, at: number): void {
+ this.editTable(id, (t) => {
+ if (t.w <= 1) return
+ const c = Math.min(at, t.w - 1)
+ for (const row of t.rows) row.splice(c, 1)
+ t.cols.splice(c, 1)
+ t.colAlign.splice(c, 1)
+ return { r: 0, c: Math.max(0, c - 1) }
+ })
+ }
+
+ /**
+ * Attach a table's editing behaviour: the cells, the tools, the grips.
+ *
+ * Called only when the document is editable — the renderer already emits
+ * inert `<td>`s in the reading view and in print, so wiring them anyway would
+ * contradict it, which is the exact mistake the callout chip made once.
+ */
+ private wireTables(view: HTMLElement): void {
+ const s = this.store
+
+ for (const td of view.querySelectorAll<HTMLElement>('[data-cell]')) {
+ const id = td.dataset.cell!
+ const r = Number(td.dataset.r), c = Number(td.dataset.c)
+ td.addEventListener('focus', () => { this.cell = { id, r, c } })
+ td.addEventListener('input', () => {
+ if (this.painting) return
+ // ONE RUN PER CELL, not per block: the run key carries the seat, so
+ // moving to the next cell closes the run and Tab-typing across a row is
+ // five undo steps rather than one that swallows the whole row.
+ s.runEdit(`${id}:${r}:${c}`, () => {
+ const b = s.block(id)
+ if (!b) return
+ const t = tableOf(b)
+ if (!t.rows[r]) return
+ t.rows[r][c] = td.innerHTML
+ writeTable(b, t)
+ })
+ })
+ td.addEventListener('blur', () => {
+ if (this.painting) return
+ s.endRun()
+ const b = s.block(id)
+ if (!b) return
+ const t = tableOf(b)
+ const clean = canonicalize(t.rows[r]?.[c] ?? '')
+ if (clean === t.rows[r]?.[c]) return
+ t.rows[r][c] = clean
+ writeTable(b, t)
+ td.innerHTML = clean
+ })
+ }
+
+ for (const node of view.querySelectorAll<HTMLElement>('.sp-b-table')) {
+ const id = node.dataset.blockId!
+ const b = s.block(id)
+ if (!b) continue
+ const shape = tableOf(b)
+ const tools = el('div', 'sp-tb-tools')
+ const btn = (label: string, title: string, run: () => void, on = false) => {
+ const x = document.createElement('button')
+ x.type = 'button'
+ x.className = 'sp-btn' + (on ? ' sp-on' : '')
+ x.textContent = label
+ x.title = title
+ x.setAttribute('aria-label', title)
+ // mousedown, not click: a click would first blur the cell, and `this.cell`
+ // is read to decide WHICH row the button means. Blur still runs (the
+ // cell's own handler closes its typing run) — it just runs after the
+ // seat has been used.
+ x.addEventListener('mousedown', (e) => { e.preventDefault(); run() })
+ return x
+ }
+ const seat = () => (this.cell?.id === id ? this.cell : null)
+ tools.append(
+ btn('+', t('Add a row below'), () => this.addTableRow(id, seat()?.r)),
+ btn('+|', t('Add a column after'), () => this.addTableCol(id, seat()?.c)),
+ btn('-', t('Remove this row'), () => this.removeTableRow(id, seat()?.r ?? shape.h - 1)),
+ btn('-|', t('Remove this column'), () => this.removeTableCol(id, seat()?.c ?? shape.w - 1)),
+ btn('H', t('Header row'), () => this.editTable(id, (x) => { x.header = !x.header }), shape.header),
+ )
+ node.append(tools)
+
+ // COLUMN GRIPS on the first row's cells, all but the last: a boundary
+ // moves two columns, and there is no boundary after the last one.
+ // COLUMN GRIPS. They live in the WRAPPER, absolutely positioned over each
+ // boundary — NOT inside the first row's cells, which is where they went
+ // first and which was wrong in two ways at once, both measured in the
+ // browser: the cell's `innerHTML` is the model, so every grip was written
+ // into the document as the cell's content; and `caretToEnd` put the caret
+ // INSIDE the trailing <button>, so the first word typed into a column
+ // landed in the button and was then eaten by the sanitizer on blur (a
+ // <button> is not on the inline allowlist, so it goes with its text).
+ // Editor chrome never belongs inside an editable host. The image tools and
+ // the language chip sit outside theirs for the same reason.
+ const wrap = node.querySelector<HTMLElement>('.sp-tb-wrap')
+ const table = node.querySelector<HTMLElement>('.sp-tb')
+ if (!wrap || !table || shape.w < 2) continue
+ const grips: HTMLElement[] = []
+ // `offsetLeft` is measured against the WRAP (the nearest positioned
+ // ancestor), which is also what the grips are positioned in — so the two
+ // agree inside the horizontal scroller as well, and scroll together.
+ const place = () => {
+ const row = [...node.querySelectorAll<HTMLElement>('[data-cell][data-r="0"]')]
+ grips.forEach((g, c) => {
+ const td = row[c]
+ if (!td) return
+ // physical `left`, to match the physical `offsetLeft` it comes from
+ g.style.left = `${td.offsetLeft + td.offsetWidth - 3}px`
+ g.style.height = `${table.offsetHeight}px`
+ })
+ }
+ for (let c = 0; c < shape.w - 1; c++) {
+ const grip = document.createElement('button')
+ grip.type = 'button'
+ grip.className = 'sp-tb-grip'
+ grip.tabIndex = -1
+ grip.setAttribute('aria-label', t('Drag to resize this column'))
+ grip.addEventListener('mousedown', (down) => this.startColResize(down, id, c, node, place))
+ grips.push(grip)
+ wrap.append(grip)
+ }
+ place()
+ // the column boundaries move when the window does, and a grip that is no
+ // longer over its boundary is worse than no grip
+ new ResizeObserver(place).observe(table)
+ }
+ }
+
+ /**
+ * Drag a column boundary.
+ *
+ * The DOM is updated live and the model ONLY on release — a commit per
+ * mousemove would be sixty undo steps for one drag, and repainting the page
+ * under the cursor would drop the pointer capture on the first frame.
+ *
+ * Two adjacent weights are traded so the total is unchanged: `cols` are
+ * fractions of the table's own width (model.ts), so a drag can never make a
+ * table that does not add up.
+ */
+ private startColResize(down: MouseEvent, id: string, c: number, node: HTMLElement, place: () => void): void {
+ down.preventDefault()
+ const table = node.querySelector<HTMLElement>('.sp-tb')
+ const b = this.store.block(id)
+ if (!table || !b) return
+ const shape = tableOf(b)
+ const cols = [...table.querySelectorAll<HTMLElement>('col')]
+ const width = table.getBoundingClientRect().width || 1
+ const total = shape.cols.reduce((s, n) => s + n, 0) || shape.w
+ const startX = down.clientX
+ const a0 = shape.cols[c], b0 = shape.cols[c + 1]
+ // a column never shrinks past a width you could still grab
+ const min = (total * 40) / width
+ document.body.classList.add('sp-col-resizing')
+
+ const move = (m: MouseEvent) => {
+ const d = ((m.clientX - startX) / width) * total
+ const a = Math.max(min, Math.min(a0 + b0 - min, a0 + d))
+ shape.cols[c] = a
+ shape.cols[c + 1] = a0 + b0 - a
+ for (let i = 0; i < cols.length; i++) {
+ cols[i].style.width = `${((shape.cols[i] / total) * 100).toFixed(3)}%`
+ }
+ // the grips follow the boundaries they ARE; the table's own size does not
+ // change during a column drag, so the ResizeObserver never fires for this
+ place()
+ }
+ const up = () => {
+ window.removeEventListener('mousemove', move)
+ window.removeEventListener('mouseup', up)
+ document.body.classList.remove('sp-col-resizing')
+ this.store.commit(() => { writeTable(b, shape) }, { structure: false })
+ }
+ window.addEventListener('mousemove', move)
+ window.addEventListener('mouseup', up)
+ }
+
+ /**
+ * The keymap INSIDE a cell. Returns true when it handled the key.
+ *
+ * Tab and Enter walk the grid, and Tab off the last cell appends a row —
+ * exactly what slides' canvas table does, because it is what every table in
+ * every application does and muscle memory is not a thing to be clever with.
+ * Shift+Enter is the line break, since plain Enter is spent on navigation.
+ */
+ private tableKey(e: KeyboardEvent, at: { id: string; r: number; c: number }): boolean {
+ const b = this.store.block(at.id)
+ if (!b) return false
+ const t = tableOf(b)
+ const go = (r: number, c: number) => { e.preventDefault(); this.focusCell(at.id, r, c) }
+
+ if (e.key === 'Tab') {
+ const next = at.c + (e.shiftKey ? -1 : 1)
+ if (next >= 0 && next < t.w) { go(at.r, next); return true }
+ if (e.shiftKey) {
+ if (at.r === 0) { e.preventDefault(); return true }
+ go(at.r - 1, t.w - 1)
+ return true
+ }
+ if (at.r + 1 < t.h) { go(at.r + 1, 0); return true }
+ // off the end: a new row, which is how a table is filled in
+ e.preventDefault()
+ this.addTableRow(at.id)
+ return true
+ }
+ if (e.key === 'Enter') {
+ if (e.shiftKey) {
+ // the browser inserts a <div> or a <p> into a td left to itself, and
+ // block structure is never markup here — insertLineBreak is a <br>
+ e.preventDefault()
+ document.execCommand('insertLineBreak')
+ return true
+ }
+ if (at.r + 1 < t.h) { go(at.r + 1, at.c); return true }
+ e.preventDefault()
+ this.addTableRow(at.id)
+ return true
+ }
+ if (e.key === 'Escape') {
+ e.preventDefault()
+ ;(document.activeElement as HTMLElement | null)?.blur()
+ return true
+ }
+ return false
+ }
+
/** Choose what a code block is highlighted as. */
private openLangPicker(blockId: string, anchor: HTMLElement): void {
const s = this.store
@@ -2038,6 +2746,8 @@ export class Editor {
}
private collab: import('./collabui.ts').CollabUi | null = null
+ /** the live session, once main.ts has handed it over (connectSync) */
+ private session: import('./sync/session.ts').SyncSession | null = null
private liveSlot!: HTMLElement
private topbar: HTMLElement | null = null
private barRO: ResizeObserver | null = null
@@ -2144,16 +2854,41 @@ export class Editor {
const s = this.store
const mod = (e as any)[CTRL] as boolean
- if (mod && e.key.toLowerCase() === 'k' && !e.shiftKey) { e.preventDefault(); this.openSearch(); return }
- if (mod && e.key.toLowerCase() === 's') { e.preventDefault(); this.onSave?.(); return }
+ // ⌘K IS TWO COMMANDS, decided by whether anything is selected — the same
+ // split Notion and Confluence make, and the reason it is not a second
+ // shortcut: on a selection it is "link these words", and with nothing
+ // selected there is nothing to link, so it stays the quick-open it has
+ // always been. `link()` answers false when the selection is not markable,
+ // and the search opens as before.
+ if (mod && e.key.toLowerCase() === 'k' && !e.shiftKey) {
+ e.preventDefault()
+ if (!this.format?.link()) this.openSearch()
+ return
+ }
+ // `!e.shiftKey`: ⇧⌘S is strikethrough, and this branch had no shift test,
+ // so without it the save dialog opened every time someone struck text out.
+ if (mod && e.key.toLowerCase() === 's' && !e.shiftKey) { e.preventDefault(); this.onSave?.(); return }
if (mod && e.key.toLowerCase() === 'p') { e.preventDefault(); this.openPrint(); return }
if (mod && e.key.toLowerCase() === 'f') { e.preventDefault(); this.openFind(); return }
if (mod && e.altKey && e.key.toLowerCase() === 'n') { e.preventDefault(); this.newPage(); return }
if (mod && e.shiftKey && e.key.toLowerCase() === 'j') { e.preventDefault(); this.openJournal(); return }
- // `[` collapses the page list, as in slides. Bare, not modified: it only
- // reaches here when nothing is being edited (the text path returns above,
- // where `[` is the page-link trigger).
- if (!mod && e.key === '[') { e.preventDefault(); this.togglePane(); return }
+ // `[` collapses the page list, `]` opens the properties panel — the pair
+ // slides uses. BOTH ask the same question first.
+ //
+ // `[` did not, and the comment beside it claimed it did not need to
+ // because "the text path returns above". The text path is ~90 lines BELOW
+ // it, so every bare `[` was caught here, preventDefault()ed, and turned
+ // into a sidebar toggle: `[[`, the way this app makes links and the thing
+ // the starter space tells you to type, could not be typed at all. Shipped
+ // since #237.
+ //
+ // ONE guard for both, not two. The panel work arrived with its own
+ // `isTyping()` while this was being fixed with an `editingText()` — same
+ // question, two names, and a second copy is how the two answers start to
+ // differ. `isTyping` is the survivor because it also covers SELECT, which
+ // takes a keystroke as readily as an input does.
+ if (!mod && e.key === '[' && !isTyping()) { e.preventDefault(); this.togglePane(); return }
+ if (!mod && e.key === ']' && !isTyping()) { e.preventDefault(); this.toggleInsp(); return }
if (mod && e.shiftKey && e.key.toLowerCase() === 'i') { e.preventDefault(); this.newIssue(); return }
if (mod && e.key.toLowerCase() === 'z') {
e.preventDefault()
@@ -2164,6 +2899,18 @@ export class Editor {
if (e.key === 'Escape' && this.reading && !this.overlay) { e.preventDefault(); this.toggleReading(false); return }
if (this.overlay) return // the overlay owns the keyboard while it is open
+ // A TABLE CELL IS NOT A BLOCK HOST, so the block keymap below does not
+ // apply to it — the same ruling a code block gets, one level earlier.
+ // ⏎ walks the grid rather than splitting a block, ⇥ walks it rather than
+ // re-parenting, and neither has any meaning for a cell. This must come
+ // before `focused()`, which looks for `[data-edit]` and finds nothing in a
+ // cell — so without it every key here fell through to the browser, and ⏎
+ // inserted a `<div>` into the cell's html.
+ const inCell = this.cellAt(document.activeElement)
+ if (inCell && !s.readOnly && !this.reading) {
+ if (this.tableKey(e, inCell)) return
+ }
+
const cur = this.focused()
if (!cur) return
const b = s.block(cur.id)
@@ -2188,7 +2935,7 @@ export class Editor {
if (e.key === 'Enter') { e.preventDefault(); insertText('\n'); return }
if (e.key === 'Tab') { e.preventDefault(); if (!e.shiftKey) insertText(' '); return }
if (e.key === '/' || e.key === '[') return
- if (mod && ['b', 'i', 'u'].includes(e.key.toLowerCase())) { e.preventDefault(); return }
+ if (markKey(e, mod)) { e.preventDefault(); return }
}
if (e.key === 'Enter' && !e.shiftKey && b.type !== 'code') {
@@ -2231,10 +2978,14 @@ export class Editor {
setTimeout(() => this.openPagePicker(cur.id, cur.host), 0)
return
}
- if (mod && ['b', 'i', 'u'].includes(e.key.toLowerCase())) {
+ const mark = markKey(e, mod)
+ if (mark) {
+ // ALWAYS preventDefault, even with nothing selected. ⌘B is a browser
+ // command too, and letting it through would put contentEditable's own
+ // `<b>` into the block — the exact non-canonical markup, from the exact
+ // engine, that §2.4(b) forbids and that this replaced.
e.preventDefault()
- document.execCommand(({ b: 'bold', i: 'italic', u: 'underline' } as any)[e.key.toLowerCase()])
- s.runEdit(cur.id, () => { const bb = s.block(cur.id); if (bb) bb.html = cur.host.innerHTML })
+ this.format?.toggle(mark)
return
}
}
@@ -2331,7 +3082,10 @@ export class Editor {
SPEC.get(type)?.init?.(b)
})
this.paintPage()
- this.focusBlock(id)
+ // a table's text is in its cells, so there is no block host to put the
+ // caret in — the first cell is the equivalent place
+ if (type === 'table') this.focusCell(id, 0, 0)
+ else this.focusBlock(id)
}
// ---- overlays -----------------------------------------------------------
@@ -2454,6 +3208,7 @@ export class Editor {
// the "/" that opened the menu is a command, not content
if (blk && (blk.html ?? '').trim() === '/') blk.html = ''
if (item.type === 'pagelink') this.insertPageCard(blockId)
+ else if (item.type === 'link') { this.setType(blockId, 'link'); this.openLinkCard(blockId) }
else this.setType(blockId, item.type)
}
const paint = () => {
@@ -2512,6 +3267,132 @@ export class Editor {
})
}
+ /**
+ * THE ONE WRITER for a link card's fields.
+ *
+ * Fields and `html` move together, always — the same rule as a field value
+ * (applyField above), for the same reason: `html` is what a build that has
+ * never heard of `link` renders, and format additivity is a promise about
+ * what OLD builds do. A card whose fields were written without it is a card
+ * that vanishes when the file is opened in last year's shell.
+ */
+ private applyLinkCard(b: Block, next: Partial<Block>): void {
+ b.type = 'link'
+ for (const k of ['url', 'title', 'desc', 'site', 'icon', 'image'] as const) {
+ const v = next[k]
+ // an EMPTY field is an absent field: a card carrying `"desc": ""` is
+ // bytes in every copy of the file that say nothing
+ if (typeof v === 'string' && v.trim()) (b as Record<string, unknown>)[k] = v.trim()
+ else delete (b as Record<string, unknown>)[k]
+ }
+ b.html = linkCardHtml(linkCard(b))
+ }
+
+ /**
+ * The link card's editor — and the whole of this feature's honesty.
+ *
+ * A link card in Notion or Slack is a SERVER fetching the url and reading its
+ * OpenGraph tags. There is no server here, and a fetch on this path would
+ * break the one promise the format is built on. So the author fills the card
+ * in, the dialog says so plainly, and nothing about opening a space ever
+ * contacts the site it links to.
+ */
+ private openLinkCard(blockId: string): void {
+ const s = this.store
+ if (s.readOnly || this.reading) return
+ const at = s.block(blockId)
+ if (!at) return
+ // a draft, so Escape leaves the block exactly as it was
+ const draft: Record<string, string> = {
+ url: String(at.url ?? ''), title: String(at.title ?? ''),
+ desc: String(at.desc ?? ''), site: String(at.site ?? ''),
+ icon: String(at.icon ?? ''), image: String(at.image ?? ''),
+ }
+
+ this.openOverlay(t('Link card'), (card, close) => {
+ card.append(el('h2', 'sp-card-h', t('Link card')))
+
+ const why = document.createElement('p')
+ why.className = 'sp-note'
+ why.textContent = t('Nothing is fetched. A card shows what you type here — opening this space never contacts the site.')
+ card.append(why)
+
+ const field = (key: string, label: string, hint?: string): HTMLInputElement => {
+ const wrap = el('div', 'sp-field')
+ wrap.append(el('label', 'sp-field-lbl', label))
+ const input = document.createElement('input')
+ input.className = 'sp-input'
+ input.value = draft[key]
+ if (hint) input.placeholder = hint
+ input.addEventListener('input', () => { draft[key] = input.value })
+ wrap.append(input)
+ card.append(wrap)
+ return input
+ }
+
+ const url = field('url', t('Web address'), 'https://example.com')
+ url.type = 'url'
+ field('title', t('Title'), t('What this is'))
+ field('desc', t('Description'), t('One line about what is there'))
+ // the host is what shows when this is blank, so the placeholder is the
+ // answer rather than an example
+ field('site', t('Site name'), t('Taken from the address if blank'))
+ field('icon', t('Icon'), t('One emoji'))
+
+ // THE THUMBNAIL IS EMBEDDED, never linked. `prepareImage` downscales and
+ // `internAsset` stores the bytes in the file, exactly as an image block
+ // does — which is why a card can carry a picture at all without becoming
+ // a request on open.
+ const row = el('div', 'sp-actions')
+ const pick = document.createElement('button')
+ pick.className = 'sp-btn'
+ pick.type = 'button'
+ const paintPick = () => {
+ pick.textContent = draft.image ? t('Replace picture') : t('Add a picture')
+ drop.hidden = !draft.image
+ }
+ pick.addEventListener('click', () => {
+ const input = document.createElement('input')
+ input.type = 'file'
+ input.accept = 'image/*'
+ input.addEventListener('change', () => {
+ const file = input.files?.[0]
+ if (!file) return
+ void (async () => {
+ try {
+ const prepared = await prepareImage(file)
+ draft.image = await internAsset(s.doc, prepared.dataUri)
+ } catch { this.status(t('That file could not be read as an image')); return }
+ paintPick()
+ })()
+ })
+ input.click()
+ })
+ const drop = document.createElement('button')
+ drop.className = 'sp-btn'
+ drop.type = 'button'
+ drop.textContent = t('Remove the picture')
+ drop.addEventListener('click', () => { draft.image = ''; paintPick() })
+ paintPick()
+ row.append(pick, drop)
+ card.append(row)
+
+ const done = el('div', 'sp-actions')
+ const save = document.createElement('button')
+ save.className = 'sp-btn sp-primary'
+ save.type = 'button'
+ save.textContent = t('Save')
+ save.addEventListener('click', () => {
+ close()
+ s.commit(() => { const b = s.block(blockId); if (b) this.applyLinkCard(b, draft) })
+ this.paintPage()
+ })
+ done.append(save)
+ card.append(done)
+ url.focus()
+ })
+ }
+
/** `[[` — pick a page, or make one, and link it inline. */
private openPagePicker(blockId: string, host: HTMLElement | null, then?: (pageId: string) => void): void {
const s = this.store
@@ -2697,6 +3578,16 @@ export class Editor {
this.newPage(pageId)
}))
+ // A thread about the PAGE — the second and last anchor. It is offered
+ // where the page's own actions are, and only for the page in view,
+ // because a thread is written into the page you are looking at.
+ if (pageId === s.pageId && !s.readOnly) {
+ pop.append(this.menuItem('comment', t('Comment on this page'), '', () => {
+ this.closeOverlay()
+ this.comments.openNew()
+ }))
+ }
+
pop.append(this.menuItem(page.archived ? 'unarchive' : 'archive',
page.archived ? t('Restore to the page list') : t('Archive'),
page.archived ? '' : t('Out of the sidebar, still searchable and linkable'), () => {
@@ -2738,6 +3629,25 @@ export class Editor {
pop.append(this.menuItem('widthFull', t('Full width'), t('Fills the window'),
() => setWidth('full'), { selected: current === 'full' }))
+ // AND THE SAME CHOICE, FOR EVERY PAGE. Setting a width page by page answers
+ // "this page needs the room"; it does not answer "I have a wide screen",
+ // which is one fact about one person and was costing a visit to every page
+ // in the space. This one is a VIEWER preference — localStorage, never the
+ // file — so it follows the reader rather than the document, and somebody
+ // opening the same space on a laptop is unaffected.
+ const pref = readerWidth()
+ const applyAll = (v: 'wide' | 'full' | undefined) => {
+ this.closeOverlay()
+ setReaderWidth(v)
+ this.paintPage()
+ this.status(v ? t('Every page opens wide on this screen from now on')
+ : t('Pages open at their normal width again'))
+ }
+ pop.append(this.menuItem(pref ? 'widthNarrow' : 'widthWide',
+ pref ? t('Stop widening every page') : t('Use this width for every page'),
+ pref ? t('Only pages that ask for it') : t('On this screen only — it is not saved in the file'),
+ () => applyAll(pref ? undefined : (current === 'full' ? 'full' : 'wide'))))
+
pop.append(this.menuItem('trash', t('Delete…'), t('Links to it become dead'), () => {
this.closeOverlay()
this.deletePage(pageId)
@@ -2859,16 +3769,161 @@ export class Editor {
}))
}
- /** Drop or paste an image straight onto the page. */
- private async imageFromTransfer(dt: DataTransfer | null, afterId?: string): Promise<boolean> {
- const file = [...(dt?.files ?? [])].find((f) => f.type.startsWith('image/'))
- ?? [...(dt?.items ?? [])].filter((i) => i.type.startsWith('image/')).map((i) => i.getAsFile())[0]
- if (!file) return false
+ /**
+ * Drop or paste an image — or a clip — straight onto the page.
+ *
+ * Images win a tie. A drag that carries both (a screenshot alongside a
+ * screen recording, which is what a Finder multi-select of a bug report
+ * looks like) takes the image, because that is the one an author is far more
+ * often reaching for and the one that costs nothing to be wrong about.
+ */
+ private async fileFromTransfer(dt: DataTransfer | null, afterId?: string): Promise<boolean> {
+ const pick = (kind: string): File | undefined =>
+ [...(dt?.files ?? [])].find((f) => f.type.startsWith(kind))
+ ?? [...(dt?.items ?? [])].filter((i) => i.type.startsWith(kind)).map((i) => i.getAsFile())[0]
+ ?? undefined
if (!this.store.page) return false
- await this.placeImage(null, file, { insertAfter: afterId ?? null })
+ const img = pick('image/')
+ if (img) { await this.placeImage(null, img, { insertAfter: afterId ?? null }); return true }
+ const clip = pick('video/') ?? pick('audio/')
+ if (!clip) return false
+ await this.placeMedia(null, clip, { insertAfter: afterId ?? null })
return true
}
+ // ---- video and audio -------------------------------------------------------
+ /**
+ * Choose a clip and put it in the document.
+ *
+ * `accept` names both kinds and the KIND IS READ BACK OFF THE FILE, never
+ * asked for. A picker that made you say "video" first would be a question
+ * the file already answers, and answers correctly for the odd cases — an
+ * .m4a that a phone wrote as video/mp4 plays either way.
+ */
+ async pickMedia(blockId: string): Promise<void> {
+ const input = document.createElement('input')
+ input.type = 'file'
+ input.accept = 'video/*,audio/*'
+ input.addEventListener('change', () => {
+ const file = input.files?.[0]
+ if (file) void this.placeMedia(blockId, file)
+ })
+ input.click()
+ }
+
+ /**
+ * Embed one clip.
+ *
+ * Shaped like placeImage and for the same reason: everything asynchronous —
+ * reading the bytes, hashing them — happens BEFORE the commit, so the asset
+ * and the reference land in one synchronous mutation and one undo step.
+ *
+ * NOTHING IS RE-ENCODED. prepareImage exists because a phone photo is 4000px
+ * wide in a 720px column and the detail is invisible; there is no equivalent
+ * cheap win for video, and transcoding in a browser tab means shipping an
+ * encoder and taking minutes over it. So a clip is either small enough to
+ * embed or a link — which is what MEDIA_EMBED_BUDGET asks about.
+ */
+ async placeMedia(
+ blockId: string | null,
+ file: File | Blob,
+ opts: { insertAfter?: string | null } = {},
+ ): Promise<void> {
+ const s = this.store
+ this.status(t('Reading file…'))
+ let dataUri: string
+ try {
+ dataUri = await blobToDataUri(file)
+ } catch {
+ this.status(t('That file could not be read'))
+ return
+ }
+ const kind = (file as File).type?.startsWith('audio/') ? 'audio' : 'video'
+
+ if (dataUri.length > MEDIA_EMBED_BUDGET) {
+ // A browser file picker hands over BYTES, never a path, so "keep it on
+ // disk and point at it" is not a thing this can offer. The honest
+ // alternatives are: embed it anyway, or paste a URL — which is what the
+ // block's own chooser offers, and where a no lands you.
+ const go = confirm(t(
+ 'This clip is {size} and travels inside the file, making it that much bigger for everyone you send it to. Embed it anyway?',
+ { size: humanBytes(dataUri.length) },
+ ))
+ if (!go) { this.status(''); return }
+ }
+
+ const ref = await internAsset(s.doc, dataUri)
+ this.writeMedia(blockId, opts.insertAfter ?? null, (b) => { b.src = ref; b.kind = kind })
+ this.status(t('Clip added ({size})', { size: humanBytes(dataUri.length) }))
+ }
+
+ /**
+ * The escape hatch: a clip that lives somewhere else.
+ *
+ * The only way to have a small file with a big video in it, and the reason
+ * `src` is hybrid at all. It is a real trade and it is stated at the point of
+ * the decision — a linked clip needs the network to play, and asking for it
+ * tells that host somebody opened the space, which is why the READER is
+ * asked before it loads (render.ts).
+ */
+ linkMedia(blockId: string | null, insertAfter: string | null = null): void {
+ const url = prompt(t('Address of a video or audio file'))?.trim()
+ if (!url) return
+ // http(s) only, and checked HERE as well as in the sanitizer: `src` is not
+ // inline html, so it never passes through sanitize.ts at all — a
+ // `javascript:` typed into this box would be written straight onto the
+ // element. The allowlist is the test, never a `javascript:` blocklist.
+ if (!/^https?:\/\//i.test(url)) { this.status(t('That needs to be an http or https address')); return }
+ const kind = /\.(mp3|m4a|aac|wav|ogg|oga|opus|flac|weba)(\?|#|$)/i.test(url) ? 'audio' : 'video'
+ this.writeMedia(blockId, insertAfter, (b) => { b.src = url; b.kind = kind })
+ this.status('')
+ }
+
+ /** ONE commit, whether the block exists already or is being created here —
+ * the placeImage rule: an inserted clip must not cost two undos. */
+ private writeMedia(blockId: string | null, insertAfter: string | null, fill: (b: Block) => void): void {
+ const s = this.store
+ const apply = (b: Block) => {
+ b.type = 'media'
+ b.html = ''
+ fill(b)
+ }
+ s.commit(() => {
+ if (blockId) { const b = s.block(blockId); if (b) apply(b); return }
+ const page = s.page
+ if (!page) return
+ const fresh = newBlock('media')
+ apply(fresh)
+ const at = insertAfter ? page.blocks.findIndex((b) => b.id === insertAfter) + 1 : page.blocks.length
+ page.blocks.splice(at < 1 ? page.blocks.length : at, 0, fresh)
+ })
+ this.paintPage()
+ }
+
+ /** A still frame for a video — the same pipeline an image goes through, so
+ * it is downscaled and content-addressed like any other picture. */
+ private async pickPoster(blockId: string): Promise<void> {
+ const input = document.createElement('input')
+ input.type = 'file'
+ input.accept = 'image/*'
+ input.addEventListener('change', () => {
+ const file = input.files?.[0]
+ if (!file) return
+ void (async () => {
+ this.status(t('Reading image…'))
+ let prepared
+ try { prepared = await prepareImage(file) } catch {
+ this.status(t('That file could not be read as an image')); return
+ }
+ const ref = await internAsset(this.store.doc, prepared.dataUri)
+ this.store.commit(() => { const b = this.store.block(blockId); if (b) b.poster = ref })
+ this.paintPage()
+ this.status('')
+ })()
+ })
+ input.click()
+ }
+
// ---- importing existing notes ---------------------------------------------
/**
* The way in.
@@ -2880,14 +3935,36 @@ export class Editor {
* rather than left to be discovered.
*/
openImport(): void {
- this.openOverlay(t('Import Markdown'), (card, close) => {
- card.append(el('h2', 'sp-card-h', t('Import Markdown')))
+ this.openOverlay(t('Bring notes in'), (card, close) => {
+ card.append(el('h2', 'sp-card-h', t('Bring notes in')))
const what = document.createElement('p')
what.className = 'sp-note'
what.textContent = t('Each .md file becomes a page, folders become the page tree, and [[wikilinks]] become real links. Pages are added — nothing here is replaced.')
card.append(what)
+ // WHERE the arriving pages land, and it governs BOTH ways in. An import
+ // that can only append at the root is an import into a pile: the point of
+ // a space is the tree, and "under the page I am reading" is what somebody
+ // taking a second set of notes into a working space actually means.
+ const under = document.createElement('select')
+ under.className = 'sp-select'
+ const top = document.createElement('option')
+ top.value = ''
+ top.textContent = t('Top level')
+ under.append(top)
+ for (const { page, depth } of this.store.tree()) {
+ const o = document.createElement('option')
+ o.value = page.id
+ o.textContent = `${'· '.repeat(depth)}${page.title || t('Untitled')}`
+ if (page.id === this.store.pageId) o.selected = true
+ under.append(o)
+ }
+ const whereRow = el('div', 'sp-row')
+ whereRow.append(el('span', '', t('Add pages under')), under)
+ card.append(whereRow)
+ const where = () => under.value || undefined
+
const zone = el('div', 'sp-dropzone', t('Drop .md files or a folder here'))
zone.addEventListener('dragover', (e) => { e.preventDefault(); zone.classList.add('sp-drop') })
zone.addEventListener('dragleave', () => zone.classList.remove('sp-drop'))
@@ -2896,8 +3973,9 @@ export class Editor {
e.stopPropagation()
zone.classList.remove('sp-drop')
const picked = collectDrop(e.dataTransfer)
+ const at = where()
close()
- void picked.then((files) => this.importFiles(files))
+ void picked.then((files) => this.importFiles(files, { under: at }))
})
card.append(zone)
@@ -2907,12 +3985,26 @@ export class Editor {
input.multiple = true
if (folder) input.webkitdirectory = true
else input.accept = '.md,.markdown,.mdown,.mkd,image/*'
+ const at = where()
input.addEventListener('change', () => {
close()
// webkitRelativePath is the folder tree; a plain multi-select has
// none, and those files import as a flat set of pages
void this.importFiles([...(input.files ?? [])]
- .map((file) => ({ path: file.webkitRelativePath || file.name, file })))
+ .map((file) => ({ path: file.webkitRelativePath || file.name, file })), { under: at })
+ })
+ input.click()
+ }
+
+ const pickSpace = () => {
+ const input = document.createElement('input')
+ input.type = 'file'
+ input.accept = '.html,text/html,application/json'
+ const at = where()
+ input.addEventListener('change', () => {
+ close()
+ const file = input.files?.[0]
+ if (file) void this.importSpace(file, at)
})
input.click()
}
@@ -2921,9 +4013,15 @@ export class Editor {
acts.append(
plainBtn(t('Choose .md files…'), () => pick(false), true),
plainBtn(t('Choose a folder…'), () => pick(true)),
+ plainBtn(t('Choose a space…'), pickSpace),
)
card.append(acts)
+ const spaces = document.createElement('p')
+ spaces.className = 'sp-note'
+ spaces.textContent = t('Another bento/spaces file arrives as pages under the one you choose — its images come too, and the links inside it keep working.')
+ card.append(spaces)
+
const imgs = document.createElement('p')
imgs.className = 'sp-note'
// said BEFORE the import, because it is the one thing a browser cannot
@@ -2933,6 +4031,153 @@ export class Editor {
})
}
+ /**
+ * Another space, grafted into this one — the way IN that answers the page
+ * extract's way out.
+ *
+ * The file is UNTRUSTED and takes the ordinary load path, with no friendlier
+ * door beside it: the document block is read out of an INERT parse (DOMParser
+ * builds no browsing context, so no script runs and no resource loads),
+ * `parseDoc` decides whether it is a space at all — refusing rather than
+ * degrading, the same load contract main.ts boots under — and
+ * `sanitizeInline` runs over every arriving block before any of it reaches
+ * the document.
+ */
+ async importSpace(file: File, under?: string): Promise<void> {
+ const s = this.store
+ if (s.readOnly) { this.status(t('This file is open read-only')); return }
+ let text: string
+ try { text = await file.text() } catch { this.status(t('That file could not be read')); return }
+
+ const body = spaceBlockOf(text)
+ if (body === 'encrypted') {
+ // The password is not ours to ask for, and the honest instruction is the
+ // one that works: open the file where the password already is.
+ this.status(t('That space is password-protected. Open it, then export the pages you want.'))
+ return
+ }
+ const res = parseDoc(body ?? '')
+ if (!res.ok) {
+ this.status(res.err === 'format'
+ ? t('That file is not a bento/spaces document')
+ : t('That file could not be read'))
+ return
+ }
+
+ const plan = planGraft(s.doc, res.doc, { under })
+ // THE security gate, in the same place the Markdown import puts it.
+ for (const page of plan.pages) {
+ for (const b of page.blocks) if (b.html) b.html = sanitizeInline(b.html)
+ }
+
+ // ONE step: pages, images and fonts land together or not at all.
+ s.commit(() => {
+ s.doc.pages.push(...plan.pages)
+ if (Object.keys(plan.assets).length) Object.assign((s.doc.assets ??= {}), plan.assets)
+ if (plan.fonts.length) (s.doc.fonts ??= []).push(...plan.fonts)
+ })
+ if (plan.pages[0]) s.goToPage(plan.pages[0].id)
+ this.repaint()
+
+ this.openOverlay(t('Imported a space'), (card, close) => {
+ card.append(el('h2', 'sp-card-h', t('Imported a space')))
+ const lines = [
+ t('{pages} page(s) and {blocks} block(s) added from that space.',
+ { pages: plan.stats.pages, blocks: plan.stats.blocks }),
+ ]
+ // Renaming is the outcome a reader cannot see for themselves, and the one
+ // that would break every link if it were done carelessly — so it is
+ // reported together with the repair that keeps the links pointing right.
+ if (plan.stats.renamed) {
+ lines.push(t('{n} id(s) were renamed because this space already used them, and the links inside the import follow them.',
+ { n: plan.stats.renamed }))
+ }
+ if (plan.stats.dropped) {
+ lines.push(t('{n} link(s) named pages that were not in that file, and are kept as text.', { n: plan.stats.dropped }))
+ }
+ if (plan.stats.assets) lines.push(t('{n} image(s) came too.', { n: plan.stats.assets }))
+ lines.push(t('⌘Z removes the imported pages again.'))
+ for (const line of lines) {
+ const p = document.createElement('p')
+ p.className = 'sp-note'
+ p.textContent = line
+ card.append(p)
+ }
+ card.append(plainBtn(t('Close'), close, true))
+ })
+ }
+
+ /**
+ * A page — and, by choice, what is under it — leaves as its own space.
+ *
+ * The counts come from the REAL extract and move as the choices do, rather
+ * than being described in the abstract: how much travels, and how many links
+ * point out of the selection and will become text. Those two facts are what
+ * decide whether this is the extract somebody meant.
+ */
+ openExportSpace(): void {
+ const s = this.store
+ this.openOverlay(t('Export a page as a space'), (card, close) => {
+ card.append(el('h2', 'sp-card-h', t('Export a page as a space')))
+
+ const what = document.createElement('p')
+ what.className = 'sp-note'
+ what.textContent = t('The page becomes a new file of its own: a whole space, with a new document id and none of this one’s sharing keys.')
+ card.append(what)
+
+ const pick = document.createElement('select')
+ pick.className = 'sp-select'
+ for (const { page, depth } of s.tree()) {
+ const o = document.createElement('option')
+ o.value = page.id
+ o.textContent = `${'· '.repeat(depth)}${page.title || t('Untitled')}`
+ if (page.id === s.pageId) o.selected = true
+ pick.append(o)
+ }
+ const pageRow = el('div', 'sp-row')
+ pageRow.append(el('span', '', t('Page')), pick)
+ card.append(pageRow)
+
+ const kids = document.createElement('input')
+ kids.type = 'checkbox'
+ kids.checked = true
+ const kidsRow = el('div', 'sp-row')
+ kidsRow.append(el('span', '', t('Include the pages nested under it')), kids)
+ card.append(kidsRow)
+
+ const summary = document.createElement('p')
+ summary.className = 'sp-note'
+ const recount = () => {
+ const r = extractSpace(s.doc, pick.value, { subtree: kids.checked, docId: 'preview', now: '' })
+ const parts = [t('{pages} page(s) and {blocks} block(s) will travel.',
+ { pages: r.stats.pages, blocks: r.stats.blocks })]
+ if (r.stats.unlinked) {
+ parts.push(t('{n} link(s) point outside them and are kept as text naming the page they meant.',
+ { n: r.stats.unlinked }))
+ }
+ if (r.stats.assets) parts.push(t('{n} image(s) go with them; the rest stay here.', { n: r.stats.assets }))
+ summary.textContent = parts.join(' ')
+ }
+ pick.addEventListener('change', recount)
+ kids.addEventListener('change', recount)
+ recount()
+ card.append(summary)
+
+ const acts = el('div', 'sp-actions')
+ acts.append(
+ plainBtn(t('Export'), () => {
+ const out = extractSpace(s.doc, pick.value, { subtree: kids.checked, docId: uid('doc') })
+ close()
+ void this.onExportSpace?.(out.doc).then((ok) => {
+ if (ok) this.status(t('Exported {n} page(s) as a new space', { n: out.stats.pages }))
+ })
+ }, true),
+ plainBtn(t('Close'), close),
+ )
+ card.append(acts)
+ })
+ }
+
/**
* Import, in ONE undoable step.
*
@@ -2942,11 +4187,18 @@ export class Editor {
* `placeImage` is shaped this way: a half-applied import is not something a
* single ⌘Z could put back.
*/
- async importFiles(picked: PickedFile[]): Promise<void> {
+ async importFiles(picked: PickedFile[], opts: { under?: string } = {}): Promise<void> {
const s = this.store
if (s.readOnly) { this.status(t('This file is open read-only')); return }
const notes = picked.filter((p) => NOTE_EXT.test(p.path))
- if (!notes.length) { this.status(t('No Markdown files in that selection')); return }
+ if (!notes.length) {
+ // A space is a legitimate thing to drop on the import, and it arrives by
+ // the same gesture: one route in, whatever kind of notes they are.
+ const space = picked.find((p) => SPACE_EXT.test(p.path))
+ if (space) { await this.importSpace(space.file, opts.under); return }
+ this.status(t('No Markdown files in that selection'))
+ return
+ }
if (notes.length > 500 &&
!confirm(t('That is {n} files — importing them all may take a moment. Continue?', { n: notes.length }))) return
@@ -3030,6 +4282,15 @@ export class Editor {
for (const b of page.blocks) if (b.html) b.html = sanitizeInline(b.html)
}
+ // The import already lands under exactly one root (planImport wraps a mixed
+ // selection); re-homing that root is the whole of "add these under this
+ // page", and it keeps the one-root, one-⌘Z shape intact.
+ const under = opts.under && s.index.page.has(opts.under) ? opts.under : undefined
+ if (under) {
+ const arrived = new Set(plan.pages.map((p) => p.id))
+ for (const page of plan.pages) if (!page.parent || !arrived.has(page.parent)) page.parent = under
+ }
+
s.commit(() => { s.doc.pages.push(...plan.pages) })
if (plan.pages[0]) s.goToPage(plan.pages[0].id)
this.repaint()
@@ -3058,7 +4319,7 @@ export class Editor {
lines.push(t('{n} page(s) had frontmatter, kept verbatim in a folded block.', { n: plan.stats.frontmatter }))
}
if (plan.stats.tables) {
- lines.push(t('{n} table(s) kept as text: there is no table block in this format yet.', { n: plan.stats.tables }))
+ lines.push(t('{n} table(s) imported, with their column alignment.', { n: plan.stats.tables }))
}
if (embedded) lines.push(t('{n} image(s) embedded ({size}).', { n: embedded, size: humanBytes(embeddedBytes) }))
if (unresolved) {
@@ -3373,6 +4634,55 @@ export class Editor {
this.onSaveAs?.(suffix)
}
+ /**
+ * Save a copy that carries a SCOPED capability — the two ways to let someone
+ * into this space.
+ *
+ * Both go live first, because a copy that follows a session needs there to
+ * be one, and because "share" should be one action rather than a session to
+ * start and then a file to send.
+ *
+ * Both also write a DERIVED document (share.ts), never `store.doc`. That is
+ * the whole of the fix: `saveAs('copy')` serializes the open document, so
+ * inviting somebody used to hand them `collab.ownerPriv` — the root key of
+ * the room, which writes AND revokes, the inviter included.
+ */
+ private async shareCopy(kind: import('./share.ts').ShareKind): Promise<void> {
+ await this.goLive()
+ // Committed first for the same reason slides commits its text edit: a
+ // half-typed block that only exists in the DOM is not in the copy.
+ this.store.endRun()
+ // Copies rejoin as true FORKS: the stamped CRDT state is what lets an
+ // offline edit on either side merge two-way rather than clobber.
+ this.session?.stampInto(this.store.doc)
+ const out = kind === 'invite'
+ ? await shareModule.inviteCopy(this.store.doc)
+ : shareModule.readerCopy(this.store.doc)
+ if (!out) {
+ this.status(kind === 'invite'
+ ? t('Only the owner of this space can invite people')
+ : t('This space has no live session to follow'))
+ return
+ }
+ const ok = await this.onShareCopy?.(out, kind)
+ if (ok) {
+ this.status(kind === 'invite'
+ ? t('Editor copy saved — recipients join live with edit access')
+ : t('Read-only copy saved — it follows the live session, view only'))
+ }
+ }
+
+ /** Turn the live session on (idempotent). Sharing a copy calls this first. */
+ async goLive(): Promise<void> {
+ if (!this.session || offlineEnabled()) return
+ this.session.enableSharing()
+ await startSharing(this.session, this.store)
+ // A transport made just now is a NEW object with its own callback slot —
+ // the one the boot-time watch was attached to no longer exists.
+ this.collab?.watchStatus()
+ this.collab?.sync()
+ }
+
/** One About, one copy path — both entry points route through saveAs('copy'). */
private openAbout(): void {
openAbout({
@@ -3380,6 +4690,12 @@ export class Editor {
onRepaint: () => this.build(),
onSaveCopy: () => { void this.saveAs('copy') },
onImport: () => this.openImport(),
+ onExportSpace: () => this.openExportSpace(),
+ // "Duplicate as a new space…" writes a DIFFERENT document, so it takes
+ // the extract's writer rather than the copy path: that one keeps no file
+ // handle, which is what leaves you editing this space afterwards.
+ onWriteCopy: (out) => this.onExportSpace?.(out) ?? Promise.resolve(false),
+ onStatus: (msg) => this.status(msg),
})
}
@@ -3424,6 +4740,23 @@ export class Editor {
repaint(): void { this.paintTree(); this.paintPage() }
}
+/**
+ * The mark a keystroke means, or null.
+ *
+ * ⌘B/⌘I/⌘U/⇧⌘S/⌘E/⇧⌘H, which is Notion's set — the only set most people who
+ * will ever type them already have in their fingers. ⌘K is not here because it
+ * is two commands (see onKey).
+ *
+ * `e.key` and not `e.code`: on a non-QWERTY layout the letter the person is
+ * looking at is the one they mean, and ⌘B has to be the key marked B.
+ */
+function markKey(e: KeyboardEvent, mod: boolean): MarkTag | null {
+ if (!mod || e.altKey) return null
+ const k = e.key.toLowerCase()
+ if (e.shiftKey) return k === 's' ? 's' : k === 'h' ? 'mark' : null
+ return k === 'b' ? 'strong' : k === 'i' ? 'em' : k === 'u' ? 'u' : k === 'e' ? 'code' : null
+}
+
// ---- small dom helpers ------------------------------------------------------
function el<K extends keyof HTMLElementTagNameMap>(tag: K, cls: string, text?: string): HTMLElementTagNameMap[K] {
const n = document.createElement(tag)
@@ -3432,6 +4765,19 @@ function el<K extends keyof HTMLElementTagNameMap>(tag: K, cls: string, text?: s
return n
}
+/**
+ * Is a bare keystroke going to land in something the reader is writing in?
+ *
+ * The block hosts are contenteditable, the topbar title and the panel's own
+ * fields are inputs, and every one of them takes `]` as a character. A
+ * bare-key panel shortcut has to ask this first.
+ */
+function isTyping(): boolean {
+ const a = document.activeElement as HTMLElement | null
+ if (!a) return false
+ return a.isContentEditable || a.tagName === 'INPUT' || a.tagName === 'TEXTAREA' || a.tagName === 'SELECT'
+}
+
function iconBtn(name: IconName, label: string, onClick: () => void): HTMLButtonElement {
const b = document.createElement('button')
b.className = 'sp-btn'
@@ -3489,6 +4835,28 @@ function joinPath(dir: string, ref: string): string {
return out.join('/').toLowerCase()
}
+/**
+ * The `#bento-doc` payload inside another Bento file.
+ *
+ * INERT: `DOMParser` builds a document with no browsing context, so nothing in
+ * that html runs and nothing it references is fetched — the same reasoning
+ * sanitize.ts records for `inertBody`, and the reason the file can be read
+ * before anyone has decided to trust it. A bare `{` is the document JSON
+ * itself (the AI round-trip's interchange unit), which needs no parse at all.
+ *
+ * An ENCRYPTED space is reported rather than guessed at: the bytes are there,
+ * the password is not, and asking for one here would be asking for a password
+ * to a file this space has no business holding.
+ */
+function spaceBlockOf(text: string): string | null | 'encrypted' {
+ const body = /^\s*\{/.test(text)
+ ? text
+ : new DOMParser().parseFromString(text, 'text/html')
+ .getElementById('bento-doc')?.textContent ?? null
+ if (!body) return null
+ return parseEnvelope(body) ? 'encrypted' : body
+}
+
/** `my%20photo.png` is one file name, not two — editors percent-encode spaces. */
function decodePath(ref: string): string {
try { return decodeURI(ref) } catch { return ref }
@@ -3539,7 +4907,7 @@ async function walkEntry(entry: FileSystemEntry, base: string, out: PickedFile[]
/** Is this drop an IMPORT (markdown, or any folder) rather than an image? */
function isImportDrop(dt: DataTransfer | null): boolean {
if (!dt) return false
- if ([...dt.files].some((f) => NOTE_EXT.test(f.name))) return true
+ if ([...dt.files].some((f) => NOTE_EXT.test(f.name) || SPACE_EXT.test(f.name))) return true
return [...dt.items].some((i) => i.webkitGetAsEntry?.()?.isDirectory)
}
diff --git a/spaces/src/formatbar.ts b/spaces/src/formatbar.ts
new file mode 100644
index 00000000..aa8bb535
--- /dev/null
+++ b/spaces/src/formatbar.ts
@@ -0,0 +1,479 @@
+// SPDX-License-Identifier: MIT
+// Copyright (c) 2026 The Bento authors
+// The floating selection toolbar — the Notion/Confluence convention — over the
+// Range mark engine in marks.ts.
+//
+// Before this, the only way to make text bold in a space was to know that ⌘B
+// existed. Strikethrough, inline code, highlight and links had no gesture at
+// all. A block editor's formatting has to be DISCOVERABLE from the selection,
+// because selecting the words is what a person does before they decide how the
+// words should look.
+//
+// THREE THINGS THIS FILE IS CAREFUL ABOUT.
+//
+// (1) THE BAR LIVES IN `document.body`, NEVER IN THE BLOCK. A block's host
+// element IS the model — `host.innerHTML` is written to `Block.html` on
+// every input event. A button appended inside the editable subtree would be
+// committed to the document as content and then eaten by the sanitizer on
+// the next canonicalisation, so the file would carry the toolbar's markup
+// for exactly as long as it took someone to notice. It is also marked
+// `data-bento-transient`, because the kernel's save clones the LIVE
+// document: an open toolbar at ⌘S time would otherwise be written into the
+// saved file's body.
+//
+// (2) IT REMEMBERS OFFSETS, NOT A RANGE. Once the bar is up it holds
+// `{blockId, start, end}` in the block's plain-text coordinates. Every
+// operation is computed from those numbers and the selection is rebuilt
+// from them afterwards, so no live Range ever has to survive the innerHTML
+// write that each operation performs. Stale-Range-after-DOM-surgery is not
+// handled here; it is made impossible.
+//
+// (3) A COARSE POINTER GETS A BOTTOM BAR, NOT A FLOATING ONE. On a touch screen
+// a toolbar positioned over the selection lands exactly where iOS and
+// Android put the selection handles and the OS callout (Copy / Look Up /
+// Share). Two overlapping menus in the same 40 pixels is worse than one, so
+// on `pointer: coarse` the same buttons dock to the bottom of the viewport
+// — well clear of both, and the same idiom this app already uses for its
+// menus on a phone (`.sp-sheet`). "Nothing at all" was the other defensible
+// answer and was rejected: it would leave a phone with no way to format
+// text whatsoever, since a phone has no ⌘B either.
+
+import { t } from './i18n'
+import { ICONS } from './icons'
+import { Store } from './store'
+import {
+ type MarkTag, TOOLBAR_MARKS, applyMark, clearMarks, markActive, linkAt, linkAttrs,
+ offsetsOf, rangeAt, PALETTE, colourAttrs,
+} from './marks.ts'
+import { externalHref } from './sanitize'
+
+/** What the bar needs to know about the editor around it. */
+export interface FormatBarHost {
+ store: Store
+ /** false in reading view, in a readonly file, and while a modal owns the app */
+ editable(): boolean
+ /** the page surface, so the bar only reacts to selections inside it */
+ main(): HTMLElement
+}
+
+/** A selection the mark engine can act on. */
+export interface MarkTarget { id: string; host: HTMLElement; start: number; end: number }
+
+type ItemKey = MarkTag | 'link' | 'clear' | 'colour'
+interface Item { tag: ItemKey; icon: string; label: string; hint: string }
+
+/** Glyphs drawn here rather than in icons.ts: they are letterforms, not line
+ * art, and they have to read as the letter B and the letter I at 16px. */
+const glyph = (body: string): string =>
+ `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">${body}</svg>`
+
+const GLYPHS: Record<string, string> = {
+ strong: glyph('<path d="M7 4h6.5a4 4 0 0 1 0 8H7z"/><path d="M7 12h7.5a4 4 0 0 1 0 8H7z"/>'),
+ em: glyph('<line x1="19" y1="4" x2="10" y2="4"/><line x1="14" y1="20" x2="5" y2="20"/><line x1="15" y1="4" x2="9" y2="20"/>'),
+ u: glyph('<path d="M6 4v6a6 6 0 0 0 12 0V4"/><line x1="4" y1="21" x2="20" y2="21"/>'),
+ s: glyph('<path d="M16 5.5C15 4.5 13.6 4 12 4c-2.8 0-4.5 1.4-4.5 3.2 0 1.5 1 2.5 3 3.3"/><path d="M8.5 15c.6 2 2.3 3 4.5 3 2.9 0 4.5-1.4 4.5-3.3 0-.9-.3-1.6-.9-2.2"/><line x1="3" y1="12" x2="21" y2="12"/>'),
+ mark: glyph('<path d="M4 20h16"/><path d="m9 15-3 1 1-3 8-8 2 2z"/><path d="m13 5 2 2"/>'),
+ clear: glyph('<path d="M6 4h13"/><path d="M11 4 8.5 16"/><line x1="3" y1="21" x2="21" y2="21"/><line x1="14" y1="12" x2="20" y2="18"/><line x1="20" y1="12" x2="14" y2="18"/>'),
+ // an A over a bar, the universal "this changes the colour of letters"
+ colour: glyph('<path d="M5 19 11 5h2l6 14"/><path d="M7.5 14h9"/><path d="M4 22h16" stroke-width="3"/>'),
+}
+
+export class FormatBar {
+ private bar: HTMLElement | null = null
+ private target: MarkTarget | null = null
+ private buttons = new Map<string, HTMLButtonElement>()
+ private frame = 0
+ /** suppressed while a mouse selection drag is still in progress */
+ private dragging = false
+ /**
+ * The url field or the palette has the bar.
+ *
+ * NOT tidiness — without it the link field DESTROYS ITSELF. Focusing the
+ * input moves the selection out of the block, `selectionchange` fires,
+ * `refresh` finds nothing markable and closes the bar the input is inside,
+ * one frame after it opened. Measured in the built shell: ⌘K produced
+ * neither a url field nor the search it falls back to. While a panel is
+ * open the bar answers to its own Apply/Back/Escape and to a click outside,
+ * and to nothing else.
+ */
+ private locked = false
+
+ constructor(private readonly app: FormatBarHost) {
+ document.addEventListener('selectionchange', this.schedule)
+ // A drag that is still down is not a finished selection. Showing the bar
+ // mid-drag puts it under the pointer, so the gesture that was extending the
+ // selection ends on a button instead.
+ document.addEventListener('mousedown', this.onDown, true)
+ document.addEventListener('mouseup', this.onUp, true)
+ window.addEventListener('resize', this.schedule)
+ window.addEventListener('scroll', this.schedule, true)
+ }
+
+ destroy(): void {
+ document.removeEventListener('selectionchange', this.schedule)
+ document.removeEventListener('mousedown', this.onDown, true)
+ document.removeEventListener('mouseup', this.onUp, true)
+ window.removeEventListener('resize', this.schedule)
+ window.removeEventListener('scroll', this.schedule, true)
+ this.close()
+ }
+
+ private onDown = (e: MouseEvent): void => {
+ if (this.bar?.contains(e.target as Node)) return
+ this.dragging = true
+ this.close()
+ }
+
+ private onUp = (): void => { this.dragging = false; this.schedule() }
+
+ /** One recompute per frame: selectionchange fires per character of a drag. */
+ private schedule = (): void => {
+ cancelAnimationFrame(this.frame)
+ this.frame = requestAnimationFrame(() => this.refresh())
+ }
+
+ // ---- what is selected ----------------------------------------------------
+
+ /**
+ * The current selection, if the mark engine can act on it.
+ *
+ * PUBLIC because the keyboard path asks the same question: ⌘B has to mean
+ * "bold this selection" under exactly the conditions the toolbar appears
+ * under, or the two disagree about what is formattable and only one of them
+ * is visible.
+ */
+ markable(): MarkTarget | null {
+ if (!this.app.editable()) return null
+ const sel = getSelection()
+ if (!sel || sel.rangeCount === 0 || sel.isCollapsed) return null
+ const range = sel.getRangeAt(0)
+ const host = (range.commonAncestorContainer instanceof HTMLElement
+ ? range.commonAncestorContainer
+ : range.commonAncestorContainer.parentElement)?.closest<HTMLElement>('[data-edit]')
+ if (!host || !this.app.main().contains(host)) return null
+ const id = host.dataset.edit!
+ // A code block's host holds TEXT, not inline html — its `innerHTML` is
+ // syntax colouring that must never reach the model (see wireCode). Marks
+ // inside source code are meaningless anyway.
+ if (this.app.store.block(id)?.type === 'code') return null
+ const at = offsetsOf(host, range)
+ if (!at || at.end <= at.start) return null
+ return { id, host, start: at.start, end: at.end }
+ }
+
+ // ---- the bar -------------------------------------------------------------
+
+ private items(): Item[] {
+ // Translated at CALL time, never in a module const — a catalog frozen at
+ // import ships English forever once someone changes the language.
+ const labels: Partial<Record<ItemKey, [string, string]>> = {
+ strong: [t('Bold'), t('Bold — ⌘B')],
+ em: [t('Italic'), t('Italic — ⌘I')],
+ u: [t('Underline'), t('Underline — ⌘U')],
+ s: [t('Strikethrough'), t('Strikethrough — ⇧⌘S')],
+ code: [t('Code'), t('Inline code — ⌘E')],
+ mark: [t('Highlight'), t('Highlight — ⇧⌘H')],
+ colour: [t('Color'), t('Text and background color')],
+ link: [t('Link'), t('Link — ⌘K')],
+ clear: [t('Clear formatting'), t('Clear formatting')],
+ }
+ const keys: ItemKey[] = [...TOOLBAR_MARKS, 'colour', 'link', 'clear']
+ return keys.map((key) => {
+ const [label, hint] = labels[key] ?? ['', '']
+ const icon = key === 'link' ? ICONS.link : GLYPHS[key] ?? ICONS.code
+ return { tag: key, icon, label, hint }
+ })
+ }
+
+ private sheet(): boolean {
+ return matchMedia('(pointer: coarse)').matches
+ }
+
+ private build(): HTMLElement {
+ const bar = document.createElement('div')
+ bar.className = this.sheet() ? 'sp-fmt sp-fmt-dock' : 'sp-fmt'
+ // The kernel's save clones the live document; anything of ours in the body
+ // has to say it is not part of it.
+ bar.setAttribute('data-bento-transient', '')
+ bar.setAttribute('role', 'toolbar')
+ bar.setAttribute('aria-label', t('Text formatting'))
+ // mousedown INSIDE the bar must not move the caret out of the block
+ bar.addEventListener('mousedown', (e) => e.preventDefault())
+ this.buttons.clear()
+ for (const item of this.items()) {
+ const b = document.createElement('button')
+ b.type = 'button'
+ b.className = 'sp-fmt-btn'
+ b.innerHTML = item.icon
+ b.title = item.hint
+ b.setAttribute('aria-label', item.label)
+ b.addEventListener('click', (e) => { e.preventDefault(); this.run(item.tag) })
+ if (item.tag === 'link') b.classList.add('sp-fmt-gap')
+ this.buttons.set(item.tag, b)
+ bar.append(b)
+ }
+ return bar
+ }
+
+ private refresh(): void {
+ if (this.dragging || this.locked) return
+ const next = this.markable()
+ if (!next) { this.close(); return }
+ this.target = next
+ if (!this.bar) { this.bar = this.build(); document.body.append(this.bar) }
+ const html = this.app.store.block(next.id)?.html ?? ''
+ for (const [key, btn] of this.buttons) {
+ const on = key === 'link' ? !!linkAt(html, next.start, next.end)
+ // "coloured" means either role is set — the ink OR the band behind it
+ : key === 'colour' ? !!markActive(html, next.start, next.end, 'span')
+ : key !== 'clear' && markActive(html, next.start, next.end, key as MarkTag)
+ btn.classList.toggle('sp-fmt-on', on)
+ btn.setAttribute('aria-pressed', String(on))
+ }
+ if (!this.sheet()) this.place()
+ }
+
+ /**
+ * Above the selection, flipped below when the top of the window is in the
+ * way, and never off either edge.
+ *
+ * `getBoundingClientRect()` of a multi-line selection is the union of its
+ * lines, so anchoring to it would put the bar over the LAST line of a
+ * three-line selection. The FIRST client rect is the line the selection
+ * starts on, which is where a person is looking.
+ */
+ private place(): void {
+ const bar = this.bar!
+ const sel = getSelection()
+ if (!sel || sel.rangeCount === 0) return
+ const rects = sel.getRangeAt(0).getClientRects()
+ const r = rects.length ? rects[0] : sel.getRangeAt(0).getBoundingClientRect()
+ const w = bar.offsetWidth || 260
+ const h = bar.offsetHeight || 36
+ const GAP = 8
+ let top = r.top - h - GAP
+ if (top < GAP) top = Math.min(r.bottom + GAP, innerHeight - h - GAP)
+ let left = r.left + r.width / 2 - w / 2
+ left = Math.max(GAP, Math.min(left, innerWidth - w - GAP))
+ bar.style.left = `${Math.round(left)}px`
+ bar.style.top = `${Math.round(Math.max(GAP, top))}px`
+ }
+
+ close(): void {
+ this.locked = false
+ this.bar?.remove()
+ this.bar = null
+ this.target = null
+ this.buttons.clear()
+ }
+
+ // ---- the operations ------------------------------------------------------
+
+ private run(kind: ItemKey): void {
+ const tgt = this.target ?? this.markable()
+ if (!tgt) return
+ this.target = tgt
+ if (kind === 'link') { this.editLink(tgt); return }
+ if (kind === 'colour') { this.editColour(tgt); return }
+ const html = this.app.store.block(tgt.id)?.html ?? ''
+ this.write(tgt, kind === 'clear'
+ ? clearMarks(html, tgt.start, tgt.end)
+ : applyMark(html, tgt.start, tgt.end, kind))
+ }
+
+ /** ⌘B and friends, and the toolbar's own buttons, land here. */
+ toggle(tag: MarkTag): void {
+ const tgt = this.markable()
+ if (!tgt) return
+ this.target = tgt
+ const html = this.app.store.block(tgt.id)?.html ?? ''
+ this.write(tgt, applyMark(html, tgt.start, tgt.end, tag))
+ }
+
+ /** ⌘K on a selection. */
+ link(): boolean {
+ const tgt = this.markable()
+ if (!tgt) return false
+ this.target = tgt
+ if (!this.bar) { this.bar = this.build(); document.body.append(this.bar); this.refresh() }
+ this.editLink(tgt)
+ return true
+ }
+
+ /**
+ * The url field, drawn INSIDE the bar rather than as a second popover.
+ *
+ * A popover would be a second floating thing to position, to dismiss and to
+ * keep the selection alive under. The bar already holds the offsets, so the
+ * field can simply replace the buttons for as long as it is open and the
+ * selection can be rebuilt from numbers when it closes.
+ */
+ private editLink(tgt: MarkTarget): void {
+ const bar = this.bar
+ if (!bar) return
+ const html = this.app.store.block(tgt.id)?.html ?? ''
+ const current = linkAt(html, tgt.start, tgt.end)
+ const kids = [...bar.childNodes]
+ for (const k of kids) k.remove()
+ bar.classList.add('sp-fmt-linking')
+ this.locked = true
+
+ const input = document.createElement('input')
+ input.className = 'sp-fmt-url'
+ input.type = 'url'
+ input.value = current
+ input.placeholder = t('Paste or type a link')
+ input.setAttribute('aria-label', t('Link address'))
+ const restore = (): void => {
+ this.locked = false
+ bar.classList.remove('sp-fmt-linking')
+ for (const k of [...bar.childNodes]) k.remove()
+ bar.append(...kids)
+ this.select(tgt)
+ this.refresh()
+ }
+ const apply = (): void => {
+ const url = externalHref(input.value)
+ if (!url && input.value.trim()) { input.classList.add('sp-fmt-bad'); return }
+ this.write(tgt, url
+ ? applyMark(html, tgt.start, tgt.end, 'a', { op: 'on', attrs: linkAttrs(url) })
+ : applyMark(html, tgt.start, tgt.end, 'a', { op: 'off' }))
+ restore()
+ }
+ input.addEventListener('input', () => input.classList.remove('sp-fmt-bad'))
+ input.addEventListener('keydown', (e) => {
+ e.stopPropagation()
+ if (e.key === 'Enter') { e.preventDefault(); apply() }
+ if (e.key === 'Escape') { e.preventDefault(); restore() }
+ })
+ const go = document.createElement('button')
+ go.type = 'button'
+ go.className = 'sp-fmt-btn sp-fmt-go'
+ go.textContent = t('Apply')
+ go.addEventListener('mousedown', (e) => e.preventDefault())
+ go.addEventListener('click', apply)
+ bar.append(input, go)
+ if (current) {
+ const off = document.createElement('button')
+ off.type = 'button'
+ off.className = 'sp-fmt-btn'
+ off.textContent = t('Remove')
+ off.addEventListener('mousedown', (e) => e.preventDefault())
+ off.addEventListener('click', () => { input.value = ''; apply() })
+ bar.append(off)
+ }
+ if (!this.sheet()) this.place()
+ input.focus()
+ input.select()
+ }
+
+ /**
+ * The colour palette, in the bar, in the same swap-in slot as the url field.
+ *
+ * TWO ROWS OF THE SAME NINE COLOURS plus a Default — the ink and the band
+ * behind it. One palette in two roles rather than two palettes: "Red" is
+ * named once and the ROLE is named once, which is nine UI strings and two
+ * headings instead of eighteen, and it is also how a person thinks about it.
+ *
+ * A PALETTE AND NOT A COLOUR PICKER. An arbitrary hex would have to be stored
+ * as a `style` attribute (making the sanitizer a CSS parser), it could not
+ * adapt to the surface it is drawn on, and it would let an author pick a
+ * colour their own document cannot read. See marks.ts PALETTE.
+ */
+ private editColour(tgt: MarkTarget): void {
+ const bar = this.bar
+ if (!bar) return
+ const html = this.app.store.block(tgt.id)?.html ?? ''
+ const kids = [...bar.childNodes]
+ for (const k of kids) k.remove()
+ bar.classList.add('sp-fmt-pal')
+ this.locked = true
+ const restore = (): void => {
+ this.locked = false
+ bar.classList.remove('sp-fmt-pal')
+ for (const k of [...bar.childNodes]) k.remove()
+ bar.append(...kids)
+ this.select(tgt)
+ this.refresh()
+ }
+ const names: Record<string, string> = {
+ '': t('Default'), gray: t('Gray'), brown: t('Brown'), orange: t('Orange'),
+ yellow: t('Yellow'), green: t('Green'), blue: t('Blue'), purple: t('Purple'),
+ pink: t('Pink'), red: t('Red'),
+ }
+ const row = (role: 'fg' | 'bg', heading: string, tag: MarkTag): void => {
+ const h = document.createElement('div')
+ h.className = 'sp-fmt-pal-h'
+ h.textContent = heading
+ const strip = document.createElement('div')
+ strip.className = 'sp-fmt-sw-row'
+ for (const name of ['', ...PALETTE]) {
+ const sw = document.createElement('button')
+ sw.type = 'button'
+ sw.className = `sp-fmt-sw sp-${role}-${name || 'default'}`
+ sw.textContent = 'A'
+ const label = `${heading} · ${names[name]}`
+ sw.title = label
+ sw.setAttribute('aria-label', label)
+ sw.addEventListener('mousedown', (e) => e.preventDefault())
+ sw.addEventListener('click', () => {
+ // "Default" is REMOVAL, not a colour named default: a paragraph
+ // nobody coloured and one coloured back to default must be the same
+ // bytes, or every diff carries the ghost of an undone decision.
+ this.write(tgt, applyMark(html, tgt.start, tgt.end, tag,
+ name ? { op: 'on', attrs: colourAttrs(role, name) } : { op: 'off' }))
+ restore()
+ })
+ strip.append(sw)
+ }
+ bar.append(h, strip)
+ }
+ row('fg', t('Text'), 'span')
+ row('bg', t('Background'), 'mark')
+ const back = document.createElement('button')
+ back.type = 'button'
+ back.className = 'sp-fmt-btn sp-fmt-back'
+ back.textContent = t('Back')
+ back.addEventListener('mousedown', (e) => e.preventDefault())
+ back.addEventListener('click', restore)
+ bar.append(back)
+ if (!this.sheet()) this.place()
+ }
+
+ /**
+ * Commit one mark change.
+ *
+ * A COMMIT, NOT A `runEdit` — this closes the typing run, deliberately.
+ *
+ * A typing run takes ONE checkpoint, at its first keystroke, and everything
+ * after that mutates in place (store.ts). Fold a mark toggle into the open
+ * run and the run's single checkpoint is the state BEFORE the sentence was
+ * typed, so the ⌘Z that was meant to take back the bold takes back the
+ * sentence as well. It is also not a keystroke by any other measure: it is a
+ * discrete, deliberate, undoable act, it rewrites tags across a span rather
+ * than inserting a character, and it is the one text edit that can safely be
+ * canonicalised immediately, because the caret is restored from stored
+ * offsets rather than left where the DOM put it. `scope: 'page'` because it
+ * touches exactly one block of the page in view, and `structure: false`
+ * because the page TREE has not changed and a sidebar repaint would be
+ * wasted work on every button press.
+ */
+ private write(tgt: MarkTarget, next: string): void {
+ const s = this.app.store
+ const b = s.block(tgt.id)
+ if (!b || next === b.html) return
+ s.commit(() => { b.html = next }, { structure: false, scope: 'page' })
+ tgt.host.innerHTML = next
+ this.select(tgt)
+ this.refresh()
+ }
+
+ /** Rebuild the selection from the stored offsets after an innerHTML write. */
+ private select(tgt: MarkTarget): void {
+ tgt.host.focus()
+ const sel = getSelection()
+ if (!sel) return
+ sel.removeAllRanges()
+ sel.addRange(rangeAt(tgt.host, tgt.start, tgt.end))
+ }
+}
diff --git a/spaces/src/i18n/de.ts b/spaces/src/i18n/de.ts
index 016609f7..cb13256a 100644
--- a/spaces/src/i18n/de.ts
+++ b/spaces/src/i18n/de.ts
@@ -13,73 +13,149 @@ import type { Catalog } from '../i18n'
export const de: Catalog = {
"A filter here is newer than this build and was not applied.": "Ein Filter dieser Ansicht ist neuer als diese Version und wurde nicht angewendet.",
"A folder of .md files becomes pages, with the folder tree and the [[wikilinks]] intact.": "Ein Ordner voller .md-Dateien wird zu Seiten — samt Ordnerbaum und den [[Wikilinks]] dazwischen.",
+ "A link with nothing in it yet": "Ein Link, in dem noch nichts steht",
"A list of every page, in order": "Eine Liste aller Seiten, der Reihe nach",
+ "A live viewer: follows every edit as it happens but can never change this space — the relay enforces it.": "Ein Live-Viewer: folgt jeder Änderung, kann diesen Space aber nie verändern — vom Relay erzwungen.",
"A page cannot contain itself": "Eine Seite kann sich nicht selbst enthalten",
"A password encrypts the document inside the file. There is no recovery — lose it and the space is gone.": "Ein Passwort verschlüsselt das Dokument in der Datei. Es gibt keine Wiederherstellung — verlierst du es, ist der Space weg.",
"A second file — the original is left alone": "Eine zweite Datei — das Original bleibt unberührt",
"A sort here is newer than this build and was not applied.": "Eine Sortierung dieser Ansicht ist neuer als diese Version und wurde nicht angewendet.",
"A space is never a dead end: the whole document is plain JSON in this file, and every page exports as Markdown.": "Ein Space ist nie eine Sackgasse: Das ganze Dokument ist reines JSON in dieser Datei, und jede Seite lässt sich als Markdown exportieren.",
"A space needs at least one page": "Ein Space braucht mindestens eine Seite",
+ "A still frame, shown before play — and what a printout or a file preview shows": "Ein Standbild, das vor dem Abspielen zu sehen ist — und das, was im Ausdruck und in der Dateivorschau erscheint",
"About bento/spaces — version, updates, language, password": "Über bento/spaces — Version, Updates, Sprache, Passwort",
"About this space": "Über diesen Space",
+ "Access reset — only copies saved from now on can join": "Zugriff zurückgesetzt — nur ab jetzt gespeicherte Kopien können beitreten",
"Add a block below": "Block darunter hinzufügen",
+ "Add a column after": "Spalte danach einfügen",
+ "Add a link": "Link hinzufügen",
+ "Add a picture": "Bild hinzufügen",
+ "Add a row below": "Zeile darunter einfügen",
"Add below": "Darunter einfügen",
+ "Add pages under": "Seiten einfügen unter",
+ "Address of a video or audio file": "Adresse einer Video- oder Audiodatei",
"Adds status, priority, assignee, estimate": "Fügt Status, Priorität, Bearbeiter:in und Schätzung hinzu",
+ "All text. Nothing is embedded, so this file is as small as a space gets.": "Nur Text. Nichts ist eingebettet, also ist diese Datei so klein, wie ein Space nur sein kann.",
"Already an issue": "Ist bereits ein Issue",
"Also open in another window on this computer — not shared online": "Auch in einem anderen Fenster auf diesem Computer geöffnet — nicht online geteilt",
+ "Alt text": "Alternativtext",
+ "An update check is the only network this app makes on its own. It asks the release server for a signed manifest and sends nothing about you or this document — no ids, no telemetry.": "Die Update-Prüfung ist die einzige Netzverbindung, die diese App von sich aus herstellt. Sie holt vom Release-Server ein signiertes Manifest und sendet nichts über Sie oder dieses Dokument — keine Kennungen, keine Telemetrie.",
+ "Another bento/spaces file arrives as pages under the one you choose — its images come too, and the links inside it keep working.": "Eine andere bento/spaces-Datei kommt als Seiten unter der von Ihnen gewählten Seite an — ihre Bilder kommen mit, und die Links darin funktionieren weiter.",
+ "Another bento/spaces file can arrive the same way, nested under any page.": "Eine andere bento/spaces-Datei kann auf dieselbe Weise ankommen, verschachtelt unter jeder beliebigen Seite.",
+ "Appearance": "Darstellung",
+ "Apply": "Anwenden",
"Archive": "Archivieren",
+ "Archived": "Archiviert",
"Archived ({n})": "Archiviert ({n})",
"Ascending": "Aufsteigend",
+ "Audio": "Audio",
+ "Audio from {host}": "Audio von {host}",
+ "Back": "Zurück",
+ "Background": "Hintergrund",
+ "Block": "Block",
"Block options": "Block-Optionen",
+ "Blocks": "Blöcke",
+ "Blue": "Blau",
"Board": "Board",
+ "Bold": "Fett",
+ "Bold — ⌘B": "Fett — ⌘B",
"Breadcrumb": "Pfadnavigation",
"Bring notes in": "Notizen hereinholen",
+ "Brown": "Braun",
"Callout icon": "Symbol des Hinweisfelds",
+ "Cancel": "Abbrechen",
+ "Careful": "Vorsicht",
"Caution": "Achtung",
+ "Change password…": "Passwort ändern…",
"Change the kind of callout": "Art des Hinweisfelds ändern",
+ "Change the name used for your new comments and replies": "Namen für neue Kommentare und Antworten ändern",
"Change this block’s type": "Den Typ dieses Blocks ändern",
"Change this page's icon": "Symbol dieser Seite ändern",
"Change {field}": "{field} ändern",
"Check for updates": "Nach Updates suchen",
+ "Check for updates automatically at launch": "Beim Start automatisch nach Updates suchen",
+ "Checked automatically at launch — you're on the latest version (v{v}).": "Beim Start automatisch geprüft — Sie haben die neueste Version (v{v}).",
"Checking is manual and verified: the download is signed, and its signature is checked against a key inside this file before anything is rewritten.": "Die Prüfung ist manuell und verifiziert: Der Download ist signiert, und seine Signatur wird gegen einen Schlüssel in dieser Datei geprüft, bevor irgendetwas überschrieben wird.",
"Checking…": "Prüfe…",
"Choose .md files…": ".md-Dateien wählen…",
+ "Choose a different file": "Eine andere Datei wählen",
+ "Choose a file…": "Datei wählen…",
"Choose a folder…": "Ordner wählen…",
"Choose a password. There is no way to recover it.": "Wähle ein Passwort. Es lässt sich nicht wiederherstellen.",
+ "Choose a space…": "Space auswählen…",
"Choose the field the columns come from": "Feld wählen, aus dem die Spalten kommen",
"Choose the order": "Reihenfolge wählen",
"Clear filter": "Filter zurücksetzen",
+ "Clear formatting": "Formatierung entfernen",
+ "Clip added ({size})": "Clip hinzugefügt ({size})",
"Close": "Schließen",
+ "Code": "Code",
"Collapsed toggles always print open. Your browser's print dialog has the \"Save as PDF\" option.": "Zugeklappte Toggle-Blöcke werden immer offen gedruckt. Im Druckdialog deines Browsers gibt es die Option „Als PDF speichern“.",
+ "Color": "Farbe",
"Column": "Spalte",
+ "Columns": "Spalten",
"Comfortable for reading": "Angenehm zu lesen",
+ "Comment": "Kommentar",
+ "Comment on this page": "Diese Seite kommentieren",
+ "Comment · block": "Kommentar · Block",
+ "Comment · page": "Kommentar · Seite",
+ "Comment:": "Kommentar:",
+ "Connect to the live session without saving a new copy — copies you sent earlier will meet you there.": "Mit der Live-Sitzung verbinden, ohne eine neue Kopie zu speichern — bereits gesendete Kopien treffen dich hier.",
+ "Connecting…": "Verbinden…",
"Contents": "Inhalt",
"Contents page": "Inhaltsverzeichnis",
+ "Controls": "Steuerelemente",
+ "Copied ✓": "Kopiert ✓",
"Copy document JSON": "Dokument-JSON kopieren",
"Copy saved": "Kopie gespeichert",
"Copy saved — you are still editing the original": "Kopie gespeichert — du bearbeitest weiterhin das Original",
"Copy the document JSON": "Dokument-JSON kopieren",
"Could not reach the update channel.": "Der Update-Kanal war nicht erreichbar.",
"Could not verify an update, so nothing was changed.": "Ein Update ließ sich nicht verifizieren, daher wurde nichts geändert.",
+ "Couldn’t access the clipboard": "Zugriff auf die Zwischenablage nicht möglich",
+ "Couldn’t reach the live session": "Live-Sitzung nicht erreichbar",
"Create “{name}”": "„{name}“ erstellen",
+ "Dark": "Dunkel",
+ "Default": "Standard",
"Delete": "Löschen",
"Delete “{name}”?": "„{name}“ löschen?",
"Delete…": "Löschen…",
"Descending": "Absteigend",
+ "Description": "Beschreibung",
"Discard": "Verwerfen",
+ "Document": "Dokument",
+ "Document JSON copied": "Dokument-JSON kopiert",
+ "Document id": "Dokument-ID",
+ "Document properties": "Dokumenteigenschaften",
+ "Document replaced — ⌘Z undoes": "Dokument ersetzt — ⌘Z macht rückgängig",
+ "Download updated copy": "Aktualisierte Kopie herunterladen",
+ "Downloaded ✓": "Heruntergeladen ✓",
"Downloaded. Open the new file — this one is unchanged.": "Heruntergeladen. Öffne die neue Datei — diese hier bleibt unverändert.",
+ "Downloads a backup of the current version, then rewrites this file on disk as the new version — document untouched.": "Lädt ein Backup der aktuellen Version herunter und schreibt diese Datei dann als neue Version — das Dokument bleibt unverändert.",
"Drag to move, click for block options": "Ziehen zum Verschieben, klicken für Block-Optionen",
+ "Drag to resize this column": "Ziehen, um die Spaltenbreite zu ändern",
"Drag to resize · double-click to reset": "Ziehen zum Anpassen · Doppelklick setzt zurück",
"Drop .md files or a folder here": ".md-Dateien oder einen Ordner hierher ziehen",
"Duplicate": "Duplizieren",
+ "Duplicate as a new space…": "Als neuen Space duplizieren…",
"Each .md file becomes a page, folders become the page tree, and [[wikilinks]] become real links. Pages are added — nothing here is replaced.": "Jede .md-Datei wird eine Seite, Ordner werden zum Seitenbaum, [[Wikilinks]] werden echte Links. Seiten kommen hinzu — nichts hier wird ersetzt.",
+ "Edit": "Bearbeiten",
+ "Edit this link card": "Diese Link-Karte bearbeiten",
"Edited": "Bearbeitet",
"Editing": "Bearbeiten",
+ "Editor": "Bearbeiter",
+ "Editor copy saved — recipients join live with edit access": "Bearbeiter-Kopie gespeichert — Empfänger treten live mit Schreibzugriff bei",
"Encrypt the document inside this file": "Das Dokument in dieser Datei verschlüsseln",
"Enter the password to open it.": "Gib das Passwort ein, um ihn zu öffnen.",
+ "Every page opens wide on this screen from now on": "Auf diesem Bildschirm öffnen ab jetzt alle Seiten breit",
"Every page, as one .md file": "Jede Seite, in einer .md-Datei",
+ "Everything in this space is replaced by what you paste. ⌘Z undoes it, but only while this window stays open.": "Alles in diesem Space wird durch das ersetzt, was Sie einfügen. ⌘Z macht das rückgängig, aber nur solange dieses Fenster geöffnet bleibt.",
+ "Export": "Exportieren",
+ "Export a page as a space": "Eine Seite als Space exportieren",
"Export as Markdown": "Als Markdown exportieren",
"Export as Markdown…": "Als Markdown exportieren…",
+ "Export page as a space…": "Seite als Space exportieren…",
+ "Exported {n} page(s) as a new space": "{n} Seite(n) als neuen Space exportiert",
"File": "Datei",
"Fills the window": "Füllt das Fenster",
"Filter": "Filtern",
@@ -87,10 +163,17 @@ export const de: Catalog = {
"Find": "Suchen",
"Find in this space…": "In diesem Space suchen…",
"Find or create a page…": "Seite finden oder erstellen…",
+ "Following — view only": "Folgt mit — nur Ansicht",
"Full width": "Volle Breite",
+ "Gray": "Grau",
+ "Green": "Grün",
"Group": "Gruppieren",
"Guest": "Gast",
+ "Header row": "Kopfzeile",
+ "Hide properties (])": "Eigenschaften ausblenden (])",
"Hide the page list ([)": "Seitenliste ausblenden ([)",
+ "Highlight": "Hervorhebung",
+ "Highlight — ⇧⌘H": "Hervorhebung — ⇧⌘H",
"Icon": "Symbol",
"Image added ({size})": "Bild hinzugefügt ({size})",
"Image added, resized to fit ({from} → {to})": "Bild hinzugefügt, passend verkleinert ({from} → {to})",
@@ -101,35 +184,60 @@ export const de: Catalog = {
"Import Markdown…": "Markdown importieren…",
"Important": "Wichtig",
"Imported": "Importiert",
+ "Imported a space": "Space importiert",
"Imported notes": "Importierte Notizen",
"Include archived pages": "Archivierte Seiten einbeziehen",
"Include the image files and they are embedded too. An image this browser cannot open is kept as its path rather than as a broken picture.": "Nimm die Bilddateien mit, dann werden sie gleich eingebettet. Ein Bild, das dieser Browser nicht öffnen kann, bleibt als Pfad stehen statt als kaputtes Bild.",
+ "Include the pages nested under it": "Die darunter verschachtelten Seiten einschließen",
+ "Inline code — ⌘E": "Inline-Code — ⌘E",
"Insert": "Einfügen",
"Insert a block — text, headings, lists, code, images": "Block einfügen — Text, Überschriften, Listen, Code, Bilder",
"Interface language": "Sprache der Oberfläche",
+ "Interface theme": "Design der Oberfläche",
"Invite someone…": "Jemanden einladen…",
+ "Invite to edit…": "Zum Bearbeiten einladen…",
"Issues": "Issues",
+ "Italic": "Kursiv",
+ "Italic — ⌘I": "Kursiv — ⌘I",
+ "Journal date": "Journaldatum",
+ "Key-verified identity": "Schlüssel-verifizierte Identität",
"Language": "Sprache",
"Language follows whoever opens the file. It is never written into the document.": "Die Sprache richtet sich danach, wer die Datei öffnet. Sie wird nie ins Dokument geschrieben.",
"Language — what this block is highlighted as": "Sprache — wie dieser Block hervorgehoben wird",
+ "Last saved": "Zuletzt gespeichert",
+ "Launch check couldn't reach the release server ({m}). Check manually below.": "Startprüfung konnte den Release-Server nicht erreichen ({m}). Unten manuell prüfen.",
"Leave it empty to use the tone mark": "Leer lassen, um das Symbol der Art zu verwenden",
+ "Light": "Hell",
+ "Link": "Link",
+ "Link address": "Linkadresse",
+ "Link card": "Link-Karte",
"Link to page": "Seite verlinken",
+ "Link — ⌘K": "Link — ⌘K",
+ "Linked": "Verknüpft",
"Linked from": "Verlinkt von",
"Links to it become dead": "Links darauf laufen ins Leere",
"List": "Liste",
+ "Live": "Live",
"Live — nobody else is here yet": "Live — noch niemand sonst da",
"Live — send someone the file to bring them in": "Live — schick jemandem die Datei, dann ist er dabei",
"Live — {n} other people are here": "Live — {n} weitere Personen sind da",
+ "Load this audio": "Dieses Audio laden",
"Load this image": "Dieses Bild laden",
+ "Load this video": "Dieses Video laden",
+ "Loop": "Schleife",
"Make this page an issue": "Diese Seite zu einem Issue machen",
"Manual order": "Manuelle Reihenfolge",
+ "Match my system": "Systemeinstellung folgen",
+ "Mints brand-new keys. Every previously sent copy stops syncing for good; share fresh copies afterwards.": "Erzeugt brandneue Schlüssel. Jede bereits gesendete Kopie synchronisiert endgültig nicht mehr; teile danach frische Kopien.",
"More": "Mehr",
"Move down": "Nach unten",
"Move up": "Nach oben",
+ "Muted": "Stumm",
"New issue": "Neues Issue",
"New page": "Neue Seite",
"New page (⌘⌥N)": "Neue Seite (⌘⌥N)",
"New page inside": "Neue Unterseite",
+ "New to Bento? Find templates, the gallery and the AI editing guide at {home} — or ⭐ it on {gh}.": "Neu bei Bento? Vorlagen, die Galerie und den KI-Bearbeitungsleitfaden findest du auf {home} — oder gib ⭐ auf {gh}.",
"Next (⏎)": "Weiter (⏎)",
"No Markdown files in that selection": "Keine Markdown-Dateien in dieser Auswahl",
"No block matches": "Kein Block passt",
@@ -138,51 +246,104 @@ export const de: Catalog = {
"No issues yet. Add a status field to any page and it appears here.": "Noch keine Issues. Gib einer Seite ein Status-Feld, dann erscheint sie hier.",
"No pages yet": "Noch keine Seiten",
"Nobody else is here yet": "Noch niemand sonst da",
+ "Not in this file: it needs the network, and the site is told when someone opens the page": "Nicht in dieser Datei: das Abspielen braucht das Netz, und die Website erfährt, dass jemand diese Seite geöffnet hat",
+ "Not live — turns on when you share": "Nicht live — startet beim Teilen",
"Not loaded — opening it would tell that site you opened this space.": "Nicht geladen — beim Laden erfährt diese Website, dass du diesen Space geöffnet hast.",
"Not sharing yet — click to start a live session": "Noch nicht geteilt — zum Starten einer Live-Sitzung klicken",
"Note": "Hinweis",
"Nothing found": "Nichts gefunden",
+ "Nothing is fetched. A card shows what you type here — opening this space never contacts the site.": "Es wird nichts abgerufen. Die Karte zeigt, was Sie hier eintragen — das Öffnen dieses Space kontaktiert die Website nie.",
"Nothing leaves this file until you start a session.": "Nichts verlässt diese Datei, bis du eine Sitzung startest.",
"Now an issue": "Jetzt ein Issue",
"Off by default — they were archived for a reason": "Standardmäßig aus — sie wurden aus einem Grund archiviert",
+ "Offline mode is on — nothing leaves this computer.": "Der Offline-Modus ist aktiv — nichts verlässt diesen Computer.",
+ "On this screen only — it is not saved in the file": "Nur auf diesem Bildschirm — es wird nicht in der Datei gespeichert",
+ "One emoji": "Ein Emoji",
+ "One fewer": "Eins weniger",
+ "One line about what is there": "Eine Zeile darüber, was dort zu finden ist",
+ "One more": "Eins mehr",
+ "One page and what is under it, as its own file": "Eine Seite und alles darunter, als eigene Datei",
+ "Only pages that ask for it": "Nur Seiten, die es verlangen",
+ "Only the owner of this space can invite people": "Nur der Eigentümer dieses Space kann Personen einladen",
"Open only": "Nur offene",
+ "Orange": "Orange",
"Other": "Sonstige",
"Other ways to save": "Weitere Speicheroptionen",
"Out of the sidebar, still searchable and linkable": "Weg aus der Seitenleiste, weiterhin auffindbar und verlinkbar",
+ "Owner": "Eigentümer",
+ "Page": "Seite",
"Page options": "Seiten-Optionen",
"Pages": "Seiten",
+ "Pages open at their normal width again": "Seiten öffnen wieder in normaler Breite",
"Pages — show or hide the page list": "Seiten — Seitenliste ein- oder ausblenden",
"Password": "Passwort",
"Password removed. Save to write the space unencrypted.": "Passwort entfernt. Speichere, um den Space unverschlüsselt zu schreiben.",
"Password set. Save to write the space encrypted.": "Passwort gesetzt. Speichere, um den Space verschlüsselt zu schreiben.",
"Password…": "Passwort…",
+ "Paste document JSON here…": "Dokument-JSON hier einfügen…",
+ "Paste or type a link": "Link einfügen oder eingeben",
"People in this space": "Personen in diesem Space",
+ "Picture": "Bild",
+ "Picture…": "Bild…",
+ "Pink": "Rosa",
"Plain text": "Nur Text",
+ "Poster": "Poster",
+ "Poster…": "Poster…",
"Previous (⇧⏎)": "Zurück (⇧⏎)",
"Print": "Drucken",
"Print / PDF…": "Drucken / PDF…",
"Print or save as PDF": "Drucken oder als PDF speichern",
"Print or save as PDF (⌘P)": "Drucken oder als PDF speichern (⌘P)",
"Print…": "Drucken…",
+ "Properties": "Eigenschaften",
+ "Properties — show or hide this block’s settings": "Eigenschaften — Einstellungen dieses Blocks ein- oder ausblenden",
+ "Purple": "Lila",
+ "Put the caret in a block to see what it can be.": "Setz den Cursor in einen Block, um zu sehen, was sich daran ändern lässt.",
+ "Read the release notes for v{v} (opens in a new tab)": "Versionshinweise für v{v} lesen (öffnet einen neuen Tab)",
+ "Read-only copy saved — it follows the live session, view only": "Nur-Lese-Kopie gespeichert — sie folgt der Live-Sitzung, nur zum Ansehen",
+ "Reading file…": "Lese Datei…",
"Reading image…": "Lese Bild…",
"Reading view": "Leseansicht",
"Reading view — press Esc or the eye to edit": "Leseansicht — Esc oder das Auge zum Bearbeiten",
"Reading view — the pages without the editing tools": "Leseansicht — die Seiten ohne Bearbeitungswerkzeuge",
"Reading {n} file(s)…": "Lese {n} Datei(en)…",
+ "Red": "Rot",
"Redo": "Wiederholen",
"Redo (⇧⌘Z)": "Wiederholen (⇧⌘Z)",
+ "Reload into new version": "Neu laden in die neue Version",
+ "Remove": "Entfernen",
"Remove password…": "Passwort entfernen…",
+ "Remove the password": "Passwort entfernen",
+ "Remove the password?": "Passwort entfernen?",
"Remove the password? The next save writes the document in the clear.": "Das Passwort entfernen? Beim nächsten Speichern wird das Dokument im Klartext geschrieben.",
+ "Remove the picture": "Bild entfernen",
+ "Remove this column": "Diese Spalte entfernen",
+ "Remove this row": "Diese Zeile entfernen",
+ "Remove {name} from this space? Their copy drops to read-only.": "{name} aus diesem Space entfernen? Die Kopie wird schreibgeschützt.",
+ "Remove {name} — revokes this device’s access; everyone else is unaffected": "{name} entfernen — widerruft den Zugriff dieses Geräts; alle anderen bleiben unberührt",
"Rename": "Umbenennen",
+ "Reopen": "Wieder öffnen",
+ "Repeat when it reaches the end": "Am Ende von vorn beginnen",
+ "Replace": "Ersetzen",
"Replace all": "Alle ersetzen",
+ "Replace every page from pasted JSON?": "Alle Seiten durch das eingefügte JSON ersetzen?",
+ "Replace from JSON…": "Aus JSON ersetzen…",
+ "Replace picture": "Bild ersetzen",
"Replace with": "Ersetzen durch",
"Replace with…": "Ersetzen durch…",
"Replace {n} occurrence(s) across the whole space?": "{n} Vorkommen im ganzen Space ersetzen?",
"Replaced": "Ersetzt",
+ "Replace…": "Ersetzen…",
+ "Reply": "Antworten",
+ "Reply…": "Antworten…",
+ "Reset access? Every copy you’ve sent stops syncing; only copies saved after this can join.": "Zugriff zurücksetzen? Alle gesendeten Kopien synchronisieren nicht mehr; nur danach gespeicherte können beitreten.",
+ "Reset access…": "Zugriff zurücksetzen…",
"Resized": "Verkleinert",
+ "Resolve": "Erledigen",
"Restore": "Wiederherstellen",
"Restore to the page list": "Zurück in die Seitenliste",
"Room for a board or a table": "Platz für ein Board oder eine Tabelle",
+ "Rows": "Zeilen",
"Save": "Speichern",
"Save (⌘S)": "Speichern (⌘S)",
"Save a copy…": "Kopie speichern…",
@@ -190,6 +351,7 @@ export const de: Catalog = {
"Saved": "Gespeichert",
"Saved a new copy": "Neue Kopie gespeichert",
"Saves a copy that joins this session": "Speichert eine Kopie, die dieser Sitzung beitritt",
+ "Saves a copy to send. Whoever opens it edits this space live with you (end-to-end encrypted); you stay the owner and can remove them from the People list.": "Speichert eine Kopie zum Versenden. Wer sie öffnet, bearbeitet diesen Space live mit dir (Ende-zu-Ende-verschlüsselt); du bleibst Eigentümer und kannst sie aus der Personenliste entfernen.",
"Saving…": "Speichere…",
"Search": "Suche",
"Search all pages (⌘K)": "Alle Seiten durchsuchen (⌘K)",
@@ -199,32 +361,58 @@ export const de: Catalog = {
"Share this space": "Diesen Space teilen",
"Show as a board": "Als Board anzeigen",
"Show as a list": "Als Liste anzeigen",
+ "Show playback controls to the reader": "Wiedergabesteuerung für Lesende anzeigen",
+ "Show properties (])": "Eigenschaften einblenden (])",
"Show the page list ([)": "Seitenliste einblenden ([)",
+ "Shown next to your cursor and in the People list — stored only in this browser.": "Erscheint neben deinem Cursor und in der Personenliste — nur in diesem Browser gespeichert.",
+ "Site name": "Name der Website",
"Sort": "Sortieren",
"Space name": "Space-Name",
"Start live session": "Live-Sitzung starten",
+ "Start silent": "Ohne Ton starten",
"Stop sharing": "Freigabe beenden",
+ "Stop widening every page": "Nicht mehr alle Seiten verbreitern",
"Stopped sharing": "Teilen beendet",
+ "Strikethrough": "Durchgestrichen",
+ "Strikethrough — ⇧⌘S": "Durchgestrichen — ⇧⌘S",
"Take it elsewhere": "Woanders weitermachen",
+ "Taken from the address if blank": "Bleibt das Feld leer, wird er aus der Adresse übernommen",
+ "Text": "Text",
+ "Text and background color": "Text- und Hintergrundfarbe",
+ "Text formatting": "Textformatierung",
"That change is too large to share live (about 1 MB max). It’s saved in your copy, but collaborators won’t see it.": "Diese Änderung ist zu groß für die Live-Freigabe (max. etwa 1 MB). Sie ist in deiner Kopie gespeichert, aber Mitarbeitende sehen sie nicht.",
+ "That file could not be read": "Diese Datei konnte nicht gelesen werden",
"That file could not be read as an image": "Diese Datei konnte nicht als Bild gelesen werden",
+ "That file is not a bento/spaces document": "Diese Datei ist kein bento/spaces-Dokument",
"That image is too large to share live (about 1 MB max). It’s saved in your copy, but collaborators won’t see it.": "Dieses Bild ist zu groß für die Live-Freigabe (max. etwa 1 MB). Es ist in deiner Kopie gespeichert, aber Mitarbeitende sehen es nicht.",
+ "That is not a bento/spaces document": "Das ist kein bento/spaces-Dokument",
"That is {n} files — importing them all may take a moment. Continue?": "Das sind {n} Dateien — der Import kann einen Moment dauern. Fortfahren?",
+ "That needs to be an http or https address": "Das muss eine http- oder https-Adresse sein",
+ "That space is password-protected. Open it, then export the pages you want.": "Dieser Space ist passwortgeschützt. Öffnen Sie ihn und exportieren Sie dort die gewünschten Seiten.",
+ "The counterpart of Copy document JSON: edit a space in another tool, then bring it back.": "Das Gegenstück zu „Dokument-JSON kopieren“: Bearbeiten Sie einen Space in einem anderen Werkzeug und bringen Sie ihn zurück.",
"The day after": "Der Tag danach",
"The day before": "Der Tag davor",
"The document block is not shaped like a space — {detail}.": "Der Dokumentblock ist nicht wie ein Space aufgebaut — {detail}.",
"The document block is not valid JSON — {detail}.": "Der Dokumentblock ist kein gültiges JSON — {detail}.",
+ "The document, the editor and the search are all in this one file. Opening it needs nothing else — no server, no account, no install.": "Das Dokument, der Editor und die Suche stecken alle in dieser einen Datei. Zum Öffnen braucht es sonst nichts — keinen Server, kein Konto, keine Installation.",
"The images in these notes come to {size} so far, and they all travel inside the file. Keep embedding them?": "Die Bilder in diesen Notizen ergeben bisher {size}, und sie reisen alle in der Datei mit. Weiter einbetten?",
"The live session couldn’t store that change. It’s saved in your copy, but collaborators won’t see it.": "Die Live-Sitzung konnte diese Änderung nicht speichern. Sie ist in deiner Kopie gespeichert, aber Mitarbeitende sehen sie nicht.",
+ "The next save writes this space as plain, readable JSON — anybody who opens the file can read every page.": "Beim nächsten Speichern wird dieser Space als lesbares JSON geschrieben — wer die Datei öffnet, kann jede Seite lesen.",
+ "The page becomes a new file of its own: a whole space, with a new document id and none of this one’s sharing keys.": "Die Seite wird zu einer eigenen Datei: ein vollständiger Space mit einer neuen Dokument-ID und ohne die Freigabeschlüssel dieses Space.",
"The pages without the editing tools": "Die Seiten ohne die Bearbeitungswerkzeuge",
"The rest name notes that were not in the selection, and are left as text.": "Der Rest nennt Notizen, die nicht in der Auswahl waren, und bleibt als Text stehen.",
+ "The theme follows whoever opens the file. It is never written into the document.": "Das Design richtet sich danach, wer die Datei öffnet. Es wird nie ins Dokument geschrieben.",
"The whole space": "Der ganze Space",
"The whole space, or just this page": "Der ganze Space oder nur diese Seite",
"Then send someone the file": "Schick die Datei danach jemandem",
"These windows are on this computer. Start a session to work with someone elsewhere.": "Diese Fenster sind auf diesem Computer. Starte eine Sitzung, um mit jemand anderem zu arbeiten.",
+ "This block has no settings of its own — its content is all of it.": "Dieser Block hat keine eigenen Einstellungen — sein Inhalt ist alles.",
+ "This block’s settings, and the page’s": "Die Einstellungen dieses Blocks — und die der Seite",
"This browser cannot write back to the file, so every save makes a new copy. Chrome and Edge on a computer can save in place.": "Dieser Browser kann nicht in die Datei zurückschreiben, deshalb entsteht bei jedem Speichern eine neue Kopie. Chrome und Edge auf dem Computer können direkt speichern.",
+ "This clip is {size} and travels inside the file, making it that much bigger for everyone you send it to. Embed it anyway?": "Dieser Clip ist {size} groß und reist in der Datei mit — die Datei wird für jeden, dem du sie schickst, entsprechend größer. Trotzdem einbetten?",
"This copy goes offline; the others carry on": "Diese Kopie geht offline; die anderen machen weiter",
"This file": "Diese Datei",
+ "This file carries its own app — it works offline, forever, as is.": "Diese Datei trägt ihre eigene App — sie funktioniert offline, für immer, so wie sie ist.",
"This file could not be opened": "Diese Datei konnte nicht geöffnet werden",
"This file declares rules this build does not know. It is open read-only so nothing is lost.": "Diese Datei nennt Regeln, die dieser Build nicht kennt. Sie ist schreibgeschützt geöffnet, damit nichts verloren geht.",
"This file is open read-only": "Diese Datei ist schreibgeschützt geöffnet",
@@ -232,19 +420,30 @@ export const de: Catalog = {
"This image is {size} and travels inside the file, making it that much bigger for everyone you send it to. Embed it anyway?": "Dieses Bild ist {size} groß und reist in der Datei mit — die Datei wird für jeden, dem du sie schickst, entsprechend größer. Trotzdem einbetten?",
"This image was resized to keep the file small. Click to replace it with the original.": "Dieses Bild wurde verkleinert, damit die Datei klein bleibt. Klicken, um es durch das Original zu ersetzen.",
"This is a reading copy. It opens for reading; nothing you do here changes the file.": "Dies ist eine Lesekopie. Sie öffnet sich zum Lesen; nichts, was du hier tust, ändert die Datei.",
+ "This is a view-only copy — it follows the live session but can’t change this space.": "Dies ist eine Nur-Lesen-Kopie — sie folgt der Live-Sitzung, kann diesen Space aber nicht ändern.",
"This is not a bento/spaces document — {detail}.": "Dies ist kein bento/spaces-Dokument — {detail}.",
"This live session has run out of room. Your change is saved in your copy, but collaborators won’t see it.": "Diese Live-Sitzung hat keinen Platz mehr. Deine Änderung ist in deiner Kopie gespeichert, aber Mitarbeitende sehen sie nicht.",
"This page only": "Nur diese Seite",
+ "This space has no live session to follow": "Dieser Space hat keine Live-Sitzung zum Folgen",
"This space has no pages.": "Dieser Space hat keine Seiten.",
"This space is encrypted. Saves stay encrypted.": "Dieser Space ist verschlüsselt. Speichern bleibt verschlüsselt.",
"This space is locked": "Dieser Space ist gesperrt",
+ "This window is still running v{v} — reload to finish. A v{v} backup was downloaded.": "Dieses Fenster läuft noch mit v{v} — zum Abschließen neu laden. Ein v{v}-Backup wurde heruntergeladen.",
+ "This window is still running v{v} — reload to finish. A v{v} backup was saved beside this file.": "Dieses Fenster läuft noch mit v{v} — zum Abschließen neu laden. Ein v{v}-Backup wurde neben dieser Datei gespeichert.",
+ "This window is still running v{v}. If you overwrote the file that's open here, reload; otherwise open the file you saved.": "Dieses Fenster läuft noch mit v{v}. Wenn Sie die geöffnete Datei überschrieben haben, neu laden; andernfalls die gespeicherte Datei öffnen.",
+ "This window keeps running v{v} until you open the downloaded file.": "Dieses Fenster bleibt bei v{v}, bis Sie die heruntergeladene Datei öffnen.",
"Those files could not be read": "Diese Dateien konnten nicht gelesen werden",
"Tip": "Tipp",
+ "Title": "Titel",
"Today": "Heute",
"Today's journal": "Heutiges Journal",
+ "Tone": "Art",
"Too many changes at once — live sync is catching up.": "Zu viele Änderungen auf einmal — die Live-Synchronisierung holt auf.",
+ "Top level": "Oberste Ebene",
"Turn into…": "Umwandeln in…",
"Type / for blocks, [[ to link a page": "Tippe / für Blöcke, [[ für einen Seitenlink",
+ "Underline": "Unterstrichen",
+ "Underline — ⌘U": "Unterstrichen — ⌘U",
"Undo (⌘Z)": "Rückgängig (⌘Z)",
"Unlock": "Entsperren",
"Unlocked, but the document inside could not be read.": "Entsperrt, aber das Dokument darin konnte nicht gelesen werden.",
@@ -252,38 +451,82 @@ export const de: Catalog = {
"Unsaved changes — ⌘S downloads an updated copy": "Ungespeicherte Änderungen — ⌘S lädt eine aktualisierte Kopie herunter",
"Unsaved changes — ⌘S rewrites this file": "Ungespeicherte Änderungen — ⌘S schreibt diese Datei neu",
"Untitled": "Ohne Titel",
+ "Update failed: {m}": "Update fehlgeschlagen: {m}",
"Update this file": "Diese Datei aktualisieren",
+ "Update this file…": "Diese Datei aktualisieren…",
+ "Updated to v{v} on disk.": "Auf v{v} auf der Festplatte aktualisiert.",
"Updates": "Updates",
+ "Use a link…": "Einen Link verwenden…",
+ "Use this width for every page": "Diese Breite für alle Seiten verwenden",
+ "Verifies and builds the new version with this document inside, then asks where to save it — pick the file you have open to update it.": "Verifiziert und erstellt die neue Version mit diesem Dokument und fragt nach dem Speicherort — wählen Sie die geöffnete Datei, um sie zu aktualisieren.",
+ "Verifying…": "Verifiziere…",
"Version {v} is available.": "Version {v} ist verfügbar.",
"Version, language, password, exports": "Version, Sprache, Passwort, Export",
+ "Video": "Video",
+ "Video from {host}": "Video von {host}",
+ "View-only copy — it follows the live session but can’t change this space.": "Nur-Lesen-Kopie — sie folgt der Live-Sitzung, kann diesen Space aber nicht ändern.",
+ "View-only copy — it holds no signing key.": "Nur-Lesen-Kopie — enthält keinen Signaturschlüssel.",
+ "View-only copy…": "Nur-Lesen-Kopie…",
+ "Viewer": "Betrachter",
"Visit bento.page (opens in a new tab)": "bento.page besuchen (öffnet in neuem Tab)",
"Warning": "Warnung",
+ "Web address": "Webadresse",
+ "What is in the picture": "Was auf dem Bild zu sehen ist",
+ "What this is": "Worum es sich handelt",
+ "What’s new →": "Neuerungen →",
"Wide": "Breit",
"Width": "Breite",
+ "Width %": "Breite %",
"Width in the text column": "Breite in der Textspalte",
+ "Windows on this computer still sync; turn offline mode off in About to work with someone elsewhere.": "Fenster auf diesem Computer synchronisieren sich weiterhin; deaktiviere den Offline-Modus unter „Über“, um mit jemandem anderswo zu arbeiten.",
+ "Words": "Wörter",
"Wrong password — try again": "Falsches Passwort — bitte erneut versuchen",
+ "Yellow": "Gelb",
"You have the newest version ({v}).": "Du hast die neueste Version ({v}).",
+ "Your key on THIS device: {fp}. Another device counts as a new person until the owner removes it.": "Dein Schlüssel auf DIESEM Gerät: {fp}. Ein anderes Gerät zählt als neue Person, bis der Eigentümer es entfernt.",
"Your name": "Dein Name",
+ "Your name (shown on comments):": "Ihr Name (bei Kommentaren sichtbar):",
+ "Your name (shown on new comments):": "Ihr Name (bei neuen Kommentaren sichtbar):",
"archived": "archiviert",
+ "bento/spaces is MIT-licensed and carries no third-party runtime — the full notices travel in this file’s source.": "bento/spaces steht unter MIT-Lizenz und enthält keine Fremd-Runtime — die vollständigen Hinweise reisen im Quelltext dieser Datei mit.",
"bento/spaces {version} · {pages} page(s), {blocks} block(s). The document, the editor and the search are all in this one file.": "bento/spaces {version} · {pages} Seiten, {blocks} Blöcke. Das Dokument, der Editor und die Suche stecken alle in dieser einen Datei.",
"format v{v}": "Format v{v}",
+ "just now": "gerade eben",
"none": "keine",
+ "you": "du",
+ "you: {name} ✎": "Sie: {name} ✎",
+ "{blocks} blocks · {words} words · {links} links in": "{blocks} Blöcke · {words} Wörter · {links} eingehende Links",
"{i} of {n}": "{i} von {n}",
"{name} joined": "{name} ist beigetreten",
"{name} left": "{name} hat verlassen",
+ "{name} was removed": "{name} wurde entfernt",
+ "{n} connected": "{n} verbunden",
"{n} duplicate or missing id(s) were repaired so links and pages resolve.": "{n} doppelte oder fehlende IDs wurden repariert, damit Links und Seiten wieder gefunden werden.",
+ "{n} embedded image(s) and clip(s) account for {size} of that — {pct}%. Everything else is text.": "{n} eingebettete Bild(er) und Clip(s) machen davon {size} aus — {pct}%. Alles andere ist Text.",
"{n} found": "{n} Treffer",
+ "{n} id(s) were renamed because this space already used them, and the links inside the import follow them.": "{n} ID(s) wurden umbenannt, weil dieser Space sie bereits verwendet hat; die Links im Import folgen ihnen.",
+ "{n} image(s) came too.": "{n} Bild(er) sind ebenfalls mitgekommen.",
"{n} image(s) could not be opened, so their paths are kept as text. Import again with the image files included.": "{n} Bild(er) ließen sich nicht öffnen; ihre Pfade bleiben als Text. Importiere noch einmal, diesmal mit den Bilddateien.",
"{n} image(s) embedded ({size}).": "{n} Bild(er) eingebettet ({size}).",
+ "{n} image(s) go with them; the rest stay here.": "{n} Bild(er) gehen mit; der Rest bleibt hier.",
"{n} image(s) point at the web. Nothing loads until a reader asks.": "{n} Bild(er) zeigen ins Web. Nichts wird geladen, bevor ein Leser darum bittet.",
"{n} image(s) were left as paths because embedding stopped there.": "{n} Bild(er) blieben als Pfad stehen, weil das Einbetten dort endete.",
+ "{n} link(s) named pages that were not in that file, and are kept as text.": "{n} Link(s) nannten Seiten, die nicht in dieser Datei waren, und bleiben als Text erhalten.",
+ "{n} link(s) point outside them and are kept as text naming the page they meant.": "{n} Link(s) zeigen nach außen und bleiben als Text erhalten, der die gemeinte Seite nennt.",
"{n} link(s) to it will stop working.": "{n} Links darauf funktionieren nicht mehr.",
"{n} note name(s) appear more than once, so links naming them all went to the first.": "{n} Notiznamen kommen mehrfach vor — Links mit diesem Namen führen alle zur ersten.",
"{n} of {total} wikilink(s) resolved.": "{n} von {total} Wikilink(s) aufgelöst.",
"{n} page(s) had frontmatter, kept verbatim in a folded block.": "{n} Seite(n) hatten Frontmatter — wortgetreu in einem zugeklappten Block erhalten.",
"{n} page(s) inside it move up a level.": "{n} Unterseiten rücken eine Ebene nach oben.",
"{n} pages, in sidebar order, with a contents page": "{n} Seiten, in der Reihenfolge der Seitenleiste, mit Inhaltsverzeichnis",
+ "{n} table(s) imported, with their column alignment.": "{n} Tabelle(n) importiert, samt Spaltenausrichtung.",
"{n} table(s) kept as text: there is no table block in this format yet.": "{n} Tabelle(n) als Text übernommen: Dieses Format hat noch keinen Tabellenblock.",
+ "{n} unresolved comment(s)": "{n} offene(r) Kommentar(e)",
+ "{n}d ago": "vor {n} T",
+ "{n}h ago": "vor {n} Std",
+ "{n}m ago": "vor {n} Min",
+ "{pages} page(s) and {blocks} block(s) added from that space.": "{pages} Seite(n) und {blocks} Block/Blöcke aus diesem Space hinzugefügt.",
"{pages} page(s) and {blocks} block(s) added from {files} file(s).": "{pages} Seite(n) und {blocks} Block/Blöcke aus {files} Datei(en) hinzugefügt.",
+ "{pages} page(s) and {blocks} block(s) will travel.": "{pages} Seite(n) und {blocks} Block/Blöcke kommen mit.",
"⌘Z removes the imported pages again.": "Mit ⌘Z verschwinden die importierten Seiten wieder.",
}
diff --git a/spaces/src/i18n/es.ts b/spaces/src/i18n/es.ts
index 2cf1c5b4..7e1bb5e2 100644
--- a/spaces/src/i18n/es.ts
+++ b/spaces/src/i18n/es.ts
@@ -13,73 +13,149 @@ import type { Catalog } from '../i18n'
export const es: Catalog = {
"A filter here is newer than this build and was not applied.": "Un filtro de esta vista es más reciente que esta versión y no se ha aplicado.",
"A folder of .md files becomes pages, with the folder tree and the [[wikilinks]] intact.": "Una carpeta de archivos .md se convierte en páginas, con el árbol de carpetas y los [[wikilinks]] intactos.",
+ "A link with nothing in it yet": "Un enlace todavía sin nada",
"A list of every page, in order": "Una lista de todas las páginas, en orden",
+ "A live viewer: follows every edit as it happens but can never change this space — the relay enforces it.": "Un visor en vivo: sigue cada edición al instante pero nunca puede modificar este Space — el relé lo garantiza.",
"A page cannot contain itself": "Una página no puede contenerse a sí misma",
"A password encrypts the document inside the file. There is no recovery — lose it and the space is gone.": "Una contraseña cifra el documento dentro del archivo. No hay forma de recuperarla — si la pierdes, el espacio desaparece.",
"A second file — the original is left alone": "Un segundo archivo — el original queda intacto",
"A sort here is newer than this build and was not applied.": "Un orden de esta vista es más reciente que esta versión y no se ha aplicado.",
"A space is never a dead end: the whole document is plain JSON in this file, and every page exports as Markdown.": "Un espacio nunca es un callejón sin salida: todo el documento es JSON plano dentro de este archivo, y cada página se exporta como Markdown.",
"A space needs at least one page": "Un espacio necesita al menos una página",
+ "A still frame, shown before play — and what a printout or a file preview shows": "Un fotograma fijo, que se muestra antes de reproducir — y es lo que aparece al imprimir o en la vista previa del archivo",
"About bento/spaces — version, updates, language, password": "Acerca de bento/spaces: versión, actualizaciones, idioma, contraseña",
"About this space": "Acerca de este espacio",
+ "Access reset — only copies saved from now on can join": "Acceso restablecido — solo las copias guardadas a partir de ahora podrán unirse",
"Add a block below": "Añadir un bloque debajo",
+ "Add a column after": "Añadir una columna después",
+ "Add a link": "Añadir un enlace",
+ "Add a picture": "Añadir una imagen",
+ "Add a row below": "Añadir una fila debajo",
"Add below": "Añadir debajo",
+ "Add pages under": "Añadir las páginas debajo de",
+ "Address of a video or audio file": "Dirección de un archivo de vídeo o audio",
"Adds status, priority, assignee, estimate": "Añade estado, prioridad, responsable y estimación",
+ "All text. Nothing is embedded, so this file is as small as a space gets.": "Todo es texto. No hay nada incrustado, así que este archivo es lo más pequeño que puede ser un espacio.",
"Already an issue": "Ya es una incidencia",
"Also open in another window on this computer — not shared online": "También abierto en otra ventana de este ordenador — no compartido en línea",
+ "Alt text": "Texto alternativo",
+ "An update check is the only network this app makes on its own. It asks the release server for a signed manifest and sends nothing about you or this document — no ids, no telemetry.": "La comprobación de actualizaciones es la única conexión de red que esta aplicación hace por su cuenta. Pide al servidor de versiones un manifiesto firmado y no envía nada sobre ti ni sobre este documento: sin identificadores, sin telemetría.",
+ "Another bento/spaces file arrives as pages under the one you choose — its images come too, and the links inside it keep working.": "Otro archivo bento/spaces llega como páginas debajo de la que elijas: sus imágenes vienen también y los enlaces internos siguen funcionando.",
+ "Another bento/spaces file can arrive the same way, nested under any page.": "Otro archivo bento/spaces puede llegar del mismo modo, anidado bajo cualquier página.",
+ "Appearance": "Apariencia",
+ "Apply": "Aplicar",
"Archive": "Archivar",
+ "Archived": "Archivada",
"Archived ({n})": "Archivadas ({n})",
"Ascending": "Ascendente",
+ "Audio": "Audio",
+ "Audio from {host}": "Audio de {host}",
+ "Back": "Atrás",
+ "Background": "Fondo",
+ "Block": "Bloque",
"Block options": "Opciones del bloque",
+ "Blocks": "Bloques",
+ "Blue": "Azul",
"Board": "Tablero",
+ "Bold": "Negrita",
+ "Bold — ⌘B": "Negrita — ⌘B",
"Breadcrumb": "Ruta de navegación",
"Bring notes in": "Traer notas",
+ "Brown": "Marrón",
"Callout icon": "Icono del aviso",
+ "Cancel": "Cancelar",
+ "Careful": "Con cuidado",
"Caution": "Precaución",
+ "Change password…": "Cambiar contraseña…",
"Change the kind of callout": "Cambiar el tipo de aviso",
+ "Change the name used for your new comments and replies": "Cambiar el nombre para tus nuevos comentarios y respuestas",
"Change this block’s type": "Cambiar el tipo de este bloque",
"Change this page's icon": "Cambiar el icono de esta página",
"Change {field}": "Cambiar {field}",
"Check for updates": "Buscar actualizaciones",
+ "Check for updates automatically at launch": "Buscar actualizaciones automáticamente al iniciar",
+ "Checked automatically at launch — you're on the latest version (v{v}).": "Comprobado automáticamente al iniciar — tienes la última versión (v{v}).",
"Checking is manual and verified: the download is signed, and its signature is checked against a key inside this file before anything is rewritten.": "La comprobación es manual y verificada: la descarga va firmada y su firma se contrasta con una clave que está dentro de este archivo antes de reescribir nada.",
"Checking…": "Comprobando…",
"Choose .md files…": "Elegir archivos .md…",
+ "Choose a different file": "Elegir otro archivo",
+ "Choose a file…": "Elegir un archivo…",
"Choose a folder…": "Elegir una carpeta…",
"Choose a password. There is no way to recover it.": "Elige una contraseña. No hay forma de recuperarla.",
+ "Choose a space…": "Elegir un espacio…",
"Choose the field the columns come from": "Elige el campo del que salen las columnas",
"Choose the order": "Elige el orden",
"Clear filter": "Borrar el filtro",
+ "Clear formatting": "Borrar formato",
+ "Clip added ({size})": "Clip añadido ({size})",
"Close": "Cerrar",
+ "Code": "Código",
"Collapsed toggles always print open. Your browser's print dialog has the \"Save as PDF\" option.": "Los desplegables plegados siempre se imprimen abiertos. El diálogo de impresión de tu navegador tiene la opción «Guardar como PDF».",
+ "Color": "Color",
"Column": "Columna",
+ "Columns": "Columnas",
"Comfortable for reading": "Cómodo para leer",
+ "Comment": "Comentario",
+ "Comment on this page": "Comentar esta página",
+ "Comment · block": "Comentario · bloque",
+ "Comment · page": "Comentario · página",
+ "Comment:": "Comentario:",
+ "Connect to the live session without saving a new copy — copies you sent earlier will meet you there.": "Conéctate a la sesión en vivo sin guardar una copia nueva — las copias ya enviadas se unirán aquí.",
+ "Connecting…": "Conectando…",
"Contents": "Índice",
"Contents page": "Página de índice",
+ "Controls": "Controles",
+ "Copied ✓": "Copiado ✓",
"Copy document JSON": "Copiar JSON del documento",
"Copy saved": "Copia guardada",
"Copy saved — you are still editing the original": "Copia guardada: sigues editando el original",
"Copy the document JSON": "Copiar el JSON del documento",
"Could not reach the update channel.": "No se pudo contactar con el canal de actualizaciones.",
"Could not verify an update, so nothing was changed.": "No se pudo verificar la actualización, así que no se cambió nada.",
+ "Couldn’t access the clipboard": "No se pudo acceder al portapapeles",
+ "Couldn’t reach the live session": "No se pudo contactar la sesión en vivo",
"Create “{name}”": "Crear «{name}»",
+ "Dark": "Oscuro",
+ "Default": "Predeterminado",
"Delete": "Eliminar",
"Delete “{name}”?": "¿Eliminar «{name}»?",
"Delete…": "Eliminar…",
"Descending": "Descendente",
+ "Description": "Descripción",
"Discard": "Descartar",
+ "Document": "Documento",
+ "Document JSON copied": "JSON del documento copiado",
+ "Document id": "ID del documento",
+ "Document properties": "Propiedades del documento",
+ "Document replaced — ⌘Z undoes": "Documento reemplazado — ⌘Z deshace",
+ "Download updated copy": "Descargar copia actualizada",
+ "Downloaded ✓": "Descargado ✓",
"Downloaded. Open the new file — this one is unchanged.": "Descargado. Abre el archivo nuevo — este no ha cambiado.",
+ "Downloads a backup of the current version, then rewrites this file on disk as the new version — document untouched.": "Descarga una copia de seguridad de la versión actual y reescribe este archivo con la nueva versión — el documento no cambia.",
"Drag to move, click for block options": "Arrastra para mover, haz clic para las opciones del bloque",
+ "Drag to resize this column": "Arrastra para cambiar el ancho de esta columna",
"Drag to resize · double-click to reset": "Arrastra para redimensionar · doble clic para restablecer",
"Drop .md files or a folder here": "Suelta aquí archivos .md o una carpeta",
"Duplicate": "Duplicar",
+ "Duplicate as a new space…": "Duplicar como espacio nuevo…",
"Each .md file becomes a page, folders become the page tree, and [[wikilinks]] become real links. Pages are added — nothing here is replaced.": "Cada archivo .md se convierte en una página, las carpetas forman el árbol de páginas y los [[wikilinks]] se vuelven enlaces reales. Las páginas se añaden: aquí no se reemplaza nada.",
+ "Edit": "Editar",
+ "Edit this link card": "Editar esta tarjeta de enlace",
"Edited": "Editado",
"Editing": "Edición",
+ "Editor": "Editor",
+ "Editor copy saved — recipients join live with edit access": "Copia de editor guardada — quien la reciba se une en vivo con acceso de edición",
"Encrypt the document inside this file": "Cifrar el documento dentro de este archivo",
"Enter the password to open it.": "Introduce la contraseña para abrirlo.",
+ "Every page opens wide on this screen from now on": "A partir de ahora todas las páginas se abren anchas en esta pantalla",
"Every page, as one .md file": "Todas las páginas, en un solo archivo .md",
+ "Everything in this space is replaced by what you paste. ⌘Z undoes it, but only while this window stays open.": "Todo lo que hay en este espacio se sustituye por lo que pegues. ⌘Z lo deshace, pero solo mientras esta ventana siga abierta.",
+ "Export": "Exportar",
+ "Export a page as a space": "Exportar una página como espacio",
"Export as Markdown": "Exportar como Markdown",
"Export as Markdown…": "Exportar como Markdown…",
+ "Export page as a space…": "Exportar la página como espacio…",
+ "Exported {n} page(s) as a new space": "Se exportaron {n} página(s) como un espacio nuevo",
"File": "Archivo",
"Fills the window": "Ocupa toda la ventana",
"Filter": "Filtrar",
@@ -87,10 +163,17 @@ export const es: Catalog = {
"Find": "Buscar",
"Find in this space…": "Buscar en este espacio…",
"Find or create a page…": "Buscar o crear una página…",
+ "Following — view only": "Siguiendo — solo lectura",
"Full width": "Ancho completo",
+ "Gray": "Gris",
+ "Green": "Verde",
"Group": "Agrupar",
"Guest": "Invitado",
+ "Header row": "Fila de encabezado",
+ "Hide properties (])": "Ocultar propiedades (])",
"Hide the page list ([)": "Ocultar la lista de páginas ([)",
+ "Highlight": "Resaltado",
+ "Highlight — ⇧⌘H": "Resaltado — ⇧⌘H",
"Icon": "Icono",
"Image added ({size})": "Imagen añadida ({size})",
"Image added, resized to fit ({from} → {to})": "Imagen añadida, redimensionada para que quepa ({from} → {to})",
@@ -101,35 +184,60 @@ export const es: Catalog = {
"Import Markdown…": "Importar Markdown…",
"Important": "Importante",
"Imported": "Importado",
+ "Imported a space": "Espacio importado",
"Imported notes": "Notas importadas",
"Include archived pages": "Incluir páginas archivadas",
"Include the image files and they are embedded too. An image this browser cannot open is kept as its path rather than as a broken picture.": "Incluye los archivos de imagen y también se incrustan. Una imagen que este navegador no puede abrir se conserva como su ruta, no como una imagen rota.",
+ "Include the pages nested under it": "Incluir las páginas anidadas debajo",
+ "Inline code — ⌘E": "Código en línea — ⌘E",
"Insert": "Insertar",
"Insert a block — text, headings, lists, code, images": "Insertar un bloque — texto, encabezados, listas, código, imágenes",
"Interface language": "Idioma de la interfaz",
+ "Interface theme": "Tema de la interfaz",
"Invite someone…": "Invitar a alguien…",
+ "Invite to edit…": "Invitar a editar…",
"Issues": "Incidencias",
+ "Italic": "Cursiva",
+ "Italic — ⌘I": "Cursiva — ⌘I",
+ "Journal date": "Fecha del diario",
+ "Key-verified identity": "Identidad verificada por clave",
"Language": "Idioma",
"Language follows whoever opens the file. It is never written into the document.": "El idioma sigue a quien abre el archivo. Nunca se escribe en el documento.",
"Language — what this block is highlighted as": "Lenguaje — cómo se colorea este bloque",
+ "Last saved": "Última vez guardado",
+ "Launch check couldn't reach the release server ({m}). Check manually below.": "La comprobación inicial no alcanzó el servidor ({m}). Comprueba manualmente abajo.",
"Leave it empty to use the tone mark": "Déjalo vacío para usar el símbolo del tipo",
+ "Light": "Claro",
+ "Link": "Enlace",
+ "Link address": "Dirección del enlace",
+ "Link card": "Tarjeta de enlace",
"Link to page": "Enlazar a una página",
+ "Link — ⌘K": "Enlace — ⌘K",
+ "Linked": "Enlazado",
"Linked from": "Enlazado desde",
"Links to it become dead": "Los enlaces a ella dejan de funcionar",
"List": "Lista",
+ "Live": "En vivo",
"Live — nobody else is here yet": "En directo — todavía no hay nadie más",
"Live — send someone the file to bring them in": "En directo — envía el archivo a alguien para que entre",
"Live — {n} other people are here": "En directo — hay {n} personas más",
+ "Load this audio": "Cargar este audio",
"Load this image": "Cargar esta imagen",
+ "Load this video": "Cargar este vídeo",
+ "Loop": "Bucle",
"Make this page an issue": "Convertir esta página en incidencia",
"Manual order": "Orden manual",
+ "Match my system": "Según el sistema",
+ "Mints brand-new keys. Every previously sent copy stops syncing for good; share fresh copies afterwards.": "Genera claves totalmente nuevas. Todas las copias enviadas dejan de sincronizarse para siempre; comparte copias nuevas después.",
"More": "Más",
"Move down": "Bajar",
"Move up": "Subir",
+ "Muted": "Silenciado",
"New issue": "Nueva incidencia",
"New page": "Nueva página",
"New page (⌘⌥N)": "Nueva página (⌘⌥N)",
"New page inside": "Nueva página dentro",
+ "New to Bento? Find templates, the gallery and the AI editing guide at {home} — or ⭐ it on {gh}.": "¿Nuevo en Bento? Encuentra plantillas, la galería y la guía de edición con IA en {home} — o dale ⭐ en {gh}.",
"Next (⏎)": "Siguiente (⏎)",
"No Markdown files in that selection": "No hay archivos Markdown en esa selección",
"No block matches": "Ningún bloque coincide",
@@ -138,51 +246,104 @@ export const es: Catalog = {
"No issues yet. Add a status field to any page and it appears here.": "Aún no hay incidencias. Añade un campo de estado a cualquier página y aparecerá aquí.",
"No pages yet": "Aún no hay páginas",
"Nobody else is here yet": "Todavía no hay nadie más",
+ "Not in this file: it needs the network, and the site is told when someone opens the page": "No está en este archivo: necesita la red, y ese sitio sabrá que alguien ha abierto esta página",
+ "Not live — turns on when you share": "Sin conexión — se activa al compartir",
"Not loaded — opening it would tell that site you opened this space.": "No cargada: al cargarla, ese sitio sabría que has abierto este espacio.",
"Not sharing yet — click to start a live session": "Aún no se comparte — haz clic para iniciar una sesión en vivo",
"Note": "Nota",
"Nothing found": "Sin resultados",
+ "Nothing is fetched. A card shows what you type here — opening this space never contacts the site.": "No se descarga nada. La tarjeta muestra lo que escribas aquí: abrir este espacio nunca contacta con el sitio.",
"Nothing leaves this file until you start a session.": "Nada sale de este archivo hasta que inicies una sesión.",
"Now an issue": "Ahora es una incidencia",
"Off by default — they were archived for a reason": "Desactivado por defecto — por algo se archivaron",
+ "Offline mode is on — nothing leaves this computer.": "El modo sin conexión está activo: nada sale de este equipo.",
+ "On this screen only — it is not saved in the file": "Solo en esta pantalla: no se guarda en el archivo",
+ "One emoji": "Un emoji",
+ "One fewer": "Uno menos",
+ "One line about what is there": "Una línea sobre lo que hay allí",
+ "One more": "Uno más",
+ "One page and what is under it, as its own file": "Una página y lo que hay debajo, como archivo propio",
+ "Only pages that ask for it": "Solo las páginas que lo pidan",
+ "Only the owner of this space can invite people": "Solo el propietario de este Space puede invitar a otras personas",
"Open only": "Solo abiertas",
+ "Orange": "Naranja",
"Other": "Otras",
"Other ways to save": "Otras formas de guardar",
"Out of the sidebar, still searchable and linkable": "Fuera de la barra lateral, pero aún se puede buscar y enlazar",
+ "Owner": "Propietario",
+ "Page": "Página",
"Page options": "Opciones de la página",
"Pages": "Páginas",
+ "Pages open at their normal width again": "Las páginas vuelven a su anchura normal",
"Pages — show or hide the page list": "Páginas — mostrar u ocultar la lista de páginas",
"Password": "Contraseña",
"Password removed. Save to write the space unencrypted.": "Contraseña eliminada. Guarda para escribir el espacio sin cifrar.",
"Password set. Save to write the space encrypted.": "Contraseña establecida. Guarda para escribir el espacio cifrado.",
"Password…": "Contraseña…",
+ "Paste document JSON here…": "Pega aquí el JSON del documento…",
+ "Paste or type a link": "Pega o escribe un enlace",
"People in this space": "Personas en este espacio",
+ "Picture": "Imagen",
+ "Picture…": "Imagen…",
+ "Pink": "Rosa",
"Plain text": "Texto sin formato",
+ "Poster": "Póster",
+ "Poster…": "Póster…",
"Previous (⇧⏎)": "Anterior (⇧⏎)",
"Print": "Imprimir",
"Print / PDF…": "Imprimir / PDF…",
"Print or save as PDF": "Imprimir o guardar como PDF",
"Print or save as PDF (⌘P)": "Imprimir o guardar como PDF (⌘P)",
"Print…": "Imprimir…",
+ "Properties": "Propiedades",
+ "Properties — show or hide this block’s settings": "Propiedades — mostrar u ocultar los ajustes de este bloque",
+ "Purple": "Morado",
+ "Put the caret in a block to see what it can be.": "Coloca el cursor en un bloque para ver qué puede cambiarse.",
+ "Read the release notes for v{v} (opens in a new tab)": "Leer las notas de la versión v{v} (se abre en una pestaña nueva)",
+ "Read-only copy saved — it follows the live session, view only": "Copia de solo lectura guardada — sigue la sesión en vivo, solo para ver",
+ "Reading file…": "Leyendo el archivo…",
"Reading image…": "Leyendo la imagen…",
"Reading view": "Vista de lectura",
"Reading view — press Esc or the eye to edit": "Vista de lectura — pulsa Esc o el ojo para editar",
"Reading view — the pages without the editing tools": "Vista de lectura — las páginas sin las herramientas de edición",
"Reading {n} file(s)…": "Leyendo {n} archivo(s)…",
+ "Red": "Rojo",
"Redo": "Rehacer",
"Redo (⇧⌘Z)": "Rehacer (⇧⌘Z)",
+ "Reload into new version": "Recargar en la nueva versión",
+ "Remove": "Quitar",
"Remove password…": "Quitar contraseña…",
+ "Remove the password": "Quitar la contraseña",
+ "Remove the password?": "¿Quitar la contraseña?",
"Remove the password? The next save writes the document in the clear.": "¿Quitar la contraseña? El próximo guardado escribe el documento sin cifrar.",
+ "Remove the picture": "Quitar la imagen",
+ "Remove this column": "Eliminar esta columna",
+ "Remove this row": "Eliminar esta fila",
+ "Remove {name} from this space? Their copy drops to read-only.": "¿Quitar a {name} de este Space? Su copia pasará a solo lectura.",
+ "Remove {name} — revokes this device’s access; everyone else is unaffected": "Quitar a {name} — revoca el acceso de este dispositivo; nadie más se ve afectado",
"Rename": "Cambiar nombre",
+ "Reopen": "Reabrir",
+ "Repeat when it reaches the end": "Repetir al llegar al final",
+ "Replace": "Sustituir",
"Replace all": "Reemplazar todo",
+ "Replace every page from pasted JSON?": "¿Sustituir todas las páginas por el JSON pegado?",
+ "Replace from JSON…": "Reemplazar desde JSON…",
+ "Replace picture": "Sustituir la imagen",
"Replace with": "Reemplazar por",
"Replace with…": "Reemplazar por…",
"Replace {n} occurrence(s) across the whole space?": "¿Reemplazar {n} coincidencia(s) en todo el espacio?",
"Replaced": "Reemplazado",
+ "Replace…": "Reemplazar…",
+ "Reply": "Responder",
+ "Reply…": "Responder…",
+ "Reset access? Every copy you’ve sent stops syncing; only copies saved after this can join.": "¿Restablecer el acceso? Todas las copias enviadas dejarán de sincronizarse; solo podrán unirse las guardadas después.",
+ "Reset access…": "Restablecer acceso…",
"Resized": "Redimensionada",
+ "Resolve": "Resolver",
"Restore": "Restaurar",
"Restore to the page list": "Restaurar a la lista de páginas",
"Room for a board or a table": "Espacio para un tablero o una tabla",
+ "Rows": "Filas",
"Save": "Guardar",
"Save (⌘S)": "Guardar (⌘S)",
"Save a copy…": "Guardar una copia…",
@@ -190,6 +351,7 @@ export const es: Catalog = {
"Saved": "Guardado",
"Saved a new copy": "Se guardó una copia nueva",
"Saves a copy that joins this session": "Guarda una copia que se une a esta sesión",
+ "Saves a copy to send. Whoever opens it edits this space live with you (end-to-end encrypted); you stay the owner and can remove them from the People list.": "Guarda una copia para enviar. Quien la abra editará este Space en vivo contigo (cifrado de extremo a extremo); tú sigues siendo el propietario y puedes quitarlos de la lista de Personas.",
"Saving…": "Guardando…",
"Search": "Buscar",
"Search all pages (⌘K)": "Buscar en todas las páginas (⌘K)",
@@ -199,32 +361,58 @@ export const es: Catalog = {
"Share this space": "Compartir este espacio",
"Show as a board": "Mostrar como tablero",
"Show as a list": "Mostrar como lista",
+ "Show playback controls to the reader": "Mostrar los controles de reproducción a quien lee",
+ "Show properties (])": "Mostrar propiedades (])",
"Show the page list ([)": "Mostrar la lista de páginas ([)",
+ "Shown next to your cursor and in the People list — stored only in this browser.": "Aparece junto a tu cursor y en la lista de Personas — se guarda solo en este navegador.",
+ "Site name": "Nombre del sitio",
"Sort": "Ordenar",
"Space name": "Nombre del espacio",
"Start live session": "Iniciar sesión en vivo",
+ "Start silent": "Empezar en silencio",
"Stop sharing": "Dejar de compartir",
+ "Stop widening every page": "Dejar de ensanchar todas las páginas",
"Stopped sharing": "Has dejado de compartir",
+ "Strikethrough": "Tachado",
+ "Strikethrough — ⇧⌘S": "Tachado — ⇧⌘S",
"Take it elsewhere": "Llévatelo a otra parte",
+ "Taken from the address if blank": "Si se deja vacío, se toma de la dirección",
+ "Text": "Texto",
+ "Text and background color": "Color de texto y de fondo",
+ "Text formatting": "Formato de texto",
"That change is too large to share live (about 1 MB max). It’s saved in your copy, but collaborators won’t see it.": "Ese cambio es demasiado grande para compartirlo en vivo (máx. 1 MB aprox.). Se guarda en tu copia, pero los colaboradores no lo verán.",
+ "That file could not be read": "Ese archivo no se pudo leer",
"That file could not be read as an image": "No se pudo leer ese archivo como imagen",
+ "That file is not a bento/spaces document": "Ese archivo no es un documento bento/spaces",
"That image is too large to share live (about 1 MB max). It’s saved in your copy, but collaborators won’t see it.": "Esa imagen es demasiado grande para compartirla en vivo (máx. 1 MB aprox.). Se guarda en tu copia, pero los colaboradores no la verán.",
+ "That is not a bento/spaces document": "Eso no es un documento de bento/spaces",
"That is {n} files — importing them all may take a moment. Continue?": "Son {n} archivos: importarlos todos puede tardar un momento. ¿Continuar?",
+ "That needs to be an http or https address": "Tiene que ser una dirección http o https",
+ "That space is password-protected. Open it, then export the pages you want.": "Ese espacio está protegido con contraseña. Ábrelo y exporta desde allí las páginas que quieras.",
+ "The counterpart of Copy document JSON: edit a space in another tool, then bring it back.": "La contraparte de Copiar el JSON del documento: edita un espacio en otra herramienta y vuelve a traerlo.",
"The day after": "El día siguiente",
"The day before": "El día anterior",
"The document block is not shaped like a space — {detail}.": "El bloque del documento no tiene la forma de un espacio — {detail}.",
"The document block is not valid JSON — {detail}.": "El bloque del documento no es JSON válido — {detail}.",
+ "The document, the editor and the search are all in this one file. Opening it needs nothing else — no server, no account, no install.": "El documento, el editor y la búsqueda están todos en este único archivo. Abrirlo no necesita nada más: ni servidor, ni cuenta, ni instalación.",
"The images in these notes come to {size} so far, and they all travel inside the file. Keep embedding them?": "Las imágenes de estas notas suman ya {size} y todas viajan dentro del archivo. ¿Seguir incrustándolas?",
"The live session couldn’t store that change. It’s saved in your copy, but collaborators won’t see it.": "La sesión en vivo no pudo guardar ese cambio. Se guarda en tu copia, pero los colaboradores no lo verán.",
+ "The next save writes this space as plain, readable JSON — anybody who opens the file can read every page.": "El próximo guardado escribe este espacio como JSON legible: cualquiera que abra el archivo podrá leer todas las páginas.",
+ "The page becomes a new file of its own: a whole space, with a new document id and none of this one’s sharing keys.": "La página se convierte en un archivo propio: un espacio completo, con un nuevo id de documento y sin ninguna de las claves de uso compartido de este.",
"The pages without the editing tools": "Las páginas sin las herramientas de edición",
"The rest name notes that were not in the selection, and are left as text.": "El resto nombra notas que no estaban en la selección y se dejan como texto.",
+ "The theme follows whoever opens the file. It is never written into the document.": "El tema sigue a quien abre el archivo. Nunca se escribe en el documento.",
"The whole space": "Todo el espacio",
"The whole space, or just this page": "Todo el espacio, o solo esta página",
"Then send someone the file": "Después envía el archivo a alguien",
"These windows are on this computer. Start a session to work with someone elsewhere.": "Estas ventanas están en este ordenador. Inicia una sesión para trabajar con alguien en otro sitio.",
+ "This block has no settings of its own — its content is all of it.": "Este bloque no tiene ajustes propios: su contenido es todo lo que hay.",
+ "This block’s settings, and the page’s": "Los ajustes de este bloque, y los de la página",
"This browser cannot write back to the file, so every save makes a new copy. Chrome and Edge on a computer can save in place.": "Este navegador no puede reescribir el archivo, así que cada guardado crea una copia nueva. Chrome y Edge en un ordenador sí pueden guardar en el sitio.",
+ "This clip is {size} and travels inside the file, making it that much bigger for everyone you send it to. Embed it anyway?": "Este clip pesa {size} y viaja dentro del archivo, que crecerá otro tanto para todos a quienes se lo envíes. ¿Incrustarlo de todos modos?",
"This copy goes offline; the others carry on": "Esta copia se desconecta; las demás siguen",
"This file": "Este archivo",
+ "This file carries its own app — it works offline, forever, as is.": "Este archivo lleva su propia aplicación — funciona sin conexión, para siempre, tal cual.",
"This file could not be opened": "No se pudo abrir este archivo",
"This file declares rules this build does not know. It is open read-only so nothing is lost.": "Este archivo declara reglas que esta versión no conoce. Está abierto en solo lectura para no perder nada.",
"This file is open read-only": "Este archivo está abierto en solo lectura",
@@ -232,19 +420,30 @@ export const es: Catalog = {
"This image is {size} and travels inside the file, making it that much bigger for everyone you send it to. Embed it anyway?": "Esta imagen pesa {size} y viaja dentro del archivo, que crecerá otro tanto para todos a quienes se lo envíes. ¿Incrustarla de todos modos?",
"This image was resized to keep the file small. Click to replace it with the original.": "Esta imagen se redimensionó para mantener el archivo pequeño. Haz clic para reemplazarla por la original.",
"This is a reading copy. It opens for reading; nothing you do here changes the file.": "Esta es una copia de lectura. Se abre para leer; nada de lo que hagas aquí cambia el archivo.",
+ "This is a view-only copy — it follows the live session but can’t change this space.": "Esta es una copia de solo lectura — sigue la sesión en vivo pero no puede modificar este Space.",
"This is not a bento/spaces document — {detail}.": "Esto no es un documento de bento/spaces — {detail}.",
"This live session has run out of room. Your change is saved in your copy, but collaborators won’t see it.": "Esta sesión en vivo se ha quedado sin espacio. Tu cambio se guarda en tu copia, pero los colaboradores no lo verán.",
"This page only": "Solo esta página",
+ "This space has no live session to follow": "Este Space no tiene sesión en vivo que seguir",
"This space has no pages.": "Este espacio no tiene páginas.",
"This space is encrypted. Saves stay encrypted.": "Este espacio está cifrado. Los guardados siguen cifrados.",
"This space is locked": "Este espacio está bloqueado",
+ "This window is still running v{v} — reload to finish. A v{v} backup was downloaded.": "Esta ventana sigue en v{v} — recarga para terminar. Se descargó una copia de seguridad v{v}.",
+ "This window is still running v{v} — reload to finish. A v{v} backup was saved beside this file.": "Esta ventana sigue en v{v} — recarga para terminar. Se guardó una copia de seguridad v{v} junto a este archivo.",
+ "This window is still running v{v}. If you overwrote the file that's open here, reload; otherwise open the file you saved.": "Esta ventana sigue en v{v}. Si sobrescribiste el archivo abierto aquí, recarga; si no, abre el archivo que guardaste.",
+ "This window keeps running v{v} until you open the downloaded file.": "Esta ventana seguirá en v{v} hasta que abras el archivo descargado.",
"Those files could not be read": "No se pudieron leer esos archivos",
"Tip": "Consejo",
+ "Title": "Título",
"Today": "Hoy",
"Today's journal": "Diario de hoy",
+ "Tone": "Tono",
"Too many changes at once — live sync is catching up.": "Demasiados cambios a la vez — la sincronización en vivo se está poniendo al día.",
+ "Top level": "Nivel superior",
"Turn into…": "Convertir en…",
"Type / for blocks, [[ to link a page": "Escribe / para bloques, [[ para enlazar una página",
+ "Underline": "Subrayado",
+ "Underline — ⌘U": "Subrayado — ⌘U",
"Undo (⌘Z)": "Deshacer (⌘Z)",
"Unlock": "Desbloquear",
"Unlocked, but the document inside could not be read.": "Desbloqueado, pero no se pudo leer el documento de dentro.",
@@ -252,38 +451,82 @@ export const es: Catalog = {
"Unsaved changes — ⌘S downloads an updated copy": "Cambios sin guardar: ⌘S descarga una copia actualizada",
"Unsaved changes — ⌘S rewrites this file": "Cambios sin guardar: ⌘S reescribe este archivo",
"Untitled": "Sin título",
+ "Update failed: {m}": "Falló la actualización: {m}",
"Update this file": "Actualizar este archivo",
+ "Update this file…": "Actualizar este archivo…",
+ "Updated to v{v} on disk.": "Actualizado a v{v} en disco.",
"Updates": "Actualizaciones",
+ "Use a link…": "Usar un enlace…",
+ "Use this width for every page": "Usar esta anchura en todas las páginas",
+ "Verifies and builds the new version with this document inside, then asks where to save it — pick the file you have open to update it.": "Verifica y construye la nueva versión con este documento dentro, y pregunta dónde guardarla — elige el archivo que tienes abierto para actualizarlo.",
+ "Verifying…": "Verificando…",
"Version {v} is available.": "Versión {v} disponible.",
"Version, language, password, exports": "Versión, idioma, contraseña, exportaciones",
+ "Video": "Vídeo",
+ "Video from {host}": "Vídeo de {host}",
+ "View-only copy — it follows the live session but can’t change this space.": "Copia de solo lectura — sigue la sesión en vivo pero no puede modificar este Space.",
+ "View-only copy — it holds no signing key.": "Copia de solo lectura — no contiene clave de firma.",
+ "View-only copy…": "Copia de solo lectura…",
+ "Viewer": "Espectador",
"Visit bento.page (opens in a new tab)": "Visitar bento.page (se abre en una pestaña nueva)",
"Warning": "Advertencia",
+ "Web address": "Dirección web",
+ "What is in the picture": "Qué hay en la imagen",
+ "What this is": "Qué es esto",
+ "What’s new →": "Novedades →",
"Wide": "Ancho",
"Width": "Anchura",
+ "Width %": "Ancho %",
"Width in the text column": "Ancho en la columna de texto",
+ "Windows on this computer still sync; turn offline mode off in About to work with someone elsewhere.": "Las ventanas de este equipo siguen sincronizándose; desactiva el modo sin conexión en «Acerca de» para trabajar con alguien en otro lugar.",
+ "Words": "Palabras",
"Wrong password — try again": "Contraseña incorrecta: inténtalo de nuevo",
+ "Yellow": "Amarillo",
"You have the newest version ({v}).": "Tienes la versión más reciente ({v}).",
+ "Your key on THIS device: {fp}. Another device counts as a new person until the owner removes it.": "Tu clave en ESTE dispositivo: {fp}. Otro dispositivo cuenta como una persona nueva hasta que el propietario lo quite.",
"Your name": "Tu nombre",
+ "Your name (shown on comments):": "Tu nombre (visible en los comentarios):",
+ "Your name (shown on new comments):": "Tu nombre (visible en los nuevos comentarios):",
"archived": "archivada",
+ "bento/spaces is MIT-licensed and carries no third-party runtime — the full notices travel in this file’s source.": "bento/spaces tiene licencia MIT y no incluye ningún runtime de terceros: los avisos completos viajan en el código fuente de este archivo.",
"bento/spaces {version} · {pages} page(s), {blocks} block(s). The document, the editor and the search are all in this one file.": "bento/spaces {version} · {pages} página(s), {blocks} bloque(s). El documento, el editor y la búsqueda están todos en este único archivo.",
"format v{v}": "formato v{v}",
+ "just now": "ahora mismo",
"none": "ninguna",
+ "you": "tú",
+ "you: {name} ✎": "tú: {name} ✎",
+ "{blocks} blocks · {words} words · {links} links in": "{blocks} bloques · {words} palabras · {links} enlaces entrantes",
"{i} of {n}": "{i} de {n}",
"{name} joined": "{name} se ha unido",
"{name} left": "{name} se ha ido",
+ "{name} was removed": "{name} fue eliminado",
+ "{n} connected": "{n} conectados",
"{n} duplicate or missing id(s) were repaired so links and pages resolve.": "Se repararon {n} id(s) duplicados o ausentes para que los enlaces y las páginas funcionen.",
+ "{n} embedded image(s) and clip(s) account for {size} of that — {pct}%. Everything else is text.": "{n} imagen(es) y clip(s) incrustados suman {size} de ese total: el {pct}%. Todo lo demás es texto.",
"{n} found": "{n} encontrada(s)",
+ "{n} id(s) were renamed because this space already used them, and the links inside the import follow them.": "Se renombraron {n} id porque este espacio ya los usaba, y los enlaces dentro de lo importado los siguen.",
+ "{n} image(s) came too.": "También vinieron {n} imagen(es).",
"{n} image(s) could not be opened, so their paths are kept as text. Import again with the image files included.": "{n} imagen(es) no se pudieron abrir, así que sus rutas quedan como texto. Vuelve a importar incluyendo los archivos de imagen.",
"{n} image(s) embedded ({size}).": "{n} imagen(es) incrustada(s) ({size}).",
+ "{n} image(s) go with them; the rest stay here.": "{n} imagen(es) van con ellas; el resto se queda aquí.",
"{n} image(s) point at the web. Nothing loads until a reader asks.": "{n} imagen(es) apuntan a la web. No se carga nada hasta que un lector lo pida.",
"{n} image(s) were left as paths because embedding stopped there.": "{n} imagen(es) quedaron como rutas porque la incrustación se detuvo ahí.",
+ "{n} link(s) named pages that were not in that file, and are kept as text.": "{n} enlace(s) nombraban páginas que no estaban en ese archivo y se conservan como texto.",
+ "{n} link(s) point outside them and are kept as text naming the page they meant.": "{n} enlace(s) apuntan fuera y se conservan como texto que nombra la página a la que se referían.",
"{n} link(s) to it will stop working.": "{n} enlace(s) a ella dejarán de funcionar.",
"{n} note name(s) appear more than once, so links naming them all went to the first.": "{n} nombre(s) de nota se repiten, así que los enlaces con ese nombre fueron todos al primero.",
"{n} of {total} wikilink(s) resolved.": "{n} de {total} wikilink(s) resueltos.",
"{n} page(s) had frontmatter, kept verbatim in a folded block.": "{n} página(s) tenían frontmatter, conservado tal cual en un bloque plegado.",
"{n} page(s) inside it move up a level.": "{n} página(s) que contiene suben un nivel.",
"{n} pages, in sidebar order, with a contents page": "{n} páginas, en el orden de la barra lateral, con una página de índice",
+ "{n} table(s) imported, with their column alignment.": "{n} tabla(s) importada(s), con la alineación de sus columnas.",
"{n} table(s) kept as text: there is no table block in this format yet.": "{n} tabla(s) conservadas como texto: este formato aún no tiene bloque de tabla.",
+ "{n} unresolved comment(s)": "{n} comentario(s) sin resolver",
+ "{n}d ago": "hace {n} d",
+ "{n}h ago": "hace {n} h",
+ "{n}m ago": "hace {n} min",
+ "{pages} page(s) and {blocks} block(s) added from that space.": "Se añadieron {pages} página(s) y {blocks} bloque(s) desde ese espacio.",
"{pages} page(s) and {blocks} block(s) added from {files} file(s).": "{pages} página(s) y {blocks} bloque(s) añadidos desde {files} archivo(s).",
+ "{pages} page(s) and {blocks} block(s) will travel.": "Viajarán {pages} página(s) y {blocks} bloque(s).",
"⌘Z removes the imported pages again.": "⌘Z vuelve a quitar las páginas importadas.",
}
diff --git a/spaces/src/i18n/fr.ts b/spaces/src/i18n/fr.ts
index 1216d474..8c580a85 100644
--- a/spaces/src/i18n/fr.ts
+++ b/spaces/src/i18n/fr.ts
@@ -13,73 +13,149 @@ import type { Catalog } from '../i18n'
export const fr: Catalog = {
"A filter here is newer than this build and was not applied.": "Un filtre de cette vue est plus récent que cette version et n’a pas été appliqué.",
"A folder of .md files becomes pages, with the folder tree and the [[wikilinks]] intact.": "Un dossier de fichiers .md devient des pages, avec l’arborescence et les [[wikilinks]] intacts.",
+ "A link with nothing in it yet": "Un lien encore vide",
"A list of every page, in order": "La liste de toutes les pages, dans l’ordre",
+ "A live viewer: follows every edit as it happens but can never change this space — the relay enforces it.": "Un visualiseur en direct : suit chaque modification mais ne peut jamais changer cet espace — le relais l’applique.",
"A page cannot contain itself": "Une page ne peut pas se contenir elle-même",
"A password encrypts the document inside the file. There is no recovery — lose it and the space is gone.": "Un mot de passe chiffre le document à l’intérieur du fichier. Il n’y a aucune récupération — perdez-le et l’espace est perdu.",
"A second file — the original is left alone": "Un second fichier — l’original reste intact",
"A sort here is newer than this build and was not applied.": "Un tri de cette vue est plus récent que cette version et n’a pas été appliqué.",
"A space is never a dead end: the whole document is plain JSON in this file, and every page exports as Markdown.": "Un espace n’est jamais une impasse : tout le document est du JSON brut dans ce fichier, et chaque page s’exporte en Markdown.",
"A space needs at least one page": "Un espace doit contenir au moins une page",
+ "A still frame, shown before play — and what a printout or a file preview shows": "Une image fixe, affichée avant la lecture — et c’est elle qui apparaît à l’impression et dans l’aperçu du fichier",
"About bento/spaces — version, updates, language, password": "À propos de bento/spaces — version, mises à jour, langue, mot de passe",
"About this space": "À propos de cet espace",
+ "Access reset — only copies saved from now on can join": "Accès réinitialisé — seules les copies enregistrées désormais pourront rejoindre",
"Add a block below": "Ajouter un bloc en dessous",
+ "Add a column after": "Ajouter une colonne après",
+ "Add a link": "Ajouter un lien",
+ "Add a picture": "Ajouter une image",
+ "Add a row below": "Ajouter une ligne en dessous",
"Add below": "Ajouter en dessous",
+ "Add pages under": "Ajouter les pages sous",
+ "Address of a video or audio file": "Adresse d’un fichier vidéo ou audio",
"Adds status, priority, assignee, estimate": "Ajoute statut, priorité, responsable et estimation",
+ "All text. Nothing is embedded, so this file is as small as a space gets.": "Que du texte. Rien n’est intégré, donc ce fichier est aussi léger qu’un espace peut l’être.",
"Already an issue": "Déjà un ticket",
"Also open in another window on this computer — not shared online": "Également ouvert dans une autre fenêtre de cet ordinateur — pas partagé en ligne",
+ "Alt text": "Texte alternatif",
+ "An update check is the only network this app makes on its own. It asks the release server for a signed manifest and sends nothing about you or this document — no ids, no telemetry.": "La vérification des mises à jour est la seule connexion réseau que cette application établit d’elle-même. Elle demande au serveur de versions un manifeste signé et n’envoie rien sur vous ni sur ce document — aucun identifiant, aucune télémétrie.",
+ "Another bento/spaces file arrives as pages under the one you choose — its images come too, and the links inside it keep working.": "Un autre fichier bento/spaces arrive sous la page que vous choisissez : ses images viennent aussi, et les liens qu’il contient continuent de fonctionner.",
+ "Another bento/spaces file can arrive the same way, nested under any page.": "Un autre fichier bento/spaces peut arriver de la même manière, imbriqué sous n’importe quelle page.",
+ "Appearance": "Apparence",
+ "Apply": "Appliquer",
"Archive": "Archiver",
+ "Archived": "Archivée",
"Archived ({n})": "Archivées ({n})",
"Ascending": "Croissant",
+ "Audio": "Audio",
+ "Audio from {host}": "Audio provenant de {host}",
+ "Back": "Retour",
+ "Background": "Arrière-plan",
+ "Block": "Bloc",
"Block options": "Options du bloc",
+ "Blocks": "Blocs",
+ "Blue": "Bleu",
"Board": "Tableau",
+ "Bold": "Gras",
+ "Bold — ⌘B": "Gras — ⌘B",
"Breadcrumb": "Fil d’Ariane",
"Bring notes in": "Faire entrer des notes",
+ "Brown": "Marron",
"Callout icon": "Icône de l'encadré",
+ "Cancel": "Annuler",
+ "Careful": "Prudence",
"Caution": "Attention",
+ "Change password…": "Changer le mot de passe…",
"Change the kind of callout": "Changer le type d'encadré",
+ "Change the name used for your new comments and replies": "Changer le nom utilisé pour vos nouveaux commentaires et réponses",
"Change this block’s type": "Changer le type de ce bloc",
"Change this page's icon": "Changer l’icône de cette page",
"Change {field}": "Modifier {field}",
"Check for updates": "Rechercher des mises à jour",
+ "Check for updates automatically at launch": "Rechercher automatiquement les mises à jour au démarrage",
+ "Checked automatically at launch — you're on the latest version (v{v}).": "Vérifié automatiquement au démarrage — vous avez la dernière version (v{v}).",
"Checking is manual and verified: the download is signed, and its signature is checked against a key inside this file before anything is rewritten.": "La vérification est manuelle et contrôlée : le téléchargement est signé, et sa signature est vérifiée avec une clé contenue dans ce fichier avant toute réécriture.",
"Checking…": "Vérification…",
"Choose .md files…": "Choisir des fichiers .md…",
+ "Choose a different file": "Choisir un autre fichier",
+ "Choose a file…": "Choisir un fichier…",
"Choose a folder…": "Choisir un dossier…",
"Choose a password. There is no way to recover it.": "Choisissez un mot de passe. Il est impossible de le récupérer.",
+ "Choose a space…": "Choisir un espace…",
"Choose the field the columns come from": "Choisir le champ dont viennent les colonnes",
"Choose the order": "Choisir l’ordre",
"Clear filter": "Effacer le filtre",
+ "Clear formatting": "Effacer la mise en forme",
+ "Clip added ({size})": "Clip ajouté ({size})",
"Close": "Fermer",
+ "Code": "Code",
"Collapsed toggles always print open. Your browser's print dialog has the \"Save as PDF\" option.": "Les bascules repliées s’impriment toujours dépliées. La boîte d’impression de votre navigateur propose « Enregistrer au format PDF ».",
+ "Color": "Couleur",
"Column": "Colonne",
+ "Columns": "Colonnes",
"Comfortable for reading": "Confortable à lire",
+ "Comment": "Commentaire",
+ "Comment on this page": "Commenter cette page",
+ "Comment · block": "Commentaire · bloc",
+ "Comment · page": "Commentaire · page",
+ "Comment:": "Commentaire :",
+ "Connect to the live session without saving a new copy — copies you sent earlier will meet you there.": "Connectez-vous à la session live sans enregistrer de copie — les copies déjà envoyées vous y rejoindront.",
+ "Connecting…": "Connexion…",
"Contents": "Sommaire",
"Contents page": "Page de sommaire",
+ "Controls": "Contrôles",
+ "Copied ✓": "Copié ✓",
"Copy document JSON": "Copier le JSON du document",
"Copy saved": "Copie enregistrée",
"Copy saved — you are still editing the original": "Copie enregistrée — vous modifiez toujours l'original",
"Copy the document JSON": "Copier le JSON du document",
"Could not reach the update channel.": "Impossible de joindre le canal de mise à jour.",
"Could not verify an update, so nothing was changed.": "Impossible de vérifier une mise à jour, rien n’a été modifié.",
+ "Couldn’t access the clipboard": "Impossible d'accéder au presse-papiers",
+ "Couldn’t reach the live session": "Impossible de joindre la session live",
"Create “{name}”": "Créer « {name} »",
+ "Dark": "Sombre",
+ "Default": "Par défaut",
"Delete": "Supprimer",
"Delete “{name}”?": "Supprimer « {name} » ?",
"Delete…": "Supprimer…",
"Descending": "Décroissant",
+ "Description": "Description",
"Discard": "Ignorer",
+ "Document": "Document",
+ "Document JSON copied": "JSON du document copié",
+ "Document id": "Identifiant du document",
+ "Document properties": "Propriétés du document",
+ "Document replaced — ⌘Z undoes": "Document remplacé — ⌘Z annule",
+ "Download updated copy": "Télécharger la copie à jour",
+ "Downloaded ✓": "Téléchargé ✓",
"Downloaded. Open the new file — this one is unchanged.": "Téléchargé. Ouvrez le nouveau fichier — celui-ci est inchangé.",
+ "Downloads a backup of the current version, then rewrites this file on disk as the new version — document untouched.": "Télécharge une sauvegarde de la version actuelle, puis réécrit ce fichier avec la nouvelle version — document intact.",
"Drag to move, click for block options": "Glissez pour déplacer, cliquez pour les options du bloc",
+ "Drag to resize this column": "Faites glisser pour redimensionner cette colonne",
"Drag to resize · double-click to reset": "Glisser pour redimensionner · double-clic pour réinitialiser",
"Drop .md files or a folder here": "Déposez ici des fichiers .md ou un dossier",
"Duplicate": "Dupliquer",
+ "Duplicate as a new space…": "Dupliquer comme nouvel espace…",
"Each .md file becomes a page, folders become the page tree, and [[wikilinks]] become real links. Pages are added — nothing here is replaced.": "Chaque fichier .md devient une page, les dossiers deviennent l’arborescence des pages, et les [[wikilinks]] deviennent de vrais liens. Les pages s’ajoutent — rien n’est remplacé.",
+ "Edit": "Modifier",
+ "Edit this link card": "Modifier cette carte de lien",
"Edited": "Modifié",
"Editing": "Édition",
+ "Editor": "Éditeur",
+ "Editor copy saved — recipients join live with edit access": "Copie éditeur enregistrée — les destinataires rejoignent la session en direct avec accès en écriture",
"Encrypt the document inside this file": "Chiffrer le document à l’intérieur de ce fichier",
"Enter the password to open it.": "Saisissez le mot de passe pour l’ouvrir.",
+ "Every page opens wide on this screen from now on": "Désormais toutes les pages s’ouvrent en large sur cet écran",
"Every page, as one .md file": "Toutes les pages, en un seul fichier .md",
+ "Everything in this space is replaced by what you paste. ⌘Z undoes it, but only while this window stays open.": "Tout ce que contient cet espace est remplacé par ce que vous collez. ⌘Z annule l’opération, mais seulement tant que cette fenêtre reste ouverte.",
+ "Export": "Exporter",
+ "Export a page as a space": "Exporter une page comme espace",
"Export as Markdown": "Exporter en Markdown",
"Export as Markdown…": "Exporter en Markdown…",
+ "Export page as a space…": "Exporter la page comme espace…",
+ "Exported {n} page(s) as a new space": "{n} page(s) exportée(s) comme nouvel espace",
"File": "Fichier",
"Fills the window": "Occupe toute la fenêtre",
"Filter": "Filtrer",
@@ -87,10 +163,17 @@ export const fr: Catalog = {
"Find": "Rechercher",
"Find in this space…": "Rechercher dans cet espace…",
"Find or create a page…": "Trouver ou créer une page…",
+ "Following — view only": "Suivi en cours — lecture seule",
"Full width": "Pleine largeur",
+ "Gray": "Gris",
+ "Green": "Vert",
"Group": "Grouper",
"Guest": "Invité",
+ "Header row": "Ligne d’en-tête",
+ "Hide properties (])": "Masquer les propriétés (])",
"Hide the page list ([)": "Masquer la liste des pages ([)",
+ "Highlight": "Surlignage",
+ "Highlight — ⇧⌘H": "Surlignage — ⇧⌘H",
"Icon": "Icône",
"Image added ({size})": "Image ajoutée ({size})",
"Image added, resized to fit ({from} → {to})": "Image ajoutée, redimensionnée ({from} → {to})",
@@ -101,35 +184,60 @@ export const fr: Catalog = {
"Import Markdown…": "Importer du Markdown…",
"Important": "Important",
"Imported": "Importé",
+ "Imported a space": "Espace importé",
"Imported notes": "Notes importées",
"Include archived pages": "Inclure les pages archivées",
"Include the image files and they are embedded too. An image this browser cannot open is kept as its path rather than as a broken picture.": "Ajoutez les fichiers image et ils sont intégrés eux aussi. Une image que ce navigateur ne peut pas ouvrir reste sous forme de chemin, plutôt qu’en image cassée.",
+ "Include the pages nested under it": "Inclure les pages imbriquées en dessous",
+ "Inline code — ⌘E": "Code en ligne — ⌘E",
"Insert": "Insérer",
"Insert a block — text, headings, lists, code, images": "Insérer un bloc — texte, titres, listes, code, images",
"Interface language": "Langue de l’interface",
+ "Interface theme": "Thème de l’interface",
"Invite someone…": "Inviter quelqu’un…",
+ "Invite to edit…": "Inviter à éditer…",
"Issues": "Tickets",
+ "Italic": "Italique",
+ "Italic — ⌘I": "Italique — ⌘I",
+ "Journal date": "Date du journal",
+ "Key-verified identity": "Identité vérifiée par clé",
"Language": "Langue",
"Language follows whoever opens the file. It is never written into the document.": "La langue suit la personne qui ouvre le fichier. Elle n’est jamais écrite dans le document.",
"Language — what this block is highlighted as": "Langage — la coloration de ce bloc",
+ "Last saved": "Dernier enregistrement",
+ "Launch check couldn't reach the release server ({m}). Check manually below.": "La vérification au démarrage n'a pas atteint le serveur ({m}). Vérifiez manuellement ci-dessous.",
"Leave it empty to use the tone mark": "Laissez vide pour utiliser le symbole du type",
+ "Light": "Clair",
+ "Link": "Lien",
+ "Link address": "Adresse du lien",
+ "Link card": "Carte de lien",
"Link to page": "Lier à une page",
+ "Link — ⌘K": "Lien — ⌘K",
+ "Linked": "Lié",
"Linked from": "Liens entrants",
"Links to it become dead": "Les liens vers elle seront rompus",
"List": "Liste",
+ "Live": "En direct",
"Live — nobody else is here yet": "En direct — personne d’autre pour l’instant",
"Live — send someone the file to bring them in": "En direct — envoyez le fichier à quelqu’un pour qu’il rejoigne",
"Live — {n} other people are here": "En direct — {n} autres personnes sont là",
+ "Load this audio": "Charger cet audio",
"Load this image": "Charger cette image",
+ "Load this video": "Charger cette vidéo",
+ "Loop": "Boucle",
"Make this page an issue": "Transformer cette page en ticket",
"Manual order": "Ordre manuel",
+ "Match my system": "Comme le système",
+ "Mints brand-new keys. Every previously sent copy stops syncing for good; share fresh copies afterwards.": "Génère des clés toutes neuves. Chaque copie déjà envoyée cesse définitivement de se synchroniser ; partagez ensuite de nouvelles copies.",
"More": "Plus",
"Move down": "Descendre",
"Move up": "Monter",
+ "Muted": "Muet",
"New issue": "Nouveau ticket",
"New page": "Nouvelle page",
"New page (⌘⌥N)": "Nouvelle page (⌘⌥N)",
"New page inside": "Nouvelle page à l’intérieur",
+ "New to Bento? Find templates, the gallery and the AI editing guide at {home} — or ⭐ it on {gh}.": "Nouveau sur Bento ? Trouvez des modèles, la galerie et le guide d’édition par IA sur {home} — ou mettez une ⭐ sur {gh}.",
"Next (⏎)": "Suivant (⏎)",
"No Markdown files in that selection": "Aucun fichier Markdown dans cette sélection",
"No block matches": "Aucun bloc correspondant",
@@ -138,51 +246,104 @@ export const fr: Catalog = {
"No issues yet. Add a status field to any page and it appears here.": "Aucun ticket pour l’instant. Ajoutez un champ statut à une page et elle apparaîtra ici.",
"No pages yet": "Aucune page pour l’instant",
"Nobody else is here yet": "Personne d’autre pour l’instant",
+ "Not in this file: it needs the network, and the site is told when someone opens the page": "N’est pas dans ce fichier : la lecture nécessite le réseau, et ce site saura que quelqu’un a ouvert cette page",
+ "Not live — turns on when you share": "Hors ligne — s’active quand vous partagez",
"Not loaded — opening it would tell that site you opened this space.": "Non chargée : la charger indiquerait à ce site que vous avez ouvert cet espace.",
"Not sharing yet — click to start a live session": "Pas encore partagé — cliquez pour démarrer une session en direct",
"Note": "Note",
"Nothing found": "Aucun résultat",
+ "Nothing is fetched. A card shows what you type here — opening this space never contacts the site.": "Rien n’est récupéré. La carte affiche ce que vous saisissez ici — ouvrir cet espace ne contacte jamais le site.",
"Nothing leaves this file until you start a session.": "Rien ne quitte ce fichier tant que vous n’avez pas démarré de session.",
"Now an issue": "C’est désormais un ticket",
"Off by default — they were archived for a reason": "Désactivé par défaut — elles ont été archivées pour une raison",
+ "Offline mode is on — nothing leaves this computer.": "Le mode hors ligne est activé — rien ne quitte cet ordinateur.",
+ "On this screen only — it is not saved in the file": "Sur cet écran seulement — ce n’est pas enregistré dans le fichier",
+ "One emoji": "Un emoji",
+ "One fewer": "Un de moins",
+ "One line about what is there": "Une ligne sur ce qui s’y trouve",
+ "One more": "Un de plus",
+ "One page and what is under it, as its own file": "Une page et ce qui se trouve dessous, dans son propre fichier",
+ "Only pages that ask for it": "Seulement les pages qui le demandent",
+ "Only the owner of this space can invite people": "Seul le propriétaire de cet espace peut inviter des personnes",
"Open only": "Ouverts seulement",
+ "Orange": "Orange",
"Other": "Autres",
"Other ways to save": "Autres façons d’enregistrer",
"Out of the sidebar, still searchable and linkable": "Hors de la barre latérale, toujours dans la recherche et les liens",
+ "Owner": "Propriétaire",
+ "Page": "Page",
"Page options": "Options de la page",
"Pages": "Pages",
+ "Pages open at their normal width again": "Les pages retrouvent leur largeur normale",
"Pages — show or hide the page list": "Pages — afficher ou masquer la liste",
"Password": "Mot de passe",
"Password removed. Save to write the space unencrypted.": "Mot de passe supprimé. Enregistrez pour écrire l’espace non chiffré.",
"Password set. Save to write the space encrypted.": "Mot de passe défini. Enregistrez pour écrire l’espace chiffré.",
"Password…": "Mot de passe…",
+ "Paste document JSON here…": "Collez le JSON du document ici…",
+ "Paste or type a link": "Collez ou saisissez un lien",
"People in this space": "Personnes dans cet espace",
+ "Picture": "Image",
+ "Picture…": "Image…",
+ "Pink": "Rose",
"Plain text": "Texte brut",
+ "Poster": "Affiche",
+ "Poster…": "Affiche…",
"Previous (⇧⏎)": "Précédent (⇧⏎)",
"Print": "Imprimer",
"Print / PDF…": "Imprimer / PDF…",
"Print or save as PDF": "Imprimer ou enregistrer en PDF",
"Print or save as PDF (⌘P)": "Imprimer ou enregistrer en PDF (⌘P)",
"Print…": "Imprimer…",
+ "Properties": "Propriétés",
+ "Properties — show or hide this block’s settings": "Propriétés — afficher ou masquer les réglages de ce bloc",
+ "Purple": "Violet",
+ "Put the caret in a block to see what it can be.": "Placez le curseur dans un bloc pour voir ce qui s’y règle.",
+ "Read the release notes for v{v} (opens in a new tab)": "Lire les notes de version de la v{v} (s’ouvre dans un nouvel onglet)",
+ "Read-only copy saved — it follows the live session, view only": "Copie en lecture seule enregistrée — elle suit la session en direct, en lecture seule",
+ "Reading file…": "Lecture du fichier…",
"Reading image…": "Lecture de l’image…",
"Reading view": "Mode lecture",
"Reading view — press Esc or the eye to edit": "Vue lecture — appuyez sur Esc ou sur l’œil pour modifier",
"Reading view — the pages without the editing tools": "Vue lecture — les pages sans les outils d’édition",
"Reading {n} file(s)…": "Lecture de {n} fichier(s)…",
+ "Red": "Rouge",
"Redo": "Rétablir",
"Redo (⇧⌘Z)": "Rétablir (⇧⌘Z)",
+ "Reload into new version": "Recharger dans la nouvelle version",
+ "Remove": "Retirer",
"Remove password…": "Supprimer le mot de passe…",
+ "Remove the password": "Supprimer le mot de passe",
+ "Remove the password?": "Supprimer le mot de passe ?",
"Remove the password? The next save writes the document in the clear.": "Supprimer le mot de passe ? Le prochain enregistrement écrira le document en clair.",
+ "Remove the picture": "Retirer l’image",
+ "Remove this column": "Supprimer cette colonne",
+ "Remove this row": "Supprimer cette ligne",
+ "Remove {name} from this space? Their copy drops to read-only.": "Retirer {name} de cet espace ? Sa copie passera en lecture seule.",
+ "Remove {name} — revokes this device’s access; everyone else is unaffected": "Retirer {name} — révoque l’accès de cet appareil ; personne d’autre n’est affecté",
"Rename": "Renommer",
+ "Reopen": "Rouvrir",
+ "Repeat when it reaches the end": "Recommencer à la fin",
+ "Replace": "Remplacer",
"Replace all": "Tout remplacer",
+ "Replace every page from pasted JSON?": "Remplacer toutes les pages par le JSON collé ?",
+ "Replace from JSON…": "Remplacer depuis JSON…",
+ "Replace picture": "Remplacer l’image",
"Replace with": "Remplacer par",
"Replace with…": "Remplacer par…",
"Replace {n} occurrence(s) across the whole space?": "Remplacer {n} occurrence(s) dans tout l’espace ?",
"Replaced": "Remplacé",
+ "Replace…": "Remplacer…",
+ "Reply": "Répondre",
+ "Reply…": "Répondre…",
+ "Reset access? Every copy you’ve sent stops syncing; only copies saved after this can join.": "Réinitialiser l’accès ? Toutes les copies envoyées cesseront de se synchroniser ; seules celles enregistrées ensuite pourront rejoindre.",
+ "Reset access…": "Réinitialiser l’accès…",
"Resized": "Redimensionnée",
+ "Resolve": "Résoudre",
"Restore": "Restaurer",
"Restore to the page list": "Restaurer dans la liste des pages",
"Room for a board or a table": "De la place pour un tableau",
+ "Rows": "Lignes",
"Save": "Enregistrer",
"Save (⌘S)": "Enregistrer (⌘S)",
"Save a copy…": "Enregistrer une copie…",
@@ -190,6 +351,7 @@ export const fr: Catalog = {
"Saved": "Enregistré",
"Saved a new copy": "Nouvelle copie enregistrée",
"Saves a copy that joins this session": "Enregistre une copie qui rejoint cette session",
+ "Saves a copy to send. Whoever opens it edits this space live with you (end-to-end encrypted); you stay the owner and can remove them from the People list.": "Enregistre une copie à envoyer. Qui l’ouvre édite cet espace en direct avec vous (chiffré de bout en bout) ; vous restez propriétaire et pouvez les retirer de la liste Personnes.",
"Saving…": "Enregistrement…",
"Search": "Rechercher",
"Search all pages (⌘K)": "Rechercher dans toutes les pages (⌘K)",
@@ -199,32 +361,58 @@ export const fr: Catalog = {
"Share this space": "Partager cet espace",
"Show as a board": "Afficher en tableau",
"Show as a list": "Afficher en liste",
+ "Show playback controls to the reader": "Afficher les contrôles de lecture au lecteur",
+ "Show properties (])": "Afficher les propriétés (])",
"Show the page list ([)": "Afficher la liste des pages ([)",
+ "Shown next to your cursor and in the People list — stored only in this browser.": "Affiché près de votre curseur et dans la liste Personnes — stocké uniquement dans ce navigateur.",
+ "Site name": "Nom du site",
"Sort": "Trier",
"Space name": "Nom de l’espace",
"Start live session": "Démarrer la session en direct",
+ "Start silent": "Démarrer sans le son",
"Stop sharing": "Arrêter le partage",
+ "Stop widening every page": "Ne plus élargir toutes les pages",
"Stopped sharing": "Partage arrêté",
+ "Strikethrough": "Barré",
+ "Strikethrough — ⇧⌘S": "Barré — ⇧⌘S",
"Take it elsewhere": "Emportez-le ailleurs",
+ "Taken from the address if blank": "Si vide, repris de l’adresse",
+ "Text": "Texte",
+ "Text and background color": "Couleur du texte et du fond",
+ "Text formatting": "Mise en forme du texte",
"That change is too large to share live (about 1 MB max). It’s saved in your copy, but collaborators won’t see it.": "Cette modification est trop volumineuse pour le partage en direct (environ 1 Mo max). Elle est enregistrée dans votre copie, mais les collaborateurs ne la verront pas.",
+ "That file could not be read": "Ce fichier n’a pas pu être lu",
"That file could not be read as an image": "Ce fichier n’a pas pu être lu comme une image",
+ "That file is not a bento/spaces document": "Ce fichier n’est pas un document bento/spaces",
"That image is too large to share live (about 1 MB max). It’s saved in your copy, but collaborators won’t see it.": "Cette image est trop volumineuse pour le partage en direct (environ 1 Mo max). Elle est enregistrée dans votre copie, mais les collaborateurs ne la verront pas.",
+ "That is not a bento/spaces document": "Ce n’est pas un document bento/spaces",
"That is {n} files — importing them all may take a moment. Continue?": "Cela fait {n} fichiers — tout importer peut prendre un moment. Continuer ?",
+ "That needs to be an http or https address": "Il faut une adresse http ou https",
+ "That space is password-protected. Open it, then export the pages you want.": "Cet espace est protégé par un mot de passe. Ouvrez-le, puis exportez-en les pages voulues.",
+ "The counterpart of Copy document JSON: edit a space in another tool, then bring it back.": "Le pendant de Copier le JSON du document : modifiez un espace dans un autre outil, puis ramenez-le ici.",
"The day after": "Le lendemain",
"The day before": "La veille",
"The document block is not shaped like a space — {detail}.": "Le bloc de document n’a pas la forme d’un espace — {detail}.",
"The document block is not valid JSON — {detail}.": "Le bloc de document n’est pas du JSON valide — {detail}.",
+ "The document, the editor and the search are all in this one file. Opening it needs nothing else — no server, no account, no install.": "Le document, l’éditeur et la recherche tiennent tous dans ce seul fichier. L’ouvrir ne demande rien d’autre : ni serveur, ni compte, ni installation.",
"The images in these notes come to {size} so far, and they all travel inside the file. Keep embedding them?": "Les images de ces notes font déjà {size}, et elles voyagent toutes dans le fichier. Continuer à les intégrer ?",
"The live session couldn’t store that change. It’s saved in your copy, but collaborators won’t see it.": "La session en direct n’a pas pu enregistrer cette modification. Elle est enregistrée dans votre copie, mais les collaborateurs ne la verront pas.",
+ "The next save writes this space as plain, readable JSON — anybody who opens the file can read every page.": "Le prochain enregistrement écrira cet espace en JSON lisible : quiconque ouvre le fichier pourra lire toutes les pages.",
+ "The page becomes a new file of its own: a whole space, with a new document id and none of this one’s sharing keys.": "La page devient un fichier à part entière : un espace complet, avec un nouvel identifiant de document et aucune des clés de partage de celui-ci.",
"The pages without the editing tools": "Les pages sans les outils d'édition",
"The rest name notes that were not in the selection, and are left as text.": "Les autres désignent des notes absentes de la sélection et restent en texte.",
+ "The theme follows whoever opens the file. It is never written into the document.": "Le thème suit la personne qui ouvre le fichier. Il n’est jamais écrit dans le document.",
"The whole space": "Tout l’espace",
"The whole space, or just this page": "Tout l’espace, ou seulement cette page",
"Then send someone the file": "Envoyez ensuite le fichier à quelqu’un",
"These windows are on this computer. Start a session to work with someone elsewhere.": "Ces fenêtres sont sur cet ordinateur. Démarrez une session pour travailler avec quelqu’un ailleurs.",
+ "This block has no settings of its own — its content is all of it.": "Ce bloc n’a pas de réglages à lui — son contenu, c’est tout.",
+ "This block’s settings, and the page’s": "Les réglages de ce bloc, et ceux de la page",
"This browser cannot write back to the file, so every save makes a new copy. Chrome and Edge on a computer can save in place.": "Ce navigateur ne peut pas réécrire le fichier : chaque enregistrement crée donc une nouvelle copie. Chrome et Edge sur ordinateur enregistrent sur place.",
+ "This clip is {size} and travels inside the file, making it that much bigger for everyone you send it to. Embed it anyway?": "Ce clip fait {size} et voyage dans le fichier, ce qui l’alourdit d’autant pour toutes les personnes à qui vous l’envoyez. L’intégrer quand même ?",
"This copy goes offline; the others carry on": "Cette copie passe hors ligne ; les autres continuent",
"This file": "Ce fichier",
+ "This file carries its own app — it works offline, forever, as is.": "Ce fichier embarque sa propre application — il fonctionne hors ligne, pour toujours, tel quel.",
"This file could not be opened": "Ce fichier n’a pas pu être ouvert",
"This file declares rules this build does not know. It is open read-only so nothing is lost.": "Ce fichier déclare des règles que cette version ne connaît pas. Il est ouvert en lecture seule pour ne rien perdre.",
"This file is open read-only": "Ce fichier est ouvert en lecture seule",
@@ -232,19 +420,30 @@ export const fr: Catalog = {
"This image is {size} and travels inside the file, making it that much bigger for everyone you send it to. Embed it anyway?": "Cette image fait {size} et voyage dans le fichier, ce qui l’alourdit d’autant pour toutes les personnes à qui vous l’envoyez. L’intégrer quand même ?",
"This image was resized to keep the file small. Click to replace it with the original.": "Cette image a été redimensionnée pour garder le fichier léger. Cliquez pour la remplacer par l’originale.",
"This is a reading copy. It opens for reading; nothing you do here changes the file.": "Ceci est une copie de lecture. Elle s'ouvre en lecture ; rien de ce que vous faites ici ne modifie le fichier.",
+ "This is a view-only copy — it follows the live session but can’t change this space.": "Ceci est une copie en lecture seule — elle suit la session live mais ne peut pas modifier cet espace.",
"This is not a bento/spaces document — {detail}.": "Ce n’est pas un document bento/spaces — {detail}.",
"This live session has run out of room. Your change is saved in your copy, but collaborators won’t see it.": "Cette session en direct n’a plus de place. Votre modification est enregistrée dans votre copie, mais les collaborateurs ne la verront pas.",
"This page only": "Cette page seulement",
+ "This space has no live session to follow": "Cet espace n’a pas de session live à suivre",
"This space has no pages.": "Cet espace n’a aucune page.",
"This space is encrypted. Saves stay encrypted.": "Cet espace est chiffré. Les enregistrements restent chiffrés.",
"This space is locked": "Cet espace est verrouillé",
+ "This window is still running v{v} — reload to finish. A v{v} backup was downloaded.": "Cette fenêtre tourne encore en v{v} — rechargez pour terminer. Une sauvegarde v{v} a été téléchargée.",
+ "This window is still running v{v} — reload to finish. A v{v} backup was saved beside this file.": "Cette fenêtre tourne encore en v{v} — rechargez pour terminer. Une sauvegarde v{v} a été enregistrée à côté de ce fichier.",
+ "This window is still running v{v}. If you overwrote the file that's open here, reload; otherwise open the file you saved.": "Cette fenêtre tourne encore en v{v}. Si vous avez écrasé le fichier ouvert ici, rechargez ; sinon ouvrez le fichier enregistré.",
+ "This window keeps running v{v} until you open the downloaded file.": "Cette fenêtre reste en v{v} jusqu'à l'ouverture du fichier téléchargé.",
"Those files could not be read": "Ces fichiers n’ont pas pu être lus",
"Tip": "Astuce",
+ "Title": "Titre",
"Today": "Aujourd’hui",
"Today's journal": "Journal du jour",
+ "Tone": "Ton",
"Too many changes at once — live sync is catching up.": "Trop de modifications à la fois — la synchronisation en direct rattrape son retard.",
+ "Top level": "Premier niveau",
"Turn into…": "Convertir en…",
"Type / for blocks, [[ to link a page": "Tapez / pour les blocs, [[ pour lier une page",
+ "Underline": "Souligné",
+ "Underline — ⌘U": "Souligné — ⌘U",
"Undo (⌘Z)": "Annuler (⌘Z)",
"Unlock": "Déverrouiller",
"Unlocked, but the document inside could not be read.": "Déverrouillé, mais le document à l’intérieur n’a pas pu être lu.",
@@ -252,38 +451,82 @@ export const fr: Catalog = {
"Unsaved changes — ⌘S downloads an updated copy": "Modifications non enregistrées — ⌘S télécharge une copie à jour",
"Unsaved changes — ⌘S rewrites this file": "Modifications non enregistrées — ⌘S réécrit ce fichier",
"Untitled": "Sans titre",
+ "Update failed: {m}": "Échec de la mise à jour : {m}",
"Update this file": "Mettre à jour ce fichier",
+ "Update this file…": "Mettre à jour ce fichier…",
+ "Updated to v{v} on disk.": "Mis à jour en v{v} sur le disque.",
"Updates": "Mises à jour",
+ "Use a link…": "Utiliser un lien…",
+ "Use this width for every page": "Utiliser cette largeur pour toutes les pages",
+ "Verifies and builds the new version with this document inside, then asks where to save it — pick the file you have open to update it.": "Vérifie et construit la nouvelle version avec ce document, puis demande où l'enregistrer — choisissez le fichier ouvert pour le mettre à jour.",
+ "Verifying…": "Vérification…",
"Version {v} is available.": "La version {v} est disponible.",
"Version, language, password, exports": "Version, langue, mot de passe, exports",
+ "Video": "Vidéo",
+ "Video from {host}": "Vidéo provenant de {host}",
+ "View-only copy — it follows the live session but can’t change this space.": "Copie en lecture seule — elle suit la session live mais ne peut pas modifier cet espace.",
+ "View-only copy — it holds no signing key.": "Copie en lecture seule — elle ne détient aucune clé de signature.",
+ "View-only copy…": "Copie en lecture seule…",
+ "Viewer": "Spectateur",
"Visit bento.page (opens in a new tab)": "Aller sur bento.page (nouvel onglet)",
"Warning": "Avertissement",
+ "Web address": "Adresse web",
+ "What is in the picture": "Ce que montre l’image",
+ "What this is": "Ce que c’est",
+ "What’s new →": "Nouveautés →",
"Wide": "Large",
"Width": "Largeur",
+ "Width %": "Largeur %",
"Width in the text column": "Largeur dans la colonne de texte",
+ "Windows on this computer still sync; turn offline mode off in About to work with someone elsewhere.": "Les fenêtres de cet ordinateur restent synchronisées ; désactivez le mode hors ligne dans « À propos » pour travailler avec quelqu’un ailleurs.",
+ "Words": "Mots",
"Wrong password — try again": "Mot de passe incorrect — réessayez",
+ "Yellow": "Jaune",
"You have the newest version ({v}).": "Vous avez la dernière version ({v}).",
+ "Your key on THIS device: {fp}. Another device counts as a new person until the owner removes it.": "Votre clé sur CET appareil : {fp}. Un autre appareil compte comme une nouvelle personne jusqu’à son retrait par le propriétaire.",
"Your name": "Votre nom",
+ "Your name (shown on comments):": "Votre nom (affiché sur les commentaires) :",
+ "Your name (shown on new comments):": "Votre nom (affiché sur les nouveaux commentaires) :",
"archived": "archivée",
+ "bento/spaces is MIT-licensed and carries no third-party runtime — the full notices travel in this file’s source.": "bento/spaces est sous licence MIT et n’embarque aucun runtime tiers — les mentions complètes voyagent dans le source de ce fichier.",
"bento/spaces {version} · {pages} page(s), {blocks} block(s). The document, the editor and the search are all in this one file.": "bento/spaces {version} · {pages} page(s), {blocks} bloc(s). Le document, l’éditeur et la recherche tiennent tous dans ce seul fichier.",
"format v{v}": "format v{v}",
+ "just now": "à l'instant",
"none": "aucun",
+ "you": "vous",
+ "you: {name} ✎": "vous : {name} ✎",
+ "{blocks} blocks · {words} words · {links} links in": "{blocks} blocs · {words} mots · {links} liens entrants",
"{i} of {n}": "{i} sur {n}",
"{name} joined": "{name} a rejoint",
"{name} left": "{name} est parti",
+ "{name} was removed": "{name} a été retiré",
+ "{n} connected": "{n} connectés",
"{n} duplicate or missing id(s) were repaired so links and pages resolve.": "{n} id(s) en double ou manquant(s) ont été réparés pour que les liens et les pages se résolvent.",
+ "{n} embedded image(s) and clip(s) account for {size} of that — {pct}%. Everything else is text.": "{n} image(s) et clip(s) intégrés représentent {size}, soit {pct}%. Tout le reste est du texte.",
"{n} found": "{n} résultat(s)",
+ "{n} id(s) were renamed because this space already used them, and the links inside the import follow them.": "{n} identifiant(s) ont été renommés car cet espace les utilisait déjà, et les liens de l’import les suivent.",
+ "{n} image(s) came too.": "{n} image(s) sont venues aussi.",
"{n} image(s) could not be opened, so their paths are kept as text. Import again with the image files included.": "{n} image(s) n’ont pas pu être ouvertes ; leurs chemins restent en texte. Réimportez en incluant les fichiers image.",
"{n} image(s) embedded ({size}).": "{n} image(s) intégrée(s) ({size}).",
+ "{n} image(s) go with them; the rest stay here.": "{n} image(s) partent avec elles ; les autres restent ici.",
"{n} image(s) point at the web. Nothing loads until a reader asks.": "{n} image(s) pointent vers le web. Rien ne se charge tant qu’un lecteur ne le demande pas.",
"{n} image(s) were left as paths because embedding stopped there.": "{n} image(s) restent sous forme de chemin, l’intégration s’étant arrêtée là.",
+ "{n} link(s) named pages that were not in that file, and are kept as text.": "{n} lien(s) nommaient des pages absentes de ce fichier et sont conservés en texte.",
+ "{n} link(s) point outside them and are kept as text naming the page they meant.": "{n} lien(s) pointent en dehors et sont conservés en texte, avec le nom de la page visée.",
"{n} link(s) to it will stop working.": "{n} lien(s) vers elle ne fonctionneront plus.",
"{n} note name(s) appear more than once, so links naming them all went to the first.": "{n} nom(s) de note apparaissent plusieurs fois : les liens portant ce nom pointent tous vers le premier.",
"{n} of {total} wikilink(s) resolved.": "{n} wikilien(s) sur {total} résolus.",
"{n} page(s) had frontmatter, kept verbatim in a folded block.": "{n} page(s) avaient un frontmatter, conservé tel quel dans un bloc replié.",
"{n} page(s) inside it move up a level.": "{n} page(s) qu’elle contient remonteront d’un niveau.",
"{n} pages, in sidebar order, with a contents page": "{n} pages, dans l’ordre de la barre latérale, avec une page de sommaire",
+ "{n} table(s) imported, with their column alignment.": "{n} tableau(x) importé(s), avec l’alignement de leurs colonnes.",
"{n} table(s) kept as text: there is no table block in this format yet.": "{n} tableau(x) conservés en texte : ce format n’a pas encore de bloc tableau.",
+ "{n} unresolved comment(s)": "{n} commentaire(s) non résolu(s)",
+ "{n}d ago": "il y a {n} j",
+ "{n}h ago": "il y a {n} h",
+ "{n}m ago": "il y a {n} min",
+ "{pages} page(s) and {blocks} block(s) added from that space.": "{pages} page(s) et {blocks} bloc(s) ajoutés depuis cet espace.",
"{pages} page(s) and {blocks} block(s) added from {files} file(s).": "{pages} page(s) et {blocks} bloc(s) ajoutés depuis {files} fichier(s).",
+ "{pages} page(s) and {blocks} block(s) will travel.": "{pages} page(s) et {blocks} bloc(s) feront le voyage.",
"⌘Z removes the imported pages again.": "⌘Z supprime à nouveau les pages importées.",
}
diff --git a/spaces/src/i18n/it.ts b/spaces/src/i18n/it.ts
index 87a8de04..afe43bee 100644
--- a/spaces/src/i18n/it.ts
+++ b/spaces/src/i18n/it.ts
@@ -13,73 +13,149 @@ import type { Catalog } from '../i18n'
export const it: Catalog = {
"A filter here is newer than this build and was not applied.": "Un filtro di questa vista è più recente di questa versione e non è stato applicato.",
"A folder of .md files becomes pages, with the folder tree and the [[wikilinks]] intact.": "Una cartella di file .md diventa pagine, con l’albero delle cartelle e i [[wikilink]] intatti.",
+ "A link with nothing in it yet": "Un collegamento ancora vuoto",
"A list of every page, in order": "Un elenco di tutte le pagine, in ordine",
+ "A live viewer: follows every edit as it happens but can never change this space — the relay enforces it.": "Un visualizzatore live: segue ogni modifica ma non può mai cambiare questo Space — imposto dal relay.",
"A page cannot contain itself": "Una pagina non può contenere sé stessa",
"A password encrypts the document inside the file. There is no recovery — lose it and the space is gone.": "Una password cifra il documento dentro il file. Non c’è modo di recuperarla — se la perdi, lo spazio è perso.",
"A second file — the original is left alone": "Un secondo file — l’originale resta intatto",
"A sort here is newer than this build and was not applied.": "Un ordinamento di questa vista è più recente di questa versione e non è stato applicato.",
"A space is never a dead end: the whole document is plain JSON in this file, and every page exports as Markdown.": "Uno spazio non è mai un vicolo cieco: l’intero documento è JSON puro dentro questo file, e ogni pagina si esporta in Markdown.",
"A space needs at least one page": "Uno spazio deve avere almeno una pagina",
+ "A still frame, shown before play — and what a printout or a file preview shows": "Un fotogramma fisso, mostrato prima della riproduzione — ed è quello che compare in stampa e nell’anteprima del file",
"About bento/spaces — version, updates, language, password": "Informazioni su bento/spaces — versione, aggiornamenti, lingua, password",
"About this space": "Informazioni su questo spazio",
+ "Access reset — only copies saved from now on can join": "Accesso reimpostato — solo le copie salvate d’ora in poi potranno unirsi",
"Add a block below": "Aggiungi un blocco sotto",
+ "Add a column after": "Aggiungi una colonna dopo",
+ "Add a link": "Aggiungi un collegamento",
+ "Add a picture": "Aggiungi un'immagine",
+ "Add a row below": "Aggiungi una riga sotto",
"Add below": "Aggiungi sotto",
+ "Add pages under": "Aggiungi le pagine sotto",
+ "Address of a video or audio file": "Indirizzo di un file video o audio",
"Adds status, priority, assignee, estimate": "Aggiunge stato, priorità, assegnatario e stima",
+ "All text. Nothing is embedded, so this file is as small as a space gets.": "Solo testo. Non c’è nulla di incorporato, quindi questo file è il più piccolo possibile per uno spazio.",
"Already an issue": "È già una issue",
"Also open in another window on this computer — not shared online": "Aperto anche in un’altra finestra di questo computer — non condiviso online",
+ "Alt text": "Testo alternativo",
+ "An update check is the only network this app makes on its own. It asks the release server for a signed manifest and sends nothing about you or this document — no ids, no telemetry.": "Il controllo degli aggiornamenti è l’unica connessione di rete che questa app apre da sola. Chiede al server delle versioni un manifesto firmato e non invia nulla su di te o su questo documento: nessun identificativo, nessuna telemetria.",
+ "Another bento/spaces file arrives as pages under the one you choose — its images come too, and the links inside it keep working.": "Un altro file bento/spaces arriva come pagine sotto quella che scegli: arrivano anche le sue immagini e i collegamenti al suo interno continuano a funzionare.",
+ "Another bento/spaces file can arrive the same way, nested under any page.": "Un altro file bento/spaces può arrivare allo stesso modo, annidato sotto qualsiasi pagina.",
+ "Appearance": "Aspetto",
+ "Apply": "Applica",
"Archive": "Archivia",
+ "Archived": "Archiviata",
"Archived ({n})": "Archiviate ({n})",
"Ascending": "Crescente",
+ "Audio": "Audio",
+ "Audio from {host}": "Audio da {host}",
+ "Back": "Indietro",
+ "Background": "Sfondo",
+ "Block": "Blocco",
"Block options": "Opzioni del blocco",
+ "Blocks": "Blocchi",
+ "Blue": "Blu",
"Board": "Bacheca",
+ "Bold": "Grassetto",
+ "Bold — ⌘B": "Grassetto — ⌘B",
"Breadcrumb": "Percorso di navigazione",
"Bring notes in": "Portare dentro le note",
+ "Brown": "Marrone",
"Callout icon": "Icona del riquadro",
+ "Cancel": "Annulla",
+ "Careful": "Attenzione",
"Caution": "Attenzione",
+ "Change password…": "Cambia password…",
"Change the kind of callout": "Cambia il tipo di riquadro",
+ "Change the name used for your new comments and replies": "Cambia il nome usato per i tuoi nuovi commenti e risposte",
"Change this block’s type": "Cambia il tipo di questo blocco",
"Change this page's icon": "Cambia l’icona di questa pagina",
"Change {field}": "Cambia {field}",
"Check for updates": "Cerca aggiornamenti",
+ "Check for updates automatically at launch": "Cerca aggiornamenti automaticamente all'avvio",
+ "Checked automatically at launch — you're on the latest version (v{v}).": "Verificato automaticamente all'avvio — hai l'ultima versione (v{v}).",
"Checking is manual and verified: the download is signed, and its signature is checked against a key inside this file before anything is rewritten.": "La verifica è manuale e controllata: il download è firmato e la sua firma viene confrontata con una chiave contenuta in questo file prima che qualcosa venga riscritto.",
"Checking…": "Verifica in corso…",
"Choose .md files…": "Scegli file .md…",
+ "Choose a different file": "Scegli un altro file",
+ "Choose a file…": "Scegli un file…",
"Choose a folder…": "Scegli una cartella…",
"Choose a password. There is no way to recover it.": "Scegli una password. Non c’è modo di recuperarla.",
+ "Choose a space…": "Scegli uno spazio…",
"Choose the field the columns come from": "Scegli il campo da cui nascono le colonne",
"Choose the order": "Scegli l’ordine",
"Clear filter": "Azzera il filtro",
+ "Clear formatting": "Cancella formattazione",
+ "Clip added ({size})": "Clip aggiunta ({size})",
"Close": "Chiudi",
+ "Code": "Codice",
"Collapsed toggles always print open. Your browser's print dialog has the \"Save as PDF\" option.": "I blocchi comprimibili chiusi vengono sempre stampati aperti. La finestra di stampa del browser offre l’opzione «Salva come PDF».",
+ "Color": "Colore",
"Column": "Colonna",
+ "Columns": "Colonne",
"Comfortable for reading": "Comodo da leggere",
+ "Comment": "Commento",
+ "Comment on this page": "Commenta questa pagina",
+ "Comment · block": "Commento · blocco",
+ "Comment · page": "Commento · pagina",
+ "Comment:": "Commento:",
+ "Connect to the live session without saving a new copy — copies you sent earlier will meet you there.": "Connettiti alla sessione live senza salvare una nuova copia — le copie già inviate ti raggiungeranno qui.",
+ "Connecting…": "Connessione…",
"Contents": "Indice",
"Contents page": "Pagina indice",
+ "Controls": "Controlli",
+ "Copied ✓": "Copiato ✓",
"Copy document JSON": "Copia JSON del documento",
"Copy saved": "Copia salvata",
"Copy saved — you are still editing the original": "Copia salvata: stai ancora modificando l'originale",
"Copy the document JSON": "Copia il JSON del documento",
"Could not reach the update channel.": "Impossibile raggiungere il canale degli aggiornamenti.",
"Could not verify an update, so nothing was changed.": "Impossibile verificare l’aggiornamento, quindi non è stato modificato nulla.",
+ "Couldn’t access the clipboard": "Impossibile accedere agli appunti",
+ "Couldn’t reach the live session": "Impossibile raggiungere la sessione live",
"Create “{name}”": "Crea «{name}»",
+ "Dark": "Scuro",
+ "Default": "Predefinito",
"Delete": "Elimina",
"Delete “{name}”?": "Eliminare «{name}»?",
"Delete…": "Elimina…",
"Descending": "Decrescente",
+ "Description": "Descrizione",
"Discard": "Ignora",
+ "Document": "Documento",
+ "Document JSON copied": "JSON del documento copiato",
+ "Document id": "ID del documento",
+ "Document properties": "Proprietà del documento",
+ "Document replaced — ⌘Z undoes": "Documento sostituito — ⌘Z annulla",
+ "Download updated copy": "Scarica copia aggiornata",
+ "Downloaded ✓": "Scaricato ✓",
"Downloaded. Open the new file — this one is unchanged.": "Scaricato. Apri il nuovo file — questo resta invariato.",
+ "Downloads a backup of the current version, then rewrites this file on disk as the new version — document untouched.": "Scarica un backup della versione attuale, poi riscrive questo file come nuova versione — documento intatto.",
"Drag to move, click for block options": "Trascina per spostare, clicca per le opzioni del blocco",
+ "Drag to resize this column": "Trascina per ridimensionare questa colonna",
"Drag to resize · double-click to reset": "Trascina per ridimensionare · doppio clic per reimpostare",
"Drop .md files or a folder here": "Trascina qui file .md o una cartella",
"Duplicate": "Duplica",
+ "Duplicate as a new space…": "Duplica come nuovo spazio…",
"Each .md file becomes a page, folders become the page tree, and [[wikilinks]] become real links. Pages are added — nothing here is replaced.": "Ogni file .md diventa una pagina, le cartelle diventano l’albero delle pagine e i [[wikilink]] diventano link veri. Le pagine si aggiungono: qui non viene sostituito nulla.",
+ "Edit": "Modifica",
+ "Edit this link card": "Modifica questa scheda di collegamento",
"Edited": "Modificato",
"Editing": "In modifica",
+ "Editor": "Editor",
+ "Editor copy saved — recipients join live with edit access": "Copia editor salvata — chi la riceve entra live con accesso in modifica",
"Encrypt the document inside this file": "Cifra il documento dentro questo file",
"Enter the password to open it.": "Inserisci la password per aprirlo.",
+ "Every page opens wide on this screen from now on": "Da ora tutte le pagine si aprono larghe su questo schermo",
"Every page, as one .md file": "Tutte le pagine, in un unico file .md",
+ "Everything in this space is replaced by what you paste. ⌘Z undoes it, but only while this window stays open.": "Tutto ciò che si trova in questo spazio viene sostituito da quello che incolli. ⌘Z annulla l’operazione, ma solo finché questa finestra resta aperta.",
+ "Export": "Esporta",
+ "Export a page as a space": "Esportare una pagina come spazio",
"Export as Markdown": "Esporta come Markdown",
"Export as Markdown…": "Esporta come Markdown…",
+ "Export page as a space…": "Esporta la pagina come spazio…",
+ "Exported {n} page(s) as a new space": "{n} pagina/e esportata/e come nuovo spazio",
"File": "File",
"Fills the window": "Riempie la finestra",
"Filter": "Filtra",
@@ -87,10 +163,17 @@ export const it: Catalog = {
"Find": "Trova",
"Find in this space…": "Trova in questo spazio…",
"Find or create a page…": "Trova o crea una pagina…",
+ "Following — view only": "In ascolto — sola lettura",
"Full width": "Larghezza piena",
+ "Gray": "Grigio",
+ "Green": "Verde",
"Group": "Raggruppa",
"Guest": "Ospite",
+ "Header row": "Riga di intestazione",
+ "Hide properties (])": "Nascondi proprietà (])",
"Hide the page list ([)": "Nascondi l'elenco delle pagine ([)",
+ "Highlight": "Evidenziazione",
+ "Highlight — ⇧⌘H": "Evidenziazione — ⇧⌘H",
"Icon": "Icona",
"Image added ({size})": "Immagine aggiunta ({size})",
"Image added, resized to fit ({from} → {to})": "Immagine aggiunta, ridimensionata ({from} → {to})",
@@ -101,35 +184,60 @@ export const it: Catalog = {
"Import Markdown…": "Importa Markdown…",
"Important": "Importante",
"Imported": "Importato",
+ "Imported a space": "Spazio importato",
"Imported notes": "Note importate",
"Include archived pages": "Includi le pagine archiviate",
"Include the image files and they are embedded too. An image this browser cannot open is kept as its path rather than as a broken picture.": "Includi anche i file immagine e vengono incorporati. Un’immagine che questo browser non riesce ad aprire resta come percorso, invece che come immagine rotta.",
+ "Include the pages nested under it": "Includi le pagine annidate sotto di essa",
+ "Inline code — ⌘E": "Codice in linea — ⌘E",
"Insert": "Inserisci",
"Insert a block — text, headings, lists, code, images": "Inserisci un blocco — testo, titoli, elenchi, codice, immagini",
"Interface language": "Lingua dell’interfaccia",
+ "Interface theme": "Tema dell’interfaccia",
"Invite someone…": "Invita qualcuno…",
+ "Invite to edit…": "Invita a modificare…",
"Issues": "Issue",
+ "Italic": "Corsivo",
+ "Italic — ⌘I": "Corsivo — ⌘I",
+ "Journal date": "Data del diario",
+ "Key-verified identity": "Identità verificata da chiave",
"Language": "Lingua",
"Language follows whoever opens the file. It is never written into the document.": "La lingua segue chi apre il file. Non viene mai scritta nel documento.",
"Language — what this block is highlighted as": "Linguaggio — come viene evidenziato questo blocco",
+ "Last saved": "Ultimo salvataggio",
+ "Launch check couldn't reach the release server ({m}). Check manually below.": "La verifica all'avvio non ha raggiunto il server ({m}). Verifica manualmente qui sotto.",
"Leave it empty to use the tone mark": "Lascia vuoto per usare il simbolo del tipo",
+ "Light": "Chiaro",
+ "Link": "Collegamento",
+ "Link address": "Indirizzo del collegamento",
+ "Link card": "Scheda di collegamento",
"Link to page": "Collega a una pagina",
+ "Link — ⌘K": "Collegamento — ⌘K",
+ "Linked": "Collegata",
"Linked from": "Collegata da",
"Links to it become dead": "I collegamenti a questa pagina si interrompono",
"List": "Elenco",
+ "Live": "Dal vivo",
"Live — nobody else is here yet": "In diretta — non c’è ancora nessun altro",
"Live — send someone the file to bring them in": "In diretta — manda il file a qualcuno per farlo entrare",
"Live — {n} other people are here": "In diretta — ci sono altre {n} persone",
+ "Load this audio": "Carica questo audio",
"Load this image": "Carica questa immagine",
+ "Load this video": "Carica questo video",
+ "Loop": "Loop",
"Make this page an issue": "Trasforma questa pagina in una issue",
"Manual order": "Ordine manuale",
+ "Match my system": "Come il sistema",
+ "Mints brand-new keys. Every previously sent copy stops syncing for good; share fresh copies afterwards.": "Genera chiavi nuove di zecca. Ogni copia già inviata smette per sempre di sincronizzarsi; condividi poi copie nuove.",
"More": "Altro",
"Move down": "Sposta giù",
"Move up": "Sposta su",
+ "Muted": "Muto",
"New issue": "Nuova issue",
"New page": "Nuova pagina",
"New page (⌘⌥N)": "Nuova pagina (⌘⌥N)",
"New page inside": "Nuova pagina interna",
+ "New to Bento? Find templates, the gallery and the AI editing guide at {home} — or ⭐ it on {gh}.": "Nuovo su Bento? Trovi modelli, la galleria e la guida all’editing con IA su {home} — o metti una ⭐ su {gh}.",
"Next (⏎)": "Successivo (⏎)",
"No Markdown files in that selection": "Nessun file Markdown in questa selezione",
"No block matches": "Nessun blocco corrisponde",
@@ -138,51 +246,104 @@ export const it: Catalog = {
"No issues yet. Add a status field to any page and it appears here.": "Ancora nessuna issue. Aggiungi un campo stato a una pagina e comparirà qui.",
"No pages yet": "Ancora nessuna pagina",
"Nobody else is here yet": "Non c’è ancora nessun altro",
+ "Not in this file: it needs the network, and the site is told when someone opens the page": "Non è dentro questo file: per riprodurla serve la rete, e quel sito saprà che qualcuno ha aperto questa pagina",
+ "Not live — turns on when you share": "Non live — si attiva quando condividi",
"Not loaded — opening it would tell that site you opened this space.": "Non caricata: caricarla direbbe a quel sito che hai aperto questo spazio.",
"Not sharing yet — click to start a live session": "Non ancora condiviso — clicca per avviare una sessione dal vivo",
"Note": "Nota",
"Nothing found": "Nessun risultato",
+ "Nothing is fetched. A card shows what you type here — opening this space never contacts the site.": "Non viene scaricato nulla. La scheda mostra ciò che scrivi qui: aprire questo spazio non contatta mai il sito.",
"Nothing leaves this file until you start a session.": "Niente esce da questo file finché non avvii una sessione.",
"Now an issue": "Ora è una issue",
"Off by default — they were archived for a reason": "Disattivo per impostazione predefinita — sono state archiviate per un motivo",
+ "Offline mode is on — nothing leaves this computer.": "La modalità offline è attiva: nulla lascia questo computer.",
+ "On this screen only — it is not saved in the file": "Solo su questo schermo: non viene salvato nel file",
+ "One emoji": "Un'emoji",
+ "One fewer": "Uno in meno",
+ "One line about what is there": "Una riga su che cosa si trova lì",
+ "One more": "Uno in più",
+ "One page and what is under it, as its own file": "Una pagina e ciò che sta sotto, come file a sé",
+ "Only pages that ask for it": "Solo le pagine che lo richiedono",
+ "Only the owner of this space can invite people": "Solo il proprietario di questo Space può invitare altre persone",
"Open only": "Solo aperte",
+ "Orange": "Arancione",
"Other": "Altre",
"Other ways to save": "Altri modi per salvare",
"Out of the sidebar, still searchable and linkable": "Fuori dalla barra laterale, ma sempre ricercabile e collegabile",
+ "Owner": "Proprietario",
+ "Page": "Pagina",
"Page options": "Opzioni della pagina",
"Pages": "Pagine",
+ "Pages open at their normal width again": "Le pagine tornano alla larghezza normale",
"Pages — show or hide the page list": "Pagine — mostra o nascondi l’elenco delle pagine",
"Password": "Password",
"Password removed. Save to write the space unencrypted.": "Password rimossa. Salva per scrivere lo spazio non cifrato.",
"Password set. Save to write the space encrypted.": "Password impostata. Salva per scrivere lo spazio cifrato.",
"Password…": "Password…",
+ "Paste document JSON here…": "Incolla qui il JSON del documento…",
+ "Paste or type a link": "Incolla o scrivi un collegamento",
"People in this space": "Persone in questo spazio",
+ "Picture": "Immagine",
+ "Picture…": "Immagine…",
+ "Pink": "Rosa",
"Plain text": "Testo semplice",
+ "Poster": "Poster",
+ "Poster…": "Poster…",
"Previous (⇧⏎)": "Precedente (⇧⏎)",
"Print": "Stampa",
"Print / PDF…": "Stampa / PDF…",
"Print or save as PDF": "Stampa o salva come PDF",
"Print or save as PDF (⌘P)": "Stampa o salva come PDF (⌘P)",
"Print…": "Stampa…",
+ "Properties": "Proprietà",
+ "Properties — show or hide this block’s settings": "Proprietà — mostra o nascondi le impostazioni di questo blocco",
+ "Purple": "Viola",
+ "Put the caret in a block to see what it can be.": "Metti il cursore in un blocco per vedere che cosa si può cambiare.",
+ "Read the release notes for v{v} (opens in a new tab)": "Leggi le note di rilascio della v{v} (si apre in una nuova scheda)",
+ "Read-only copy saved — it follows the live session, view only": "Copia in sola lettura salvata — segue la sessione live, solo visualizzazione",
+ "Reading file…": "Lettura del file…",
"Reading image…": "Lettura dell’immagine…",
"Reading view": "Vista di lettura",
"Reading view — press Esc or the eye to edit": "Vista di lettura — premi Esc o l’occhio per modificare",
"Reading view — the pages without the editing tools": "Vista di lettura — le pagine senza gli strumenti di modifica",
"Reading {n} file(s)…": "Lettura di {n} file…",
+ "Red": "Rosso",
"Redo": "Ripristina",
"Redo (⇧⌘Z)": "Ripeti (⇧⌘Z)",
+ "Reload into new version": "Ricarica nella nuova versione",
+ "Remove": "Rimuovi",
"Remove password…": "Rimuovi password…",
+ "Remove the password": "Rimuovi la password",
+ "Remove the password?": "Rimuovere la password?",
"Remove the password? The next save writes the document in the clear.": "Rimuovere la password? Il prossimo salvataggio scriverà il documento in chiaro.",
+ "Remove the picture": "Rimuovi l'immagine",
+ "Remove this column": "Rimuovi questa colonna",
+ "Remove this row": "Rimuovi questa riga",
+ "Remove {name} from this space? Their copy drops to read-only.": "Rimuovere {name} da questo Space? La sua copia diventerà di sola lettura.",
+ "Remove {name} — revokes this device’s access; everyone else is unaffected": "Rimuovi {name} — revoca l’accesso di questo dispositivo; nessun altro è toccato",
"Rename": "Rinomina",
+ "Reopen": "Riapri",
+ "Repeat when it reaches the end": "Ricomincia quando arriva alla fine",
+ "Replace": "Sostituisci",
"Replace all": "Sostituisci tutto",
+ "Replace every page from pasted JSON?": "Sostituire tutte le pagine con il JSON incollato?",
+ "Replace from JSON…": "Sostituisci da JSON…",
+ "Replace picture": "Sostituisci l'immagine",
"Replace with": "Sostituisci con",
"Replace with…": "Sostituisci con…",
"Replace {n} occurrence(s) across the whole space?": "Sostituire {n} occorrenze in tutto lo spazio?",
"Replaced": "Sostituite",
+ "Replace…": "Sostituisci…",
+ "Reply": "Rispondi",
+ "Reply…": "Rispondi…",
+ "Reset access? Every copy you’ve sent stops syncing; only copies saved after this can join.": "Reimpostare l’accesso? Tutte le copie inviate smetteranno di sincronizzarsi; solo quelle salvate dopo potranno unirsi.",
+ "Reset access…": "Reimposta accesso…",
"Resized": "Ridimensionata",
+ "Resolve": "Risolvi",
"Restore": "Ripristina",
"Restore to the page list": "Ripristina nell’elenco delle pagine",
"Room for a board or a table": "Spazio per una bacheca o una tabella",
+ "Rows": "Righe",
"Save": "Salva",
"Save (⌘S)": "Salva (⌘S)",
"Save a copy…": "Salva una copia…",
@@ -190,6 +351,7 @@ export const it: Catalog = {
"Saved": "Salvato",
"Saved a new copy": "Salvata una nuova copia",
"Saves a copy that joins this session": "Salva una copia che entra in questa sessione",
+ "Saves a copy to send. Whoever opens it edits this space live with you (end-to-end encrypted); you stay the owner and can remove them from the People list.": "Salva una copia da inviare. Chi la apre modifica questo Space live con te (crittografia end-to-end); resti il proprietario e puoi rimuoverli dall’elenco Persone.",
"Saving…": "Salvataggio…",
"Search": "Cerca",
"Search all pages (⌘K)": "Cerca in tutte le pagine (⌘K)",
@@ -199,32 +361,58 @@ export const it: Catalog = {
"Share this space": "Condividi questo spazio",
"Show as a board": "Mostra come bacheca",
"Show as a list": "Mostra come elenco",
+ "Show playback controls to the reader": "Mostra i controlli di riproduzione a chi legge",
+ "Show properties (])": "Mostra proprietà (])",
"Show the page list ([)": "Mostra l'elenco delle pagine ([)",
+ "Shown next to your cursor and in the People list — stored only in this browser.": "Appare accanto al tuo cursore e nell’elenco Persone — salvato solo in questo browser.",
+ "Site name": "Nome del sito",
"Sort": "Ordina",
"Space name": "Nome dello spazio",
"Start live session": "Avvia sessione dal vivo",
+ "Start silent": "Parti senza audio",
"Stop sharing": "Interrompi condivisione",
+ "Stop widening every page": "Smetti di allargare tutte le pagine",
"Stopped sharing": "Condivisione interrotta",
+ "Strikethrough": "Barrato",
+ "Strikethrough — ⇧⌘S": "Barrato — ⇧⌘S",
"Take it elsewhere": "Portalo altrove",
+ "Taken from the address if blank": "Se vuoto, viene preso dall'indirizzo",
+ "Text": "Testo",
+ "Text and background color": "Colore del testo e dello sfondo",
+ "Text formatting": "Formattazione del testo",
"That change is too large to share live (about 1 MB max). It’s saved in your copy, but collaborators won’t see it.": "Questa modifica è troppo grande per la condivisione dal vivo (circa 1 MB max). È salvata nella tua copia, ma i collaboratori non la vedranno.",
+ "That file could not be read": "Non è stato possibile leggere quel file",
"That file could not be read as an image": "Impossibile leggere quel file come immagine",
+ "That file is not a bento/spaces document": "Quel file non è un documento bento/spaces",
"That image is too large to share live (about 1 MB max). It’s saved in your copy, but collaborators won’t see it.": "Questa immagine è troppo grande per la condivisione dal vivo (circa 1 MB max). È salvata nella tua copia, ma i collaboratori non la vedranno.",
+ "That is not a bento/spaces document": "Questo non è un documento bento/spaces",
"That is {n} files — importing them all may take a moment. Continue?": "Sono {n} file — importarli tutti può richiedere un momento. Continuare?",
+ "That needs to be an http or https address": "Serve un indirizzo http o https",
+ "That space is password-protected. Open it, then export the pages you want.": "Quello spazio è protetto da password. Aprilo e da lì esporta le pagine che vuoi.",
+ "The counterpart of Copy document JSON: edit a space in another tool, then bring it back.": "Il corrispettivo di Copia il JSON del documento: modifica uno spazio in un altro strumento e riportalo qui.",
"The day after": "Il giorno dopo",
"The day before": "Il giorno prima",
"The document block is not shaped like a space — {detail}.": "Il blocco del documento non ha la forma di uno spazio — {detail}.",
"The document block is not valid JSON — {detail}.": "Il blocco del documento non è JSON valido — {detail}.",
+ "The document, the editor and the search are all in this one file. Opening it needs nothing else — no server, no account, no install.": "Il documento, l’editor e la ricerca stanno tutti in questo unico file. Per aprirlo non serve altro: nessun server, nessun account, nessuna installazione.",
"The images in these notes come to {size} so far, and they all travel inside the file. Keep embedding them?": "Le immagini di queste note sono già {size} e viaggiano tutte dentro il file. Continuare a incorporarle?",
"The live session couldn’t store that change. It’s saved in your copy, but collaborators won’t see it.": "La sessione dal vivo non è riuscita a salvare questa modifica. È salvata nella tua copia, ma i collaboratori non la vedranno.",
+ "The next save writes this space as plain, readable JSON — anybody who opens the file can read every page.": "Il prossimo salvataggio scrive questo spazio come JSON leggibile: chiunque apra il file potrà leggere ogni pagina.",
+ "The page becomes a new file of its own: a whole space, with a new document id and none of this one’s sharing keys.": "La pagina diventa un file a sé: uno spazio completo, con un nuovo id di documento e senza nessuna delle chiavi di condivisione di questo.",
"The pages without the editing tools": "Le pagine senza gli strumenti di modifica",
"The rest name notes that were not in the selection, and are left as text.": "Gli altri nominano note che non erano nella selezione e restano come testo.",
+ "The theme follows whoever opens the file. It is never written into the document.": "Il tema segue chi apre il file. Non viene mai scritto nel documento.",
"The whole space": "L’intero spazio",
"The whole space, or just this page": "L’intero spazio, o solo questa pagina",
"Then send someone the file": "Poi manda il file a qualcuno",
"These windows are on this computer. Start a session to work with someone elsewhere.": "Queste finestre sono su questo computer. Avvia una sessione per lavorare con qualcuno altrove.",
+ "This block has no settings of its own — its content is all of it.": "Questo blocco non ha impostazioni proprie: il suo contenuto è tutto.",
+ "This block’s settings, and the page’s": "Le impostazioni di questo blocco, e quelle della pagina",
"This browser cannot write back to the file, so every save makes a new copy. Chrome and Edge on a computer can save in place.": "Questo browser non può riscrivere il file, quindi ogni salvataggio crea una nuova copia. Chrome ed Edge su computer possono salvare sul posto.",
+ "This clip is {size} and travels inside the file, making it that much bigger for everyone you send it to. Embed it anyway?": "Questa clip è di {size} e viaggia dentro il file, rendendolo altrettanto più grande per chiunque la riceva. Incorporarla comunque?",
"This copy goes offline; the others carry on": "Questa copia va offline; le altre continuano",
"This file": "Questo file",
+ "This file carries its own app — it works offline, forever, as is.": "Questo file porta con sé la propria app — funziona offline, per sempre, così com'è.",
"This file could not be opened": "Impossibile aprire questo file",
"This file declares rules this build does not know. It is open read-only so nothing is lost.": "Questo file dichiara regole che questa versione non conosce. È aperto in sola lettura per non perdere nulla.",
"This file is open read-only": "Questo file è aperto in sola lettura",
@@ -232,19 +420,30 @@ export const it: Catalog = {
"This image is {size} and travels inside the file, making it that much bigger for everyone you send it to. Embed it anyway?": "Questa immagine è di {size} e viaggia dentro il file, rendendolo altrettanto più grande per chiunque la riceva. Incorporarla comunque?",
"This image was resized to keep the file small. Click to replace it with the original.": "Questa immagine è stata ridimensionata per mantenere il file leggero. Clicca per sostituirla con l’originale.",
"This is a reading copy. It opens for reading; nothing you do here changes the file.": "Questa è una copia di lettura. Si apre in lettura; nulla di ciò che fai qui modifica il file.",
+ "This is a view-only copy — it follows the live session but can’t change this space.": "Questa è una copia di sola lettura — segue la sessione live ma non può modificare questo Space.",
"This is not a bento/spaces document — {detail}.": "Questo non è un documento bento/spaces — {detail}.",
"This live session has run out of room. Your change is saved in your copy, but collaborators won’t see it.": "Questa sessione dal vivo ha esaurito lo spazio. La tua modifica è salvata nella tua copia, ma i collaboratori non la vedranno.",
"This page only": "Solo questa pagina",
+ "This space has no live session to follow": "Questo Space non ha una sessione live da seguire",
"This space has no pages.": "Questo spazio non ha pagine.",
"This space is encrypted. Saves stay encrypted.": "Questo spazio è cifrato. I salvataggi restano cifrati.",
"This space is locked": "Questo spazio è bloccato",
+ "This window is still running v{v} — reload to finish. A v{v} backup was downloaded.": "Questa finestra esegue ancora la v{v} — ricarica per completare. È stato scaricato un backup v{v}.",
+ "This window is still running v{v} — reload to finish. A v{v} backup was saved beside this file.": "Questa finestra esegue ancora la v{v} — ricarica per completare. Un backup v{v} è stato salvato accanto a questo file.",
+ "This window is still running v{v}. If you overwrote the file that's open here, reload; otherwise open the file you saved.": "Questa finestra esegue ancora la v{v}. Se hai sovrascritto il file aperto qui, ricarica; altrimenti apri il file salvato.",
+ "This window keeps running v{v} until you open the downloaded file.": "Questa finestra resta alla v{v} finché non apri il file scaricato.",
"Those files could not be read": "Non è stato possibile leggere quei file",
"Tip": "Suggerimento",
+ "Title": "Titolo",
"Today": "Oggi",
"Today's journal": "Diario di oggi",
+ "Tone": "Tono",
"Too many changes at once — live sync is catching up.": "Troppe modifiche insieme — la sincronizzazione dal vivo sta recuperando.",
+ "Top level": "Primo livello",
"Turn into…": "Converti in…",
"Type / for blocks, [[ to link a page": "Digita / per i blocchi, [[ per collegare una pagina",
+ "Underline": "Sottolineato",
+ "Underline — ⌘U": "Sottolineato — ⌘U",
"Undo (⌘Z)": "Annulla (⌘Z)",
"Unlock": "Sblocca",
"Unlocked, but the document inside could not be read.": "Sbloccato, ma non è stato possibile leggere il documento all’interno.",
@@ -252,38 +451,82 @@ export const it: Catalog = {
"Unsaved changes — ⌘S downloads an updated copy": "Modifiche non salvate — ⌘S scarica una copia aggiornata",
"Unsaved changes — ⌘S rewrites this file": "Modifiche non salvate — ⌘S riscrive questo file",
"Untitled": "Senza titolo",
+ "Update failed: {m}": "Aggiornamento non riuscito: {m}",
"Update this file": "Aggiorna questo file",
+ "Update this file…": "Aggiorna questo file…",
+ "Updated to v{v} on disk.": "Aggiornato alla v{v} su disco.",
"Updates": "Aggiornamenti",
+ "Use a link…": "Usa un link…",
+ "Use this width for every page": "Usa questa larghezza per tutte le pagine",
+ "Verifies and builds the new version with this document inside, then asks where to save it — pick the file you have open to update it.": "Verifica e costruisce la nuova versione con questo documento, poi chiede dove salvarla — scegli il file aperto per aggiornarlo.",
+ "Verifying…": "Verifica…",
"Version {v} is available.": "È disponibile la versione {v}.",
"Version, language, password, exports": "Versione, lingua, password, esportazioni",
+ "Video": "Video",
+ "Video from {host}": "Video da {host}",
+ "View-only copy — it follows the live session but can’t change this space.": "Copia di sola lettura — segue la sessione live ma non può modificare questo Space.",
+ "View-only copy — it holds no signing key.": "Copia di sola lettura — non contiene chiavi di firma.",
+ "View-only copy…": "Copia di sola lettura…",
+ "Viewer": "Osservatore",
"Visit bento.page (opens in a new tab)": "Vai su bento.page (si apre in una nuova scheda)",
"Warning": "Avviso",
+ "Web address": "Indirizzo web",
+ "What is in the picture": "Che cosa mostra l’immagine",
+ "What this is": "Di che cosa si tratta",
+ "What’s new →": "Novità →",
"Wide": "Largo",
"Width": "Larghezza",
+ "Width %": "Larghezza %",
"Width in the text column": "Larghezza nella colonna di testo",
+ "Windows on this computer still sync; turn offline mode off in About to work with someone elsewhere.": "Le finestre su questo computer restano sincronizzate; disattiva la modalità offline in «Informazioni» per lavorare con qualcuno altrove.",
+ "Words": "Parole",
"Wrong password — try again": "Password errata — riprova",
+ "Yellow": "Giallo",
"You have the newest version ({v}).": "Hai la versione più recente ({v}).",
+ "Your key on THIS device: {fp}. Another device counts as a new person until the owner removes it.": "La tua chiave su QUESTO dispositivo: {fp}. Un altro dispositivo conta come nuova persona finché il proprietario non lo rimuove.",
"Your name": "Il tuo nome",
+ "Your name (shown on comments):": "Il tuo nome (visibile nei commenti):",
+ "Your name (shown on new comments):": "Il tuo nome (visibile nei nuovi commenti):",
"archived": "archiviata",
+ "bento/spaces is MIT-licensed and carries no third-party runtime — the full notices travel in this file’s source.": "bento/spaces è rilasciato con licenza MIT e non include alcun runtime di terze parti: le note complete viaggiano nel sorgente di questo file.",
"bento/spaces {version} · {pages} page(s), {blocks} block(s). The document, the editor and the search are all in this one file.": "bento/spaces {version} · pagine: {pages}, blocchi: {blocks}. Il documento, l’editor e la ricerca sono tutti in questo unico file.",
"format v{v}": "formato v{v}",
+ "just now": "proprio ora",
"none": "nessuno",
+ "you": "tu",
+ "you: {name} ✎": "tu: {name} ✎",
+ "{blocks} blocks · {words} words · {links} links in": "{blocks} blocchi · {words} parole · {links} link in entrata",
"{i} of {n}": "{i} di {n}",
"{name} joined": "{name} si è unito",
"{name} left": "{name} se n'è andato",
+ "{name} was removed": "{name} è stato rimosso",
+ "{n} connected": "{n} connessi",
"{n} duplicate or missing id(s) were repaired so links and pages resolve.": "Riparati {n} id duplicati o mancanti, così link e pagine funzionano.",
+ "{n} embedded image(s) and clip(s) account for {size} of that — {pct}%. Everything else is text.": "{n} immagine/i e clip incorporate rappresentano {size} di quel totale — il {pct}%. Tutto il resto è testo.",
"{n} found": "risultati: {n}",
+ "{n} id(s) were renamed because this space already used them, and the links inside the import follow them.": "{n} id sono stati rinominati perché questo spazio li usava già, e i collegamenti dell’import li seguono.",
+ "{n} image(s) came too.": "Sono arrivate anche {n} immagine/i.",
"{n} image(s) could not be opened, so their paths are kept as text. Import again with the image files included.": "{n} immagini non si sono potute aprire: i loro percorsi restano come testo. Importa di nuovo includendo i file immagine.",
"{n} image(s) embedded ({size}).": "{n} immagini incorporate ({size}).",
+ "{n} image(s) go with them; the rest stay here.": "{n} immagine/i vanno con esse; il resto resta qui.",
"{n} image(s) point at the web. Nothing loads until a reader asks.": "{n} immagini puntano al web. Non si carica nulla finché un lettore non lo chiede.",
"{n} image(s) were left as paths because embedding stopped there.": "{n} immagini restano come percorsi perché l’incorporamento si è fermato lì.",
+ "{n} link(s) named pages that were not in that file, and are kept as text.": "{n} collegamento/i nominavano pagine non presenti in quel file e restano come testo.",
+ "{n} link(s) point outside them and are kept as text naming the page they meant.": "{n} collegamento/i puntano fuori e restano come testo che nomina la pagina a cui puntavano.",
"{n} link(s) to it will stop working.": "{n} collegamenti a questa pagina smetteranno di funzionare.",
"{n} note name(s) appear more than once, so links naming them all went to the first.": "{n} nome/i di nota compaiono più volte, quindi i link con quel nome puntano tutti al primo.",
"{n} of {total} wikilink(s) resolved.": "{n} wikilink su {total} risolti.",
"{n} page(s) had frontmatter, kept verbatim in a folded block.": "{n} pagine avevano un frontmatter, conservato alla lettera in un blocco richiuso.",
"{n} page(s) inside it move up a level.": "{n} pagine contenute salgono di un livello.",
"{n} pages, in sidebar order, with a contents page": "{n} pagine, nell’ordine della barra laterale, con una pagina indice",
+ "{n} table(s) imported, with their column alignment.": "{n} tabella/e importata/e, con l’allineamento delle colonne.",
"{n} table(s) kept as text: there is no table block in this format yet.": "{n} tabelle conservate come testo: questo formato non ha ancora un blocco tabella.",
+ "{n} unresolved comment(s)": "{n} commento/i non risolto/i",
+ "{n}d ago": "{n} g fa",
+ "{n}h ago": "{n} h fa",
+ "{n}m ago": "{n} min fa",
+ "{pages} page(s) and {blocks} block(s) added from that space.": "Aggiunte {pages} pagina/e e {blocks} blocco/blocchi da quello spazio.",
"{pages} page(s) and {blocks} block(s) added from {files} file(s).": "{pages} pagine e {blocks} blocchi aggiunti da {files} file.",
+ "{pages} page(s) and {blocks} block(s) will travel.": "Viaggeranno {pages} pagina/e e {blocks} blocco/blocchi.",
"⌘Z removes the imported pages again.": "⌘Z rimuove di nuovo le pagine importate.",
}
diff --git a/spaces/src/i18n/ja.ts b/spaces/src/i18n/ja.ts
index 6fb52916..1d7c2746 100644
--- a/spaces/src/i18n/ja.ts
+++ b/spaces/src/i18n/ja.ts
@@ -13,73 +13,149 @@ import type { Catalog } from '../i18n'
export const ja: Catalog = {
"A filter here is newer than this build and was not applied.": "このビューには、このバージョンより新しいフィルターがあり、適用されていません。",
"A folder of .md files becomes pages, with the folder tree and the [[wikilinks]] intact.": "「.md」ファイルのフォルダーがページになります。フォルダー階層も [[ウィキリンク]] もそのままです。",
+ "A link with nothing in it yet": "まだ何も入っていないリンク",
"A list of every page, in order": "すべてのページを順番に並べた一覧",
+ "A live viewer: follows every edit as it happens but can never change this space — the relay enforces it.": "ライブビューア:編集をリアルタイムで追いますが、この Space を変更することはできません — リレーが強制します。",
"A page cannot contain itself": "ページを自分自身に入れることはできません",
"A password encrypts the document inside the file. There is no recovery — lose it and the space is gone.": "パスワードはファイル内のドキュメントを暗号化します。復元手段はありません — 忘れたらこのスペースは失われます。",
"A second file — the original is left alone": "2 つ目のファイル — 元のファイルはそのまま",
"A sort here is newer than this build and was not applied.": "このビューには、このバージョンより新しい並び順があり、適用されていません。",
"A space is never a dead end: the whole document is plain JSON in this file, and every page exports as Markdown.": "スペースは行き止まりになりません。ドキュメント全体はこのファイル内のプレーンな JSON で、どのページも Markdown に書き出せます。",
"A space needs at least one page": "スペースには少なくとも 1 ページが必要です",
+ "A still frame, shown before play — and what a printout or a file preview shows": "再生前に表示される静止画 — 印刷やファイルのプレビューで表示されるのもこれです",
"About bento/spaces — version, updates, language, password": "bento/spaces について — バージョン・更新・言語・パスワード",
"About this space": "このスペースについて",
+ "Access reset — only copies saved from now on can join": "アクセスをリセットしました — 今後保存したコピーだけが参加できます",
"Add a block below": "下にブロックを追加",
+ "Add a column after": "右に列を追加",
+ "Add a link": "リンクを追加",
+ "Add a picture": "画像を追加",
+ "Add a row below": "下に行を追加",
"Add below": "下に追加",
+ "Add pages under": "ページを追加する場所",
+ "Address of a video or audio file": "動画または音声ファイルのアドレス",
"Adds status, priority, assignee, estimate": "ステータス・優先度・担当者・見積もりを追加します",
+ "All text. Nothing is embedded, so this file is as small as a space gets.": "すべてテキストです。埋め込みはないので、このファイルはスペースとして最小の大きさです。",
"Already an issue": "すでにイシューです",
"Also open in another window on this computer — not shared online": "このパソコンの別のウィンドウでも開いています — オンライン共有はしていません",
+ "Alt text": "代替テキスト",
+ "An update check is the only network this app makes on its own. It asks the release server for a signed manifest and sends nothing about you or this document — no ids, no telemetry.": "更新の確認は、このアプリが自分から行う唯一の通信です。リリースサーバーに署名済みのマニフェストを求めるだけで、あなたやこの文書に関する情報は何も送りません。ID もテレメトリもありません。",
+ "Another bento/spaces file arrives as pages under the one you choose — its images come too, and the links inside it keep working.": "別の bento/spaces ファイルは、選んだページの下にページとして取り込まれます。画像も一緒に入り、その中のリンクもそのまま使えます。",
+ "Another bento/spaces file can arrive the same way, nested under any page.": "別の bento/spaces ファイルも同じ方法で、任意のページの下に取り込めます。",
+ "Appearance": "外観",
+ "Apply": "適用",
"Archive": "アーカイブ",
+ "Archived": "アーカイブ済み",
"Archived ({n})": "アーカイブ済み({n})",
"Ascending": "昇順",
+ "Audio": "音声",
+ "Audio from {host}": "{host} の音声",
+ "Back": "戻る",
+ "Background": "背景",
+ "Block": "ブロック",
"Block options": "ブロックのオプション",
+ "Blocks": "ブロック",
+ "Blue": "青",
"Board": "ボード",
+ "Bold": "ボールド",
+ "Bold — ⌘B": "ボールド — ⌘B",
"Breadcrumb": "パンくずリスト",
"Bring notes in": "ノートを取り込む",
+ "Brown": "茶",
"Callout icon": "囲みのアイコン",
+ "Cancel": "キャンセル",
+ "Careful": "取り扱い注意",
"Caution": "注意",
+ "Change password…": "パスワードを変更…",
"Change the kind of callout": "囲みの種類を変更",
+ "Change the name used for your new comments and replies": "新しいコメントと返信に使う名前を変更",
"Change this block’s type": "このブロックの種類を変更します",
"Change this page's icon": "このページのアイコンを変更",
"Change {field}": "{field}を変更",
"Check for updates": "更新を確認",
+ "Check for updates automatically at launch": "起動時に自動で更新を確認",
+ "Checked automatically at launch — you're on the latest version (v{v}).": "起動時に自動確認済み — 最新バージョンです (v{v})。",
"Checking is manual and verified: the download is signed, and its signature is checked against a key inside this file before anything is rewritten.": "確認は手動で、検証も行われます。ダウンロードには署名があり、何かを書き換える前にこのファイル内の鍵で署名を照合します。",
"Checking…": "確認中…",
"Choose .md files…": ".md ファイルを選ぶ…",
+ "Choose a different file": "別のファイルを選ぶ",
+ "Choose a file…": "ファイルを選ぶ…",
"Choose a folder…": "フォルダーを選ぶ…",
"Choose a password. There is no way to recover it.": "パスワードを決めてください。復元する方法はありません。",
+ "Choose a space…": "スペースを選ぶ…",
"Choose the field the columns come from": "列のもとになるフィールドを選ぶ",
"Choose the order": "並び順を選ぶ",
"Clear filter": "フィルターを解除",
+ "Clear formatting": "書式をクリア",
+ "Clip added ({size})": "クリップを追加しました({size})",
"Close": "閉じる",
+ "Code": "コード",
"Collapsed toggles always print open. Your browser's print dialog has the \"Save as PDF\" option.": "折りたたんだトグルも印刷では必ず開いた状態になります。「PDF として保存」はブラウザの印刷ダイアログにあります。",
+ "Color": "色",
"Column": "1カラム",
+ "Columns": "列",
"Comfortable for reading": "読みやすい幅",
+ "Comment": "コメント",
+ "Comment on this page": "このページにコメント",
+ "Comment · block": "コメント · ブロック",
+ "Comment · page": "コメント · ページ",
+ "Comment:": "コメント:",
+ "Connect to the live session without saving a new copy — copies you sent earlier will meet you there.": "新しいコピーを保存せずにライブセッションへ接続します — 以前送ったコピーがここで合流します。",
+ "Connecting…": "接続中…",
"Contents": "目次",
"Contents page": "目次ページ",
+ "Controls": "コントロール",
+ "Copied ✓": "コピーしました ✓",
"Copy document JSON": "ドキュメント JSON をコピー",
"Copy saved": "コピーを保存しました",
"Copy saved — you are still editing the original": "コピーを保存しました — 編集中なのは引き続き元のファイルです",
"Copy the document JSON": "ドキュメント JSON をコピー",
"Could not reach the update channel.": "更新チャンネルに接続できませんでした。",
"Could not verify an update, so nothing was changed.": "更新を検証できなかったため、何も変更していません。",
+ "Couldn’t access the clipboard": "クリップボードにアクセスできませんでした",
+ "Couldn’t reach the live session": "ライブセッションに接続できませんでした",
"Create “{name}”": "「{name}」を作成",
+ "Dark": "ダーク",
+ "Default": "デフォルト",
"Delete": "削除",
"Delete “{name}”?": "「{name}」を削除しますか?",
"Delete…": "削除…",
"Descending": "降順",
+ "Description": "説明",
"Discard": "破棄",
+ "Document": "文書",
+ "Document JSON copied": "ドキュメント JSON をコピーしました",
+ "Document id": "文書 ID",
+ "Document properties": "ドキュメントのプロパティ",
+ "Document replaced — ⌘Z undoes": "ドキュメントを置き換えました — ⌘Z で元に戻せます",
+ "Download updated copy": "更新版をダウンロード",
+ "Downloaded ✓": "ダウンロード完了 ✓",
"Downloaded. Open the new file — this one is unchanged.": "ダウンロードしました。新しいファイルを開いてください — このファイルは変更されていません。",
+ "Downloads a backup of the current version, then rewrites this file on disk as the new version — document untouched.": "現在のバージョンのバックアップをダウンロードしてから、このファイルを新バージョンに書き換えます — ドキュメントはそのまま。",
"Drag to move, click for block options": "ドラッグで移動、クリックでブロックのオプション",
+ "Drag to resize this column": "ドラッグして列の幅を変更",
"Drag to resize · double-click to reset": "ドラッグで幅を変更 · ダブルクリックで既定に戻す",
"Drop .md files or a folder here": ".md ファイルかフォルダーをここにドロップ",
"Duplicate": "複製",
+ "Duplicate as a new space…": "新しいスペースとして複製…",
"Each .md file becomes a page, folders become the page tree, and [[wikilinks]] become real links. Pages are added — nothing here is replaced.": ".md ファイルは 1 つずつページになり、フォルダーはページのツリーに、[[ウィキリンク]] は本物のリンクになります。ページは追加されるだけで、今あるものは置き換わりません。",
+ "Edit": "編集",
+ "Edit this link card": "このリンクカードを編集",
"Edited": "未保存",
"Editing": "編集中",
+ "Editor": "編集者",
+ "Editor copy saved — recipients join live with edit access": "編集者コピーを保存しました — 受け取った人は編集権限つきでライブに参加します",
"Encrypt the document inside this file": "このファイル内のドキュメントを暗号化",
"Enter the password to open it.": "開くにはパスワードを入力してください。",
+ "Every page opens wide on this screen from now on": "この画面では今後すべてのページを広く表示します",
"Every page, as one .md file": "すべてのページを 1 つの .md ファイルに",
+ "Everything in this space is replaced by what you paste. ⌘Z undoes it, but only while this window stays open.": "このスペースの内容はすべて貼り付けた内容に置き換わります。⌘Z で元に戻せますが、それはこのウィンドウを開いている間だけです。",
+ "Export": "書き出す",
+ "Export a page as a space": "ページをスペースとして書き出す",
"Export as Markdown": "Markdown で書き出す",
"Export as Markdown…": "Markdown で書き出す…",
+ "Export page as a space…": "ページをスペースとして書き出す…",
+ "Exported {n} page(s) as a new space": "{n} ページを新しいスペースとして書き出しました",
"File": "ファイル",
"Fills the window": "ウィンドウいっぱいに広げます",
"Filter": "フィルター",
@@ -87,10 +163,17 @@ export const ja: Catalog = {
"Find": "検索",
"Find in this space…": "このスペース内を検索…",
"Find or create a page…": "ページを検索または作成…",
+ "Following — view only": "追従中 — 閲覧のみ",
"Full width": "全幅",
+ "Gray": "グレー",
+ "Green": "緑",
"Group": "グループ",
"Guest": "ゲスト",
+ "Header row": "見出し行",
+ "Hide properties (])": "プロパティを隠す(])",
"Hide the page list ([)": "ページ一覧を隠す([)",
+ "Highlight": "ハイライト",
+ "Highlight — ⇧⌘H": "ハイライト — ⇧⌘H",
"Icon": "アイコン",
"Image added ({size})": "画像を追加しました({size})",
"Image added, resized to fit ({from} → {to})": "画像を追加し、収まるように縮小しました({from} → {to})",
@@ -101,35 +184,60 @@ export const ja: Catalog = {
"Import Markdown…": "Markdown を読み込む…",
"Important": "重要",
"Imported": "読み込みました",
+ "Imported a space": "スペースを取り込みました",
"Imported notes": "読み込んだノート",
"Include archived pages": "アーカイブしたページを含める",
"Include the image files and they are embedded too. An image this browser cannot open is kept as its path rather than as a broken picture.": "画像ファイルも一緒に選べば、そのまま埋め込まれます。このブラウザーが開けない画像は、壊れた画像ではなくパスのまま残ります。",
+ "Include the pages nested under it": "その下にあるページも含める",
+ "Inline code — ⌘E": "インラインコード — ⌘E",
"Insert": "挿入",
"Insert a block — text, headings, lists, code, images": "ブロックを挿入 — テキスト、見出し、リスト、コード、画像",
"Interface language": "表示言語",
+ "Interface theme": "表示テーマ",
"Invite someone…": "ほかの人を招待…",
+ "Invite to edit…": "編集に招待…",
"Issues": "イシュー",
+ "Italic": "イタリック",
+ "Italic — ⌘I": "イタリック — ⌘I",
+ "Journal date": "ジャーナルの日付",
+ "Key-verified identity": "鍵で検証済みのアイデンティティ",
"Language": "言語",
"Language follows whoever opens the file. It is never written into the document.": "言語はファイルを開いた人に従います。ドキュメントには書き込まれません。",
"Language — what this block is highlighted as": "言語 — このブロックを何として色分けするか",
+ "Last saved": "最終保存",
+ "Launch check couldn't reach the release server ({m}). Check manually below.": "起動時の確認でリリースサーバーに接続できませんでした ({m})。下から手動で確認してください。",
"Leave it empty to use the tone mark": "空のままにすると種類の記号を使います",
+ "Light": "ライト",
+ "Link": "リンク",
+ "Link address": "リンク先の URL",
+ "Link card": "リンクカード",
"Link to page": "ページにリンク",
+ "Link — ⌘K": "リンク — ⌘K",
+ "Linked": "リンク",
"Linked from": "リンク元",
"Links to it become dead": "このページへのリンクが切れます",
"List": "リスト",
+ "Live": "ライブ",
"Live — nobody else is here yet": "ライブ中 — まだほかに誰もいません",
"Live — send someone the file to bring them in": "ライブ中 — ファイルを送れば参加できます",
"Live — {n} other people are here": "ライブ中 — ほかに{n}人がいます",
+ "Load this audio": "この音声を読み込む",
"Load this image": "この画像を読み込む",
+ "Load this video": "この動画を読み込む",
+ "Loop": "ループ",
"Make this page an issue": "このページをイシューにする",
"Manual order": "手動の並び順",
+ "Match my system": "システムに合わせる",
+ "Mints brand-new keys. Every previously sent copy stops syncing for good; share fresh copies afterwards.": "まったく新しい鍵を発行します。これまでに送ったコピーは永久に同期しなくなります。以後は新しいコピーを共有してください。",
"More": "その他",
"Move down": "下へ移動",
"Move up": "上へ移動",
+ "Muted": "ミュート",
"New issue": "新しいイシュー",
"New page": "新規ページ",
"New page (⌘⌥N)": "新規ページ (⌘⌥N)",
"New page inside": "この中に新規ページ",
+ "New to Bento? Find templates, the gallery and the AI editing guide at {home} — or ⭐ it on {gh}.": "Bento は初めてですか?テンプレート、ギャラリー、AI編集ガイドは {home} でどうぞ — {gh} で ⭐ もぜひ。",
"Next (⏎)": "次へ (⏎)",
"No Markdown files in that selection": "選択に Markdown ファイルがありません",
"No block matches": "一致するブロックがありません",
@@ -138,51 +246,104 @@ export const ja: Catalog = {
"No issues yet. Add a status field to any page and it appears here.": "まだイシューはありません。どれかのページにステータス項目を追加すると、ここに表示されます。",
"No pages yet": "ページがまだありません",
"Nobody else is here yet": "まだほかに誰もいません",
+ "Not in this file: it needs the network, and the site is told when someone opens the page": "このファイルの中にはありません。再生にはネットワークが必要で、誰かがこのページを開いたことがそのサイトに伝わります",
+ "Not live — turns on when you share": "未接続 — 共有すると自動的にライブになります",
"Not loaded — opening it would tell that site you opened this space.": "未読み込み — 読み込むと、このスペースを開いたことがそのサイトに伝わります。",
"Not sharing yet — click to start a live session": "まだ共有していません — クリックしてライブセッションを開始",
"Note": "メモ",
"Nothing found": "見つかりませんでした",
+ "Nothing is fetched. A card shows what you type here — opening this space never contacts the site.": "何も取得しません。カードにはここで入力した内容が表示され、このスペースを開いてもサイトに接続することはありません。",
"Nothing leaves this file until you start a session.": "セッションを開始するまで、このファイルから外に出るものはありません。",
"Now an issue": "イシューになりました",
"Off by default — they were archived for a reason": "既定ではオフ — アーカイブしたのには理由があります",
+ "Offline mode is on — nothing leaves this computer.": "オフラインモードがオンです — このコンピュータから何も送信されません。",
+ "On this screen only — it is not saved in the file": "この画面でのみ有効です。ファイルには保存されません",
+ "One emoji": "絵文字ひとつ",
+ "One fewer": "1つ減らす",
+ "One line about what is there": "リンク先の内容を一行で",
+ "One more": "1つ増やす",
+ "One page and what is under it, as its own file": "1 つのページとその下にあるものを、独立したファイルに",
+ "Only pages that ask for it": "指定のあるページだけ",
+ "Only the owner of this space can invite people": "この Space に人を招待できるのはオーナーだけです",
"Open only": "未完了のみ",
+ "Orange": "オレンジ",
"Other": "その他",
"Other ways to save": "その他の保存方法",
"Out of the sidebar, still searchable and linkable": "サイドバーから外れますが、検索もリンクもできます",
+ "Owner": "オーナー",
+ "Page": "ページ",
"Page options": "ページのオプション",
"Pages": "ページ",
+ "Pages open at their normal width again": "ページは通常の幅に戻りました",
"Pages — show or hide the page list": "ページ — ページ一覧の表示/非表示",
"Password": "パスワード",
"Password removed. Save to write the space unencrypted.": "パスワードを削除しました。保存すると、このスペースは暗号化なしで書き込まれます。",
"Password set. Save to write the space encrypted.": "パスワードを設定しました。保存すると、このスペースは暗号化して書き込まれます。",
"Password…": "パスワード…",
+ "Paste document JSON here…": "ここにドキュメント JSON を貼り付け…",
+ "Paste or type a link": "リンクを貼り付けるか入力してください",
"People in this space": "このスペースにいる人",
+ "Picture": "画像",
+ "Picture…": "画像…",
+ "Pink": "ピンク",
"Plain text": "プレーンテキスト",
+ "Poster": "ポスター",
+ "Poster…": "ポスター…",
"Previous (⇧⏎)": "前へ (⇧⏎)",
"Print": "印刷",
"Print / PDF…": "印刷 / PDF…",
"Print or save as PDF": "印刷または PDF として保存",
"Print or save as PDF (⌘P)": "印刷または PDF として保存 (⌘P)",
"Print…": "印刷…",
+ "Properties": "プロパティ",
+ "Properties — show or hide this block’s settings": "プロパティ — このブロックの設定を表示または非表示にする",
+ "Purple": "紫",
+ "Put the caret in a block to see what it can be.": "ブロックにカーソルを置くと、そのブロックで変えられるものが出ます。",
+ "Read the release notes for v{v} (opens in a new tab)": "v{v} のリリースノートを読む(新しいタブで開きます)",
+ "Read-only copy saved — it follows the live session, view only": "読み取り専用コピーを保存しました — ライブセッションに追従し、閲覧のみです",
+ "Reading file…": "ファイルを読み込み中…",
"Reading image…": "画像を読み込み中…",
"Reading view": "閲覧ビュー",
"Reading view — press Esc or the eye to edit": "閲覧ビュー — Esc か目のアイコンで編集に戻ります",
"Reading view — the pages without the editing tools": "閲覧ビュー — 編集ツールなしでページを表示",
"Reading {n} file(s)…": "{n} 個のファイルを読み込み中…",
+ "Red": "赤",
"Redo": "やり直す",
"Redo (⇧⌘Z)": "やり直す (⇧⌘Z)",
+ "Reload into new version": "再読込して新バージョンへ",
+ "Remove": "削除",
"Remove password…": "パスワードを削除…",
+ "Remove the password": "パスワードを削除",
+ "Remove the password?": "パスワードを削除しますか?",
"Remove the password? The next save writes the document in the clear.": "パスワードを削除しますか?次回の保存でドキュメントは平文で書き込まれます。",
+ "Remove the picture": "画像を削除",
+ "Remove this column": "この列を削除",
+ "Remove this row": "この行を削除",
+ "Remove {name} from this space? Their copy drops to read-only.": "{name} をこの Space から削除しますか?相手のコピーは読み取り専用になります。",
+ "Remove {name} — revokes this device’s access; everyone else is unaffected": "{name} を削除 — このデバイスのアクセスを取り消します。他の人には影響しません",
"Rename": "名前を変更",
+ "Reopen": "再オープン",
+ "Repeat when it reaches the end": "最後まで再生したら繰り返す",
+ "Replace": "置き換える",
"Replace all": "すべて置換",
+ "Replace every page from pasted JSON?": "貼り付けた JSON ですべてのページを置き換えますか?",
+ "Replace from JSON…": "JSON から置き換え…",
+ "Replace picture": "画像を差し替え",
"Replace with": "置換後の文字列",
"Replace with…": "置換後の文字列…",
"Replace {n} occurrence(s) across the whole space?": "スペース全体で {n} 件を置換しますか?",
"Replaced": "置換しました",
+ "Replace…": "置き換える…",
+ "Reply": "返信",
+ "Reply…": "返信…",
+ "Reset access? Every copy you’ve sent stops syncing; only copies saved after this can join.": "アクセスをリセットしますか?送信済みのすべてのコピーが同期を停止し、以後保存したコピーだけが参加できます。",
+ "Reset access…": "アクセスをリセット…",
"Resized": "縮小済み",
+ "Resolve": "解決",
"Restore": "復元",
"Restore to the page list": "ページ一覧に戻す",
"Room for a board or a table": "ボードや表にちょうどよい幅",
+ "Rows": "行",
"Save": "保存",
"Save (⌘S)": "保存 (⌘S)",
"Save a copy…": "コピーを保存…",
@@ -190,6 +351,7 @@ export const ja: Catalog = {
"Saved": "保存しました",
"Saved a new copy": "新しいコピーを保存しました",
"Saves a copy that joins this session": "このセッションに参加するコピーを保存します",
+ "Saves a copy to send. Whoever opens it edits this space live with you (end-to-end encrypted); you stay the owner and can remove them from the People list.": "送るためのコピーを保存します。開いた人はこの Space をあなたと一緒にライブ編集できます(エンドツーエンド暗号化)。あなたはオーナーのままで、メンバーリストからいつでも削除できます。",
"Saving…": "保存中…",
"Search": "検索",
"Search all pages (⌘K)": "全ページを検索 (⌘K)",
@@ -199,32 +361,58 @@ export const ja: Catalog = {
"Share this space": "このスペースを共有",
"Show as a board": "ボードで表示",
"Show as a list": "リストで表示",
+ "Show playback controls to the reader": "読み手に再生コントロールを表示する",
+ "Show properties (])": "プロパティを表示(])",
"Show the page list ([)": "ページ一覧を表示([)",
+ "Shown next to your cursor and in the People list — stored only in this browser.": "カーソルの横とメンバーリストに表示されます — このブラウザにのみ保存されます。",
+ "Site name": "サイト名",
"Sort": "並べ替え",
"Space name": "スペース名",
"Start live session": "ライブセッションを開始",
+ "Start silent": "音を出さずに開始する",
"Stop sharing": "共有を停止",
+ "Stop widening every page": "すべてのページを広げるのをやめる",
"Stopped sharing": "共有を停止しました",
+ "Strikethrough": "取り消し線",
+ "Strikethrough — ⇧⌘S": "取り消し線 — ⇧⌘S",
"Take it elsewhere": "外に持ち出す",
+ "Taken from the address if blank": "空欄ならアドレスから取り込みます",
+ "Text": "テキスト",
+ "Text and background color": "文字色と背景色",
+ "Text formatting": "文字の書式",
"That change is too large to share live (about 1 MB max). It’s saved in your copy, but collaborators won’t see it.": "この変更はライブ共有には大きすぎます(上限は約 1 MB)。自分のコピーには保存されますが、共同編集者には表示されません。",
+ "That file could not be read": "そのファイルは読み取れませんでした",
"That file could not be read as an image": "そのファイルは画像として読み込めませんでした",
+ "That file is not a bento/spaces document": "そのファイルは bento/spaces ドキュメントではありません",
"That image is too large to share live (about 1 MB max). It’s saved in your copy, but collaborators won’t see it.": "この画像はライブ共有には大きすぎます(上限は約 1 MB)。自分のコピーには保存されますが、共同編集者には表示されません。",
+ "That is not a bento/spaces document": "これは bento/spaces の文書ではありません",
"That is {n} files — importing them all may take a moment. Continue?": "{n} 個のファイルがあります。すべて読み込むには少し時間がかかります。続けますか?",
+ "That needs to be an http or https address": "http または https のアドレスを入力してください",
+ "That space is password-protected. Open it, then export the pages you want.": "そのスペースはパスワードで保護されています。開いてから、必要なページを書き出してください。",
+ "The counterpart of Copy document JSON: edit a space in another tool, then bring it back.": "「文書 JSON をコピー」の対になる機能です。別のツールでスペースを編集して、ここへ戻せます。",
"The day after": "翌日",
"The day before": "前日",
"The document block is not shaped like a space — {detail}.": "ドキュメントブロックがスペースの形をしていません — {detail}。",
"The document block is not valid JSON — {detail}.": "ドキュメントブロックが正しい JSON ではありません — {detail}。",
+ "The document, the editor and the search are all in this one file. Opening it needs nothing else — no server, no account, no install.": "文書もエディタも検索も、すべてこの 1 つのファイルに入っています。開くのに他は何も要りません。サーバーもアカウントもインストールも不要です。",
"The images in these notes come to {size} so far, and they all travel inside the file. Keep embedding them?": "これらのノートの画像はすでに {size} あり、すべてファイルの中を一緒に運ばれます。埋め込みを続けますか?",
"The live session couldn’t store that change. It’s saved in your copy, but collaborators won’t see it.": "ライブセッションがこの変更を保存できませんでした。自分のコピーには保存されますが、共同編集者には表示されません。",
+ "The next save writes this space as plain, readable JSON — anybody who opens the file can read every page.": "次の保存で、このスペースはそのまま読める JSON として書き出されます。ファイルを開いた人は誰でも全ページを読めます。",
+ "The page becomes a new file of its own: a whole space, with a new document id and none of this one’s sharing keys.": "そのページが独立した新しいファイルになります。ひとつの完全なスペースで、新しいドキュメント ID を持ち、このスペースの共有キーは一切引き継ぎません。",
"The pages without the editing tools": "編集ツールのないページ表示",
"The rest name notes that were not in the selection, and are left as text.": "残りは選択に含まれていないノートを指しており、テキストのまま残ります。",
+ "The theme follows whoever opens the file. It is never written into the document.": "テーマはファイルを開いた人に従います。ドキュメントには書き込まれません。",
"The whole space": "スペース全体",
"The whole space, or just this page": "スペース全体、またはこのページだけ",
"Then send someone the file": "そのあとファイルを相手に送ります",
"These windows are on this computer. Start a session to work with someone elsewhere.": "これらのウィンドウはこのパソコン内のものです。別の場所にいる人と作業するにはセッションを開始してください。",
+ "This block has no settings of its own — its content is all of it.": "このブロックに固有の設定はありません — 中身がすべてです。",
+ "This block’s settings, and the page’s": "このブロックの設定と、ページの設定",
"This browser cannot write back to the file, so every save makes a new copy. Chrome and Edge on a computer can save in place.": "このブラウザはファイルに書き戻せないため、保存のたびに新しいコピーができます。パソコンの Chrome と Edge なら直接上書き保存できます。",
+ "This clip is {size} and travels inside the file, making it that much bigger for everyone you send it to. Embed it anyway?": "このクリップは {size} あり、ファイルの中に一緒に入ります。その分、送る相手全員にとってファイルが大きくなります。それでも埋め込みますか?",
"This copy goes offline; the others carry on": "このコピーはオフラインになります。ほかの人はそのまま続けられます",
"This file": "このファイル",
+ "This file carries its own app — it works offline, forever, as is.": "このファイルはアプリを内蔵しています — オフラインでも、ずっと、このまま動きます。",
"This file could not be opened": "このファイルを開けませんでした",
"This file declares rules this build does not know. It is open read-only so nothing is lost.": "このファイルには、このビルドが知らないルールが宣言されています。何も失わないよう読み取り専用で開いています。",
"This file is open read-only": "このファイルは読み取り専用で開いています",
@@ -232,19 +420,30 @@ export const ja: Catalog = {
"This image is {size} and travels inside the file, making it that much bigger for everyone you send it to. Embed it anyway?": "この画像は {size} あり、ファイルの中に一緒に入ります。その分、送る相手全員にとってファイルが大きくなります。それでも埋め込みますか?",
"This image was resized to keep the file small. Click to replace it with the original.": "ファイルを小さく保つため、この画像は縮小されました。クリックすると元の画像に差し替えます。",
"This is a reading copy. It opens for reading; nothing you do here changes the file.": "これは閲覧用のコピーです。読むために開きます。ここでの操作はファイルを変更しません。",
+ "This is a view-only copy — it follows the live session but can’t change this space.": "これは閲覧専用コピーです — ライブセッションに追従しますが、この Space は変更できません。",
"This is not a bento/spaces document — {detail}.": "これは bento/spaces のドキュメントではありません — {detail}。",
"This live session has run out of room. Your change is saved in your copy, but collaborators won’t see it.": "このライブセッションの容量がいっぱいです。変更は自分のコピーに保存されますが、共同編集者には表示されません。",
"This page only": "このページだけ",
+ "This space has no live session to follow": "この Space には追従できるライブセッションがありません",
"This space has no pages.": "このスペースにはページがありません。",
"This space is encrypted. Saves stay encrypted.": "このスペースは暗号化されています。保存しても暗号化されたままです。",
"This space is locked": "このスペースはロックされています",
+ "This window is still running v{v} — reload to finish. A v{v} backup was downloaded.": "このウィンドウはまだ v{v} で動作中 — 再読込で完了します。v{v} のバックアップをダウンロード済み。",
+ "This window is still running v{v} — reload to finish. A v{v} backup was saved beside this file.": "このウィンドウはまだ v{v} で動作中 — 再読込で完了します。v{v} のバックアップをこのファイルの隣に保存しました。",
+ "This window is still running v{v}. If you overwrote the file that's open here, reload; otherwise open the file you saved.": "このウィンドウはまだ v{v} で動作中。開いているファイルを上書きした場合は再読込を。別に保存した場合はそのファイルを開いてください。",
+ "This window keeps running v{v} until you open the downloaded file.": "ダウンロードしたファイルを開くまで、このウィンドウは v{v} のままです。",
"Those files could not be read": "それらのファイルは読み込めませんでした",
"Tip": "ヒント",
+ "Title": "タイトル",
"Today": "今日",
"Today's journal": "今日のジャーナル",
+ "Tone": "トーン",
"Too many changes at once — live sync is catching up.": "変更が多すぎます — ライブ同期が追いついています。",
+ "Top level": "最上位",
"Turn into…": "種類を変更…",
"Type / for blocks, [[ to link a page": "/ でブロック、[[ でページにリンク",
+ "Underline": "下線",
+ "Underline — ⌘U": "下線 — ⌘U",
"Undo (⌘Z)": "元に戻す (⌘Z)",
"Unlock": "ロック解除",
"Unlocked, but the document inside could not be read.": "ロックは解除しましたが、中のドキュメントを読み取れませんでした。",
@@ -252,38 +451,82 @@ export const ja: Catalog = {
"Unsaved changes — ⌘S downloads an updated copy": "未保存の変更 — ⌘S で更新版をダウンロードします",
"Unsaved changes — ⌘S rewrites this file": "未保存の変更 — ⌘S でこのファイルを書き換えます",
"Untitled": "無題",
+ "Update failed: {m}": "更新に失敗: {m}",
"Update this file": "このファイルを更新",
+ "Update this file…": "このファイルを更新…",
+ "Updated to v{v} on disk.": "ディスク上で v{v} に更新しました。",
"Updates": "更新",
+ "Use a link…": "リンクを使う…",
+ "Use this width for every page": "この幅をすべてのページに使う",
+ "Verifies and builds the new version with this document inside, then asks where to save it — pick the file you have open to update it.": "このドキュメントを含む新バージョンを検証・生成し、保存先を尋ねます — 開いているファイルを選べば更新されます。",
+ "Verifying…": "検証中…",
"Version {v} is available.": "バージョン {v} が利用可能です。",
"Version, language, password, exports": "バージョン・言語・パスワード・書き出し",
+ "Video": "動画",
+ "Video from {host}": "{host} の動画",
+ "View-only copy — it follows the live session but can’t change this space.": "閲覧専用コピー — ライブセッションに追従しますが、この Space は変更できません。",
+ "View-only copy — it holds no signing key.": "閲覧専用コピー — 署名鍵を保持していません。",
+ "View-only copy…": "閲覧専用コピー…",
+ "Viewer": "閲覧者",
"Visit bento.page (opens in a new tab)": "bento.page を開く(新しいタブ)",
"Warning": "警告",
+ "Web address": "ウェブアドレス",
+ "What is in the picture": "画像に写っているもの",
+ "What this is": "これが何か",
+ "What’s new →": "新着情報 →",
"Wide": "広め",
"Width": "幅",
+ "Width %": "幅 %",
"Width in the text column": "本文カラム内の幅",
+ "Windows on this computer still sync; turn offline mode off in About to work with someone elsewhere.": "このコンピュータ上のウィンドウ同士は引き続き同期します。ほかの場所にいる人と作業するには「About」でオフラインモードを解除してください。",
+ "Words": "語数",
"Wrong password — try again": "パスワードが違います — もう一度お試しください",
+ "Yellow": "黄",
"You have the newest version ({v}).": "最新バージョンです ({v})。",
+ "Your key on THIS device: {fp}. Another device counts as a new person until the owner removes it.": "このデバイスでのあなたの鍵:{fp}。別のデバイスはオーナーが削除するまで別人として扱われます。",
"Your name": "あなたの名前",
+ "Your name (shown on comments):": "あなたの名前(コメントに表示):",
+ "Your name (shown on new comments):": "あなたの名前(新しいコメントに表示):",
"archived": "アーカイブ済み",
+ "bento/spaces is MIT-licensed and carries no third-party runtime — the full notices travel in this file’s source.": "bento/spaces は MIT ライセンスで、サードパーティのランタイムは含みません。完全な表示はこのファイルのソースに入っています。",
"bento/spaces {version} · {pages} page(s), {blocks} block(s). The document, the editor and the search are all in this one file.": "bento/spaces {version} · {pages} ページ、{blocks} ブロック。ドキュメントもエディターも検索も、すべてこの 1 つのファイルの中にあります。",
"format v{v}": "フォーマット v{v}",
+ "just now": "たった今",
"none": "なし",
+ "you": "あなた",
+ "you: {name} ✎": "あなた: {name} ✎",
+ "{blocks} blocks · {words} words · {links} links in": "{blocks} ブロック · {words} 語 · 被リンク {links}",
"{i} of {n}": "{i} / {n}",
"{name} joined": "{name} が参加しました",
"{name} left": "{name} が退出しました",
+ "{name} was removed": "{name} を削除しました",
+ "{n} connected": "{n} 人が接続中",
"{n} duplicate or missing id(s) were repaired so links and pages resolve.": "重複または欠落した id を {n} 件修復し、リンクとページが解決するようにしました。",
+ "{n} embedded image(s) and clip(s) account for {size} of that — {pct}%. Everything else is text.": "埋め込まれた画像とクリップ {n} 件で {size}、全体の {pct}% を占めます。残りはすべてテキストです。",
"{n} found": "{n} 件",
+ "{n} id(s) were renamed because this space already used them, and the links inside the import follow them.": "{n} 件の id はこのスペースで既に使われていたため付け直しました。取り込んだ中のリンクもそれに追従しています。",
+ "{n} image(s) came too.": "画像も {n} 件入りました。",
"{n} image(s) could not be opened, so their paths are kept as text. Import again with the image files included.": "{n} 個の画像を開けなかったため、そのパスをテキストとして残しました。画像ファイルも含めてもう一度読み込んでください。",
"{n} image(s) embedded ({size}).": "{n} 個の画像を埋め込みました({size})。",
+ "{n} image(s) go with them; the rest stay here.": "{n} 件の画像が一緒に移動し、残りはここに残ります。",
"{n} image(s) point at the web. Nothing loads until a reader asks.": "{n} 個の画像はウェブを指しています。読み手が求めるまで何も読み込みません。",
"{n} image(s) were left as paths because embedding stopped there.": "{n} 個の画像は、そこで埋め込みを止めたためパスのまま残りました。",
+ "{n} link(s) named pages that were not in that file, and are kept as text.": "{n} 件のリンクはそのファイルに無いページを指していたため、テキストとして残しました。",
+ "{n} link(s) point outside them and are kept as text naming the page they meant.": "{n} 件のリンクは外を指しているため、指していたページ名を残したテキストになります。",
"{n} link(s) to it will stop working.": "このページへのリンク {n} 件が機能しなくなります。",
"{n} note name(s) appear more than once, so links naming them all went to the first.": "{n} 件のノート名が重複しているため、その名前のリンクはすべて最初のノートに向いています。",
"{n} of {total} wikilink(s) resolved.": "{total} 個のウィキリンクのうち {n} 個を解決しました。",
"{n} page(s) had frontmatter, kept verbatim in a folded block.": "{n} ページにフロントマターがありました。折りたたみブロックにそのまま保存しています。",
"{n} page(s) inside it move up a level.": "中にある {n} ページが 1 つ上の階層に移動します。",
"{n} pages, in sidebar order, with a contents page": "{n} ページをサイドバー順に、目次ページ付きで",
+ "{n} table(s) imported, with their column alignment.": "{n} 個の表を取り込みました(列の配置も含みます)。",
"{n} table(s) kept as text: there is no table block in this format yet.": "{n} 個の表はテキストとして保存しました。この形式にはまだ表ブロックがありません。",
+ "{n} unresolved comment(s)": "未解決のコメント {n} 件",
+ "{n}d ago": "{n}日前",
+ "{n}h ago": "{n}時間前",
+ "{n}m ago": "{n}分前",
+ "{pages} page(s) and {blocks} block(s) added from that space.": "そのスペースから {pages} ページ、{blocks} ブロックを追加しました。",
"{pages} page(s) and {blocks} block(s) added from {files} file(s).": "{files} 個のファイルから {pages} ページ・{blocks} ブロックを追加しました。",
+ "{pages} page(s) and {blocks} block(s) will travel.": "{pages} ページ、{blocks} ブロックが移動します。",
"⌘Z removes the imported pages again.": "⌘Z で、読み込んだページを取り消せます。",
}
diff --git a/spaces/src/i18n/packed.ts b/spaces/src/i18n/packed.ts
index 1cfbb7a1..669b163e 100644
--- a/spaces/src/i18n/packed.ts
+++ b/spaces/src/i18n/packed.ts
@@ -14,72 +14,145 @@ export const PACKED_LOCALES = ["ja","zh-Hans","zh-Hant","es","fr","de","it","pt"
export const PACKED: Record<string, ReadonlyArray<string | 0>> = {
"A filter here is newer than this build and was not applied.": ["このビューには、このバージョンより新しいフィルターがあり、適用されていません。","此视图中有比当前版本更新的筛选条件,未被应用。","此檢視中有比目前版本更新的篩選條件,未被套用。","Un filtro de esta vista es más reciente que esta versión y no se ha aplicado.","Un filtre de cette vue est plus récent que cette version et n’a pas été appliqué.","Ein Filter dieser Ansicht ist neuer als diese Version und wurde nicht angewendet.","Un filtro di questa vista è più recente di questa versione e non è stato applicato.","Um filtro desta vista é mais recente do que esta versão e não foi aplicado."],
"A folder of .md files becomes pages, with the folder tree and the [[wikilinks]] intact.": ["「.md」ファイルのフォルダーがページになります。フォルダー階層も [[ウィキリンク]] もそのままです。","一个装满 .md 文件的文件夹会变成页面,文件夹层级和 [[wiki 链接]] 都保留下来。","一個裝滿 .md 檔案的資料夾會變成頁面,資料夾層級和 [[wiki 連結]] 都會保留。","Una carpeta de archivos .md se convierte en páginas, con el árbol de carpetas y los [[wikilinks]] intactos.","Un dossier de fichiers .md devient des pages, avec l’arborescence et les [[wikilinks]] intacts.","Ein Ordner voller .md-Dateien wird zu Seiten — samt Ordnerbaum und den [[Wikilinks]] dazwischen.","Una cartella di file .md diventa pagine, con l’albero delle cartelle e i [[wikilink]] intatti.","Uma pasta de ficheiros .md transforma-se em páginas, com a árvore de pastas e os [[wikilinks]] intactos."],
+ "A link with nothing in it yet": ["まだ何も入っていないリンク","还没有内容的链接","還沒有內容的連結","Un enlace todavía sin nada","Un lien encore vide","Ein Link, in dem noch nichts steht","Un collegamento ancora vuoto","Um link ainda sem nada"],
"A list of every page, in order": ["すべてのページを順番に並べた一覧","按顺序列出的所有页面","依順序列出每一個頁面","Una lista de todas las páginas, en orden","La liste de toutes les pages, dans l’ordre","Eine Liste aller Seiten, der Reihe nach","Un elenco di tutte le pagine, in ordine","Uma lista de todas as páginas, por ordem"],
+ "A live viewer: follows every edit as it happens but can never change this space — the relay enforces it.": ["ライブビューア:編集をリアルタイムで追いますが、この Space を変更することはできません — リレーが強制します。","实时查看副本:实时跟随每次编辑,但永远无法修改此 Space — 由中继强制执行。","即時檢視副本:即時跟隨每次編輯,但永遠無法修改此 Space — 由中繼強制執行。","Un visor en vivo: sigue cada edición al instante pero nunca puede modificar este Space — el relé lo garantiza.","Un visualiseur en direct : suit chaque modification mais ne peut jamais changer cet espace — le relais l’applique.","Ein Live-Viewer: folgt jeder Änderung, kann diesen Space aber nie verändern — vom Relay erzwungen.","Un visualizzatore live: segue ogni modifica ma non può mai cambiare questo Space — imposto dal relay.","Um visualizador ao vivo: acompanha cada edição conforme acontece, mas nunca pode alterar este Space — o retransmissor garante isso."],
"A page cannot contain itself": ["ページを自分自身に入れることはできません","页面不能包含自身","頁面不能包含自己","Una página no puede contenerse a sí misma","Une page ne peut pas se contenir elle-même","Eine Seite kann sich nicht selbst enthalten","Una pagina non può contenere sé stessa","Uma página não pode conter-se a si própria"],
"A password encrypts the document inside the file. There is no recovery — lose it and the space is gone.": ["パスワードはファイル内のドキュメントを暗号化します。復元手段はありません — 忘れたらこのスペースは失われます。","密码会加密文件内的文档。没有任何找回方式 — 密码丢了,空间就没了。","密碼會加密檔案內的文件。沒有任何復原方式 — 密碼一旦遺失,這個空間就沒了。","Una contraseña cifra el documento dentro del archivo. No hay forma de recuperarla — si la pierdes, el espacio desaparece.","Un mot de passe chiffre le document à l’intérieur du fichier. Il n’y a aucune récupération — perdez-le et l’espace est perdu.","Ein Passwort verschlüsselt das Dokument in der Datei. Es gibt keine Wiederherstellung — verlierst du es, ist der Space weg.","Una password cifra il documento dentro il file. Non c’è modo di recuperarla — se la perdi, lo spazio è perso.","Uma palavra-passe encripta o documento dentro do ficheiro. Não há recuperação — se a perder, o espaço desaparece."],
"A second file — the original is left alone": ["2 つ目のファイル — 元のファイルはそのまま","另存一个新文件 — 原文件不动","第二個檔案 — 原檔案不受影響","Un segundo archivo — el original queda intacto","Un second fichier — l’original reste intact","Eine zweite Datei — das Original bleibt unberührt","Un secondo file — l’originale resta intatto","Um segundo ficheiro — o original fica intacto"],
"A sort here is newer than this build and was not applied.": ["このビューには、このバージョンより新しい並び順があり、適用されていません。","此视图中有比当前版本更新的排序方式,未被应用。","此檢視中有比目前版本更新的排序方式,未被套用。","Un orden de esta vista es más reciente que esta versión y no se ha aplicado.","Un tri de cette vue est plus récent que cette version et n’a pas été appliqué.","Eine Sortierung dieser Ansicht ist neuer als diese Version und wurde nicht angewendet.","Un ordinamento di questa vista è più recente di questa versione e non è stato applicato.","Uma ordenação desta vista é mais recente do que esta versão e não foi aplicada."],
"A space is never a dead end: the whole document is plain JSON in this file, and every page exports as Markdown.": ["スペースは行き止まりになりません。ドキュメント全体はこのファイル内のプレーンな JSON で、どのページも Markdown に書き出せます。","空间绝不是死胡同:整个文档就是这个文件里的纯 JSON,每个页面都能导出为 Markdown。","空間永遠不會是死路:整份文件就是此檔案中的純 JSON,每個頁面也都能匯出成 Markdown。","Un espacio nunca es un callejón sin salida: todo el documento es JSON plano dentro de este archivo, y cada página se exporta como Markdown.","Un espace n’est jamais une impasse : tout le document est du JSON brut dans ce fichier, et chaque page s’exporte en Markdown.","Ein Space ist nie eine Sackgasse: Das ganze Dokument ist reines JSON in dieser Datei, und jede Seite lässt sich als Markdown exportieren.","Uno spazio non è mai un vicolo cieco: l’intero documento è JSON puro dentro questo file, e ogni pagina si esporta in Markdown.","Um espaço nunca é um beco sem saída: todo o documento é JSON simples dentro deste ficheiro e todas as páginas se exportam para Markdown."],
"A space needs at least one page": ["スペースには少なくとも 1 ページが必要です","空间至少要有一个页面","空間至少要有一個頁面","Un espacio necesita al menos una página","Un espace doit contenir au moins une page","Ein Space braucht mindestens eine Seite","Uno spazio deve avere almeno una pagina","Um espaço precisa de pelo menos uma página"],
+ "A still frame, shown before play — and what a printout or a file preview shows": ["再生前に表示される静止画 — 印刷やファイルのプレビューで表示されるのもこれです","播放前显示的静帧 — 打印和文件预览中显示的也是它","播放前顯示的靜態畫面 — 列印和檔案預覽顯示的也是它","Un fotograma fijo, que se muestra antes de reproducir — y es lo que aparece al imprimir o en la vista previa del archivo","Une image fixe, affichée avant la lecture — et c’est elle qui apparaît à l’impression et dans l’aperçu du fichier","Ein Standbild, das vor dem Abspielen zu sehen ist — und das, was im Ausdruck und in der Dateivorschau erscheint","Un fotogramma fisso, mostrato prima della riproduzione — ed è quello che compare in stampa e nell’anteprima del file","Uma imagem fixa, mostrada antes da reprodução — e é o que aparece na impressão e na pré-visualização do ficheiro"],
"About bento/spaces — version, updates, language, password": ["bento/spaces について — バージョン・更新・言語・パスワード","关于 bento/spaces — 版本、更新、语言、密码","關於 bento/spaces — 版本、更新、語言、密碼","Acerca de bento/spaces: versión, actualizaciones, idioma, contraseña","À propos de bento/spaces — version, mises à jour, langue, mot de passe","Über bento/spaces — Version, Updates, Sprache, Passwort","Informazioni su bento/spaces — versione, aggiornamenti, lingua, password","Acerca do bento/spaces — versão, atualizações, idioma, palavra-passe"],
"About this space": ["このスペースについて","关于此空间","關於此空間","Acerca de este espacio","À propos de cet espace","Über diesen Space","Informazioni su questo spazio","Sobre este espaço"],
+ "Access reset — only copies saved from now on can join": ["アクセスをリセットしました — 今後保存したコピーだけが参加できます","访问已重置 — 只有此后保存的副本才能加入","存取已重設 — 只有此後儲存的副本才能加入","Acceso restablecido — solo las copias guardadas a partir de ahora podrán unirse","Accès réinitialisé — seules les copies enregistrées désormais pourront rejoindre","Zugriff zurückgesetzt — nur ab jetzt gespeicherte Kopien können beitreten","Accesso reimpostato — solo le copie salvate d’ora in poi potranno unirsi","Acesso redefinido — apenas cópias salvas de agora em diante podem entrar"],
"Add a block below": ["下にブロックを追加","在下方添加块","在下方新增區塊","Añadir un bloque debajo","Ajouter un bloc en dessous","Block darunter hinzufügen","Aggiungi un blocco sotto","Adicionar um bloco abaixo"],
+ "Add a column after": ["右に列を追加","在右侧添加一列","在右側新增一欄","Añadir una columna después","Ajouter une colonne après","Spalte danach einfügen","Aggiungi una colonna dopo","Adicionar uma coluna depois"],
+ "Add a link": ["リンクを追加","添加链接","新增連結","Añadir un enlace","Ajouter un lien","Link hinzufügen","Aggiungi un collegamento","Adicionar um link"],
+ "Add a picture": ["画像を追加","添加图片","新增圖片","Añadir una imagen","Ajouter une image","Bild hinzufügen","Aggiungi un'immagine","Adicionar uma imagem"],
+ "Add a row below": ["下に行を追加","在下方添加一行","在下方新增一列","Añadir una fila debajo","Ajouter une ligne en dessous","Zeile darunter einfügen","Aggiungi una riga sotto","Adicionar uma linha abaixo"],
"Add below": ["下に追加","在下方添加","在下方新增","Añadir debajo","Ajouter en dessous","Darunter einfügen","Aggiungi sotto","Adicionar abaixo"],
+ "Add pages under": ["ページを追加する場所","将页面添加到","將頁面加入到","Añadir las páginas debajo de","Ajouter les pages sous","Seiten einfügen unter","Aggiungi le pagine sotto","Adicionar as páginas por baixo de"],
+ "Address of a video or audio file": ["動画または音声ファイルのアドレス","视频或音频文件的地址","影片或音訊檔案的位址","Dirección de un archivo de vídeo o audio","Adresse d’un fichier vidéo ou audio","Adresse einer Video- oder Audiodatei","Indirizzo di un file video o audio","Endereço de um ficheiro de vídeo ou áudio"],
"Adds status, priority, assignee, estimate": ["ステータス・優先度・担当者・見積もりを追加します","添加状态、优先级、负责人和估算","新增狀態、優先順序、負責人與估算","Añade estado, prioridad, responsable y estimación","Ajoute statut, priorité, responsable et estimation","Fügt Status, Priorität, Bearbeiter:in und Schätzung hinzu","Aggiunge stato, priorità, assegnatario e stima","Adiciona estado, prioridade, responsável e estimativa"],
+ "All text. Nothing is embedded, so this file is as small as a space gets.": ["すべてテキストです。埋め込みはないので、このファイルはスペースとして最小の大きさです。","全是文字。没有嵌入任何内容,所以这个文件已是空间能达到的最小体积。","全是文字。沒有嵌入任何內容,所以這個檔案已是空間能達到的最小體積。","Todo es texto. No hay nada incrustado, así que este archivo es lo más pequeño que puede ser un espacio.","Que du texte. Rien n’est intégré, donc ce fichier est aussi léger qu’un espace peut l’être.","Nur Text. Nichts ist eingebettet, also ist diese Datei so klein, wie ein Space nur sein kann.","Solo testo. Non c’è nulla di incorporato, quindi questo file è il più piccolo possibile per uno spazio.","Só texto. Nada está incorporado, por isso este ficheiro é o mais pequeno que um espaço pode ser."],
"Already an issue": ["すでにイシューです","已经是事项","已經是項目","Ya es una incidencia","Déjà un ticket","Ist bereits ein Issue","È già una issue","Já é uma tarefa"],
"Also open in another window on this computer — not shared online": ["このパソコンの別のウィンドウでも開いています — オンライン共有はしていません","本机的另一个窗口中也已打开 — 未在线共享","本機的另一個視窗中也已開啟 — 未線上分享","También abierto en otra ventana de este ordenador — no compartido en línea","Également ouvert dans une autre fenêtre de cet ordinateur — pas partagé en ligne","Auch in einem anderen Fenster auf diesem Computer geöffnet — nicht online geteilt","Aperto anche in un’altra finestra di questo computer — non condiviso online","Também aberto noutra janela deste computador — não partilhado online"],
+ "Alt text": ["代替テキスト","替代文本","替代文字","Texto alternativo","Texte alternatif","Alternativtext","Testo alternativo","Texto alternativo"],
+ "An update check is the only network this app makes on its own. It asks the release server for a signed manifest and sends nothing about you or this document — no ids, no telemetry.": ["更新の確認は、このアプリが自分から行う唯一の通信です。リリースサーバーに署名済みのマニフェストを求めるだけで、あなたやこの文書に関する情報は何も送りません。ID もテレメトリもありません。","检查更新是这个应用唯一会自行发起的网络请求。它只向发布服务器索取一份已签名的清单,不发送任何关于你或这份文档的信息——没有标识符,没有遥测。","檢查更新是這個應用程式唯一會自行發起的網路請求。它只向發布伺服器索取一份已簽署的清單,不傳送任何關於你或這份文件的資訊——沒有識別碼,沒有遙測。","La comprobación de actualizaciones es la única conexión de red que esta aplicación hace por su cuenta. Pide al servidor de versiones un manifiesto firmado y no envía nada sobre ti ni sobre este documento: sin identificadores, sin telemetría.","La vérification des mises à jour est la seule connexion réseau que cette application établit d’elle-même. Elle demande au serveur de versions un manifeste signé et n’envoie rien sur vous ni sur ce document — aucun identifiant, aucune télémétrie.","Die Update-Prüfung ist die einzige Netzverbindung, die diese App von sich aus herstellt. Sie holt vom Release-Server ein signiertes Manifest und sendet nichts über Sie oder dieses Dokument — keine Kennungen, keine Telemetrie.","Il controllo degli aggiornamenti è l’unica connessione di rete che questa app apre da sola. Chiede al server delle versioni un manifesto firmato e non invia nulla su di te o su questo documento: nessun identificativo, nessuna telemetria.","A verificação de atualizações é a única ligação de rede que esta aplicação faz por iniciativa própria. Pede ao servidor de versões um manifesto assinado e não envia nada sobre si nem sobre este documento — sem identificadores, sem telemetria."],
+ "Another bento/spaces file arrives as pages under the one you choose — its images come too, and the links inside it keep working.": ["別の bento/spaces ファイルは、選んだページの下にページとして取り込まれます。画像も一緒に入り、その中のリンクもそのまま使えます。","另一个 bento/spaces 文件会作为页面加入到你选择的页面之下——图片一并带入,其内部的链接照常可用。","另一個 bento/spaces 檔案會作為頁面加入到你選擇的頁面之下——圖片一併帶入,其內部的連結照常可用。","Otro archivo bento/spaces llega como páginas debajo de la que elijas: sus imágenes vienen también y los enlaces internos siguen funcionando.","Un autre fichier bento/spaces arrive sous la page que vous choisissez : ses images viennent aussi, et les liens qu’il contient continuent de fonctionner.","Eine andere bento/spaces-Datei kommt als Seiten unter der von Ihnen gewählten Seite an — ihre Bilder kommen mit, und die Links darin funktionieren weiter.","Un altro file bento/spaces arriva come pagine sotto quella che scegli: arrivano anche le sue immagini e i collegamenti al suo interno continuano a funzionare.","Outro ficheiro bento/spaces chega como páginas por baixo da que escolher — as imagens vêm também e as ligações lá dentro continuam a funcionar."],
+ "Another bento/spaces file can arrive the same way, nested under any page.": ["別の bento/spaces ファイルも同じ方法で、任意のページの下に取り込めます。","另一个 bento/spaces 文件也能以同样的方式,嵌入到任意页面之下。","另一個 bento/spaces 檔案也能以同樣的方式,嵌入到任意頁面之下。","Otro archivo bento/spaces puede llegar del mismo modo, anidado bajo cualquier página.","Un autre fichier bento/spaces peut arriver de la même manière, imbriqué sous n’importe quelle page.","Eine andere bento/spaces-Datei kann auf dieselbe Weise ankommen, verschachtelt unter jeder beliebigen Seite.","Un altro file bento/spaces può arrivare allo stesso modo, annidato sotto qualsiasi pagina.","Outro ficheiro bento/spaces pode chegar da mesma forma, aninhado sob qualquer página."],
+ "Appearance": ["外観","外观","外觀","Apariencia","Apparence","Darstellung","Aspetto","Aspeto"],
+ "Apply": ["適用","应用","套用","Aplicar","Appliquer","Anwenden","Applica","Aplicar"],
"Archive": ["アーカイブ","归档","封存","Archivar","Archiver","Archivieren","Archivia","Arquivar"],
+ "Archived": ["アーカイブ済み","已归档","已封存","Archivada","Archivée","Archiviert","Archiviata","Arquivada"],
"Archived ({n})": ["アーカイブ済み({n})","已归档 ({n})","已封存 ({n})","Archivadas ({n})","Archivées ({n})","Archiviert ({n})","Archiviate ({n})","Arquivadas ({n})"],
"Ascending": ["昇順","升序","遞增","Ascendente","Croissant","Aufsteigend","Crescente","Crescente"],
+ "Audio": ["音声","音频","音訊","Audio","Audio","Audio","Audio","Áudio"],
+ "Audio from {host}": ["{host} の音声","来自 {host} 的音频","來自 {host} 的音訊","Audio de {host}","Audio provenant de {host}","Audio von {host}","Audio da {host}","Áudio de {host}"],
+ "Back": ["戻る","返回","返回","Atrás","Retour","Zurück","Indietro","Voltar"],
+ "Background": ["背景","背景","背景","Fondo","Arrière-plan","Hintergrund","Sfondo","Plano de fundo"],
+ "Block": ["ブロック","块","區塊","Bloque","Bloc","Block","Blocco","Bloco"],
"Block options": ["ブロックのオプション","块选项","區塊選項","Opciones del bloque","Options du bloc","Block-Optionen","Opzioni del blocco","Opções do bloco"],
+ "Blocks": ["ブロック","块","區塊","Bloques","Blocs","Blöcke","Blocchi","Blocos"],
+ "Blue": ["青","蓝色","藍色","Azul","Bleu","Blau","Blu","Azul"],
"Board": ["ボード","看板","看板","Tablero","Tableau","Board","Bacheca","Quadro"],
+ "Bold": ["ボールド","粗体","粗體","Negrita","Gras","Fett","Grassetto","Negrito"],
+ "Bold — ⌘B": ["ボールド — ⌘B","粗体 — ⌘B","粗體 — ⌘B","Negrita — ⌘B","Gras — ⌘B","Fett — ⌘B","Grassetto — ⌘B","Negrito — ⌘B"],
"Breadcrumb": ["パンくずリスト","面包屑导航","階層路徑","Ruta de navegación","Fil d’Ariane","Pfadnavigation","Percorso di navigazione","Trilho de navegação"],
"Bring notes in": ["ノートを取り込む","把笔记带进来","把筆記帶進來","Traer notas","Faire entrer des notes","Notizen hereinholen","Portare dentro le note","Trazer notas para cá"],
+ "Brown": ["茶","棕色","棕色","Marrón","Marron","Braun","Marrone","Marrom"],
"Callout icon": ["囲みのアイコン","标注图标","標註圖示","Icono del aviso","Icône de l'encadré","Symbol des Hinweisfelds","Icona del riquadro","Ícone do destaque"],
+ "Cancel": ["キャンセル","取消","取消","Cancelar","Annuler","Abbrechen","Annulla","Cancelar"],
+ "Careful": ["取り扱い注意","请谨慎","請謹慎","Con cuidado","Prudence","Vorsicht","Attenzione","Cuidado"],
"Caution": ["注意","当心","當心","Precaución","Attention","Achtung","Attenzione","Cuidado"],
+ "Change password…": ["パスワードを変更…","更改密码…","變更密碼…","Cambiar contraseña…","Changer le mot de passe…","Passwort ändern…","Cambia password…","Alterar senha…"],
"Change the kind of callout": ["囲みの種類を変更","更改标注类型","變更標註類型","Cambiar el tipo de aviso","Changer le type d'encadré","Art des Hinweisfelds ändern","Cambia il tipo di riquadro","Alterar o tipo de destaque"],
+ "Change the name used for your new comments and replies": ["新しいコメントと返信に使う名前を変更","更改新评论和回复所用的名字","變更新註解與回覆所用的名字","Cambiar el nombre para tus nuevos comentarios y respuestas","Changer le nom utilisé pour vos nouveaux commentaires et réponses","Namen für neue Kommentare und Antworten ändern","Cambia il nome usato per i tuoi nuovi commenti e risposte","Altere o nome usado nos seus novos comentários e respostas"],
"Change this block’s type": ["このブロックの種類を変更します","更改此块的类型","變更此區塊的類型","Cambiar el tipo de este bloque","Changer le type de ce bloc","Den Typ dieses Blocks ändern","Cambia il tipo di questo blocco","Alterar o tipo deste bloco"],
"Change this page's icon": ["このページのアイコンを変更","更改此页面的图标","變更此頁面的圖示","Cambiar el icono de esta página","Changer l’icône de cette page","Symbol dieser Seite ändern","Cambia l’icona di questa pagina","Mudar o ícone desta página"],
"Change {field}": ["{field}を変更","更改{field}","變更{field}","Cambiar {field}","Modifier {field}","{field} ändern","Cambia {field}","Alterar {field}"],
"Check for updates": ["更新を確認","检查更新","檢查更新","Buscar actualizaciones","Rechercher des mises à jour","Nach Updates suchen","Cerca aggiornamenti","Verificar atualizações"],
- "Checking is manual and verified: the download is signed, and its signature is checked against a key inside this file before anything is rewritten.": ["確認は手動で、検証も行われます。ダウンロードには署名があり、何かを書き換える前にこのファイル内の鍵で署名を照合します。","检查更新完全由你手动发起,并且经过验证:下载内容带有签名,改写任何内容之前,都会先用此文件内的密钥校验签名。","檢查是手動且經過驗證的:下載的檔案帶有簽章,在改寫任何內容之前,都會用此檔案內的金鑰驗證該簽章。","La comprobación es manual y verificada: la descarga va firmada y su firma se contrasta con una clave que está dentro de este archivo antes de reescribir nada.","La vérification est manuelle et contrôlée : le téléchargement est signé, et sa signature est vérifiée avec une clé contenue dans ce fichier avant toute réécriture.","Die Prüfung ist manuell und verifiziert: Der Download ist signiert, und seine Signatur wird gegen einen Schlüssel in dieser Datei geprüft, bevor irgendetwas überschrieben wird.","La verifica è manuale e controllata: il download è firmato e la sua firma viene confrontata con una chiave contenuta in questo file prima che qualcosa venga riscritto.","A verificação é manual e comprovada: a transferência é assinada e a sua assinatura é validada com uma chave dentro deste ficheiro antes de qualquer coisa ser reescrita."],
+ "Check for updates automatically at launch": ["起動時に自動で更新を確認","启动时自动检查更新","啟動時自動檢查更新","Buscar actualizaciones automáticamente al iniciar","Rechercher automatiquement les mises à jour au démarrage","Beim Start automatisch nach Updates suchen","Cerca aggiornamenti automaticamente all'avvio","Verificar atualizações automaticamente ao abrir"],
+ "Checked automatically at launch — you're on the latest version (v{v}).": ["起動時に自動確認済み — 最新バージョンです (v{v})。","已在启动时自动检查 — 您已是最新版本 (v{v})。","已於啟動時自動檢查 — 您已是最新版本 (v{v})。","Comprobado automáticamente al iniciar — tienes la última versión (v{v}).","Vérifié automatiquement au démarrage — vous avez la dernière version (v{v}).","Beim Start automatisch geprüft — Sie haben die neueste Version (v{v}).","Verificato automaticamente all'avvio — hai l'ultima versione (v{v}).","Verificado automaticamente ao abrir — você está na versão mais recente (v{v})."],
"Checking…": ["確認中…","检查中…","檢查中…","Comprobando…","Vérification…","Prüfe…","Verifica in corso…","A verificar…"],
"Choose .md files…": [".md ファイルを選ぶ…","选择 .md 文件…","選擇 .md 檔案…","Elegir archivos .md…","Choisir des fichiers .md…",".md-Dateien wählen…","Scegli file .md…","Escolher ficheiros .md…"],
+ "Choose a different file": ["別のファイルを選ぶ","选择另一个文件","選擇另一個檔案","Elegir otro archivo","Choisir un autre fichier","Eine andere Datei wählen","Scegli un altro file","Escolher outro ficheiro"],
+ "Choose a file…": ["ファイルを選ぶ…","选择文件…","選擇檔案…","Elegir un archivo…","Choisir un fichier…","Datei wählen…","Scegli un file…","Escolher um ficheiro…"],
"Choose a folder…": ["フォルダーを選ぶ…","选择文件夹…","選擇資料夾…","Elegir una carpeta…","Choisir un dossier…","Ordner wählen…","Scegli una cartella…","Escolher uma pasta…"],
"Choose a password. There is no way to recover it.": ["パスワードを決めてください。復元する方法はありません。","设置一个密码。它无法找回。","請設定密碼。沒有任何方法可以找回它。","Elige una contraseña. No hay forma de recuperarla.","Choisissez un mot de passe. Il est impossible de le récupérer.","Wähle ein Passwort. Es lässt sich nicht wiederherstellen.","Scegli una password. Non c’è modo di recuperarla.","Escolha uma palavra-passe. Não há forma de a recuperar."],
+ "Choose a space…": ["スペースを選ぶ…","选择一个空间…","選擇一個空間…","Elegir un espacio…","Choisir un espace…","Space auswählen…","Scegli uno spazio…","Escolher um espaço…"],
"Choose the field the columns come from": ["列のもとになるフィールドを選ぶ","选择用作分栏的字段","選擇作為欄的欄位","Elige el campo del que salen las columnas","Choisir le champ dont viennent les colonnes","Feld wählen, aus dem die Spalten kommen","Scegli il campo da cui nascono le colonne","Escolha o campo de onde vêm as colunas"],
"Choose the order": ["並び順を選ぶ","选择排序方式","選擇排序方式","Elige el orden","Choisir l’ordre","Reihenfolge wählen","Scegli l’ordine","Escolha a ordem"],
"Clear filter": ["フィルターを解除","清除筛选","清除篩選","Borrar el filtro","Effacer le filtre","Filter zurücksetzen","Azzera il filtro","Limpar o filtro"],
+ "Clear formatting": ["書式をクリア","清除格式","清除格式","Borrar formato","Effacer la mise en forme","Formatierung entfernen","Cancella formattazione","Limpar formatação"],
+ "Clip added ({size})": ["クリップを追加しました({size})","已添加片段 ({size})","已新增片段 ({size})","Clip añadido ({size})","Clip ajouté ({size})","Clip hinzugefügt ({size})","Clip aggiunta ({size})","Clipe adicionado ({size})"],
"Close": ["閉じる","关闭","關閉","Cerrar","Fermer","Schließen","Chiudi","Fechar"],
+ "Code": ["コード","代码","程式碼","Código","Code","Code","Codice","Código"],
"Collapsed toggles always print open. Your browser's print dialog has the \"Save as PDF\" option.": ["折りたたんだトグルも印刷では必ず開いた状態になります。「PDF として保存」はブラウザの印刷ダイアログにあります。","折叠起来的折叠块打印时一律展开。浏览器的打印对话框里有“存为 PDF”选项。","收合的摺疊區塊列印時一律展開。「另存為 PDF」的選項在瀏覽器的列印對話方塊中。","Los desplegables plegados siempre se imprimen abiertos. El diálogo de impresión de tu navegador tiene la opción «Guardar como PDF».","Les bascules repliées s’impriment toujours dépliées. La boîte d’impression de votre navigateur propose « Enregistrer au format PDF ».","Zugeklappte Toggle-Blöcke werden immer offen gedruckt. Im Druckdialog deines Browsers gibt es die Option „Als PDF speichern“.","I blocchi comprimibili chiusi vengono sempre stampati aperti. La finestra di stampa del browser offre l’opzione «Salva come PDF».","Os blocos recolhidos são sempre impressos abertos. A janela de impressão do navegador tem a opção \"Guardar como PDF\"."],
+ "Color": ["色","颜色","顏色","Color","Couleur","Farbe","Colore","Cor"],
"Column": ["1カラム","单栏","單欄","Columna","Colonne","Spalte","Colonna","Coluna"],
+ "Columns": ["列","列","欄","Columnas","Colonnes","Spalten","Colonne","Colunas"],
"Comfortable for reading": ["読みやすい幅","适合阅读的宽度","適合閱讀的寬度","Cómodo para leer","Confortable à lire","Angenehm zu lesen","Comodo da leggere","Confortável para ler"],
+ "Comment": ["コメント","评论","註解","Comentario","Commentaire","Kommentar","Commento","Comentário"],
+ "Comment on this page": ["このページにコメント","评论此页面","為這個頁面加註解","Comentar esta página","Commenter cette page","Diese Seite kommentieren","Commenta questa pagina","Comentar esta página"],
+ "Comment · block": ["コメント · ブロック","评论 · 块","註解 · 區塊","Comentario · bloque","Commentaire · bloc","Kommentar · Block","Commento · blocco","Comentário · bloco"],
+ "Comment · page": ["コメント · ページ","评论 · 页面","註解 · 頁面","Comentario · página","Commentaire · page","Kommentar · Seite","Commento · pagina","Comentário · página"],
+ "Comment:": ["コメント:","评论:","註解:","Comentario:","Commentaire :","Kommentar:","Commento:","Comentário:"],
+ "Connect to the live session without saving a new copy — copies you sent earlier will meet you there.": ["新しいコピーを保存せずにライブセッションへ接続します — 以前送ったコピーがここで合流します。","无需保存新副本即可连接实时会话 — 之前发送的副本会在这里与你会合。","無需儲存新副本即可連線即時會話 — 之前傳送的副本會在這裡與你會合。","Conéctate a la sesión en vivo sin guardar una copia nueva — las copias ya enviadas se unirán aquí.","Connectez-vous à la session live sans enregistrer de copie — les copies déjà envoyées vous y rejoindront.","Mit der Live-Sitzung verbinden, ohne eine neue Kopie zu speichern — bereits gesendete Kopien treffen dich hier.","Connettiti alla sessione live senza salvare una nuova copia — le copie già inviate ti raggiungeranno qui.","Conecte-se à sessão ao vivo sem salvar uma nova cópia — as cópias que você enviou antes encontrarão você lá."],
+ "Connecting…": ["接続中…","连接中…","連線中…","Conectando…","Connexion…","Verbinden…","Connessione…","Conectando…"],
"Contents": ["目次","目录","目錄","Índice","Sommaire","Inhalt","Indice","Índice"],
"Contents page": ["目次ページ","目录页","目錄頁","Página de índice","Page de sommaire","Inhaltsverzeichnis","Pagina indice","Página de índice"],
+ "Controls": ["コントロール","控件","控制項","Controles","Contrôles","Steuerelemente","Controlli","Controlos"],
+ "Copied ✓": ["コピーしました ✓","已复制 ✓","已複製 ✓","Copiado ✓","Copié ✓","Kopiert ✓","Copiato ✓","Copiado ✓"],
"Copy document JSON": ["ドキュメント JSON をコピー","复制文档 JSON","複製文件 JSON","Copiar JSON del documento","Copier le JSON du document","Dokument-JSON kopieren","Copia JSON del documento","Copiar JSON do documento"],
"Copy saved — you are still editing the original": ["コピーを保存しました — 編集中なのは引き続き元のファイルです","副本已保存 — 你仍在编辑原文件","副本已儲存 — 你仍在編輯原始檔案","Copia guardada: sigues editando el original","Copie enregistrée — vous modifiez toujours l'original","Kopie gespeichert — du bearbeitest weiterhin das Original","Copia salvata: stai ancora modificando l'originale","Cópia guardada — continuas a editar o original"],
"Copy the document JSON": ["ドキュメント JSON をコピー","复制此文档的 JSON","複製文件 JSON","Copiar el JSON del documento","Copier le JSON du document","Dokument-JSON kopieren","Copia il JSON del documento","Copiar o JSON do documento"],
"Could not reach the update channel.": ["更新チャンネルに接続できませんでした。","无法连接更新通道。","無法連線到更新來源。","No se pudo contactar con el canal de actualizaciones.","Impossible de joindre le canal de mise à jour.","Der Update-Kanal war nicht erreichbar.","Impossibile raggiungere il canale degli aggiornamenti.","Não foi possível contactar o canal de atualizações."],
- "Could not verify an update, so nothing was changed.": ["更新を検証できなかったため、何も変更していません。","无法验证更新,因此未做任何改动。","無法驗證更新,因此未變更任何內容。","No se pudo verificar la actualización, así que no se cambió nada.","Impossible de vérifier une mise à jour, rien n’a été modifié.","Ein Update ließ sich nicht verifizieren, daher wurde nichts geändert.","Impossibile verificare l’aggiornamento, quindi non è stato modificato nulla.","Não foi possível verificar a atualização, por isso nada foi alterado."],
+ "Couldn’t access the clipboard": ["クリップボードにアクセスできませんでした","无法访问剪贴板","無法存取剪貼簿","No se pudo acceder al portapapeles","Impossible d'accéder au presse-papiers","Zugriff auf die Zwischenablage nicht möglich","Impossibile accedere agli appunti","Não foi possível acessar a área de transferência"],
+ "Couldn’t reach the live session": ["ライブセッションに接続できませんでした","无法连接实时会话","無法連線即時會話","No se pudo contactar la sesión en vivo","Impossible de joindre la session live","Live-Sitzung nicht erreichbar","Impossibile raggiungere la sessione live","Não foi possível alcançar a sessão ao vivo"],
"Create “{name}”": ["「{name}」を作成","创建“{name}”","建立「{name}」","Crear «{name}»","Créer « {name} »","„{name}“ erstellen","Crea «{name}»","Criar “{name}”"],
+ "Dark": ["ダーク","深色","深色","Oscuro","Sombre","Dunkel","Scuro","Escuro"],
+ "Default": ["デフォルト","默认","預設","Predeterminado","Par défaut","Standard","Predefinito","Padrão"],
"Delete": ["削除","删除","刪除","Eliminar","Supprimer","Löschen","Elimina","Eliminar"],
"Delete “{name}”?": ["「{name}」を削除しますか?","要删除“{name}”吗?","要刪除「{name}」嗎?","¿Eliminar «{name}»?","Supprimer « {name} » ?","„{name}“ löschen?","Eliminare «{name}»?","Eliminar “{name}”?"],
"Delete…": ["削除…","删除…","刪除…","Eliminar…","Supprimer…","Löschen…","Elimina…","Eliminar…"],
"Descending": ["降順","降序","遞減","Descendente","Décroissant","Absteigend","Decrescente","Decrescente"],
+ "Description": ["説明","描述","描述","Descripción","Description","Beschreibung","Descrizione","Descrição"],
"Discard": ["破棄","放弃","捨棄","Descartar","Ignorer","Verwerfen","Ignora","Descartar"],
- "Downloaded. Open the new file — this one is unchanged.": ["ダウンロードしました。新しいファイルを開いてください — このファイルは変更されていません。","已下载。请打开新文件 — 当前文件未改动。","已下載。請開啟新檔案 — 目前這個檔案未被更動。","Descargado. Abre el archivo nuevo — este no ha cambiado.","Téléchargé. Ouvrez le nouveau fichier — celui-ci est inchangé.","Heruntergeladen. Öffne die neue Datei — diese hier bleibt unverändert.","Scaricato. Apri il nuovo file — questo resta invariato.","Transferido. Abra o novo ficheiro — este fica inalterado."],
+ "Document": ["文書","文档","文件","Documento","Document","Dokument","Documento","Documento"],
+ "Document JSON copied": ["ドキュメント JSON をコピーしました","已复制文档 JSON","已複製文件 JSON","JSON del documento copiado","JSON du document copié","Dokument-JSON kopiert","JSON del documento copiato","JSON do documento copiado"],
+ "Document id": ["文書 ID","文档 ID","文件 ID","ID del documento","Identifiant du document","Dokument-ID","ID del documento","ID do documento"],
+ "Document properties": ["ドキュメントのプロパティ","文档属性","文件屬性","Propiedades del documento","Propriétés du document","Dokumenteigenschaften","Proprietà del documento","Propriedades do documento"],
+ "Document replaced — ⌘Z undoes": ["ドキュメントを置き換えました — ⌘Z で元に戻せます","文档已替换 — ⌘Z 可撤销","文件已取代 — ⌘Z 可還原","Documento reemplazado — ⌘Z deshace","Document remplacé — ⌘Z annule","Dokument ersetzt — ⌘Z macht rückgängig","Documento sostituito — ⌘Z annulla","Documento substituído — ⌘Z desfaz"],
+ "Download updated copy": ["更新版をダウンロード","下载更新副本","下載更新副本","Descargar copia actualizada","Télécharger la copie à jour","Aktualisierte Kopie herunterladen","Scarica copia aggiornata","Baixar cópia atualizada"],
+ "Downloaded ✓": ["ダウンロード完了 ✓","已下载 ✓","已下載 ✓","Descargado ✓","Téléchargé ✓","Heruntergeladen ✓","Scaricato ✓","Baixado ✓"],
+ "Downloads a backup of the current version, then rewrites this file on disk as the new version — document untouched.": ["現在のバージョンのバックアップをダウンロードしてから、このファイルを新バージョンに書き換えます — ドキュメントはそのまま。","先下载当前版本的备份,然后将此文件改写为新版本 — 文档内容不变。","先下載目前版本的備份,再將此檔案改寫為新版本 — 文件內容不變。","Descarga una copia de seguridad de la versión actual y reescribe este archivo con la nueva versión — el documento no cambia.","Télécharge une sauvegarde de la version actuelle, puis réécrit ce fichier avec la nouvelle version — document intact.","Lädt ein Backup der aktuellen Version herunter und schreibt diese Datei dann als neue Version — das Dokument bleibt unverändert.","Scarica un backup della versione attuale, poi riscrive questo file come nuova versione — documento intatto.","Baixa um backup da versão atual e depois regrava este arquivo no disco como a nova versão — o documento não é alterado."],
"Drag to move, click for block options": ["ドラッグで移動、クリックでブロックのオプション","拖动可移动,点击打开块选项","拖曳可移動,點按開啟區塊選項","Arrastra para mover, haz clic para las opciones del bloque","Glissez pour déplacer, cliquez pour les options du bloc","Ziehen zum Verschieben, klicken für Block-Optionen","Trascina per spostare, clicca per le opzioni del blocco","Arraste para mover, clique para as opções do bloco"],
+ "Drag to resize this column": ["ドラッグして列の幅を変更","拖动以调整此列宽度","拖曳以調整此欄寬度","Arrastra para cambiar el ancho de esta columna","Faites glisser pour redimensionner cette colonne","Ziehen, um die Spaltenbreite zu ändern","Trascina per ridimensionare questa colonna","Arraste para redimensionar esta coluna"],
"Drag to resize · double-click to reset": ["ドラッグで幅を変更 · ダブルクリックで既定に戻す","拖动可调整宽度 · 双击恢复默认","拖曳可調整寬度 · 雙擊還原預設","Arrastra para redimensionar · doble clic para restablecer","Glisser pour redimensionner · double-clic pour réinitialiser","Ziehen zum Anpassen · Doppelklick setzt zurück","Trascina per ridimensionare · doppio clic per reimpostare","Arrasta para redimensionar · duplo clique para repor"],
"Drop .md files or a folder here": [".md ファイルかフォルダーをここにドロップ","把 .md 文件或文件夹拖到这里","把 .md 檔案或資料夾拖到這裡","Suelta aquí archivos .md o una carpeta","Déposez ici des fichiers .md ou un dossier",".md-Dateien oder einen Ordner hierher ziehen","Trascina qui file .md o una cartella","Largue aqui ficheiros .md ou uma pasta"],
"Duplicate": ["複製","创建副本","建立副本","Duplicar","Dupliquer","Duplizieren","Duplica","Duplicar"],
+ "Duplicate as a new space…": ["新しいスペースとして複製…","复制为新空间…","複製為新空間…","Duplicar como espacio nuevo…","Dupliquer comme nouvel espace…","Als neuen Space duplizieren…","Duplica come nuovo spazio…","Duplicar como novo espaço…"],
"Each .md file becomes a page, folders become the page tree, and [[wikilinks]] become real links. Pages are added — nothing here is replaced.": [".md ファイルは 1 つずつページになり、フォルダーはページのツリーに、[[ウィキリンク]] は本物のリンクになります。ページは追加されるだけで、今あるものは置き換わりません。","每个 .md 文件变成一个页面,文件夹变成页面树,[[wiki 链接]] 变成真正的链接。页面是新增的——已有内容不会被替换。","每個 .md 檔案變成一個頁面,資料夾變成頁面樹,[[wiki 連結]] 變成真正的連結。頁面是新增的——既有內容不會被取代。","Cada archivo .md se convierte en una página, las carpetas forman el árbol de páginas y los [[wikilinks]] se vuelven enlaces reales. Las páginas se añaden: aquí no se reemplaza nada.","Chaque fichier .md devient une page, les dossiers deviennent l’arborescence des pages, et les [[wikilinks]] deviennent de vrais liens. Les pages s’ajoutent — rien n’est remplacé.","Jede .md-Datei wird eine Seite, Ordner werden zum Seitenbaum, [[Wikilinks]] werden echte Links. Seiten kommen hinzu — nichts hier wird ersetzt.","Ogni file .md diventa una pagina, le cartelle diventano l’albero delle pagine e i [[wikilink]] diventano link veri. Le pagine si aggiungono: qui non viene sostituito nulla.","Cada ficheiro .md passa a ser uma página, as pastas passam a ser a árvore de páginas e os [[wikilinks]] passam a ser ligações verdadeiras. As páginas são acrescentadas — nada aqui é substituído."],
+ "Edit": ["編集","编辑","編輯","Editar","Modifier","Bearbeiten","Modifica","Editar"],
+ "Edit this link card": ["このリンクカードを編集","编辑此链接卡片","編輯此連結卡片","Editar esta tarjeta de enlace","Modifier cette carte de lien","Diese Link-Karte bearbeiten","Modifica questa scheda di collegamento","Editar este cartão de link"],
"Edited": ["未保存","已编辑","已編輯","Editado","Modifié","Bearbeitet","Modificato","Editado"],
"Editing": ["編集中","编辑中","編輯中","Edición","Édition","Bearbeiten","In modifica","Edição"],
+ "Editor": ["編集者","编辑者","編輯者","Editor","Éditeur","Bearbeiter","Editor","Editor"],
+ "Editor copy saved — recipients join live with edit access": ["編集者コピーを保存しました — 受け取った人は編集権限つきでライブに参加します","编辑者副本已保存 — 收到的人可带编辑权限加入实时会话","編輯者副本已儲存 — 收到的人可帶編輯權限加入即時會話","Copia de editor guardada — quien la reciba se une en vivo con acceso de edición","Copie éditeur enregistrée — les destinataires rejoignent la session en direct avec accès en écriture","Bearbeiter-Kopie gespeichert — Empfänger treten live mit Schreibzugriff bei","Copia editor salvata — chi la riceve entra live con accesso in modifica","Cópia de editor salva — quem receber entra ao vivo com acesso de edição"],
"Encrypt the document inside this file": ["このファイル内のドキュメントを暗号化","加密此文件内的文档","加密此檔案內的文件","Cifrar el documento dentro de este archivo","Chiffrer le document à l’intérieur de ce fichier","Das Dokument in dieser Datei verschlüsseln","Cifra il documento dentro questo file","Encriptar o documento dentro deste ficheiro"],
"Enter the password to open it.": ["開くにはパスワードを入力してください。","输入密码以打开。","請輸入密碼以開啟。","Introduce la contraseña para abrirlo.","Saisissez le mot de passe pour l’ouvrir.","Gib das Passwort ein, um ihn zu öffnen.","Inserisci la password per aprirlo.","Introduza a palavra-passe para o abrir."],
+ "Every page opens wide on this screen from now on": ["この画面では今後すべてのページを広く表示します","在此屏幕上,之后所有页面都会以加宽方式打开","在此螢幕上,之後所有頁面都會以加寬方式開啟","A partir de ahora todas las páginas se abren anchas en esta pantalla","Désormais toutes les pages s’ouvrent en large sur cet écran","Auf diesem Bildschirm öffnen ab jetzt alle Seiten breit","Da ora tutte le pagine si aprono larghe su questo schermo","A partir de agora todas as páginas abrem largas neste ecrã"],
"Every page, as one .md file": ["すべてのページを 1 つの .md ファイルに","所有页面合并为一个 .md 文件","所有頁面合併為一個 .md 檔","Todas las páginas, en un solo archivo .md","Toutes les pages, en un seul fichier .md","Jede Seite, in einer .md-Datei","Tutte le pagine, in un unico file .md","Todas as páginas num único ficheiro .md"],
+ "Everything in this space is replaced by what you paste. ⌘Z undoes it, but only while this window stays open.": ["このスペースの内容はすべて貼り付けた内容に置き換わります。⌘Z で元に戻せますが、それはこのウィンドウを開いている間だけです。","这个空间里的所有内容都会被你粘贴的内容替换。⌘Z 可以撤销,但仅限于这个窗口保持打开时。","這個空間裡的所有內容都會被你貼上的內容取代。⌘Z 可以復原,但僅限於這個視窗保持開啟時。","Todo lo que hay en este espacio se sustituye por lo que pegues. ⌘Z lo deshace, pero solo mientras esta ventana siga abierta.","Tout ce que contient cet espace est remplacé par ce que vous collez. ⌘Z annule l’opération, mais seulement tant que cette fenêtre reste ouverte.","Alles in diesem Space wird durch das ersetzt, was Sie einfügen. ⌘Z macht das rückgängig, aber nur solange dieses Fenster geöffnet bleibt.","Tutto ciò che si trova in questo spazio viene sostituito da quello che incolli. ⌘Z annulla l’operazione, ma solo finché questa finestra resta aperta.","Tudo o que está neste espaço é substituído pelo que colar. ⌘Z desfaz, mas só enquanto esta janela continuar aberta."],
+ "Export": ["書き出す","导出","匯出","Exportar","Exporter","Exportieren","Esporta","Exportar"],
+ "Export a page as a space": ["ページをスペースとして書き出す","将页面导出为空间","將頁面匯出為空間","Exportar una página como espacio","Exporter une page comme espace","Eine Seite als Space exportieren","Esportare una pagina come spazio","Exportar uma página como espaço"],
"Export as Markdown": ["Markdown で書き出す","导出为 Markdown","匯出為 Markdown","Exportar como Markdown","Exporter en Markdown","Als Markdown exportieren","Esporta come Markdown","Exportar como Markdown"],
"Export as Markdown…": ["Markdown で書き出す…","导出为 Markdown…","匯出為 Markdown…","Exportar como Markdown…","Exporter en Markdown…","Als Markdown exportieren…","Esporta come Markdown…","Exportar como Markdown…"],
+ "Export page as a space…": ["ページをスペースとして書き出す…","将页面导出为空间…","將頁面匯出為空間…","Exportar la página como espacio…","Exporter la page comme espace…","Seite als Space exportieren…","Esporta la pagina come spazio…","Exportar a página como espaço…"],
+ "Exported {n} page(s) as a new space": ["{n} ページを新しいスペースとして書き出しました","已将 {n} 个页面导出为新的空间","已將 {n} 個頁面匯出為新的空間","Se exportaron {n} página(s) como un espacio nuevo","{n} page(s) exportée(s) comme nouvel espace","{n} Seite(n) als neuen Space exportiert","{n} pagina/e esportata/e come nuovo spazio","{n} página(s) exportada(s) como um novo espaço"],
"File": ["ファイル","文件","檔案","Archivo","Fichier","Datei","File","Ficheiro"],
"Fills the window": ["ウィンドウいっぱいに広げます","铺满整个窗口","鋪滿整個視窗","Ocupa toda la ventana","Occupe toute la fenêtre","Füllt das Fenster","Riempie la finestra","Preenche a janela"],
"Filter": ["フィルター","筛选","篩選","Filtrar","Filtrer","Filtern","Filtra","Filtrar"],
@@ -87,10 +160,17 @@ export const PACKED: Record<string, ReadonlyArray<string | 0>> = {
"Find": ["検索","查找","尋找","Buscar","Rechercher","Suchen","Trova","Localizar"],
"Find in this space…": ["このスペース内を検索…","在此空间中查找…","在此空間尋找…","Buscar en este espacio…","Rechercher dans cet espace…","In diesem Space suchen…","Trova in questo spazio…","Localizar neste espaço…"],
"Find or create a page…": ["ページを検索または作成…","查找或新建页面…","尋找或建立頁面…","Buscar o crear una página…","Trouver ou créer une page…","Seite finden oder erstellen…","Trova o crea una pagina…","Encontrar ou criar uma página…"],
+ "Following — view only": ["追従中 — 閲覧のみ","跟随中 — 仅供查看","跟隨中 — 僅供檢視","Siguiendo — solo lectura","Suivi en cours — lecture seule","Folgt mit — nur Ansicht","In ascolto — sola lettura","Acompanhando — somente visualização"],
"Full width": ["全幅","全宽","全寬","Ancho completo","Pleine largeur","Volle Breite","Larghezza piena","Largura total"],
+ "Gray": ["グレー","灰色","灰色","Gris","Gris","Grau","Grigio","Cinza"],
+ "Green": ["緑","绿色","綠色","Verde","Vert","Grün","Verde","Verde"],
"Group": ["グループ","分组","分組","Agrupar","Grouper","Gruppieren","Raggruppa","Agrupar"],
"Guest": ["ゲスト","访客","訪客","Invitado","Invité","Gast","Ospite","Convidado"],
+ "Header row": ["見出し行","表头行","標題列","Fila de encabezado","Ligne d’en-tête","Kopfzeile","Riga di intestazione","Linha de cabeçalho"],
+ "Hide properties (])": ["プロパティを隠す(])","隐藏属性面板(])","隱藏屬性面板(])","Ocultar propiedades (])","Masquer les propriétés (])","Eigenschaften ausblenden (])","Nascondi proprietà (])","Ocultar propriedades (])"],
"Hide the page list ([)": ["ページ一覧を隠す([)","隐藏页面列表([)","隱藏頁面清單([)","Ocultar la lista de páginas ([)","Masquer la liste des pages ([)","Seitenliste ausblenden ([)","Nascondi l'elenco delle pagine ([)","Ocultar a lista de páginas ([)"],
+ "Highlight": ["ハイライト","高亮","螢光標示","Resaltado","Surlignage","Hervorhebung","Evidenziazione","Destaque"],
+ "Highlight — ⇧⌘H": ["ハイライト — ⇧⌘H","高亮 — ⇧⌘H","螢光標示 — ⇧⌘H","Resaltado — ⇧⌘H","Surlignage — ⇧⌘H","Hervorhebung — ⇧⌘H","Evidenziazione — ⇧⌘H","Destaque — ⇧⌘H"],
"Icon": ["アイコン","图标","圖示","Icono","Icône","Symbol","Icona","Ícone"],
"Image added ({size})": ["画像を追加しました({size})","已添加图片 ({size})","已新增圖片 ({size})","Imagen añadida ({size})","Image ajoutée ({size})","Bild hinzugefügt ({size})","Immagine aggiunta ({size})","Imagem adicionada ({size})"],
"Image added, resized to fit ({from} → {to})": ["画像を追加し、収まるように縮小しました({from} → {to})","已添加图片,已缩放以适配 ({from} → {to})","已新增圖片,已縮小尺寸 ({from} → {to})","Imagen añadida, redimensionada para que quepa ({from} → {to})","Image ajoutée, redimensionnée ({from} → {to})","Bild hinzugefügt, passend verkleinert ({from} → {to})","Immagine aggiunta, ridimensionata ({from} → {to})","Imagem adicionada, redimensionada para caber ({from} → {to})"],
@@ -101,35 +181,59 @@ export const PACKED: Record<string, ReadonlyArray<string | 0>> = {
"Import Markdown…": ["Markdown を読み込む…","导入 Markdown…","匯入 Markdown…","Importar Markdown…","Importer du Markdown…","Markdown importieren…","Importa Markdown…","Importar Markdown…"],
"Important": ["重要","重要","重要","Importante","Important","Wichtig","Importante","Importante"],
"Imported": ["読み込みました","已导入","已匯入","Importado","Importé","Importiert","Importato","Importado"],
+ "Imported a space": ["スペースを取り込みました","已导入一个空间","已匯入一個空間","Espacio importado","Espace importé","Space importiert","Spazio importato","Espaço importado"],
"Imported notes": ["読み込んだノート","导入的笔记","匯入的筆記","Notas importadas","Notes importées","Importierte Notizen","Note importate","Notas importadas"],
"Include archived pages": ["アーカイブしたページを含める","包含已归档页面","包含已封存的頁面","Incluir páginas archivadas","Inclure les pages archivées","Archivierte Seiten einbeziehen","Includi le pagine archiviate","Incluir páginas arquivadas"],
"Include the image files and they are embedded too. An image this browser cannot open is kept as its path rather than as a broken picture.": ["画像ファイルも一緒に選べば、そのまま埋め込まれます。このブラウザーが開けない画像は、壊れた画像ではなくパスのまま残ります。","把图片文件一起选上,它们也会被嵌入。这个浏览器打不开的图片会以路径的形式保留,而不是一张坏掉的图。","把圖片檔案一起選取,它們也會一併嵌入。這個瀏覽器打不開的圖片會以路徑的形式保留,而不是一張破圖。","Incluye los archivos de imagen y también se incrustan. Una imagen que este navegador no puede abrir se conserva como su ruta, no como una imagen rota.","Ajoutez les fichiers image et ils sont intégrés eux aussi. Une image que ce navigateur ne peut pas ouvrir reste sous forme de chemin, plutôt qu’en image cassée.","Nimm die Bilddateien mit, dann werden sie gleich eingebettet. Ein Bild, das dieser Browser nicht öffnen kann, bleibt als Pfad stehen statt als kaputtes Bild.","Includi anche i file immagine e vengono incorporati. Un’immagine che questo browser non riesce ad aprire resta come percorso, invece che come immagine rotta.","Inclua os ficheiros de imagem e também são incorporados. Uma imagem que este navegador não consegue abrir fica como o seu caminho, em vez de uma imagem partida."],
+ "Include the pages nested under it": ["その下にあるページも含める","包含其下级页面","包含其下層頁面","Incluir las páginas anidadas debajo","Inclure les pages imbriquées en dessous","Die darunter verschachtelten Seiten einschließen","Includi le pagine annidate sotto di essa","Incluir as páginas aninhadas por baixo"],
+ "Inline code — ⌘E": ["インラインコード — ⌘E","行内代码 — ⌘E","行內程式碼 — ⌘E","Código en línea — ⌘E","Code en ligne — ⌘E","Inline-Code — ⌘E","Codice in linea — ⌘E","Código em linha — ⌘E"],
"Insert": ["挿入","插入","插入","Insertar","Insérer","Einfügen","Inserisci","Inserir"],
"Insert a block — text, headings, lists, code, images": ["ブロックを挿入 — テキスト、見出し、リスト、コード、画像","插入块 — 文本、标题、列表、代码、图片","插入區塊 — 文字、標題、清單、程式碼、圖片","Insertar un bloque — texto, encabezados, listas, código, imágenes","Insérer un bloc — texte, titres, listes, code, images","Block einfügen — Text, Überschriften, Listen, Code, Bilder","Inserisci un blocco — testo, titoli, elenchi, codice, immagini","Inserir um bloco — texto, títulos, listas, código, imagens"],
"Interface language": ["表示言語","界面语言","介面語言","Idioma de la interfaz","Langue de l’interface","Sprache der Oberfläche","Lingua dell’interfaccia","Idioma da interface"],
- "Invite someone…": ["ほかの人を招待…","邀请他人…","邀請他人…","Invitar a alguien…","Inviter quelqu’un…","Jemanden einladen…","Invita qualcuno…","Convidar alguém…"],
+ "Interface theme": ["表示テーマ","界面主题","介面主題","Tema de la interfaz","Thème de l’interface","Design der Oberfläche","Tema dell’interfaccia","Tema da interface"],
+ "Invite to edit…": ["編集に招待…","邀请编辑…","邀請編輯…","Invitar a editar…","Inviter à éditer…","Zum Bearbeiten einladen…","Invita a modificare…","Convidar para editar…"],
"Issues": ["イシュー","事项","項目","Incidencias","Tickets","Issues","Issue","Tarefas"],
+ "Italic": ["イタリック","斜体","斜體","Cursiva","Italique","Kursiv","Corsivo","Itálico"],
+ "Italic — ⌘I": ["イタリック — ⌘I","斜体 — ⌘I","斜體 — ⌘I","Cursiva — ⌘I","Italique — ⌘I","Kursiv — ⌘I","Corsivo — ⌘I","Itálico — ⌘I"],
+ "Journal date": ["ジャーナルの日付","日志日期","日誌日期","Fecha del diario","Date du journal","Journaldatum","Data del diario","Data do diário"],
+ "Key-verified identity": ["鍵で検証済みのアイデンティティ","密钥验证的身份","金鑰驗證的身份","Identidad verificada por clave","Identité vérifiée par clé","Schlüssel-verifizierte Identität","Identità verificata da chiave","Identidade verificada por chave"],
"Language": ["言語","语言","語言","Idioma","Langue","Sprache","Lingua","Idioma"],
"Language follows whoever opens the file. It is never written into the document.": ["言語はファイルを開いた人に従います。ドキュメントには書き込まれません。","语言跟随打开文件的人,绝不会写入文档。","語言取決於開啟檔案的人,永遠不會寫入文件中。","El idioma sigue a quien abre el archivo. Nunca se escribe en el documento.","La langue suit la personne qui ouvre le fichier. Elle n’est jamais écrite dans le document.","Die Sprache richtet sich danach, wer die Datei öffnet. Sie wird nie ins Dokument geschrieben.","La lingua segue chi apre il file. Non viene mai scritta nel documento.","O idioma segue quem abre o ficheiro. Nunca é escrito no documento."],
"Language — what this block is highlighted as": ["言語 — このブロックを何として色分けするか","语言 — 这个块按什么语言着色","語言 — 這個區塊以什麼語言上色","Lenguaje — cómo se colorea este bloque","Langage — la coloration de ce bloc","Sprache — wie dieser Block hervorgehoben wird","Linguaggio — come viene evidenziato questo blocco","Linguagem — como este bloco é realçado"],
+ "Last saved": ["最終保存","上次保存","上次儲存","Última vez guardado","Dernier enregistrement","Zuletzt gespeichert","Ultimo salvataggio","Última gravação"],
+ "Launch check couldn't reach the release server ({m}). Check manually below.": ["起動時の確認でリリースサーバーに接続できませんでした ({m})。下から手動で確認してください。","启动检查无法连接发布服务器 ({m})。请在下方手动检查。","啟動檢查無法連線發佈伺服器 ({m})。請在下方手動檢查。","La comprobación inicial no alcanzó el servidor ({m}). Comprueba manualmente abajo.","La vérification au démarrage n'a pas atteint le serveur ({m}). Vérifiez manuellement ci-dessous.","Startprüfung konnte den Release-Server nicht erreichen ({m}). Unten manuell prüfen.","La verifica all'avvio non ha raggiunto il server ({m}). Verifica manualmente qui sotto.","A verificação ao abrir não alcançou o servidor de versões ({m}). Verifique manualmente abaixo."],
"Leave it empty to use the tone mark": ["空のままにすると種類の記号を使います","留空则使用该类型的标记","留空則使用該類型的標記","Déjalo vacío para usar el símbolo del tipo","Laissez vide pour utiliser le symbole du type","Leer lassen, um das Symbol der Art zu verwenden","Lascia vuoto per usare il simbolo del tipo","Deixe vazio para usar o símbolo do tipo"],
+ "Light": ["ライト","浅色","淺色","Claro","Clair","Hell","Chiaro","Claro"],
+ "Link": ["リンク","链接","連結","Enlace","Lien","Link","Collegamento","Link"],
+ "Link address": ["リンク先の URL","链接地址","連結網址","Dirección del enlace","Adresse du lien","Linkadresse","Indirizzo del collegamento","Endereço do link"],
+ "Link card": ["リンクカード","链接卡片","連結卡片","Tarjeta de enlace","Carte de lien","Link-Karte","Scheda di collegamento","Cartão de link"],
"Link to page": ["ページにリンク","链接到页面","連結到頁面","Enlazar a una página","Lier à une page","Seite verlinken","Collega a una pagina","Ligar a uma página"],
+ "Link — ⌘K": ["リンク — ⌘K","链接 — ⌘K","連結 — ⌘K","Enlace — ⌘K","Lien — ⌘K","Link — ⌘K","Collegamento — ⌘K","Link — ⌘K"],
+ "Linked": ["リンク","链接","連結","Enlazado","Lié","Verknüpft","Collegata","Externo"],
"Linked from": ["リンク元","链接来源","連結來源","Enlazado desde","Liens entrants","Verlinkt von","Collegata da","Ligado a partir de"],
"Links to it become dead": ["このページへのリンクが切れます","指向它的链接会失效","指向它的連結會失效","Los enlaces a ella dejan de funcionar","Les liens vers elle seront rompus","Links darauf laufen ins Leere","I collegamenti a questa pagina si interrompono","As ligações para ela ficam quebradas"],
"List": ["リスト","列表","清單","Lista","Liste","Liste","Elenco","Lista"],
+ "Live": ["ライブ","已连接","已連線","En vivo","En direct","Live","Dal vivo","Ao vivo"],
"Live — nobody else is here yet": ["ライブ中 — まだほかに誰もいません","实时协作中 — 还没有其他人","即時協作中 — 還沒有其他人","En directo — todavía no hay nadie más","En direct — personne d’autre pour l’instant","Live — noch niemand sonst da","In diretta — non c’è ancora nessun altro","Ao vivo — ainda não há mais ninguém"],
"Live — send someone the file to bring them in": ["ライブ中 — ファイルを送れば参加できます","实时协作中 — 把文件发给别人即可加入","即時協作中 — 把檔案傳給別人即可加入","En directo — envía el archivo a alguien para que entre","En direct — envoyez le fichier à quelqu’un pour qu’il rejoigne","Live — schick jemandem die Datei, dann ist er dabei","In diretta — manda il file a qualcuno per farlo entrare","Ao vivo — envie o ficheiro a alguém para essa pessoa entrar"],
"Live — {n} other people are here": ["ライブ中 — ほかに{n}人がいます","实时协作中 — 还有 {n} 人在此","即時協作中 — 還有 {n} 人在此","En directo — hay {n} personas más","En direct — {n} autres personnes sont là","Live — {n} weitere Personen sind da","In diretta — ci sono altre {n} persone","Ao vivo — há mais {n} pessoas"],
+ "Load this audio": ["この音声を読み込む","加载此音频","載入此音訊","Cargar este audio","Charger cet audio","Dieses Audio laden","Carica questo audio","Carregar este áudio"],
"Load this image": ["この画像を読み込む","加载此图片","載入此圖片","Cargar esta imagen","Charger cette image","Dieses Bild laden","Carica questa immagine","Carregar esta imagem"],
+ "Load this video": ["この動画を読み込む","加载此视频","載入此影片","Cargar este vídeo","Charger cette vidéo","Dieses Video laden","Carica questo video","Carregar este vídeo"],
+ "Loop": ["ループ","循环","循環","Bucle","Boucle","Schleife","Loop","Repetição"],
"Make this page an issue": ["このページをイシューにする","将此页面变为事项","將此頁面變為項目","Convertir esta página en incidencia","Transformer cette page en ticket","Diese Seite zu einem Issue machen","Trasforma questa pagina in una issue","Transformar esta página numa tarefa"],
"Manual order": ["手動の並び順","手动排序","手動排序","Orden manual","Ordre manuel","Manuelle Reihenfolge","Ordine manuale","Ordem manual"],
+ "Match my system": ["システムに合わせる","跟随系统","跟隨系統","Según el sistema","Comme le système","Systemeinstellung folgen","Come il sistema","Acompanhar o sistema"],
+ "Mints brand-new keys. Every previously sent copy stops syncing for good; share fresh copies afterwards.": ["まったく新しい鍵を発行します。これまでに送ったコピーは永久に同期しなくなります。以後は新しいコピーを共有してください。","铸造全新密钥。之前发送的所有副本将永久停止同步;此后请分享新副本。","鑄造全新金鑰。之前傳送的所有副本將永久停止同步;此後請分享新副本。","Genera claves totalmente nuevas. Todas las copias enviadas dejan de sincronizarse para siempre; comparte copias nuevas después.","Génère des clés toutes neuves. Chaque copie déjà envoyée cesse définitivement de se synchroniser ; partagez ensuite de nouvelles copies.","Erzeugt brandneue Schlüssel. Jede bereits gesendete Kopie synchronisiert endgültig nicht mehr; teile danach frische Kopien.","Genera chiavi nuove di zecca. Ogni copia già inviata smette per sempre di sincronizzarsi; condividi poi copie nuove.","Gera chaves novas em folha. Toda cópia enviada antes para de sincronizar de vez; compartilhe cópias novas depois."],
"More": ["その他","更多","更多","Más","Plus","Mehr","Altro","Mais"],
"Move down": ["下へ移動","下移","下移","Bajar","Descendre","Nach unten","Sposta giù","Mover para baixo"],
"Move up": ["上へ移動","上移","上移","Subir","Monter","Nach oben","Sposta su","Mover para cima"],
+ "Muted": ["ミュート","静音","靜音","Silenciado","Muet","Stumm","Muto","Sem som"],
"New issue": ["新しいイシュー","新建事项","新增項目","Nueva incidencia","Nouveau ticket","Neues Issue","Nuova issue","Nova tarefa"],
"New page": ["新規ページ","新建页面","新增頁面","Nueva página","Nouvelle page","Neue Seite","Nuova pagina","Nova página"],
"New page (⌘⌥N)": ["新規ページ (⌘⌥N)","新建页面 (⌘⌥N)","新增頁面 (⌘⌥N)","Nueva página (⌘⌥N)","Nouvelle page (⌘⌥N)","Neue Seite (⌘⌥N)","Nuova pagina (⌘⌥N)","Nova página (⌘⌥N)"],
"New page inside": ["この中に新規ページ","在其中新建页面","在其中新增頁面","Nueva página dentro","Nouvelle page à l’intérieur","Neue Unterseite","Nuova pagina interna","Nova página dentro desta"],
+ "New to Bento? Find templates, the gallery and the AI editing guide at {home} — or ⭐ it on {gh}.": ["Bento は初めてですか?テンプレート、ギャラリー、AI編集ガイドは {home} でどうぞ — {gh} で ⭐ もぜひ。","第一次用 Bento?在 {home} 查看模板、图库和 AI 编辑指南 — 也欢迎到 {gh} 点 ⭐。","第一次用 Bento?在 {home} 查看範本、圖庫和 AI 編輯指南 — 也歡迎到 {gh} 按 ⭐。","¿Nuevo en Bento? Encuentra plantillas, la galería y la guía de edición con IA en {home} — o dale ⭐ en {gh}.","Nouveau sur Bento ? Trouvez des modèles, la galerie et le guide d’édition par IA sur {home} — ou mettez une ⭐ sur {gh}.","Neu bei Bento? Vorlagen, die Galerie und den KI-Bearbeitungsleitfaden findest du auf {home} — oder gib ⭐ auf {gh}.","Nuovo su Bento? Trovi modelli, la galleria e la guida all’editing con IA su {home} — o metti una ⭐ su {gh}.","Novo no Bento? Encontre modelos, a galeria e o guia de edição com IA em {home} — ou dê uma ⭐ no {gh}."],
"Next (⏎)": ["次へ (⏎)","下一个 (⏎)","下一個 (⏎)","Siguiente (⏎)","Suivant (⏎)","Weiter (⏎)","Successivo (⏎)","Seguinte (⏎)"],
"No Markdown files in that selection": ["選択に Markdown ファイルがありません","所选内容里没有 Markdown 文件","所選項目中沒有 Markdown 檔案","No hay archivos Markdown en esa selección","Aucun fichier Markdown dans cette sélection","Keine Markdown-Dateien in dieser Auswahl","Nessun file Markdown in questa selezione","Não há ficheiros Markdown nessa seleção"],
"No block matches": ["一致するブロックがありません","没有匹配的块","沒有符合的區塊","Ningún bloque coincide","Aucun bloc correspondant","Kein Block passt","Nessun blocco corrisponde","Nenhum bloco corresponde"],
@@ -137,55 +241,107 @@ export const PACKED: Record<string, ReadonlyArray<string | 0>> = {
"No issues match this filter.": ["この条件に一致するイシューはありません。","没有符合此筛选条件的事项。","沒有符合此篩選條件的項目。","Ninguna incidencia coincide con este filtro.","Aucun ticket ne correspond à ce filtre.","Keine Issues entsprechen diesem Filter.","Nessuna issue corrisponde a questo filtro.","Nenhuma tarefa corresponde a este filtro."],
"No issues yet. Add a status field to any page and it appears here.": ["まだイシューはありません。どれかのページにステータス項目を追加すると、ここに表示されます。","还没有事项。给任意页面添加状态字段,它就会出现在这里。","還沒有項目。為任一頁面新增狀態欄位,它就會出現在這裡。","Aún no hay incidencias. Añade un campo de estado a cualquier página y aparecerá aquí.","Aucun ticket pour l’instant. Ajoutez un champ statut à une page et elle apparaîtra ici.","Noch keine Issues. Gib einer Seite ein Status-Feld, dann erscheint sie hier.","Ancora nessuna issue. Aggiungi un campo stato a una pagina e comparirà qui.","Ainda não há tarefas. Adiciona um campo de estado a qualquer página e ela aparece aqui."],
"No pages yet": ["ページがまだありません","还没有页面","尚無頁面","Aún no hay páginas","Aucune page pour l’instant","Noch keine Seiten","Ancora nessuna pagina","Ainda sem páginas"],
+ "Not in this file: it needs the network, and the site is told when someone opens the page": ["このファイルの中にはありません。再生にはネットワークが必要で、誰かがこのページを開いたことがそのサイトに伝わります","不在此文件内:播放需要联网,而且该网站会知道有人打开了这个页面","不在這個檔案裡:播放需要網路,而且該網站會知道有人開啟了這個頁面","No está en este archivo: necesita la red, y ese sitio sabrá que alguien ha abierto esta página","N’est pas dans ce fichier : la lecture nécessite le réseau, et ce site saura que quelqu’un a ouvert cette page","Nicht in dieser Datei: das Abspielen braucht das Netz, und die Website erfährt, dass jemand diese Seite geöffnet hat","Non è dentro questo file: per riprodurla serve la rete, e quel sito saprà che qualcuno ha aperto questa pagina","Não está neste ficheiro: precisa da rede, e esse site fica a saber que alguém abriu esta página"],
+ "Not live — turns on when you share": ["未接続 — 共有すると自動的にライブになります","未上线 — 分享时自动开启","未上線 — 分享時自動開啟","Sin conexión — se activa al compartir","Hors ligne — s’active quand vous partagez","Nicht live — startet beim Teilen","Non live — si attiva quando condividi","Fora do ar — ativa quando você compartilha"],
"Not loaded — opening it would tell that site you opened this space.": ["未読み込み — 読み込むと、このスペースを開いたことがそのサイトに伝わります。","未加载 — 加载会让该网站知道你打开了这个空间。","未載入 — 載入會讓該網站知道你開啟了這個空間。","No cargada: al cargarla, ese sitio sabría que has abierto este espacio.","Non chargée : la charger indiquerait à ce site que vous avez ouvert cet espace.","Nicht geladen — beim Laden erfährt diese Website, dass du diesen Space geöffnet hast.","Non caricata: caricarla direbbe a quel sito che hai aperto questo spazio.","Não carregada — carregá-la diria a esse site que você abriu este espaço."],
"Not sharing yet — click to start a live session": ["まだ共有していません — クリックしてライブセッションを開始","尚未共享 — 点击开始实时协作","尚未共享 — 點擊開始即時協作","Aún no se comparte — haz clic para iniciar una sesión en vivo","Pas encore partagé — cliquez pour démarrer une session en direct","Noch nicht geteilt — zum Starten einer Live-Sitzung klicken","Non ancora condiviso — clicca per avviare una sessione dal vivo","Ainda não está compartilhando — clique para iniciar uma sessão ao vivo"],
"Note": ["メモ","备注","備註","Nota","Note","Hinweis","Nota","Nota"],
"Nothing found": ["見つかりませんでした","没有结果","找不到結果","Sin resultados","Aucun résultat","Nichts gefunden","Nessun risultato","Nada encontrado"],
+ "Nothing is fetched. A card shows what you type here — opening this space never contacts the site.": ["何も取得しません。カードにはここで入力した内容が表示され、このスペースを開いてもサイトに接続することはありません。","不会抓取任何内容。卡片显示的就是你在这里输入的内容——打开这个空间绝不会联系该网站。","不會抓取任何內容。卡片顯示的就是你在這裡輸入的內容——開啟這個空間絕不會連線到該網站。","No se descarga nada. La tarjeta muestra lo que escribas aquí: abrir este espacio nunca contacta con el sitio.","Rien n’est récupéré. La carte affiche ce que vous saisissez ici — ouvrir cet espace ne contacte jamais le site.","Es wird nichts abgerufen. Die Karte zeigt, was Sie hier eintragen — das Öffnen dieses Space kontaktiert die Website nie.","Non viene scaricato nulla. La scheda mostra ciò che scrivi qui: aprire questo spazio non contatta mai il sito.","Nada é obtido. O cartão mostra o que você escrever aqui — abrir este espaço nunca contacta o site."],
"Nothing leaves this file until you start a session.": ["セッションを開始するまで、このファイルから外に出るものはありません。","在你开始会话之前,没有任何内容离开这个文件。","在你開始工作階段之前,沒有任何內容離開這個檔案。","Nada sale de este archivo hasta que inicies una sesión.","Rien ne quitte ce fichier tant que vous n’avez pas démarré de session.","Nichts verlässt diese Datei, bis du eine Sitzung startest.","Niente esce da questo file finché non avvii una sessione.","Nada sai deste ficheiro até iniciares uma sessão."],
"Now an issue": ["イシューになりました","现在是事项了","現在是項目了","Ahora es una incidencia","C’est désormais un ticket","Jetzt ein Issue","Ora è una issue","Agora é uma tarefa"],
"Off by default — they were archived for a reason": ["既定ではオフ — アーカイブしたのには理由があります","默认关闭 — 当初归档总是有原因的","預設關閉 — 它們被封存是有原因的","Desactivado por defecto — por algo se archivaron","Désactivé par défaut — elles ont été archivées pour une raison","Standardmäßig aus — sie wurden aus einem Grund archiviert","Disattivo per impostazione predefinita — sono state archiviate per un motivo","Desativado por predefinição — foram arquivadas por alguma razão"],
+ "Offline mode is on — nothing leaves this computer.": ["オフラインモードがオンです — このコンピュータから何も送信されません。","离线模式已开启 — 任何数据都不会离开这台电脑。","離線模式已開啟 — 任何資料都不會離開這台電腦。","El modo sin conexión está activo: nada sale de este equipo.","Le mode hors ligne est activé — rien ne quitte cet ordinateur.","Der Offline-Modus ist aktiv — nichts verlässt diesen Computer.","La modalità offline è attiva: nulla lascia questo computer.","O modo offline está ativado — nada sai deste computador."],
+ "On this screen only — it is not saved in the file": ["この画面でのみ有効です。ファイルには保存されません","仅在此屏幕上生效,不会保存到文件中","僅在此螢幕上生效,不會儲存到檔案中","Solo en esta pantalla: no se guarda en el archivo","Sur cet écran seulement — ce n’est pas enregistré dans le fichier","Nur auf diesem Bildschirm — es wird nicht in der Datei gespeichert","Solo su questo schermo: non viene salvato nel file","Apenas neste ecrã — não é guardado no ficheiro"],
+ "One emoji": ["絵文字ひとつ","一个表情符号","一個表情符號","Un emoji","Un emoji","Ein Emoji","Un'emoji","Um emoji"],
+ "One fewer": ["1つ減らす","减少一个","減少一個","Uno menos","Un de moins","Eins weniger","Uno in meno","Menos um"],
+ "One line about what is there": ["リンク先の内容を一行で","用一行说明那里有什么","用一行說明那裡有什麼","Una línea sobre lo que hay allí","Une ligne sur ce qui s’y trouve","Eine Zeile darüber, was dort zu finden ist","Una riga su che cosa si trova lì","Uma linha sobre o que há lá"],
+ "One more": ["1つ増やす","增加一个","增加一個","Uno más","Un de plus","Eins mehr","Uno in più","Mais um"],
+ "One page and what is under it, as its own file": ["1 つのページとその下にあるものを、独立したファイルに","一个页面及其下级页面,成为独立文件","一個頁面及其下層頁面,成為獨立檔案","Una página y lo que hay debajo, como archivo propio","Une page et ce qui se trouve dessous, dans son propre fichier","Eine Seite und alles darunter, als eigene Datei","Una pagina e ciò che sta sotto, come file a sé","Uma página e o que está abaixo dela, como ficheiro próprio"],
+ "Only pages that ask for it": ["指定のあるページだけ","仅限指定了宽度的页面","僅限指定了寬度的頁面","Solo las páginas que lo pidan","Seulement les pages qui le demandent","Nur Seiten, die es verlangen","Solo le pagine che lo richiedono","Apenas as páginas que o pedem"],
+ "Only the owner of this space can invite people": ["この Space に人を招待できるのはオーナーだけです","只有此 Space 的所有者才能邀请他人","只有此 Space 的擁有者才能邀請他人","Solo el propietario de este Space puede invitar a otras personas","Seul le propriétaire de cet espace peut inviter des personnes","Nur der Eigentümer dieses Space kann Personen einladen","Solo il proprietario di questo Space può invitare altre persone","Apenas o dono deste Space pode convidar pessoas"],
"Open only": ["未完了のみ","仅未完成","僅未完成","Solo abiertas","Ouverts seulement","Nur offene","Solo aperte","Apenas em aberto"],
+ "Orange": ["オレンジ","橙色","橘色","Naranja","Orange","Orange","Arancione","Laranja"],
"Other": ["その他","其他","其他","Otras","Autres","Sonstige","Altre","Outras"],
"Other ways to save": ["その他の保存方法","其他保存方式","其他儲存方式","Otras formas de guardar","Autres façons d’enregistrer","Weitere Speicheroptionen","Altri modi per salvare","Outras formas de guardar"],
"Out of the sidebar, still searchable and linkable": ["サイドバーから外れますが、検索もリンクもできます","移出侧边栏,仍可搜索和链接","移出側邊欄,仍可搜尋與連結","Fuera de la barra lateral, pero aún se puede buscar y enlazar","Hors de la barre latérale, toujours dans la recherche et les liens","Weg aus der Seitenleiste, weiterhin auffindbar und verlinkbar","Fuori dalla barra laterale, ma sempre ricercabile e collegabile","Fora da barra lateral, mas continua pesquisável e ligável"],
+ "Owner": ["オーナー","所有者","擁有者","Propietario","Propriétaire","Eigentümer","Proprietario","Dono"],
+ "Page": ["ページ","页面","頁面","Página","Page","Seite","Pagina","Página"],
"Page options": ["ページのオプション","页面选项","頁面選項","Opciones de la página","Options de la page","Seiten-Optionen","Opzioni della pagina","Opções da página"],
"Pages": ["ページ","页面","頁面","Páginas","Pages","Seiten","Pagine","Páginas"],
+ "Pages open at their normal width again": ["ページは通常の幅に戻りました","页面已恢复为正常宽度","頁面已恢復為正常寬度","Las páginas vuelven a su anchura normal","Les pages retrouvent leur largeur normale","Seiten öffnen wieder in normaler Breite","Le pagine tornano alla larghezza normale","As páginas voltam à largura normal"],
"Pages — show or hide the page list": ["ページ — ページ一覧の表示/非表示","页面 — 显示或隐藏页面列表","頁面 — 顯示或隱藏頁面清單","Páginas — mostrar u ocultar la lista de páginas","Pages — afficher ou masquer la liste","Seiten — Seitenliste ein- oder ausblenden","Pagine — mostra o nascondi l’elenco delle pagine","Páginas — mostrar ou ocultar a lista de páginas"],
"Password": ["パスワード","密码","密碼","Contraseña","Mot de passe","Passwort","Password","Palavra-passe"],
"Password removed. Save to write the space unencrypted.": ["パスワードを削除しました。保存すると、このスペースは暗号化なしで書き込まれます。","已移除密码。保存后空间将以未加密方式写入。","已移除密碼。儲存後空間將以未加密方式寫入。","Contraseña eliminada. Guarda para escribir el espacio sin cifrar.","Mot de passe supprimé. Enregistrez pour écrire l’espace non chiffré.","Passwort entfernt. Speichere, um den Space unverschlüsselt zu schreiben.","Password rimossa. Salva per scrivere lo spazio non cifrato.","Palavra-passe removida. Guarde para escrever o espaço sem encriptação."],
"Password set. Save to write the space encrypted.": ["パスワードを設定しました。保存すると、このスペースは暗号化して書き込まれます。","已设置密码。保存后空间将以加密方式写入。","已設定密碼。儲存後空間將以加密方式寫入。","Contraseña establecida. Guarda para escribir el espacio cifrado.","Mot de passe défini. Enregistrez pour écrire l’espace chiffré.","Passwort gesetzt. Speichere, um den Space verschlüsselt zu schreiben.","Password impostata. Salva per scrivere lo spazio cifrato.","Palavra-passe definida. Guarde para escrever o espaço encriptado."],
"Password…": ["パスワード…","密码…","密碼…","Contraseña…","Mot de passe…","Passwort…","Password…","Palavra-passe…"],
+ "Paste document JSON here…": ["ここにドキュメント JSON を貼り付け…","在此粘贴文档 JSON…","在此貼上文件 JSON…","Pega aquí el JSON del documento…","Collez le JSON du document ici…","Dokument-JSON hier einfügen…","Incolla qui il JSON del documento…","Cole aqui o JSON do documento…"],
+ "Paste or type a link": ["リンクを貼り付けるか入力してください","粘贴或输入链接","貼上或輸入連結","Pega o escribe un enlace","Collez ou saisissez un lien","Link einfügen oder eingeben","Incolla o scrivi un collegamento","Cole ou digite um link"],
"People in this space": ["このスペースにいる人","此空间中的人","此空間中的人","Personas en este espacio","Personnes dans cet espace","Personen in diesem Space","Persone in questo spazio","Pessoas neste espaço"],
+ "Picture": ["画像","图片","圖片","Imagen","Image","Bild","Immagine","Imagem"],
+ "Picture…": ["画像…","图片…","圖片…","Imagen…","Image…","Bild…","Immagine…","Imagem…"],
+ "Pink": ["ピンク","粉色","粉紅色","Rosa","Rose","Rosa","Rosa","Rosa"],
"Plain text": ["プレーンテキスト","纯文本","純文字","Texto sin formato","Texte brut","Nur Text","Testo semplice","Texto simples"],
+ "Poster": ["ポスター","封面图","封面圖","Póster","Affiche","Poster","Poster","Miniatura"],
+ "Poster…": ["ポスター…","封面图…","封面圖…","Póster…","Affiche…","Poster…","Poster…","Miniatura…"],
"Previous (⇧⏎)": ["前へ (⇧⏎)","上一个 (⇧⏎)","上一個 (⇧⏎)","Anterior (⇧⏎)","Précédent (⇧⏎)","Zurück (⇧⏎)","Precedente (⇧⏎)","Anterior (⇧⏎)"],
"Print": ["印刷","打印","列印","Imprimir","Imprimer","Drucken","Stampa","Imprimir"],
"Print / PDF…": ["印刷 / PDF…","打印 / PDF…","列印 / PDF…","Imprimir / PDF…","Imprimer / PDF…","Drucken / PDF…","Stampa / PDF…","Imprimir / PDF…"],
"Print or save as PDF": ["印刷または PDF として保存","打印或存为 PDF","列印或另存為 PDF","Imprimir o guardar como PDF","Imprimer ou enregistrer en PDF","Drucken oder als PDF speichern","Stampa o salva come PDF","Imprimir ou guardar como PDF"],
"Print…": ["印刷…","打印…","列印…","Imprimir…","Imprimer…","Drucken…","Stampa…","Imprimir…"],
+ "Properties": ["プロパティ","属性","屬性","Propiedades","Propriétés","Eigenschaften","Proprietà","Propriedades"],
+ "Properties — show or hide this block’s settings": ["プロパティ — このブロックの設定を表示または非表示にする","属性 — 显示或隐藏这个块的设置","屬性 — 顯示或隱藏這個區塊的設定","Propiedades — mostrar u ocultar los ajustes de este bloque","Propriétés — afficher ou masquer les réglages de ce bloc","Eigenschaften — Einstellungen dieses Blocks ein- oder ausblenden","Proprietà — mostra o nascondi le impostazioni di questo blocco","Propriedades — mostrar ou ocultar as definições deste bloco"],
+ "Purple": ["紫","紫色","紫色","Morado","Violet","Lila","Viola","Roxo"],
+ "Put the caret in a block to see what it can be.": ["ブロックにカーソルを置くと、そのブロックで変えられるものが出ます。","把光标放进一个块,就能看到它能改什么。","把游標放進一個區塊,就能看到它能改什麼。","Coloca el cursor en un bloque para ver qué puede cambiarse.","Placez le curseur dans un bloc pour voir ce qui s’y règle.","Setz den Cursor in einen Block, um zu sehen, was sich daran ändern lässt.","Metti il cursore in un blocco per vedere che cosa si può cambiare.","Coloque o cursor num bloco para ver o que se pode mudar nele."],
+ "Read the release notes for v{v} (opens in a new tab)": ["v{v} のリリースノートを読む(新しいタブで開きます)","查看 v{v} 的发行说明(在新标签页中打开)","查看 v{v} 的發行說明(在新分頁中開啟)","Leer las notas de la versión v{v} (se abre en una pestaña nueva)","Lire les notes de version de la v{v} (s’ouvre dans un nouvel onglet)","Versionshinweise für v{v} lesen (öffnet einen neuen Tab)","Leggi le note di rilascio della v{v} (si apre in una nuova scheda)","Ler as notas de versão da v{v} (abre em uma nova aba)"],
+ "Read-only copy saved — it follows the live session, view only": ["読み取り専用コピーを保存しました — ライブセッションに追従し、閲覧のみです","只读副本已保存——它跟随实时会话,仅供查看","唯讀副本已儲存——它跟隨即時工作階段,僅供檢視","Copia de solo lectura guardada — sigue la sesión en vivo, solo para ver","Copie en lecture seule enregistrée — elle suit la session en direct, en lecture seule","Nur-Lese-Kopie gespeichert — sie folgt der Live-Sitzung, nur zum Ansehen","Copia in sola lettura salvata — segue la sessione live, solo visualizzazione","Cópia somente leitura salva — ela acompanha a sessão ao vivo, apenas para visualizar"],
+ "Reading file…": ["ファイルを読み込み中…","正在读取文件…","正在讀取檔案…","Leyendo el archivo…","Lecture du fichier…","Lese Datei…","Lettura del file…","A ler o ficheiro…"],
"Reading image…": ["画像を読み込み中…","正在读取图片…","正在讀取圖片…","Leyendo la imagen…","Lecture de l’image…","Lese Bild…","Lettura dell’immagine…","A ler a imagem…"],
"Reading view": ["閲覧ビュー","阅读视图","閱讀檢視","Vista de lectura","Mode lecture","Leseansicht","Vista di lettura","Modo de leitura"],
"Reading view — press Esc or the eye to edit": ["閲覧ビュー — Esc か目のアイコンで編集に戻ります","阅读视图 — 按 Esc 或点击眼睛图标即可编辑","閱讀檢視 — 按 Esc 或眼睛圖示即可編輯","Vista de lectura — pulsa Esc o el ojo para editar","Vue lecture — appuyez sur Esc ou sur l’œil pour modifier","Leseansicht — Esc oder das Auge zum Bearbeiten","Vista di lettura — premi Esc o l’occhio per modificare","Vista de leitura — prima Esc ou o olho para editar"],
"Reading {n} file(s)…": ["{n} 個のファイルを読み込み中…","正在读取 {n} 个文件…","正在讀取 {n} 個檔案…","Leyendo {n} archivo(s)…","Lecture de {n} fichier(s)…","Lese {n} Datei(en)…","Lettura di {n} file…","A ler {n} ficheiro(s)…"],
+ "Red": ["赤","红色","紅色","Rojo","Rouge","Rot","Rosso","Vermelho"],
"Redo (⇧⌘Z)": ["やり直す (⇧⌘Z)","重做 (⇧⌘Z)","重做 (⇧⌘Z)","Rehacer (⇧⌘Z)","Rétablir (⇧⌘Z)","Wiederholen (⇧⌘Z)","Ripeti (⇧⌘Z)","Refazer (⇧⌘Z)"],
+ "Reload into new version": ["再読込して新バージョンへ","重新加载进入新版本","重新載入進入新版本","Recargar en la nueva versión","Recharger dans la nouvelle version","Neu laden in die neue Version","Ricarica nella nuova versione","Recarregar na nova versão"],
+ "Remove": ["削除","移除","移除","Quitar","Retirer","Entfernen","Rimuovi","Remover"],
"Remove password…": ["パスワードを削除…","移除密码…","移除密碼…","Quitar contraseña…","Supprimer le mot de passe…","Passwort entfernen…","Rimuovi password…","Remover palavra-passe…"],
- "Remove the password? The next save writes the document in the clear.": ["パスワードを削除しますか?次回の保存でドキュメントは平文で書き込まれます。","要移除密码吗?下次保存会以明文写入文档。","要移除密碼嗎?下次儲存會以明文寫入文件。","¿Quitar la contraseña? El próximo guardado escribe el documento sin cifrar.","Supprimer le mot de passe ? Le prochain enregistrement écrira le document en clair.","Das Passwort entfernen? Beim nächsten Speichern wird das Dokument im Klartext geschrieben.","Rimuovere la password? Il prossimo salvataggio scriverà il documento in chiaro.","Remover a palavra-passe? Da próxima vez que guardar, o documento é escrito sem encriptação."],
+ "Remove the password": ["パスワードを削除","移除密码","移除密碼","Quitar la contraseña","Supprimer le mot de passe","Passwort entfernen","Rimuovi la password","Remover a palavra-passe"],
+ "Remove the password?": ["パスワードを削除しますか?","要移除密码吗?","要移除密碼嗎?","¿Quitar la contraseña?","Supprimer le mot de passe ?","Passwort entfernen?","Rimuovere la password?","Remover a palavra-passe?"],
+ "Remove the picture": ["画像を削除","移除图片","移除圖片","Quitar la imagen","Retirer l’image","Bild entfernen","Rimuovi l'immagine","Remover a imagem"],
+ "Remove this column": ["この列を削除","删除此列","刪除此欄","Eliminar esta columna","Supprimer cette colonne","Diese Spalte entfernen","Rimuovi questa colonna","Remover esta coluna"],
+ "Remove this row": ["この行を削除","删除此行","刪除此列","Eliminar esta fila","Supprimer cette ligne","Diese Zeile entfernen","Rimuovi questa riga","Remover esta linha"],
+ "Remove {name} from this space? Their copy drops to read-only.": ["{name} をこの Space から削除しますか?相手のコピーは読み取り専用になります。","要将 {name} 从此 Space 移除吗?对方的副本将变为只读。","要將 {name} 從此 Space 移除嗎?對方的副本將變為唯讀。","¿Quitar a {name} de este Space? Su copia pasará a solo lectura.","Retirer {name} de cet espace ? Sa copie passera en lecture seule.","{name} aus diesem Space entfernen? Die Kopie wird schreibgeschützt.","Rimuovere {name} da questo Space? La sua copia diventerà di sola lettura.","Remover {name} deste Space? A cópia dessa pessoa passa a ser somente leitura."],
+ "Remove {name} — revokes this device’s access; everyone else is unaffected": ["{name} を削除 — このデバイスのアクセスを取り消します。他の人には影響しません","移除 {name} — 撤销该设备的访问权限;其他人不受影响","移除 {name} — 撤銷該裝置的存取權限;其他人不受影響","Quitar a {name} — revoca el acceso de este dispositivo; nadie más se ve afectado","Retirer {name} — révoque l’accès de cet appareil ; personne d’autre n’est affecté","{name} entfernen — widerruft den Zugriff dieses Geräts; alle anderen bleiben unberührt","Rimuovi {name} — revoca l’accesso di questo dispositivo; nessun altro è toccato","Remover {name} — revoga o acesso deste dispositivo; ninguém mais é afetado"],
"Rename": ["名前を変更","重命名","重新命名","Cambiar nombre","Renommer","Umbenennen","Rinomina","Mudar o nome"],
+ "Reopen": ["再オープン","重新打开","重新開啟","Reabrir","Rouvrir","Wieder öffnen","Riapri","Reabrir"],
+ "Repeat when it reaches the end": ["最後まで再生したら繰り返す","播放到结尾后重新开始","播放到結尾後重新開始","Repetir al llegar al final","Recommencer à la fin","Am Ende von vorn beginnen","Ricomincia quando arriva alla fine","Recomeçar quando chegar ao fim"],
+ "Replace": ["置き換える","替换","取代","Sustituir","Remplacer","Ersetzen","Sostituisci","Substituir"],
"Replace all": ["すべて置換","全部替换","全部取代","Reemplazar todo","Tout remplacer","Alle ersetzen","Sostituisci tutto","Substituir tudo"],
+ "Replace every page from pasted JSON?": ["貼り付けた JSON ですべてのページを置き換えますか?","用粘贴的 JSON 替换所有页面吗?","用貼上的 JSON 取代所有頁面嗎?","¿Sustituir todas las páginas por el JSON pegado?","Remplacer toutes les pages par le JSON collé ?","Alle Seiten durch das eingefügte JSON ersetzen?","Sostituire tutte le pagine con il JSON incollato?","Substituir todas as páginas pelo JSON colado?"],
+ "Replace from JSON…": ["JSON から置き換え…","从 JSON 替换…","從 JSON 取代…","Reemplazar desde JSON…","Remplacer depuis JSON…","Aus JSON ersetzen…","Sostituisci da JSON…","Substituir a partir de JSON…"],
+ "Replace picture": ["画像を差し替え","替换图片","替換圖片","Sustituir la imagen","Remplacer l’image","Bild ersetzen","Sostituisci l'immagine","Substituir a imagem"],
"Replace with": ["置換後の文字列","替换为","取代為","Reemplazar por","Remplacer par","Ersetzen durch","Sostituisci con","Substituir por"],
"Replace with…": ["置換後の文字列…","替换为…","取代為…","Reemplazar por…","Remplacer par…","Ersetzen durch…","Sostituisci con…","Substituir por…"],
"Replace {n} occurrence(s) across the whole space?": ["スペース全体で {n} 件を置換しますか?","要在整个空间中替换 {n} 处吗?","要取代整個空間中的 {n} 處嗎?","¿Reemplazar {n} coincidencia(s) en todo el espacio?","Remplacer {n} occurrence(s) dans tout l’espace ?","{n} Vorkommen im ganzen Space ersetzen?","Sostituire {n} occorrenze in tutto lo spazio?","Substituir {n} ocorrência(s) em todo o espaço?"],
"Replaced": ["置換しました","已替换","已取代","Reemplazado","Remplacé","Ersetzt","Sostituite","Substituído"],
+ "Replace…": ["置き換える…","替换…","取代…","Reemplazar…","Remplacer…","Ersetzen…","Sostituisci…","Substituir…"],
+ "Reply": ["返信","回复","回覆","Responder","Répondre","Antworten","Rispondi","Responder"],
+ "Reply…": ["返信…","回复…","回覆…","Responder…","Répondre…","Antworten…","Rispondi…","Responder…"],
+ "Reset access? Every copy you’ve sent stops syncing; only copies saved after this can join.": ["アクセスをリセットしますか?送信済みのすべてのコピーが同期を停止し、以後保存したコピーだけが参加できます。","重置访问权限?已发送的所有副本将停止同步;只有此后保存的副本才能加入。","重設存取權限?已傳送的所有副本將停止同步;只有此後儲存的副本才能加入。","¿Restablecer el acceso? Todas las copias enviadas dejarán de sincronizarse; solo podrán unirse las guardadas después.","Réinitialiser l’accès ? Toutes les copies envoyées cesseront de se synchroniser ; seules celles enregistrées ensuite pourront rejoindre.","Zugriff zurücksetzen? Alle gesendeten Kopien synchronisieren nicht mehr; nur danach gespeicherte können beitreten.","Reimpostare l’accesso? Tutte le copie inviate smetteranno di sincronizzarsi; solo quelle salvate dopo potranno unirsi.","Redefinir o acesso? Toda cópia que você enviou para de sincronizar; apenas cópias salvas depois disso podem entrar."],
+ "Reset access…": ["アクセスをリセット…","重置访问权限…","重設存取權限…","Restablecer acceso…","Réinitialiser l’accès…","Zugriff zurücksetzen…","Reimposta accesso…","Redefinir acesso…"],
"Resized": ["縮小済み","已缩放","已縮小","Redimensionada","Redimensionnée","Verkleinert","Ridimensionata","Redimensionada"],
+ "Resolve": ["解決","解决","解決","Resolver","Résoudre","Erledigen","Risolvi","Resolver"],
"Restore": ["復元","恢复","還原","Restaurar","Restaurer","Wiederherstellen","Ripristina","Restaurar"],
"Restore to the page list": ["ページ一覧に戻す","恢复到页面列表","還原到頁面清單","Restaurar a la lista de páginas","Restaurer dans la liste des pages","Zurück in die Seitenliste","Ripristina nell’elenco delle pagine","Restaurar para a lista de páginas"],
"Room for a board or a table": ["ボードや表にちょうどよい幅","给看板或表格留出空间","給看板或表格留出空間","Espacio para un tablero o una tabla","De la place pour un tableau","Platz für ein Board oder eine Tabelle","Spazio per una bacheca o una tabella","Espaço para um quadro ou uma tabela"],
+ "Rows": ["行","行","列","Filas","Lignes","Zeilen","Righe","Linhas"],
"Save": ["保存","保存","儲存","Guardar","Enregistrer","Speichern","Salva","Guardar"],
"Save (⌘S)": ["保存 (⌘S)","保存 (⌘S)","儲存 (⌘S)","Guardar (⌘S)","Enregistrer (⌘S)","Speichern (⌘S)","Salva (⌘S)","Guardar (⌘S)"],
"Save a copy…": ["コピーを保存…","保存副本…","儲存副本…","Guardar una copia…","Enregistrer une copie…","Kopie speichern…","Salva una copia…","Guardar uma cópia…"],
"Save an untouched copy…": ["元のままのコピーを保存…","另存副本,原文件不动…","儲存原封不動的副本…","Guardar una copia intacta…","Enregistrer une copie sans toucher à l’original…","Unveränderte Kopie speichern…","Salva una copia senza toccare l’originale…","Guardar uma cópia intacta…"],
"Saved": ["保存しました","已保存","已儲存","Guardado","Enregistré","Gespeichert","Salvato","Guardado"],
"Saved a new copy": ["新しいコピーを保存しました","已保存新副本","已儲存新副本","Se guardó una copia nueva","Nouvelle copie enregistrée","Neue Kopie gespeichert","Salvata una nuova copia","Nova cópia guardada"],
- "Saves a copy that joins this session": ["このセッションに参加するコピーを保存します","保存一个会加入此会话的副本","儲存一份會加入此工作階段的副本","Guarda una copia que se une a esta sesión","Enregistre une copie qui rejoint cette session","Speichert eine Kopie, die dieser Sitzung beitritt","Salva una copia che entra in questa sessione","Guarda uma cópia que entra nesta sessão"],
+ "Saves a copy to send. Whoever opens it edits this space live with you (end-to-end encrypted); you stay the owner and can remove them from the People list.": ["送るためのコピーを保存します。開いた人はこの Space をあなたと一緒にライブ編集できます(エンドツーエンド暗号化)。あなたはオーナーのままで、メンバーリストからいつでも削除できます。","保存一份用于发送的副本。打开的人可与你实时共同编辑此 Space(端到端加密);你仍是所有者,可随时从成员列表中移除他们。","儲存一份用於傳送的副本。開啟的人可與你即時共同編輯此 Space(端對端加密);你仍是擁有者,可隨時從成員列表中移除他們。","Guarda una copia para enviar. Quien la abra editará este Space en vivo contigo (cifrado de extremo a extremo); tú sigues siendo el propietario y puedes quitarlos de la lista de Personas.","Enregistre une copie à envoyer. Qui l’ouvre édite cet espace en direct avec vous (chiffré de bout en bout) ; vous restez propriétaire et pouvez les retirer de la liste Personnes.","Speichert eine Kopie zum Versenden. Wer sie öffnet, bearbeitet diesen Space live mit dir (Ende-zu-Ende-verschlüsselt); du bleibst Eigentümer und kannst sie aus der Personenliste entfernen.","Salva una copia da inviare. Chi la apre modifica questo Space live con te (crittografia end-to-end); resti il proprietario e puoi rimuoverli dall’elenco Persone.","Salva uma cópia para enviar. Quem a abrir edita este Space ao vivo com você (com criptografia de ponta a ponta); você continua sendo o dono e pode removê-la na lista de Pessoas."],
"Saving…": ["保存中…","保存中…","儲存中…","Guardando…","Enregistrement…","Speichere…","Salvataggio…","A guardar…"],
"Search": ["検索","搜索","搜尋","Buscar","Rechercher","Suche","Cerca","Pesquisar"],
"Search all pages (⌘K)": ["全ページを検索 (⌘K)","搜索所有页面 (⌘K)","搜尋所有頁面 (⌘K)","Buscar en todas las páginas (⌘K)","Rechercher dans toutes les pages (⌘K)","Alle Seiten durchsuchen (⌘K)","Cerca in tutte le pagine (⌘K)","Pesquisar em todas as páginas (⌘K)"],
@@ -195,32 +351,57 @@ export const PACKED: Record<string, ReadonlyArray<string | 0>> = {
"Share this space": ["このスペースを共有","共享此空间","分享此空間","Compartir este espacio","Partager cet espace","Diesen Space teilen","Condividi questo spazio","Partilhar este espaço"],
"Show as a board": ["ボードで表示","以看板显示","以看板顯示","Mostrar como tablero","Afficher en tableau","Als Board anzeigen","Mostra come bacheca","Mostrar como quadro"],
"Show as a list": ["リストで表示","以列表显示","以清單顯示","Mostrar como lista","Afficher en liste","Als Liste anzeigen","Mostra come elenco","Mostrar como lista"],
+ "Show playback controls to the reader": ["読み手に再生コントロールを表示する","向读者显示播放控件","向讀者顯示播放控制項","Mostrar los controles de reproducción a quien lee","Afficher les contrôles de lecture au lecteur","Wiedergabesteuerung für Lesende anzeigen","Mostra i controlli di riproduzione a chi legge","Mostrar os controlos de reprodução a quem lê"],
+ "Show properties (])": ["プロパティを表示(])","显示属性面板(])","顯示屬性面板(])","Mostrar propiedades (])","Afficher les propriétés (])","Eigenschaften einblenden (])","Mostra proprietà (])","Mostrar propriedades (])"],
"Show the page list ([)": ["ページ一覧を表示([)","显示页面列表([)","顯示頁面清單([)","Mostrar la lista de páginas ([)","Afficher la liste des pages ([)","Seitenliste einblenden ([)","Mostra l'elenco delle pagine ([)","Mostrar a lista de páginas ([)"],
+ "Shown next to your cursor and in the People list — stored only in this browser.": ["カーソルの横とメンバーリストに表示されます — このブラウザにのみ保存されます。","显示在你的光标旁和成员列表中 — 仅保存在此浏览器。","顯示在你的游標旁和成員列表中 — 僅儲存在此瀏覽器。","Aparece junto a tu cursor y en la lista de Personas — se guarda solo en este navegador.","Affiché près de votre curseur et dans la liste Personnes — stocké uniquement dans ce navigateur.","Erscheint neben deinem Cursor und in der Personenliste — nur in diesem Browser gespeichert.","Appare accanto al tuo cursore e nell’elenco Persone — salvato solo in questo browser.","Exibido ao lado do seu cursor e na lista de Pessoas — guardado apenas neste navegador."],
+ "Site name": ["サイト名","网站名称","網站名稱","Nombre del sitio","Nom du site","Name der Website","Nome del sito","Nome do site"],
"Sort": ["並べ替え","排序","排序","Ordenar","Trier","Sortieren","Ordina","Ordenar"],
"Space name": ["スペース名","空间名称","空間名稱","Nombre del espacio","Nom de l’espace","Space-Name","Nome dello spazio","Nome do espaço"],
"Start live session": ["ライブセッションを開始","开始实时会话","開始即時工作階段","Iniciar sesión en vivo","Démarrer la session en direct","Live-Sitzung starten","Avvia sessione dal vivo","Iniciar sessão ao vivo"],
+ "Start silent": ["音を出さずに開始する","开始时静音","開始時靜音","Empezar en silencio","Démarrer sans le son","Ohne Ton starten","Parti senza audio","Começar sem som"],
"Stop sharing": ["共有を停止","停止共享","停止共用","Dejar de compartir","Arrêter le partage","Freigabe beenden","Interrompi condivisione","Parar de compartilhar"],
+ "Stop widening every page": ["すべてのページを広げるのをやめる","不再加宽所有页面","不再加寬所有頁面","Dejar de ensanchar todas las páginas","Ne plus élargir toutes les pages","Nicht mehr alle Seiten verbreitern","Smetti di allargare tutte le pagine","Deixar de alargar todas as páginas"],
"Stopped sharing": ["共有を停止しました","已停止共享","已停止分享","Has dejado de compartir","Partage arrêté","Teilen beendet","Condivisione interrotta","Partilha terminada"],
+ "Strikethrough": ["取り消し線","删除线","刪除線","Tachado","Barré","Durchgestrichen","Barrato","Tachado"],
+ "Strikethrough — ⇧⌘S": ["取り消し線 — ⇧⌘S","删除线 — ⇧⌘S","刪除線 — ⇧⌘S","Tachado — ⇧⌘S","Barré — ⇧⌘S","Durchgestrichen — ⇧⌘S","Barrato — ⇧⌘S","Tachado — ⇧⌘S"],
"Take it elsewhere": ["外に持ち出す","把内容带走","把內容帶走","Llévatelo a otra parte","Emportez-le ailleurs","Woanders weitermachen","Portalo altrove","Levar para outro lado"],
+ "Taken from the address if blank": ["空欄ならアドレスから取り込みます","留空则取自网址","留空則取自網址","Si se deja vacío, se toma de la dirección","Si vide, repris de l’adresse","Bleibt das Feld leer, wird er aus der Adresse übernommen","Se vuoto, viene preso dall'indirizzo","Se ficar vazio, é retirado do endereço"],
+ "Text": ["テキスト","文本","文字","Texto","Texte","Text","Testo","Texto"],
+ "Text and background color": ["文字色と背景色","文字与背景颜色","文字與背景顏色","Color de texto y de fondo","Couleur du texte et du fond","Text- und Hintergrundfarbe","Colore del testo e dello sfondo","Cor do texto e do plano de fundo"],
+ "Text formatting": ["文字の書式","文字格式","文字格式","Formato de texto","Mise en forme du texte","Textformatierung","Formattazione del testo","Formatação de texto"],
"That change is too large to share live (about 1 MB max). It’s saved in your copy, but collaborators won’t see it.": ["この変更はライブ共有には大きすぎます(上限は約 1 MB)。自分のコピーには保存されますが、共同編集者には表示されません。","该更改过大,无法实时共享(上限约 1 MB)。它已保存在你的副本中,但协作者不会看到。","此變更太大,無法即時共用(上限約 1 MB)。它已儲存在你的副本中,但協作者不會看到。","Ese cambio es demasiado grande para compartirlo en vivo (máx. 1 MB aprox.). Se guarda en tu copia, pero los colaboradores no lo verán.","Cette modification est trop volumineuse pour le partage en direct (environ 1 Mo max). Elle est enregistrée dans votre copie, mais les collaborateurs ne la verront pas.","Diese Änderung ist zu groß für die Live-Freigabe (max. etwa 1 MB). Sie ist in deiner Kopie gespeichert, aber Mitarbeitende sehen sie nicht.","Questa modifica è troppo grande per la condivisione dal vivo (circa 1 MB max). È salvata nella tua copia, ma i collaboratori non la vedranno.","Essa alteração é grande demais para compartilhar ao vivo (máx. cerca de 1 MB). Ela fica salva na sua cópia, mas os colaboradores não a verão."],
+ "That file could not be read": ["そのファイルは読み取れませんでした","无法读取该文件","無法讀取該檔案","Ese archivo no se pudo leer","Ce fichier n’a pas pu être lu","Diese Datei konnte nicht gelesen werden","Non è stato possibile leggere quel file","Não foi possível ler esse ficheiro"],
"That file could not be read as an image": ["そのファイルは画像として読み込めませんでした","无法将该文件作为图片读取","無法將該檔案讀取為圖片","No se pudo leer ese archivo como imagen","Ce fichier n’a pas pu être lu comme une image","Diese Datei konnte nicht als Bild gelesen werden","Impossibile leggere quel file come immagine","Não foi possível ler esse ficheiro como imagem"],
+ "That file is not a bento/spaces document": ["そのファイルは bento/spaces ドキュメントではありません","该文件不是 bento/spaces 文档","該檔案不是 bento/spaces 文件","Ese archivo no es un documento bento/spaces","Ce fichier n’est pas un document bento/spaces","Diese Datei ist kein bento/spaces-Dokument","Quel file non è un documento bento/spaces","Esse ficheiro não é um documento bento/spaces"],
"That image is too large to share live (about 1 MB max). It’s saved in your copy, but collaborators won’t see it.": ["この画像はライブ共有には大きすぎます(上限は約 1 MB)。自分のコピーには保存されますが、共同編集者には表示されません。","该图片过大,无法实时共享(上限约 1 MB)。它已保存在你的副本中,但协作者不会看到。","此圖片太大,無法即時共用(上限約 1 MB)。它已儲存在你的副本中,但協作者不會看到。","Esa imagen es demasiado grande para compartirla en vivo (máx. 1 MB aprox.). Se guarda en tu copia, pero los colaboradores no la verán.","Cette image est trop volumineuse pour le partage en direct (environ 1 Mo max). Elle est enregistrée dans votre copie, mais les collaborateurs ne la verront pas.","Dieses Bild ist zu groß für die Live-Freigabe (max. etwa 1 MB). Es ist in deiner Kopie gespeichert, aber Mitarbeitende sehen es nicht.","Questa immagine è troppo grande per la condivisione dal vivo (circa 1 MB max). È salvata nella tua copia, ma i collaboratori non la vedranno.","Essa imagem é grande demais para compartilhar ao vivo (máx. cerca de 1 MB). Ela fica salva na sua cópia, mas os colaboradores não a verão."],
+ "That is not a bento/spaces document": ["これは bento/spaces の文書ではありません","这不是 bento/spaces 文档","這不是 bento/spaces 文件","Eso no es un documento de bento/spaces","Ce n’est pas un document bento/spaces","Das ist kein bento/spaces-Dokument","Questo non è un documento bento/spaces","Isto não é um documento bento/spaces"],
"That is {n} files — importing them all may take a moment. Continue?": ["{n} 個のファイルがあります。すべて読み込むには少し時間がかかります。続けますか?","一共 {n} 个文件,全部导入需要一点时间。继续吗?","共 {n} 個檔案,全部匯入需要一點時間。要繼續嗎?","Son {n} archivos: importarlos todos puede tardar un momento. ¿Continuar?","Cela fait {n} fichiers — tout importer peut prendre un moment. Continuer ?","Das sind {n} Dateien — der Import kann einen Moment dauern. Fortfahren?","Sono {n} file — importarli tutti può richiedere un momento. Continuare?","São {n} ficheiros — importar todos pode demorar um momento. Continuar?"],
+ "That needs to be an http or https address": ["http または https のアドレスを入力してください","这里需要填写 http 或 https 地址","這裡需要填 http 或 https 位址","Tiene que ser una dirección http o https","Il faut une adresse http ou https","Das muss eine http- oder https-Adresse sein","Serve un indirizzo http o https","Tem de ser um endereço http ou https"],
+ "That space is password-protected. Open it, then export the pages you want.": ["そのスペースはパスワードで保護されています。開いてから、必要なページを書き出してください。","该空间受密码保护。请先打开它,再导出你需要的页面。","該空間受密碼保護。請先開啟它,再匯出你需要的頁面。","Ese espacio está protegido con contraseña. Ábrelo y exporta desde allí las páginas que quieras.","Cet espace est protégé par un mot de passe. Ouvrez-le, puis exportez-en les pages voulues.","Dieser Space ist passwortgeschützt. Öffnen Sie ihn und exportieren Sie dort die gewünschten Seiten.","Quello spazio è protetto da password. Aprilo e da lì esporta le pagine che vuoi.","Esse espaço está protegido por palavra-passe. Abra-o e exporte de lá as páginas que quiser."],
+ "The counterpart of Copy document JSON: edit a space in another tool, then bring it back.": ["「文書 JSON をコピー」の対になる機能です。別のツールでスペースを編集して、ここへ戻せます。","“复制文档 JSON”的对应功能:在别的工具里编辑一个空间,再把它带回来。","「複製文件 JSON」的對應功能:在別的工具裡編輯一個空間,再把它帶回來。","La contraparte de Copiar el JSON del documento: edita un espacio en otra herramienta y vuelve a traerlo.","Le pendant de Copier le JSON du document : modifiez un espace dans un autre outil, puis ramenez-le ici.","Das Gegenstück zu „Dokument-JSON kopieren“: Bearbeiten Sie einen Space in einem anderen Werkzeug und bringen Sie ihn zurück.","Il corrispettivo di Copia il JSON del documento: modifica uno spazio in un altro strumento e riportalo qui.","O par de Copiar o JSON do documento: edite um espaço noutra ferramenta e traga-o de volta."],
"The day after": ["翌日","后一天","後一天","El día siguiente","Le lendemain","Der Tag danach","Il giorno dopo","O dia seguinte"],
"The day before": ["前日","前一天","前一天","El día anterior","La veille","Der Tag davor","Il giorno prima","O dia anterior"],
"The document block is not shaped like a space — {detail}.": ["ドキュメントブロックがスペースの形をしていません — {detail}。","文档数据块的结构不像一个空间 — {detail}。","檔案中的文件資料結構不像一個空間 — {detail}。","El bloque del documento no tiene la forma de un espacio — {detail}.","Le bloc de document n’a pas la forme d’un espace — {detail}.","Der Dokumentblock ist nicht wie ein Space aufgebaut — {detail}.","Il blocco del documento non ha la forma di uno spazio — {detail}.","O bloco do documento não tem a forma de um espaço — {detail}."],
"The document block is not valid JSON — {detail}.": ["ドキュメントブロックが正しい JSON ではありません — {detail}。","文档数据块不是有效的 JSON — {detail}。","檔案中的文件資料不是有效的 JSON — {detail}。","El bloque del documento no es JSON válido — {detail}.","Le bloc de document n’est pas du JSON valide — {detail}.","Der Dokumentblock ist kein gültiges JSON — {detail}.","Il blocco del documento non è JSON valido — {detail}.","O bloco do documento não é JSON válido — {detail}."],
+ "The document, the editor and the search are all in this one file. Opening it needs nothing else — no server, no account, no install.": ["文書もエディタも検索も、すべてこの 1 つのファイルに入っています。開くのに他は何も要りません。サーバーもアカウントもインストールも不要です。","文档、编辑器和搜索都在这一个文件里。打开它不需要别的东西——不需要服务器、账号或安装。","文件、編輯器和搜尋都在這一個檔案裡。開啟它不需要別的東西——不需要伺服器、帳號或安裝。","El documento, el editor y la búsqueda están todos en este único archivo. Abrirlo no necesita nada más: ni servidor, ni cuenta, ni instalación.","Le document, l’éditeur et la recherche tiennent tous dans ce seul fichier. L’ouvrir ne demande rien d’autre : ni serveur, ni compte, ni installation.","Das Dokument, der Editor und die Suche stecken alle in dieser einen Datei. Zum Öffnen braucht es sonst nichts — keinen Server, kein Konto, keine Installation.","Il documento, l’editor e la ricerca stanno tutti in questo unico file. Per aprirlo non serve altro: nessun server, nessun account, nessuna installazione.","O documento, o editor e a pesquisa estão todos neste único ficheiro. Abri-lo não precisa de mais nada — nem servidor, nem conta, nem instalação."],
"The images in these notes come to {size} so far, and they all travel inside the file. Keep embedding them?": ["これらのノートの画像はすでに {size} あり、すべてファイルの中を一緒に運ばれます。埋め込みを続けますか?","这些笔记里的图片已经有 {size},而且都会随文件一起走。继续嵌入吗?","這些筆記裡的圖片已經有 {size},而且都會隨檔案一起走。要繼續嵌入嗎?","Las imágenes de estas notas suman ya {size} y todas viajan dentro del archivo. ¿Seguir incrustándolas?","Les images de ces notes font déjà {size}, et elles voyagent toutes dans le fichier. Continuer à les intégrer ?","Die Bilder in diesen Notizen ergeben bisher {size}, und sie reisen alle in der Datei mit. Weiter einbetten?","Le immagini di queste note sono già {size} e viaggiano tutte dentro il file. Continuare a incorporarle?","As imagens destas notas já somam {size} e viajam todas dentro do ficheiro. Continuar a incorporá-las?"],
"The live session couldn’t store that change. It’s saved in your copy, but collaborators won’t see it.": ["ライブセッションがこの変更を保存できませんでした。自分のコピーには保存されますが、共同編集者には表示されません。","实时会话无法保存该更改。它已保存在你的副本中,但协作者不会看到。","即時工作階段無法儲存此變更。它已儲存在你的副本中,但協作者不會看到。","La sesión en vivo no pudo guardar ese cambio. Se guarda en tu copia, pero los colaboradores no lo verán.","La session en direct n’a pas pu enregistrer cette modification. Elle est enregistrée dans votre copie, mais les collaborateurs ne la verront pas.","Die Live-Sitzung konnte diese Änderung nicht speichern. Sie ist in deiner Kopie gespeichert, aber Mitarbeitende sehen sie nicht.","La sessione dal vivo non è riuscita a salvare questa modifica. È salvata nella tua copia, ma i collaboratori non la vedranno.","A sessão ao vivo não conseguiu armazenar essa alteração. Ela fica salva na sua cópia, mas os colaboradores não a verão."],
+ "The next save writes this space as plain, readable JSON — anybody who opens the file can read every page.": ["次の保存で、このスペースはそのまま読める JSON として書き出されます。ファイルを開いた人は誰でも全ページを読めます。","下一次保存会把这个空间写成可直接阅读的 JSON——任何打开这个文件的人都能读到每一页。","下一次儲存會把這個空間寫成可直接閱讀的 JSON——任何開啟這個檔案的人都能讀到每一頁。","El próximo guardado escribe este espacio como JSON legible: cualquiera que abra el archivo podrá leer todas las páginas.","Le prochain enregistrement écrira cet espace en JSON lisible : quiconque ouvre le fichier pourra lire toutes les pages.","Beim nächsten Speichern wird dieser Space als lesbares JSON geschrieben — wer die Datei öffnet, kann jede Seite lesen.","Il prossimo salvataggio scrive questo spazio come JSON leggibile: chiunque apra il file potrà leggere ogni pagina.","A próxima gravação escreve este espaço como JSON legível — quem abrir o ficheiro consegue ler todas as páginas."],
+ "The page becomes a new file of its own: a whole space, with a new document id and none of this one’s sharing keys.": ["そのページが独立した新しいファイルになります。ひとつの完全なスペースで、新しいドキュメント ID を持ち、このスペースの共有キーは一切引き継ぎません。","该页面会成为一个独立的新文件:一个完整的空间,拥有新的文档 ID,且不带本空间的任何共享密钥。","該頁面會成為獨立的新檔案:一個完整的空間,擁有新的文件 ID,且不帶本空間的任何共用金鑰。","La página se convierte en un archivo propio: un espacio completo, con un nuevo id de documento y sin ninguna de las claves de uso compartido de este.","La page devient un fichier à part entière : un espace complet, avec un nouvel identifiant de document et aucune des clés de partage de celui-ci.","Die Seite wird zu einer eigenen Datei: ein vollständiger Space mit einer neuen Dokument-ID und ohne die Freigabeschlüssel dieses Space.","La pagina diventa un file a sé: uno spazio completo, con un nuovo id di documento e senza nessuna delle chiavi di condivisione di questo.","A página passa a ser um ficheiro próprio: um espaço completo, com um novo id de documento e sem nenhuma das chaves de partilha deste."],
"The pages without the editing tools": ["編集ツールのないページ表示","不带编辑工具的页面","不含編輯工具的頁面","Las páginas sin las herramientas de edición","Les pages sans les outils d'édition","Die Seiten ohne die Bearbeitungswerkzeuge","Le pagine senza gli strumenti di modifica","As páginas sem as ferramentas de edição"],
"The rest name notes that were not in the selection, and are left as text.": ["残りは選択に含まれていないノートを指しており、テキストのまま残ります。","其余指向不在所选范围内的笔记,保留为文字。","其餘指向不在所選範圍內的筆記,保留為文字。","El resto nombra notas que no estaban en la selección y se dejan como texto.","Les autres désignent des notes absentes de la sélection et restent en texte.","Der Rest nennt Notizen, die nicht in der Auswahl waren, und bleibt als Text stehen.","Gli altri nominano note che non erano nella selezione e restano come testo.","Os restantes nomeiam notas que não estavam na seleção e ficam como texto."],
+ "The theme follows whoever opens the file. It is never written into the document.": ["テーマはファイルを開いた人に従います。ドキュメントには書き込まれません。","主题跟随打开文件的人,绝不会写入文档。","主題取決於開啟檔案的人,永遠不會寫入文件中。","El tema sigue a quien abre el archivo. Nunca se escribe en el documento.","Le thème suit la personne qui ouvre le fichier. Il n’est jamais écrit dans le document.","Das Design richtet sich danach, wer die Datei öffnet. Es wird nie ins Dokument geschrieben.","Il tema segue chi apre il file. Non viene mai scritto nel documento.","O tema segue quem abre o ficheiro. Nunca é escrito no documento."],
"The whole space": ["スペース全体","整个空间","整個空間","Todo el espacio","Tout l’espace","Der ganze Space","L’intero spazio","Todo o espaço"],
"The whole space, or just this page": ["スペース全体、またはこのページだけ","整个空间,或仅这一页","整個空間,或僅此頁面","Todo el espacio, o solo esta página","Tout l’espace, ou seulement cette page","Der ganze Space oder nur diese Seite","L’intero spazio, o solo questa pagina","Todo o espaço, ou apenas esta página"],
- "Then send someone the file": ["そのあとファイルを相手に送ります","然后把文件发给对方","然後把檔案傳給對方","Después envía el archivo a alguien","Envoyez ensuite le fichier à quelqu’un","Schick die Datei danach jemandem","Poi manda il file a qualcuno","Depois envia o ficheiro a alguém"],
"These windows are on this computer. Start a session to work with someone elsewhere.": ["これらのウィンドウはこのパソコン内のものです。別の場所にいる人と作業するにはセッションを開始してください。","这些窗口都在本机。若要与其他地方的人协作,请开始一个会话。","這些視窗都在本機。若要與其他地方的人協作,請開始一個工作階段。","Estas ventanas están en este ordenador. Inicia una sesión para trabajar con alguien en otro sitio.","Ces fenêtres sont sur cet ordinateur. Démarrez une session pour travailler avec quelqu’un ailleurs.","Diese Fenster sind auf diesem Computer. Starte eine Sitzung, um mit jemand anderem zu arbeiten.","Queste finestre sono su questo computer. Avvia una sessione per lavorare con qualcuno altrove.","Estas janelas estão neste computador. Inicia uma sessão para trabalhar com alguém noutro lugar."],
+ "This block has no settings of its own — its content is all of it.": ["このブロックに固有の設定はありません — 中身がすべてです。","这个块没有自己的设置 — 内容就是它的全部。","這個區塊沒有自己的設定 — 內容就是它的全部。","Este bloque no tiene ajustes propios: su contenido es todo lo que hay.","Ce bloc n’a pas de réglages à lui — son contenu, c’est tout.","Dieser Block hat keine eigenen Einstellungen — sein Inhalt ist alles.","Questo blocco non ha impostazioni proprie: il suo contenuto è tutto.","Este bloco não tem definições próprias — o conteúdo é tudo o que há."],
+ "This block’s settings, and the page’s": ["このブロックの設定と、ページの設定","这个块的设置,还有页面的设置","這個區塊的設定,還有頁面的設定","Los ajustes de este bloque, y los de la página","Les réglages de ce bloc, et ceux de la page","Die Einstellungen dieses Blocks — und die der Seite","Le impostazioni di questo blocco, e quelle della pagina","As definições deste bloco, e as da página"],
"This browser cannot write back to the file, so every save makes a new copy. Chrome and Edge on a computer can save in place.": ["このブラウザはファイルに書き戻せないため、保存のたびに新しいコピーができます。パソコンの Chrome と Edge なら直接上書き保存できます。","此浏览器无法写回原文件,因此每次保存都会生成新副本。电脑上的 Chrome 和 Edge 可以就地保存。","此瀏覽器無法寫回檔案,因此每次儲存都會產生新的副本。電腦版的 Chrome 和 Edge 可以就地儲存。","Este navegador no puede reescribir el archivo, así que cada guardado crea una copia nueva. Chrome y Edge en un ordenador sí pueden guardar en el sitio.","Ce navigateur ne peut pas réécrire le fichier : chaque enregistrement crée donc une nouvelle copie. Chrome et Edge sur ordinateur enregistrent sur place.","Dieser Browser kann nicht in die Datei zurückschreiben, deshalb entsteht bei jedem Speichern eine neue Kopie. Chrome und Edge auf dem Computer können direkt speichern.","Questo browser non può riscrivere il file, quindi ogni salvataggio crea una nuova copia. Chrome ed Edge su computer possono salvare sul posto.","Este navegador não consegue escrever de volta no ficheiro, por isso cada vez que guarda cria uma nova cópia. O Chrome e o Edge num computador conseguem guardar no local."],
+ "This clip is {size} and travels inside the file, making it that much bigger for everyone you send it to. Embed it anyway?": ["このクリップは {size} あり、ファイルの中に一緒に入ります。その分、送る相手全員にとってファイルが大きくなります。それでも埋め込みますか?","这个片段有 {size},会嵌在文件内部,你发给谁,文件对谁就大出这么多。仍要嵌入吗?","這個片段有 {size},而且會跟著檔案一起走,你傳給的每個人拿到的檔案都會大這麼多。仍要嵌入嗎?","Este clip pesa {size} y viaja dentro del archivo, que crecerá otro tanto para todos a quienes se lo envíes. ¿Incrustarlo de todos modos?","Ce clip fait {size} et voyage dans le fichier, ce qui l’alourdit d’autant pour toutes les personnes à qui vous l’envoyez. L’intégrer quand même ?","Dieser Clip ist {size} groß und reist in der Datei mit — die Datei wird für jeden, dem du sie schickst, entsprechend größer. Trotzdem einbetten?","Questa clip è di {size} e viaggia dentro il file, rendendolo altrettanto più grande per chiunque la riceva. Incorporarla comunque?","Este clipe tem {size} e viaja dentro do ficheiro, tornando-o maior para todas as pessoas a quem o enviar. Incorporar mesmo assim?"],
"This copy goes offline; the others carry on": ["このコピーはオフラインになります。ほかの人はそのまま続けられます","此副本将离线;其他人继续协作","此副本將離線;其他人繼續協作","Esta copia se desconecta; las demás siguen","Cette copie passe hors ligne ; les autres continuent","Diese Kopie geht offline; die anderen machen weiter","Questa copia va offline; le altre continuano","Esta cópia fica offline; as outras continuam"],
"This file": ["このファイル","此文件","此檔案","Este archivo","Ce fichier","Diese Datei","Questo file","Este ficheiro"],
+ "This file carries its own app — it works offline, forever, as is.": ["このファイルはアプリを内蔵しています — オフラインでも、ずっと、このまま動きます。","此文件自带应用 — 离线可用,永久如此。","此檔案自帶應用程式 — 離線可用,永遠如此。","Este archivo lleva su propia aplicación — funciona sin conexión, para siempre, tal cual.","Ce fichier embarque sa propre application — il fonctionne hors ligne, pour toujours, tel quel.","Diese Datei trägt ihre eigene App — sie funktioniert offline, für immer, so wie sie ist.","Questo file porta con sé la propria app — funziona offline, per sempre, così com'è.","Este arquivo carrega o próprio aplicativo — funciona offline, para sempre, do jeito que está."],
"This file could not be opened": ["このファイルを開けませんでした","无法打开此文件","無法開啟此檔案","No se pudo abrir este archivo","Ce fichier n’a pas pu être ouvert","Diese Datei konnte nicht geöffnet werden","Impossibile aprire questo file","Não foi possível abrir este ficheiro"],
"This file declares rules this build does not know. It is open read-only so nothing is lost.": ["このファイルには、このビルドが知らないルールが宣言されています。何も失わないよう読み取り専用で開いています。","此文件声明了此版本不认识的规则。已以只读方式打开,以免丢失任何内容。","此檔案宣告了這個版本不認識的規則。已以唯讀方式開啟,以免遺失任何內容。","Este archivo declara reglas que esta versión no conoce. Está abierto en solo lectura para no perder nada.","Ce fichier déclare des règles que cette version ne connaît pas. Il est ouvert en lecture seule pour ne rien perdre.","Diese Datei nennt Regeln, die dieser Build nicht kennt. Sie ist schreibgeschützt geöffnet, damit nichts verloren geht.","Questo file dichiara regole che questa versione non conosce. È aperto in sola lettura per non perdere nulla.","Este ficheiro declara regras que esta versão não conhece. Está aberto apenas para leitura para que nada se perca."],
"This file is open read-only": ["このファイルは読み取り専用で開いています","这个文件以只读方式打开","這個檔案以唯讀方式開啟","Este archivo está abierto en solo lectura","Ce fichier est ouvert en lecture seule","Diese Datei ist schreibgeschützt geöffnet","Questo file è aperto in sola lettura","Este ficheiro está aberto apenas para leitura"],
@@ -228,19 +409,30 @@ export const PACKED: Record<string, ReadonlyArray<string | 0>> = {
"This image is {size} and travels inside the file, making it that much bigger for everyone you send it to. Embed it anyway?": ["この画像は {size} あり、ファイルの中に一緒に入ります。その分、送る相手全員にとってファイルが大きくなります。それでも埋め込みますか?","这张图片有 {size},会嵌在文件内部,你发给谁,文件对谁就大出这么多。仍要嵌入吗?","這張圖片有 {size},而且會跟著檔案一起走,你傳給的每個人拿到的檔案都會大這麼多。仍要嵌入嗎?","Esta imagen pesa {size} y viaja dentro del archivo, que crecerá otro tanto para todos a quienes se lo envíes. ¿Incrustarla de todos modos?","Cette image fait {size} et voyage dans le fichier, ce qui l’alourdit d’autant pour toutes les personnes à qui vous l’envoyez. L’intégrer quand même ?","Dieses Bild ist {size} groß und reist in der Datei mit — die Datei wird für jeden, dem du sie schickst, entsprechend größer. Trotzdem einbetten?","Questa immagine è di {size} e viaggia dentro il file, rendendolo altrettanto più grande per chiunque la riceva. Incorporarla comunque?","Esta imagem tem {size} e viaja dentro do ficheiro, tornando-o maior para todas as pessoas a quem o enviar. Incorporar mesmo assim?"],
"This image was resized to keep the file small. Click to replace it with the original.": ["ファイルを小さく保つため、この画像は縮小されました。クリックすると元の画像に差し替えます。","为了让文件保持小巧,这张图片已被缩放。点击可换回原图。","這張圖片已縮小尺寸以保持檔案小巧。點按可換回原始圖片。","Esta imagen se redimensionó para mantener el archivo pequeño. Haz clic para reemplazarla por la original.","Cette image a été redimensionnée pour garder le fichier léger. Cliquez pour la remplacer par l’originale.","Dieses Bild wurde verkleinert, damit die Datei klein bleibt. Klicken, um es durch das Original zu ersetzen.","Questa immagine è stata ridimensionata per mantenere il file leggero. Clicca per sostituirla con l’originale.","Esta imagem foi redimensionada para manter o ficheiro pequeno. Clique para a substituir pela original."],
"This is a reading copy. It opens for reading; nothing you do here changes the file.": ["これは閲覧用のコピーです。読むために開きます。ここでの操作はファイルを変更しません。","这是一份阅读副本。它以阅读方式打开;你在此处的操作不会更改文件。","這是一份閱讀副本。它以閱讀方式開啟;你在此處的操作不會變更檔案。","Esta es una copia de lectura. Se abre para leer; nada de lo que hagas aquí cambia el archivo.","Ceci est une copie de lecture. Elle s'ouvre en lecture ; rien de ce que vous faites ici ne modifie le fichier.","Dies ist eine Lesekopie. Sie öffnet sich zum Lesen; nichts, was du hier tust, ändert die Datei.","Questa è una copia di lettura. Si apre in lettura; nulla di ciò che fai qui modifica il file.","Esta é uma cópia de leitura. Abre para leitura; nada do que fizeres aqui altera o ficheiro."],
+ "This is a view-only copy — it follows the live session but can’t change this space.": ["これは閲覧専用コピーです — ライブセッションに追従しますが、この Space は変更できません。","这是只读副本 — 会跟随实时会话,但无法修改此 Space。","這是唯讀副本 — 會跟隨即時會話,但無法修改此 Space。","Esta es una copia de solo lectura — sigue la sesión en vivo pero no puede modificar este Space.","Ceci est une copie en lecture seule — elle suit la session live mais ne peut pas modifier cet espace.","Dies ist eine Nur-Lesen-Kopie — sie folgt der Live-Sitzung, kann diesen Space aber nicht ändern.","Questa è una copia di sola lettura — segue la sessione live ma non può modificare questo Space.","Esta é uma cópia somente para visualização — ela acompanha a sessão ao vivo, mas não pode alterar este Space."],
"This is not a bento/spaces document — {detail}.": ["これは bento/spaces のドキュメントではありません — {detail}。","这不是 bento/spaces 文档 — {detail}。","這不是 bento/spaces 文件 — {detail}。","Esto no es un documento de bento/spaces — {detail}.","Ce n’est pas un document bento/spaces — {detail}.","Dies ist kein bento/spaces-Dokument — {detail}.","Questo non è un documento bento/spaces — {detail}.","Isto não é um documento bento/spaces — {detail}."],
"This live session has run out of room. Your change is saved in your copy, but collaborators won’t see it.": ["このライブセッションの容量がいっぱいです。変更は自分のコピーに保存されますが、共同編集者には表示されません。","此实时会话空间已满。你的更改已保存在你的副本中,但协作者不会看到。","此即時工作階段空間已滿。你的變更已儲存在你的副本中,但協作者不會看到。","Esta sesión en vivo se ha quedado sin espacio. Tu cambio se guarda en tu copia, pero los colaboradores no lo verán.","Cette session en direct n’a plus de place. Votre modification est enregistrée dans votre copie, mais les collaborateurs ne la verront pas.","Diese Live-Sitzung hat keinen Platz mehr. Deine Änderung ist in deiner Kopie gespeichert, aber Mitarbeitende sehen sie nicht.","Questa sessione dal vivo ha esaurito lo spazio. La tua modifica è salvata nella tua copia, ma i collaboratori non la vedranno.","Esta sessão ao vivo ficou sem espaço. Sua alteração fica salva na sua cópia, mas os colaboradores não a verão."],
"This page only": ["このページだけ","仅此页面","僅此頁面","Solo esta página","Cette page seulement","Nur diese Seite","Solo questa pagina","Apenas esta página"],
+ "This space has no live session to follow": ["この Space には追従できるライブセッションがありません","此 Space 没有可跟随的实时会话","此 Space 沒有可跟隨的即時會話","Este Space no tiene sesión en vivo que seguir","Cet espace n’a pas de session live à suivre","Dieser Space hat keine Live-Sitzung zum Folgen","Questo Space non ha una sessione live da seguire","Este Space não tem sessão ao vivo para acompanhar"],
"This space has no pages.": ["このスペースにはページがありません。","此空间没有页面。","此空間沒有任何頁面。","Este espacio no tiene páginas.","Cet espace n’a aucune page.","Dieser Space hat keine Seiten.","Questo spazio non ha pagine.","Este espaço não tem páginas."],
"This space is encrypted. Saves stay encrypted.": ["このスペースは暗号化されています。保存しても暗号化されたままです。","此空间已加密。保存时仍保持加密。","此空間已加密。往後的儲存也會維持加密。","Este espacio está cifrado. Los guardados siguen cifrados.","Cet espace est chiffré. Les enregistrements restent chiffrés.","Dieser Space ist verschlüsselt. Speichern bleibt verschlüsselt.","Questo spazio è cifrato. I salvataggi restano cifrati.","Este espaço está encriptado. Continua encriptado sempre que guardar."],
"This space is locked": ["このスペースはロックされています","此空间已锁定","此空間已鎖定","Este espacio está bloqueado","Cet espace est verrouillé","Dieser Space ist gesperrt","Questo spazio è bloccato","Este espaço está bloqueado"],
+ "This window is still running v{v} — reload to finish. A v{v} backup was downloaded.": ["このウィンドウはまだ v{v} で動作中 — 再読込で完了します。v{v} のバックアップをダウンロード済み。","此窗口仍在运行 v{v} — 重新加载以完成。已下载 v{v} 备份。","此視窗仍在執行 v{v} — 重新載入以完成。已下載 v{v} 備份。","Esta ventana sigue en v{v} — recarga para terminar. Se descargó una copia de seguridad v{v}.","Cette fenêtre tourne encore en v{v} — rechargez pour terminer. Une sauvegarde v{v} a été téléchargée.","Dieses Fenster läuft noch mit v{v} — zum Abschließen neu laden. Ein v{v}-Backup wurde heruntergeladen.","Questa finestra esegue ancora la v{v} — ricarica per completare. È stato scaricato un backup v{v}.","Esta janela ainda está executando a v{v} — recarregue para concluir. Um backup da v{v} foi baixado."],
+ "This window is still running v{v} — reload to finish. A v{v} backup was saved beside this file.": ["このウィンドウはまだ v{v} で動作中 — 再読込で完了します。v{v} のバックアップをこのファイルの隣に保存しました。","此窗口仍在运行 v{v} — 重新加载以完成。已在此文件旁保存 v{v} 备份。","此視窗仍在執行 v{v} — 重新載入以完成。已在此檔案旁儲存 v{v} 備份。","Esta ventana sigue en v{v} — recarga para terminar. Se guardó una copia de seguridad v{v} junto a este archivo.","Cette fenêtre tourne encore en v{v} — rechargez pour terminer. Une sauvegarde v{v} a été enregistrée à côté de ce fichier.","Dieses Fenster läuft noch mit v{v} — zum Abschließen neu laden. Ein v{v}-Backup wurde neben dieser Datei gespeichert.","Questa finestra esegue ancora la v{v} — ricarica per completare. Un backup v{v} è stato salvato accanto a questo file.","Esta janela ainda está executando a v{v} — recarregue para concluir. Um backup da v{v} foi salvo ao lado deste arquivo."],
+ "This window is still running v{v}. If you overwrote the file that's open here, reload; otherwise open the file you saved.": ["このウィンドウはまだ v{v} で動作中。開いているファイルを上書きした場合は再読込を。別に保存した場合はそのファイルを開いてください。","此窗口仍在运行 v{v}。若覆盖了当前打开的文件请重新加载;否则请打开您保存的文件。","此視窗仍在執行 v{v}。若已覆寫目前開啟的檔案請重新載入;否則請開啟您儲存的檔案。","Esta ventana sigue en v{v}. Si sobrescribiste el archivo abierto aquí, recarga; si no, abre el archivo que guardaste.","Cette fenêtre tourne encore en v{v}. Si vous avez écrasé le fichier ouvert ici, rechargez ; sinon ouvrez le fichier enregistré.","Dieses Fenster läuft noch mit v{v}. Wenn Sie die geöffnete Datei überschrieben haben, neu laden; andernfalls die gespeicherte Datei öffnen.","Questa finestra esegue ancora la v{v}. Se hai sovrascritto il file aperto qui, ricarica; altrimenti apri il file salvato.","Esta janela ainda está executando a v{v}. Se você sobrescreveu o arquivo aberto aqui, recarregue; caso contrário, abra o arquivo que salvou."],
+ "This window keeps running v{v} until you open the downloaded file.": ["ダウンロードしたファイルを開くまで、このウィンドウは v{v} のままです。","在打开下载的文件之前,此窗口将继续运行 v{v}。","在開啟下載的檔案之前,此視窗會維持在 v{v}。","Esta ventana seguirá en v{v} hasta que abras el archivo descargado.","Cette fenêtre reste en v{v} jusqu'à l'ouverture du fichier téléchargé.","Dieses Fenster bleibt bei v{v}, bis Sie die heruntergeladene Datei öffnen.","Questa finestra resta alla v{v} finché non apri il file scaricato.","Esta janela continua executando a v{v} até você abrir o arquivo baixado."],
"Those files could not be read": ["それらのファイルは読み込めませんでした","这些文件无法读取","這些檔案無法讀取","No se pudieron leer esos archivos","Ces fichiers n’ont pas pu être lus","Diese Dateien konnten nicht gelesen werden","Non è stato possibile leggere quei file","Não foi possível ler esses ficheiros"],
"Tip": ["ヒント","提示","提示","Consejo","Astuce","Tipp","Suggerimento","Dica"],
+ "Title": ["タイトル","标题","標題","Título","Titre","Titel","Titolo","Título"],
"Today": ["今日","今天","今天","Hoy","Aujourd’hui","Heute","Oggi","Hoje"],
"Today's journal": ["今日のジャーナル","今天的日志","今天的日誌","Diario de hoy","Journal du jour","Heutiges Journal","Diario di oggi","Diário de hoje"],
+ "Tone": ["トーン","语气","語氣","Tono","Ton","Art","Tono","Tom"],
"Too many changes at once — live sync is catching up.": ["変更が多すぎます — ライブ同期が追いついています。","更改过多 — 实时同步正在追赶。","變更太多 — 即時同步正在追趕。","Demasiados cambios a la vez — la sincronización en vivo se está poniendo al día.","Trop de modifications à la fois — la synchronisation en direct rattrape son retard.","Zu viele Änderungen auf einmal — die Live-Synchronisierung holt auf.","Troppe modifiche insieme — la sincronizzazione dal vivo sta recuperando.","Alterações demais de uma vez — a sincronização ao vivo está se atualizando."],
+ "Top level": ["最上位","顶层","最上層","Nivel superior","Premier niveau","Oberste Ebene","Primo livello","Nível superior"],
"Turn into…": ["種類を変更…","转换为…","轉換為…","Convertir en…","Convertir en…","Umwandeln in…","Converti in…","Converter em…"],
"Type / for blocks, [[ to link a page": ["/ でブロック、[[ でページにリンク","输入 / 插入块,[[ 链接页面","輸入 / 插入區塊,輸入 [[ 連結頁面","Escribe / para bloques, [[ para enlazar una página","Tapez / pour les blocs, [[ pour lier une page","Tippe / für Blöcke, [[ für einen Seitenlink","Digita / per i blocchi, [[ per collegare una pagina","Escreva / para blocos, [[ para ligar uma página"],
+ "Underline": ["下線","下划线","底線","Subrayado","Souligné","Unterstrichen","Sottolineato","Sublinhado"],
+ "Underline — ⌘U": ["下線 — ⌘U","下划线 — ⌘U","底線 — ⌘U","Subrayado — ⌘U","Souligné — ⌘U","Unterstrichen — ⌘U","Sottolineato — ⌘U","Sublinhado — ⌘U"],
"Undo (⌘Z)": ["元に戻す (⌘Z)","撤销 (⌘Z)","還原 (⌘Z)","Deshacer (⌘Z)","Annuler (⌘Z)","Rückgängig (⌘Z)","Annulla (⌘Z)","Desfazer (⌘Z)"],
"Unlock": ["ロック解除","解锁","解鎖","Desbloquear","Déverrouiller","Entsperren","Sblocca","Desbloquear"],
"Unlocked, but the document inside could not be read.": ["ロックは解除しましたが、中のドキュメントを読み取れませんでした。","已解锁,但无法读取其中的文档。","已解鎖,但無法讀取裡面的文件。","Desbloqueado, pero no se pudo leer el documento de dentro.","Déverrouillé, mais le document à l’intérieur n’a pas pu être lu.","Entsperrt, aber das Dokument darin konnte nicht gelesen werden.","Sbloccato, ma non è stato possibile leggere il documento all’interno.","Desbloqueado, mas não foi possível ler o documento lá dentro."],
@@ -248,38 +440,80 @@ export const PACKED: Record<string, ReadonlyArray<string | 0>> = {
"Unsaved changes — ⌘S downloads an updated copy": ["未保存の変更 — ⌘S で更新版をダウンロードします","未保存的更改 — ⌘S 会下载更新后的副本","未儲存的變更 — ⌘S 會下載更新後的副本","Cambios sin guardar: ⌘S descarga una copia actualizada","Modifications non enregistrées — ⌘S télécharge une copie à jour","Ungespeicherte Änderungen — ⌘S lädt eine aktualisierte Kopie herunter","Modifiche non salvate — ⌘S scarica una copia aggiornata","Alterações não guardadas — ⌘S transfere uma cópia atualizada"],
"Unsaved changes — ⌘S rewrites this file": ["未保存の変更 — ⌘S でこのファイルを書き換えます","未保存的更改 — ⌘S 会重写此文件","未儲存的變更 — ⌘S 會重寫此檔案","Cambios sin guardar: ⌘S reescribe este archivo","Modifications non enregistrées — ⌘S réécrit ce fichier","Ungespeicherte Änderungen — ⌘S schreibt diese Datei neu","Modifiche non salvate — ⌘S riscrive questo file","Alterações não guardadas — ⌘S reescreve este ficheiro"],
"Untitled": ["無題","未命名","未命名","Sin título","Sans titre","Ohne Titel","Senza titolo","Sem título"],
+ "Update failed: {m}": ["更新に失敗: {m}","更新失败:{m}","更新失敗:{m}","Falló la actualización: {m}","Échec de la mise à jour : {m}","Update fehlgeschlagen: {m}","Aggiornamento non riuscito: {m}","Falha na atualização: {m}"],
"Update this file": ["このファイルを更新","更新此文件","更新此檔案","Actualizar este archivo","Mettre à jour ce fichier","Diese Datei aktualisieren","Aggiorna questo file","Atualizar este ficheiro"],
+ "Update this file…": ["このファイルを更新…","更新此文件…","更新此檔案…","Actualizar este archivo…","Mettre à jour ce fichier…","Diese Datei aktualisieren…","Aggiorna questo file…","Atualizar este arquivo…"],
+ "Updated to v{v} on disk.": ["ディスク上で v{v} に更新しました。","已在磁盘上更新到 v{v}。","已在磁碟上更新至 v{v}。","Actualizado a v{v} en disco.","Mis à jour en v{v} sur le disque.","Auf v{v} auf der Festplatte aktualisiert.","Aggiornato alla v{v} su disco.","Atualizado para a v{v} no disco."],
"Updates": ["更新","更新","更新","Actualizaciones","Mises à jour","Updates","Aggiornamenti","Atualizações"],
+ "Use a link…": ["リンクを使う…","使用链接…","使用連結…","Usar un enlace…","Utiliser un lien…","Einen Link verwenden…","Usa un link…","Usar uma ligação…"],
+ "Use this width for every page": ["この幅をすべてのページに使う","将此宽度用于所有页面","將此寬度用於所有頁面","Usar esta anchura en todas las páginas","Utiliser cette largeur pour toutes les pages","Diese Breite für alle Seiten verwenden","Usa questa larghezza per tutte le pagine","Usar esta largura em todas as páginas"],
+ "Verifies and builds the new version with this document inside, then asks where to save it — pick the file you have open to update it.": ["このドキュメントを含む新バージョンを検証・生成し、保存先を尋ねます — 開いているファイルを選べば更新されます。","验证并生成包含此文档的新版本,然后询问保存位置 — 选择当前打开的文件即可更新。","驗證並建立包含此文件的新版本,然後詢問儲存位置 — 選擇目前開啟的檔案即可更新。","Verifica y construye la nueva versión con este documento dentro, y pregunta dónde guardarla — elige el archivo que tienes abierto para actualizarlo.","Vérifie et construit la nouvelle version avec ce document, puis demande où l'enregistrer — choisissez le fichier ouvert pour le mettre à jour.","Verifiziert und erstellt die neue Version mit diesem Dokument und fragt nach dem Speicherort — wählen Sie die geöffnete Datei, um sie zu aktualisieren.","Verifica e costruisce la nuova versione con questo documento, poi chiede dove salvarla — scegli il file aperto per aggiornarlo.","Verifica e monta a nova versão com este documento dentro e depois pergunta onde salvá-la — escolha o arquivo que você tem aberto para atualizá-lo."],
+ "Verifying…": ["検証中…","验证中…","驗證中…","Verificando…","Vérification…","Verifiziere…","Verifica…","Verificando…"],
"Version {v} is available.": ["バージョン {v} が利用可能です。","版本 {v} 可用。","版本 {v} 可用。","Versión {v} disponible.","La version {v} est disponible.","Version {v} ist verfügbar.","È disponibile la versione {v}.","A versão {v} está disponível."],
"Version, language, password, exports": ["バージョン・言語・パスワード・書き出し","版本、语言、密码、导出","版本、語言、密碼、匯出","Versión, idioma, contraseña, exportaciones","Version, langue, mot de passe, exports","Version, Sprache, Passwort, Export","Versione, lingua, password, esportazioni","Versão, idioma, senha, exportações"],
+ "Video": ["動画","视频","影片","Vídeo","Vidéo","Video","Video","Vídeo"],
+ "Video from {host}": ["{host} の動画","来自 {host} 的视频","來自 {host} 的影片","Vídeo de {host}","Vidéo provenant de {host}","Video von {host}","Video da {host}","Vídeo de {host}"],
+ "View-only copy — it follows the live session but can’t change this space.": ["閲覧専用コピー — ライブセッションに追従しますが、この Space は変更できません。","只读副本 — 会跟随实时会话,但无法修改此 Space。","唯讀副本 — 會跟隨即時會話,但無法修改此 Space。","Copia de solo lectura — sigue la sesión en vivo pero no puede modificar este Space.","Copie en lecture seule — elle suit la session live mais ne peut pas modifier cet espace.","Nur-Lesen-Kopie — sie folgt der Live-Sitzung, kann diesen Space aber nicht ändern.","Copia di sola lettura — segue la sessione live ma non può modificare questo Space.","Cópia somente para visualização — ela acompanha a sessão ao vivo, mas não pode alterar este Space."],
+ "View-only copy — it holds no signing key.": ["閲覧専用コピー — 署名鍵を保持していません。","只读副本 — 不持有签名密钥。","唯讀副本 — 不持有簽署金鑰。","Copia de solo lectura — no contiene clave de firma.","Copie en lecture seule — elle ne détient aucune clé de signature.","Nur-Lesen-Kopie — enthält keinen Signaturschlüssel.","Copia di sola lettura — non contiene chiavi di firma.","Cópia somente para visualização — ela não contém chave de assinatura."],
+ "View-only copy…": ["閲覧専用コピー…","只读副本…","唯讀副本…","Copia de solo lectura…","Copie en lecture seule…","Nur-Lesen-Kopie…","Copia di sola lettura…","Cópia somente para visualização…"],
+ "Viewer": ["閲覧者","查看者","檢視者","Espectador","Spectateur","Betrachter","Osservatore","Visualizador"],
"Visit bento.page (opens in a new tab)": ["bento.page を開く(新しいタブ)","访问 bento.page(在新标签页打开)","造訪 bento.page(在新分頁開啟)","Visitar bento.page (se abre en una pestaña nueva)","Aller sur bento.page (nouvel onglet)","bento.page besuchen (öffnet in neuem Tab)","Vai su bento.page (si apre in una nuova scheda)","Visitar bento.page (abre num novo separador)"],
"Warning": ["警告","警告","警告","Advertencia","Avertissement","Warnung","Avviso","Aviso"],
+ "Web address": ["ウェブアドレス","网址","網址","Dirección web","Adresse web","Webadresse","Indirizzo web","Endereço web"],
+ "What is in the picture": ["画像に写っているもの","图片里是什么","圖片裡是什麼","Qué hay en la imagen","Ce que montre l’image","Was auf dem Bild zu sehen ist","Che cosa mostra l’immagine","O que está na imagem"],
+ "What this is": ["これが何か","这是什么","這是什麼","Qué es esto","Ce que c’est","Worum es sich handelt","Di che cosa si tratta","O que é isto"],
+ "What’s new →": ["新着情報 →","更新内容 →","更新內容 →","Novedades →","Nouveautés →","Neuerungen →","Novità →","Novidades →"],
"Wide": ["広め","加宽","加寬","Ancho","Large","Breit","Largo","Largo"],
"Width": ["幅","宽度","寬度","Anchura","Largeur","Breite","Larghezza","Largura"],
+ "Width %": ["幅 %","宽度 %","寬度 %","Ancho %","Largeur %","Breite %","Larghezza %","Largura %"],
"Width in the text column": ["本文カラム内の幅","在正文栏中的宽度","相對於文字欄的寬度","Ancho en la columna de texto","Largeur dans la colonne de texte","Breite in der Textspalte","Larghezza nella colonna di testo","Largura na coluna de texto"],
+ "Windows on this computer still sync; turn offline mode off in About to work with someone elsewhere.": ["このコンピュータ上のウィンドウ同士は引き続き同期します。ほかの場所にいる人と作業するには「About」でオフラインモードを解除してください。","本机的窗口仍会同步;要与其他地方的人协作,请在“关于”中关闭离线模式。","本機的視窗仍會同步;要與其他地方的人協作,請在「關於」中關閉離線模式。","Las ventanas de este equipo siguen sincronizándose; desactiva el modo sin conexión en «Acerca de» para trabajar con alguien en otro lugar.","Les fenêtres de cet ordinateur restent synchronisées ; désactivez le mode hors ligne dans « À propos » pour travailler avec quelqu’un ailleurs.","Fenster auf diesem Computer synchronisieren sich weiterhin; deaktiviere den Offline-Modus unter „Über“, um mit jemandem anderswo zu arbeiten.","Le finestre su questo computer restano sincronizzate; disattiva la modalità offline in «Informazioni» per lavorare con qualcuno altrove.","As janelas neste computador continuam sincronizando; desative o modo offline em Sobre para trabalhar com alguém em outro lugar."],
+ "Words": ["語数","字数","字數","Palabras","Mots","Wörter","Parole","Palavras"],
"Wrong password — try again": ["パスワードが違います — もう一度お試しください","密码错误 — 请重试","密碼錯誤 — 請重試","Contraseña incorrecta: inténtalo de nuevo","Mot de passe incorrect — réessayez","Falsches Passwort — bitte erneut versuchen","Password errata — riprova","Palavra-passe incorreta — tente novamente"],
+ "Yellow": ["黄","黄色","黃色","Amarillo","Jaune","Gelb","Giallo","Amarelo"],
"You have the newest version ({v}).": ["最新バージョンです ({v})。","你已是最新版本 ({v})。","你已是最新版本 ({v})。","Tienes la versión más reciente ({v}).","Vous avez la dernière version ({v}).","Du hast die neueste Version ({v}).","Hai la versione più recente ({v}).","Já tem a versão mais recente ({v})."],
+ "Your key on THIS device: {fp}. Another device counts as a new person until the owner removes it.": ["このデバイスでのあなたの鍵:{fp}。別のデバイスはオーナーが削除するまで別人として扱われます。","你在此设备上的密钥:{fp}。其他设备会被视为新成员,直到所有者将其移除。","你在此裝置上的金鑰:{fp}。其他裝置會被視為新成員,直到擁有者將其移除。","Tu clave en ESTE dispositivo: {fp}. Otro dispositivo cuenta como una persona nueva hasta que el propietario lo quite.","Votre clé sur CET appareil : {fp}. Un autre appareil compte comme une nouvelle personne jusqu’à son retrait par le propriétaire.","Dein Schlüssel auf DIESEM Gerät: {fp}. Ein anderes Gerät zählt als neue Person, bis der Eigentümer es entfernt.","La tua chiave su QUESTO dispositivo: {fp}. Un altro dispositivo conta come nuova persona finché il proprietario non lo rimuove.","Sua chave NESTE dispositivo: {fp}. Outro dispositivo conta como uma nova pessoa até que o dono o remova."],
"Your name": ["あなたの名前","你的名字","你的名字","Tu nombre","Votre nom","Dein Name","Il tuo nome","Seu nome"],
+ "Your name (shown on comments):": ["あなたの名前(コメントに表示):","您的名字(显示在评论中):","您的名字(顯示於註解):","Tu nombre (visible en los comentarios):","Votre nom (affiché sur les commentaires) :","Ihr Name (bei Kommentaren sichtbar):","Il tuo nome (visibile nei commenti):","Seu nome (exibido nos comentários):"],
+ "Your name (shown on new comments):": ["あなたの名前(新しいコメントに表示):","您的名字(显示在新评论中):","您的名字(顯示於新註解):","Tu nombre (visible en los nuevos comentarios):","Votre nom (affiché sur les nouveaux commentaires) :","Ihr Name (bei neuen Kommentaren sichtbar):","Il tuo nome (visibile nei nuovi commenti):","Seu nome (exibido em novos comentários):"],
"archived": ["アーカイブ済み","已归档","已封存","archivada","archivée","archiviert","archiviata","arquivada"],
- "bento/spaces {version} · {pages} page(s), {blocks} block(s). The document, the editor and the search are all in this one file.": ["bento/spaces {version} · {pages} ページ、{blocks} ブロック。ドキュメントもエディターも検索も、すべてこの 1 つのファイルの中にあります。","bento/spaces {version} · {pages} 个页面,{blocks} 个块。文档、编辑器和搜索全都在这一个文件里。","bento/spaces {version} · {pages} 個頁面、{blocks} 個區塊。文件、編輯器和搜尋全都在這一個檔案裡。","bento/spaces {version} · {pages} página(s), {blocks} bloque(s). El documento, el editor y la búsqueda están todos en este único archivo.","bento/spaces {version} · {pages} page(s), {blocks} bloc(s). Le document, l’éditeur et la recherche tiennent tous dans ce seul fichier.","bento/spaces {version} · {pages} Seiten, {blocks} Blöcke. Das Dokument, der Editor und die Suche stecken alle in dieser einen Datei.","bento/spaces {version} · pagine: {pages}, blocchi: {blocks}. Il documento, l’editor e la ricerca sono tutti in questo unico file.","bento/spaces {version} · {pages} página(s), {blocks} bloco(s). O documento, o editor e a pesquisa estão todos neste único ficheiro."],
+ "bento/spaces is MIT-licensed and carries no third-party runtime — the full notices travel in this file’s source.": ["bento/spaces は MIT ライセンスで、サードパーティのランタイムは含みません。完全な表示はこのファイルのソースに入っています。","bento/spaces 采用 MIT 许可,且不含任何第三方运行时——完整声明就在这个文件的源码里。","bento/spaces 採用 MIT 授權,且不含任何第三方執行環境——完整聲明就在這個檔案的原始碼裡。","bento/spaces tiene licencia MIT y no incluye ningún runtime de terceros: los avisos completos viajan en el código fuente de este archivo.","bento/spaces est sous licence MIT et n’embarque aucun runtime tiers — les mentions complètes voyagent dans le source de ce fichier.","bento/spaces steht unter MIT-Lizenz und enthält keine Fremd-Runtime — die vollständigen Hinweise reisen im Quelltext dieser Datei mit.","bento/spaces è rilasciato con licenza MIT e non include alcun runtime di terze parti: le note complete viaggiano nel sorgente di questo file.","O bento/spaces tem licença MIT e não inclui qualquer runtime de terceiros — os avisos completos viajam no código-fonte deste ficheiro."],
"format v{v}": ["フォーマット v{v}","格式 v{v}","格式 v{v}","formato v{v}","format v{v}","Format v{v}","formato v{v}","formato v{v}"],
+ "just now": ["たった今","刚刚","剛剛","ahora mismo","à l'instant","gerade eben","proprio ora","agora mesmo"],
"none": ["なし","无","無","ninguna","aucun","keine","nessuno","nenhuma"],
+ "you": ["あなた","你","你","tú","vous","du","tu","você"],
+ "you: {name} ✎": ["あなた: {name} ✎","你:{name} ✎","你:{name} ✎","tú: {name} ✎","vous : {name} ✎","Sie: {name} ✎","tu: {name} ✎","você: {name} ✎"],
+ "{blocks} blocks · {words} words · {links} links in": ["{blocks} ブロック · {words} 語 · 被リンク {links}","{blocks} 个块 · {words} 个词 · {links} 个入链","{blocks} 個區塊 · {words} 個詞 · {links} 個入連結","{blocks} bloques · {words} palabras · {links} enlaces entrantes","{blocks} blocs · {words} mots · {links} liens entrants","{blocks} Blöcke · {words} Wörter · {links} eingehende Links","{blocks} blocchi · {words} parole · {links} link in entrata","{blocks} blocos · {words} palavras · {links} ligações a apontar"],
"{i} of {n}": ["{i} / {n}","第 {i} 个,共 {n} 个","{i} / {n}","{i} de {n}","{i} sur {n}","{i} von {n}","{i} di {n}","{i} de {n}"],
"{name} joined": ["{name} が参加しました","{name} 已加入","{name} 已加入","{name} se ha unido","{name} a rejoint","{name} ist beigetreten","{name} si è unito","{name} entrou"],
"{name} left": ["{name} が退出しました","{name} 已离开","{name} 已離開","{name} se ha ido","{name} est parti","{name} hat verlassen","{name} se n'è andato","{name} saiu"],
+ "{name} was removed": ["{name} を削除しました","已移除 {name}","已移除 {name}","{name} fue eliminado","{name} a été retiré","{name} wurde entfernt","{name} è stato rimosso","{name} foi removido"],
+ "{n} connected": ["{n} 人が接続中","{n} 人已连接","{n} 人已連線","{n} conectados","{n} connectés","{n} verbunden","{n} connessi","{n} conectados"],
"{n} duplicate or missing id(s) were repaired so links and pages resolve.": ["重複または欠落した id を {n} 件修復し、リンクとページが解決するようにしました。","已修复 {n} 个重复或缺失的 id,链接和页面现在都能正常解析。","已修復 {n} 個重複或遺失的 id,讓連結與頁面能正確對應。","Se repararon {n} id(s) duplicados o ausentes para que los enlaces y las páginas funcionen.","{n} id(s) en double ou manquant(s) ont été réparés pour que les liens et les pages se résolvent.","{n} doppelte oder fehlende IDs wurden repariert, damit Links und Seiten wieder gefunden werden.","Riparati {n} id duplicati o mancanti, così link e pagine funzionano.","Foram reparados {n} id(s) duplicados ou em falta para que as ligações e as páginas funcionem."],
+ "{n} embedded image(s) and clip(s) account for {size} of that — {pct}%. Everything else is text.": ["埋め込まれた画像とクリップ {n} 件で {size}、全体の {pct}% を占めます。残りはすべてテキストです。","其中 {n} 个嵌入的图片和片段占了 {size},也就是 {pct}%。其余全是文字。","其中 {n} 個嵌入的圖片和片段占了 {size},也就是 {pct}%。其餘全是文字。","{n} imagen(es) y clip(s) incrustados suman {size} de ese total: el {pct}%. Todo lo demás es texto.","{n} image(s) et clip(s) intégrés représentent {size}, soit {pct}%. Tout le reste est du texte.","{n} eingebettete Bild(er) und Clip(s) machen davon {size} aus — {pct}%. Alles andere ist Text.","{n} immagine/i e clip incorporate rappresentano {size} di quel totale — il {pct}%. Tutto il resto è testo.","{n} imagem(ns) e clipe(s) incorporados representam {size} desse total — {pct}%. O resto é tudo texto."],
"{n} found": ["{n} 件","找到 {n} 个","找到 {n} 個","{n} encontrada(s)","{n} résultat(s)","{n} Treffer","risultati: {n}","{n} encontradas"],
+ "{n} id(s) were renamed because this space already used them, and the links inside the import follow them.": ["{n} 件の id はこのスペースで既に使われていたため付け直しました。取り込んだ中のリンクもそれに追従しています。","有 {n} 个 id 因本空间已在使用而被改名,导入内容中的链接也随之更新。","有 {n} 個 id 因本空間已在使用而被改名,匯入內容中的連結也隨之更新。","Se renombraron {n} id porque este espacio ya los usaba, y los enlaces dentro de lo importado los siguen.","{n} identifiant(s) ont été renommés car cet espace les utilisait déjà, et les liens de l’import les suivent.","{n} ID(s) wurden umbenannt, weil dieser Space sie bereits verwendet hat; die Links im Import folgen ihnen.","{n} id sono stati rinominati perché questo spazio li usava già, e i collegamenti dell’import li seguono.","{n} id foram renomeados porque este espaço já os usava, e as ligações do que foi importado acompanham-nos."],
+ "{n} image(s) came too.": ["画像も {n} 件入りました。","另有 {n} 张图片一并导入。","另有 {n} 張圖片一併匯入。","También vinieron {n} imagen(es).","{n} image(s) sont venues aussi.","{n} Bild(er) sind ebenfalls mitgekommen.","Sono arrivate anche {n} immagine/i.","Vieram também {n} imagem(ns)."],
"{n} image(s) could not be opened, so their paths are kept as text. Import again with the image files included.": ["{n} 個の画像を開けなかったため、そのパスをテキストとして残しました。画像ファイルも含めてもう一度読み込んでください。","{n} 张图片打不开,它们的路径以文字保留。请把图片文件一并选上再导入一次。","{n} 張圖片打不開,它們的路徑以文字保留。請連同圖片檔案一起再匯入一次。","{n} imagen(es) no se pudieron abrir, así que sus rutas quedan como texto. Vuelve a importar incluyendo los archivos de imagen.","{n} image(s) n’ont pas pu être ouvertes ; leurs chemins restent en texte. Réimportez en incluant les fichiers image.","{n} Bild(er) ließen sich nicht öffnen; ihre Pfade bleiben als Text. Importiere noch einmal, diesmal mit den Bilddateien.","{n} immagini non si sono potute aprire: i loro percorsi restano come testo. Importa di nuovo includendo i file immagine.","{n} imagem(ns) não puderam ser abertas, por isso os caminhos ficam como texto. Importe de novo com os ficheiros de imagem incluídos."],
"{n} image(s) embedded ({size}).": ["{n} 個の画像を埋め込みました({size})。","已嵌入 {n} 张图片({size})。","已嵌入 {n} 張圖片({size})。","{n} imagen(es) incrustada(s) ({size}).","{n} image(s) intégrée(s) ({size}).","{n} Bild(er) eingebettet ({size}).","{n} immagini incorporate ({size}).","{n} imagem(ns) incorporada(s) ({size})."],
+ "{n} image(s) go with them; the rest stay here.": ["{n} 件の画像が一緒に移動し、残りはここに残ります。","{n} 张图片会一起带走,其余留在这里。","{n} 張圖片會一起帶走,其餘留在這裡。","{n} imagen(es) van con ellas; el resto se queda aquí.","{n} image(s) partent avec elles ; les autres restent ici.","{n} Bild(er) gehen mit; der Rest bleibt hier.","{n} immagine/i vanno con esse; il resto resta qui.","{n} imagem(ns) vão com elas; as restantes ficam aqui."],
"{n} image(s) point at the web. Nothing loads until a reader asks.": ["{n} 個の画像はウェブを指しています。読み手が求めるまで何も読み込みません。","{n} 张图片指向网络。在读者主动请求之前不会加载。","{n} 張圖片指向網路。在讀者主動要求之前不會載入。","{n} imagen(es) apuntan a la web. No se carga nada hasta que un lector lo pida.","{n} image(s) pointent vers le web. Rien ne se charge tant qu’un lecteur ne le demande pas.","{n} Bild(er) zeigen ins Web. Nichts wird geladen, bevor ein Leser darum bittet.","{n} immagini puntano al web. Non si carica nulla finché un lettore non lo chiede.","{n} imagem(ns) apontam para a web. Nada é carregado até um leitor pedir."],
"{n} image(s) were left as paths because embedding stopped there.": ["{n} 個の画像は、そこで埋め込みを止めたためパスのまま残りました。","{n} 张图片以路径形式保留,因为嵌入到此为止。","{n} 張圖片以路徑形式保留,因為嵌入到此為止。","{n} imagen(es) quedaron como rutas porque la incrustación se detuvo ahí.","{n} image(s) restent sous forme de chemin, l’intégration s’étant arrêtée là.","{n} Bild(er) blieben als Pfad stehen, weil das Einbetten dort endete.","{n} immagini restano come percorsi perché l’incorporamento si è fermato lì.","{n} imagem(ns) ficaram como caminhos porque a incorporação parou aí."],
+ "{n} link(s) named pages that were not in that file, and are kept as text.": ["{n} 件のリンクはそのファイルに無いページを指していたため、テキストとして残しました。","有 {n} 个链接指向该文件中不存在的页面,已保留为文字。","有 {n} 個連結指向該檔案中不存在的頁面,已保留為文字。","{n} enlace(s) nombraban páginas que no estaban en ese archivo y se conservan como texto.","{n} lien(s) nommaient des pages absentes de ce fichier et sont conservés en texte.","{n} Link(s) nannten Seiten, die nicht in dieser Datei waren, und bleiben als Text erhalten.","{n} collegamento/i nominavano pagine non presenti in quel file e restano come testo.","{n} ligação(ões) nomeavam páginas que não estavam nesse ficheiro e ficam como texto."],
+ "{n} link(s) point outside them and are kept as text naming the page they meant.": ["{n} 件のリンクは外を指しているため、指していたページ名を残したテキストになります。","有 {n} 个链接指向其外部,将保留为写明原目标页面的文字。","有 {n} 個連結指向其外部,將保留為寫明原目標頁面的文字。","{n} enlace(s) apuntan fuera y se conservan como texto que nombra la página a la que se referían.","{n} lien(s) pointent en dehors et sont conservés en texte, avec le nom de la page visée.","{n} Link(s) zeigen nach außen und bleiben als Text erhalten, der die gemeinte Seite nennt.","{n} collegamento/i puntano fuori e restano come testo che nomina la pagina a cui puntavano.","{n} ligação(ões) apontam para fora e ficam como texto que nomeia a página pretendida."],
"{n} link(s) to it will stop working.": ["このページへのリンク {n} 件が機能しなくなります。","指向它的 {n} 个链接会失效。","指向它的 {n} 個連結將會失效。","{n} enlace(s) a ella dejarán de funcionar.","{n} lien(s) vers elle ne fonctionneront plus.","{n} Links darauf funktionieren nicht mehr.","{n} collegamenti a questa pagina smetteranno di funzionare.","{n} ligação(ões) para ela deixam de funcionar."],
"{n} note name(s) appear more than once, so links naming them all went to the first.": ["{n} 件のノート名が重複しているため、その名前のリンクはすべて最初のノートに向いています。","有 {n} 个笔记名称重复,因此指向该名称的链接都指向了第一个。","有 {n} 個筆記名稱重複,因此指向該名稱的連結都指向了第一個。","{n} nombre(s) de nota se repiten, así que los enlaces con ese nombre fueron todos al primero.","{n} nom(s) de note apparaissent plusieurs fois : les liens portant ce nom pointent tous vers le premier.","{n} Notiznamen kommen mehrfach vor — Links mit diesem Namen führen alle zur ersten.","{n} nome/i di nota compaiono più volte, quindi i link con quel nome puntano tutti al primo.","{n} nome(s) de nota aparecem mais de uma vez, por isso as ligações com esse nome foram todas para a primeira."],
"{n} of {total} wikilink(s) resolved.": ["{total} 個のウィキリンクのうち {n} 個を解決しました。","{total} 个 wiki 链接中解析了 {n} 个。","{total} 個 wiki 連結中解析了 {n} 個。","{n} de {total} wikilink(s) resueltos.","{n} wikilien(s) sur {total} résolus.","{n} von {total} Wikilink(s) aufgelöst.","{n} wikilink su {total} risolti.","{n} de {total} wikilink(s) resolvidos."],
"{n} page(s) had frontmatter, kept verbatim in a folded block.": ["{n} ページにフロントマターがありました。折りたたみブロックにそのまま保存しています。","{n} 个页面带有 frontmatter,已原样保存在折叠块里。","{n} 個頁面帶有 frontmatter,已原樣保存在摺疊區塊裡。","{n} página(s) tenían frontmatter, conservado tal cual en un bloque plegado.","{n} page(s) avaient un frontmatter, conservé tel quel dans un bloc replié.","{n} Seite(n) hatten Frontmatter — wortgetreu in einem zugeklappten Block erhalten.","{n} pagine avevano un frontmatter, conservato alla lettera in un blocco richiuso.","{n} página(s) tinham frontmatter, guardado tal e qual num bloco fechado."],
"{n} page(s) inside it move up a level.": ["中にある {n} ページが 1 つ上の階層に移動します。","其中的 {n} 个页面会上移一级。","其中的 {n} 個頁面會往上移一層。","{n} página(s) que contiene suben un nivel.","{n} page(s) qu’elle contient remonteront d’un niveau.","{n} Unterseiten rücken eine Ebene nach oben.","{n} pagine contenute salgono di un livello.","{n} página(s) dentro dela sobem um nível."],
"{n} pages, in sidebar order, with a contents page": ["{n} ページをサイドバー順に、目次ページ付きで","{n} 个页面,按侧边栏顺序,并附一个目录页","{n} 個頁面,依側邊欄順序排列,並附目錄頁","{n} páginas, en el orden de la barra lateral, con una página de índice","{n} pages, dans l’ordre de la barre latérale, avec une page de sommaire","{n} Seiten, in der Reihenfolge der Seitenleiste, mit Inhaltsverzeichnis","{n} pagine, nell’ordine della barra laterale, con una pagina indice","{n} páginas, pela ordem da barra lateral, com uma página de índice"],
- "{n} table(s) kept as text: there is no table block in this format yet.": ["{n} 個の表はテキストとして保存しました。この形式にはまだ表ブロックがありません。","{n} 个表格按原文保留为文字:这个格式还没有表格块。","{n} 個表格按原文保留為文字:這個格式還沒有表格區塊。","{n} tabla(s) conservadas como texto: este formato aún no tiene bloque de tabla.","{n} tableau(x) conservés en texte : ce format n’a pas encore de bloc tableau.","{n} Tabelle(n) als Text übernommen: Dieses Format hat noch keinen Tabellenblock.","{n} tabelle conservate come testo: questo formato non ha ancora un blocco tabella.","{n} tabela(s) ficaram como texto: este formato ainda não tem bloco de tabela."],
+ "{n} table(s) imported, with their column alignment.": ["{n} 個の表を取り込みました(列の配置も含みます)。","已导入 {n} 个表格,并保留列对齐方式。","已匯入 {n} 個表格,並保留欄位對齊方式。","{n} tabla(s) importada(s), con la alineación de sus columnas.","{n} tableau(x) importé(s), avec l’alignement de leurs colonnes.","{n} Tabelle(n) importiert, samt Spaltenausrichtung.","{n} tabella/e importata/e, con l’allineamento delle colonne.","{n} tabela(s) importada(s), com o alinhamento das colunas."],
+ "{n} unresolved comment(s)": ["未解決のコメント {n} 件","{n} 条未解决的评论","{n} 則未解決的註解","{n} comentario(s) sin resolver","{n} commentaire(s) non résolu(s)","{n} offene(r) Kommentar(e)","{n} commento/i non risolto/i","{n} comentário(s) não resolvido(s)"],
+ "{n}d ago": ["{n}日前","{n} 天前","{n} 天前","hace {n} d","il y a {n} j","vor {n} T","{n} g fa","há {n}d"],
+ "{n}h ago": ["{n}時間前","{n} 小时前","{n} 小時前","hace {n} h","il y a {n} h","vor {n} Std","{n} h fa","há {n}h"],
+ "{n}m ago": ["{n}分前","{n} 分钟前","{n} 分鐘前","hace {n} min","il y a {n} min","vor {n} Min","{n} min fa","há {n}min"],
+ "{pages} page(s) and {blocks} block(s) added from that space.": ["そのスペースから {pages} ページ、{blocks} ブロックを追加しました。","已从该空间添加 {pages} 个页面、{blocks} 个块。","已從該空間加入 {pages} 個頁面、{blocks} 個區塊。","Se añadieron {pages} página(s) y {blocks} bloque(s) desde ese espacio.","{pages} page(s) et {blocks} bloc(s) ajoutés depuis cet espace.","{pages} Seite(n) und {blocks} Block/Blöcke aus diesem Space hinzugefügt.","Aggiunte {pages} pagina/e e {blocks} blocco/blocchi da quello spazio.","Adicionadas {pages} página(s) e {blocks} bloco(s) a partir desse espaço."],
"{pages} page(s) and {blocks} block(s) added from {files} file(s).": ["{files} 個のファイルから {pages} ページ・{blocks} ブロックを追加しました。","从 {files} 个文件新增了 {pages} 个页面、{blocks} 个块。","從 {files} 個檔案新增了 {pages} 個頁面、{blocks} 個區塊。","{pages} página(s) y {blocks} bloque(s) añadidos desde {files} archivo(s).","{pages} page(s) et {blocks} bloc(s) ajoutés depuis {files} fichier(s).","{pages} Seite(n) und {blocks} Block/Blöcke aus {files} Datei(en) hinzugefügt.","{pages} pagine e {blocks} blocchi aggiunti da {files} file.","{pages} página(s) e {blocks} bloco(s) acrescentados a partir de {files} ficheiro(s)."],
+ "{pages} page(s) and {blocks} block(s) will travel.": ["{pages} ページ、{blocks} ブロックが移動します。","将带走 {pages} 个页面、{blocks} 个块。","將帶走 {pages} 個頁面、{blocks} 個區塊。","Viajarán {pages} página(s) y {blocks} bloque(s).","{pages} page(s) et {blocks} bloc(s) feront le voyage.","{pages} Seite(n) und {blocks} Block/Blöcke kommen mit.","Viaggeranno {pages} pagina/e e {blocks} blocco/blocchi.","Vão viajar {pages} página(s) e {blocks} bloco(s)."],
"⌘Z removes the imported pages again.": ["⌘Z で、読み込んだページを取り消せます。","按 ⌘Z 可以把导入的页面再撤销掉。","按 ⌘Z 可以把匯入的頁面再撤銷掉。","⌘Z vuelve a quitar las páginas importadas.","⌘Z supprime à nouveau les pages importées.","Mit ⌘Z verschwinden die importierten Seiten wieder.","⌘Z rimuove di nuovo le pagine importate.","⌘Z remove novamente as páginas importadas."],
}
diff --git a/spaces/src/i18n/pt.ts b/spaces/src/i18n/pt.ts
index b5cf37ac..7f7f58f4 100644
--- a/spaces/src/i18n/pt.ts
+++ b/spaces/src/i18n/pt.ts
@@ -13,73 +13,149 @@ import type { Catalog } from '../i18n'
export const pt: Catalog = {
"A filter here is newer than this build and was not applied.": "Um filtro desta vista é mais recente do que esta versão e não foi aplicado.",
"A folder of .md files becomes pages, with the folder tree and the [[wikilinks]] intact.": "Uma pasta de ficheiros .md transforma-se em páginas, com a árvore de pastas e os [[wikilinks]] intactos.",
+ "A link with nothing in it yet": "Um link ainda sem nada",
"A list of every page, in order": "Uma lista de todas as páginas, por ordem",
+ "A live viewer: follows every edit as it happens but can never change this space — the relay enforces it.": "Um visualizador ao vivo: acompanha cada edição conforme acontece, mas nunca pode alterar este Space — o retransmissor garante isso.",
"A page cannot contain itself": "Uma página não pode conter-se a si própria",
"A password encrypts the document inside the file. There is no recovery — lose it and the space is gone.": "Uma palavra-passe encripta o documento dentro do ficheiro. Não há recuperação — se a perder, o espaço desaparece.",
"A second file — the original is left alone": "Um segundo ficheiro — o original fica intacto",
"A sort here is newer than this build and was not applied.": "Uma ordenação desta vista é mais recente do que esta versão e não foi aplicada.",
"A space is never a dead end: the whole document is plain JSON in this file, and every page exports as Markdown.": "Um espaço nunca é um beco sem saída: todo o documento é JSON simples dentro deste ficheiro e todas as páginas se exportam para Markdown.",
"A space needs at least one page": "Um espaço precisa de pelo menos uma página",
+ "A still frame, shown before play — and what a printout or a file preview shows": "Uma imagem fixa, mostrada antes da reprodução — e é o que aparece na impressão e na pré-visualização do ficheiro",
"About bento/spaces — version, updates, language, password": "Acerca do bento/spaces — versão, atualizações, idioma, palavra-passe",
"About this space": "Sobre este espaço",
+ "Access reset — only copies saved from now on can join": "Acesso redefinido — apenas cópias salvas de agora em diante podem entrar",
"Add a block below": "Adicionar um bloco abaixo",
+ "Add a column after": "Adicionar uma coluna depois",
+ "Add a link": "Adicionar um link",
+ "Add a picture": "Adicionar uma imagem",
+ "Add a row below": "Adicionar uma linha abaixo",
"Add below": "Adicionar abaixo",
+ "Add pages under": "Adicionar as páginas por baixo de",
+ "Address of a video or audio file": "Endereço de um ficheiro de vídeo ou áudio",
"Adds status, priority, assignee, estimate": "Adiciona estado, prioridade, responsável e estimativa",
+ "All text. Nothing is embedded, so this file is as small as a space gets.": "Só texto. Nada está incorporado, por isso este ficheiro é o mais pequeno que um espaço pode ser.",
"Already an issue": "Já é uma tarefa",
"Also open in another window on this computer — not shared online": "Também aberto noutra janela deste computador — não partilhado online",
+ "Alt text": "Texto alternativo",
+ "An update check is the only network this app makes on its own. It asks the release server for a signed manifest and sends nothing about you or this document — no ids, no telemetry.": "A verificação de atualizações é a única ligação de rede que esta aplicação faz por iniciativa própria. Pede ao servidor de versões um manifesto assinado e não envia nada sobre si nem sobre este documento — sem identificadores, sem telemetria.",
+ "Another bento/spaces file arrives as pages under the one you choose — its images come too, and the links inside it keep working.": "Outro ficheiro bento/spaces chega como páginas por baixo da que escolher — as imagens vêm também e as ligações lá dentro continuam a funcionar.",
+ "Another bento/spaces file can arrive the same way, nested under any page.": "Outro ficheiro bento/spaces pode chegar da mesma forma, aninhado sob qualquer página.",
+ "Appearance": "Aspeto",
+ "Apply": "Aplicar",
"Archive": "Arquivar",
+ "Archived": "Arquivada",
"Archived ({n})": "Arquivadas ({n})",
"Ascending": "Crescente",
+ "Audio": "Áudio",
+ "Audio from {host}": "Áudio de {host}",
+ "Back": "Voltar",
+ "Background": "Plano de fundo",
+ "Block": "Bloco",
"Block options": "Opções do bloco",
+ "Blocks": "Blocos",
+ "Blue": "Azul",
"Board": "Quadro",
+ "Bold": "Negrito",
+ "Bold — ⌘B": "Negrito — ⌘B",
"Breadcrumb": "Trilho de navegação",
"Bring notes in": "Trazer notas para cá",
+ "Brown": "Marrom",
"Callout icon": "Ícone do destaque",
+ "Cancel": "Cancelar",
+ "Careful": "Cuidado",
"Caution": "Cuidado",
+ "Change password…": "Alterar senha…",
"Change the kind of callout": "Alterar o tipo de destaque",
+ "Change the name used for your new comments and replies": "Altere o nome usado nos seus novos comentários e respostas",
"Change this block’s type": "Alterar o tipo deste bloco",
"Change this page's icon": "Mudar o ícone desta página",
"Change {field}": "Alterar {field}",
"Check for updates": "Verificar atualizações",
+ "Check for updates automatically at launch": "Verificar atualizações automaticamente ao abrir",
+ "Checked automatically at launch — you're on the latest version (v{v}).": "Verificado automaticamente ao abrir — você está na versão mais recente (v{v}).",
"Checking is manual and verified: the download is signed, and its signature is checked against a key inside this file before anything is rewritten.": "A verificação é manual e comprovada: a transferência é assinada e a sua assinatura é validada com uma chave dentro deste ficheiro antes de qualquer coisa ser reescrita.",
"Checking…": "A verificar…",
"Choose .md files…": "Escolher ficheiros .md…",
+ "Choose a different file": "Escolher outro ficheiro",
+ "Choose a file…": "Escolher um ficheiro…",
"Choose a folder…": "Escolher uma pasta…",
"Choose a password. There is no way to recover it.": "Escolha uma palavra-passe. Não há forma de a recuperar.",
+ "Choose a space…": "Escolher um espaço…",
"Choose the field the columns come from": "Escolha o campo de onde vêm as colunas",
"Choose the order": "Escolha a ordem",
"Clear filter": "Limpar o filtro",
+ "Clear formatting": "Limpar formatação",
+ "Clip added ({size})": "Clipe adicionado ({size})",
"Close": "Fechar",
+ "Code": "Código",
"Collapsed toggles always print open. Your browser's print dialog has the \"Save as PDF\" option.": "Os blocos recolhidos são sempre impressos abertos. A janela de impressão do navegador tem a opção \"Guardar como PDF\".",
+ "Color": "Cor",
"Column": "Coluna",
+ "Columns": "Colunas",
"Comfortable for reading": "Confortável para ler",
+ "Comment": "Comentário",
+ "Comment on this page": "Comentar esta página",
+ "Comment · block": "Comentário · bloco",
+ "Comment · page": "Comentário · página",
+ "Comment:": "Comentário:",
+ "Connect to the live session without saving a new copy — copies you sent earlier will meet you there.": "Conecte-se à sessão ao vivo sem salvar uma nova cópia — as cópias que você enviou antes encontrarão você lá.",
+ "Connecting…": "Conectando…",
"Contents": "Índice",
"Contents page": "Página de índice",
+ "Controls": "Controlos",
+ "Copied ✓": "Copiado ✓",
"Copy document JSON": "Copiar JSON do documento",
"Copy saved": "Cópia guardada",
"Copy saved — you are still editing the original": "Cópia guardada — continuas a editar o original",
"Copy the document JSON": "Copiar o JSON do documento",
"Could not reach the update channel.": "Não foi possível contactar o canal de atualizações.",
"Could not verify an update, so nothing was changed.": "Não foi possível verificar a atualização, por isso nada foi alterado.",
+ "Couldn’t access the clipboard": "Não foi possível acessar a área de transferência",
+ "Couldn’t reach the live session": "Não foi possível alcançar a sessão ao vivo",
"Create “{name}”": "Criar “{name}”",
+ "Dark": "Escuro",
+ "Default": "Padrão",
"Delete": "Eliminar",
"Delete “{name}”?": "Eliminar “{name}”?",
"Delete…": "Eliminar…",
"Descending": "Decrescente",
+ "Description": "Descrição",
"Discard": "Descartar",
+ "Document": "Documento",
+ "Document JSON copied": "JSON do documento copiado",
+ "Document id": "ID do documento",
+ "Document properties": "Propriedades do documento",
+ "Document replaced — ⌘Z undoes": "Documento substituído — ⌘Z desfaz",
+ "Download updated copy": "Baixar cópia atualizada",
+ "Downloaded ✓": "Baixado ✓",
"Downloaded. Open the new file — this one is unchanged.": "Transferido. Abra o novo ficheiro — este fica inalterado.",
+ "Downloads a backup of the current version, then rewrites this file on disk as the new version — document untouched.": "Baixa um backup da versão atual e depois regrava este arquivo no disco como a nova versão — o documento não é alterado.",
"Drag to move, click for block options": "Arraste para mover, clique para as opções do bloco",
+ "Drag to resize this column": "Arraste para redimensionar esta coluna",
"Drag to resize · double-click to reset": "Arrasta para redimensionar · duplo clique para repor",
"Drop .md files or a folder here": "Largue aqui ficheiros .md ou uma pasta",
"Duplicate": "Duplicar",
+ "Duplicate as a new space…": "Duplicar como novo espaço…",
"Each .md file becomes a page, folders become the page tree, and [[wikilinks]] become real links. Pages are added — nothing here is replaced.": "Cada ficheiro .md passa a ser uma página, as pastas passam a ser a árvore de páginas e os [[wikilinks]] passam a ser ligações verdadeiras. As páginas são acrescentadas — nada aqui é substituído.",
+ "Edit": "Editar",
+ "Edit this link card": "Editar este cartão de link",
"Edited": "Editado",
"Editing": "Edição",
+ "Editor": "Editor",
+ "Editor copy saved — recipients join live with edit access": "Cópia de editor salva — quem receber entra ao vivo com acesso de edição",
"Encrypt the document inside this file": "Encriptar o documento dentro deste ficheiro",
"Enter the password to open it.": "Introduza a palavra-passe para o abrir.",
+ "Every page opens wide on this screen from now on": "A partir de agora todas as páginas abrem largas neste ecrã",
"Every page, as one .md file": "Todas as páginas num único ficheiro .md",
+ "Everything in this space is replaced by what you paste. ⌘Z undoes it, but only while this window stays open.": "Tudo o que está neste espaço é substituído pelo que colar. ⌘Z desfaz, mas só enquanto esta janela continuar aberta.",
+ "Export": "Exportar",
+ "Export a page as a space": "Exportar uma página como espaço",
"Export as Markdown": "Exportar como Markdown",
"Export as Markdown…": "Exportar como Markdown…",
+ "Export page as a space…": "Exportar a página como espaço…",
+ "Exported {n} page(s) as a new space": "{n} página(s) exportada(s) como um novo espaço",
"File": "Ficheiro",
"Fills the window": "Preenche a janela",
"Filter": "Filtrar",
@@ -87,10 +163,17 @@ export const pt: Catalog = {
"Find": "Localizar",
"Find in this space…": "Localizar neste espaço…",
"Find or create a page…": "Encontrar ou criar uma página…",
+ "Following — view only": "Acompanhando — somente visualização",
"Full width": "Largura total",
+ "Gray": "Cinza",
+ "Green": "Verde",
"Group": "Agrupar",
"Guest": "Convidado",
+ "Header row": "Linha de cabeçalho",
+ "Hide properties (])": "Ocultar propriedades (])",
"Hide the page list ([)": "Ocultar a lista de páginas ([)",
+ "Highlight": "Destaque",
+ "Highlight — ⇧⌘H": "Destaque — ⇧⌘H",
"Icon": "Ícone",
"Image added ({size})": "Imagem adicionada ({size})",
"Image added, resized to fit ({from} → {to})": "Imagem adicionada, redimensionada para caber ({from} → {to})",
@@ -101,35 +184,60 @@ export const pt: Catalog = {
"Import Markdown…": "Importar Markdown…",
"Important": "Importante",
"Imported": "Importado",
+ "Imported a space": "Espaço importado",
"Imported notes": "Notas importadas",
"Include archived pages": "Incluir páginas arquivadas",
"Include the image files and they are embedded too. An image this browser cannot open is kept as its path rather than as a broken picture.": "Inclua os ficheiros de imagem e também são incorporados. Uma imagem que este navegador não consegue abrir fica como o seu caminho, em vez de uma imagem partida.",
+ "Include the pages nested under it": "Incluir as páginas aninhadas por baixo",
+ "Inline code — ⌘E": "Código em linha — ⌘E",
"Insert": "Inserir",
"Insert a block — text, headings, lists, code, images": "Inserir um bloco — texto, títulos, listas, código, imagens",
"Interface language": "Idioma da interface",
+ "Interface theme": "Tema da interface",
"Invite someone…": "Convidar alguém…",
+ "Invite to edit…": "Convidar para editar…",
"Issues": "Tarefas",
+ "Italic": "Itálico",
+ "Italic — ⌘I": "Itálico — ⌘I",
+ "Journal date": "Data do diário",
+ "Key-verified identity": "Identidade verificada por chave",
"Language": "Idioma",
"Language follows whoever opens the file. It is never written into the document.": "O idioma segue quem abre o ficheiro. Nunca é escrito no documento.",
"Language — what this block is highlighted as": "Linguagem — como este bloco é realçado",
+ "Last saved": "Última gravação",
+ "Launch check couldn't reach the release server ({m}). Check manually below.": "A verificação ao abrir não alcançou o servidor de versões ({m}). Verifique manualmente abaixo.",
"Leave it empty to use the tone mark": "Deixe vazio para usar o símbolo do tipo",
+ "Light": "Claro",
+ "Link": "Link",
+ "Link address": "Endereço do link",
+ "Link card": "Cartão de link",
"Link to page": "Ligar a uma página",
+ "Link — ⌘K": "Link — ⌘K",
+ "Linked": "Externo",
"Linked from": "Ligado a partir de",
"Links to it become dead": "As ligações para ela ficam quebradas",
"List": "Lista",
+ "Live": "Ao vivo",
"Live — nobody else is here yet": "Ao vivo — ainda não há mais ninguém",
"Live — send someone the file to bring them in": "Ao vivo — envie o ficheiro a alguém para essa pessoa entrar",
"Live — {n} other people are here": "Ao vivo — há mais {n} pessoas",
+ "Load this audio": "Carregar este áudio",
"Load this image": "Carregar esta imagem",
+ "Load this video": "Carregar este vídeo",
+ "Loop": "Repetição",
"Make this page an issue": "Transformar esta página numa tarefa",
"Manual order": "Ordem manual",
+ "Match my system": "Acompanhar o sistema",
+ "Mints brand-new keys. Every previously sent copy stops syncing for good; share fresh copies afterwards.": "Gera chaves novas em folha. Toda cópia enviada antes para de sincronizar de vez; compartilhe cópias novas depois.",
"More": "Mais",
"Move down": "Mover para baixo",
"Move up": "Mover para cima",
+ "Muted": "Sem som",
"New issue": "Nova tarefa",
"New page": "Nova página",
"New page (⌘⌥N)": "Nova página (⌘⌥N)",
"New page inside": "Nova página dentro desta",
+ "New to Bento? Find templates, the gallery and the AI editing guide at {home} — or ⭐ it on {gh}.": "Novo no Bento? Encontre modelos, a galeria e o guia de edição com IA em {home} — ou dê uma ⭐ no {gh}.",
"Next (⏎)": "Seguinte (⏎)",
"No Markdown files in that selection": "Não há ficheiros Markdown nessa seleção",
"No block matches": "Nenhum bloco corresponde",
@@ -138,51 +246,104 @@ export const pt: Catalog = {
"No issues yet. Add a status field to any page and it appears here.": "Ainda não há tarefas. Adiciona um campo de estado a qualquer página e ela aparece aqui.",
"No pages yet": "Ainda sem páginas",
"Nobody else is here yet": "Ainda não há mais ninguém",
+ "Not in this file: it needs the network, and the site is told when someone opens the page": "Não está neste ficheiro: precisa da rede, e esse site fica a saber que alguém abriu esta página",
+ "Not live — turns on when you share": "Fora do ar — ativa quando você compartilha",
"Not loaded — opening it would tell that site you opened this space.": "Não carregada — carregá-la diria a esse site que você abriu este espaço.",
"Not sharing yet — click to start a live session": "Ainda não está compartilhando — clique para iniciar uma sessão ao vivo",
"Note": "Nota",
"Nothing found": "Nada encontrado",
+ "Nothing is fetched. A card shows what you type here — opening this space never contacts the site.": "Nada é obtido. O cartão mostra o que você escrever aqui — abrir este espaço nunca contacta o site.",
"Nothing leaves this file until you start a session.": "Nada sai deste ficheiro até iniciares uma sessão.",
"Now an issue": "Agora é uma tarefa",
"Off by default — they were archived for a reason": "Desativado por predefinição — foram arquivadas por alguma razão",
+ "Offline mode is on — nothing leaves this computer.": "O modo offline está ativado — nada sai deste computador.",
+ "On this screen only — it is not saved in the file": "Apenas neste ecrã — não é guardado no ficheiro",
+ "One emoji": "Um emoji",
+ "One fewer": "Menos um",
+ "One line about what is there": "Uma linha sobre o que há lá",
+ "One more": "Mais um",
+ "One page and what is under it, as its own file": "Uma página e o que está abaixo dela, como ficheiro próprio",
+ "Only pages that ask for it": "Apenas as páginas que o pedem",
+ "Only the owner of this space can invite people": "Apenas o dono deste Space pode convidar pessoas",
"Open only": "Apenas em aberto",
+ "Orange": "Laranja",
"Other": "Outras",
"Other ways to save": "Outras formas de guardar",
"Out of the sidebar, still searchable and linkable": "Fora da barra lateral, mas continua pesquisável e ligável",
+ "Owner": "Dono",
+ "Page": "Página",
"Page options": "Opções da página",
"Pages": "Páginas",
+ "Pages open at their normal width again": "As páginas voltam à largura normal",
"Pages — show or hide the page list": "Páginas — mostrar ou ocultar a lista de páginas",
"Password": "Palavra-passe",
"Password removed. Save to write the space unencrypted.": "Palavra-passe removida. Guarde para escrever o espaço sem encriptação.",
"Password set. Save to write the space encrypted.": "Palavra-passe definida. Guarde para escrever o espaço encriptado.",
"Password…": "Palavra-passe…",
+ "Paste document JSON here…": "Cole aqui o JSON do documento…",
+ "Paste or type a link": "Cole ou digite um link",
"People in this space": "Pessoas neste espaço",
+ "Picture": "Imagem",
+ "Picture…": "Imagem…",
+ "Pink": "Rosa",
"Plain text": "Texto simples",
+ "Poster": "Miniatura",
+ "Poster…": "Miniatura…",
"Previous (⇧⏎)": "Anterior (⇧⏎)",
"Print": "Imprimir",
"Print / PDF…": "Imprimir / PDF…",
"Print or save as PDF": "Imprimir ou guardar como PDF",
"Print or save as PDF (⌘P)": "Imprimir ou guardar como PDF (⌘P)",
"Print…": "Imprimir…",
+ "Properties": "Propriedades",
+ "Properties — show or hide this block’s settings": "Propriedades — mostrar ou ocultar as definições deste bloco",
+ "Purple": "Roxo",
+ "Put the caret in a block to see what it can be.": "Coloque o cursor num bloco para ver o que se pode mudar nele.",
+ "Read the release notes for v{v} (opens in a new tab)": "Ler as notas de versão da v{v} (abre em uma nova aba)",
+ "Read-only copy saved — it follows the live session, view only": "Cópia somente leitura salva — ela acompanha a sessão ao vivo, apenas para visualizar",
+ "Reading file…": "A ler o ficheiro…",
"Reading image…": "A ler a imagem…",
"Reading view": "Modo de leitura",
"Reading view — press Esc or the eye to edit": "Vista de leitura — prima Esc ou o olho para editar",
"Reading view — the pages without the editing tools": "Vista de leitura — as páginas sem as ferramentas de edição",
"Reading {n} file(s)…": "A ler {n} ficheiro(s)…",
+ "Red": "Vermelho",
"Redo": "Refazer",
"Redo (⇧⌘Z)": "Refazer (⇧⌘Z)",
+ "Reload into new version": "Recarregar na nova versão",
+ "Remove": "Remover",
"Remove password…": "Remover palavra-passe…",
+ "Remove the password": "Remover a palavra-passe",
+ "Remove the password?": "Remover a palavra-passe?",
"Remove the password? The next save writes the document in the clear.": "Remover a palavra-passe? Da próxima vez que guardar, o documento é escrito sem encriptação.",
+ "Remove the picture": "Remover a imagem",
+ "Remove this column": "Remover esta coluna",
+ "Remove this row": "Remover esta linha",
+ "Remove {name} from this space? Their copy drops to read-only.": "Remover {name} deste Space? A cópia dessa pessoa passa a ser somente leitura.",
+ "Remove {name} — revokes this device’s access; everyone else is unaffected": "Remover {name} — revoga o acesso deste dispositivo; ninguém mais é afetado",
"Rename": "Mudar o nome",
+ "Reopen": "Reabrir",
+ "Repeat when it reaches the end": "Recomeçar quando chegar ao fim",
+ "Replace": "Substituir",
"Replace all": "Substituir tudo",
+ "Replace every page from pasted JSON?": "Substituir todas as páginas pelo JSON colado?",
+ "Replace from JSON…": "Substituir a partir de JSON…",
+ "Replace picture": "Substituir a imagem",
"Replace with": "Substituir por",
"Replace with…": "Substituir por…",
"Replace {n} occurrence(s) across the whole space?": "Substituir {n} ocorrência(s) em todo o espaço?",
"Replaced": "Substituído",
+ "Replace…": "Substituir…",
+ "Reply": "Responder",
+ "Reply…": "Responder…",
+ "Reset access? Every copy you’ve sent stops syncing; only copies saved after this can join.": "Redefinir o acesso? Toda cópia que você enviou para de sincronizar; apenas cópias salvas depois disso podem entrar.",
+ "Reset access…": "Redefinir acesso…",
"Resized": "Redimensionada",
+ "Resolve": "Resolver",
"Restore": "Restaurar",
"Restore to the page list": "Restaurar para a lista de páginas",
"Room for a board or a table": "Espaço para um quadro ou uma tabela",
+ "Rows": "Linhas",
"Save": "Guardar",
"Save (⌘S)": "Guardar (⌘S)",
"Save a copy…": "Guardar uma cópia…",
@@ -190,6 +351,7 @@ export const pt: Catalog = {
"Saved": "Guardado",
"Saved a new copy": "Nova cópia guardada",
"Saves a copy that joins this session": "Guarda uma cópia que entra nesta sessão",
+ "Saves a copy to send. Whoever opens it edits this space live with you (end-to-end encrypted); you stay the owner and can remove them from the People list.": "Salva uma cópia para enviar. Quem a abrir edita este Space ao vivo com você (com criptografia de ponta a ponta); você continua sendo o dono e pode removê-la na lista de Pessoas.",
"Saving…": "A guardar…",
"Search": "Pesquisar",
"Search all pages (⌘K)": "Pesquisar em todas as páginas (⌘K)",
@@ -199,32 +361,58 @@ export const pt: Catalog = {
"Share this space": "Partilhar este espaço",
"Show as a board": "Mostrar como quadro",
"Show as a list": "Mostrar como lista",
+ "Show playback controls to the reader": "Mostrar os controlos de reprodução a quem lê",
+ "Show properties (])": "Mostrar propriedades (])",
"Show the page list ([)": "Mostrar a lista de páginas ([)",
+ "Shown next to your cursor and in the People list — stored only in this browser.": "Exibido ao lado do seu cursor e na lista de Pessoas — guardado apenas neste navegador.",
+ "Site name": "Nome do site",
"Sort": "Ordenar",
"Space name": "Nome do espaço",
"Start live session": "Iniciar sessão ao vivo",
+ "Start silent": "Começar sem som",
"Stop sharing": "Parar de compartilhar",
+ "Stop widening every page": "Deixar de alargar todas as páginas",
"Stopped sharing": "Partilha terminada",
+ "Strikethrough": "Tachado",
+ "Strikethrough — ⇧⌘S": "Tachado — ⇧⌘S",
"Take it elsewhere": "Levar para outro lado",
+ "Taken from the address if blank": "Se ficar vazio, é retirado do endereço",
+ "Text": "Texto",
+ "Text and background color": "Cor do texto e do plano de fundo",
+ "Text formatting": "Formatação de texto",
"That change is too large to share live (about 1 MB max). It’s saved in your copy, but collaborators won’t see it.": "Essa alteração é grande demais para compartilhar ao vivo (máx. cerca de 1 MB). Ela fica salva na sua cópia, mas os colaboradores não a verão.",
+ "That file could not be read": "Não foi possível ler esse ficheiro",
"That file could not be read as an image": "Não foi possível ler esse ficheiro como imagem",
+ "That file is not a bento/spaces document": "Esse ficheiro não é um documento bento/spaces",
"That image is too large to share live (about 1 MB max). It’s saved in your copy, but collaborators won’t see it.": "Essa imagem é grande demais para compartilhar ao vivo (máx. cerca de 1 MB). Ela fica salva na sua cópia, mas os colaboradores não a verão.",
+ "That is not a bento/spaces document": "Isto não é um documento bento/spaces",
"That is {n} files — importing them all may take a moment. Continue?": "São {n} ficheiros — importar todos pode demorar um momento. Continuar?",
+ "That needs to be an http or https address": "Tem de ser um endereço http ou https",
+ "That space is password-protected. Open it, then export the pages you want.": "Esse espaço está protegido por palavra-passe. Abra-o e exporte de lá as páginas que quiser.",
+ "The counterpart of Copy document JSON: edit a space in another tool, then bring it back.": "O par de Copiar o JSON do documento: edite um espaço noutra ferramenta e traga-o de volta.",
"The day after": "O dia seguinte",
"The day before": "O dia anterior",
"The document block is not shaped like a space — {detail}.": "O bloco do documento não tem a forma de um espaço — {detail}.",
"The document block is not valid JSON — {detail}.": "O bloco do documento não é JSON válido — {detail}.",
+ "The document, the editor and the search are all in this one file. Opening it needs nothing else — no server, no account, no install.": "O documento, o editor e a pesquisa estão todos neste único ficheiro. Abri-lo não precisa de mais nada — nem servidor, nem conta, nem instalação.",
"The images in these notes come to {size} so far, and they all travel inside the file. Keep embedding them?": "As imagens destas notas já somam {size} e viajam todas dentro do ficheiro. Continuar a incorporá-las?",
"The live session couldn’t store that change. It’s saved in your copy, but collaborators won’t see it.": "A sessão ao vivo não conseguiu armazenar essa alteração. Ela fica salva na sua cópia, mas os colaboradores não a verão.",
+ "The next save writes this space as plain, readable JSON — anybody who opens the file can read every page.": "A próxima gravação escreve este espaço como JSON legível — quem abrir o ficheiro consegue ler todas as páginas.",
+ "The page becomes a new file of its own: a whole space, with a new document id and none of this one’s sharing keys.": "A página passa a ser um ficheiro próprio: um espaço completo, com um novo id de documento e sem nenhuma das chaves de partilha deste.",
"The pages without the editing tools": "As páginas sem as ferramentas de edição",
"The rest name notes that were not in the selection, and are left as text.": "Os restantes nomeiam notas que não estavam na seleção e ficam como texto.",
+ "The theme follows whoever opens the file. It is never written into the document.": "O tema segue quem abre o ficheiro. Nunca é escrito no documento.",
"The whole space": "Todo o espaço",
"The whole space, or just this page": "Todo o espaço, ou apenas esta página",
"Then send someone the file": "Depois envia o ficheiro a alguém",
"These windows are on this computer. Start a session to work with someone elsewhere.": "Estas janelas estão neste computador. Inicia uma sessão para trabalhar com alguém noutro lugar.",
+ "This block has no settings of its own — its content is all of it.": "Este bloco não tem definições próprias — o conteúdo é tudo o que há.",
+ "This block’s settings, and the page’s": "As definições deste bloco, e as da página",
"This browser cannot write back to the file, so every save makes a new copy. Chrome and Edge on a computer can save in place.": "Este navegador não consegue escrever de volta no ficheiro, por isso cada vez que guarda cria uma nova cópia. O Chrome e o Edge num computador conseguem guardar no local.",
+ "This clip is {size} and travels inside the file, making it that much bigger for everyone you send it to. Embed it anyway?": "Este clipe tem {size} e viaja dentro do ficheiro, tornando-o maior para todas as pessoas a quem o enviar. Incorporar mesmo assim?",
"This copy goes offline; the others carry on": "Esta cópia fica offline; as outras continuam",
"This file": "Este ficheiro",
+ "This file carries its own app — it works offline, forever, as is.": "Este arquivo carrega o próprio aplicativo — funciona offline, para sempre, do jeito que está.",
"This file could not be opened": "Não foi possível abrir este ficheiro",
"This file declares rules this build does not know. It is open read-only so nothing is lost.": "Este ficheiro declara regras que esta versão não conhece. Está aberto apenas para leitura para que nada se perca.",
"This file is open read-only": "Este ficheiro está aberto apenas para leitura",
@@ -232,19 +420,30 @@ export const pt: Catalog = {
"This image is {size} and travels inside the file, making it that much bigger for everyone you send it to. Embed it anyway?": "Esta imagem tem {size} e viaja dentro do ficheiro, tornando-o maior para todas as pessoas a quem o enviar. Incorporar mesmo assim?",
"This image was resized to keep the file small. Click to replace it with the original.": "Esta imagem foi redimensionada para manter o ficheiro pequeno. Clique para a substituir pela original.",
"This is a reading copy. It opens for reading; nothing you do here changes the file.": "Esta é uma cópia de leitura. Abre para leitura; nada do que fizeres aqui altera o ficheiro.",
+ "This is a view-only copy — it follows the live session but can’t change this space.": "Esta é uma cópia somente para visualização — ela acompanha a sessão ao vivo, mas não pode alterar este Space.",
"This is not a bento/spaces document — {detail}.": "Isto não é um documento bento/spaces — {detail}.",
"This live session has run out of room. Your change is saved in your copy, but collaborators won’t see it.": "Esta sessão ao vivo ficou sem espaço. Sua alteração fica salva na sua cópia, mas os colaboradores não a verão.",
"This page only": "Apenas esta página",
+ "This space has no live session to follow": "Este Space não tem sessão ao vivo para acompanhar",
"This space has no pages.": "Este espaço não tem páginas.",
"This space is encrypted. Saves stay encrypted.": "Este espaço está encriptado. Continua encriptado sempre que guardar.",
"This space is locked": "Este espaço está bloqueado",
+ "This window is still running v{v} — reload to finish. A v{v} backup was downloaded.": "Esta janela ainda está executando a v{v} — recarregue para concluir. Um backup da v{v} foi baixado.",
+ "This window is still running v{v} — reload to finish. A v{v} backup was saved beside this file.": "Esta janela ainda está executando a v{v} — recarregue para concluir. Um backup da v{v} foi salvo ao lado deste arquivo.",
+ "This window is still running v{v}. If you overwrote the file that's open here, reload; otherwise open the file you saved.": "Esta janela ainda está executando a v{v}. Se você sobrescreveu o arquivo aberto aqui, recarregue; caso contrário, abra o arquivo que salvou.",
+ "This window keeps running v{v} until you open the downloaded file.": "Esta janela continua executando a v{v} até você abrir o arquivo baixado.",
"Those files could not be read": "Não foi possível ler esses ficheiros",
"Tip": "Dica",
+ "Title": "Título",
"Today": "Hoje",
"Today's journal": "Diário de hoje",
+ "Tone": "Tom",
"Too many changes at once — live sync is catching up.": "Alterações demais de uma vez — a sincronização ao vivo está se atualizando.",
+ "Top level": "Nível superior",
"Turn into…": "Converter em…",
"Type / for blocks, [[ to link a page": "Escreva / para blocos, [[ para ligar uma página",
+ "Underline": "Sublinhado",
+ "Underline — ⌘U": "Sublinhado — ⌘U",
"Undo (⌘Z)": "Desfazer (⌘Z)",
"Unlock": "Desbloquear",
"Unlocked, but the document inside could not be read.": "Desbloqueado, mas não foi possível ler o documento lá dentro.",
@@ -252,38 +451,82 @@ export const pt: Catalog = {
"Unsaved changes — ⌘S downloads an updated copy": "Alterações não guardadas — ⌘S transfere uma cópia atualizada",
"Unsaved changes — ⌘S rewrites this file": "Alterações não guardadas — ⌘S reescreve este ficheiro",
"Untitled": "Sem título",
+ "Update failed: {m}": "Falha na atualização: {m}",
"Update this file": "Atualizar este ficheiro",
+ "Update this file…": "Atualizar este arquivo…",
+ "Updated to v{v} on disk.": "Atualizado para a v{v} no disco.",
"Updates": "Atualizações",
+ "Use a link…": "Usar uma ligação…",
+ "Use this width for every page": "Usar esta largura em todas as páginas",
+ "Verifies and builds the new version with this document inside, then asks where to save it — pick the file you have open to update it.": "Verifica e monta a nova versão com este documento dentro e depois pergunta onde salvá-la — escolha o arquivo que você tem aberto para atualizá-lo.",
+ "Verifying…": "Verificando…",
"Version {v} is available.": "A versão {v} está disponível.",
"Version, language, password, exports": "Versão, idioma, senha, exportações",
+ "Video": "Vídeo",
+ "Video from {host}": "Vídeo de {host}",
+ "View-only copy — it follows the live session but can’t change this space.": "Cópia somente para visualização — ela acompanha a sessão ao vivo, mas não pode alterar este Space.",
+ "View-only copy — it holds no signing key.": "Cópia somente para visualização — ela não contém chave de assinatura.",
+ "View-only copy…": "Cópia somente para visualização…",
+ "Viewer": "Visualizador",
"Visit bento.page (opens in a new tab)": "Visitar bento.page (abre num novo separador)",
"Warning": "Aviso",
+ "Web address": "Endereço web",
+ "What is in the picture": "O que está na imagem",
+ "What this is": "O que é isto",
+ "What’s new →": "Novidades →",
"Wide": "Largo",
"Width": "Largura",
+ "Width %": "Largura %",
"Width in the text column": "Largura na coluna de texto",
+ "Windows on this computer still sync; turn offline mode off in About to work with someone elsewhere.": "As janelas neste computador continuam sincronizando; desative o modo offline em Sobre para trabalhar com alguém em outro lugar.",
+ "Words": "Palavras",
"Wrong password — try again": "Palavra-passe incorreta — tente novamente",
+ "Yellow": "Amarelo",
"You have the newest version ({v}).": "Já tem a versão mais recente ({v}).",
+ "Your key on THIS device: {fp}. Another device counts as a new person until the owner removes it.": "Sua chave NESTE dispositivo: {fp}. Outro dispositivo conta como uma nova pessoa até que o dono o remova.",
"Your name": "Seu nome",
+ "Your name (shown on comments):": "Seu nome (exibido nos comentários):",
+ "Your name (shown on new comments):": "Seu nome (exibido em novos comentários):",
"archived": "arquivada",
+ "bento/spaces is MIT-licensed and carries no third-party runtime — the full notices travel in this file’s source.": "O bento/spaces tem licença MIT e não inclui qualquer runtime de terceiros — os avisos completos viajam no código-fonte deste ficheiro.",
"bento/spaces {version} · {pages} page(s), {blocks} block(s). The document, the editor and the search are all in this one file.": "bento/spaces {version} · {pages} página(s), {blocks} bloco(s). O documento, o editor e a pesquisa estão todos neste único ficheiro.",
"format v{v}": "formato v{v}",
+ "just now": "agora mesmo",
"none": "nenhuma",
+ "you": "você",
+ "you: {name} ✎": "você: {name} ✎",
+ "{blocks} blocks · {words} words · {links} links in": "{blocks} blocos · {words} palavras · {links} ligações a apontar",
"{i} of {n}": "{i} de {n}",
"{name} joined": "{name} entrou",
"{name} left": "{name} saiu",
+ "{name} was removed": "{name} foi removido",
+ "{n} connected": "{n} conectados",
"{n} duplicate or missing id(s) were repaired so links and pages resolve.": "Foram reparados {n} id(s) duplicados ou em falta para que as ligações e as páginas funcionem.",
+ "{n} embedded image(s) and clip(s) account for {size} of that — {pct}%. Everything else is text.": "{n} imagem(ns) e clipe(s) incorporados representam {size} desse total — {pct}%. O resto é tudo texto.",
"{n} found": "{n} encontradas",
+ "{n} id(s) were renamed because this space already used them, and the links inside the import follow them.": "{n} id foram renomeados porque este espaço já os usava, e as ligações do que foi importado acompanham-nos.",
+ "{n} image(s) came too.": "Vieram também {n} imagem(ns).",
"{n} image(s) could not be opened, so their paths are kept as text. Import again with the image files included.": "{n} imagem(ns) não puderam ser abertas, por isso os caminhos ficam como texto. Importe de novo com os ficheiros de imagem incluídos.",
"{n} image(s) embedded ({size}).": "{n} imagem(ns) incorporada(s) ({size}).",
+ "{n} image(s) go with them; the rest stay here.": "{n} imagem(ns) vão com elas; as restantes ficam aqui.",
"{n} image(s) point at the web. Nothing loads until a reader asks.": "{n} imagem(ns) apontam para a web. Nada é carregado até um leitor pedir.",
"{n} image(s) were left as paths because embedding stopped there.": "{n} imagem(ns) ficaram como caminhos porque a incorporação parou aí.",
+ "{n} link(s) named pages that were not in that file, and are kept as text.": "{n} ligação(ões) nomeavam páginas que não estavam nesse ficheiro e ficam como texto.",
+ "{n} link(s) point outside them and are kept as text naming the page they meant.": "{n} ligação(ões) apontam para fora e ficam como texto que nomeia a página pretendida.",
"{n} link(s) to it will stop working.": "{n} ligação(ões) para ela deixam de funcionar.",
"{n} note name(s) appear more than once, so links naming them all went to the first.": "{n} nome(s) de nota aparecem mais de uma vez, por isso as ligações com esse nome foram todas para a primeira.",
"{n} of {total} wikilink(s) resolved.": "{n} de {total} wikilink(s) resolvidos.",
"{n} page(s) had frontmatter, kept verbatim in a folded block.": "{n} página(s) tinham frontmatter, guardado tal e qual num bloco fechado.",
"{n} page(s) inside it move up a level.": "{n} página(s) dentro dela sobem um nível.",
"{n} pages, in sidebar order, with a contents page": "{n} páginas, pela ordem da barra lateral, com uma página de índice",
+ "{n} table(s) imported, with their column alignment.": "{n} tabela(s) importada(s), com o alinhamento das colunas.",
"{n} table(s) kept as text: there is no table block in this format yet.": "{n} tabela(s) ficaram como texto: este formato ainda não tem bloco de tabela.",
+ "{n} unresolved comment(s)": "{n} comentário(s) não resolvido(s)",
+ "{n}d ago": "há {n}d",
+ "{n}h ago": "há {n}h",
+ "{n}m ago": "há {n}min",
+ "{pages} page(s) and {blocks} block(s) added from that space.": "Adicionadas {pages} página(s) e {blocks} bloco(s) a partir desse espaço.",
"{pages} page(s) and {blocks} block(s) added from {files} file(s).": "{pages} página(s) e {blocks} bloco(s) acrescentados a partir de {files} ficheiro(s).",
+ "{pages} page(s) and {blocks} block(s) will travel.": "Vão viajar {pages} página(s) e {blocks} bloco(s).",
"⌘Z removes the imported pages again.": "⌘Z remove novamente as páginas importadas.",
}
diff --git a/spaces/src/i18n/zh-Hans.ts b/spaces/src/i18n/zh-Hans.ts
index 7d1f7638..d6167fc8 100644
--- a/spaces/src/i18n/zh-Hans.ts
+++ b/spaces/src/i18n/zh-Hans.ts
@@ -13,73 +13,149 @@ import type { Catalog } from '../i18n'
export const zh_Hans: Catalog = {
"A filter here is newer than this build and was not applied.": "此视图中有比当前版本更新的筛选条件,未被应用。",
"A folder of .md files becomes pages, with the folder tree and the [[wikilinks]] intact.": "一个装满 .md 文件的文件夹会变成页面,文件夹层级和 [[wiki 链接]] 都保留下来。",
+ "A link with nothing in it yet": "还没有内容的链接",
"A list of every page, in order": "按顺序列出的所有页面",
+ "A live viewer: follows every edit as it happens but can never change this space — the relay enforces it.": "实时查看副本:实时跟随每次编辑,但永远无法修改此 Space — 由中继强制执行。",
"A page cannot contain itself": "页面不能包含自身",
"A password encrypts the document inside the file. There is no recovery — lose it and the space is gone.": "密码会加密文件内的文档。没有任何找回方式 — 密码丢了,空间就没了。",
"A second file — the original is left alone": "另存一个新文件 — 原文件不动",
"A sort here is newer than this build and was not applied.": "此视图中有比当前版本更新的排序方式,未被应用。",
"A space is never a dead end: the whole document is plain JSON in this file, and every page exports as Markdown.": "空间绝不是死胡同:整个文档就是这个文件里的纯 JSON,每个页面都能导出为 Markdown。",
"A space needs at least one page": "空间至少要有一个页面",
+ "A still frame, shown before play — and what a printout or a file preview shows": "播放前显示的静帧 — 打印和文件预览中显示的也是它",
"About bento/spaces — version, updates, language, password": "关于 bento/spaces — 版本、更新、语言、密码",
"About this space": "关于此空间",
+ "Access reset — only copies saved from now on can join": "访问已重置 — 只有此后保存的副本才能加入",
"Add a block below": "在下方添加块",
+ "Add a column after": "在右侧添加一列",
+ "Add a link": "添加链接",
+ "Add a picture": "添加图片",
+ "Add a row below": "在下方添加一行",
"Add below": "在下方添加",
+ "Add pages under": "将页面添加到",
+ "Address of a video or audio file": "视频或音频文件的地址",
"Adds status, priority, assignee, estimate": "添加状态、优先级、负责人和估算",
+ "All text. Nothing is embedded, so this file is as small as a space gets.": "全是文字。没有嵌入任何内容,所以这个文件已是空间能达到的最小体积。",
"Already an issue": "已经是事项",
"Also open in another window on this computer — not shared online": "本机的另一个窗口中也已打开 — 未在线共享",
+ "Alt text": "替代文本",
+ "An update check is the only network this app makes on its own. It asks the release server for a signed manifest and sends nothing about you or this document — no ids, no telemetry.": "检查更新是这个应用唯一会自行发起的网络请求。它只向发布服务器索取一份已签名的清单,不发送任何关于你或这份文档的信息——没有标识符,没有遥测。",
+ "Another bento/spaces file arrives as pages under the one you choose — its images come too, and the links inside it keep working.": "另一个 bento/spaces 文件会作为页面加入到你选择的页面之下——图片一并带入,其内部的链接照常可用。",
+ "Another bento/spaces file can arrive the same way, nested under any page.": "另一个 bento/spaces 文件也能以同样的方式,嵌入到任意页面之下。",
+ "Appearance": "外观",
+ "Apply": "应用",
"Archive": "归档",
+ "Archived": "已归档",
"Archived ({n})": "已归档 ({n})",
"Ascending": "升序",
+ "Audio": "音频",
+ "Audio from {host}": "来自 {host} 的音频",
+ "Back": "返回",
+ "Background": "背景",
+ "Block": "块",
"Block options": "块选项",
+ "Blocks": "块",
+ "Blue": "蓝色",
"Board": "看板",
+ "Bold": "粗体",
+ "Bold — ⌘B": "粗体 — ⌘B",
"Breadcrumb": "面包屑导航",
"Bring notes in": "把笔记带进来",
+ "Brown": "棕色",
"Callout icon": "标注图标",
+ "Cancel": "取消",
+ "Careful": "请谨慎",
"Caution": "当心",
+ "Change password…": "更改密码…",
"Change the kind of callout": "更改标注类型",
+ "Change the name used for your new comments and replies": "更改新评论和回复所用的名字",
"Change this block’s type": "更改此块的类型",
"Change this page's icon": "更改此页面的图标",
"Change {field}": "更改{field}",
"Check for updates": "检查更新",
+ "Check for updates automatically at launch": "启动时自动检查更新",
+ "Checked automatically at launch — you're on the latest version (v{v}).": "已在启动时自动检查 — 您已是最新版本 (v{v})。",
"Checking is manual and verified: the download is signed, and its signature is checked against a key inside this file before anything is rewritten.": "检查更新完全由你手动发起,并且经过验证:下载内容带有签名,改写任何内容之前,都会先用此文件内的密钥校验签名。",
"Checking…": "检查中…",
"Choose .md files…": "选择 .md 文件…",
+ "Choose a different file": "选择另一个文件",
+ "Choose a file…": "选择文件…",
"Choose a folder…": "选择文件夹…",
"Choose a password. There is no way to recover it.": "设置一个密码。它无法找回。",
+ "Choose a space…": "选择一个空间…",
"Choose the field the columns come from": "选择用作分栏的字段",
"Choose the order": "选择排序方式",
"Clear filter": "清除筛选",
+ "Clear formatting": "清除格式",
+ "Clip added ({size})": "已添加片段 ({size})",
"Close": "关闭",
+ "Code": "代码",
"Collapsed toggles always print open. Your browser's print dialog has the \"Save as PDF\" option.": "折叠起来的折叠块打印时一律展开。浏览器的打印对话框里有“存为 PDF”选项。",
+ "Color": "颜色",
"Column": "单栏",
+ "Columns": "列",
"Comfortable for reading": "适合阅读的宽度",
+ "Comment": "评论",
+ "Comment on this page": "评论此页面",
+ "Comment · block": "评论 · 块",
+ "Comment · page": "评论 · 页面",
+ "Comment:": "评论:",
+ "Connect to the live session without saving a new copy — copies you sent earlier will meet you there.": "无需保存新副本即可连接实时会话 — 之前发送的副本会在这里与你会合。",
+ "Connecting…": "连接中…",
"Contents": "目录",
"Contents page": "目录页",
+ "Controls": "控件",
+ "Copied ✓": "已复制 ✓",
"Copy document JSON": "复制文档 JSON",
"Copy saved": "副本已保存",
"Copy saved — you are still editing the original": "副本已保存 — 你仍在编辑原文件",
"Copy the document JSON": "复制此文档的 JSON",
"Could not reach the update channel.": "无法连接更新通道。",
"Could not verify an update, so nothing was changed.": "无法验证更新,因此未做任何改动。",
+ "Couldn’t access the clipboard": "无法访问剪贴板",
+ "Couldn’t reach the live session": "无法连接实时会话",
"Create “{name}”": "创建“{name}”",
+ "Dark": "深色",
+ "Default": "默认",
"Delete": "删除",
"Delete “{name}”?": "要删除“{name}”吗?",
"Delete…": "删除…",
"Descending": "降序",
+ "Description": "描述",
"Discard": "放弃",
+ "Document": "文档",
+ "Document JSON copied": "已复制文档 JSON",
+ "Document id": "文档 ID",
+ "Document properties": "文档属性",
+ "Document replaced — ⌘Z undoes": "文档已替换 — ⌘Z 可撤销",
+ "Download updated copy": "下载更新副本",
+ "Downloaded ✓": "已下载 ✓",
"Downloaded. Open the new file — this one is unchanged.": "已下载。请打开新文件 — 当前文件未改动。",
+ "Downloads a backup of the current version, then rewrites this file on disk as the new version — document untouched.": "先下载当前版本的备份,然后将此文件改写为新版本 — 文档内容不变。",
"Drag to move, click for block options": "拖动可移动,点击打开块选项",
+ "Drag to resize this column": "拖动以调整此列宽度",
"Drag to resize · double-click to reset": "拖动可调整宽度 · 双击恢复默认",
"Drop .md files or a folder here": "把 .md 文件或文件夹拖到这里",
"Duplicate": "创建副本",
+ "Duplicate as a new space…": "复制为新空间…",
"Each .md file becomes a page, folders become the page tree, and [[wikilinks]] become real links. Pages are added — nothing here is replaced.": "每个 .md 文件变成一个页面,文件夹变成页面树,[[wiki 链接]] 变成真正的链接。页面是新增的——已有内容不会被替换。",
+ "Edit": "编辑",
+ "Edit this link card": "编辑此链接卡片",
"Edited": "已编辑",
"Editing": "编辑中",
+ "Editor": "编辑者",
+ "Editor copy saved — recipients join live with edit access": "编辑者副本已保存 — 收到的人可带编辑权限加入实时会话",
"Encrypt the document inside this file": "加密此文件内的文档",
"Enter the password to open it.": "输入密码以打开。",
+ "Every page opens wide on this screen from now on": "在此屏幕上,之后所有页面都会以加宽方式打开",
"Every page, as one .md file": "所有页面合并为一个 .md 文件",
+ "Everything in this space is replaced by what you paste. ⌘Z undoes it, but only while this window stays open.": "这个空间里的所有内容都会被你粘贴的内容替换。⌘Z 可以撤销,但仅限于这个窗口保持打开时。",
+ "Export": "导出",
+ "Export a page as a space": "将页面导出为空间",
"Export as Markdown": "导出为 Markdown",
"Export as Markdown…": "导出为 Markdown…",
+ "Export page as a space…": "将页面导出为空间…",
+ "Exported {n} page(s) as a new space": "已将 {n} 个页面导出为新的空间",
"File": "文件",
"Fills the window": "铺满整个窗口",
"Filter": "筛选",
@@ -87,10 +163,17 @@ export const zh_Hans: Catalog = {
"Find": "查找",
"Find in this space…": "在此空间中查找…",
"Find or create a page…": "查找或新建页面…",
+ "Following — view only": "跟随中 — 仅供查看",
"Full width": "全宽",
+ "Gray": "灰色",
+ "Green": "绿色",
"Group": "分组",
"Guest": "访客",
+ "Header row": "表头行",
+ "Hide properties (])": "隐藏属性面板(])",
"Hide the page list ([)": "隐藏页面列表([)",
+ "Highlight": "高亮",
+ "Highlight — ⇧⌘H": "高亮 — ⇧⌘H",
"Icon": "图标",
"Image added ({size})": "已添加图片 ({size})",
"Image added, resized to fit ({from} → {to})": "已添加图片,已缩放以适配 ({from} → {to})",
@@ -101,35 +184,60 @@ export const zh_Hans: Catalog = {
"Import Markdown…": "导入 Markdown…",
"Important": "重要",
"Imported": "已导入",
+ "Imported a space": "已导入一个空间",
"Imported notes": "导入的笔记",
"Include archived pages": "包含已归档页面",
"Include the image files and they are embedded too. An image this browser cannot open is kept as its path rather than as a broken picture.": "把图片文件一起选上,它们也会被嵌入。这个浏览器打不开的图片会以路径的形式保留,而不是一张坏掉的图。",
+ "Include the pages nested under it": "包含其下级页面",
+ "Inline code — ⌘E": "行内代码 — ⌘E",
"Insert": "插入",
"Insert a block — text, headings, lists, code, images": "插入块 — 文本、标题、列表、代码、图片",
"Interface language": "界面语言",
+ "Interface theme": "界面主题",
"Invite someone…": "邀请他人…",
+ "Invite to edit…": "邀请编辑…",
"Issues": "事项",
+ "Italic": "斜体",
+ "Italic — ⌘I": "斜体 — ⌘I",
+ "Journal date": "日志日期",
+ "Key-verified identity": "密钥验证的身份",
"Language": "语言",
"Language follows whoever opens the file. It is never written into the document.": "语言跟随打开文件的人,绝不会写入文档。",
"Language — what this block is highlighted as": "语言 — 这个块按什么语言着色",
+ "Last saved": "上次保存",
+ "Launch check couldn't reach the release server ({m}). Check manually below.": "启动检查无法连接发布服务器 ({m})。请在下方手动检查。",
"Leave it empty to use the tone mark": "留空则使用该类型的标记",
+ "Light": "浅色",
+ "Link": "链接",
+ "Link address": "链接地址",
+ "Link card": "链接卡片",
"Link to page": "链接到页面",
+ "Link — ⌘K": "链接 — ⌘K",
+ "Linked": "链接",
"Linked from": "链接来源",
"Links to it become dead": "指向它的链接会失效",
"List": "列表",
+ "Live": "已连接",
"Live — nobody else is here yet": "实时协作中 — 还没有其他人",
"Live — send someone the file to bring them in": "实时协作中 — 把文件发给别人即可加入",
"Live — {n} other people are here": "实时协作中 — 还有 {n} 人在此",
+ "Load this audio": "加载此音频",
"Load this image": "加载此图片",
+ "Load this video": "加载此视频",
+ "Loop": "循环",
"Make this page an issue": "将此页面变为事项",
"Manual order": "手动排序",
+ "Match my system": "跟随系统",
+ "Mints brand-new keys. Every previously sent copy stops syncing for good; share fresh copies afterwards.": "铸造全新密钥。之前发送的所有副本将永久停止同步;此后请分享新副本。",
"More": "更多",
"Move down": "下移",
"Move up": "上移",
+ "Muted": "静音",
"New issue": "新建事项",
"New page": "新建页面",
"New page (⌘⌥N)": "新建页面 (⌘⌥N)",
"New page inside": "在其中新建页面",
+ "New to Bento? Find templates, the gallery and the AI editing guide at {home} — or ⭐ it on {gh}.": "第一次用 Bento?在 {home} 查看模板、图库和 AI 编辑指南 — 也欢迎到 {gh} 点 ⭐。",
"Next (⏎)": "下一个 (⏎)",
"No Markdown files in that selection": "所选内容里没有 Markdown 文件",
"No block matches": "没有匹配的块",
@@ -138,51 +246,104 @@ export const zh_Hans: Catalog = {
"No issues yet. Add a status field to any page and it appears here.": "还没有事项。给任意页面添加状态字段,它就会出现在这里。",
"No pages yet": "还没有页面",
"Nobody else is here yet": "还没有其他人",
+ "Not in this file: it needs the network, and the site is told when someone opens the page": "不在此文件内:播放需要联网,而且该网站会知道有人打开了这个页面",
+ "Not live — turns on when you share": "未上线 — 分享时自动开启",
"Not loaded — opening it would tell that site you opened this space.": "未加载 — 加载会让该网站知道你打开了这个空间。",
"Not sharing yet — click to start a live session": "尚未共享 — 点击开始实时协作",
"Note": "备注",
"Nothing found": "没有结果",
+ "Nothing is fetched. A card shows what you type here — opening this space never contacts the site.": "不会抓取任何内容。卡片显示的就是你在这里输入的内容——打开这个空间绝不会联系该网站。",
"Nothing leaves this file until you start a session.": "在你开始会话之前,没有任何内容离开这个文件。",
"Now an issue": "现在是事项了",
"Off by default — they were archived for a reason": "默认关闭 — 当初归档总是有原因的",
+ "Offline mode is on — nothing leaves this computer.": "离线模式已开启 — 任何数据都不会离开这台电脑。",
+ "On this screen only — it is not saved in the file": "仅在此屏幕上生效,不会保存到文件中",
+ "One emoji": "一个表情符号",
+ "One fewer": "减少一个",
+ "One line about what is there": "用一行说明那里有什么",
+ "One more": "增加一个",
+ "One page and what is under it, as its own file": "一个页面及其下级页面,成为独立文件",
+ "Only pages that ask for it": "仅限指定了宽度的页面",
+ "Only the owner of this space can invite people": "只有此 Space 的所有者才能邀请他人",
"Open only": "仅未完成",
+ "Orange": "橙色",
"Other": "其他",
"Other ways to save": "其他保存方式",
"Out of the sidebar, still searchable and linkable": "移出侧边栏,仍可搜索和链接",
+ "Owner": "所有者",
+ "Page": "页面",
"Page options": "页面选项",
"Pages": "页面",
+ "Pages open at their normal width again": "页面已恢复为正常宽度",
"Pages — show or hide the page list": "页面 — 显示或隐藏页面列表",
"Password": "密码",
"Password removed. Save to write the space unencrypted.": "已移除密码。保存后空间将以未加密方式写入。",
"Password set. Save to write the space encrypted.": "已设置密码。保存后空间将以加密方式写入。",
"Password…": "密码…",
+ "Paste document JSON here…": "在此粘贴文档 JSON…",
+ "Paste or type a link": "粘贴或输入链接",
"People in this space": "此空间中的人",
+ "Picture": "图片",
+ "Picture…": "图片…",
+ "Pink": "粉色",
"Plain text": "纯文本",
+ "Poster": "封面图",
+ "Poster…": "封面图…",
"Previous (⇧⏎)": "上一个 (⇧⏎)",
"Print": "打印",
"Print / PDF…": "打印 / PDF…",
"Print or save as PDF": "打印或存为 PDF",
"Print or save as PDF (⌘P)": "打印或存为 PDF (⌘P)",
"Print…": "打印…",
+ "Properties": "属性",
+ "Properties — show or hide this block’s settings": "属性 — 显示或隐藏这个块的设置",
+ "Purple": "紫色",
+ "Put the caret in a block to see what it can be.": "把光标放进一个块,就能看到它能改什么。",
+ "Read the release notes for v{v} (opens in a new tab)": "查看 v{v} 的发行说明(在新标签页中打开)",
+ "Read-only copy saved — it follows the live session, view only": "只读副本已保存——它跟随实时会话,仅供查看",
+ "Reading file…": "正在读取文件…",
"Reading image…": "正在读取图片…",
"Reading view": "阅读视图",
"Reading view — press Esc or the eye to edit": "阅读视图 — 按 Esc 或点击眼睛图标即可编辑",
"Reading view — the pages without the editing tools": "阅读视图 — 只有页面,没有编辑工具",
"Reading {n} file(s)…": "正在读取 {n} 个文件…",
+ "Red": "红色",
"Redo": "重做",
"Redo (⇧⌘Z)": "重做 (⇧⌘Z)",
+ "Reload into new version": "重新加载进入新版本",
+ "Remove": "移除",
"Remove password…": "移除密码…",
+ "Remove the password": "移除密码",
+ "Remove the password?": "要移除密码吗?",
"Remove the password? The next save writes the document in the clear.": "要移除密码吗?下次保存会以明文写入文档。",
+ "Remove the picture": "移除图片",
+ "Remove this column": "删除此列",
+ "Remove this row": "删除此行",
+ "Remove {name} from this space? Their copy drops to read-only.": "要将 {name} 从此 Space 移除吗?对方的副本将变为只读。",
+ "Remove {name} — revokes this device’s access; everyone else is unaffected": "移除 {name} — 撤销该设备的访问权限;其他人不受影响",
"Rename": "重命名",
+ "Reopen": "重新打开",
+ "Repeat when it reaches the end": "播放到结尾后重新开始",
+ "Replace": "替换",
"Replace all": "全部替换",
+ "Replace every page from pasted JSON?": "用粘贴的 JSON 替换所有页面吗?",
+ "Replace from JSON…": "从 JSON 替换…",
+ "Replace picture": "替换图片",
"Replace with": "替换为",
"Replace with…": "替换为…",
"Replace {n} occurrence(s) across the whole space?": "要在整个空间中替换 {n} 处吗?",
"Replaced": "已替换",
+ "Replace…": "替换…",
+ "Reply": "回复",
+ "Reply…": "回复…",
+ "Reset access? Every copy you’ve sent stops syncing; only copies saved after this can join.": "重置访问权限?已发送的所有副本将停止同步;只有此后保存的副本才能加入。",
+ "Reset access…": "重置访问权限…",
"Resized": "已缩放",
+ "Resolve": "解决",
"Restore": "恢复",
"Restore to the page list": "恢复到页面列表",
"Room for a board or a table": "给看板或表格留出空间",
+ "Rows": "行",
"Save": "保存",
"Save (⌘S)": "保存 (⌘S)",
"Save a copy…": "保存副本…",
@@ -190,6 +351,7 @@ export const zh_Hans: Catalog = {
"Saved": "已保存",
"Saved a new copy": "已保存新副本",
"Saves a copy that joins this session": "保存一个会加入此会话的副本",
+ "Saves a copy to send. Whoever opens it edits this space live with you (end-to-end encrypted); you stay the owner and can remove them from the People list.": "保存一份用于发送的副本。打开的人可与你实时共同编辑此 Space(端到端加密);你仍是所有者,可随时从成员列表中移除他们。",
"Saving…": "保存中…",
"Search": "搜索",
"Search all pages (⌘K)": "搜索所有页面 (⌘K)",
@@ -199,32 +361,58 @@ export const zh_Hans: Catalog = {
"Share this space": "共享此空间",
"Show as a board": "以看板显示",
"Show as a list": "以列表显示",
+ "Show playback controls to the reader": "向读者显示播放控件",
+ "Show properties (])": "显示属性面板(])",
"Show the page list ([)": "显示页面列表([)",
+ "Shown next to your cursor and in the People list — stored only in this browser.": "显示在你的光标旁和成员列表中 — 仅保存在此浏览器。",
+ "Site name": "网站名称",
"Sort": "排序",
"Space name": "空间名称",
"Start live session": "开始实时会话",
+ "Start silent": "开始时静音",
"Stop sharing": "停止共享",
+ "Stop widening every page": "不再加宽所有页面",
"Stopped sharing": "已停止共享",
+ "Strikethrough": "删除线",
+ "Strikethrough — ⇧⌘S": "删除线 — ⇧⌘S",
"Take it elsewhere": "把内容带走",
+ "Taken from the address if blank": "留空则取自网址",
+ "Text": "文本",
+ "Text and background color": "文字与背景颜色",
+ "Text formatting": "文字格式",
"That change is too large to share live (about 1 MB max). It’s saved in your copy, but collaborators won’t see it.": "该更改过大,无法实时共享(上限约 1 MB)。它已保存在你的副本中,但协作者不会看到。",
+ "That file could not be read": "无法读取该文件",
"That file could not be read as an image": "无法将该文件作为图片读取",
+ "That file is not a bento/spaces document": "该文件不是 bento/spaces 文档",
"That image is too large to share live (about 1 MB max). It’s saved in your copy, but collaborators won’t see it.": "该图片过大,无法实时共享(上限约 1 MB)。它已保存在你的副本中,但协作者不会看到。",
+ "That is not a bento/spaces document": "这不是 bento/spaces 文档",
"That is {n} files — importing them all may take a moment. Continue?": "一共 {n} 个文件,全部导入需要一点时间。继续吗?",
+ "That needs to be an http or https address": "这里需要填写 http 或 https 地址",
+ "That space is password-protected. Open it, then export the pages you want.": "该空间受密码保护。请先打开它,再导出你需要的页面。",
+ "The counterpart of Copy document JSON: edit a space in another tool, then bring it back.": "“复制文档 JSON”的对应功能:在别的工具里编辑一个空间,再把它带回来。",
"The day after": "后一天",
"The day before": "前一天",
"The document block is not shaped like a space — {detail}.": "文档数据块的结构不像一个空间 — {detail}。",
"The document block is not valid JSON — {detail}.": "文档数据块不是有效的 JSON — {detail}。",
+ "The document, the editor and the search are all in this one file. Opening it needs nothing else — no server, no account, no install.": "文档、编辑器和搜索都在这一个文件里。打开它不需要别的东西——不需要服务器、账号或安装。",
"The images in these notes come to {size} so far, and they all travel inside the file. Keep embedding them?": "这些笔记里的图片已经有 {size},而且都会随文件一起走。继续嵌入吗?",
"The live session couldn’t store that change. It’s saved in your copy, but collaborators won’t see it.": "实时会话无法保存该更改。它已保存在你的副本中,但协作者不会看到。",
+ "The next save writes this space as plain, readable JSON — anybody who opens the file can read every page.": "下一次保存会把这个空间写成可直接阅读的 JSON——任何打开这个文件的人都能读到每一页。",
+ "The page becomes a new file of its own: a whole space, with a new document id and none of this one’s sharing keys.": "该页面会成为一个独立的新文件:一个完整的空间,拥有新的文档 ID,且不带本空间的任何共享密钥。",
"The pages without the editing tools": "不带编辑工具的页面",
"The rest name notes that were not in the selection, and are left as text.": "其余指向不在所选范围内的笔记,保留为文字。",
+ "The theme follows whoever opens the file. It is never written into the document.": "主题跟随打开文件的人,绝不会写入文档。",
"The whole space": "整个空间",
"The whole space, or just this page": "整个空间,或仅这一页",
"Then send someone the file": "然后把文件发给对方",
"These windows are on this computer. Start a session to work with someone elsewhere.": "这些窗口都在本机。若要与其他地方的人协作,请开始一个会话。",
+ "This block has no settings of its own — its content is all of it.": "这个块没有自己的设置 — 内容就是它的全部。",
+ "This block’s settings, and the page’s": "这个块的设置,还有页面的设置",
"This browser cannot write back to the file, so every save makes a new copy. Chrome and Edge on a computer can save in place.": "此浏览器无法写回原文件,因此每次保存都会生成新副本。电脑上的 Chrome 和 Edge 可以就地保存。",
+ "This clip is {size} and travels inside the file, making it that much bigger for everyone you send it to. Embed it anyway?": "这个片段有 {size},会嵌在文件内部,你发给谁,文件对谁就大出这么多。仍要嵌入吗?",
"This copy goes offline; the others carry on": "此副本将离线;其他人继续协作",
"This file": "此文件",
+ "This file carries its own app — it works offline, forever, as is.": "此文件自带应用 — 离线可用,永久如此。",
"This file could not be opened": "无法打开此文件",
"This file declares rules this build does not know. It is open read-only so nothing is lost.": "此文件声明了此版本不认识的规则。已以只读方式打开,以免丢失任何内容。",
"This file is open read-only": "这个文件以只读方式打开",
@@ -232,19 +420,30 @@ export const zh_Hans: Catalog = {
"This image is {size} and travels inside the file, making it that much bigger for everyone you send it to. Embed it anyway?": "这张图片有 {size},会嵌在文件内部,你发给谁,文件对谁就大出这么多。仍要嵌入吗?",
"This image was resized to keep the file small. Click to replace it with the original.": "为了让文件保持小巧,这张图片已被缩放。点击可换回原图。",
"This is a reading copy. It opens for reading; nothing you do here changes the file.": "这是一份阅读副本。它以阅读方式打开;你在此处的操作不会更改文件。",
+ "This is a view-only copy — it follows the live session but can’t change this space.": "这是只读副本 — 会跟随实时会话,但无法修改此 Space。",
"This is not a bento/spaces document — {detail}.": "这不是 bento/spaces 文档 — {detail}。",
"This live session has run out of room. Your change is saved in your copy, but collaborators won’t see it.": "此实时会话空间已满。你的更改已保存在你的副本中,但协作者不会看到。",
"This page only": "仅此页面",
+ "This space has no live session to follow": "此 Space 没有可跟随的实时会话",
"This space has no pages.": "此空间没有页面。",
"This space is encrypted. Saves stay encrypted.": "此空间已加密。保存时仍保持加密。",
"This space is locked": "此空间已锁定",
+ "This window is still running v{v} — reload to finish. A v{v} backup was downloaded.": "此窗口仍在运行 v{v} — 重新加载以完成。已下载 v{v} 备份。",
+ "This window is still running v{v} — reload to finish. A v{v} backup was saved beside this file.": "此窗口仍在运行 v{v} — 重新加载以完成。已在此文件旁保存 v{v} 备份。",
+ "This window is still running v{v}. If you overwrote the file that's open here, reload; otherwise open the file you saved.": "此窗口仍在运行 v{v}。若覆盖了当前打开的文件请重新加载;否则请打开您保存的文件。",
+ "This window keeps running v{v} until you open the downloaded file.": "在打开下载的文件之前,此窗口将继续运行 v{v}。",
"Those files could not be read": "这些文件无法读取",
"Tip": "提示",
+ "Title": "标题",
"Today": "今天",
"Today's journal": "今天的日志",
+ "Tone": "语气",
"Too many changes at once — live sync is catching up.": "更改过多 — 实时同步正在追赶。",
+ "Top level": "顶层",
"Turn into…": "转换为…",
"Type / for blocks, [[ to link a page": "输入 / 插入块,[[ 链接页面",
+ "Underline": "下划线",
+ "Underline — ⌘U": "下划线 — ⌘U",
"Undo (⌘Z)": "撤销 (⌘Z)",
"Unlock": "解锁",
"Unlocked, but the document inside could not be read.": "已解锁,但无法读取其中的文档。",
@@ -252,38 +451,82 @@ export const zh_Hans: Catalog = {
"Unsaved changes — ⌘S downloads an updated copy": "未保存的更改 — ⌘S 会下载更新后的副本",
"Unsaved changes — ⌘S rewrites this file": "未保存的更改 — ⌘S 会重写此文件",
"Untitled": "未命名",
+ "Update failed: {m}": "更新失败:{m}",
"Update this file": "更新此文件",
+ "Update this file…": "更新此文件…",
+ "Updated to v{v} on disk.": "已在磁盘上更新到 v{v}。",
"Updates": "更新",
+ "Use a link…": "使用链接…",
+ "Use this width for every page": "将此宽度用于所有页面",
+ "Verifies and builds the new version with this document inside, then asks where to save it — pick the file you have open to update it.": "验证并生成包含此文档的新版本,然后询问保存位置 — 选择当前打开的文件即可更新。",
+ "Verifying…": "验证中…",
"Version {v} is available.": "版本 {v} 可用。",
"Version, language, password, exports": "版本、语言、密码、导出",
+ "Video": "视频",
+ "Video from {host}": "来自 {host} 的视频",
+ "View-only copy — it follows the live session but can’t change this space.": "只读副本 — 会跟随实时会话,但无法修改此 Space。",
+ "View-only copy — it holds no signing key.": "只读副本 — 不持有签名密钥。",
+ "View-only copy…": "只读副本…",
+ "Viewer": "查看者",
"Visit bento.page (opens in a new tab)": "访问 bento.page(在新标签页打开)",
"Warning": "警告",
+ "Web address": "网址",
+ "What is in the picture": "图片里是什么",
+ "What this is": "这是什么",
+ "What’s new →": "更新内容 →",
"Wide": "加宽",
"Width": "宽度",
+ "Width %": "宽度 %",
"Width in the text column": "在正文栏中的宽度",
+ "Windows on this computer still sync; turn offline mode off in About to work with someone elsewhere.": "本机的窗口仍会同步;要与其他地方的人协作,请在“关于”中关闭离线模式。",
+ "Words": "字数",
"Wrong password — try again": "密码错误 — 请重试",
+ "Yellow": "黄色",
"You have the newest version ({v}).": "你已是最新版本 ({v})。",
+ "Your key on THIS device: {fp}. Another device counts as a new person until the owner removes it.": "你在此设备上的密钥:{fp}。其他设备会被视为新成员,直到所有者将其移除。",
"Your name": "你的名字",
+ "Your name (shown on comments):": "您的名字(显示在评论中):",
+ "Your name (shown on new comments):": "您的名字(显示在新评论中):",
"archived": "已归档",
+ "bento/spaces is MIT-licensed and carries no third-party runtime — the full notices travel in this file’s source.": "bento/spaces 采用 MIT 许可,且不含任何第三方运行时——完整声明就在这个文件的源码里。",
"bento/spaces {version} · {pages} page(s), {blocks} block(s). The document, the editor and the search are all in this one file.": "bento/spaces {version} · {pages} 个页面,{blocks} 个块。文档、编辑器和搜索全都在这一个文件里。",
"format v{v}": "格式 v{v}",
+ "just now": "刚刚",
"none": "无",
+ "you": "你",
+ "you: {name} ✎": "你:{name} ✎",
+ "{blocks} blocks · {words} words · {links} links in": "{blocks} 个块 · {words} 个词 · {links} 个入链",
"{i} of {n}": "第 {i} 个,共 {n} 个",
"{name} joined": "{name} 已加入",
"{name} left": "{name} 已离开",
+ "{name} was removed": "已移除 {name}",
+ "{n} connected": "{n} 人已连接",
"{n} duplicate or missing id(s) were repaired so links and pages resolve.": "已修复 {n} 个重复或缺失的 id,链接和页面现在都能正常解析。",
+ "{n} embedded image(s) and clip(s) account for {size} of that — {pct}%. Everything else is text.": "其中 {n} 个嵌入的图片和片段占了 {size},也就是 {pct}%。其余全是文字。",
"{n} found": "找到 {n} 个",
+ "{n} id(s) were renamed because this space already used them, and the links inside the import follow them.": "有 {n} 个 id 因本空间已在使用而被改名,导入内容中的链接也随之更新。",
+ "{n} image(s) came too.": "另有 {n} 张图片一并导入。",
"{n} image(s) could not be opened, so their paths are kept as text. Import again with the image files included.": "{n} 张图片打不开,它们的路径以文字保留。请把图片文件一并选上再导入一次。",
"{n} image(s) embedded ({size}).": "已嵌入 {n} 张图片({size})。",
+ "{n} image(s) go with them; the rest stay here.": "{n} 张图片会一起带走,其余留在这里。",
"{n} image(s) point at the web. Nothing loads until a reader asks.": "{n} 张图片指向网络。在读者主动请求之前不会加载。",
"{n} image(s) were left as paths because embedding stopped there.": "{n} 张图片以路径形式保留,因为嵌入到此为止。",
+ "{n} link(s) named pages that were not in that file, and are kept as text.": "有 {n} 个链接指向该文件中不存在的页面,已保留为文字。",
+ "{n} link(s) point outside them and are kept as text naming the page they meant.": "有 {n} 个链接指向其外部,将保留为写明原目标页面的文字。",
"{n} link(s) to it will stop working.": "指向它的 {n} 个链接会失效。",
"{n} note name(s) appear more than once, so links naming them all went to the first.": "有 {n} 个笔记名称重复,因此指向该名称的链接都指向了第一个。",
"{n} of {total} wikilink(s) resolved.": "{total} 个 wiki 链接中解析了 {n} 个。",
"{n} page(s) had frontmatter, kept verbatim in a folded block.": "{n} 个页面带有 frontmatter,已原样保存在折叠块里。",
"{n} page(s) inside it move up a level.": "其中的 {n} 个页面会上移一级。",
"{n} pages, in sidebar order, with a contents page": "{n} 个页面,按侧边栏顺序,并附一个目录页",
+ "{n} table(s) imported, with their column alignment.": "已导入 {n} 个表格,并保留列对齐方式。",
"{n} table(s) kept as text: there is no table block in this format yet.": "{n} 个表格按原文保留为文字:这个格式还没有表格块。",
+ "{n} unresolved comment(s)": "{n} 条未解决的评论",
+ "{n}d ago": "{n} 天前",
+ "{n}h ago": "{n} 小时前",
+ "{n}m ago": "{n} 分钟前",
+ "{pages} page(s) and {blocks} block(s) added from that space.": "已从该空间添加 {pages} 个页面、{blocks} 个块。",
"{pages} page(s) and {blocks} block(s) added from {files} file(s).": "从 {files} 个文件新增了 {pages} 个页面、{blocks} 个块。",
+ "{pages} page(s) and {blocks} block(s) will travel.": "将带走 {pages} 个页面、{blocks} 个块。",
"⌘Z removes the imported pages again.": "按 ⌘Z 可以把导入的页面再撤销掉。",
}
diff --git a/spaces/src/i18n/zh-Hant.ts b/spaces/src/i18n/zh-Hant.ts
index 599d5f48..1d41f449 100644
--- a/spaces/src/i18n/zh-Hant.ts
+++ b/spaces/src/i18n/zh-Hant.ts
@@ -13,73 +13,149 @@ import type { Catalog } from '../i18n'
export const zh_Hant: Catalog = {
"A filter here is newer than this build and was not applied.": "此檢視中有比目前版本更新的篩選條件,未被套用。",
"A folder of .md files becomes pages, with the folder tree and the [[wikilinks]] intact.": "一個裝滿 .md 檔案的資料夾會變成頁面,資料夾層級和 [[wiki 連結]] 都會保留。",
+ "A link with nothing in it yet": "還沒有內容的連結",
"A list of every page, in order": "依順序列出每一個頁面",
+ "A live viewer: follows every edit as it happens but can never change this space — the relay enforces it.": "即時檢視副本:即時跟隨每次編輯,但永遠無法修改此 Space — 由中繼強制執行。",
"A page cannot contain itself": "頁面不能包含自己",
"A password encrypts the document inside the file. There is no recovery — lose it and the space is gone.": "密碼會加密檔案內的文件。沒有任何復原方式 — 密碼一旦遺失,這個空間就沒了。",
"A second file — the original is left alone": "第二個檔案 — 原檔案不受影響",
"A sort here is newer than this build and was not applied.": "此檢視中有比目前版本更新的排序方式,未被套用。",
"A space is never a dead end: the whole document is plain JSON in this file, and every page exports as Markdown.": "空間永遠不會是死路:整份文件就是此檔案中的純 JSON,每個頁面也都能匯出成 Markdown。",
"A space needs at least one page": "空間至少要有一個頁面",
+ "A still frame, shown before play — and what a printout or a file preview shows": "播放前顯示的靜態畫面 — 列印和檔案預覽顯示的也是它",
"About bento/spaces — version, updates, language, password": "關於 bento/spaces — 版本、更新、語言、密碼",
"About this space": "關於此空間",
+ "Access reset — only copies saved from now on can join": "存取已重設 — 只有此後儲存的副本才能加入",
"Add a block below": "在下方新增區塊",
+ "Add a column after": "在右側新增一欄",
+ "Add a link": "新增連結",
+ "Add a picture": "新增圖片",
+ "Add a row below": "在下方新增一列",
"Add below": "在下方新增",
+ "Add pages under": "將頁面加入到",
+ "Address of a video or audio file": "影片或音訊檔案的位址",
"Adds status, priority, assignee, estimate": "新增狀態、優先順序、負責人與估算",
+ "All text. Nothing is embedded, so this file is as small as a space gets.": "全是文字。沒有嵌入任何內容,所以這個檔案已是空間能達到的最小體積。",
"Already an issue": "已經是項目",
"Also open in another window on this computer — not shared online": "本機的另一個視窗中也已開啟 — 未線上分享",
+ "Alt text": "替代文字",
+ "An update check is the only network this app makes on its own. It asks the release server for a signed manifest and sends nothing about you or this document — no ids, no telemetry.": "檢查更新是這個應用程式唯一會自行發起的網路請求。它只向發布伺服器索取一份已簽署的清單,不傳送任何關於你或這份文件的資訊——沒有識別碼,沒有遙測。",
+ "Another bento/spaces file arrives as pages under the one you choose — its images come too, and the links inside it keep working.": "另一個 bento/spaces 檔案會作為頁面加入到你選擇的頁面之下——圖片一併帶入,其內部的連結照常可用。",
+ "Another bento/spaces file can arrive the same way, nested under any page.": "另一個 bento/spaces 檔案也能以同樣的方式,嵌入到任意頁面之下。",
+ "Appearance": "外觀",
+ "Apply": "套用",
"Archive": "封存",
+ "Archived": "已封存",
"Archived ({n})": "已封存 ({n})",
"Ascending": "遞增",
+ "Audio": "音訊",
+ "Audio from {host}": "來自 {host} 的音訊",
+ "Back": "返回",
+ "Background": "背景",
+ "Block": "區塊",
"Block options": "區塊選項",
+ "Blocks": "區塊",
+ "Blue": "藍色",
"Board": "看板",
+ "Bold": "粗體",
+ "Bold — ⌘B": "粗體 — ⌘B",
"Breadcrumb": "階層路徑",
"Bring notes in": "把筆記帶進來",
+ "Brown": "棕色",
"Callout icon": "標註圖示",
+ "Cancel": "取消",
+ "Careful": "請謹慎",
"Caution": "當心",
+ "Change password…": "變更密碼…",
"Change the kind of callout": "變更標註類型",
+ "Change the name used for your new comments and replies": "變更新註解與回覆所用的名字",
"Change this block’s type": "變更此區塊的類型",
"Change this page's icon": "變更此頁面的圖示",
"Change {field}": "變更{field}",
"Check for updates": "檢查更新",
+ "Check for updates automatically at launch": "啟動時自動檢查更新",
+ "Checked automatically at launch — you're on the latest version (v{v}).": "已於啟動時自動檢查 — 您已是最新版本 (v{v})。",
"Checking is manual and verified: the download is signed, and its signature is checked against a key inside this file before anything is rewritten.": "檢查是手動且經過驗證的:下載的檔案帶有簽章,在改寫任何內容之前,都會用此檔案內的金鑰驗證該簽章。",
"Checking…": "檢查中…",
"Choose .md files…": "選擇 .md 檔案…",
+ "Choose a different file": "選擇另一個檔案",
+ "Choose a file…": "選擇檔案…",
"Choose a folder…": "選擇資料夾…",
"Choose a password. There is no way to recover it.": "請設定密碼。沒有任何方法可以找回它。",
+ "Choose a space…": "選擇一個空間…",
"Choose the field the columns come from": "選擇作為欄的欄位",
"Choose the order": "選擇排序方式",
"Clear filter": "清除篩選",
+ "Clear formatting": "清除格式",
+ "Clip added ({size})": "已新增片段 ({size})",
"Close": "關閉",
+ "Code": "程式碼",
"Collapsed toggles always print open. Your browser's print dialog has the \"Save as PDF\" option.": "收合的摺疊區塊列印時一律展開。「另存為 PDF」的選項在瀏覽器的列印對話方塊中。",
+ "Color": "顏色",
"Column": "單欄",
+ "Columns": "欄",
"Comfortable for reading": "適合閱讀的寬度",
+ "Comment": "註解",
+ "Comment on this page": "為這個頁面加註解",
+ "Comment · block": "註解 · 區塊",
+ "Comment · page": "註解 · 頁面",
+ "Comment:": "註解:",
+ "Connect to the live session without saving a new copy — copies you sent earlier will meet you there.": "無需儲存新副本即可連線即時會話 — 之前傳送的副本會在這裡與你會合。",
+ "Connecting…": "連線中…",
"Contents": "目錄",
"Contents page": "目錄頁",
+ "Controls": "控制項",
+ "Copied ✓": "已複製 ✓",
"Copy document JSON": "複製文件 JSON",
"Copy saved": "已儲存副本",
"Copy saved — you are still editing the original": "副本已儲存 — 你仍在編輯原始檔案",
"Copy the document JSON": "複製文件 JSON",
"Could not reach the update channel.": "無法連線到更新來源。",
"Could not verify an update, so nothing was changed.": "無法驗證更新,因此未變更任何內容。",
+ "Couldn’t access the clipboard": "無法存取剪貼簿",
+ "Couldn’t reach the live session": "無法連線即時會話",
"Create “{name}”": "建立「{name}」",
+ "Dark": "深色",
+ "Default": "預設",
"Delete": "刪除",
"Delete “{name}”?": "要刪除「{name}」嗎?",
"Delete…": "刪除…",
"Descending": "遞減",
+ "Description": "描述",
"Discard": "捨棄",
+ "Document": "文件",
+ "Document JSON copied": "已複製文件 JSON",
+ "Document id": "文件 ID",
+ "Document properties": "文件屬性",
+ "Document replaced — ⌘Z undoes": "文件已取代 — ⌘Z 可還原",
+ "Download updated copy": "下載更新副本",
+ "Downloaded ✓": "已下載 ✓",
"Downloaded. Open the new file — this one is unchanged.": "已下載。請開啟新檔案 — 目前這個檔案未被更動。",
+ "Downloads a backup of the current version, then rewrites this file on disk as the new version — document untouched.": "先下載目前版本的備份,再將此檔案改寫為新版本 — 文件內容不變。",
"Drag to move, click for block options": "拖曳可移動,點按開啟區塊選項",
+ "Drag to resize this column": "拖曳以調整此欄寬度",
"Drag to resize · double-click to reset": "拖曳可調整寬度 · 雙擊還原預設",
"Drop .md files or a folder here": "把 .md 檔案或資料夾拖到這裡",
"Duplicate": "建立副本",
+ "Duplicate as a new space…": "複製為新空間…",
"Each .md file becomes a page, folders become the page tree, and [[wikilinks]] become real links. Pages are added — nothing here is replaced.": "每個 .md 檔案變成一個頁面,資料夾變成頁面樹,[[wiki 連結]] 變成真正的連結。頁面是新增的——既有內容不會被取代。",
+ "Edit": "編輯",
+ "Edit this link card": "編輯此連結卡片",
"Edited": "已編輯",
"Editing": "編輯中",
+ "Editor": "編輯者",
+ "Editor copy saved — recipients join live with edit access": "編輯者副本已儲存 — 收到的人可帶編輯權限加入即時會話",
"Encrypt the document inside this file": "加密此檔案內的文件",
"Enter the password to open it.": "請輸入密碼以開啟。",
+ "Every page opens wide on this screen from now on": "在此螢幕上,之後所有頁面都會以加寬方式開啟",
"Every page, as one .md file": "所有頁面合併為一個 .md 檔",
+ "Everything in this space is replaced by what you paste. ⌘Z undoes it, but only while this window stays open.": "這個空間裡的所有內容都會被你貼上的內容取代。⌘Z 可以復原,但僅限於這個視窗保持開啟時。",
+ "Export": "匯出",
+ "Export a page as a space": "將頁面匯出為空間",
"Export as Markdown": "匯出為 Markdown",
"Export as Markdown…": "匯出為 Markdown…",
+ "Export page as a space…": "將頁面匯出為空間…",
+ "Exported {n} page(s) as a new space": "已將 {n} 個頁面匯出為新的空間",
"File": "檔案",
"Fills the window": "鋪滿整個視窗",
"Filter": "篩選",
@@ -87,10 +163,17 @@ export const zh_Hant: Catalog = {
"Find": "尋找",
"Find in this space…": "在此空間尋找…",
"Find or create a page…": "尋找或建立頁面…",
+ "Following — view only": "跟隨中 — 僅供檢視",
"Full width": "全寬",
+ "Gray": "灰色",
+ "Green": "綠色",
"Group": "分組",
"Guest": "訪客",
+ "Header row": "標題列",
+ "Hide properties (])": "隱藏屬性面板(])",
"Hide the page list ([)": "隱藏頁面清單([)",
+ "Highlight": "螢光標示",
+ "Highlight — ⇧⌘H": "螢光標示 — ⇧⌘H",
"Icon": "圖示",
"Image added ({size})": "已新增圖片 ({size})",
"Image added, resized to fit ({from} → {to})": "已新增圖片,已縮小尺寸 ({from} → {to})",
@@ -101,35 +184,60 @@ export const zh_Hant: Catalog = {
"Import Markdown…": "匯入 Markdown…",
"Important": "重要",
"Imported": "已匯入",
+ "Imported a space": "已匯入一個空間",
"Imported notes": "匯入的筆記",
"Include archived pages": "包含已封存的頁面",
"Include the image files and they are embedded too. An image this browser cannot open is kept as its path rather than as a broken picture.": "把圖片檔案一起選取,它們也會一併嵌入。這個瀏覽器打不開的圖片會以路徑的形式保留,而不是一張破圖。",
+ "Include the pages nested under it": "包含其下層頁面",
+ "Inline code — ⌘E": "行內程式碼 — ⌘E",
"Insert": "插入",
"Insert a block — text, headings, lists, code, images": "插入區塊 — 文字、標題、清單、程式碼、圖片",
"Interface language": "介面語言",
+ "Interface theme": "介面主題",
"Invite someone…": "邀請他人…",
+ "Invite to edit…": "邀請編輯…",
"Issues": "項目",
+ "Italic": "斜體",
+ "Italic — ⌘I": "斜體 — ⌘I",
+ "Journal date": "日誌日期",
+ "Key-verified identity": "金鑰驗證的身份",
"Language": "語言",
"Language follows whoever opens the file. It is never written into the document.": "語言取決於開啟檔案的人,永遠不會寫入文件中。",
"Language — what this block is highlighted as": "語言 — 這個區塊以什麼語言上色",
+ "Last saved": "上次儲存",
+ "Launch check couldn't reach the release server ({m}). Check manually below.": "啟動檢查無法連線發佈伺服器 ({m})。請在下方手動檢查。",
"Leave it empty to use the tone mark": "留空則使用該類型的標記",
+ "Light": "淺色",
+ "Link": "連結",
+ "Link address": "連結網址",
+ "Link card": "連結卡片",
"Link to page": "連結到頁面",
+ "Link — ⌘K": "連結 — ⌘K",
+ "Linked": "連結",
"Linked from": "連結來源",
"Links to it become dead": "指向它的連結會失效",
"List": "清單",
+ "Live": "已連線",
"Live — nobody else is here yet": "即時協作中 — 還沒有其他人",
"Live — send someone the file to bring them in": "即時協作中 — 把檔案傳給別人即可加入",
"Live — {n} other people are here": "即時協作中 — 還有 {n} 人在此",
+ "Load this audio": "載入此音訊",
"Load this image": "載入此圖片",
+ "Load this video": "載入此影片",
+ "Loop": "循環",
"Make this page an issue": "將此頁面變為項目",
"Manual order": "手動排序",
+ "Match my system": "跟隨系統",
+ "Mints brand-new keys. Every previously sent copy stops syncing for good; share fresh copies afterwards.": "鑄造全新金鑰。之前傳送的所有副本將永久停止同步;此後請分享新副本。",
"More": "更多",
"Move down": "下移",
"Move up": "上移",
+ "Muted": "靜音",
"New issue": "新增項目",
"New page": "新增頁面",
"New page (⌘⌥N)": "新增頁面 (⌘⌥N)",
"New page inside": "在其中新增頁面",
+ "New to Bento? Find templates, the gallery and the AI editing guide at {home} — or ⭐ it on {gh}.": "第一次用 Bento?在 {home} 查看範本、圖庫和 AI 編輯指南 — 也歡迎到 {gh} 按 ⭐。",
"Next (⏎)": "下一個 (⏎)",
"No Markdown files in that selection": "所選項目中沒有 Markdown 檔案",
"No block matches": "沒有符合的區塊",
@@ -138,51 +246,104 @@ export const zh_Hant: Catalog = {
"No issues yet. Add a status field to any page and it appears here.": "還沒有項目。為任一頁面新增狀態欄位,它就會出現在這裡。",
"No pages yet": "尚無頁面",
"Nobody else is here yet": "還沒有其他人",
+ "Not in this file: it needs the network, and the site is told when someone opens the page": "不在這個檔案裡:播放需要網路,而且該網站會知道有人開啟了這個頁面",
+ "Not live — turns on when you share": "未上線 — 分享時自動開啟",
"Not loaded — opening it would tell that site you opened this space.": "未載入 — 載入會讓該網站知道你開啟了這個空間。",
"Not sharing yet — click to start a live session": "尚未共享 — 點擊開始即時協作",
"Note": "備註",
"Nothing found": "找不到結果",
+ "Nothing is fetched. A card shows what you type here — opening this space never contacts the site.": "不會抓取任何內容。卡片顯示的就是你在這裡輸入的內容——開啟這個空間絕不會連線到該網站。",
"Nothing leaves this file until you start a session.": "在你開始工作階段之前,沒有任何內容離開這個檔案。",
"Now an issue": "現在是項目了",
"Off by default — they were archived for a reason": "預設關閉 — 它們被封存是有原因的",
+ "Offline mode is on — nothing leaves this computer.": "離線模式已開啟 — 任何資料都不會離開這台電腦。",
+ "On this screen only — it is not saved in the file": "僅在此螢幕上生效,不會儲存到檔案中",
+ "One emoji": "一個表情符號",
+ "One fewer": "減少一個",
+ "One line about what is there": "用一行說明那裡有什麼",
+ "One more": "增加一個",
+ "One page and what is under it, as its own file": "一個頁面及其下層頁面,成為獨立檔案",
+ "Only pages that ask for it": "僅限指定了寬度的頁面",
+ "Only the owner of this space can invite people": "只有此 Space 的擁有者才能邀請他人",
"Open only": "僅未完成",
+ "Orange": "橘色",
"Other": "其他",
"Other ways to save": "其他儲存方式",
"Out of the sidebar, still searchable and linkable": "移出側邊欄,仍可搜尋與連結",
+ "Owner": "擁有者",
+ "Page": "頁面",
"Page options": "頁面選項",
"Pages": "頁面",
+ "Pages open at their normal width again": "頁面已恢復為正常寬度",
"Pages — show or hide the page list": "頁面 — 顯示或隱藏頁面清單",
"Password": "密碼",
"Password removed. Save to write the space unencrypted.": "已移除密碼。儲存後空間將以未加密方式寫入。",
"Password set. Save to write the space encrypted.": "已設定密碼。儲存後空間將以加密方式寫入。",
"Password…": "密碼…",
+ "Paste document JSON here…": "在此貼上文件 JSON…",
+ "Paste or type a link": "貼上或輸入連結",
"People in this space": "此空間中的人",
+ "Picture": "圖片",
+ "Picture…": "圖片…",
+ "Pink": "粉紅色",
"Plain text": "純文字",
+ "Poster": "封面圖",
+ "Poster…": "封面圖…",
"Previous (⇧⏎)": "上一個 (⇧⏎)",
"Print": "列印",
"Print / PDF…": "列印 / PDF…",
"Print or save as PDF": "列印或另存為 PDF",
"Print or save as PDF (⌘P)": "列印或另存為 PDF (⌘P)",
"Print…": "列印…",
+ "Properties": "屬性",
+ "Properties — show or hide this block’s settings": "屬性 — 顯示或隱藏這個區塊的設定",
+ "Purple": "紫色",
+ "Put the caret in a block to see what it can be.": "把游標放進一個區塊,就能看到它能改什麼。",
+ "Read the release notes for v{v} (opens in a new tab)": "查看 v{v} 的發行說明(在新分頁中開啟)",
+ "Read-only copy saved — it follows the live session, view only": "唯讀副本已儲存——它跟隨即時工作階段,僅供檢視",
+ "Reading file…": "正在讀取檔案…",
"Reading image…": "正在讀取圖片…",
"Reading view": "閱讀檢視",
"Reading view — press Esc or the eye to edit": "閱讀檢視 — 按 Esc 或眼睛圖示即可編輯",
"Reading view — the pages without the editing tools": "閱讀檢視 — 只有頁面,沒有編輯工具",
"Reading {n} file(s)…": "正在讀取 {n} 個檔案…",
+ "Red": "紅色",
"Redo": "重做",
"Redo (⇧⌘Z)": "重做 (⇧⌘Z)",
+ "Reload into new version": "重新載入進入新版本",
+ "Remove": "移除",
"Remove password…": "移除密碼…",
+ "Remove the password": "移除密碼",
+ "Remove the password?": "要移除密碼嗎?",
"Remove the password? The next save writes the document in the clear.": "要移除密碼嗎?下次儲存會以明文寫入文件。",
+ "Remove the picture": "移除圖片",
+ "Remove this column": "刪除此欄",
+ "Remove this row": "刪除此列",
+ "Remove {name} from this space? Their copy drops to read-only.": "要將 {name} 從此 Space 移除嗎?對方的副本將變為唯讀。",
+ "Remove {name} — revokes this device’s access; everyone else is unaffected": "移除 {name} — 撤銷該裝置的存取權限;其他人不受影響",
"Rename": "重新命名",
+ "Reopen": "重新開啟",
+ "Repeat when it reaches the end": "播放到結尾後重新開始",
+ "Replace": "取代",
"Replace all": "全部取代",
+ "Replace every page from pasted JSON?": "用貼上的 JSON 取代所有頁面嗎?",
+ "Replace from JSON…": "從 JSON 取代…",
+ "Replace picture": "替換圖片",
"Replace with": "取代為",
"Replace with…": "取代為…",
"Replace {n} occurrence(s) across the whole space?": "要取代整個空間中的 {n} 處嗎?",
"Replaced": "已取代",
+ "Replace…": "取代…",
+ "Reply": "回覆",
+ "Reply…": "回覆…",
+ "Reset access? Every copy you’ve sent stops syncing; only copies saved after this can join.": "重設存取權限?已傳送的所有副本將停止同步;只有此後儲存的副本才能加入。",
+ "Reset access…": "重設存取權限…",
"Resized": "已縮小",
+ "Resolve": "解決",
"Restore": "還原",
"Restore to the page list": "還原到頁面清單",
"Room for a board or a table": "給看板或表格留出空間",
+ "Rows": "列",
"Save": "儲存",
"Save (⌘S)": "儲存 (⌘S)",
"Save a copy…": "儲存副本…",
@@ -190,6 +351,7 @@ export const zh_Hant: Catalog = {
"Saved": "已儲存",
"Saved a new copy": "已儲存新副本",
"Saves a copy that joins this session": "儲存一份會加入此工作階段的副本",
+ "Saves a copy to send. Whoever opens it edits this space live with you (end-to-end encrypted); you stay the owner and can remove them from the People list.": "儲存一份用於傳送的副本。開啟的人可與你即時共同編輯此 Space(端對端加密);你仍是擁有者,可隨時從成員列表中移除他們。",
"Saving…": "儲存中…",
"Search": "搜尋",
"Search all pages (⌘K)": "搜尋所有頁面 (⌘K)",
@@ -199,32 +361,58 @@ export const zh_Hant: Catalog = {
"Share this space": "分享此空間",
"Show as a board": "以看板顯示",
"Show as a list": "以清單顯示",
+ "Show playback controls to the reader": "向讀者顯示播放控制項",
+ "Show properties (])": "顯示屬性面板(])",
"Show the page list ([)": "顯示頁面清單([)",
+ "Shown next to your cursor and in the People list — stored only in this browser.": "顯示在你的游標旁和成員列表中 — 僅儲存在此瀏覽器。",
+ "Site name": "網站名稱",
"Sort": "排序",
"Space name": "空間名稱",
"Start live session": "開始即時工作階段",
+ "Start silent": "開始時靜音",
"Stop sharing": "停止共用",
+ "Stop widening every page": "不再加寬所有頁面",
"Stopped sharing": "已停止分享",
+ "Strikethrough": "刪除線",
+ "Strikethrough — ⇧⌘S": "刪除線 — ⇧⌘S",
"Take it elsewhere": "把內容帶走",
+ "Taken from the address if blank": "留空則取自網址",
+ "Text": "文字",
+ "Text and background color": "文字與背景顏色",
+ "Text formatting": "文字格式",
"That change is too large to share live (about 1 MB max). It’s saved in your copy, but collaborators won’t see it.": "此變更太大,無法即時共用(上限約 1 MB)。它已儲存在你的副本中,但協作者不會看到。",
+ "That file could not be read": "無法讀取該檔案",
"That file could not be read as an image": "無法將該檔案讀取為圖片",
+ "That file is not a bento/spaces document": "該檔案不是 bento/spaces 文件",
"That image is too large to share live (about 1 MB max). It’s saved in your copy, but collaborators won’t see it.": "此圖片太大,無法即時共用(上限約 1 MB)。它已儲存在你的副本中,但協作者不會看到。",
+ "That is not a bento/spaces document": "這不是 bento/spaces 文件",
"That is {n} files — importing them all may take a moment. Continue?": "共 {n} 個檔案,全部匯入需要一點時間。要繼續嗎?",
+ "That needs to be an http or https address": "這裡需要填 http 或 https 位址",
+ "That space is password-protected. Open it, then export the pages you want.": "該空間受密碼保護。請先開啟它,再匯出你需要的頁面。",
+ "The counterpart of Copy document JSON: edit a space in another tool, then bring it back.": "「複製文件 JSON」的對應功能:在別的工具裡編輯一個空間,再把它帶回來。",
"The day after": "後一天",
"The day before": "前一天",
"The document block is not shaped like a space — {detail}.": "檔案中的文件資料結構不像一個空間 — {detail}。",
"The document block is not valid JSON — {detail}.": "檔案中的文件資料不是有效的 JSON — {detail}。",
+ "The document, the editor and the search are all in this one file. Opening it needs nothing else — no server, no account, no install.": "文件、編輯器和搜尋都在這一個檔案裡。開啟它不需要別的東西——不需要伺服器、帳號或安裝。",
"The images in these notes come to {size} so far, and they all travel inside the file. Keep embedding them?": "這些筆記裡的圖片已經有 {size},而且都會隨檔案一起走。要繼續嵌入嗎?",
"The live session couldn’t store that change. It’s saved in your copy, but collaborators won’t see it.": "即時工作階段無法儲存此變更。它已儲存在你的副本中,但協作者不會看到。",
+ "The next save writes this space as plain, readable JSON — anybody who opens the file can read every page.": "下一次儲存會把這個空間寫成可直接閱讀的 JSON——任何開啟這個檔案的人都能讀到每一頁。",
+ "The page becomes a new file of its own: a whole space, with a new document id and none of this one’s sharing keys.": "該頁面會成為獨立的新檔案:一個完整的空間,擁有新的文件 ID,且不帶本空間的任何共用金鑰。",
"The pages without the editing tools": "不含編輯工具的頁面",
"The rest name notes that were not in the selection, and are left as text.": "其餘指向不在所選範圍內的筆記,保留為文字。",
+ "The theme follows whoever opens the file. It is never written into the document.": "主題取決於開啟檔案的人,永遠不會寫入文件中。",
"The whole space": "整個空間",
"The whole space, or just this page": "整個空間,或僅此頁面",
"Then send someone the file": "然後把檔案傳給對方",
"These windows are on this computer. Start a session to work with someone elsewhere.": "這些視窗都在本機。若要與其他地方的人協作,請開始一個工作階段。",
+ "This block has no settings of its own — its content is all of it.": "這個區塊沒有自己的設定 — 內容就是它的全部。",
+ "This block’s settings, and the page’s": "這個區塊的設定,還有頁面的設定",
"This browser cannot write back to the file, so every save makes a new copy. Chrome and Edge on a computer can save in place.": "此瀏覽器無法寫回檔案,因此每次儲存都會產生新的副本。電腦版的 Chrome 和 Edge 可以就地儲存。",
+ "This clip is {size} and travels inside the file, making it that much bigger for everyone you send it to. Embed it anyway?": "這個片段有 {size},而且會跟著檔案一起走,你傳給的每個人拿到的檔案都會大這麼多。仍要嵌入嗎?",
"This copy goes offline; the others carry on": "此副本將離線;其他人繼續協作",
"This file": "此檔案",
+ "This file carries its own app — it works offline, forever, as is.": "此檔案自帶應用程式 — 離線可用,永遠如此。",
"This file could not be opened": "無法開啟此檔案",
"This file declares rules this build does not know. It is open read-only so nothing is lost.": "此檔案宣告了這個版本不認識的規則。已以唯讀方式開啟,以免遺失任何內容。",
"This file is open read-only": "這個檔案以唯讀方式開啟",
@@ -232,19 +420,30 @@ export const zh_Hant: Catalog = {
"This image is {size} and travels inside the file, making it that much bigger for everyone you send it to. Embed it anyway?": "這張圖片有 {size},而且會跟著檔案一起走,你傳給的每個人拿到的檔案都會大這麼多。仍要嵌入嗎?",
"This image was resized to keep the file small. Click to replace it with the original.": "這張圖片已縮小尺寸以保持檔案小巧。點按可換回原始圖片。",
"This is a reading copy. It opens for reading; nothing you do here changes the file.": "這是一份閱讀副本。它以閱讀方式開啟;你在此處的操作不會變更檔案。",
+ "This is a view-only copy — it follows the live session but can’t change this space.": "這是唯讀副本 — 會跟隨即時會話,但無法修改此 Space。",
"This is not a bento/spaces document — {detail}.": "這不是 bento/spaces 文件 — {detail}。",
"This live session has run out of room. Your change is saved in your copy, but collaborators won’t see it.": "此即時工作階段空間已滿。你的變更已儲存在你的副本中,但協作者不會看到。",
"This page only": "僅此頁面",
+ "This space has no live session to follow": "此 Space 沒有可跟隨的即時會話",
"This space has no pages.": "此空間沒有任何頁面。",
"This space is encrypted. Saves stay encrypted.": "此空間已加密。往後的儲存也會維持加密。",
"This space is locked": "此空間已鎖定",
+ "This window is still running v{v} — reload to finish. A v{v} backup was downloaded.": "此視窗仍在執行 v{v} — 重新載入以完成。已下載 v{v} 備份。",
+ "This window is still running v{v} — reload to finish. A v{v} backup was saved beside this file.": "此視窗仍在執行 v{v} — 重新載入以完成。已在此檔案旁儲存 v{v} 備份。",
+ "This window is still running v{v}. If you overwrote the file that's open here, reload; otherwise open the file you saved.": "此視窗仍在執行 v{v}。若已覆寫目前開啟的檔案請重新載入;否則請開啟您儲存的檔案。",
+ "This window keeps running v{v} until you open the downloaded file.": "在開啟下載的檔案之前,此視窗會維持在 v{v}。",
"Those files could not be read": "這些檔案無法讀取",
"Tip": "提示",
+ "Title": "標題",
"Today": "今天",
"Today's journal": "今天的日誌",
+ "Tone": "語氣",
"Too many changes at once — live sync is catching up.": "變更太多 — 即時同步正在追趕。",
+ "Top level": "最上層",
"Turn into…": "轉換為…",
"Type / for blocks, [[ to link a page": "輸入 / 插入區塊,輸入 [[ 連結頁面",
+ "Underline": "底線",
+ "Underline — ⌘U": "底線 — ⌘U",
"Undo (⌘Z)": "還原 (⌘Z)",
"Unlock": "解鎖",
"Unlocked, but the document inside could not be read.": "已解鎖,但無法讀取裡面的文件。",
@@ -252,38 +451,82 @@ export const zh_Hant: Catalog = {
"Unsaved changes — ⌘S downloads an updated copy": "未儲存的變更 — ⌘S 會下載更新後的副本",
"Unsaved changes — ⌘S rewrites this file": "未儲存的變更 — ⌘S 會重寫此檔案",
"Untitled": "未命名",
+ "Update failed: {m}": "更新失敗:{m}",
"Update this file": "更新此檔案",
+ "Update this file…": "更新此檔案…",
+ "Updated to v{v} on disk.": "已在磁碟上更新至 v{v}。",
"Updates": "更新",
+ "Use a link…": "使用連結…",
+ "Use this width for every page": "將此寬度用於所有頁面",
+ "Verifies and builds the new version with this document inside, then asks where to save it — pick the file you have open to update it.": "驗證並建立包含此文件的新版本,然後詢問儲存位置 — 選擇目前開啟的檔案即可更新。",
+ "Verifying…": "驗證中…",
"Version {v} is available.": "版本 {v} 可用。",
"Version, language, password, exports": "版本、語言、密碼、匯出",
+ "Video": "影片",
+ "Video from {host}": "來自 {host} 的影片",
+ "View-only copy — it follows the live session but can’t change this space.": "唯讀副本 — 會跟隨即時會話,但無法修改此 Space。",
+ "View-only copy — it holds no signing key.": "唯讀副本 — 不持有簽署金鑰。",
+ "View-only copy…": "唯讀副本…",
+ "Viewer": "檢視者",
"Visit bento.page (opens in a new tab)": "造訪 bento.page(在新分頁開啟)",
"Warning": "警告",
+ "Web address": "網址",
+ "What is in the picture": "圖片裡是什麼",
+ "What this is": "這是什麼",
+ "What’s new →": "更新內容 →",
"Wide": "加寬",
"Width": "寬度",
+ "Width %": "寬度 %",
"Width in the text column": "相對於文字欄的寬度",
+ "Windows on this computer still sync; turn offline mode off in About to work with someone elsewhere.": "本機的視窗仍會同步;要與其他地方的人協作,請在「關於」中關閉離線模式。",
+ "Words": "字數",
"Wrong password — try again": "密碼錯誤 — 請重試",
+ "Yellow": "黃色",
"You have the newest version ({v}).": "你已是最新版本 ({v})。",
+ "Your key on THIS device: {fp}. Another device counts as a new person until the owner removes it.": "你在此裝置上的金鑰:{fp}。其他裝置會被視為新成員,直到擁有者將其移除。",
"Your name": "你的名字",
+ "Your name (shown on comments):": "您的名字(顯示於註解):",
+ "Your name (shown on new comments):": "您的名字(顯示於新註解):",
"archived": "已封存",
+ "bento/spaces is MIT-licensed and carries no third-party runtime — the full notices travel in this file’s source.": "bento/spaces 採用 MIT 授權,且不含任何第三方執行環境——完整聲明就在這個檔案的原始碼裡。",
"bento/spaces {version} · {pages} page(s), {blocks} block(s). The document, the editor and the search are all in this one file.": "bento/spaces {version} · {pages} 個頁面、{blocks} 個區塊。文件、編輯器和搜尋全都在這一個檔案裡。",
"format v{v}": "格式 v{v}",
+ "just now": "剛剛",
"none": "無",
+ "you": "你",
+ "you: {name} ✎": "你:{name} ✎",
+ "{blocks} blocks · {words} words · {links} links in": "{blocks} 個區塊 · {words} 個詞 · {links} 個入連結",
"{i} of {n}": "{i} / {n}",
"{name} joined": "{name} 已加入",
"{name} left": "{name} 已離開",
+ "{name} was removed": "已移除 {name}",
+ "{n} connected": "{n} 人已連線",
"{n} duplicate or missing id(s) were repaired so links and pages resolve.": "已修復 {n} 個重複或遺失的 id,讓連結與頁面能正確對應。",
+ "{n} embedded image(s) and clip(s) account for {size} of that — {pct}%. Everything else is text.": "其中 {n} 個嵌入的圖片和片段占了 {size},也就是 {pct}%。其餘全是文字。",
"{n} found": "找到 {n} 個",
+ "{n} id(s) were renamed because this space already used them, and the links inside the import follow them.": "有 {n} 個 id 因本空間已在使用而被改名,匯入內容中的連結也隨之更新。",
+ "{n} image(s) came too.": "另有 {n} 張圖片一併匯入。",
"{n} image(s) could not be opened, so their paths are kept as text. Import again with the image files included.": "{n} 張圖片打不開,它們的路徑以文字保留。請連同圖片檔案一起再匯入一次。",
"{n} image(s) embedded ({size}).": "已嵌入 {n} 張圖片({size})。",
+ "{n} image(s) go with them; the rest stay here.": "{n} 張圖片會一起帶走,其餘留在這裡。",
"{n} image(s) point at the web. Nothing loads until a reader asks.": "{n} 張圖片指向網路。在讀者主動要求之前不會載入。",
"{n} image(s) were left as paths because embedding stopped there.": "{n} 張圖片以路徑形式保留,因為嵌入到此為止。",
+ "{n} link(s) named pages that were not in that file, and are kept as text.": "有 {n} 個連結指向該檔案中不存在的頁面,已保留為文字。",
+ "{n} link(s) point outside them and are kept as text naming the page they meant.": "有 {n} 個連結指向其外部,將保留為寫明原目標頁面的文字。",
"{n} link(s) to it will stop working.": "指向它的 {n} 個連結將會失效。",
"{n} note name(s) appear more than once, so links naming them all went to the first.": "有 {n} 個筆記名稱重複,因此指向該名稱的連結都指向了第一個。",
"{n} of {total} wikilink(s) resolved.": "{total} 個 wiki 連結中解析了 {n} 個。",
"{n} page(s) had frontmatter, kept verbatim in a folded block.": "{n} 個頁面帶有 frontmatter,已原樣保存在摺疊區塊裡。",
"{n} page(s) inside it move up a level.": "其中的 {n} 個頁面會往上移一層。",
"{n} pages, in sidebar order, with a contents page": "{n} 個頁面,依側邊欄順序排列,並附目錄頁",
+ "{n} table(s) imported, with their column alignment.": "已匯入 {n} 個表格,並保留欄位對齊方式。",
"{n} table(s) kept as text: there is no table block in this format yet.": "{n} 個表格按原文保留為文字:這個格式還沒有表格區塊。",
+ "{n} unresolved comment(s)": "{n} 則未解決的註解",
+ "{n}d ago": "{n} 天前",
+ "{n}h ago": "{n} 小時前",
+ "{n}m ago": "{n} 分鐘前",
+ "{pages} page(s) and {blocks} block(s) added from that space.": "已從該空間加入 {pages} 個頁面、{blocks} 個區塊。",
"{pages} page(s) and {blocks} block(s) added from {files} file(s).": "從 {files} 個檔案新增了 {pages} 個頁面、{blocks} 個區塊。",
+ "{pages} page(s) and {blocks} block(s) will travel.": "將帶走 {pages} 個頁面、{blocks} 個區塊。",
"⌘Z removes the imported pages again.": "按 ⌘Z 可以把匯入的頁面再撤銷掉。",
}
diff --git a/spaces/src/icons.ts b/spaces/src/icons.ts
index fd9f1cd6..9c2fded5 100644
--- a/spaces/src/icons.ts
+++ b/spaces/src/icons.ts
@@ -21,6 +21,10 @@ export const ICONS = {
chevron: svg('<polyline points="9 18 15 12 9 6"/>'),
page: svg('<path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"/><polyline points="14 2 14 8 20 8"/>'),
link: svg('<path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"/><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"/>'),
+ // the OUTWARD link. `link` (the chain) is the page card's mark, and a card
+ // that leaves the space has to be told apart from one that stays inside it at
+ // a glance in the same menu.
+ globe: svg('<circle cx="12" cy="12" r="9"/><path d="M3.2 9h17.6M3.2 15h17.6"/><path d="M12 3a14 14 0 0 1 0 18a14 14 0 0 1 0-18z"/>'),
trash: svg('<polyline points="3 6 5 6 21 6"/><path d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"/>'),
archive: svg('<rect x="2" y="4" width="20" height="5" rx="1"/><path d="M4 9v10a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9"/><line x1="10" y1="14" x2="14" y2="14"/>'),
@@ -31,6 +35,9 @@ export const ICONS = {
redo: svg('<path d="m15 14 5-5-5-5"/><path d="M20 9H9.5a5.5 5.5 0 0 0 0 11H13"/>'),
print: svg('<polyline points="6 9 6 2 18 2 18 9"/><path d="M6 18H4a2 2 0 0 1-2-2v-5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2h-2"/><rect x="6" y="14" width="12" height="8"/>'),
panelLeft: svg('<rect x="3" y="3" width="18" height="18" rx="2"/><line x1="9" y1="3" x2="9" y2="21"/>'),
+ // the same frame with the divider on the other side — the properties panel is
+ // the page list's mirror image and its mark says so
+ panelRight: svg('<rect x="3" y="3" width="18" height="18" rx="2"/><line x1="15" y1="3" x2="15" y2="21"/>'),
copy: svg('<rect x="9" y="9" width="13" height="13" rx="2"/><path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"/>'),
markdown: svg('<rect x="2" y="5" width="20" height="14" rx="2"/><path d="M6 15V9l3 3 3-3v6"/><path d="M16 9v4"/><polyline points="14.5 12.5 16 14 17.5 12.5"/>'),
lock: svg('<rect x="4" y="11" width="16" height="10" rx="2"/><path d="M8 11V7a4 4 0 0 1 8 0v4"/>'),
@@ -53,6 +60,7 @@ export const ICONS = {
arrowDown: svg('<line x1="12" y1="5" x2="12" y2="19"/><polyline points="19 12 12 19 5 12"/>'),
close: svg('<line x1="18" y1="6" x2="6" y2="18"/><line x1="6" y1="6" x2="18" y2="18"/>'),
sync: svg('<path d="M21 2v6h-6"/><path d="M3 12a9 9 0 0 1 15-6.7L21 8"/><path d="M3 22v-6h6"/><path d="M21 12a9 9 0 0 1-15 6.7L3 16"/>'),
+ comment: svg('<path d="M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"/>'),
// PAGE ICONS — stylised, not colour emoji, so a sidebar of twelve pages
// reads as one interface rather than a row of stickers.
@@ -91,6 +99,12 @@ export const ICONS = {
toneWarning: svg('<path d="M10.3 3.9 1.8 18a2 2 0 0 0 1.7 3h17a2 2 0 0 0 1.7-3L13.7 3.9a2 2 0 0 0-3.4 0z"/><line x1="12" y1="9.5" x2="12" y2="14"/><line x1="12" y1="17" x2="12.01" y2="17"/>'),
toneCaution: svg('<polygon points="7.9 2.5 16.1 2.5 21.5 7.9 21.5 16.1 16.1 21.5 7.9 21.5 2.5 16.1 2.5 7.9"/><line x1="12" y1="7.5" x2="12" y2="12.5"/><line x1="12" y1="16" x2="12.01" y2="16"/>'),
image: svg('<rect x="3" y="3" width="18" height="18" rx="2"/><circle cx="9" cy="9" r="2"/><path d="m21 15-3.5-3.5L6 23"/>'),
+ table: svg('<rect x="3" y="4" width="18" height="16" rx="2"/><line x1="3" y1="9" x2="21" y2="9"/><line x1="3" y1="14.5" x2="21" y2="14.5"/><line x1="9.5" y1="9" x2="9.5" y2="20"/>'),
+ // ONE glyph for both kinds, because `media` is one block type with a kind.
+ // A play triangle in a frame reads as "a thing that plays" for audio as
+ // readily as for video; a film reel and a speaker would be two menu entries
+ // for one entry's worth of block.
+ play: svg('<rect x="2" y="4" width="20" height="16" rx="2.5"/><path d="M10.5 9.2 15 12l-4.5 2.8z" fill="currentColor"/>'),
} as const
export type IconName = keyof typeof ICONS
diff --git a/spaces/src/main.ts b/spaces/src/main.ts
index 81c8a8b3..55fee8c3 100644
--- a/spaces/src/main.ts
+++ b/spaces/src/main.ts
@@ -6,10 +6,11 @@
import './styles.css'
import { configureApp, appConfig } from '../../kernel/src/app.ts'
+import { startTheme } from '../../kernel/src/theme.ts'
import {
capturePristine, readEmbeddedDoc, serializeFile, serializeAuto, registerPreview,
saveFile, parseEnvelope, canWriteInPlace, decryptEnvelope, setEncryptionPassword,
- writeUpdatedFileAs,
+ writeUpdatedFileAs, suggestedFileName,
isEncryptionActive,
} from '../../kernel/src/save.ts'
import { putRecovery, getRecovery, clearRecovery, pruneOld } from '../../kernel/src/autosave.ts'
@@ -19,9 +20,9 @@ import { parseDoc, docContentKey, uid, newPage, type SpacesDoc, type ParseResult
import {
validateDoc, outlineDoc, statsDoc,
planInsertBlocks, planUpdateBlock, planRemoveBlocks, planMoveBlock, planUpdatePage, planRemovePage,
- fieldsReport, issuesReport, planSetField, planNewIssue,
+ fieldsReport, issuesReport, planSetField, planNewIssue, commentsReport,
plainTitle, badTitle,
- type Plan, type PlanError, type IssueQuery,
+ type Plan, type PlanError, type IssueQuery, type CommentQuery,
} from './agent'
import { starterDoc } from './starter'
import { todayISO, isISO, journalFor } from './journal'
@@ -31,7 +32,8 @@ import { buildSpacePreview } from './preview'
import { Store } from './store'
import { Editor } from './editor'
import { SyncSession } from './sync/session.ts'
-import { downloadMarkdown } from './about'
+import { isReaderCopy } from './share.ts'
+import { downloadMarkdown, launchUpdateCheck } from './about'
configureApp({
appId: 'bento-spaces',
@@ -47,6 +49,19 @@ configureApp({
registerPreview((doc) => buildSpacePreview(doc as unknown as SpacesDoc))
capturePristine()
+
+// The interface theme: AFTER capturePristine, before the first paint.
+//
+// AFTER, because capturePristine clones the LIVE document and every save
+// re-serializes that clone — so `data-theme` and `color-scheme` must not be on
+// <html> yet, or a reader's preference would ride inside every file they save
+// and land on whoever they sent it to. Exactly the ordering applyDirection
+// depends on for dir/lang, one line below, and for the same reason.
+//
+// BEFORE the paint, because applying it later paints the interface light and
+// then flips it, which reads as a bug rather than as a preference. Nothing
+// here lays anything out: it sets two attributes on the root element.
+startTheme()
applyDirection()
const embedded = readEmbeddedDoc()
@@ -190,7 +205,17 @@ function boot(doc: SpacesDoc, repaired: string[], frozen?: 'policy' | 'version')
//
// `frozen` is the other, unrelated reason to lock: this build does not
// understand the file and must not rewrite it.
- if (frozen || doc.readonly) store.readOnly = true
+ //
+ // `collab.role === 'reader'` is the THIRD, unrelated reason, and it is the
+ // only one of the three that keeps receiving: a view-only copy follows the
+ // live session and can never send to it. The lock here is a courtesy to the
+ // person holding it — the ENFORCEMENT is the relay, which pins a verified
+ // key per socket and drops op batches from a socket that presented none
+ // (docs/collab-design.md, "Signed writes"). Remote ops still land, because
+ // the kernel session applies them straight to `doc` rather than through
+ // `commit()` — deliberately, so a colleague's edit never joins this
+ // person's undo stack, and incidentally so `readOnly` cannot block it.
+ if (frozen || doc.readonly || isReaderCopy(doc)) store.readOnly = true
const editor = new Editor(document.getElementById('app')!, store)
// Live collaboration. Constructing the session is enough to make same-machine
@@ -205,6 +230,8 @@ function boot(doc: SpacesDoc, repaired: string[], frozen?: 'policy' | 'version')
if (!frozen && doc.readonly) {
banner(t('This is a reading copy. It opens for reading; nothing you do here changes the file.'))
+ } else if (!frozen && isReaderCopy(doc)) {
+ banner(t('This is a view-only copy — it follows the live session but can’t change this space.'))
}
if (frozen) {
banner(frozen === 'version'
@@ -238,6 +265,45 @@ function boot(doc: SpacesDoc, repaired: string[], frozen?: 'policy' | 'version')
.then((html) => writeUpdatedFileAs(html, store.doc, { suffix: suffix === 'copy' ? 'copy' : suffix }))
.then((ok) => { if (ok) editor.status(t('Copy saved — you are still editing the original')) })
}
+ /**
+ * Write a DIFFERENT document out as its own file — the page extract.
+ *
+ * `serializeAuto`, not `serializeFile`: it is the encryption-aware path, so
+ * an extract taken out of a password-protected space is written encrypted
+ * with the same password the author is already holding. A page pulled out of
+ * an encrypted space arriving in the clear would defeat the encryption
+ * silently, on a file whose whole point is that it does not.
+ *
+ * `keepHandle` stays false (the default), which is the lesson slides paid
+ * for: an export that becomes the ⌘S target means the next save overwrites
+ * the extract with the whole document.
+ */
+ editor.onExportSpace = async (out: SpacesDoc): Promise<boolean> => {
+ const html = await serializeAuto(out)
+ return writeUpdatedFileAs(html, out, { suggestedName: suggestedFileName(out) })
+ }
+
+ /**
+ * Write a SHARE copy — the invite, or the view-only follower.
+ *
+ * `out` is a DERIVED document (share.ts), never `store.doc`: that is the
+ * whole of the fix for "Invite someone…", which used to reach the ordinary
+ * copy path and therefore handed every recipient `collab.ownerPriv`.
+ *
+ * `serializeAuto`, so an invite taken out of a password-protected space is
+ * written encrypted with the password its author is already holding — a
+ * shared copy arriving in the clear would defeat the encryption silently.
+ *
+ * `keepHandle` stays false (the default), and here it is load-bearing rather
+ * than tidy: retaining the handle would make the NEXT ⌘S overwrite the copy
+ * that just left with the full document — owner key included. Slides paid
+ * for that lesson once already.
+ */
+ editor.onShareCopy = async (out: SpacesDoc, suffix: string): Promise<boolean> => {
+ const html = await serializeAuto(out)
+ return writeUpdatedFileAs(html, out, { suffix })
+ }
+
async function doSave(): Promise<void> {
store.endRun()
editor.status(t('Saving…'))
@@ -326,6 +392,17 @@ function boot(doc: SpacesDoc, repaired: string[], frozen?: 'policy' | 'version')
outline: (target?: SpacesDoc) => outlineDoc(target ?? store.doc),
/** where the bytes are */
stats: (target?: SpacesDoc) => statsDoc(target ?? store.doc),
+ /**
+ * What a human flagged: every review thread, flat, each with a typed
+ * anchor ('block' with a `blockId`, or 'page').
+ *
+ * READ ONLY, deliberately. The verbs beside it change the document an
+ * agent was asked to work on; a comment is the other half of a
+ * CONVERSATION, and an agent quietly resolving the remark it was supposed
+ * to act on is the one move that makes the record untrue. Filter with
+ * `comments({ resolved: false })` for the outstanding ones.
+ */
+ comments: (query?: CommentQuery) => commentsReport(store.doc, query ?? {}),
/**
* ONE undoable step. Without this an agent appending a paragraph has to
@@ -430,6 +507,26 @@ function boot(doc: SpacesDoc, repaired: string[], frozen?: 'policy' | 'version')
// stated rather than discovered — the product-defining limitation on iOS
console.info('[bento/spaces] this browser cannot write back to the file; every save makes a new copy')
}
+
+ /**
+ * Ask the release server whether this app is current — and NOTHING else.
+ *
+ * This is the one request bento/spaces makes on its own, and it is worth
+ * being precise about how it sits beside "A space does not phone home when
+ * it is opened" (DECISIONS, 2026-08-03). That rule is about the DOCUMENT: an
+ * author who mails you a file must not learn your address and the moment you
+ * opened it, which is what a remote `<img>` delivers. This is the APP asking
+ * its own release origin for a signed manifest, on the reader's behalf and
+ * under the reader's switch — the same check slides has run at launch since
+ * v0.9, reading the same `bento-auto-check` preference, so turning it off in
+ * one app turns it off in both. It sends no id, carries nothing from the
+ * document, and is the mechanism by which a file that will outlive its
+ * browser ever learns that it should be updated.
+ *
+ * Never fatal, and never in the way: the result only changes a sentence in
+ * the About dialog.
+ */
+ void launchUpdateCheck().catch(() => { /* an unreachable server is not an error here */ })
}
function banner(text: string, actions: Array<[string, () => void]> = []): void {
diff --git a/spaces/src/markdown.ts b/spaces/src/markdown.ts
index 5c645e7d..f9803ef9 100644
--- a/spaces/src/markdown.ts
+++ b/spaces/src/markdown.ts
@@ -16,17 +16,19 @@
// `.ts` extensions ON PURPOSE: this module is imported directly by
// `scripts/test-spaces-model.ts`, which node resolves without a bundler.
-import { type Block, type Page, uid } from './model.ts'
+import { type Block, type Page, uid, writeTable } from './model.ts'
import { esc } from './sanitize.ts'
+import { keepClasses } from './marks.ts'
/** A tab indents four columns. Nothing here depends on the exact number; it
* only has to be the same everywhere so nesting is consistent. */
const TAB = ' '
-/** Inline tags a raw html span may keep — sanitize.ts's ALLOWED, minus the
- * ability to carry attributes. Restated rather than imported because that
- * module's set is a DOM-side control and this one is a parser convenience;
- * if they ever diverge, the sanitizer still wins, because it runs last. */
+/** Inline tags a raw html span may keep — sanitize.ts's ALLOWED, carrying no
+ * attributes except a palette `class` on span/mark (see cleanRawTag).
+ * Restated rather than imported because that module's set is a DOM-side
+ * control and this one is a parser convenience; if they ever diverge, the
+ * sanitizer still wins, because it runs last. */
const INLINE_OK = new Set(['b', 'i', 'u', 's', 'em', 'strong', 'code', 'br', 'span', 'mark', 'sub', 'sup'])
/**
@@ -55,6 +57,16 @@ function cleanRawTag(tag: string): string | null {
return /^(https?:|mailto:)/i.test(url) ? `<a href="${esc(url)}">` : null
}
if (!INLINE_OK.has(name)) return null
+ // A PALETTE CLASS SURVIVES ON SPAN AND MARK. Colour has no markdown syntax
+ // at all, so the exporter writes it as raw inline html — and an importer that
+ // threw the class away would make "export, edit the .md, import" a
+ // colour-stripping round trip, which is the failure mode the export was
+ // written to avoid in the first place.
+ if (!close && (name === 'span' || name === 'mark')) {
+ const c = /class\s*=\s*(?:"([^"]*)"|'([^']*)'|([^\s>]+))/i.exec(m[3])
+ const kept = keepClasses(c ? (c[1] ?? c[2] ?? c[3] ?? '') : '')
+ if (kept) return `<${name} class="${esc(kept)}">`
+ }
return close ? `</${name}>` : `<${name}>`
}
@@ -288,19 +300,40 @@ export function parseNote(text: string, fileTitle: string): ParsedNote {
continue
}
- // A TABLE has no block type in this model yet, and turning one into
- // paragraphs shreds it. Kept verbatim in a code block instead: aligned,
- // searchable, exportable, and mechanically upgradable the day a table
- // block ships. Losing the data to make it look tidier is not a trade.
+ // A PIPE TABLE. This used to be kept verbatim inside a CODE BLOCK —
+ // aligned, searchable and exportable, but not a table — under a comment
+ // saying it was "mechanically upgradable the day a table block ships".
+ // This is that day, and the upgrade is this branch.
if (body.includes('|') && isTableRule(lines[i + 1])) {
para = null; quote = null
const owner = ownerFor(indent)
- const buf = [body]
- let j = i + 1
- for (; j < lines.length && lines[j].includes('|'); j++) buf.push(lines[j].trim())
+ const head = splitRow(body)
+ const align = splitRow(lines[i + 1]).map(alignOf)
+ const raw = [head]
+ let j = i + 2
+ for (; j < lines.length && lines[j].includes('|'); j++) raw.push(splitRow(lines[j]))
i = j - 1
tables++
- add(mk('code', { html: esc(buf.join('\n')) }), owner)
+ // THE HEADER ROW IS THE COLUMN COUNT, which is GFM's own rule: a body row
+ // with more cells is cut and one with fewer is padded (tableOf pads at
+ // read time, so only the overflow is handled here). A ragged table is
+ // completely ordinary in hand-written markdown.
+ const w = Math.max(1, head.length)
+ const table = mk('table')
+ // An EMPTY header row is how a headerless table is written in GFM — there
+ // is no other way to say it — and it is what this app's own exporter
+ // emits. So it reads back as `header: false` AND the empty row goes: a
+ // table that grows a blank first row every time it goes out and comes
+ // back is not a round trip.
+ const headed = head.some((c) => c.trim() !== '')
+ const rows = headed ? raw : raw.slice(1)
+ writeTable(table, {
+ rows: (rows.length ? rows : [[]]).map((r) => Array.from({ length: w }, (_, k) => inlineHtml(r[k] ?? ''))),
+ cols: Array<number>(w).fill(1),
+ colAlign: Array.from({ length: w }, (_, k) => align[k] ?? ''),
+ header: headed,
+ })
+ add(table, owner)
continue
}
@@ -400,6 +433,39 @@ function isTableRule(line: string | undefined): boolean {
return t.includes('-') && t.includes('|') && /^\|?[\s:|-]+$/.test(t)
}
+/**
+ * One pipe-table row into its cells.
+ *
+ * The leading and trailing pipes are OPTIONAL in GFM — `a | b` is a row — so
+ * they are stripped only when present; splitting a fully-piped row without
+ * stripping them yields a phantom empty cell at each end, which would shift
+ * every column by one against the rule row.
+ *
+ * `\|` is the escape for a literal pipe and is unescaped after the split, not
+ * before: a lookbehind-free split has to keep the backslash to know not to cut
+ * there.
+ */
+function splitRow(line: string): string[] {
+ const t = line.trim().replace(/^\|/, '').replace(/\|$/, '')
+ const out: string[] = []
+ let cur = ''
+ for (let k = 0; k < t.length; k++) {
+ if (t[k] === '\\' && t[k + 1] === '|') { cur += '|'; k++; continue }
+ if (t[k] === '|') { out.push(cur.trim()); cur = ''; continue }
+ cur += t[k]
+ }
+ out.push(cur.trim())
+ return out
+}
+
+/** `:---:` → 'center'. The colons in the rule row are the only thing GFM can
+ * say about alignment, which is why `colAlign` is per column. */
+function alignOf(rule: string): string {
+ const t = rule.trim()
+ const l = t.startsWith(':'), r = t.endsWith(':')
+ return l && r ? 'center' : r ? 'right' : l ? 'left' : ''
+}
+
// ---- a folder of notes -----------------------------------------------------
export interface SourceFile {
diff --git a/spaces/src/marks.ts b/spaces/src/marks.ts
new file mode 100644
index 00000000..32ac96f9
--- /dev/null
+++ b/spaces/src/marks.ts
@@ -0,0 +1,570 @@
+// SPDX-License-Identifier: MIT
+// Copyright (c) 2026 The Bento authors
+// Inline MARKS — the canonical form of a block's html, and the engine that
+// toggles a mark over a range of it.
+//
+// WHY THIS IS A STRING ENGINE AND NOT A DOM ONE.
+//
+// §2.4(b) forbids `document.execCommand`, so every mark this app applies has to
+// be produced by us. The obvious shape is DOM surgery over a live Range —
+// split the boundary text nodes, walk the covered ones, wrap or unwrap. That
+// works, and it is untestable here: the rigs are plain `node` with no DOM (see
+// sanitize.ts's `typeof document === 'undefined'` fallback, which exists for
+// exactly that reason), so a DOM engine could only ever be checked by hand in a
+// browser. The partial-selection case — unbolding half of a bold run — is the
+// one that goes wrong quietly and the one a rig has to pin.
+//
+// So the engine is a PURE FUNCTION over (inline html, plain-text offsets):
+// parse to a flat run list, edit the runs, serialize back. The DOM appears only
+// in `offsetsOf`/`rangeAt` at the bottom, which convert a live Range to those
+// offsets and back — twenty lines with no policy in them.
+//
+// It also gets the canonicaliser for free. §2.3 requires "fixed mark nesting
+// order, adjacent runs coalesced, no style", and a serializer that always emits
+// marks in one order and never emits two adjacent identical wrappers IS that
+// canonicaliser. `canonicalMarks` is just `serializeRuns(parseRuns(html))`, so
+// the form the toolbar produces and the form a commit normalises to cannot
+// drift apart: they are the same function.
+
+/** The marks the model has. Every one is an allowlisted tag in sanitize.ts. */
+export type MarkTag = 'a' | 'mark' | 'span' | 'strong' | 'em' | 'u' | 's' | 'sub' | 'sup' | 'code'
+
+/**
+ * THE COLOUR VOCABULARY — Notion's shape, and its shape is what makes it safe.
+ *
+ * A FIXED PALETTE, never a colour picker. A closed vocabulary is the difference
+ * between a sanitizer that matches a name and a sanitizer that has to parse
+ * CSS, and between a colour that adapts to the surface it is drawn on and a hex
+ * value that is wrong the first time the surface changes.
+ *
+ * ONE palette in TWO roles: `sp-fg-<name>` on a SPAN is the ink,
+ * `sp-bg-<name>` on a MARK is the band behind it. `<mark>` with no class stays
+ * the plain accent highlight it already was, so nothing written before this
+ * existed changes meaning.
+ */
+export const PALETTE = ['gray', 'brown', 'orange', 'yellow', 'green', 'blue', 'purple', 'pink', 'red'] as const
+export type PaletteName = (typeof PALETTE)[number]
+
+/**
+ * The class names a block's html may carry — the ONLY attribute value in this
+ * format besides `A.href`.
+ *
+ * A PATTERN, DELIBERATELY, AND NOT AN ENUMERATION OF THE NINE ABOVE. Format
+ * additivity (PLATFORM §3) is the whole argument: there is no server to migrate
+ * anything, so a build that strips what it does not recognise DESTROYS
+ * documents written by a later one. Enumerate today's palette and a tenth
+ * colour added in two years is deleted — silently, on the next edit that
+ * touches the block — by every build shipped before it. With a pattern, an old
+ * build keeps the class, round-trips it byte-for-byte and simply renders it
+ * unstyled: degraded, which is recoverable, rather than lost, which is not.
+ *
+ * Safe because a class NAME cannot execute and the stylesheet is ours, not the
+ * document's — the class selects a rule we wrote, or it selects nothing. That
+ * is exactly what `style="…"` would not be: a style attribute makes the
+ * sanitizer a CSS parser, and CSS is a language with `url()` in it.
+ */
+export const CLASS_OK = /^sp-(fg|bg)-[a-z0-9-]{1,16}$/
+
+/** The `class` attribute text worth keeping, or '' — the sanitizer's rule,
+ * applied per TOKEN so `class="sp-fg-red something-else"` loses only the
+ * second one. */
+export function keepClasses(value: string): string {
+ const kept = value.split(/\s+/).filter((c) => CLASS_OK.test(c))
+ return kept.length ? kept.join(' ') : ''
+}
+
+/**
+ * THE CANONICAL NESTING ORDER, outermost first.
+ *
+ * Any fixed order would satisfy §2.3; this one is chosen so that the nesting a
+ * reader ends up with is also the nesting they would have wanted:
+ *
+ * · `a` outermost, because a link is the thing you click. A link broken in
+ * two by a bold boundary is two links, two hover targets and two entries in
+ * a screen reader's link list, for one link's worth of meaning.
+ * · `mark` next: a highlight is a band of background behind the words, and a
+ * band interrupted by an emphasis boundary shows as two bands with a seam.
+ * · `span` (the ink colour) inside `mark` and outside everything else, for
+ * the same reason one step down: colour applies to a phrase, and the phrase
+ * is the outer thing.
+ * · the emphasis marks in a stable arbitrary order — nothing observable
+ * depends on `strong` outside `em` rather than the reverse, only on the
+ * choice never changing.
+ * · `code` innermost, so the monospace box hugs the text rather than the
+ * other marks' boundaries.
+ *
+ * `b`/`i` fold to `strong`/`em` on parse: the allowlist has both spellings, the
+ * markdown importer emits the semantic pair, and Chrome's contentEditable used
+ * to emit the presentational one, so files already carry a mix. One spelling
+ * per mark means one diff and one CRDT node key per mark, and both spellings
+ * render identically, so folding costs a reader nothing.
+ */
+const ORDER: MarkTag[] = ['a', 'mark', 'span', 'strong', 'em', 'u', 's', 'sub', 'sup', 'code']
+
+/** Tag name (lower case) → the mark it means. Anything absent is not a mark. */
+const FOLD: Record<string, MarkTag> = {
+ a: 'a', mark: 'mark', span: 'span',
+ b: 'strong', strong: 'strong',
+ i: 'em', em: 'em',
+ u: 'u', s: 's', strike: 's',
+ sub: 'sub', sup: 'sup', code: 'code',
+}
+
+/** Marks the floating toolbar can toggle, in the order it shows them. */
+export const TOOLBAR_MARKS: MarkTag[] = ['strong', 'em', 'u', 's', 'code', 'mark']
+
+/** One mark on a run. `attrs` is the verbatim attribute text, `a`'s href only. */
+export interface Mark { tag: MarkTag; attrs: string }
+
+/**
+ * One stretch of text (or one `<br>`) carrying a set of marks.
+ *
+ * A `<br>` is a run of LENGTH ONE with no text. It has to occupy an offset or
+ * the DOM side and the string side would count a block's characters
+ * differently, and every mark applied after a line break would land one
+ * character out.
+ */
+export interface Run { text: string; br?: true; marks: Mark[] }
+
+// ---- entities ---------------------------------------------------------------
+//
+// Decode on parse, re-encode on serialize, and the encode side is EXACTLY the
+// html spec's text-node serialization (`&`, U+00A0, `<`, `>` and nothing else)
+// — which is what `Element.innerHTML` hands back. The model's html is read
+// straight off `innerHTML` on every keystroke, so an encoder that differed from
+// the browser's by one character would make every canonicalisation report a
+// change and every save differ from the last for no reason.
+
+const decode = (s: string): string =>
+ s.replace(/&(#\d+|#[xX][0-9a-fA-F]+|[a-zA-Z]+);/g, (m, body: string) => {
+ if (body[0] === '#') {
+ const n = body[1] === 'x' || body[1] === 'X' ? parseInt(body.slice(2), 16) : parseInt(body.slice(1), 10)
+ return Number.isFinite(n) && n > 0 && n <= 0x10ffff ? String.fromCodePoint(n) : m
+ }
+ const named: Record<string, string> = { amp: '&', lt: '<', gt: '>', quot: '"', apos: "'", nbsp: '\u00a0' }
+ return named[body] ?? m
+ })
+
+const encode = (s: string): string =>
+ s.replace(/&/g, '&amp;').replace(/\u00a0/g, '&nbsp;').replace(/</g, '&lt;').replace(/>/g, '&gt;')
+
+// ---- parse ------------------------------------------------------------------
+
+/**
+ * Attribute text worth keeping — the same two rules sanitize.ts applies, so a
+ * canonicalisation can never re-introduce something the sanitizer removed.
+ *
+ * `A` keeps its attributes verbatim (href, and the rel/target sanitizeInline
+ * pins on an outward link); SPAN and MARK keep a palette class and nothing
+ * else. Every other tag keeps nothing at all.
+ */
+function attrsOf(tag: MarkTag, raw: string): string {
+ if (tag === 'a') return raw.trim() ? ` ${raw.trim()}` : ''
+ if (tag !== 'span' && tag !== 'mark') return ''
+ const m = /class\s*=\s*(?:"([^"]*)"|'([^']*)'|([^\s>]+))/i.exec(raw)
+ const kept = keepClasses(m ? (m[1] ?? m[2] ?? m[3] ?? '') : '')
+ return kept ? ` class="${kept}"` : ''
+}
+
+/** The palette name a mark carries, or '' for the plain/default form. */
+export function colourOf(attrs: string): string {
+ const m = /sp-(?:fg|bg)-([a-z0-9-]{1,16})/.exec(attrs)
+ return m ? m[1] : ''
+}
+
+/** The attribute text for one palette choice. '' means "the default". */
+export const colourAttrs = (role: 'fg' | 'bg', name: string): string =>
+ name ? ` class="sp-${role}-${name}"` : ''
+
+const TAG_RE = /<(\/?)([a-zA-Z][a-zA-Z0-9]*)((?:[^>"']|"[^"]*"|'[^']*')*)\/?>/g
+
+/**
+ * Inline html → a flat list of runs.
+ *
+ * Tolerant by construction. This reads html that a browser's contentEditable
+ * wrote, that a paste left behind, or that a person hand-edited in the JSON
+ * round trip, so an unmatched `</b>` is skipped and an unclosed `<b>` simply
+ * runs to the end. Refusing to parse would mean refusing to canonicalise, which
+ * is the opposite of what a canonicaliser is for.
+ *
+ * A bare `<span>` is DROPPED rather than kept. It is not information loss:
+ * sanitize.ts strips every attribute from every tag but `A.href`, so a span in
+ * a block's html carries nothing at all by the time it reaches here — it is
+ * debris from contentEditable, and keeping it would mean two byte-different
+ * spellings of identical content.
+ */
+export function parseRuns(html: string): Run[] {
+ const runs: Run[] = []
+ // one entry per open tag, so `</span>` pops the span and not the `<b>` under
+ // it; `mark: null` is an open tag that is not a mark
+ const stack: Array<{ name: string; mark: Mark | null }> = []
+ const marksNow = (): Mark[] => {
+ const out: Mark[] = []
+ for (const e of stack) if (e.mark && !out.some((m) => m.tag === e.mark!.tag)) out.push(e.mark)
+ return out
+ }
+ const pushText = (raw: string) => {
+ if (!raw) return
+ runs.push({ text: decode(raw), marks: marksNow() })
+ }
+
+ let at = 0
+ TAG_RE.lastIndex = 0
+ let m: RegExpExecArray | null
+ while ((m = TAG_RE.exec(html))) {
+ pushText(html.slice(at, m.index))
+ at = TAG_RE.lastIndex
+ const name = m[2].toLowerCase()
+ const close = m[1] === '/'
+ if (name === 'br') { if (!close) runs.push({ text: '', br: true, marks: marksNow() }); continue }
+ if (close) {
+ for (let i = stack.length - 1; i >= 0; i--) {
+ if (stack[i].name === name) { stack.splice(i, 1); break }
+ }
+ continue
+ }
+ const tag = FOLD[name]
+ const attrs = tag ? attrsOf(tag, m[3]) : ''
+ // A SPAN IS ONLY A MARK WHEN IT CARRIES A PALETTE CLASS. Without one it
+ // says nothing — sanitize.ts allows no other attribute on it — so it is
+ // contentEditable debris, and keeping it would mean two byte-different
+ // spellings of identical content.
+ const real = !!tag && (tag !== 'span' || !!attrs)
+ stack.push({ name, mark: real ? { tag: tag as MarkTag, attrs } : null })
+ }
+ pushText(html.slice(at))
+ return runs
+}
+
+// ---- serialize --------------------------------------------------------------
+
+const rank = (m: Mark): number => ORDER.indexOf(m.tag)
+const sortMarks = (marks: Mark[]): Mark[] => [...marks].sort((a, b) => rank(a) - rank(b))
+const same = (a: Mark, b: Mark): boolean => a.tag === b.tag && a.attrs === b.attrs
+
+/**
+ * Runs → canonical inline html.
+ *
+ * Marks are opened in ORDER and closed innermost-first, and a mark is only
+ * closed when the next run does not carry it — which is what coalesces adjacent
+ * identical runs, without a separate pass and without the fixed-point loop the
+ * old string canonicaliser needed. Empty runs never open anything, so
+ * `<b></b>` cannot be emitted.
+ */
+export function serializeRuns(runs: Run[]): string {
+ let out = ''
+ let open: Mark[] = []
+ for (const run of runs) {
+ if (!run.br && !run.text) continue
+ const want = sortMarks(run.marks)
+ let keep = 0
+ while (keep < open.length && keep < want.length && same(open[keep], want[keep])) keep++
+ for (let i = open.length - 1; i >= keep; i--) out += `</${open[i].tag}>`
+ for (let i = keep; i < want.length; i++) out += `<${want[i].tag}${want[i].attrs}>`
+ open = want
+ out += run.br ? '<br>' : encode(run.text)
+ }
+ for (let i = open.length - 1; i >= 0; i--) out += `</${open[i].tag}>`
+ return out
+}
+
+/**
+ * The canonical form of a block's inline html — §2.3's "fixed mark nesting
+ * order, adjacent runs coalesced, no style".
+ *
+ * IDEMPOTENT, and structurally so rather than by luck: `parseRuns` of canonical
+ * html yields runs that differ from the originals only by having been split at
+ * tag boundaries, and `serializeRuns` re-merges exactly those.
+ */
+export function canonicalMarks(html: string): string {
+ return serializeRuns(parseRuns(html))
+}
+
+// ---- markdown ---------------------------------------------------------------
+
+/**
+ * The markdown spelling of each mark, open and close.
+ *
+ * EVERY MARK HAS ONE. A control that produces something the exporter silently
+ * drops is worse than not having the control, because the loss only shows up
+ * in a file somebody already sent — and `u`, `mark`, `sub` and `sup` were all
+ * dropped before this table existed.
+ *
+ * The four that markdown has no syntax for are written in the form THIS APP'S
+ * OWN IMPORTER reads back as the same mark, so export→import is the identity
+ * function and needs no second table to stay honest — the same reason callout
+ * tones are spelled `> [!NOTE]`, exactly as GitHub spells it.
+ *
+ * · `mark` → `==x==`, Obsidian's and Pandoc's spelling, which markdown.ts's
+ * `inlineHtml` already parses. Readable as plain text where it is not.
+ * · `u`, `sub`, `sup` → raw inline html, which GFM permits and markdown.ts's
+ * raw-tag sweep keeps (its INLINE_OK list). GitHub's own documentation
+ * tells you to write `<sub>`/`<sup>` this way because there is no other
+ * way. `_x_` for underline was rejected outright: it re-imports as ITALIC,
+ * and a mark that comes back as a DIFFERENT mark is worse than one that
+ * comes back as nothing. `~x~`/`^x^` were rejected as a Pandoc extension
+ * almost nothing else parses — the round trip would hold inside this app
+ * and read as literal tildes and carets everywhere else.
+ */
+const MD: Record<MarkTag, [string, string]> = {
+ a: ['[', ']'],
+ mark: ['==', '=='],
+ span: ['<span>', '</span>'],
+ strong: ['**', '**'],
+ em: ['*', '*'],
+ u: ['<u>', '</u>'],
+ s: ['~~', '~~'],
+ sub: ['<sub>', '</sub>'],
+ sup: ['<sup>', '</sup>'],
+ code: ['`', '`'],
+}
+
+const hrefOf = (m: Mark): string => {
+ const found = /href\s*=\s*"([^"]*)"/i.exec(m.attrs)
+ return found ? decode(found[1]) : ''
+}
+
+/**
+ * Inline html → inline markdown.
+ *
+ * Runs, not a DOM walk. The DOM version could not be tested — the rigs are
+ * plain node — so "does every mark the toolbar applies survive an export" was
+ * a question only a human with a browser could answer, which is how `u`,
+ * `mark`, `sub` and `sup` came to be dropped without anyone noticing. This is
+ * `serializeRuns` with a different pair of brackets per mark, so the export
+ * inherits the canonical nesting order for free: a link is always outermost,
+ * which is the only nesting markdown can express anyway.
+ */
+export function htmlToMd(html: string): string {
+ const runs = parseRuns(html)
+ let out = ''
+ let open: Mark[] = []
+ // A COLOURED mark is raw html, because markdown has no colour at all; the
+ // PLAIN highlight stays `==x==`, which is native Obsidian syntax and a
+ // Pandoc extension, so it round-trips outside this app as well as inside it.
+ const open1 = (m: Mark): string =>
+ (m.tag === 'span' || (m.tag === 'mark' && m.attrs)) ? `<${m.tag}${m.attrs}>` : MD[m.tag][0]
+ const close = (m: Mark): string =>
+ m.tag === 'a' ? `](${hrefOf(m)})`
+ : (m.tag === 'span' || (m.tag === 'mark' && m.attrs)) ? `</${m.tag}>` : MD[m.tag][1]
+ for (const run of runs) {
+ if (!run.br && !run.text) continue
+ const want = sortMarks(run.marks)
+ let keep = 0
+ while (keep < open.length && keep < want.length && same(open[keep], want[keep])) keep++
+ for (let i = open.length - 1; i >= keep; i--) out += close(open[i])
+ for (let i = keep; i < want.length; i++) out += open1(want[i])
+ open = want
+ out += run.br ? '\n' : run.text
+ }
+ for (let i = open.length - 1; i >= 0; i--) out += close(open[i])
+ return out.trim()
+}
+
+// ---- offsets ----------------------------------------------------------------
+
+const runLen = (r: Run): number => (r.br ? 1 : r.text.length)
+
+/** Total characters, `<br>` counting as one. */
+export function textLength(runs: Run[]): number {
+ let n = 0
+ for (const r of runs) n += runLen(r)
+ return n
+}
+
+/**
+ * Split runs so that `at` falls on a run boundary; returns the run index there.
+ *
+ * This is the whole partial-selection case. Selecting the middle of a bold run
+ * and unbolding splits one run into three, of which the engine then edits the
+ * middle — no DOM surgery, no stale offsets, and the serializer re-merges the
+ * two outer thirds' `<b>`s only if nothing came between them.
+ */
+function splitAt(runs: Run[], at: number): number {
+ let n = 0
+ for (let i = 0; i < runs.length; i++) {
+ const len = runLen(runs[i])
+ if (n === at) return i
+ if (at < n + len) {
+ // a <br> is one indivisible character: an offset inside it is either side
+ if (runs[i].br) return at - n === 0 ? i : i + 1
+ const cut = at - n
+ const r = runs[i]
+ runs.splice(i, 1,
+ { text: r.text.slice(0, cut), marks: r.marks },
+ { text: r.text.slice(cut), marks: r.marks })
+ return i + 1
+ }
+ n += len
+ }
+ return runs.length
+}
+
+/** Does every text-bearing run in the range already carry `tag`? */
+function allHave(runs: Run[], i0: number, i1: number, tag: MarkTag): boolean {
+ let seen = false
+ for (let i = i0; i < i1; i++) {
+ if (runs[i].br) continue
+ if (!runs[i].text) continue
+ seen = true
+ if (!runs[i].marks.some((m) => m.tag === tag)) return false
+ }
+ return seen
+}
+
+/** Is `tag` active across [start,end) of `html`? What the toolbar shades. */
+export function markActive(html: string, start: number, end: number, tag: MarkTag): boolean {
+ const runs = parseRuns(html)
+ const i0 = splitAt(runs, Math.min(start, end))
+ const i1 = splitAt(runs, Math.max(start, end))
+ return allHave(runs, i0, i1, tag)
+}
+
+/** The `href` of a link covering the whole range, or '' — what ⌘K pre-fills. */
+export function linkAt(html: string, start: number, end: number): string {
+ const runs = parseRuns(html)
+ const i0 = splitAt(runs, Math.min(start, end))
+ const i1 = splitAt(runs, Math.max(start, end))
+ let href = ''
+ for (let i = i0; i < i1; i++) {
+ if (runs[i].br || !runs[i].text) continue
+ const a = runs[i].marks.find((m) => m.tag === 'a')
+ if (!a) return ''
+ const m = /href\s*=\s*"([^"]*)"/i.exec(a.attrs)
+ const h = m ? decode(m[1]) : ''
+ if (href && href !== h) return ''
+ href = h
+ }
+ return href
+}
+
+export type MarkOp = 'toggle' | 'on' | 'off'
+
+/**
+ * Apply, remove or toggle one mark over [start,end) of a block's inline html.
+ *
+ * Returns canonical html. Offsets are unchanged by construction — this only
+ * ever moves TAGS, never a character of text — so the caller can restore the
+ * selection with the same numbers it passed in, which is how the whole
+ * "selection offsets go stale after DOM surgery" family of bugs is avoided
+ * rather than worked around.
+ */
+export function applyMark(
+ html: string, start: number, end: number, tag: MarkTag,
+ opts: { op?: MarkOp; attrs?: string } = {},
+): string {
+ const runs = parseRuns(html)
+ const a = Math.max(0, Math.min(start, end))
+ const b = Math.min(textLength(runs), Math.max(start, end))
+ const i0 = splitAt(runs, a)
+ const i1 = splitAt(runs, b)
+ const op = opts.op ?? 'toggle'
+ const on = op === 'on' || (op === 'toggle' && !allHave(runs, i0, i1, tag))
+ const attrs = opts.attrs ?? ''
+ for (let i = i0; i < i1; i++) {
+ const rest = runs[i].marks.filter((m) => m.tag !== tag)
+ runs[i] = { ...runs[i], marks: on ? [...rest, { tag, attrs }] : rest }
+ }
+ return serializeRuns(runs)
+}
+
+/** Strip every mark from [start,end). The toolbar's "Clear formatting". */
+export function clearMarks(html: string, start: number, end: number): string {
+ const runs = parseRuns(html)
+ const i0 = splitAt(runs, Math.max(0, Math.min(start, end)))
+ const i1 = splitAt(runs, Math.min(textLength(runs), Math.max(start, end)))
+ for (let i = i0; i < i1; i++) runs[i] = { ...runs[i], marks: [] }
+ return serializeRuns(runs)
+}
+
+/**
+ * The `<a>` attribute text for a url, spelled EXACTLY as sanitize.ts would
+ * leave it.
+ *
+ * Not "close enough": the block is re-canonicalised on every commit, and if the
+ * sanitizer had to add `rel`/`target` afterwards then the html the toolbar
+ * wrote and the html the next blur produces would differ, so every link would
+ * report itself as an edit once more than it was one.
+ */
+export function linkAttrs(url: string): string {
+ const href = url.replace(/"/g, '&quot;').replace(/&(?!#|[a-zA-Z]+;)/g, '&amp;')
+ return url.startsWith('#')
+ ? ` href="${href}"`
+ : ` href="${href}" rel="noopener noreferrer" target="_blank"`
+}
+
+// ---- the DOM bridge ---------------------------------------------------------
+//
+// Everything above is pure. These two convert a live Range to the offsets it
+// takes and back, and they are the only place a browser is required.
+
+/**
+ * Characters in a subtree, counted the way `parseRuns` counts them.
+ *
+ * THE FRAGMENT CASE IS NOT AN EDGE CASE — it is the only case. This is called
+ * on `cloneContents()`, whose result is a DOCUMENT_FRAGMENT (nodeType 11), so
+ * an "element or nothing" test returns 0 for every input it ever receives and
+ * the toolbar simply never appears. Measured in the built shell: `start` and
+ * `end` both 0 for a four-character selection, `markable()` null, no bar,
+ * nothing in the console.
+ */
+function lenOf(node: Node): number {
+ if (node.nodeType === Node.TEXT_NODE) return (node.nodeValue ?? '').length
+ if (node.nodeType === Node.ELEMENT_NODE && (node as Element).tagName === 'BR') return 1
+ if (node.nodeType !== Node.ELEMENT_NODE && node.nodeType !== Node.DOCUMENT_FRAGMENT_NODE) return 0
+ let n = 0
+ for (const child of node.childNodes) n += lenOf(child)
+ return n
+}
+
+/**
+ * A range's boundaries as plain-text offsets into `host`.
+ *
+ * MEASURED BY CLONING, not by walking to the boundary node. A Range boundary
+ * can sit in a text node, between two element children, or at the end of an
+ * element with no children, and a hand-written walk has to get all three right
+ * every time it is touched. `cloneContents()` of "host start → boundary"
+ * answers all three with one rule, and the clone is discarded immediately.
+ */
+export function offsetsOf(host: HTMLElement, range: Range): { start: number; end: number } | null {
+ if (!host.contains(range.startContainer) || !host.contains(range.endContainer)) return null
+ const upto = (container: Node, offset: number): number => {
+ const probe = host.ownerDocument.createRange()
+ probe.setStart(host, 0)
+ probe.setEnd(container, offset)
+ return lenOf(probe.cloneContents())
+ }
+ return { start: upto(range.startContainer, range.startOffset), end: upto(range.endContainer, range.endOffset) }
+}
+
+/** The reverse: a Range over [start,end) of `host`'s text. */
+export function rangeAt(host: HTMLElement, start: number, end: number): Range {
+ const range = host.ownerDocument.createRange()
+ let n = 0
+ let doneStart = false
+ let doneEnd = false
+ const walk = (node: Node): void => {
+ if (doneEnd) return
+ if (node.nodeType === Node.TEXT_NODE) {
+ const len = (node.nodeValue ?? '').length
+ if (!doneStart && start <= n + len) { range.setStart(node, start - n); doneStart = true }
+ if (!doneEnd && end <= n + len) { range.setEnd(node, end - n); doneEnd = true }
+ n += len
+ return
+ }
+ if (node.nodeType !== Node.ELEMENT_NODE) return
+ if ((node as Element).tagName === 'BR') {
+ const parent = node.parentNode!
+ const at = [...parent.childNodes].indexOf(node as ChildNode)
+ if (!doneStart && start <= n) { range.setStart(parent, at); doneStart = true }
+ if (!doneEnd && end <= n) { range.setEnd(parent, at); doneEnd = true }
+ n += 1
+ return
+ }
+ for (const child of [...node.childNodes]) walk(child)
+ }
+ walk(host)
+ if (!doneStart) { range.selectNodeContents(host); range.collapse(false) }
+ if (!doneEnd) range.setEnd(host, host.childNodes.length)
+ return range
+}
diff --git a/spaces/src/model.ts b/spaces/src/model.ts
index 3cdeb46e..e30cc2d9 100644
--- a/spaces/src/model.ts
+++ b/spaces/src/model.ts
@@ -14,6 +14,7 @@
// There is no server; a break here is permanent.
import type { CollabCreds } from './sync/crdt.ts'
+import { esc, externalHref } from './sanitize.ts'
export const FORMAT = 'bento/spaces'
export const FORMAT_VERSION = 1
@@ -59,10 +60,45 @@ export interface Block {
* Toggles always PRINT expanded — silently omitting content from a printed
* handbook is a data-loss-shaped bug. */
open?: boolean
- /** image: 'asset:<key>' | data: | https: */
+ /** image, media: 'asset:<key>' | data: | https: */
src?: string
alt?: string
caption?: string
+ /**
+ * media: 'video' | 'audio'.
+ *
+ * ONE block type with a kind, not two types, because everything else about
+ * them is identical — the same hybrid src, the same remote-consent gate, the
+ * same still in print and preview, the same playback flags. Two types would
+ * mean two registry entries, two renderer cases and two exporters that have
+ * to be kept saying the same thing.
+ *
+ * An OPEN string, like `type` and `tone`: a kind a future build adds must
+ * round-trip through this one. Anything that is not 'audio' is drawn as
+ * video, which is the shape that degrades usefully — a video element with an
+ * audio file in it plays the audio.
+ */
+ kind?: string
+ /** media: a still frame, same three src forms. Shown before play, and it is
+ * what print and the file-manager preview draw instead of a player. */
+ poster?: string
+ /** media: playback controls for the reader. Absent = shown. */
+ controls?: boolean
+ /** media: repeat at the end. */
+ loop?: boolean
+ /** media: start silent. */
+ muted?: boolean
+ /**
+ * media: RECORDED, NEVER HONOURED. See blocks.ts mediaPlayback().
+ *
+ * A space has no surface that owns playback the way slides' present mode
+ * does — it has an editor, a reading view, a printout and a file-manager
+ * still, and a clip that starts itself is wrong in all four. The field
+ * exists so a document written by a build that DOES have such a surface
+ * round-trips untouched (PLATFORM §3), and so that the rule has somewhere to
+ * be written down. It is not read by this app.
+ */
+ autoplay?: boolean
/** image width as a PERCENTAGE of the text column (10..100). No block
* carries absolute px — the column width is a theme concern. */
width?: number
@@ -71,6 +107,79 @@ export interface Block {
h?: number
/** pagelink: the target page id */
page?: string
+
+ /**
+ * table: the cells, row-major, each one INLINE HTML.
+ *
+ * A cell is a bare string rather than slides' `{html, color, bg, bold}`
+ * object, and that is the one real divergence from the model this is
+ * otherwise copied from. Slides' cells carry presentation because a canvas
+ * has no cascade — every table there paints its own colours. A space has a
+ * theme and a stylesheet, so the only thing left in a cell is its content,
+ * and its content is already rich: **bold** in a cell is `<b>`, exactly as in
+ * every other block, through the same allowlist. Nothing is lost and the
+ * whole style object goes away.
+ *
+ * Row 0 is the header unless `header` is false — see below.
+ *
+ * UNDER COLLABORATION this whole field is one last-writer-wins register, so
+ * two people editing DIFFERENT cells at the same time keep only one of the
+ * two edits. Slides' table has the identical limitation and documents it;
+ * the fix (a node per cell) is a format change, so it is written down here
+ * rather than half-built.
+ */
+ rows?: string[][]
+ /**
+ * table: fractional column weights, one per column. Absent = equal columns.
+ *
+ * FRACTIONS, never pixels, for the reason `Block.width` is a percentage: the
+ * text column is a theme concern and the same file is read at 320px and at
+ * 1600px. Dragging a column boundary changes two weights and nothing else.
+ */
+ cols?: number[]
+ /**
+ * table: per-COLUMN text alignment — '' | 'left' | 'center' | 'right'.
+ *
+ * Per column, not per cell, because that is what a pipe table can say: GFM
+ * encodes alignment in the `:---:` rule row and nowhere else. Per-cell
+ * alignment would export as a lie on every second row.
+ */
+ colAlign?: string[]
+ /**
+ * table: false when the first row is ordinary data.
+ *
+ * ABSENT MEANS TRUE, which is the opposite of every other boolean here and is
+ * deliberate: a GFM pipe table always has a header, so the header case is
+ * what a table imported from markdown, written by an agent, or hand-authored
+ * with the two fields above will be — and it should be the case that needs no
+ * field. A headerless table says so, and exports with an empty header row.
+ */
+ header?: boolean
+
+ /**
+ * link: the address the card opens. `https:`, `http:` or `mailto:` only —
+ * anything else is not made clickable (see `linkCard`).
+ */
+ url?: string
+ /** link: the headline. Absent falls back to the url itself, never to a blank
+ * box — an empty field must still leave a working link. */
+ title?: string
+ /** link: the author's one-line description of what is at the other end. */
+ desc?: string
+ /** link: the site's name. Absent is DERIVED from the url's host, which needs
+ * no network — it is string parsing, not a lookup. */
+ site?: string
+ /**
+ * link: a thumbnail, `asset:<key>` or `data:` and NOTHING ELSE.
+ *
+ * A remote thumbnail is the tracking pixel of the 2026-08-03 decision wearing
+ * a card for a hat: it would fire on open, in a document whose whole premise
+ * is that you can mail it. `linkCard` drops one rather than deferring it
+ * behind a placeholder, because an image block's placeholder stands in for
+ * the block's entire content while a card's thumbnail is decoration — there
+ * is nothing for a reader to consent to and nothing lost by its absence.
+ */
+ image?: string
/**
* callout: which kind of callout this is — one of blocks.ts CALLOUT_TONES.
*
@@ -93,9 +202,65 @@ export interface Block {
*/
icon?: string
+ /**
+ * Review threads anchored to THIS block. See `Comment` below for why they
+ * live on the block rather than in one list on the page.
+ */
+ comments?: Comment[]
+
[extra: string]: unknown
}
+/** One message in a thread. The first one IS the thread (`Comment` extends it). */
+export interface CommentEntry {
+ id: string
+ author: string
+ /** ISO datetime */
+ at: string
+ /**
+ * PLAIN TEXT, never html, and the only field in this format that is.
+ *
+ * A block's `html` earns its markup and pays for it with sanitize.ts. A
+ * comment has nothing to gain from bold — and it arrives in a file somebody
+ * mailed you, from a person who is by definition not the author of the
+ * document. So the answer is not "sanitize it too" but "there is nothing to
+ * sanitize": it is stored as a string and written to the screen with
+ * `textContent`, so `<img onerror>` in a comment is four words a reader can
+ * see rather than a parse this app has to be careful about.
+ */
+ text: string
+}
+
+/**
+ * A review thread. Saved in the file so it travels with the document, and
+ * EDITOR-ONLY: `render.ts` never emits one, so it cannot reach the reading
+ * view or the printed page. A comment is workspace, not document.
+ *
+ * WHERE A THREAD LIVES IS ITS ANCHOR. A deck is a canvas, so slides can point
+ * at an (x, y); a space is a tree of pages of blocks, and the block is the
+ * thing that already has a durable identity — ids are unique document-wide and
+ * are never reused, which is exactly what links and backlinks key on. So there
+ * are two anchors and no third: `Block.comments` is a thread about that block,
+ * `Page.comments` is a thread about the page. A text RANGE inside a block is
+ * deliberately not one: an offset pair has no meaning after the concurrent
+ * edit that moved it, and inventing one now would freeze the wrong answer into
+ * every file.
+ *
+ * Storing a block thread ON THE BLOCK is a collaboration decision, not a
+ * filing one. Under the CRDT every non-container property is one
+ * last-writer-wins register (kernel/src/sync/crdt.ts), so one `Page.comments`
+ * array would make every thread on a page contend for a single register: two
+ * people commenting on two different paragraphs at the same moment, and one
+ * comment is gone with nothing said. Per block, that case converges. What
+ * remains — two people commenting on the SAME block, or on the same page,
+ * concurrently — is still last-writer-wins, exactly as slides' table `rows`
+ * is, and is written down rather than pretended away.
+ */
+export interface Comment extends CommentEntry {
+ resolved?: boolean
+ replies?: CommentEntry[]
+}
+
export interface Page {
id: string
title: string
@@ -137,6 +302,8 @@ export interface Page {
/** out of the sidebar, still searchable and linkable, and ENUMERATED at
* share time — an author archived a page precisely because it was sensitive */
archived?: boolean
+ /** review threads about the page as a whole — see `Comment` */
+ comments?: Comment[]
created?: string
edited?: string
[extra: string]: unknown
@@ -246,8 +413,13 @@ const isObj = (v: unknown): v is Record<string, unknown> =>
* `template: true` re-mints on every open, so a docId-derived id gives two
* readers of one file DIFFERENT ids: exactly the failure repair exists to
* prevent).
+ *
+ * EXPORTED because the subtree import needs exactly this and must not invent a
+ * second scheme: an arriving id that collides with one this space already uses
+ * is renamed here, under the same derivation and the same reasoning
+ * (src/portable.ts planGraft).
*/
-function repairId(scope: string, ordinal: number, content: string, salt = 0): string {
+export function repairId(scope: string, ordinal: number, content: string, salt = 0): string {
let h = 0x811c9dc5
const s = `${scope}${ordinal}${content}${salt}`
for (let i = 0; i < s.length; i++) {
@@ -490,8 +662,42 @@ export function buildIndex(doc: SpacesDoc): SpaceIndex {
return { page, children, block, backlinks }
}
+/** A thread, with the anchor it was found at. `blockId` absent = the page. */
+export interface CommentAt {
+ comment: Comment
+ pageId: string
+ blockId?: string
+}
+
+/**
+ * Every thread on a page, page-level first, then block threads in page order.
+ *
+ * The ONE reader of both anchors, so the badge, the marker layer and the agent
+ * report cannot disagree about what a page holds. Defensive about the shape
+ * because this data arrives in a file: `comments: "yes"` must be ignored, not
+ * iterated.
+ */
+export function commentsOn(page: Page): CommentAt[] {
+ const out: CommentAt[] = []
+ const take = (list: unknown, blockId?: string) => {
+ if (!Array.isArray(list)) return
+ for (const c of list) {
+ if (c && typeof c === 'object' && typeof (c as Comment).id === 'string') {
+ out.push({ comment: c as Comment, pageId: page.id, ...(blockId ? { blockId } : {}) })
+ }
+ }
+ }
+ take(page.comments)
+ for (const b of page.blocks) take(b.comments, b.id)
+ return out
+}
+
+/** How many threads on this page are still open — the sidebar badge. */
+export const unresolvedOn = (page: Page): number =>
+ commentsOn(page).reduce((n, c) => n + (c.comment.resolved ? 0 : 1), 0)
+
/** The page a reader lands on. */
-export const homePage = (doc: SpacesDoc): Page | undefined =>
+export const homePage =(doc: SpacesDoc): Page | undefined =>
(doc.home ? doc.pages.find((p) => p.id === doc.home) : undefined) ?? doc.pages[0]
/**
@@ -507,3 +713,171 @@ export function isRemote(src: string): boolean {
if (!src) return false
return !src.startsWith('asset:') && !src.startsWith('data:')
}
+
+// ---- tables ----------------------------------------------------------------
+// A table is CONTENT (working/spaces-design.md §2.6): no formulas, no
+// recalculation, no cross-document references. The line the suite draws is
+// "would you print it → folio; does it recalculate → dash; does it link to
+// pages → spaces", and a table whose cells are inline html — so a cell can
+// hold a `#p/` link — is squarely on this side of it. The DATABASE case already
+// shipped, as the tracker (doc.fields + prop + view blocks), and is not this.
+
+/** The upper bound on a table's shape. A file can be hand-edited or generated,
+ * and the renderer should not be asked for a hundred thousand cells. */
+export const TABLE_MAX_COLS = 32
+export const TABLE_MAX_ROWS = 400
+
+export interface TableShape {
+ rows: string[][]
+ cols: number[]
+ colAlign: string[]
+ header: boolean
+ /** columns and rows, after normalisation */
+ w: number
+ h: number
+}
+
+/**
+ * ONE answer to "what shape is this table" — for the renderer, the editor and
+ * the markdown exporter alike.
+ *
+ * Every table field is optional in the format, and the file may have been
+ * written by hand, by an agent, or by a build that is not this one. So a ragged
+ * `rows`, a `cols` of the wrong length, and a `rows` that is not an array at
+ * all are ordinary inputs here rather than errors.
+ *
+ * It normalises AT READ TIME and never by rewriting the document — the same
+ * choice `effectiveParents` makes, for the same reason: two readers of one file
+ * agree without exchanging an op, and merely opening a space repairs nothing.
+ */
+export function tableOf(b: Block): TableShape {
+ const raw = Array.isArray(b.rows) ? (b.rows as unknown[]) : []
+ const asRow = (r: unknown): string[] =>
+ (Array.isArray(r) ? r : []).slice(0, TABLE_MAX_COLS).map((c) => (typeof c === 'string' ? c : ''))
+ let rows = raw.slice(0, TABLE_MAX_ROWS).map(asRow)
+ const w = Math.max(1, ...rows.map((r) => r.length))
+ rows = rows.map((r) => (r.length === w ? r : [...r, ...Array(w - r.length).fill('')]))
+ if (!rows.length) rows = [Array(w).fill('')]
+ const num = (v: unknown): number => (typeof v === 'number' && v > 0 && Number.isFinite(v) ? v : 1)
+ const src = Array.isArray(b.cols) ? (b.cols as unknown[]) : []
+ const cols = Array.from({ length: w }, (_, i) => num(src[i]))
+ const al = Array.isArray(b.colAlign) ? (b.colAlign as unknown[]) : []
+ const colAlign = Array.from({ length: w }, (_, i) =>
+ al[i] === 'left' || al[i] === 'center' || al[i] === 'right' ? String(al[i]) : '')
+ return { rows, cols, colAlign, header: b.header !== false, w, h: rows.length }
+}
+
+/**
+ * What a build that has never heard of a `table` block shows.
+ *
+ * The format is additive forever, and for a block TYPE additive means the
+ * unknown type falls back to rendering its `html` (spaces/README.md). So a
+ * table keeps one — derived, rewritten on every edit, never authored.
+ *
+ * It is the cells' OWN INLINE HTML joined, not their plain text: a `#p/` link
+ * in a cell then still produces a backlink (buildIndex reads `html`), still
+ * turns up in ⌘F, and still exports from an older build as a link rather than
+ * as a bare word.
+ *
+ * It costs a second copy of the table's text in the file, and that is the price
+ * of a permanent format. The alternative is a table that VANISHES when the
+ * space is opened by the build someone already has, which is not a trade worth
+ * making for a few hundred bytes.
+ */
+export function tableFallbackHtml(rows: string[][]): string {
+ return rows.map((r) => r.filter((c) => c.trim()).join(' · ')).filter(Boolean).join('<br>')
+}
+
+/**
+ * Write a shape back onto a block — the ONE writer, so `html` can never drift
+ * from `rows`.
+ *
+ * Defaults are OMITTED rather than written: equal columns store no `cols`, no
+ * alignment stores no `colAlign`, a header stores no `header`. A table built
+ * here and a table parsed out of a pipe table are then the same bytes, and the
+ * minimal hand-written `{ type: 'table', rows: [[…]] }` is a first-class
+ * document rather than something this build would "fix" on the next edit.
+ */
+export function writeTable(b: Block, t: Pick<TableShape, 'rows' | 'cols' | 'colAlign' | 'header'>): void {
+ b.rows = t.rows
+ if (t.cols.some((c) => c !== t.cols[0])) b.cols = t.cols
+ else delete b.cols
+ if (t.colAlign.some(Boolean)) b.colAlign = t.colAlign
+ else delete b.colAlign
+ if (t.header) delete b.header
+ else b.header = false
+ b.html = tableFallbackHtml(t.rows)
+}
+
+/** A link card, with every field already decided. */
+export interface LinkCard {
+ /** '' when the stored url is not an outward link — then the card is not clickable */
+ url: string
+ /** never '' when there is a url: it falls back to the url itself */
+ title: string
+ desc: string
+ /** stored, else the url's host */
+ site: string
+ /** an emoji or a short mark, capped */
+ icon: string
+ /** '' unless the thumbnail is local (`asset:` or `data:`) */
+ image: string
+}
+
+/**
+ * What a `link` block SHOWS — resolved here, once, for every surface.
+ *
+ * EVERYTHING IS ALREADY IN THE FILE. There is no fetch on this path and there
+ * cannot be one: PLATFORM §1 says a document needs no network to open, and
+ * "A space does not phone home when it is opened" (DECISIONS, 2026-08-03) says
+ * it in this app's own words. A link card in Notion or Slack is a server
+ * fetching OpenGraph tags; a link card here is what the author typed. So this
+ * function's whole job is falling back gracefully — a card with three empty
+ * fields still has to be a working link, and a card with no url at all still
+ * has to be something a reader can look at without wondering what broke.
+ *
+ * PURE and DOM-FREE, so the fallbacks are testable in node — including the
+ * negative one, that a remote `image` yields no src for a renderer to load.
+ */
+export function linkCard(b: Block): LinkCard {
+ const url = externalHref(b.url)
+ const title = String(b.title ?? '').trim()
+ const site = String(b.site ?? '').trim()
+ const image = String(b.image ?? '')
+ return {
+ url,
+ // the url is the honest headline for an untitled card: a reader can see
+ // where it goes, which is the one thing a link has to say
+ title: title || url,
+ desc: String(b.desc ?? '').trim(),
+ site: site || hostOf(url),
+ // capped because it is drawn in a fixed slot and it comes from a file
+ // someone mailed you — a 400-character "emoji" is a layout attack
+ icon: String(b.icon ?? '').trim().slice(0, 8),
+ image: image && !isRemote(image) ? image : '',
+ }
+}
+
+/**
+ * The card's READABLE FORM, as `Block.html`.
+ *
+ * The same contract a `prop` block keeps, for the same reason: `html` is what a
+ * build that has never heard of this type renders (render.ts's default case),
+ * so a card written today is still a working link in a shell built last year.
+ * Format additivity is a promise about what OLD builds do, and it is only kept
+ * by writing the fallback at the same moment as the fields.
+ *
+ * Every path that sets a card's fields goes through the one writer that also
+ * calls this (editor.applyLinkCard), so the two cannot fall out of step.
+ */
+export function linkCardHtml(c: LinkCard): string {
+ const tail = c.desc ? ` — ${esc(c.desc)}` : ''
+ if (!c.url) return esc([c.title, c.desc].filter(Boolean).join(' — '))
+ return `<a href="${esc(c.url)}">${esc(c.title || c.url)}</a>${tail}`
+}
+
+/** The host part of a url, or '' — parsing, never a lookup. */
+function hostOf(url: string): string {
+ if (!url) return ''
+ try { return new URL(url).host.replace(/^www\./, '') } catch { return '' }
+}
diff --git a/spaces/src/portable.ts b/spaces/src/portable.ts
new file mode 100644
index 00000000..5e82af85
--- /dev/null
+++ b/spaces/src/portable.ts
@@ -0,0 +1,416 @@
+// SPDX-License-Identifier: MIT
+// Copyright (c) 2026 The Bento authors
+// The two portability exits: a page LEAVES as its own space, and a space
+// ARRIVES nested inside this one.
+//
+// PURE, and deliberately DOM-FREE, for the same reason markdown.ts is: the
+// cases that decide whether either direction loses data — an id that collides,
+// a link that points outside what travelled, two spaces holding the same image
+// under different keys — are cheap to assert in node under
+// `scripts/test-spaces-model.ts` and miserable to click through. The browser
+// halves (writing a shell, reading a file, sanitizing, committing) live in
+// editor.ts and main.ts.
+//
+// IT DOES NOT SANITIZE. Both directions move html between documents; the
+// importer runs `sanitizeInline` over every grafted block before it reaches the
+// document, exactly as the Markdown import does. One security gate, in the
+// place that already has the tests for it.
+
+// `.ts` extensions ON PURPOSE: node resolves this module directly for the rig.
+import { type SpacesDoc, type Page, type Block, repairId } from './model.ts'
+import { esc } from './sanitize.ts'
+
+/** An `<a href="#p/…">` in a block, however many attributes it carries. */
+const PAGE_LINK = /<a\s([^>]*?)href="#p\/([^"]*)"([^>]*)>([\s\S]*?)<\/a>/g
+
+/**
+ * What a link that no longer has a target becomes.
+ *
+ * The literal `[[Name]]` the Markdown importer leaves behind, and for the same
+ * reason it does: text that still says which page was meant is honest,
+ * searchable, exports as correct Markdown, and RE-RESOLVES if the two halves
+ * are ever brought back together (planImport resolves `[[wikilinks]]` against
+ * the pages a space already has). A silent unlink is a lie about what the file
+ * said; a link left pointing at an id that is not in the file is worse — it
+ * looks live and goes nowhere, and after an import it can even land on a
+ * STRANGER page that happens to hold that id.
+ */
+function literalLink(name: string, label: string): string {
+ const shown = esc(name)
+ return label === shown || !label ? `[[${shown}]]` : `[[${shown}|${label}]]`
+}
+
+/**
+ * Rewrite every `#p/<id>` in one block's html.
+ *
+ * `map` answers with the id the link should carry now, or `null` to make it
+ * text. Returns the html and how many of each happened.
+ */
+function relink(
+ html: string,
+ map: (target: string) => { id: string } | { text: string },
+): { html: string; changed: number; cut: number } {
+ let changed = 0
+ let cut = 0
+ const out = html.replace(PAGE_LINK, (whole, pre: string, target: string, post: string, label: string) => {
+ const r = map(target)
+ if ('id' in r) {
+ if (r.id === target) return whole
+ changed++
+ return `<a ${pre}href="#p/${esc(r.id)}"${post}>${label}</a>`
+ }
+ cut++
+ return literalLink(r.text, label)
+ })
+ return { html: out, changed, cut }
+}
+
+/** Every asset key a block references (`asset:<key>`). */
+function assetKeysOf(b: Block): string[] {
+ const out: string[] = []
+ for (const v of [b.src, (b as Record<string, unknown>).poster]) {
+ if (typeof v === 'string' && v.startsWith('asset:')) out.push(v.slice(6))
+ }
+ return out
+}
+
+const rewriteAssetRefs = (b: Block, map: Map<string, string>): void => {
+ for (const k of ['src', 'poster'] as const) {
+ const v = (b as Record<string, unknown>)[k]
+ if (typeof v === 'string' && v.startsWith('asset:')) {
+ const next = map.get(v.slice(6))
+ if (next) (b as Record<string, unknown>)[k] = `asset:${next}`
+ }
+ }
+}
+
+const clone = <T>(v: T): T => JSON.parse(JSON.stringify(v)) as T
+
+// ---------------------------------------------------------------------------
+// OUT: a page (and, by choice, its subtree) as its own space
+// ---------------------------------------------------------------------------
+
+export interface ExtractStats {
+ pages: number
+ blocks: number
+ assets: number
+ /** links that pointed OUT of what travelled, and are now text */
+ unlinked: number
+}
+
+export interface ExtractOpts {
+ /** carry the pages nested under the root as well */
+ subtree?: boolean
+ /**
+ * The new document's id — SUPPLIED, never minted here.
+ *
+ * A fresh `docId` is not cosmetic. `docId` keys autosave recovery and, with
+ * the credentials below, collaboration identity: an extract that kept its
+ * parent's id is a FORK of that document, and opening it joins the parent's
+ * room and syncs a three-page extract over a two-hundred-page space. The
+ * caller passes the value so this stays pure and the rig can assert on it.
+ */
+ docId: string
+ /** ISO stamp for `modified`; the caller owns the clock */
+ now?: string
+}
+
+/**
+ * The pages that travel: `rootId`, plus its descendants when asked.
+ *
+ * Walks the page tree by `parent`, carrying a visited set — store.ts records
+ * why (two people dragging pages onto each other converge on a cycle, and a
+ * subtree walk from inside one recurses until the stack gives out).
+ */
+export function subtreeIds(doc: SpacesDoc, rootId: string, subtree = true): string[] {
+ const out = [rootId]
+ if (!subtree) return out
+ const seen = new Set(out)
+ for (let i = 0; i < out.length; i++) {
+ const parent = out[i]
+ for (const p of doc.pages) {
+ if (p.parent === parent && !seen.has(p.id)) { seen.add(p.id); out.push(p.id) }
+ }
+ }
+ // document order, so the extract reads the way the sidebar did
+ const order = new Map(doc.pages.map((p, i) => [p.id, i]))
+ return out.sort((a, b) => (order.get(a) ?? 0) - (order.get(b) ?? 0))
+}
+
+/**
+ * A page (and its subtree) as a complete, self-contained bento/spaces document.
+ *
+ * Everything the format guarantees survives: unknown top-level fields, unknown
+ * per-page fields and unknown block types are all carried through untouched
+ * (PLATFORM §3). Exactly three things are deliberately NOT:
+ *
+ * · `collab` — every credential in it. The room, the read key, the writer and
+ * owner private keys and the invite chain are the capability to read and
+ * write the WHOLE space; an extract of three pages that carries them hands
+ * the recipient the other two hundred. The copy paths strip private keys
+ * for reader copies; an extract is a different document, so it keeps none.
+ * · `template` — it re-mints `docId` on every open (model.ts), and a document
+ * that was just given a deliberate identity must keep it.
+ * · assets nobody in the extract references. An export that carries the whole
+ * document's images is a copy with pages hidden, not an extract — and the
+ * images are the only thing in a space with real weight.
+ *
+ * `readonly` IS kept: a reading copy that extracts into an editable file would
+ * quietly upgrade what the sender chose.
+ */
+export function extractSpace(
+ doc: SpacesDoc,
+ rootId: string,
+ opts: ExtractOpts,
+): { doc: SpacesDoc; stats: ExtractStats } {
+ const ids = subtreeIds(doc, rootId, opts.subtree !== false)
+ const inSet = new Set(ids)
+ const titleOf = new Map(doc.pages.map((p) => [p.id, p.title]))
+ const pages: Page[] = doc.pages.filter((p) => inSet.has(p.id)).map((p) => clone(p))
+
+ let unlinked = 0
+ const target = (id: string): { id: string } | { text: string } =>
+ inSet.has(id) ? { id } : { text: titleOf.get(id) ?? id }
+
+ for (const p of pages) {
+ // the root becomes the home page of its own document, so it has no parent;
+ // a child whose parent did not travel is re-homed onto the root rather than
+ // left dangling (parseDoc drops such a parent anyway — doing it here keeps
+ // the shape the author saw)
+ if (p.id === rootId) delete p.parent
+ else if (p.parent && !inSet.has(p.parent)) p.parent = rootId
+ for (const b of p.blocks) {
+ if (b.html) {
+ const r = relink(b.html, target)
+ b.html = r.html
+ unlinked += r.cut
+ }
+ if (b.type === 'pagelink' && typeof b.page === 'string' && !inSet.has(b.page)) {
+ // a pagelink IS its target; with the target gone there is no block left
+ // to be, so it becomes the same honest text an inline link becomes
+ unlinked++
+ b.type = 'p'
+ b.html = literalLink(titleOf.get(b.page) ?? b.page, '')
+ delete b.page
+ }
+ }
+ }
+
+ // ---- assets: only what travelled references ------------------------------
+ const used = new Set<string>()
+ for (const p of pages) for (const b of p.blocks) for (const k of assetKeysOf(b)) used.add(k)
+ // Fonts are the exception, and they are not an exception to the rule: a
+ // `@font-face` the theme names is referenced by every page in the document.
+ // Dropping it changes how the extract LOOKS, which an export must not do.
+ const fonts = (doc.fonts ?? []).filter((f) => (doc.assets ?? {})[f.asset] !== undefined)
+ for (const f of fonts) used.add(f.asset)
+ const assets: Record<string, string> = {}
+ for (const k of used) {
+ const v = (doc.assets ?? {})[k]
+ if (v !== undefined) assets[k] = v
+ }
+
+ const out: SpacesDoc = {
+ ...clone(doc),
+ docId: opts.docId,
+ title: titleOf.get(rootId) || doc.title,
+ pages,
+ // The home page MUST exist in the new file. `homePage()` falls back to
+ // pages[0], so a stale `home` would open on whichever page happened to sort
+ // first — silently the wrong page, in the one file where the author chose.
+ home: rootId,
+ ...(Object.keys(assets).length ? { assets } : {}),
+ ...(fonts.length ? { fonts } : {}),
+ modified: opts.now ?? new Date().toISOString(),
+ }
+ if (!Object.keys(assets).length) delete out.assets
+ if (!fonts.length) delete out.fonts
+ delete out.collab
+ delete out.template
+
+ return {
+ doc: out,
+ stats: {
+ pages: pages.length,
+ blocks: pages.reduce((n, p) => n + p.blocks.length, 0),
+ assets: Object.keys(assets).length,
+ unlinked,
+ },
+ }
+}
+
+// ---------------------------------------------------------------------------
+// IN: another space, nested under a page of this one
+// ---------------------------------------------------------------------------
+
+export interface GraftStats {
+ pages: number
+ blocks: number
+ /** ids this space already used, so the arriving copy was renamed */
+ renamed: number
+ /** links inside the import, repointed at the renamed ids */
+ relinked: number
+ /** links that named nothing in the imported file, and are now text */
+ dropped: number
+ /** images that travelled (a shared image is stored once, not twice) */
+ assets: number
+}
+
+export interface GraftPlan {
+ pages: Page[]
+ /** asset entries to add — already keyed so nothing in the host is overwritten */
+ assets: Record<string, string>
+ fonts: NonNullable<SpacesDoc['fonts']>
+ stats: GraftStats
+}
+
+/**
+ * Another space's pages, ready to be pushed into this one under `under`.
+ *
+ * ID POLICY: an arriving id is KEPT when this space does not already use it,
+ * and only a collision is renamed — the same rule parseDoc applies to a
+ * duplicate within one file (first occurrence keeps the id). Keeping ids where
+ * it is safe means a link, a backlink and a future CRDT node key all survive an
+ * import that changes nothing; renaming everything unconditionally would churn
+ * every id in a file for no reason.
+ *
+ * A replacement is derived from the BYTES with model.ts's `repairId`, not from
+ * `Math.random` and not from `docId` — the reasoning is written beside that
+ * function and applies unchanged here: two readers must be able to derive the
+ * same answer from the same input, and `docId` moves under `template: true`.
+ * Deterministic also means this rig can assert on it.
+ *
+ * Ids are unique across the WHOLE document and are never reused, so pages and
+ * blocks are claimed from ONE namespace.
+ */
+export function planGraft(
+ host: SpacesDoc,
+ incoming: SpacesDoc,
+ opts: { under?: string } = {},
+): GraftPlan {
+ const taken = new Set<string>()
+ for (const p of host.pages) {
+ taken.add(p.id)
+ for (const b of p.blocks) taken.add(b.id)
+ }
+
+ let renamed = 0
+ const idMap = new Map<string, string>()
+ const claim = (id: string, scope: string, ordinal: number, content: string): string => {
+ if (id && !taken.has(id)) { taken.add(id); idMap.set(id, id); return id }
+ let salt = 0
+ let next = repairId(scope, ordinal, content, salt)
+ while (taken.has(next)) next = repairId(scope, ordinal, content, ++salt)
+ taken.add(next)
+ if (id) { idMap.set(id, next); renamed++ }
+ return next
+ }
+
+ const pages: Page[] = incoming.pages.map((p) => clone(p))
+ // pages first, in pre-order, so a block's owning page id is final before its
+ // own replacement is derived from it — parseDoc claims ids the same way
+ pages.forEach((p, pi) => {
+ const own = p.id
+ p.id = claim(own, String(p.parent ?? ''), pi, p.title ?? '')
+ p.blocks.forEach((b, bi) => {
+ b.id = claim(b.id, p.id, bi, `${b.type}${b.html ?? ''}`)
+ })
+ })
+
+ const arrived = new Set(incoming.pages.map((p) => p.id))
+ const titleOf = new Map(incoming.pages.map((p) => [p.id, p.title]))
+
+ // parents: inside the import they follow the rename; a root page is re-homed
+ // under the chosen page of THIS space
+ const hostPages = new Set(host.pages.map((p) => p.id))
+ const under = opts.under && hostPages.has(opts.under) ? opts.under : undefined
+ pages.forEach((p, i) => {
+ const parent = incoming.pages[i].parent
+ if (parent && arrived.has(parent)) p.parent = idMap.get(parent) ?? parent
+ else if (under) p.parent = under
+ else delete p.parent
+ })
+
+ // ---- links ---------------------------------------------------------------
+ let relinked = 0
+ let dropped = 0
+ const target = (id: string): { id: string } | { text: string } => {
+ if (!arrived.has(id)) return { text: titleOf.get(id) ?? id }
+ return { id: idMap.get(id) ?? id }
+ }
+ for (const p of pages) {
+ for (const b of p.blocks) {
+ if (b.html) {
+ const r = relink(b.html, target)
+ b.html = r.html
+ dropped += r.cut
+ relinked += r.changed
+ }
+ if (b.type === 'pagelink' && typeof b.page === 'string') {
+ if (arrived.has(b.page)) {
+ const next = idMap.get(b.page) ?? b.page
+ if (next !== b.page) { b.page = next; relinked++ }
+ } else {
+ dropped++
+ b.type = 'p'
+ b.html = literalLink(titleOf.get(b.page) ?? b.page, '')
+ delete b.page
+ }
+ }
+ }
+ }
+
+ // ---- assets --------------------------------------------------------------
+ //
+ // CONTENT-ADDRESSED IS WHAT MAKES THIS SAFE: assets.ts derives a key from a
+ // hash of the bytes, so the same image in two spaces already carries the same
+ // key and a merge is a no-op rather than a duplicate. The two ways a key can
+ // clash are handled the way internAsset handles them — BYTE-COMPARE on a key
+ // hit, and mint a `~n` variant when the bytes differ (a hash collision, or a
+ // hand-written file). Trusting the key alone would replace the host's image
+ // with the visitor's, silently, in a file the author then mails.
+ const assets: Record<string, string> = {}
+ const keyMap = new Map<string, string>()
+ const inAssets = incoming.assets ?? {}
+ const hostAssets = host.assets ?? {}
+ const intern = (key: string): void => {
+ if (keyMap.has(key)) return
+ const bytes = inAssets[key]
+ if (bytes === undefined) return // a reference with no image behind it
+ let k = key
+ for (let n = 1; ; n++) {
+ const held = hostAssets[k] ?? assets[k]
+ if (held === undefined) break // free
+ if (held === bytes) { keyMap.set(key, k); return } // genuinely the same image
+ k = `${key}~${n}`
+ }
+ assets[k] = bytes
+ keyMap.set(key, k)
+ }
+ for (const p of pages) for (const b of p.blocks) for (const k of assetKeysOf(b)) intern(k)
+
+ const haveFont = new Set((host.fonts ?? []).map((f) => `${f.family}|${f.weight ?? ''}|${f.style ?? ''}`))
+ const fonts: NonNullable<SpacesDoc['fonts']> = []
+ for (const f of incoming.fonts ?? []) {
+ if (haveFont.has(`${f.family}|${f.weight ?? ''}|${f.style ?? ''}`)) continue
+ intern(f.asset)
+ const mapped = keyMap.get(f.asset)
+ if (mapped) fonts.push({ ...f, asset: mapped })
+ }
+
+ for (const p of pages) for (const b of p.blocks) rewriteAssetRefs(b, keyMap)
+
+ return {
+ pages,
+ assets,
+ fonts,
+ stats: {
+ pages: pages.length,
+ blocks: pages.reduce((n, p) => n + p.blocks.length, 0),
+ renamed,
+ relinked,
+ dropped,
+ assets: Object.keys(assets).length,
+ },
+ }
+}
diff --git a/spaces/src/preview.ts b/spaces/src/preview.ts
index a1e13fd3..e9b7c87d 100644
--- a/spaces/src/preview.ts
+++ b/spaces/src/preview.ts
@@ -27,6 +27,21 @@
// scoped sheet. It is a SEPARATE, deliberately plain sheet rather than an
// extract of the real one: it renders the document honestly at a glance, and it
// is not trying to be pixel-identical to the editor.
+//
+// AND THIS SURFACE HAS NO THEME — deliberately, now that the editor has one.
+//
+// The app's dark interface is a VIEWER preference: localStorage, read at boot
+// by kernel/src/theme.ts. Nothing here can ask for it. This render exists
+// precisely for the readers that run no script, so there is no boot, no
+// localStorage and no reader to hold a preference — there is a file manager
+// drawing a thumbnail. A `prefers-color-scheme` block here would not be the
+// reader's choice; it would be a guess made on their behalf, and it would
+// fight the one thing this render legitimately does have: `doc.theme`, the
+// colours the AUTHOR gave the document, which the sheet below paints.
+//
+// So the preview is the one surface in this app that stays the author's in
+// both themes, exactly as a thumbnail of a document should. If that ever
+// changes it has to change with the FORMAT, not with a media query.
import type { SpacesDoc, Page } from './model'
import { renderPage } from './render'
@@ -36,7 +51,16 @@ import { homePage } from './model'
* is a courtesy; it must never be why a file is large. */
export const PREVIEW_BUDGET = 64 * 1024
-/** Anything that could run, load, or accept input has no business in a still. */
+/**
+ * Anything that could run, load, or accept input has no business in a still.
+ *
+ * `video`/`audio` are DEFENCE IN DEPTH rather than the mechanism: the render
+ * below passes `printing: true`, and render.ts draws a `media` block as a
+ * poster still under that flag, so no player element is ever built here. This
+ * catches one arriving by some other route — a future block type that embeds
+ * one, or a hand-written document — before a file manager is asked to decode
+ * video to draw an icon.
+ */
const BANNED = 'script,iframe,object,embed,video,audio,canvas,form,input,textarea,select,button,link,meta'
/** Attributes the runtime uses to find things. A still has no runtime. */
@@ -84,8 +108,26 @@ const SHEET = (doc: SpacesDoc): string => {
`.bp figcaption{font-size:13px;color:#5B6472;margin-top:5px}`,
`.bp aside{margin:0 0 14px;padding:12px 14px;border-radius:10px;`,
`border:1px solid #E3E8EF;border-inline-start:3px solid ${accent};background:#F8FAFC}`,
+ // A clip's still: the author's poster frame if there is one, and a quiet
+ // labelled box if not. Flat rules only — QuickLook's WebKit is the
+ // conservative renderer this sheet is written for, so no :has(), no
+ // grid tricks, nothing that could fail to a blank rectangle.
+ `.bp .sp-media-still{margin:0 0 14px;padding:12px;border-radius:8px;`,
+ `border:1px solid #E3E8EF;background:#F8FAFC;text-align:center}`,
+ `.bp .sp-media-still img{max-width:100%;height:auto;border-radius:6px;`,
+ `display:block;margin:0 auto 8px}`,
+ `.bp .sp-media-badge{font-size:13px;color:#5B6472}`,
+ `.bp .sp-media-empty{margin:0 0 14px;padding:12px;border-radius:8px;`,
+ `border:1px dashed #E3E8EF;color:#5B6472;font-size:13px;text-align:center}`,
`.bp code{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:.92em}`,
`.bp a{color:inherit;text-decoration:none;border-bottom:1px solid ${accent}}`,
+ // A table with no rules is four columns of words running together, which is
+ // exactly the "shows a loading animation instead of the document" failure
+ // this file exists to fix, one level down.
+ `.bp table{width:100%;border-collapse:collapse;margin:0 0 14px;font-size:15px;table-layout:fixed}`,
+ `.bp th,.bp td{border:1px solid #E3E8EF;padding:6px 9px;text-align:start;`,
+ `vertical-align:top;word-break:break-word}`,
+ `.bp th{background:#F5F7FA;font-weight:600}`,
].join('')
}
diff --git a/spaces/src/props.ts b/spaces/src/props.ts
new file mode 100644
index 00000000..f1343529
--- /dev/null
+++ b/spaces/src/props.ts
@@ -0,0 +1,422 @@
+// SPDX-License-Identifier: MIT
+// Copyright (c) 2026 The Bento authors
+// The right-hand properties panel — "what can I change about this thing".
+//
+// WHY IT EXISTS. Block settings were scattered across three idioms: a hover
+// chip on the block (language, tone), a floating tool row (image width, media
+// playback), a per-block menu (link card) and the PAGE menu (page width). Each
+// one is discoverable only if you already know it is there, and none of them
+// answers the question in the general case. Slides answers it with a right
+// panel; this is the same panel, the same accordion, the same persisted open
+// state, so the two apps do not teach two different editors.
+//
+// THOSE OTHER SURFACES STAY. This is a second route, not a replacement: the
+// chip on a callout is still the fastest way to change a tone, and taking it
+// away to justify a panel would be a worse editor with a tidier diagram.
+//
+// WIDTH IS THE CONSTRAINT, not a detail. A notes app is the page; a panel that
+// permanently costs 280px of it undoes the wide-page work that shipped one
+// commit ago. So it DEFAULTS TO CLOSED, its state is the reader's
+// (localStorage, never the file), and while it is closed it contributes
+// nothing but a 5px strip — `flex-basis: 0`, no padding, no border. Below the
+// drawer breakpoint it is an overlay, exactly as the page list is, because a
+// third column on a phone is not a column.
+
+import type { Store } from './store'
+import type { Block, Page } from './model'
+import { tableOf, TABLE_MAX_COLS, TABLE_MAX_ROWS } from './model'
+import { CALLOUT_TONES, SPEC } from './blocks'
+import { toneLabel } from './render'
+import { CODE_LANGS, normLang } from './highlight'
+import { t } from './i18n'
+
+/**
+ * What the panel needs from the editor.
+ *
+ * A narrow interface rather than the Editor itself: the panel is allowed to
+ * ask for a repaint and to hand a job back to a picker the editor already
+ * owns, and nothing else. Every one of these already existed — the panel adds
+ * no second implementation of anything it offers.
+ */
+export interface PropsHost {
+ store: Store
+ /** the block the panel is describing — the last one the caret was in */
+ target(): string | null
+ /** the editor is showing the reading view, or the document is locked */
+ locked(): boolean
+ repaint(): void
+ pickPoster(id: string): void
+ pickMedia(id: string): void
+ openIconPicker(pageId: string, anchor: HTMLElement): void
+ /** the editor owns the icon set and the emoji fallback */
+ pageIcon(icon: string | undefined): string
+ openLinkCard(id: string): void
+ addTableRow(id: string, at?: number): void
+ removeTableRow(id: string, at: number): void
+ addTableCol(id: string, at?: number): void
+ removeTableCol(id: string, at: number): void
+}
+
+const OPEN_KEY = 'bento-sp-insp-open'
+
+const mk = <K extends keyof HTMLElementTagNameMap>(
+ tag: K, cls: string, text?: string,
+): HTMLElementTagNameMap[K] => {
+ const n = document.createElement(tag)
+ n.className = cls
+ if (text !== undefined) n.textContent = text
+ return n
+}
+
+export class PropsPanel {
+ private stale = false
+
+ constructor(private host: HTMLElement, private app: PropsHost) {
+ const s = app.store
+ s.on('page', () => this.rebuild(true))
+ s.on('selection', () => this.rebuild(true))
+ s.on('doc', () => this.rebuild())
+ // Slides' rule: a rebuild must not rip the field out from under the person
+ // typing in it, so a doc event lands when focus leaves instead.
+ this.host.addEventListener('focusout', () => {
+ setTimeout(() => {
+ if (this.stale && !this.host.matches(':focus-within')) this.rebuild()
+ }, 0)
+ })
+ this.rebuild(true)
+ }
+
+ /** Rebuild now — for the changes no store event announces (the reading view
+ * flipping, which changes what is editable but not what is in the file). */
+ refresh(): void { this.rebuild(true) }
+
+ /** The caret moved to another block — same panel, different subject. */
+ retarget(): void {
+ if (this.host.dataset.on !== (this.app.target() ?? '')) this.rebuild(true)
+ }
+
+ /** Typing in a text field is an edit in progress; a select is not. */
+ private editing(): boolean {
+ const a = document.activeElement as HTMLElement | null
+ if (!a || !this.host.contains(a)) return false
+ if (a.tagName === 'TEXTAREA' || a.isContentEditable) return true
+ if (a.tagName === 'INPUT') return (a as HTMLInputElement).type !== 'checkbox'
+ return false
+ }
+
+ private rebuild(force = false): void {
+ if (!force && this.editing()) { this.stale = true; return }
+ this.stale = false
+ this.host.innerHTML = ''
+ const s = this.app.store
+ const page = s.page
+ const id = this.app.target()
+ const block = id ? s.block(id) : undefined
+ this.host.dataset.on = id ?? ''
+
+ this.host.append(mk('h2', 'sp-insp-title', t('Properties')))
+ if (block) this.buildBlock(block)
+ else this.host.append(mk('p', 'sp-insp-hint', t('Put the caret in a block to see what it can be.')))
+ if (page) this.buildPage(page)
+ this.accordion()
+ }
+
+ // ---- accordion ------------------------------------------------------------
+
+ /**
+ * The same retrofit slides does: each `.sp-insp-sec` header gathers the
+ * siblings after it into a body it can collapse, and the open state is
+ * remembered PER TITLE so it survives a rebuild, a reload and a different
+ * block being selected.
+ */
+ private accordion(): void {
+ let open: Record<string, boolean> = {}
+ try { open = JSON.parse(localStorage.getItem(OPEN_KEY) ?? '{}') || {} } catch { open = {} }
+ for (const h of [...this.host.querySelectorAll<HTMLElement>('.sp-insp-sec')]) {
+ const key = h.dataset.key ?? h.textContent ?? ''
+ const body = mk('div', 'sp-insp-body')
+ let n: ChildNode | null = h.nextSibling
+ while (n && !(n instanceof HTMLElement && n.classList.contains('sp-insp-sec'))) {
+ const next: ChildNode | null = n.nextSibling
+ body.appendChild(n)
+ n = next
+ }
+ h.after(body)
+ const shut = open[key] === false
+ if (shut) { h.classList.add('sp-shut'); body.style.display = 'none' }
+ h.setAttribute('aria-expanded', String(!shut))
+ h.addEventListener('click', () => {
+ const nowShut = h.classList.toggle('sp-shut')
+ body.style.display = nowShut ? 'none' : ''
+ h.setAttribute('aria-expanded', String(!nowShut))
+ open[key] = !nowShut
+ try { localStorage.setItem(OPEN_KEY, JSON.stringify(open)) } catch { /* locked-down origin */ }
+ })
+ }
+ }
+
+ // ---- block ----------------------------------------------------------------
+
+ private buildBlock(b: Block): void {
+ const label = SPEC.get(b.type)?.label
+ // An unknown type spells ITSELF out rather than claiming to be a paragraph
+ // — a block from a newer build is a thing you can see, not a lie.
+ this.section(t('Block'), label ? t(label) : b.type)
+ switch (b.type) {
+ case 'table': this.tableRows(b); break
+ case 'code': this.codeRows(b); break
+ case 'callout': this.calloutRows(b); break
+ case 'image': this.imageRows(b); break
+ case 'media': this.mediaRows(b); break
+ case 'link': this.linkRows(b); break
+ default:
+ this.host.append(mk('p', 'sp-insp-hint',
+ t('This block has no settings of its own — its content is all of it.')))
+ }
+ }
+
+ private tableRows(b: Block): void {
+ const shape = tableOf(b)
+ this.row(t('Rows'), this.stepper(shape.h, 1, TABLE_MAX_ROWS,
+ () => this.app.addTableRow(b.id),
+ () => this.app.removeTableRow(b.id, shape.h - 1)))
+ this.row(t('Columns'), this.stepper(shape.w, 1, TABLE_MAX_COLS,
+ () => this.app.addTableCol(b.id),
+ () => this.app.removeTableCol(b.id, shape.w - 1)))
+ // ABSENT MEANS TRUE for `header` (model.ts), so the toggle reads the
+ // absence rather than the value.
+ this.row(t('Header row'), this.toggle(b.header !== false, (v) => {
+ this.commit(b.id, (bb) => { if (v) delete bb.header; else bb.header = false })
+ }))
+ }
+
+ private codeRows(b: Block): void {
+ const raw = String(b.lang ?? '').trim()
+ const known = normLang(raw)
+ const opts: Array<[string, string]> = CODE_LANGS.map(
+ (l) => [l.id, l.label || t('Plain text')] as [string, string])
+ // A tag this build cannot highlight is kept and OFFERED, so choosing
+ // something else is a decision rather than a silent deletion.
+ if (raw && !known) opts.unshift([raw, raw])
+ this.row(t('Language'), this.select(opts, known || raw, (v) => {
+ this.commit(b.id, (bb) => { if (v) bb.lang = v; else delete bb.lang })
+ }))
+ }
+
+ private calloutRows(b: Block): void {
+ this.row(t('Tone'), this.select(
+ CALLOUT_TONES.map((x) => [x.tone, toneLabel(x.tone)] as [string, string]),
+ String(b.tone ?? 'note'),
+ (v) => this.commit(b.id, (bb) => { bb.tone = v })))
+ this.row(t('Icon'), this.text(String(b.icon ?? ''), t('Leave it empty to use the tone mark'),
+ (v) => this.commit(b.id, (bb) => { if (v) bb.icon = v; else delete bb.icon })))
+ }
+
+ private imageRows(b: Block): void {
+ this.widthRow(b)
+ this.row(t('Alt text'), this.text(String(b.alt ?? ''), t('What is in the picture'),
+ (v) => this.commit(b.id, (bb) => { if (v) bb.alt = v; else delete bb.alt })))
+ }
+
+ private mediaRows(b: Block): void {
+ const audio = String(b.kind ?? 'video') === 'audio'
+ // WIDTH IS A VIDEO QUESTION (blocks.ts): an <audio> is a control bar of the
+ // browser's own height, and a percentage of the measure only makes it a
+ // shorter control bar.
+ if (!audio) {
+ this.widthRow(b)
+ const poster = mk('button', 'sp-btn' + (b.poster ? ' sp-on' : ''), t('Poster…'))
+ poster.type = 'button'
+ poster.title = t('A still frame, shown before play — and what a printout or a file preview shows')
+ poster.addEventListener('click', () => this.app.pickPoster(b.id))
+ this.row(t('Poster'), poster)
+ this.row(t('Muted'), this.toggle(b.muted === true,
+ (v) => this.commit(b.id, (bb) => { if (v) bb.muted = true; else delete bb.muted })))
+ }
+ this.row(t('Loop'), this.toggle(b.loop === true,
+ (v) => this.commit(b.id, (bb) => { if (v) bb.loop = true; else delete bb.loop })))
+ // absent means shown, so the OFF state is the one that is written down
+ this.row(t('Controls'), this.toggle(b.controls !== false,
+ (v) => this.commit(b.id, (bb) => { if (v) delete bb.controls; else bb.controls = false })))
+ const replace = mk('button', 'sp-btn', t('Replace…'))
+ replace.type = 'button'
+ replace.addEventListener('click', () => this.app.pickMedia(b.id))
+ this.row(t('File'), replace)
+ }
+
+ private linkRows(b: Block): void {
+ // NOTHING IS FETCHED — a card is what the author typed (DECISIONS,
+ // 2026-08-03). The panel says so once rather than per field.
+ const f = (key: 'url' | 'title' | 'desc' | 'site' | 'icon', label: string, hint: string) =>
+ this.row(label, this.text(String(b[key] ?? ''), hint, (v) => {
+ this.commit(b.id, (bb) => {
+ // an EMPTY field is an ABSENT field, exactly as applyLinkCard has it
+ if (v) (bb as Record<string, unknown>)[key] = v
+ else delete (bb as Record<string, unknown>)[key]
+ })
+ }))
+ f('url', t('Web address'), 'https://example.com')
+ f('title', t('Title'), t('What this is'))
+ f('desc', t('Description'), t('One line about what is there'))
+ f('site', t('Site name'), t('Taken from the address if blank'))
+ f('icon', t('Icon'), t('One emoji'))
+ const more = mk('button', 'sp-btn', t('Picture…'))
+ more.type = 'button'
+ more.title = t('Nothing is fetched. A card shows what you type here — opening this space never contacts the site.')
+ more.addEventListener('click', () => this.app.openLinkCard(b.id))
+ this.row(t('Picture'), more)
+ }
+
+ /** Percentage of the text column — no block carries absolute px. */
+ private widthRow(b: Block): void {
+ const n = document.createElement('input')
+ n.type = 'number'
+ n.className = 'sp-insp-num'
+ n.min = '10'
+ n.max = '100'
+ n.step = '5'
+ n.value = String(Number(b.width ?? 100))
+ n.addEventListener('change', () => {
+ const v = Math.round(Math.min(100, Math.max(10, Number(n.value) || 100)))
+ this.commit(b.id, (bb) => { if (v === 100) delete bb.width; else bb.width = v })
+ })
+ this.row(t('Width %'), n)
+ }
+
+ // ---- page -----------------------------------------------------------------
+
+ private buildPage(page: Page): void {
+ const s = this.app.store
+ this.section(t('Page'), page.title || t('Untitled'))
+
+ const icon = mk('button', 'sp-btn sp-insp-icon', '')
+ icon.type = 'button'
+ icon.innerHTML = this.app.pageIcon(page.icon)
+ icon.title = t("Change this page's icon")
+ icon.addEventListener('click', () => this.app.openIconPicker(page.id, icon))
+ this.row(t('Icon'), icon)
+
+ // HOW WIDE THIS PAGE IS — the page menu's own control, in the place the
+ // question is now asked. The default is an ABSENT key, never a stored
+ // 'normal': a page set to wide and back is byte-identical to one never
+ // touched.
+ const cur = page.width === 'wide' ? 'wide' : page.width === 'full' ? 'full' : 'normal'
+ this.row(t('Width'), this.select([
+ ['normal', t('Column')], ['wide', t('Wide')], ['full', t('Full width')],
+ ], cur, (v) => {
+ if (s.readOnly) return
+ s.commit(() => {
+ const p = s.index.page.get(page.id)
+ if (!p) return
+ if (v === 'normal') delete p.width
+ else p.width = v as 'wide' | 'full'
+ }, { scope: 'doc' })
+ this.app.repaint()
+ }))
+
+ this.row(t('Archived'), this.toggle(page.archived === true, (v) => {
+ if (s.readOnly) return
+ s.commit(() => {
+ const p = s.index.page.get(page.id)
+ if (!p) return
+ if (v) p.archived = true
+ else delete p.archived
+ })
+ this.app.repaint()
+ }))
+
+ if (typeof page.journal === 'string') {
+ this.row(t('Journal date'), mk('span', 'sp-mono', page.journal))
+ }
+
+ // WHAT IS ACTUALLY IN THIS PAGE. Derived at render, never stored: a count
+ // written into the file is a count that goes stale in somebody's copy.
+ const words = page.blocks.reduce(
+ (n, b) => n + (String(b.html ?? '').replace(/<[^>]*>/g, ' ').match(/\S+/g)?.length ?? 0), 0)
+ const back = s.index.backlinks.get(page.id)?.length ?? 0
+ this.host.append(mk('p', 'sp-insp-hint',
+ t('{blocks} blocks · {words} words · {links} links in',
+ { blocks: page.blocks.length, words, links: back })))
+ }
+
+ // ---- rows -----------------------------------------------------------------
+
+ private section(title: string, sub?: string): void {
+ const h = mk('h3', 'sp-insp-sec', title)
+ h.dataset.key = title
+ h.setAttribute('role', 'button')
+ h.tabIndex = 0
+ if (sub) h.append(mk('span', 'sp-insp-sub', sub))
+ this.host.append(h)
+ }
+
+ private row(label: string, control: HTMLElement): void {
+ const r = mk('label', 'sp-insp-row')
+ r.append(mk('span', 'sp-insp-lbl', label), control)
+ if (this.app.locked()) for (const c of r.querySelectorAll('input,select,button')) {
+ (c as HTMLInputElement).disabled = true
+ }
+ this.host.append(r)
+ }
+
+ /** ONE commit per change — so every control here is exactly one ⌘Z. */
+ private commit(id: string, fn: (b: Block) => void): void {
+ const s = this.app.store
+ if (s.readOnly) return
+ s.commit(() => { const b = s.block(id); if (b) fn(b) })
+ this.app.repaint()
+ }
+
+ private select(opts: Array<[string, string]>, value: string, on: (v: string) => void): HTMLElement {
+ const sel = document.createElement('select')
+ sel.className = 'sp-select'
+ for (const [v, label] of opts) {
+ const o = document.createElement('option')
+ o.value = v
+ o.textContent = label
+ if (v === value) o.selected = true
+ sel.append(o)
+ }
+ sel.addEventListener('change', () => on(sel.value))
+ return sel
+ }
+
+ private toggle(value: boolean, on: (v: boolean) => void): HTMLElement {
+ const cb = document.createElement('input')
+ cb.type = 'checkbox'
+ cb.className = 'sp-insp-tog'
+ cb.checked = value
+ cb.addEventListener('change', () => on(cb.checked))
+ return cb
+ }
+
+ /** `change`, not `input`: one commit when the field is done with, rather
+ * than one undo entry per keystroke. */
+ private text(value: string, hint: string, on: (v: string) => void): HTMLElement {
+ const i = document.createElement('input')
+ i.className = 'sp-insp-txt'
+ i.value = value
+ i.placeholder = hint
+ i.addEventListener('change', () => on(i.value.trim()))
+ i.addEventListener('keydown', (e) => { if (e.key === 'Enter') { e.preventDefault(); i.blur() } })
+ return i
+ }
+
+ private stepper(n: number, min: number, max: number, add: () => void, drop: () => void): HTMLElement {
+ const wrap = mk('span', 'sp-insp-step')
+ const b = (glyph: string, title: string, off: boolean, run: () => void) => {
+ const x = mk('button', 'sp-btn', glyph)
+ x.type = 'button'
+ x.title = title
+ x.disabled = off
+ x.addEventListener('click', (e) => { e.preventDefault(); run() })
+ return x
+ }
+ wrap.append(
+ b('−', t('One fewer'), n <= min, drop),
+ mk('span', 'sp-insp-n', String(n)),
+ b('+', t('One more'), n >= max, add),
+ )
+ return wrap
+ }
+}
diff --git a/spaces/src/render.ts b/spaces/src/render.ts
index b4b86f1a..437ab2ed 100644
--- a/spaces/src/render.ts
+++ b/spaces/src/render.ts
@@ -9,11 +9,11 @@
// story, native ⌘F, print fidelity and lossless markdown export at once, from
// one decision.
-import { type SpacesDoc, type Page, type Block, isRemote } from './model'
+import { type SpacesDoc, type Page, type Block, isRemote, tableOf, linkCard } from './model'
import { sanitizeInline, inertBody, esc } from './sanitize'
import { tokenize } from './highlight'
import { t, locale } from './i18n'
-import { TAG_OF, LIST_OF, SPEC, TONE } from './blocks'
+import { TAG_OF, LIST_OF, SPEC, TONE, mediaPlayback } from './blocks'
import {
fieldByKey, optionOf, issuesOf, headerLength, propBlockOf,
passesFilter, filterCount, unknownFilterKeys,
@@ -27,6 +27,14 @@ export interface RenderOpts {
editable?: boolean
/** resolve a page id to its title, for link chips and pagelink blocks */
titleOf?: (pageId: string) => string | undefined
+ /**
+ * This READER's preferred width for a page that does not state one.
+ *
+ * Viewer-scoped, like locale and the pane width — never a document field. It
+ * is a fact about the screen somebody is sitting at, so two people opening
+ * one space each get their own answer, and neither writes it into the file.
+ */
+ readerWidth?: 'wide' | 'full'
/** collapsed toggles render OPEN — print always passes this */
forceOpen?: boolean
/** rendering to paper: no controls, because paper has no buttons */
@@ -193,7 +201,8 @@ export function renderBlock(b: Block, doc: SpacesDoc, opts: RenderOpts = {}, cal
// those the reader gets a placeholder naming the host and a button. One
// click, per image, informed — the model every mail client settled on.
if (isRemote(rawSrc) && !opts.allowRemote?.(rawSrc)) {
- fig.appendChild(remoteImagePlaceholder(rawSrc, b, opts))
+ fig.appendChild(remotePlaceholder(rawSrc, b, opts,
+ t('Image from {host}', { host: remoteHost(rawSrc) }), t('Load this image')))
if (b.caption) {
const cap = document.createElement('figcaption')
cap.innerHTML = sanitizeInline(String(b.caption))
@@ -220,6 +229,123 @@ export function renderBlock(b: Block, doc: SpacesDoc, opts: RenderOpts = {}, cal
return el
}
+ case 'table': {
+ el.appendChild(renderTable(b, opts))
+ return el
+ }
+
+ case 'media': {
+ const fig = document.createElement('figure')
+ const play = mediaPlayback(b)
+ const rawSrc = String(b.src ?? '')
+ el.dataset.kind = play.kind
+ const done = () => {
+ if (b.caption) {
+ const cap = document.createElement('figcaption')
+ cap.innerHTML = sanitizeInline(String(b.caption))
+ fig.appendChild(cap)
+ }
+ el.appendChild(fig)
+ return el
+ }
+
+ // NO SOURCE YET. Inserting the block and choosing the file are two
+ // gestures — a picker can be cancelled, and a link has to be typed
+ // somewhere — so the empty state is part of the block rather than a
+ // failure of it. The editor wires these two buttons; a reader, a
+ // printout and a still see the same box saying what is missing, which is
+ // more honest than a gap.
+ if (!rawSrc) {
+ const box = document.createElement('div')
+ box.className = 'sp-media-empty'
+ const line = document.createElement('div')
+ line.className = 'sp-remote-line'
+ line.textContent = play.kind === 'audio' ? t('Audio') : t('Video')
+ box.appendChild(line)
+ if (opts.editable && !opts.printing) {
+ const pick = document.createElement('button')
+ pick.type = 'button'
+ pick.className = 'sp-btn sp-remote-load'
+ pick.textContent = t('Choose a file…')
+ pick.dataset.pickMedia = b.id
+ const link = document.createElement('button')
+ link.type = 'button'
+ link.className = 'sp-btn sp-remote-load'
+ link.textContent = t('Use a link…')
+ link.dataset.linkMedia = b.id
+ const row = document.createElement('div')
+ row.className = 'sp-media-actions'
+ row.append(pick, link)
+ box.appendChild(row)
+ }
+ fig.appendChild(box)
+ return done()
+ }
+
+ // THE SAME CONSENT GATE AS AN IMAGE, and it matters MORE here. A remote
+ // <video> asks its host for byte ranges the moment the element is
+ // parsed, so an autoplaying tracker is not even needed: opening the
+ // space is the ping. Same rule, same host named, different words.
+ if (isRemote(rawSrc) && !opts.allowRemote?.(rawSrc)) {
+ const host = remoteHost(rawSrc)
+ fig.appendChild(remotePlaceholder(rawSrc, b, opts,
+ play.kind === 'audio' ? t('Audio from {host}', { host }) : t('Video from {host}', { host }),
+ play.kind === 'audio' ? t('Load this audio') : t('Load this video')))
+ return done()
+ }
+
+ // PAPER AND THUMBNAILS GET A STILL, NEVER A PLAYER.
+ //
+ // `printing` is the flag both of those surfaces already pass (print, and
+ // preview.ts's file-manager render), and it is the honest test: it means
+ // "this output cannot be interacted with". A <video> on paper prints as
+ // a black rectangle; in a file-manager preview it would be an element
+ // that decodes, buffers and — with scripting off, where nothing can stop
+ // it — sits there holding a source open. preview.ts also BANS the tags
+ // outright, which is defence in depth rather than the mechanism: by the
+ // time it runs there is nothing to ban.
+ if (opts.printing) {
+ fig.appendChild(mediaStill(b, doc, opts, play.kind))
+ return done()
+ }
+
+ const m = document.createElement(play.kind === 'audio' ? 'audio' : 'video') as
+ HTMLVideoElement | HTMLAudioElement
+ m.className = 'sp-media'
+ m.src = resolveSrc(rawSrc, doc)
+ // metadata, not auto: enough to draw the first frame and a duration, and
+ // no more. `auto` on a linked clip downloads the whole thing to display a
+ // page nobody has pressed play on.
+ m.preload = 'metadata'
+ // A block with controls off is a rectangle you cannot use, which is fine
+ // for a reader looking at a caption-and-poster figure and useless to the
+ // author who has to click it to change it. So the editor always has them.
+ m.controls = play.controls || opts.editable === true
+ m.loop = play.loop
+ // NOTHING SETS `m.autoplay`. mediaPlayback() cannot return true for it,
+ // and this is the surface that would have obeyed it — see blocks.ts.
+ if (play.kind === 'video') {
+ const v = m as HTMLVideoElement
+ // iOS otherwise takes the clip fullscreen on play, which throws the
+ // reader out of the page they were reading
+ v.playsInline = true
+ // muted is a VIDEO choice: a silent audio block is a block that does
+ // nothing, so the editor does not offer it and neither does this
+ v.muted = play.muted
+ const poster = String(b.poster ?? '')
+ // a remote poster is the same tracking pixel as a remote image, so it
+ // goes through the same consent
+ if (poster && !(isRemote(poster) && !opts.allowRemote?.(poster))) {
+ const resolved = resolveSrc(poster, doc)
+ if (resolved) v.poster = resolved
+ }
+ if (b.w && b.h) { v.width = Number(b.w); v.height = Number(b.h) }
+ if (b.width) v.style.width = `${Math.max(10, Math.min(100, Number(b.width)))}%`
+ }
+ fig.appendChild(m)
+ return done()
+ }
+
case 'pagelink': {
const a = document.createElement('a')
const target = String(b.page ?? '')
@@ -232,6 +358,95 @@ export function renderBlock(b: Block, doc: SpacesDoc, opts: RenderOpts = {}, cal
return el
}
+ case 'link': {
+ // A CARD DRAWN ENTIRELY FROM THE FILE.
+ //
+ // There is no fetch here and there is no deferred one either. Every value
+ // was typed by the author and stored; the only thing derived at render
+ // time is the site name, and that is `new URL(url).host` — parsing, not a
+ // request. PLATFORM §1 and the 2026-08-03 decision both land on this
+ // line, so the negative test in scripts/test-spaces-model.ts pins it.
+ const c = linkCard(b)
+ el.classList.add('sp-link')
+
+ // AN ANCHOR ONLY WHEN THERE IS SOMEWHERE TO GO. A card whose url is
+ // empty, or is a `javascript:`/`data:` string out of a mailed file, is a
+ // <div>: `linkCard` returns '' for all three, and an <a> with no href is
+ // a link a keyboard can focus and a screen reader will announce, leading
+ // nowhere.
+ const card = document.createElement(c.url ? 'a' : 'div')
+ card.className = 'sp-linkcard'
+ if (c.url) {
+ const a = card as HTMLAnchorElement
+ a.href = c.url
+ // the same treatment sanitizeInline gives an external link: this leaves
+ // the document, so it must not be able to reach back through opener
+ a.rel = 'noopener noreferrer'
+ a.target = '_blank'
+ } else {
+ card.classList.add('sp-dead')
+ }
+
+ // THE THUMBNAIL IS LOCAL OR IT IS ABSENT. `linkCard` has already dropped
+ // a remote one — this cannot be re-tested here, because a check that can
+ // be forgotten in one of four surfaces is a check that will be.
+ if (c.image) {
+ const img = document.createElement('img')
+ img.src = resolveSrc(c.image, doc)
+ img.alt = ''
+ img.className = 'sp-linkcard-img'
+ card.appendChild(img)
+ }
+
+ const body = document.createElement('span')
+ body.className = 'sp-linkcard-body'
+
+ const title = document.createElement('span')
+ title.className = 'sp-linkcard-title'
+ // an empty card is not an empty box: it says what it is and, in the
+ // editor, offers the way to fill it in
+ title.textContent = c.title || t('A link with nothing in it yet')
+ body.appendChild(title)
+
+ if (c.desc) {
+ const desc = document.createElement('span')
+ desc.className = 'sp-linkcard-desc'
+ desc.textContent = c.desc
+ body.appendChild(desc)
+ }
+
+ const foot = document.createElement('span')
+ foot.className = 'sp-linkcard-site'
+ if (c.icon) {
+ const mark = document.createElement('span')
+ mark.className = 'sp-linkcard-mark'
+ // textContent, never innerHTML: this is one field out of a mailed file
+ mark.textContent = c.icon
+ foot.appendChild(mark)
+ }
+ const site = document.createElement('span')
+ site.textContent = c.site || c.url
+ foot.appendChild(site)
+ if (c.site || c.url || c.icon) body.appendChild(foot)
+
+ card.appendChild(body)
+ el.appendChild(card)
+
+ // The card itself opens the link, so editing needs its own control — and
+ // only where there is an editor. Reading view, print and a locked space
+ // must not paint a button that does nothing (the callout chip's rule).
+ if (opts.editable) {
+ const edit = document.createElement('button')
+ edit.type = 'button'
+ edit.className = 'sp-linkcard-edit'
+ edit.dataset.editLink = b.id
+ edit.title = t('Edit this link card')
+ edit.textContent = c.url ? t('Edit') : t('Add a link')
+ el.appendChild(edit)
+ }
+ return el
+ }
+
case 'todo': {
const box = document.createElement('input')
box.type = 'checkbox'
@@ -338,6 +553,80 @@ export function renderBlock(b: Block, doc: SpacesDoc, opts: RenderOpts = {}, cal
}
}
+/**
+ * A table — the same DOM in the editor, the reading view, print and the still
+ * preview, because there is one renderer.
+ *
+ * REAL `<table>`, `<thead>`, `<th>`, exactly as this renderer emits real
+ * headings and real list items: that is what buys the screen-reader story
+ * (row and column announcement), native ⌘F, print fidelity and a lossless
+ * markdown export, all from one decision. A grid of divs would need four
+ * separate answers.
+ *
+ * The widths are a `<colgroup>` over `table-layout: fixed` — the one layout
+ * mode in which a column's width is what the document SAYS rather than what
+ * this reader's font measured, so a table looks the same to everyone the file
+ * is mailed to. Percentages, never px: `cols` holds fractions (model.ts) and
+ * the text column is a theme concern.
+ *
+ * Cells are editable HOSTS in the editor and inert `<td>`s everywhere else, and
+ * the editable one is the cell itself rather than a span inside it — a cell is
+ * a box you click into, and a nested host makes a 1px strip around its edge
+ * that swallows the click.
+ */
+function renderTable(b: Block, opts: RenderOpts): HTMLElement {
+ const t = tableOf(b)
+ const wrap = document.createElement('div')
+ // A wide table SCROLLS rather than widening the prose column: the measure is
+ // the document's, and a five-column table must not push the paragraph above
+ // it off the screen on a phone.
+ wrap.className = 'sp-tb-wrap'
+ const table = document.createElement('table')
+ table.className = 'sp-tb'
+ const total = t.cols.reduce((s, n) => s + n, 0) || t.w
+ const group = document.createElement('colgroup')
+ for (const w of t.cols) {
+ const col = document.createElement('col')
+ col.style.width = `${((w / total) * 100).toFixed(3)}%`
+ group.appendChild(col)
+ }
+ table.appendChild(group)
+
+ const body = document.createElement('tbody')
+ t.rows.forEach((row, r) => {
+ const head = t.header && r === 0
+ const tr = document.createElement('tr')
+ row.forEach((cell, c) => {
+ const td = document.createElement(head ? 'th' : 'td')
+ td.className = 'sp-tb-cell'
+ td.dataset.r = String(r)
+ td.dataset.c = String(c)
+ if (head) td.setAttribute('scope', 'col')
+ if (t.colAlign[c]) td.style.textAlign = t.colAlign[c]
+ // per cell, for the reason text blocks carry it: a table of Arabic terms
+ // beside English ones must lay each column out by what is IN it
+ td.dir = 'auto'
+ if (opts.editable) {
+ td.contentEditable = 'true'
+ // NOT `data-edit`: that name means "this element's html IS the block's
+ // html", and the editor's generic input handler would write one cell
+ // over the whole table. A cell says which block AND which cell it is.
+ td.dataset.cell = b.id
+ }
+ td.innerHTML = sanitizeInline(cell)
+ tr.appendChild(td)
+ })
+ if (head) {
+ const thead = document.createElement('thead')
+ thead.appendChild(tr)
+ table.appendChild(thead)
+ } else body.appendChild(tr)
+ })
+ table.appendChild(body)
+ wrap.appendChild(table)
+ return wrap
+}
+
/**
* A callout tone's name, in the reader's language.
*
@@ -509,18 +798,26 @@ function remoteHost(src: string): string {
}
/**
- * What stands in for an unloaded remote image: what it is, WHERE it would come
- * from, and a button. Naming the host is the point — "load images" with no
+ * What stands in for an unloaded remote resource: what it is, WHERE it would
+ * come from, and a button. Naming the host is the point — "load images" with no
* indication of who is being contacted is not consent.
+ *
+ * `line` and `action` are passed rather than derived from the block, because a
+ * video and an audio clip are the same gate with different words, and the
+ * strings have to be LITERAL t() calls somewhere for the i18n sweep to find
+ * them (scripts/build-spaces-i18n.mjs reads the source). Their call sites say
+ * them; this says the part that is identical.
*/
-function remoteImagePlaceholder(src: string, b: Block, opts: RenderOpts): HTMLElement {
+function remotePlaceholder(
+ src: string, b: Block, opts: RenderOpts, line0: string, action: string,
+): HTMLElement {
const box = document.createElement('div')
box.className = 'sp-remote'
box.dataset.remoteSrc = src
const line = document.createElement('div')
line.className = 'sp-remote-line'
- line.textContent = t('Image from {host}', { host: remoteHost(src) })
+ line.textContent = line0
box.appendChild(line)
const why = document.createElement('div')
@@ -543,13 +840,50 @@ function remoteImagePlaceholder(src: string, b: Block, opts: RenderOpts): HTMLEl
const btn = document.createElement('button')
btn.type = 'button'
btn.className = 'sp-btn sp-remote-load'
- btn.textContent = t('Load this image')
+ btn.textContent = action
btn.dataset.loadRemote = src
box.appendChild(btn)
}
return box
}
+/**
+ * What a clip looks like where nothing can play it: paper, and a file-manager
+ * thumbnail.
+ *
+ * The POSTER if there is one — that is the frame the author chose, and it is
+ * the whole reason the field is worth having — and otherwise a quiet box that
+ * says what is there. Not nothing: a printed handbook that silently omits the
+ * paragraph where the demo video was is the same class of bug as a toggle that
+ * prints shut.
+ *
+ * A remote poster is skipped rather than fetched. preview.ts passes no
+ * `allowRemote` at all, so a still built for a file manager can never make a
+ * request — which is the point, because nobody is there to consent.
+ */
+function mediaStill(b: Block, doc: SpacesDoc, opts: RenderOpts, kind: 'video' | 'audio'): HTMLElement {
+ const box = document.createElement('div')
+ box.className = 'sp-media-still'
+ const poster = String(b.poster ?? '')
+ if (poster && !(isRemote(poster) && !opts.allowRemote?.(poster))) {
+ const resolved = resolveSrc(poster, doc)
+ if (resolved) {
+ const img = document.createElement('img')
+ img.src = resolved
+ img.alt = String(b.alt ?? '')
+ box.appendChild(img)
+ box.classList.add('sp-has-poster')
+ }
+ }
+ const badge = document.createElement('span')
+ badge.className = 'sp-media-badge'
+ // the triangle is the universal mark and needs no font; the word beside it
+ // is what makes it readable aloud and in monochrome
+ badge.textContent = `\u25B8 ${kind === 'audio' ? t('Audio') : t('Video')}`
+ box.appendChild(badge)
+ return box
+}
+
/**
* A whole page, including its title. The OUTER wrapper stays ltr — scrollLeft
* and every coordinate calculation change meaning under rtl — and the INNER
@@ -573,12 +907,52 @@ export function renderPage(page: Page, doc: SpacesDoc, opts: RenderOpts = {}): H
// unknown value from a newer build falls back to the measure rather than to
// no width at all.
const auto: 'wide' | undefined = page.blocks.some((b) => b.type === 'view') ? 'wide' : undefined
+ // PRECEDENCE: what the PAGE says, then what this READER prefers, then the
+ // board default, then the measure.
+ //
+ // The reader's preference is the piece this was missing. A per-page control
+ // answers "this page needs the room"; it does not answer "I have a 27-inch
+ // monitor", which is a fact about the person and not about any document —
+ // and making them set it page by page is the wrong shape of work. It lives
+ // in localStorage beside the language and the pane width, never in the file,
+ // for the reason PLATFORM §8 gives about locale: two people opening one
+ // space on different screens should each get their own answer.
const width = page.width === 'wide' || page.width === 'full' ? page.width
- : page.width === undefined ? auto
+ : page.width === undefined ? (opts.readerWidth ?? auto)
: undefined
if (width === 'full') inner.style.maxWidth = 'none'
- else if (width === 'wide') inner.style.maxWidth = '1500px'
- else if (doc.theme.measure) inner.style.maxWidth = `${doc.theme.measure}px`
+ // WIDE IS A PROPORTION, not a number. It was a flat 1500px, which is wider
+ // than the reading area of any laptop — so it clamped to the container and
+ // came out identical to Full. Measured at a 1440px viewport: column 720,
+ // wide 1130, full 1130. Two of the three choices did the same thing, and the
+ // one screen where they differed was a 27-inch monitor.
+ //
+ // 80% keeps a visible step at every size, and the 1500px cap keeps Wide from
+ // becoming an unreadable line on a very large screen — at which point Full is
+ // the thing to pick, deliberately.
+ else if (width === 'wide') inner.style.maxWidth = 'min(1500px, 80%)'
+ else if (doc.theme.measure) {
+ // AND THE DEFAULT ITSELF GROWS. 720px is ~88 characters at 16px, which is
+ // already at the long end — so this does not widen the line much; what it
+ // does is stop a 2560px screen showing a 720px ribbon using 31% of it.
+ // Capped, because past ~95 characters a line is harder to read, not easier.
+ // THE CAP IS IN CHARACTERS, not pixels — that is the whole point.
+ // A px cap does not hold a line length: capped at measure x 1.25 = 900px,
+ // a 5120px screen rendered 110 characters, past the range anyone reads
+ // comfortably, while the comment above it claimed ~95 was the limit.
+ //
+ // 75ch, not 90ch: `ch` is the width of the digit ZERO, and prose averages
+ // narrower than that — measured here, 9.77px against 8.16px — so 75ch
+ // renders about 90 real characters and 90ch would render 108. The unit
+ // flatters itself by about a fifth.
+ //
+ // And because `ch` scales with --sp-read, the column grows in PIXELS on a
+ // large screen while holding the same character count. That is what the
+ // extra pixels are for: bigger type at a longer viewing distance, not a
+ // longer line.
+ const m = doc.theme.measure
+ inner.style.maxWidth = `min(75ch, max(${m}px, 42vw))`
+ }
if (width) inner.classList.add('sp-wide')
const h = document.createElement('h1')
diff --git a/spaces/src/sanitize.ts b/spaces/src/sanitize.ts
index dcf22fa0..e2e51f4a 100644
--- a/spaces/src/sanitize.ts
+++ b/spaces/src/sanitize.ts
@@ -11,13 +11,16 @@
// policies differ in BOTH directions: spaces must reject DIV/P (slides permits
// them) and spaces adds the suite's first attribute allowlist.
+import { canonicalMarks, keepClasses } from './marks.ts'
+
/** Inline tags a block may contain. Nothing here can carry block structure. */
const ALLOWED = new Set([
'B', 'I', 'U', 'S', 'EM', 'STRONG', 'CODE', 'BR', 'SPAN', 'MARK', 'SUB', 'SUP', 'A',
])
/**
- * The only attribute any tag may keep, and only on `A`.
+ * The href test. One of the format's TWO attributes — the other is a palette
+ * `class` on SPAN/MARK, whose pattern lives in marks.ts (CLASS_OK).
*
* MATCHED AGAINST `getAttribute('href')`, NEVER the `.href` IDL property.
*
@@ -35,6 +38,32 @@ const ALLOWED = new Set([
*/
const HREF_OK = /^(https?:|mailto:|#p\/)/i
+/**
+ * The OUTWARD half of HREF_OK, for an href that is not inline html.
+ *
+ * A link card's `url` is a block FIELD, so it never passes through
+ * sanitizeInline — and a block field out of a mailed file is exactly as
+ * untrusted as an attribute in one. Returns the url to use, or '' for anything
+ * that is not an outward link, so the caller's test is "did I get a string
+ * back" rather than a boolean it can forget to act on.
+ *
+ * ALLOWLIST, and on the RAW string, for both of sanitizeInline's reasons. A
+ * blocklist of `javascript:` loses to the parser's own leniency: `ja&#9;vascript:x`
+ * and ` javascript:x` are both `javascript:` by the time an href is followed,
+ * because the URL parser strips tabs, newlines and leading whitespace from a
+ * scheme. Neither one starts with `https:`, so both fail this test — an
+ * allowlist fails CLOSED against a normalisation nobody has thought of yet.
+ *
+ * `#p/` is deliberately NOT here. An internal page link is a pagelink block,
+ * which is a different type with a different renderer; letting a link card hold
+ * one would be a second way to say the same thing, differing only in which of
+ * the two a future build fixes a bug in.
+ */
+export function externalHref(raw: unknown): string {
+ const url = typeof raw === 'string' ? raw.trim() : ''
+ return /^(https?:|mailto:)/i.test(url) ? url : ''
+}
+
/**
* Tags whose CONTENT should survive when the tag itself is dropped.
*
@@ -101,8 +130,22 @@ export function sanitizeInline(html: string): string {
}
for (const attr of [...el.attributes]) {
- const keep = tag === 'A' && attr.name === 'href' && HREF_OK.test(attr.value)
- if (!keep) el.removeAttribute(attr.name)
+ if (tag === 'A' && attr.name === 'href' && HREF_OK.test(attr.value)) continue
+ // THE SECOND ATTRIBUTE THIS FORMAT HAS: a palette class on SPAN or
+ // MARK, and only a name matching CLASS_OK (marks.ts). Filtered per
+ // TOKEN, so `class="sp-fg-red onclick-bait"` keeps the first and drops
+ // the second rather than failing whole and losing the colour.
+ //
+ // A CLASS, NOT A `style`. A style attribute would make this function a
+ // CSS parser — and CSS is a language with `url()` in it — while a class
+ // name can only ever select a rule in OUR stylesheet or select nothing.
+ if (tag === 'SPAN' || tag === 'MARK') {
+ if (attr.name === 'class') {
+ const kept = keepClasses(attr.value)
+ if (kept) { el.setAttribute('class', kept); continue }
+ }
+ }
+ el.removeAttribute(attr.name)
}
// an <a> that lost its href is no longer a link — unwrap it
if (tag === 'A' && !el.getAttribute('href')) {
@@ -141,18 +184,18 @@ function stripAllTags(html: string): string {
* would re-trip text merging on every keystroke.
*/
export function canonicalize(html: string): string {
- let out = sanitizeInline(html)
- // one pass of adjacent-run coalescing per tag, repeated to a fixed point so
- // <b>a</b><b>b</b><b>c</b> collapses fully
- for (let i = 0; i < 4; i++) {
- const before = out
- for (const tag of ['b', 'i', 'u', 's', 'em', 'strong', 'code', 'mark']) {
- out = out.replaceAll(`</${tag}><${tag}>`, '')
- }
- out = out.replace(/<(b|i|u|s|em|strong|code|mark)><\/\1>/g, '') // empty runs
- if (out === before) break
- }
- return out
+ // TWO STAGES, and only the first one needs a browser. sanitizeInline decides
+ // what is ALLOWED to be here (a DOM question — it has to parse hostile markup
+ // inertly to answer it); canonicalMarks decides what SHAPE the allowed marks
+ // take, which is a string question and therefore one a rig can test.
+ //
+ // This used to be a fixed-point loop of `</b><b>` → `''` string replacements.
+ // It coalesced adjacent runs and dropped empty ones, and it could do nothing
+ // at all about §2.3's other half — nesting order — because "is this <i>
+ // inside or outside that <b>" is not a question a replaceAll can ask. So
+ // `<b><i>x</i></b>` and `<i><b>x</b></i>` were both canonical, which makes
+ // every diff and every CRDT merge of the same visible text a conflict.
+ return canonicalMarks(sanitizeInline(html))
}
/** Plain text of a block, for search and for markdown export. */
diff --git a/spaces/src/share.ts b/spaces/src/share.ts
new file mode 100644
index 00000000..2a3a69ce
--- /dev/null
+++ b/spaces/src/share.ts
@@ -0,0 +1,152 @@
+// SPDX-License-Identifier: MIT
+// Copyright (c) 2026 The Bento authors
+// What a copy of this space is allowed to carry.
+//
+// Sharing a space IS sending a file — there is no server that holds the
+// document and no link that grants access to it. So every question about
+// permission is really a question about which fields survive the copy, and
+// this module is the one place that answers it.
+//
+// THE FIELD THAT MATTERS. `doc.collab` is minted at CREATION for every space,
+// and every field under it is a bearer capability:
+//
+// room + key the READ capability — decrypts every frame and every blob the
+// relay has ever held for this room
+// ownerPriv the OWNER key — writes, and REVOKES anyone else, including
+// the person who sent the file
+// writerPriv the pre-v2 room-wide write key
+// invite.priv a delegation key: every device that opens a copy carrying it
+// mints its own member key and joins through it
+//
+// "Invite someone…" used to be `saveAs('copy')`, which serializes
+// `store.doc` — the WHOLE document, `collab` included. Everyone invited to a
+// space therefore received `ownerPriv`: they could write (intended) and they
+// could revoke the person who had invited them (not intended, and not
+// recoverable — the owner key is the root of trust for the room and the file
+// is already on someone else's disk). The button's hint said "Saves a copy
+// that joins this session", which is true and is not the whole truth.
+//
+// bento/slides mints a SCOPED invite instead, and this module is that same
+// answer bound to a space. The two apps deliberately produce the same shapes:
+// the relay verifies one wire format (docs/collab-design.md, "Phase 1 wire
+// format"), and a second local description of what an invite is would be how a
+// client and the deployed worker drift apart.
+
+import { mintInvite } from '../../kernel/src/sync/online.ts'
+import type { SpacesDoc } from './model.ts'
+
+/** A share export's filename suffix — also what the UI calls the copy. */
+export type ShareKind = 'invite' | 'viewonly'
+
+/**
+ * Take the live session out of a copy that is about to leave this machine.
+ *
+ * ONE list, in one place, and DERIVED BY DELETING rather than by rebuilding
+ * the block from an allow-list: a private field added to `CollabCreds` later
+ * is covered here without anyone remembering to act. Divergent per-export
+ * copies of this list are how one export path ends up leaking what the other
+ * three strip — slides wrote that sentence after it happened.
+ *
+ * The default is to drop `collab` outright: a template, a page extract or the
+ * JSON on the clipboard must not join anything, and `room` + `key` together
+ * ARE the read capability. `keepRoom` is for the copies that are MEANT to
+ * follow the session — they keep the room, the symmetric read key and the
+ * PUBLIC keys, and lose only the private halves.
+ *
+ * Note what `keepRoom` does NOT do: it never adds a capability. An invite is
+ * added afterwards, deliberately and visibly, by `inviteCopy()`.
+ */
+export function stripCollabSecrets(doc: SpacesDoc, opts: { keepRoom?: boolean } = {}): void {
+ if (!doc.collab) return
+ if (!opts.keepRoom) {
+ delete doc.collab
+ return
+ }
+ delete doc.collab.writerPriv // the muzzle — no room-wide write capability travels
+ delete doc.collab.ownerPriv // …nor the owner key, which can also revoke…
+ delete doc.collab.invite // …nor any invite (delegation) material we hold
+}
+
+/** A deep clone, so nothing done to a copy can reach the open document. */
+const clone = (doc: SpacesDoc): SpacesDoc => JSON.parse(JSON.stringify(doc)) as SpacesDoc
+
+/** Is this copy the room's owner — the only role that can mint or revoke? */
+export function isOwner(doc: SpacesDoc): boolean {
+ const c = doc.collab
+ return !!(c && c.v === 2 && c.owner && c.ownerPriv)
+}
+
+/** Can this copy write at all? A reader copy holds no signing key. */
+export function canWrite(doc: SpacesDoc): boolean {
+ return !!doc.collab && doc.collab.role !== 'reader'
+}
+
+/**
+ * A copy that edits this space live — WITHOUT becoming its owner.
+ *
+ * The copy carries an owner-signed INVITE (a delegation keypair) in place of
+ * the owner's private key. Every device that opens it mints its own member
+ * key and joins through the owner → invite → member signature chain, which the
+ * relay verifies while the owner is offline. Two consequences the owner keeps:
+ * one device can be removed from the People list without disturbing anyone
+ * else, and revoking the invite cuts off every copy descended from it.
+ *
+ * Strip FIRST, then delegate. The invite is the only private material an
+ * editor copy may carry, and a stray `writerPriv` left over from a pre-v2 mint
+ * would be a second, UNREVOKABLE way into the room.
+ *
+ * Returns null when this copy is not the owner: a member copy cannot mint an
+ * invite, because it does not hold the key the chain is rooted in.
+ */
+export async function inviteCopy(doc: SpacesDoc): Promise<SpacesDoc | null> {
+ const c = doc.collab
+ if (!c?.room || !c.key || !isOwner(doc)) return null
+ const out = clone(doc)
+ stripCollabSecrets(out, { keepRoom: true })
+ out.collab!.invite = await mintInvite(c.ownerPriv!, 'writer')
+ out.collab!.on = true
+ return out
+}
+
+/**
+ * A copy that FOLLOWS this space and can never change it.
+ *
+ * It keeps the room, the read key and the public keys, and drops every private
+ * half — so it decrypts everything the room holds and can sign nothing. That
+ * is what makes this a real boundary rather than a hidden button: the relay
+ * pins a verified key per socket, a socket that presents no key is read-only,
+ * and any op batch it sends is dropped before it is stored or fanned out
+ * (docs/collab-design.md, "Signed writes"). The editor lock this copy opens
+ * with is a courtesy to the reader, not the enforcement.
+ *
+ * `sync` goes too: the stamped CRDT state is this replica's, and a viewer
+ * rejoining as a fork of it would be a fork nobody can merge back.
+ */
+export function readerCopy(doc: SpacesDoc): SpacesDoc | null {
+ const c = doc.collab
+ if (!c?.room || !c.key) return null
+ const out = clone(doc)
+ out.collab = { ...c, role: 'reader', on: true, sync: undefined }
+ stripCollabSecrets(out, { keepRoom: true })
+ return out
+}
+
+/**
+ * Is this copy a live viewer — one that follows the session read-only?
+ *
+ * Distinct from `doc.readonly`, which is a SEALED reading copy with no session
+ * at all. Both lock the editor; only this one keeps receiving.
+ */
+export function isReaderCopy(doc: SpacesDoc): boolean {
+ return doc.collab?.role === 'reader'
+}
+
+/**
+ * A short, readable fingerprint of a public key.
+ *
+ * Rendered identically in both apps on purpose: two people comparing codes
+ * over a call are verifying an identity out-of-band, and a code that is
+ * grouped differently in each app is a code they cannot compare.
+ */
+export const fingerprint = (pub?: string): string =>
+ pub ? `${pub.slice(0, 4)}·${pub.slice(4, 8)}·${pub.slice(8, 12)}` : ''
diff --git a/spaces/src/starter.ts b/spaces/src/starter.ts
index 1f2e2e98..08fca541 100644
--- a/spaces/src/starter.ts
+++ b/spaces/src/starter.ts
@@ -4,17 +4,35 @@
//
// The brief slides set: the product demo, the launch asset and the feature
// tour in one — every claim it makes is proven by the feature making it. So
-// the page that describes links CONTAINS a link, the page about sharing is
-// reachable only through one, and the limits page says the awkward things out
-// loud rather than letting them be discovered.
+// the page that describes links CONTAINS a link, the page that describes
+// tables IS one, the page about archiving is the archived page, and the limits
+// page says the awkward things out loud rather than letting them be
+// discovered.
//
-// Which is why the TRACKER is here. It shipped with none of this: a fresh space
-// opened on the notes tour, and the board, the fields and ⌘⇧I existed only for
-// someone who already knew to look for them. A feature the starter does not
-// demonstrate is a feature the starter denies.
+// A FEATURE THE STARTER DOES NOT DEMONSTRATE IS A FEATURE THE STARTER DENIES.
+// That is the rule this file is judged by, and it is a rule with a maintenance
+// cost: everything that ships has to be walked back through here, or the first
+// document every user reads quietly says the app cannot do it. The tracker was
+// the first thing to arrive that way — a fresh space opened on the notes tour
+// while the board, the fields and ⌘⇧I existed only for someone who already
+// knew to look. Tables, clips, link cards, comments, calculating lines, daily
+// notes, page width, export-a-page, subtree import, the mark palette, live
+// collaboration and the properties panel all arrived the same way afterwards,
+// and are here now.
+//
+// WHAT THIS IS NOT is a manual. A feature tour that lists features is a
+// reference nobody reads twice; this should be a space somebody would keep and
+// write in, where the demonstration is the page rather than an aside on it.
+//
+// ENGLISH ONLY, deliberately, and unlike every string in the interface around
+// it. The UI follows the READER (PLATFORM §8); a document is written in a
+// language and this one is written in English. Translating the starter would
+// mean nine starters to keep in step with nine feature sets, and a space
+// somebody wrote in would be the only one of the ten that was not translated.
-import { FORMAT, FORMAT_VERSION, defaultTheme, type SpacesDoc, type Block, type Page } from './model.ts'
+import { FORMAT, FORMAT_VERSION, defaultTheme, writeTable, type SpacesDoc, type Block, type Page } from './model.ts'
import { DEFAULT_FIELDS, ISSUE_FIELDS, propBlock } from './fields.ts'
+import { STARTER_DIAGRAM, STARTER_TONE } from './starterdata.ts'
const nextId = (): string => `sd-${(seq++).toString(36)}`
@@ -23,6 +41,13 @@ const b = (type: string, html = '', extra: Partial<Block> = {}): Block =>
let seq = 0
+/** The one picture, in the asset table every picked image goes into. */
+const DIAGRAM = 'sd-diagram'
+
+/** When the demonstration comment thread was written. A FIXED date, not
+ * `new Date()`: `starterDoc()` has to emit the same document twice. */
+const AT = '2026-08-20T09:14:00.000Z'
+
/**
* A starter ISSUE — a page whose first blocks are its fields.
*
@@ -49,17 +74,56 @@ export function starterDoc(): SpacesDoc {
seq = 0
const P = {
home: 'sd-home',
- links: 'sd-links',
writing: 'sd-writing',
- limits: 'sd-limits',
+ media: 'sd-media',
+ links: 'sd-links',
tracker: 'sd-tracker',
+ journal: 'sd-journal',
inbox: 'sd-inbox',
+ limits: 'sd-limits',
+ archive: 'sd-archive',
}
- // the toggle is built first so its child can name its REAL id — a parent
- // pointing at an id that does not exist would render the child at top level
- const toggle = b('toggle', 'A toggle — click the triangle', { open: true })
- const callout = b('callout', 'A callout. Click the mark to make it a note, a tip, a warning.', { tone: 'tip' })
+ // Through `writeTable`, not by hand, for the reason `propBlock` is used for
+ // the issues: it is the ONE writer, and the fallback `html` it keeps in step
+ // with the cells is what an older build renders AND what the backlink index
+ // reads. A hand-written `rows` with no fallback would put a link on the page
+ // that works when clicked and appears in nobody's "Linked from" — the starter
+ // claiming a feature the starter then fails to prove.
+ const table = b('table')
+ writeTable(table, {
+ rows: [
+ ['Block', 'What it is for', 'On paper'],
+ ['Callout', 'A note, a tip, a warning', 'kept, box and all'],
+ ['Toggle', 'Detail folded away — see <a href="#p/sd-writing">Writing</a>', 'expanded'],
+ ['Comment', 'A remark for a person, not the reader', 'never'],
+ ],
+ cols: [1, 2.2, 1.4],
+ colAlign: ['', '', 'right'],
+ header: true,
+ })
+
+ // Container blocks are built FIRST so their children can name a real id — a
+ // parent pointing at an id that does not exist renders the child at top level.
+ const callout = b('callout', 'A callout. Click the mark to make it a note, a tip, an important, a warning or a caution — or to give it an emoji of your own.', { tone: 'tip' })
+ const toggle = b('toggle', 'A toggle, and this one starts folded', { open: false })
+
+ // The thread this space ships with. Two people, unresolved, so the page list
+ // badges it and the marker is in the margin where the remark belongs.
+ const commented = b('p', 'A comment is a remark for a person, not for the reader. Block options → <strong>Comment</strong>, or a page’s ⋯ → <strong>Comment on this page</strong>. There is a thread on this paragraph: the marker is out in the margin, so it never moves the writing, and the page list counts the ones nobody has settled.', {
+ comments: [{
+ id: nextId(),
+ author: 'Ada',
+ at: AT,
+ text: 'Does a comment go out with the file when I send it?',
+ replies: [{
+ id: nextId(),
+ author: 'Bo',
+ at: AT,
+ text: 'Yes — it is saved in the file. It stays out of the reading view and off the printout, but anyone you send the file to can read it. Resolve or delete it first if that matters.',
+ }],
+ }],
+ })
return {
format: FORMAT,
@@ -68,43 +132,31 @@ export function starterDoc(): SpacesDoc {
title: 'My space',
home: P.home,
theme: defaultTheme(),
+ assets: { [DIAGRAM]: STARTER_DIAGRAM },
pages: [
{
id: P.home,
title: 'Welcome',
icon: 'compass',
blocks: [
- b('p', 'This whole space — every page, the editor, the search — is <b>one HTML file</b>. No account, no server, nothing installed.'),
+ b('p', 'This whole space — every page, the editor, the search — is <strong>one HTML file</strong>. No account, no server, nothing installed.'),
b('h2', 'Try it'),
b('todo', 'Type something on this line', { done: false }),
b('todo', 'Press <code>⏎</code> to make a new block, <code>Tab</code> to indent it', { done: false }),
- b('todo', 'Press <code>/</code> on an empty line for headings, lists, quotes and code', { done: false }),
- b('todo', 'Press <code>⌘K</code> to search every page at once', { done: false }),
+ b('todo', 'Press <code>/</code> on an empty line for headings, lists, tables, quotes and code', { done: false }),
+ b('todo', 'Select any words — a formatting bar appears above them', { done: false }),
+ b('todo', 'Press <code>⌘K</code>, type <em>archived</em>, and open the page that is not in the sidebar', { done: false }),
b('p', 'Then press <code>⌘S</code>. The file on your disk now contains everything you just wrote.'),
b('h2', 'What is here'),
- b('p', 'Four pages, and each one demonstrates the thing it describes:'),
+ b('p', 'Seven more pages. Each one demonstrates the thing it describes, and every one of them is yours to rewrite or delete.'),
+ b('bullet', '<a href="#p/sd-writing">Writing</a> — the blocks you can make, and the marks you can put on them'),
+ b('bullet', '<a href="#p/sd-media">Tables, pictures and clips</a> — the things that are not paragraphs'),
b('bullet', '<a href="#p/sd-links">Pages and links</a> — how a space holds more than one page'),
- b('bullet', '<a href="#p/sd-writing">Writing</a> — the blocks you can make'),
b('bullet', '<a href="#p/sd-tracker">Tracker</a> — the same pages, on a board'),
+ b('bullet', '<a href="#p/sd-journal">Journal</a> — a page per day, when you want one'),
+ b('bullet', '<a href="#p/sd-inbox">Inbox</a> — somewhere to put things you have not filed'),
b('bullet', '<a href="#p/sd-limits">Sharing &amp; limits</a> — what this file can and cannot do'),
- b('p', 'The sidebar holds the whole tree. Drag a page onto another to nest it.'),
- b('p', 'And <code>⌘⇧J</code> opens today\u2019s journal — a page per day, made when you first write in it.'),
- ],
- },
- {
- id: P.links,
- title: 'Pages and links',
- icon: 'link',
- blocks: [
- b('p', 'A space is a <b>tree of pages</b>, not a single scroll. New page: the + in the sidebar, or <code>⌘⌥N</code>.'),
- b('h2', 'Linking'),
- b('p', 'Type <code>[[</code> anywhere to search your pages and drop a link in. If the page does not exist yet, the picker offers to make it.'),
- b('p', 'That link back to <a href="#p/sd-home">Welcome</a> was made exactly that way.'),
- b('h2', 'Backlinks'),
- b('p', 'Scroll to the bottom of any page and it tells you what links <i>to</i> it. Nothing to maintain — it is derived from the links themselves every time the page opens.'),
- b('p', 'This page links to <a href="#p/sd-writing">Writing</a>, so Writing lists this page underneath.'),
- b('h2', 'Why one file'),
- b('p', 'Links are page ids inside this document, so they resolve with the wifi off, from an email attachment, on a phone, and in ten years. A link between separate files could not do any of that.'),
+ b('p', 'The sidebar holds the whole tree; drag a page onto another to nest it. <code>[</code> gets the sidebar out of the way, and <code>]</code> opens the properties panel on the other side — one place that answers what you can change about the block the caret is in.'),
],
},
{
@@ -112,29 +164,30 @@ export function starterDoc(): SpacesDoc {
title: 'Writing',
icon: 'pen',
blocks: [
- b('p', 'Markdown shortcuts convert as you type them.'),
- b('h2', 'Headings'),
+ b('p', 'Markdown shortcuts convert as you type them. What is stored is the block, never the markdown — so a heading is a heading rather than a line that starts with a hash.'),
+ b('h2', 'Headings and lists'),
b('p', 'Type <code># </code>, <code>## </code> or <code>### </code> at the start of a line.'),
- b('h2', 'Lists'),
b('bullet', '<code>- </code> makes a bullet'),
b('bullet', 'and <code>Tab</code> nests it'),
b('number', '<code>1. </code> makes a numbered list'),
b('todo', '<code>[] </code> makes a checkbox', { done: false }),
- b('h2', 'Blocks that are not text'),
+ b('h2', 'Marks'),
+ b('p', 'Select any words and a small bar appears above them: <strong>bold</strong>, <em>italic</em>, <u>underline</u>, <s>strikethrough</s>, <code>inline code</code>, <mark>highlight</mark>, colour, a link, and one button that clears the lot.'),
+ b('p', 'The shortcuts are ⌘B, ⌘I, ⌘U, ⇧⌘S, ⌘E and ⇧⌘H — and ⌘K makes a link out of whatever is selected. With nothing selected, ⌘K is still the search.'),
+ b('p', 'Colour is nine names in two roles: <span class="sp-fg-red">the ink</span>, or <mark class="sp-bg-blue">the band behind the words</mark>. A fixed palette rather than a picker, so a colour can be chosen to stay readable on the page and on a printout — and it does print, because unlike a callout a coloured phrase has no second cue to fall back on.'),
+ b('h2', 'Blocks that are not paragraphs'),
b('quote', 'A quote — type <code>&gt; </code>.'),
- b('code', 'const space = oneFile\n// type ``` and a SPACE to make a code block', { lang: 'js' }),
- callout,
- b('p', 'Press <code>⏎</code> in a callout and the next line goes inside it. Empty line, <code>⌫</code>, and you are out.', { parent: callout.id }),
b('code',
- '// type ```js and a space — the language is yours to pick\n' +
- 'const space = { file: 1, pages: 5 }\n' +
+ '// type ```js and a SPACE — the language is yours to pick\n' +
+ 'const space = { file: 1, pages: 14 }\n' +
'console.log(`one file, ${space.pages} pages`)',
{ lang: 'js' }),
- b('p', 'Hover a code block to see — and change — its language.'),
+ b('p', 'Eight languages are highlighted and anything else is kept exactly as written, so <code>```rust</code> round-trips and lights up by itself the day the lexer learns it. Hover the block for its language chip, or press <code>]</code> and change it in the properties panel.'),
+ callout,
+ b('p', 'Press <code>⏎</code> in a callout and the next line goes inside it. Empty line, <code>⌫</code>, and you are out. The kind is named in words as well as coloured, so it survives a black-and-white printout.', { parent: callout.id }),
toggle,
- b('p', 'Anything indented under a toggle folds away with it.', { parent: toggle.id }),
+ b('p', 'Anything indented under a toggle folds away with it — and a toggle always <strong>prints expanded</strong>, because a handbook that silently omits what somebody folded is a data-loss-shaped bug.', { parent: toggle.id }),
b('divider'),
- b('p', 'Inline: <b>⌘B</b>, <i>⌘I</i>, <u>⌘U</u>.'),
b('h2', 'Lines that work things out'),
b('p', 'End a line with <code>=</code> and it answers. The answer is never stored — change a number above and every line below follows.'),
b('p', 'budget = 2400'),
@@ -143,23 +196,67 @@ export function starterDoc(): SpacesDoc {
b('p', '20% of budget ='),
b('p', '940 km in miles ='),
b('p', 'today + 3 weeks ='),
- b('p', 'It understands arithmetic, percentages, units, dates, times, names you define, and <code>sum above</code>. Type a sum without the <code>=</code> and it shows you the answer first — press <code>Tab</code> to keep it.'),
+ b('p', 'It understands arithmetic, percentages, units, dates, times, names you define, and <code>sum above</code>. Type a sum without the <code>=</code> and it shows you the answer first — press <code>Tab</code> to keep it. A line it cannot fully work out gets nothing at all, so "Meet Ana at 3" stays a sentence.'),
],
},
{
- id: P.limits,
- title: 'Sharing & limits',
- icon: 'scale',
+ id: P.media,
+ title: 'Tables, pictures and clips',
+ icon: 'image',
+ width: 'wide',
blocks: [
- b('p', 'Worth knowing before you rely on this.'),
- b('h2', 'Sharing is per file'),
- b('p', 'Sending someone this file sends them <b>the whole space</b> — every page, including any you archived. There is no per-page permission, because there is no server to enforce one.'),
- b('h2', 'Saving'),
- b('p', 'On Chrome and Edge, <code>⌘S</code> writes back to the file you opened. Everywhere else — Safari, Firefox, and every browser on iOS — the browser gives a page no way to write to its own file, so each save downloads a <b>new copy</b>. That is a browser limitation, not a setting.'),
- b('h2', 'Two people, two files'),
- b('p', 'If two people edit their own copy at the same time, there is no merge. They are two files. Live collaboration is coming; until it does, this is the honest position.'),
- b('h2', 'Size'),
- b('p', 'Text is essentially free — hundreds of pages of prose stay a small file. Images are what make it big, because they travel inside it.'),
+ b('p', 'This page is set to <strong>Wide</strong> in the page menu, because a table wants room a paragraph does not. Column, Wide and Full are chosen per page and travel in the file; how much room the window itself gives a column is remembered for your screen and never written down.'),
+ b('h2', 'Tables'),
+ table,
+ b('p', '<code>/</code> → Table, then type. <code>Tab</code> walks the cells and appends a row when it runs off the end; rows and columns come from the bar above the table, column widths drag, and the header row can be turned off. A cell holds ordinary rich text, so the link in the Toggle row is a real link — and it shows up in that page’s backlinks like any other.'),
+ b('p', 'It leaves as a GitHub pipe table, alignment included, and a Markdown table you import arrives as one. What it is not is a spreadsheet: no formulas, nothing that recalculates. That is a different app.'),
+ b('h2', 'Pictures'),
+ b('image', '', {
+ src: `asset:${DIAGRAM}`,
+ alt: 'A space drawn as the one file it is: a window with the page list down the left, the page being written on the right, and a label saying the editor is inside.',
+ caption: 'Drawn rather than photographed, which is why it costs 632 bytes.',
+ w: 640, h: 300, width: 100,
+ }),
+ b('p', 'Drop a picture on the page, or <code>/</code> → Image. A photograph off a phone is downscaled to fit the column before it is embedded — measured, a 4.9 MB picture goes in at 33 KB — and the space says so, with the original one click away. Two copies of the same picture are stored once. Alt text and the width are in the properties panel.'),
+ b('p', 'A picture that points at an address on the web is <em>not</em> loaded until you say so; the placeholder names the site first. Opening a file somebody mailed you should not tell them that you opened it.'),
+ b('h2', 'Clips'),
+ b('media', '', {
+ kind: 'audio',
+ src: STARTER_TONE,
+ alt: 'A 1.2-second test tone',
+ controls: true,
+ }),
+ b('p', 'A real audio block, embedded, ordinary. Video is the same block with a picture in it, and it takes a poster still into the printout and into the file-manager preview, where a player would be nothing at all.'),
+ b('p', 'Nothing here plays by itself, and there is no setting that will make it. A space is an editor, a reading view, a printout and a thumbnail, and a clip that starts on its own is wrong in all four.'),
+ b('p', 'Clips are also what makes a file too heavy to mail. This one is a test tone — 9 KB of sound, and by some way the largest thing in this space.'),
+ b('h2', 'Cards for things on the web'),
+ b('link', '<a href="https://bento.page">Bento — self-contained office documents</a>', {
+ url: 'https://bento.page',
+ title: 'Bento — self-contained office documents',
+ desc: 'The project this space came out of: one HTML file that is the document, the viewer and the editor at once.',
+ site: 'bento.page',
+ }),
+ b('p', '<code>/</code> → Link to the web. Nothing is fetched — not when you make the card and not when somebody opens the space. Other apps build this card on a server that reads the address’s tags; there is no server here and there is not going to be one, so the card shows what you type, and the dialog says so.'),
+ ],
+ },
+ {
+ id: P.links,
+ title: 'Pages and links',
+ icon: 'link',
+ blocks: [
+ b('p', 'A space is a <strong>tree of pages</strong>, not one long scroll. New page: the + in the sidebar, or <code>⌘⌥N</code>. Drag a page onto another to nest it.'),
+ b('h2', 'Linking'),
+ b('p', 'Type <code>[[</code> anywhere to search your pages and drop a link in. If the page does not exist yet, the picker offers to make it.'),
+ b('p', 'That link back to <a href="#p/sd-home">Welcome</a> was made exactly that way.'),
+ b('p', 'A link can also be a card of its own — <code>/</code> → Link to page:'),
+ b('pagelink', '', { page: P.tracker }),
+ b('h2', 'Backlinks'),
+ b('p', 'Scroll to the bottom of any page and it tells you what links <em>to</em> it. Nothing to maintain: it is derived from the links themselves, every time the page opens.'),
+ b('p', 'This page links to <a href="#p/sd-writing">Writing</a>, so Writing lists this page underneath — and so does <a href="#p/sd-media">Tables, pictures and clips</a>, because the link in that page’s table is a link like any other.'),
+ b('h2', 'Finding things'),
+ b('p', '<code>⌘K</code> searches every page at once — titles and the words inside blocks, including the ones folded away in a toggle and the pages you have archived. <code>⌘F</code> finds and replaces across the whole space, not only the page you are looking at.'),
+ b('h2', 'Why one file'),
+ b('p', 'Links are page ids inside this document, so they resolve with the wifi off, from a mail attachment, on a phone, and in ten years. A link between separate files could not do any of that.'),
],
},
{
@@ -167,18 +264,20 @@ export function starterDoc(): SpacesDoc {
title: 'Tracker',
icon: 'board',
blocks: [
- b('p', 'An <b>issue is a page</b>. The cards below are the pages nested under this one — open one and you are in a document you can write anything in, with its fields along the top.'),
+ b('p', 'An <strong>issue is a page</strong>. The cards below are the pages nested under this one — open one and you are in a document you can write anything in, with its fields along the top.'),
b('p', 'Nothing here is a second kind of thing: issues search, link, print, export and back-link like every other page. A page becomes an issue when it has a status, and stops being one when it does not.'),
b('view', 'Issues', { layout: 'board', groupBy: 'status' }),
b('h2', 'Making them'),
b('p', '<code>⌘⇧I</code> makes an issue. The tag button in the toolbar turns the page you are already on into one — useful when a note turns out to be work.'),
- b('p', 'Drag a card to another column to change its status. <b>Open only</b> hides what is done; <b>Filter</b> narrows by any field.'),
+ b('p', 'Drag a card to another column to change its status; change the field at the top of a card’s page and watch the card move instead. <strong>Open only</strong> hides what is finished, and <strong>Filter</strong> narrows by any field.'),
+ b('p', 'The controls above the board are five: <strong>Board ⇄ List</strong> changes the shape, <strong>Group</strong> picks the field the columns come from, and <strong>Sort</strong> orders by any field — clicking the one you are already sorted by reverses it. <strong>Manual order</strong> is always first in that menu, because a board somebody arranged by dragging should be one click from getting that order back.'),
+ b('p', 'This page is not set to Wide and is still wide: a board takes the room it needs unless the page menu says otherwise.'),
],
},
...[
issue('Open this card — it is an ordinary page', P.tracker,
{ status: 'doing', priority: 'high' },
- 'You are in it. The row above is fields; everything from here down is a page — write notes, paste an image, nest a toggle. That is the whole trick: the tracker did not invent a new thing to hold work in, it put fields on the thing you already had.'),
+ 'You are in it. The row above is fields; everything from here down is a page — write notes, paste a picture, nest a toggle. That is the whole trick: the tracker did not invent a new thing to hold work in, it put fields on the thing you already had.'),
issue('Drag me to another column', P.tracker,
{ status: 'todo', priority: 'medium' },
'Dragging a card writes the new status onto this page. Go the other way too: change the field at the top and watch the card move on the board.'),
@@ -190,15 +289,68 @@ export function starterDoc(): SpacesDoc {
'These five are a demonstration, not a template. Delete them and the board is empty and yours — it shows whatever pages in this space have a status, wherever they live in the tree.'),
issue('This one is finished', P.tracker,
{ status: 'done' },
- 'Done and cancelled are <i>phases</i>, not just names, which is what lets <b>Open only</b> mean something without anyone configuring a filter.'),
+ 'Done and cancelled are <em>phases</em>, not just names, which is what lets <strong>Open only</strong> mean something without anyone configuring a filter.'),
],
+ {
+ id: P.journal,
+ title: 'Journal',
+ icon: 'book',
+ journalHome: true,
+ blocks: [
+ b('p', 'Press <code>⌘⇧J</code> and today’s entry appears under this page.'),
+ b('p', 'There is no entry for today yet, and there will not be one until you write in it. Other apps make a page for every day you happen to open them; on a filesystem that is a cheap empty file, and in a document somebody mails around it is permanent weight for nothing.'),
+ b('p', 'Arrows either side of the date walk to yesterday and tomorrow. Entries nest here, newest first, however out of order you wrote them.'),
+ b('p', 'The date is stored as <code>2026-08-06</code> and shown in your own language: a reader in Tokyo sees 2026年8月6日木曜日 out of the same file. The <em>date</em> is what makes an entry that day’s, not the title — so rename one to “Monday — sprint kickoff” and it stays exactly where it belongs.'),
+ b('p', 'An entry is an ordinary page. It searches, links, back-links, prints and exports like everything else here.'),
+ ],
+ },
{
id: P.inbox,
title: 'Inbox',
icon: 'inbox',
blocks: [
- b('p', 'A page to throw things into before they are worth filing.'),
- b('p', ''),
+ b('todo', 'Type here; file it later', { done: false }),
+ b('p', 'Somewhere to throw things before they are worth a page of their own. Nothing is special about this one — it is an inbox because you decided it is.'),
+ b('p', 'When a line turns out to be work, the tag button makes it an issue. When it turns out to be a subject, <code>[[</code> gives it a page.'),
+ ],
+ },
+ {
+ id: P.limits,
+ title: 'Sharing & limits',
+ icon: 'scale',
+ blocks: [
+ b('p', 'Worth knowing before you rely on this.'),
+ b('h2', 'The file is the sharing'),
+ b('p', 'Sending someone this file sends them <strong>the whole space</strong> — every page, including the archived one. There is no per-page permission, because there is no server to enforce one. The file <em>is</em> the capability: whoever has it can read it and can edit it.'),
+ b('h2', 'Working live'),
+ b('p', 'Two tabs of the same space, or two people with the same file, edit it together: changes merge per character, and the file you save carries the state, so a copy edited on a plane rejoins as a fork rather than overwriting anybody. A coloured initial sits on the page each person is reading; click somebody in the people panel to go to where they are.'),
+ b('p', 'A space goes live only when it arrived carrying a session — a file that was saved or shared — or when you start one from the button beside ⋯. A fresh space and a template stay offline. That button says which of the three situations you are in, including the usual one, which is that nothing is shared at all.'),
+ b('p', 'The awkward part: a session is a room whose keys live in the file. Whoever holds a copy holds the room, and there are no accounts to take it back from them. <strong>Rotate keys</strong> is what revocation looks like here — it mints a new room and leaves the old copies talking to nobody.'),
+ b('h2', 'Comments'),
+ commented,
+ b('h2', 'Sending one page out'),
+ b('p', '<strong>Export page as a space…</strong> writes the page you choose — and, if you want, the pages under it — as its own file: a whole space, not an attachment. It gets a new document id and none of this file’s keys, so it is a new document rather than a fork that would try to join this one’s session. Only the pictures those pages use travel with it, and a link pointing at a page that stayed behind becomes text naming that page rather than a link to nowhere.'),
+ b('h2', 'Bringing pages in'),
+ b('p', 'The same trip backwards: choose a space, or drop one on the window, and its pages arrive under any page you pick. Ids this space already uses are renamed and the links inside the import follow them, so nothing arrives pre-broken. A folder of Markdown files comes in the same way, folder tree and <code>[[wikilinks]]</code> intact. Either one is a single <code>⌘Z</code>.'),
+ b('h2', 'Saving'),
+ b('p', 'On Chrome and Edge, <code>⌘S</code> writes back to the file you opened. Everywhere else — Safari, Firefox, and every browser on iOS — the browser gives a page no way to write to its own file, so each save downloads a <strong>new copy</strong>. That is a browser limitation, not a setting.'),
+ b('h2', 'Archived is not deleted'),
+ b('p', 'This space ships one archived page, called <strong>The archived page</strong>. Archiving takes a page out of the sidebar and leaves it in the file: still found by <code>⌘K</code>, still linkable, still there when you send the file to somebody. Archiving is the delete this app offers, because the file is the only copy there is.'),
+ b('h2', 'Two copies and no session'),
+ b('p', 'If two people edit their own copy with no session between them, there is no merge. They are two files. Putting them back together means importing one into the other and reading the result — which works, and is not the same as it having merged.'),
+ b('h2', 'Size'),
+ b('p', 'Text is essentially free: hundreds of pages of prose stay a small file. Pictures and clips are what make it big, because they travel inside it rather than beside it.'),
+ ],
+ },
+ {
+ id: P.archive,
+ title: 'The archived page',
+ icon: 'note',
+ archived: true,
+ blocks: [
+ b('p', 'You found this with <code>⌘K</code>. Nothing in this space links here, and it is not in the page list.'),
+ b('p', 'It is archived: out of the sidebar, still in the file, still searchable, still linkable. The page list keeps an <strong>Archived</strong> group at the bottom to restore from, and a page’s ⋯ menu is what puts one here.'),
+ b('p', 'Which is why <a href="#p/sd-limits">Sharing &amp; limits</a> names this page by name. Archived is not deleted, and it is not private — send the file and this goes with it.'),
],
},
],
diff --git a/spaces/src/starterdata.ts b/spaces/src/starterdata.ts
new file mode 100644
index 00000000..48b0d941
--- /dev/null
+++ b/spaces/src/starterdata.ts
@@ -0,0 +1,31 @@
+// SPDX-License-Identifier: MIT
+// Copyright (c) 2026 The Bento authors
+// The two files the starter space ships with — kept here rather than inline in
+// starter.ts, the way slides keeps its embedded faces in fontdata.ts, because a
+// 13,000-character string in the middle of prose makes the prose unreadable.
+//
+// BOTH ARE GENERATED, and the commands are here so they can be regenerated
+// rather than guessed at. Both were chosen to cost almost nothing once the
+// shell is deflated: the drawing is text, and the tone is exactly periodic.
+//
+// the tone ffmpeg -f lavfi -i "sine=frequency=500:duration=1.2:sample_rate=8000" \
+// -acodec pcm_u8 -ac 1 chime.wav
+// 9,678 B of PCM → 12,904 B of base64 → 204 B once deflated. 500 Hz
+// at 8 kHz is 16 samples per period and the length is a whole
+// number of them, so the payload is one short pattern repeated —
+// which is also why it starts and stops without a click.
+// the drawing hand-written SVG, then encodeURIComponent with spaces left
+// alone and apostrophes escaped. 3,175 B → 632 B once deflated.
+//
+// The drawing is an `asset:` rather than an inline src so the starter exercises
+// the table every picked image goes into; the tone is inline because one clip
+// referenced once has nothing to dedupe against.
+
+/** The tone on "Tables, pictures and clips" — 1.2s of 500 Hz, so there is
+ * something to press play on. */
+export const STARTER_TONE =
+ 'data:audio/wav;base64,UklGRsYlAABXQVZFZm10IBAAAAABAAEAQB8AAEAfAAABAAgATElTVBoAAABJTkZPSVNGVA4AAABMYXZmNjIuMTIuMTAyAGRhdGGAJQAAgIaLjo+Oi4aAeXRxcHF0eYCGi46PjouGgHl0cXBxdHmAhouOj46LhoB5dHFwcXR5gIaLjo+Oi4aAeXRxcHF0eYCGi46PjouGgHl0cXBxdHmAhouOj46LhoB5dHFwcXR5gIaLjo+Oi4aAeXRxcHF0eYCGi46PjouGgHl0cXBxdHmAhouOj46LhoB5dHFwcXR5gIaLjo+Oi4aAeXRxcHF0eYCGi46PjouGgHl0cXBxdHmAhouOj46LhoB5dHFwcXR5gIaLjo+Oi4aAeXRxcHF0eYCGi46PjouGgHl0cXBxdHmAhouOj46LhoB5dHFwcXR5gIaLjo+Oi4aAeXRxcHF0eYCGi46PjouGgHl0cXBxdHmAhouOj46LhoB5dHFwcXR5gIaLjo+Oi4aAeXRxcHF0eYCGi46PjouGgHl0cXBxdHmAhouOj46LhoB5dHFwcXR5gIaLjo+Oi4aAeXRxcHF0eYCGi46PjouGgHl0cXBxdHmAhouOj46LhoB5dHFwcXR5gIaLjo+Oi4aAeXRxcHF0eYCGi46PjouGgHl0cXBxdHmAhouOj46LhoB5dHFwcXR5gIaLjo+Oi4aAeXRxcHF0eYCGi46PjouGgHl0cXBxdHmAhouOj46LhoB5dHFwcXR5gIaLjo+Oi4aAeXRxcHF0eYCGi46PjouGgHl0cXBxdHmAhouOj46LhoB5dHFwcXR5gIaLjo+Oi4aAeXRxcHF0eYCGi46PjouGgHl0cXBxdHmAhouOj46LhoB5dHFwcXR5gIaLjo+Oi4aAeXRxcHF0eYCGi46PjouGgHl0cXBxdHmAhouOj46LhoB5dHFwcXR5gIaLjo+Oi4aAeXRxcHF0eYCGi46PjouGgHl0cXBxdHmAhouOj46LhoB5dHFwcXR5gIaLjo+Oi4aAeXRxcHF0eYCGi46PjouGgHl0cXBxdHmAhouOj46LhoB5dHFwcXR5gIaLjo+Oi4aAeXRxcHF0eYCGi46PjouGgHl0cXBxdHmAhouOj46LhoB5dHFwcXR5gIaLjo+Oi4aAeXRxcHF0eYCGi46PjouGgHl0cXBxdHmAhouOj46LhoB5dHFwcXR5gIaLjo+Oi4aAeXRxcHF0eYCGi46PjouGgHl0cXBxdHmAhouOj46LhoB5dHFwcXR5gIaLjo+Oi4aAeXRxcHF0eYCGi46PjouGgHl0cXBxdHmAhouOj46LhoB5dHFwcXR5gIaLjo+Oi4aAeXRxcHF0eYCGi46PjouGgHl0cXBxdHmAhouOj46LhoB5dHFwcXR5gIaLjo+Oi4aAeXRxcHF0eYCGi46PjouGgHl0cXBxdHmAhouOj46LhoB5dHFwcXR5gIaLjo+Oi4aAeXRxcHF0eYCGi46PjouGgHl0cXBxdHmAhouOj46LhoB5dHFwcXR5gIaLjo+Oi4aAeXRxcHF0eYCGi46PjouGgHl0cXBxdHmAhouOj46LhoB5dHFwcXR5gIaLjo+Oi4aAeXRxcHF0eYCGi46PjouGgHl0cXBxdHmAhouOj46LhoB5dHFwcXR5gIaLjo+Oi4aAeXRxcHF0eYCGi46PjouGgHl0cXBxdHmAhouOj46LhoB5dHFwcXR5gIaLjo+Oi4aAeXRxcHF0eYCGi46PjouGgHl0cXBxdHmAhouOj46LhoB5dHFwcXR5gIaLjo+Oi4aAeXRxcHF0eYCGi46PjouGgHl0cXBxdHmAhouOj46LhoB5dHFwcXR5gIaLjo+Oi4aAeXRxcHF0eYCGi46PjouGgHl0cXBxdHmAhouOj46LhoB5dHFwcXR5gIaLjo+Oi4aAeXRxcHF0eYCGi46PjouGgHl0cXBxdHmAhouOj46LhoB5dHFwcXR5gIaLjo+Oi4aAeXRxcHF0eYCGi46PjouGgHl0cXBxdHmAhouOj46LhoB5dHFwcXR5gIaLjo+Oi4aAeXRxcHF0eYCGi46PjouGgHl0cXBxdHmAhouOj46LhoB5dHFwcXR5gIaLjo+Oi4aAeXRxcHF0eYCGi46PjouGgHl0cXBxdHmAhouOj46LhoB5dHFwcXR5gIaLjo+Oi4aAeXRxcHF0eYCGi46PjouGgHl0cXBxdHmAhouOj46LhoB5dHFwcXR5gIaLjo+Oi4aAeXRxcHF0eYCGi46PjouGgHl0cXBxdHmAhouOj46LhoB5dHFwcXR5gIaLjo+Oi4aAeXRxcHF0eYCGi46PjouGgHl0cXBxdHmAhouOj46LhoB5dHFwcXR5gIaLjo+Oi4aAeXRxcHF0eYCGi46PjouGgHl0cXBxdHmAhouOj46LhoB5dHFwcXR5gIaLjo+Oi4aAeXRxcHF0eYCGi46PjouGgHl0cXBxdHmAhouOj46LhoB5dHFwcXR5gIaLjo+Oi4aAeXRxcHF0eYCGi46PjouGgHl0cXBxdHmAhouOj46LhoB5dHFwcXR5gIaLjo+Oi4aAeXRxcHF0eYCGi46PjouGgHl0cXBxdHmAhouOj46LhoB5dHFwcXR5gIaLjo+Oi4aAeXRxcHF0eYCGi46PjouGgHl0cXBxdHmAhouOj46LhoB5dHFwcXR5gIaLjo+Oi4aAeXRxcHF0eYCGi46PjouGgHl0cXBxdHmAhouOj46LhoB5dHFwcXR5gIaLjo+Oi4aAeXRxcHF0eYCGi46PjouGgHl0cXBxdHmAhouOj46LhoB5dHFwcXR5gIaLjo+Oi4aAeXRxcHF0eYCGi46PjouGgHl0cXBxdHmAhouOj46LhoB5dHFwcXR5gIaLjo+Oi4aAeXRxcHF0eYCGi46PjouGgHl0cXBxdHmAhouOj46LhoB5dHFwcXR5gIaLjo+Oi4aAeXRxcHF0eYCGi46PjouGgHl0cXBxdHmAhouOj46LhoB5dHFwcXR5gIaLjo+Oi4aAeXRxcHF0eYCGi46PjouGgHl0cXBxdHmAhouOj46LhoB5dHFwcXR5gIaLjo+Oi4aAeXRxcHF0eYCGi46PjouGgHl0cXBxdHmAhouOj46LhoB5dHFwcXR5gIaLjo+Oi4aAeXRxcHF0eYCGi46PjouGgHl0cXBxdHmAhouOj46LhoB5dHFwcXR5gIaLjo+Oi4aAeXRxcHF0eYCGi46PjouGgHl0cXBxdHmAhouOj46LhoB5dHFwcXR5gIaLjo+Oi4aAeXRxcHF0eYCGi46PjouGgHl0cXBxdHmAhouOj46LhoB5dHFwcXR5gIaLjo+Oi4aAeXRxcHF0eYCGi46PjouGgHl0cXBxdHmAhouOj46LhoB5dHFwcXR5gIaLjo+Oi4aAeXRxcHF0eYCGi46PjouGgHl0cXBxdHmAhouOj46LhoB5dHFwcXR5gIaLjo+Oi4aAeXRxcHF0eYCGi46PjouGgHl0cXBxdHmAhouOj46LhoB5dHFwcXR5gIaLjo+Oi4aAeXRxcHF0eYCGi46PjouGgHl0cXBxdHmAhouOj46LhoB5dHFwcXR5gIaLjo+Oi4aAeXRxcHF0eYCGi46PjouGgHl0cXBxdHmAhouOj46LhoB5dHFwcXR5gIaLjo+Oi4aAeXRxcHF0eYCGi46PjouGgHl0cXBxdHmAhouOj46LhoB5dHFwcXR5gIaLjo+Oi4aAeXRxcHF0eYCGi46PjouGgHl0cXBxdHmAhouOj46LhoB5dHFwcXR5gIaLjo+Oi4aAeXRxcHF0eYCGi46PjouGgHl0cXBxdHmAhouOj46LhoB5dHFwcXR5gIaLjo+Oi4aAeXRxcHF0eYCGi46PjouGgHl0cXBxdHmAhouOj46LhoB5dHFwcXR5gIaLjo+Oi4aAeXRxcHF0eYCGi46PjouGgHl0cXBxdHmAhouOj46LhoB5dHFwcXR5gIaLjo+Oi4aAeXRxcHF0eYCGi46PjouGgHl0cXBxdHmAhouOj46LhoB5dHFwcXR5gIaLjo+Oi4aAeXRxcHF0eYCGi46PjouGgHl0cXBxdHmAhouOj46LhoB5dHFwcXR5gIaLjo+Oi4aAeXRxcHF0eYCGi46PjouGgHl0cXBxdHmAhouOj46LhoB5dHFwcXR5gIaLjo+Oi4aAeXRxcHF0eYCGi46PjouGgHl0cXBxdHmAhouOj46LhoB5dHFwcXR5gIaLjo+Oi4aAeXRxcHF0eYCGi46PjouGgHl0cXBxdHmAhouOj46LhoB5dHFwcXR5gIaLjo+Oi4aAeXRxcHF0eYCGi46PjouGgHl0cXBxdHmAhouOj46LhoB5dHFwcXR5gIaLjo+Oi4aAeXRxcHF0eYCGi46PjouGgHl0cXBxdHmAhouOj46LhoB5dHFwcXR5gIaLjo+Oi4aAeXRxcHF0eYCGi46PjouGgHl0cXBxdHmAhouOj46LhoB5dHFwcXR5gIaLjo+Oi4aAeXRxcHF0eYCGi46PjouGgHl0cXBxdHmAhouOj46LhoB5dHFwcXR5gIaLjo+Oi4aAeXRxcHF0eYCGi46PjouGgHl0cXBxdHmAhouOj46LhoB5dHFwcXR5gIaLjo+Oi4aAeXRxcHF0eYCGi46PjouGgHl0cXBxdHmAhouOj46LhoB5dHFwcXR5gIaLjo+Oi4aAeXRxcHF0eYCGi46PjouGgHl0cXBxdHmAhouOj46LhoB5dHFwcXR5gIaLjo+Oi4aAeXRxcHF0eYCGi46PjouGgHl0cXBxdHmAhouOj46LhoB5dHFwcXR5gIaLjo+Oi4aAeXRxcHF0eYCGi46PjouGgHl0cXBxdHmAhouOj46LhoB5dHFwcXR5gIaLjo+Oi4aAeXRxcHF0eYCGi46PjouGgHl0cXBxdHmAhouOj46LhoB5dHFwcXR5gIaLjo+Oi4aAeXRxcHF0eYCGi46PjouGgHl0cXBxdHmAhouOj46LhoB5dHFwcXR5gIaLjo+Oi4aAeXRxcHF0eYCGi46PjouGgHl0cXBxdHmAhouOj46LhoB5dHFwcXR5gIaLjo+Oi4aAeXRxcHF0eYCGi46PjouGgHl0cXBxdHmAhouOj46LhoB5dHFwcXR5gIaLjo+Oi4aAeXRxcHF0eYCGi46PjouGgHl0cXBxdHmAhouOj46LhoB5dHFwcXR5gIaLjo+Oi4aAeXRxcHF0eYCGi46PjouGgHl0cXBxdHmAhouOj46LhoB5dHFwcXR5gIaLjo+Oi4aAeXRxcHF0eYCGi46PjouGgHl0cXBxdHmAhouOj46LhoB5dHFwcXR5gIaLjo+Oi4aAeXRxcHF0eYCGi46PjouGgHl0cXBxdHmAhouOj46LhoB5dHFwcXR5gIaLjo+Oi4aAeXRxcHF0eYCGi46PjouGgHl0cXBxdHmAhouOj46LhoB5dHFwcXR5gIaLjo+Oi4aAeXRxcHF0eYCGi46PjouGgHl0cXBxdHmAhouOj46LhoB5dHFwcXR5gIaLjo+Oi4aAeXRxcHF0eYCGi46PjouGgHl0cXBxdHmAhouOj46LhoB5dHFwcXR5gIaLjo+Oi4aAeXRxcHF0eYCGi46PjouGgHl0cXBxdHmAhouOj46LhoB5dHFwcXR5gIaLjo+Oi4aAeXRxcHF0eYCGi46PjouGgHl0cXBxdHmAhouOj46LhoB5dHFwcXR5gIaLjo+Oi4aAeXRxcHF0eYCGi46PjouGgHl0cXBxdHmAhouOj46LhoB5dHFwcXR5gIaLjo+Oi4aAeXRxcHF0eYCGi46PjouGgHl0cXBxdHmAhouOj46LhoB5dHFwcXR5gIaLjo+Oi4aAeXRxcHF0eYCGi46PjouGgHl0cXBxdHmAhouOj46LhoB5dHFwcXR5gIaLjo+Oi4aAeXRxcHF0eYCGi46PjouGgHl0cXBxdHmAhouOj46LhoB5dHFwcXR5gIaLjo+Oi4aAeXRxcHF0eYCGi46PjouGgHl0cXBxdHmAhouOj46LhoB5dHFwcXR5gIaLjo+Oi4aAeXRxcHF0eYCGi46PjouGgHl0cXBxdHmAhouOj46LhoB5dHFwcXR5gIaLjo+Oi4aAeXRxcHF0eYCGi46PjouGgHl0cXBxdHmAhouOj46LhoB5dHFwcXR5gIaLjo+Oi4aAeXRxcHF0eYCGi46PjouGgHl0cXBxdHmAhouOj46LhoB5dHFwcXR5gIaLjo+Oi4aAeXRxcHF0eYCGi46PjouGgHl0cXBxdHmAhouOj46LhoB5dHFwcXR5gIaLjo+Oi4aAeXRxcHF0eYCGi46PjouGgHl0cXBxdHmAhouOj46LhoB5dHFwcXR5gIaLjo+Oi4aAeXRxcHF0eYCGi46PjouGgHl0cXBxdHmAhouOj46LhoB5dHFwcXR5gIaLjo+Oi4aAeXRxcHF0eYCGi46PjouGgHl0cXBxdHmAhouOj46LhoB5dHFwcXR5gIaLjo+Oi4aAeXRxcHF0eYCGi46PjouGgHl0cXBxdHmAhouOj46LhoB5dHFwcXR5gIaLjo+Oi4aAeXRxcHF0eYCGi46PjouGgHl0cXBxdHmAhouOj46LhoB5dHFwcXR5gIaLjo+Oi4aAeXRxcHF0eYCGi46PjouGgHl0cXBxdHmAhouOj46LhoB5dHFwcXR5gIaLjo+Oi4aAeXRxcHF0eYCGi46PjouGgHl0cXBxdHmAhouOj46LhoB5dHFwcXR5gIaLjo+Oi4aAeXRxcHF0eYCGi46PjouGgHl0cXBxdHmAhouOj46LhoB5dHFwcXR5gIaLjo+Oi4aAeXRxcHF0eYCGi46PjouGgHl0cXBxdHmAhouOj46LhoB5dHFwcXR5gIaLjo+Oi4aAeXRxcHF0eYCGi46PjouGgHl0cXBxdHmAhouOj46LhoB5dHFwcXR5gIaLjo+Oi4aAeXRxcHF0eYCGi46PjouGgHl0cXBxdHmAhouOj46LhoB5dHFwcXR5gIaLjo+Oi4aAeXRxcHF0eYCGi46PjouGgHl0cXBxdHmAhouOj46LhoB5dHFwcXR5gIaLjo+Oi4aAeXRxcHF0eYCGi46PjouGgHl0cXBxdHmAhouOj46LhoB5dHFwcXR5gIaLjo+Oi4aAeXRxcHF0eYCGi46PjouGgHl0cXBxdHmAhouOj46LhoB5dHFwcXR5gIaLjo+Oi4aAeXRxcHF0eYCGi46PjouGgHl0cXBxdHmAhouOj46LhoB5dHFwcXR5gIaLjo+Oi4aAeXRxcHF0eYCGi46PjouGgHl0cXBxdHmAhouOj46LhoB5dHFwcXR5gIaLjo+Oi4aAeXRxcHF0eYCGi46PjouGgHl0cXBxdHmAhouOj46LhoB5dHFwcXR5gIaLjo+Oi4aAeXRxcHF0eYCGi46PjouGgHl0cXBxdHmAhouOj46LhoB5dHFwcXR5gIaLjo+Oi4aAeXRxcHF0eYCGi46PjouGgHl0cXBxdHmAhouOj46LhoB5dHFwcXR5gIaLjo+Oi4aAeXRxcHF0eYCGi46PjouGgHl0cXBxdHmAhouOj46LhoB5dHFwcXR5gIaLjo+Oi4aAeXRxcHF0eYCGi46PjouGgHl0cXBxdHmAhouOj46LhoB5dHFwcXR5gIaLjo+Oi4aAeXRxcHF0eYCGi46PjouGgHl0cXBxdHmAhouOj46LhoB5dHFwcXR5gIaLjo+Oi4aAeXRxcHF0eYCGi46PjouGgHl0cXBxdHmAhouOj46LhoB5dHFwcXR5gIaLjo+Oi4aAeXRxcHF0eYCGi46PjouGgHl0cXBxdHmAhouOj46LhoB5dHFwcXR5gIaLjo+Oi4aAeXRxcHF0eYCGi46PjouGgHl0cXBxdHmAhouOj46LhoB5dHFwcXR5gIaLjo+Oi4aAeXRxcHF0eYCGi46PjouGgHl0cXBxdHmAhouOj46LhoB5dHFwcXR5gIaLjo+Oi4aAeXRxcHF0eYCGi46PjouGgHl0cXBxdHmAhouOj46LhoB5dHFwcXR5gIaLjo+Oi4aAeXRxcHF0eYCGi46PjouGgHl0cXBxdHmAhouOj46LhoB5dHFwcXR5gIaLjo+Oi4aAeXRxcHF0eYCGi46PjouGgHl0cXBxdHmAhouOj46LhoB5dHFwcXR5gIaLjo+Oi4aAeXRxcHF0eYCGi46PjouGgHl0cXBxdHmAhouOj46LhoB5dHFwcXR5gIaLjo+Oi4aAeXRxcHF0eYCGi46PjouGgHl0cXBxdHmAhouOj46LhoB5dHFwcXR5gIaLjo+Oi4aAeXRxcHF0eYCGi46PjouGgHl0cXBxdHmAhouOj46LhoB5dHFwcXR5gIaLjo+Oi4aAeXRxcHF0eYCGi46PjouGgHl0cXBxdHmAhouOj46LhoB5dHFwcXR5gIaLjo+Oi4aAeXRxcHF0eYCGi46PjouGgHl0cXBxdHmAhouOj46LhoB5dHFwcXR5gIaLjo+Oi4aAeXRxcHF0eYCGi46PjouGgHl0cXBxdHmAhouOj46LhoB5dHFwcXR5gIaLjo+Oi4aAeXRxcHF0eYCGi46PjouGgHl0cXBxdHmAhouOj46LhoB5dHFwcXR5gIaLjo+Oi4aAeXRxcHF0eYCGi46PjouGgHl0cXBxdHmAhouOj46LhoB5dHFwcXR5gIaLjo+Oi4aAeXRxcHF0eYCGi46PjouGgHl0cXBxdHmAhouOj46LhoB5dHFwcXR5gIaLjo+Oi4aAeXRxcHF0eYCGi46PjouGgHl0cXBxdHmAhouOj46LhoB5dHFwcXR5gIaLjo+Oi4aAeXRxcHF0eYCGi46PjouGgHl0cXBxdHmAhouOj46LhoB5dHFwcXR5gIaLjo+Oi4aAeXRxcHF0eYCGi46PjouGgHl0cXBxdHmAhouOj46LhoB5dHFwcXR5gIaLjo+Oi4aAeXRxcHF0eYCGi46PjouGgHl0cXBxdHmAhouOj46LhoB5dHFwcXR5gIaLjo+Oi4aAeXRxcHF0eYCGi46PjouGgHl0cXBxdHmAhouOj46LhoB5dHFwcXR5gIaLjo+Oi4aAeXRxcHF0eYCGi46PjouGgHl0cXBxdHmAhouOj46LhoB5dHFwcXR5gIaLjo+Oi4aAeXRxcHF0eYCGi46PjouGgHl0cXBxdHmAhouOj46LhoB5dHFwcXR5gIaLjo+Oi4aAeXRxcHF0eYCGi46PjouGgHl0cXBxdHmAhouOj46LhoB5dHFwcXR5gIaLjo+Oi4aAeXRxcHF0eYCGi46PjouGgHl0cXBxdHmAhouOj46LhoB5dHFwcXR5gIaLjo+Oi4aAeXRxcHF0eYCGi46PjouGgHl0cXBxdHmAhouOj46LhoB5dHFwcXR5gIaLjo+Oi4aAeXRxcHF0eYCGi46PjouGgHl0cXBxdHmAhouOj46LhoB5dHFwcXR5gIaLjo+Oi4aAeXRxcHF0eYCGi46PjouGgHl0cXBxdHmAhouOj46LhoB5dHFwcXR5gIaLjo+Oi4aAeXRxcHF0eYCGi46PjouGgHl0cXBxdHmAhouOj46LhoB5dHFwcXR5gIaLjo+Oi4aAeXRxcHF0eYCGi46PjouGgHl0cXBxdHmAhouOj46LhoB5dHFwcXR5gIaLjo+Oi4aAeXRxcHF0eYCGi46PjouGgHl0cXBxdHmAhouOj46LhoB5dHFwcXR5gIaLjo+Oi4aAeXRxcHF0eYCGi46PjouGgHl0cXBxdHmAhouOj46LhoB5dHFwcXR5gIaLjo+Oi4aAeXRxcHF0eYCGi46PjouGgHl0cXBxdHmAhouOj46LhoB5dHFwcXR5gIaLjo+Oi4aAeXRxcHF0eYCGi46PjouGgHl0cXBxdHmAhouOj46LhoB5dHFwcXR5gIaLjo+Oi4aAeXRxcHF0eYCGi46PjouGgHl0cXBxdHmAhouOj46LhoB5dHFwcXR5gIaLjo+Oi4aAeXRxcHF0eYCGi46PjouGgHl0cXBxdHmAhouOj46LhoB5dHFwcXR5gIaLjo+Oi4aAeXRxcHF0eYCGi46PjouGgHl0cXBxdHmAhouOj46LhoB5dHFwcXR5gIaLjo+Oi4aAeXRxcHF0eYCGi46PjouGgHl0cXBxdHmAhouOj46LhoB5dHFwcXR5gIaLjo+Oi4aAeXRxcHF0eYCGi46PjouGgHl0cXBxdHmAhouOj46LhoB5dHFwcXR5gIaLjo+Oi4aAeXRxcHF0eYCGi46PjouGgHl0cXBxdHmAhouOj46LhoB5dHFwcXR5gIaLjo+Oi4aAeXRxcHF0eYCGi46PjouGgHl0cXBxdHmAhouOj46LhoB5dHFwcXR5gIaLjo+Oi4aAeXRxcHF0eYCGi46PjouGgHl0cXBxdHmAhouOj46LhoB5dHFwcXR5gIaLjo+Oi4aAeXRxcHF0eYCGi46PjouGgHl0cXBxdHmAhouOj46LhoB5dHFwcXR5gIaLjo+Oi4aAeXRxcHF0eYCGi46PjouGgHl0cXBxdHmAhouOj46LhoB5dHFwcXR5gIaLjo+Oi4aAeXRxcHF0eYCGi46PjouGgHl0cXBxdHmAhouOj46LhoB5dHFwcXR5gIaLjo+Oi4aAeXRxcHF0eYCGi46PjouGgHl0cXBxdHmAhouOj46LhoB5dHFwcXR5gIaLjo+Oi4aAeXRxcHF0eYCGi46PjouGgHl0cXBxdHmAhouOj46LhoB5dHFwcXR5gIaLjo+Oi4aAeXRxcHF0eYCGi46PjouGgHl0cXBxdHmAhouOj46LhoB5dHFwcXR5gIaLjo+Oi4aAeXRxcHF0eYCGi46PjouGgHl0cXBxdHmAhouOj46LhoB5dHFwcXR5gIaLjo+Oi4aAeXRxcHF0eYCGi46PjouGgHl0cXBxdHmAhouOj46LhoB5dHFwcXR5gIaLjo+Oi4aAeXRxcHF0eYCGi46PjouGgHl0cXBxdHmAhouOj46LhoB5dHFwcXR5gIaLjo+Oi4aAeXRxcHF0eYCGi46PjouGgHl0cXBxdHmAhouOj46LhoB5dHFwcXR5gIaLjo+Oi4aAeXRxcHF0eYCGi46PjouGgHl0cXBxdHmAhouOj46LhoB5dHFwcXR5gIaLjo+Oi4aAeXRxcHF0eYCGi46PjouGgHl0cXBxdHmAhouOj46LhoB5dHFwcXR5gIaLjo+Oi4aAeXRxcHF0eYCGi46PjouGgHl0cXBxdHmAhouOj46LhoB5dHFwcXR5gIaLjo+Oi4aAeXRxcHF0eYCGi46PjouGgHl0cXBxdHmAhouOj46LhoB5dHFwcXR5gIaLjo+Oi4aAeXRxcHF0eYCGi46PjouGgHl0cXBxdHmAhouOj46LhoB5dHFwcXR5gIaLjo+Oi4aAeXRxcHF0eYCGi46PjouGgHl0cXBxdHmAhouOj46LhoB5dHFwcXR5gIaLjo+Oi4aAeXRxcHF0eYCGi46PjouGgHl0cXBxdHmAhouOj46LhoB5dHFwcXR5gIaLjo+Oi4aAeXRxcHF0eYCGi46PjouGgHl0cXBxdHmAhouOj46LhoB5dHFwcXR5gIaLjo+Oi4aAeXRxcHF0eYCGi46PjouGgHl0cXBxdHmAhouOj46LhoB5dHFwcXR5gIaLjo+Oi4aAeXRxcHF0eYCGi46PjouGgHl0cXBxdHmAhouOj46LhoB5dHFwcXR5gIaLjo+Oi4aAeXRxcHF0eYCGi46PjouGgHl0cXBxdHmAhouOj46LhoB5dHFwcXR5gIaLjo+Oi4aAeXRxcHF0eYCGi46PjouGgHl0cXBxdHmAhouOj46LhoB5dHFwcXR5gIaLjo+Oi4aAeXRxcHF0eYCGi46PjouGgHl0cXBxdHmAhouOj46LhoB5dHFwcXR5gIaLjo+Oi4aAeXRxcHF0eYCGi46PjouGgHl0cXBxdHmAhouOj46LhoB5dHFwcXR5gIaLjo+Oi4aAeXRxcHF0eYCGi46PjouGgHl0cXBxdHmAhouOj46LhoB5dHFwcXR5gIaLjo+Oi4aAeXRxcHF0eYCGi46PjouGgHl0cXBxdHmAhouOj46LhoB5dHFwcXR5gIaLjo+Oi4aAeXRxcHF0eYCGi46PjouGgHl0cXBxdHmAhouOj46LhoB5dHFwcXR5gIaLjo+Oi4aAeXRxcHF0eYCGi46PjouGgHl0cXBxdHmAhouOj46LhoB5dHFwcXR5gIaLjo+Oi4aAeXRxcHF0eYCGi46PjouGgHl0cXBxdHmAhouOj46LhoB5dHFwcXR5gIaLjo+Oi4aAeXRxcHF0eYCGi46PjouGgHl0cXBxdHmAhouOj46LhoB5dHFwcXR5gIaLjo+Oi4aAeXRxcHF0eYCGi46PjouGgHl0cXBxdHmAhouOj46LhoB5dHFwcXR5gIaLjo+Oi4aAeXRxcHF0eYCGi46PjouGgHl0cXBxdHmAhouOj46LhoB5dHFwcXR5gIaLjo+Oi4aAeXRxcHF0eYCGi46PjouGgHl0cXBxdHmAhouOj46LhoB5dHFwcXR5gIaLjo+Oi4aAeXRxcHF0eYCGi46PjouGgHl0cXBxdHmAhouOj46LhoB5dHFwcXR5gIaLjo+Oi4aAeXRxcHF0eYCGi46PjouGgHl0cXBxdHmAhouOj46LhoB5dHFwcXR5gIaLjo+Oi4aAeXRxcHF0eYCGi46PjouGgHl0cXBxdHmAhouOj46LhoB5dHFwcXR5gIaLjo+Oi4aAeXRxcHF0eYCGi46PjouGgHl0cXBxdHmAhouOj46LhoB5dHFwcXR5gIaLjo+Oi4aAeXRxcHF0eYCGi46PjouGgHl0cXBxdHmAhouOj46LhoB5dHFwcXR5gIaLjo+Oi4aAeXRxcHF0eYCGi46PjouGgHl0cXBxdHmAhouOj46LhoB5dHFwcXR5gIaLjo+Oi4aAeXRxcHF0eYCGi46PjouGgHl0cXBxdHmAhouOj46LhoB5dHFwcXR5'
+
+/** The drawing on the same page: a space, drawn as the one file it is. */
+export const STARTER_DIAGRAM =
+ 'data:image/svg+xml,%3Csvg xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 width%3D%22640%22 height%3D%22300%22 viewBox%3D%220 0 640 300%22 font-family%3D%22-apple-system%2C Segoe UI%2C Roboto%2C sans-serif%22%3E%3Crect width%3D%22640%22 height%3D%22300%22 rx%3D%2212%22 fill%3D%22%23F6F4EF%22%2F%3E%3Crect x%3D%2224%22 y%3D%2224%22 width%3D%22592%22 height%3D%22252%22 rx%3D%2210%22 fill%3D%22%23FFF%22 stroke%3D%22%231E2A3A%22 stroke-opacity%3D%22.18%22%2F%3E%3Crect x%3D%2224%22 y%3D%2224%22 width%3D%22592%22 height%3D%2234%22 rx%3D%2210%22 fill%3D%22%231E2A3A%22 fill-opacity%3D%22.05%22%2F%3E%3Crect x%3D%2224%22 y%3D%2250%22 width%3D%22592%22 height%3D%228%22 fill%3D%22%231E2A3A%22 fill-opacity%3D%22.05%22%2F%3E%3Ccircle cx%3D%2244%22 cy%3D%2241%22 r%3D%224%22 fill%3D%22%231E2A3A%22 fill-opacity%3D%22.2%22%2F%3E%3Ccircle cx%3D%2258%22 cy%3D%2241%22 r%3D%224%22 fill%3D%22%231E2A3A%22 fill-opacity%3D%22.2%22%2F%3E%3Ccircle cx%3D%2272%22 cy%3D%2241%22 r%3D%224%22 fill%3D%22%231E2A3A%22 fill-opacity%3D%22.2%22%2F%3E%3Ctext x%3D%2292%22 y%3D%2245%22 font-size%3D%2213%22 fill%3D%22%231E2A3A%22 fill-opacity%3D%22.55%22%3EMy space.bento.html%3C%2Ftext%3E%3Crect x%3D%2241%22 y%3D%2275%22 width%3D%22150%22 height%3D%22184%22 rx%3D%226%22 fill%3D%22%231E2A3A%22 fill-opacity%3D%22.04%22%2F%3E%3Cg fill%3D%22%231E2A3A%22 fill-opacity%3D%22.28%22%3E%3Crect x%3D%2257%22 y%3D%2293%22 width%3D%2296%22 height%3D%227%22 rx%3D%223.5%22%2F%3E%3Crect x%3D%2257%22 y%3D%22113%22 width%3D%22118%22 height%3D%227%22 rx%3D%223.5%22%2F%3E%3Crect x%3D%2269%22 y%3D%22133%22 width%3D%2282%22 height%3D%227%22 rx%3D%223.5%22%2F%3E%3Crect x%3D%2269%22 y%3D%22153%22 width%3D%2294%22 height%3D%227%22 rx%3D%223.5%22%2F%3E%3Crect x%3D%2257%22 y%3D%22173%22 width%3D%2274%22 height%3D%227%22 rx%3D%223.5%22%2F%3E%3C%2Fg%3E%3Crect x%3D%2241%22 y%3D%22105%22 width%3D%22150%22 height%3D%2224%22 fill%3D%22%23F7A600%22 fill-opacity%3D%22.16%22%2F%3E%3Crect x%3D%2241%22 y%3D%22105%22 width%3D%223%22 height%3D%2224%22 fill%3D%22%23F7A600%22%2F%3E%3Cg fill%3D%22%231E2A3A%22%3E%3Crect x%3D%22215%22 y%3D%2293%22 width%3D%22196%22 height%3D%2212%22 rx%3D%226%22%2F%3E%3C%2Fg%3E%3Cg fill%3D%22%231E2A3A%22 fill-opacity%3D%22.22%22%3E%3Crect x%3D%22215%22 y%3D%22125%22 width%3D%22368%22 height%3D%228%22 rx%3D%224%22%2F%3E%3Crect x%3D%22215%22 y%3D%22145%22 width%3D%22344%22 height%3D%228%22 rx%3D%224%22%2F%3E%3Crect x%3D%22215%22 y%3D%22165%22 width%3D%22378%22 height%3D%228%22 rx%3D%224%22%2F%3E%3Crect x%3D%22237%22 y%3D%22191%22 width%3D%22290%22 height%3D%228%22 rx%3D%224%22%2F%3E%3Crect x%3D%22237%22 y%3D%22211%22 width%3D%22316%22 height%3D%228%22 rx%3D%224%22%2F%3E%3C%2Fg%3E%3Ccircle cx%3D%22221%22 cy%3D%22195%22 r%3D%224%22 fill%3D%22%231E2A3A%22 fill-opacity%3D%22.22%22%2F%3E%3Ccircle cx%3D%22221%22 cy%3D%22215%22 r%3D%224%22 fill%3D%22%231E2A3A%22 fill-opacity%3D%22.22%22%2F%3E%3Crect x%3D%22215%22 y%3D%22239%22 width%3D%22132%22 height%3D%2220%22 rx%3D%2210%22 fill%3D%22%23F7A600%22 fill-opacity%3D%22.18%22%2F%3E%3Ctext x%3D%22281%22 y%3D%22253%22 font-size%3D%2211%22 text-anchor%3D%22middle%22 fill%3D%22%238a5c00%22%3Ethe editor%2C inside%3C%2Ftext%3E%3C%2Fsvg%3E'
diff --git a/spaces/src/styles.css b/spaces/src/styles.css
index ee318e80..7649d942 100644
--- a/spaces/src/styles.css
+++ b/spaces/src/styles.css
@@ -7,35 +7,253 @@
differently read as two products. What differs is only what the app IS: a
reading column instead of a canvas. */
-:root {
+/* ————— THEME TOKENS —————————————————————————————————————————————————————
+ A THEME IS A VIEWER PREFERENCE, NEVER DOCUMENT DATA (PLATFORM §8, and
+ kernel/src/theme.ts). It lives in localStorage exactly as the interface
+ language does, and for the same reason: two people opening one space are two
+ readers in two rooms, and a theme written into the file would travel to
+ whoever received it — and make the bytes depend on who last looked.
+
+ WHAT DARK COVERS, AND WHY IT IS NOT SLIDES' ANSWER. slides themes only the
+ chrome AROUND the deck: a slide is a bounded page on a canvas, its
+ background is data the author chose, and someone proofing at midnight still
+ needs to see what will be projected. A space has no such page. `--bg` is
+ THE ONE GROUND — the toolbar, both panels and the reading column all sit on
+ it, with hairlines and nothing else between them (see `html, body` below),
+ which is the whole point of the chrome-reads-as-one-document work. A dark
+ interface with a white reading column would be a white rectangle filling
+ most of the window: not a dark interface, and a re-introduction of the
+ floating-card look that was deliberately removed.
+
+ So in spaces the reading surface IS chrome, and it follows the reader.
+ `doc.theme.background/color/accent` still exist in the format and are still
+ the DOCUMENT's own colours — but the only thing that paints them is the
+ static file-manager preview (preview.ts), which renders with scripting off,
+ has no reader and no localStorage to ask, and is a thumbnail of the author's
+ document. That surface stays the author's, unconditionally and in both
+ themes; nothing here reaches it.
+
+ What DOES follow the reader, deliberately, is the document's own colour
+ vocabulary: `--c-*` (the nine `sp-fg-*`/`sp-bg-*` marks) and the callout
+ tone hues. The author picked "red", not `#c0392b` — the closed vocabulary
+ exists precisely so the value under each name can be tuned for the surface,
+ which is what the palette comment two hundred lines down already says. An
+ ink measured against white is not the same ink on a near-black ground.
+
+ THREE STATES, and the dark values appear TWICE because of it. A reader has
+ chosen light, chosen dark, or chosen nothing. An explicit choice stamps
+ `data-theme` on <html>; the default follows the OS. So dark must be defined
+ under `@media (prefers-color-scheme: dark)` — guarded `:not([data-theme="light"])`
+ so an explicit light choice still wins — AND under `[data-theme="dark"]`, or
+ the toggle only works in one direction. The two blocks are byte-identical and
+ the model rig asserts they stay that way.
+
+ BOTH ARE @media screen, WHICH IS HOW PAPER STAYS LIGHT. Print matches
+ neither, so on paper the light block below is the only one that applies and
+ the print sheet needs no third copy of the palette. Dark is a screen theme;
+ toner is not a screen. */
+
+/* LIGHT — the suite's shared palette, character for character with
+ slides/src/styles.css and type/src/styles.css. Do not let these drift. */
+:root, :root[data-theme="light"] {
--ink: #1e2a3a;
--ink-2: #31445c;
+ /* THE ONE GROUND. Named rather than spelled `#fff` at each site, because the
+ dark interface redefines exactly these tokens and nothing else — a literal
+ at a use site is a thing that stays white when the theme flips. */
+ --bg: #ffffff;
+ /* raised above the ground: the bar, menus, popovers, dialogs, the row you
+ are on. In light it is the same white — the hairlines carry the separation
+ — and in dark it has to lift, which is why it is a token and not `--bg`. */
+ --surface: #ffffff;
+ /* recessed below it: form controls, which read as holes, not cards */
+ --field: #ffffff;
--chrome: #f5f7fa;
--chrome-2: #eceff4;
--line: #e3e8ef;
+ /* a border that has to be SEEN — hover and selected states, one step past
+ the resting hairline */
+ --edge: #b9c3d2;
--muted: #5b6472;
--accent: #f7a600;
+ /* the accent as INK ON THE GROUND: the magic-note answer, the live chip, the
+ banner. It flips with the ground, so in dark it lifts to a light amber. */
--accent-ink: #7a5200;
+ /* the accent as ink ON THE ACCENT FILL — the comment badge. The fill does
+ not flip (it is brand), so neither does this. */
+ --accent-on: #7a5200;
--blue: #5b8def;
+ /* the wordmark's coral, and the splash's. BRAND, so it is the same value in
+ both themes — it is a name, not a foreground, and it reads on either
+ ground. Named only so a literal cannot be mistaken for chrome later. */
+ --brand: #ff9e8a;
+ /* the prompt inside an empty block, and the gutter's affordances: both are
+ "not yet content", so both are quieter than --muted */
+ --ph: #b9c2ce;
+ --ghost: #aab4c2;
+ /* SHADOWS ARE ONE TOKEN, as CHANNELS rather than a colour, so every
+ `rgb(var(--shade) / …)` in this file keeps its own alpha. Eleven shadows
+ needed eleven tokens otherwise. Dark goes to pure black: a navy shadow is
+ invisible on a navy ground. */
+ --shade: 20 30 45;
+
+ /* READING SIZE, and it grows with the screen.
+ A 5120px display showed a 900px column of 16px text: 110 characters, 18%
+ of the screen, and lines past the range anyone reads comfortably. The fix
+ is NOT a wider column — it is bigger type holding the SAME character
+ count, because at that width you are also sitting further away.
+ 16px to about 1600px wide, then up to 19px by 2560, capped there.
+ THE FLOOR IS A PX VALUE ON PURPOSE: `vw` shrinks when a reader zooms in
+ (zoom reduces the CSS-pixel viewport), so a purely viewport-driven size
+ would fight the browser's own accessibility control. The floor means zoom
+ can only ever land on today's size or larger. */
+ --sp-read: clamp(16px, 11px + 0.3125vw, 19px);
--radius: 10px;
-}
-/* The editor chrome is LIGHT-ONLY, the same ruling slides made: on a dark-mode
- phone the engine renders NATIVE controls dark while our ink stays dark, so
- dropdowns read as blank. Pair with the color-scheme meta in index.html. */
-:root { color-scheme: only light; }
+ /* ————— the document's colour vocabulary —————
+ NINE COLOURS IN TWO ROLES: `sp-fg-*` is the ink on a SPAN, `sp-bg-*` is
+ the band behind it on a MARK. The band is a color-mix into `transparent`,
+ so it needs no second set — alpha lands correctly on any ground. The INKS
+ do: these are measured to clear 4.5:1 on white, and their dark twins are
+ measured on `--bg` dark. */
+ --c-gray: #5b6472; --c-brown: #8a5a3c; --c-orange: #b35c00;
+ --c-yellow: #8a6a00; --c-green: #1f7a4d; --c-blue: #1f5fbf;
+ --c-purple: #6b3fbf; --c-pink: #b3327a; --c-red: #c0392b;
+
+ /* ————— syntax colours —————
+ Six roles, chosen to survive the places code is read: an editor in either
+ theme, and a printed page. The light four clear 4.5:1 against the code
+ well AND against white, because a browser drops the block's background
+ when printing and keeps the ink — a palette tuned only against the tinted
+ well goes pale on paper. Hue does the work, not lightness, so the block
+ still reads as prose at 13px and stays legible in greyscale.
+ Comments reuse --muted and numbers reuse --accent-ink: the suite's palette
+ already had the right two, and a syntax theme that invents a ninth grey is
+ a syntax theme nobody can restyle. */
+ --code-str: #1c6b4b;
+ --code-key: #6b3fa0;
+ --code-lit: #0d6382;
+ --code-prop: #1c4fb5;
+
+ /* ————— callout tone hues —————
+ ONE HUE PER TONE, and the fill and the label DERIVE from it against the
+ current ground (see .sp-b-callout). That is why there is no second set:
+ `color-mix(hue, --bg)` is a pale tint on white and a deep one on near
+ black, and `color-mix(hue, --ink)` darkens the label in light and lifts it
+ in dark, from the same five numbers. Fifteen hand-tuned values would have
+ needed thirty. */
+ --tone-note: #7d9cbd;
+ --tone-tip: #4f9e79;
+ --tone-important: #8a72cc;
+ --tone-warning: #d9a326;
+ --tone-caution: #cd6a63;
+
+ /* The BROWSER's own furniture — scrollbars, form controls, the canvas behind
+ a rubber-band scroll — follows this, and CSS cannot reach any of it.
+ `only` keeps a force-dark engine from inverting what we have already
+ decided. kernel/src/theme.ts restates the resolved value inline on <html>,
+ which is what makes the choice win over the media query below. */
+ color-scheme: only light;
+}
+
+/* DARK — the same roles, not the same values. `--ink` is the chrome's
+ FOREGROUND, so it inverts; `--accent` does not, because it is brand.
+ THE NEXT TWO BLOCKS ARE IDENTICAL BY CONTRACT. See the three-state note
+ above; scripts/test-spaces-model.ts compares them character for character. */
+@media screen and (prefers-color-scheme: dark) {
+ :root:not([data-theme="light"]) {
+ --ink: #e7eaf0;
+ --ink-2: #b3bcca;
+ --bg: #14181e;
+ --surface: #1b2027;
+ --field: #10141a;
+ --chrome: #1e232b;
+ --chrome-2: #272d36;
+ --line: #2e353f;
+ --edge: #454e5c;
+ --muted: #8b95a4;
+ --accent: #f7a600;
+ --accent-ink: #f0b74e;
+ --accent-on: #7a5200;
+ --blue: #7aa5f5;
+ --brand: #ff9e8a;
+ --ph: #4a5464;
+ --ghost: #5c6675;
+ --shade: 0 0 0;
+ --c-gray: #9aa3b2; --c-brown: #d09a72; --c-orange: #ef9a3d;
+ --c-yellow: #d8b64a; --c-green: #4fbe86; --c-blue: #7aa8f5;
+ --c-purple: #b294f0; --c-pink: #ee7ab4; --c-red: #f0796a;
+ --code-str: #6fd39b;
+ --code-key: #c4a2f5;
+ --code-lit: #62c1e0;
+ --code-prop: #82abf5;
+ --tone-note: #7d9cbd;
+ --tone-tip: #4f9e79;
+ --tone-important: #8a72cc;
+ --tone-warning: #d9a326;
+ --tone-caution: #cd6a63;
+ color-scheme: only dark;
+ }
+}
+@media screen {
+ :root[data-theme="dark"] {
+ --ink: #e7eaf0;
+ --ink-2: #b3bcca;
+ --bg: #14181e;
+ --surface: #1b2027;
+ --field: #10141a;
+ --chrome: #1e232b;
+ --chrome-2: #272d36;
+ --line: #2e353f;
+ --edge: #454e5c;
+ --muted: #8b95a4;
+ --accent: #f7a600;
+ --accent-ink: #f0b74e;
+ --accent-on: #7a5200;
+ --blue: #7aa5f5;
+ --brand: #ff9e8a;
+ --ph: #4a5464;
+ --ghost: #5c6675;
+ --shade: 0 0 0;
+ --c-gray: #9aa3b2; --c-brown: #d09a72; --c-orange: #ef9a3d;
+ --c-yellow: #d8b64a; --c-green: #4fbe86; --c-blue: #7aa8f5;
+ --c-purple: #b294f0; --c-pink: #ee7ab4; --c-red: #f0796a;
+ --code-str: #6fd39b;
+ --code-key: #c4a2f5;
+ --code-lit: #62c1e0;
+ --code-prop: #82abf5;
+ --tone-note: #7d9cbd;
+ --tone-tip: #4f9e79;
+ --tone-important: #8a72cc;
+ --tone-warning: #d9a326;
+ --tone-caution: #cd6a63;
+ color-scheme: only dark;
+ }
+}
* { box-sizing: border-box; }
html, body {
margin: 0; height: 100%;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
color: var(--ink);
- background: var(--chrome);
+ /* ONE GROUND for the whole app. The panels used to sit on a --chrome tint
+ with the page white on top of it, so the page read as a card floating on
+ a slightly different grey — three surfaces where there is one document.
+ The hairline borders carry the separation; a second background does not
+ need to. --chrome is still what CHIPS and inset controls sit on, which is
+ what it was for. */
+ background: var(--bg);
overscroll-behavior: none;
}
#app { height: 100%; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; border-radius: 4px; }
select, input, textarea, [contenteditable='true'] { -webkit-user-select: auto; user-select: auto; }
+/* Native controls follow the theme through `color-scheme` on :root, so a
+ <select> is dark when the chrome is. Its ink and ground are still stated
+ here: a force-dark engine that ignores color-scheme would otherwise paint a
+ dark popup and leave our dark ink on it. */
+select, input, textarea { background: var(--field); color: var(--ink); }
+option { background: var(--field); color: var(--ink); }
/* ————— shell ————— */
.sp-app { height: 100%; display: flex; flex-direction: column; overflow: hidden; }
@@ -43,7 +261,7 @@ select, input, textarea, [contenteditable='true'] { -webkit-user-select: auto; u
.sp-bar {
display: flex; align-items: center; gap: 6px;
padding: 8px max(12px, env(safe-area-inset-right)) 8px max(12px, env(safe-area-inset-left));
- background: #fff; border-bottom: 1px solid var(--line);
+ background: var(--surface); border-bottom: 1px solid var(--line);
flex: 0 0 auto;
}
.sp-mark {
@@ -55,7 +273,9 @@ select, input, textarea, [contenteditable='true'] { -webkit-user-select: auto; u
}
.sp-mark:hover { background: var(--chrome-2); }
.sp-mark-svg { display: block; flex: 0 0 auto; }
-.sp-mark-word span { color: #FF9E8A; }
+/* the coral is BRAND: the splash's `.bs-word b`, and the mark in every app
+ of the suite. It reads on both grounds, so it is one value, not two. */
+.sp-mark-word span { color: var(--brand); }
.sp-doctitle {
/* Sized, not greedy: a title input that eats the slack pushed undo/redo away
from the document they belong to and left them floating mid-bar. The
@@ -66,7 +286,7 @@ select, input, textarea, [contenteditable='true'] { -webkit-user-select: auto; u
border-radius: 8px; padding: 5px 8px;
}
.sp-doctitle:hover { background: var(--chrome); }
-.sp-doctitle:focus { background: #fff; border-color: var(--blue); outline: none; }
+.sp-doctitle:focus { background: var(--field); border-color: var(--blue); outline: none; }
.sp-status {
font-size: 12px; color: var(--muted); white-space: nowrap;
opacity: 0; transition: opacity .18s;
@@ -84,7 +304,9 @@ select, input, textarea, [contenteditable='true'] { -webkit-user-select: auto; u
.sp-btn:active { background: var(--line); }
.sp-btn svg { display: block; }
.sp-btn[disabled] { opacity: .45; cursor: default; }
-.sp-primary { background: var(--ink); color: #fff; padding: 6px 14px; }
+/* filled with the foreground, so its ink is the ground: `#fff` here would
+ have been white on near-white the moment the theme flipped. */
+.sp-primary { background: var(--ink); color: var(--bg); padding: 6px 14px; }
.sp-primary:hover { background: var(--ink-2); }
.sp-body { display: flex; flex: 1 1 auto; min-height: 0; }
@@ -94,7 +316,7 @@ select, input, textarea, [contenteditable='true'] { -webkit-user-select: auto; u
/* the reader's width, restored from localStorage — never the document's */
flex: 0 0 var(--sp-panew, 244px); min-width: 0;
transition: flex-basis .18s ease, padding .18s ease;
- border-inline-end: 1px solid var(--line); background: var(--chrome);
+ border-inline-end: 1px solid var(--line); background: var(--bg);
overflow: auto; padding: 10px 8px max(16px, env(safe-area-inset-bottom));
}
.sp-side-head {
@@ -116,23 +338,23 @@ select, input, textarea, [contenteditable='true'] { -webkit-user-select: auto; u
overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.sp-treelink:hover { background: var(--chrome-2); }
-.sp-treelink.sp-here { background: #fff; color: var(--ink); font-weight: 600; box-shadow: 0 1px 2px rgb(20 30 45 / .07); }
+.sp-treelink.sp-here { background: var(--surface); color: var(--ink); font-weight: 600; box-shadow: 0 1px 2px rgb(var(--shade) / .07); }
.sp-treelink.sp-drop { box-shadow: inset 0 0 0 2px var(--accent); }
.sp-tree-ico { flex: 0 0 auto; width: 16px; text-align: center; font-size: 13px; }
.sp-side-empty { color: var(--muted); font-size: 13px; padding: 10px; }
/* ————— the reading column ————— */
.sp-main {
- flex: 1 1 auto; overflow: auto; background: #fff;
+ flex: 1 1 auto; overflow: auto; background: var(--bg);
padding: 44px 28px 40vh;
}
-.sp-page-inner { margin: 0 auto; }
+.sp-page-inner { margin: 0 auto; font-size: var(--sp-read); }
.sp-title {
- font-size: 33px; line-height: 1.18; font-weight: 700;
+ font-size: 2.06em; line-height: 1.18; font-weight: 700;
margin: 0 0 6px; letter-spacing: -0.02em;
}
.sp-title:focus { outline: none; }
-.sp-title[data-empty]::before { content: attr(data-ph); color: #b9c2ce; }
+.sp-title[data-empty]::before { content: attr(data-ph); color: var(--ph); }
.sp-crumb { font-size: 12.5px; color: var(--muted); margin: 0 0 14px; display: flex; gap: 6px; align-items: center; }
.sp-crumb a { color: var(--muted); text-decoration: none; }
.sp-crumb a:hover { color: var(--ink); text-decoration: underline; }
@@ -147,7 +369,7 @@ select, input, textarea, [contenteditable='true'] { -webkit-user-select: auto; u
.sp-ghost {
display: inline-flex; align-items: center; justify-content: center;
width: 22px; height: 24px; padding: 0; border: 0; border-radius: 5px;
- color: #aab4c2; background: transparent; cursor: pointer;
+ color: var(--ghost); background: transparent; cursor: pointer;
}
.sp-ghost:hover { background: var(--chrome-2); color: var(--ink-2); }
.sp-ghost[draggable='true'] { cursor: grab; }
@@ -157,13 +379,162 @@ select, input, textarea, [contenteditable='true'] { -webkit-user-select: auto; u
background: var(--blue); border-radius: 2px;
}
-.sp-b-h1 { font-size: 25px; font-weight: 700; margin: 24px 0 2px; letter-spacing: -0.01em; }
-.sp-b-h2 { font-size: 20px; font-weight: 700; margin: 20px 0 2px; }
-.sp-b-h3 { font-size: 16.5px; font-weight: 700; margin: 16px 0 2px; }
+.sp-b-h1 { font-size: 1.56em; font-weight: 700; margin: 24px 0 2px; letter-spacing: -0.01em; }
+.sp-b-h2 { font-size: 1.25em; font-weight: 700; margin: 20px 0 2px; }
+.sp-b-h3 { font-size: 1.03em; font-weight: 700; margin: 16px 0 2px; }
.sp-b-quote {
margin: 8px 0; padding: 2px 0 2px 15px;
border-inline-start: 3px solid var(--line); color: var(--ink-2);
}
+/* ————— inline marks —————
+ The six marks the floating toolbar applies. `b/strong`, `i/em` and `u` need
+ nothing — the browser's defaults are right — but `code` and `mark` inside
+ prose had NO styling at all, so "inline code" and "highlight" were controls
+ that appeared to do nothing. Scoped under .sp-body so the block-level code
+ block (.sp-b-code code, its own rule) is untouched. */
+.sp-body :is(p, li, h1, h2, h3, blockquote, td, th, figcaption) code {
+ font: 0.92em/1.5 ui-monospace, SFMono-Regular, Menlo, monospace;
+ background: var(--chrome-2); border: 1px solid var(--line); border-radius: 5px;
+ padding: 0.1em 0.32em; word-break: break-word;
+}
+/* the accent at a tint a paragraph can be read through, and an explicit ink:
+ `mark`'s UA default is black on yellow, which is not this document's ink */
+.sp-body mark { background: color-mix(in srgb, var(--accent) 30%, transparent); color: inherit; border-radius: 3px; padding: 0 .08em; }
+/* No blanket link colour here. There was one — `.sp-body a { color: var(--blue) }`
+ — and it never painted a single prose link: `.sp-page a` sets the ink at the
+ same specificity and later in the sheet, so it won every time. What the rule
+ DID reach was the page list, which `.sp-body` also wraps, where it beat
+ `.sp-treelink`'s 0-1-0 and turned every page in the tree the blue of a
+ hyperlink to somewhere else. A rule with no intended effect and one
+ unintended one is not worth scoping; it is worth deleting. */
+
+/* ————— the colour palette —————
+ NINE COLOURS IN TWO ROLES: `sp-fg-*` is the ink on a SPAN, `sp-bg-*` is the
+ band behind it on a MARK. Notion's shape, and its shape is what makes it
+ safe — a closed vocabulary means the sanitizer matches a NAME instead of
+ parsing CSS, and it means these values live here, in the app's stylesheet,
+ where they can be tuned for the surface. A `style="color:#…"` in the
+ document could be none of that.
+
+ TOKENS, so the two roles cannot drift: one hue per colour, the ink at full
+ strength and the band as a tint of the same hue. Chosen by measuring, not by
+ eye — and measured TWICE, because the ground moved. The `--c-*` values live
+ in the theme blocks at the top of this file: an ink that clears 4.5:1 on
+ white is a smudge on a near-black ground, so each name carries a light value
+ and a dark one. The BAND needs only one set, because it mixes into
+ `transparent` and lands correctly on either. */
+.sp-body .sp-fg-gray { color: var(--c-gray); }
+.sp-body .sp-fg-brown { color: var(--c-brown); }
+.sp-body .sp-fg-orange { color: var(--c-orange); }
+.sp-body .sp-fg-yellow { color: var(--c-yellow); }
+.sp-body .sp-fg-green { color: var(--c-green); }
+.sp-body .sp-fg-blue { color: var(--c-blue); }
+.sp-body .sp-fg-purple { color: var(--c-purple); }
+.sp-body .sp-fg-pink { color: var(--c-pink); }
+.sp-body .sp-fg-red { color: var(--c-red); }
+.sp-body mark.sp-bg-gray { background: color-mix(in srgb, var(--c-gray) 22%, transparent); }
+.sp-body mark.sp-bg-brown { background: color-mix(in srgb, var(--c-brown) 22%, transparent); }
+.sp-body mark.sp-bg-orange { background: color-mix(in srgb, var(--c-orange) 22%, transparent); }
+.sp-body mark.sp-bg-yellow { background: color-mix(in srgb, var(--c-yellow) 26%, transparent); }
+.sp-body mark.sp-bg-green { background: color-mix(in srgb, var(--c-green) 22%, transparent); }
+.sp-body mark.sp-bg-blue { background: color-mix(in srgb, var(--c-blue) 20%, transparent); }
+.sp-body mark.sp-bg-purple { background: color-mix(in srgb, var(--c-purple) 20%, transparent); }
+.sp-body mark.sp-bg-pink { background: color-mix(in srgb, var(--c-pink) 20%, transparent); }
+.sp-body mark.sp-bg-red { background: color-mix(in srgb, var(--c-red) 20%, transparent); }
+
+/* ON PAPER, COLOUR SURVIVES — and this is deliberately the OPPOSITE of the
+ callout ruling forty lines below, which drops its tint. The difference is
+ what else carries the meaning. A callout keeps its box, its heavier start
+ rule, its tone's SHAPE and the tone's NAME spelled out, so the fill is
+ decoration and dropping it costs nothing. An inline colour has no second
+ cue at all: drop it and the sentence prints as ordinary prose, with the
+ distinction the author drew silently gone — data loss, not decluttering.
+ The area is also a few words rather than a paragraph-sized block of ink.
+ `print-color-adjust: exact` because browsers drop backgrounds on paper by
+ default, so without it the band would go while the ink stayed. */
+@media print {
+ .sp-body [class*='sp-fg-'], .sp-body mark {
+ print-color-adjust: exact; -webkit-print-color-adjust: exact;
+ }
+}
+
+/* ————— the floating selection toolbar —————
+ Body-mounted (see formatbar.ts (1)), so it is positioned in VIEWPORT
+ coordinates and owes nothing to the page's layout. Below .sp-pop's 60: a
+ menu or dialog that opens over a selection is the thing being used. */
+.sp-fmt {
+ position: fixed; z-index: 58; display: flex; align-items: center; gap: 2px;
+ padding: 3px; background: var(--surface); border: 1px solid var(--line);
+ border-radius: 9px; box-shadow: 0 6px 22px rgb(var(--shade) / .17);
+ max-width: calc(100vw - 16px);
+}
+.sp-fmt-btn {
+ display: inline-flex; align-items: center; justify-content: center;
+ min-width: 30px; height: 30px; padding: 0 7px; border: 0; border-radius: 6px;
+ background: transparent; color: var(--ink-2); cursor: pointer;
+ font: inherit; font-size: 13px;
+}
+.sp-fmt-btn:hover { background: var(--chrome-2); color: var(--ink); }
+.sp-fmt-btn.sp-fmt-on { background: var(--chrome-2); color: var(--blue); }
+.sp-fmt-gap { margin-inline-start: 4px; border-inline-start: 1px solid var(--line); border-radius: 0 6px 6px 0; }
+.sp-fmt-url {
+ font: inherit; font-size: 13px; width: 240px; max-width: 46vw;
+ padding: 5px 8px; border: 1px solid var(--line); border-radius: 6px; color: var(--ink);
+}
+.sp-fmt-url.sp-fmt-bad { border-color: var(--c-red); }
+.sp-fmt-go { color: var(--blue); font-weight: 600; }
+/* the palette takes the bar over while it is open — two rows, so the bar
+ becomes a column for as long as it is showing */
+.sp-fmt-pal { flex-direction: column; align-items: stretch; gap: 3px; padding: 7px; }
+.sp-fmt-pal-h { font-size: 11px; font-weight: 600; color: var(--muted); padding: 2px 2px 0; }
+.sp-fmt-sw-row { display: flex; gap: 3px; }
+.sp-fmt-sw {
+ width: 26px; height: 26px; padding: 0; border: 1px solid var(--line); border-radius: 6px;
+ background: var(--surface); color: var(--ink); cursor: pointer;
+ font: inherit; font-size: 13px; font-weight: 700; line-height: 1;
+}
+.sp-fmt-sw:hover { border-color: var(--ink-2); }
+/* the swatch SHOWS what it does: an A in the ink for the text row, an A on the
+ band for the background row. A grid of anonymous squares makes you click one
+ to find out what it was. */
+.sp-fmt-sw.sp-fg-gray { color: var(--c-gray); } .sp-fmt-sw.sp-fg-brown { color: var(--c-brown); }
+.sp-fmt-sw.sp-fg-orange { color: var(--c-orange); } .sp-fmt-sw.sp-fg-yellow { color: var(--c-yellow); }
+.sp-fmt-sw.sp-fg-green { color: var(--c-green); } .sp-fmt-sw.sp-fg-blue { color: var(--c-blue); }
+.sp-fmt-sw.sp-fg-purple { color: var(--c-purple); } .sp-fmt-sw.sp-fg-pink { color: var(--c-pink); }
+.sp-fmt-sw.sp-fg-red { color: var(--c-red); }
+.sp-fmt-sw.sp-bg-gray { background: color-mix(in srgb, var(--c-gray) 22%, var(--surface)); }
+.sp-fmt-sw.sp-bg-brown { background: color-mix(in srgb, var(--c-brown) 22%, var(--surface)); }
+.sp-fmt-sw.sp-bg-orange { background: color-mix(in srgb, var(--c-orange) 22%, var(--surface)); }
+.sp-fmt-sw.sp-bg-yellow { background: color-mix(in srgb, var(--c-yellow) 26%, var(--surface)); }
+.sp-fmt-sw.sp-bg-green { background: color-mix(in srgb, var(--c-green) 22%, var(--surface)); }
+.sp-fmt-sw.sp-bg-blue { background: color-mix(in srgb, var(--c-blue) 20%, var(--surface)); }
+.sp-fmt-sw.sp-bg-purple { background: color-mix(in srgb, var(--c-purple) 20%, var(--surface)); }
+.sp-fmt-sw.sp-bg-pink { background: color-mix(in srgb, var(--c-pink) 20%, var(--surface)); }
+.sp-fmt-sw.sp-bg-red { background: color-mix(in srgb, var(--c-red) 20%, var(--surface)); }
+.sp-fmt-back { align-self: flex-start; margin-top: 2px; color: var(--muted); }
+/* A COARSE POINTER GETS THE BOTTOM EDGE, not the selection. The OS callout and
+ the selection handles own the pixels around a touch selection; sharing them
+ is how a toolbar becomes a thing you dismiss rather than a thing you use. */
+.sp-fmt-dock {
+ inset-inline: 0; bottom: 0; top: auto !important; left: 0 !important;
+ max-width: none; border-radius: 0; border-inline: 0; border-bottom: 0;
+ justify-content: center; flex-wrap: wrap;
+ padding: 6px max(6px, env(safe-area-inset-right)) max(6px, env(safe-area-inset-bottom)) max(6px, env(safe-area-inset-left));
+ box-shadow: 0 -6px 22px rgb(var(--shade) / .14);
+}
+/* All nine on ONE row at 375px — measured: at 40px wide they wrapped, and
+ "Clear formatting" sat alone on a second row looking like a separate
+ control. 36px is still comfortably over the 34px touch target this app's
+ other phone chrome uses. */
+.sp-fmt-dock { gap: 1px; }
+.sp-fmt-dock .sp-fmt-btn { min-width: 36px; height: 38px; padding: 0 2px; }
+.sp-fmt-dock .sp-fmt-gap { margin-inline-start: 2px; }
+.sp-fmt-dock .sp-fmt-url { width: auto; flex: 1 1 160px; max-width: none; }
+/* It is chrome, and chrome is never on paper. Belt as well as braces: the bar
+ is also removed the moment the selection collapses, and print does not run
+ in the reading view's way. */
+@media print { .sp-fmt { display: none !important; } }
+
/* ————— callouts —————
The tone is carried by the MARK'S SHAPE (circle, bulb, square, triangle,
octagon) and by its name spelled out beside it. The tint is decoration: it
@@ -174,9 +545,17 @@ select, input, textarea, [contenteditable='true'] { -webkit-user-select: auto; u
The BODY TEXT stays --ink, never the tone colour. Coloured prose is a
readability tax on the sentence that mattered enough to put in a box. */
.sp-b-callout {
- /* the neutral fallback: a tone class always lands on top of it, but a
- stylesheet that only works with one is a stylesheet with a hole in it */
- --tone-bg: var(--chrome); --tone-line: var(--line); --tone-ink: var(--ink-2);
+ /* THE TONE IS ONE HUE, AND THE BOX IS DERIVED FROM IT AGAINST THE GROUND.
+ The fill is that hue mixed into --bg and the label is it mixed into --ink,
+ so the same five numbers give a pale tint with a dark label on white and a
+ deep tint with a lifted label on near-black. Fifteen hand-tuned values
+ would have needed thirty, and thirty values drift.
+ --tone-h is the neutral fallback: a tone class always lands on top of it,
+ but a stylesheet that only works with one is a stylesheet with a hole. */
+ --tone-h: var(--muted);
+ --tone-bg: color-mix(in srgb, var(--tone-h) 13%, var(--bg));
+ --tone-line: var(--tone-h);
+ --tone-ink: color-mix(in srgb, var(--tone-h) 50%, var(--ink));
display: block; margin: 10px 0; padding: 9px 14px 10px;
border: 1px solid var(--tone-line); border-inline-start-width: 4px;
border-radius: var(--radius); background: var(--tone-bg);
@@ -202,13 +581,17 @@ button.sp-callout-chip:hover { text-decoration: underline; text-underline-offset
.sp-callout-body > .sp-b:first-child { margin-top: 4px; }
.sp-b-callout .sp-list { padding-inline-start: 20px; }
-.sp-tone-note { --tone-bg: #eef3f9; --tone-line: #7d9cbd; --tone-ink: #2b4a68; }
-.sp-tone-tip { --tone-bg: #e9f6ef; --tone-line: #4f9e79; --tone-ink: #1c5a41; }
-.sp-tone-important { --tone-bg: #f2eefb; --tone-line: #8a72cc; --tone-ink: #493081; }
-.sp-tone-warning { --tone-bg: #fdf4e3; --tone-line: #d9a326; --tone-ink: var(--accent-ink); }
-.sp-tone-caution { --tone-bg: #fdeeed; --tone-line: #cd6a63; --tone-ink: #8a2f28; }
+.sp-tone-note { --tone-h: var(--tone-note); }
+.sp-tone-tip { --tone-h: var(--tone-tip); }
+.sp-tone-important { --tone-h: var(--tone-important); }
+.sp-tone-warning { --tone-h: var(--tone-warning); }
+.sp-tone-caution { --tone-h: var(--tone-caution); }
+/* the same tone, outside a callout: the search result's icon has no
+ .sp-b-callout above it to derive --tone-ink, so it derives its own */
.sp-result-ico.sp-tone-note, .sp-result-ico.sp-tone-tip, .sp-result-ico.sp-tone-important,
-.sp-result-ico.sp-tone-warning, .sp-result-ico.sp-tone-caution { color: var(--tone-ink); }
+.sp-result-ico.sp-tone-warning, .sp-result-ico.sp-tone-caution {
+ color: color-mix(in srgb, var(--tone-h) 50%, var(--ink));
+}
.sp-tonepop { width: 244px; }
.sp-dditem.sp-sel { background: var(--chrome-2); }
@@ -233,7 +616,7 @@ button.sp-callout-chip:hover { text-decoration: underline; text-underline-offset
.sp-text:focus { outline: none; }
/* the prompt shows on the block you are IN, not on every empty one — a page of
"Type / for blocks" reads as clutter, not as help */
-.sp-text[data-empty]:focus::before { content: attr(data-ph); color: #b9c2ce; pointer-events: none; }
+.sp-text[data-empty]:focus::before { content: attr(data-ph); color: var(--ph); pointer-events: none; }
.sp-b-code { position: relative; }
.sp-b-code pre {
@@ -244,23 +627,10 @@ button.sp-callout-chip:hover { text-decoration: underline; text-underline-offset
.sp-b-code code:focus { outline: none; }
/* ————— syntax colours —————
- Six roles, chosen to survive the two places code is read: a light editor and
- a printed page. Every one clears 4.5:1 against the code well (#f5f7fa) AND
- against white, because a browser drops the block's background when printing
- and keeps the ink — a palette tuned only against the tinted well goes pale on
- paper. Hue does the work, not lightness, so the block still reads as prose at
- 13px and stays legible in greyscale.
-
- Comments reuse --muted and numbers reuse --accent-ink: the suite's palette
- already had the right two, and a syntax theme that invents a ninth grey is a
- syntax theme nobody can restyle. The remaining four are new because nothing
- in the chrome palette means "string". */
-:root {
- --code-str: #1c6b4b;
- --code-key: #6b3fa0;
- --code-lit: #0d6382;
- --code-prop: #1c4fb5;
-}
+ Six roles. `--code-*` are defined per theme at the top of this file; the
+ other two reuse the suite's palette — comments are --muted and numbers are
+ --accent-ink, because a syntax theme that invents a ninth grey is a syntax
+ theme nobody can restyle. Both of those flip with the ground already. */
.sp-t-c { color: var(--muted); font-style: italic; }
.sp-t-s { color: var(--code-str); }
.sp-t-n { color: var(--accent-ink); }
@@ -277,8 +647,8 @@ button.sp-callout-chip:hover { text-decoration: underline; text-underline-offset
.sp-langchip {
position: absolute; top: 10px; inset-inline-end: 10px;
font-size: 11px; padding: 3px 8px; color: var(--muted);
- background: rgb(255 255 255 / .94); border-color: var(--line);
- box-shadow: 0 2px 8px rgb(20 30 45 / .12);
+ background: color-mix(in srgb, var(--surface) 94%, transparent); border-color: var(--line);
+ box-shadow: 0 2px 8px rgb(var(--shade) / .12);
opacity: 0; transition: opacity .12s;
}
.sp-b-code:hover .sp-langchip, .sp-langchip:focus { opacity: 1; }
@@ -294,20 +664,120 @@ button.sp-callout-chip:hover { text-decoration: underline; text-underline-offset
.sp-toggle-body { flex: 1 0 100%; padding-inline-start: 22px; }
.sp-b-image figure { margin: 12px 0; }
-.sp-b-image img { max-width: 100%; height: auto; border-radius: var(--radius); display: block; }
+/* AN IMAGE ON A DARK GROUND. A photograph is fine; a screenshot, a diagram
+ or a logo exported with a transparent background is a shape floating in
+ nothing, and a white-on-transparent diagram disappears entirely. So a
+ picture in the reading column always has a ground of its OWN to sit on —
+ white in both themes, because that is the ground the author exported
+ against — and a hairline so its edge is where the author put it. The
+ picture is document content: it is not inverted, dimmed or filtered. */
+.sp-b-image img {
+ max-width: 100%; height: auto; border-radius: var(--radius); display: block;
+ background: #fff; box-shadow: 0 0 0 1px rgb(var(--shade) / .12);
+}
.sp-b-image figcaption { font-size: 13px; color: var(--muted); margin-top: 6px; }
+/* ————— tables —————
+ The block is `sp-b-table`; everything inside it is `sp-tb-*`. NOT `sp-col-*`
+ or `sp-cell-*`: `.sp-col` is already the board's column and `sp-col-resizing`
+ is already a body class, so a table column reusing either name would style
+ the tracker's board from four hundred lines away. */
+.sp-b-table { margin: 14px 0; position: relative; }
+/* A WIDE TABLE SCROLLS. The measure belongs to the document, so a six-column
+ table must not widen the prose column on a phone — it gets its own scroller
+ and the paragraph above it keeps its line length. */
+.sp-tb-wrap { overflow-x: auto; position: relative; }
+.sp-tb {
+ width: 100%; border-collapse: collapse; table-layout: fixed;
+ font-size: 15px; line-height: 1.5;
+}
+.sp-tb-cell {
+ border: 1px solid var(--line); padding: 7px 10px;
+ text-align: start; vertical-align: top; word-break: break-word;
+}
+.sp-tb thead .sp-tb-cell { background: var(--chrome); font-weight: 600; }
+/* Every cell gets a line box even when it is empty, or a table of blanks
+ collapses into a stack of hairlines with nowhere to click. A pseudo-element,
+ so it is not in the cell's innerHTML and can never reach the model. */
+.sp-tb-cell::after { content: ''; display: inline-block; width: 0; height: 1.5em; vertical-align: text-bottom; }
+.sp-tb-cell:focus { outline: 2px solid var(--blue); outline-offset: -2px; }
+
+/* the tools ride over the block like .sp-imgtools, and appear on hover/focus */
+.sp-tb-tools {
+ position: absolute; inset-block-start: -13px; inset-inline-end: 0;
+ display: flex; gap: 4px; opacity: 0; transition: opacity .12s;
+ background: var(--surface); padding: 2px; border-radius: 8px; z-index: 2;
+}
+.sp-b-table:hover .sp-tb-tools, .sp-tb-tools:focus-within, .sp-b-table:focus-within .sp-tb-tools { opacity: 1; }
+.sp-tb-tools .sp-btn { font-size: 12px; padding: 2px 7px; }
+.sp-tb-tools .sp-on { background: var(--chrome-2); }
+
+/* The column-boundary grip: a hit target wider than the line it moves. It sits
+ in the WRAPPER, over the boundary, never inside a cell — a cell's innerHTML
+ is the model, so chrome parked in one gets written into the document (and
+ the caret lands in it). Editor chrome, added in wire(): the renderer is the
+ same for the reading view, print and the still preview. */
+.sp-tb-grip {
+ position: absolute; top: 0; width: 7px;
+ cursor: col-resize; z-index: 1; background: transparent; border: 0; padding: 0;
+}
+.sp-tb-grip:hover, body.sp-col-resizing .sp-tb-grip { background: color-mix(in srgb, var(--blue) 45%, transparent); }
+
.sp-pagecard {
display: flex; align-items: center; gap: 9px;
padding: 10px 12px; margin: 6px 0;
border: 1px solid var(--line); border-radius: var(--radius);
color: var(--ink); text-decoration: none; font-weight: 600; font-size: 14px;
- background: #fff;
+ background: var(--surface);
}
.sp-pagecard:hover { background: var(--chrome); }
.sp-pagecard.sp-dead { color: var(--muted); font-style: italic; font-weight: 400; }
-.sp-page a { color: var(--ink); text-decoration: underline; text-decoration-color: rgb(247 166 0 / .55); text-underline-offset: 2px; }
+/* ————— link cards (outward) —————
+ Deliberately the page card's sibling: same border, radius and hover, so the
+ two read as one family and the difference a reader sees is the one that
+ matters — a host name at the foot means this one leaves the space. */
+.sp-b-link { position: relative; }
+.sp-linkcard {
+ display: flex; align-items: stretch; gap: 12px;
+ padding: 12px 14px; margin: 6px 0;
+ border: 1px solid var(--line); border-radius: var(--radius);
+ color: var(--ink); text-decoration: none; background: var(--surface);
+}
+.sp-linkcard:hover { background: var(--chrome); }
+.sp-page a.sp-linkcard { text-decoration: none; }
+.sp-linkcard.sp-dead { color: var(--muted); }
+.sp-linkcard-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; }
+.sp-linkcard-title { font-weight: 600; font-size: 14px; }
+.sp-linkcard.sp-dead .sp-linkcard-title { font-style: italic; font-weight: 400; }
+.sp-linkcard-desc {
+ font-size: 13px; color: var(--muted);
+ /* two lines, then an ellipsis: a card is a summary, and a pasted paragraph
+ must not turn one into a page of its own */
+ display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden;
+}
+.sp-linkcard-site {
+ display: flex; align-items: center; gap: 5px;
+ font-size: 12px; color: var(--muted);
+ /* a long url has no spaces to wrap at and would push the card wide */
+ overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
+}
+.sp-linkcard-mark { font-size: 13px; line-height: 1; }
+.sp-linkcard-img {
+ width: 88px; height: 66px; object-fit: cover; flex: none;
+ border-radius: calc(var(--radius) - 3px); background: var(--chrome);
+}
+.sp-linkcard-edit {
+ position: absolute; inset-block-start: 4px; inset-inline-end: 6px;
+ border: 1px solid var(--line); border-radius: 5px; background: var(--surface);
+ font: inherit; font-size: 11px; color: var(--muted);
+ padding: 2px 7px; cursor: pointer; opacity: 0;
+}
+.sp-b-link:hover .sp-linkcard-edit, .sp-linkcard-edit:focus-visible { opacity: 1; }
+/* an EMPTY card's button is the only way in, so it never hides */
+.sp-linkcard.sp-dead + .sp-linkcard-edit { opacity: 1; }
+
+.sp-page a { color: var(--ink); text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--accent) 55%, transparent); text-underline-offset: 2px; }
.sp-page a:hover { text-decoration-color: var(--accent); }
/* ————— backlinks ————— */
@@ -325,14 +795,14 @@ button.sp-callout-chip:hover { text-decoration: underline; text-underline-offset
/* ————— menus + overlays ————— */
.sp-overlay {
- position: fixed; inset: 0; background: rgb(20 30 45 / .34);
+ position: fixed; inset: 0; background: rgb(var(--shade) / .34);
display: flex; align-items: flex-start; justify-content: center;
padding-top: 11vh; z-index: 60;
}
.sp-card {
width: min(560px, 92vw); max-height: 72vh; overflow: auto;
- background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
- box-shadow: 0 18px 48px rgb(20 30 45 / .22); padding: 12px;
+ background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
+ box-shadow: 0 18px 48px rgb(var(--shade) / .22); padding: 12px;
}
.sp-card-h {
font-size: 11px; font-weight: 600; text-transform: uppercase;
@@ -340,7 +810,7 @@ button.sp-callout-chip:hover { text-decoration: underline; text-underline-offset
}
.sp-find {
width: 100%; font: inherit; font-size: 14px; padding: 9px 11px; color: var(--ink);
- background: #fff; border: 1px solid var(--line); border-radius: 8px;
+ background: var(--field); border: 1px solid var(--line); border-radius: 8px;
}
.sp-find:focus { border-color: var(--blue); outline: none; }
.sp-results { list-style: none; margin: 8px 0 0; padding: 0; }
@@ -364,22 +834,24 @@ button.sp-callout-chip:hover { text-decoration: underline; text-underline-offset
/* the block menu is anchored to the caret, not centred on the screen */
.sp-pop {
position: fixed; z-index: 60; width: 260px; max-height: 44vh; overflow: auto;
- background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
- box-shadow: 0 12px 34px rgb(20 30 45 / .2); padding: 6px;
+ background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
+ box-shadow: 0 12px 34px rgb(var(--shade) / .2); padding: 6px;
}
/* ————— banners + gates ————— */
.sp-banner {
display: flex; align-items: center; gap: 10px; padding: 8px 14px;
- background: #fff6dd; color: var(--accent-ink);
- border-bottom: 1px solid rgb(247 166 0 / .35); font-size: 13.5px;
+ /* an accent WASH on whatever the ground is: `#fff6dd` was cream on white
+ and a bright card on a dark chrome. */
+ background: color-mix(in srgb, var(--accent) 15%, var(--bg)); color: var(--accent-ink);
+ border-bottom: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); font-size: 13.5px;
}
-.sp-banner .sp-btn { color: var(--accent-ink); border-color: rgb(122 82 0 / .25); }
+.sp-banner .sp-btn { color: var(--accent-ink); border-color: color-mix(in srgb, var(--accent-ink) 30%, transparent); }
.sp-gate { position: fixed; inset: 0; display: grid; place-items: center; padding: 24px; background: var(--chrome); }
.sp-gate-card {
- max-width: 620px; background: #fff; padding: 26px;
+ max-width: 620px; background: var(--surface); padding: 26px;
border: 1px solid var(--line); border-radius: var(--radius);
- box-shadow: 0 14px 40px rgb(20 30 45 / .12);
+ box-shadow: 0 14px 40px rgb(var(--shade) / .12);
}
.sp-gate-card h1 { font-size: 21px; margin: 0 0 8px; letter-spacing: -0.01em; }
.sp-gate-card p { color: var(--muted); margin: 0 0 16px; font-size: 14px; }
@@ -392,13 +864,135 @@ button.sp-callout-chip:hover { text-decoration: underline; text-underline-offset
}
.sp-empty { color: var(--muted); }
-/* ————— about ————— */
-.sp-about .sp-card-h { margin-top: 20px; }
-.sp-about .sp-card-h:first-child { margin-top: 2px; }
-.sp-about-blurb { margin: 0 4px 10px; font-size: 14px; }
+/* ————— about —————
+ Slides' dialog, in this app's tokens: one scrolling card, sections with real
+ headings, and the weightier things last and marked. Everything that opens
+ inside it opens IN FLOW — the card scrolls, and a scroll container clips
+ BOTH axes (hard-won #10), so a floating child of it would be cut on the left
+ and the bottom with nothing to show for it. */
.sp-note { color: var(--muted); font-size: 12.5px; margin: 6px 4px 10px; line-height: 1.55; }
+/* The card is a column with its own scroll, sized off the VIEWPORT rather than
+ a breakpoint: 375px wide with a 12px gutter and 1600px wide are the same
+ rule. `.sp-card`'s 72vh is for a find palette that wants to sit high; a
+ dialog this long wants the height, so it takes 88vh and centres. */
+.sp-overlay-about { align-items: center; padding: 12px; padding-top: 12px; }
+.sp-about {
+ width: min(560px, calc(100vw - 24px));
+ max-height: min(88vh, calc(100vh - 24px));
+ padding: 18px;
+ display: flex; flex-direction: column; gap: 2px;
+ /* Sections are flex items, and a flex item SHRINKS by default — which is how
+ slides' update block collapsed to its min-height and spilled its children
+ over the controls beneath it. Let the card scroll instead; that is what
+ its overflow is for. */
+ overscroll-behavior: contain;
+}
+.sp-about > * { flex-shrink: 0; }
+.sp-ab-sec {
+ padding-top: 14px; margin-top: 12px;
+ border-top: 1px solid var(--line);
+}
+.sp-about .sp-card-h { margin: 0 2px 8px; }
+/* the head and the promo line are the title of the dialog, not a section */
+.sp-ab-promo { font-size: 12.5px; color: var(--muted); line-height: 1.5; margin: 6px 4px 2px; }
+.sp-ab-promo a { color: var(--blue); text-decoration: none; }
+.sp-ab-promo a:hover { text-decoration: underline; }
+
+/* What is in this file. Four numbers, and then the sentence that explains
+ them — a space is big because of its images, always. */
+.sp-ab-stats {
+ /* 112px, not 96: at 96 a 351px card fitted THREE and left the fourth alone
+ on its own row. 112 makes it 2×2 on a phone and one row of four on a
+ desktop card, which is the same readout either way rather than a ragged
+ one. Measured inner widths: 315px at 375, 524px at 1600. */
+ display: grid; grid-template-columns: repeat(auto-fit, minmax(112px, 1fr));
+ gap: 8px; margin: 0 2px 4px;
+}
+.sp-ab-stat {
+ background: var(--chrome); border: 1px solid var(--line); border-radius: 8px;
+ padding: 8px 10px; min-width: 0;
+}
+.sp-ab-stat b {
+ display: block; font-size: 17px; letter-spacing: -0.01em;
+ overflow: hidden; text-overflow: ellipsis;
+}
+.sp-ab-stat span { display: block; font-size: 11px; color: var(--muted); margin-top: 1px; }
+
+/* a labelled field, the shape slides' document properties use */
+.sp-ab-field { display: flex; align-items: center; gap: 10px; padding: 2px 4px 8px; }
+.sp-ab-field label { flex: 0 0 auto; font-size: 12px; color: var(--muted); }
+.sp-ab-field .sp-input { flex: 1 1 auto; min-width: 0; }
+
+/* `.sp-btn` is transparent by design — the topbar is icon-only and a row of
+ outlined boxes there would be noise. In THIS card the same class has to read
+ as a control against a white panel with no hover to help it, so the dialog
+ gives every non-primary button its border back. Slides' about does exactly
+ this, for exactly this reason. */
+.sp-about .sp-btn { border-color: var(--line); background: var(--chrome); }
+.sp-about .sp-btn:hover { background: var(--chrome-2); }
+.sp-about .sp-primary { border-color: var(--ink); background: var(--ink); color: #fff; }
+.sp-about .sp-primary:hover { background: var(--ink-2); border-color: var(--ink-2); }
+
+.sp-ab-check {
+ display: flex; align-items: center; gap: 7px;
+ font-size: 12.5px; color: var(--muted); cursor: pointer;
+ user-select: none; padding: 2px 4px 4px;
+}
+.sp-ab-status { display: flex; flex-direction: column; gap: 8px; }
+
+/* the one moment in the dialog with a decision in it, given its own room */
+.sp-ab-update {
+ display: flex; flex-direction: column; gap: 8px;
+ padding: 11px 13px; margin: 2px 4px;
+ border: 1px solid var(--line); border-radius: 10px;
+}
+.sp-ab-update .sp-note { margin: 0; }
+.sp-ab-new { font-weight: 650; font-size: 13.5px; }
+.sp-ab-release {
+ color: var(--ink-2); background: var(--chrome); border-radius: 8px;
+ padding: 9px 12px; line-height: 1.5; font-size: 12.5px;
+ /* Its OWN scroll region, sized off the viewport: release.mjs caps the notes
+ at five bullets plus an "…and N more" line, which fits whole at any normal
+ height, and anything longer scrolls HERE rather than the whole dialog. */
+ max-height: min(300px, 42vh); overflow-y: auto; overflow-wrap: anywhere;
+}
+.sp-ab-release > div + div { margin-top: 5px; }
+/* hanging indent: a wrapped bullet lines up under its own text, not the marker */
+.sp-ab-note { padding-inline-start: 14px; text-indent: -14px; }
+.sp-ab-note::before { content: '•\00a0'; }
+.sp-ab-more { color: var(--muted); font-style: italic; }
+.sp-ab-link { border-color: var(--line); }
+
+/* Weightier by construction: a marked button, and a confirmation that says
+ what will happen before the verb is offered. */
+.sp-about .sp-ab-danger { color: #a3231a; border-color: rgb(163 35 26 / .3); }
+.sp-about .sp-ab-danger:hover { background: #fdeceb; }
+.sp-ab-confirm {
+ margin: 8px 4px 2px; padding: 11px 13px;
+ background: #fdf4f3; border: 1px solid rgb(163 35 26 / .28); border-radius: 10px;
+}
+.sp-ab-confirm strong { display: block; font-size: 13.5px; }
+.sp-ab-confirm .sp-note { margin: 5px 0 8px; }
+.sp-ab-confirm .sp-actions { padding: 0; }
+.sp-about .sp-ab-go { background: #a3231a; color: #fff; border-color: #a3231a; }
+.sp-about .sp-ab-go:hover { background: #8a1d15; }
+.sp-ab-json {
+ width: 100%; margin-bottom: 8px;
+ font: 11.5px/1.45 ui-monospace, SFMono-Regular, Menlo, monospace;
+ color: var(--ink); background: #fff;
+ border: 1px solid var(--line); border-radius: 8px; padding: 8px; resize: vertical;
+}
+.sp-ab-json.sp-ab-bad { border-color: #a3231a; }
+
+.sp-ab-fine {
+ font-size: 10.5px; line-height: 1.5; color: var(--muted);
+ border-top: 1px solid var(--line); margin: 14px 4px 0; padding-top: 10px;
+}
+/* Close stays reachable at the end of the list rather than pinned over it: a
+ sticky footer inside a scroll container is one more thing to clip. */
+.sp-ab-foot { display: flex; justify-content: flex-end; padding: 10px 4px 2px; }
.sp-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 4px; font-size: 14px; }
-.sp-select { font: inherit; font-size: 13px; padding: 6px 8px; color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 8px; }
+.sp-select { font: inherit; font-size: 13px; padding: 6px 8px; color: var(--ink); background: var(--field); border: 1px solid var(--line); border-radius: 8px; }
.sp-actions { display: flex; flex-wrap: wrap; gap: 6px; padding: 2px 4px; }
.sp-mono { font: 12.5px ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--muted); }
@@ -414,11 +1008,11 @@ button.sp-callout-chip:hover { text-decoration: underline; text-underline-offset
.sp-side { display: none; }
.sp-side.sp-open {
display: block; position: fixed; inset: 0 auto 0 0; width: 268px;
- z-index: 50; box-shadow: 0 0 50px rgb(20 30 45 / .3);
+ z-index: 50; box-shadow: 0 0 50px rgb(var(--shade) / .3);
padding-top: max(14px, env(safe-area-inset-top));
}
[dir='rtl'] .sp-side.sp-open { inset: 0 0 0 auto; }
- .sp-scrim { position: fixed; inset: 0; background: rgb(20 30 45 / .3); z-index: 45; }
+ .sp-scrim { position: fixed; inset: 0; background: rgb(var(--shade) / .3); z-index: 45; }
.sp-main { padding: 26px 18px 45vh; }
/* THE MARGIN THE GUTTER LIVES IN — see below — and it hangs off the PAGE, not
off `.sp-main`. `.sp-main` is chrome and follows the interface direction;
@@ -456,11 +1050,40 @@ button.sp-callout-chip:hover { text-decoration: underline; text-underline-offset
/* ————— print: the only export-to-PDF path, so it is a contract ————— */
@media print {
- .sp-bar, .sp-side, .sp-banner, .sp-gutter, .sp-scrim, .sp-langchip { display: none !important; }
+ /* PAPER IS NOT A SCREEN. --sp-read grows with the viewport, and the viewport
+ while printing is whatever window happened to be open — so without this the
+ same document would set larger printed from a 27-inch monitor than from a
+ laptop. Pinned. */
+ :root {
+ --sp-read: 16px;
+ /* PAPER IS LIGHT, AND IT COSTS NOTHING TO SAY SO. Both dark blocks at the
+ top of this file are `@media screen`, so none of their tokens reach
+ here and the light palette is simply what applies — no third copy.
+ What DOES reach here is kernel/src/theme.ts's `color-scheme` on the
+ <html> element, which is an inline style and beats a media query; an
+ author !important is the one thing that beats an inline style. Without
+ it a dark reader's UA furniture prints dark over our white. */
+ color-scheme: only light !important;
+ }
+ .sp-bar, .sp-side, .sp-insp, .sp-insp-rz, .sp-banner, .sp-gutter, .sp-scrim, .sp-langchip { display: none !important; }
+ .sp-tb-tools, .sp-tb-grip { display: none !important; }
.sp-main { overflow: visible; padding: 0; background: #fff; }
.sp-toggle-body[hidden] { display: block !important; } /* toggles print OPEN */
.sp-b-h1, .sp-b-h2, .sp-b-h3, .sp-title { break-after: avoid; }
.sp-b-code, .sp-b-image figure, .sp-b-quote { break-inside: avoid; }
+ /* A TABLE ON PAPER. The scroller is a screen affordance and would CLIP on
+ paper (an overflow box prints what fits and drops the rest), so it is
+ unwound; the header tint goes the way the callout's does, because browsers
+ do not print backgrounds by default and a table whose only header cue was
+ a fill would print with no header at all. The rules are what survive, and
+ they are black on white. A header row repeats across a page break, which
+ is the whole reason <thead> is a real element here. */
+ .sp-tb-wrap { overflow: visible; }
+ .sp-tb-cell { border-color: #999; }
+ .sp-tb thead .sp-tb-cell { background: none; border-bottom-width: 2px; }
+ .sp-tb thead { display: table-header-group; }
+ .sp-tb tr { break-inside: avoid; }
+ .sp-b-code, .sp-b-image figure, .sp-b-media figure, .sp-b-quote { break-inside: avoid; }
/* A CALLOUT ON PAPER, IN BLACK AND WHITE.
The tint is dropped rather than trusted: browsers do not print backgrounds
by default, so a callout whose only cue was its fill would print as bare
@@ -481,8 +1104,8 @@ button.sp-callout-chip:hover { text-decoration: underline; text-underline-offset
.sp-ddmenu {
display: none; position: absolute; top: calc(100% + 5px); inset-inline-start: 0;
min-width: 250px; flex-direction: column; z-index: 60;
- background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
- box-shadow: 0 12px 34px rgb(20 30 45 / .2); padding: 5px;
+ background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
+ box-shadow: 0 12px 34px rgb(var(--shade) / .2); padding: 5px;
}
.sp-dd.sp-open .sp-ddmenu { display: flex; }
.sp-dd:last-child .sp-ddmenu { inset-inline-start: auto; inset-inline-end: 0; }
@@ -522,7 +1145,7 @@ button.sp-callout-chip:hover { text-decoration: underline; text-underline-offset
.sp-choices { display: flex; gap: 8px; margin: 4px 0 12px; }
.sp-choice {
flex: 1 1 0; text-align: start; font: inherit; color: var(--ink);
- background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
+ background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
padding: 10px 12px; cursor: pointer;
}
.sp-choice:hover { background: var(--chrome); }
@@ -558,14 +1181,51 @@ button.sp-callout-chip:hover { text-decoration: underline; text-underline-offset
}
.sp-b-image:hover .sp-imgtools, .sp-imgtools:focus-within { opacity: 1; }
.sp-imgtools .sp-btn {
- background: rgb(255 255 255 / .94); border-color: var(--line);
+ background: color-mix(in srgb, var(--surface) 94%, transparent); border-color: var(--line);
font-size: 12px; padding: 4px 8px;
- box-shadow: 0 2px 8px rgb(20 30 45 / .12);
+ box-shadow: 0 2px 8px rgb(var(--shade) / .12);
}
.sp-imgtools .sp-badge { color: var(--accent-ink); }
.sp-b-image figure { position: relative; }
.sp-page.sp-filedrop { outline: 2px dashed var(--blue); outline-offset: 8px; border-radius: var(--radius); }
+/* ————— video and audio —————
+ Same shape as an image: a <figure> in the column, tools that appear on
+ hover. A video is sized as a percentage of the measure like an image; an
+ audio element is a control bar, so it takes the full width and ignores the
+ width stepper (the editor does not offer one). */
+.sp-b-media { position: relative; }
+.sp-b-media figure { margin: 12px 0; position: relative; }
+.sp-b-media video { max-width: 100%; height: auto; border-radius: var(--radius); display: block; background: #000; }
+.sp-b-media audio { width: 100%; display: block; }
+.sp-b-media figcaption { font-size: 13px; color: var(--muted); margin-top: 6px; }
+.sp-mediatools {
+ position: absolute; top: 8px; inset-inline-end: 8px;
+ display: flex; gap: 4px; opacity: 0; transition: opacity .12s;
+ flex-wrap: wrap; justify-content: flex-end;
+}
+.sp-b-media:hover .sp-mediatools, .sp-mediatools:focus-within { opacity: 1; }
+.sp-mediatools .sp-btn {
+ background: color-mix(in srgb, var(--surface) 94%, transparent); border-color: var(--line);
+ font-size: 12px; padding: 4px 8px;
+ box-shadow: 0 2px 8px rgb(var(--shade) / .12);
+}
+/* The still that paper and a file-manager thumbnail get instead of a player. */
+.sp-media-still {
+ border: 1px solid var(--line); border-radius: 10px; padding: 12px;
+ background: var(--chrome-2); text-align: center;
+}
+.sp-media-still img { max-width: 100%; height: auto; border-radius: 8px; display: block; margin: 0 auto 8px; }
+.sp-media-badge { font-size: 13px; color: var(--muted); }
+/* A block whose source has not been chosen yet. */
+.sp-media-empty {
+ border: 1px dashed var(--line); border-radius: 10px; padding: 18px 20px;
+ background: var(--chrome-2);
+ display: flex; flex-direction: column; align-items: flex-start; gap: 6px;
+}
+.sp-media-actions { display: flex; gap: 8px; flex-wrap: wrap; }
+@media print { .sp-media-empty { border-color: #999; background: none; } }
+
/* ————— import ————— */
.sp-dropzone {
display: grid; place-items: center; margin: 4px 4px 10px; padding: 22px 12px;
@@ -583,7 +1243,7 @@ button.sp-callout-chip:hover { text-decoration: underline; text-underline-offset
color: var(--muted); background: transparent; cursor: pointer; opacity: 0;
}
.sp-treelink:hover .sp-rowmore, .sp-rowmore:focus { opacity: 1; }
-.sp-rowmore:hover { background: rgb(20 30 45 / .1); color: var(--ink); }
+.sp-rowmore:hover { background: var(--chrome-2); color: var(--ink); }
.sp-rowmore svg { width: 14px; height: 14px; }
/* ————— archived ————— */
@@ -603,12 +1263,12 @@ button.sp-callout-chip:hover { text-decoration: underline; text-underline-offset
.sp-findbar {
position: absolute; top: 54px; inset-inline-end: 18px; z-index: 55;
display: flex; align-items: center; gap: 6px; padding: 7px;
- background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
- box-shadow: 0 12px 34px rgb(20 30 45 / .2);
+ background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
+ box-shadow: 0 12px 34px rgb(var(--shade) / .2);
}
.sp-findbar .sp-find { width: 190px; padding: 6px 9px; font-size: 13.5px; }
.sp-findcount { font-size: 12px; color: var(--muted); min-width: 68px; text-align: center; }
-.sp-b.sp-hit { background: rgb(247 166 0 / .22); border-radius: 4px; transition: background .5s; }
+.sp-b.sp-hit { background: color-mix(in srgb, var(--accent) 22%, transparent); border-radius: 4px; transition: background .5s; }
/* ————— reading view ————— */
.sp-app.sp-reading .sp-main { padding-top: 56px; }
@@ -636,7 +1296,7 @@ button.sp-callout-chip:hover { text-decoration: underline; text-underline-offset
/* .sp-btn is transparent by design (the topbar is icon-only), so this one
states itself: it asks the reader to make a decision. */
margin-top: 6px;
- background: #fff;
+ background: var(--surface);
border-color: var(--line);
color: var(--ink);
font-weight: 550;
@@ -759,7 +1419,7 @@ button.sp-callout-chip:hover { text-decoration: underline; text-underline-offset
height: 100%; padding: 6px 6px;
border-start-start-radius: 0; border-end-start-radius: 0;
margin-inline-start: 1px;
- background: var(--ink); color: #fff;
+ background: var(--ink); color: var(--bg);
}
.sp-split .sp-caret > .sp-btn:hover { background: var(--ink-2); }
@@ -797,8 +1457,14 @@ button.sp-callout-chip:hover { text-decoration: underline; text-underline-offset
display: inline-flex; align-items: center; gap: 10px;
text-decoration: none; color: inherit;
}
-.sp-about-logo b { display: block; font-size: 15px; letter-spacing: -0.01em; }
-.sp-about-logo span { display: block; font-size: 12px; color: var(--muted); margin-top: 1px; }
+.sp-about-logo b { display: block; font-size: 15px; letter-spacing: -0.01em; white-space: nowrap; }
+/* `b + span`, NOT a bare `span`. The wordmark's peach slash is a `<span>`
+ INSIDE the `<b>`, so a rule for "the version line" was making it
+ display:block — and a block in the middle of a line breaks the line on both
+ sides. The mark rendered as three stacked lines ("bento" / "/" / "spaces")
+ from the day it shipped; measured with a Range over the b's text: rects at
+ y=79 (w 42), y=98 (w 4) and y=112 (w 51). The selector is the whole fix. */
+.sp-about-logo b + span { display: block; font-size: 12px; color: var(--muted); margin-top: 1px; }
.sp-about-logo:hover b { text-decoration: underline; }
/* ————— the panel edge: resize here, collapse here —————
@@ -811,7 +1477,7 @@ button.sp-callout-chip:hover { text-decoration: underline; text-underline-offset
transition: background .12s ease .08s;
}
.sp-resizer:hover,
-body.sp-col-resizing .sp-resizer { background: rgb(91 141 239 / .45); }
+body.sp-col-resizing .sp-resizer { background: color-mix(in srgb, var(--blue) 45%, transparent); }
body.sp-col-resizing { cursor: col-resize; user-select: none; }
.sp-noanim { transition: none !important; }
@@ -824,12 +1490,12 @@ body.sp-col-resizing { cursor: col-resize; user-select: none; }
transform: translate(-50%, -50%);
width: 16px; height: 44px; padding: 0;
display: flex; align-items: center; justify-content: center;
- background: #fff; color: #5d6b80;
+ background: var(--surface); color: var(--muted);
border: 1px solid var(--line); border-radius: 8px;
cursor: pointer; z-index: 15;
- box-shadow: 0 1px 4px rgb(20 30 45 / .12);
+ box-shadow: 0 1px 4px rgb(var(--shade) / .12);
}
-.sp-pane-tab:hover { color: var(--ink); border-color: #b9c3d2; }
+.sp-pane-tab:hover { color: var(--ink); border-color: var(--edge); }
.sp-pane-tab svg { width: 13px; height: 13px; display: block; }
/* Collapsed: the panel takes no width and the strip carries only the chevron,
@@ -860,6 +1526,113 @@ body.sp-col-resizing { cursor: col-resize; user-select: none; }
.sp-panel-toggle { display: inline-flex; }
}
+/* ————— the properties panel —————
+ The sibling of the page list, on the other edge, with the SAME resizer strip
+ and the SAME chevron. Two collapse idioms in one window would be two things
+ to learn for one behaviour.
+
+ IT COSTS NOTHING WHILE CLOSED, and that is the whole point of the rule
+ rather than a nicety: the wide-page work that shipped one commit before this
+ gives the column the window's slack, and a panel holding 280px of it open by
+ default would take that back on every screen. Closed is `flex-basis: 0`, no
+ padding and no border — `.sp-main` is `flex: 1 1 auto`, so the column is the
+ width it would be if this file did not exist. */
+.sp-insp {
+ flex: 0 0 var(--sp-inspw, 280px); min-width: 0;
+ transition: flex-basis .18s ease, padding .18s ease;
+ border-inline-start: 1px solid var(--line); background: var(--bg);
+ overflow: auto; padding: 10px 10px max(16px, env(safe-area-inset-bottom));
+}
+.sp-insp.sp-pane-closed {
+ flex-basis: 0; padding-inline: 0; border-inline-start-width: 0; overflow: hidden;
+}
+/* Mirror of the page list's strip. The chevron docks to the END edge when the
+ panel is shut, so there is always a way back in. */
+.sp-insp-rz.sp-shut { cursor: default; }
+.sp-insp-rz.sp-shut:hover { background: transparent; }
+.sp-insp-rz.sp-shut .sp-pane-tab {
+ inset-inline-end: 0; left: auto; transform: translateY(-50%);
+}
+
+.sp-insp-title {
+ font-size: 11px; font-weight: 600; text-transform: uppercase;
+ letter-spacing: 0.07em; color: var(--muted);
+ margin: 2px 6px 8px;
+}
+/* The accordion header. Clicking anywhere on it opens or shuts the group — the
+ same retrofit slides applies to `.ed-section`, so a section added below is
+ collapsible without anyone remembering to make it so. */
+.sp-insp-sec {
+ display: flex; align-items: center; gap: 6px;
+ margin: 10px 0 4px; padding: 5px 6px;
+ font-size: 12px; font-weight: 600; color: var(--ink-2);
+ border-radius: 7px; cursor: pointer; user-select: none;
+}
+.sp-insp-sec:hover { background: var(--chrome-2); }
+.sp-insp-sec::before {
+ content: '▾'; font-size: 9px; color: var(--muted); width: 9px;
+}
+.sp-insp-sec.sp-shut::before { content: '▸'; }
+.sp-insp-sub {
+ margin-inline-start: auto; font-weight: 400; font-size: 11.5px;
+ color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
+}
+.sp-insp-body { display: block; }
+.sp-insp-row {
+ display: flex; align-items: center; justify-content: space-between;
+ gap: 8px; padding: 4px 6px; font-size: 13px;
+}
+.sp-insp-lbl { color: var(--ink-2); flex: 0 1 auto; min-width: 0; }
+.sp-insp-row > :not(.sp-insp-lbl) { flex: 0 0 auto; max-width: 60%; }
+.sp-insp-txt, .sp-insp-num {
+ font: inherit; font-size: 12.5px; color: var(--ink);
+ background: var(--field); border: 1px solid var(--line); border-radius: 7px;
+ padding: 4px 7px; width: 148px; min-width: 0;
+}
+.sp-insp-num { width: 64px; }
+.sp-insp-txt:focus, .sp-insp-num:focus { outline: none; border-color: var(--blue); }
+.sp-insp-tog { width: 15px; height: 15px; accent-color: var(--blue); }
+.sp-insp-step { display: inline-flex; align-items: center; gap: 2px; }
+.sp-insp-step .sp-btn { padding: 2px 8px; line-height: 1.2; }
+.sp-insp-n { min-width: 26px; text-align: center; font-variant-numeric: tabular-nums; }
+.sp-insp-icon { padding: 4px 8px; }
+.sp-insp-icon svg { width: 15px; height: 15px; }
+.sp-insp-hint {
+ margin: 4px 6px 8px; font-size: 12px; line-height: 1.45; color: var(--muted);
+}
+.sp-insp .sp-select { max-width: 100%; }
+
+/* THE SAME BARGAIN THE PAGE LIST MAKES BELOW THE BREAKPOINT: an overlay, not a
+ third column. 820px of window does not hold two panels and a page. */
+@media (max-width: 820px) {
+ .sp-insp-rz { display: none; }
+ .sp-insp { display: none; }
+ .sp-insp.sp-open {
+ display: block; position: fixed; inset: 0 0 0 auto; width: 288px;
+ z-index: 50; box-shadow: 0 0 50px rgb(var(--shade) / .3);
+ padding-top: max(14px, env(safe-area-inset-top));
+ }
+ [dir='rtl'] .sp-insp.sp-open { inset: 0 auto 0 0; }
+}
+
+/* THE BUTTON IS SHOWN AT EVERY WIDTH, and this is a correction.
+ It was hidden above the breakpoint on the reasoning that the chevron on the
+ resizer strip is already the control, and that a second one would be the
+ duplication `.sp-panel-toggle` avoids. That argument holds for the PAGE LIST,
+ which is open by default: its chevron sits on the visible edge of a visible
+ panel. This panel is closed by default — deliberately, so it costs the
+ reading column nothing — which leaves a 5px strip as the only affordance.
+ Measured at 2560px: a 5×1353 target at x=2555, hard against the screen edge,
+ for a panel that is 0px wide. Reported as "how can I show the right panel?",
+ which is the question a control nobody can find produces. */
+.sp-insp-toggle { display: inline-flex; }
+/* …AND NOT EVEN THERE ONCE THE BAR HAS FOLDED. Measured at 375px: the 40px
+ button took the document title from 70px to 26px. fitTopbar hands out the
+ tier as a class precisely so a control can ask "is there room for me" rather
+ than re-derive a breakpoint; below the fold this one lives in the ⋯ menu, the
+ same place undo/redo and the other ways to save go. */
+.sp-bar-fold .sp-insp-toggle { display: none; }
+
/* A disabled action is shown, not hidden: "move up" missing from the top block
is a menu that changes shape, and a menu that changes shape is one you have
to re-read every time. */
@@ -871,7 +1644,7 @@ body.sp-col-resizing { cursor: col-resize; user-select: none; }
.sp-pop.sp-sheet {
position: fixed; inset-inline: 8px; bottom: max(8px, env(safe-area-inset-bottom));
top: auto; width: auto; max-height: 62vh; border-radius: 14px;
- padding: 8px; box-shadow: 0 -8px 40px rgb(20 30 45 / .28);
+ padding: 8px; box-shadow: 0 -8px 40px rgb(var(--shade) / .28);
transform: translateY(8px); opacity: 0;
transition: transform .16s ease, opacity .16s ease;
}
@@ -896,7 +1669,7 @@ body.sp-col-resizing { cursor: col-resize; user-select: none; }
border: 1px solid var(--line); border-radius: 7px;
padding: 3px 9px; cursor: pointer;
}
-button.sp-prop-val:hover { background: #fff; border-color: #b9c3d2; }
+button.sp-prop-val:hover { background: var(--surface); border-color: var(--edge); }
.sp-prop-dot {
width: 8px; height: 8px; border-radius: 50%;
background: var(--line); flex: 0 0 auto;
@@ -906,7 +1679,7 @@ button.sp-prop-val:hover { background: #fff; border-color: #b9c3d2; }
.sp-view-head { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.sp-view-btn { font-size: 12.5px; padding: 4px 9px; }
.sp-view-btn:first-of-type { margin-inline-start: auto; }
-.sp-view-btn.sp-on { background: var(--chrome-2); border-color: #b9c3d2; color: var(--ink); }
+.sp-view-btn.sp-on { background: var(--chrome-2); border-color: var(--edge); color: var(--ink); }
/* a field's name above its values, in the filter picker */
.sp-fgroup { display: block; padding: 9px 9px 3px; font-size: 12px; color: var(--muted); }
.sp-view-title { font-weight: 650; font-size: 15px; }
@@ -940,10 +1713,10 @@ button.sp-prop-val:hover { background: #fff; border-color: #b9c3d2; }
is the fix that cannot come back. */
.sp-issue {
display: block; position: relative; color: inherit;
- background: #fff; border: 1px solid var(--line); border-radius: 8px;
+ background: var(--surface); border: 1px solid var(--line); border-radius: 8px;
padding: 9px 10px; margin-bottom: 7px;
}
-.sp-issue:hover { border-color: #b9c3d2; box-shadow: 0 2px 8px rgb(20 30 45 / .07); }
+.sp-issue:hover { border-color: var(--edge); box-shadow: 0 2px 8px rgb(var(--shade) / .07); }
/* `.sp-page a` underlines every link in the reading column and out-specifies a
bare class — a card title is a card, not a link in a sentence. */
.sp-page a.sp-issue-title, .sp-issue-title { display: block; font-size: 13.5px; line-height: 1.4; color: inherit; text-decoration: none; }
@@ -964,7 +1737,7 @@ button.sp-issue-set {
/* a finger's target, not a mouse's */
padding: 4px 8px; min-height: 26px;
}
-button.sp-issue-set:hover { background: var(--chrome-2); border-color: #b9c3d2; }
+button.sp-issue-set:hover { background: var(--chrome-2); border-color: var(--edge); }
/* A FINGER: the status button is the only way to move an issue where HTML5
drag does not exist, so on a touch device it gets a target worth aiming at.
BOTH predicates — `coarse` is the honest one, and the width is the one a
@@ -1064,11 +1837,16 @@ button.sp-issue-set:hover { background: var(--chrome-2); border-color: #b9c3d2;
or struck-through control would make normal use look like a fault. */
.sp-live-on { color: var(--accent-ink); border-color: color-mix(in srgb, var(--accent-ink) 45%, var(--line)); }
.sp-live-off { opacity: .75; }
+/* dialling, or retrying after a drop — not a failure yet, and not "off" */
+.sp-live-wait { opacity: .75; animation: sp-live-pulse 1.4s ease-in-out infinite; }
+@keyframes sp-live-pulse { 50% { opacity: 1; } }
.sp-presence { display: inline-flex; gap: 2px; margin-inline-start: auto; padding-inline-start: 6px; }
.sp-dot {
width: 16px; height: 16px; border-radius: 50%;
display: inline-grid; place-items: center;
+ /* the dot's fill is a generated saturated hue set inline by collabui, so
+ its ink is white on both grounds — not a chrome surface. */
font-size: 9px; font-weight: 700; color: #fff;
text-transform: uppercase; letter-spacing: 0;
}
@@ -1103,6 +1881,25 @@ button.sp-issue-set:hover { background: var(--chrome-2); border-color: #b9c3d2;
.sp-paction:hover { background: var(--chrome-2); }
.sp-paction span { color: var(--muted); font-size: 12px; }
+/* THIS device's row in the People list: it is you, so it is not a target. */
+.sp-pme { cursor: default; }
+.sp-pme:hover { background: none; }
+
+/* Remove, on a peer row. Deliberately faint until the row is hovered — a
+ revocation is one click and it is not undoable, so it must not read as
+ part of the row's own affordance (clicking a person FOLLOWS them). */
+.sp-pkick {
+ margin-inline-start: 6px; padding: 0 4px; border-radius: 5px;
+ color: var(--muted); font-size: 12px; line-height: 1.6; opacity: 0;
+}
+.sp-pitem:hover .sp-pkick { opacity: 1; }
+.sp-pkick:hover { background: color-mix(in srgb, var(--c-red) 18%, transparent); color: var(--c-red); }
+
+/* The connection line. One glance = which of the five states this copy is in,
+ and the dot carries the colour so the words never have to. */
+.sp-pstatus { font-size: 12px; color: var(--muted); margin: 2px 0 8px; }
+.sp-pstatus.ok { color: var(--accent-ink); }
+
/* A heading inside a menu: the three width rows are a CHOICE among themselves,
not three more actions in the list above them. */
.sp-menu-label {
@@ -1110,3 +1907,59 @@ button.sp-issue-set:hover { background: var(--chrome-2); border-color: #b9c3d2;
color: var(--muted); padding: 10px 10px 4px; margin-top: 4px;
border-top: 1px solid var(--line);
}
+
+/* ————— review comments —————
+ A marker sits in the END margin, opposite the block gutter: outside the text
+ column, so it never reflows the prose it is about, and beside the line it
+ refers to. Page-level threads sit in a row under the title instead, because
+ the page's identity is what they are about. Both are chrome — the print
+ sheet below drops them, and the reading view never paints them. */
+.sp-cm-mark {
+ position: absolute; inset-inline-end: -34px; top: 2px;
+ min-width: 21px; height: 21px; padding: 0 5px;
+ border: 1px solid var(--line); border-radius: 10px 10px 10px 3px;
+ background: var(--surface); color: var(--muted);
+ font: inherit; font-size: 11px; font-weight: 650; line-height: 19px;
+ cursor: pointer;
+}
+.sp-cm-mark:hover { border-color: var(--accent); color: var(--accent-ink); }
+/* resolved is QUIET, never gone: the argument is still in the file */
+.sp-cm-done { opacity: .45; }
+.sp-cm-new { box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 30%, transparent); }
+/* the page-level row is in the flow, so its markers are too */
+.sp-cm-row { display: flex; gap: 4px; margin: 0 0 10px; }
+.sp-cm-row .sp-cm-mark { position: static; }
+/* the tree badge: a page with unanswered comments, seen from another page */
+.sp-cm-badge {
+ margin-inline-start: auto; flex: 0 0 auto;
+ min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px;
+ /* ink ON the fill, and the fill is brand: --accent-on does not flip. */
+ background: var(--accent); color: var(--accent-on);
+ font-size: 10.5px; font-weight: 700; line-height: 17px; text-align: center;
+}
+.sp-cm-pop { width: 290px; }
+.sp-cm-head {
+ display: flex; align-items: baseline; gap: 8px; justify-content: space-between;
+ font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
+ color: var(--muted); padding: 4px 6px 8px;
+}
+.sp-cm-me {
+ border: 0; background: none; font: inherit; font-size: 11px; text-transform: none;
+ letter-spacing: 0; color: var(--muted); cursor: pointer; padding: 0;
+}
+.sp-cm-me:hover { color: var(--ink); }
+.sp-cm-entries { display: flex; flex-direction: column; gap: 8px; padding: 0 6px 8px; }
+.sp-cm-entry b { font-size: 12.5px; }
+.sp-cm-time { color: var(--muted); font-size: 11px; margin-inline-start: 6px; }
+.sp-cm-entry p { margin: 2px 0 0; font-size: 13px; white-space: pre-wrap; overflow-wrap: anywhere; }
+.sp-cm-reply {
+ width: 100%; resize: vertical; font: inherit; font-size: 13px;
+ padding: 6px 8px; border: 1px solid var(--line); border-radius: 7px; background: var(--field);
+}
+.sp-cm-foot { display: flex; gap: 6px; padding: 8px 6px 4px; }
+@media (max-width: 820px) {
+ /* no end margin is reserved at this width — the marker tucks into the
+ column's own end edge rather than off the side of the screen */
+ .sp-cm-mark { inset-inline-end: 0; }
+}
+@media print { .sp-cm-mark, .sp-cm-row { display: none !important; } }