@coco-vexel/coco-office-editor 1.0.5 → 1.0.6
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.cjs +45 -38
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +45 -38
- package/dist/word.cjs +31 -24
- package/dist/word.d.cts +21 -1
- package/dist/word.d.ts +21 -1
- package/dist/word.js +31 -24
- package/package.json +3 -3
package/dist/word.d.cts
CHANGED
|
@@ -64,6 +64,26 @@ declare function resolveRunStyle(format: EditorRunFormat | undefined | null): Re
|
|
|
64
64
|
declare function resolveTableCellStyle(cell: Pick<EditorTableCellView, 'margin' | 'borders' | 'shading' | 'verticalAlignment' | 'noWrap' | 'width'>): ResolvedStyle;
|
|
65
65
|
declare function colorToCss(color: string | undefined): string | null;
|
|
66
66
|
|
|
67
|
+
interface NormalizedDocumentHtmlPageOptions {
|
|
68
|
+
/** Zero-based top-level block offset. */
|
|
69
|
+
startBlock?: number;
|
|
70
|
+
/** Approximate serialized HTML budget. A block is never split. */
|
|
71
|
+
maxChars?: number;
|
|
72
|
+
}
|
|
73
|
+
interface NormalizedDocumentHtmlPage {
|
|
74
|
+
html: string;
|
|
75
|
+
/** Zero-based block offset for the next page. Missing means end of document. */
|
|
76
|
+
nextBlock?: number;
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Serialize an editor view into compact, semantic HTML for model inspection.
|
|
80
|
+
*
|
|
81
|
+
* The projection intentionally omits Word style ids. Effective formatting has
|
|
82
|
+
* already been resolved by the editor extractor and is emitted as inline CSS.
|
|
83
|
+
* Stable paragraph/table ids remain available for later document operations.
|
|
84
|
+
*/
|
|
85
|
+
declare function renderNormalizedDocumentHtmlPage(view: EditorDocumentView, options?: NormalizedDocumentHtmlPageOptions): NormalizedDocumentHtmlPage;
|
|
86
|
+
|
|
67
87
|
declare const NATIVE_BLOCK_CLIPBOARD_TYPE = "application/x-coco-word-blocks+json";
|
|
68
88
|
interface NativeClipboardRun {
|
|
69
89
|
from: number;
|
|
@@ -82,4 +102,4 @@ declare function serializeNativeBlockClipboard(blocks: readonly NativeWordBlockN
|
|
|
82
102
|
declare function parseNativeBlockClipboard(value: string): NativeWordBlockNode[] | null;
|
|
83
103
|
declare function nativeBlockClipboardText(blocks: readonly NativeWordBlockNode[]): string;
|
|
84
104
|
|
|
85
|
-
export { EditorDocumentView, EditorHyperlink, EditorParagraphFormat, EditorRunFormat, EditorTableCellView, NATIVE_BLOCK_CLIPBOARD_TYPE, type NativeClipboardParagraph, type NativeClipboardRun, NativeWordBlockNode, type NativeWordCoverage, NativeWordDocument, NativeWordListType, NativeWordParagraphNode, type ResolvedStyle, type WordDocumentLike, type WordEditorCoverage, buildWordEditorView, buildWordEditorViewFromDocx, buildWordEditorViewFromFlatOpc, buildWordEditorViewFromPackage, collectNativeParagraphs, colorToCss, nativeBlockClipboardText, parseNativeBlockClipboard, parseNativeClipboardHtml, resolveParagraphStyle, resolveRunStyle, resolveTableCellStyle, serializeNativeBlockClipboard, serializeNativeClipboardHtml, summarizeEditorCoverage, summarizeNativeCoverage };
|
|
105
|
+
export { EditorDocumentView, EditorHyperlink, EditorParagraphFormat, EditorRunFormat, EditorTableCellView, NATIVE_BLOCK_CLIPBOARD_TYPE, type NativeClipboardParagraph, type NativeClipboardRun, NativeWordBlockNode, type NativeWordCoverage, NativeWordDocument, NativeWordListType, NativeWordParagraphNode, type NormalizedDocumentHtmlPage, type NormalizedDocumentHtmlPageOptions, type ResolvedStyle, type WordDocumentLike, type WordEditorCoverage, buildWordEditorView, buildWordEditorViewFromDocx, buildWordEditorViewFromFlatOpc, buildWordEditorViewFromPackage, collectNativeParagraphs, colorToCss, nativeBlockClipboardText, parseNativeBlockClipboard, parseNativeClipboardHtml, renderNormalizedDocumentHtmlPage, resolveParagraphStyle, resolveRunStyle, resolveTableCellStyle, serializeNativeBlockClipboard, serializeNativeClipboardHtml, summarizeEditorCoverage, summarizeNativeCoverage };
|
package/dist/word.d.ts
CHANGED
|
@@ -64,6 +64,26 @@ declare function resolveRunStyle(format: EditorRunFormat | undefined | null): Re
|
|
|
64
64
|
declare function resolveTableCellStyle(cell: Pick<EditorTableCellView, 'margin' | 'borders' | 'shading' | 'verticalAlignment' | 'noWrap' | 'width'>): ResolvedStyle;
|
|
65
65
|
declare function colorToCss(color: string | undefined): string | null;
|
|
66
66
|
|
|
67
|
+
interface NormalizedDocumentHtmlPageOptions {
|
|
68
|
+
/** Zero-based top-level block offset. */
|
|
69
|
+
startBlock?: number;
|
|
70
|
+
/** Approximate serialized HTML budget. A block is never split. */
|
|
71
|
+
maxChars?: number;
|
|
72
|
+
}
|
|
73
|
+
interface NormalizedDocumentHtmlPage {
|
|
74
|
+
html: string;
|
|
75
|
+
/** Zero-based block offset for the next page. Missing means end of document. */
|
|
76
|
+
nextBlock?: number;
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Serialize an editor view into compact, semantic HTML for model inspection.
|
|
80
|
+
*
|
|
81
|
+
* The projection intentionally omits Word style ids. Effective formatting has
|
|
82
|
+
* already been resolved by the editor extractor and is emitted as inline CSS.
|
|
83
|
+
* Stable paragraph/table ids remain available for later document operations.
|
|
84
|
+
*/
|
|
85
|
+
declare function renderNormalizedDocumentHtmlPage(view: EditorDocumentView, options?: NormalizedDocumentHtmlPageOptions): NormalizedDocumentHtmlPage;
|
|
86
|
+
|
|
67
87
|
declare const NATIVE_BLOCK_CLIPBOARD_TYPE = "application/x-coco-word-blocks+json";
|
|
68
88
|
interface NativeClipboardRun {
|
|
69
89
|
from: number;
|
|
@@ -82,4 +102,4 @@ declare function serializeNativeBlockClipboard(blocks: readonly NativeWordBlockN
|
|
|
82
102
|
declare function parseNativeBlockClipboard(value: string): NativeWordBlockNode[] | null;
|
|
83
103
|
declare function nativeBlockClipboardText(blocks: readonly NativeWordBlockNode[]): string;
|
|
84
104
|
|
|
85
|
-
export { EditorDocumentView, EditorHyperlink, EditorParagraphFormat, EditorRunFormat, EditorTableCellView, NATIVE_BLOCK_CLIPBOARD_TYPE, type NativeClipboardParagraph, type NativeClipboardRun, NativeWordBlockNode, type NativeWordCoverage, NativeWordDocument, NativeWordListType, NativeWordParagraphNode, type ResolvedStyle, type WordDocumentLike, type WordEditorCoverage, buildWordEditorView, buildWordEditorViewFromDocx, buildWordEditorViewFromFlatOpc, buildWordEditorViewFromPackage, collectNativeParagraphs, colorToCss, nativeBlockClipboardText, parseNativeBlockClipboard, parseNativeClipboardHtml, resolveParagraphStyle, resolveRunStyle, resolveTableCellStyle, serializeNativeBlockClipboard, serializeNativeClipboardHtml, summarizeEditorCoverage, summarizeNativeCoverage };
|
|
105
|
+
export { EditorDocumentView, EditorHyperlink, EditorParagraphFormat, EditorRunFormat, EditorTableCellView, NATIVE_BLOCK_CLIPBOARD_TYPE, type NativeClipboardParagraph, type NativeClipboardRun, NativeWordBlockNode, type NativeWordCoverage, NativeWordDocument, NativeWordListType, NativeWordParagraphNode, type NormalizedDocumentHtmlPage, type NormalizedDocumentHtmlPageOptions, type ResolvedStyle, type WordDocumentLike, type WordEditorCoverage, buildWordEditorView, buildWordEditorViewFromDocx, buildWordEditorViewFromFlatOpc, buildWordEditorViewFromPackage, collectNativeParagraphs, colorToCss, nativeBlockClipboardText, parseNativeBlockClipboard, parseNativeClipboardHtml, renderNormalizedDocumentHtmlPage, resolveParagraphStyle, resolveRunStyle, resolveTableCellStyle, serializeNativeBlockClipboard, serializeNativeClipboardHtml, summarizeEditorCoverage, summarizeNativeCoverage };
|