oasis-editor 0.0.157 → 0.0.158
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-BfdBu3ui.js → OasisEditorApp-D8XC2a93.js} +268 -3
- package/dist/assets/{importDocxWorker-DpJa1l2G.js → importDocxWorker-CEVODY5C.js} +1 -1
- package/dist/core/model/types/runSdtAugmentation.d.ts +7 -0
- package/dist/core/model.d.ts +1 -9
- package/dist/export/docx/synchronizeBoundContentControls.d.ts +3 -0
- package/dist/export/docx/text/blocksXml.d.ts +0 -6
- package/dist/export/docx/text/inlineSdtXml.d.ts +8 -0
- package/dist/import/docx/runs/types.d.ts +3 -1
- package/dist/{index-DQLjp1z0.js → index-0LIU1rxH.js} +427 -366
- package/dist/oasis-editor.js +1 -1
- package/dist/oasis-editor.umd.cjs +4 -4
- package/dist/ooxml/word/customXmlBinding.d.ts +1 -0
- package/package.json +1 -1
package/dist/core/model.d.ts
CHANGED
|
@@ -1,11 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
* Re-export the refactored model module under its original path.
|
|
3
|
-
*
|
|
4
|
-
* The 1411-line monolithic `model.ts` was split into focused modules under
|
|
5
|
-
* `./model/` (types, queries, styleResolution, pageGeometry, documentIndex,
|
|
6
|
-
* editingZones, etc.). This file is now a one-liner barrel so the 43+
|
|
7
|
-
* existing `import { ... } from "@/model.js"` sites continue to work
|
|
8
|
-
* without any change.
|
|
9
|
-
*/
|
|
1
|
+
|
|
10
2
|
export * from './model/index.js';
|
|
11
3
|
export * from './tableStyleResolver.js';
|
|
@@ -1,12 +1,6 @@
|
|
|
1
1
|
import { EditorBlockNode, EditorNamedStyle, EditorParagraphNode, EditorParagraphStyle } from '../../../core/model.js';
|
|
2
2
|
import { DocContext } from '../docxTypes.js';
|
|
3
3
|
|
|
4
|
-
/**
|
|
5
|
-
* Serialize a block run, re-wrapping any block-level `w:sdt` content controls
|
|
6
|
-
* preserved on import. Consecutive blocks sharing an outermost wrapper `groupId`
|
|
7
|
-
* are coalesced back into one `<w:sdt>` envelope; the wrapper is stripped before
|
|
8
|
-
* recursing so nested content controls re-wrap from the inside out.
|
|
9
|
-
*/
|
|
10
4
|
export declare function serializeBlocksXml(blocks: EditorBlockNode[], context: DocContext, styles: Record<string, EditorNamedStyle> | undefined): string;
|
|
11
5
|
export declare function serializeParagraphXml(paragraph: EditorParagraphNode, context: DocContext, styles: Record<string, EditorNamedStyle> | undefined, overrides?: {
|
|
12
6
|
align?: EditorParagraphStyle["align"];
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { EditorTextRun } from '../../../core/model.js';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Re-wraps inline SDTs around their edited run stream. Consecutive runs sharing
|
|
5
|
+
* the same outer wrapper are coalesced into one `w:sdt`; nested wrappers recurse
|
|
6
|
+
* after the outer wrapper is stripped from the temporary run view.
|
|
7
|
+
*/
|
|
8
|
+
export declare function serializeRunsWithInlineSdts(runs: EditorTextRun[], serializeRun: (run: EditorTextRun) => string): string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Element as XmlElement } from '@xmldom/xmldom';
|
|
2
|
-
import { EditorBlockNode, EditorTextStyle, EditorImageRunData, EditorTextBoxData, EditorMathExpression } from '../../../core/model.js';
|
|
2
|
+
import { EditorBlockNode, EditorTextStyle, EditorImageRunData, EditorTextBoxData, EditorMathExpression, EditorSdtBlockWrapper } from '../../../core/model.js';
|
|
3
3
|
|
|
4
4
|
export type ParseNestedBlocks = (container: XmlElement) => Promise<EditorBlockNode[]>;
|
|
5
5
|
/**
|
|
@@ -28,6 +28,8 @@ export interface ImportedRun {
|
|
|
28
28
|
image?: EditorImageRunData;
|
|
29
29
|
textBox?: EditorTextBoxData;
|
|
30
30
|
styles?: EditorTextStyle;
|
|
31
|
+
/** Enclosing inline `w:sdt` wrappers, outermost first. */
|
|
32
|
+
sdtWrappers?: EditorSdtBlockWrapper[];
|
|
31
33
|
field?: {
|
|
32
34
|
type: "PAGE" | "NUMPAGES";
|
|
33
35
|
};
|