@docubook/markdown 2.0.0-beta.0 → 2.0.0-beta.2

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.
@@ -0,0 +1,10 @@
1
+ import { type ReactNode } from "react";
2
+ import { IconProp } from "../utils/Icon";
3
+ type AccordionMdxProps = {
4
+ title: string;
5
+ icon?: IconProp;
6
+ className?: string;
7
+ children?: ReactNode;
8
+ };
9
+ export declare function AccordionMdx({ title, icon, className, children }: AccordionMdxProps): import("react").JSX.Element;
10
+ export {};
@@ -0,0 +1,6 @@
1
+ import { type ReactNode } from "react";
2
+ type AccordionsMdxProps = {
3
+ children?: ReactNode;
4
+ };
5
+ export declare function AccordionsMdx({ children }: AccordionsMdxProps): import("react").JSX.Element;
6
+ export {};
@@ -0,0 +1,12 @@
1
+ import type { CSSProperties, HTMLAttributes, ReactNode } from "react";
2
+ export type CalloutType = "tip" | "info" | "danger" | "warning" | "success";
3
+ type CalloutProps = HTMLAttributes<HTMLElement> & {
4
+ /** Internal — set by the registry variant (Tip/Info/Danger/Warning/Success). */
5
+ type: CalloutType;
6
+ /** Optional; falls back to the callout label (Tip, Info, …). */
7
+ title?: string;
8
+ children?: ReactNode;
9
+ style?: CSSProperties;
10
+ };
11
+ export declare function Callout({ type, title, children, style, className, ...props }: CalloutProps): import("react").JSX.Element | null;
12
+ export {};
@@ -0,0 +1,16 @@
1
+ import { type ComponentType, type CSSProperties, type HTMLAttributes, type ReactNode } from "react";
2
+ import { IconProp } from "../utils/Icon";
3
+ import type { LinkMdxProps } from "./LinkMdx";
4
+ type LinkRenderer = ComponentType<LinkMdxProps>;
5
+ export type CardMdxProps = HTMLAttributes<HTMLDivElement> & {
6
+ title: string;
7
+ icon?: IconProp;
8
+ href?: string;
9
+ horizontal?: boolean;
10
+ children?: ReactNode;
11
+ style?: CSSProperties;
12
+ /** Internal adapter hook: inject framework link component without duplicating styles. */
13
+ __LinkComponent?: LinkRenderer;
14
+ };
15
+ export declare function CardMdx({ title, icon, href, horizontal, children, style, className, __LinkComponent, ...props }: CardMdxProps): import("react").JSX.Element;
16
+ export {};
@@ -0,0 +1,8 @@
1
+ import type { CSSProperties, ReactNode } from "react";
2
+ type CardsMdxProps = {
3
+ cols?: number;
4
+ children?: ReactNode;
5
+ style?: CSSProperties;
6
+ };
7
+ export declare function CardsMdx({ cols, children, style }: CardsMdxProps): import("react").JSX.Element;
8
+ export {};
@@ -0,0 +1,10 @@
1
+ import { type ComponentProps } from "react";
2
+ type CodeBlockProps = ComponentProps<"pre"> & {
3
+ raw?: string;
4
+ "data-title"?: string;
5
+ "data-language"?: string;
6
+ "data-expandable"?: string;
7
+ "data-expandable-lines"?: string;
8
+ };
9
+ export declare function CodeBlock({ children, raw, ...rest }: CodeBlockProps): import("react").JSX.Element;
10
+ export {};
@@ -0,0 +1,7 @@
1
+ import { type ComponentProps, type ComponentType } from "react";
2
+ export type ImageMdxProps = Omit<ComponentProps<"img">, "src"> & {
3
+ src?: any;
4
+ zoom?: boolean;
5
+ ImageComponent?: ComponentType<any>;
6
+ };
7
+ export declare function ImageMdx({ src, alt, width, height, zoom, style, ImageComponent, ...props }: ImageMdxProps): import("react").JSX.Element | null;
@@ -0,0 +1,3 @@
1
+ import type { ComponentProps } from "react";
2
+ export type LinkMdxProps = ComponentProps<"a">;
3
+ export declare function LinkMdx({ href, rel, target, ...props }: LinkMdxProps): import("react").JSX.Element | null;
@@ -0,0 +1,10 @@
1
+ interface MermaidMdxProps {
2
+ /** Mermaid diagram definition (from rehype plugin or programmatic) */
3
+ chart: string;
4
+ /** Custom DOM id (auto-generated if omitted) */
5
+ id?: string;
6
+ /** Additional CSS class on container */
7
+ className?: string;
8
+ }
9
+ export declare function MermaidMdx({ chart, id, className }: MermaidMdxProps): import("react").JSX.Element | null;
10
+ export {};
@@ -0,0 +1,16 @@
1
+ import { type CSSProperties, type HTMLAttributes, type LiHTMLAttributes, type ReactNode } from "react";
2
+ type StepsMdxProps = HTMLAttributes<HTMLOListElement> & {
3
+ children?: ReactNode;
4
+ style?: CSSProperties;
5
+ };
6
+ type StepMdxProps = LiHTMLAttributes<HTMLLIElement> & {
7
+ title: string;
8
+ children?: ReactNode;
9
+ style?: CSSProperties;
10
+ };
11
+ type InternalStepProps = StepMdxProps & {
12
+ stepNumber?: number;
13
+ };
14
+ export declare function StepsMdx({ children, style, className, ...props }: StepsMdxProps): import("react").JSX.Element;
15
+ export declare function StepMdx({ title, children, style, className, ...props }: InternalStepProps): import("react").JSX.Element;
16
+ export {};
@@ -0,0 +1,8 @@
1
+ import type { HTMLAttributes, TableHTMLAttributes, TdHTMLAttributes, ThHTMLAttributes } from "react";
2
+ export declare function TableMdx({ style, ...props }: TableHTMLAttributes<HTMLTableElement>): import("react").JSX.Element;
3
+ export declare function TableHeaderMdx(props: HTMLAttributes<HTMLTableSectionElement>): import("react").JSX.Element;
4
+ export declare function TableBodyMdx(props: HTMLAttributes<HTMLTableSectionElement>): import("react").JSX.Element;
5
+ export declare function TableFooterMdx(props: HTMLAttributes<HTMLTableSectionElement>): import("react").JSX.Element;
6
+ export declare function TableRowMdx(props: HTMLAttributes<HTMLTableRowElement>): import("react").JSX.Element;
7
+ export declare function TableHeadMdx(props: ThHTMLAttributes<HTMLTableCellElement>): import("react").JSX.Element;
8
+ export declare function TableCellMdx(props: TdHTMLAttributes<HTMLTableCellElement>): import("react").JSX.Element;
@@ -0,0 +1,12 @@
1
+ import { type ReactNode } from "react";
2
+ type TabMdxProps = {
3
+ title: string;
4
+ children?: ReactNode;
5
+ };
6
+ export declare function TabMdx({ children }: TabMdxProps): import("react").JSX.Element;
7
+ type TabsMdxProps = {
8
+ className?: string;
9
+ children: ReactNode;
10
+ };
11
+ export declare function TabsMdx({ className, children }: TabsMdxProps): import("react").JSX.Element;
12
+ export {};
@@ -0,0 +1,14 @@
1
+ import { type ReactNode } from "react";
2
+ type TooltipMdxProps = {
3
+ /** Visible trigger text (dotted underline). */
4
+ text?: ReactNode;
5
+ /** Bubble content shown on hover/focus. */
6
+ tip?: ReactNode;
7
+ };
8
+ /**
9
+ * Auto-positioned tooltip: the bubble is `position: fixed` and, on hover,
10
+ * measured against the trigger and the window — it flips to the side with
11
+ * more room and clamps to the viewport, so no `side` prop is needed.
12
+ */
13
+ export declare function TooltipMdx({ text, tip }: TooltipMdxProps): import("react").JSX.Element;
14
+ export {};
@@ -0,0 +1,8 @@
1
+ import React, { type CSSProperties, type ReactNode } from "react";
2
+ type TreeMdxProps = {
3
+ className?: string;
4
+ style?: CSSProperties;
5
+ children?: ReactNode;
6
+ };
7
+ export declare function TreeMdx({ className, style, children }: TreeMdxProps): React.JSX.Element | null;
8
+ export {};
@@ -0,0 +1,6 @@
1
+ type YoutubeMdxProps = {
2
+ videoId: string;
3
+ title?: string;
4
+ };
5
+ export declare function YoutubeMdx({ videoId, title }: YoutubeMdxProps): import("react").JSX.Element;
6
+ export {};
@@ -0,0 +1,15 @@
1
+ export { AccordionMdx } from "./AccordionMdx";
2
+ export { AccordionsMdx } from "./AccordionsMdx";
3
+ export { CardMdx } from "./CardMdx";
4
+ export { CardsMdx } from "./CardsMdx";
5
+ export { CodeBlock } from "./CodeBlockMdx";
6
+ export { TreeMdx } from "./TreeMdx";
7
+ export { ImageMdx } from "./ImageMdx";
8
+ export { LinkMdx } from "./LinkMdx";
9
+ export { Callout, type CalloutType } from "./Callout";
10
+ export { StepMdx, StepsMdx } from "./StepperMdx";
11
+ export { TabMdx, TabsMdx } from "./TabsMdx";
12
+ export { TableMdx, TableHeaderMdx, TableBodyMdx, TableFooterMdx, TableRowMdx, TableHeadMdx, TableCellMdx, } from "./TableMdx";
13
+ export { TooltipMdx } from "./TooltipMdx";
14
+ export { YoutubeMdx } from "./YoutubeMdx";
15
+ export { MermaidMdx } from "./MermaidMdx";
package/dist/index.d.ts CHANGED
@@ -1,6 +1 @@
1
- import { ComponentType } from 'react';
2
-
3
- type MdxComponentMap = Record<string, ComponentType<any>>;
4
- declare function createMdxComponents(customComponents?: MdxComponentMap): MdxComponentMap;
5
-
6
- export { type MdxComponentMap, createMdxComponents };
1
+ export { createMdxComponents, type MdxComponentMap } from "./registry";