wordinweb 0.3.8 → 0.3.9
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/{chunk-LBXLKYTZ.js → chunk-CXXISL5X.js} +39 -9
- package/dist/chunk-CXXISL5X.js.map +1 -0
- package/dist/{chunk-H54TYQLD.js → chunk-HHIEEVBV.js} +12 -10
- package/dist/chunk-HHIEEVBV.js.map +1 -0
- package/dist/collab.d.ts +3 -3
- package/dist/collab.js +5 -4
- package/dist/collab.js.map +1 -1
- package/dist/{docx-only-D3pk2pRD.d.ts → docx-only-jIZisiQh.d.ts} +8 -2
- package/dist/docx-only.d.ts +1 -1
- package/dist/docx-only.js +1 -1
- package/dist/{index-CEqxQ0p-.d.ts → index-Dh3XJOZr.d.ts} +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- package/package.json +1 -1
- package/dist/chunk-H54TYQLD.js.map +0 -1
- package/dist/chunk-LBXLKYTZ.js.map +0 -1
|
@@ -41,6 +41,7 @@ import {
|
|
|
41
41
|
printStylesheet,
|
|
42
42
|
pruneBlankSpans,
|
|
43
43
|
pxToTwips,
|
|
44
|
+
readWordDate,
|
|
44
45
|
relayoutHeadersFooters,
|
|
45
46
|
relsPathFor,
|
|
46
47
|
renderToDom,
|
|
@@ -61,8 +62,9 @@ import {
|
|
|
61
62
|
smartArtTextFormat,
|
|
62
63
|
toggleCheckbox,
|
|
63
64
|
wireOffsetOf,
|
|
64
|
-
wireOffsetOfSeparator
|
|
65
|
-
|
|
65
|
+
wireOffsetOfSeparator,
|
|
66
|
+
wordDate
|
|
67
|
+
} from "./chunk-CXXISL5X.js";
|
|
66
68
|
import {
|
|
67
69
|
__toESM
|
|
68
70
|
} from "./chunk-7D4SUZUM.js";
|
|
@@ -22043,7 +22045,7 @@ function graphemeStep(text, offset, delta) {
|
|
|
22043
22045
|
// ../core/src/edit/provenance.ts
|
|
22044
22046
|
function defaultProvenance() {
|
|
22045
22047
|
return {
|
|
22046
|
-
date: () => (
|
|
22048
|
+
date: () => wordDate(),
|
|
22047
22049
|
paraId: () => Math.floor(Math.random() * 4294967280 + 1).toString(16).toUpperCase().padStart(8, "0")
|
|
22048
22050
|
};
|
|
22049
22051
|
}
|
|
@@ -26696,8 +26698,8 @@ var _DocxEditor = class _DocxEditor {
|
|
|
26696
26698
|
};
|
|
26697
26699
|
const author = ref.author || attrEndingWith("author") || "Unknown";
|
|
26698
26700
|
const rawDate = attrEndingWith("date");
|
|
26699
|
-
const when = rawDate
|
|
26700
|
-
const dateText = when
|
|
26701
|
+
const when = readWordDate(rawDate, attrEndingWith("dateutc"));
|
|
26702
|
+
const dateText = when ? when.toLocaleString(void 0, { dateStyle: "medium", timeStyle: "short" }) : "";
|
|
26701
26703
|
const initials = author.trim().split(/\s+/).filter(Boolean).map((p) => p[0]).slice(0, 2).join("").toUpperCase() || "?";
|
|
26702
26704
|
const box = document.createElement("div");
|
|
26703
26705
|
box.dataset.dxwSuggestPopover = "1";
|
|
@@ -29820,7 +29822,7 @@ function compareContext(original, merged, options, onIssue = () => {
|
|
|
29820
29822
|
original,
|
|
29821
29823
|
meta: {
|
|
29822
29824
|
author: options.author,
|
|
29823
|
-
date: options.date ?? (
|
|
29825
|
+
date: options.date ?? wordDate(),
|
|
29824
29826
|
nextId: () => {
|
|
29825
29827
|
onIssue();
|
|
29826
29828
|
return merged.nextRevisionId();
|
|
@@ -33065,7 +33067,7 @@ async function compareWithFile(originalBytes, file, options = {}) {
|
|
|
33065
33067
|
const notes = [];
|
|
33066
33068
|
const merged = compareDocuments(DocxDocument2.load(originalBytes), DocxDocument2.load(revisedBytes), {
|
|
33067
33069
|
author: options.author ?? "Comparison",
|
|
33068
|
-
date: options.date ?? (
|
|
33070
|
+
date: options.date ?? wordDate(),
|
|
33069
33071
|
formatting: options.formatting,
|
|
33070
33072
|
whitespace: options.whitespace,
|
|
33071
33073
|
onNote: (note) => notes.push(note)
|
|
@@ -41315,7 +41317,7 @@ function DocxView({
|
|
|
41315
41317
|
text,
|
|
41316
41318
|
author: commentAuthor,
|
|
41317
41319
|
initials: commentAuthor.split(/\s+/).map((part) => part[0] ?? "").join("").slice(0, 2).toUpperCase() || void 0,
|
|
41318
|
-
date: (
|
|
41320
|
+
date: wordDate(),
|
|
41319
41321
|
paraIds: [hex8()]
|
|
41320
41322
|
}))) return;
|
|
41321
41323
|
history.checkpoint();
|
|
@@ -41991,7 +41993,7 @@ function DocxView({
|
|
|
41991
41993
|
const seg0 = segments.find((sg) => sg.t);
|
|
41992
41994
|
const initials0 = commentAuthor.split(/\s+/).map((part) => part[0] ?? "").join("").slice(0, 2).toUpperCase();
|
|
41993
41995
|
if (seg0?.t && collabOp(
|
|
41994
|
-
(a) => ({ kind: "commentRun", runId: a.runId, text, author: commentAuthor, initials: initials0 || void 0, date: (
|
|
41996
|
+
(a) => ({ kind: "commentRun", runId: a.runId, text, author: commentAuthor, initials: initials0 || void 0, date: wordDate(), paraId: hex8() }),
|
|
41995
41997
|
{ t: seg0.t, offset: seg0.start }
|
|
41996
41998
|
)) return true;
|
|
41997
41999
|
}
|
|
@@ -43221,4 +43223,4 @@ export {
|
|
|
43221
43223
|
useAgentDocumentSession,
|
|
43222
43224
|
DocxView
|
|
43223
43225
|
};
|
|
43224
|
-
//# sourceMappingURL=chunk-
|
|
43226
|
+
//# sourceMappingURL=chunk-HHIEEVBV.js.map
|