@alloy-js/markdown 0.25.0-dev.1 → 0.26.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (84) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/dist/dev/src/components/Code.js.map +1 -1
  3. package/dist/dev/src/components/Frontmatter.js +2 -2
  4. package/dist/dev/src/components/Frontmatter.js.map +1 -1
  5. package/dist/dev/src/components/Heading.js.map +1 -1
  6. package/dist/dev/src/components/Link.js.map +1 -1
  7. package/dist/dev/src/components/List.js +3 -3
  8. package/dist/dev/src/components/List.js.map +1 -1
  9. package/dist/dev/src/components/Section.js +5 -5
  10. package/dist/dev/src/components/Section.js.map +1 -1
  11. package/dist/dev/src/components/SourceFile.js +2 -2
  12. package/dist/dev/src/components/SourceFile.js.map +1 -1
  13. package/dist/dev/src/components/index.js.map +1 -1
  14. package/dist/dev/src/context/section.js.map +1 -1
  15. package/dist/dev/src/index.js.map +1 -1
  16. package/dist/dev/test/Code.test.js +3 -3
  17. package/dist/dev/test/Code.test.js.map +1 -1
  18. package/dist/dev/test/Frontmatter.test.js +2 -2
  19. package/dist/dev/test/Frontmatter.test.js.map +1 -1
  20. package/dist/dev/test/list.test.js +6 -6
  21. package/dist/dev/test/list.test.js.map +1 -1
  22. package/dist/dev/test/paragraph.test.js +3 -3
  23. package/dist/dev/test/paragraph.test.js.map +1 -1
  24. package/dist/dev/test/section.test.js +6 -6
  25. package/dist/dev/test/section.test.js.map +1 -1
  26. package/dist/dev/test/utils.js +2 -2
  27. package/dist/dev/test/utils.js.map +1 -1
  28. package/dist/dev/test/vitest.d.js.map +1 -1
  29. package/dist/dev/test/vitest.setup.js.map +1 -1
  30. package/dist/src/components/Code.d.ts +1 -1
  31. package/dist/src/components/Code.d.ts.map +1 -1
  32. package/dist/src/components/Code.js.map +1 -1
  33. package/dist/src/components/Frontmatter.d.ts +1 -1
  34. package/dist/src/components/Frontmatter.d.ts.map +1 -1
  35. package/dist/src/components/Frontmatter.js.map +1 -1
  36. package/dist/src/components/Heading.d.ts +2 -2
  37. package/dist/src/components/Heading.d.ts.map +1 -1
  38. package/dist/src/components/Heading.js.map +1 -1
  39. package/dist/src/components/Link.d.ts +1 -1
  40. package/dist/src/components/Link.d.ts.map +1 -1
  41. package/dist/src/components/Link.js.map +1 -1
  42. package/dist/src/components/List.d.ts +1 -1
  43. package/dist/src/components/List.d.ts.map +1 -1
  44. package/dist/src/components/List.js.map +1 -1
  45. package/dist/src/components/Section.d.ts +1 -1
  46. package/dist/src/components/Section.d.ts.map +1 -1
  47. package/dist/src/components/Section.js.map +1 -1
  48. package/dist/src/components/SourceFile.d.ts +1 -1
  49. package/dist/src/components/SourceFile.d.ts.map +1 -1
  50. package/dist/src/components/SourceFile.js.map +1 -1
  51. package/dist/src/components/index.js.map +1 -1
  52. package/dist/src/context/section.d.ts +1 -1
  53. package/dist/src/context/section.d.ts.map +1 -1
  54. package/dist/src/context/section.js.map +1 -1
  55. package/dist/src/index.js.map +1 -1
  56. package/dist/test/Code.test.js.map +1 -1
  57. package/dist/test/Frontmatter.test.js.map +1 -1
  58. package/dist/test/list.test.js.map +1 -1
  59. package/dist/test/paragraph.test.js.map +1 -1
  60. package/dist/test/section.test.js.map +1 -1
  61. package/dist/test/utils.d.ts +1 -1
  62. package/dist/test/utils.d.ts.map +1 -1
  63. package/dist/test/utils.js.map +1 -1
  64. package/dist/test/vitest.d.js.map +1 -1
  65. package/dist/test/vitest.setup.js.map +1 -1
  66. package/dist/tsconfig.tsbuildinfo +1 -1
  67. package/package.json +8 -8
  68. package/src/components/Code.tsx +1 -1
  69. package/src/components/Frontmatter.tsx +5 -3
  70. package/src/components/Heading.tsx +3 -2
  71. package/src/components/Link.tsx +1 -1
  72. package/src/components/List.tsx +3 -4
  73. package/src/components/Section.tsx +2 -1
  74. package/src/components/SourceFile.tsx +3 -1
  75. package/src/context/section.ts +2 -1
  76. package/temp/api.json +1 -1
  77. package/test/Code.test.tsx +1 -0
  78. package/test/Frontmatter.test.tsx +1 -0
  79. package/test/list.test.tsx +1 -0
  80. package/test/paragraph.test.tsx +1 -0
  81. package/test/section.test.tsx +1 -0
  82. package/test/utils.tsx +3 -1
  83. package/tsdoc-metadata.json +1 -1
  84. package/vitest.config.ts +0 -12
package/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # Changelog - @alloy-js/markdown
2
2
 
3
+ ## 0.26.0
4
+
5
+ No changes, version bump only.
6
+
7
+ ## 0.25.0
8
+
9
+ No changes, version bump only.
10
+
3
11
  ## 0.24.0
4
12
 
5
13
  No changes, version bump only.
@@ -1 +1 @@
1
- {"version":3,"names":["List","Code","props","tripleBackticks","_$createComponent","children","_$memo","lang","fileName","import","meta","url","lineNumber","columnNumber"],"sources":["../../../../src/components/Code.tsx"],"sourcesContent":[null],"mappings":";AAAA,SAASA,IAAI,QAAQ,gBAAgB;AAWrC;AACA;AACA;AACA,OAAO,SAASC,IAAIA,CAACC,KAAgB,EAAE;EACrC,MAAMC,eAAe,GAAG,KAAK;EAC7B,OAAAC,iBAAA,CACGJ,IAAI;IAAA,IAAAK,SAAA;MAAA,QAAAC,MAAA,OACFH,eAAe,GAAGD,KAAK,CAACK,IAAI,GAAAD,MAAA,OAC5BJ,KAAK,CAACG,QAAQ,4BACdF,eAAe;IAAA;EAAA;IAAAK,QAAA,EAAAC,MAAA,CAAAC,IAAA,CAAAC,GAAA;IAAAC,UAAA;IAAAC,YAAA;EAAA;AAGtB","ignoreList":[]}
1
+ {"version":3,"names":[],"sources":["../../../../src/components/Code.tsx"],"sourcesContent":["import { List } from \"@alloy-js/core\";\nimport type { Children } from \"@alloy-js/core/jsx-runtime\";\n\nexport interface CodeProps {\n /** Language of the code block */\n lang?: string;\n\n /** Body of the code block */\n children?: Children;\n}\n\n/**\n * Render a Markdown code block\n */\nexport function Code(props: CodeProps) {\n const tripleBackticks = \"```\";\n return (\n <List>\n {tripleBackticks + props.lang}\n {props.children}\n {tripleBackticks}\n </List>\n );\n}\n"],"mappings":";AAAA,SAAS,IAAI,QAAQ,gBAAgB;AAWrC;AACA;AACA;AACA,OAAO,SAAS,IAAI,CAAC,KAAgB,EAAE;EACrC,MAAM,eAAe,GAAG,KAAK;EAC7B,yBACG,IAAI;IAAA;MAAA,qBACF,eAAe,GAAG,KAAK,CAAC,IAAI,gBAC5B,KAAK,CAAC,QAAQ,4BACd,eAAe;IAAA;EAAA;IAAA;IAAA;IAAA;EAAA;AAGtB","ignoreList":[]}
@@ -21,9 +21,9 @@ export function Frontmatter(props) {
21
21
  }
22
22
  }, {
23
23
  fileName: import.meta.url,
24
- lineNumber: 28,
24
+ lineNumber: 29,
25
25
  columnNumber: 9
26
- }), false, "_$memo(\u2026)(\u2026) ? \u2026"), "---"];
26
+ }), false, "_$memo(…)(…) ? …"), "---"];
27
27
  }
28
28
  }, {
29
29
  fileName: import.meta.url,
@@ -1 +1 @@
1
- {"version":3,"names":["List","stringify","Frontmatter","props","_$createComponent","children","_$memo","jsValue","trim","fileName","import","meta","url","lineNumber","columnNumber"],"sources":["../../../../src/components/Frontmatter.tsx"],"sourcesContent":[null],"mappings":";AAAA,SAASA,IAAI,QAAQ,gBAAgB;AAErC,SAASC,SAAS,QAAQ,MAAM;AAQhC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,WAAWA,CAACC,KAAuB,EAAE;EACnD,OAAAC,iBAAA,CACGJ,IAAI;IAAA,IAAAK,SAAA;MAAA,QACF,KAAK,EAAAC,MAAA,OACLA,MAAA,SAAAH,KAAK,CAACI,OAAO,MACZN,SAAS,CAACE,KAAK,CAACI,OAAO,CAAC,CAACC,IAAI,CAAC,CAAC,GAAAJ,iBAAA,CAC9BJ,IAAI;QAAA,IAACK,QAAQA,CAAA;UAAA,OAAEF,KAAK,CAACE,QAAQ;QAAA;MAAA;QAAAI,QAAA,EAAAC,MAAA,CAAAC,IAAA,CAAAC,GAAA;QAAAC,UAAA;QAAAC,YAAA;MAAA,EAAI,6CACnC,KAAK;IAAA;EAAA;IAAAL,QAAA,EAAAC,MAAA,CAAAC,IAAA,CAAAC,GAAA;IAAAC,UAAA;IAAAC,YAAA;EAAA;AAGZ","ignoreList":[]}
1
+ {"version":3,"names":[],"sources":["../../../../src/components/Frontmatter.tsx"],"sourcesContent":["import { List } from \"@alloy-js/core\";\nimport type { Children } from \"@alloy-js/core/jsx-runtime\";\nimport { stringify } from \"yaml\";\n\nexport interface FrontmatterProps {\n /** Js value to automatically serialize as yaml */\n jsValue?: Record<string, unknown>;\n children?: Children;\n}\n\n/**\n * Create a frontmatter block for markdown files.\n *\n * @example\n *\n * ```markdown\n * ---\n * title: \"My Title\"\n * ---\n * ```\n */\nexport function Frontmatter(props: FrontmatterProps) {\n return (\n <List>\n {\"---\"}\n {props.jsValue ? (\n stringify(props.jsValue).trim()\n ) : (\n <List children={props.children} />\n )}\n {\"---\"}\n </List>\n );\n}\n"],"mappings":";AAAA,SAAS,IAAI,QAAQ,gBAAgB;AAErC,SAAS,SAAS,QAAQ,MAAM;AAQhC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAAS,WAAW,CAAC,KAAuB,EAAE;EACnD,yBACG,IAAI;IAAA;MAAA,QACF,KAAK,eACL,oBAAK,CAAC,OAAO,MACZ,SAAS,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,qBAE9B,IAAI;QAAA,IAAC,QAAQ;UAAA,OAAE,KAAK,CAAC,QAAQ;QAAA;MAAA;QAAA;QAAA;QAAA;MAAA,EAC/B,8BACA,KAAK;IAAA;EAAA;IAAA;IAAA;IAAA;EAAA;AAGZ","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["useSectionContext","Heading","props","level","undefined","_$memo","repeat","children"],"sources":["../../../../src/components/Heading.tsx"],"sourcesContent":[null],"mappings":";AAEA,SAASA,iBAAiB,QAAQ,uBAAuB;AAQzD,OAAO,SAASC,OAAOA,CAACC,KAAmB,EAAE;EAC3C,MAAMC,KAAK,GACTD,KAAK,CAACC,KAAK,KAAKC,SAAS,GAAGF,KAAK,CAACC,KAAK,GAAGH,iBAAiB,CAAC,CAAC,CAACG,KAAK;EACrE,QAAAE,MAAA,OAEK,GAAG,CAACC,MAAM,CAACH,KAAK,CAAC,QAAAE,MAAA,OAAGH,KAAK,CAACK,QAAQ;AAGzC","ignoreList":[]}
1
+ {"version":3,"names":[],"sources":["../../../../src/components/Heading.tsx"],"sourcesContent":["import type { Refkey } from \"@alloy-js/core\";\nimport type { Children } from \"@alloy-js/core/jsx-runtime\";\n\nimport { useSectionContext } from \"../context/section.js\";\n\nexport interface HeadingProps {\n level?: number;\n children: Children;\n refkey?: Refkey;\n}\n\nexport function Heading(props: HeadingProps) {\n const level =\n props.level !== undefined ? props.level : useSectionContext().level;\n return (\n <>\n {\"#\".repeat(level)} {props.children}\n </>\n );\n}\n"],"mappings":";AAGA,SAAS,iBAAiB,QAAQ,uBAAuB;AAQzD,OAAO,SAAS,OAAO,CAAC,KAAmB,EAAE;EAC3C,MAAM,KAAK,GACT,KAAK,CAAC,KAAK,KAAK,SAAS,GAAG,KAAK,CAAC,KAAK,GAAG,iBAAiB,CAAC,CAAC,CAAC,KAAK;EACrE,qBAEK,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,qBAAG,KAAK,CAAC,QAAQ;AAGzC","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["Link","props","_$memo","title","href"],"sources":["../../../../src/components/Link.tsx"],"sourcesContent":[null],"mappings":";AAaA,OAAO,SAASA,IAAIA,CAACC,KAAgB,EAAE;EACrC,IAAI,QAAQ,IAAIA,KAAK,EAAE;IACrB,OAAO,QAAQ;EACjB;EAEA,aAAAC,MAAA,OAEMD,KAAK,CAACE,KAAK,+BAAAD,MAAA,OAAID,KAAK,CAACG,IAAI;AAGjC","ignoreList":[]}
1
+ {"version":3,"names":[],"sources":["../../../../src/components/Link.tsx"],"sourcesContent":["import type { Refkey } from \"@alloy-js/core\";\n\nexport interface LinkPropsWithRefkey {\n refkey: Refkey;\n}\n\nexport interface LinkPropsWithHref {\n href: string;\n title: string;\n}\n\nexport type LinkProps = LinkPropsWithRefkey | LinkPropsWithHref;\n\nexport function Link(props: LinkProps) {\n if (\"refkey\" in props) {\n return \"refkey\";\n }\n\n return (\n <>\n [{props.title}]({props.href})\n </>\n );\n}\n"],"mappings":";AAaA,OAAO,SAAS,IAAI,CAAC,KAAgB,EAAE;EACrC,IAAI,QAAQ,IAAI,KAAK,EAAE;IACrB,OAAO,QAAQ;EACjB;EAEA,0BAEM,KAAK,CAAC,KAAK,4CAAI,KAAK,CAAC,IAAI;AAGjC","ignoreList":[]}
@@ -18,17 +18,17 @@ export function List(props) {
18
18
  return _$createIntrinsic("align", {
19
19
  width: alignSize,
20
20
  get children() {
21
- return [_$memo(() => _$memo(() => !!props.ordered)() ? [index + start, "."] : props.bullet, false, "_$memo(\u2026)(\u2026) ? \u2026"), " ", _$memo(() => props.tasks && "[ ] ", false, "props.tasks && \u2026"), child];
21
+ return [_$memo(() => _$memo(() => !!props.ordered)() ? [index + start, "."] : props.bullet, false, "_$memo(…)(…) ? …"), " ", _$memo(() => props.tasks && "[ ] ", false, "props.tasks && …"), child];
22
22
  }
23
23
  }, {
24
24
  fileName: import.meta.url,
25
- lineNumber: 39,
25
+ lineNumber: 40,
26
26
  columnNumber: 11
27
27
  });
28
28
  }
29
29
  }, {
30
30
  fileName: import.meta.url,
31
- lineNumber: 31,
31
+ lineNumber: 32,
32
32
  columnNumber: 5
33
33
  });
34
34
  }
@@ -1 +1 @@
1
- {"version":3,"names":["childrenArray","For","memo","List","props","children","preserveFragments","filter","c","Boolean","start","_$createComponent","each","child","index","alignSize","ordered","_$createIntrinsic","width","_$memo","bullet","tasks","fileName","import","meta","url","lineNumber","columnNumber"],"sources":["../../../../src/components/List.tsx"],"sourcesContent":[null],"mappings":";AAAA,SAASA,aAAa,EAAEC,GAAG,QAAQ,gBAAgB;AACnD,SAAmBC,IAAI,QAAQ,4BAA4B;AAmB3D,OAAO,SAASC,IAAIA,CAACC,KAAgB,EAAE;EACrC,MAAMC,QAAQ,GAAGH,IAAI,CAAC,MAAM;IAC1B,OAAOF,aAAa,CAAC,MAAMI,KAAK,CAACC,QAAQ,EAAE;MACzCC,iBAAiB,EAAE;IACrB,CAAC,CAAC,CAACC,MAAM,CAAEC,CAAC,IAAKC,OAAO,CAACD,CAAC,CAAC,CAAC;EAC9B,CAAC,CAAC;EAEF,MAAME,KAAK,GAAIN,KAAK,CAAsBM,KAAK,IAAI,CAAC;EAEpD,OAAAC,iBAAA,CACGV,GAAG;IAACW,IAAI,EAAEP,QAAQ;IAAAA,QAAA,EAChBA,CAACQ,KAAK,EAAEC,KAAK,KAAK;MACjB;MACA;MACA;MACA,MAAMC,SAAS,GAAGX,KAAK,CAACY,OAAO,GAAG,CAAC,GAAG,CAAC;MAEvC,OAAAC,iBAAA;QACSC,KAAK,EAAEH,SAAS;QAAA,IAAAV,SAAA;UAAA,QAAAc,MAAA,OACpBA,MAAA,SAAAf,KAAK,CAACY,OAAO,OACTF,KAAK,GAAGJ,KAAK,SAChBN,KAAK,CAACgB,MAAM,6CAAE,GAAG,EAAAD,MAAA,OAClBf,KAAK,CAACiB,KAAK,IAAI,MAAM,mCACrBR,KAAK;QAAA;MAAA;QAAAS,QAAA,EAAAC,MAAA,CAAAC,IAAA,CAAAC,GAAA;QAAAC,UAAA;QAAAC,YAAA;MAAA;IAGZ;EAAC;IAAAL,QAAA,EAAAC,MAAA,CAAAC,IAAA,CAAAC,GAAA;IAAAC,UAAA;IAAAC,YAAA;EAAA;AAGP","ignoreList":[]}
1
+ {"version":3,"names":[],"sources":["../../../../src/components/List.tsx"],"sourcesContent":["import { childrenArray, For } from \"@alloy-js/core\";\nimport type { Children } from \"@alloy-js/core/jsx-runtime\";\nimport { memo } from \"@alloy-js/core/jsx-runtime\";\n\nexport interface CommonListProps {\n children: Children;\n tasks?: boolean;\n}\n\nexport interface OrderedListProps extends CommonListProps {\n ordered: true;\n start?: number;\n}\n\nexport interface UnorderedListProps extends CommonListProps {\n ordered?: false | undefined;\n bullet?: \"*\" | \"-\" | \"+\";\n}\n\nexport type ListProps = OrderedListProps | UnorderedListProps;\n\nexport function List(props: ListProps) {\n const children = memo(() => {\n return childrenArray(() => props.children, {\n preserveFragments: true,\n }).filter((c) => Boolean(c));\n });\n\n const start = (props as OrderedListProps).start ?? 1;\n\n return (\n <For each={children}>\n {(child, index) => {\n // sure would be great to align based on the number of digits for\n // ordered lists, but GitHub has issues parsing them sometimes. This is\n // much more reliable.\n const alignSize = props.ordered ? 3 : 2;\n\n return (\n <align width={alignSize}>\n {props.ordered ? <>{index + start}.</> : props.bullet}{\" \"}\n {props.tasks && \"[ ] \"}\n {child}\n </align>\n );\n }}\n </For>\n );\n}\n"],"mappings":";AAAA,SAAS,aAAa,EAAE,GAAG,QAAQ,gBAAgB;AAEnD,SAAS,IAAI,QAAQ,4BAA4B;AAmBjD,OAAO,SAAS,IAAI,CAAC,KAAgB,EAAE;EACrC,MAAM,QAAQ,GAAG,IAAI,CAAC,MAAM;IAC1B,OAAO,aAAa,CAAC,MAAM,KAAK,CAAC,QAAQ,EAAE;MACzC,iBAAiB,EAAE;IACrB,CAAC,CAAC,CAAC,MAAM,CAAE,CAAC,IAAK,OAAO,CAAC,CAAC,CAAC,CAAC;EAC9B,CAAC,CAAC;EAEF,MAAM,KAAK,GAAI,KAAK,CAAsB,KAAK,IAAI,CAAC;EAEpD,yBACG,GAAG;IAAC,IAAI,EAAE,QAAQ;IAAA,UAChB,CAAC,KAAK,EAAE,KAAK,KAAK;MACjB;MACA;MACA;MACA,MAAM,SAAS,GAAG,KAAK,CAAC,OAAO,GAAG,CAAC,GAAG,CAAC;MAEvC;QACS,KAAK,EAAE,SAAS;QAAA;UAAA,qBACpB,oBAAK,CAAC,OAAO,OAAM,KAAK,GAAG,KAAK,SAAQ,KAAK,CAAC,MAAM,8BAAE,GAAG,eACzD,KAAK,CAAC,KAAK,IAAI,MAAM,8BACrB,KAAK;QAAA;MAAA;QAAA;QAAA;QAAA;MAAA;IAGZ;EAAC;IAAA;IAAA;IAAA;EAAA;AAGP","ignoreList":[]}
@@ -13,9 +13,9 @@ export function Section(props) {
13
13
  }
14
14
  }, {
15
15
  fileName: import.meta.url,
16
- lineNumber: 16,
16
+ lineNumber: 17,
17
17
  columnNumber: 25
18
- }), false, "_$memo(\u2026)(\u2026) && \u2026"), _$createComponent(SectionContext.Provider, {
18
+ }), false, "_$memo(…)(…) && …"), _$createComponent(SectionContext.Provider, {
19
19
  get value() {
20
20
  return {
21
21
  ...sectionContext,
@@ -30,19 +30,19 @@ export function Section(props) {
30
30
  }
31
31
  }, {
32
32
  fileName: import.meta.url,
33
- lineNumber: 20,
33
+ lineNumber: 21,
34
34
  columnNumber: 9
35
35
  });
36
36
  }
37
37
  }, {
38
38
  fileName: import.meta.url,
39
- lineNumber: 17,
39
+ lineNumber: 18,
40
40
  columnNumber: 7
41
41
  })];
42
42
  }
43
43
  }, {
44
44
  fileName: import.meta.url,
45
- lineNumber: 15,
45
+ lineNumber: 16,
46
46
  columnNumber: 5
47
47
  });
48
48
  }
@@ -1 +1 @@
1
- {"version":3,"names":["List","SectionContext","useSectionContext","Heading","Section","props","sectionContext","_$createComponent","doubleHardline","children","_$memo","heading","fileName","import","meta","url","lineNumber","columnNumber","Provider","value","level"],"sources":["../../../../src/components/Section.tsx"],"sourcesContent":[null],"mappings":";AAAA,SAASA,IAAI,QAAQ,gBAAgB;AAErC,SAASC,cAAc,EAAEC,iBAAiB,QAAQ,uBAAuB;AACzE,SAASC,OAAO;AAOhB,OAAO,SAASC,OAAOA,CAACC,KAAmB,EAAE;EAC3C,MAAMC,cAAc,GAAGJ,iBAAiB,CAAC,CAAC;EAE1C,OAAAK,iBAAA,CACGP,IAAI;IAACQ,cAAc;IAAA,IAAAC,SAAA;MAAA,QAAAC,MAAA,OACjBA,MAAA,SAAAL,KAAK,CAACM,OAAO,OAAAJ,iBAAA,CAAKJ,OAAO;QAAA,IAAAM,SAAA;UAAA,OAAEJ,KAAK,CAACM,OAAO;QAAA;MAAA;QAAAC,QAAA,EAAAC,MAAA,CAAAC,IAAA,CAAAC,GAAA;QAAAC,UAAA;QAAAC,YAAA;MAAA,EAAW,8CAAAV,iBAAA,CACnDN,cAAc,CAACiB,QAAQ;QAAA,IACtBC,KAAKA,CAAA;UAAA,OAAE;YAAE,GAAGb,cAAc;YAAEc,KAAK,EAAEd,cAAc,CAACc,KAAK,GAAG;UAAE,CAAC;QAAA;QAAA,IAAAX,SAAA;UAAA,OAAAF,iBAAA,CAE5DP,IAAI;YAACQ,cAAc;YAAA,IAAAC,SAAA;cAAA,OAAEJ,KAAK,CAACI,QAAQ;YAAA;UAAA;YAAAG,QAAA,EAAAC,MAAA,CAAAC,IAAA,CAAAC,GAAA;YAAAC,UAAA;YAAAC,YAAA;UAAA;QAAA;MAAA;QAAAL,QAAA,EAAAC,MAAA,CAAAC,IAAA,CAAAC,GAAA;QAAAC,UAAA;QAAAC,YAAA;MAAA;IAAA;EAAA;IAAAL,QAAA,EAAAC,MAAA,CAAAC,IAAA,CAAAC,GAAA;IAAAC,UAAA;IAAAC,YAAA;EAAA;AAI5C","ignoreList":[]}
1
+ {"version":3,"names":[],"sources":["../../../../src/components/Section.tsx"],"sourcesContent":["import { List } from \"@alloy-js/core\";\nimport type { Children } from \"@alloy-js/core/jsx-runtime\";\n\nimport { SectionContext, useSectionContext } from \"../context/section.js\";\nimport { Heading } from \"./Heading.jsx\";\n\nexport interface SectionProps {\n heading?: Children;\n children: Children;\n}\n\nexport function Section(props: SectionProps) {\n const sectionContext = useSectionContext();\n\n return (\n <List doubleHardline>\n {props.heading && <Heading>{props.heading}</Heading>}\n <SectionContext.Provider\n value={{ ...sectionContext, level: sectionContext.level + 1 }}\n >\n <List doubleHardline>{props.children}</List>\n </SectionContext.Provider>\n </List>\n );\n}\n"],"mappings":";AAAA,SAAS,IAAI,QAAQ,gBAAgB;AAGrC,SAAS,cAAc,EAAE,iBAAiB,QAAQ,uBAAuB;AACzE,SAAS,OAAO;AAOhB,OAAO,SAAS,OAAO,CAAC,KAAmB,EAAE;EAC3C,MAAM,cAAc,GAAG,iBAAiB,CAAC,CAAC;EAE1C,yBACG,IAAI;IAAC,cAAc;IAAA;MAAA,qBACjB,oBAAK,CAAC,OAAO,yBAAK,OAAO;QAAA;UAAA,OAAE,KAAK,CAAC,OAAO;QAAA;MAAA;QAAA;QAAA;QAAA;MAAA,EAAW,iDACnD,cAAc,CAAC,QAAQ;QAAA,IACtB,KAAK;UAAA,OAAE;YAAE,GAAG,cAAc;YAAE,KAAK,EAAE,cAAc,CAAC,KAAK,GAAG;UAAE,CAAC;QAAA;QAAA;UAAA,yBAE5D,IAAI;YAAC,cAAc;YAAA;cAAA,OAAE,KAAK,CAAC,QAAQ;YAAA;UAAA;YAAA;YAAA;YAAA;UAAA;QAAA;MAAA;QAAA;QAAA;QAAA;MAAA;IAAA;EAAA;IAAA;IAAA;IAAA;EAAA;AAI5C","ignoreList":[]}
@@ -16,13 +16,13 @@ export function SourceFile(props) {
16
16
  }
17
17
  }, {
18
18
  fileName: import.meta.url,
19
- lineNumber: 11,
19
+ lineNumber: 13,
20
20
  columnNumber: 7
21
21
  });
22
22
  }
23
23
  }, {
24
24
  fileName: import.meta.url,
25
- lineNumber: 10,
25
+ lineNumber: 12,
26
26
  columnNumber: 5
27
27
  });
28
28
  }
@@ -1 +1 @@
1
- {"version":3,"names":["SourceFile","CoreSourceFile","List","Link","props","_$createComponent","path","filetype","reference","children","doubleHardline","fileName","import","meta","url","lineNumber","columnNumber"],"sources":["../../../../src/components/SourceFile.tsx"],"sourcesContent":[null],"mappings":";AAAA,SAAmBA,UAAU,IAAIC,cAAc,EAAEC,IAAI,QAAQ,gBAAgB;AAC7E,SAASC,IAAI;AAMb,OAAO,SAASH,UAAUA,CAACI,KAAsB,EAAE;EACjD,OAAAC,iBAAA,CACGJ,cAAc;IAAA,IAACK,IAAIA,CAAA;MAAA,OAAEF,KAAK,CAACE,IAAI;IAAA;IAAEC,QAAQ;IAAMC,SAAS,EAAEL,IAAI;IAAA,IAAAM,SAAA;MAAA,OAAAJ,iBAAA,CAC5DH,IAAI;QAACQ,cAAc;QAAA,IAAAD,SAAA;UAAA,OAAEL,KAAK,CAACK,QAAQ;QAAA;MAAA;QAAAE,QAAA,EAAAC,MAAA,CAAAC,IAAA,CAAAC,GAAA;QAAAC,UAAA;QAAAC,YAAA;MAAA;IAAA;EAAA;IAAAL,QAAA,EAAAC,MAAA,CAAAC,IAAA,CAAAC,GAAA;IAAAC,UAAA;IAAAC,YAAA;EAAA;AAG1C","ignoreList":[]}
1
+ {"version":3,"names":[],"sources":["../../../../src/components/SourceFile.tsx"],"sourcesContent":["import type { Children } from \"@alloy-js/core\";\nimport { SourceFile as CoreSourceFile, List } from \"@alloy-js/core\";\n\nimport { Link } from \"./Link.jsx\";\n\nexport interface SourceFileProps {\n path: string;\n children: Children;\n}\nexport function SourceFile(props: SourceFileProps) {\n return (\n <CoreSourceFile path={props.path} filetype=\"md\" reference={Link}>\n <List doubleHardline>{props.children}</List>\n </CoreSourceFile>\n );\n}\n"],"mappings":";AACA,SAAS,UAAU,IAAI,cAAc,EAAE,IAAI,QAAQ,gBAAgB;AAEnE,SAAS,IAAI;AAMb,OAAO,SAAS,UAAU,CAAC,KAAsB,EAAE;EACjD,yBACG,cAAc;IAAA,IAAC,IAAI;MAAA,OAAE,KAAK,CAAC,IAAI;IAAA;IAAE,QAAQ;IAAM,SAAS,EAAE,IAAI;IAAA;MAAA,yBAC5D,IAAI;QAAC,cAAc;QAAA;UAAA,OAAE,KAAK,CAAC,QAAQ;QAAA;MAAA;QAAA;QAAA;QAAA;MAAA;IAAA;EAAA;IAAA;IAAA;IAAA;EAAA;AAG1C","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["../../../../src/components/index.ts"],"sourcesContent":[null],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA","ignoreList":[]}
1
+ {"version":3,"names":[],"sources":["../../../../src/components/index.ts"],"sourcesContent":["export * from \"./Code.jsx\";\nexport * from \"./Frontmatter.jsx\";\nexport * from \"./Heading.jsx\";\nexport * from \"./Link.jsx\";\nexport * from \"./List.jsx\";\nexport * from \"./Section.jsx\";\nexport * from \"./SourceFile.jsx\";\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["createContext","useContext","SectionContext","level","useSectionContext","context","undefined","Error"],"sources":["../../../../src/context/section.ts"],"sourcesContent":[null],"mappings":"AAAA,SAA2BA,aAAa,EAAEC,UAAU,QAAQ,gBAAgB;AAM5E,OAAO,MAAMC,cAAgD,GAC3DF,aAAa,CAAiB;EAAEG,KAAK,EAAE;AAAE,CAAC,CAAC;AAE7C,OAAO,SAASC,iBAAiBA,CAAA,EAAmB;EAClD,MAAMC,OAAO,GAAGJ,UAAU,CAACC,cAAc,CAAC;EAE1C,IAAIG,OAAO,KAAKC,SAAS,EAAE;IACzB,MAAM,IAAIC,KAAK,CAAC,iDAAiD,CAAC;EACpE;EACA,OAAOF,OAAO;AAChB","ignoreList":[]}
1
+ {"version":3,"names":[],"sources":["../../../../src/context/section.ts"],"sourcesContent":["import type { ComponentContext } from \"@alloy-js/core\";\nimport { createContext, useContext } from \"@alloy-js/core\";\n\nexport interface SectionContext {\n level: number;\n}\n\nexport const SectionContext: ComponentContext<SectionContext> =\n createContext<SectionContext>({ level: 1 });\n\nexport function useSectionContext(): SectionContext {\n const context = useContext(SectionContext);\n\n if (context === undefined) {\n throw new Error(\"useSectionContext must be used within a Section\");\n }\n return context;\n}\n"],"mappings":"AACA,SAAS,aAAa,EAAE,UAAU,QAAQ,gBAAgB;AAM1D,OAAO,MAAM,cAAgD,GAC3D,aAAa,CAAiB;EAAE,KAAK,EAAE;AAAE,CAAC,CAAC;AAE7C,OAAO,SAAS,iBAAiB,GAAmB;EAClD,MAAM,OAAO,GAAG,UAAU,CAAC,cAAc,CAAC;EAE1C,IAAI,OAAO,KAAK,SAAS,EAAE;IACzB,MAAM,IAAI,KAAK,CAAC,iDAAiD,CAAC;EACpE;EACA,OAAO,OAAO;AAChB","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["../../../src/index.ts"],"sourcesContent":[null],"mappings":"AAAA,cAAc,uBAAuB","ignoreList":[]}
1
+ {"version":3,"names":[],"sources":["../../../src/index.ts"],"sourcesContent":["export * from \"./components/index.js\";\n"],"mappings":"AAAA,cAAc,uBAAuB","ignoreList":[]}
@@ -10,7 +10,7 @@ it("renders with js value", () => {
10
10
  children: "const foo = 123;\nconsole.log(foo);"
11
11
  }, {
12
12
  fileName: import.meta.url,
13
- lineNumber: 9,
13
+ lineNumber: 10,
14
14
  columnNumber: 5
15
15
  }));
16
16
  expect(template).toRenderTo(d`
@@ -30,13 +30,13 @@ it("renders with children", () => {
30
30
  }
31
31
  }, {
32
32
  fileName: import.meta.url,
33
- lineNumber: 23,
33
+ lineNumber: 24,
34
34
  columnNumber: 7
35
35
  });
36
36
  }
37
37
  }, {
38
38
  fileName: import.meta.url,
39
- lineNumber: 22,
39
+ lineNumber: 23,
40
40
  columnNumber: 5
41
41
  }));
42
42
  expect(template).toRenderTo(d`
@@ -1 +1 @@
1
- {"version":3,"names":["List","d","expect","it","Code","mdTest","template","_$createComponent","lang","children","fileName","import","meta","url","lineNumber","columnNumber","toRenderTo"],"sources":["../../../test/Code.test.tsx"],"sourcesContent":[null],"mappings":";AAAA,SAASA,IAAI,QAAQ,gBAAgB;AACrC,SAASC,CAAC,QAAQ,wBAAwB;AAC1C,SAASC,MAAM,EAAEC,EAAE,QAAQ,QAAQ;AACnC,SAASC,IAAI;AACb,SAASC,MAAM;AAEfF,EAAE,CAAC,uBAAuB,EAAE,MAAM;EAChC,MAAMG,QAAQ,GAAGD,MAAM,CAAAE,iBAAA,CACpBH,IAAI;IAACI,IAAI;IAAMC,QAAQ,EAAE;EAAqC;IAAAC,QAAA,EAAAC,MAAA,CAAAC,IAAA,CAAAC,GAAA;IAAAC,UAAA;IAAAC,YAAA;EAAA,EACjE,CAAC;EAEDb,MAAM,CAACI,QAAQ,CAAC,CAACU,UAAU,CAACf,CAAC;AAC/B;AACA;AACA;AACA;AACA,GAAG,CAAC;AACJ,CAAC,CAAC;AAEFE,EAAE,CAAC,uBAAuB,EAAE,MAAM;EAChC,MAAMG,QAAQ,GAAGD,MAAM,CAAAE,iBAAA,CACpBH,IAAI;IAACI,IAAI;IAAA,IAAAC,SAAA;MAAA,OAAAF,iBAAA,CACPP,IAAI;QAAA,IAAAS,SAAA;UAAA;QAAA;MAAA;QAAAC,QAAA,EAAAC,MAAA,CAAAC,IAAA,CAAAC,GAAA;QAAAC,UAAA;QAAAC,YAAA;MAAA;IAAA;EAAA;IAAAL,QAAA,EAAAC,MAAA,CAAAC,IAAA,CAAAC,GAAA;IAAAC,UAAA;IAAAC,YAAA;EAAA,EAKT,CAAC;EAEDb,MAAM,CAACI,QAAQ,CAAC,CAACU,UAAU,CAACf,CAAC;AAC/B;AACA;AACA;AACA;AACA,GAAG,CAAC;AACJ,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"names":[],"sources":["../../../test/Code.test.tsx"],"sourcesContent":["import { List } from \"@alloy-js/core\";\nimport { d } from \"@alloy-js/core/testing\";\nimport { expect, it } from \"vitest\";\n\nimport { Code } from \"../src/components/Code.jsx\";\nimport { mdTest } from \"./utils.jsx\";\n\nit(\"renders with js value\", () => {\n const template = mdTest(\n <Code lang=\"ts\" children={\"const foo = 123;\\nconsole.log(foo);\"} />,\n );\n\n expect(template).toRenderTo(d`\n \\`\\`\\`ts\n const foo = 123;\n console.log(foo);\n \\`\\`\\`\n `);\n});\n\nit(\"renders with children\", () => {\n const template = mdTest(\n <Code lang=\"ts\">\n <List>\n <>const foo = 123;</>\n <>console.log(foo);</>\n </List>\n </Code>,\n );\n\n expect(template).toRenderTo(d`\n \\`\\`\\`ts\n const foo = 123;\n console.log(foo);\n \\`\\`\\`\n `);\n});\n"],"mappings":";AAAA,SAAS,IAAI,QAAQ,gBAAgB;AACrC,SAAS,CAAC,QAAQ,wBAAwB;AAC1C,SAAS,MAAM,EAAE,EAAE,QAAQ,QAAQ;AAEnC,SAAS,IAAI;AACb,SAAS,MAAM;AAEf,EAAE,CAAC,uBAAuB,EAAE,MAAM;EAChC,MAAM,QAAQ,GAAG,MAAM,mBACpB,IAAI;IAAC,IAAI;IAAM,QAAQ,EAAE;EAAqC;IAAA;IAAA;IAAA;EAAA,EACjE,CAAC;EAED,MAAM,CAAC,QAAQ,CAAC,CAAC,UAAU,CAAC,CAAC;AAC/B;AACA;AACA;AACA;AACA,GAAG,CAAC;AACJ,CAAC,CAAC;AAEF,EAAE,CAAC,uBAAuB,EAAE,MAAM;EAChC,MAAM,QAAQ,GAAG,MAAM,mBACpB,IAAI;IAAC,IAAI;IAAA;MAAA,yBACP,IAAI;QAAA;UAAA;QAAA;MAAA;QAAA;QAAA;QAAA;MAAA;IAAA;EAAA;IAAA;IAAA;IAAA;EAAA,EAKT,CAAC;EAED,MAAM,CAAC,QAAQ,CAAC,CAAC,UAAU,CAAC,CAAC;AAC/B;AACA;AACA;AACA;AACA,GAAG,CAAC;AACJ,CAAC,CAAC","ignoreList":[]}
@@ -11,7 +11,7 @@ it("renders with js value", () => {
11
11
  }
12
12
  }, {
13
13
  fileName: import.meta.url,
14
- lineNumber: 8,
14
+ lineNumber: 9,
15
15
  columnNumber: 5
16
16
  }));
17
17
  expect(template).toRenderTo(d`
@@ -30,7 +30,7 @@ it("renders with children", () => {
30
30
  }
31
31
  }, {
32
32
  fileName: import.meta.url,
33
- lineNumber: 23,
33
+ lineNumber: 24,
34
34
  columnNumber: 5
35
35
  }));
36
36
  expect(template).toRenderTo(d`
@@ -1 +1 @@
1
- {"version":3,"names":["d","expect","it","Frontmatter","mdTest","template","_$createComponent","jsValue","title","tags","fileName","import","meta","url","lineNumber","columnNumber","toRenderTo","children"],"sources":["../../../test/Frontmatter.test.tsx"],"sourcesContent":[null],"mappings":";AAAA,SAASA,CAAC,QAAQ,wBAAwB;AAC1C,SAASC,MAAM,EAAEC,EAAE,QAAQ,QAAQ;AACnC,SAASC,WAAW;AACpB,SAASC,MAAM;AAEfF,EAAE,CAAC,uBAAuB,EAAE,MAAM;EAChC,MAAMG,QAAQ,GAAGD,MAAM,CAAAE,iBAAA,CACpBH,WAAW;IAACI,OAAO,EAAE;MAAEC,KAAK,EAAE,UAAU;MAAEC,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM;IAAE;EAAC;IAAAC,QAAA,EAAAC,MAAA,CAAAC,IAAA,CAAAC,GAAA;IAAAC,UAAA;IAAAC,YAAA;EAAA,EACrE,CAAC;EAEDd,MAAM,CAACI,QAAQ,CAAC,CAACW,UAAU,CAAChB,CAAC;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA,GAAG,CAAC;AACJ,CAAC,CAAC;AAEFE,EAAE,CAAC,uBAAuB,EAAE,MAAM;EAChC,MAAMG,QAAQ,GAAGD,MAAM,CAAAE,iBAAA,CACpBH,WAAW;IAAA,IAAAc,SAAA;MAAA,SACP,iBAAiB,IACjB,OAAO,IACP,UAAU,IACV,UAAU;IAAA;EAAA;IAAAP,QAAA,EAAAC,MAAA,CAAAC,IAAA,CAAAC,GAAA;IAAAC,UAAA;IAAAC,YAAA;EAAA,EAEjB,CAAC;EAEDd,MAAM,CAACI,QAAQ,CAAC,CAACW,UAAU,CAAChB,CAAC;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA,GAAG,CAAC;AACJ,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"names":[],"sources":["../../../test/Frontmatter.test.tsx"],"sourcesContent":["import { d } from \"@alloy-js/core/testing\";\nimport { expect, it } from \"vitest\";\n\nimport { Frontmatter } from \"../src/components/Frontmatter.jsx\";\nimport { mdTest } from \"./utils.jsx\";\n\nit(\"renders with js value\", () => {\n const template = mdTest(\n <Frontmatter jsValue={{ title: \"My Title\", tags: [\"tag1\", \"tag2\"] }} />,\n );\n\n expect(template).toRenderTo(d`\n ---\n title: My Title\n tags:\n - tag1\n - tag2\n ---\n `);\n});\n\nit(\"renders with children\", () => {\n const template = mdTest(\n <Frontmatter>\n <>{`title: My Title`}</>\n <>{`tags:`}</>\n <>{` - tag1`}</>\n <>{` - tag2`}</>\n </Frontmatter>,\n );\n\n expect(template).toRenderTo(d`\n ---\n title: My Title\n tags:\n - tag1\n - tag2\n ---\n `);\n});\n"],"mappings":";AAAA,SAAS,CAAC,QAAQ,wBAAwB;AAC1C,SAAS,MAAM,EAAE,EAAE,QAAQ,QAAQ;AAEnC,SAAS,WAAW;AACpB,SAAS,MAAM;AAEf,EAAE,CAAC,uBAAuB,EAAE,MAAM;EAChC,MAAM,QAAQ,GAAG,MAAM,mBACpB,WAAW;IAAC,OAAO,EAAE;MAAE,KAAK,EAAE,UAAU;MAAE,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM;IAAE;EAAC;IAAA;IAAA;IAAA;EAAA,EACrE,CAAC;EAED,MAAM,CAAC,QAAQ,CAAC,CAAC,UAAU,CAAC,CAAC;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA,GAAG,CAAC;AACJ,CAAC,CAAC;AAEF,EAAE,CAAC,uBAAuB,EAAE,MAAM;EAChC,MAAM,QAAQ,GAAG,MAAM,mBACpB,WAAW;IAAA;MAAA,SACP,iBAAiB,IACjB,OAAO,IACP,UAAU,IACV,UAAU;IAAA;EAAA;IAAA;IAAA;IAAA;EAAA,EAEjB,CAAC;EAED,MAAM,CAAC,QAAQ,CAAC,CAAC,UAAU,CAAC,CAAC;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA,GAAG,CAAC;AACJ,CAAC,CAAC","ignoreList":[]}
@@ -9,7 +9,7 @@ it("renders ordered lists", () => {
9
9
  get children() {
10
10
  return [["Item 1"], ["Item 2"], ["Item 3", _$createIntrinsic("hbr", {}, {
11
11
  fileName: import.meta.url,
12
- lineNumber: 12,
12
+ lineNumber: 13,
13
13
  columnNumber: 15
14
14
  }), _$createComponent(List, {
15
15
  ordered: true,
@@ -19,13 +19,13 @@ it("renders ordered lists", () => {
19
19
  }
20
20
  }, {
21
21
  fileName: import.meta.url,
22
- lineNumber: 13,
22
+ lineNumber: 14,
23
23
  columnNumber: 9
24
24
  })]];
25
25
  }
26
26
  }, {
27
27
  fileName: import.meta.url,
28
- lineNumber: 8,
28
+ lineNumber: 9,
29
29
  columnNumber: 5
30
30
  }));
31
31
  expect(template).toRenderTo(d`
@@ -43,7 +43,7 @@ it("renders task lists", () => {
43
43
  get children() {
44
44
  return [["Item 1"], ["Item 2"], ["Item 3", _$createIntrinsic("hbr", {}, {
45
45
  fileName: import.meta.url,
46
- lineNumber: 36,
46
+ lineNumber: 37,
47
47
  columnNumber: 15
48
48
  }), _$createComponent(List, {
49
49
  tasks: true,
@@ -53,13 +53,13 @@ it("renders task lists", () => {
53
53
  }
54
54
  }, {
55
55
  fileName: import.meta.url,
56
- lineNumber: 37,
56
+ lineNumber: 38,
57
57
  columnNumber: 9
58
58
  })]];
59
59
  }
60
60
  }, {
61
61
  fileName: import.meta.url,
62
- lineNumber: 32,
62
+ lineNumber: 33,
63
63
  columnNumber: 5
64
64
  }));
65
65
  expect(template).toRenderTo(d`
@@ -1 +1 @@
1
- {"version":3,"names":["d","expect","it","List","mdTest","template","_$createComponent","ordered","children","_$createIntrinsic","fileName","import","meta","url","lineNumber","columnNumber","start","toRenderTo","tasks","bullet"],"sources":["../../../test/list.test.tsx"],"sourcesContent":[null],"mappings":";AAAA,SAASA,CAAC,QAAQ,wBAAwB;AAC1C,SAASC,MAAM,EAAEC,EAAE,QAAQ,QAAQ;AACnC,SAASC,IAAI;AACb,SAASC,MAAM;AAEfF,EAAE,CAAC,uBAAuB,EAAE,MAAM;EAChC,MAAMG,QAAQ,GAAGD,MAAM,CAAAE,iBAAA,CACpBH,IAAI;IAACI,OAAO;IAAA,IAAAC,SAAA;MAAA,2CAAAC,iBAAA;QAAAC,QAAA,EAAAC,MAAA,CAAAC,IAAA,CAAAC,GAAA;QAAAC,UAAA;QAAAC,YAAA;MAAA,IAAAT,iBAAA,CAKRH,IAAI;QAACI,OAAO;QAACS,KAAK,EAAE,EAAE;QAAA,IAAAR,SAAA;UAAA;QAAA;MAAA;QAAAE,QAAA,EAAAC,MAAA,CAAAC,IAAA,CAAAC,GAAA;QAAAC,UAAA;QAAAC,YAAA;MAAA;IAAA;EAAA;IAAAL,QAAA,EAAAC,MAAA,CAAAC,IAAA,CAAAC,GAAA;IAAAC,UAAA;IAAAC,YAAA;EAAA,EAM7B,CAAC;EAEDd,MAAM,CAACI,QAAQ,CAAC,CAACY,UAAU,CAACjB,CAAC;AAC/B;AACA;AACA;AACA;AACA;AACA,GAAG,CAAC;AACJ,CAAC,CAAC;AAEFE,EAAE,CAAC,oBAAoB,EAAE,MAAM;EAC7B,MAAMG,QAAQ,GAAGD,MAAM,CAAAE,iBAAA,CACpBH,IAAI;IAACe,KAAK;IAACC,MAAM;IAAA,IAAAX,SAAA;MAAA,2CAAAC,iBAAA;QAAAC,QAAA,EAAAC,MAAA,CAAAC,IAAA,CAAAC,GAAA;QAAAC,UAAA;QAAAC,YAAA;MAAA,IAAAT,iBAAA,CAKbH,IAAI;QAACe,KAAK;QAACX,OAAO;QAAA,IAAAC,SAAA;UAAA;QAAA;MAAA;QAAAE,QAAA,EAAAC,MAAA,CAAAC,IAAA,CAAAC,GAAA;QAAAC,UAAA;QAAAC,YAAA;MAAA;IAAA;EAAA;IAAAL,QAAA,EAAAC,MAAA,CAAAC,IAAA,CAAAC,GAAA;IAAAC,UAAA;IAAAC,YAAA;EAAA,EAMzB,CAAC;EAEDd,MAAM,CAACI,QAAQ,CAAC,CAACY,UAAU,CAACjB,CAAC;AAC/B;AACA;AACA;AACA;AACA;AACA,GAAG,CAAC;AACJ,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"names":[],"sources":["../../../test/list.test.tsx"],"sourcesContent":["import { d } from \"@alloy-js/core/testing\";\nimport { expect, it } from \"vitest\";\n\nimport { List } from \"../src/components/List.jsx\";\nimport { mdTest } from \"./utils.jsx\";\n\nit(\"renders ordered lists\", () => {\n const template = mdTest(\n <List ordered>\n <>Item 1</>\n <>Item 2</>\n <>\n Item 3<hbr />\n <List ordered start={10}>\n <>Item 3.1</>\n <>Item 3.2</>\n </List>\n </>\n </List>,\n );\n\n expect(template).toRenderTo(d`\n 1. Item 1\n 2. Item 2\n 3. Item 3\n 10. Item 3.1\n 11. Item 3.2\n `);\n});\n\nit(\"renders task lists\", () => {\n const template = mdTest(\n <List tasks bullet=\"-\">\n <>Item 1</>\n <>Item 2</>\n <>\n Item 3<hbr />\n <List tasks ordered>\n <>Item 3.1</>\n <>Item 3.2</>\n </List>\n </>\n </List>,\n );\n\n expect(template).toRenderTo(d`\n - [ ] Item 1\n - [ ] Item 2\n - [ ] Item 3\n 1. [ ] Item 3.1\n 2. [ ] Item 3.2\n `);\n});\n"],"mappings":";AAAA,SAAS,CAAC,QAAQ,wBAAwB;AAC1C,SAAS,MAAM,EAAE,EAAE,QAAQ,QAAQ;AAEnC,SAAS,IAAI;AACb,SAAS,MAAM;AAEf,EAAE,CAAC,uBAAuB,EAAE,MAAM;EAChC,MAAM,QAAQ,GAAG,MAAM,mBACpB,IAAI;IAAC,OAAO;IAAA;MAAA;QAAA;QAAA;QAAA;MAAA,sBAKR,IAAI;QAAC,OAAO;QAAC,KAAK,EAAE,EAAE;QAAA;UAAA;QAAA;MAAA;QAAA;QAAA;QAAA;MAAA;IAAA;EAAA;IAAA;IAAA;IAAA;EAAA,EAM7B,CAAC;EAED,MAAM,CAAC,QAAQ,CAAC,CAAC,UAAU,CAAC,CAAC;AAC/B;AACA;AACA;AACA;AACA;AACA,GAAG,CAAC;AACJ,CAAC,CAAC;AAEF,EAAE,CAAC,oBAAoB,EAAE,MAAM;EAC7B,MAAM,QAAQ,GAAG,MAAM,mBACpB,IAAI;IAAC,KAAK;IAAC,MAAM;IAAA;MAAA;QAAA;QAAA;QAAA;MAAA,sBAKb,IAAI;QAAC,KAAK;QAAC,OAAO;QAAA;UAAA;QAAA;MAAA;QAAA;QAAA;QAAA;MAAA;IAAA;EAAA;IAAA;IAAA;IAAA;EAAA,EAMzB,CAAC;EAED,MAAM,CAAC,QAAQ,CAAC,CAAC,UAAU,CAAC,CAAC;AAC/B;AACA;AACA;AACA;AACA;AACA,GAAG,CAAC;AACJ,CAAC,CAAC","ignoreList":[]}
@@ -11,19 +11,19 @@ it("renders a section", () => {
11
11
  children: "This is some text content that should be wrapped and such. We can put *italic* and **bold** text here, and it should be rendered correctly. We can also put in some code: `const x = 1;` and it should be rendered correctly. We can also put in some links: [Alloy](https://alloy-framework.github.io/alloy). It's pretty nice."
12
12
  }, {
13
13
  fileName: import.meta.url,
14
- lineNumber: 9,
14
+ lineNumber: 10,
15
15
  columnNumber: 7
16
16
  }), _$createComponent(Prose, {
17
17
  children: "Subsequent paragraphs should have a blank line between them."
18
18
  }, {
19
19
  fileName: import.meta.url,
20
- lineNumber: 16,
20
+ lineNumber: 17,
21
21
  columnNumber: 7
22
22
  })];
23
23
  }
24
24
  }, {
25
25
  fileName: import.meta.url,
26
- lineNumber: 8,
26
+ lineNumber: 9,
27
27
  columnNumber: 5
28
28
  }));
29
29
  expect(template).toRenderTo(`
@@ -1 +1 @@
1
- {"version":3,"names":["Prose","expect","it","Section","mdTest","template","_$createComponent","heading","children","fileName","import","meta","url","lineNumber","columnNumber","toRenderTo","printWidth"],"sources":["../../../test/paragraph.test.tsx"],"sourcesContent":[null],"mappings":";AAAA,SAASA,KAAK,QAAQ,gBAAgB;AACtC,SAASC,MAAM,EAAEC,EAAE,QAAQ,QAAQ;AACnC,SAASC,OAAO;AAChB,SAASC,MAAM;AAEfF,EAAE,CAAC,mBAAmB,EAAE,MAAM;EAC5B,MAAMG,QAAQ,GAAGD,MAAM,CAAAE,iBAAA,CACpBH,OAAO;IAACI,OAAO;IAAA,IAAAC,SAAA;MAAA,QAAAF,iBAAA,CACbN,KAAK;QAAAQ,QAAA;MAAA;QAAAC,QAAA,EAAAC,MAAA,CAAAC,IAAA,CAAAC,GAAA;QAAAC,UAAA;QAAAC,YAAA;MAAA,IAAAR,iBAAA,CAOLN,KAAK;QAAAQ,QAAA;MAAA;QAAAC,QAAA,EAAAC,MAAA,CAAAC,IAAA,CAAAC,GAAA;QAAAC,UAAA;QAAAC,YAAA;MAAA;IAAA;EAAA;IAAAL,QAAA,EAAAC,MAAA,CAAAC,IAAA,CAAAC,GAAA;IAAAC,UAAA;IAAAC,YAAA;EAAA,EAIV,CAAC;EAEDb,MAAM,CAACI,QAAQ,CAAC,CAACU,UAAU,CACzB;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG,EACC;IAAEC,UAAU,EAAE;EAAG,CACnB,CAAC;AACH,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"names":[],"sources":["../../../test/paragraph.test.tsx"],"sourcesContent":["import { Prose } from \"@alloy-js/core\";\nimport { expect, it } from \"vitest\";\n\nimport { Section } from \"../src/components/Section.jsx\";\nimport { mdTest } from \"./utils.jsx\";\n\nit(\"renders a section\", () => {\n const template = mdTest(\n <Section heading=\"hello\">\n <Prose>\n This is some text content that should be wrapped and such. We can put\n *italic* and **bold** text here, and it should be rendered correctly. We\n can also put in some code: `const x = 1;` and it should be rendered\n correctly. We can also put in some links:\n [Alloy](https://alloy-framework.github.io/alloy). It's pretty nice.\n </Prose>\n <Prose>\n Subsequent paragraphs should have a blank line between them.\n </Prose>\n </Section>,\n );\n\n expect(template).toRenderTo(\n `\n # hello\n\n This is some text content that should be\n wrapped and such. We can put *italic*\n and **bold** text here, and it should be\n rendered correctly. We can also put in\n some code: \\`const x = 1;\\` and it should\n be rendered correctly. We can also put\n in some links:\n [Alloy](https://alloy-framework.github.io/alloy).\n It's pretty nice.\n\n Subsequent paragraphs should have a\n blank line between them.\n `,\n { printWidth: 40 },\n );\n});\n"],"mappings":";AAAA,SAAS,KAAK,QAAQ,gBAAgB;AACtC,SAAS,MAAM,EAAE,EAAE,QAAQ,QAAQ;AAEnC,SAAS,OAAO;AAChB,SAAS,MAAM;AAEf,EAAE,CAAC,mBAAmB,EAAE,MAAM;EAC5B,MAAM,QAAQ,GAAG,MAAM,mBACpB,OAAO;IAAC,OAAO;IAAA;MAAA,0BACb,KAAK;QAAA;MAAA;QAAA;QAAA;QAAA;MAAA,sBAOL,KAAK;QAAA;MAAA;QAAA;QAAA;QAAA;MAAA;IAAA;EAAA;IAAA;IAAA;IAAA;EAAA,EAIV,CAAC;EAED,MAAM,CAAC,QAAQ,CAAC,CAAC,UAAU,CACzB;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG,EACC;IAAE,UAAU,EAAE;EAAG,CACnB,CAAC;AACH,CAAC,CAAC","ignoreList":[]}
@@ -8,7 +8,7 @@ it("renders a section", () => {
8
8
  children: "world"
9
9
  }, {
10
10
  fileName: import.meta.url,
11
- lineNumber: 6,
11
+ lineNumber: 7,
12
12
  columnNumber: 28
13
13
  })]);
14
14
  expect(template).toRenderTo(`
@@ -23,14 +23,14 @@ it("renders multiple sections", () => {
23
23
  children: "world"
24
24
  }, {
25
25
  fileName: import.meta.url,
26
- lineNumber: 17,
26
+ lineNumber: 18,
27
27
  columnNumber: 5
28
28
  }), _$createComponent(Section, {
29
29
  heading: "hello",
30
30
  children: "world"
31
31
  }, {
32
32
  fileName: import.meta.url,
33
- lineNumber: 18,
33
+ lineNumber: 19,
34
34
  columnNumber: 5
35
35
  })]);
36
36
  expect(template).toRenderTo(`
@@ -52,20 +52,20 @@ it("renders nested sections", () => {
52
52
  children: "subworld"
53
53
  }, {
54
54
  fileName: import.meta.url,
55
- lineNumber: 36,
55
+ lineNumber: 37,
56
56
  columnNumber: 7
57
57
  })];
58
58
  }
59
59
  }, {
60
60
  fileName: import.meta.url,
61
- lineNumber: 34,
61
+ lineNumber: 35,
62
62
  columnNumber: 5
63
63
  }), _$createComponent(Section, {
64
64
  heading: "hello",
65
65
  children: "world"
66
66
  }, {
67
67
  fileName: import.meta.url,
68
- lineNumber: 38,
68
+ lineNumber: 39,
69
69
  columnNumber: 5
70
70
  })]);
71
71
  expect(template).toRenderTo(`
@@ -1 +1 @@
1
- {"version":3,"names":["expect","it","Section","mdTest","template","_$createComponent","heading","children","fileName","import","meta","url","lineNumber","columnNumber","toRenderTo"],"sources":["../../../test/section.test.tsx"],"sourcesContent":[null],"mappings":";AAAA,SAASA,MAAM,EAAEC,EAAE,QAAQ,QAAQ;AACnC,SAASC,OAAO;AAChB,SAASC,MAAM;AAEfF,EAAE,CAAC,mBAAmB,EAAE,MAAM;EAC5B,MAAMG,QAAQ,GAAGD,MAAM,CAAC,CAAAE,iBAAA,CAAEH,OAAO;IAACI,OAAO;IAAAC,QAAA;EAAA;IAAAC,QAAA,EAAAC,MAAA,CAAAC,IAAA,CAAAC,GAAA;IAAAC,UAAA;IAAAC,YAAA;EAAA,GAAyB,CAAC;EAEnEb,MAAM,CAACI,QAAQ,CAAC,CAACU,UAAU,CAAC;AAC9B;AACA;AACA;AACA,GAAG,CAAC;AACJ,CAAC,CAAC;AAEFb,EAAE,CAAC,2BAA2B,EAAE,MAAM;EACpC,MAAMG,QAAQ,GAAGD,MAAM,CAAC,CAAAE,iBAAA,CACrBH,OAAO;IAACI,OAAO;IAAAC,QAAA;EAAA;IAAAC,QAAA,EAAAC,MAAA,CAAAC,IAAA,CAAAC,GAAA;IAAAC,UAAA;IAAAC,YAAA;EAAA,IAAAR,iBAAA,CACfH,OAAO;IAACI,OAAO;IAAAC,QAAA;EAAA;IAAAC,QAAA,EAAAC,MAAA,CAAAC,IAAA,CAAAC,GAAA;IAAAC,UAAA;IAAAC,YAAA;EAAA,GACjB,CAAC;EAEFb,MAAM,CAACI,QAAQ,CAAC,CAACU,UAAU,CAAC;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG,CAAC;AACJ,CAAC,CAAC;AAEFb,EAAE,CAAC,yBAAyB,EAAE,MAAM;EAClC,MAAMG,QAAQ,GAAGD,MAAM,CAAC,CAAAE,iBAAA,CACrBH,OAAO;IAACI,OAAO;IAAA,IAAAC,SAAA;MAAA,iBAAAF,iBAAA,CAEbH,OAAO;QAACI,OAAO;QAAAC,QAAA;MAAA;QAAAC,QAAA,EAAAC,MAAA,CAAAC,IAAA,CAAAC,GAAA;QAAAC,UAAA;QAAAC,YAAA;MAAA;IAAA;EAAA;IAAAL,QAAA,EAAAC,MAAA,CAAAC,IAAA,CAAAC,GAAA;IAAAC,UAAA;IAAAC,YAAA;EAAA,IAAAR,iBAAA,CAEjBH,OAAO;IAACI,OAAO;IAAAC,QAAA;EAAA;IAAAC,QAAA,EAAAC,MAAA,CAAAC,IAAA,CAAAC,GAAA;IAAAC,UAAA;IAAAC,YAAA;EAAA,GACjB,CAAC;EAEFb,MAAM,CAACI,QAAQ,CAAC,CAACU,UAAU,CAAC;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG,CAAC;AACJ,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"names":[],"sources":["../../../test/section.test.tsx"],"sourcesContent":["import { expect, it } from \"vitest\";\n\nimport { Section } from \"../src/components/Section.jsx\";\nimport { mdTest } from \"./utils.jsx\";\n\nit(\"renders a section\", () => {\n const template = mdTest([<Section heading=\"hello\">world</Section>]);\n\n expect(template).toRenderTo(`\n # hello\n \n world\n `);\n});\n\nit(\"renders multiple sections\", () => {\n const template = mdTest([\n <Section heading=\"hello\">world</Section>,\n <Section heading=\"hello\">world</Section>,\n ]);\n\n expect(template).toRenderTo(`\n # hello\n \n world\n\n # hello\n\n world\n `);\n});\n\nit(\"renders nested sections\", () => {\n const template = mdTest([\n <Section heading=\"hello\">\n world\n <Section heading=\"subhello\">subworld</Section>\n </Section>,\n <Section heading=\"hello\">world</Section>,\n ]);\n\n expect(template).toRenderTo(`\n # hello\n\n world\n\n ## subhello\n\n subworld\n\n # hello\n\n world\n `);\n});\n"],"mappings":";AAAA,SAAS,MAAM,EAAE,EAAE,QAAQ,QAAQ;AAEnC,SAAS,OAAO;AAChB,SAAS,MAAM;AAEf,EAAE,CAAC,mBAAmB,EAAE,MAAM;EAC5B,MAAM,QAAQ,GAAG,MAAM,CAAC,mBAAE,OAAO;IAAC,OAAO;IAAA;EAAA;IAAA;IAAA;IAAA;EAAA,GAAyB,CAAC;EAEnE,MAAM,CAAC,QAAQ,CAAC,CAAC,UAAU,CAAC;AAC9B;AACA;AACA;AACA,GAAG,CAAC;AACJ,CAAC,CAAC;AAEF,EAAE,CAAC,2BAA2B,EAAE,MAAM;EACpC,MAAM,QAAQ,GAAG,MAAM,CAAC,mBACrB,OAAO;IAAC,OAAO;IAAA;EAAA;IAAA;IAAA;IAAA;EAAA,sBACf,OAAO;IAAC,OAAO;IAAA;EAAA;IAAA;IAAA;IAAA;EAAA,GACjB,CAAC;EAEF,MAAM,CAAC,QAAQ,CAAC,CAAC,UAAU,CAAC;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG,CAAC;AACJ,CAAC,CAAC;AAEF,EAAE,CAAC,yBAAyB,EAAE,MAAM;EAClC,MAAM,QAAQ,GAAG,MAAM,CAAC,mBACrB,OAAO;IAAC,OAAO;IAAA;MAAA,mCAEb,OAAO;QAAC,OAAO;QAAA;MAAA;QAAA;QAAA;QAAA;MAAA;IAAA;EAAA;IAAA;IAAA;IAAA;EAAA,sBAEjB,OAAO;IAAC,OAAO;IAAA;EAAA;IAAA;IAAA;IAAA;EAAA,GACjB,CAAC;EAEF,MAAM,CAAC,QAAQ,CAAC,CAAC,UAAU,CAAC;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG,CAAC;AACJ,CAAC,CAAC","ignoreList":[]}
@@ -9,13 +9,13 @@ export function mdTest(children) {
9
9
  children: children
10
10
  }, {
11
11
  fileName: import.meta.url,
12
- lineNumber: 7,
12
+ lineNumber: 9,
13
13
  columnNumber: 7
14
14
  });
15
15
  }
16
16
  }, {
17
17
  fileName: import.meta.url,
18
- lineNumber: 6,
18
+ lineNumber: 8,
19
19
  columnNumber: 5
20
20
  });
21
21
  }
@@ -1 +1 @@
1
- {"version":3,"names":["Output","SourceFile","mdTest","children","_$createComponent","path","fileName","import","meta","url","lineNumber","columnNumber"],"sources":["../../../test/utils.tsx"],"sourcesContent":[null],"mappings":";AAAA,SAAmBA,MAAM,QAAQ,gBAAgB;AACjD,SAASC,UAAU;AAEnB,OAAO,SAASC,MAAMA,CAACC,QAAkB,EAAE;EACzC,OAAAC,iBAAA,CACGJ,MAAM;IAAA,IAAAG,SAAA;MAAA,OAAAC,iBAAA,CACJH,UAAU;QAACI,IAAI;QAAAF,QAAA,EAAYA;MAAQ;QAAAG,QAAA,EAAAC,MAAA,CAAAC,IAAA,CAAAC,GAAA;QAAAC,UAAA;QAAAC,YAAA;MAAA;IAAA;EAAA;IAAAL,QAAA,EAAAC,MAAA,CAAAC,IAAA,CAAAC,GAAA;IAAAC,UAAA;IAAAC,YAAA;EAAA;AAG1C","ignoreList":[]}
1
+ {"version":3,"names":[],"sources":["../../../test/utils.tsx"],"sourcesContent":["import type { Children } from \"@alloy-js/core\";\nimport { Output } from \"@alloy-js/core\";\n\nimport { SourceFile } from \"../src/components/SourceFile.jsx\";\n\nexport function mdTest(children: Children) {\n return (\n <Output>\n <SourceFile path=\"test.md\">{children}</SourceFile>\n </Output>\n );\n}\n"],"mappings":";AACA,SAAS,MAAM,QAAQ,gBAAgB;AAEvC,SAAS,UAAU;AAEnB,OAAO,SAAS,MAAM,CAAC,QAAkB,EAAE;EACzC,yBACG,MAAM;IAAA;MAAA,yBACJ,UAAU;QAAC,IAAI;QAAA,UAAY;MAAQ;QAAA;QAAA;QAAA;MAAA;IAAA;EAAA;IAAA;IAAA;IAAA;EAAA;AAG1C","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["../../../test/vitest.d.ts"],"sourcesContent":[null],"mappings":"AAAA,OAAO,QAAQ","ignoreList":[]}
1
+ {"version":3,"names":[],"sources":["../../../test/vitest.d.ts"],"sourcesContent":["import \"vitest\";\n\ninterface ToRenderToRenderOptions {\n printWidth?: number;\n tabWidth?: number;\n useTabs?: boolean;\n}\n\ninterface CustomMatchers<R = unknown> {\n toRenderTo: (str: string, options?: ToRenderToRenderOptions) => R;\n}\n\ndeclare module \"vitest\" {\n interface Assertion<T = any> extends CustomMatchers<T> {}\n interface AsymmetricMatchersContaining extends CustomMatchers {}\n}\n"],"mappings":"AAAA,OAAO,QAAQ","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["../../../test/vitest.setup.ts"],"sourcesContent":[null],"mappings":"AAAA,OAAO,wBAAwB","ignoreList":[]}
1
+ {"version":3,"names":[],"sources":["../../../test/vitest.setup.ts"],"sourcesContent":["import \"@alloy-js/core/testing\";\n"],"mappings":"AAAA,OAAO,wBAAwB","ignoreList":[]}
@@ -1,4 +1,4 @@
1
- import { Children } from "@alloy-js/core/jsx-runtime";
1
+ import type { Children } from "@alloy-js/core/jsx-runtime";
2
2
  export interface CodeProps {
3
3
  /** Language of the code block */
4
4
  lang?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"Code.d.ts","sourceRoot":"","sources":["../../../src/components/Code.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AAEtD,MAAM,WAAW,SAAS;IACxB,iCAAiC;IACjC,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd,6BAA6B;IAC7B,QAAQ,CAAC,EAAE,QAAQ,CAAC;CACrB;AAED;;GAEG;AACH,wBAAgB,IAAI,CAAC,KAAK,EAAE,SAAS,YASpC"}
1
+ {"version":3,"file":"Code.d.ts","sourceRoot":"","sources":["../../../src/components/Code.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AAE3D,MAAM,WAAW,SAAS;IACxB,iCAAiC;IACjC,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd,6BAA6B;IAC7B,QAAQ,CAAC,EAAE,QAAQ,CAAC;CACrB;AAED;;GAEG;AACH,wBAAgB,IAAI,CAAC,KAAK,EAAE,SAAS,YASpC"}
@@ -1 +1 @@
1
- {"version":3,"names":["List","Code","props","tripleBackticks","_$createComponent","children","_$memo","lang"],"sources":["../../../src/components/Code.tsx"],"sourcesContent":[null],"mappings":";AAAA,SAASA,IAAI,QAAQ,gBAAgB;AAWrC;AACA;AACA;AACA,OAAO,SAASC,IAAIA,CAACC,KAAgB,EAAE;EACrC,MAAMC,eAAe,GAAG,KAAK;EAC7B,OAAAC,iBAAA,CACGJ,IAAI;IAAA,IAAAK,SAAA;MAAA,QAAAC,MAAA,OACFH,eAAe,GAAGD,KAAK,CAACK,IAAI,GAAAD,MAAA,OAC5BJ,KAAK,CAACG,QAAQ,GACdF,eAAe;IAAA;EAAA;AAGtB","ignoreList":[]}
1
+ {"version":3,"names":[],"sources":["../../../src/components/Code.tsx"],"sourcesContent":["import { List } from \"@alloy-js/core\";\nimport type { Children } from \"@alloy-js/core/jsx-runtime\";\n\nexport interface CodeProps {\n /** Language of the code block */\n lang?: string;\n\n /** Body of the code block */\n children?: Children;\n}\n\n/**\n * Render a Markdown code block\n */\nexport function Code(props: CodeProps) {\n const tripleBackticks = \"```\";\n return (\n <List>\n {tripleBackticks + props.lang}\n {props.children}\n {tripleBackticks}\n </List>\n );\n}\n"],"mappings":";AAAA,SAAS,IAAI,QAAQ,gBAAgB;AAWrC;AACA;AACA;AACA,OAAO,SAAS,IAAI,CAAC,KAAgB,EAAE;EACrC,MAAM,eAAe,GAAG,KAAK;EAC7B,yBACG,IAAI;IAAA;MAAA,qBACF,eAAe,GAAG,KAAK,CAAC,IAAI,gBAC5B,KAAK,CAAC,QAAQ,GACd,eAAe;IAAA;EAAA;AAGtB","ignoreList":[]}
@@ -1,4 +1,4 @@
1
- import { Children } from "@alloy-js/core/jsx-runtime";
1
+ import type { Children } from "@alloy-js/core/jsx-runtime";
2
2
  export interface FrontmatterProps {
3
3
  /** Js value to automatically serialize as yaml */
4
4
  jsValue?: Record<string, unknown>;
@@ -1 +1 @@
1
- {"version":3,"file":"Frontmatter.d.ts","sourceRoot":"","sources":["../../../src/components/Frontmatter.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AAGtD,MAAM,WAAW,gBAAgB;IAC/B,kDAAkD;IAClD,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAClC,QAAQ,CAAC,EAAE,QAAQ,CAAC;CACrB;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,gBAAgB,YAUlD"}
1
+ {"version":3,"file":"Frontmatter.d.ts","sourceRoot":"","sources":["../../../src/components/Frontmatter.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AAG3D,MAAM,WAAW,gBAAgB;IAC/B,kDAAkD;IAClD,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAClC,QAAQ,CAAC,EAAE,QAAQ,CAAC;CACrB;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,gBAAgB,YAYlD"}
@@ -1 +1 @@
1
- {"version":3,"names":["List","stringify","Frontmatter","props","_$createComponent","children","_$memo","jsValue","trim"],"sources":["../../../src/components/Frontmatter.tsx"],"sourcesContent":[null],"mappings":";AAAA,SAASA,IAAI,QAAQ,gBAAgB;AAErC,SAASC,SAAS,QAAQ,MAAM;AAQhC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,WAAWA,CAACC,KAAuB,EAAE;EACnD,OAAAC,iBAAA,CACGJ,IAAI;IAAA,IAAAK,SAAA;MAAA,QACF,KAAK,EAAAC,MAAA,OACLA,MAAA,SAAAH,KAAK,CAACI,OAAO,MACZN,SAAS,CAACE,KAAK,CAACI,OAAO,CAAC,CAACC,IAAI,CAAC,CAAC,GAAAJ,iBAAA,CAC9BJ,IAAI;QAAA,IAACK,QAAQA,CAAA;UAAA,OAAEF,KAAK,CAACE,QAAQ;QAAA;MAAA,EAAI,GACnC,KAAK;IAAA;EAAA;AAGZ","ignoreList":[]}
1
+ {"version":3,"names":[],"sources":["../../../src/components/Frontmatter.tsx"],"sourcesContent":["import { List } from \"@alloy-js/core\";\nimport type { Children } from \"@alloy-js/core/jsx-runtime\";\nimport { stringify } from \"yaml\";\n\nexport interface FrontmatterProps {\n /** Js value to automatically serialize as yaml */\n jsValue?: Record<string, unknown>;\n children?: Children;\n}\n\n/**\n * Create a frontmatter block for markdown files.\n *\n * @example\n *\n * ```markdown\n * ---\n * title: \"My Title\"\n * ---\n * ```\n */\nexport function Frontmatter(props: FrontmatterProps) {\n return (\n <List>\n {\"---\"}\n {props.jsValue ? (\n stringify(props.jsValue).trim()\n ) : (\n <List children={props.children} />\n )}\n {\"---\"}\n </List>\n );\n}\n"],"mappings":";AAAA,SAAS,IAAI,QAAQ,gBAAgB;AAErC,SAAS,SAAS,QAAQ,MAAM;AAQhC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAAS,WAAW,CAAC,KAAuB,EAAE;EACnD,yBACG,IAAI;IAAA;MAAA,QACF,KAAK,eACL,oBAAK,CAAC,OAAO,MACZ,SAAS,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,qBAE9B,IAAI;QAAA,IAAC,QAAQ;UAAA,OAAE,KAAK,CAAC,QAAQ;QAAA;MAAA,EAC/B,GACA,KAAK;IAAA;EAAA;AAGZ","ignoreList":[]}
@@ -1,5 +1,5 @@
1
- import { Refkey } from "@alloy-js/core";
2
- import { Children } from "@alloy-js/core/jsx-runtime";
1
+ import type { Refkey } from "@alloy-js/core";
2
+ import type { Children } from "@alloy-js/core/jsx-runtime";
3
3
  export interface HeadingProps {
4
4
  level?: number;
5
5
  children: Children;
@@ -1 +1 @@
1
- {"version":3,"file":"Heading.d.ts","sourceRoot":"","sources":["../../../src/components/Heading.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AACxC,OAAO,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AAGtD,MAAM,WAAW,YAAY;IAC3B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,QAAQ,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,wBAAgB,OAAO,CAAC,KAAK,EAAE,YAAY,YAQ1C"}
1
+ {"version":3,"file":"Heading.d.ts","sourceRoot":"","sources":["../../../src/components/Heading.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AAI3D,MAAM,WAAW,YAAY;IAC3B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,QAAQ,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,wBAAgB,OAAO,CAAC,KAAK,EAAE,YAAY,YAQ1C"}
@@ -1 +1 @@
1
- {"version":3,"names":["useSectionContext","Heading","props","level","undefined","_$memo","repeat","children"],"sources":["../../../src/components/Heading.tsx"],"sourcesContent":[null],"mappings":";AAEA,SAASA,iBAAiB,QAAQ,uBAAuB;AAQzD,OAAO,SAASC,OAAOA,CAACC,KAAmB,EAAE;EAC3C,MAAMC,KAAK,GACTD,KAAK,CAACC,KAAK,KAAKC,SAAS,GAAGF,KAAK,CAACC,KAAK,GAAGH,iBAAiB,CAAC,CAAC,CAACG,KAAK;EACrE,QAAAE,MAAA,OAEK,GAAG,CAACC,MAAM,CAACH,KAAK,CAAC,QAAAE,MAAA,OAAGH,KAAK,CAACK,QAAQ;AAGzC","ignoreList":[]}
1
+ {"version":3,"names":[],"sources":["../../../src/components/Heading.tsx"],"sourcesContent":["import type { Refkey } from \"@alloy-js/core\";\nimport type { Children } from \"@alloy-js/core/jsx-runtime\";\n\nimport { useSectionContext } from \"../context/section.js\";\n\nexport interface HeadingProps {\n level?: number;\n children: Children;\n refkey?: Refkey;\n}\n\nexport function Heading(props: HeadingProps) {\n const level =\n props.level !== undefined ? props.level : useSectionContext().level;\n return (\n <>\n {\"#\".repeat(level)} {props.children}\n </>\n );\n}\n"],"mappings":";AAGA,SAAS,iBAAiB,QAAQ,uBAAuB;AAQzD,OAAO,SAAS,OAAO,CAAC,KAAmB,EAAE;EAC3C,MAAM,KAAK,GACT,KAAK,CAAC,KAAK,KAAK,SAAS,GAAG,KAAK,CAAC,KAAK,GAAG,iBAAiB,CAAC,CAAC,CAAC,KAAK;EACrE,qBAEK,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,qBAAG,KAAK,CAAC,QAAQ;AAGzC","ignoreList":[]}
@@ -1,4 +1,4 @@
1
- import { Refkey } from "@alloy-js/core";
1
+ import type { Refkey } from "@alloy-js/core";
2
2
  export interface LinkPropsWithRefkey {
3
3
  refkey: Refkey;
4
4
  }
@@ -1 +1 @@
1
- {"version":3,"file":"Link.d.ts","sourceRoot":"","sources":["../../../src/components/Link.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAExC,MAAM,WAAW,mBAAmB;IAClC,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,MAAM,SAAS,GAAG,mBAAmB,GAAG,iBAAiB,CAAC;AAEhE,wBAAgB,IAAI,CAAC,KAAK,EAAE,SAAS,qCAUpC"}
1
+ {"version":3,"file":"Link.d.ts","sourceRoot":"","sources":["../../../src/components/Link.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAE7C,MAAM,WAAW,mBAAmB;IAClC,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,MAAM,SAAS,GAAG,mBAAmB,GAAG,iBAAiB,CAAC;AAEhE,wBAAgB,IAAI,CAAC,KAAK,EAAE,SAAS,qCAUpC"}
@@ -1 +1 @@
1
- {"version":3,"names":["Link","props","_$memo","title","href"],"sources":["../../../src/components/Link.tsx"],"sourcesContent":[null],"mappings":";AAaA,OAAO,SAASA,IAAIA,CAACC,KAAgB,EAAE;EACrC,IAAI,QAAQ,IAAIA,KAAK,EAAE;IACrB,OAAO,QAAQ;EACjB;EAEA,aAAAC,MAAA,OAEMD,KAAK,CAACE,KAAK,SAAAD,MAAA,OAAID,KAAK,CAACG,IAAI;AAGjC","ignoreList":[]}
1
+ {"version":3,"names":[],"sources":["../../../src/components/Link.tsx"],"sourcesContent":["import type { Refkey } from \"@alloy-js/core\";\n\nexport interface LinkPropsWithRefkey {\n refkey: Refkey;\n}\n\nexport interface LinkPropsWithHref {\n href: string;\n title: string;\n}\n\nexport type LinkProps = LinkPropsWithRefkey | LinkPropsWithHref;\n\nexport function Link(props: LinkProps) {\n if (\"refkey\" in props) {\n return \"refkey\";\n }\n\n return (\n <>\n [{props.title}]({props.href})\n </>\n );\n}\n"],"mappings":";AAaA,OAAO,SAAS,IAAI,CAAC,KAAgB,EAAE;EACrC,IAAI,QAAQ,IAAI,KAAK,EAAE;IACrB,OAAO,QAAQ;EACjB;EAEA,0BAEM,KAAK,CAAC,KAAK,sBAAI,KAAK,CAAC,IAAI;AAGjC","ignoreList":[]}
@@ -1,4 +1,4 @@
1
- import { Children } from "@alloy-js/core/jsx-runtime";
1
+ import type { Children } from "@alloy-js/core/jsx-runtime";
2
2
  export interface CommonListProps {
3
3
  children: Children;
4
4
  tasks?: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"List.d.ts","sourceRoot":"","sources":["../../../src/components/List.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAQ,MAAM,4BAA4B,CAAC;AAE5D,MAAM,WAAW,eAAe;IAC9B,QAAQ,EAAE,QAAQ,CAAC;IACnB,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED,MAAM,WAAW,gBAAiB,SAAQ,eAAe;IACvD,OAAO,EAAE,IAAI,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,kBAAmB,SAAQ,eAAe;IACzD,OAAO,CAAC,EAAE,KAAK,GAAG,SAAS,CAAC;IAC5B,MAAM,CAAC,EAAE,GAAG,GAAG,GAAG,GAAG,GAAG,CAAC;CAC1B;AAED,MAAM,MAAM,SAAS,GAAG,gBAAgB,GAAG,kBAAkB,CAAC;AAE9D,wBAAgB,IAAI,CAAC,KAAK,EAAE,SAAS,YA6BpC"}
1
+ {"version":3,"file":"List.d.ts","sourceRoot":"","sources":["../../../src/components/List.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AAG3D,MAAM,WAAW,eAAe;IAC9B,QAAQ,EAAE,QAAQ,CAAC;IACnB,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED,MAAM,WAAW,gBAAiB,SAAQ,eAAe;IACvD,OAAO,EAAE,IAAI,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,kBAAmB,SAAQ,eAAe;IACzD,OAAO,CAAC,EAAE,KAAK,GAAG,SAAS,CAAC;IAC5B,MAAM,CAAC,EAAE,GAAG,GAAG,GAAG,GAAG,GAAG,CAAC;CAC1B;AAED,MAAM,MAAM,SAAS,GAAG,gBAAgB,GAAG,kBAAkB,CAAC;AAE9D,wBAAgB,IAAI,CAAC,KAAK,EAAE,SAAS,YA2BpC"}
@@ -1 +1 @@
1
- {"version":3,"names":["childrenArray","For","memo","List","props","children","preserveFragments","filter","c","Boolean","start","_$createComponent","each","child","index","alignSize","ordered","_$createIntrinsic","width","_$memo","bullet","tasks"],"sources":["../../../src/components/List.tsx"],"sourcesContent":[null],"mappings":";AAAA,SAASA,aAAa,EAAEC,GAAG,QAAQ,gBAAgB;AACnD,SAAmBC,IAAI,QAAQ,4BAA4B;AAmB3D,OAAO,SAASC,IAAIA,CAACC,KAAgB,EAAE;EACrC,MAAMC,QAAQ,GAAGH,IAAI,CAAC,MAAM;IAC1B,OAAOF,aAAa,CAAC,MAAMI,KAAK,CAACC,QAAQ,EAAE;MACzCC,iBAAiB,EAAE;IACrB,CAAC,CAAC,CAACC,MAAM,CAAEC,CAAC,IAAKC,OAAO,CAACD,CAAC,CAAC,CAAC;EAC9B,CAAC,CAAC;EAEF,MAAME,KAAK,GAAIN,KAAK,CAAsBM,KAAK,IAAI,CAAC;EAEpD,OAAAC,iBAAA,CACGV,GAAG;IAACW,IAAI,EAAEP,QAAQ;IAAAA,QAAA,EAChBA,CAACQ,KAAK,EAAEC,KAAK,KAAK;MACjB;MACA;MACA;MACA,MAAMC,SAAS,GAAGX,KAAK,CAACY,OAAO,GAAG,CAAC,GAAG,CAAC;MAEvC,OAAAC,iBAAA;QACSC,KAAK,EAAEH,SAAS;QAAA,IAAAV,SAAA;UAAA,QAAAc,MAAA,OACpBA,MAAA,SAAAf,KAAK,CAACY,OAAO,OACTF,KAAK,GAAGJ,KAAK,SAChBN,KAAK,CAACgB,MAAM,GAAE,GAAG,EAAAD,MAAA,OAClBf,KAAK,CAACiB,KAAK,IAAI,MAAM,GACrBR,KAAK;QAAA;MAAA;IAGZ;EAAC;AAGP","ignoreList":[]}
1
+ {"version":3,"names":[],"sources":["../../../src/components/List.tsx"],"sourcesContent":["import { childrenArray, For } from \"@alloy-js/core\";\nimport type { Children } from \"@alloy-js/core/jsx-runtime\";\nimport { memo } from \"@alloy-js/core/jsx-runtime\";\n\nexport interface CommonListProps {\n children: Children;\n tasks?: boolean;\n}\n\nexport interface OrderedListProps extends CommonListProps {\n ordered: true;\n start?: number;\n}\n\nexport interface UnorderedListProps extends CommonListProps {\n ordered?: false | undefined;\n bullet?: \"*\" | \"-\" | \"+\";\n}\n\nexport type ListProps = OrderedListProps | UnorderedListProps;\n\nexport function List(props: ListProps) {\n const children = memo(() => {\n return childrenArray(() => props.children, {\n preserveFragments: true,\n }).filter((c) => Boolean(c));\n });\n\n const start = (props as OrderedListProps).start ?? 1;\n\n return (\n <For each={children}>\n {(child, index) => {\n // sure would be great to align based on the number of digits for\n // ordered lists, but GitHub has issues parsing them sometimes. This is\n // much more reliable.\n const alignSize = props.ordered ? 3 : 2;\n\n return (\n <align width={alignSize}>\n {props.ordered ? <>{index + start}.</> : props.bullet}{\" \"}\n {props.tasks && \"[ ] \"}\n {child}\n </align>\n );\n }}\n </For>\n );\n}\n"],"mappings":";AAAA,SAAS,aAAa,EAAE,GAAG,QAAQ,gBAAgB;AAEnD,SAAS,IAAI,QAAQ,4BAA4B;AAmBjD,OAAO,SAAS,IAAI,CAAC,KAAgB,EAAE;EACrC,MAAM,QAAQ,GAAG,IAAI,CAAC,MAAM;IAC1B,OAAO,aAAa,CAAC,MAAM,KAAK,CAAC,QAAQ,EAAE;MACzC,iBAAiB,EAAE;IACrB,CAAC,CAAC,CAAC,MAAM,CAAE,CAAC,IAAK,OAAO,CAAC,CAAC,CAAC,CAAC;EAC9B,CAAC,CAAC;EAEF,MAAM,KAAK,GAAI,KAAK,CAAsB,KAAK,IAAI,CAAC;EAEpD,yBACG,GAAG;IAAC,IAAI,EAAE,QAAQ;IAAA,UAChB,CAAC,KAAK,EAAE,KAAK,KAAK;MACjB;MACA;MACA;MACA,MAAM,SAAS,GAAG,KAAK,CAAC,OAAO,GAAG,CAAC,GAAG,CAAC;MAEvC;QACS,KAAK,EAAE,SAAS;QAAA;UAAA,qBACpB,oBAAK,CAAC,OAAO,OAAM,KAAK,GAAG,KAAK,SAAQ,KAAK,CAAC,MAAM,GAAE,GAAG,eACzD,KAAK,CAAC,KAAK,IAAI,MAAM,GACrB,KAAK;QAAA;MAAA;IAGZ;EAAC;AAGP","ignoreList":[]}
@@ -1,4 +1,4 @@
1
- import { Children } from "@alloy-js/core/jsx-runtime";
1
+ import type { Children } from "@alloy-js/core/jsx-runtime";
2
2
  export interface SectionProps {
3
3
  heading?: Children;
4
4
  children: Children;