@sigmatrx/markdown-viewer 0.1.0

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.
package/README.md ADDED
@@ -0,0 +1,78 @@
1
+ # @sigmatrx/markdown-viewer
2
+
3
+ Lightweight, read-only React Markdown renderer, extracted from the TapVid frontend.
4
+
5
+ Renders Markdown straight to React DOM via [`react-markdown`](https://github.com/remarkjs/react-markdown) with:
6
+
7
+ - **GFM** — tables, task lists, strikethrough (`remark-gfm`)
8
+ - **Math** — inline `$…$` and block `$$…$$` via KaTeX (`remark-math` + `rehype-katex`)
9
+ - **Image-link previews** — links pointing at an image file show a hover popover preview
10
+ - **Safe by default** — raw HTML is dropped (`skipHtml`, no `rehype-raw`) and dangerous link protocols (`javascript:`) are stripped, so untrusted document content is safe to render
11
+ - **SSR-safe** and synchronous
12
+
13
+ ## Install
14
+
15
+ ```bash
16
+ npm install @sigmatrx/markdown-viewer
17
+ ```
18
+
19
+ Peer dependencies: `react` and `react-dom` (>=18).
20
+
21
+ ## Usage
22
+
23
+ ```tsx
24
+ import { MarkdownRender } from '@sigmatrx/markdown-viewer'
25
+ // Import once, anywhere in your app's global CSS entry:
26
+ import '@sigmatrx/markdown-viewer/styles.css'
27
+
28
+ export function Doc({ md }: { md: string }) {
29
+ return <MarkdownRender content={md} />
30
+ }
31
+ ```
32
+
33
+ ### Props
34
+
35
+ | Prop | Type | Description |
36
+ | ----------- | -------- | ---------------------------------------- |
37
+ | `content` | `string` | Markdown source to render. |
38
+ | `className` | `string` | Optional extra classes on the container. |
39
+
40
+ ## Styling
41
+
42
+ `@sigmatrx/markdown-viewer/styles.css` is **pre-compiled and self-contained** — it
43
+ bundles every style the renderer needs (including the KaTeX stylesheet), so you do
44
+ **not** need Tailwind CSS (or any build-time processing) in your app. Import it
45
+ once and you're done.
46
+
47
+ All styles are scoped to the renderer's root (`.markdown-viewer`) and the
48
+ stylesheet ships **no global reset**, so dropping it into an existing app won't
49
+ disturb the rest of your page.
50
+
51
+ ### Theming
52
+
53
+ Colors are driven by a small set of CSS custom properties, so you can restyle the
54
+ renderer by overriding them **after** importing the stylesheet:
55
+
56
+ ```css
57
+ :root {
58
+ --color-primary: #0f172a; /* body text */
59
+ --color-accent: #5359ff; /* list markers, rules */
60
+ --color-link: #0c2a92; /* links */
61
+ --color-muted: #f1f5f9; /* inline code, table header */
62
+ --color-border: #e2e8f0;
63
+ --color-background: #f9fafb; /* table body cells */
64
+ }
65
+ ```
66
+
67
+ ## Development
68
+
69
+ ```bash
70
+ npm install
71
+ npm test # vitest
72
+ npm run typecheck
73
+ npm run build # tsup → dist/
74
+ ```
75
+
76
+ ## License
77
+
78
+ MIT
@@ -0,0 +1,29 @@
1
+ import * as react from 'react';
2
+
3
+ interface MarkdownRenderProps {
4
+ content: string;
5
+ className?: string;
6
+ }
7
+ /**
8
+ * Lightweight, read-only Markdown renderer.
9
+ *
10
+ * Renders the Markdown AST directly to React DOM via `react-markdown`, with
11
+ * GFM (tables, task lists, strikethrough) and KaTeX math (inline `$…$` and
12
+ * block `$$…$$`). It is synchronous, SSR-safe, and preserves full Markdown
13
+ * fidelity. Raw HTML is intentionally NOT rendered (`skipHtml`, no `rehype-raw`),
14
+ * so HTML comments (`<!-- … -->`) and tags are dropped rather than leaking
15
+ * through as literal text, and link protocols are sanitized by react-markdown's
16
+ * default URL transform, so untrusted document content is safe.
17
+ *
18
+ * Styling follows a small set of design tokens (accent `#5359FF`, link `#0C2A92`,
19
+ * muted `#F1F5F9`): native accent-colored list markers, flush-left headings
20
+ * with a clean hierarchy, dark code blocks, and chip-style tables (rounded
21
+ * cells separated by 2px gaps, header `#F1F5F9` / body `#F9FAFB`).
22
+ *
23
+ * All styling ships pre-compiled in `@sigmatrx/markdown-viewer/styles.css` (which
24
+ * also bundles the KaTeX stylesheet), so no Tailwind setup is required in the
25
+ * consuming app — just import the stylesheet once.
26
+ */
27
+ declare function MarkdownRender({ content, className }: MarkdownRenderProps): react.JSX.Element;
28
+
29
+ export { MarkdownRender, type MarkdownRenderProps };
package/dist/index.js ADDED
@@ -0,0 +1,175 @@
1
+ import Markdown from 'react-markdown';
2
+ import remarkGfm from 'remark-gfm';
3
+ import remarkMath from 'remark-math';
4
+ import rehypeKatex from 'rehype-katex';
5
+ import { clsx } from 'clsx';
6
+ import { twMerge } from 'tailwind-merge';
7
+ import * as React from 'react';
8
+ import * as TooltipPrimitive from '@radix-ui/react-tooltip';
9
+ import { jsx, jsxs } from 'react/jsx-runtime';
10
+
11
+ // src/MarkdownRender.tsx
12
+ function cn(...inputs) {
13
+ return twMerge(clsx(inputs));
14
+ }
15
+ var Tooltip = TooltipPrimitive.Root;
16
+ var TooltipTrigger = TooltipPrimitive.Trigger;
17
+ var TooltipContent = React.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx(TooltipPrimitive.Portal, { children: /* @__PURE__ */ jsx(
18
+ TooltipPrimitive.Content,
19
+ {
20
+ ref,
21
+ sideOffset,
22
+ className: cn(
23
+ "z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95",
24
+ className
25
+ ),
26
+ ...props
27
+ }
28
+ ) }));
29
+ TooltipContent.displayName = "TooltipContent";
30
+ var IMAGE_URL_RE = /\.(png|jpe?g|gif|webp|avif|svg|bmp)$/i;
31
+ function isImageUrl(href) {
32
+ if (!href) return false;
33
+ try {
34
+ return IMAGE_URL_RE.test(new URL(href, "https://x").pathname);
35
+ } catch {
36
+ return false;
37
+ }
38
+ }
39
+ function MarkdownRender({ content, className }) {
40
+ return /* @__PURE__ */ jsx(
41
+ "div",
42
+ {
43
+ className: cn(
44
+ "markdown-viewer mx-auto w-full max-w-3xl text-[15px] leading-[1.75] text-primary antialiased",
45
+ className
46
+ ),
47
+ children: /* @__PURE__ */ jsx(
48
+ Markdown,
49
+ {
50
+ skipHtml: true,
51
+ remarkPlugins: [remarkGfm, remarkMath],
52
+ rehypePlugins: [rehypeKatex],
53
+ components: {
54
+ h1: ({ children }) => /* @__PURE__ */ jsx("h1", { className: "mt-8 mb-4 border-b border-border pb-2 text-[24px] font-bold leading-snug tracking-tight first:mt-0", children }),
55
+ h2: ({ children }) => /* @__PURE__ */ jsx("h2", { className: "mt-7 mb-3 text-[19px] font-semibold leading-snug tracking-tight first:mt-0", children }),
56
+ h3: ({ children }) => /* @__PURE__ */ jsx("h3", { className: "mt-5 mb-2 text-[16px] font-semibold leading-snug first:mt-0", children }),
57
+ h4: ({ children }) => /* @__PURE__ */ jsx("h4", { className: "mt-4 mb-1.5 text-[15px] font-semibold leading-snug text-secondary first:mt-0", children }),
58
+ p: ({ children }) => /* @__PURE__ */ jsx("p", { className: "my-3 leading-[1.75] text-primary/90 first:mt-0 last:mb-0", children }),
59
+ strong: ({ children }) => /* @__PURE__ */ jsx("strong", { className: "font-semibold text-primary", children }),
60
+ em: ({ children }) => /* @__PURE__ */ jsx("em", { className: "italic", children }),
61
+ del: ({ children }) => /* @__PURE__ */ jsx("del", { className: "text-muted-foreground line-through", children }),
62
+ a: ({ href, children }) => {
63
+ const anchor = /* @__PURE__ */ jsx(
64
+ "a",
65
+ {
66
+ href,
67
+ target: "_blank",
68
+ rel: "noopener noreferrer",
69
+ className: "font-medium text-link underline decoration-link/30 underline-offset-2 transition-colors hover:decoration-link",
70
+ children
71
+ }
72
+ );
73
+ if (!isImageUrl(href)) return anchor;
74
+ return /* @__PURE__ */ jsxs(Tooltip, { children: [
75
+ /* @__PURE__ */ jsx(TooltipTrigger, { asChild: true, children: anchor }),
76
+ /* @__PURE__ */ jsx(
77
+ TooltipContent,
78
+ {
79
+ side: "top",
80
+ collisionPadding: 48,
81
+ className: "max-w-none rounded-lg border border-border bg-background p-1 shadow-lg",
82
+ children: /* @__PURE__ */ jsx(
83
+ "img",
84
+ {
85
+ src: href,
86
+ alt: "",
87
+ loading: "lazy",
88
+ className: "max-h-[220px] max-w-[280px] rounded object-contain"
89
+ }
90
+ )
91
+ }
92
+ )
93
+ ] });
94
+ },
95
+ ul: ({ children }) => /* @__PURE__ */ jsx("ul", { className: "my-3 ml-[1.15em] list-disc space-y-1.5 marker:text-accent first:mt-0 last:mb-0 [&_ol]:my-1.5 [&_ul]:my-1.5", children }),
96
+ ol: ({ children }) => /* @__PURE__ */ jsx("ol", { className: "my-3 ml-[1.4em] list-decimal space-y-1.5 marker:font-medium marker:text-secondary first:mt-0 last:mb-0 [&_ol]:my-1.5 [&_ul]:my-1.5", children }),
97
+ li: ({ children, className: liClass }) => {
98
+ if (liClass?.includes("task-list-item")) {
99
+ return /* @__PURE__ */ jsx("li", { className: "-ml-[1.15em] flex list-none items-start gap-2 leading-[1.75] text-primary/90 [&>p]:my-0", children });
100
+ }
101
+ return /* @__PURE__ */ jsx("li", { className: "pl-1 leading-[1.75] text-primary/90 [&>p]:my-0", children });
102
+ },
103
+ input: ({ checked, type }) => type === "checkbox" ? /* @__PURE__ */ jsx(
104
+ "input",
105
+ {
106
+ type: "checkbox",
107
+ checked,
108
+ readOnly: true,
109
+ className: "mt-[0.45em] size-3.5 shrink-0 accent-accent"
110
+ }
111
+ ) : null,
112
+ blockquote: ({ children }) => /* @__PURE__ */ jsx("blockquote", { className: "my-4 rounded-r-md border-l-[3px] border-accent bg-muted px-4 py-2.5 text-secondary [&>p]:my-1.5", children }),
113
+ hr: () => /* @__PURE__ */ jsx("hr", { className: "my-7 border-0 border-t border-border" }),
114
+ img: ({ src, alt }) => /* @__PURE__ */ jsx(
115
+ "img",
116
+ {
117
+ src: typeof src === "string" ? src : "",
118
+ alt: alt ?? "",
119
+ className: "my-4 max-w-full rounded-lg border border-border"
120
+ }
121
+ ),
122
+ code: ({ className: codeClass, children }) => {
123
+ const isBlock = /language-/.test(codeClass ?? "");
124
+ if (isBlock) {
125
+ return /* @__PURE__ */ jsx("code", { className: cn("font-mono text-[13px]", codeClass), children });
126
+ }
127
+ return /* @__PURE__ */ jsx("code", { className: "rounded border border-border bg-muted px-1.5 py-0.5 font-mono text-[0.85em] text-primary", children });
128
+ },
129
+ pre: ({ children }) => /* @__PURE__ */ jsx("pre", { className: "my-4 overflow-x-auto rounded-lg border border-border bg-[#0f172a] p-4 text-[13px] leading-relaxed text-[#f8fafc] [tab-size:2]", children }),
130
+ table: ({ children }) => /* @__PURE__ */ jsx("div", { className: "my-4 overflow-x-auto py-2", children: /* @__PURE__ */ jsx("table", { className: "w-full border-separate border-spacing-[2px]", children }) }),
131
+ th: ({ children, style }) => /* @__PURE__ */ jsx(
132
+ "th",
133
+ {
134
+ style,
135
+ className: "rounded-[4px] bg-muted px-4 py-2 text-left align-middle text-[16px] font-semibold leading-[22px] text-black",
136
+ children
137
+ }
138
+ ),
139
+ td: ({ children, style }) => {
140
+ const extractText = (node) => {
141
+ if (typeof node === "string") return node;
142
+ if (Array.isArray(node)) return node.map(extractText).join("");
143
+ return "";
144
+ };
145
+ const text = extractText(children).trim();
146
+ const hexMatch = text.match(/^#([0-9A-Fa-f]{6})$/);
147
+ return /* @__PURE__ */ jsx(
148
+ "td",
149
+ {
150
+ style,
151
+ className: "rounded-[4px] bg-background px-4 py-2 text-left align-middle text-[14px] font-normal leading-[24px] text-black",
152
+ children: hexMatch ? /* @__PURE__ */ jsxs("span", { className: "inline-flex items-center gap-2", children: [
153
+ /* @__PURE__ */ jsx(
154
+ "span",
155
+ {
156
+ className: "inline-block size-4 shrink-0 rounded border border-black/10",
157
+ style: { backgroundColor: hexMatch[0] }
158
+ }
159
+ ),
160
+ children
161
+ ] }) : children
162
+ }
163
+ );
164
+ }
165
+ },
166
+ children: content
167
+ }
168
+ )
169
+ }
170
+ );
171
+ }
172
+
173
+ export { MarkdownRender };
174
+ //# sourceMappingURL=index.js.map
175
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/lib/cn.ts","../src/components/Tooltip.tsx","../src/MarkdownRender.tsx"],"names":["jsx"],"mappings":";;;;;;;;;;;AAGO,SAAS,MAAM,MAAA,EAAsB;AAC1C,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AAA,EAAO,EAAE,eAAA,EAAiB,QAAA,CAAS,CAAC,CAAA;AAAE;AAAA,qBACxC;AAAA,oBACC;AAAA,mBAAA,EACH,CAAA,GAEA;AAAA;AAAA,eAEJ;AAAA,YAEJ;AAAA,WACF;AAAA,UAEC,QAAA,EAAA;AAAA;AAAA;AACH;AAAA,GACF;AAEJ","file":"index.js","sourcesContent":["import { clsx, type ClassValue } from 'clsx'\nimport { twMerge } from 'tailwind-merge'\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs))\n}\n","'use client'\n\nimport * as React from 'react'\nimport * as TooltipPrimitive from '@radix-ui/react-tooltip'\nimport { cn } from '../lib/cn'\n\nconst TooltipProvider = TooltipPrimitive.Provider\nconst Tooltip = TooltipPrimitive.Root\nconst TooltipTrigger = TooltipPrimitive.Trigger\n\nconst TooltipContent = React.forwardRef<\n React.ComponentRef<typeof TooltipPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof TooltipPrimitive.Content>\n>(({ className, sideOffset = 4, ...props }, ref) => (\n <TooltipPrimitive.Portal>\n <TooltipPrimitive.Content\n ref={ref}\n sideOffset={sideOffset}\n className={cn(\n 'z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95',\n className,\n )}\n {...props}\n />\n </TooltipPrimitive.Portal>\n))\nTooltipContent.displayName = 'TooltipContent'\n\nexport { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider }\n","'use client'\n\nimport Markdown from 'react-markdown'\nimport remarkGfm from 'remark-gfm'\nimport remarkMath from 'remark-math'\nimport rehypeKatex from 'rehype-katex'\nimport { cn } from './lib/cn'\nimport { Tooltip, TooltipContent, TooltipTrigger } from './components/Tooltip'\n\nexport interface MarkdownRenderProps {\n content: string\n className?: string\n}\n\nconst IMAGE_URL_RE = /\\.(png|jpe?g|gif|webp|avif|svg|bmp)$/i\n\n/** True when the link points at an image file, ignoring any query/hash. */\nfunction isImageUrl(href: string | undefined): href is string {\n if (!href) return false\n try {\n return IMAGE_URL_RE.test(new URL(href, 'https://x').pathname)\n } catch {\n return false\n }\n}\n\n/**\n * Lightweight, read-only Markdown renderer.\n *\n * Renders the Markdown AST directly to React DOM via `react-markdown`, with\n * GFM (tables, task lists, strikethrough) and KaTeX math (inline `$…$` and\n * block `$$…$$`). It is synchronous, SSR-safe, and preserves full Markdown\n * fidelity. Raw HTML is intentionally NOT rendered (`skipHtml`, no `rehype-raw`),\n * so HTML comments (`<!-- … -->`) and tags are dropped rather than leaking\n * through as literal text, and link protocols are sanitized by react-markdown's\n * default URL transform, so untrusted document content is safe.\n *\n * Styling follows a small set of design tokens (accent `#5359FF`, link `#0C2A92`,\n * muted `#F1F5F9`): native accent-colored list markers, flush-left headings\n * with a clean hierarchy, dark code blocks, and chip-style tables (rounded\n * cells separated by 2px gaps, header `#F1F5F9` / body `#F9FAFB`).\n *\n * All styling ships pre-compiled in `@sigmatrx/markdown-viewer/styles.css` (which\n * also bundles the KaTeX stylesheet), so no Tailwind setup is required in the\n * consuming app — just import the stylesheet once.\n */\nexport function MarkdownRender({ content, className }: MarkdownRenderProps) {\n return (\n <div\n className={cn(\n 'markdown-viewer mx-auto w-full max-w-3xl text-[15px] leading-[1.75] text-primary antialiased',\n className,\n )}\n >\n <Markdown\n skipHtml\n remarkPlugins={[remarkGfm, remarkMath]}\n rehypePlugins={[rehypeKatex]}\n components={{\n h1: ({ children }) => (\n <h1 className=\"mt-8 mb-4 border-b border-border pb-2 text-[24px] font-bold leading-snug tracking-tight first:mt-0\">\n {children}\n </h1>\n ),\n h2: ({ children }) => (\n <h2 className=\"mt-7 mb-3 text-[19px] font-semibold leading-snug tracking-tight first:mt-0\">\n {children}\n </h2>\n ),\n h3: ({ children }) => (\n <h3 className=\"mt-5 mb-2 text-[16px] font-semibold leading-snug first:mt-0\">\n {children}\n </h3>\n ),\n h4: ({ children }) => (\n <h4 className=\"mt-4 mb-1.5 text-[15px] font-semibold leading-snug text-secondary first:mt-0\">\n {children}\n </h4>\n ),\n p: ({ children }) => (\n <p className=\"my-3 leading-[1.75] text-primary/90 first:mt-0 last:mb-0\">{children}</p>\n ),\n strong: ({ children }) => (\n <strong className=\"font-semibold text-primary\">{children}</strong>\n ),\n em: ({ children }) => <em className=\"italic\">{children}</em>,\n del: ({ children }) => (\n <del className=\"text-muted-foreground line-through\">{children}</del>\n ),\n a: ({ href, children }) => {\n const anchor = (\n <a\n href={href}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className=\"font-medium text-link underline decoration-link/30 underline-offset-2 transition-colors hover:decoration-link\"\n >\n {children}\n </a>\n )\n // When the link is an image, preview it in a hover popover.\n if (!isImageUrl(href)) return anchor\n return (\n <Tooltip>\n <TooltipTrigger asChild>{anchor}</TooltipTrigger>\n <TooltipContent\n side=\"top\"\n collisionPadding={48}\n className=\"max-w-none rounded-lg border border-border bg-background p-1 shadow-lg\"\n >\n <img\n src={href}\n alt=\"\"\n loading=\"lazy\"\n className=\"max-h-[220px] max-w-[280px] rounded object-contain\"\n />\n </TooltipContent>\n </Tooltip>\n )\n },\n ul: ({ children }) => (\n <ul className=\"my-3 ml-[1.15em] list-disc space-y-1.5 marker:text-accent first:mt-0 last:mb-0 [&_ol]:my-1.5 [&_ul]:my-1.5\">\n {children}\n </ul>\n ),\n ol: ({ children }) => (\n <ol className=\"my-3 ml-[1.4em] list-decimal space-y-1.5 marker:font-medium marker:text-secondary first:mt-0 last:mb-0 [&_ol]:my-1.5 [&_ul]:my-1.5\">\n {children}\n </ol>\n ),\n li: ({ children, className: liClass }) => {\n // GFM task-list items render the checkbox inline instead of a bullet.\n if (liClass?.includes('task-list-item')) {\n return (\n <li className=\"-ml-[1.15em] flex list-none items-start gap-2 leading-[1.75] text-primary/90 [&>p]:my-0\">\n {children}\n </li>\n )\n }\n return (\n <li className=\"pl-1 leading-[1.75] text-primary/90 [&>p]:my-0\">{children}</li>\n )\n },\n input: ({ checked, type }) =>\n type === 'checkbox' ? (\n <input\n type=\"checkbox\"\n checked={checked}\n readOnly\n className=\"mt-[0.45em] size-3.5 shrink-0 accent-accent\"\n />\n ) : null,\n blockquote: ({ children }) => (\n <blockquote className=\"my-4 rounded-r-md border-l-[3px] border-accent bg-muted px-4 py-2.5 text-secondary [&>p]:my-1.5\">\n {children}\n </blockquote>\n ),\n hr: () => <hr className=\"my-7 border-0 border-t border-border\" />,\n img: ({ src, alt }) => (\n <img\n src={typeof src === 'string' ? src : ''}\n alt={alt ?? ''}\n className=\"my-4 max-w-full rounded-lg border border-border\"\n />\n ),\n code: ({ className: codeClass, children }) => {\n const isBlock = /language-/.test(codeClass ?? '')\n if (isBlock) {\n return <code className={cn('font-mono text-[13px]', codeClass)}>{children}</code>\n }\n return (\n <code className=\"rounded border border-border bg-muted px-1.5 py-0.5 font-mono text-[0.85em] text-primary\">\n {children}\n </code>\n )\n },\n pre: ({ children }) => (\n <pre className=\"my-4 overflow-x-auto rounded-lg border border-border bg-[#0f172a] p-4 text-[13px] leading-relaxed text-[#f8fafc] [tab-size:2]\">\n {children}\n </pre>\n ),\n table: ({ children }) => (\n <div className=\"my-4 overflow-x-auto py-2\">\n <table className=\"w-full border-separate border-spacing-[2px]\">{children}</table>\n </div>\n ),\n th: ({ children, style }) => (\n <th\n style={style}\n className=\"rounded-[4px] bg-muted px-4 py-2 text-left align-middle text-[16px] font-semibold leading-[22px] text-black\"\n >\n {children}\n </th>\n ),\n td: ({ children, style }) => {\n const extractText = (node: unknown): string => {\n if (typeof node === 'string') return node\n if (Array.isArray(node)) return node.map(extractText).join('')\n return ''\n }\n const text = extractText(children).trim()\n const hexMatch = text.match(/^#([0-9A-Fa-f]{6})$/)\n return (\n <td\n style={style}\n className=\"rounded-[4px] bg-background px-4 py-2 text-left align-middle text-[14px] font-normal leading-[24px] text-black\"\n >\n {hexMatch ? (\n <span className=\"inline-flex items-center gap-2\">\n <span\n className=\"inline-block size-4 shrink-0 rounded border border-black/10\"\n style={{ backgroundColor: hexMatch[0] }}\n />\n {children}\n </span>\n ) : (\n children\n )}\n </td>\n )\n },\n }}\n >\n {content}\n </Markdown>\n </div>\n )\n}\n"]}
@@ -0,0 +1,2 @@
1
+ /*! tailwindcss v4.3.2 | MIT License | https://tailwindcss.com */
2
+ @layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000}}}@layer theme{:root,:host{--font-mono:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--color-black:#000;--spacing:.25rem;--container-3xl:48rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--font-weight-normal:400;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--tracking-tight:-.025em;--leading-snug:1.375;--leading-relaxed:1.625;--radius-md:.375rem;--radius-lg:.5rem;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--color-primary:#0f172a;--color-primary-foreground:#fff;--color-secondary:#6a717b;--color-muted:#f1f5f9;--color-muted-foreground:#9eaab8;--color-border:#e2e8f0;--color-background:#f9fafb;--color-accent:#5359ff;--color-link:#0c2a92}}@layer base{.markdown-viewer,.markdown-viewer :where(*){box-sizing:border-box}.markdown-viewer :where(h1,h2,h3,h4,h5,h6,p,blockquote,pre,figure,ul,ol){margin:0}.markdown-viewer :where(ul,ol){padding:0}}@layer components;@layer utilities{.visible{visibility:visible}.z-50{z-index:50}.container{width:100%}@media (min-width:40rem){.container{max-width:40rem}}@media (min-width:48rem){.container{max-width:48rem}}@media (min-width:64rem){.container{max-width:64rem}}@media (min-width:80rem){.container{max-width:80rem}}@media (min-width:96rem){.container{max-width:96rem}}.mx-auto{margin-inline:auto}.my-3{margin-block:calc(var(--spacing) * 3)}.my-4{margin-block:calc(var(--spacing) * 4)}.my-7{margin-block:calc(var(--spacing) * 7)}.mt-4{margin-top:calc(var(--spacing) * 4)}.mt-5{margin-top:calc(var(--spacing) * 5)}.mt-7{margin-top:calc(var(--spacing) * 7)}.mt-8{margin-top:calc(var(--spacing) * 8)}.mt-\[0\.45em\]{margin-top:.45em}.mb-1\.5{margin-bottom:calc(var(--spacing) * 1.5)}.mb-2{margin-bottom:calc(var(--spacing) * 2)}.mb-3{margin-bottom:calc(var(--spacing) * 3)}.mb-4{margin-bottom:calc(var(--spacing) * 4)}.-ml-\[1\.15em\]{margin-left:-1.15em}.ml-\[1\.4em\]{margin-left:1.4em}.ml-\[1\.15em\]{margin-left:1.15em}.block{display:block}.contents{display:contents}.flex{display:flex}.inline{display:inline}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.table{display:table}.size-3\.5{width:calc(var(--spacing) * 3.5);height:calc(var(--spacing) * 3.5)}.size-4{width:calc(var(--spacing) * 4);height:calc(var(--spacing) * 4)}.max-h-\[220px\]{max-height:220px}.w-full{width:100%}.max-w-3xl{max-width:var(--container-3xl)}.max-w-\[280px\]{max-width:280px}.max-w-full{max-width:100%}.max-w-none{max-width:none}.shrink-0{flex-shrink:0}.border-separate{border-collapse:separate}.border-spacing-\[2px\]{--tw-border-spacing-x:2px;--tw-border-spacing-y:2px;border-spacing:var(--tw-border-spacing-x) var(--tw-border-spacing-y)}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.list-decimal{list-style-type:decimal}.list-disc{list-style-type:disc}.list-none{list-style-type:none}.items-center{align-items:center}.items-start{align-items:flex-start}.gap-2{gap:calc(var(--spacing) * 2)}:where(.space-y-1\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 1.5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 1.5) * calc(1 - var(--tw-space-y-reverse)))}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.rounded{border-radius:.25rem}.rounded-\[4px\]{border-radius:4px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.rounded-r-md{border-top-right-radius:var(--radius-md);border-bottom-right-radius:var(--radius-md)}.border{border-style:var(--tw-border-style);border-width:1px}.border-0{border-style:var(--tw-border-style);border-width:0}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-l-\[3px\]{border-left-style:var(--tw-border-style);border-left-width:3px}.border-accent{border-color:var(--color-accent)}.border-black\/10{border-color:#0000001a}@supports (color:color-mix(in lab, red, red)){.border-black\/10{border-color:color-mix(in oklab, var(--color-black) 10%, transparent)}}.border-border{border-color:var(--color-border)}.bg-\[\#0f172a\]{background-color:#0f172a}.bg-background{background-color:var(--color-background)}.bg-muted{background-color:var(--color-muted)}.bg-primary{background-color:var(--color-primary)}.object-contain{object-fit:contain}.p-1{padding:var(--spacing)}.p-4{padding:calc(var(--spacing) * 4)}.px-1\.5{padding-inline:calc(var(--spacing) * 1.5)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-4{padding-inline:calc(var(--spacing) * 4)}.py-0\.5{padding-block:calc(var(--spacing) * .5)}.py-1\.5{padding-block:calc(var(--spacing) * 1.5)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-2\.5{padding-block:calc(var(--spacing) * 2.5)}.pb-2{padding-bottom:calc(var(--spacing) * 2)}.pl-1{padding-left:var(--spacing)}.text-left{text-align:left}.align-middle{vertical-align:middle}.font-mono{font-family:var(--font-mono)}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\[0\.85em\]{font-size:.85em}.text-\[13px\]{font-size:13px}.text-\[14px\]{font-size:14px}.text-\[15px\]{font-size:15px}.text-\[16px\]{font-size:16px}.text-\[19px\]{font-size:19px}.text-\[24px\]{font-size:24px}.leading-\[1\.75\]{--tw-leading:1.75;line-height:1.75}.leading-\[22px\]{--tw-leading:22px;line-height:22px}.leading-\[24px\]{--tw-leading:24px;line-height:24px}.leading-relaxed{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.leading-snug{--tw-leading:var(--leading-snug);line-height:var(--leading-snug)}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-normal{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-tight{--tw-tracking:var(--tracking-tight);letter-spacing:var(--tracking-tight)}.\[tab-size\:2\]{tab-size:2}.text-\[\#f8fafc\]{color:#f8fafc}.text-black{color:var(--color-black)}.text-link{color:var(--color-link)}.text-muted-foreground{color:var(--color-muted-foreground)}.text-primary{color:var(--color-primary)}.text-primary-foreground{color:var(--color-primary-foreground)}.text-primary\/90{color:#0f172ae6}@supports (color:color-mix(in lab, red, red)){.text-primary\/90{color:color-mix(in oklab, var(--color-primary) 90%, transparent)}}.text-secondary{color:var(--color-secondary)}.italic{font-style:italic}.line-through{text-decoration-line:line-through}.underline{text-decoration-line:underline}.decoration-link\/30{text-decoration-color:#0c2a924d}@supports (color:color-mix(in lab, red, red)){.decoration-link\/30{-webkit-text-decoration-color:color-mix(in oklab, var(--color-link) 30%, transparent);-webkit-text-decoration-color:color-mix(in oklab, var(--color-link) 30%, transparent);text-decoration-color:color-mix(in oklab, var(--color-link) 30%, transparent)}}.underline-offset-2{text-underline-offset:2px}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.accent-accent{accent-color:var(--color-accent)}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a), 0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.marker\:font-medium ::marker{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.marker\:font-medium::marker{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.marker\:font-medium ::-webkit-details-marker{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.marker\:font-medium::-webkit-details-marker{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.marker\:text-accent ::marker{color:var(--color-accent)}.marker\:text-accent::marker{color:var(--color-accent)}.marker\:text-accent ::-webkit-details-marker{color:var(--color-accent)}.marker\:text-accent::-webkit-details-marker{color:var(--color-accent)}.marker\:text-secondary ::marker{color:var(--color-secondary)}.marker\:text-secondary::marker{color:var(--color-secondary)}.marker\:text-secondary ::-webkit-details-marker{color:var(--color-secondary)}.marker\:text-secondary::-webkit-details-marker{color:var(--color-secondary)}.first\:mt-0:first-child{margin-top:0}.last\:mb-0:last-child{margin-bottom:0}@media (hover:hover){.hover\:decoration-link:hover{-webkit-text-decoration-color:var(--color-link);-webkit-text-decoration-color:var(--color-link);text-decoration-color:var(--color-link)}}.\[\&_ol\]\:my-1\.5 ol,.\[\&_ul\]\:my-1\.5 ul{margin-block:calc(var(--spacing) * 1.5)}.\[\&\>p\]\:my-0>p{margin-block:0}.\[\&\>p\]\:my-1\.5>p{margin-block:calc(var(--spacing) * 1.5)}}@font-face{font-display:block;font-family:KaTeX_AMS;font-style:normal;font-weight:400;src:url(fonts/KaTeX_AMS-Regular.woff2)format("woff2"),url(fonts/KaTeX_AMS-Regular.woff)format("woff"),url(fonts/KaTeX_AMS-Regular.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_Caligraphic;font-style:normal;font-weight:700;src:url(fonts/KaTeX_Caligraphic-Bold.woff2)format("woff2"),url(fonts/KaTeX_Caligraphic-Bold.woff)format("woff"),url(fonts/KaTeX_Caligraphic-Bold.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_Caligraphic;font-style:normal;font-weight:400;src:url(fonts/KaTeX_Caligraphic-Regular.woff2)format("woff2"),url(fonts/KaTeX_Caligraphic-Regular.woff)format("woff"),url(fonts/KaTeX_Caligraphic-Regular.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_Fraktur;font-style:normal;font-weight:700;src:url(fonts/KaTeX_Fraktur-Bold.woff2)format("woff2"),url(fonts/KaTeX_Fraktur-Bold.woff)format("woff"),url(fonts/KaTeX_Fraktur-Bold.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_Fraktur;font-style:normal;font-weight:400;src:url(fonts/KaTeX_Fraktur-Regular.woff2)format("woff2"),url(fonts/KaTeX_Fraktur-Regular.woff)format("woff"),url(fonts/KaTeX_Fraktur-Regular.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_Main;font-style:normal;font-weight:700;src:url(fonts/KaTeX_Main-Bold.woff2)format("woff2"),url(fonts/KaTeX_Main-Bold.woff)format("woff"),url(fonts/KaTeX_Main-Bold.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_Main;font-style:italic;font-weight:700;src:url(fonts/KaTeX_Main-BoldItalic.woff2)format("woff2"),url(fonts/KaTeX_Main-BoldItalic.woff)format("woff"),url(fonts/KaTeX_Main-BoldItalic.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_Main;font-style:italic;font-weight:400;src:url(fonts/KaTeX_Main-Italic.woff2)format("woff2"),url(fonts/KaTeX_Main-Italic.woff)format("woff"),url(fonts/KaTeX_Main-Italic.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_Main;font-style:normal;font-weight:400;src:url(fonts/KaTeX_Main-Regular.woff2)format("woff2"),url(fonts/KaTeX_Main-Regular.woff)format("woff"),url(fonts/KaTeX_Main-Regular.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_Math;font-style:italic;font-weight:700;src:url(fonts/KaTeX_Math-BoldItalic.woff2)format("woff2"),url(fonts/KaTeX_Math-BoldItalic.woff)format("woff"),url(fonts/KaTeX_Math-BoldItalic.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_Math;font-style:italic;font-weight:400;src:url(fonts/KaTeX_Math-Italic.woff2)format("woff2"),url(fonts/KaTeX_Math-Italic.woff)format("woff"),url(fonts/KaTeX_Math-Italic.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_SansSerif;font-style:normal;font-weight:700;src:url(fonts/KaTeX_SansSerif-Bold.woff2)format("woff2"),url(fonts/KaTeX_SansSerif-Bold.woff)format("woff"),url(fonts/KaTeX_SansSerif-Bold.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_SansSerif;font-style:italic;font-weight:400;src:url(fonts/KaTeX_SansSerif-Italic.woff2)format("woff2"),url(fonts/KaTeX_SansSerif-Italic.woff)format("woff"),url(fonts/KaTeX_SansSerif-Italic.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_SansSerif;font-style:normal;font-weight:400;src:url(fonts/KaTeX_SansSerif-Regular.woff2)format("woff2"),url(fonts/KaTeX_SansSerif-Regular.woff)format("woff"),url(fonts/KaTeX_SansSerif-Regular.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_Script;font-style:normal;font-weight:400;src:url(fonts/KaTeX_Script-Regular.woff2)format("woff2"),url(fonts/KaTeX_Script-Regular.woff)format("woff"),url(fonts/KaTeX_Script-Regular.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_Size1;font-style:normal;font-weight:400;src:url(fonts/KaTeX_Size1-Regular.woff2)format("woff2"),url(fonts/KaTeX_Size1-Regular.woff)format("woff"),url(fonts/KaTeX_Size1-Regular.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_Size2;font-style:normal;font-weight:400;src:url(fonts/KaTeX_Size2-Regular.woff2)format("woff2"),url(fonts/KaTeX_Size2-Regular.woff)format("woff"),url(fonts/KaTeX_Size2-Regular.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_Size3;font-style:normal;font-weight:400;src:url(fonts/KaTeX_Size3-Regular.woff2)format("woff2"),url(fonts/KaTeX_Size3-Regular.woff)format("woff"),url(fonts/KaTeX_Size3-Regular.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_Size4;font-style:normal;font-weight:400;src:url(fonts/KaTeX_Size4-Regular.woff2)format("woff2"),url(fonts/KaTeX_Size4-Regular.woff)format("woff"),url(fonts/KaTeX_Size4-Regular.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_Typewriter;font-style:normal;font-weight:400;src:url(fonts/KaTeX_Typewriter-Regular.woff2)format("woff2"),url(fonts/KaTeX_Typewriter-Regular.woff)format("woff"),url(fonts/KaTeX_Typewriter-Regular.ttf)format("truetype")}.katex{text-indent:0;text-rendering:auto;font:1.21em/1.2 KaTeX_Main,Times New Roman,serif;position:relative}.katex *{border-color:currentColor;-ms-high-contrast-adjust:none!important}.katex .katex-version:after{content:"0.16.47"}.katex .katex-mathml{clip-path:inset(50%);border:0;width:1px;height:1px;padding:0;position:absolute;overflow:hidden}.katex .katex-html>.newline{display:block}.katex .base{white-space:nowrap;width:min-content;position:relative}.katex .base,.katex .strut{display:inline-block}.katex .textbf{font-weight:700}.katex .textit{font-style:italic}.katex .textrm{font-family:KaTeX_Main}.katex .textsf{font-family:KaTeX_SansSerif}.katex .texttt{font-family:KaTeX_Typewriter}.katex .mathnormal{font-family:KaTeX_Math;font-style:italic}.katex .mathit{font-family:KaTeX_Main;font-style:italic}.katex .mathrm{font-style:normal}.katex .mathbf{font-family:KaTeX_Main;font-weight:700}.katex .boldsymbol{font-family:KaTeX_Math;font-style:italic;font-weight:700}.katex .amsrm,.katex .mathbb,.katex .textbb{font-family:KaTeX_AMS}.katex .mathcal{font-family:KaTeX_Caligraphic}.katex .mathfrak,.katex .textfrak{font-family:KaTeX_Fraktur}.katex .mathboldfrak,.katex .textboldfrak{font-family:KaTeX_Fraktur;font-weight:700}.katex .mathtt{font-family:KaTeX_Typewriter}.katex .mathscr,.katex .textscr{font-family:KaTeX_Script}.katex .mathsf,.katex .textsf{font-family:KaTeX_SansSerif}.katex .mathboldsf,.katex .textboldsf{font-family:KaTeX_SansSerif;font-weight:700}.katex .mathitsf,.katex .mathsfit,.katex .textitsf{font-family:KaTeX_SansSerif;font-style:italic}.katex .mainrm{font-family:KaTeX_Main;font-style:normal}.katex .vlist-t{border-collapse:collapse;table-layout:fixed;display:inline-table}.katex .vlist-r{display:table-row}.katex .vlist{vertical-align:bottom;display:table-cell;position:relative}.katex .vlist>span{height:0;display:block;position:relative}.katex .vlist>span>span{display:inline-block}.katex .vlist>span>.pstrut{width:0;overflow:hidden}.katex .vlist-t2{margin-right:-2px}.katex .vlist-s{vertical-align:bottom;width:2px;min-width:2px;font-size:1px;display:table-cell}.katex .vbox{flex-direction:column;align-items:baseline;display:inline-flex}.katex .hbox{width:100%}.katex .hbox,.katex .thinbox{flex-direction:row;display:inline-flex}.katex .thinbox{width:0;max-width:0}.katex .msupsub{text-align:left}.katex .mfrac>span>span{text-align:center}.katex .mfrac .frac-line{border-bottom-style:solid;width:100%;display:inline-block}.katex .hdashline,.katex .hline,.katex .mfrac .frac-line,.katex .overline .overline-line,.katex .rule,.katex .underline .underline-line{min-height:1px}.katex .mspace{display:inline-block}.katex .smash{line-height:0;display:inline}.katex .clap,.katex .llap,.katex .rlap{width:0;position:relative}.katex .clap>.inner,.katex .llap>.inner,.katex .rlap>.inner{position:absolute}.katex .clap>.fix,.katex .llap>.fix,.katex .rlap>.fix{display:inline-block}.katex .llap>.inner{right:0}.katex .clap>.inner,.katex .rlap>.inner{left:0}.katex .clap>.inner>span{margin-left:-50%;margin-right:50%}.katex .rule{border:0 solid;display:inline-block;position:relative}.katex .hline,.katex .overline .overline-line,.katex .underline .underline-line{border-bottom-style:solid;width:100%;display:inline-block}.katex .hdashline{border-bottom-style:dashed;width:100%;display:inline-block}.katex .sqrt>.root{margin-left:.277778em;margin-right:-.555556em}.katex .fontsize-ensurer.reset-size1.size1,.katex .sizing.reset-size1.size1{font-size:1em}.katex .fontsize-ensurer.reset-size1.size2,.katex .sizing.reset-size1.size2{font-size:1.2em}.katex .fontsize-ensurer.reset-size1.size3,.katex .sizing.reset-size1.size3{font-size:1.4em}.katex .fontsize-ensurer.reset-size1.size4,.katex .sizing.reset-size1.size4{font-size:1.6em}.katex .fontsize-ensurer.reset-size1.size5,.katex .sizing.reset-size1.size5{font-size:1.8em}.katex .fontsize-ensurer.reset-size1.size6,.katex .sizing.reset-size1.size6{font-size:2em}.katex .fontsize-ensurer.reset-size1.size7,.katex .sizing.reset-size1.size7{font-size:2.4em}.katex .fontsize-ensurer.reset-size1.size8,.katex .sizing.reset-size1.size8{font-size:2.88em}.katex .fontsize-ensurer.reset-size1.size9,.katex .sizing.reset-size1.size9{font-size:3.456em}.katex .fontsize-ensurer.reset-size1.size10,.katex .sizing.reset-size1.size10{font-size:4.148em}.katex .fontsize-ensurer.reset-size1.size11,.katex .sizing.reset-size1.size11{font-size:4.976em}.katex .fontsize-ensurer.reset-size2.size1,.katex .sizing.reset-size2.size1{font-size:.833333em}.katex .fontsize-ensurer.reset-size2.size2,.katex .sizing.reset-size2.size2{font-size:1em}.katex .fontsize-ensurer.reset-size2.size3,.katex .sizing.reset-size2.size3{font-size:1.16667em}.katex .fontsize-ensurer.reset-size2.size4,.katex .sizing.reset-size2.size4{font-size:1.33333em}.katex .fontsize-ensurer.reset-size2.size5,.katex .sizing.reset-size2.size5{font-size:1.5em}.katex .fontsize-ensurer.reset-size2.size6,.katex .sizing.reset-size2.size6{font-size:1.66667em}.katex .fontsize-ensurer.reset-size2.size7,.katex .sizing.reset-size2.size7{font-size:2em}.katex .fontsize-ensurer.reset-size2.size8,.katex .sizing.reset-size2.size8{font-size:2.4em}.katex .fontsize-ensurer.reset-size2.size9,.katex .sizing.reset-size2.size9{font-size:2.88em}.katex .fontsize-ensurer.reset-size2.size10,.katex .sizing.reset-size2.size10{font-size:3.45667em}.katex .fontsize-ensurer.reset-size2.size11,.katex .sizing.reset-size2.size11{font-size:4.14667em}.katex .fontsize-ensurer.reset-size3.size1,.katex .sizing.reset-size3.size1{font-size:.714286em}.katex .fontsize-ensurer.reset-size3.size2,.katex .sizing.reset-size3.size2{font-size:.857143em}.katex .fontsize-ensurer.reset-size3.size3,.katex .sizing.reset-size3.size3{font-size:1em}.katex .fontsize-ensurer.reset-size3.size4,.katex .sizing.reset-size3.size4{font-size:1.14286em}.katex .fontsize-ensurer.reset-size3.size5,.katex .sizing.reset-size3.size5{font-size:1.28571em}.katex .fontsize-ensurer.reset-size3.size6,.katex .sizing.reset-size3.size6{font-size:1.42857em}.katex .fontsize-ensurer.reset-size3.size7,.katex .sizing.reset-size3.size7{font-size:1.71429em}.katex .fontsize-ensurer.reset-size3.size8,.katex .sizing.reset-size3.size8{font-size:2.05714em}.katex .fontsize-ensurer.reset-size3.size9,.katex .sizing.reset-size3.size9{font-size:2.46857em}.katex .fontsize-ensurer.reset-size3.size10,.katex .sizing.reset-size3.size10{font-size:2.96286em}.katex .fontsize-ensurer.reset-size3.size11,.katex .sizing.reset-size3.size11{font-size:3.55429em}.katex .fontsize-ensurer.reset-size4.size1,.katex .sizing.reset-size4.size1{font-size:.625em}.katex .fontsize-ensurer.reset-size4.size2,.katex .sizing.reset-size4.size2{font-size:.75em}.katex .fontsize-ensurer.reset-size4.size3,.katex .sizing.reset-size4.size3{font-size:.875em}.katex .fontsize-ensurer.reset-size4.size4,.katex .sizing.reset-size4.size4{font-size:1em}.katex .fontsize-ensurer.reset-size4.size5,.katex .sizing.reset-size4.size5{font-size:1.125em}.katex .fontsize-ensurer.reset-size4.size6,.katex .sizing.reset-size4.size6{font-size:1.25em}.katex .fontsize-ensurer.reset-size4.size7,.katex .sizing.reset-size4.size7{font-size:1.5em}.katex .fontsize-ensurer.reset-size4.size8,.katex .sizing.reset-size4.size8{font-size:1.8em}.katex .fontsize-ensurer.reset-size4.size9,.katex .sizing.reset-size4.size9{font-size:2.16em}.katex .fontsize-ensurer.reset-size4.size10,.katex .sizing.reset-size4.size10{font-size:2.5925em}.katex .fontsize-ensurer.reset-size4.size11,.katex .sizing.reset-size4.size11{font-size:3.11em}.katex .fontsize-ensurer.reset-size5.size1,.katex .sizing.reset-size5.size1{font-size:.555556em}.katex .fontsize-ensurer.reset-size5.size2,.katex .sizing.reset-size5.size2{font-size:.666667em}.katex .fontsize-ensurer.reset-size5.size3,.katex .sizing.reset-size5.size3{font-size:.777778em}.katex .fontsize-ensurer.reset-size5.size4,.katex .sizing.reset-size5.size4{font-size:.888889em}.katex .fontsize-ensurer.reset-size5.size5,.katex .sizing.reset-size5.size5{font-size:1em}.katex .fontsize-ensurer.reset-size5.size6,.katex .sizing.reset-size5.size6{font-size:1.11111em}.katex .fontsize-ensurer.reset-size5.size7,.katex .sizing.reset-size5.size7{font-size:1.33333em}.katex .fontsize-ensurer.reset-size5.size8,.katex .sizing.reset-size5.size8{font-size:1.6em}.katex .fontsize-ensurer.reset-size5.size9,.katex .sizing.reset-size5.size9{font-size:1.92em}.katex .fontsize-ensurer.reset-size5.size10,.katex .sizing.reset-size5.size10{font-size:2.30444em}.katex .fontsize-ensurer.reset-size5.size11,.katex .sizing.reset-size5.size11{font-size:2.76444em}.katex .fontsize-ensurer.reset-size6.size1,.katex .sizing.reset-size6.size1{font-size:.5em}.katex .fontsize-ensurer.reset-size6.size2,.katex .sizing.reset-size6.size2{font-size:.6em}.katex .fontsize-ensurer.reset-size6.size3,.katex .sizing.reset-size6.size3{font-size:.7em}.katex .fontsize-ensurer.reset-size6.size4,.katex .sizing.reset-size6.size4{font-size:.8em}.katex .fontsize-ensurer.reset-size6.size5,.katex .sizing.reset-size6.size5{font-size:.9em}.katex .fontsize-ensurer.reset-size6.size6,.katex .sizing.reset-size6.size6{font-size:1em}.katex .fontsize-ensurer.reset-size6.size7,.katex .sizing.reset-size6.size7{font-size:1.2em}.katex .fontsize-ensurer.reset-size6.size8,.katex .sizing.reset-size6.size8{font-size:1.44em}.katex .fontsize-ensurer.reset-size6.size9,.katex .sizing.reset-size6.size9{font-size:1.728em}.katex .fontsize-ensurer.reset-size6.size10,.katex .sizing.reset-size6.size10{font-size:2.074em}.katex .fontsize-ensurer.reset-size6.size11,.katex .sizing.reset-size6.size11{font-size:2.488em}.katex .fontsize-ensurer.reset-size7.size1,.katex .sizing.reset-size7.size1{font-size:.416667em}.katex .fontsize-ensurer.reset-size7.size2,.katex .sizing.reset-size7.size2{font-size:.5em}.katex .fontsize-ensurer.reset-size7.size3,.katex .sizing.reset-size7.size3{font-size:.583333em}.katex .fontsize-ensurer.reset-size7.size4,.katex .sizing.reset-size7.size4{font-size:.666667em}.katex .fontsize-ensurer.reset-size7.size5,.katex .sizing.reset-size7.size5{font-size:.75em}.katex .fontsize-ensurer.reset-size7.size6,.katex .sizing.reset-size7.size6{font-size:.833333em}.katex .fontsize-ensurer.reset-size7.size7,.katex .sizing.reset-size7.size7{font-size:1em}.katex .fontsize-ensurer.reset-size7.size8,.katex .sizing.reset-size7.size8{font-size:1.2em}.katex .fontsize-ensurer.reset-size7.size9,.katex .sizing.reset-size7.size9{font-size:1.44em}.katex .fontsize-ensurer.reset-size7.size10,.katex .sizing.reset-size7.size10{font-size:1.72833em}.katex .fontsize-ensurer.reset-size7.size11,.katex .sizing.reset-size7.size11{font-size:2.07333em}.katex .fontsize-ensurer.reset-size8.size1,.katex .sizing.reset-size8.size1{font-size:.347222em}.katex .fontsize-ensurer.reset-size8.size2,.katex .sizing.reset-size8.size2{font-size:.416667em}.katex .fontsize-ensurer.reset-size8.size3,.katex .sizing.reset-size8.size3{font-size:.486111em}.katex .fontsize-ensurer.reset-size8.size4,.katex .sizing.reset-size8.size4{font-size:.555556em}.katex .fontsize-ensurer.reset-size8.size5,.katex .sizing.reset-size8.size5{font-size:.625em}.katex .fontsize-ensurer.reset-size8.size6,.katex .sizing.reset-size8.size6{font-size:.694444em}.katex .fontsize-ensurer.reset-size8.size7,.katex .sizing.reset-size8.size7{font-size:.833333em}.katex .fontsize-ensurer.reset-size8.size8,.katex .sizing.reset-size8.size8{font-size:1em}.katex .fontsize-ensurer.reset-size8.size9,.katex .sizing.reset-size8.size9{font-size:1.2em}.katex .fontsize-ensurer.reset-size8.size10,.katex .sizing.reset-size8.size10{font-size:1.44028em}.katex .fontsize-ensurer.reset-size8.size11,.katex .sizing.reset-size8.size11{font-size:1.72778em}.katex .fontsize-ensurer.reset-size9.size1,.katex .sizing.reset-size9.size1{font-size:.289352em}.katex .fontsize-ensurer.reset-size9.size2,.katex .sizing.reset-size9.size2{font-size:.347222em}.katex .fontsize-ensurer.reset-size9.size3,.katex .sizing.reset-size9.size3{font-size:.405093em}.katex .fontsize-ensurer.reset-size9.size4,.katex .sizing.reset-size9.size4{font-size:.462963em}.katex .fontsize-ensurer.reset-size9.size5,.katex .sizing.reset-size9.size5{font-size:.520833em}.katex .fontsize-ensurer.reset-size9.size6,.katex .sizing.reset-size9.size6{font-size:.578704em}.katex .fontsize-ensurer.reset-size9.size7,.katex .sizing.reset-size9.size7{font-size:.694444em}.katex .fontsize-ensurer.reset-size9.size8,.katex .sizing.reset-size9.size8{font-size:.833333em}.katex .fontsize-ensurer.reset-size9.size9,.katex .sizing.reset-size9.size9{font-size:1em}.katex .fontsize-ensurer.reset-size9.size10,.katex .sizing.reset-size9.size10{font-size:1.20023em}.katex .fontsize-ensurer.reset-size9.size11,.katex .sizing.reset-size9.size11{font-size:1.43981em}.katex .fontsize-ensurer.reset-size10.size1,.katex .sizing.reset-size10.size1{font-size:.24108em}.katex .fontsize-ensurer.reset-size10.size2,.katex .sizing.reset-size10.size2{font-size:.289296em}.katex .fontsize-ensurer.reset-size10.size3,.katex .sizing.reset-size10.size3{font-size:.337512em}.katex .fontsize-ensurer.reset-size10.size4,.katex .sizing.reset-size10.size4{font-size:.385728em}.katex .fontsize-ensurer.reset-size10.size5,.katex .sizing.reset-size10.size5{font-size:.433944em}.katex .fontsize-ensurer.reset-size10.size6,.katex .sizing.reset-size10.size6{font-size:.48216em}.katex .fontsize-ensurer.reset-size10.size7,.katex .sizing.reset-size10.size7{font-size:.578592em}.katex .fontsize-ensurer.reset-size10.size8,.katex .sizing.reset-size10.size8{font-size:.694311em}.katex .fontsize-ensurer.reset-size10.size9,.katex .sizing.reset-size10.size9{font-size:.833173em}.katex .fontsize-ensurer.reset-size10.size10,.katex .sizing.reset-size10.size10{font-size:1em}.katex .fontsize-ensurer.reset-size10.size11,.katex .sizing.reset-size10.size11{font-size:1.19961em}.katex .fontsize-ensurer.reset-size11.size1,.katex .sizing.reset-size11.size1{font-size:.200965em}.katex .fontsize-ensurer.reset-size11.size2,.katex .sizing.reset-size11.size2{font-size:.241158em}.katex .fontsize-ensurer.reset-size11.size3,.katex .sizing.reset-size11.size3{font-size:.281351em}.katex .fontsize-ensurer.reset-size11.size4,.katex .sizing.reset-size11.size4{font-size:.321543em}.katex .fontsize-ensurer.reset-size11.size5,.katex .sizing.reset-size11.size5{font-size:.361736em}.katex .fontsize-ensurer.reset-size11.size6,.katex .sizing.reset-size11.size6{font-size:.401929em}.katex .fontsize-ensurer.reset-size11.size7,.katex .sizing.reset-size11.size7{font-size:.482315em}.katex .fontsize-ensurer.reset-size11.size8,.katex .sizing.reset-size11.size8{font-size:.578778em}.katex .fontsize-ensurer.reset-size11.size9,.katex .sizing.reset-size11.size9{font-size:.694534em}.katex .fontsize-ensurer.reset-size11.size10,.katex .sizing.reset-size11.size10{font-size:.833601em}.katex .fontsize-ensurer.reset-size11.size11,.katex .sizing.reset-size11.size11{font-size:1em}.katex .delimsizing.size1{font-family:KaTeX_Size1}.katex .delimsizing.size2{font-family:KaTeX_Size2}.katex .delimsizing.size3{font-family:KaTeX_Size3}.katex .delimsizing.size4{font-family:KaTeX_Size4}.katex .delimsizing.mult .delim-size1>span{font-family:KaTeX_Size1}.katex .delimsizing.mult .delim-size4>span{font-family:KaTeX_Size4}.katex .nulldelimiter{width:.12em;display:inline-block}.katex .delimcenter,.katex .op-symbol{position:relative}.katex .op-symbol.small-op{font-family:KaTeX_Size1}.katex .op-symbol.large-op{font-family:KaTeX_Size2}.katex .accent>.vlist-t,.katex .op-limits>.vlist-t{text-align:center}.katex .accent .accent-body{position:relative}.katex .accent .accent-body:not(.accent-full){width:0}.katex .overlay{display:block}.katex .mtable .vertical-separator{min-width:1px;display:inline-block}.katex .mtable .arraycolsep{display:inline-block}.katex .mtable .col-align-c>.vlist-t{text-align:center}.katex .mtable .col-align-l>.vlist-t{text-align:left}.katex .mtable .col-align-r>.vlist-t{text-align:right}.katex .svg-align{text-align:left}.katex svg{fill:currentColor;stroke:currentColor;height:inherit;width:100%;display:block;position:absolute}.katex svg path{stroke:none}.katex svg{fill-rule:nonzero;fill-opacity:1;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1}.katex img{border-style:none;min-width:0;max-width:none;min-height:0;max-height:none}.katex .stretchy{width:100%;display:block;position:relative;overflow:hidden}.katex .stretchy:after,.katex .stretchy:before{content:""}.katex .hide-tail{width:100%;position:relative;overflow:hidden}.katex .halfarrow-left{width:50.2%;position:absolute;left:0;overflow:hidden}.katex .halfarrow-right{width:50.2%;position:absolute;right:0;overflow:hidden}.katex .brace-left{width:25.1%;position:absolute;left:0;overflow:hidden}.katex .brace-center{width:50%;position:absolute;left:25%;overflow:hidden}.katex .brace-right{width:25.1%;position:absolute;right:0;overflow:hidden}.katex .x-arrow-pad{padding:0 .5em}.katex .cd-arrow-pad{padding:0 .55556em 0 .27778em}.katex .mover,.katex .munder,.katex .x-arrow{text-align:center}.katex .boxpad{padding:0 .3em}.katex .fbox,.katex .fcolorbox{box-sizing:border-box;border:.04em solid}.katex .cancel-pad{padding:0 .2em}.katex .cancel-lap{margin-left:-.2em;margin-right:-.2em}.katex .sout{border-bottom-style:solid;border-bottom-width:.08em}.katex .angl{box-sizing:border-box;border-top:.049em solid;border-right:.049em solid;margin-right:.03889em}.katex .anglpad{padding:0 .03889em}.katex .eqn-num:before{content:"(" counter(katexEqnNo) ")";counter-increment:katexEqnNo}.katex .mml-eqn-num:before{content:"(" counter(mmlEqnNo) ")";counter-increment:mmlEqnNo}.katex .mtr-glue{width:50%}.katex .cd-vert-arrow{display:inline-block;position:relative}.katex .cd-label-left{text-align:left;display:inline-block;position:absolute;right:calc(50% + .3em)}.katex .cd-label-right{text-align:right;display:inline-block;position:absolute;left:calc(50% + .3em)}.katex-display{text-align:center;margin:1em 0;display:block}.katex-display>.katex{text-align:center;white-space:nowrap;display:block}.katex-display>.katex>.katex-html{display:block;position:relative}.katex-display>.katex>.katex-html>.tag{position:absolute;right:0}.katex-display.leqno>.katex>.katex-html>.tag{left:0;right:auto}.katex-display.fleqn>.katex{text-align:left;padding-left:2em}body{counter-reset:katexEqnNo mmlEqnNo}@property --tw-border-spacing-x{syntax:"<length>";inherits:false;initial-value:0}@property --tw-border-spacing-y{syntax:"<length>";inherits:false;initial-value:0}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}
package/package.json ADDED
@@ -0,0 +1,68 @@
1
+ {
2
+ "name": "@sigmatrx/markdown-viewer",
3
+ "version": "0.1.0",
4
+ "description": "Lightweight, read-only React Markdown renderer with GFM tables, KaTeX math, and image-link previews.",
5
+ "keywords": [
6
+ "markdown",
7
+ "react",
8
+ "react-markdown",
9
+ "gfm",
10
+ "katex",
11
+ "renderer"
12
+ ],
13
+ "license": "MIT",
14
+ "type": "module",
15
+ "sideEffects": [
16
+ "**/*.css"
17
+ ],
18
+ "files": [
19
+ "dist"
20
+ ],
21
+ "main": "./dist/index.js",
22
+ "module": "./dist/index.js",
23
+ "types": "./dist/index.d.ts",
24
+ "exports": {
25
+ ".": {
26
+ "types": "./dist/index.d.ts",
27
+ "import": "./dist/index.js"
28
+ },
29
+ "./styles.css": "./dist/styles.css"
30
+ },
31
+ "scripts": {
32
+ "build": "tsup && npm run build:css",
33
+ "build:css": "tailwindcss -i src/styles/tailwind.css -o dist/styles.css --minify",
34
+ "dev": "tsup --watch",
35
+ "test": "vitest run",
36
+ "test:watch": "vitest",
37
+ "typecheck": "tsc --noEmit",
38
+ "prepublishOnly": "npm run build"
39
+ },
40
+ "dependencies": {
41
+ "@radix-ui/react-tooltip": "^1.2.8",
42
+ "clsx": "^2.1.1",
43
+ "katex": "^0.16.47",
44
+ "react-markdown": "^10.1.0",
45
+ "rehype-katex": "^7.0.1",
46
+ "remark-gfm": "^4.0.1",
47
+ "remark-math": "^6.0.0",
48
+ "tailwind-merge": "^3.5.0"
49
+ },
50
+ "peerDependencies": {
51
+ "react": ">=18",
52
+ "react-dom": ">=18"
53
+ },
54
+ "devDependencies": {
55
+ "@tailwindcss/cli": "^4.1.0",
56
+ "@testing-library/jest-dom": "^6.9.1",
57
+ "@testing-library/react": "^16.3.2",
58
+ "@types/react": "^19.2.0",
59
+ "@types/react-dom": "^19.2.0",
60
+ "jsdom": "^29.0.1",
61
+ "react": "^19.2.4",
62
+ "react-dom": "^19.2.4",
63
+ "tailwindcss": "^4.1.0",
64
+ "tsup": "^8.5.0",
65
+ "typescript": "^5.9.0",
66
+ "vitest": "^4.1.2"
67
+ }
68
+ }