oasis-editor 0.0.356 → 0.0.358
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/OasisEditorApp-DEIlGx5V.js +1 -0
- package/dist/assets/{importDocxWorker-B6D51swf.js → importDocxWorker-CoHJ_XD0.js} +1503 -1271
- package/dist/core/model/index.d.ts +3 -3
- package/dist/core/model/runKind.d.ts +3 -1
- package/dist/core/model/types/docxSourcePackage.d.ts +29 -0
- package/dist/core/model/types/layout.d.ts +2 -1
- package/dist/core/model/types/nodes.d.ts +14 -0
- package/dist/defaultToolbar--yqZGana.js +1 -0
- package/dist/export/docx/docxTypes.d.ts +3 -0
- package/dist/export/docx/exportEditorDocumentToDocx.d.ts +5 -1
- package/dist/export/docx/exportEditorDocumentToDocxPreservingSource.d.ts +6 -2
- package/dist/import/docx/runs/types.d.ts +2 -1
- package/dist/oasis-editor.js +1 -1
- package/dist/oasis-editor.umd.cjs +1 -1
- package/dist/ooxml/word/opaqueObjects.d.ts +30 -0
- package/dist/rolldown-runtime-CjpNFd0O.js +1 -0
- package/dist/sourcePackage-CGJ-Pcxk.js +1 -0
- package/package.json +1 -1
- package/dist/OasisEditorApp-BgoYwwXU.js +0 -1
- package/dist/defaultToolbar-DSaXgrxG.js +0 -1
|
@@ -8,17 +8,17 @@
|
|
|
8
8
|
*/
|
|
9
9
|
export type { EditorUnderlineStyle, EditorLigatures, EditorNumberSpacing, EditorNumberForm, EditorTextLanguage, EditorBorderStyle, EditorEmphasisMark, EditorTabStop, EditorParagraphListStyle, EditorImageCrop, EditorImageCropShape, EditorImageCropFit, EditorImageFillMode, EditorLineDash, EditorImageBorder, EditorImageFloatingPosition, EditorImageFloatingLayout, EditorImageRunData, EditorWrapPolygonPoint, EditorFieldData, EditorFieldChar, EditorFootnoteReferenceData, EditorEndnoteReferenceData, PageNumberFormat, EditorRevision, EditorRevisionMetadata, EditorMoveRangeMarker, EditorNumberingRevision, EditorStructuralRevision, EditorPropertyRevision, EditorAsset, EditorFootnoteNumberFormat, EditorFootnoteRestart, EditorDocxWidthValue, EditorTableLayout, EditorTableRowHeightRule, EditorGradientStop, EditorTextFill, EditorTextOutline, EditorTextShadow, EditorGlow, EditorReflection, } from './types/primitives.js';
|
|
10
10
|
export type { EditorTextStyle, EditorParagraphStyle, EditorTableStyle, EditorTableFloatingLayout, EditorTableConditionalFormat, EditorConditionalRowStyle, EditorTableConditionalType, EditorTableConditionalFlags, EditorTableCellStyle, EditorNamedStyle, } from './types/styles.js';
|
|
11
|
-
export type { EditorRunBase, EditorTextRun, EditorTextBoxShape, EditorTextBoxBody, EditorTextBoxData, EditorDropCap, EditorSdtBlockWrapper, EditorSdtPr, EditorSdtSubtype, EditorSdtListItem, EditorSdtDataBinding, EditorParagraphNode, EditorTableCellNode, EditorTableRowStyle, EditorTableRowNode, EditorTableNode, EditorBlockNode, } from './types/nodes.js';
|
|
11
|
+
export type { EditorRunBase, EditorOpaqueRunData, EditorTextRun, EditorTextBoxShape, EditorTextBoxBody, EditorTextBoxData, EditorDropCap, EditorSdtBlockWrapper, EditorSdtPr, EditorSdtSubtype, EditorSdtListItem, EditorSdtDataBinding, EditorParagraphNode, EditorTableCellNode, EditorTableRowStyle, EditorTableRowNode, EditorTableNode, EditorBlockNode, } from './types/nodes.js';
|
|
12
12
|
export type { EditorMathNode, EditorMathText, EditorMathFraction, EditorMathRadical, EditorMathScript, EditorMathDelimiter, EditorMathAccent, EditorMathNary, EditorMathLimit, EditorMathMatrix, EditorMathBox, EditorMathGroup, EditorMathRaw, EditorMathStyle, EditorMathExpression, } from './types/math.js';
|
|
13
13
|
export { EMPTY_EDITOR_MATH_EXPRESSION, MATH_OBJECT_REPLACEMENT, } from './types/math.js';
|
|
14
14
|
export type { RunKind, RunOfKind, RunVisitor } from './runKind.js';
|
|
15
|
-
export { getRunKind, isInlineObjectRun, visitRun, getRunImage, getRunTextBox, getRunField, getRunFieldChar, getRunFieldInstruction, getRunFootnoteReference, getRunEndnoteReference, getRunSym, getRunMath, } from './runKind.js';
|
|
15
|
+
export { getRunKind, isInlineObjectRun, visitRun, getRunImage, getRunTextBox, getRunField, getRunFieldChar, getRunFieldInstruction, getRunFootnoteReference, getRunEndnoteReference, getRunSym, getRunMath, getRunOpaque, } from './runKind.js';
|
|
16
16
|
export type { EditorFootnote } from './types/documentFootnotes.js';
|
|
17
17
|
export type { EditorEndnote } from './types/documentEndnotes.js';
|
|
18
18
|
export type { EditorBookmark, EditorBookmarkAnchor, EditorBookmarks, } from './types/documentBookmarks.js';
|
|
19
19
|
export type { EditorComment, EditorCommentAnchor, EditorComments, } from './types/documentComments.js';
|
|
20
20
|
export type { EditorReviewActivity, EditorReviewActivityKind, } from './types/documentReviewActivity.js';
|
|
21
|
-
export type { EditorOpcPartKind, EditorOpcPartEncoding, EditorOpcRelationship, EditorOpcContentTypes, EditorOpcPart, EditorDocxDiagnostic, EditorDocxSourcePackage, } from './types/docxSourcePackage.js';
|
|
21
|
+
export type { EditorOpcPartKind, EditorOpcPartEncoding, EditorOpcRelationship, EditorOpcContentTypes, EditorOpcPart, EditorDocxDiagnostic, EditorDocxSourcePackage, EditorDocxOpaqueObject, } from './types/docxSourcePackage.js';
|
|
22
22
|
export type { EditorPageMargins, EditorPageSettings, EditorColumnsSettings, EditorSection, EditorSectionBreakType, EditorSectionPropertiesSnapshot, EditorPageNumbering, EditorSectionVerticalAlign, EditorFontInfo, EditorFootnoteSettings, EditorFootnotes, EditorEndnoteSettings, EditorEndnotes, EditorDocumentDesign, EditorThemeData, EditorWatermark, EditorPageBorder, EditorDocument, } from './types/document.js';
|
|
23
23
|
export type { EditorPosition, EditorSelection, EditorEditingZone, } from './types/selection.js';
|
|
24
24
|
export type { EditorCaretSlot, EditorLayoutFragmentChar, EditorLayoutFragment, EditorLayoutLine, EditorResolvedTab, EditorLayoutParagraph, EditorLayoutBlock, TableCellBlockPosition, EditorLayoutPage, EditorLayoutDocument, } from './types/layout.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { EditorTextBoxData, EditorTextRun } from './types/nodes.js';
|
|
1
|
+
import { EditorTextBoxData, EditorTextRun, EditorOpaqueRunData } from './types/nodes.js';
|
|
2
2
|
import { EditorMathExpression } from './types/math.js';
|
|
3
3
|
import { EditorFieldChar, EditorFieldData, EditorImageRunData, EditorFootnoteReferenceData, EditorEndnoteReferenceData } from './types/primitives.js';
|
|
4
4
|
/**
|
|
@@ -27,7 +27,9 @@ export declare function getRunSym(run: EditorTextRun): {
|
|
|
27
27
|
char: string;
|
|
28
28
|
} | undefined;
|
|
29
29
|
export declare function getRunMath(run: EditorTextRun): EditorMathExpression | undefined;
|
|
30
|
+
export declare function getRunOpaque(run: EditorTextRun): EditorOpaqueRunData | undefined;
|
|
30
31
|
export interface RunVisitor<R> {
|
|
32
|
+
opaque(run: RunOfKind<"opaque">): R;
|
|
31
33
|
text(run: RunOfKind<"text">): R;
|
|
32
34
|
image(run: RunOfKind<"image">): R;
|
|
33
35
|
textBox(run: RunOfKind<"textBox">): R;
|
|
@@ -36,6 +36,33 @@ export interface EditorDocxDiagnostic {
|
|
|
36
36
|
partPath?: string;
|
|
37
37
|
relationshipId?: string;
|
|
38
38
|
}
|
|
39
|
+
/** Preservation-only description. No executable or editable object semantics. */
|
|
40
|
+
export interface EditorDocxOpaqueObject {
|
|
41
|
+
kind: "chart" | "diagram" | "embedded" | "ink" | "drawing" | "vml";
|
|
42
|
+
ownerPath: string;
|
|
43
|
+
ordinal: number;
|
|
44
|
+
fragmentXml: string;
|
|
45
|
+
/** Expanded-name structure; not a digest or a proof of visual equivalence. */
|
|
46
|
+
signature: string;
|
|
47
|
+
geometry?: {
|
|
48
|
+
placement: "inline" | "anchor";
|
|
49
|
+
widthEmu?: number;
|
|
50
|
+
heightEmu?: number;
|
|
51
|
+
wrap?: string;
|
|
52
|
+
relativeHeight?: string;
|
|
53
|
+
};
|
|
54
|
+
relationshipIds: string[];
|
|
55
|
+
edges: Array<{
|
|
56
|
+
ownerPath: string;
|
|
57
|
+
relationshipId: string;
|
|
58
|
+
type: string;
|
|
59
|
+
target: string;
|
|
60
|
+
targetMode: "Internal" | "External";
|
|
61
|
+
resolvedTarget?: string;
|
|
62
|
+
}>;
|
|
63
|
+
partPaths: string[];
|
|
64
|
+
issues: EditorDocxDiagnostic[];
|
|
65
|
+
}
|
|
39
66
|
export interface EditorDocxSourcePackage {
|
|
40
67
|
format: "docx";
|
|
41
68
|
mainDocumentPart: string;
|
|
@@ -43,6 +70,8 @@ export interface EditorDocxSourcePackage {
|
|
|
43
70
|
rootRelationships: EditorOpcRelationship[];
|
|
44
71
|
parts: Record<string, EditorOpcPart>;
|
|
45
72
|
diagnostics?: EditorDocxDiagnostic[];
|
|
73
|
+
/** Inventory of unsupported story objects; not part of the editable run model yet. */
|
|
74
|
+
opaqueObjects?: EditorDocxOpaqueObject[];
|
|
46
75
|
/**
|
|
47
76
|
* Hashes of the canonical Oasis rebuild immediately after import, keyed by
|
|
48
77
|
* conventional rebuilt part path. During source-backed export an equal hash
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { EditorBlockNode, EditorTextBoxData } from './nodes.js';
|
|
1
|
+
import { EditorBlockNode, EditorTextBoxData, EditorOpaqueRunData } from './nodes.js';
|
|
2
2
|
import { EditorMathExpression } from './math.js';
|
|
3
3
|
import { EditorPageSettings } from './document.js';
|
|
4
4
|
import { EditorRevision, EditorImageRunData, EditorTabStop } from './primitives.js';
|
|
@@ -25,6 +25,7 @@ export interface EditorLayoutFragment {
|
|
|
25
25
|
image?: EditorImageRunData;
|
|
26
26
|
textBox?: EditorTextBoxData;
|
|
27
27
|
math?: EditorMathExpression;
|
|
28
|
+
opaque?: EditorOpaqueRunData;
|
|
28
29
|
revision?: EditorRevision;
|
|
29
30
|
chars: EditorLayoutFragmentChar[];
|
|
30
31
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { EditorDocxOpaqueObject } from './docxSourcePackage.js';
|
|
1
2
|
import { EditorDocxWidthValue, EditorEndnoteReferenceData, EditorFieldChar, EditorFieldData, EditorFootnoteReferenceData, EditorImageFloatingLayout, EditorImageRunData, EditorMoveRangeMarker, EditorParagraphListStyle, EditorNumberingRevision, EditorRevision, EditorPropertyRevision, EditorStructuralRevision, EditorTableRowHeightRule } from './primitives.js';
|
|
2
3
|
import { EditorMathExpression } from './math.js';
|
|
3
4
|
import { EditorParagraphStyle, EditorTableCellStyle, EditorTableStyle, EditorTableConditionalFlags, EditorTextStyle } from './styles.js';
|
|
@@ -79,7 +80,20 @@ export interface EditorRunBase {
|
|
|
79
80
|
* missing branch is a compile error) and invalid combinations (e.g. `image` +
|
|
80
81
|
* `textBox`) are unrepresentable (O1). The `kind` values mirror {@link RunKind}.
|
|
81
82
|
*/
|
|
83
|
+
/** Original XML plus conservative flow-placeholder dimensions. */
|
|
84
|
+
export interface EditorOpaqueRunData {
|
|
85
|
+
objectKind: EditorDocxOpaqueObject["kind"];
|
|
86
|
+
fragmentXml: string;
|
|
87
|
+
signature: string;
|
|
88
|
+
relationshipIds: string[];
|
|
89
|
+
width: number;
|
|
90
|
+
height: number;
|
|
91
|
+
placement?: "inline" | "anchor";
|
|
92
|
+
}
|
|
82
93
|
export type EditorTextRun = (EditorRunBase & {
|
|
94
|
+
kind: "opaque";
|
|
95
|
+
opaque: EditorOpaqueRunData;
|
|
96
|
+
}) | (EditorRunBase & {
|
|
83
97
|
kind: "text";
|
|
84
98
|
}) | (EditorRunBase & {
|
|
85
99
|
kind: "image";
|