{
  "antiPatterns": [
    "Passing HTML output from a separate parser into the DOM."
  ],
  "api": {
    "importPath": "@ancrel/workspace/markdown",
    "props": [
      {
        "name": "className",
        "required": false,
        "type": "string"
      },
      {
        "name": "frontmatter",
        "required": false,
        "type": "'strip' | 'ignore'"
      },
      {
        "name": "key",
        "required": false,
        "type": "React.Key | null | undefined"
      },
      {
        "name": "ref",
        "required": false,
        "type": "React.Ref<HTMLDivElement> | undefined"
      },
      {
        "name": "source",
        "required": true,
        "type": "string"
      },
      {
        "name": "streaming",
        "required": false,
        "type": "boolean"
      }
    ],
    "symbol": "SimpleMarkdown",
    "typeRef": "api/workspace/markdown/index.d.ts"
  },
  "constraints": [
    "Pass the entire accumulated source on each streaming update."
  ],
  "docs": "raw/frontend/simple-markdown.md",
  "examples": [
    {
      "code": "'use client'\n\nimport { useState } from 'react'\nimport { SimpleMarkdown } from '@ancrel/workspace/markdown'\n\nconst source = [\n  '## Reading list', '', '- [x] Read the [overview](#overview)', '',\n  '| Chapter | Note |', '| --- | --- |', '| One | Read pages 1 \\\\| 2 |',\n].join('\\n')\n\nexport default function App() {\n  const [streaming, setStreaming] = useState(true)\n  return <>\n    <button type=\"button\" onClick={() => setStreaming(!streaming)}>\n      {streaming ? 'Finish stream' : 'Replay stream'}\n    </button>\n    <SimpleMarkdown source={source} streaming={streaming} className=\"ac-Markdown-sm\" />\n  </>\n}\n",
      "command": "pnpm test",
      "entry": "examples/fe.simple-markdown/App.tsx",
      "fixture": "examples/fe.simple-markdown/",
      "id": "minimal"
    }
  ],
  "id": "fe.simple-markdown",
  "kind": "react-component",
  "language": "typescript",
  "layer": "frontend",
  "owner": "frontend-infra",
  "package": {
    "ecosystem": "npm",
    "name": "@ancrel/workspace",
    "version": "0.2.0"
  },
  "provenance": {
    "changes": "Generalized frontmatter stripping, validated absolute and relative links, and replaced utility classes with tokenized text scales. Rendered semantic headings, tables, nested lists, task labels, quotes and streaming code directly as React nodes.",
    "commit": "4cc384c3bdbd09a3a50268adf81ba23f53aac93e",
    "mode": "extracted",
    "origin": "rule-studio",
    "path": "frontend/src/components/common/SimpleMarkdown.tsx",
    "rights": "org-internal; approved-by=owner; ref=item-19"
  },
  "schemaVersion": 1,
  "stability": "experimental",
  "summary": "Render Markdown as React nodes while text arrives, with safe link destinations and stable table previews.",
  "tokenDependencies": [
    "ref.color.x0a0a0d",
    "ref.color.x202025",
    "ref.color.x373740",
    "ref.color.x393941",
    "ref.color.x684a84",
    "ref.color.x737380",
    "ref.color.x858591",
    "ref.color.xb9a3d2",
    "ref.color.xc0c0c9",
    "ref.color.xd2d2da",
    "ref.color.xededef",
    "ref.color.xf2f2f5",
    "ref.family.mono",
    "ref.family.sans",
    "ref.leading.x1p3",
    "ref.leading.x1p35",
    "ref.leading.x1p5",
    "ref.leading.x1p6",
    "ref.space.px11",
    "ref.space.px12",
    "ref.space.px13",
    "ref.space.px16",
    "ref.space.px2",
    "ref.space.px20",
    "ref.space.px24",
    "ref.space.px28",
    "ref.space.px32",
    "ref.space.px36",
    "ref.space.px4",
    "ref.space.px6",
    "ref.space.px8",
    "ref.weight.w600",
    "sys.action.accent",
    "sys.border.control",
    "sys.border.default",
    "sys.ink.primary",
    "sys.ink.secondary",
    "sys.radius.sm",
    "sys.space.gap",
    "sys.space.hair",
    "sys.space.inset",
    "sys.space.section",
    "sys.space.snug",
    "sys.space.tight",
    "sys.surface.sunken",
    "sys.type.body.lineHeight",
    "sys.type.body.size",
    "sys.type.code.lineHeight",
    "sys.type.code.size",
    "sys.type.family.mono",
    "sys.type.family.sans",
    "sys.type.heading.1.size",
    "sys.type.heading.2.size",
    "sys.type.heading.3.lineHeight",
    "sys.type.heading.3.size",
    "sys.type.heading.3.weight",
    "sys.type.meta.lineHeight",
    "sys.type.meta.size",
    "sys.type.ui.lineHeight",
    "sys.type.ui.size"
  ]
}
