index.ts 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. /**
  2. * Public API of the markdown rule engine.
  3. *
  4. * Re-exports everything that was previously exported from markdown-rules.ts
  5. * so callers (markdown-parser.ts, tests) need no changes.
  6. */
  7. // Block rule factories
  8. export {
  9. createBlockquoteRule,
  10. createBlockRules,
  11. createHeadingRule,
  12. } from "@/lib/markdown-rules/block-rules"
  13. // Engine
  14. export { MarkdownRuleEngine } from "@/lib/markdown-rules/engine"
  15. // Inline rule factories (consumed by tests and markdown-parser.ts)
  16. export {
  17. createBlockRefRule,
  18. createDelimitedRule,
  19. createHighlightRule,
  20. createInlineMathRule,
  21. createInlineRules,
  22. createLinkRule,
  23. createPageRefRule,
  24. createTagRule,
  25. findChildByTypeName,
  26. findChildrenByTypeName,
  27. } from "@/lib/markdown-rules/inline-rules"
  28. // Types
  29. export type {
  30. BlockDecoration,
  31. BlockRefDecoration,
  32. BlockRule,
  33. CalloutType,
  34. DecorationRange,
  35. HighlightDecoration,
  36. InlineMathDecoration,
  37. MarkdownRule,
  38. PageRefDecoration,
  39. ParseContext,
  40. ParsedDecorations,
  41. ParsedToken,
  42. PropertyInfo,
  43. TagDecoration,
  44. TaskState,
  45. TokenDecoration,
  46. } from "@/lib/markdown-rules/types"