@likecoin/epubcheck-ts 0.3.4 → 0.3.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.d.cts CHANGED
@@ -237,6 +237,14 @@ interface ValidationContext {
237
237
  ncxUid?: string;
238
238
  /** Resources referenced in content but not declared in manifest */
239
239
  referencedUndeclaredResources?: Set<string>;
240
+ /** TOC navigation link targets in order, for reading order validation (NAV-011) */
241
+ tocLinks?: {
242
+ targetResource: string;
243
+ fragment?: string;
244
+ location: EPUBLocation;
245
+ }[];
246
+ /** Resources marked with IDPF font obfuscation in encryption.xml */
247
+ obfuscatedResources?: Set<string>;
240
248
  }
241
249
  /**
242
250
  * Rootfile reference from container.xml
@@ -299,10 +307,18 @@ declare class EpubCheck {
299
307
  * Add a validation message to the context
300
308
  */
301
309
  protected addMessage(messages: ValidationMessage[], message: ValidationMessage): void;
310
+ /**
311
+ * Validate that obfuscated resources are blessed font types (PKG-026)
312
+ */
313
+ private validateObfuscatedResources;
302
314
  /**
303
315
  * Populate resource registry from package document manifest
304
316
  */
305
317
  private populateRegistry;
318
+ /**
319
+ * Check if a manifest item has a fallback chain reaching a Core Media Type
320
+ */
321
+ private hasCMTFallback;
306
322
  }
307
323
 
308
324
  /**
@@ -943,6 +959,11 @@ declare const MessageDefs: {
943
959
  readonly severity: "error";
944
960
  readonly description: "Non-linear content must be reachable, no hyperlink found";
945
961
  };
962
+ readonly OPF_096b: {
963
+ readonly id: "OPF-096b";
964
+ readonly severity: "usage";
965
+ readonly description: "Non-linear content has no hyperlink but scripting is present";
966
+ };
946
967
  readonly OPF_097: {
947
968
  readonly id: "OPF-097";
948
969
  readonly severity: "usage";
@@ -1511,7 +1532,7 @@ declare const MessageDefs: {
1511
1532
  readonly NAV_001: {
1512
1533
  readonly id: "NAV-001";
1513
1534
  readonly severity: "error";
1514
- readonly description: "Nav file not supported for EPUB v2";
1535
+ readonly description: "Navigation Document must have a nav element with epub:type=\"toc\"";
1515
1536
  };
1516
1537
  readonly NAV_002: {
1517
1538
  readonly id: "NAV-002";
package/dist/index.d.ts CHANGED
@@ -237,6 +237,14 @@ interface ValidationContext {
237
237
  ncxUid?: string;
238
238
  /** Resources referenced in content but not declared in manifest */
239
239
  referencedUndeclaredResources?: Set<string>;
240
+ /** TOC navigation link targets in order, for reading order validation (NAV-011) */
241
+ tocLinks?: {
242
+ targetResource: string;
243
+ fragment?: string;
244
+ location: EPUBLocation;
245
+ }[];
246
+ /** Resources marked with IDPF font obfuscation in encryption.xml */
247
+ obfuscatedResources?: Set<string>;
240
248
  }
241
249
  /**
242
250
  * Rootfile reference from container.xml
@@ -299,10 +307,18 @@ declare class EpubCheck {
299
307
  * Add a validation message to the context
300
308
  */
301
309
  protected addMessage(messages: ValidationMessage[], message: ValidationMessage): void;
310
+ /**
311
+ * Validate that obfuscated resources are blessed font types (PKG-026)
312
+ */
313
+ private validateObfuscatedResources;
302
314
  /**
303
315
  * Populate resource registry from package document manifest
304
316
  */
305
317
  private populateRegistry;
318
+ /**
319
+ * Check if a manifest item has a fallback chain reaching a Core Media Type
320
+ */
321
+ private hasCMTFallback;
306
322
  }
307
323
 
308
324
  /**
@@ -943,6 +959,11 @@ declare const MessageDefs: {
943
959
  readonly severity: "error";
944
960
  readonly description: "Non-linear content must be reachable, no hyperlink found";
945
961
  };
962
+ readonly OPF_096b: {
963
+ readonly id: "OPF-096b";
964
+ readonly severity: "usage";
965
+ readonly description: "Non-linear content has no hyperlink but scripting is present";
966
+ };
946
967
  readonly OPF_097: {
947
968
  readonly id: "OPF-097";
948
969
  readonly severity: "usage";
@@ -1511,7 +1532,7 @@ declare const MessageDefs: {
1511
1532
  readonly NAV_001: {
1512
1533
  readonly id: "NAV-001";
1513
1534
  readonly severity: "error";
1514
- readonly description: "Nav file not supported for EPUB v2";
1535
+ readonly description: "Navigation Document must have a nav element with epub:type=\"toc\"";
1515
1536
  };
1516
1537
  readonly NAV_002: {
1517
1538
  readonly id: "NAV-002";