docx-diff-editor 1.0.3 → 1.0.5
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/dist/index.d.mts +3 -22
- package/dist/index.d.ts +3 -22
- package/dist/index.js +209 -222
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +210 -221
- package/dist/index.mjs.map +1 -1
- package/dist/styles.css +5419 -0
- package/package.json +2 -2
package/dist/index.d.mts
CHANGED
|
@@ -22,13 +22,6 @@ type ProseMirrorNode = any;
|
|
|
22
22
|
* - ProseMirrorJSON: Direct JSON structure
|
|
23
23
|
*/
|
|
24
24
|
type DocxContent = File | ProseMirrorJSON | string;
|
|
25
|
-
/**
|
|
26
|
-
* Result of content resolution (converting any input to JSON)
|
|
27
|
-
*/
|
|
28
|
-
interface ResolvedContent {
|
|
29
|
-
json: ProseMirrorJSON;
|
|
30
|
-
type: 'file' | 'html' | 'json';
|
|
31
|
-
}
|
|
32
25
|
/**
|
|
33
26
|
* A segment from the diff algorithm
|
|
34
27
|
*/
|
|
@@ -176,11 +169,11 @@ declare const DocxDiffEditor: react.ForwardRefExoticComponent<DocxDiffEditorProp
|
|
|
176
169
|
|
|
177
170
|
/**
|
|
178
171
|
* Content Resolver Service
|
|
179
|
-
* Detects content type and
|
|
172
|
+
* Detects content type and parses DOCX files to ProseMirror JSON.
|
|
180
173
|
*
|
|
181
174
|
* Supports three input formats:
|
|
182
175
|
* - File: DOCX file parsed by SuperDoc
|
|
183
|
-
* - string: HTML content
|
|
176
|
+
* - string: HTML content (handled directly by SuperDoc in the component)
|
|
184
177
|
* - object: Direct ProseMirror JSON (passed through)
|
|
185
178
|
*/
|
|
186
179
|
|
|
@@ -197,18 +190,6 @@ declare function isProseMirrorJSON(content: unknown): boolean;
|
|
|
197
190
|
* Parse a DOCX File into ProseMirror JSON using a hidden SuperDoc instance.
|
|
198
191
|
*/
|
|
199
192
|
declare function parseDocxFile(file: File, SuperDoc: SuperDocConstructor): Promise<ProseMirrorJSON>;
|
|
200
|
-
/**
|
|
201
|
-
* Parse HTML content into ProseMirror JSON using SuperDoc's html option.
|
|
202
|
-
*/
|
|
203
|
-
declare function parseHtmlContent(html: string, SuperDoc: SuperDocConstructor, templateDocx?: File): Promise<ProseMirrorJSON>;
|
|
204
|
-
/**
|
|
205
|
-
* Resolve any content type to ProseMirror JSON.
|
|
206
|
-
*
|
|
207
|
-
* @param content - File, HTML string, or ProseMirror JSON
|
|
208
|
-
* @param SuperDoc - The SuperDoc constructor (passed in to avoid bundling)
|
|
209
|
-
* @param templateDocx - Optional template DOCX for HTML content
|
|
210
|
-
*/
|
|
211
|
-
declare function resolveContent(content: DocxContent, SuperDoc: SuperDocConstructor, templateDocx?: File): Promise<ResolvedContent>;
|
|
212
193
|
|
|
213
194
|
/**
|
|
214
195
|
* Document Differ Service
|
|
@@ -322,4 +303,4 @@ declare function getBlankTemplateBlob(): Blob;
|
|
|
322
303
|
*/
|
|
323
304
|
declare function isValidDocxFile(file: File): boolean;
|
|
324
305
|
|
|
325
|
-
export { CSS_PREFIX, type ChangeLocation, type ComparisonResult, DEFAULT_AUTHOR, DEFAULT_SUPERDOC_USER, type DiffResult, type DiffSegment, type DocxContent, DocxDiffEditor, type DocxDiffEditorProps, type DocxDiffEditorRef, type EnrichedChange, type FormatChange, type FormatDetails, type ProseMirrorJSON, type ProseMirrorMark, type ProseMirrorNode, type TrackChangeAuthor, createTrackDeleteMark, createTrackFormatMark, createTrackInsertMark, DocxDiffEditor as default, detectContentType, diffDocuments, extractEnrichedChanges, getBlankTemplateBlob, getBlankTemplateFile, isProseMirrorJSON, isValidDocxFile, mergeDocuments, parseDocxFile
|
|
306
|
+
export { CSS_PREFIX, type ChangeLocation, type ComparisonResult, DEFAULT_AUTHOR, DEFAULT_SUPERDOC_USER, type DiffResult, type DiffSegment, type DocxContent, DocxDiffEditor, type DocxDiffEditorProps, type DocxDiffEditorRef, type EnrichedChange, type FormatChange, type FormatDetails, type ProseMirrorJSON, type ProseMirrorMark, type ProseMirrorNode, type TrackChangeAuthor, createTrackDeleteMark, createTrackFormatMark, createTrackInsertMark, DocxDiffEditor as default, detectContentType, diffDocuments, extractEnrichedChanges, getBlankTemplateBlob, getBlankTemplateFile, isProseMirrorJSON, isValidDocxFile, mergeDocuments, parseDocxFile };
|
package/dist/index.d.ts
CHANGED
|
@@ -22,13 +22,6 @@ type ProseMirrorNode = any;
|
|
|
22
22
|
* - ProseMirrorJSON: Direct JSON structure
|
|
23
23
|
*/
|
|
24
24
|
type DocxContent = File | ProseMirrorJSON | string;
|
|
25
|
-
/**
|
|
26
|
-
* Result of content resolution (converting any input to JSON)
|
|
27
|
-
*/
|
|
28
|
-
interface ResolvedContent {
|
|
29
|
-
json: ProseMirrorJSON;
|
|
30
|
-
type: 'file' | 'html' | 'json';
|
|
31
|
-
}
|
|
32
25
|
/**
|
|
33
26
|
* A segment from the diff algorithm
|
|
34
27
|
*/
|
|
@@ -176,11 +169,11 @@ declare const DocxDiffEditor: react.ForwardRefExoticComponent<DocxDiffEditorProp
|
|
|
176
169
|
|
|
177
170
|
/**
|
|
178
171
|
* Content Resolver Service
|
|
179
|
-
* Detects content type and
|
|
172
|
+
* Detects content type and parses DOCX files to ProseMirror JSON.
|
|
180
173
|
*
|
|
181
174
|
* Supports three input formats:
|
|
182
175
|
* - File: DOCX file parsed by SuperDoc
|
|
183
|
-
* - string: HTML content
|
|
176
|
+
* - string: HTML content (handled directly by SuperDoc in the component)
|
|
184
177
|
* - object: Direct ProseMirror JSON (passed through)
|
|
185
178
|
*/
|
|
186
179
|
|
|
@@ -197,18 +190,6 @@ declare function isProseMirrorJSON(content: unknown): boolean;
|
|
|
197
190
|
* Parse a DOCX File into ProseMirror JSON using a hidden SuperDoc instance.
|
|
198
191
|
*/
|
|
199
192
|
declare function parseDocxFile(file: File, SuperDoc: SuperDocConstructor): Promise<ProseMirrorJSON>;
|
|
200
|
-
/**
|
|
201
|
-
* Parse HTML content into ProseMirror JSON using SuperDoc's html option.
|
|
202
|
-
*/
|
|
203
|
-
declare function parseHtmlContent(html: string, SuperDoc: SuperDocConstructor, templateDocx?: File): Promise<ProseMirrorJSON>;
|
|
204
|
-
/**
|
|
205
|
-
* Resolve any content type to ProseMirror JSON.
|
|
206
|
-
*
|
|
207
|
-
* @param content - File, HTML string, or ProseMirror JSON
|
|
208
|
-
* @param SuperDoc - The SuperDoc constructor (passed in to avoid bundling)
|
|
209
|
-
* @param templateDocx - Optional template DOCX for HTML content
|
|
210
|
-
*/
|
|
211
|
-
declare function resolveContent(content: DocxContent, SuperDoc: SuperDocConstructor, templateDocx?: File): Promise<ResolvedContent>;
|
|
212
193
|
|
|
213
194
|
/**
|
|
214
195
|
* Document Differ Service
|
|
@@ -322,4 +303,4 @@ declare function getBlankTemplateBlob(): Blob;
|
|
|
322
303
|
*/
|
|
323
304
|
declare function isValidDocxFile(file: File): boolean;
|
|
324
305
|
|
|
325
|
-
export { CSS_PREFIX, type ChangeLocation, type ComparisonResult, DEFAULT_AUTHOR, DEFAULT_SUPERDOC_USER, type DiffResult, type DiffSegment, type DocxContent, DocxDiffEditor, type DocxDiffEditorProps, type DocxDiffEditorRef, type EnrichedChange, type FormatChange, type FormatDetails, type ProseMirrorJSON, type ProseMirrorMark, type ProseMirrorNode, type TrackChangeAuthor, createTrackDeleteMark, createTrackFormatMark, createTrackInsertMark, DocxDiffEditor as default, detectContentType, diffDocuments, extractEnrichedChanges, getBlankTemplateBlob, getBlankTemplateFile, isProseMirrorJSON, isValidDocxFile, mergeDocuments, parseDocxFile
|
|
306
|
+
export { CSS_PREFIX, type ChangeLocation, type ComparisonResult, DEFAULT_AUTHOR, DEFAULT_SUPERDOC_USER, type DiffResult, type DiffSegment, type DocxContent, DocxDiffEditor, type DocxDiffEditorProps, type DocxDiffEditorRef, type EnrichedChange, type FormatChange, type FormatDetails, type ProseMirrorJSON, type ProseMirrorMark, type ProseMirrorNode, type TrackChangeAuthor, createTrackDeleteMark, createTrackFormatMark, createTrackInsertMark, DocxDiffEditor as default, detectContentType, diffDocuments, extractEnrichedChanges, getBlankTemplateBlob, getBlankTemplateFile, isProseMirrorJSON, isValidDocxFile, mergeDocuments, parseDocxFile };
|