oasis-editor 0.0.392 → 0.0.394
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-BJ1DYIA8.js +1 -0
- package/dist/assets/{importDocxWorker-jRtNuR9t.js → importDocxWorker-DzdhjU7Z.js} +2617 -2347
- package/dist/core/document/fieldEvaluation.d.ts +10 -0
- package/dist/core/document/imageCaptions.d.ts +6 -3
- package/dist/core/document/sequenceFields.d.ts +5 -1
- package/dist/core/document/styleReference.d.ts +8 -0
- package/dist/defaultToolbar-D4Um9dcp.js +1 -0
- package/dist/oasis-editor.js +1 -1
- package/dist/oasis-editor.umd.cjs +1 -1
- package/dist/sourcePackage-BeUrWy2m.js +1 -0
- package/package.json +1 -1
- package/dist/OasisEditorApp-DBjOvZlk.js +0 -1
- package/dist/defaultToolbar-DRPAFzg6.js +0 -1
- package/dist/sourcePackage-Dkvf_WhM.js +0 -1
|
@@ -23,6 +23,10 @@ export type EvaluatableField = SequenceField | {
|
|
|
23
23
|
type: ReferenceFieldCommand;
|
|
24
24
|
bookmark: string;
|
|
25
25
|
hyperlink?: boolean;
|
|
26
|
+
} | {
|
|
27
|
+
type: "STYLEREF";
|
|
28
|
+
style: string;
|
|
29
|
+
lastOnPage: boolean;
|
|
26
30
|
};
|
|
27
31
|
export type FieldDependency = {
|
|
28
32
|
kind: "page" | "document-pages" | "section" | "section-pages";
|
|
@@ -34,6 +38,10 @@ export type FieldDependency = {
|
|
|
34
38
|
} | {
|
|
35
39
|
kind: "sequence";
|
|
36
40
|
name: string;
|
|
41
|
+
} | {
|
|
42
|
+
kind: "style-text";
|
|
43
|
+
name: string;
|
|
44
|
+
lastOnPage: boolean;
|
|
37
45
|
};
|
|
38
46
|
/** All numbers are the caller's one-based display values, not array indexes.
|
|
39
47
|
* No DOM, clock, mutable editor state or layout service is consulted here.
|
|
@@ -49,6 +57,8 @@ export interface FieldEvaluationContext {
|
|
|
49
57
|
sectionPages?: number;
|
|
50
58
|
bookmarkText?: (name: string) => string | null | undefined;
|
|
51
59
|
bookmarkPage?: (name: string) => number | null | undefined;
|
|
60
|
+
/** Exact resolved style text for a body occurrence or repeated page story. */
|
|
61
|
+
styleRefText?: (name: string, lastOnPage: boolean) => string | undefined;
|
|
52
62
|
}
|
|
53
63
|
export interface TemporalFieldContext extends TemporalFormattingOptions {
|
|
54
64
|
now?: number;
|
|
@@ -5,8 +5,11 @@ export declare const IMAGE_CAPTION_FIELD_INSTRUCTION = " SEQ Figure \\* ARABIC "
|
|
|
5
5
|
export declare function createImageCaptionParagraph(captionText: string, label: string, sequenceNumber: number): EditorParagraphNode;
|
|
6
6
|
export declare function isImageCaptionParagraph(paragraph: EditorParagraphNode | undefined): paragraph is EditorParagraphNode;
|
|
7
7
|
export declare function getImageCaptionText(paragraph: EditorParagraphNode | undefined): string;
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
/** Edit the label and caption only; preserve the original instruction,
|
|
9
|
+
* marker flags, cached field result, OOXML source and all field run IDs. */
|
|
10
|
+
export declare function updateImageCaptionParagraph(p: EditorParagraphNode, captionText: string, label: string): EditorParagraphNode;
|
|
11
|
+
/** Shared SEQ computation includes non-caption Figure occurrences. */
|
|
12
|
+
export declare function renumberImageCaptionParagraphs(paragraphs: EditorParagraphNode[], styles?: EditorDocument["styles"]): EditorParagraphNode[];
|
|
10
13
|
export declare function renumberImageCaptionsInDocument(document: EditorDocument): EditorDocument;
|
|
11
|
-
export declare function getCaptionSelectionOffset(
|
|
14
|
+
export declare function getCaptionSelectionOffset(p: EditorParagraphNode): number;
|
|
12
15
|
export declare function cloneParagraphsWithRenumberedCaptions(paragraphs: EditorParagraphNode[]): EditorParagraphNode[];
|
|
@@ -1,7 +1,11 @@
|
|
|
1
|
-
import { EditorDocument } from '../model.js';
|
|
1
|
+
import { EditorDocument, EditorParagraphNode } from '../model.js';
|
|
2
2
|
export declare function sequenceOccurrenceKey(paragraphId: string, runIndex: number): string;
|
|
3
3
|
/** Resolve main-story occurrences in XML order, independently of selection,
|
|
4
4
|
* pagination and cached display text. A malformed/ambiguous story is not
|
|
5
5
|
* evaluated. Unsupported sequence operations poison their own identifier
|
|
6
6
|
* until a definite reset; unrelated sequences are unaffected. */
|
|
7
|
+
/** One ordered SEQ authority for field refresh, caption authoring and export. */
|
|
8
|
+
export declare function resolveOrderedSequences(paragraphs: readonly EditorParagraphNode[], styles?: EditorDocument["styles"], scopes?: readonly string[]): Map<string, number>;
|
|
9
|
+
/** Row-major body order includes table cells; each cell is its own story.
|
|
10
|
+
* Headers, notes and text boxes do not consume main-body numbering. */
|
|
7
11
|
export declare function resolveBodySequences(document: EditorDocument): Map<string, number>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { EditorDocument, EditorLayoutDocument } from '../model.js';
|
|
2
|
+
/** Read-only lookup of paragraph styles and source-certified paginated text.
|
|
3
|
+
* No DOM, layout mutations, speculative style inheritance, or evaluation of
|
|
4
|
+
* a nested field's cached output. Duplicate style names remain ambiguous. */
|
|
5
|
+
export declare function createStyleRefIndex(document: EditorDocument, layout?: EditorLayoutDocument): {
|
|
6
|
+
forBody: (paragraphId: string, name: string, _lastOnPage?: boolean) => string | undefined;
|
|
7
|
+
forPage: (pageIndex: number, name: string, lastOnPage?: boolean) => string | undefined;
|
|
8
|
+
};
|