pptx-viewer-core 1.2.5 → 1.2.6

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/index.mjs CHANGED
@@ -42073,7 +42073,7 @@ var PptxHandlerRuntime57 = class extends PptxHandlerRuntime56 {
42073
42073
  for (const [, target] of layoutRels.entries()) {
42074
42074
  if (target.includes("slideMaster")) {
42075
42075
  const layoutDir = layoutPath.substring(0, layoutPath.lastIndexOf("/") + 1);
42076
- const masterPath = target.startsWith("/") ? target.substring(1) : target.startsWith("..") ? this.resolvePath(layoutDir, target) : `ppt/${target.replace("../", "")}`;
42076
+ const masterPath = target.startsWith("/") ? target.substring(1) : target.startsWith("..") ? this.resolvePath(layoutDir, target) : `ppt/${target.replace(/\.\.\//g, "")}`;
42077
42077
  try {
42078
42078
  const masterXmlStr = await this.zip.file(masterPath)?.async("string");
42079
42079
  if (masterXmlStr) {
@@ -42097,7 +42097,7 @@ var PptxHandlerRuntime57 = class extends PptxHandlerRuntime56 {
42097
42097
  for (const [, target] of slideRels.entries()) {
42098
42098
  if (target.includes("slideLayout")) {
42099
42099
  const slideDir = slidePath.substring(0, slidePath.lastIndexOf("/") + 1);
42100
- const layoutPath = target.startsWith("/") ? target.substring(1) : target.startsWith("..") ? this.resolvePath(slideDir, target) : `ppt/${target.replace("../", "")}`;
42100
+ const layoutPath = target.startsWith("/") ? target.substring(1) : target.startsWith("..") ? this.resolvePath(slideDir, target) : `ppt/${target.replace(/\.\.\//g, "")}`;
42101
42101
  try {
42102
42102
  const layoutXmlStr = await this.zip.file(layoutPath)?.async("string");
42103
42103
  if (layoutXmlStr) {
@@ -42125,7 +42125,7 @@ var PptxHandlerRuntime57 = class extends PptxHandlerRuntime56 {
42125
42125
  for (const [, target] of slideRels.entries()) {
42126
42126
  if (target.includes("slideLayout")) {
42127
42127
  const slideDir = slidePath.substring(0, slidePath.lastIndexOf("/") + 1);
42128
- const layoutPath = target.startsWith("/") ? target.substring(1) : target.startsWith("..") ? this.resolvePath(slideDir, target) : `ppt/${target.replace("../", "")}`;
42128
+ const layoutPath = target.startsWith("/") ? target.substring(1) : target.startsWith("..") ? this.resolvePath(slideDir, target) : `ppt/${target.replace(/\.\.\//g, "")}`;
42129
42129
  try {
42130
42130
  const layoutXmlStr = await this.zip.file(layoutPath)?.async("string");
42131
42131
  if (layoutXmlStr) {
@@ -42154,7 +42154,7 @@ var PptxHandlerRuntime57 = class extends PptxHandlerRuntime56 {
42154
42154
  for (const [, target] of layoutRels.entries()) {
42155
42155
  if (target.includes("slideMaster")) {
42156
42156
  const layoutDir = layoutPath.substring(0, layoutPath.lastIndexOf("/") + 1);
42157
- const masterPath = target.startsWith("/") ? target.substring(1) : target.startsWith("..") ? this.resolvePath(layoutDir, target) : `ppt/${target.replace("../", "")}`;
42157
+ const masterPath = target.startsWith("/") ? target.substring(1) : target.startsWith("..") ? this.resolvePath(layoutDir, target) : `ppt/${target.replace(/\.\.\//g, "")}`;
42158
42158
  try {
42159
42159
  const masterXmlStr = await this.zip.file(masterPath)?.async("string");
42160
42160
  if (masterXmlStr) {
@@ -42183,7 +42183,7 @@ var PptxHandlerRuntime58 = class extends PptxHandlerRuntime57 {
42183
42183
  for (const [, target] of slideRels.entries()) {
42184
42184
  if (target.includes("slideLayout")) {
42185
42185
  const slideDir = slidePath.substring(0, slidePath.lastIndexOf("/") + 1);
42186
- const layoutPath = target.startsWith("/") ? target.substring(1) : target.startsWith("..") ? this.resolvePath(slideDir, target) : `ppt/${target.replace("../", "")}`;
42186
+ const layoutPath = target.startsWith("/") ? target.substring(1) : target.startsWith("..") ? this.resolvePath(slideDir, target) : `ppt/${target.replace(/\.\.\//g, "")}`;
42187
42187
  try {
42188
42188
  const layoutXmlStr = await this.zip.file(layoutPath)?.async("string");
42189
42189
  if (layoutXmlStr) {
@@ -42212,7 +42212,7 @@ var PptxHandlerRuntime58 = class extends PptxHandlerRuntime57 {
42212
42212
  for (const [, target] of layoutRels.entries()) {
42213
42213
  if (target.includes("slideMaster")) {
42214
42214
  const layoutDir = layoutPath.substring(0, layoutPath.lastIndexOf("/") + 1);
42215
- const masterPath = target.startsWith("/") ? target.substring(1) : target.startsWith("..") ? this.resolvePath(layoutDir, target) : `ppt/${target.replace("../", "")}`;
42215
+ const masterPath = target.startsWith("/") ? target.substring(1) : target.startsWith("..") ? this.resolvePath(layoutDir, target) : `ppt/${target.replace(/\.\.\//g, "")}`;
42216
42216
  try {
42217
42217
  const masterXmlStr = await this.zip.file(masterPath)?.async("string");
42218
42218
  if (masterXmlStr) {
@@ -42237,7 +42237,7 @@ var PptxHandlerRuntime58 = class extends PptxHandlerRuntime57 {
42237
42237
  for (const [, target] of slideRels.entries()) {
42238
42238
  if (target.includes("slideLayout")) {
42239
42239
  const slideDir = slidePath.substring(0, slidePath.lastIndexOf("/") + 1);
42240
- return target.startsWith("/") ? target.substring(1) : target.startsWith("..") ? this.resolvePath(slideDir, target) : `ppt/${target.replace("../", "")}`;
42240
+ return target.startsWith("/") ? target.substring(1) : target.startsWith("..") ? this.resolvePath(slideDir, target) : `ppt/${target.replace(/\.\.\//g, "")}`;
42241
42241
  }
42242
42242
  }
42243
42243
  return void 0;
@@ -42253,7 +42253,7 @@ var PptxHandlerRuntime58 = class extends PptxHandlerRuntime57 {
42253
42253
  for (const [, target] of layoutRels.entries()) {
42254
42254
  if (target.includes("slideMaster")) {
42255
42255
  const layoutDir = layoutPath.substring(0, layoutPath.lastIndexOf("/") + 1);
42256
- return target.startsWith("/") ? target.substring(1) : target.startsWith("..") ? this.resolvePath(layoutDir, target) : `ppt/${target.replace("../", "")}`;
42256
+ return target.startsWith("/") ? target.substring(1) : target.startsWith("..") ? this.resolvePath(layoutDir, target) : `ppt/${target.replace(/\.\.\//g, "")}`;
42257
42257
  }
42258
42258
  }
42259
42259
  return void 0;
@@ -42897,7 +42897,7 @@ var PptxHandlerRuntime61 = class extends PptxHandlerRuntime60 {
42897
42897
  for (const [, target] of layoutRels.entries()) {
42898
42898
  if (target.includes("slideMaster")) {
42899
42899
  const layoutDir = layoutPath.substring(0, layoutPath.lastIndexOf("/") + 1);
42900
- masterPath = target.startsWith("/") ? target.substring(1) : target.startsWith("..") ? this.resolvePath(layoutDir, target) : `ppt/${target.replace("../", "")}`;
42900
+ masterPath = target.startsWith("/") ? target.substring(1) : target.startsWith("..") ? this.resolvePath(layoutDir, target) : `ppt/${target.replace(/\.\.\//g, "")}`;
42901
42901
  break;
42902
42902
  }
42903
42903
  }
@@ -43031,7 +43031,7 @@ var PptxHandlerRuntime62 = class extends PptxHandlerRuntime61 {
43031
43031
  for (const [, target] of slideRels.entries()) {
43032
43032
  if (target.includes("slideLayout")) {
43033
43033
  const slideDir = slidePath.substring(0, slidePath.lastIndexOf("/") + 1);
43034
- layoutPath = target.startsWith("/") ? target.substring(1) : target.startsWith("..") ? this.resolvePath(slideDir, target) : `ppt/${target.replace("../", "")}`;
43034
+ layoutPath = target.startsWith("/") ? target.substring(1) : target.startsWith("..") ? this.resolvePath(slideDir, target) : `ppt/${target.replace(/\.\.\//g, "")}`;
43035
43035
  break;
43036
43036
  }
43037
43037
  }
@@ -46783,7 +46783,7 @@ var PptxHandlerRuntime78 = class extends PptxHandlerRuntime77 {
46783
46783
  }
46784
46784
  return stack.join("/");
46785
46785
  }
46786
- return `ppt/${target.replace("../", "")}`;
46786
+ return `ppt/${target.replace(/\.\.\//g, "")}`;
46787
46787
  }
46788
46788
  }
46789
46789
  return void 0;
@@ -47343,7 +47343,7 @@ var PptxHandlerRuntime80 = class extends PptxHandlerRuntime79 {
47343
47343
  for (const [, target] of layoutRels.entries()) {
47344
47344
  if (target.includes("slideMaster")) {
47345
47345
  const layoutDir = layoutPath.substring(0, layoutPath.lastIndexOf("/") + 1);
47346
- return target.startsWith("/") ? target.substring(1) : target.startsWith("..") ? this.resolvePath(layoutDir, target) : `ppt/${target.replace("../", "")}`;
47346
+ return target.startsWith("/") ? target.substring(1) : target.startsWith("..") ? this.resolvePath(layoutDir, target) : `ppt/${target.replace(/\.\.\//g, "")}`;
47347
47347
  }
47348
47348
  }
47349
47349
  return void 0;
@@ -47412,7 +47412,7 @@ var PptxHandlerRuntime80 = class extends PptxHandlerRuntime79 {
47412
47412
  for (const [, target] of masterRels.entries()) {
47413
47413
  if (target.includes("slideLayout")) {
47414
47414
  const masterDir = masterPath.substring(0, masterPath.lastIndexOf("/") + 1);
47415
- const resolved = target.startsWith("/") ? target.substring(1) : target.startsWith("..") ? this.resolvePath(masterDir, target) : `ppt/${target.replace("../", "")}`;
47415
+ const resolved = target.startsWith("/") ? target.substring(1) : target.startsWith("..") ? this.resolvePath(masterDir, target) : `ppt/${target.replace(/\.\.\//g, "")}`;
47416
47416
  masterLayoutPaths.add(resolved);
47417
47417
  }
47418
47418
  }
@@ -56299,7 +56299,7 @@ function getShapeClipPathFromPreset(shapeType, width, height, adjustments) {
56299
56299
  if (!result || result.svgPath === "") {
56300
56300
  return void 0;
56301
56301
  }
56302
- const escaped = result.svgPath.replace(/'/g, "\\'");
56302
+ const escaped = result.svgPath.replace(/\\/g, "\\\\").replace(/'/g, "\\'");
56303
56303
  return `path('${escaped}')`;
56304
56304
  }
56305
56305
  function getRoundRectRadiusPx(element) {
@@ -58230,7 +58230,7 @@ function moveSlidesToSection(data, slideIndices, targetSectionId) {
58230
58230
  }
58231
58231
 
58232
58232
  // src/core/builders/sdk/template-engine-helpers.ts
58233
- var PLACEHOLDER_RE = /\{\{([^}]+)\}\}/g;
58233
+ var PLACEHOLDER_RE = /\{\{([^{}]+)\}\}/g;
58234
58234
  var EACH_OPEN_RE = /^\s*#each\s+([\w.]+)\s*$/;
58235
58235
  var EACH_CLOSE_RE = /^\s*\/each\s*$/;
58236
58236
  var IF_OPEN_RE = /^\s*#if\s+(!?[\w.]+)\s*$/;
@@ -58294,7 +58294,7 @@ function processInlineConditionals(text, data) {
58294
58294
  let safety = 0;
58295
58295
  const MAX_ITERATIONS = 100;
58296
58296
  while (safety++ < MAX_ITERATIONS) {
58297
- const ifOpenPattern = /\{\{\s*#if\s+([^}]+)\s*\}\}((?:(?!\{\{\s*#if\s)(?!\{\{\s*\/if\s*\}\}).)*?)\{\{\s*\/if\s*\}\}/s;
58297
+ const ifOpenPattern = /\{\{\s*#if\s+(!?[\w.]+)\s*\}\}((?:(?!\{\{\s*#if\s)(?!\{\{\s*\/if\s*\}\}).)*?)\{\{\s*\/if\s*\}\}/s;
58298
58298
  const match = ifOpenPattern.exec(result);
58299
58299
  if (!match) {
58300
58300
  break;
@@ -58306,6 +58306,8 @@ function processInlineConditionals(text, data) {
58306
58306
  }
58307
58307
  return result;
58308
58308
  }
58309
+
58310
+ // src/core/builders/sdk/template-engine-segments.ts
58309
58311
  function replaceTokensAcrossSegments(segments, data) {
58310
58312
  if (segments.length === 0) {
58311
58313
  return;
@@ -58326,7 +58328,7 @@ function replaceTokensAcrossSegments(segments, data) {
58326
58328
  const fullText = textParts.join("");
58327
58329
  const afterConditionals = processInlineConditionals(fullText, data);
58328
58330
  if (afterConditionals !== fullText) {
58329
- redistributeText(segments, segmentMap, fullText, afterConditionals);
58331
+ redistributeText(segments, fullText, afterConditionals);
58330
58332
  replaceTokensAcrossSegments(segments, data);
58331
58333
  return;
58332
58334
  }
@@ -58384,7 +58386,7 @@ function replaceTokensAcrossSegments(segments, data) {
58384
58386
  }
58385
58387
  }
58386
58388
  }
58387
- function redistributeText(segments, _segmentMap, _originalFull, newFull, _data) {
58389
+ function redistributeText(segments, _originalFull, newFull) {
58388
58390
  let placed = false;
58389
58391
  for (const seg of segments) {
58390
58392
  if (seg.isParagraphBreak) {
@@ -58626,15 +58628,81 @@ async function mailMerge(handler, data, records) {
58626
58628
  }
58627
58629
 
58628
58630
  // src/core/builders/sdk/text-operations.ts
58629
- function toGlobalRegex(search) {
58631
+ function toSearchRegex(search) {
58630
58632
  if (typeof search === "string") {
58631
58633
  const escaped = search.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
58632
58634
  return new RegExp(escaped, "g");
58633
58635
  }
58634
- if (search.global) {
58635
- return search;
58636
+ return search;
58637
+ }
58638
+ function execAll(regex, text) {
58639
+ const results = [];
58640
+ if (regex.global || regex.sticky) {
58641
+ regex.lastIndex = 0;
58642
+ let match;
58643
+ while ((match = regex.exec(text)) !== null) {
58644
+ results.push(match);
58645
+ if (match[0].length === 0) {
58646
+ regex.lastIndex += 1;
58647
+ }
58648
+ }
58649
+ return results;
58650
+ }
58651
+ let offset = 0;
58652
+ let remaining = text;
58653
+ while (remaining.length > 0) {
58654
+ const match = regex.exec(remaining);
58655
+ if (!match) {
58656
+ break;
58657
+ }
58658
+ const adjusted = [...match];
58659
+ adjusted.index = offset + match.index;
58660
+ adjusted.input = text;
58661
+ adjusted.groups = match.groups;
58662
+ results.push(adjusted);
58663
+ const advance = match.index + (match[0].length || 1);
58664
+ offset += advance;
58665
+ remaining = remaining.slice(advance);
58636
58666
  }
58637
- return new RegExp(search.source, `${search.flags}g`);
58667
+ return results;
58668
+ }
58669
+ function expandReplacement(replacement, match, fullText) {
58670
+ return replacement.replace(
58671
+ /\$(\$|&|`|'|<([^>]+)>|\d{1,2})/g,
58672
+ (whole, token, groupName) => {
58673
+ if (token === "$") {
58674
+ return "$";
58675
+ }
58676
+ if (token === "&") {
58677
+ return match[0];
58678
+ }
58679
+ if (token === "`") {
58680
+ return fullText.slice(0, match.index);
58681
+ }
58682
+ if (token === "'") {
58683
+ return fullText.slice(match.index + match[0].length);
58684
+ }
58685
+ if (groupName !== void 0) {
58686
+ return match.groups?.[groupName] ?? "";
58687
+ }
58688
+ const groupIndex = Number(token);
58689
+ return groupIndex >= 1 && groupIndex < match.length ? match[groupIndex] ?? "" : whole;
58690
+ }
58691
+ );
58692
+ }
58693
+ function applyReplacements(text, matches, replacement) {
58694
+ if (matches.length === 0) {
58695
+ return text;
58696
+ }
58697
+ let result = "";
58698
+ let cursor = 0;
58699
+ for (const match of matches) {
58700
+ result += text.slice(cursor, match.index);
58701
+ result += expandReplacement(replacement, match, text);
58702
+ cursor = match.index + match[0].length;
58703
+ }
58704
+ result += text.slice(cursor);
58705
+ return result;
58638
58706
  }
58639
58707
  function collectElements(elements) {
58640
58708
  const result = [];
@@ -58650,7 +58718,7 @@ function findText(slides, search) {
58650
58718
  if (typeof search === "string" && search === "") {
58651
58719
  return [];
58652
58720
  }
58653
- const regex = toGlobalRegex(search);
58721
+ const regex = toSearchRegex(search);
58654
58722
  const results = [];
58655
58723
  slides.forEach((slide, slideIndex) => {
58656
58724
  const allElements = collectElements(slide.elements ?? []);
@@ -58661,9 +58729,7 @@ function findText(slides, search) {
58661
58729
  const segments = element.textSegments ?? [];
58662
58730
  segments.forEach((seg, segIndex) => {
58663
58731
  const text = seg.text ?? "";
58664
- regex.lastIndex = 0;
58665
- let match;
58666
- while ((match = regex.exec(text)) !== null) {
58732
+ for (const match of execAll(regex, text)) {
58667
58733
  results.push({
58668
58734
  slideIndex,
58669
58735
  elementId: element.id,
@@ -58671,9 +58737,6 @@ function findText(slides, search) {
58671
58737
  text: match[0],
58672
58738
  matchIndex: match.index
58673
58739
  });
58674
- if (match[0].length === 0) {
58675
- regex.lastIndex += 1;
58676
- }
58677
58740
  }
58678
58741
  });
58679
58742
  }
@@ -58684,7 +58747,7 @@ function replaceTextInSlide(slide, search, replacement) {
58684
58747
  if (typeof search === "string" && search === "") {
58685
58748
  return 0;
58686
58749
  }
58687
- const regex = toGlobalRegex(search);
58750
+ const regex = toSearchRegex(search);
58688
58751
  let totalReplacements = 0;
58689
58752
  function processElements2(elements) {
58690
58753
  for (const element of elements) {
@@ -58696,23 +58759,12 @@ function replaceTextInSlide(slide, search, replacement) {
58696
58759
  }
58697
58760
  const segments = element.textSegments ?? [];
58698
58761
  let elementTextChanged = false;
58699
- for (let segIdx = 0; segIdx < segments.length; segIdx++) {
58700
- const seg = segments[segIdx];
58762
+ for (const seg of segments) {
58701
58763
  const originalText = seg.text ?? "";
58702
- regex.lastIndex = 0;
58703
- let matchCount = 0;
58704
- let m;
58705
- const countRegex = toGlobalRegex(search);
58706
- while ((m = countRegex.exec(originalText)) !== null) {
58707
- matchCount++;
58708
- if (m[0].length === 0) {
58709
- countRegex.lastIndex += 1;
58710
- }
58711
- }
58712
- if (matchCount > 0) {
58713
- const newText = originalText.replace(toGlobalRegex(search), replacement);
58714
- seg.text = newText;
58715
- totalReplacements += matchCount;
58764
+ const matches = execAll(regex, originalText);
58765
+ if (matches.length > 0) {
58766
+ seg.text = applyReplacements(originalText, matches, replacement);
58767
+ totalReplacements += matches.length;
58716
58768
  elementTextChanged = true;
58717
58769
  }
58718
58770
  }
@@ -62676,7 +62728,7 @@ ${htmlRows.join("\n")}
62676
62728
  return parts.join("").trim();
62677
62729
  }
62678
62730
  escapeMarkdownTableCell(text) {
62679
- return text.replace(/\|/g, "\\|").replace(/\n+/g, " ").trim();
62731
+ return text.replace(/\\/g, "\\\\").replace(/\|/g, "\\|").replace(/\n+/g, " ").trim();
62680
62732
  }
62681
62733
  };
62682
62734
 
@@ -1,4 +1,4 @@
1
- import { p as SignatureCertificateInfo, L as LoadedSigningMaterial, C as CertificateRevocationStatus, T as TimestampAuthorityStatus, r as SignatureValidationPolicy, k as ParsedReferenceTransform, R as ReferenceTransformResult, q as SignatureReferenceCheck, l as SignOptions, m as SignResult, d as DigitalSignatureReport } from '../signature-inspection-status-BCUpfCQh.mjs';
1
+ import { p as SignatureCertificateInfo, L as LoadedSigningMaterial, T as TimestampAuthorityStatus, C as CertificateRevocationStatus, r as SignatureValidationPolicy, k as ParsedReferenceTransform, R as ReferenceTransformResult, q as SignatureReferenceCheck, l as SignOptions, m as SignResult, d as DigitalSignatureReport } from '../signature-inspection-status-BCUpfCQh.mjs';
2
2
  export { D as DIGEST_ALGORITHM_TO_HASH, a as DIGEST_ALGORITHM_TO_WEB_CRYPTO, b as DIGITAL_SIGNATURE_ORIGIN_REL_TYPE, c as DIGITAL_SIGNATURE_REL_TYPE, e as DigitalSignatureVerificationStatus, E as ENTERPRISE_FAIL_ON_REVOCATION_UNKNOWN_ENV, f as ENTERPRISE_REQUIRE_REVOCATION_ENV, g as ENTERPRISE_REQUIRE_TIMESTAMP_ENV, h as ENTERPRISE_TRUST_ROOTS_FILE_ENV, i as ENTERPRISE_TRUST_ROOTS_PEM_ENV, O as OPC_RELATIONSHIP_TRANSFORM, j as OfficeSignatureReference, P as PPTX_VIEWER_MANIFEST_NS, S as SUPPORTED_XML_CANON_TRANSFORMS, n as SignatureDetail, o as SignatureDetailStatus, X as XMLDSIG_NS, s as XML_TRANSFORM_ENVELOPED_SIGNATURE, t as computeDetailStatus, u as computeDigestBase64WebCrypto, v as computeVerificationStatus, w as escapeXmlAttr, x as escapeXmlText, y as extractAllTagText, z as extractFirstTagText, A as extractTagAttribute, B as isValidBase64, F as normalizePartPath, G as resolveReferenceUriToPart } from '../signature-inspection-status-BCUpfCQh.mjs';
3
3
  import JSZip from 'jszip';
4
4
 
@@ -88,16 +88,30 @@ declare function loadSigningMaterialFromBuffer(certificateBuffer: Uint8Array, ce
88
88
  declare function pemCertificateToBase64(pem: string): string;
89
89
 
90
90
  /**
91
- * PKI validation utilities — certificate revocation (OCSP) and
91
+ * PKI validation utilities — PEM/fingerprint certificate helpers and
92
92
  * timestamp-authority evaluation for OOXML digital signatures.
93
93
  *
94
- * Node-only depends on `node:crypto`, `node:http`, `node:https`, and `node-forge`.
94
+ * OCSP revocation checking lives in `./ocsp.ts`.
95
+ *
96
+ * Node-only — depends on `node:crypto` and `node-forge`.
95
97
  */
96
98
 
97
99
  /** Wrap a Base64-encoded DER certificate in PEM armour. */
98
100
  declare function certPemFromBase64(certBase64: string): string | undefined;
99
101
  /** SHA-256 fingerprint of a PEM certificate (lowercase hex, no colons). */
100
102
  declare function certFingerprintSha256(certPem: string): string | undefined;
103
+ declare function evaluateTimestampAuthority(signatureXml: string): Promise<{
104
+ status: TimestampAuthorityStatus;
105
+ error?: string;
106
+ }>;
107
+
108
+ /**
109
+ * OCSP (Online Certificate Status Protocol) revocation checking for OOXML
110
+ * digital signature certificates.
111
+ *
112
+ * Node-only — depends on `node:crypto`, `node:http`, `node:https`, and `node-forge`.
113
+ */
114
+
101
115
  declare function extractOcspUrls(certPem: string): string[];
102
116
  declare function buildOcspRequestDer(leafPem: string, issuerPem: string): Buffer | undefined;
103
117
  declare function parseOcspResponseStatus(data: Buffer): CertificateRevocationStatus;
@@ -107,10 +121,6 @@ declare function evaluateCertificateRevocation(leafCertPem: string, issuerCertPe
107
121
  checkedOcspUrls: string[];
108
122
  checkedCrlUrls: string[];
109
123
  }>;
110
- declare function evaluateTimestampAuthority(signatureXml: string): Promise<{
111
- status: TimestampAuthorityStatus;
112
- error?: string;
113
- }>;
114
124
 
115
125
  /**
116
126
  * Environment-based configuration for digital signature validation.
@@ -1,4 +1,4 @@
1
- import { p as SignatureCertificateInfo, L as LoadedSigningMaterial, C as CertificateRevocationStatus, T as TimestampAuthorityStatus, r as SignatureValidationPolicy, k as ParsedReferenceTransform, R as ReferenceTransformResult, q as SignatureReferenceCheck, l as SignOptions, m as SignResult, d as DigitalSignatureReport } from '../signature-inspection-status-BCUpfCQh.js';
1
+ import { p as SignatureCertificateInfo, L as LoadedSigningMaterial, T as TimestampAuthorityStatus, C as CertificateRevocationStatus, r as SignatureValidationPolicy, k as ParsedReferenceTransform, R as ReferenceTransformResult, q as SignatureReferenceCheck, l as SignOptions, m as SignResult, d as DigitalSignatureReport } from '../signature-inspection-status-BCUpfCQh.js';
2
2
  export { D as DIGEST_ALGORITHM_TO_HASH, a as DIGEST_ALGORITHM_TO_WEB_CRYPTO, b as DIGITAL_SIGNATURE_ORIGIN_REL_TYPE, c as DIGITAL_SIGNATURE_REL_TYPE, e as DigitalSignatureVerificationStatus, E as ENTERPRISE_FAIL_ON_REVOCATION_UNKNOWN_ENV, f as ENTERPRISE_REQUIRE_REVOCATION_ENV, g as ENTERPRISE_REQUIRE_TIMESTAMP_ENV, h as ENTERPRISE_TRUST_ROOTS_FILE_ENV, i as ENTERPRISE_TRUST_ROOTS_PEM_ENV, O as OPC_RELATIONSHIP_TRANSFORM, j as OfficeSignatureReference, P as PPTX_VIEWER_MANIFEST_NS, S as SUPPORTED_XML_CANON_TRANSFORMS, n as SignatureDetail, o as SignatureDetailStatus, X as XMLDSIG_NS, s as XML_TRANSFORM_ENVELOPED_SIGNATURE, t as computeDetailStatus, u as computeDigestBase64WebCrypto, v as computeVerificationStatus, w as escapeXmlAttr, x as escapeXmlText, y as extractAllTagText, z as extractFirstTagText, A as extractTagAttribute, B as isValidBase64, F as normalizePartPath, G as resolveReferenceUriToPart } from '../signature-inspection-status-BCUpfCQh.js';
3
3
  import JSZip from 'jszip';
4
4
 
@@ -88,16 +88,30 @@ declare function loadSigningMaterialFromBuffer(certificateBuffer: Uint8Array, ce
88
88
  declare function pemCertificateToBase64(pem: string): string;
89
89
 
90
90
  /**
91
- * PKI validation utilities — certificate revocation (OCSP) and
91
+ * PKI validation utilities — PEM/fingerprint certificate helpers and
92
92
  * timestamp-authority evaluation for OOXML digital signatures.
93
93
  *
94
- * Node-only depends on `node:crypto`, `node:http`, `node:https`, and `node-forge`.
94
+ * OCSP revocation checking lives in `./ocsp.ts`.
95
+ *
96
+ * Node-only — depends on `node:crypto` and `node-forge`.
95
97
  */
96
98
 
97
99
  /** Wrap a Base64-encoded DER certificate in PEM armour. */
98
100
  declare function certPemFromBase64(certBase64: string): string | undefined;
99
101
  /** SHA-256 fingerprint of a PEM certificate (lowercase hex, no colons). */
100
102
  declare function certFingerprintSha256(certPem: string): string | undefined;
103
+ declare function evaluateTimestampAuthority(signatureXml: string): Promise<{
104
+ status: TimestampAuthorityStatus;
105
+ error?: string;
106
+ }>;
107
+
108
+ /**
109
+ * OCSP (Online Certificate Status Protocol) revocation checking for OOXML
110
+ * digital signature certificates.
111
+ *
112
+ * Node-only — depends on `node:crypto`, `node:http`, `node:https`, and `node-forge`.
113
+ */
114
+
101
115
  declare function extractOcspUrls(certPem: string): string[];
102
116
  declare function buildOcspRequestDer(leafPem: string, issuerPem: string): Buffer | undefined;
103
117
  declare function parseOcspResponseStatus(data: Buffer): CertificateRevocationStatus;
@@ -107,10 +121,6 @@ declare function evaluateCertificateRevocation(leafCertPem: string, issuerCertPe
107
121
  checkedOcspUrls: string[];
108
122
  checkedCrlUrls: string[];
109
123
  }>;
110
- declare function evaluateTimestampAuthority(signatureXml: string): Promise<{
111
- status: TimestampAuthorityStatus;
112
- error?: string;
113
- }>;
114
124
 
115
125
  /**
116
126
  * Environment-based configuration for digital signature validation.