@ootc/markdown 0.2.0 → 0.2.1

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,3 @@
1
+ export { highlightPlugin } from './plugins/highlight';
2
+ export type { MarkdownPlugin, FenceContext } from './plugins/types';
3
+ export { highlightPlugin as default } from './plugins/highlight';
@@ -0,0 +1,3 @@
1
+ export { katexPlugin } from './plugins/katex';
2
+ export type { MarkdownPlugin, FenceContext } from './plugins/types';
3
+ export { katexPlugin as default } from './plugins/katex';
@@ -0,0 +1,3 @@
1
+ export { mermaidPlugin, MermaidDiagram } from './plugins/mermaid';
2
+ export type { MarkdownPlugin, FenceContext } from './plugins/types';
3
+ export { mermaidPlugin as default } from './plugins/mermaid';
@@ -0,0 +1,9 @@
1
+ import type { MarkdownPlugin } from '../types';
2
+ /**
3
+ * Syntax highlighting via starry-night.
4
+ *
5
+ * Requires `@wooorm/starry-night` to be installed alongside this package — it is an
6
+ * optional peer dependency, so it is never pulled in unless you use this plugin.
7
+ */
8
+ export declare const highlightPlugin: MarkdownPlugin;
9
+ export type { MarkdownPlugin } from '../types';
@@ -0,0 +1,12 @@
1
+ import 'katex/dist/katex.min.css';
2
+ import type { MarkdownPlugin } from '../types';
3
+ /**
4
+ * Math rendering via KaTeX ($inline$ and $$display$$).
5
+ *
6
+ * Requires `katex`, `remark-math` and `rehype-katex` to be installed alongside this
7
+ * package — they are optional peer dependencies, so they are never pulled in unless
8
+ * you use this plugin. Importing this module also pulls in the KaTeX stylesheet and
9
+ * its font files.
10
+ */
11
+ export declare const katexPlugin: MarkdownPlugin;
12
+ export type { MarkdownPlugin } from '../types';
@@ -0,0 +1,7 @@
1
+ import type { MarkdownThemeMode } from '../../theme-mode';
2
+ interface MermaidDiagramProps {
3
+ code: string;
4
+ theme: MarkdownThemeMode;
5
+ }
6
+ declare function MermaidDiagram({ code, theme }: MermaidDiagramProps): import("react/jsx-runtime").JSX.Element;
7
+ export { MermaidDiagram };
@@ -0,0 +1,11 @@
1
+ import type { MarkdownPlugin } from '../types';
2
+ import { MermaidDiagram } from './MermaidDiagram';
3
+ /**
4
+ * Renders ```mermaid fences as diagrams.
5
+ *
6
+ * Requires `mermaid` to be installed alongside this package — it is an optional
7
+ * peer dependency, so it is never pulled in unless you use this plugin.
8
+ */
9
+ export declare const mermaidPlugin: MarkdownPlugin;
10
+ export { MermaidDiagram };
11
+ export type { MarkdownPlugin } from '../types';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@ootc/markdown",
3
3
  "private": false,
4
- "version": "0.2.0",
4
+ "version": "0.2.1",
5
5
  "type": "module",
6
6
  "repository": {
7
7
  "type": "git",