oasis-editor 0.0.396 → 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.
@@ -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;
@@ -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;