@oh-my-pi/pi-utils 17.2.9 → 17.2.11

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.
Files changed (84) hide show
  1. package/CHANGELOG.md +31 -0
  2. package/dist/types/acp/connection.d.ts +118 -0
  3. package/dist/types/acp/protocol.d.ts +526 -0
  4. package/dist/types/acp/schema.d.ts +41 -0
  5. package/dist/types/acp/stream.d.ts +8 -0
  6. package/dist/types/acp/transport.d.ts +81 -0
  7. package/dist/types/acp.d.ts +6 -0
  8. package/dist/types/browsers.d.ts +68 -0
  9. package/dist/types/chalk.d.ts +125 -0
  10. package/dist/types/dates.d.ts +7 -0
  11. package/dist/types/docx/converter.d.ts +46 -0
  12. package/dist/types/docx/xml.d.ts +26 -0
  13. package/dist/types/docx/zip.d.ts +6 -0
  14. package/dist/types/docx.d.ts +11 -0
  15. package/dist/types/dom/core.d.ts +431 -0
  16. package/dist/types/dom/parser.d.ts +7 -0
  17. package/dist/types/dom/selector.d.ts +5 -0
  18. package/dist/types/dom.d.ts +5 -0
  19. package/dist/types/frontmatter.d.ts +21 -0
  20. package/dist/types/headers.d.ts +34 -0
  21. package/dist/types/logger/rotating-file.d.ts +18 -0
  22. package/dist/types/lru.d.ts +46 -0
  23. package/dist/types/marked/core.d.ts +445 -0
  24. package/dist/types/marked.d.ts +2 -0
  25. package/dist/types/postmortem.d.ts +14 -0
  26. package/dist/types/procmgr.d.ts +16 -0
  27. package/dist/types/prompt.d.ts +2 -2
  28. package/dist/types/readability/readability.d.ts +9 -0
  29. package/dist/types/readability/readerable.d.ts +10 -0
  30. package/dist/types/readability/types.d.ts +70 -0
  31. package/dist/types/readability.d.ts +4 -0
  32. package/dist/types/template.d.ts +62 -0
  33. package/dist/types/turndown/gfm.d.ts +11 -0
  34. package/dist/types/turndown/html.d.ts +5 -0
  35. package/dist/types/turndown/service.d.ts +21 -0
  36. package/dist/types/turndown/types.d.ts +70 -0
  37. package/dist/types/turndown.d.ts +4 -0
  38. package/dist/types/vterm/buffer.d.ts +99 -0
  39. package/dist/types/vterm/terminal.d.ts +44 -0
  40. package/dist/types/vterm.d.ts +8 -0
  41. package/dist/types/xml.d.ts +31 -0
  42. package/package.json +2 -5
  43. package/src/acp/connection.ts +344 -0
  44. package/src/acp/protocol.ts +466 -0
  45. package/src/acp/schema.ts +160 -0
  46. package/src/acp/stream.ts +82 -0
  47. package/src/acp/transport.ts +213 -0
  48. package/src/acp.ts +6 -0
  49. package/src/browsers.ts +501 -0
  50. package/src/chalk.ts +312 -0
  51. package/src/dates.ts +194 -0
  52. package/src/docx/converter.ts +681 -0
  53. package/src/docx/xml.ts +166 -0
  54. package/src/docx/zip.ts +87 -0
  55. package/src/docx.ts +20 -0
  56. package/src/dom/core.ts +1254 -0
  57. package/src/dom/parser.ts +370 -0
  58. package/src/dom/selector.ts +290 -0
  59. package/src/dom.ts +33 -0
  60. package/src/frontmatter.ts +44 -14
  61. package/src/headers.ts +167 -0
  62. package/src/logger/rotating-file.ts +149 -0
  63. package/src/logger.ts +12 -28
  64. package/src/lru.ts +185 -0
  65. package/src/marked/core.ts +1576 -0
  66. package/src/marked.ts +2 -0
  67. package/src/postmortem.ts +44 -1
  68. package/src/procmgr.ts +21 -4
  69. package/src/prompt.ts +5 -22
  70. package/src/readability/readability.ts +533 -0
  71. package/src/readability/readerable.ts +51 -0
  72. package/src/readability/types.ts +72 -0
  73. package/src/readability.ts +11 -0
  74. package/src/template.ts +586 -0
  75. package/src/turndown/gfm.ts +106 -0
  76. package/src/turndown/html.ts +257 -0
  77. package/src/turndown/service.ts +334 -0
  78. package/src/turndown/types.ts +81 -0
  79. package/src/turndown.ts +5 -0
  80. package/src/vterm/buffer.ts +218 -0
  81. package/src/vterm/terminal.ts +773 -0
  82. package/src/vterm.ts +8 -0
  83. package/src/xml.ts +313 -0
  84. package/src/winston-daily-rotate-file.d.ts +0 -6
@@ -0,0 +1,41 @@
1
+ import type { ForkSessionResponse, LoadSessionResponse, NewSessionResponse, PromptResponse, SessionNotification } from "./protocol.js";
2
+ /** Validation failure compatible with the used Zod error surface. */
3
+ export interface ValidationError {
4
+ issues: Array<{
5
+ path: Array<string | number>;
6
+ message: string;
7
+ }>;
8
+ }
9
+ /** Successful validation result. */
10
+ export interface ValidationSuccess<T> {
11
+ success: true;
12
+ data: T;
13
+ }
14
+ /** Failed validation result. */
15
+ export interface ValidationFailure {
16
+ success: false;
17
+ error: ValidationError;
18
+ }
19
+ /** Runtime validator compatible with the used schema call shape. */
20
+ export interface Validator<T> {
21
+ safeParse(value: unknown): ValidationSuccess<T> | ValidationFailure;
22
+ parse(value: unknown): T;
23
+ }
24
+ /** Validator for new-session responses. */
25
+ export declare const zNewSessionResponse: Validator<NewSessionResponse>;
26
+ /** Validator for load-session responses. */
27
+ export declare const zLoadSessionResponse: Validator<LoadSessionResponse>;
28
+ /** Validator for fork-session responses. */
29
+ export declare const zForkSessionResponse: Validator<ForkSessionResponse>;
30
+ /** Validator for prompt responses. */
31
+ export declare const zPromptResponse: Validator<PromptResponse>;
32
+ /** Validator for session notifications. */
33
+ export declare const zSessionNotification: Validator<SessionNotification>;
34
+ /** ACP runtime validators. */
35
+ export declare const schema: {
36
+ readonly zNewSessionResponse: Validator<NewSessionResponse>;
37
+ readonly zLoadSessionResponse: Validator<LoadSessionResponse>;
38
+ readonly zForkSessionResponse: Validator<ForkSessionResponse>;
39
+ readonly zPromptResponse: Validator<PromptResponse>;
40
+ readonly zSessionNotification: Validator<SessionNotification>;
41
+ };
@@ -0,0 +1,8 @@
1
+ import type { AnyMessage } from "./transport.js";
2
+ /** Bidirectional JSON-RPC message transport. */
3
+ export interface Stream {
4
+ writable: WritableStream<AnyMessage>;
5
+ readable: ReadableStream<AnyMessage>;
6
+ }
7
+ /** Converts byte-oriented newline-delimited JSON streams to an ACP message transport. */
8
+ export declare function ndJsonStream(output: WritableStream<Uint8Array>, input: ReadableStream<Uint8Array>): Stream;
@@ -0,0 +1,81 @@
1
+ import type { MaybePromise } from "./protocol.js";
2
+ import type { Stream } from "./stream.js";
3
+ /** JSON-RPC request identifier. */
4
+ export type JsonRpcId = string | number | null;
5
+ /** JSON-RPC request. */
6
+ export interface AnyRequest {
7
+ jsonrpc: "2.0";
8
+ id: JsonRpcId;
9
+ method: string;
10
+ params?: unknown;
11
+ }
12
+ /** JSON-RPC notification. */
13
+ export interface AnyNotification {
14
+ jsonrpc: "2.0";
15
+ method: string;
16
+ params?: unknown;
17
+ }
18
+ /** JSON-RPC error payload. */
19
+ export interface ErrorResponse {
20
+ code: number;
21
+ message: string;
22
+ data?: unknown;
23
+ }
24
+ /** JSON-RPC response. */
25
+ export type AnyResponse = {
26
+ jsonrpc: "2.0";
27
+ id: JsonRpcId;
28
+ } & ({
29
+ result: unknown;
30
+ } | {
31
+ error: ErrorResponse;
32
+ });
33
+ /** Any JSON-RPC wire message. */
34
+ export type AnyMessage = AnyRequest | AnyNotification | AnyResponse;
35
+ /** Error returned by a JSON-RPC peer or handler. */
36
+ export declare class RequestError extends Error {
37
+ /** JSON-RPC error code. */
38
+ readonly code: number;
39
+ /** Optional protocol error data. */
40
+ readonly data?: unknown;
41
+ constructor(code: number, message: string, data?: unknown);
42
+ /** Creates a JSON parse error. */
43
+ static parseError(data?: unknown, additionalMessage?: string): RequestError;
44
+ /** Creates an invalid-request error. */
45
+ static invalidRequest(data?: unknown, additionalMessage?: string): RequestError;
46
+ /** Creates a method-not-found error. */
47
+ static methodNotFound(method: string): RequestError;
48
+ /** Creates an invalid-parameters error. */
49
+ static invalidParams(data?: unknown, additionalMessage?: string): RequestError;
50
+ /** Creates an internal error. */
51
+ static internalError(data?: unknown, additionalMessage?: string): RequestError;
52
+ /** Creates a cancellation error. */
53
+ static requestCancelled(data?: unknown, additionalMessage?: string): RequestError;
54
+ /** Creates an authentication-required error. */
55
+ static authRequired(data?: unknown, additionalMessage?: string): RequestError;
56
+ /** Creates a resource-not-found error. */
57
+ static resourceNotFound(uri?: string): RequestError;
58
+ /** Converts this error into a JSON-RPC result. */
59
+ toResult(): {
60
+ error: ErrorResponse;
61
+ };
62
+ /** Converts this error into a JSON-RPC error payload. */
63
+ toErrorResponse(): ErrorResponse;
64
+ }
65
+ type Dispatcher = (method: string, params: unknown, notification: boolean) => MaybePromise<unknown>;
66
+ /** Correlated bidirectional JSON-RPC connection. */
67
+ export declare class RpcConnection {
68
+ #private;
69
+ constructor(stream: Stream, dispatcher: Dispatcher);
70
+ /** Signal aborted when the stream closes. */
71
+ get signal(): AbortSignal;
72
+ /** Promise resolved when the stream closes. */
73
+ get closed(): Promise<void>;
74
+ /** Sends a correlated JSON-RPC request. */
75
+ request<Response>(method: string, params?: unknown): Promise<Response>;
76
+ /** Sends a JSON-RPC notification. */
77
+ notify(method: string, params?: unknown): Promise<void>;
78
+ /** Closes the connection and rejects outstanding requests. */
79
+ close(error?: unknown): void;
80
+ }
81
+ export {};
@@ -0,0 +1,6 @@
1
+ /** Behavior-compatible reimplementation of @agentclientprotocol/sdk's used surface. */
2
+ export * from "./acp/connection.js";
3
+ export * from "./acp/protocol.js";
4
+ export * from "./acp/schema.js";
5
+ export * from "./acp/stream.js";
6
+ export * from "./acp/transport.js";
@@ -0,0 +1,68 @@
1
+ /** Behavior-compatible reimplementation of @puppeteer/browsers' used surface. */
2
+ /** Supported browser products. */
3
+ export declare enum Browser {
4
+ CHROME = "chrome",
5
+ CHROMEHEADLESSSHELL = "chrome-headless-shell",
6
+ CHROMIUM = "chromium",
7
+ FIREFOX = "firefox",
8
+ CHROMEDRIVER = "chromedriver"
9
+ }
10
+ /** Browser download platform identifiers. */
11
+ export declare enum BrowserPlatform {
12
+ LINUX = "linux",
13
+ LINUX_ARM = "linux_arm",
14
+ MAC = "mac",
15
+ MAC_ARM = "mac_arm",
16
+ WIN32 = "win32",
17
+ WIN64 = "win64"
18
+ }
19
+ /** Chrome-for-Testing release channel tags accepted by {@link resolveBuildId}. */
20
+ export declare enum BrowserTag {
21
+ CANARY = "canary",
22
+ NIGHTLY = "nightly",
23
+ BETA = "beta",
24
+ DEV = "dev",
25
+ DEVEDITION = "devedition",
26
+ STABLE = "stable",
27
+ ESR = "esr",
28
+ LATEST = "latest"
29
+ }
30
+ /** Download progress reported while a browser archive is streamed to disk. */
31
+ export interface BrowserDownloadProgress {
32
+ downloadedBytes: number;
33
+ totalBytes: number;
34
+ }
35
+ /** Inputs used to locate an installed browser executable. */
36
+ export interface ComputeExecutablePathOptions {
37
+ browser: Browser;
38
+ buildId: string;
39
+ cacheDir: string;
40
+ platform?: BrowserPlatform;
41
+ }
42
+ /** Inputs used to download and install a browser. */
43
+ export interface InstallOptions extends ComputeExecutablePathOptions {
44
+ baseUrl?: string;
45
+ downloadProgressCallback?: (progress: BrowserDownloadProgress) => void;
46
+ }
47
+ /** Metadata for one browser installation found in a Puppeteer cache. */
48
+ export interface InstalledBrowser {
49
+ browser: Browser;
50
+ buildId: string;
51
+ platform: BrowserPlatform;
52
+ path: string;
53
+ executablePath: string;
54
+ }
55
+ /** Detect the current host's Puppeteer browser platform. */
56
+ export declare function detectBrowserPlatform(): BrowserPlatform | undefined;
57
+ /** Resolve a Chrome-for-Testing channel, milestone, or build prefix to a full build ID. */
58
+ export declare function resolveBuildId(browser: Browser, _platform: BrowserPlatform, tag: string | BrowserTag): Promise<string>;
59
+ /** Return the Chrome-for-Testing archive URL for a browser build. */
60
+ export declare function getDownloadUrl(browser: Browser, platform: BrowserPlatform, buildId: string, baseUrl?: string): URL;
61
+ /** Compute the executable path in Puppeteer's cache layout. */
62
+ export declare function computeExecutablePath(options: ComputeExecutablePathOptions): string;
63
+ /** Scan a Puppeteer cache for browser installation directories. */
64
+ export declare function getInstalledBrowsers(options: {
65
+ cacheDir: string;
66
+ }): Promise<InstalledBrowser[]>;
67
+ /** Download and unpack Chrome into Puppeteer's existing cache layout. */
68
+ export declare function install(options: InstallOptions): Promise<InstalledBrowser>;
@@ -0,0 +1,125 @@
1
+ /** Behavior-compatible reimplementation of chalk's used surface. */
2
+ /** ANSI color capability level. */
3
+ export type ColorLevel = 0 | 1 | 2 | 3;
4
+ /** Details about a terminal's supported color depth. */
5
+ export interface ColorSupport {
6
+ /** Highest supported ANSI color level. */
7
+ level: ColorLevel;
8
+ /** Whether the terminal supports the basic 16 colors. */
9
+ hasBasic: boolean;
10
+ /** Whether the terminal supports the 256-color palette. */
11
+ has256: boolean;
12
+ /** Whether the terminal supports 24-bit color. */
13
+ has16m: boolean;
14
+ }
15
+ interface ChalkOptions {
16
+ level?: ColorLevel;
17
+ }
18
+ /** A callable, chainable ANSI text formatter. */
19
+ export interface ChalkInstance {
20
+ (...text: unknown[]): string;
21
+ /** Active color capability level. */
22
+ level: ColorLevel;
23
+ /** Reset every active terminal style. */
24
+ readonly reset: ChalkInstance;
25
+ /** Render bold text. */
26
+ readonly bold: ChalkInstance;
27
+ /** Render faint text. */
28
+ readonly dim: ChalkInstance;
29
+ /** Render italic text. */
30
+ readonly italic: ChalkInstance;
31
+ /** Render underlined text. */
32
+ readonly underline: ChalkInstance;
33
+ /** Swap foreground and background colors. */
34
+ readonly inverse: ChalkInstance;
35
+ /** Render struck-through text. */
36
+ readonly strikethrough: ChalkInstance;
37
+ /** Render black text. */
38
+ readonly black: ChalkInstance;
39
+ /** Render red text. */
40
+ readonly red: ChalkInstance;
41
+ /** Render green text. */
42
+ readonly green: ChalkInstance;
43
+ /** Render yellow text. */
44
+ readonly yellow: ChalkInstance;
45
+ /** Render blue text. */
46
+ readonly blue: ChalkInstance;
47
+ /** Render magenta text. */
48
+ readonly magenta: ChalkInstance;
49
+ /** Render cyan text. */
50
+ readonly cyan: ChalkInstance;
51
+ /** Render white text. */
52
+ readonly white: ChalkInstance;
53
+ /** Render gray text. */
54
+ readonly gray: ChalkInstance;
55
+ /** Alias for gray text. */
56
+ readonly grey: ChalkInstance;
57
+ /** Render bright black text. */
58
+ readonly blackBright: ChalkInstance;
59
+ /** Render bright red text. */
60
+ readonly redBright: ChalkInstance;
61
+ /** Render bright green text. */
62
+ readonly greenBright: ChalkInstance;
63
+ /** Render bright yellow text. */
64
+ readonly yellowBright: ChalkInstance;
65
+ /** Render bright blue text. */
66
+ readonly blueBright: ChalkInstance;
67
+ /** Render bright magenta text. */
68
+ readonly magentaBright: ChalkInstance;
69
+ /** Render bright cyan text. */
70
+ readonly cyanBright: ChalkInstance;
71
+ /** Render bright white text. */
72
+ readonly whiteBright: ChalkInstance;
73
+ /** Render text on a black background. */
74
+ readonly bgBlack: ChalkInstance;
75
+ /** Render text on a red background. */
76
+ readonly bgRed: ChalkInstance;
77
+ /** Render text on a green background. */
78
+ readonly bgGreen: ChalkInstance;
79
+ /** Render text on a yellow background. */
80
+ readonly bgYellow: ChalkInstance;
81
+ /** Render text on a blue background. */
82
+ readonly bgBlue: ChalkInstance;
83
+ /** Render text on a magenta background. */
84
+ readonly bgMagenta: ChalkInstance;
85
+ /** Render text on a cyan background. */
86
+ readonly bgCyan: ChalkInstance;
87
+ /** Render text on a white background. */
88
+ readonly bgWhite: ChalkInstance;
89
+ /** Render text on a gray background. */
90
+ readonly bgGray: ChalkInstance;
91
+ /** Alias for a gray background. */
92
+ readonly bgGrey: ChalkInstance;
93
+ /** Render text on a bright black background. */
94
+ readonly bgBlackBright: ChalkInstance;
95
+ /** Render text on a bright red background. */
96
+ readonly bgRedBright: ChalkInstance;
97
+ /** Render text on a bright green background. */
98
+ readonly bgGreenBright: ChalkInstance;
99
+ /** Render text on a bright yellow background. */
100
+ readonly bgYellowBright: ChalkInstance;
101
+ /** Render text on a bright blue background. */
102
+ readonly bgBlueBright: ChalkInstance;
103
+ /** Render text on a bright magenta background. */
104
+ readonly bgMagentaBright: ChalkInstance;
105
+ /** Render text on a bright cyan background. */
106
+ readonly bgCyanBright: ChalkInstance;
107
+ /** Render text on a bright white background. */
108
+ readonly bgWhiteBright: ChalkInstance;
109
+ /** Render text with an arbitrary hexadecimal foreground color. */
110
+ hex(color: string): ChalkInstance;
111
+ }
112
+ /** Constructor for an independently configured chalk formatter. */
113
+ export interface ChalkConstructor {
114
+ new (options?: ChalkOptions): ChalkInstance;
115
+ }
116
+ /** Detect an ANSI color level from terminal environment and TTY state. */
117
+ export declare function detectColorLevel(environment: NodeJS.ProcessEnv, isTTY: boolean): ColorLevel;
118
+ /** Color support detected for standard output. */
119
+ export declare const supportsColor: false | ColorSupport;
120
+ /** Color support detected for standard error. */
121
+ export declare const supportsColorStderr: false | ColorSupport;
122
+ /** Construct an independently configured chalk formatter. */
123
+ export declare const Chalk: ChalkConstructor;
124
+ declare const chalk: ChalkInstance;
125
+ export default chalk;
@@ -0,0 +1,7 @@
1
+ /** Behavior-compatible reimplementation of date-fns's used surface. */
2
+ /** Format a date with the supported date-fns v4 tokens and quoted literals. */
3
+ export declare function format(value: Date | number, pattern: string): string;
4
+ /** Describe the distance from a date to now using date-fns's English thresholds. */
5
+ export declare function formatDistanceToNow(value: Date | number, options?: {
6
+ addSuffix?: boolean;
7
+ }): string;
@@ -0,0 +1,46 @@
1
+ /** A mammoth-compatible diagnostic emitted while converting a document. */
2
+ export interface DocxMessage {
3
+ readonly type: "warning" | "error";
4
+ readonly message: string;
5
+ }
6
+ /** The HTML and diagnostics produced by a DOCX conversion. */
7
+ export interface DocxResult {
8
+ readonly value: string;
9
+ readonly messages: DocxMessage[];
10
+ }
11
+ /** An in-memory or filesystem DOCX input. */
12
+ export type DocxInput = {
13
+ readonly buffer: Uint8Array;
14
+ readonly path?: never;
15
+ } | {
16
+ readonly path: string;
17
+ readonly buffer?: never;
18
+ };
19
+ /** An image exposed to a custom image converter. */
20
+ export interface DocxImage {
21
+ readonly contentType: string;
22
+ readonly altText: string;
23
+ /** Read the image payload using mammoth's used encoding surface. */
24
+ read(encoding: "base64"): Promise<string>;
25
+ }
26
+ /** HTML attributes returned by a custom image converter. */
27
+ export type ImageAttributes = Readonly<Record<string, string>>;
28
+ /** A callback that maps an embedded DOCX image to HTML attributes. */
29
+ export type ImageAttributeConverter = (image: DocxImage) => ImageAttributes | Promise<ImageAttributes>;
30
+ /** An image converter created by `images.imgElement`. */
31
+ export interface ImageConverter {
32
+ readonly convert: ImageAttributeConverter;
33
+ }
34
+ /** Options supported by the behavior-compatible DOCX converter. */
35
+ export interface ConvertToHtmlOptions {
36
+ readonly convertImage?: ImageConverter;
37
+ readonly styleMap?: string | readonly string[];
38
+ readonly includeDefaultStyleMap?: boolean;
39
+ }
40
+ /** Mammoth-shaped helpers for configuring embedded image conversion. */
41
+ export declare const images: {
42
+ /** Wrap an image-to-attributes callback for `convertToHtml`. */
43
+ imgElement(convert: ImageAttributeConverter): ImageConverter;
44
+ };
45
+ /** Convert a DOCX buffer or path to mammoth-compatible HTML. */
46
+ export declare function convertToHtml(input: DocxInput, options?: ConvertToHtmlOptions): Promise<DocxResult>;
@@ -0,0 +1,26 @@
1
+ interface XmlText {
2
+ readonly kind: "text";
3
+ readonly value: string;
4
+ }
5
+ /** A minimal XML element used by the DOCX reader. */
6
+ export interface XmlElement {
7
+ readonly kind: "element";
8
+ readonly name: string;
9
+ readonly attributes: ReadonlyMap<string, string>;
10
+ readonly children: readonly XmlNode[];
11
+ }
12
+ /** A node in the DOCX reader's minimal XML tree. */
13
+ export type XmlNode = XmlElement | XmlText;
14
+ /** Return the namespace-independent part of an XML qualified name. */
15
+ export declare function localName(name: string): string;
16
+ /** Parse XML into a small namespace-tolerant element tree. */
17
+ export declare function parseXml(source: string): XmlElement;
18
+ /** Return direct element children, optionally filtered by local name. */
19
+ export declare function childElements(element: XmlElement, name?: string): XmlElement[];
20
+ /** Return the first direct child with the given local name. */
21
+ export declare function firstChild(element: XmlElement | undefined, name: string): XmlElement | undefined;
22
+ /** Return an attribute by qualified or namespace-independent name. */
23
+ export declare function attribute(element: XmlElement | undefined, name: string): string | undefined;
24
+ /** Return all descendant elements with a given local name. */
25
+ export declare function descendants(element: XmlElement, name: string): XmlElement[];
26
+ export {};
@@ -0,0 +1,6 @@
1
+ /** The decompressed members of a DOCX ZIP package. */
2
+ export type ZipEntries = ReadonlyMap<string, Uint8Array>;
3
+ /** Decode a ZIP package by walking its central directory. */
4
+ export declare function readZip(bytes: Uint8Array): ZipEntries;
5
+ /** Decode a ZIP member as UTF-8 text. */
6
+ export declare function readZipText(entries: ZipEntries, name: string): string | undefined;
@@ -0,0 +1,11 @@
1
+ /** Behavior-compatible reimplementation of mammoth's used surface. */
2
+ export { type ConvertToHtmlOptions, convertToHtml, type DocxImage, type DocxInput, type DocxMessage, type DocxResult, type ImageAttributeConverter, type ImageAttributes, type ImageConverter, images, } from "./docx/converter.js";
3
+ import { convertToHtml } from "./docx/converter.js";
4
+ /** Mammoth-shaped default export for drop-in consumer imports. */
5
+ declare const docx: {
6
+ convertToHtml: typeof convertToHtml;
7
+ images: {
8
+ imgElement(convert: import("./docx.js").ImageAttributeConverter): import("./docx.js").ImageConverter;
9
+ };
10
+ };
11
+ export default docx;