@asciidoctor/core 4.0.0-alpha.2 → 4.0.0-alpha.4

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/types/index.d.ts CHANGED
@@ -26,6 +26,14 @@ export function load(input: string | string[] | Buffer, options?: any): Promise<
26
26
  * @returns {Promise<Document>} - the parsed Document
27
27
  */
28
28
  export function loadFile(filename: string, options?: any): Promise<Document>;
29
+ export type ProcessorDslInterface = import("./extensions.js").ProcessorDslInterface;
30
+ export type DocumentProcessorDslInterface = import("./extensions.js").DocumentProcessorDslInterface;
31
+ export type SyntaxProcessorDslInterface = import("./extensions.js").SyntaxProcessorDslInterface;
32
+ export type IncludeProcessorDslInterface = import("./extensions.js").IncludeProcessorDslInterface;
33
+ export type DocinfoProcessorDslInterface = import("./extensions.js").DocinfoProcessorDslInterface;
34
+ export type BlockProcessorDslInterface = import("./extensions.js").BlockProcessorDslInterface;
35
+ export type MacroProcessorDslInterface = import("./extensions.js").MacroProcessorDslInterface;
36
+ export type InlineMacroProcessorDslInterface = import("./extensions.js").InlineMacroProcessorDslInterface;
29
37
  import { Document } from './document.js';
30
38
  import { convert } from './convert.js';
31
39
  import { convertFile } from './convert.js';
@@ -47,6 +55,9 @@ import { SyntaxHighlighterBase } from './syntax_highlighter.js';
47
55
  import { LoggerManager } from './logging.js';
48
56
  import { MemoryLogger } from './logging.js';
49
57
  import { NullLogger } from './logging.js';
58
+ import { HttpCache } from './http_cache.js';
59
+ import { MemoryHttpCache } from './http_cache.js';
60
+ import { HttpCacheManager } from './http_cache.js';
50
61
  import { SafeMode } from './constants.js';
51
62
  import { ContentModel } from './constants.js';
52
63
  import { Timings } from './timings.js';
@@ -71,4 +82,4 @@ import { deriveBackendTraits } from './converter.js';
71
82
  import { DefaultFactory as DefaultSyntaxHighlighterFactory } from './syntax_highlighter.js';
72
83
  import Html5Converter from './converter/html5.js';
73
84
  import { SyntaxHighlighter } from './syntax_highlighter.js';
74
- export { convert, convertFile, Document, DocumentTitle, Author, Footnote, ImageReference, RevisionInfo, Logger, AbstractNode, AbstractBlock, Inline, Block, List, ListItem, Section, Reader, SyntaxHighlighterBase, LoggerManager, MemoryLogger, NullLogger, SafeMode, ContentModel, Timings, Registry, Processor, ProcessorExtension, Preprocessor, TreeProcessor, Postprocessor, IncludeProcessor, DocinfoProcessor, BlockProcessor, InlineMacroProcessor, BlockMacroProcessor, Extensions, Cursor, Converter as ConverterFactory, ConverterBase, CustomFactory as ConverterCustomFactory, DefaultConverterFactory, deriveBackendTraits, DefaultSyntaxHighlighterFactory, Html5Converter, SyntaxHighlighter };
85
+ export { convert, convertFile, Document, DocumentTitle, Author, Footnote, ImageReference, RevisionInfo, Logger, AbstractNode, AbstractBlock, Inline, Block, List, ListItem, Section, Reader, SyntaxHighlighterBase, LoggerManager, MemoryLogger, NullLogger, HttpCache, MemoryHttpCache, HttpCacheManager, SafeMode, ContentModel, Timings, Registry, Processor, ProcessorExtension, Preprocessor, TreeProcessor, Postprocessor, IncludeProcessor, DocinfoProcessor, BlockProcessor, InlineMacroProcessor, BlockMacroProcessor, Extensions, Cursor, Converter as ConverterFactory, ConverterBase, CustomFactory as ConverterCustomFactory, DefaultConverterFactory, deriveBackendTraits, DefaultSyntaxHighlighterFactory, Html5Converter, SyntaxHighlighter };
@@ -1,3 +1,16 @@
1
+
2
+ /**
3
+ * Run fn() within an async-local logger context so that all log calls via
4
+ * `this.logger` (from applyLogging) automatically route to the provided logger
5
+ * for the duration of the async execution chain.
6
+ *
7
+ * Falls back to global mutation in environments without node:async_hooks (e.g. browsers).
8
+ *
9
+ * @param {Logger|MemoryLogger|NullLogger} logger - The logger to activate.
10
+ * @param {() => any} fn - The function to execute within the logger context.
11
+ * @returns {Promise<any>}
12
+ */
13
+ export function withLogger(logger: Logger | MemoryLogger | NullLogger, fn: () => any): Promise<any>;
1
14
  /**
2
15
  * Apply the Logging mixin to a class prototype.
3
16
  *
@@ -120,12 +133,10 @@ export class MemoryLogger {
120
133
  empty(): boolean;
121
134
  }
122
135
  /** Logger that discards all messages but still tracks the maximum severity. */
123
- export class NullLogger {
136
+ export class NullLogger extends Logger {
124
137
  static create(): NullLogger;
138
+ constructor();
125
139
  level: number;
126
- _maxSeverity: number;
127
- get maxSeverity(): number;
128
- getMaxSeverity(): number;
129
140
  add(severity: any): boolean;
130
141
  log(severity: any): boolean;
131
142
  debug(): boolean;
@@ -54,11 +54,6 @@ export class PathResolver {
54
54
  * @returns {string} The posixified path.
55
55
  */
56
56
  posixify(path: string): string;
57
- /**
58
- * @param {string} path
59
- * @returns {string}
60
- */
61
- posixfy(path: string): string;
62
57
  /**
63
58
  * Expand the path by resolving parent references (..) and removing self references (.).
64
59
  * @param {string} path
@@ -6,5 +6,6 @@ declare class StylesheetsClass {
6
6
  get primaryStylesheetName(): string;
7
7
  primaryStylesheetData(): Promise<string>;
8
8
  embedPrimaryStylesheet(): Promise<string>;
9
+ writePrimaryStylesheet(stylesoutdir: any): Promise<boolean>;
9
10
  }
10
11
  export {};
package/types/table.d.ts CHANGED
@@ -113,7 +113,7 @@ declare class Cell extends AbstractBlock<string | string[]> {
113
113
  imageUri(targetImage: string, assetDirKey?: string): Promise<string>;
114
114
  mediaUri(target: string, assetDirKey?: string): string;
115
115
  generateDataUri(targetImage: string, assetDirKey?: string | null): Promise<string>;
116
- generateDataUriFromUri(imageUri: string, cacheUri?: boolean): Promise<string>;
116
+ generateDataUriFromUri(imageUri: string): Promise<string>;
117
117
  normalizeAssetPath(assetRef: string, assetName?: string, autocorrect?: boolean): string;
118
118
  normalizeSystemPath(target: string, start?: string | null, jail?: string | null, opts?: any): string;
119
119
  normalizeWebPath(target: string, start?: string | null, preserveUriTarget?: boolean): string;