@aiquants/markdown-explorer 0.19.0 → 0.20.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +41 -1
- package/README.md +17 -9
- package/dist/EditSurface-D1yklbWu.js +833 -0
- package/dist/EditSurface-GxmyUeGE.cjs +3 -0
- package/dist/{ExplorerSplit-LiI3IUZn.js → ExplorerSplit-BAYa3WO3.js} +1 -1
- package/dist/{ExplorerSplit-BDkBN8A0.cjs → ExplorerSplit-DkE46pS0.cjs} +1 -1
- package/dist/{MultiLayout-KWacTPP8.js → MultiLayout-BkhnkQs5.js} +2 -2
- package/dist/{MultiLayout-BOaQK8fp.cjs → MultiLayout-DsxYURra.cjs} +1 -1
- package/dist/{NativeScrollBar-BPgV3kp-.cjs → NativeScrollBar-B57yWQVG.cjs} +1 -1
- package/dist/{NativeScrollBar-zzpty31a.js → NativeScrollBar-CcNqDlO6.js} +1 -1
- package/dist/{TreeLayout-C8IP4cjY.js → TreeLayout-Cf2PzZEI.js} +2 -2
- package/dist/{TreeLayout-S5TMf8_A.cjs → TreeLayout-DCGqVwt9.cjs} +1 -1
- package/dist/core/labels.d.cts +26 -0
- package/dist/core/labels.d.ts +26 -0
- package/dist/index-Bdve5EFS.cjs +13 -0
- package/dist/{index-Dz01kBab.js → index-DiLkl4dC.js} +1323 -1238
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/{merge-ClVgYrkS.js → merge-BIXNcrea.js} +1 -1
- package/dist/{merge-B7Lkcdz0.cjs → merge-DSfJceoQ.cjs} +1 -1
- package/dist/sanitizePolicy-BWQtWhsL.js +98 -0
- package/dist/sanitizePolicy-gEXeavb-.cjs +1 -0
- package/dist/sanitizeWorker.cjs +1 -1
- package/dist/sanitizeWorker.js +1 -1
- package/docs/behavior/localization.md +5 -1
- package/docs/behavior/security.md +1 -1
- package/package.json +9 -7
- package/dist/EditSurface-4VX20isB.cjs +0 -2
- package/dist/EditSurface-Ckg-3iTA.js +0 -786
- package/dist/index-DrKHJNY4.cjs +0 -13
- package/dist/sanitizePolicy-DlrakwA4.js +0 -96
- package/dist/sanitizePolicy-DrIMuYCb.cjs +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,46 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
-
##
|
|
3
|
+
## 0.20.0 (2026-10-26) — ```spreadsheets tables, read-only in documents and editable in the preview
|
|
4
|
+
|
|
5
|
+
### Breaking
|
|
6
|
+
|
|
7
|
+
- **`@aiquants/spreadsheet` ^0.15.0 is a new required peer, and the peer floors are `@aiquants/markdown` ^9.0.1,
|
|
8
|
+
`@aiquants/directory-tree` ^5.0.1 and `@aiquants/virtualscroll` ^3.22.1.** markdown 9 draws a ```spreadsheets code
|
|
9
|
+
block as a table with `@aiquants/spreadsheet` (loaded only for a document that holds one), and 9.0.1 sets a table back
|
|
10
|
+
to the document's body when Ctrl+Z or Ctrl+Y in it reaches the editor, so an undo that lands before the edit's echo is
|
|
11
|
+
drawn shows the undone value. A host installs `@aiquants/spreadsheet` and loads its stylesheet with the others:
|
|
12
|
+
`@aiquants/spreadsheet/styles/spreadsheet.standalone.css`, or `spreadsheet.css` in a Tailwind v4 host's entry with an
|
|
13
|
+
`@source` over its build output (see README "Load the styles"). directory-tree 5.0.1 and virtualscroll 3.22.1 change
|
|
14
|
+
their documentation only.
|
|
15
|
+
- **The viewer labels have 26 more keys, `viewerSpreadsheet…`** (markdown 9's `spreadsheet…` viewer keys): a host that
|
|
16
|
+
overrides every viewer label adds them. Six are templates (`MARKDOWN_EXPLORER_LABEL_TEMPLATES`):
|
|
17
|
+
`viewerSpreadsheetSize` (`{rows}`, `{cols}`), `viewerSpreadsheetCopyFailed` (`{reason}`),
|
|
18
|
+
`viewerSpreadsheetCellAnnouncement` (`{cell}`, `{value}`), `viewerSpreadsheetSelectionAnnouncement` (`{range}`),
|
|
19
|
+
`viewerSpreadsheetOptionsError` and `viewerSpreadsheetLoadFailed` (`{message}`).
|
|
20
|
+
|
|
21
|
+
### Added
|
|
22
|
+
|
|
23
|
+
- **```spreadsheets tables.** The rendered document shows each table read-only (selection, copy, zoom, the row and
|
|
24
|
+
column bands, copying the whole table, saving it as TSV and full screen). In the editor's preview every table with
|
|
25
|
+
source lines outside list items and quotes is editable: each transaction (a committed cell, a paste, a delete, a fill)
|
|
26
|
+
is written back into the editor's text as its block's new body, one undo step of its own, refused — and the table
|
|
27
|
+
says so — when the editor's block no longer reads what the table knows; Ctrl+Z and Ctrl+Y in a table undo and redo
|
|
28
|
+
the editor's history, and Save saves the tables' edits with the rest of the draft. A write-back, an undo or a redo
|
|
29
|
+
from a table leaves the scroll sync's lead with the preview. The grid takes the explorer's `locale` as its own.
|
|
30
|
+
- **The sanitizer keeps `data-code-meta` on `code`**, the info string after a fenced block's language that holds a
|
|
31
|
+
table's options (an inert value, as `@aiquants/markdown/code-blocks` names it).
|
|
32
|
+
- **The demo** writes `data-code-meta` as the Go converter does (the info string after the language, without its
|
|
33
|
+
trailing white space), loads the spreadsheet stylesheet and holds `notes/spreadsheets.md`.
|
|
34
|
+
|
|
35
|
+
### Changed
|
|
36
|
+
|
|
37
|
+
- **A double-click in an editable table or in a table shown full screen is the table's**: it edits a cell, or stays in
|
|
38
|
+
the full-screen layer, instead of opening the editor. A double-click on a read-only table of the rendered document
|
|
39
|
+
opens the editor there, as on any other block.
|
|
40
|
+
- **The keys of a table shown full screen are the table's**: the editing surface leaves them alone, so Ctrl+E does not
|
|
41
|
+
switch the panes behind it and Escape leaves full screen (the table takes that Escape itself).
|
|
42
|
+
|
|
43
|
+
## 0.19.0 (2026-10-26)
|
|
4
44
|
|
|
5
45
|
### Breaking
|
|
6
46
|
|
package/README.md
CHANGED
|
@@ -39,10 +39,10 @@ A single-view (embedding) page never downloads the tree and multi-panel views, w
|
|
|
39
39
|
|
|
40
40
|
- React 19.2.7 or later and React Router 8 in framework mode (route modules with `loader` / `headers`).
|
|
41
41
|
- Node.js 22.22 or later (the floor React Router 8 declares). The package ships ES modules and CommonJS; the CommonJS entries load the ESM-only `react-router` through `require(esm)`.
|
|
42
|
-
- The peer packages, at these versions or later within the caret ranges the package declares: `@aiquants/markdown` ^
|
|
42
|
+
- The peer packages, at these versions or later within the caret ranges the package declares: `@aiquants/markdown` ^9.0.1 (document rendering; its components' stylesheet without utilities, its controls' 44 px targets under every pointer, ```spreadsheets tables and their write-back through an editor whose undo from a table shows the undone value, the React-free `@aiquants/markdown/code-blocks` that names the `data-code-meta` the sanitizer keeps on `code`,
|
|
43
43
|
its Mermaid labels and drawings that finish inside the document when a diagram's text changes or it unmounts mid-drawing, its math diagnostics, gantt sizing, embeds, link cards and their sizes, the React-free `@aiquants/markdown/embeds` the sanitizer worker loads and `@aiquants/markdown/source-lines` the editor and the sanitizer read, and the Node-only link-card handler of `@aiquants/markdown/server`, which needs Node.js 22.13 or later — below the explorer's own floor),
|
|
44
|
-
`@aiquants/directory-tree` ^5.0.
|
|
45
|
-
`@aiquants/drag-drop-panels` ^0.12.0 (the panel headers' move menu, named by the explorer's `panelMove`, their 44 px buttons under every pointer and the header arrangement the behavior docs follow), `@aiquants/resize-panels` ^2.2.0 (the source of each layout change, by which the tree pane's width is saved) and `@aiquants/virtualscroll` ^3.22.
|
|
44
|
+
`@aiquants/directory-tree` ^5.0.1 (rows that take paint and text styles only and have no vertical padding, a `removeRootIndent` shift that keeps the root's icon whole, and reveals of rows under the scroll bar's buttons),
|
|
45
|
+
`@aiquants/drag-drop-panels` ^0.12.0 (the panel headers' move menu, named by the explorer's `panelMove`, their 44 px buttons under every pointer and the header arrangement the behavior docs follow), `@aiquants/resize-panels` ^2.2.0 (the source of each layout change, by which the tree pane's width is saved), `@aiquants/spreadsheet` ^0.15.0 (the grid of those tables, which markdown loads only for a document that holds one) and `@aiquants/virtualscroll` ^3.22.1 (44 px scroll-to-edge pills and tap-scroll circles, the pills' text at the body step).
|
|
46
46
|
The client depends on these floors, while a package manager may only warn about an older peer.
|
|
47
47
|
- A Markdown parser of your choice on the server that produces HTML and its headings (the explorer sanitizes the HTML before it is sent).
|
|
48
48
|
- Browsers: the multi view's panel-limit notice and the panel headers' move menu use the Popover API (Chrome and Edge 114, Firefox 125, Safari 17 and later). In browsers without it (for example iOS 16), the notice is drawn in place at the stage's corner instead of in the top layer (while the sheet is open it spans the sheet's header, as in every browser), and the move menu does not open: Alt + Shift + an arrow moves a panel there.
|
|
@@ -199,6 +199,7 @@ import resizePanels from "@aiquants/resize-panels/styles/resize-panels.standalon
|
|
|
199
199
|
import dragDropPanels from "@aiquants/drag-drop-panels/styles/drag-drop-panels.standalone.css?url"
|
|
200
200
|
import virtualscroll from "@aiquants/virtualscroll/styles/virtualscroll.standalone.css?url"
|
|
201
201
|
import directoryTree from "@aiquants/directory-tree/styles/directory-tree.standalone.css?url"
|
|
202
|
+
import spreadsheet from "@aiquants/spreadsheet/styles/spreadsheet.standalone.css?url"
|
|
202
203
|
import katex from "@aiquants/markdown/styles/katex.min.css?url"
|
|
203
204
|
import markdown from "@aiquants/markdown/styles/markdown.standalone.css?url"
|
|
204
205
|
import githubMarkdown from "@aiquants/markdown/styles/github-markdown.css?url"
|
|
@@ -208,7 +209,7 @@ import details from "@aiquants/markdown/styles/details.css?url"
|
|
|
208
209
|
import markdownExplorer from "@aiquants/markdown-explorer/styles/markdown-explorer.css?url"
|
|
209
210
|
import app from "./app.css?url"
|
|
210
211
|
|
|
211
|
-
export const links = () => [resizePanels, dragDropPanels, virtualscroll, directoryTree, katex, markdown, githubMarkdown, zennContent, message, details, markdownExplorer, app].map((href) => ({ rel: "stylesheet", href }))
|
|
212
|
+
export const links = () => [resizePanels, dragDropPanels, virtualscroll, directoryTree, spreadsheet, katex, markdown, githubMarkdown, zennContent, message, details, markdownExplorer, app].map((href) => ({ rel: "stylesheet", href }))
|
|
212
213
|
```
|
|
213
214
|
|
|
214
215
|
Your own stylesheet gives the explorer the definite block size it fills (see [Sizing](docs/behavior/layout.md#sizing)):
|
|
@@ -234,7 +235,7 @@ body {
|
|
|
234
235
|
```
|
|
235
236
|
|
|
236
237
|
- `html` and `body` take the viewport's height (React Router's default root renders the page straight into `body`; give any element your own root puts between them `height: 100%` as well), and `margin: 0` keeps the page from ending below the viewport. The page is a flex column of that height, and the explorer's wrapper takes what the header leaves (`flex: 1`) and may be shorter than its content (`min-height: 0`).
|
|
237
|
-
- The `.standalone.css` builds, `@aiquants/markdown/styles/markdown.standalone.css` among them, suit hosts without Tailwind CSS (or with Tailwind v3). A Tailwind v4 host loads the plain builds (`resize-panels.css`, `@aiquants/drag-drop-panels/css`, `virtualscroll.css`, `directory-tree.css`) and lets Tailwind scan the peers' `dist` with `@source`.
|
|
238
|
+
- The `.standalone.css` builds, `@aiquants/markdown/styles/markdown.standalone.css` among them, suit hosts without Tailwind CSS (or with Tailwind v3). `spreadsheet.standalone.css` carries virtualscroll's rules too, so beside `virtualscroll.standalone.css` the same rules come twice, with the same effect. A Tailwind v4 host loads the plain builds (`resize-panels.css`, `@aiquants/drag-drop-panels/css`, `virtualscroll.css`, `directory-tree.css`, `spreadsheet.css`) and lets Tailwind scan the peers' `dist` with `@source`.
|
|
238
239
|
For `@aiquants/markdown` it links no components sheet (the document styles below are still linked): its Tailwind entry imports `markdown.css` without `layer()` (the sheet's link and link-card rules and the diagram's focus ring must stay outside every cascade layer), scans the package's build output so that its own build generates the utilities the document viewer uses (the path of `@source` is relative to the CSS file that declares it), and declares the `dark` variant those utilities follow.
|
|
239
240
|
Without a declaration Tailwind's `dark` is the `prefers-color-scheme` media query; declare the one that matches how your page signals dark mode. The one below is the standalone sheet's: a `.dark` ancestor, or the `[data-theme="dark"]` the viewer sets from its `theme`:
|
|
240
241
|
|
|
@@ -406,7 +407,7 @@ Only the browser can say which, so the server's HTML holds neither, and a browse
|
|
|
406
407
|
A markdown document lists at most `EXPLORER_MAX_HEADINGS` (10,000) headings; one that lists more is answered `too-large`, because every listed heading travels with the document (in the data response, the browser's document cache and the viewer's table of contents, one entry each) and a parser can list headings its HTML never renders (`#` lines inside a math block), so none of the HTML's limits bounds the list. A cache of your parser's results can rely on the same bound.
|
|
407
408
|
|
|
408
409
|
Markdown links the viewer should follow inside the explorer carry `data-link-kind="doc"` and `data-doc-path="<document path>"` (plus `data-doc-exists="false"` for a missing target); a `doc` link without a path, or with one that is not an acceptable document path (`isAcceptableDocumentPath`: non-empty, at most `MAX_DOCUMENT_PATH_LENGTH` characters, no lone surrogates, control characters or backslashes), renders as an inert link.
|
|
409
|
-
The sanitizer keeps only the `data-*` attributes of this contract: `data-link-kind`, `data-doc-path`, `data-doc-exists`, `data-footnote-ref` and `data-footnote-backref` on links, `data-asset-src` and `data-asset-exists` on images, and `data-
|
|
410
|
+
The sanitizer keeps only the `data-*` attributes of this contract: `data-link-kind`, `data-doc-path`, `data-doc-exists`, `data-footnote-ref` and `data-footnote-backref` on links, `data-asset-src` and `data-asset-exists` on images, `data-footnotes` on sections, and `data-code-meta` on code (a fenced block's info string after its language, which holds a ```spreadsheets table's options); every other one is removed, including the `data-plugin-type` iframe trigger of `@aiquants/markdown` and the `<div data-plugin-type>` placeholders its 5.x converter wrote.
|
|
410
411
|
The one exception is the converter's embed placeholder: a paragraph whose only content is one absolute `http(s)` link without a user name or password (besides white space, U+00A0 and U+3000) carries the link's `href`, byte for byte, in `data-embed-url` on the `<p>`, and the paragraph and its link stay as written.
|
|
411
412
|
The sanitizer keeps that attribute only where `placeholderLinkOf` of `@aiquants/markdown/embeds` accepts it against the paragraph's children with the link's sanitized `href`; a forged or altered placeholder leaves the plain paragraph (see [Security](docs/behavior/security.md#html)). Mark such paragraphs in your parser as the Go converter does to get embeds and cards (the demo's parser shows how); without the mark the link stays its paragraph.
|
|
412
413
|
The viewer (`@aiquants/markdown`) renders an external link itself, in a new tab with `rel="noreferrer"`: one marked `data-link-kind="external"`, or, without `data-link-kind`, one whose `href` names a scheme in any case (`https:`, `HTTPS:`, `mailto:`) or another host (`//host/…`), so links to other sites need no mark.
|
|
@@ -447,6 +448,7 @@ editMaxBytes: 2 * 1024 * 1024, // the largest source and draft, the default
|
|
|
447
448
|
- **Grants.** Answer `{ kind: "grant", href }` from `source` or `save` when the reader must first allow writing (an OAuth consent for a wider scope, for example); `href` is a root-relative address of your own. The explorer shows a notice whose action calls `<MarkdownExplorer onEditGrant>` with it, or, without that prop, links to it in a new tab beside Try again.
|
|
448
449
|
- **Operations.** The data route answers `GET <dataPath>/edit?path=`, `POST <dataPath>/save?path=&base=<version>`, `POST <dataPath>/preview?path=`, `GET <dataPath>/revisions?path=` and `GET <dataPath>/revision?path=&revision=<id>`. `save` and `preview` carry `X-Markdown-Explorer: edit` and must pass the shared cross-origin check, like a refresh. Without `edit`, these operations answer as unknown ones (404), and `editMaxBytes` alone throws.
|
|
449
450
|
- **Source lines.** The editor opens at the place the reader was reading, or at the word they double-clicked, and the editor and the preview scroll together block by block, through the source lines your converter writes on every block: `data-source-lines="<first>-<last>"` (1-based, both inclusive), `@aiquants/markdown`'s `includeSourceLines`. Without them the editor opens at the start of the document and the two panes scroll together in proportion alone, top with top and bottom with bottom; the sanitizer keeps the attribute only in that form.
|
|
451
|
+
A ```spreadsheets table needs its source lines to be editable in the preview, and its options need the info string after the language as `data-code-meta` on the `code` element, as `@aiquants/markdown`'s converter writes it.
|
|
450
452
|
|
|
451
453
|
### Revealing the open document
|
|
452
454
|
|
|
@@ -716,7 +718,8 @@ A folder met again among its own ancestors (a shortcut inside its own target, or
|
|
|
716
718
|
#### The editor
|
|
717
719
|
|
|
718
720
|
A markdown document whose `edit` is `inline` gets an **Edit** toggle (`aria-pressed`) in the document bar, between Source and Refresh document: labelled beside a page view's pane, icon-only and named after the document in a multi-view panel. One whose `edit` is `draft` gets the same toggle, its tooltip and its name in a panel saying the document is edited without saving. One whose `edit` is `external` gets a link to its own editor in a new tab instead.
|
|
719
|
-
Pressing Edit opens the editor with the block at the top of the reader's view at the same place on screen;
|
|
721
|
+
Pressing Edit opens the editor with the block at the top of the reader's view at the same place on screen;
|
|
722
|
+
a double-click on a word of the rendered document opens it with the cursor on that word, which stays where it was, in the tree and single views and in a maximized panel (a panel that is not maximized maximizes on its first double-click, as before; links, controls, media and drawings keep their own double-click, and so do an editable table and a table shown full screen). Pressed again, Edit closes the editor — asking first when the draft is unsaved — and the rendered document shows the editor's top line at the same place.
|
|
720
723
|
The toggle is one element in both states, so the focus stays on it.
|
|
721
724
|
While a document is edited, the bar shows the draft's status on one line and the editor's actions instead of Source and Refresh document: Next conflict while conflicts wait, the view switch (Editor, Side by side where the pane has room — a page view or a maximized panel —, and Preview), History when the host keeps revisions, and Save (Ctrl/⌘+S in the editor), which is `aria-disabled` until the draft changes; the announcer speaks each save's outcome.
|
|
722
725
|
The editor (CodeMirror 6, loaded when the reader first points at or focuses Edit) fills the pane where it can and grows with its text in a panel that is not maximized; Escape inside it is consumed, so a maximized panel stays maximized, and Tab leaves it.
|
|
@@ -724,6 +727,9 @@ A save writes the draft back with the line endings of the file it opened (`\r\n`
|
|
|
724
727
|
A save that meets changes saved elsewhere merges them line by line: changes on different lines are saved at once; lines both sides changed differently are written between git-style markers with buttons above each conflict (keep my lines, the saved lines, or both), and Next conflict moves the focus to those buttons. A draft with markers left is not saved.
|
|
725
728
|
The preview renders the draft as the document would be: on every keystroke with a `draftConverter`, else once the reader pauses typing (SERVER_PREVIEW_DELAY_MS, 610 ms).
|
|
726
729
|
The view switch shows the editor alone, the two side by side (the preview below the editor on a narrow pane), or the preview alone; Ctrl+E (⌘E on a Mac) switches between the editor and the preview from the editor, the preview or the switch and moves the focus there, and a double-click on a word of the preview shown alone opens the editor at that word.
|
|
730
|
+
```spreadsheets tables (see `@aiquants/markdown`'s README, "Spreadsheets") are read-only in the rendered document and editable in the preview: every table with source lines outside list items and quotes writes each transaction (a committed cell, a paste, a delete, a fill) back into the editor's text as its block's new body, one undo step of its own, which the editor refuses — and the table says so — when the block no longer reads what the table knows.
|
|
731
|
+
Ctrl+Z and Ctrl+Y in a table undo and redo the editor's history, and Save saves the tables' edits with the rest of the draft. A write-back, an undo or a redo from a table leaves the scroll sync's lead with the preview.
|
|
732
|
+
A double-click in an editable table edits a cell instead of opening the editor (a read-only table of the rendered document opens it there, like any other block), and a table shown full screen keeps its keys: Ctrl+E does not switch the panes behind it, and Escape leaves full screen.
|
|
727
733
|
Side by side, a handle on the gutter between the two resizes them, as the explorer's handle resizes the explorer: drag it, or focus it and press the arrow keys (10 px, 50 px with Shift); either side keeps at least 1/φ³ (≈ 23.6 %) of the surface, and the reader's share (an even split by default) is kept in browser storage under `storageNamespace`, for beside and below alike.
|
|
728
734
|
Switching is instant: the hidden pane stays rendered and in step, so the block at the top of the view stays the same; a panel that is not maximized shows one pane at a time and puts the next one at the same place on screen. Where the bar is narrower than two reading columns (a phone), the switch shows its icons alone, keeping its 44 px targets.
|
|
729
735
|
The two scroll together, both ways: the pane the reader works in (the wheel, a press, a key, the focus, typing) leads — the shown one alone while the other is hidden —, and the other keeps the same blocks at the top of its view, moving on continuously — a block taller on one side, such as an image or a heading, is crossed faster there, never with a jump or a step back — and both reach their tops and their bottoms together.
|
|
@@ -795,8 +801,9 @@ export const draftConverter: ExplorerDraftConverter = {
|
|
|
795
801
|
### Localization
|
|
796
802
|
|
|
797
803
|
`locale` selects a built-in catalog (`MARKDOWN_EXPLORER_LABEL_CATALOGS.en` / `.ja`); `labels` overrides single keys.
|
|
798
|
-
The catalogs also name every control of the document viewer (the `viewer…` keys: its toolbar, the table of contents, the style and alignment menus, each Mermaid diagram's controls
|
|
799
|
-
|
|
804
|
+
The catalogs also name every control of the document viewer (the `viewer…` keys: its toolbar, the table of contents, the style and alignment menus, each Mermaid diagram's controls, every name, notice and announcement of a ```spreadsheets table, whose grid also takes `locale` as its own, and the titles of embedded frames)
|
|
805
|
+
and everything the multi view's drag-and-drop layout shows (the panel headers' buttons and the custom drag mode's badge, the move announcements and a touch or pen drag's lift and cancel announcements, the bar of hidden panels, the columns' names and the drop placeholders), which therefore follow `locale` too.
|
|
806
|
+
The labels the layout or a table fills with a value are templates with `{name}` placeholders (`MARKDOWN_EXPLORER_LABEL_TEMPLATES`). An unknown key, a blank string, a value of the wrong type, a template placeholder its key does not offer or a regional tag such as `"ja-JP"` throws — see [Localization](docs/behavior/localization.md).
|
|
800
807
|
|
|
801
808
|
## Layout
|
|
802
809
|
|
|
@@ -866,6 +873,7 @@ Tests and host styling may rely on the `data-testid` and `data-aqmx-*` attribute
|
|
|
866
873
|
- A held Enter acts once on every control inside the explorer, those of other packages included (the tree's rows, the panel headers' buttons, the document viewer's toolbar and the controls inside a document), except Zoom in and Zoom out, which keep stepping while a press that began on them is held (see [Held keys](docs/behavior/layout.md#held-keys)): a press that hands the focus to them, such as following a link to an image, does not step them.
|
|
867
874
|
The repeated keydowns end at the explorer's root, so a keydown listener the host attaches outside the explorer for the bubbling phase does not receive them either.
|
|
868
875
|
- A loop row (a folder met again among its own ancestors) shows an expand glyph and `aria-expanded="false"` like any closed folder, because `@aiquants/directory-tree` has no row that cannot expand; it never opens. The 4 listings in flight are counted per explorer, not across browser tabs.
|
|
876
|
+
- A ```spreadsheets table is editable in the preview only when its body stands in the source as the table reads it: a table inside a list item or a quote stays read-only there (its lines carry the container's markers), and a table whose fence and body are indented refuses every write-back as an edit conflict.
|
|
869
877
|
- Document kinds are the five above; `createFileSystemSource` previews only files with a known text extension or name as text and offers any other file as a `file` document (a download).
|
|
870
878
|
- HTML larger than `sanitizer.maxHtmlBytes` (4 MiB), placed deeper than 512 levels while it is parsed, making the parser create more elements than it has characters, more nodes than the worker's heap holds (81,920 elements, attributes and comments by default) or more than 4,096 comments, holding a tag with more than 1,024 attributes (counted before parsing for every `<` or `</` followed by a letter, so text in a script, a comment or an attribute value that looks like such a tag counts too), giving `html` or `body` more than 1,024 attributes through repeated tags,
|
|
871
879
|
carrying attributes whose characters, counting every copy of a reopened formatting element, exceed `maxHtmlBytes`, sanitizing to HTML longer than four characters per byte of `maxHtmlBytes`, or not sanitized within `sanitizer.deadlineMs` (30 s) shows as `too-large`.
|