tftsr-devops_investigation/node_modules/react-markdown/lib/index.d.ts

155 lines
4.3 KiB
TypeScript
Raw Normal View History

feat: initial implementation of TFTSR IT Triage & RCA application Implements Phases 1-8 of the TFTSR implementation plan. Rust backend (Tauri 2.x, src-tauri/): - Multi-provider AI: OpenAI-compatible, Anthropic, Gemini, Mistral, Ollama - PII detection engine: 11 regex patterns with overlap resolution - SQLCipher AES-256 encrypted database with 10 versioned migrations - 28 Tauri IPC commands for triage, analysis, document, and system ops - Ollama: hardware probe, model recommendations, pull/delete with events - RCA and blameless post-mortem Markdown document generators - PDF export via printpdf - Audit log: SHA-256 hash of every external data send - Integration stubs for Confluence, ServiceNow, Azure DevOps (v0.2) Frontend (React 18 + TypeScript + Vite, src/): - 9 pages: full triage workflow NewIssue→LogUpload→Triage→Resolution→RCA→Postmortem→History+Settings - 7 components: ChatWindow, TriageProgress, PiiDiffViewer, DocEditor, HardwareReport, ModelSelector, UI primitives - 3 Zustand stores: session, settings (persisted), history - Type-safe tauriCommands.ts matching Rust backend types exactly - 8 IT domain system prompts (Linux, Windows, Network, K8s, DB, Virt, HW, Obs) DevOps: - .woodpecker/test.yml: rustfmt, clippy, cargo test, tsc, vitest on every push - .woodpecker/release.yml: linux/amd64 + linux/arm64 builds, Gogs release upload Verified: - cargo check: zero errors - tsc --noEmit: zero errors - vitest run: 13/13 unit tests passing Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
2026-03-15 03:36:25 +00:00
/**
* Component to render markdown.
*
* This is a synchronous component.
* When using async plugins,
* see {@linkcode MarkdownAsync} or {@linkcode MarkdownHooks}.
*
* @param {Readonly<Options>} options
* Props.
* @returns {ReactElement}
* React element.
*/
export function Markdown(options: Readonly<Options>): ReactElement;
/**
* Component to render markdown with support for async plugins
* through async/await.
*
* Components returning promises are supported on the server.
* For async support on the client,
* see {@linkcode MarkdownHooks}.
*
* @param {Readonly<Options>} options
* Props.
* @returns {Promise<ReactElement>}
* Promise to a React element.
*/
export function MarkdownAsync(options: Readonly<Options>): Promise<ReactElement>;
/**
* Component to render markdown with support for async plugins through hooks.
*
* This uses `useEffect` and `useState` hooks.
* Hooks run on the client and do not immediately render something.
* For async support on the server,
* see {@linkcode MarkdownAsync}.
*
* @param {Readonly<Options>} options
* Props.
* @returns {ReactElement}
* React element.
*/
export function MarkdownHooks(options: Readonly<Options>): ReactElement;
/**
* Make a URL safe.
*
* @satisfies {UrlTransform}
* @param {string} value
* URL.
* @returns {string}
* Safe URL.
*/
export function defaultUrlTransform(value: string): string;
/**
* Filter elements.
*/
export type AllowElement = (element: Readonly<Element>, index: number, parent: Readonly<Parents> | undefined) => boolean | null | undefined;
/**
* Extra fields we pass.
*/
export type ExtraProps = {
/**
* passed when `passNode` is on.
*/
node?: Element | undefined;
};
/**
* Map tag names to components.
*/
export type Components = { [Key in Extract<ElementType, string>]?: ElementType<ComponentProps<Key> & ExtraProps>; };
/**
* Deprecation.
*/
export type Deprecation = {
/**
* Old field.
*/
from: string;
/**
* ID in readme.
*/
id: string;
/**
* New field.
*/
to?: keyof Options;
};
/**
* Configuration.
*/
export type Options = {
/**
* Filter elements (optional);
* `allowedElements` / `disallowedElements` is used first.
*/
allowElement?: AllowElement | null | undefined;
/**
* Tag names to allow (default: all tag names);
* cannot combine w/ `disallowedElements`.
*/
allowedElements?: ReadonlyArray<string> | null | undefined;
/**
* Markdown.
*/
children?: string | null | undefined;
/**
* Wrap in a `div` with this class name.
*/
className?: string | null | undefined;
/**
* Map tag names to components.
*/
components?: Components | null | undefined;
/**
* Tag names to disallow (default: `[]`);
* cannot combine w/ `allowedElements`.
*/
disallowedElements?: ReadonlyArray<string> | null | undefined;
/**
* List of rehype plugins to use.
*/
rehypePlugins?: PluggableList | null | undefined;
/**
* List of remark plugins to use.
*/
remarkPlugins?: PluggableList | null | undefined;
/**
* Options to pass through to `remark-rehype`.
*/
remarkRehypeOptions?: Readonly<RemarkRehypeOptions> | null | undefined;
/**
* Ignore HTML in markdown completely (default: `false`).
*/
skipHtml?: boolean | null | undefined;
/**
* Extract (unwrap) whats in disallowed elements (default: `false`);
* normally when say `strong` is not allowed, it and its children are dropped,
* with `unwrapDisallowed` the element itself is replaced by its children.
*/
unwrapDisallowed?: boolean | null | undefined;
/**
* Change URLs (default: `defaultUrlTransform`)
*/
urlTransform?: UrlTransform | null | undefined;
};
/**
* Transform all URLs.
*/
export type UrlTransform = (url: string, key: string, node: Readonly<Element>) => string | null | undefined;
import type { ReactElement } from 'react';
import type { Element } from 'hast';
import type { Parents } from 'hast';
import type { ElementType } from 'react';
import type { ComponentProps } from 'react';
import type { PluggableList } from 'unified';
import type { Options as RemarkRehypeOptions } from 'remark-rehype';
//# sourceMappingURL=index.d.ts.map