oasis-editor 0.0.389 → 0.0.391
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-GjLbXajA.js +1 -0
- package/dist/assets/{importDocxWorker-B2yYqBCl.js → importDocxWorker-TQU-Qdjy.js} +2158 -2067
- package/dist/core/document/documentLifecycle.d.ts +5 -0
- package/dist/core/document/fieldEvaluation.d.ts +15 -0
- package/dist/core/format/temporalFieldFormat.d.ts +6 -0
- package/dist/core/model/types/document.d.ts +6 -0
- package/dist/defaultToolbar-DMkpm3BY.js +1 -0
- package/dist/layoutProjection/bodyFieldCacheRefresh.d.ts +2 -1
- package/dist/oasis-editor.js +1 -1
- package/dist/oasis-editor.umd.cjs +1 -1
- package/dist/ooxml/opc/coreProperties.d.ts +13 -0
- package/dist/{sourcePackage-BU2XiRyT.js → sourcePackage-DLhYTIAT.js} +1 -1
- package/package.json +1 -1
- package/dist/OasisEditorApp-Bc3zkEoL.js +0 -1
- package/dist/defaultToolbar-BuCckV9m.js +0 -1
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { EditorDocument } from '../model.js';
|
|
2
|
+
/** Host-confirmed events only. Exporting a Blob, displaying a print dialog
|
|
3
|
+
* or cancelling it is not evidence that a save/print happened.
|
|
4
|
+
* Return a snapshot; the host decides whether and how to persist it. */
|
|
5
|
+
export declare function recordConfirmedDocumentEvent(document: EditorDocument, event: "created" | "saved" | "printed", epochMs: number): EditorDocument;
|
|
@@ -1,8 +1,14 @@
|
|
|
1
1
|
import { PageNumberFormat } from '../model.js';
|
|
2
|
+
import { TemporalFormattingOptions } from '../format/temporalFieldFormat.js';
|
|
2
3
|
import { FieldStorySpan } from './fieldStoryGraph.js';
|
|
3
4
|
export type NumericFieldCommand = "PAGE" | "NUMPAGES" | "SECTION" | "SECTIONPAGES";
|
|
4
5
|
export type ReferenceFieldCommand = "REF" | "PAGEREF";
|
|
6
|
+
export type TemporalFieldCommand = "DATE" | "TIME" | "CREATEDATE" | "SAVEDATE" | "PRINTDATE";
|
|
5
7
|
export type EvaluatableField = {
|
|
8
|
+
type: TemporalFieldCommand;
|
|
9
|
+
temporal: true;
|
|
10
|
+
picture?: string;
|
|
11
|
+
} | {
|
|
6
12
|
type: NumericFieldCommand;
|
|
7
13
|
format?: PageNumberFormat;
|
|
8
14
|
} | {
|
|
@@ -15,12 +21,15 @@ export type FieldDependency = {
|
|
|
15
21
|
} | {
|
|
16
22
|
kind: "bookmark-text" | "bookmark-page";
|
|
17
23
|
name: string;
|
|
24
|
+
} | {
|
|
25
|
+
kind: "clock" | "created" | "saved" | "printed";
|
|
18
26
|
};
|
|
19
27
|
/** All numbers are the caller's one-based display values, not array indexes.
|
|
20
28
|
* No DOM, clock, mutable editor state or layout service is consulted here.
|
|
21
29
|
* An absent value is unresolved; a bookmark resolver may return null only
|
|
22
30
|
* when it has positively established that the target does not exist. */
|
|
23
31
|
export interface FieldEvaluationContext {
|
|
32
|
+
temporal?: TemporalFieldContext;
|
|
24
33
|
pageNumber?: number;
|
|
25
34
|
totalPages?: number;
|
|
26
35
|
sectionNumber?: number;
|
|
@@ -28,6 +37,12 @@ export interface FieldEvaluationContext {
|
|
|
28
37
|
bookmarkText?: (name: string) => string | null | undefined;
|
|
29
38
|
bookmarkPage?: (name: string) => number | null | undefined;
|
|
30
39
|
}
|
|
40
|
+
export interface TemporalFieldContext extends TemporalFormattingOptions {
|
|
41
|
+
now?: number;
|
|
42
|
+
created?: number;
|
|
43
|
+
saved?: number;
|
|
44
|
+
printed?: number;
|
|
45
|
+
}
|
|
31
46
|
export type FieldEvaluation = {
|
|
32
47
|
status: "resolved";
|
|
33
48
|
text: string;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare function supportsTemporalPicture(picture: string): boolean;
|
|
2
|
+
export interface TemporalFormattingOptions {
|
|
3
|
+
locale?: "en-US" | "pt-BR";
|
|
4
|
+
timeZone?: string;
|
|
5
|
+
}
|
|
6
|
+
export declare function formatTemporalPicture(epochMs: number, picture: string, options?: TemporalFormattingOptions): string | undefined;
|
|
@@ -270,6 +270,12 @@ export interface EditorDocument {
|
|
|
270
270
|
* substitution metadata. Preserved on import and re-emitted on export.
|
|
271
271
|
*/
|
|
272
272
|
fontTable?: EditorFontInfo[];
|
|
273
|
+
/** Actual document lifecycle timestamps, epoch milliseconds. Missing means unknown. */
|
|
274
|
+
coreTimestamps?: {
|
|
275
|
+
created?: number;
|
|
276
|
+
saved?: number;
|
|
277
|
+
printed?: number;
|
|
278
|
+
};
|
|
273
279
|
metadata?: {
|
|
274
280
|
title?: string;
|
|
275
281
|
[key: string]: unknown;
|