{"version":3,"sources":["../../src/utils/slugify.ts","../../src/overrides/heading.tsx","../../src/core/HeadingIdContext.tsx","../../src/overrides/heading-with-id.tsx","../../src/core/OptixFlowContext.tsx","../../src/utils/width-guard.ts","../../src/overrides/image.tsx","../../src/utils/sanitize.ts","../../src/overrides/link.tsx","../../src/overrides/iframe.tsx","../../src/overrides/code-block.tsx","../../src/overrides/table.tsx","../../src/overrides/defaults.ts"],"names":["React","jsx"],"mappings":";;;;;;;;;;;;;;;;;AAGO,SAAS,QAAQ,IAAA,EAAsB;AAC5C,EAAA,OAAO,IAAA,CACJ,QAAA,EAAS,CACT,WAAA,EAAY,CACZ,MAAK,CACL,OAAA,CAAQ,MAAA,EAAQ,GAAG,CAAA,CACnB,OAAA,CAAQ,aAAa,EAAE,CAAA,CACvB,OAAA,CAAQ,QAAA,EAAU,GAAG,CAAA,CACrB,OAAA,CAAQ,KAAA,EAAO,EAAE,CAAA,CACjB,OAAA,CAAQ,KAAA,EAAO,EAAE,CAAA;AACtB;AAKA,IAAM,OAAA,uBAAc,GAAA,EAAY;AAEzB,SAAS,iBAAA,CAAkB,IAAA,EAAc,aAAA,GAAgB,KAAA,EAAe;AAC7E,EAAA,IAAI,aAAA,EAAe;AACjB,IAAA,OAAA,CAAQ,KAAA,EAAM;AAAA,EAChB;AAEA,EAAA,MAAM,QAAA,GAAW,QAAQ,IAAI,CAAA;AAC7B,EAAA,IAAI,IAAA,GAAO,QAAA;AACX,EAAA,IAAI,OAAA,GAAU,CAAA;AAEd,EAAA,OAAO,OAAA,CAAQ,GAAA,CAAI,IAAI,CAAA,EAAG;AACxB,IAAA,IAAA,GAAO,CAAA,EAAG,QAAQ,CAAA,CAAA,EAAI,OAAO,CAAA,CAAA;AAC7B,IAAA,OAAA,EAAA;AAAA,EACF;AAEA,EAAA,OAAA,CAAQ,IAAI,IAAI,CAAA;AAChB,EAAA,OAAO,IAAA;AACT;ACxBO,SAAS,QAAQ,EAAE,KAAA,EAAO,UAAU,EAAA,EAAI,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AAiD;AAC/C,EAAA,uBAAOA,cAAAA,CAAC,IAAA,EAAA,EAAI,GAAG,OAAQ,QAAA,EAAS,CAAA;AAClC;AAKO,SAAS,aAAA,CAAc;AAAA,EAC5B,QAAA;AAAA,EACA,GAAG;AACL,CAAA,EAAiD;AAC/C,EAAA,uBAAOA,cAAAA,CAAC,IAAA,EAAA,EAAI,GAAG,OAAQ,QAAA,EAAS,CAAA;AAClC;;;ACvFO,SAAS,mBAAA,GAAmC;AACjD,EAAA,OAAO;AAAA;AAAA,IAEL,EAAA,EAAI,QAAA;AAAA,IACJ,EAAA,EAAI,QAAA;AAAA,IACJ,EAAA,EAAI,QAAA;AAAA,IACJ,EAAA,EAAI,QAAA;AAAA,IACJ,EAAA,EAAI,QAAA;AAAA,IACJ,EAAA,EAAI,QAAA;AAAA;AAAA,IAGJ,GAAA,EAAK,KAAA;AAAA;AAAA,IAGL,CAAA,EAAG,IAAA;AAAA;AAAA,IAGH,MAAA,EAAQ,MAAA;AAAA;AAAA,IAGR,GAAA,EAAK,SAAA;AAAA,IACL,IAAA,EAAM,UAAA;AAAA;AAAA,IAGN,KAAA,EAAO,KAAA;AAAA,IACP,KAAA,EAAO,SAAA;AAAA,IACP,KAAA,EAAO,SAAA;AAAA,IACP,EAAA,EAAI,QAAA;AAAA,IACJ,EAAA,EAAI,eAAA;AAAA,IACJ,EAAA,EAAI;AAAA,GACN;AACF","file":"index.cjs","sourcesContent":["/**\n * Convert a string to a URL-safe slug for heading IDs\n */\nexport function slugify(text: string): string {\n  return text\n    .toString()\n    .toLowerCase()\n    .trim()\n    .replace(/\\s+/g, \"-\") // Replace spaces with -\n    .replace(/[^\\w\\-]+/g, \"\") // Remove all non-word chars\n    .replace(/\\-\\-+/g, \"-\") // Replace multiple - with single -\n    .replace(/^-+/, \"\") // Trim - from start of text\n    .replace(/-+$/, \"\"); // Trim - from end of text\n}\n\n/**\n * Generate a unique ID for a heading, with collision tracking\n */\nconst usedIds = new Set<string>();\n\nexport function generateHeadingId(text: string, resetTracking = false): string {\n  if (resetTracking) {\n    usedIds.clear();\n  }\n\n  const baseSlug = slugify(text);\n  let slug = baseSlug;\n  let counter = 1;\n\n  while (usedIds.has(slug)) {\n    slug = `${baseSlug}-${counter}`;\n    counter++;\n  }\n\n  usedIds.add(slug);\n  return slug;\n}\n\n/**\n * Reset heading ID tracking (useful for testing or new renders)\n */\nexport function resetHeadingIds(): void {\n  usedIds.clear();\n}\n","import React from \"react\";\nimport { generateHeadingId } from \"../utils/slugify\";\n\nexport interface HeadingProps\n  extends React.HTMLAttributes<HTMLHeadingElement> {\n  level: 1 | 2 | 3 | 4 | 5 | 6;\n  children?: React.ReactNode;\n}\n\n/**\n * Heading component with automatic ID generation for anchor links\n */\nexport function Heading({ level, children, id, ...props }: HeadingProps) {\n  const Tag = `h${level}` as \"h1\" | \"h2\" | \"h3\" | \"h4\" | \"h5\" | \"h6\";\n\n  // Generate ID from text content if not provided\n  const generatedId = React.useMemo(() => {\n    if (id) return id;\n\n    // Extract text content from children\n    const textContent =\n      typeof children === \"string\"\n        ? children\n        : React.Children.toArray(children)\n            .filter((child) => typeof child === \"string\")\n            .join(\"\");\n\n    return textContent ? generateHeadingId(textContent) : undefined;\n  }, [children, id]);\n\n  return (\n    <Tag id={generatedId} {...props}>\n      {children}\n    </Tag>\n  );\n}\n\n// Create individual heading components\nexport const H1 = (props: React.HTMLAttributes<HTMLHeadingElement>) => (\n  <Heading level={1} {...props} />\n);\n\nexport const H2 = (props: React.HTMLAttributes<HTMLHeadingElement>) => (\n  <Heading level={2} {...props} />\n);\n\nexport const H3 = (props: React.HTMLAttributes<HTMLHeadingElement>) => (\n  <Heading level={3} {...props} />\n);\n\nexport const H4 = (props: React.HTMLAttributes<HTMLHeadingElement>) => (\n  <Heading level={4} {...props} />\n);\n\nexport const H5 = (props: React.HTMLAttributes<HTMLHeadingElement>) => (\n  <Heading level={5} {...props} />\n);\n\nexport const H6 = (props: React.HTMLAttributes<HTMLHeadingElement>) => (\n  <Heading level={6} {...props} />\n);\n","import React from \"react\";\n\n/**\n * Context for sharing custom heading ID mappings\n * Maps heading text to custom IDs extracted from {#id} syntax\n */\nexport const HeadingIdContext = React.createContext<Map<string, string>>(new Map());\n\n/**\n * Provider component for heading ID mappings\n */\nexport function HeadingIdProvider({\n  children,\n  headingIds,\n}: {\n  children: React.ReactNode;\n  headingIds: Map<string, string>;\n}) {\n  return (\n    <HeadingIdContext.Provider value={headingIds}>\n      {children}\n    </HeadingIdContext.Provider>\n  );\n}\n\n/**\n * Hook to access custom heading ID for a given text\n */\nexport function useHeadingId(text: string): string | null {\n  const headingIds = React.useContext(HeadingIdContext);\n  return headingIds.get(text) || null;\n}\n","import React from \"react\";\nimport { generateHeadingId } from \"../utils/slugify\";\nimport { useHeadingId } from \"../core/HeadingIdContext\";\n\nexport interface HeadingProps extends React.HTMLAttributes<HTMLHeadingElement> {\n  children?: React.ReactNode;\n  className?: string;\n  level: 1 | 2 | 3 | 4 | 5 | 6;\n}\n\n/**\n * Custom heading component that supports:\n * - Automatic ID generation from heading text\n * - Custom ID syntax: {#custom-id} (preprocessed by compiler)\n * - Custom className support\n */\nexport function HeadingWithId({ children, className, level, ...props }: HeadingProps) {\n  // Extract text content from children\n  const textContent = React.useMemo(() => {\n    if (typeof children === \"string\") {\n      return children;\n    }\n    if (React.isValidElement(children)) {\n      const childProps = children.props as any;\n      return String(childProps?.children || \"\");\n    }\n    if (Array.isArray(children)) {\n      return children\n        .map((child) => {\n          if (typeof child === \"string\") return child;\n          if (React.isValidElement(child)) {\n            const childProps = child.props as any;\n            return String(childProps?.children || \"\");\n          }\n          return \"\";\n        })\n        .join(\"\");\n    }\n    return String(children || \"\");\n  }, [children]);\n\n  // Check if there's a custom ID mapping from preprocessing\n  const customId = useHeadingId(textContent);\n\n  // Use custom ID if available, otherwise auto-generate from text\n  const headingId = customId || generateHeadingId(textContent);\n\n  // Create props with proper typing\n  const headingProps = {\n    id: headingId,\n    className,\n    ...props,\n  };\n\n  return React.createElement(`h${level}`, headingProps, children);\n}\n\n// Individual heading components\nexport function H1WithId(props: Omit<HeadingProps, \"level\">) {\n  return <HeadingWithId level={1} {...props} />;\n}\n\nexport function H2WithId(props: Omit<HeadingProps, \"level\">) {\n  return <HeadingWithId level={2} {...props} />;\n}\n\nexport function H3WithId(props: Omit<HeadingProps, \"level\">) {\n  return <HeadingWithId level={3} {...props} />;\n}\n\nexport function H4WithId(props: Omit<HeadingProps, \"level\">) {\n  return <HeadingWithId level={4} {...props} />;\n}\n\nexport function H5WithId(props: Omit<HeadingProps, \"level\">) {\n  return <HeadingWithId level={5} {...props} />;\n}\n\nexport function H6WithId(props: Omit<HeadingProps, \"level\">) {\n  return <HeadingWithId level={6} {...props} />;\n}\n","import React from \"react\";\nimport type { OptixFlowConfig } from \"../types\";\n\n/**\n * Context for sharing OptixFlow configuration with image components\n */\nexport const OptixFlowContext = React.createContext<OptixFlowConfig | undefined>(\n  undefined\n);\n\n/**\n * Provider component for OptixFlow configuration\n */\nexport function OptixFlowProvider({\n  children,\n  config,\n}: {\n  children: React.ReactNode;\n  config?: OptixFlowConfig;\n}) {\n  return (\n    <OptixFlowContext.Provider value={config}>\n      {children}\n    </OptixFlowContext.Provider>\n  );\n}\n\n/**\n * Hook to access OptixFlow configuration\n */\nexport function useOptixFlowConfig(): OptixFlowConfig | undefined {\n  return React.useContext(OptixFlowContext);\n}\n","import type { CSSProperties } from \"react\";\n\n/**\n * Width-containment styles for markdown-rendered content.\n *\n * ## Why these are inline styles and not classes\n *\n * Production customer sites are served a **safelist-compiled** Tailwind\n * stylesheet: a utility class that was not present in the extraction snapshot\n * ships with no rule at all. Inline styles are immune to that failure mode, so\n * every guard in this module is expressed as a plain style object.\n *\n * ## The failure this prevents\n *\n * A single wide descendant (a GFM table, a `<pre>` with a long line, a raw\n * `<iframe width=\"1200\">`, an unbroken URL) has a min-content width larger than\n * a phone viewport. When the markdown output is nested inside a CSS grid or flex\n * item whose `min-width` resolves to `auto`, that min-content width becomes the\n * track's base size, the *whole column* grows past the viewport, and every\n * sibling in the layout (headline, byline, floating navbar) is dragged wide with\n * it. The page then scrolls horizontally and looks broken - not just the table.\n *\n * The guards below are layered so no single element can do that:\n *\n * 1. `MARKDOWN_CONTENT_GUARD_STYLE` on the markdown wrapper - caps the content\n *    box at its parent's width, allows long tokens to break, and clips (never\n *    scrolls) anything that still escapes.\n * 2. `SCROLL_CONTAINER_GUARD_STYLE` on tables and code blocks - the wide child\n *    scrolls *inside* the article column instead of widening the page.\n * 3. `MEDIA_GUARD_STYLE` on images and iframes - intrinsic/attribute widths can\n *    never exceed the column.\n *\n * @packageDocumentation\n */\n\n/**\n * Applied to the markdown wrapper element (the `wrapper` option of\n * {@link Markdown}, a `<div>` by default).\n *\n * - `minWidth: 0` - lets the wrapper shrink when it is itself a flex/grid item.\n * - `maxWidth: \"100%\"` - never wider than the column it was given.\n * - `overflowWrap: \"break-word\"` - long URLs and unbroken words wrap instead of\n *   spilling out of the column.\n * - `overflowX: \"clip\"` - last-resort containment. `clip` is used rather than\n *   `hidden`/`auto` because it does **not** create a scroll container, so it\n *   cannot introduce a second horizontal scrollbar, cannot trap the page's\n *   scroll position, and leaves the vertical axis `visible` (so `position:\n *   sticky` and overflowing decorations elsewhere keep working). Browsers that\n *   do not support `clip` simply drop the declaration and fall back to the\n *   other guards.\n */\nexport const MARKDOWN_CONTENT_GUARD_STYLE: CSSProperties = {\n  minWidth: 0,\n  maxWidth: \"100%\",\n  overflowWrap: \"break-word\",\n  overflowX: \"clip\",\n};\n\n/**\n * Applied to the scroll wrapper around a table, and to `<pre>` blocks.\n *\n * The wide child is allowed to keep its natural width but scrolls *inside* this\n * box. `overscrollBehaviorX: \"contain\"` stops a horizontal swipe inside a table\n * from chaining out to the page/back-navigation gesture on touch devices.\n */\nexport const SCROLL_CONTAINER_GUARD_STYLE: CSSProperties = {\n  maxWidth: \"100%\",\n  minWidth: 0,\n  overflowX: \"auto\",\n  overflowY: \"hidden\",\n  overscrollBehaviorX: \"contain\",\n};\n\n/**\n * Applied to replaced elements rendered from markdown whose height must be left\n * alone - currently `<iframe>`, where the embed's declared height is meaningful.\n *\n * Markdown routinely carries raw embed HTML with a hard-coded `width=\"1200\"`,\n * which on a phone would widen the article column and the whole page.\n */\nexport const MEDIA_GUARD_STYLE: CSSProperties = {\n  maxWidth: \"100%\",\n};\n\n/**\n * Applied to `<img>`.\n *\n * An image's intrinsic width is unbounded, so it is capped to the column. `height:\n * auto` is required alongside the cap: without it, a `height` attribute (or a\n * `height` from raw HTML) is honoured literally while the width is clamped, and\n * the image renders distorted.\n *\n * Consumer sites that ship Tailwind Preflight already get `img { max-width: 100%;\n * height: auto }`. This guard makes the behaviour independent of the host\n * stylesheet.\n */\nexport const IMAGE_GUARD_STYLE: CSSProperties = {\n  maxWidth: \"100%\",\n  height: \"auto\",\n};\n\n/**\n * Applied to inline `<code>`.\n *\n * `anywhere` (rather than `break-word`) is deliberate: it also reduces the\n * element's min-content contribution, so a long inline token cannot inflate an\n * ancestor grid/flex track even before the overflow guards engage.\n */\nexport const INLINE_CODE_GUARD_STYLE: CSSProperties = {\n  overflowWrap: \"anywhere\",\n};\n\n/**\n * Merge a guard style with a caller-supplied `style` prop.\n *\n * Caller values win, so a consumer can always opt out of an individual\n * declaration (for example `style={{ overflowX: \"visible\" }}`) without having to\n * fork the component.\n */\nexport function mergeGuardStyle(\n  guard: CSSProperties,\n  style?: CSSProperties,\n): CSSProperties {\n  return style ? { ...guard, ...style } : guard;\n}\n","import React from \"react\";\nimport { useOptixFlowConfig } from \"../core/OptixFlowContext\";\nimport { IMAGE_GUARD_STYLE, mergeGuardStyle } from \"../utils/width-guard\";\n\nexport interface ImageProps extends React.ImgHTMLAttributes<HTMLImageElement> {\n  src: string;\n  alt?: string;\n  optixFlowConfig?: any; // Accept optixFlowConfig as direct prop (overrides context)\n}\n\n/**\n * Image component that optionally delegates to @page-speed/img if available\n * Falls back to standard img tag if @page-speed/img is not installed\n *\n * Supports OptixFlow configuration via:\n * 1. Direct prop: <Image optixFlowConfig={{...}} />\n * 2. Context: <Markdown optixFlowConfig={{...}}><img /></Markdown>\n */\nexport function Image({\n  src,\n  alt = \"\",\n  optixFlowConfig: propConfig,\n  style,\n  ...props\n}: ImageProps) {\n  // Get optixFlowConfig from context (can be overridden by prop)\n  const contextConfig = useOptixFlowConfig();\n  const optixFlowConfig = propConfig || contextConfig;\n\n  /**\n   * An image's intrinsic width is unbounded and raw HTML in markdown can carry a\n   * hard-coded `width` attribute; either can widen the article column on a phone\n   * and drag the whole layout past the viewport. Capped inline so the guard\n   * survives a safelist-compiled Tailwind build.\n   */\n  const guardedStyle = mergeGuardStyle(IMAGE_GUARD_STYLE, style);\n\n  // Try to import @page-speed/img dynamically\n  // If not available, fall back to standard img\n  const [PageSpeedImg, setPageSpeedImg] = React.useState<React.ComponentType<any> | null>(null);\n  const [useFallback, setUseFallback] = React.useState(false);\n\n  React.useEffect(() => {\n    // Only try to load once\n    if (PageSpeedImg || useFallback) return;\n\n    // The dynamic import can settle after this component unmounts (a short-lived\n    // markdown render, or a test tearing down its environment). Setting state\n    // then is a no-op at best and throws inside React's scheduler at worst, so\n    // the resolution is dropped once unmounted.\n    let active = true;\n\n    import(\"@page-speed/img\")\n      .then((mod) => {\n        if (active) setPageSpeedImg(() => mod.Img);\n      })\n      .catch(() => {\n        // @page-speed/img not available, use fallback\n        if (active) setUseFallback(true);\n      });\n\n    return () => {\n      active = false;\n    };\n  }, [PageSpeedImg, useFallback]);\n\n  // Use @page-speed/img if available\n  if (PageSpeedImg) {\n    return (\n      <PageSpeedImg\n        src={src}\n        alt={alt}\n        optixFlowConfig={optixFlowConfig}\n        style={guardedStyle}\n        {...props}\n      />\n    );\n  }\n\n  // Fallback to standard img with loading=\"lazy\"\n  return (\n    <img src={src} alt={alt} loading=\"lazy\" style={guardedStyle} {...props} />\n  );\n}\n","/**\n * Basic HTML sanitization for markdown content\n * Removes potentially dangerous attributes and protocols\n */\n\nconst DANGEROUS_PROTOCOLS = [\"javascript:\", \"data:\", \"vbscript:\"];\nconst DANGEROUS_ATTRIBUTES = [\n  \"onerror\",\n  \"onload\",\n  \"onclick\",\n  \"onmouseover\",\n  \"onfocus\",\n  \"onblur\",\n];\n\n/**\n * Check if a URL uses a dangerous protocol\n */\nexport function isDangerousUrl(url: string): boolean {\n  const lowercaseUrl = url.toLowerCase().trim();\n  return DANGEROUS_PROTOCOLS.some((protocol) =>\n    lowercaseUrl.startsWith(protocol)\n  );\n}\n\n/**\n * Sanitize a URL by removing dangerous protocols\n */\nexport function sanitizeUrl(url: string): string {\n  if (isDangerousUrl(url)) {\n    return \"#\";\n  }\n  return url;\n}\n\n/**\n * Check if an attribute name is dangerous\n */\nexport function isDangerousAttribute(attr: string): boolean {\n  return DANGEROUS_ATTRIBUTES.some((dangerous) =>\n    attr.toLowerCase().startsWith(dangerous)\n  );\n}\n\n/**\n * Sanitize HTML attributes by removing dangerous ones\n * This is a basic implementation - for production use, consider DOMPurify\n */\nexport function sanitizeAttributes(\n  attributes: Record<string, any>\n): Record<string, any> {\n  const sanitized: Record<string, any> = {};\n\n  for (const [key, value] of Object.entries(attributes)) {\n    // Skip dangerous attributes\n    if (isDangerousAttribute(key)) {\n      continue;\n    }\n\n    // Sanitize URL attributes\n    if (\n      (key === \"href\" || key === \"src\") &&\n      typeof value === \"string\" &&\n      isDangerousUrl(value)\n    ) {\n      sanitized[key] = \"#\";\n    } else {\n      sanitized[key] = value;\n    }\n  }\n\n  return sanitized;\n}\n\n/**\n * Get default sanitization configuration\n */\nexport function getDefaultSanitizationConfig() {\n  return {\n    disableParsingRawHTML: false,\n    forceBlock: false,\n    forceInline: false,\n  };\n}\n","import React from \"react\";\nimport { sanitizeUrl, isDangerousUrl } from \"../utils/sanitize\";\n\nexport interface LinkProps\n  extends React.AnchorHTMLAttributes<HTMLAnchorElement> {\n  href?: string;\n  children?: React.ReactNode;\n}\n\n// Try to load Pressable at module level (optional peer dependency)\nlet Pressable: any = null;\ntry {\n  const pressableModule = require(\"@page-speed/pressable\");\n  Pressable = pressableModule.Pressable;\n} catch {\n  // Pressable not available - will use fallback\n}\n\n/**\n * Safe link component with automatic external link handling and URL normalization.\n * Uses @page-speed/pressable when available for enhanced link functionality including:\n * - Phone number normalization (tel: links)\n * - Email normalization (mailto: links)\n * - Internal/external link detection\n * - Automatic target and rel attributes\n */\nexport function Link({ href, children, ...props }: LinkProps) {\n  // Sanitize the URL\n  const safeHref = href ? sanitizeUrl(href) : \"#\";\n\n  // Check if href is dangerous\n  if (isDangerousUrl(safeHref)) {\n    return <span {...props}>{children}</span>;\n  }\n\n  // Don't use Pressable for placeholder links (\"#\") - render basic link\n  const isPlaceholder = safeHref === \"#\";\n\n  // Use Pressable if available (provides phone/email normalization and enhanced navigation)\n  // but not for placeholder links which should remain as-is\n  if (Pressable && !isPlaceholder) {\n    return (\n      <Pressable href={safeHref} {...props}>\n        {children}\n      </Pressable>\n    );\n  }\n\n  // Fallback to basic link logic if Pressable not available\n  const isExternal = React.useMemo(() => {\n    if (!href) return false;\n\n    try {\n      // Check if it's an absolute URL\n      const url = new URL(href, window.location.href);\n      return url.origin !== window.location.origin;\n    } catch {\n      // Relative URLs are internal\n      return false;\n    }\n  }, [href]);\n\n  // Add security attributes for external links\n  const externalProps = isExternal\n    ? {\n        target: \"_blank\",\n        rel: \"noopener noreferrer\",\n      }\n    : {};\n\n  return (\n    <a href={safeHref} {...externalProps} {...props}>\n      {children}\n    </a>\n  );\n}\n","import React from \"react\";\nimport { MEDIA_GUARD_STYLE, mergeGuardStyle } from \"../utils/width-guard\";\n\nexport interface IframeProps extends React.IframeHTMLAttributes<HTMLIFrameElement> {\n  src: string;\n  title?: string;\n  className?: string;\n}\n\n/**\n * Iframe component with security attributes and responsive defaults\n * Commonly used for embeds (YouTube, Twitter, Spotify, etc.)\n *\n * Embed markup pasted into an article routinely carries a hard-coded\n * `width=\"1200\"`, which on a phone would widen the article column and the whole\n * page. The inline `max-width: 100%` guard caps it at the column width; authors\n * can still override it via `style`.\n */\nexport function Iframe({\n  src,\n  title = \"Embedded content\",\n  className,\n  style,\n  ...props\n}: IframeProps) {\n  return (\n    <iframe\n      src={src}\n      title={title}\n      className={className}\n      style={mergeGuardStyle(MEDIA_GUARD_STYLE, style)}\n      loading=\"lazy\"\n      allowFullScreen\n      {...props}\n    />\n  );\n}\n","import React from \"react\";\nimport {\n  INLINE_CODE_GUARD_STYLE,\n  SCROLL_CONTAINER_GUARD_STYLE,\n  mergeGuardStyle,\n} from \"../utils/width-guard\";\n\nexport interface CodeBlockProps extends React.HTMLAttributes<HTMLElement> {\n  children?: React.ReactNode;\n  className?: string;\n}\n\n/**\n * Code block component with language detection.\n *\n * `<pre>` defaults to `white-space: pre`, so a single long line has an unbounded\n * min-content width and would otherwise stretch the article column past the\n * viewport on a phone. The block scrolls horizontally inside its own box instead.\n */\nexport function CodeBlock({\n  children,\n  className,\n  style,\n  ...props\n}: CodeBlockProps) {\n  // Extract language from className (e.g., \"language-javascript\")\n  const language = React.useMemo(() => {\n    if (!className) return null;\n    const match = className.match(/language-(\\w+)/);\n    return match ? match[1] : null;\n  }, [className]);\n\n  return (\n    <pre\n      className={className}\n      data-language={language}\n      style={mergeGuardStyle(SCROLL_CONTAINER_GUARD_STYLE, style)}\n      {...props}\n    >\n      <code>{children}</code>\n    </pre>\n  );\n}\n\n/**\n * Inline code component.\n *\n * Long inline tokens (CLI invocations, identifiers, URLs) are allowed to break\n * anywhere so they cannot push the surrounding text block wider than its column.\n */\nexport function InlineCode({ children, style, ...props }: CodeBlockProps) {\n  return (\n    <code style={mergeGuardStyle(INLINE_CODE_GUARD_STYLE, style)} {...props}>\n      {children}\n    </code>\n  );\n}\n","import React from \"react\";\nimport {\n  SCROLL_CONTAINER_GUARD_STYLE,\n  mergeGuardStyle,\n} from \"../utils/width-guard\";\n\nexport interface TableProps\n  extends React.TableHTMLAttributes<HTMLTableElement> {\n  children?: React.ReactNode;\n  /**\n   * Styles for the horizontal scroll wrapper that surrounds the table.\n   * Merged over {@link SCROLL_CONTAINER_GUARD_STYLE}, so passing\n   * `{ overflowX: \"visible\" }` opts a single table out of scrolling.\n   */\n  wrapperStyle?: React.CSSProperties;\n  /**\n   * Additional className for the horizontal scroll wrapper.\n   */\n  wrapperClassName?: string;\n}\n\n/**\n * Responsive table wrapper component.\n *\n * A GFM table's min-content width regularly exceeds a phone viewport. The table\n * keeps its natural width and scrolls horizontally *inside* this wrapper, so it\n * can never widen the article column (and therefore can never widen the page).\n *\n * The wrapper styles are inline on purpose - production sites are served a\n * safelist-compiled Tailwind build where an unextracted utility class has no\n * rule at all.\n */\nexport function Table({\n  children,\n  className,\n  style,\n  wrapperStyle,\n  wrapperClassName,\n  ...props\n}: TableProps) {\n  const tableClassName = className\n    ? `markdown-table ${className}`\n    : \"markdown-table\";\n\n  return (\n    <div\n      className={\n        wrapperClassName ? `table-wrapper ${wrapperClassName}` : \"table-wrapper\"\n      }\n      style={mergeGuardStyle(SCROLL_CONTAINER_GUARD_STYLE, wrapperStyle)}\n    >\n      <table className={tableClassName} style={style} {...props}>\n        {children}\n      </table>\n    </div>\n  );\n}\n\n/**\n * Table head component\n */\nexport function TableHead({\n  children,\n  ...props\n}: React.HTMLAttributes<HTMLTableSectionElement>) {\n  return <thead {...props}>{children}</thead>;\n}\n\n/**\n * Table body component\n */\nexport function TableBody({\n  children,\n  ...props\n}: React.HTMLAttributes<HTMLTableSectionElement>) {\n  return <tbody {...props}>{children}</tbody>;\n}\n\n/**\n * Table row component\n */\nexport function TableRow({\n  children,\n  ...props\n}: React.HTMLAttributes<HTMLTableRowElement>) {\n  return <tr {...props}>{children}</tr>;\n}\n\n/**\n * Table header cell component\n */\nexport function TableHeaderCell({\n  children,\n  ...props\n}: React.ThHTMLAttributes<HTMLTableCellElement>) {\n  return <th {...props}>{children}</th>;\n}\n\n/**\n * Table data cell component\n */\nexport function TableDataCell({\n  children,\n  ...props\n}: React.TdHTMLAttributes<HTMLTableCellElement>) {\n  return <td {...props}>{children}</td>;\n}\n","import type { OverrideMap } from \"../types\";\nimport { H1WithId, H2WithId, H3WithId, H4WithId, H5WithId, H6WithId } from \"./heading-with-id\";\nimport { Image } from \"./image\";\nimport { Link } from \"./link\";\nimport { CodeBlock, InlineCode } from \"./code-block\";\nimport { Iframe } from \"./iframe\";\nimport {\n  Table,\n  TableHead,\n  TableBody,\n  TableRow,\n  TableHeaderCell,\n  TableDataCell,\n} from \"./table\";\n\n/**\n * Default override map for ecosystem-optimized components\n * Uses heading components with custom ID support ({#id} syntax)\n */\nexport function getDefaultOverrides(): OverrideMap {\n  return {\n    // Headings with auto-ID generation and {#id} syntax support\n    h1: H1WithId,\n    h2: H2WithId,\n    h3: H3WithId,\n    h4: H4WithId,\n    h5: H5WithId,\n    h6: H6WithId,\n\n    // Images with @page-speed/img integration\n    img: Image,\n\n    // Safe links with external link handling\n    a: Link,\n\n    // Iframes for embeds (YouTube, Twitter, Spotify, etc.)\n    iframe: Iframe,\n\n    // Code blocks with language detection\n    pre: CodeBlock,\n    code: InlineCode,\n\n    // Responsive tables\n    table: Table,\n    thead: TableHead,\n    tbody: TableBody,\n    tr: TableRow,\n    th: TableHeaderCell,\n    td: TableDataCell,\n  };\n}\n"]}