import { Data, Schema, Config } from 'effect'; import * as _effuse_core from '@effuse/core'; import { EffuseChild } from '@effuse/core'; import * as effect_Cause from 'effect/Cause'; import * as effect_Types from 'effect/Types'; /** * MIT License * * Copyright (c) 2025 Chris M. Perez * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ type InkComponents = { readonly h1?: unknown; readonly h2?: unknown; readonly h3?: unknown; readonly h4?: unknown; readonly h5?: unknown; readonly h6?: unknown; readonly p?: unknown; readonly a?: unknown; readonly img?: unknown; readonly pre?: unknown; readonly code?: unknown; readonly blockquote?: unknown; readonly ul?: unknown; readonly ol?: unknown; readonly li?: unknown; readonly hr?: unknown; readonly table?: unknown; readonly thead?: unknown; readonly tbody?: unknown; readonly tr?: unknown; readonly th?: unknown; readonly td?: unknown; readonly strong?: unknown; readonly em?: unknown; readonly del?: unknown; readonly br?: unknown; readonly [key: string]: unknown; }; /** Backward-compatible alias. Prefer `InkComponents` in new code. */ type ComponentMap = InkComponents; declare const transformDocument: (doc: DocumentNode, components?: InkComponents) => EffuseChild[]; interface SourcePosition { readonly line: number; readonly column: number; readonly offset: number; } interface SourceRange { readonly start: SourcePosition; readonly end: SourcePosition; } interface BaseNodeFields { readonly position?: SourceRange; } type InlineNode = Data.TaggedEnum<{ Text: BaseNodeFields & { readonly value: string; }; InlineCode: BaseNodeFields & { readonly value: string; }; Emphasis: BaseNodeFields & { readonly style: 'italic' | 'bold' | 'strikethrough'; readonly children: InlineNode[]; }; Link: BaseNodeFields & { readonly url: string; readonly title?: string; readonly children: InlineNode[]; }; Image: BaseNodeFields & { readonly url: string; readonly alt: string; readonly title?: string; }; LineBreak: BaseNodeFields; InlineComponent: BaseNodeFields & { readonly name: string; readonly props: Record; readonly children: MarkdownNode[]; readonly slots: Record; readonly selfClosing: boolean; }; }>; declare const TextNode: Data.Case.Constructor<{ readonly _tag: "Text"; readonly position?: SourceRange; readonly value: string; }, "_tag">; type TextNode = Extract; declare const InlineCodeNode: Data.Case.Constructor<{ readonly _tag: "InlineCode"; readonly position?: SourceRange; readonly value: string; }, "_tag">; type InlineCodeNode = Extract; declare const EmphasisNode: Data.Case.Constructor<{ readonly _tag: "Emphasis"; readonly position?: SourceRange; readonly style: "italic" | "bold" | "strikethrough"; readonly children: InlineNode[]; }, "_tag">; type EmphasisNode = Extract; declare const LinkNode: Data.Case.Constructor<{ readonly _tag: "Link"; readonly position?: SourceRange; readonly url: string; readonly title?: string; readonly children: InlineNode[]; }, "_tag">; type LinkNode = Extract; declare const ImageNode: Data.Case.Constructor<{ readonly _tag: "Image"; readonly position?: SourceRange; readonly url: string; readonly alt: string; readonly title?: string; }, "_tag">; type ImageNode = Extract; type ListItemNode = { readonly _tag: 'ListItem'; readonly position?: SourceRange; readonly checked?: boolean; readonly children: BlockNode[]; }; declare const ListItemNode: (args: Omit) => ListItemNode; type TableRowNode = { readonly _tag: 'TableRow'; readonly position?: SourceRange; readonly cells: TableCellNode[]; }; declare const TableRowNode: (args: Omit) => TableRowNode; type TableCellNode = { readonly _tag: 'TableCell'; readonly position?: SourceRange; readonly children: InlineNode[]; }; declare const TableCellNode: (args: Omit) => TableCellNode; type BlockNode = Data.TaggedEnum<{ Heading: BaseNodeFields & { readonly level: 1 | 2 | 3 | 4 | 5 | 6; readonly children: InlineNode[]; }; Paragraph: BaseNodeFields & { readonly children: InlineNode[]; }; CodeBlock: BaseNodeFields & { readonly language?: string; readonly code: string; }; Blockquote: BaseNodeFields & { readonly children: BlockNode[]; }; List: BaseNodeFields & { readonly ordered: boolean; readonly start?: number; readonly children: ListItemNode[]; }; HorizontalRule: BaseNodeFields; Table: BaseNodeFields & { readonly header: TableRowNode; readonly rows: TableRowNode[]; readonly alignments: ('left' | 'center' | 'right' | null)[]; }; Component: BaseNodeFields & { readonly name: string; readonly props: Record; readonly children: MarkdownNode[]; readonly slots: Record; readonly selfClosing: boolean; }; }>; declare const HeadingNode: Data.Case.Constructor<{ readonly _tag: "Heading"; readonly position?: SourceRange; readonly level: 1 | 2 | 3 | 4 | 5 | 6; readonly children: InlineNode[]; }, "_tag">; type HeadingNode = Extract; declare const ParagraphNode: Data.Case.Constructor<{ readonly _tag: "Paragraph"; readonly position?: SourceRange; readonly children: InlineNode[]; }, "_tag">; type ParagraphNode = Extract; declare const CodeBlockNode: Data.Case.Constructor<{ readonly _tag: "CodeBlock"; readonly position?: SourceRange; readonly language?: string; readonly code: string; }, "_tag">; type CodeBlockNode = Extract; declare const BlockquoteNode: Data.Case.Constructor<{ readonly _tag: "Blockquote"; readonly position?: SourceRange; readonly children: BlockNode[]; }, "_tag">; type BlockquoteNode = Extract; declare const ListNode: Data.Case.Constructor<{ readonly _tag: "List"; readonly position?: SourceRange; readonly ordered: boolean; readonly start?: number; readonly children: ListItemNode[]; }, "_tag">; type ListNode = Extract; declare const HorizontalRuleNode: Data.Case.Constructor<{ readonly _tag: "HorizontalRule"; readonly position?: SourceRange; }, "_tag">; type HorizontalRuleNode = Extract; declare const ComponentNode: Data.Case.Constructor<{ readonly _tag: "Component"; readonly position?: SourceRange; readonly name: string; readonly props: Record; readonly children: MarkdownNode[]; readonly slots: Record; readonly selfClosing: boolean; }, "_tag">; type ComponentNode = Extract; type MarkdownNode = BlockNode | InlineNode | ListItemNode | TableRowNode | TableCellNode; type DocumentNode = { readonly _tag: 'Document'; readonly position?: SourceRange; readonly children: BlockNode[]; }; declare const DocumentNode: (args: Omit) => DocumentNode; interface InkProps { readonly [key: string]: unknown; readonly content: string | { readonly value: string; }; readonly components?: InkComponents; readonly class?: string; } declare const Ink: _effuse_core.Component; /** * MIT License * * Copyright (c) 2025 Chris M. Perez * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ interface SanitizeUrlOptions { /** Permit `data:image/*` URLs (except SVG). Enable only for image `src`. */ readonly allowDataImages?: boolean; } /** * Returns a URL safe to place in a rendered `href`/`src`, or `#` when the * input carries a dangerous or unknown scheme. * * Relative URLs, anchors, and protocol-relative URLs are allowed. Absolute * URLs must use an explicitly safe protocol. Data URLs are rejected unless * `allowDataImages` is set and the media type is a raster image. */ declare const sanitizeUrl: (url: string, options?: SanitizeUrlOptions) => string; /** * MIT License * * Copyright (c) 2025 Chris M. Perez * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ declare const inkProseStyles = "\n.prose {\n\tmax-width: 65ch;\n\tline-height: 1.75;\n\tcolor: inherit;\n}\n\n.prose h1, .prose .ink-h1 {\n\tfont-size: 2.25rem;\n\tfont-weight: 700;\n\tmargin: 2rem 0 1rem;\n\tline-height: 1.2;\n}\n\n.prose h2, .prose .ink-h2 {\n\tfont-size: 1.5rem;\n\tfont-weight: 600;\n\tmargin: 1.75rem 0 0.75rem;\n\tline-height: 1.3;\n}\n\n.prose h3, .prose .ink-h3 {\n\tfont-size: 1.25rem;\n\tfont-weight: 600;\n\tmargin: 1.5rem 0 0.5rem;\n}\n\n.prose h4, .prose .ink-h4 {\n\tfont-size: 1rem;\n\tfont-weight: 600;\n\tmargin: 1.25rem 0 0.5rem;\n}\n\n.prose h5, .prose .ink-h5,\n.prose h6, .prose .ink-h6 {\n\tfont-size: 0.875rem;\n\tfont-weight: 600;\n\tmargin: 1rem 0 0.5rem;\n}\n\n.prose p, .prose .ink-p {\n\tmargin: 1rem 0;\n}\n\n.prose a, .prose .ink-link {\n\tcolor: #667eea;\n\ttext-decoration: underline;\n\ttext-underline-offset: 2px;\n\ttransition: color 0.2s;\n}\n\n.prose a:hover, .prose .ink-link:hover {\n\tcolor: #764ba2;\n}\n\n.prose code, .prose .ink-inline-code {\n\tbackground: rgba(102, 126, 234, 0.1);\n\tpadding: 0.2em 0.4em;\n\tborder-radius: 4px;\n\tfont-size: 0.875em;\n\tfont-family: ui-monospace, 'Cascadia Code', 'Source Code Pro', Menlo, monospace;\n}\n\n.prose pre, .prose .ink-code-block {\n\tbackground: #09090b;\n\tpadding: 1.5rem;\n\tborder-radius: 12px;\n\toverflow-x: auto;\n\tmargin: 1.5rem 0;\n\tborder: 1px solid rgba(255, 255, 255, 0.08);\n\tbox-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);\n}\n\n.prose pre code {\n\tbackground: transparent;\n\tpadding: 0;\n\tfont-size: 0.875rem;\n\tline-height: 1.6;\n}\n\n.prose blockquote, .prose .ink-blockquote {\n\tborder-left: 4px solid #667eea;\n\tpadding-left: 1rem;\n\tmargin: 1.5rem 0;\n\tcolor: rgba(255, 255, 255, 0.7);\n\tfont-style: italic;\n}\n\n.prose blockquote p {\n\tmargin: 0.5rem 0;\n}\n\n.prose ul, .prose .ink-ul {\n\tlist-style-type: disc;\n\tpadding-left: 1.5rem;\n\tmargin: 1rem 0;\n}\n\n.prose ol, .prose .ink-ol {\n\tlist-style-type: decimal;\n\tpadding-left: 1.5rem;\n\tmargin: 1rem 0;\n}\n\n.prose li, .prose .ink-list-item {\n\tmargin: 0.25rem 0;\n\tpadding-left: 0.25rem;\n}\n\n.prose ul ul, .prose ol ol, .prose ul ol, .prose ol ul {\n\tmargin: 0.25rem 0;\n}\n\n.prose .ink-task-item {\n\tlist-style: none;\n\tmargin-left: -1.5rem;\n\tpadding-left: 0;\n\tdisplay: flex;\n\talign-items: baseline;\n\tgap: 0.5rem;\n}\n\n.prose .ink-task-text {\n\tdisplay: inline;\n}\n\n.prose .ink-task-checkbox {\n\tflex-shrink: 0;\n\taccent-color: #667eea;\n}\n\n.prose hr, .prose .ink-hr {\n\tborder: none;\n\tborder-top: 1px solid rgba(255, 255, 255, 0.1);\n\tmargin: 2rem 0;\n}\n\n.prose img, .prose .ink-image {\n\tmax-width: 100%;\n\theight: auto;\n\tborder-radius: 8px;\n\tmargin: 1.5rem 0;\n}\n\n.prose table {\n\twidth: 100%;\n\tborder-collapse: collapse;\n\tmargin: 1.5rem 0;\n}\n\n.prose th, .prose td {\n\tborder: 1px solid rgba(255, 255, 255, 0.1);\n\tpadding: 0.75rem 1rem;\n\ttext-align: left;\n}\n\n.prose th {\n\tbackground: rgba(102, 126, 234, 0.1);\n\tfont-weight: 600;\n}\n\n.prose tbody tr:hover {\n\tbackground: rgba(255, 255, 255, 0.02);\n}\n\n.prose strong, .prose b {\n\tfont-weight: 600;\n}\n\n.prose em, .prose i {\n\tfont-style: italic;\n}\n\n.prose del, .prose s {\n\ttext-decoration: line-through;\n\topacity: 0.7;\n}\n\n.prose .ink-unknown-component {\n\tbackground: rgba(233, 69, 96, 0.1);\n\tborder: 1px dashed #e94560;\n\tborder-radius: 4px;\n\tpadding: 0.5rem 1rem;\n\tcolor: #e94560;\n\tfont-size: 0.875rem;\n\tmargin: 0.5rem 0;\n}\n\n\n.prose .ink-hl-keyword {\n\tcolor: #c678dd;\n\tfont-weight: 500;\n}\n\n.prose .ink-hl-string {\n\tcolor: #98c379;\n}\n\n.prose .ink-hl-number {\n\tcolor: #d19a66;\n}\n\n.prose .ink-hl-comment {\n\tcolor: #5c6370;\n\tfont-style: italic;\n}\n\n.prose .ink-hl-function {\n\tcolor: #61afef;\n}\n\n.prose .ink-hl-class {\n\tcolor: #e5c07b;\n}\n\n.prose .ink-hl-type {\n\tcolor: #e5c07b;\n}\n\n.prose .ink-hl-variable {\n\tcolor: #e06c75;\n}\n\n.prose .ink-hl-operator {\n\tcolor: #56b6c2;\n}\n\n.prose .ink-hl-punctuation {\n\tcolor: #abb2bf;\n}\n\n.prose .ink-hl-property {\n\tcolor: #e06c75;\n}\n\n.prose .ink-hl-selector {\n\tcolor: #e06c75;\n}\n\n.prose .ink-hl-tag {\n\tcolor: #e06c75;\n}\n\n.prose .ink-hl-attr-name {\n\tcolor: #d19a66;\n}\n\n.prose .ink-hl-attr-value {\n\tcolor: #98c379;\n}\n\n\n.prose .ink-table {\n\twidth: 100%;\n\tborder-collapse: collapse;\n\tmargin: 1.5rem 0;\n}\n\n.prose .ink-th,\n.prose .ink-td {\n\tborder: 1px solid rgba(255, 255, 255, 0.1);\n\tpadding: 0.75rem 1rem;\n}\n\n.prose .ink-th {\n\tbackground: rgba(102, 126, 234, 0.1);\n\tfont-weight: 600;\n}\n\n.prose .ink-tbody .ink-tr:hover {\n\tbackground: rgba(255, 255, 255, 0.02);\n}\n"; declare function injectInkStyles(): () => void; declare const InkLayer: _effuse_core.CompiledLayer<{ readonly name: "ink"; } & { name: "ink"; setup: typeof injectInkStyles; } & { readonly provides?: undefined; readonly services?: undefined; readonly server?: _effuse_core.ServerLayerConfig<{ [x: string]: never; }> | undefined; } & _effuse_core.EffuseLayer<_effuse_core.LayerProps, readonly string[], unknown>, "ink", { readonly name: "ink"; } & { name: "ink"; setup: typeof injectInkStyles; } & { readonly provides?: undefined; readonly services?: undefined; readonly server?: _effuse_core.ServerLayerConfig<{ [x: string]: never; }> | undefined; }>; /** * MIT License * * Copyright (c) 2025 Chris M. Perez * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ declare const ParseError_base: new = {}>(args: effect_Types.VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => effect_Cause.YieldableError & { readonly _tag: "ParseError"; } & Readonly; declare class ParseError extends ParseError_base<{ readonly message: string; readonly line: number; readonly column: number; readonly source?: string; }> { } declare const ComponentNotFoundError_base: new = {}>(args: effect_Types.VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => effect_Cause.YieldableError & { readonly _tag: "ComponentNotFoundError"; } & Readonly; declare class ComponentNotFoundError extends ComponentNotFoundError_base<{ readonly message: string; readonly componentName: string; readonly line?: number; }> { } declare const InvalidPropsError_base: new = {}>(args: effect_Types.VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => effect_Cause.YieldableError & { readonly _tag: "InvalidPropsError"; } & Readonly; declare class InvalidPropsError extends InvalidPropsError_base<{ readonly message: string; readonly componentName: string; readonly invalidProps: readonly string[]; }> { } declare const SanitizationError_base: new = {}>(args: effect_Types.VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => effect_Cause.YieldableError & { readonly _tag: "SanitizationError"; } & Readonly; declare class SanitizationError extends SanitizationError_base<{ readonly message: string; readonly unsafeContent: string; }> { } declare const TransformError_base: new = {}>(args: effect_Types.VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => effect_Cause.YieldableError & { readonly _tag: "TransformError"; } & Readonly; declare class TransformError extends TransformError_base<{ readonly message: string; readonly nodeType: string; readonly cause?: unknown; }> { } type InkError = ParseError | ComponentNotFoundError | InvalidPropsError | SanitizationError | TransformError; /** * MIT License * * Copyright (c) 2025 Chris M. Perez * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ declare const SourcePositionSchema: Schema.Struct<{ line: typeof Schema.Number; column: typeof Schema.Number; offset: typeof Schema.Number; }>; declare const SourceRangeSchema: Schema.Struct<{ start: Schema.Struct<{ line: typeof Schema.Number; column: typeof Schema.Number; offset: typeof Schema.Number; }>; end: Schema.Struct<{ line: typeof Schema.Number; column: typeof Schema.Number; offset: typeof Schema.Number; }>; }>; declare const BlockNodeSchema: Schema.Union<[Schema.Struct<{ type: Schema.Literal<["heading"]>; level: Schema.Union<[Schema.Literal<[1]>, Schema.Literal<[2]>, Schema.Literal<[3]>, Schema.Literal<[4]>, Schema.Literal<[5]>, Schema.Literal<[6]>]>; children: Schema.Array$; position: Schema.optional; end: Schema.Struct<{ line: typeof Schema.Number; column: typeof Schema.Number; offset: typeof Schema.Number; }>; }>>; }>, Schema.Struct<{ type: Schema.Literal<["paragraph"]>; children: Schema.Array$; position: Schema.optional; end: Schema.Struct<{ line: typeof Schema.Number; column: typeof Schema.Number; offset: typeof Schema.Number; }>; }>>; }>, Schema.Struct<{ type: Schema.Literal<["codeBlock"]>; language: Schema.optional; code: typeof Schema.String; position: Schema.optional; end: Schema.Struct<{ line: typeof Schema.Number; column: typeof Schema.Number; offset: typeof Schema.Number; }>; }>>; }>, Schema.Struct<{ type: Schema.Literal<["blockquote"]>; children: Schema.Array$; position: Schema.optional; end: Schema.Struct<{ line: typeof Schema.Number; column: typeof Schema.Number; offset: typeof Schema.Number; }>; }>>; }>, Schema.Struct<{ type: Schema.Literal<["list"]>; ordered: typeof Schema.Boolean; start: Schema.optional; children: Schema.Array$; checked: Schema.optional; children: Schema.Array$; position: Schema.optional; end: Schema.Struct<{ line: typeof Schema.Number; column: typeof Schema.Number; offset: typeof Schema.Number; }>; }>>; }>>; position: Schema.optional; end: Schema.Struct<{ line: typeof Schema.Number; column: typeof Schema.Number; offset: typeof Schema.Number; }>; }>>; }>, Schema.Struct<{ type: Schema.Literal<["horizontalRule"]>; position: Schema.optional; end: Schema.Struct<{ line: typeof Schema.Number; column: typeof Schema.Number; offset: typeof Schema.Number; }>; }>>; }>, Schema.Struct<{ type: Schema.Literal<["component"]>; name: typeof Schema.String; props: Schema.Record$; children: Schema.Array$; slots: Schema.Record$>; selfClosing: typeof Schema.Boolean; position: Schema.optional; end: Schema.Struct<{ line: typeof Schema.Number; column: typeof Schema.Number; offset: typeof Schema.Number; }>; }>>; }>]>; declare const DocumentNodeSchema: Schema.Struct<{ type: Schema.Literal<["document"]>; children: Schema.Array$; level: Schema.Union<[Schema.Literal<[1]>, Schema.Literal<[2]>, Schema.Literal<[3]>, Schema.Literal<[4]>, Schema.Literal<[5]>, Schema.Literal<[6]>]>; children: Schema.Array$; position: Schema.optional; end: Schema.Struct<{ line: typeof Schema.Number; column: typeof Schema.Number; offset: typeof Schema.Number; }>; }>>; }>, Schema.Struct<{ type: Schema.Literal<["paragraph"]>; children: Schema.Array$; position: Schema.optional; end: Schema.Struct<{ line: typeof Schema.Number; column: typeof Schema.Number; offset: typeof Schema.Number; }>; }>>; }>, Schema.Struct<{ type: Schema.Literal<["codeBlock"]>; language: Schema.optional; code: typeof Schema.String; position: Schema.optional; end: Schema.Struct<{ line: typeof Schema.Number; column: typeof Schema.Number; offset: typeof Schema.Number; }>; }>>; }>, Schema.Struct<{ type: Schema.Literal<["blockquote"]>; children: Schema.Array$; position: Schema.optional; end: Schema.Struct<{ line: typeof Schema.Number; column: typeof Schema.Number; offset: typeof Schema.Number; }>; }>>; }>, Schema.Struct<{ type: Schema.Literal<["list"]>; ordered: typeof Schema.Boolean; start: Schema.optional; children: Schema.Array$; checked: Schema.optional; children: Schema.Array$; position: Schema.optional; end: Schema.Struct<{ line: typeof Schema.Number; column: typeof Schema.Number; offset: typeof Schema.Number; }>; }>>; }>>; position: Schema.optional; end: Schema.Struct<{ line: typeof Schema.Number; column: typeof Schema.Number; offset: typeof Schema.Number; }>; }>>; }>, Schema.Struct<{ type: Schema.Literal<["horizontalRule"]>; position: Schema.optional; end: Schema.Struct<{ line: typeof Schema.Number; column: typeof Schema.Number; offset: typeof Schema.Number; }>; }>>; }>, Schema.Struct<{ type: Schema.Literal<["component"]>; name: typeof Schema.String; props: Schema.Record$; children: Schema.Array$; slots: Schema.Record$>; selfClosing: typeof Schema.Boolean; position: Schema.optional; end: Schema.Struct<{ line: typeof Schema.Number; column: typeof Schema.Number; offset: typeof Schema.Number; }>; }>>; }>]>>; }>; declare const InlineNodeSchema: Schema.Union<[Schema.Struct<{ type: Schema.Literal<["text"]>; value: typeof Schema.String; position: Schema.optional; end: Schema.Struct<{ line: typeof Schema.Number; column: typeof Schema.Number; offset: typeof Schema.Number; }>; }>>; }>, Schema.Struct<{ type: Schema.Literal<["inlineCode"]>; value: typeof Schema.String; position: Schema.optional; end: Schema.Struct<{ line: typeof Schema.Number; column: typeof Schema.Number; offset: typeof Schema.Number; }>; }>>; }>, Schema.Struct<{ type: Schema.Literal<["emphasis"]>; style: Schema.Union<[Schema.Literal<["italic"]>, Schema.Literal<["bold"]>, Schema.Literal<["strikethrough"]>]>; children: Schema.Array$; position: Schema.optional; end: Schema.Struct<{ line: typeof Schema.Number; column: typeof Schema.Number; offset: typeof Schema.Number; }>; }>>; }>, Schema.Struct<{ type: Schema.Literal<["link"]>; url: typeof Schema.String; title: Schema.optional; children: Schema.Array$; position: Schema.optional; end: Schema.Struct<{ line: typeof Schema.Number; column: typeof Schema.Number; offset: typeof Schema.Number; }>; }>>; }>, Schema.Struct<{ type: Schema.Literal<["image"]>; url: typeof Schema.String; alt: typeof Schema.String; title: Schema.optional; position: Schema.optional; end: Schema.Struct<{ line: typeof Schema.Number; column: typeof Schema.Number; offset: typeof Schema.Number; }>; }>>; }>, Schema.Struct<{ type: Schema.Literal<["lineBreak"]>; position: Schema.optional; end: Schema.Struct<{ line: typeof Schema.Number; column: typeof Schema.Number; offset: typeof Schema.Number; }>; }>>; }>, Schema.Struct<{ type: Schema.Literal<["component"]>; name: typeof Schema.String; props: Schema.Record$; children: Schema.Array$; slots: Schema.Record$>; selfClosing: typeof Schema.Boolean; position: Schema.optional; end: Schema.Struct<{ line: typeof Schema.Number; column: typeof Schema.Number; offset: typeof Schema.Number; }>; }>>; }>]>; declare const InkConfig: { sanitize: Config.Config; allowRawHtml: Config.Config; maxNestingDepth: Config.Config; debug: Config.Config; }; type InkConfigType = { sanitize: boolean; allowRawHtml: boolean; maxNestingDepth: number; debug: boolean; }; declare const defaultInkConfig: InkConfigType; declare const parseSync: (input: string) => DocumentNode; declare const render: (input: string, components?: InkComponents) => EffuseChild[]; export { type BlockNode, BlockNodeSchema, BlockquoteNode, CodeBlockNode, type ComponentMap, ComponentNode, ComponentNotFoundError, DocumentNode, DocumentNodeSchema, EmphasisNode, HeadingNode, HorizontalRuleNode, ImageNode, Ink, type InkComponents, InkConfig, type InkConfigType, type InkError, InkLayer, type InkProps, InlineCodeNode, type InlineNode, InlineNodeSchema, InvalidPropsError, LinkNode, ListItemNode, ListNode, type MarkdownNode, ParagraphNode, ParseError, SanitizationError, type SanitizeUrlOptions, SourcePositionSchema, SourceRangeSchema, TextNode, TransformError, defaultInkConfig, injectInkStyles, inkProseStyles, parseSync, render, sanitizeUrl, transformDocument };