revise 2.2.0 → 3.0.1

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.
Files changed (134) hide show
  1. package/CHANGELOG.md +56 -1182
  2. package/LICENSE +24 -41
  3. package/README.md +103 -26
  4. package/agent.d.ts +139 -0
  5. package/chunks/chunk-U5X47PZ6.js +135 -0
  6. package/chunks/chunk-U6YKQBKL.js +15 -0
  7. package/chunks/chunk-ZLQVPMBN.js +1650 -0
  8. package/chunks/package-5SHL5FOJ.js +14 -0
  9. package/chunks/render-QD5VWKSV.js +109 -0
  10. package/cli-output.schema.json +1984 -0
  11. package/cli.js +3609 -0
  12. package/document.d.ts +320 -0
  13. package/docx.d.ts +73 -0
  14. package/errors.d.ts +14 -0
  15. package/index.d.ts +13 -975
  16. package/index.js +31 -1
  17. package/legacy/editor.d.ts +19 -0
  18. package/legacy/editor.js +16 -0
  19. package/legacy/server.d.ts +37 -0
  20. package/legacy/server.js +25 -0
  21. package/legacy/style.css +2 -0
  22. package/package.d.ts +23 -0
  23. package/package.json +49 -55
  24. package/render.d.ts +27 -0
  25. package/FONT-LICENSE-HAN-EXT-B.txt +0 -91
  26. package/FONT-LICENSE-KATEX.txt +0 -95
  27. package/FONT-LICENSE-LIBERATION.txt +0 -102
  28. package/FONT-LICENSE-NOTO-MULTILINGUAL.txt +0 -93
  29. package/FONT-LICENSE-NOTO-SANS-SC.txt +0 -93
  30. package/FONT-LICENSE-NOTO.txt +0 -94
  31. package/FONT-LICENSE-SOURCE-CODE-PRO.txt +0 -94
  32. package/FONT-LICENSE-SOURCE-SERIF-4.txt +0 -93
  33. package/THIRD-PARTY-NOTICES.md +0 -3376
  34. package/assets/historyMaterializeWorker-B51R08XN.js +0 -612
  35. package/backend.d.ts +0 -161
  36. package/backend.js +0 -3
  37. package/chunks/AgentPageRenderer-CH8kSTJn.js +0 -1
  38. package/chunks/AgentPageRenderer-P23XVguo.js +0 -1
  39. package/chunks/AttachmentDocumentImporter-B1WOaa7d.js +0 -1
  40. package/chunks/AttachmentDocumentImporter-CT_PJp_e.js +0 -1
  41. package/chunks/BidiText-Swm5fl9J.js +0 -160
  42. package/chunks/ColorParserFull-BKH72fK8.js +0 -446
  43. package/chunks/DocumentMutator-btiDK57e.js +0 -31
  44. package/chunks/DocumentScrubber-CMPfm_HF.js +0 -18
  45. package/chunks/DocumentScrubber-Cm2kH8op.js +0 -1
  46. package/chunks/DocumentScrubber-bJoKijol.js +0 -1
  47. package/chunks/DocumentStylesheet-DreoD7sD.js +0 -7
  48. package/chunks/DocxConverter-BcVG-p5K.js +0 -13
  49. package/chunks/DocxConverter-D2bO5RE-.js +0 -1125
  50. package/chunks/DocxConverter-haCfRuWb.js +0 -13
  51. package/chunks/DocxGraft-BRKh4mHQ.js +0 -1
  52. package/chunks/DocxGraft-BxSQtl12.js +0 -7
  53. package/chunks/DocxGraft-C9MBQCnf.js +0 -1
  54. package/chunks/FileImporter-CszqRfVU.js +0 -1
  55. package/chunks/FileImporter-DObFoCCn.js +0 -1
  56. package/chunks/HorizontalRuleOrnaments-gmUZ3R7Q.js +0 -3
  57. package/chunks/HtmlConverter-DwXB4IDh.js +0 -267
  58. package/chunks/ListNumbering-Qlu6AuRZ.js +0 -23
  59. package/chunks/MarkdownConverter-CUC8GgsS.js +0 -57
  60. package/chunks/MathRenderer-DT6GyJXb.js +0 -68
  61. package/chunks/OdtConverter-7h9HHMpL.js +0 -125
  62. package/chunks/OdtConverter-Ct4qypJk.js +0 -6
  63. package/chunks/OdtConverter-DFl__sJc.js +0 -6
  64. package/chunks/OfficeImportShared-BY6FdZ8d.js +0 -1
  65. package/chunks/OfficeImportShared-BrZoDM0j.js +0 -30
  66. package/chunks/OfficeImportShared-Bvm-mOyj.js +0 -1
  67. package/chunks/ParagraphDiffAnalysis-DrmStvmz.js +0 -36
  68. package/chunks/PdfConverter-1wyvoT7X.js +0 -21
  69. package/chunks/PdfConverter-BAoEHILo.js +0 -21
  70. package/chunks/PdfConverter-CKEvFj11.js +0 -448
  71. package/chunks/PdfImportService-BhLPp5uG.js +0 -2
  72. package/chunks/PdfImportService-xbzrN__L.js +0 -2
  73. package/chunks/RtfConverter-Bxn-enp8.js +0 -15
  74. package/chunks/RtfConverter-LZPzBDSr.js +0 -15
  75. package/chunks/RtfConverter-_bacXqr1.js +0 -186
  76. package/chunks/TableBorders-CwnF3jvH.js +0 -30
  77. package/chunks/TableGrid-DbroRucl.js +0 -12
  78. package/chunks/TextFileDecoder--rsVs3NR.js +0 -9
  79. package/chunks/TxtConverter-C7FOwHpH.js +0 -14
  80. package/chunks/UnicodeUtils-CXtusU4g.js +0 -10
  81. package/chunks/XmlConverter-7oo8oeQB.js +0 -2
  82. package/chunks/XmlConverter-DGORHJcZ.js +0 -96
  83. package/chunks/XmlConverter-DeLHReK_.js +0 -2
  84. package/chunks/__vite-browser-external-l0sNRNKZ.js +0 -0
  85. package/chunks/_commonjsHelpers-DaMA6jEr.js +0 -2
  86. package/chunks/_revise-sdk-lazy-harfbuzz-CDWdjF9f.js +0 -1
  87. package/chunks/_revise-sdk-lazy-harfbuzz-X8gnYTZL.js +0 -1
  88. package/chunks/ar-ComXvtmh.js +0 -13
  89. package/chunks/backend-DecaBz-I.js +0 -490
  90. package/chunks/base64-sSPOzq-u.js +0 -198
  91. package/chunks/browser-module-CFmqfGkE.js +0 -1791
  92. package/chunks/browser-module-Dj5o3kuL.js +0 -3
  93. package/chunks/browser-module-UuM_O36W.js +0 -3
  94. package/chunks/bundle.min-DRpfgV69.js +0 -782
  95. package/chunks/capture-1btcWcPF.js +0 -9
  96. package/chunks/carrier-DQeng6yq.js +0 -6
  97. package/chunks/de-BkbpIKxx.js +0 -13
  98. package/chunks/es-CKkXujOF.js +0 -13
  99. package/chunks/fil-piIHMc8F.js +0 -13
  100. package/chunks/footnoteFlatten-DUQticYy.js +0 -6
  101. package/chunks/fr-DuA8qLje.js +0 -13
  102. package/chunks/graftExport-CYnStOdU.js +0 -82
  103. package/chunks/html2canvas.esm-CntiHiYW.js +0 -997
  104. package/chunks/index-2TBhRkX7.js +0 -387
  105. package/chunks/index-BWdRWxoH.js +0 -1807
  106. package/chunks/index-Bf14eTEW.js +0 -1096
  107. package/chunks/index-BwcX_r62.js +0 -387
  108. package/chunks/index.es-CI0QPo8w.js +0 -780
  109. package/chunks/index.es-CI7cDExj.js +0 -5
  110. package/chunks/index.es-DHpGt6Y5.js +0 -5
  111. package/chunks/ja-DgrSs555.js +0 -13
  112. package/chunks/jspdf.es.min--GshOuIm.js +0 -77
  113. package/chunks/jspdf.es.min-DU74zN8b.js +0 -1792
  114. package/chunks/jspdf.es.min-DurJZ1zW.js +0 -77
  115. package/chunks/jszip.min-CPW0h1Kx.js +0 -476
  116. package/chunks/katex-DWj8TvwO.js +0 -1462
  117. package/chunks/pdf-BLWDCiFF.js +0 -1828
  118. package/chunks/persistInlineDocumentImages-DQj2iaqg.js +0 -1
  119. package/chunks/pseudoLocale-BoYTjmiK.js +0 -1
  120. package/chunks/pseudoLocale-DG2NnZmz.js +0 -1
  121. package/chunks/purify.es-BwLardii.js +0 -107
  122. package/chunks/serverDocumentSession-CJ1EH3Tp.js +0 -15
  123. package/chunks/signatures-Bwt_OGik.js +0 -17
  124. package/chunks/suggestionAuthorship-B-IuLQlE.js +0 -1
  125. package/chunks/tree-sitter-D6zWWUMP.js +0 -4
  126. package/chunks/wasmInline.generated-CBYFkdSM.js +0 -1
  127. package/chunks/web-tree-sitter-BXGZGnNj.js +0 -2
  128. package/chunks/zh-9OF3SWWO.js +0 -13
  129. package/full.js +0 -1
  130. package/root.d.ts +0 -5
  131. package/root.js +0 -2
  132. package/serverToolContract.d.ts +0 -391
  133. package/serverToolInputs.generated.d.ts +0 -250
  134. package/style.css +0 -1
package/index.js CHANGED
@@ -1 +1,31 @@
1
- import{cl as s,ck as a,cn as e,cq as r,co as o,cm as c,cn as E,cr as t,cp as l}from"./chunks/index-BwcX_r62.js";export{s as REVISE_SDK_BUILD,a as REVISE_SDK_VERSION,e as ReviseEditor,r as ReviseRoleError,o as ReviseToolError,c as createEmptyDocx,E as default,t as rolePolicy,l as setAssetBaseUrl};
1
+ // revise: MIT License. https://revise.io/developer/docs
2
+ import {
3
+ ReviseDocument,
4
+ agentTools,
5
+ compare,
6
+ convert,
7
+ formatForPath,
8
+ formatToolResult,
9
+ seedYDoc
10
+ } from "./chunks/chunk-ZLQVPMBN.js";
11
+ import {
12
+ catPart,
13
+ listParts,
14
+ patchPackage
15
+ } from "./chunks/chunk-U5X47PZ6.js";
16
+ import {
17
+ ReviseError
18
+ } from "./chunks/chunk-U6YKQBKL.js";
19
+ export {
20
+ ReviseDocument,
21
+ ReviseError,
22
+ agentTools,
23
+ catPart,
24
+ compare,
25
+ convert,
26
+ formatForPath,
27
+ formatToolResult,
28
+ listParts,
29
+ patchPackage,
30
+ seedYDoc
31
+ };
@@ -0,0 +1,19 @@
1
+ /** @deprecated The Revise editor moved to @reviseio/editor. Install it (npm i @reviseio/editor) and change imports of revise/editor to @reviseio/editor. See https://revise.io/developer/docs/editor-sdk/installation#migrate-from-revise-2x */
2
+ declare const moved: never;
3
+ export default moved;
4
+ /** @deprecated The Revise editor moved to @reviseio/editor. Install it (npm i @reviseio/editor) and change imports of revise/editor to @reviseio/editor. See https://revise.io/developer/docs/editor-sdk/installation#migrate-from-revise-2x */
5
+ export declare const ReviseToolError: never;
6
+ /** @deprecated The Revise editor moved to @reviseio/editor. Install it (npm i @reviseio/editor) and change imports of revise/editor to @reviseio/editor. See https://revise.io/developer/docs/editor-sdk/installation#migrate-from-revise-2x */
7
+ export declare const REVISE_SDK_VERSION: never;
8
+ /** @deprecated The Revise editor moved to @reviseio/editor. Install it (npm i @reviseio/editor) and change imports of revise/editor to @reviseio/editor. See https://revise.io/developer/docs/editor-sdk/installation#migrate-from-revise-2x */
9
+ export declare const REVISE_SDK_BUILD: never;
10
+ /** @deprecated The Revise editor moved to @reviseio/editor. Install it (npm i @reviseio/editor) and change imports of revise/editor to @reviseio/editor. See https://revise.io/developer/docs/editor-sdk/installation#migrate-from-revise-2x */
11
+ export declare const createEmptyDocx: never;
12
+ /** @deprecated The Revise editor moved to @reviseio/editor. Install it (npm i @reviseio/editor) and change imports of revise/editor to @reviseio/editor. See https://revise.io/developer/docs/editor-sdk/installation#migrate-from-revise-2x */
13
+ export declare const setAssetBaseUrl: never;
14
+ /** @deprecated The Revise editor moved to @reviseio/editor. Install it (npm i @reviseio/editor) and change imports of revise/editor to @reviseio/editor. See https://revise.io/developer/docs/editor-sdk/installation#migrate-from-revise-2x */
15
+ export declare const rolePolicy: never;
16
+ /** @deprecated The Revise editor moved to @reviseio/editor. Install it (npm i @reviseio/editor) and change imports of revise/editor to @reviseio/editor. See https://revise.io/developer/docs/editor-sdk/installation#migrate-from-revise-2x */
17
+ export declare const ReviseRoleError: never;
18
+ /** @deprecated The Revise editor moved to @reviseio/editor. Install it (npm i @reviseio/editor) and change imports of revise/editor to @reviseio/editor. See https://revise.io/developer/docs/editor-sdk/installation#migrate-from-revise-2x */
19
+ export declare const ReviseEditor: never;
@@ -0,0 +1,16 @@
1
+ // Generated from the export list of revise@2.2.0 (frozen). revise 2.x was
2
+ // the Revise editor; these names exist only so that 2.x import statements
3
+ // link and reach the message below instead of an opaque linking error.
4
+ throw new Error(
5
+ "The Revise editor moved to @reviseio/editor. Install it (npm i @reviseio/editor) and change imports of revise/editor to @reviseio/editor. See https://revise.io/developer/docs/editor-sdk/installation#migrate-from-revise-2x",
6
+ );
7
+
8
+ export default undefined;
9
+ export const ReviseToolError = undefined;
10
+ export const REVISE_SDK_VERSION = undefined;
11
+ export const REVISE_SDK_BUILD = undefined;
12
+ export const createEmptyDocx = undefined;
13
+ export const setAssetBaseUrl = undefined;
14
+ export const rolePolicy = undefined;
15
+ export const ReviseRoleError = undefined;
16
+ export const ReviseEditor = undefined;
@@ -0,0 +1,37 @@
1
+ /** @deprecated revise/server is gone. Server-side work in revise 3 goes through ReviseDocument (open, fromYDoc, tools, export) and seedYDoc, from the revise package root. See https://revise.io/developer/docs/editor-sdk/installation#migrate-from-revise-2x */
2
+ /** @deprecated revise/server is gone. Server-side work in revise 3 goes through ReviseDocument (open, fromYDoc, tools, export) and seedYDoc, from the revise package root. See https://revise.io/developer/docs/editor-sdk/installation#migrate-from-revise-2x */
3
+ export declare const RESERVED_DOCUMENT_KEYS: never;
4
+ /** @deprecated revise/server is gone. Server-side work in revise 3 goes through ReviseDocument (open, fromYDoc, tools, export) and seedYDoc, from the revise package root. See https://revise.io/developer/docs/editor-sdk/installation#migrate-from-revise-2x */
5
+ export declare const createReviseYDoc: never;
6
+ /** @deprecated revise/server is gone. Server-side work in revise 3 goes through ReviseDocument (open, fromYDoc, tools, export) and seedYDoc, from the revise package root. See https://revise.io/developer/docs/editor-sdk/installation#migrate-from-revise-2x */
7
+ export declare const assertUsableSharedDocument: never;
8
+ /** @deprecated revise/server is gone. Server-side work in revise 3 goes through ReviseDocument (open, fromYDoc, tools, export) and seedYDoc, from the revise package root. See https://revise.io/developer/docs/editor-sdk/installation#migrate-from-revise-2x */
9
+ export declare const installDomShims: never;
10
+ /** @deprecated revise/server is gone. Server-side work in revise 3 goes through ReviseDocument (open, fromYDoc, tools, export) and seedYDoc, from the revise package root. See https://revise.io/developer/docs/editor-sdk/installation#migrate-from-revise-2x */
11
+ export declare const parseDocument: never;
12
+ /** @deprecated revise/server is gone. Server-side work in revise 3 goes through ReviseDocument (open, fromYDoc, tools, export) and seedYDoc, from the revise package root. See https://revise.io/developer/docs/editor-sdk/installation#migrate-from-revise-2x */
13
+ export declare const documentToDocx: never;
14
+ /** @deprecated revise/server is gone. Server-side work in revise 3 goes through ReviseDocument (open, fromYDoc, tools, export) and seedYDoc, from the revise package root. See https://revise.io/developer/docs/editor-sdk/installation#migrate-from-revise-2x */
15
+ export declare const fileToYDoc: never;
16
+ /** @deprecated revise/server is gone. Server-side work in revise 3 goes through ReviseDocument (open, fromYDoc, tools, export) and seedYDoc, from the revise package root. See https://revise.io/developer/docs/editor-sdk/installation#migrate-from-revise-2x */
17
+ export declare const seedYDocFromFile: never;
18
+ /** @deprecated revise/server is gone. Server-side work in revise 3 goes through ReviseDocument (open, fromYDoc, tools, export) and seedYDoc, from the revise package root. See https://revise.io/developer/docs/editor-sdk/installation#migrate-from-revise-2x */
19
+ export declare const repairSeedRace: never;
20
+ /** @deprecated revise/server is gone. Server-side work in revise 3 goes through ReviseDocument (open, fromYDoc, tools, export) and seedYDoc, from the revise package root. See https://revise.io/developer/docs/editor-sdk/installation#migrate-from-revise-2x */
21
+ export declare const ydocToDocument: never;
22
+ /** @deprecated revise/server is gone. Server-side work in revise 3 goes through ReviseDocument (open, fromYDoc, tools, export) and seedYDoc, from the revise package root. See https://revise.io/developer/docs/editor-sdk/installation#migrate-from-revise-2x */
23
+ export declare const ydocToDocx: never;
24
+ /** @deprecated revise/server is gone. Server-side work in revise 3 goes through ReviseDocument (open, fromYDoc, tools, export) and seedYDoc, from the revise package root. See https://revise.io/developer/docs/editor-sdk/installation#migrate-from-revise-2x */
25
+ export declare const exportDocument: never;
26
+ /** @deprecated revise/server is gone. Server-side work in revise 3 goes through ReviseDocument (open, fromYDoc, tools, export) and seedYDoc, from the revise package root. See https://revise.io/developer/docs/editor-sdk/installation#migrate-from-revise-2x */
27
+ export declare const ydocSourceFidelity: never;
28
+ /** @deprecated revise/server is gone. Server-side work in revise 3 goes through ReviseDocument (open, fromYDoc, tools, export) and seedYDoc, from the revise package root. See https://revise.io/developer/docs/editor-sdk/installation#migrate-from-revise-2x */
29
+ export declare const hasDocument: never;
30
+ /** @deprecated revise/server is gone. Server-side work in revise 3 goes through ReviseDocument (open, fromYDoc, tools, export) and seedYDoc, from the revise package root. See https://revise.io/developer/docs/editor-sdk/installation#migrate-from-revise-2x */
31
+ export declare const encodeYDoc: never;
32
+ /** @deprecated revise/server is gone. Server-side work in revise 3 goes through ReviseDocument (open, fromYDoc, tools, export) and seedYDoc, from the revise package root. See https://revise.io/developer/docs/editor-sdk/installation#migrate-from-revise-2x */
33
+ export declare const decodeYDoc: never;
34
+ /** @deprecated revise/server is gone. Server-side work in revise 3 goes through ReviseDocument (open, fromYDoc, tools, export) and seedYDoc, from the revise package root. See https://revise.io/developer/docs/editor-sdk/installation#migrate-from-revise-2x */
35
+ export declare const ReviseToolError: never;
36
+ /** @deprecated revise/server is gone. Server-side work in revise 3 goes through ReviseDocument (open, fromYDoc, tools, export) and seedYDoc, from the revise package root. See https://revise.io/developer/docs/editor-sdk/installation#migrate-from-revise-2x */
37
+ export declare const createServerDocumentSession: never;
@@ -0,0 +1,25 @@
1
+ // Generated from the export list of revise@2.2.0 (frozen). revise 2.x was
2
+ // the Revise editor; these names exist only so that 2.x import statements
3
+ // link and reach the message below instead of an opaque linking error.
4
+ throw new Error(
5
+ "revise/server is gone. Server-side work in revise 3 goes through ReviseDocument (open, fromYDoc, tools, export) and seedYDoc, from the revise package root. See https://revise.io/developer/docs/editor-sdk/installation#migrate-from-revise-2x",
6
+ );
7
+
8
+ export const RESERVED_DOCUMENT_KEYS = undefined;
9
+ export const createReviseYDoc = undefined;
10
+ export const assertUsableSharedDocument = undefined;
11
+ export const installDomShims = undefined;
12
+ export const parseDocument = undefined;
13
+ export const documentToDocx = undefined;
14
+ export const fileToYDoc = undefined;
15
+ export const seedYDocFromFile = undefined;
16
+ export const repairSeedRace = undefined;
17
+ export const ydocToDocument = undefined;
18
+ export const ydocToDocx = undefined;
19
+ export const exportDocument = undefined;
20
+ export const ydocSourceFidelity = undefined;
21
+ export const hasDocument = undefined;
22
+ export const encodeYDoc = undefined;
23
+ export const decodeYDoc = undefined;
24
+ export const ReviseToolError = undefined;
25
+ export const createServerDocumentSession = undefined;
@@ -0,0 +1,2 @@
1
+ /* The Revise editor moved to @reviseio/editor: import "@reviseio/editor/style.css".
2
+ From 3.0, `revise` is the CLI and TypeScript library. */
package/package.d.ts ADDED
@@ -0,0 +1,23 @@
1
+ /** Parts of a .docx file, from its bytes. */
2
+ export declare function listParts(bytes: Uint8Array): Promise<Array<{
3
+ path: string;
4
+ bytes: number;
5
+ }>>;
6
+ /** `catPart` returns at most this many matches. */
7
+ export declare const CAT_MATCH_LIMIT = 20;
8
+ export declare function catPart(bytes: Uint8Array, part: string, match?: string, limit?: number): Promise<string[]>;
9
+ export interface PatchRequest {
10
+ part: string;
11
+ find?: string;
12
+ replace?: string;
13
+ all?: boolean;
14
+ file?: string;
15
+ }
16
+ export interface PatchResult {
17
+ bytes: Uint8Array;
18
+ replacements: number;
19
+ /** The part feeds Revise's own view: the model re-learns the package on
20
+ * the next command that reads it. */
21
+ modelRead: boolean;
22
+ }
23
+ export declare function patchPackage(pkg: Uint8Array, request: PatchRequest, readFile: (path: string) => string): Promise<PatchResult>;
package/package.json CHANGED
@@ -1,99 +1,93 @@
1
1
  {
2
2
  "name": "revise",
3
- "version": "2.2.0",
4
- "description": "A word processor for React: DOCX in and out, real pagination, tracked changes, comments, collaboration, and agent tools. Free for evaluation, personal projects, and education.",
3
+ "version": "3.0.1",
4
+ "reviseBuild": "7ef88f310",
5
+ "description": "Read, edit, and redline Word documents from the command line or TypeScript, with tracked changes, comments, and tools for AI agents.",
5
6
  "keywords": [
6
7
  "docx",
7
8
  "word",
8
- "word-processor",
9
- "document-editor",
10
- "rich-text-editor",
11
- "react",
9
+ "cli",
12
10
  "tracked-changes",
13
11
  "redlines",
14
12
  "comments",
15
- "yjs",
13
+ "agent",
16
14
  "ai",
17
- "agent"
15
+ "mcp"
18
16
  ],
19
17
  "type": "module",
20
- "main": "./root.js",
21
- "module": "./root.js",
22
- "types": "./root.d.ts",
18
+ "main": "./index.js",
19
+ "module": "./index.js",
20
+ "types": "./index.d.ts",
21
+ "bin": {
22
+ "revise": "./cli.js"
23
+ },
23
24
  "exports": {
24
25
  ".": {
25
- "types": "./root.d.ts",
26
- "import": "./root.js"
27
- },
28
- "./editor": {
29
26
  "types": "./index.d.ts",
30
27
  "import": "./index.js"
31
28
  },
29
+ "./editor": {
30
+ "types": "./legacy/editor.d.ts",
31
+ "import": "./legacy/editor.js"
32
+ },
32
33
  "./editor/full": {
33
- "types": "./index.d.ts",
34
- "import": "./full.js"
34
+ "types": "./legacy/editor.d.ts",
35
+ "import": "./legacy/editor.js"
35
36
  },
36
37
  "./server": {
37
- "types": "./backend.d.ts",
38
- "import": "./backend.js"
38
+ "types": "./legacy/server.d.ts",
39
+ "import": "./legacy/server.js"
39
40
  },
40
- "./style.css": "./style.css",
41
+ "./style.css": "./legacy/style.css",
42
+ "./cli-output.schema.json": "./cli-output.schema.json",
41
43
  "./package.json": "./package.json"
42
44
  },
43
45
  "files": [
44
- "root.js",
45
- "root.d.ts",
46
46
  "index.js",
47
- "index.d.ts",
48
- "full.js",
49
- "backend.js",
50
- "backend.d.ts",
51
- "serverToolContract.d.ts",
52
- "serverToolInputs.generated.d.ts",
53
- "style.css",
47
+ "cli.js",
48
+ "legacy",
49
+ "cli-output.schema.json",
50
+ "*.d.ts",
54
51
  "chunks",
55
- "assets",
56
52
  "README.md",
57
53
  "CHANGELOG.md",
58
- "LICENSE",
59
- "THIRD-PARTY-NOTICES.md",
60
- "FONT-LICENSE-LIBERATION.txt",
61
- "FONT-LICENSE-NOTO-SANS-SC.txt",
62
- "FONT-LICENSE-NOTO-MULTILINGUAL.txt",
63
- "FONT-LICENSE-NOTO.txt",
64
- "FONT-LICENSE-HAN-EXT-B.txt",
65
- "FONT-LICENSE-SOURCE-SERIF-4.txt",
66
- "FONT-LICENSE-SOURCE-CODE-PRO.txt",
67
- "FONT-LICENSE-KATEX.txt"
68
- ],
69
- "sideEffects": [
70
- "*.css"
54
+ "LICENSE"
71
55
  ],
56
+ "sideEffects": false,
57
+ "dependencies": {
58
+ "@reviseio/engine": "3.0.1",
59
+ "jszip": "^3.10.1",
60
+ "yjs": "^13.6.27"
61
+ },
72
62
  "peerDependencies": {
73
- "react": ">=18",
74
- "react-dom": ">=18",
75
- "yjs": "^13.6.0",
76
- "y-protocols": "^1.0.6",
77
- "jsdom": ">=22"
63
+ "@napi-rs/canvas": ">=0.1.0",
64
+ "canvas": ">=2.11.0"
78
65
  },
79
66
  "peerDependenciesMeta": {
80
- "jsdom": {
67
+ "@napi-rs/canvas": {
68
+ "optional": true
69
+ },
70
+ "canvas": {
81
71
  "optional": true
82
72
  }
83
73
  },
84
74
  "engines": {
85
- "node": ">=18"
75
+ "node": ">=20"
76
+ },
77
+ "license": "MIT",
78
+ "homepage": "https://revise.io/developer/docs",
79
+ "repository": {
80
+ "type": "git",
81
+ "url": "git+https://github.com/reviseio/revise.git"
86
82
  },
87
- "license": "SEE LICENSE IN LICENSE",
88
- "homepage": "https://revise.io/sdk",
89
83
  "bugs": {
90
- "email": "sdk@revise.io",
91
- "url": "https://developer.revise.io/editor-sdk/support"
84
+ "url": "https://github.com/reviseio/revise/issues",
85
+ "email": "sdk@revise.io"
92
86
  },
93
87
  "publishConfig": {
94
88
  "access": "public"
95
89
  },
96
90
  "scripts": {
97
- "prepublishOnly": "node -e \"if(process.env.REVISE_SDK_VERIFIED_PUBLISH!=='1'){console.error('Refusing to publish: use npm run publish:sdk in frontend/, which audits the exact tarball first.');process.exit(1)}\""
91
+ "prepublishOnly": "node -e \"if(process.env.REVISE_SDK_VERIFIED_PUBLISH!=='1'){console.error('Refusing to publish: use the audited publish in frontend/ (verify-sdk-tarball.mjs --publish).');process.exit(1)}\""
98
92
  }
99
93
  }
package/render.d.ts ADDED
@@ -0,0 +1,27 @@
1
+ import type * as Y from "yjs";
2
+ export type RenderView = "tracked" | "accepted" | "original";
3
+ export interface RenderOptions {
4
+ /** First page, 1-based. Default 1. */
5
+ startPage?: number;
6
+ /** Pages in one image, 1-6. Default 1. */
7
+ pageCount?: number;
8
+ /** Tracked changes shown as marks (default), accepted, or before them. */
9
+ view?: RenderView;
10
+ /** Overlay layout boxes (margins, block bounds) for debugging. */
11
+ layout?: boolean;
12
+ /** "detailed" (default for one page) or "compact". */
13
+ quality?: "compact" | "detailed";
14
+ }
15
+ export interface RenderResult {
16
+ bytes: Uint8Array;
17
+ mimeType: string;
18
+ width: number;
19
+ height: number;
20
+ pages: number[];
21
+ totalPages: number;
22
+ placeholderImageCount: number;
23
+ failedImageCount: number;
24
+ description: string;
25
+ }
26
+ /** Lay out the document and draw the requested pages as one image. */
27
+ export declare function renderPages(ydoc: Y.Doc, documentId: string, options: RenderOptions): Promise<RenderResult>;
@@ -1,91 +0,0 @@
1
- This Font Software is licensed under the SIL Open Font License, Version 1.1.
2
- This license is copied below, and is also available with a FAQ at:
3
- http://scripts.sil.org/OFL
4
-
5
-
6
- -----------------------------------------------------------
7
- SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
8
- -----------------------------------------------------------
9
-
10
- PREAMBLE
11
- The goals of the Open Font License (OFL) are to stimulate worldwide
12
- development of collaborative font projects, to support the font creation
13
- efforts of academic and linguistic communities, and to provide a free and
14
- open framework in which fonts may be shared and improved in partnership
15
- with others.
16
-
17
- The OFL allows the licensed fonts to be used, studied, modified and
18
- redistributed freely as long as they are not sold by themselves. The
19
- fonts, including any derivative works, can be bundled, embedded,
20
- redistributed and/or sold with any software provided that any reserved
21
- names are not used by derivative works. The fonts and derivatives,
22
- however, cannot be released under any other type of license. The
23
- requirement for fonts to remain under this license does not apply
24
- to any document created using the fonts or their derivatives.
25
-
26
- DEFINITIONS
27
- "Font Software" refers to the set of files released by the Copyright
28
- Holder(s) under this license and clearly marked as such. This may
29
- include source files, build scripts and documentation.
30
-
31
- "Reserved Font Name" refers to any names specified as such after the
32
- copyright statement(s).
33
-
34
- "Original Version" refers to the collection of Font Software components as
35
- distributed by the Copyright Holder(s).
36
-
37
- "Modified Version" refers to any derivative made by adding to, deleting,
38
- or substituting -- in part or in whole -- any of the components of the
39
- Original Version, by changing formats or by porting the Font Software to a
40
- new environment.
41
-
42
- "Author" refers to any designer, engineer, programmer, technical
43
- writer or other person who contributed to the Font Software.
44
-
45
- PERMISSION & CONDITIONS
46
- Permission is hereby granted, free of charge, to any person obtaining
47
- a copy of the Font Software, to use, study, copy, merge, embed, modify,
48
- redistribute, and sell modified and unmodified copies of the Font
49
- Software, subject to the following conditions:
50
-
51
- 1) Neither the Font Software nor any of its individual components,
52
- in Original or Modified Versions, may be sold by itself.
53
-
54
- 2) Original or Modified Versions of the Font Software may be bundled,
55
- redistributed and/or sold with any software, provided that each copy
56
- contains the above copyright notice and this license. These can be
57
- included either as stand-alone text files, human-readable headers or
58
- in the appropriate machine-readable metadata fields within text or
59
- binary files as long as those fields can be easily viewed by the user.
60
-
61
- 3) No Modified Version of the Font Software may use the Reserved Font
62
- Name(s) unless explicit written permission is granted by the corresponding
63
- Copyright Holder. This restriction only applies to the primary font name as
64
- presented to the users.
65
-
66
- 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
67
- Software shall not be used to promote, endorse or advertise any
68
- Modified Version, except to acknowledge the contribution(s) of the
69
- Copyright Holder(s) and the Author(s) or with their explicit written
70
- permission.
71
-
72
- 5) The Font Software, modified or unmodified, in part or in whole,
73
- must be distributed entirely under this license, and must not be
74
- distributed under any other license. The requirement for fonts to
75
- remain under this license does not apply to any document created
76
- using the Font Software.
77
-
78
- TERMINATION
79
- This license becomes null and void if any of the above conditions are
80
- not met.
81
-
82
- DISCLAIMER
83
- THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
84
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
85
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
86
- OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
87
- COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
88
- INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
89
- DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
90
- FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
91
- OTHER DEALINGS IN THE FONT SOFTWARE.
@@ -1,95 +0,0 @@
1
- Copyright (c) 2009-2010 Design Science, Inc.
2
- Copyright (c) 2014-2018 Khan Academy
3
-
4
- This Font Software is licensed under the SIL Open Font License,
5
- Version 1.1.
6
-
7
- This license is copied below, and is also available with a FAQ at:
8
- http://scripts.sil.org/OFL
9
-
10
- -----------------------------------------------------------
11
- SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
12
- -----------------------------------------------------------
13
-
14
- PREAMBLE
15
- The goals of the Open Font License (OFL) are to stimulate worldwide
16
- development of collaborative font projects, to support the font
17
- creation efforts of academic and linguistic communities, and to
18
- provide a free and open framework in which fonts may be shared and
19
- improved in partnership with others.
20
-
21
- The OFL allows the licensed fonts to be used, studied, modified and
22
- redistributed freely as long as they are not sold by themselves. The
23
- fonts, including any derivative works, can be bundled, embedded,
24
- redistributed and/or sold with any software provided that any reserved
25
- names are not used by derivative works. The fonts and derivatives,
26
- however, cannot be released under any other type of license. The
27
- requirement for fonts to remain under this license does not apply to
28
- any document created using the fonts or their derivatives.
29
-
30
- DEFINITIONS
31
- "Font Software" refers to the set of files released by the Copyright
32
- Holder(s) under this license and clearly marked as such. This may
33
- include source files, build scripts and documentation.
34
-
35
- "Reserved Font Name" refers to any names specified as such after the
36
- copyright statement(s).
37
-
38
- "Original Version" refers to the collection of Font Software
39
- components as distributed by the Copyright Holder(s).
40
-
41
- "Modified Version" refers to any derivative made by adding to,
42
- deleting, or substituting -- in part or in whole -- any of the
43
- components of the Original Version, by changing formats or by porting
44
- the Font Software to a new environment.
45
-
46
- "Author" refers to any designer, engineer, programmer, technical
47
- writer or other person who contributed to the Font Software.
48
-
49
- PERMISSION & CONDITIONS
50
- Permission is hereby granted, free of charge, to any person obtaining
51
- a copy of the Font Software, to use, study, copy, merge, embed,
52
- modify, redistribute, and sell modified and unmodified copies of the
53
- Font Software, subject to the following conditions:
54
-
55
- 1) Neither the Font Software nor any of its individual components, in
56
- Original or Modified Versions, may be sold by itself.
57
-
58
- 2) Original or Modified Versions of the Font Software may be bundled,
59
- redistributed and/or sold with any software, provided that each copy
60
- contains the above copyright notice and this license. These can be
61
- included either as stand-alone text files, human-readable headers or
62
- in the appropriate machine-readable metadata fields within text or
63
- binary files as long as those fields can be easily viewed by the user.
64
-
65
- 3) No Modified Version of the Font Software may use the Reserved Font
66
- Name(s) unless explicit written permission is granted by the
67
- corresponding Copyright Holder. This restriction only applies to the
68
- primary font name as presented to the users.
69
-
70
- 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
71
- Software shall not be used to promote, endorse or advertise any
72
- Modified Version, except to acknowledge the contribution(s) of the
73
- Copyright Holder(s) and the Author(s) or with their explicit written
74
- permission.
75
-
76
- 5) The Font Software, modified or unmodified, in part or in whole,
77
- must be distributed entirely under this license, and must not be
78
- distributed under any other license. The requirement for fonts to
79
- remain under this license does not apply to any document created using
80
- the Font Software.
81
-
82
- TERMINATION
83
- This license becomes null and void if any of the above conditions are
84
- not met.
85
-
86
- DISCLAIMER
87
- THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
88
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
89
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
90
- OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
91
- COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
92
- INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
93
- DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
94
- FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
95
- OTHER DEALINGS IN THE FONT SOFTWARE.
@@ -1,102 +0,0 @@
1
- Digitized data copyright (c) 2010 Google Corporation
2
- with Reserved Font Arimo, Tinos and Cousine.
3
- Copyright (c) 2012 Red Hat, Inc.
4
- with Reserved Font Name Liberation.
5
-
6
- This Font Software is licensed under the SIL Open Font License,
7
- Version 1.1.
8
-
9
- This license is copied below, and is also available with a FAQ at:
10
- http://scripts.sil.org/OFL
11
-
12
- SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
13
-
14
- PREAMBLE The goals of the Open Font License (OFL) are to stimulate
15
- worldwide development of collaborative font projects, to support the font
16
- creation efforts of academic and linguistic communities, and to provide
17
- a free and open framework in which fonts may be shared and improved in
18
- partnership with others.
19
-
20
- The OFL allows the licensed fonts to be used, studied, modified and
21
- redistributed freely as long as they are not sold by themselves.
22
- The fonts, including any derivative works, can be bundled, embedded,
23
- redistributed and/or sold with any software provided that any reserved
24
- names are not used by derivative works. The fonts and derivatives,
25
- however, cannot be released under any other type of license. The
26
- requirement for fonts to remain under this license does not apply to
27
- any document created using the fonts or their derivatives.
28
-
29
-
30
-
31
- DEFINITIONS
32
- "Font Software" refers to the set of files released by the Copyright
33
- Holder(s) under this license and clearly marked as such.
34
- This may include source files, build scripts and documentation.
35
-
36
- "Reserved Font Name" refers to any names specified as such after the
37
- copyright statement(s).
38
-
39
- "Original Version" refers to the collection of Font Software components
40
- as distributed by the Copyright Holder(s).
41
-
42
- "Modified Version" refers to any derivative made by adding to, deleting,
43
- or substituting ? in part or in whole ?
44
- any of the components of the Original Version, by changing formats or
45
- by porting the Font Software to a new environment.
46
-
47
- "Author" refers to any designer, engineer, programmer, technical writer
48
- or other person who contributed to the Font Software.
49
-
50
-
51
- PERMISSION & CONDITIONS
52
-
53
- Permission is hereby granted, free of charge, to any person obtaining a
54
- copy of the Font Software, to use, study, copy, merge, embed, modify,
55
- redistribute, and sell modified and unmodified copies of the Font
56
- Software, subject to the following conditions:
57
-
58
- 1) Neither the Font Software nor any of its individual components,in
59
- Original or Modified Versions, may be sold by itself.
60
-
61
- 2) Original or Modified Versions of the Font Software may be bundled,
62
- redistributed and/or sold with any software, provided that each copy
63
- contains the above copyright notice and this license. These can be
64
- included either as stand-alone text files, human-readable headers or
65
- in the appropriate machine-readable metadata fields within text or
66
- binary files as long as those fields can be easily viewed by the user.
67
-
68
- 3) No Modified Version of the Font Software may use the Reserved Font
69
- Name(s) unless explicit written permission is granted by the
70
- corresponding Copyright Holder. This restriction only applies to the
71
- primary font name as presented to the users.
72
-
73
- 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
74
- Software shall not be used to promote, endorse or advertise any
75
- Modified Version, except to acknowledge the contribution(s) of the
76
- Copyright Holder(s) and the Author(s) or with their explicit written
77
- permission.
78
-
79
- 5) The Font Software, modified or unmodified, in part or in whole, must
80
- be distributed entirely under this license, and must not be distributed
81
- under any other license. The requirement for fonts to remain under
82
- this license does not apply to any document created using the Font
83
- Software.
84
-
85
-
86
-
87
- TERMINATION
88
- This license becomes null and void if any of the above conditions are not met.
89
-
90
-
91
-
92
- DISCLAIMER
93
- THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
94
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
95
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
96
- OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
97
- COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
98
- INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
99
- DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
100
- FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER
101
- DEALINGS IN THE FONT SOFTWARE.
102
-