import { t as Capabilities } from "./detect-Db6GbKOm.js"; //#region src/stream.d.ts type OutputStream = NodeJS.WritableStream & { isTTY?: boolean; columns?: number; rows?: number; destroyed?: boolean; writableEnded?: boolean; }; //#endregion //#region src/capabilities/store.d.ts type StoreStdin = NodeJS.ReadableStream & { isTTY?: boolean; isRaw?: boolean; setRawMode?: (mode: boolean) => void; }; type StoreStdout = OutputStream; type CapabilitiesStore = { /** The current snapshot: environment-derived detection merged with every query answer received so far. Size is always fresh; the object identity only changes when something actually changed, so it's safe to compare. */ readonly current: Capabilities; /** Asks the terminal. The first call runs the full query; subsequent calls re-ask only the dynamic questions (theme colors, pixel geometry) and merge over the cached answers. No-op outside a TTY. Resolves with the updated snapshot. */ query: () => Promise; /** Subscribes to snapshot changes: query answers arriving, terminal resizes (including in-band pixel geometry), color scheme switches, and window focus changes. While subscribers exist (and a report feed is available), the store enables the supported report modes on the terminal and disables them again on the last unsubscribe. Returns an unsubscribe function. */ subscribe: (listener: (capabilities: Capabilities) => void, options?: { resizes?: boolean; }) => () => void; /** Feeds one parsed escape sequence from an input pipeline into the store. Returns `true` when the sequence was an unsolicited terminal report (color scheme, focus, in-band resize) and was consumed. Ink calls this for every escape sequence it reads; standalone apps that read stdin themselves can forward unrecognized sequences here. */ ingest: (sequence: string) => boolean; }; /** The capabilities store for a stream pair. Stores are cached per stdout, so standalone code and Ink components observing the same terminal share one snapshot and one set of query answers. */ declare const getCapabilities: (stdin?: StoreStdin, stdout?: StoreStdout) => CapabilitiesStore; /** The process's own terminal — the store for `process.stdin`/`process.stdout`. ```ts import { capabilities } from "@alchemy.run/sigil/capabilities"; capabilities.current.supports.hyperlinks; const fresh = await capabilities.query(); const unsubscribe = capabilities.subscribe((caps) => { console.log(caps.size, caps.theme.appearance); }); ``` */ declare const capabilities: CapabilitiesStore; //#endregion export { OutputStream as i, capabilities as n, getCapabilities as r, CapabilitiesStore as t };