@atom63/mdx 0.4.0-beta.3 → 0.4.0-beta.5
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 +10 -2
- package/dist/article/index.d.ts +7 -5
- package/dist/article/index.js +3 -3
- package/dist/blocks/credits-block-entry.d.ts +2 -1
- package/dist/blocks/index.d.ts +5 -4
- package/dist/blocks/index.js +1 -1
- package/dist/blocks/media-caption-entry.d.ts +2 -1
- package/dist/{chunk-3FJTASAW.js → chunk-WBFPTNBO.js} +70 -20
- package/dist/chunk-WBFPTNBO.js.map +1 -0
- package/dist/{chunk-DYCKBZGD.js → chunk-XT6W33Q2.js} +3 -3
- package/dist/{chunk-DYCKBZGD.js.map → chunk-XT6W33Q2.js.map} +1 -1
- package/dist/editor/index.d.ts +2 -1
- package/dist/editor/index.js +1 -1
- package/dist/editor/index.js.map +1 -1
- package/dist/{framed-block-DM5LLxO7.d.ts → framed-block-B1hGPjE2.d.ts} +2 -1
- package/dist/index.d.ts +5 -5
- package/dist/index.js +3 -3
- package/dist/lightbox/index.d.ts +4 -3
- package/dist/{mdx-provider-6gOypsy5.d.ts → mdx-provider-FJp99Azd.d.ts} +3 -2
- package/dist/{photo-swipe-CwzAHpP-.d.ts → photo-swipe-BdrjP_BB.d.ts} +2 -1
- package/dist/primitives/index.d.ts +4 -3
- package/dist/runtime/index.d.ts +2 -1
- package/dist/{slots-BvPdUMdY.d.ts → slots-D8ZQyRhv.d.ts} +2 -1
- package/dist/{video-block-C0a5Yx9x.d.ts → video-block-Cg5EK_vS.d.ts} +19 -3
- package/package.json +8 -8
- package/src/blocks/callout/callout.css +1 -1
- package/src/blocks/mermaid-diagram/mermaid-diagram.css +1 -1
- package/src/blocks/page-table-of-contents/page-table-of-contents.css +1 -1
- package/src/blocks/stat-card/stat-card.css +1 -1
- package/src/blocks/video-block/video-block.css +7 -0
- package/src/styles/base.css +5 -5
- package/dist/chunk-3FJTASAW.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/mdx-external-href.ts","../src/use-mdx-style.ts","../src/mdx-components.tsx","../src/variants/article-narrow.ts","../src/variants/docs.ts","../src/mdx-provider.tsx"],"names":["clsx","jsx"],"mappings":";;;;;;;;;;;;;AAAA,IAAM,oBAAA,GAAuB,4BAAA;AAOtB,SAAS,kBAAkB,IAAA,EAAmC;AACnE,EAAA,IAAI,CAAC,IAAA,EAAM;AACT,IAAA,OAAO,KAAA;AAAA,EACT;AACA,EAAA,MAAM,CAAA,GAAI,KAAK,IAAA,EAAK;AACpB,EAAA,IAAI,EAAE,UAAA,CAAW,GAAG,KAAK,CAAA,CAAE,UAAA,CAAW,GAAG,CAAA,EAAG;AAC1C,IAAA,OAAO,KAAA;AAAA,EACT;AACA,EAAA,IAAI,oBAAA,CAAqB,IAAA,CAAK,CAAC,CAAA,EAAG;AAChC,IAAA,OAAO,KAAA;AAAA,EACT;AACA,EAAA,IAAI,CAAA,CAAE,UAAA,CAAW,IAAI,CAAA,EAAG;AACtB,IAAA,OAAO,IAAA;AAAA,EACT;AACA,EAAA,IAAI,OAAO,UAAA,CAAW,MAAA,KAAW,WAAA,EAAa;AAC5C,IAAA,IAAI;AACF,MAAA,MAAM,IAAI,IAAI,GAAA,CAAI,GAAG,UAAA,CAAW,MAAA,CAAO,SAAS,IAAI,CAAA;AACpD,MAAA,IAAI,CAAA,CAAE,QAAA,KAAa,OAAA,IAAW,CAAA,CAAE,aAAa,QAAA,EAAU;AACrD,QAAA,OAAO,KAAA;AAAA,MACT;AACA,MAAA,OAAO,CAAA,CAAE,MAAA,KAAW,UAAA,CAAW,MAAA,CAAO,QAAA,CAAS,MAAA;AAAA,IACjD,CAAA,CAAA,MAAQ;AACN,MAAA,OAAO,KAAA;AAAA,IACT;AAAA,EACF;AACA,EAAA,IAAI;AACF,IAAA,MAAM,CAAA,GAAI,IAAI,GAAA,CAAI,CAAC,CAAA;AACnB,IAAA,OAAO,CAAA,CAAE,Q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CAAmB;AAAA,EACjC,QAAA;AAAA,EACA,SAAA;AAAA,EACA,UAAA;AAAA,EACA,OAAA,GAAU;AACZ,CAAA,EAA4B;AAC1B,EAAA,MAAM,mBAAmB,UAAA,GAAa,EAAE,GAAG,aAAA,EAAe,GAAG,YAAW,GAAI,aAAA;AAE5E,EAAA,uBACEC,IAAC,WAAA,EAAA,EAAY,UAAA,EAAY,kBACvB,QAAA,kBAAAA,GAAAA,CAAC,sBACC,QAAA,kBAAAA,GAAAA;AAAA,IAAC,KAAA;AAAA,IAAA;AAAA,MACC,SAAA,EAAWD,IAAAA;AAAA,QACT,mDAAA;AAAA,QACA,YAAY,OAAO,CAAA;AAAA,QACnB;AAAA,OACF;AAAA,MACA,kBAAA,EAAiB,EAAA;AAAA,MAEhB;AAAA;AAAA,KAEL,CAAA,EACF,CAAA;AAEJ","file":"chunk-DYCKBZGD.js","sourcesContent":["const MDX_SPECIAL_PROTOCOL = /^(mailto|tel|javascript):/i\n\n/**\n * True when `href` should open in a new tab: off-origin http(s), protocol-relative,\n * or absolute http(s) during SSR. Same-origin URLs, in-app paths (`/…`, `#…`),\n * relative paths, and `mailto:` / `tel:` / `javascript:` stay in-tab / default behavior.\n */\nexport function isExternalMdxHref(href: string | undefined): boolean {\n if (!href) {\n return false\n }\n const t = href.trim()\n if (t.startsWith('#') || t.startsWith('/')) {\n return false\n }\n if (MDX_SPECIAL_PROTOCOL.test(t)) {\n return false\n }\n if (t.startsWith('//')) {\n return true\n }\n if (typeof globalThis.window !== 'undefined') {\n try {\n const u = new URL(t, globalThis.window.location.href)\n if (u.protocol !== 'http:' && u.protocol !== 'https:') {\n return false\n }\n return u.origin !== globalThis.window.location.origin\n } catch {\n return false\n }\n }\n try {\n const u = new URL(t)\n return u.protocol === 'http:' || u.protocol === 'https:'\n } catch {\n return false\n }\n}\n","import { useIsInsideExample } from './example-context'\nimport { mdxStyles } from './mdx-styles'\n\nconst skipTypographyClasses = new Set([\n 'btn',\n 'button',\n 'card',\n 'alert',\n 'badge',\n 'input',\n 'select',\n 'form',\n 'nav',\n 'menu',\n 'dropdown',\n 'modal',\n 'dialog',\n 'tooltip',\n 'progress',\n 'slider',\n 'switch',\n 'checkbox',\n 'radio',\n 'textarea',\n 'example-container',\n 'component-preview',\n 'demo-container',\n 'not-mdx',\n 'not-prose',\n 'no-typography',\n 'foundation-preview',\n])\n\nexport function hasSkipClass(className?: string): boolean {\n if (!className) {\n return false\n }\n\n return className.split(/\\s+/).some(token => skipTypographyClasses.has(token))\n}\n\nexport function getMdxStyle(\n style: string,\n className: string | undefined,\n insideExample: boolean\n): string {\n if (insideExample || hasSkipClass(className)) {\n return ''\n }\n return style\n}\n\nexport function useMdxStyle(style: string, className?: string): string {\n const insideExample = useIsInsideExample()\n return getMdxStyle(style, className, insideExample)\n}\n\nexport { mdxStyles }\n","import {\n Table,\n TableBody,\n TableCaption,\n TableCell,\n TableHead,\n TableHeader,\n TableRow,\n} from '@atom63/ui-react'\nimport { clsx } from 'clsx'\nimport type React from 'react'\nimport { createElement, useEffect, useState } from 'react'\nimport { Callout } from './blocks/callout/callout'\nimport { FigureBlock } from './blocks/figure-block/figure-block'\nimport {\n Accordion,\n CodeBlock,\n ColorSwatchItem,\n ComparisonPair,\n CreditsBlock,\n DemoStage,\n MediaCaption,\n MediaPlaceholder,\n MermaidDiagram,\n PageMeta,\n PageTableOfContents,\n ResourceList,\n ScrollStage,\n StatCard,\n StatGrid,\n Steps,\n Tabs,\n Timeline,\n VideoBlock,\n} from './blocks/index'\nimport { ExampleContainer } from './example-container'\nimport { useIsInsideExample } from './example-context'\nimport { MDX_FIGURE_LIGHTBOX_GALLERY_ID } from './lightbox/constants'\nimport { getImageDimensions, getRealImageDimensions } from './lightbox/dimensions'\nimport { FigureLightboxTrigger } from './lightbox/figure-lightbox-trigger'\nimport { isExternalMdxHref } from './mdx-external-href'\nimport { mdxStyles } from './mdx-styles'\nimport { getMdxStyle, hasSkipClass, useMdxStyle } from './use-mdx-style'\n\n/** Portable block components registered on the default MDX map. */\nexport const blockMdxComponents = {\n Accordion,\n Callout,\n CodeBlock,\n ColorSwatchItem,\n ComparisonPair,\n CreditsBlock,\n DemoStage,\n ExampleContainer,\n FigureBlock,\n MediaCaption,\n MediaPlaceholder,\n MermaidDiagram,\n PageMeta,\n PageTableOfContents,\n ResourceList,\n ScrollStage,\n StatCard,\n StatGrid,\n Steps,\n Tabs,\n Timeline,\n VideoBlock,\n} as const\n\nexport { mdxStyles, type CalloutType } from './mdx-styles'\nexport { hasSkipClass, useMdxStyle } from './use-mdx-style'\n\nfunction cn(...inputs: (string | undefined | false | null)[]) {\n return clsx(inputs)\n}\n\nfunction MdxAnchor({ className, href, rel, target, ...props }: React.ComponentProps<'a'>) {\n const external = isExternalMdxHref(href)\n return (\n // eslint-disable-next-line jsx-a11y/anchor-has-content -- MDX passes accessible anchor children through props.\n <a\n className={cn(useMdxStyle(mdxStyles.content.link, className), className)}\n href={href}\n rel={external ? (rel ?? 'noopener noreferrer') : rel}\n target={external ? (target ?? '_blank') : target}\n {...props}\n />\n )\n}\n\nfunction getCodeContent(element: React.ReactNode): string {\n if (typeof element === 'string') return element\n if (element && typeof element === 'object' && 'props' in element) {\n const el = element as { props: { children?: React.ReactNode } }\n if (el.props?.children) {\n if (Array.isArray(el.props.children)) return el.props.children.map(getCodeContent).join('')\n return getCodeContent(el.props.children)\n }\n }\n return ''\n}\n\nfunction getCodeLanguage(element: React.ReactNode): string | undefined {\n if (!(element && typeof element === 'object' && 'props' in element)) {\n return undefined\n }\n\n const el = element as {\n props: {\n children?: React.ReactNode\n className?: string\n 'data-language'?: string\n }\n }\n const classLanguage = el.props.className?.match(/language-([^\\s]+)/)?.[1]\n\n if (classLanguage) {\n return classLanguage\n }\n\n if (el.props['data-language']) {\n return el.props['data-language']\n }\n\n if (el.props.children) {\n return getCodeLanguage(el.props.children)\n }\n\n return undefined\n}\n\nfunction getNumericImageDimension(value: React.ImgHTMLAttributes<HTMLImageElement>['width']) {\n if (typeof value === 'number') {\n return value > 0 ? value : undefined\n }\n\n const parsed = Number.parseInt(value ?? '', 10)\n return parsed > 0 ? parsed : undefined\n}\n\nfunction MdxImage({\n className,\n alt = '',\n src,\n height,\n width,\n loading = 'lazy',\n ...props\n}: React.ImgHTMLAttributes<HTMLImageElement>) {\n const initialWidth = getNumericImageDimension(width)\n const initialHeight = getNumericImageDimension(height)\n const [dimensions, setDimensions] = useState(() =>\n initialWidth && initialHeight\n ? { width: initialWidth, height: initialHeight }\n : getImageDimensions()\n )\n\n useEffect(() => {\n if (!src) {\n return\n }\n\n let cancelled = false\n\n const loadDimensions = async () => {\n const next = await getRealImageDimensions(src)\n if (!cancelled && next.width > 0 && next.height > 0) {\n setDimensions(next)\n }\n }\n\n // getRealImageDimensions() catches its own failures and falls back to the\n // default ratio, so this promise can never reject.\n void loadDimensions()\n\n return () => {\n cancelled = true\n }\n }, [src])\n\n const image = (\n <img\n alt={alt}\n className=\"mt-0 w-full rounded-xl\"\n decoding=\"async\"\n height={height}\n loading={loading}\n src={src}\n width={width}\n {...props}\n />\n )\n const triggerClassName = cn(useMdxStyle(mdxStyles.content.img, className), className)\n\n if (!src || !alt.trim()) {\n return image\n }\n\n return (\n <FigureLightboxTrigger\n alt={alt}\n className={triggerClassName}\n galleryId={MDX_FIGURE_LIGHTBOX_GALLERY_ID}\n height={dimensions.height}\n src={src}\n width={dimensions.width}\n >\n {image}\n </FigureLightboxTrigger>\n )\n}\n\n/**\n * Builds a styled passthrough for an intrinsic tag.\n *\n * Every one of these entries is a real React component (MDX renders the map\n * values as components), but naming them after their HTML tag hides that from\n * `react-hooks`' PascalCase heuristic. Producing them from a factory keeps the\n * hook call inside a properly-named component function.\n */\nfunction createStyledTag<P extends { className?: string }>(\n tag: keyof React.JSX.IntrinsicElements,\n style: string\n) {\n return function MdxStyledTag({ className, ...props }: P) {\n const styleClassName = useMdxStyle(style, className)\n return createElement(tag, { ...props, className: cn(styleClassName, className) })\n }\n}\n\nfunction MdxParagraph({ className, ...props }: React.HTMLAttributes<HTMLParagraphElement>) {\n const insideExample = useIsInsideExample()\n if (insideExample) return <>{props.children}</>\n return (\n <p\n className={cn(getMdxStyle(mdxStyles.text.paragraph, className, insideExample), className)}\n {...props}\n />\n )\n}\n\nfunction MdxCode({ className, ...props }: React.HTMLAttributes<HTMLElement>) {\n const insideExample = useIsInsideExample()\n const isInline = !className?.includes('language-')\n if (isInline) {\n return (\n <code\n className={cn(\n !(insideExample || hasSkipClass(className)) ? mdxStyles.content.inlineCode : '',\n className\n )}\n {...props}\n />\n )\n }\n return <code className={cn(mdxStyles.content.code, className)} {...props} />\n}\n\nexport const mdxComponents = {\n h1: createStyledTag<React.HTMLAttributes<HTMLHeadingElement>>('h1', mdxStyles.headings.h1),\n h2: createStyledTag<React.HTMLAttributes<HTMLHeadingElement>>('h2', mdxStyles.headings.h2),\n h3: createStyledTag<React.HTMLAttributes<HTMLHeadingElement>>('h3', mdxStyles.headings.h3),\n h4: createStyledTag<React.HTMLAttributes<HTMLHeadingElement>>('h4', mdxStyles.headings.h4),\n h5: createStyledTag<React.HTMLAttributes<HTMLHeadingElement>>('h5', mdxStyles.headings.h5),\n h6: createStyledTag<React.HTMLAttributes<HTMLHeadingElement>>('h6', mdxStyles.headings.h6),\n\n p: MdxParagraph,\n\n blockquote: createStyledTag<React.HTMLAttributes<HTMLElement>>(\n 'blockquote',\n mdxStyles.content.blockquote\n ),\n\n code: MdxCode,\n\n pre: ({ className, ...props }: React.HTMLAttributes<HTMLPreElement>) => {\n const language = getCodeLanguage(props.children)\n const code = getCodeContent(props.children).trim()\n const preProps = props as React.HTMLAttributes<HTMLPreElement> & { 'data-theme'?: string }\n const isHighlighted = Boolean(preProps['data-theme']) || className?.includes('shiki')\n\n if (language === 'mermaid') {\n return <MermaidDiagram chart={code} />\n }\n\n if (isHighlighted) {\n return (\n <CodeBlock code={code} lang={language}>\n <pre className={cn('code-block-pre !p-0', className)} {...props} />\n </CodeBlock>\n )\n }\n\n return <CodeBlock code={code} lang={language} />\n },\n\n ul: createStyledTag<React.HTMLAttributes<HTMLUListElement>>('ul', mdxStyles.content.ul),\n ol: createStyledTag<React.HTMLAttributes<HTMLOListElement>>('ol', mdxStyles.content.ol),\n li: createStyledTag<React.HTMLAttributes<HTMLLIElement>>('li', mdxStyles.content.li),\n\n a: MdxAnchor,\n\n strong: createStyledTag<React.HTMLAttributes<HTMLElement>>('strong', mdxStyles.content.strong),\n em: createStyledTag<React.HTMLAttributes<HTMLElement>>('em', mdxStyles.content.em),\n kbd: createStyledTag<React.HTMLAttributes<HTMLElement>>('kbd', mdxStyles.content.kbd),\n hr: createStyledTag<React.HTMLAttributes<HTMLHRElement>>('hr', mdxStyles.content.hr),\n\n table: ({ className, ...props }: React.HTMLAttributes<HTMLTableElement>) => (\n <div className={mdxStyles.content.tableWrapper}>\n <Table className={cn(mdxStyles.content.table, className)} {...props} />\n </div>\n ),\n thead: ({ className, ...props }: React.HTMLAttributes<HTMLTableSectionElement>) => (\n <TableHeader className={cn(mdxStyles.content.thead, className)} {...props} />\n ),\n tbody: ({ className, ...props }: React.HTMLAttributes<HTMLTableSectionElement>) => (\n <TableBody className={cn(mdxStyles.content.tbody, className)} {...props} />\n ),\n tr: ({ className, ...props }: React.HTMLAttributes<HTMLTableRowElement>) => (\n <TableRow className={cn(mdxStyles.content.tr, className)} {...props} />\n ),\n th: ({ className, ...props }: React.HTMLAttributes<HTMLTableCellElement>) => (\n <TableHead className={cn(mdxStyles.content.th, className)} {...props} />\n ),\n td: ({ className, ...props }: React.HTMLAttributes<HTMLTableCellElement>) => (\n <TableCell className={cn(mdxStyles.content.td, className)} {...props} />\n ),\n caption: ({ className, ...props }: React.HTMLAttributes<HTMLTableCaptionElement>) => (\n <TableCaption className={cn(mdxStyles.content.caption, className)} {...props} />\n ),\n\n img: MdxImage,\n\n details: createStyledTag<React.HTMLAttributes<HTMLElement>>('details', mdxStyles.content.details),\n summary: createStyledTag<React.HTMLAttributes<HTMLElement>>('summary', mdxStyles.content.summary),\n\n mark: createStyledTag<React.HTMLAttributes<HTMLElement>>('mark', mdxStyles.content.mark),\n del: createStyledTag<React.HTMLAttributes<HTMLElement>>('del', mdxStyles.content.del),\n ins: createStyledTag<React.HTMLAttributes<HTMLElement>>('ins', mdxStyles.content.ins),\n sub: createStyledTag<React.HTMLAttributes<HTMLElement>>('sub', mdxStyles.content.sub),\n sup: createStyledTag<React.HTMLAttributes<HTMLElement>>('sup', mdxStyles.content.sup),\n abbr: createStyledTag<React.HTMLAttributes<HTMLElement>>('abbr', mdxStyles.content.abbr),\n cite: createStyledTag<React.HTMLAttributes<HTMLElement>>('cite', mdxStyles.content.cite),\n dfn: createStyledTag<React.HTMLAttributes<HTMLElement>>('dfn', mdxStyles.content.dfn),\n time: createStyledTag<React.HTMLAttributes<HTMLElement>>('time', mdxStyles.content.time),\n var: createStyledTag<React.HTMLAttributes<HTMLElement>>('var', mdxStyles.content.var),\n samp: createStyledTag<React.HTMLAttributes<HTMLElement>>('samp', mdxStyles.content.samp),\n output: createStyledTag<React.HTMLAttributes<HTMLElement>>('output', mdxStyles.content.output),\n\n iframe: createStyledTag<React.IframeHTMLAttributes<HTMLIFrameElement>>(\n 'iframe',\n mdxStyles.content.iframe\n ),\n video: createStyledTag<React.VideoHTMLAttributes<HTMLVideoElement>>(\n 'video',\n mdxStyles.content.video\n ),\n audio: createStyledTag<React.AudioHTMLAttributes<HTMLAudioElement>>(\n 'audio',\n mdxStyles.content.audio\n ),\n\n ...blockMdxComponents,\n}\n","/**\n * Narrow prose: text constrained to reading width, blocks and media full width.\n * Applied via ArticleMDXContentProvider (variant `narrow`).\n */\nconst narrowProse = [\n /* The narrow column is this variant's text measure, so `--mdx-measure` is\n * re-pointed at it. Everything that means \"text column\" — figcaption,\n * `data-mdx-width=\"column\"`, Section `column` — then lands on the same\n * 36rem as the prose below, instead of inheriting the 42rem base default\n * and running wider than the paragraphs it belongs to. */\n '[--mdx-measure:36rem]',\n // Prose elements\n '[&>h1]:mx-auto [&>h1]:max-w-xl [&>h1]:w-full',\n '[&>h2]:mx-auto [&>h2]:max-w-xl [&>h2]:w-full',\n '[&>h3]:mx-auto [&>h3]:max-w-xl [&>h3]:w-full',\n '[&>h4]:mx-auto [&>h4]:max-w-xl [&>h4]:w-full',\n '[&>h5]:mx-auto [&>h5]:max-w-xl [&>h5]:w-full',\n '[&>h6]:mx-auto [&>h6]:max-w-xl [&>h6]:w-full',\n '[&>p]:mx-auto [&>p]:max-w-xl [&>p]:w-full',\n '[&>ul]:mx-auto [&>ul]:max-w-xl [&>ul]:w-full',\n '[&>ol]:mx-auto [&>ol]:max-w-xl [&>ol]:w-full',\n '[&>dl]:mx-auto [&>dl]:max-w-xl [&>dl]:w-full',\n '[&>blockquote]:mx-auto [&>blockquote]:max-w-xl [&>blockquote]:w-full',\n '[&>hr]:mx-auto [&>hr]:max-w-xl [&>hr]:w-full',\n '[&>details]:mx-auto [&>details]:max-w-xl [&>details]:w-full',\n // Callouts are prose and stay in the text column.\n '[&>.callout]:mx-auto [&>.callout]:max-w-xl [&>.callout]:w-full',\n /* Tables are data, not prose: pinned to the 36rem text column they overflowed\n * their own scroll container on desktop, where the overlay scrollbar is\n * invisible at rest, so the last column just looked cut off. They take the\n * wide column like code blocks — the horizontal scroll is the fallback for\n * tables wider than that, not the normal case. */\n '[&>.mdx-table-wrapper]:mx-auto [&>.mdx-table-wrapper]:w-full [&>.mdx-table-wrapper]:max-w-[var(--mdx-measure-wide,72rem)]',\n '[&>figure[data-rehype-pretty-code-figure]]:mx-auto [&>figure[data-rehype-pretty-code-figure]]:w-full [&>figure[data-rehype-pretty-code-figure]]:max-w-[var(--mdx-measure-wide,72rem)]',\n // Portable blocks (hero, credits) — same text column as prose\n '[&>header.not-mdx]:mx-auto [&>header.not-mdx]:max-w-xl [&>header.not-mdx]:w-full',\n '[&>div.not-mdx:not([data-mdx-width])]:mx-auto [&>div.not-mdx:not([data-mdx-width])]:max-w-xl [&>div.not-mdx:not([data-mdx-width])]:w-full',\n '[&>header.not-mdx+h2]:mt-8 [&>header.not-mdx+p]:mt-6',\n // Examples and media break out to full container width\n '[&>.example-container]:mx-0 [&>.example-container]:max-w-none [&>.example-container]:w-full',\n '[&>figure]:max-w-none [&>figure]:w-full',\n '[&>[data-media]]:w-full',\n /* An img-only paragraph is media, not prose: it breaks out of the text column\n * and takes the media rhythm. Two shapes have to be matched — the bare\n * `<p><img></p>` that MDX emits, and the `<p><button data-pswp-src><img></p>`\n * that MdxImage wraps it in for the figure lightbox. Only the bare shape was\n * covered, so every markdown image silently stayed at text width.\n *\n * The rhythm is set HERE rather than deferred to `mdxStyles.content.img`:\n * remark always wraps a markdown image in a paragraph, so that recipe's\n * `first:mt-0 last:mb-0` resolves against the <p> (the image is its only\n * child, hence both first and last) and cancels its own `my-8` every time. */\n '[&>p:has(>img):not(:has(>:not(img)))]:!my-8 sm:[&>p:has(>img):not(:has(>:not(img)))]:!my-10',\n '[&>p:has(>img):not(:has(>:not(img)))]:max-w-none [&>p:has(>img):not(:has(>:not(img)))]:w-full',\n '[&>p:has(>button[data-pswp-src]):not(:has(>:not(button)))]:!my-8 sm:[&>p:has(>button[data-pswp-src]):not(:has(>:not(button)))]:!my-10',\n '[&>p:has(>button[data-pswp-src]):not(:has(>:not(button)))]:max-w-none [&>p:has(>button[data-pswp-src]):not(:has(>:not(button)))]:w-full',\n // Explicit block intent wins over incidental element type (`div` vs `figure`).\n \"[&>[data-mdx-width='column']]:mx-auto [&>[data-mdx-width='column']]:w-full [&>[data-mdx-width='column']]:max-w-[var(--mdx-measure,42rem)]\",\n \"[&>[data-mdx-width='wide']]:mx-auto [&>[data-mdx-width='wide']]:w-full [&>[data-mdx-width='wide']]:max-w-[var(--mdx-measure-wide,72rem)]\",\n \"[&>[data-mdx-width='bleed']]:mx-0 [&>[data-mdx-width='bleed']]:w-full [&>[data-mdx-width='bleed']]:max-w-none\",\n].join(' ')\n\nexport const articleNarrowProse = narrowProse\n","/**\n * Doc-specific overrides layered on top of mdxStyles.root.\n *\n * Body copy (p, ul, ol, li, blockquote) inherits sizing from the base\n * mdxStyles — this file only adds layout and structural overrides\n * unique to the component catalog / reference pages.\n */\n\nexport const docMdxStyles = {\n root: [\n 'ds-doc max-w-none',\n // Reference prose — compact enough for token docs, still readable for explanation.\n // Written out literally, never composed from a token at runtime: Tailwind's\n // scanner is static, so a class built at runtime is never seen and the rule\n // is never generated.\n // Leading is a RATIO — `text-base` is `15px * --typography-scale`, so a fixed\n // step (leading-7) freezes at 28px and cramps to 1.24 as the user scales type up.\n '[&>p]:max-w-3xl [&>p]:text-base [&>p]:leading-[1.75] [&>p]:text-muted-foreground',\n '[&>ul]:max-w-3xl [&>ul]:space-y-1.5 [&>ol]:max-w-3xl [&>ol]:space-y-1.5',\n '[&>ul>li]:text-base [&>ul>li]:leading-relaxed [&>ol>li]:text-base [&>ol>li]:leading-relaxed',\n '[&>p+ul]:mt-2.5 [&>p+ol]:mt-2.5 [&>ul+p]:mt-4 [&>ol+p]:mt-4',\n '[&>ul+ul]:mt-3 [&>ol+ol]:mt-3 [&>ul+ol]:mt-3 [&>ol+ul]:mt-3',\n '[&>blockquote]:max-w-3xl [&>blockquote]:text-sm [&>blockquote]:leading-[1.75]',\n // Page title + lead — the title carries hierarchy through size, not weight,\n // so it stays clearly above the h2 ramp without shouting.\n '[&>h1]:mb-2 [&>h1]:font-medium [&>h1]:text-4xl [&>h1]:tracking-tight sm:[&>h1]:text-5xl',\n '[&>h1+p]:mt-0 [&>h1+p]:mb-9 [&>h1+p]:max-w-3xl [&>h1+p]:text-base [&>h1+p]:leading-[1.75] [&>h1+p]:text-muted-foreground',\n // Section headings — smaller than article for catalog density\n '[&>h2]:mt-10 [&>h2]:mb-2 [&>h2]:scroll-mt-24 [&>h2]:font-semibold [&>h2]:text-lg [&>h2]:tracking-tight [&>h2]:first:mt-10 sm:[&>h2]:text-xl',\n '[&>h2+p]:mt-0 [&>h2+p]:mb-4 [&>h2+p]:max-w-3xl',\n '[&>h3]:mt-8 [&>h3]:mb-2 [&>h3]:font-semibold [&>h3]:text-base [&>h3]:tracking-tight',\n '[&>h3+p]:mt-0 [&>h3+p]:mb-3',\n '[&>h4]:mt-6 [&>h4]:mb-2 [&>h4]:font-medium [&>h4]:text-sm',\n // Portable blocks — doc-scale spacing\n '[&>.callout]:my-4 [&>.callout]:sm:my-5 [&>.callout+.callout]:mt-4',\n '[&>.example-container]:my-5',\n '[&>.foundation-preview]:my-5',\n '[&>[data-media]]:my-7',\n '[&>header.not-mdx]:my-8 [&>header.not-mdx]:gap-3',\n '[&>header.not-mdx_h1]:mt-0 [&>header.not-mdx_h1]:font-medium [&>header.not-mdx_h1]:text-4xl [&>header.not-mdx_h1]:tracking-tight',\n '[&>header.not-mdx_p]:mt-0 [&>header.not-mdx_p]:text-base [&>header.not-mdx_p]:leading-relaxed [&>header.not-mdx_p]:text-muted-foreground',\n '[&>div.not-mdx]:my-5',\n '[&>hr]:my-8',\n '[&>.mdx-table-wrapper]:my-6',\n // Code\n '[&_.not-prose>p]:m-0',\n '[&_p_code]:rounded-sm [&_p_code]:px-1 [&_p_code]:py-0 [&_p_code]:text-[0.875em] [&_p_code]:font-medium',\n '[&_li_code]:rounded-sm [&_li_code]:px-1 [&_li_code]:py-0 [&_li_code]:text-[0.875em] [&_li_code]:font-medium',\n '[&>.code-block]:my-5 [&>p+.code-block]:mt-4 [&>.code-block+p]:mt-4 [&>.code-block+h2]:mt-12 [&>.code-block+h3]:mt-8',\n '[&_pre]:m-0 [&_pre]:rounded-xl [&_pre]:border [&_pre]:border-border [&_pre]:bg-muted/25 [&_pre]:p-4',\n '[&_pre_code]:border-0 [&_pre_code]:bg-transparent [&_pre_code]:p-0 [&_pre_code]:font-mono [&_pre_code]:text-sm [&_pre_code]:font-normal [&_pre_code]:leading-relaxed [&_pre_code]:shadow-none [&_pre_code]:ring-0',\n '[&_.not-prose_pre]:m-0 [&_.not-prose_pre]:rounded-none [&_.not-prose_pre]:border-0 [&_.not-prose_pre]:bg-transparent [&_.not-prose_pre]:p-0 [&_.not-prose_pre]:shadow-none',\n '[&_.not-prose_pre_code]:border-0 [&_.not-prose_pre_code]:bg-transparent [&_.not-prose_pre_code]:p-0 [&_.not-prose_pre_code]:shadow-none',\n '[&_.mdx-table-wrapper_table]:text-sm [&_.mdx-table-wrapper_th]:h-10 [&_.mdx-table-wrapper_th]:px-3 [&_.mdx-table-wrapper_td]:px-3 [&_.mdx-table-wrapper_td]:py-2.5',\n '[&_.ds-api-table]:mt-2',\n // Explicit block intent: prose stays compact, visual blocks share one wide measure.\n \"[&>[data-mdx-width='column']]:mx-auto [&>[data-mdx-width='column']]:w-full [&>[data-mdx-width='column']]:max-w-[var(--mdx-measure,42rem)]\",\n \"[&>[data-mdx-width='wide']]:mx-auto [&>[data-mdx-width='wide']]:w-full [&>[data-mdx-width='wide']]:max-w-[var(--mdx-measure-wide,72rem)]\",\n \"[&>[data-mdx-width='bleed']]:mx-0 [&>[data-mdx-width='bleed']]:w-full [&>[data-mdx-width='bleed']]:max-w-none\",\n ].join(' '),\n} as const\n","import { MDXProvider } from '@mdx-js/react'\nimport { clsx } from 'clsx'\nimport type { ReactNode } from 'react'\nimport { FigureLightboxHost } from './lightbox/figure-lightbox-host'\nimport { mdxComponents } from './mdx-components'\nimport { mdxStyles } from './mdx-styles'\nimport { articleNarrowProse } from './variants/article-narrow'\nimport { docMdxStyles } from './variants/docs'\n\nexport type MdxProviderVariant = 'article' | 'docs' | 'narrow'\n\nconst variantRoot: Record<MdxProviderVariant, string> = {\n article: mdxStyles.root,\n docs: clsx(mdxStyles.root, docMdxStyles.root),\n narrow: clsx(mdxStyles.root, articleNarrowProse),\n}\n\nexport type MdxComponentsMap = NonNullable<Parameters<typeof MDXProvider>[0]['components']>\n\nexport type MDXContentProviderProps = {\n children: ReactNode\n className?: string\n components?: MdxComponentsMap\n variant?: MdxProviderVariant\n}\n\nexport function MDXContentProvider({\n children,\n className,\n components,\n variant = 'article',\n}: MDXContentProviderProps) {\n const mergedComponents = components ? { ...mdxComponents, ...components } : mdxComponents\n\n return (\n <MDXProvider components={mergedComponents}>\n <FigureLightboxHost>\n <div\n className={clsx(\n 'min-w-0 [overflow-wrap:anywhere] [&>*]:max-w-full',\n variantRoot[variant],\n className\n )}\n data-mdx-content=\"\"\n >\n {children}\n </div>\n </FigureLightboxHost>\n </MDXProvider>\n )\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/mdx-external-href.ts","../src/use-mdx-style.ts","../src/mdx-components.tsx","../src/variants/article-narrow.ts","../src/variants/docs.ts","../src/mdx-provider.tsx"],"names":["clsx","jsx"],"mappings":";;;;;;;;;;;;;AAAA,IAAM,oBAAA,GAAuB,4BAAA;AAOtB,SAAS,kBAAkB,IAAA,EAAmC;AACnE,EAAA,IAAI,CAAC,IAAA,EAAM;AACT,IAAA,OAAO,KAAA;AAAA,EACT;AACA,EAAA,MAAM,CAAA,GAAI,KAAK,IAAA,EAAK;AACpB,EAAA,IAAI,EAAE,UAAA,CAAW,GAAG,KAAK,CAAA,CAAE,UAAA,CAAW,GAAG,CAAA,EAAG;AAC1C,IAAA,OAAO,KAAA;AAAA,EACT;AACA,EAAA,IAAI,oBAAA,CAAqB,IAAA,CAAK,CAAC,CAAA,EAAG;AAChC,IAAA,OAAO,KAAA;AAAA,EACT;AACA,EAAA,IAAI,CAAA,CAAE,UAAA,CAAW,IAAI,CAAA,EAAG;AACtB,IAAA,OAAO,IAAA;AAAA,EACT;AACA,EAAA,IAAI,OAAO,UAAA,CAAW,MAAA,KAAW,WAAA,EAAa;AAC5C,IAAA,IAAI;AACF,MAAA,MAAM,IAAI,IAAI,GAAA,CAAI,GAAG,UAAA,CAAW,MAAA,CAAO,SAAS,IAAI,CAAA;AACpD,MAAA,IAAI,CAAA,CAAE,QAAA,KAAa,OAAA,IAAW,CAAA,CAAE,aAAa,QAAA,EAAU;AACrD,QAAA,OAAO,KAAA;AAAA,MACT;AACA,MAAA,OAAO,CAAA,CAAE,MAAA,KAAW,UAAA,CAAW,MAAA,C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AS,SAAA,CAAU,IAAA;AAAA,EACnB,IAAA,EAAMA,IAAAA,CAAK,SAAA,CAAU,IAAA,EAAM,aAAa,IAAI,CAAA;AAAA,EAC5C,MAAA,EAAQA,IAAAA,CAAK,SAAA,CAAU,IAAA,EAAM,kBAAkB;AACjD,CAAA;AAWO,SAAS,kBAAA,CAAmB;AAAA,EACjC,QAAA;AAAA,EACA,SAAA;AAAA,EACA,UAAA;AAAA,EACA,OAAA,GAAU;AACZ,CAAA,EAA4B;AAC1B,EAAA,MAAM,mBAAmB,UAAA,GAAa,EAAE,GAAG,aAAA,EAAe,GAAG,YAAW,GAAI,aAAA;AAE5E,EAAA,uBACEC,IAAC,WAAA,EAAA,EAAY,UAAA,EAAY,kBACvB,QAAA,kBAAAA,GAAAA,CAAC,sBACC,QAAA,kBAAAA,GAAAA;AAAA,IAAC,KAAA;AAAA,IAAA;AAAA,MACC,SAAA,EAAWD,IAAAA;AAAA,QACT,mDAAA;AAAA,QACA,YAAY,OAAO,CAAA;AAAA,QACnB;AAAA,OACF;AAAA,MACA,kBAAA,EAAiB,EAAA;AAAA,MAEhB;AAAA;AAAA,KAEL,CAAA,EACF,CAAA;AAEJ","file":"chunk-XT6W33Q2.js","sourcesContent":["const MDX_SPECIAL_PROTOCOL = /^(mailto|tel|javascript):/i\n\n/**\n * True when `href` should open in a new tab: off-origin http(s), protocol-relative,\n * or absolute http(s) during SSR. Same-origin URLs, in-app paths (`/…`, `#…`),\n * relative paths, and `mailto:` / `tel:` / `javascript:` stay in-tab / default behavior.\n */\nexport function isExternalMdxHref(href: string | undefined): boolean {\n if (!href) {\n return false\n }\n const t = href.trim()\n if (t.startsWith('#') || t.startsWith('/')) {\n return false\n }\n if (MDX_SPECIAL_PROTOCOL.test(t)) {\n return false\n }\n if (t.startsWith('//')) {\n return true\n }\n if (typeof globalThis.window !== 'undefined') {\n try {\n const u = new URL(t, globalThis.window.location.href)\n if (u.protocol !== 'http:' && u.protocol !== 'https:') {\n return false\n }\n return u.origin !== globalThis.window.location.origin\n } catch {\n return false\n }\n }\n try {\n const u = new URL(t)\n return u.protocol === 'http:' || u.protocol === 'https:'\n } catch {\n return false\n }\n}\n","import { useIsInsideExample } from './example-context'\nimport { mdxStyles } from './mdx-styles'\n\nconst skipTypographyClasses = new Set([\n 'btn',\n 'button',\n 'card',\n 'alert',\n 'badge',\n 'input',\n 'select',\n 'form',\n 'nav',\n 'menu',\n 'dropdown',\n 'modal',\n 'dialog',\n 'tooltip',\n 'progress',\n 'slider',\n 'switch',\n 'checkbox',\n 'radio',\n 'textarea',\n 'example-container',\n 'component-preview',\n 'demo-container',\n 'not-mdx',\n 'not-prose',\n 'no-typography',\n 'foundation-preview',\n])\n\nexport function hasSkipClass(className?: string): boolean {\n if (!className) {\n return false\n }\n\n return className.split(/\\s+/).some(token => skipTypographyClasses.has(token))\n}\n\nexport function getMdxStyle(\n style: string,\n className: string | undefined,\n insideExample: boolean\n): string {\n if (insideExample || hasSkipClass(className)) {\n return ''\n }\n return style\n}\n\nexport function useMdxStyle(style: string, className?: string): string {\n const insideExample = useIsInsideExample()\n return getMdxStyle(style, className, insideExample)\n}\n\nexport { mdxStyles }\n","import {\n Table,\n TableBody,\n TableCaption,\n TableCell,\n TableHead,\n TableHeader,\n TableRow,\n} from '@atom63/ui-react'\nimport { clsx } from 'clsx'\nimport type React from 'react'\nimport { createElement, useEffect, useState } from 'react'\nimport { Callout } from './blocks/callout/callout'\nimport { FigureBlock } from './blocks/figure-block/figure-block'\nimport {\n Accordion,\n CodeBlock,\n ColorSwatchItem,\n ComparisonPair,\n CreditsBlock,\n DemoStage,\n MediaCaption,\n MediaPlaceholder,\n MermaidDiagram,\n PageMeta,\n PageTableOfContents,\n ResourceList,\n ScrollStage,\n StatCard,\n StatGrid,\n Steps,\n Tabs,\n Timeline,\n VideoBlock,\n} from './blocks/index'\nimport { ExampleContainer } from './example-container'\nimport { useIsInsideExample } from './example-context'\nimport { MDX_FIGURE_LIGHTBOX_GALLERY_ID } from './lightbox/constants'\nimport { getImageDimensions, getRealImageDimensions } from './lightbox/dimensions'\nimport { FigureLightboxTrigger } from './lightbox/figure-lightbox-trigger'\nimport { isExternalMdxHref } from './mdx-external-href'\nimport { mdxStyles } from './mdx-styles'\nimport { getMdxStyle, hasSkipClass, useMdxStyle } from './use-mdx-style'\n\n/** Portable block components registered on the default MDX map. */\nexport const blockMdxComponents = {\n Accordion,\n Callout,\n CodeBlock,\n ColorSwatchItem,\n ComparisonPair,\n CreditsBlock,\n DemoStage,\n ExampleContainer,\n FigureBlock,\n MediaCaption,\n MediaPlaceholder,\n MermaidDiagram,\n PageMeta,\n PageTableOfContents,\n ResourceList,\n ScrollStage,\n StatCard,\n StatGrid,\n Steps,\n Tabs,\n Timeline,\n VideoBlock,\n} as const\n\nexport { mdxStyles, type CalloutType } from './mdx-styles'\nexport { hasSkipClass, useMdxStyle } from './use-mdx-style'\n\nfunction cn(...inputs: (string | undefined | false | null)[]) {\n return clsx(inputs)\n}\n\nfunction MdxAnchor({ className, href, rel, target, ...props }: React.ComponentProps<'a'>) {\n const external = isExternalMdxHref(href)\n return (\n // eslint-disable-next-line jsx-a11y/anchor-has-content -- MDX passes accessible anchor children through props.\n <a\n className={cn(useMdxStyle(mdxStyles.content.link, className), className)}\n href={href}\n rel={external ? (rel ?? 'noopener noreferrer') : rel}\n target={external ? (target ?? '_blank') : target}\n {...props}\n />\n )\n}\n\nfunction getCodeContent(element: React.ReactNode): string {\n if (typeof element === 'string') return element\n if (element && typeof element === 'object' && 'props' in element) {\n const el = element as { props: { children?: React.ReactNode } }\n if (el.props?.children) {\n if (Array.isArray(el.props.children)) return el.props.children.map(getCodeContent).join('')\n return getCodeContent(el.props.children)\n }\n }\n return ''\n}\n\nfunction getCodeLanguage(element: React.ReactNode): string | undefined {\n if (!(element && typeof element === 'object' && 'props' in element)) {\n return undefined\n }\n\n const el = element as {\n props: {\n children?: React.ReactNode\n className?: string\n 'data-language'?: string\n }\n }\n const classLanguage = el.props.className?.match(/language-([^\\s]+)/)?.[1]\n\n if (classLanguage) {\n return classLanguage\n }\n\n if (el.props['data-language']) {\n return el.props['data-language']\n }\n\n if (el.props.children) {\n return getCodeLanguage(el.props.children)\n }\n\n return undefined\n}\n\nfunction getNumericImageDimension(value: React.ImgHTMLAttributes<HTMLImageElement>['width']) {\n if (typeof value === 'number') {\n return value > 0 ? value : undefined\n }\n\n const parsed = Number.parseInt(value ?? '', 10)\n return parsed > 0 ? parsed : undefined\n}\n\nfunction MdxImage({\n className,\n alt = '',\n src,\n height,\n width,\n loading = 'lazy',\n ...props\n}: React.ImgHTMLAttributes<HTMLImageElement>) {\n const initialWidth = getNumericImageDimension(width)\n const initialHeight = getNumericImageDimension(height)\n const [dimensions, setDimensions] = useState(() =>\n initialWidth && initialHeight\n ? { width: initialWidth, height: initialHeight }\n : getImageDimensions()\n )\n\n useEffect(() => {\n if (!src) {\n return\n }\n\n let cancelled = false\n\n const loadDimensions = async () => {\n const next = await getRealImageDimensions(src)\n if (!cancelled && next.width > 0 && next.height > 0) {\n setDimensions(next)\n }\n }\n\n // getRealImageDimensions() catches its own failures and falls back to the\n // default ratio, so this promise can never reject.\n void loadDimensions()\n\n return () => {\n cancelled = true\n }\n }, [src])\n\n const image = (\n <img\n alt={alt}\n className=\"mt-0 w-full rounded-xl\"\n decoding=\"async\"\n height={height}\n loading={loading}\n src={src}\n width={width}\n {...props}\n />\n )\n const triggerClassName = cn(useMdxStyle(mdxStyles.content.img, className), className)\n\n if (!src || !alt.trim()) {\n return image\n }\n\n return (\n <FigureLightboxTrigger\n alt={alt}\n className={triggerClassName}\n galleryId={MDX_FIGURE_LIGHTBOX_GALLERY_ID}\n height={dimensions.height}\n src={src}\n width={dimensions.width}\n >\n {image}\n </FigureLightboxTrigger>\n )\n}\n\n/**\n * Builds a styled passthrough for an intrinsic tag.\n *\n * Every one of these entries is a real React component (MDX renders the map\n * values as components), but naming them after their HTML tag hides that from\n * `react-hooks`' PascalCase heuristic. Producing them from a factory keeps the\n * hook call inside a properly-named component function.\n */\nfunction createStyledTag<P extends { className?: string }>(\n tag: keyof React.JSX.IntrinsicElements,\n style: string\n) {\n return function MdxStyledTag({ className, ...props }: P) {\n const styleClassName = useMdxStyle(style, className)\n return createElement(tag, { ...props, className: cn(styleClassName, className) })\n }\n}\n\nfunction MdxParagraph({ className, ...props }: React.HTMLAttributes<HTMLParagraphElement>) {\n const insideExample = useIsInsideExample()\n if (insideExample) return <>{props.children}</>\n return (\n <p\n className={cn(getMdxStyle(mdxStyles.text.paragraph, className, insideExample), className)}\n {...props}\n />\n )\n}\n\nfunction MdxCode({ className, ...props }: React.HTMLAttributes<HTMLElement>) {\n const insideExample = useIsInsideExample()\n const isInline = !className?.includes('language-')\n if (isInline) {\n return (\n <code\n className={cn(\n !(insideExample || hasSkipClass(className)) ? mdxStyles.content.inlineCode : '',\n className\n )}\n {...props}\n />\n )\n }\n return <code className={cn(mdxStyles.content.code, className)} {...props} />\n}\n\nexport const mdxComponents = {\n h1: createStyledTag<React.HTMLAttributes<HTMLHeadingElement>>('h1', mdxStyles.headings.h1),\n h2: createStyledTag<React.HTMLAttributes<HTMLHeadingElement>>('h2', mdxStyles.headings.h2),\n h3: createStyledTag<React.HTMLAttributes<HTMLHeadingElement>>('h3', mdxStyles.headings.h3),\n h4: createStyledTag<React.HTMLAttributes<HTMLHeadingElement>>('h4', mdxStyles.headings.h4),\n h5: createStyledTag<React.HTMLAttributes<HTMLHeadingElement>>('h5', mdxStyles.headings.h5),\n h6: createStyledTag<React.HTMLAttributes<HTMLHeadingElement>>('h6', mdxStyles.headings.h6),\n\n p: MdxParagraph,\n\n blockquote: createStyledTag<React.HTMLAttributes<HTMLElement>>(\n 'blockquote',\n mdxStyles.content.blockquote\n ),\n\n code: MdxCode,\n\n pre: ({ className, ...props }: React.HTMLAttributes<HTMLPreElement>) => {\n const language = getCodeLanguage(props.children)\n const code = getCodeContent(props.children).trim()\n const preProps = props as React.HTMLAttributes<HTMLPreElement> & { 'data-theme'?: string }\n const isHighlighted = Boolean(preProps['data-theme']) || className?.includes('shiki')\n\n if (language === 'mermaid') {\n return <MermaidDiagram chart={code} />\n }\n\n if (isHighlighted) {\n return (\n <CodeBlock code={code} lang={language}>\n <pre className={cn('code-block-pre !p-0', className)} {...props} />\n </CodeBlock>\n )\n }\n\n return <CodeBlock code={code} lang={language} />\n },\n\n ul: createStyledTag<React.HTMLAttributes<HTMLUListElement>>('ul', mdxStyles.content.ul),\n ol: createStyledTag<React.HTMLAttributes<HTMLOListElement>>('ol', mdxStyles.content.ol),\n li: createStyledTag<React.HTMLAttributes<HTMLLIElement>>('li', mdxStyles.content.li),\n\n a: MdxAnchor,\n\n strong: createStyledTag<React.HTMLAttributes<HTMLElement>>('strong', mdxStyles.content.strong),\n em: createStyledTag<React.HTMLAttributes<HTMLElement>>('em', mdxStyles.content.em),\n kbd: createStyledTag<React.HTMLAttributes<HTMLElement>>('kbd', mdxStyles.content.kbd),\n hr: createStyledTag<React.HTMLAttributes<HTMLHRElement>>('hr', mdxStyles.content.hr),\n\n table: ({ className, ...props }: React.HTMLAttributes<HTMLTableElement>) => (\n <div className={mdxStyles.content.tableWrapper}>\n <Table className={cn(mdxStyles.content.table, className)} {...props} />\n </div>\n ),\n thead: ({ className, ...props }: React.HTMLAttributes<HTMLTableSectionElement>) => (\n <TableHeader className={cn(mdxStyles.content.thead, className)} {...props} />\n ),\n tbody: ({ className, ...props }: React.HTMLAttributes<HTMLTableSectionElement>) => (\n <TableBody className={cn(mdxStyles.content.tbody, className)} {...props} />\n ),\n tr: ({ className, ...props }: React.HTMLAttributes<HTMLTableRowElement>) => (\n <TableRow className={cn(mdxStyles.content.tr, className)} {...props} />\n ),\n th: ({ className, ...props }: React.HTMLAttributes<HTMLTableCellElement>) => (\n <TableHead className={cn(mdxStyles.content.th, className)} {...props} />\n ),\n td: ({ className, ...props }: React.HTMLAttributes<HTMLTableCellElement>) => (\n <TableCell className={cn(mdxStyles.content.td, className)} {...props} />\n ),\n caption: ({ className, ...props }: React.HTMLAttributes<HTMLTableCaptionElement>) => (\n <TableCaption className={cn(mdxStyles.content.caption, className)} {...props} />\n ),\n\n img: MdxImage,\n\n details: createStyledTag<React.HTMLAttributes<HTMLElement>>('details', mdxStyles.content.details),\n summary: createStyledTag<React.HTMLAttributes<HTMLElement>>('summary', mdxStyles.content.summary),\n\n mark: createStyledTag<React.HTMLAttributes<HTMLElement>>('mark', mdxStyles.content.mark),\n del: createStyledTag<React.HTMLAttributes<HTMLElement>>('del', mdxStyles.content.del),\n ins: createStyledTag<React.HTMLAttributes<HTMLElement>>('ins', mdxStyles.content.ins),\n sub: createStyledTag<React.HTMLAttributes<HTMLElement>>('sub', mdxStyles.content.sub),\n sup: createStyledTag<React.HTMLAttributes<HTMLElement>>('sup', mdxStyles.content.sup),\n abbr: createStyledTag<React.HTMLAttributes<HTMLElement>>('abbr', mdxStyles.content.abbr),\n cite: createStyledTag<React.HTMLAttributes<HTMLElement>>('cite', mdxStyles.content.cite),\n dfn: createStyledTag<React.HTMLAttributes<HTMLElement>>('dfn', mdxStyles.content.dfn),\n time: createStyledTag<React.HTMLAttributes<HTMLElement>>('time', mdxStyles.content.time),\n var: createStyledTag<React.HTMLAttributes<HTMLElement>>('var', mdxStyles.content.var),\n samp: createStyledTag<React.HTMLAttributes<HTMLElement>>('samp', mdxStyles.content.samp),\n output: createStyledTag<React.HTMLAttributes<HTMLElement>>('output', mdxStyles.content.output),\n\n iframe: createStyledTag<React.IframeHTMLAttributes<HTMLIFrameElement>>(\n 'iframe',\n mdxStyles.content.iframe\n ),\n video: createStyledTag<React.VideoHTMLAttributes<HTMLVideoElement>>(\n 'video',\n mdxStyles.content.video\n ),\n audio: createStyledTag<React.AudioHTMLAttributes<HTMLAudioElement>>(\n 'audio',\n mdxStyles.content.audio\n ),\n\n ...blockMdxComponents,\n}\n","/**\n * Narrow prose: text constrained to reading width, blocks and media full width.\n * Applied via ArticleMDXContentProvider (variant `narrow`).\n */\nconst narrowProse = [\n /* The narrow column is this variant's text measure, so `--mdx-measure` is\n * re-pointed at it. Everything that means \"text column\" — figcaption,\n * `data-mdx-width=\"column\"`, Section `column` — then lands on the same\n * 36rem as the prose below, instead of inheriting the 42rem base default\n * and running wider than the paragraphs it belongs to. */\n '[--mdx-measure:36rem]',\n // Prose elements\n '[&>h1]:mx-auto [&>h1]:max-w-xl [&>h1]:w-full',\n '[&>h2]:mx-auto [&>h2]:max-w-xl [&>h2]:w-full',\n '[&>h3]:mx-auto [&>h3]:max-w-xl [&>h3]:w-full',\n '[&>h4]:mx-auto [&>h4]:max-w-xl [&>h4]:w-full',\n '[&>h5]:mx-auto [&>h5]:max-w-xl [&>h5]:w-full',\n '[&>h6]:mx-auto [&>h6]:max-w-xl [&>h6]:w-full',\n '[&>p]:mx-auto [&>p]:max-w-xl [&>p]:w-full',\n '[&>ul]:mx-auto [&>ul]:max-w-xl [&>ul]:w-full',\n '[&>ol]:mx-auto [&>ol]:max-w-xl [&>ol]:w-full',\n '[&>dl]:mx-auto [&>dl]:max-w-xl [&>dl]:w-full',\n '[&>blockquote]:mx-auto [&>blockquote]:max-w-xl [&>blockquote]:w-full',\n '[&>hr]:mx-auto [&>hr]:max-w-xl [&>hr]:w-full',\n '[&>details]:mx-auto [&>details]:max-w-xl [&>details]:w-full',\n // Callouts are prose and stay in the text column.\n '[&>.callout]:mx-auto [&>.callout]:max-w-xl [&>.callout]:w-full',\n /* Tables are data, not prose: pinned to the 36rem text column they overflowed\n * their own scroll container on desktop, where the overlay scrollbar is\n * invisible at rest, so the last column just looked cut off. They take the\n * wide column like code blocks — the horizontal scroll is the fallback for\n * tables wider than that, not the normal case. */\n '[&>.mdx-table-wrapper]:mx-auto [&>.mdx-table-wrapper]:w-full [&>.mdx-table-wrapper]:max-w-[var(--mdx-measure-wide,72rem)]',\n '[&>figure[data-rehype-pretty-code-figure]]:mx-auto [&>figure[data-rehype-pretty-code-figure]]:w-full [&>figure[data-rehype-pretty-code-figure]]:max-w-[var(--mdx-measure-wide,72rem)]',\n // Portable blocks (hero, credits) — same text column as prose\n '[&>header.not-mdx]:mx-auto [&>header.not-mdx]:max-w-xl [&>header.not-mdx]:w-full',\n '[&>div.not-mdx:not([data-mdx-width])]:mx-auto [&>div.not-mdx:not([data-mdx-width])]:max-w-xl [&>div.not-mdx:not([data-mdx-width])]:w-full',\n '[&>header.not-mdx+h2]:mt-8 [&>header.not-mdx+p]:mt-6',\n // Examples and media break out to full container width\n '[&>.example-container]:mx-0 [&>.example-container]:max-w-none [&>.example-container]:w-full',\n '[&>figure]:max-w-none [&>figure]:w-full',\n '[&>[data-media]]:w-full',\n /* An img-only paragraph is media, not prose: it breaks out of the text column\n * and takes the media rhythm. Two shapes have to be matched — the bare\n * `<p><img></p>` that MDX emits, and the `<p><button data-pswp-src><img></p>`\n * that MdxImage wraps it in for the figure lightbox. Only the bare shape was\n * covered, so every markdown image silently stayed at text width.\n *\n * The rhythm is set HERE rather than deferred to `mdxStyles.content.img`:\n * remark always wraps a markdown image in a paragraph, so that recipe's\n * `first:mt-0 last:mb-0` resolves against the <p> (the image is its only\n * child, hence both first and last) and cancels its own `my-8` every time. */\n '[&>p:has(>img):not(:has(>:not(img)))]:!my-8 sm:[&>p:has(>img):not(:has(>:not(img)))]:!my-10',\n '[&>p:has(>img):not(:has(>:not(img)))]:max-w-none [&>p:has(>img):not(:has(>:not(img)))]:w-full',\n '[&>p:has(>button[data-pswp-src]):not(:has(>:not(button)))]:!my-8 sm:[&>p:has(>button[data-pswp-src]):not(:has(>:not(button)))]:!my-10',\n '[&>p:has(>button[data-pswp-src]):not(:has(>:not(button)))]:max-w-none [&>p:has(>button[data-pswp-src]):not(:has(>:not(button)))]:w-full',\n // Explicit block intent wins over incidental element type (`div` vs `figure`).\n \"[&>[data-mdx-width='column']]:mx-auto [&>[data-mdx-width='column']]:w-full [&>[data-mdx-width='column']]:max-w-[var(--mdx-measure,42rem)]\",\n \"[&>[data-mdx-width='wide']]:mx-auto [&>[data-mdx-width='wide']]:w-full [&>[data-mdx-width='wide']]:max-w-[var(--mdx-measure-wide,72rem)]\",\n \"[&>[data-mdx-width='bleed']]:mx-0 [&>[data-mdx-width='bleed']]:w-full [&>[data-mdx-width='bleed']]:max-w-none\",\n].join(' ')\n\nexport const articleNarrowProse = narrowProse\n","/**\n * Doc-specific overrides layered on top of mdxStyles.root.\n *\n * Body copy (p, ul, ol, li, blockquote) inherits sizing from the base\n * mdxStyles — this file only adds layout and structural overrides\n * unique to the component catalog / reference pages.\n */\n\nexport const docMdxStyles = {\n root: [\n 'ds-doc max-w-none',\n // Reference prose — compact enough for token docs, still readable for explanation.\n // Written out literally, never composed from a token at runtime: Tailwind's\n // scanner is static, so a class built at runtime is never seen and the rule\n // is never generated.\n // Leading is a RATIO — `text-base` is `15px * --typography-scale`, so a fixed\n // step (leading-7) freezes at 28px and cramps to 1.24 as the user scales type up.\n '[&>p]:max-w-3xl [&>p]:text-base [&>p]:leading-[1.75] [&>p]:text-muted-foreground',\n '[&>ul]:max-w-3xl [&>ul]:space-y-1.5 [&>ol]:max-w-3xl [&>ol]:space-y-1.5',\n '[&>ul>li]:text-base [&>ul>li]:leading-relaxed [&>ol>li]:text-base [&>ol>li]:leading-relaxed',\n '[&>p+ul]:mt-2.5 [&>p+ol]:mt-2.5 [&>ul+p]:mt-4 [&>ol+p]:mt-4',\n '[&>ul+ul]:mt-3 [&>ol+ol]:mt-3 [&>ul+ol]:mt-3 [&>ol+ul]:mt-3',\n '[&>blockquote]:max-w-3xl [&>blockquote]:text-sm [&>blockquote]:leading-[1.75]',\n // Page title + lead — the title carries hierarchy through size, not weight,\n // so it stays clearly above the h2 ramp without shouting.\n '[&>h1]:mb-2 [&>h1]:font-medium [&>h1]:text-4xl [&>h1]:tracking-tight sm:[&>h1]:text-5xl',\n '[&>h1+p]:mt-0 [&>h1+p]:mb-9 [&>h1+p]:max-w-3xl [&>h1+p]:text-base [&>h1+p]:leading-[1.75] [&>h1+p]:text-muted-foreground',\n // Section headings — smaller than article for catalog density\n '[&>h2]:mt-10 [&>h2]:mb-2 [&>h2]:scroll-mt-24 [&>h2]:font-semibold [&>h2]:text-lg [&>h2]:tracking-tight [&>h2]:first:mt-10 sm:[&>h2]:text-xl',\n '[&>h2+p]:mt-0 [&>h2+p]:mb-4 [&>h2+p]:max-w-3xl',\n '[&>h3]:mt-8 [&>h3]:mb-2 [&>h3]:font-semibold [&>h3]:text-base [&>h3]:tracking-tight',\n '[&>h3+p]:mt-0 [&>h3+p]:mb-3',\n '[&>h4]:mt-6 [&>h4]:mb-2 [&>h4]:font-medium [&>h4]:text-sm',\n // Portable blocks — doc-scale spacing\n '[&>.callout]:my-4 [&>.callout]:sm:my-5 [&>.callout+.callout]:mt-4',\n '[&>.example-container]:my-5',\n '[&>.foundation-preview]:my-5',\n '[&>[data-media]]:my-7',\n '[&>header.not-mdx]:my-8 [&>header.not-mdx]:gap-3',\n '[&>header.not-mdx_h1]:mt-0 [&>header.not-mdx_h1]:font-medium [&>header.not-mdx_h1]:text-4xl [&>header.not-mdx_h1]:tracking-tight',\n '[&>header.not-mdx_p]:mt-0 [&>header.not-mdx_p]:text-base [&>header.not-mdx_p]:leading-relaxed [&>header.not-mdx_p]:text-muted-foreground',\n '[&>div.not-mdx]:my-5',\n '[&>hr]:my-8',\n '[&>.mdx-table-wrapper]:my-6',\n // Code\n '[&_.not-prose>p]:m-0',\n '[&_p_code]:rounded-sm [&_p_code]:px-1 [&_p_code]:py-0 [&_p_code]:text-[0.875em] [&_p_code]:font-medium',\n '[&_li_code]:rounded-sm [&_li_code]:px-1 [&_li_code]:py-0 [&_li_code]:text-[0.875em] [&_li_code]:font-medium',\n '[&>.code-block]:my-5 [&>p+.code-block]:mt-4 [&>.code-block+p]:mt-4 [&>.code-block+h2]:mt-12 [&>.code-block+h3]:mt-8',\n '[&_pre]:m-0 [&_pre]:rounded-xl [&_pre]:border [&_pre]:border-border [&_pre]:bg-muted/25 [&_pre]:p-4',\n '[&_pre_code]:border-0 [&_pre_code]:bg-transparent [&_pre_code]:p-0 [&_pre_code]:font-mono [&_pre_code]:text-sm [&_pre_code]:font-normal [&_pre_code]:leading-relaxed [&_pre_code]:shadow-none [&_pre_code]:ring-0',\n '[&_.not-prose_pre]:m-0 [&_.not-prose_pre]:rounded-none [&_.not-prose_pre]:border-0 [&_.not-prose_pre]:bg-transparent [&_.not-prose_pre]:p-0 [&_.not-prose_pre]:shadow-none',\n '[&_.not-prose_pre_code]:border-0 [&_.not-prose_pre_code]:bg-transparent [&_.not-prose_pre_code]:p-0 [&_.not-prose_pre_code]:shadow-none',\n '[&_.mdx-table-wrapper_table]:text-sm [&_.mdx-table-wrapper_th]:h-10 [&_.mdx-table-wrapper_th]:px-3 [&_.mdx-table-wrapper_td]:px-3 [&_.mdx-table-wrapper_td]:py-2.5',\n '[&_.ds-api-table]:mt-2',\n // Explicit block intent: prose stays compact, visual blocks share one wide measure.\n \"[&>[data-mdx-width='column']]:mx-auto [&>[data-mdx-width='column']]:w-full [&>[data-mdx-width='column']]:max-w-[var(--mdx-measure,42rem)]\",\n \"[&>[data-mdx-width='wide']]:mx-auto [&>[data-mdx-width='wide']]:w-full [&>[data-mdx-width='wide']]:max-w-[var(--mdx-measure-wide,72rem)]\",\n \"[&>[data-mdx-width='bleed']]:mx-0 [&>[data-mdx-width='bleed']]:w-full [&>[data-mdx-width='bleed']]:max-w-none\",\n ].join(' '),\n} as const\n","import { MDXProvider } from '@mdx-js/react'\nimport { clsx } from 'clsx'\nimport type { ReactNode } from 'react'\nimport { FigureLightboxHost } from './lightbox/figure-lightbox-host'\nimport { mdxComponents } from './mdx-components'\nimport { mdxStyles } from './mdx-styles'\nimport { articleNarrowProse } from './variants/article-narrow'\nimport { docMdxStyles } from './variants/docs'\n\nexport type MdxProviderVariant = 'article' | 'docs' | 'narrow'\n\nconst variantRoot: Record<MdxProviderVariant, string> = {\n article: mdxStyles.root,\n docs: clsx(mdxStyles.root, docMdxStyles.root),\n narrow: clsx(mdxStyles.root, articleNarrowProse),\n}\n\nexport type MdxComponentsMap = NonNullable<Parameters<typeof MDXProvider>[0]['components']>\n\nexport type MDXContentProviderProps = {\n children: ReactNode\n className?: string\n components?: MdxComponentsMap\n variant?: MdxProviderVariant\n}\n\nexport function MDXContentProvider({\n children,\n className,\n components,\n variant = 'article',\n}: MDXContentProviderProps) {\n const mergedComponents = components ? { ...mdxComponents, ...components } : mdxComponents\n\n return (\n <MDXProvider components={mergedComponents}>\n <FigureLightboxHost>\n <div\n className={clsx(\n 'min-w-0 [overflow-wrap:anywhere] [&>*]:max-w-full',\n variantRoot[variant],\n className\n )}\n data-mdx-content=\"\"\n >\n {children}\n </div>\n </FigureLightboxHost>\n </MDXProvider>\n )\n}\n"]}
|
package/dist/editor/index.d.ts
CHANGED
|
@@ -44,4 +44,5 @@ interface MdxSourceViewProps {
|
|
|
44
44
|
*/
|
|
45
45
|
declare function MdxSourceView({ source, activeRange, className }: MdxSourceViewProps): React.JSX.Element;
|
|
46
46
|
|
|
47
|
-
export { MdxLivePreview,
|
|
47
|
+
export { MdxLivePreview, MdxSourceEditor, MdxSourceView };
|
|
48
|
+
export type { MdxLivePreviewProps, MdxSourceEditorProps, MdxSourceViewProps };
|
package/dist/editor/index.js
CHANGED
|
@@ -30,7 +30,7 @@ function MdxLivePreview({ source, components, onError }) {
|
|
|
30
30
|
return /* @__PURE__ */ jsx(
|
|
31
31
|
MdxErrorBoundary,
|
|
32
32
|
{
|
|
33
|
-
fallback: (e) => /* @__PURE__ */ jsxs("div", { className: "
|
|
33
|
+
fallback: (e) => /* @__PURE__ */ jsxs("div", { className: "p-4 text-sm text-(--a63-text-danger)", children: [
|
|
34
34
|
"Runtime error: ",
|
|
35
35
|
e.message
|
|
36
36
|
] }),
|
package/dist/editor/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/mdx-live-preview.tsx","../../src/mdx-source-editor.tsx","../../src/mdx-source-view.tsx"],"names":["ReactComponent","useEffect","jsx","jsxs"],"mappings":";;;;;;;A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AAY,OAAA,GAAU,YAAY,SAAA,GAAY,CAAC,MAAM,WAAW,CAAA,CAAA;AAAA;AAClF;AAAA,GACF,GACE,IAAA;AAEJ,EAAA,uBACEC,IAAAA;AAAA,IAAC,KAAA;AAAA,IAAA;AAAA,MACC,SAAA,EAAW,CAAA,6JAAA,EAAgK,SAAA,IAAa,EAAE,CAAA,CAAA;AAAA,MAEzL,QAAA,EAAA;AAAA,QAAA,OAAA;AAAA,QACA,uBACCD,GAAAA,CAAC,KAAA,EAAA,EAAI,SAAA,EAAU,YAAW,uBAAA,EAAyB,EAAE,MAAA,EAAQ,IAAA,IAAQ,CAAA,mBAErEA,IAAC,KAAA,EAAA,EAAI,SAAA,EAAU,iDAAiD,QAAA,EAAA,MAAA,EAAO;AAAA;AAAA;AAAA,GAE3E;AAEJ","file":"index.js","sourcesContent":["// packages/mdx/src/mdx-live-preview.tsx\nimport { MDXProvider } from '@mdx-js/react'\nimport type { ComponentType, ReactNode } from 'react'\nimport { Component as ReactComponent, useEffect } from 'react'\nimport { useMdxRuntime } from './lib/use-mdx-runtime'\n\nclass MdxErrorBoundary extends ReactComponent<\n { children: ReactNode; resetKey: string; fallback: (e: Error) => ReactNode },\n { err: Error | null }\n> {\n state: { err: Error | null } = { err: null }\n static getDerivedStateFromError(err: Error) {\n return { err }\n }\n componentDidUpdate(prev: { resetKey: string }) {\n if (prev.resetKey !== this.props.resetKey && this.state.err) {\n this.setState({ err: null })\n }\n }\n render() {\n return this.state.err ? this.props.fallback(this.state.err) : this.props.children\n }\n}\n\nexport interface MdxLivePreviewProps {\n source: string\n components: Record<string, ComponentType<unknown>>\n onError?: (error: Error | null) => void\n}\n\n/**\n * Renders runtime-compiled MDX inside the given component scope, isolating\n * runtime throws in an error boundary. Compile errors are surfaced via onError\n * while the last good render stays on screen.\n */\nexport function MdxLivePreview({ source, components, onError }: MdxLivePreviewProps) {\n const { Component, error } = useMdxRuntime(source)\n\n useEffect(() => {\n onError?.(error)\n }, [error, onError])\n\n if (!Component) {\n return (\n <div className=\"text-muted-foreground flex h-full items-center justify-center p-8 text-sm\">\n Start typing MDX…\n </div>\n )\n }\n\n return (\n <MdxErrorBoundary\n fallback={e => <div className=\"text-destructive p-4 text-sm\">Runtime error: {e.message}</div>}\n resetKey={source}\n >\n <MDXProvider components={components}>\n <Component />\n </MDXProvider>\n </MdxErrorBoundary>\n )\n}\n","// packages/mdx/src/mdx-source-editor.tsx\nimport { useEffect, useState } from 'react'\nimport Editor from 'react-simple-code-editor'\nimport { highlightWithLoadedHighlighter, loadHighlighter } from './lib/use-shiki-highlight'\n\nexport interface MdxSourceEditorProps {\n value: string\n onChange: (next: string) => void\n className?: string\n}\n\nfunction escapeHtml(s: string): string {\n return s.replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>')\n}\n\n// react-simple-code-editor's highlight prop is synchronous; shiki loads async.\n// Return escaped plain text until the shared highlighter is ready (forced\n// re-render below), then highlighted spans. Single dark theme = real inline\n// colors that don't depend on theme CSS.\nfunction highlight(code: string): string {\n const html = highlightWithLoadedHighlighter(code)\n if (!html) return escapeHtml(code)\n return html\n .replace(/^<pre[^>]*>/, '')\n .replace(/<\\/pre>$/, '')\n .replace(/^<code[^>]*>/, '')\n .replace(/<\\/code>$/, '')\n}\n\n/**\n * Editable MDX surface — a textarea layered over shiki-highlighted output.\n * Sibling of the read-only MdxSourceView; the panel chooses which to show.\n */\nexport function MdxSourceEditor({ value, onChange, className }: MdxSourceEditorProps) {\n const [, force] = useState(0)\n useEffect(() => {\n let active = true\n // loadHighlighter() dynamically imports shiki and CAN reject; without the\n // rejection handler a failed load became an unhandled rejection. On failure\n // we simply stay on the escaped plain-text fallback in highlight().\n loadHighlighter().then(\n () => {\n if (active) force(n => n + 1)\n },\n () => {\n // no-op: highlight() already degrades to escaped plain text\n }\n )\n return () => {\n active = false\n }\n }, [])\n\n return (\n <div className={`bg-card/40 h-full overflow-auto ${className ?? ''}`}>\n <Editor\n highlight={highlight}\n onValueChange={onChange}\n padding={12}\n style={{\n fontFamily: 'ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace',\n fontSize: 12,\n lineHeight: 1.5,\n minHeight: '100%',\n }}\n textareaClassName=\"focus:outline-none\"\n value={value}\n />\n </div>\n )\n}\n","import { useEffect, useRef } from 'react'\nimport { useShikiHighlight } from './lib/use-shiki-highlight'\n\nexport interface MdxSourceViewProps {\n source: string\n /** 1-based, inclusive line range to highlight + scroll into view. */\n activeRange?: { startLine: number; endLine: number }\n className?: string\n}\n\n// Matches the forced `--pre` line-height and padding below, so the active-range\n// band lines up with shiki's rendered lines.\nconst LINE_HEIGHT = '1.5em'\nconst PRE_PADDING = '0.75rem' // Tailwind p-3\n\n/**\n * Read-only, syntax-highlighted view of MDX source. Presentation-only — no\n * docking/positioning. MDX is highlighted as `tsx` (JSX superset). When\n * `activeRange` is set, those lines get a subtle highlight band and are\n * scrolled into view.\n *\n * Phase-2 seam: a future editable `MdxSourceEditor` replaces this surface inside\n * the same panel shell without changing the source plumbing.\n */\nexport function MdxSourceView({ source, activeRange, className }: MdxSourceViewProps) {\n const html = useShikiHighlight(source, 'tsx')\n const activeRef = useRef<HTMLDivElement>(null)\n\n // Scroll the active band into view when the range or content changes.\n // `html` is a trigger, not read in the body: the band only has correct\n // geometry once the highlighted source has rendered.\n // html re-triggers the scroll after highlight renders\n useEffect(() => {\n if (!activeRange) return\n activeRef.current?.scrollIntoView({ block: 'nearest' })\n }, [activeRange, html])\n\n const overlay = activeRange ? (\n <div\n aria-hidden\n className=\"bg-primary/10 pointer-events-none absolute inset-x-0\"\n ref={activeRef}\n style={{\n // The shiki <pre> is padded by PRE_PADDING; offset the band to match.\n top: `calc(${PRE_PADDING} + ${activeRange.startLine - 1} * ${LINE_HEIGHT})`,\n height: `calc(${activeRange.endLine - activeRange.startLine + 1} * ${LINE_HEIGHT})`,\n }}\n />\n ) : null\n\n return (\n <div\n className={`bg-card/40 relative h-full overflow-auto font-mono text-xs [&_code]:leading-[1.5em] [&_pre]:!m-0 [&_pre]:!bg-transparent [&_pre]:p-3 [&_pre]:leading-[1.5em] ${className ?? ''}`}\n >\n {overlay}\n {html ? (\n <div className=\"relative\" dangerouslySetInnerHTML={{ __html: html }} />\n ) : (\n <pre className=\"text-muted-foreground m-0 p-3 leading-[1.5em]\">{source}</pre>\n )}\n </div>\n )\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["../../src/mdx-live-preview.tsx","../../src/mdx-source-editor.tsx","../../src/mdx-source-view.tsx"],"names":["ReactComponent","useEffect","jsx","jsxs"],"mappings":";;;;;;;AAMA,IAAM,gBAAA,GAAN,cAA+BA,SAAA,CAG7B;AAAA,EACA,KAAA,GAA+B,EAAE,GAAA,EAAK,IAAA,EAAK;AAAA,EAC3C,OAAO,yBAAyB,GAAA,EAAY;AAC1C,IAAA,OAAO,EAAE,GAAA,EAAI;AAAA,EACf;AAAA,EACA,mBAAmB,IAAA,EAA4B;AAC7C,IAAA,IAAI,KAAK,QAAA,KAAa,IAAA,CAAK,MAAM,QAAA,IAAY,IAAA,CAAK,MAAM,GAAA,EAAK;AAC3D,MAAA,IAAA,CAAK,QAAA,CAAS,EAAE,GAAA,EAAK,IAAA,EAAM,CAAA;AAAA,IAC7B;AAAA,EACF;AAAA,EACA,MAAA,GAAS;AACP,IAAA,OAAO,IAAA,CAAK,KAAA,CAAM,GAAA,GAAM,IAAA,CAAK,KAAA,CAAM,QAAA,CAAS,IAAA,CAAK,KAAA,CAAM,GAAG,CAAA,GAAI,IAAA,CAAK,KAAA,CAAM,QAAA;AAAA,EAC3E;AACF,CAAA;AAaO,SAAS,cAAA,CAAe,EAAE,MAAA,EAAQ,UAAA,EAAY,SAAQ,EAAwB;AACnF,EAAA,MAAM,EAAE,SAAA,EAAW,KAAA,EAAM,GAAI,cAAc,MAAM,CAAA;AAEjD,EAAA,SAAA,CAAU,MAAM;AACd,IAAA,OAAA,GAAU,KAAK,CAAA;AAAA,EACjB,CAAA,EAAG,CAAC,KAAA,EAAO,OAAO,CAAC,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AA;AAEtB,EAAA,MAAM,OAAA,GAAU,8BACdC,GAAAA;AAAA,IAAC,KAAA;AAAA,IAAA;AAAA,MACC,aAAA,EAAW,IAAA;AAAA,MACX,SAAA,EAAU,sDAAA;AAAA,MACV,GAAA,EAAK,SAAA;AAAA,MACL,KAAA,EAAO;AAAA;AAAA,QAEL,GAAA,EAAK,QAAQ,WAAW,CAAA,GAAA,EAAM,YAAY,SAAA,GAAY,CAAC,MAAM,WAAW,CAAA,CAAA,CAAA;AAAA,QACxE,MAAA,EAAQ,QAAQ,WAAA,CAAY,OAAA,GAAU,YAAY,SAAA,GAAY,CAAC,MAAM,WAAW,CAAA,CAAA;AAAA;AAClF;AAAA,GACF,GACE,IAAA;AAEJ,EAAA,uBACEC,IAAAA;AAAA,IAAC,KAAA;AAAA,IAAA;AAAA,MACC,SAAA,EAAW,CAAA,6JAAA,EAAgK,SAAA,IAAa,EAAE,CAAA,CAAA;AAAA,MAEzL,QAAA,EAAA;AAAA,QAAA,OAAA;AAAA,QACA,uBACCD,GAAAA,CAAC,KAAA,EAAA,EAAI,SAAA,EAAU,YAAW,uBAAA,EAAyB,EAAE,MAAA,EAAQ,IAAA,IAAQ,CAAA,mBAErEA,IAAC,KAAA,EAAA,EAAI,SAAA,EAAU,iDAAiD,QAAA,EAAA,MAAA,EAAO;AAAA;AAAA;AAAA,GAE3E;AAEJ","file":"index.js","sourcesContent":["// packages/mdx/src/mdx-live-preview.tsx\nimport { MDXProvider } from '@mdx-js/react'\nimport type { ComponentType, ReactNode } from 'react'\nimport { Component as ReactComponent, useEffect } from 'react'\nimport { useMdxRuntime } from './lib/use-mdx-runtime'\n\nclass MdxErrorBoundary extends ReactComponent<\n { children: ReactNode; resetKey: string; fallback: (e: Error) => ReactNode },\n { err: Error | null }\n> {\n state: { err: Error | null } = { err: null }\n static getDerivedStateFromError(err: Error) {\n return { err }\n }\n componentDidUpdate(prev: { resetKey: string }) {\n if (prev.resetKey !== this.props.resetKey && this.state.err) {\n this.setState({ err: null })\n }\n }\n render() {\n return this.state.err ? this.props.fallback(this.state.err) : this.props.children\n }\n}\n\nexport interface MdxLivePreviewProps {\n source: string\n components: Record<string, ComponentType<unknown>>\n onError?: (error: Error | null) => void\n}\n\n/**\n * Renders runtime-compiled MDX inside the given component scope, isolating\n * runtime throws in an error boundary. Compile errors are surfaced via onError\n * while the last good render stays on screen.\n */\nexport function MdxLivePreview({ source, components, onError }: MdxLivePreviewProps) {\n const { Component, error } = useMdxRuntime(source)\n\n useEffect(() => {\n onError?.(error)\n }, [error, onError])\n\n if (!Component) {\n return (\n <div className=\"text-muted-foreground flex h-full items-center justify-center p-8 text-sm\">\n Start typing MDX…\n </div>\n )\n }\n\n return (\n <MdxErrorBoundary\n fallback={e => (\n <div className=\"p-4 text-sm text-(--a63-text-danger)\">Runtime error: {e.message}</div>\n )}\n resetKey={source}\n >\n <MDXProvider components={components}>\n <Component />\n </MDXProvider>\n </MdxErrorBoundary>\n )\n}\n","// packages/mdx/src/mdx-source-editor.tsx\nimport { useEffect, useState } from 'react'\nimport Editor from 'react-simple-code-editor'\nimport { highlightWithLoadedHighlighter, loadHighlighter } from './lib/use-shiki-highlight'\n\nexport interface MdxSourceEditorProps {\n value: string\n onChange: (next: string) => void\n className?: string\n}\n\nfunction escapeHtml(s: string): string {\n return s.replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>')\n}\n\n// react-simple-code-editor's highlight prop is synchronous; shiki loads async.\n// Return escaped plain text until the shared highlighter is ready (forced\n// re-render below), then highlighted spans. Single dark theme = real inline\n// colors that don't depend on theme CSS.\nfunction highlight(code: string): string {\n const html = highlightWithLoadedHighlighter(code)\n if (!html) return escapeHtml(code)\n return html\n .replace(/^<pre[^>]*>/, '')\n .replace(/<\\/pre>$/, '')\n .replace(/^<code[^>]*>/, '')\n .replace(/<\\/code>$/, '')\n}\n\n/**\n * Editable MDX surface — a textarea layered over shiki-highlighted output.\n * Sibling of the read-only MdxSourceView; the panel chooses which to show.\n */\nexport function MdxSourceEditor({ value, onChange, className }: MdxSourceEditorProps) {\n const [, force] = useState(0)\n useEffect(() => {\n let active = true\n // loadHighlighter() dynamically imports shiki and CAN reject; without the\n // rejection handler a failed load became an unhandled rejection. On failure\n // we simply stay on the escaped plain-text fallback in highlight().\n loadHighlighter().then(\n () => {\n if (active) force(n => n + 1)\n },\n () => {\n // no-op: highlight() already degrades to escaped plain text\n }\n )\n return () => {\n active = false\n }\n }, [])\n\n return (\n <div className={`bg-card/40 h-full overflow-auto ${className ?? ''}`}>\n <Editor\n highlight={highlight}\n onValueChange={onChange}\n padding={12}\n style={{\n fontFamily: 'ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace',\n fontSize: 12,\n lineHeight: 1.5,\n minHeight: '100%',\n }}\n textareaClassName=\"focus:outline-none\"\n value={value}\n />\n </div>\n )\n}\n","import { useEffect, useRef } from 'react'\nimport { useShikiHighlight } from './lib/use-shiki-highlight'\n\nexport interface MdxSourceViewProps {\n source: string\n /** 1-based, inclusive line range to highlight + scroll into view. */\n activeRange?: { startLine: number; endLine: number }\n className?: string\n}\n\n// Matches the forced `--pre` line-height and padding below, so the active-range\n// band lines up with shiki's rendered lines.\nconst LINE_HEIGHT = '1.5em'\nconst PRE_PADDING = '0.75rem' // Tailwind p-3\n\n/**\n * Read-only, syntax-highlighted view of MDX source. Presentation-only — no\n * docking/positioning. MDX is highlighted as `tsx` (JSX superset). When\n * `activeRange` is set, those lines get a subtle highlight band and are\n * scrolled into view.\n *\n * Phase-2 seam: a future editable `MdxSourceEditor` replaces this surface inside\n * the same panel shell without changing the source plumbing.\n */\nexport function MdxSourceView({ source, activeRange, className }: MdxSourceViewProps) {\n const html = useShikiHighlight(source, 'tsx')\n const activeRef = useRef<HTMLDivElement>(null)\n\n // Scroll the active band into view when the range or content changes.\n // `html` is a trigger, not read in the body: the band only has correct\n // geometry once the highlighted source has rendered.\n // html re-triggers the scroll after highlight renders\n useEffect(() => {\n if (!activeRange) return\n activeRef.current?.scrollIntoView({ block: 'nearest' })\n }, [activeRange, html])\n\n const overlay = activeRange ? (\n <div\n aria-hidden\n className=\"bg-primary/10 pointer-events-none absolute inset-x-0\"\n ref={activeRef}\n style={{\n // The shiki <pre> is padded by PRE_PADDING; offset the band to match.\n top: `calc(${PRE_PADDING} + ${activeRange.startLine - 1} * ${LINE_HEIGHT})`,\n height: `calc(${activeRange.endLine - activeRange.startLine + 1} * ${LINE_HEIGHT})`,\n }}\n />\n ) : null\n\n return (\n <div\n className={`bg-card/40 relative h-full overflow-auto font-mono text-xs [&_code]:leading-[1.5em] [&_pre]:!m-0 [&_pre]:!bg-transparent [&_pre]:p-3 [&_pre]:leading-[1.5em] ${className ?? ''}`}\n >\n {overlay}\n {html ? (\n <div className=\"relative\" dangerouslySetInnerHTML={{ __html: html }} />\n ) : (\n <pre className=\"text-muted-foreground m-0 p-3 leading-[1.5em]\">{source}</pre>\n )}\n </div>\n )\n}\n"]}
|
|
@@ -84,4 +84,5 @@ declare function MdxFrameItemPanel({ bodyClassName, children, className, eyebrow
|
|
|
84
84
|
type MdxFrameFooterProps = ComponentPropsWithoutRef<typeof FrameFooter>;
|
|
85
85
|
declare function MdxFrameFooter({ className, ...props }: MdxFrameFooterProps): React.JSX.Element;
|
|
86
86
|
|
|
87
|
-
export {
|
|
87
|
+
export { FramedBlock as F, TechnicalFrame as T, FramedBlockHeader as a, MdxFrame as e, MdxFrameChrome as f, MdxFrameDescription as h, MdxFrameFooter as j, MdxFrameHeader as l, MdxFrameItemPanel as o, MdxFramePanel as q, MdxFrameSurface as v, MdxFrameTitle as x };
|
|
88
|
+
export type { TechnicalFrameProps as A, MdxFrameItemTone as M, FramedBlockHeaderProps as b, FramedBlockProps as c, FramedBlockSpacing as d, MdxFrameChromeProps as g, MdxFrameDescriptionProps as i, MdxFrameFooterProps as k, MdxFrameHeaderProps as m, MdxFrameHeadingProps as n, MdxFrameItemPanelProps as p, MdxFramePanelProps as r, MdxFrameProps as s, MdxFrameRootElement as t, MdxFrameSpacing as u, MdxFrameSurfaceProps as w, MdxFrameTitleProps as y, MdxFrameWidth as z };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import * as React$1 from 'react';
|
|
2
|
-
import { a as MDXContentProviderProps } from './mdx-provider-
|
|
3
|
-
export { E as ExampleContext, e as MDXContentProvider, b as MdxProviderVariant, c as blockMdxComponents, h as hasSkipClass, m as mdxComponents, u as useIsInsideExample, d as useMdxStyle } from './mdx-provider-
|
|
2
|
+
import { a as MDXContentProviderProps } from './mdx-provider-FJp99Azd.js';
|
|
3
|
+
export { E as ExampleContext, e as MDXContentProvider, b as MdxProviderVariant, c as blockMdxComponents, h as hasSkipClass, m as mdxComponents, u as useIsInsideExample, d as useMdxStyle } from './mdx-provider-FJp99Azd.js';
|
|
4
4
|
export { M as MDX_FIGURE_LIGHTBOX_GALLERY_ID } from './constants-CuaBcwMe.js';
|
|
5
|
-
export { a as PhotoSwipeGallery, c as PhotoSwipeImage, e as getRealImageDimensions } from './photo-swipe-
|
|
6
|
-
export { C as CalloutType, m as mdxStyles } from './video-block-
|
|
5
|
+
export { a as PhotoSwipeGallery, c as PhotoSwipeImage, e as getRealImageDimensions } from './photo-swipe-BdrjP_BB.js';
|
|
6
|
+
export { C as CalloutType, m as mdxStyles } from './video-block-Cg5EK_vS.js';
|
|
7
7
|
import './blocks/credits-block-entry.js';
|
|
8
8
|
import './blocks/media-caption-entry.js';
|
|
9
9
|
import '@mdx-js/react';
|
|
10
|
-
import './slots-
|
|
10
|
+
import './slots-D8ZQyRhv.js';
|
|
11
11
|
import '@atom63/ui-react';
|
|
12
12
|
|
|
13
13
|
interface ComparisonContextValue {
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { MDXContentProvider } from './chunk-
|
|
2
|
-
export { MDXContentProvider, articleNarrowProse, blockMdxComponents, docMdxStyles, hasSkipClass, isExternalMdxHref, mdxComponents, useMdxStyle } from './chunk-
|
|
3
|
-
export { ComparisonProvider, ExampleContext, useComparisonContext, useIsInsideExample } from './chunk-
|
|
1
|
+
import { MDXContentProvider } from './chunk-XT6W33Q2.js';
|
|
2
|
+
export { MDXContentProvider, articleNarrowProse, blockMdxComponents, docMdxStyles, hasSkipClass, isExternalMdxHref, mdxComponents, useMdxStyle } from './chunk-XT6W33Q2.js';
|
|
3
|
+
export { ComparisonProvider, ExampleContext, useComparisonContext, useIsInsideExample } from './chunk-WBFPTNBO.js';
|
|
4
4
|
import './chunk-WZ6US342.js';
|
|
5
5
|
import './chunk-DJSENA7Q.js';
|
|
6
6
|
import './chunk-2RCEDZBB.js';
|
package/dist/lightbox/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { M as MDX_FIGURE_LIGHTBOX_GALLERY_ID } from '../constants-CuaBcwMe.js';
|
|
2
|
-
import { P as PhotoSwipeImageData } from '../photo-swipe-
|
|
3
|
-
export { a as PhotoSwipeGallery, b as PhotoSwipeGalleryProps, c as PhotoSwipeImage, d as PhotoSwipeImageProps, g as getImageDimensions, e as getRealImageDimensions, l as loadImageDimensions, u as usePhotoSwipe } from '../photo-swipe-
|
|
2
|
+
import { P as PhotoSwipeImageData } from '../photo-swipe-BdrjP_BB.js';
|
|
3
|
+
export { a as PhotoSwipeGallery, b as PhotoSwipeGalleryProps, c as PhotoSwipeImage, d as PhotoSwipeImageProps, g as getImageDimensions, e as getRealImageDimensions, l as loadImageDimensions, u as usePhotoSwipe } from '../photo-swipe-BdrjP_BB.js';
|
|
4
4
|
import * as React$1 from 'react';
|
|
5
5
|
|
|
6
6
|
type FigureLightboxHostProps = {
|
|
@@ -41,4 +41,5 @@ declare function collectFigureLightboxImages(galleryId: string, clickedTrigger:
|
|
|
41
41
|
/** True while a figure lightbox is open (or just closed on this Escape tick). */
|
|
42
42
|
declare function isFigureLightboxOpen(): boolean;
|
|
43
43
|
|
|
44
|
-
export { FigureLightboxHost,
|
|
44
|
+
export { FigureLightboxHost, FigureLightboxTrigger, PhotoSwipeImageData, collectFigureLightboxImages, isFigureLightboxOpen, resolveLightboxTrigger };
|
|
45
|
+
export type { FigureLightboxHostProps, FigureLightboxTriggerProps };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import React__default, { ReactNode } from 'react';
|
|
3
|
-
import { A as Accordion, a as Callout, b as CodeBlock, c as ColorSwatchItem, d as ComparisonPair, D as DemoStageProps, E as ExampleContainer, F as FigureBlock, M as MediaPlaceholder, e as MermaidDiagram, P as PageMeta, f as PageTableOfContents, R as ResourceList, S as ScrollStage, g as StatCard, h as StatGrid, i as Steps, T as Tabs, j as Timeline, V as VideoBlock } from './video-block-
|
|
3
|
+
import { A as Accordion, a as Callout, b as CodeBlock, c as ColorSwatchItem, d as ComparisonPair, D as DemoStageProps, E as ExampleContainer, F as FigureBlock, M as MediaPlaceholder, e as MermaidDiagram, P as PageMeta, f as PageTableOfContents, R as ResourceList, S as ScrollStage, g as StatCard, h as StatGrid, i as Steps, T as Tabs, j as Timeline, V as VideoBlock } from './video-block-Cg5EK_vS.js';
|
|
4
4
|
import { CreditsBlock } from './blocks/credits-block-entry.js';
|
|
5
5
|
import { MediaCaption } from './blocks/media-caption-entry.js';
|
|
6
6
|
import { MDXProvider } from '@mdx-js/react';
|
|
@@ -182,4 +182,5 @@ type MDXContentProviderProps = {
|
|
|
182
182
|
};
|
|
183
183
|
declare function MDXContentProvider({ children, className, components, variant, }: MDXContentProviderProps): React.JSX.Element;
|
|
184
184
|
|
|
185
|
-
export { ExampleContext as E,
|
|
185
|
+
export { ExampleContext as E, blockMdxComponents as c, useMdxStyle as d, MDXContentProvider as e, hasSkipClass as h, mdxComponents as m, useIsInsideExample as u };
|
|
186
|
+
export type { MdxComponentsMap as M, MDXContentProviderProps as a, MdxProviderVariant as b };
|
|
@@ -63,4 +63,5 @@ declare function usePhotoSwipe(_images: PhotoSwipeImageData[]): {
|
|
|
63
63
|
photoSwipe: null;
|
|
64
64
|
};
|
|
65
65
|
|
|
66
|
-
export {
|
|
66
|
+
export { PhotoSwipeGallery as a, PhotoSwipeImage as c, getRealImageDimensions as e, getImageDimensions as g, loadImageDimensions as l, usePhotoSwipe as u };
|
|
67
|
+
export type { PhotoSwipeImageData as P, PhotoSwipeGalleryProps as b, PhotoSwipeImageProps as d };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
|
-
export { F as FramedBlock, a as FramedBlockHeader, b as FramedBlockHeaderProps, c as FramedBlockProps, d as FramedBlockSpacing, e as MdxFrame, f as MdxFrameChrome, g as MdxFrameChromeProps, h as MdxFrameDescription, i as MdxFrameDescriptionProps, j as MdxFrameFooter, k as MdxFrameFooterProps, l as MdxFrameHeader, m as MdxFrameHeaderProps, n as MdxFrameHeadingProps, o as MdxFrameItemPanel, p as MdxFrameItemPanelProps, M as MdxFrameItemTone, q as MdxFramePanel, r as MdxFramePanelProps, s as MdxFrameProps, t as MdxFrameRootElement, u as MdxFrameSpacing, v as MdxFrameSurface, w as MdxFrameSurfaceProps, x as MdxFrameTitle, y as MdxFrameTitleProps, z as MdxFrameWidth, T as TechnicalFrame, A as TechnicalFrameProps } from '../framed-block-
|
|
4
|
-
export { S as SlotComponent, c as createSlot, h as hasSlot, p as pickRest, a as pickSlot } from '../slots-
|
|
3
|
+
export { F as FramedBlock, a as FramedBlockHeader, b as FramedBlockHeaderProps, c as FramedBlockProps, d as FramedBlockSpacing, e as MdxFrame, f as MdxFrameChrome, g as MdxFrameChromeProps, h as MdxFrameDescription, i as MdxFrameDescriptionProps, j as MdxFrameFooter, k as MdxFrameFooterProps, l as MdxFrameHeader, m as MdxFrameHeaderProps, n as MdxFrameHeadingProps, o as MdxFrameItemPanel, p as MdxFrameItemPanelProps, M as MdxFrameItemTone, q as MdxFramePanel, r as MdxFramePanelProps, s as MdxFrameProps, t as MdxFrameRootElement, u as MdxFrameSpacing, v as MdxFrameSurface, w as MdxFrameSurfaceProps, x as MdxFrameTitle, y as MdxFrameTitleProps, z as MdxFrameWidth, T as TechnicalFrame, A as TechnicalFrameProps } from '../framed-block-B1hGPjE2.js';
|
|
4
|
+
export { S as SlotComponent, c as createSlot, h as hasSlot, p as pickRest, a as pickSlot } from '../slots-D8ZQyRhv.js';
|
|
5
5
|
import '@atom63/ui-react';
|
|
6
6
|
|
|
7
7
|
type AsideSide = 'left' | 'right';
|
|
@@ -127,4 +127,5 @@ declare function Stagger({ children, className }: StaggerProps): React.JSX.Eleme
|
|
|
127
127
|
*/
|
|
128
128
|
declare function useMdxReducedMotion(): boolean;
|
|
129
129
|
|
|
130
|
-
export { Aside,
|
|
130
|
+
export { Aside, Bleed, Grid, Reveal, Section, Stack, Stagger, getRevealMotionProps, getStaggerVariants, motionDurations, motionEasings, useMdxReducedMotion };
|
|
131
|
+
export type { AsideProps, AsideSide, BleedProps, GridProps, LayoutGap, MotionSpeed, RevealProps, SectionProps, SectionWidth, StackProps, StaggerProps };
|
package/dist/runtime/index.d.ts
CHANGED
|
@@ -36,4 +36,5 @@ declare function loadHighlighter(): Promise<HighlighterCore>;
|
|
|
36
36
|
/** The loaded highlighter instance, or null if it hasn't finished loading. */
|
|
37
37
|
declare function getLoadedHighlighter(): HighlighterCore | null;
|
|
38
38
|
|
|
39
|
-
export {
|
|
39
|
+
export { compileMdx, getLoadedHighlighter, loadHighlighter, normalizeCodeLanguage, useMdxRuntime, useShikiHighlight, useShikiHighlightResult };
|
|
40
|
+
export type { MdxComponent, MdxRuntimeResult, ShikiHighlightResult };
|
|
@@ -20,4 +20,5 @@ declare function pickSlot(children: ReactNode, slot: SlotComponent): ReactNode |
|
|
|
20
20
|
* re-keyed via `Children.toArray` so the result is safe to render as a list. */
|
|
21
21
|
declare function pickRest(children: ReactNode, slots: SlotComponent[]): ReactNode[];
|
|
22
22
|
|
|
23
|
-
export {
|
|
23
|
+
export { pickSlot as a, createSlot as c, hasSlot as h, pickRest as p };
|
|
24
|
+
export type { SlotComponent as S };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import React__default, { ReactNode, ComponentProps, ReactElement } from 'react';
|
|
3
|
-
import { S as SlotComponent } from './slots-
|
|
3
|
+
import { S as SlotComponent } from './slots-D8ZQyRhv.js';
|
|
4
4
|
import { Accordion as Accordion$1, AccordionItem, AccordionTrigger, AccordionContent, Tabs as Tabs$1, TabsList, TabsTab, TabsPanel } from '@atom63/ui-react';
|
|
5
5
|
|
|
6
6
|
type DemoStageProps = {
|
|
@@ -450,6 +450,10 @@ type VideoCaptionPolicy = {
|
|
|
450
450
|
trackSrc?: string;
|
|
451
451
|
};
|
|
452
452
|
type VideoBlockProps = {
|
|
453
|
+
/**
|
|
454
|
+
* Start playing, muted, on load. Ignored when the reader prefers reduced
|
|
455
|
+
* motion. Without `controls`, a pause and play toggle sits over the video.
|
|
456
|
+
*/
|
|
453
457
|
autoPlay?: boolean;
|
|
454
458
|
caption?: string;
|
|
455
459
|
className?: string;
|
|
@@ -457,12 +461,24 @@ type VideoBlockProps = {
|
|
|
457
461
|
fit?: keyof typeof fitClasses;
|
|
458
462
|
loop?: boolean;
|
|
459
463
|
muted?: boolean;
|
|
464
|
+
/** Name of the toggle while the video plays. Defaults to "Pause video". */
|
|
465
|
+
pauseLabel?: string;
|
|
466
|
+
/** Name of the toggle while the video is paused. Defaults to "Play video". */
|
|
467
|
+
playLabel?: string;
|
|
460
468
|
showCaption?: boolean;
|
|
461
469
|
spacing?: MediaSpacing;
|
|
462
470
|
src: string;
|
|
463
471
|
title: string;
|
|
472
|
+
/** BCP 47 language of the caption track (`srclang`). Defaults to `en`. */
|
|
473
|
+
trackLang?: string;
|
|
474
|
+
/**
|
|
475
|
+
* Name of the caption track in the player's caption menu. Defaults to the
|
|
476
|
+
* track language's own name, such as "English" or "Deutsch".
|
|
477
|
+
*/
|
|
478
|
+
trackLabel?: string;
|
|
464
479
|
} & VideoCaptionPolicy;
|
|
465
480
|
/** Portable video player for MDX lessons and docs. */
|
|
466
|
-
declare function VideoBlock({ title, autoPlay, caption, className, controls, fit, loop, muted, showCaption, spacing, src, trackSrc, }: VideoBlockProps): React.JSX.Element;
|
|
481
|
+
declare function VideoBlock({ title, autoPlay, caption, captionPolicy, className, controls, fit, loop, muted, pauseLabel, playLabel, showCaption, spacing, src, trackLabel, trackLang, trackSrc, }: VideoBlockProps): React.JSX.Element;
|
|
467
482
|
|
|
468
|
-
export { Accordion as A,
|
|
483
|
+
export { Accordion as A, ExampleContainer as E, FigureBlock as F, MediaPlaceholder as M, PageMeta as P, ResourceList as R, ScrollStage as S, Tabs as T, VideoBlock as V, defaultMermaidDiagramLabels as Y, Callout as a, CodeBlock as b, ColorSwatchItem as c, ComparisonPair as d, MermaidDiagram as e, PageTableOfContents as f, StatCard as g, StatGrid as h, Steps as i, Timeline as j, mdxStyles as m, DemoStage as r };
|
|
484
|
+
export type { ResourceItem as B, CalloutType as C, DemoStageProps as D, ResourceListProps as G, ScrollStageProps as H, ScrollStageStepProps as I, StatCardProps as J, StatGridProps as K, StatTrend as L, StepsProps as N, StepsStepProps as O, TabsProps as Q, TimelineItemProps as U, TimelineProps as W, VideoBlockProps as X, AccordionProps as k, CalloutProps as l, CodeBlockProps as n, ColorSwatchItemProps as o, ComparisonPairProps as p, ComparisonSlotProps as q, ExampleContainerProps as s, FigureBlockProps as t, MediaPlaceholderKind as u, MediaPlaceholderProps as v, MermaidDiagramLabels as w, MermaidDiagramProps as x, PageMetaProps as y, PageTableOfContentsProps as z };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atom63/mdx",
|
|
3
|
-
"version": "0.4.0-beta.
|
|
3
|
+
"version": "0.4.0-beta.5",
|
|
4
4
|
"description": "MDX prose components, blocks, layout primitives and article styles for the Atom63 design system",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -95,12 +95,12 @@
|
|
|
95
95
|
"beautiful-mermaid": "^1.1.3",
|
|
96
96
|
"clsx": "^2.1.1",
|
|
97
97
|
"lucide-react": "^1.70.0",
|
|
98
|
-
"motion": "^
|
|
98
|
+
"motion": "^14.14.0",
|
|
99
99
|
"react-compare-slider": "^4.0.0",
|
|
100
100
|
"react-simple-code-editor": "^0.14.1",
|
|
101
101
|
"shiki": "^4.6.0",
|
|
102
|
-
"@atom63/
|
|
103
|
-
"@atom63/
|
|
102
|
+
"@atom63/styles": "0.1.0-beta.9",
|
|
103
|
+
"@atom63/ui-react": "0.2.0-beta.14"
|
|
104
104
|
},
|
|
105
105
|
"peerDependencies": {
|
|
106
106
|
"react": "^19.1.0",
|
|
@@ -117,13 +117,13 @@
|
|
|
117
117
|
"@vitejs/plugin-react": "^6.3.0",
|
|
118
118
|
"axe-core": "^4.14.0",
|
|
119
119
|
"eslint": "10.14.0",
|
|
120
|
-
"jsdom": "
|
|
120
|
+
"jsdom": "31.0.1",
|
|
121
121
|
"react": "^19.3.1",
|
|
122
122
|
"react-dom": "^19.3.1",
|
|
123
123
|
"storybook": "^10.6.6",
|
|
124
|
-
"tsup": "^
|
|
125
|
-
"typescript": "~
|
|
126
|
-
"vitest": "
|
|
124
|
+
"tsup": "^9.0.0",
|
|
125
|
+
"typescript": "~6.0.3",
|
|
126
|
+
"vitest": "5.1.1",
|
|
127
127
|
"vitest-axe": "^0.1.0",
|
|
128
128
|
"@atom63/eslint-config": "0.1.0",
|
|
129
129
|
"@atom63/tsconfig": "0.1.0"
|
|
@@ -8,4 +8,11 @@
|
|
|
8
8
|
.mdx-video-stage {
|
|
9
9
|
background-color: var(--a63-surface-muted);
|
|
10
10
|
}
|
|
11
|
+
|
|
12
|
+
/* The pause and play toggle of an autoplaying video without controls. */
|
|
13
|
+
.mdx-video-toggle {
|
|
14
|
+
position: absolute;
|
|
15
|
+
inset-block-end: var(--a63-space-3);
|
|
16
|
+
inset-inline-end: var(--a63-space-3);
|
|
17
|
+
}
|
|
11
18
|
}
|
package/src/styles/base.css
CHANGED
|
@@ -34,9 +34,9 @@
|
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
.mdx-frame-item-negative {
|
|
37
|
-
border-color: color-mix(in oklab, var(--a63-
|
|
38
|
-
background-color: color-mix(in oklab, var(--a63-
|
|
39
|
-
color: var(--a63-
|
|
37
|
+
border-color: color-mix(in oklab, var(--a63-status-danger) 12%, var(--a63-border-subtle));
|
|
38
|
+
background-color: color-mix(in oklab, var(--a63-status-danger) 3%, var(--a63-surface-page));
|
|
39
|
+
color: var(--a63-text-danger);
|
|
40
40
|
}
|
|
41
41
|
|
|
42
42
|
.mdx-frame-item-positive {
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
}
|
|
57
57
|
|
|
58
58
|
.mdx-frame-item-negative .mdx-frame-item-marker {
|
|
59
|
-
background-color: color-mix(in oklab, var(--a63-
|
|
59
|
+
background-color: color-mix(in oklab, var(--a63-status-danger) 70%, transparent);
|
|
60
60
|
}
|
|
61
61
|
|
|
62
62
|
.mdx-frame-item-positive .mdx-frame-item-marker {
|
|
@@ -138,7 +138,7 @@
|
|
|
138
138
|
}
|
|
139
139
|
|
|
140
140
|
.mdx-insight-eyebrow {
|
|
141
|
-
color: var(--a63-
|
|
141
|
+
color: var(--a63-text-accent);
|
|
142
142
|
}
|
|
143
143
|
|
|
144
144
|
.mdx-insight-title {
|