@eigenpal/docx-editor-agents 0.0.28
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/LICENSE +672 -0
- package/README.md +41 -0
- package/dist/bridge.cjs +10 -0
- package/dist/bridge.cjs.map +1 -0
- package/dist/bridge.d.cts +11 -0
- package/dist/bridge.d.ts +11 -0
- package/dist/bridge.js +8 -0
- package/dist/bridge.js.map +1 -0
- package/dist/index.cjs +901 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +238 -0
- package/dist/index.d.ts +238 -0
- package/dist/index.js +896 -0
- package/dist/index.js.map +1 -0
- package/package.json +59 -0
package/README.md
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# @eigenpal/docx-editor-agents
|
|
2
|
+
|
|
3
|
+
[](./LICENSE)
|
|
4
|
+
|
|
5
|
+
Word-like API for AI document review. Add comments, suggest replacements, accept/reject tracked changes — all headless, no DOM required.
|
|
6
|
+
|
|
7
|
+
## Install
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npm install @eigenpal/docx-editor-agents
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Usage
|
|
14
|
+
|
|
15
|
+
```ts
|
|
16
|
+
import { DocxReviewer } from '@eigenpal/docx-editor-agents';
|
|
17
|
+
|
|
18
|
+
const reviewer = await DocxReviewer.fromBuffer(buffer, 'AI Reviewer');
|
|
19
|
+
|
|
20
|
+
// Read
|
|
21
|
+
const text = reviewer.getContentAsText();
|
|
22
|
+
|
|
23
|
+
// Comment
|
|
24
|
+
reviewer.addComment(5, 'This cap seems too low.');
|
|
25
|
+
|
|
26
|
+
// Replace (tracked change)
|
|
27
|
+
reviewer.replace(5, '$50k', '$500k');
|
|
28
|
+
|
|
29
|
+
// Batch from LLM response
|
|
30
|
+
reviewer.applyReview({
|
|
31
|
+
comments: [{ paragraphIndex: 5, text: 'Too low.' }],
|
|
32
|
+
proposals: [{ paragraphIndex: 5, search: '$50k', replaceWith: '$500k' }],
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
// Export
|
|
36
|
+
const output = await reviewer.toBuffer();
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## License
|
|
40
|
+
|
|
41
|
+
[AGPL-3.0](./LICENSE) — free to use and modify, but you must open-source your code. For commercial licensing without AGPL obligations, contact [founders@eigenpal.com](mailto:founders@eigenpal.com).
|
package/dist/bridge.cjs
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
// src/bridge.ts
|
|
4
|
+
function createReviewBridge(_editorRef) {
|
|
5
|
+
throw new Error("createReviewBridge is not yet implemented");
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
exports.createReviewBridge = createReviewBridge;
|
|
9
|
+
//# sourceMappingURL=bridge.cjs.map
|
|
10
|
+
//# sourceMappingURL=bridge.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/bridge.ts"],"names":[],"mappings":";;;AASO,SAAS,mBAAmB,UAAA,EAA8C;AAC/E,EAAA,MAAM,IAAI,MAAM,2CAA2C,CAAA;AAC7D","file":"bridge.cjs","sourcesContent":["/**\n * Editor ref bridge — optional client-side integration.\n *\n * Separate entry point: import from '@eigenpal/docx-editor-agents/bridge'\n * This file may import React/ProseMirror — NOT included in the main headless bundle.\n *\n * TODO: Implement in task 9.1\n */\n\nexport function createReviewBridge(_editorRef: unknown): Record<string, unknown> {\n throw new Error('createReviewBridge is not yet implemented');\n}\n"]}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Editor ref bridge — optional client-side integration.
|
|
3
|
+
*
|
|
4
|
+
* Separate entry point: import from '@eigenpal/docx-editor-agents/bridge'
|
|
5
|
+
* This file may import React/ProseMirror — NOT included in the main headless bundle.
|
|
6
|
+
*
|
|
7
|
+
* TODO: Implement in task 9.1
|
|
8
|
+
*/
|
|
9
|
+
declare function createReviewBridge(_editorRef: unknown): Record<string, unknown>;
|
|
10
|
+
|
|
11
|
+
export { createReviewBridge };
|
package/dist/bridge.d.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Editor ref bridge — optional client-side integration.
|
|
3
|
+
*
|
|
4
|
+
* Separate entry point: import from '@eigenpal/docx-editor-agents/bridge'
|
|
5
|
+
* This file may import React/ProseMirror — NOT included in the main headless bundle.
|
|
6
|
+
*
|
|
7
|
+
* TODO: Implement in task 9.1
|
|
8
|
+
*/
|
|
9
|
+
declare function createReviewBridge(_editorRef: unknown): Record<string, unknown>;
|
|
10
|
+
|
|
11
|
+
export { createReviewBridge };
|
package/dist/bridge.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/bridge.ts"],"names":[],"mappings":";AASO,SAAS,mBAAmB,UAAA,EAA8C;AAC/E,EAAA,MAAM,IAAI,MAAM,2CAA2C,CAAA;AAC7D","file":"bridge.js","sourcesContent":["/**\n * Editor ref bridge — optional client-side integration.\n *\n * Separate entry point: import from '@eigenpal/docx-editor-agents/bridge'\n * This file may import React/ProseMirror — NOT included in the main headless bundle.\n *\n * TODO: Implement in task 9.1\n */\n\nexport function createReviewBridge(_editorRef: unknown): Record<string, unknown> {\n throw new Error('createReviewBridge is not yet implemented');\n}\n"]}
|