revise 2.0.1 → 2.1.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 +101 -0
- package/README.md +4 -1
- package/assets/historyMaterializeWorker-C4uxcZEh.js +607 -3
- package/backend.js +3 -1
- package/chunks/{AgentPageRenderer-BIf_Fza8.js → AgentPageRenderer-BFB0arQL.js} +1 -1
- package/chunks/{AgentPageRenderer-DT9sNxEn.js → AgentPageRenderer-Dn6SaRjW.js} +1 -1
- package/chunks/AttachmentDocumentImporter-BHDJAdky.js +1 -0
- package/chunks/AttachmentDocumentImporter-CxOZqzt1.js +1 -0
- package/chunks/BidiText-C8PBPSQY.js +160 -0
- package/chunks/ColorParserFull-BKH72fK8.js +446 -1
- package/chunks/DocumentMutator-4vBJQ74L.js +31 -0
- package/chunks/{DocumentScrubber-DrgzBlx4.js → DocumentScrubber-COPepQKE.js} +1 -1
- package/chunks/{DocumentScrubber-W0EfGmL-.js → DocumentScrubber-Cf_QqHhF.js} +1 -1
- package/chunks/DocumentScrubber-DS4LFDKS.js +18 -0
- package/chunks/DocumentStylesheet-byN5dtC6.js +7 -1
- package/chunks/DocxConverter-BCEB7jWY.js +1083 -0
- package/chunks/{DocxConverter-CGYMfz-j.js → DocxConverter-C3NflpDr.js} +2 -2
- package/chunks/{DocxConverter-DabDLfsu.js → DocxConverter-D9ZNn4nX.js} +2 -2
- package/chunks/{DocxGraft-B6W7fbh4.js → DocxGraft-Ba63IRP4.js} +1 -1
- package/chunks/DocxGraft-DjERgl-z.js +7 -0
- package/chunks/{DocxGraft-Cj7v78BO.js → DocxGraft-cYlmw4Ab.js} +1 -1
- package/chunks/{FileImporter-CjUX2S4s.js → FileImporter-CHXj9sNX.js} +1 -1
- package/chunks/{FileImporter-DtkbI6rF.js → FileImporter-DetvRoJc.js} +1 -1
- package/chunks/HorizontalRuleOrnaments-gmUZ3R7Q.js +3 -1
- package/chunks/HtmlConverter-Sd9t49vH.js +267 -0
- package/chunks/ListNumbering-Qlu6AuRZ.js +23 -1
- package/chunks/MarkdownConverter-BdJgh8xt.js +57 -0
- package/chunks/MathRenderer-B0Y1h1JU.js +36 -7
- package/chunks/{OdtConverter-Cnda9T0q.js → OdtConverter-BKtyx012.js} +1 -1
- package/chunks/{OdtConverter-WdwwXKVM.js → OdtConverter-Ce9j8PRt.js} +1 -1
- package/chunks/OdtConverter-D709qfYb.js +31 -0
- package/chunks/ParagraphDiffAnalysis-DrmStvmz.js +36 -0
- package/chunks/PdfConverter-BA8XLTAM.js +21 -0
- package/chunks/PdfConverter-CkDClffR.js +438 -0
- package/chunks/PdfConverter-CxLxd-LJ.js +21 -0
- package/chunks/{PdfImportService-Dj1-3L2B.js → PdfImportService-CQCgsRX1.js} +2 -2
- package/chunks/{PdfImportService-OE9G383I.js → PdfImportService-xl7fstr-.js} +2 -2
- package/chunks/{RtfConverter-D-oqPWNl.js → RtfConverter-BZOnMUGH.js} +1 -1
- package/chunks/{RtfConverter-D9zhE07-.js → RtfConverter-Bs81AfXt.js} +1 -1
- package/chunks/RtfConverter-DfuE5olb.js +45 -0
- package/chunks/TableBorders-Cdkc62cX.js +30 -0
- package/chunks/TableGrid-DbroRucl.js +12 -0
- package/chunks/TextFileDecoder--rsVs3NR.js +9 -2
- package/chunks/{TxtConverter-BYazsp6P.js → TxtConverter-C-oiFUAp.js} +5 -2
- package/chunks/UnicodeUtils-CXtusU4g.js +10 -0
- package/chunks/XmlConverter-C0FnrVYk.js +70 -0
- package/chunks/XmlConverter-CQa8baOF.js +2 -0
- package/chunks/XmlConverter-DjEYaIyf.js +2 -0
- package/chunks/_commonjsHelpers-DaMA6jEr.js +2 -1
- package/chunks/_revise-sdk-lazy-harfbuzz-CDWdjF9f.js +1 -1
- package/chunks/_revise-sdk-lazy-harfbuzz-X8gnYTZL.js +1 -1
- package/chunks/ar-BdmGnaKI.js +14 -0
- package/chunks/backend-BIhAX-Gi.js +484 -0
- package/chunks/base64-Qx0OzT4p.js +196 -0
- package/chunks/browser-module-CFmqfGkE.js +1791 -3
- package/chunks/{browser-module-BbaxnHNK.js → browser-module-CYGCfEyx.js} +1 -1
- package/chunks/{browser-module-D2ixluMg.js → browser-module-DgvTMhpA.js} +1 -1
- package/chunks/bundle.min-DRpfgV69.js +779 -5
- package/chunks/capture-BAJ2in5p.js +9 -0
- package/chunks/carrier-C5VZRMxZ.js +6 -0
- package/chunks/de-DldIXRFC.js +14 -0
- package/chunks/es-CnyKlSPK.js +14 -0
- package/chunks/footnoteFlatten-Bekh8ZfM.js +6 -0
- package/chunks/graftExport-CRRm1Oe_.js +82 -0
- package/chunks/html2canvas.esm-CntiHiYW.js +994 -2
- package/chunks/index-B1idHquf.js +1094 -0
- package/chunks/index-BWdRWxoH.js +1796 -13
- package/chunks/index-C-4H81OE.js +378 -0
- package/chunks/index-iZC8xN0t.js +378 -0
- package/chunks/{index.es-mTU7Sl3w.js → index.es-Bwt05m_b.js} +1 -1
- package/chunks/index.es-CI0QPo8w.js +780 -5
- package/chunks/{index.es-B97tjxvW.js → index.es-DAQD57G4.js} +1 -1
- package/chunks/{jspdf.es.min-Mykp4BZO.js → jspdf.es.min-CnNRolk9.js} +1 -1
- package/chunks/jspdf.es.min-DU74zN8b.js +1747 -32
- package/chunks/{jspdf.es.min-DGiD4mlU.js → jspdf.es.min-DlTF8uTw.js} +1 -1
- package/chunks/jszip.min-CPW0h1Kx.js +476 -2
- package/chunks/katex-DWj8TvwO.js +1209 -8
- package/chunks/pdf-BLWDCiFF.js +1826 -10
- package/chunks/{pseudoLocale-C90lXrPg.js → pseudoLocale-BoJwIubw.js} +1 -1
- package/chunks/{pseudoLocale-UA_TkGrH.js → pseudoLocale-DWAm7Dpa.js} +1 -1
- package/chunks/purify.es-BwLardii.js +107 -2
- package/chunks/serverDocumentSession-DASrQAbW.js +15 -0
- package/chunks/signatures-CBF7NZUy.js +17 -0
- package/chunks/tree-sitter-D6zWWUMP.js +1 -1
- package/chunks/web-tree-sitter-BXGZGnNj.js +2 -1
- package/full.js +1 -1
- package/index.d.ts +31 -12
- package/index.js +1 -1
- package/package.json +1 -1
- package/root.js +2 -2
- package/serverToolContract.d.ts +21 -3
- package/serverToolInputs.generated.d.ts +23 -2
- package/style.css +1 -1
- package/chunks/AttachmentDocumentImporter-BUavYRxO.js +0 -1
- package/chunks/AttachmentDocumentImporter-DGwfDJSH.js +0 -1
- package/chunks/BidiText-D7LYTAUL.js +0 -1
- package/chunks/DocumentMutator-CjN7Kk-X.js +0 -31
- package/chunks/DocumentScrubber-C9ZZEcYW.js +0 -1
- package/chunks/DocxConverter-Be3uPNcD.js +0 -11
- package/chunks/DocxGraft-Duvo2cpy.js +0 -1
- package/chunks/HtmlConverter-ikXImzTY.js +0 -61
- package/chunks/MarkdownConverter-CFrcLyO_.js +0 -17
- package/chunks/OdtConverter-BFT_P8SI.js +0 -1
- package/chunks/PdfConverter-D7UM58vc.js +0 -21
- package/chunks/PdfConverter-TB-QPw29.js +0 -21
- package/chunks/PdfConverter-wVP63986.js +0 -21
- package/chunks/RtfConverter-DZgwU-_R.js +0 -14
- package/chunks/TableBorders-BorZS8aZ.js +0 -1
- package/chunks/TableGrid-DVWaRZv0.js +0 -1
- package/chunks/ar-C8zx2RwP.js +0 -8
- package/chunks/backend-MFpDFVrD.js +0 -1
- package/chunks/base64-BNMNG-lN.js +0 -1
- package/chunks/capture-qC26xmfy.js +0 -1
- package/chunks/carrier-BWONvrA7.js +0 -1
- package/chunks/de-ByQFqecF.js +0 -8
- package/chunks/es-PHpJXv5S.js +0 -8
- package/chunks/footnoteFlatten-Bdnn_bz1.js +0 -1
- package/chunks/graftExport-CP3h2T88.js +0 -2
- package/chunks/index-CjeGoI2g.js +0 -351
- package/chunks/index-D7V8zn4w.js +0 -36
- package/chunks/index-DyOcu9mD.js +0 -351
- package/chunks/serverDocumentSession-CRZSb5SO.js +0 -11
- package/chunks/signatures-CsL_TjvW.js +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,106 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 2.1.0
|
|
4
|
+
|
|
5
|
+
### Added
|
|
6
|
+
|
|
7
|
+
- **`source` on document inputs.** `{ id, source: file }` names the field for
|
|
8
|
+
what it takes: DOCX, Markdown, plain text, or HTML. `docx` still works as the
|
|
9
|
+
same field; passing both with different values throws.
|
|
10
|
+
- **`context_notes` is optional in typed host calls.** `tools.execute()` and
|
|
11
|
+
`tools.call()` (browser and `revise/server`) fill in `"N/A"` for the read and
|
|
12
|
+
search tools, so application code no longer passes a model's working memory.
|
|
13
|
+
`executeDynamic()` keeps the schema requirement for model-provided calls.
|
|
14
|
+
- **`leave_comment` reports a retargeted anchor.** When the anchor text is not
|
|
15
|
+
in the named block and the comment goes to the only read block that has it,
|
|
16
|
+
`data.requestedBlockId` names the block you asked for and the message says so.
|
|
17
|
+
|
|
18
|
+
- **`read_table` and `edit_table_cells` agent tools.** Read a large table in
|
|
19
|
+
bounded windows (a summary, up to 50 rows, or one oversized cell in pages),
|
|
20
|
+
then set the plain text of up to 50 cells per call by row ID and column.
|
|
21
|
+
Cell text is written literally. Only cells a `read_table` call returned in
|
|
22
|
+
full can be edited, and that read stays valid across later `execute()` calls
|
|
23
|
+
on the same document while the cell and table geometry remain unchanged.
|
|
24
|
+
An invalid target rejects the whole batch with no changes. In suggesting mode each cell is its own suggestion. Read-only
|
|
25
|
+
surfaces and viewers get `read_table` only. Both tools are also in the
|
|
26
|
+
`revise/server` session. The SDK's `read_table` does not take the native
|
|
27
|
+
agent's task-declaration arguments (`task_kind`, `scope_*`,
|
|
28
|
+
`source_attachment_id`, `deliberate_blanks`). They are left out of the
|
|
29
|
+
published schema, and a call that supplies one fails with
|
|
30
|
+
`unsupported_argument` without reading anything. Empty placeholders
|
|
31
|
+
(`null`, `""`, `[]`) are ignored.
|
|
32
|
+
|
|
33
|
+
### Changed
|
|
34
|
+
|
|
35
|
+
- **The delegated agent plans long tasks.** `agent.run()`, `revise_run_agent`,
|
|
36
|
+
and comment agents keep a step-by-step plan for multi-step work, update it
|
|
37
|
+
in the same turns as their edits, and save it with the conversation, so
|
|
38
|
+
fewer turns go to bookkeeping. The embedded tool list is unchanged: plan
|
|
39
|
+
tools stay inside the delegated agent.
|
|
40
|
+
- **Faster on long documents.** The scrollbar track and its markers are drawn
|
|
41
|
+
once and reused while scrolling, Find reuses each block's normalized text
|
|
42
|
+
between keystrokes, and tracked-change records are indexed in one pass
|
|
43
|
+
instead of one document walk per suggestion.
|
|
44
|
+
|
|
45
|
+
### Fixed
|
|
46
|
+
|
|
47
|
+
- **DOCX paragraph spacing follows the document's rules.** `w:contextualSpacing` no longer
|
|
48
|
+
zeroes a paragraph's declared space before and after on import. Spacing is
|
|
49
|
+
resolved from neighboring paragraphs on screen, in table cells and
|
|
50
|
+
containers, and in PDF export: the gap between two paragraphs is the larger
|
|
51
|
+
of their spacings, not the sum, and contextual spacing drops it only between
|
|
52
|
+
paragraphs of the same style. PDF keep-with-next reserves the whole gap, and
|
|
53
|
+
exported DOCX keeps the declared spacing. Documents whose paragraphs both
|
|
54
|
+
declare spacing lay out tighter than in 2.0.x.
|
|
55
|
+
- **`style_blocks` with `list-style-type: none` turns list items into plain
|
|
56
|
+
paragraphs**, keeping their spacing and line spacing and applying the call's
|
|
57
|
+
other paragraph attributes in the same step.
|
|
58
|
+
- **Unsupported DOCX content can be suggested for removal.** In suggesting
|
|
59
|
+
mode, removing a block the editor preserves but cannot render (an opaque
|
|
60
|
+
DOCX payload) now becomes a tracked deletion.
|
|
61
|
+
- **Comment previews keep their layout.** In a comment chip's hover preview,
|
|
62
|
+
the avatar holds its size and a long author name is truncated.
|
|
63
|
+
- **An editor with no agent configured sends nothing.** `agent.run()`, the
|
|
64
|
+
`revise_run_agent` tool, and comment agents used to stream the document,
|
|
65
|
+
unauthenticated, to Revise's hosted agent and then report a generic
|
|
66
|
+
connection error. Without a `turnStream`, `baseUrl`, or `token`, they now
|
|
67
|
+
fail at once with `agent_not_configured` (`AgentNotConfiguredError` from
|
|
68
|
+
`agent.run()`), and `getToolDefinitions()` leaves the delegation tool out.
|
|
69
|
+
- **`documents.open()` activates the new document every time.** Opening a
|
|
70
|
+
document straight after another open, or after `documents.activate()`, left
|
|
71
|
+
the earlier one active. `documents.list()` status was also briefly stale
|
|
72
|
+
right after a document became ready.
|
|
73
|
+
- **`tools.getDefinitions()` lists only the native tools.** It included
|
|
74
|
+
`revise_run_agent`, which the docs say it leaves out.
|
|
75
|
+
- **Changing `agent.turnStream` no longer reloads the document.** A new
|
|
76
|
+
`turnStream` or `disableMetrics` value re-created the document runtime,
|
|
77
|
+
re-parsing the source and dropping unsaved edits, so an inline generator in
|
|
78
|
+
JSX reloaded the document on every render. Agent settings now apply to the
|
|
79
|
+
next run in place.
|
|
80
|
+
- **Reads are not refused for the life of the editor.** After a window had
|
|
81
|
+
been read once, every later `read_blocks_from_index` of it failed with
|
|
82
|
+
`no_new_read_context`, so a host agent's second conversation could not read
|
|
83
|
+
the document. The guard now resets with each call, like the other per-turn
|
|
84
|
+
limits.
|
|
85
|
+
- **Tool errors speak to SDK callers.** Messages no longer carry the internal
|
|
86
|
+
`Failed operation: <tool>: <Error>:` prefix or point at `<document_content>`,
|
|
87
|
+
which only Revise's own agent sees; they point at read results instead.
|
|
88
|
+
- **The open-error screen shows a plain message.** A corrupt file showed the
|
|
89
|
+
parser's internals (a zip library's message and link) to the person who
|
|
90
|
+
picked it. `onError` still receives the full detail. Loading text no longer
|
|
91
|
+
says "DOCX" for other formats, and a `File` source's title drops `.md`,
|
|
92
|
+
`.txt`, and `.html` extensions as well as `.docx`.
|
|
93
|
+
- **PDF export requests a failing font once.** When a font download failed
|
|
94
|
+
(a CSP or firewall blocking revise.io, say), export requested the same URL a
|
|
95
|
+
second time. The warning now says a fallback font was used and names
|
|
96
|
+
`setAssetBaseUrl()` for mirroring the fonts.
|
|
97
|
+
- **Readable errors from the package in Node.** Bundled code is wrapped at
|
|
98
|
+
short lines, so an uncaught error (such as the missing-`jsdom` hint) is no
|
|
99
|
+
longer printed under a 100 KB line of minified source.
|
|
100
|
+
- **Quieter host builds.** Vite no longer warns that `"buffer"` was
|
|
101
|
+
externalized, or prints the inlined WebAssembly's base64 as a file that
|
|
102
|
+
"doesn't exist at build time".
|
|
103
|
+
|
|
3
104
|
## 2.0.1
|
|
4
105
|
|
|
5
106
|
### Added
|
package/README.md
CHANGED
|
@@ -19,7 +19,7 @@ import "revise/style.css";
|
|
|
19
19
|
export function DocumentPane({ file }: { file: File }) {
|
|
20
20
|
return (
|
|
21
21
|
<ReviseEditor
|
|
22
|
-
initialDocuments={[{ id: "contract-1", title: "Contract",
|
|
22
|
+
initialDocuments={[{ id: "contract-1", title: "Contract", source: file }]}
|
|
23
23
|
onChange={(documentId, document) => {
|
|
24
24
|
console.log(documentId, "now has", document.children.length, "blocks");
|
|
25
25
|
}}
|
|
@@ -28,6 +28,9 @@ export function DocumentPane({ file }: { file: File }) {
|
|
|
28
28
|
}
|
|
29
29
|
```
|
|
30
30
|
|
|
31
|
+
The editor sends Revise one anonymous ping per page load, with its version and
|
|
32
|
+
no user data or document content. Pass `telemetry={false}` to turn it off.
|
|
33
|
+
|
|
31
34
|
Refer to the [SDK Docs](https://developer.revise.io/editor-sdk) for the full editor API, including agentic tool calling.
|
|
32
35
|
|
|
33
36
|
## License
|