oasis-editor 0.0.395 → 0.0.397
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-B5gTcE0i.js → OasisEditorApp-BTHv-Yyc.js} +1 -1
- package/dist/assets/{importDocxWorker-4mvTDfet.js → importDocxWorker-C6vLHeaU.js} +2035 -1893
- package/dist/core/document/fieldEvaluation.d.ts +17 -0
- package/dist/core/model/index.d.ts +1 -1
- package/dist/core/model/types/document.d.ts +2 -0
- package/dist/core/model/types/layout.d.ts +12 -0
- package/dist/defaultToolbar-Bl3U_cmM.js +1 -0
- package/dist/export/docx/docxPackageXml.d.ts +1 -1
- package/dist/layoutProjection/fieldDisplayOffsetMap.d.ts +8 -0
- package/dist/layoutProjection/fieldResultProjection.d.ts +4 -4
- package/dist/oasis-editor.js +1 -1
- package/dist/oasis-editor.umd.cjs +1 -1
- package/dist/ooxml/word/documentVariables.d.ts +5 -0
- package/dist/sourcePackage-DB0wV9SH.js +1 -0
- package/dist/ui/canvas/canvasSnapshotLines.d.ts +2 -1
- package/package.json +1 -1
- package/dist/defaultToolbar-CdNGHsKd.js +0 -1
- package/dist/sourcePackage-D80cTee4.js +0 -1
|
@@ -23,11 +23,22 @@ export type EvaluatableField = SequenceField | {
|
|
|
23
23
|
type: ReferenceFieldCommand;
|
|
24
24
|
bookmark: string;
|
|
25
25
|
hyperlink?: boolean;
|
|
26
|
+
} | {
|
|
27
|
+
type: "DOCVARIABLE";
|
|
28
|
+
name: string;
|
|
26
29
|
} | {
|
|
27
30
|
type: "STYLEREF";
|
|
28
31
|
style: string;
|
|
29
32
|
lastOnPage: boolean;
|
|
30
33
|
output?: "number" | "position";
|
|
34
|
+
} | {
|
|
35
|
+
type: "IF";
|
|
36
|
+
left: string;
|
|
37
|
+
right: string;
|
|
38
|
+
operator: "=" | "<>" | "<" | ">" | "<=" | ">=";
|
|
39
|
+
whenTrue: string;
|
|
40
|
+
whenFalse: string;
|
|
41
|
+
numeric: boolean;
|
|
31
42
|
};
|
|
32
43
|
export type FieldDependency = {
|
|
33
44
|
kind: "page" | "document-pages" | "section" | "section-pages";
|
|
@@ -43,6 +54,11 @@ export type FieldDependency = {
|
|
|
43
54
|
kind: "style-text";
|
|
44
55
|
name: string;
|
|
45
56
|
lastOnPage: boolean;
|
|
57
|
+
} | {
|
|
58
|
+
kind: "literal-condition";
|
|
59
|
+
} | {
|
|
60
|
+
kind: "document-variable";
|
|
61
|
+
name: string;
|
|
46
62
|
};
|
|
47
63
|
/** All numbers are the caller's one-based display values, not array indexes.
|
|
48
64
|
* No DOM, clock, mutable editor state or layout service is consulted here.
|
|
@@ -50,6 +66,7 @@ export type FieldDependency = {
|
|
|
50
66
|
* when it has positively established that the target does not exist. */
|
|
51
67
|
export interface FieldEvaluationContext {
|
|
52
68
|
temporal?: TemporalFieldContext;
|
|
69
|
+
documentVariables?: Readonly<Record<string, string>>;
|
|
53
70
|
/** Precomputed value for this exact SEQ occurrence, never a mutable counter. */
|
|
54
71
|
sequenceValue?: number;
|
|
55
72
|
pageNumber?: number;
|
|
@@ -21,7 +21,7 @@ export type { EditorReviewActivity, EditorReviewActivityKind, } from './types/do
|
|
|
21
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
|
-
export type { EditorCaretSlot, EditorLayoutFragmentChar, EditorLayoutFragment, EditorLayoutLine, EditorResolvedTab, EditorLayoutParagraph, EditorLayoutBlock, TableCellBlockPosition, EditorLayoutPage, EditorLayoutDocument, } from './types/layout.js';
|
|
24
|
+
export type { EditorCaretSlot, EditorLayoutFragmentChar, EditorLayoutFragment, EditorLayoutLine, EditorResolvedTab, EditorLayoutDisplayOffsetSpan, EditorLayoutParagraph, EditorLayoutBlock, TableCellBlockPosition, EditorLayoutPage, EditorLayoutDocument, } from './types/layout.js';
|
|
25
25
|
export type { EditorState, ReviewDisplayMode } from './editorState.js';
|
|
26
26
|
export { EDITOR_ASSET_REF_PREFIX } from './types/primitives.js';
|
|
27
27
|
export { DEFAULT_TEXT_STYLE, DEFAULT_PARAGRAPH_STYLE, EFFECTIVE_TEXT_STYLE_DEFAULTS, EFFECTIVE_PARAGRAPH_STYLE_DEFAULTS, } from './styleDefaults.js';
|
|
@@ -270,6 +270,8 @@ export interface EditorDocument {
|
|
|
270
270
|
* substitution metadata. Preserved on import and re-emitted on export.
|
|
271
271
|
*/
|
|
272
272
|
fontTable?: EditorFontInfo[];
|
|
273
|
+
/** Imported w:docVars plain-text values. */
|
|
274
|
+
documentVariables?: Record<string, string>;
|
|
273
275
|
/** Actual document lifecycle timestamps, epoch milliseconds. Missing means unknown. */
|
|
274
276
|
coreTimestamps?: {
|
|
275
277
|
created?: number;
|
|
@@ -59,7 +59,19 @@ export interface EditorLayoutLine {
|
|
|
59
59
|
* truth shared by alignment and the canvas/PDF renderers. */
|
|
60
60
|
trailingHyphenWidth?: number;
|
|
61
61
|
}
|
|
62
|
+
/** One display-only field replacement. Visual offsets belong to the page
|
|
63
|
+
* layout; source offsets belong to the editable DOCX model. Never save this
|
|
64
|
+
* mapping in the document or use it to rewrite field caches. */
|
|
65
|
+
export interface EditorLayoutDisplayOffsetSpan {
|
|
66
|
+
displayStart: number;
|
|
67
|
+
displayEnd: number;
|
|
68
|
+
sourceStart: number;
|
|
69
|
+
sourceEnd: number;
|
|
70
|
+
}
|
|
62
71
|
export interface EditorLayoutParagraph {
|
|
72
|
+
/** Maps per-page visual header/footer positions onto immutable source
|
|
73
|
+
* coordinates; absent means the layout uses source coordinates directly. */
|
|
74
|
+
displayOffsetMap?: EditorLayoutDisplayOffsetSpan[];
|
|
63
75
|
paragraphId: string;
|
|
64
76
|
text: string;
|
|
65
77
|
fragments: EditorLayoutFragment[];
|