oasis-editor 0.0.393 → 0.0.395
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 +1 -0
- package/dist/assets/{importDocxWorker-CEEqUrRv.js → importDocxWorker-4mvTDfet.js} +338 -299
- package/dist/core/document/fieldEvaluation.d.ts +11 -0
- package/dist/core/document/styleReference.d.ts +15 -0
- package/dist/{defaultToolbar-WpWm9GL2.js → defaultToolbar-CdNGHsKd.js} +1 -1
- package/dist/oasis-editor.js +1 -1
- package/dist/oasis-editor.umd.cjs +1 -1
- package/dist/sourcePackage-D80cTee4.js +1 -0
- package/package.json +1 -1
- package/dist/OasisEditorApp-BeBF_E0U.js +0 -1
- package/dist/sourcePackage-BbPv-emQ.js +0 -1
|
@@ -23,6 +23,11 @@ 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;
|
|
30
|
+
output?: "number" | "position";
|
|
26
31
|
};
|
|
27
32
|
export type FieldDependency = {
|
|
28
33
|
kind: "page" | "document-pages" | "section" | "section-pages";
|
|
@@ -34,6 +39,10 @@ export type FieldDependency = {
|
|
|
34
39
|
} | {
|
|
35
40
|
kind: "sequence";
|
|
36
41
|
name: string;
|
|
42
|
+
} | {
|
|
43
|
+
kind: "style-text";
|
|
44
|
+
name: string;
|
|
45
|
+
lastOnPage: boolean;
|
|
37
46
|
};
|
|
38
47
|
/** All numbers are the caller's one-based display values, not array indexes.
|
|
39
48
|
* No DOM, clock, mutable editor state or layout service is consulted here.
|
|
@@ -49,6 +58,8 @@ export interface FieldEvaluationContext {
|
|
|
49
58
|
sectionPages?: number;
|
|
50
59
|
bookmarkText?: (name: string) => string | null | undefined;
|
|
51
60
|
bookmarkPage?: (name: string) => number | null | undefined;
|
|
61
|
+
/** Exact resolved style text for a body occurrence or repeated page story. */
|
|
62
|
+
styleRefText?: (name: string, lastOnPage: boolean, output: "text" | "number" | "position") => string | undefined;
|
|
52
63
|
}
|
|
53
64
|
export interface TemporalFieldContext extends TemporalFormattingOptions {
|
|
54
65
|
now?: number;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { EditorDocument, EditorLayoutDocument } from '../model.js';
|
|
2
|
+
export type StyleRefOutput = "text" | "number" | "position";
|
|
3
|
+
export interface StyleRefOptions {
|
|
4
|
+
output?: StyleRefOutput;
|
|
5
|
+
offset?: number;
|
|
6
|
+
zone?: "header" | "footer";
|
|
7
|
+
locale?: "en-US" | "pt-BR";
|
|
8
|
+
}
|
|
9
|
+
/** Read-only lookup of paragraph styles and source-certified paginated text.
|
|
10
|
+
* No DOM, layout mutations, speculative style inheritance, or evaluation of
|
|
11
|
+
* a nested field's cached output. Duplicate style names remain ambiguous. */
|
|
12
|
+
export declare function createStyleRefIndex(document: EditorDocument, layout?: EditorLayoutDocument): {
|
|
13
|
+
forBody: (paragraphId: string, name: string, lastOnPage?: boolean, opts?: StyleRefOptions) => string | undefined;
|
|
14
|
+
forPage: (pageIndex: number, name: string, lastOnPage?: boolean, opts?: StyleRefOptions) => string | undefined;
|
|
15
|
+
};
|