pagegraph 0.12.0 → 0.14.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 (160) hide show
  1. package/README.md +325 -66
  2. package/dist/anthropic-messages-TqKpKmfW.js +1067 -0
  3. package/dist/anthropic-messages-TqKpKmfW.js.map +1 -0
  4. package/dist/audit.d.ts +4 -2
  5. package/dist/audit.js +5 -5
  6. package/dist/audit.js.map +1 -1
  7. package/dist/azure-openai-responses-DJjBLwoI.js +231 -0
  8. package/dist/azure-openai-responses-DJjBLwoI.js.map +1 -0
  9. package/dist/build-only/audit.js +1 -1
  10. package/dist/build-only/claims.d.ts +1 -0
  11. package/dist/build-only/claims.js +6 -0
  12. package/dist/build-only/claims.js.map +1 -0
  13. package/dist/build-only/config.js +1 -1
  14. package/dist/build-only/oxlint.d.ts +1 -0
  15. package/dist/build-only/oxlint.js +6 -0
  16. package/dist/build-only/oxlint.js.map +1 -0
  17. package/dist/build-only/tanstack-start.js +1 -1
  18. package/dist/build-only/vite.js +1 -1
  19. package/dist/{checks-uZk5Em9A.js → checks-BS-aDXB_.js} +2 -2
  20. package/dist/checks-BS-aDXB_.js.map +1 -0
  21. package/dist/claims-Bch7Lxlo.d.ts +92 -0
  22. package/dist/claims-Bv7voeEV.js +431 -0
  23. package/dist/claims-Bv7voeEV.js.map +1 -0
  24. package/dist/claims.d.ts +94 -0
  25. package/dist/claims.js +2 -0
  26. package/dist/cli.js +17607 -43387
  27. package/dist/cli.js.map +1 -1
  28. package/dist/cloudflare-workers-ai-system-one-f3ZrvNYZ.js +41 -0
  29. package/dist/cloudflare-workers-ai-system-one-f3ZrvNYZ.js.map +1 -0
  30. package/dist/config.d.ts +9 -29
  31. package/dist/config.js +2 -2
  32. package/dist/config.js.map +1 -1
  33. package/dist/{content-kcEnQdfi.js → content-CHd0X4s6.js} +2 -2
  34. package/dist/{content-kcEnQdfi.js.map → content-CHd0X4s6.js.map} +1 -1
  35. package/dist/{content-B1cPtL8b.d.ts → content-DgNr7apS.d.ts} +4 -5
  36. package/dist/declare-D5o7hwmv.js.map +1 -1
  37. package/dist/diagnostics-Wt5faNDM.js +108 -0
  38. package/dist/diagnostics-Wt5faNDM.js.map +1 -0
  39. package/dist/dist-B6zg_Z3Z.js +4794 -0
  40. package/dist/dist-B6zg_Z3Z.js.map +1 -0
  41. package/dist/document-CztEu3Vd.d.ts +109 -0
  42. package/dist/document-Dvemcv7V.js +379 -0
  43. package/dist/document-Dvemcv7V.js.map +1 -0
  44. package/dist/env-api-keys-C-OA0yM-.js +124 -0
  45. package/dist/env-api-keys-C-OA0yM-.js.map +1 -0
  46. package/dist/error-body-CyiejW4b.js +103 -0
  47. package/dist/error-body-CyiejW4b.js.map +1 -0
  48. package/dist/facts-1OKclPOk.js +115 -0
  49. package/dist/facts-1OKclPOk.js.map +1 -0
  50. package/dist/github-copilot-headers-CEpMOpQF.js +24 -0
  51. package/dist/github-copilot-headers-CEpMOpQF.js.map +1 -0
  52. package/dist/google-generative-ai-BxABKIKO.js +330 -0
  53. package/dist/google-generative-ai-BxABKIKO.js.map +1 -0
  54. package/dist/google-shared-0gpM2jFi.js +19471 -0
  55. package/dist/google-shared-0gpM2jFi.js.map +1 -0
  56. package/dist/google-vertex-D8Eb5cbu.js +376 -0
  57. package/dist/google-vertex-D8Eb5cbu.js.map +1 -0
  58. package/dist/{declare-DVgdEdOL.d.ts → graph-D1PIndsC.d.ts} +117 -6
  59. package/dist/{graph-Bcsourlv.js → graph-DMNOLXLu.js} +23 -13
  60. package/dist/graph-DMNOLXLu.js.map +1 -0
  61. package/dist/hash-Dp7EzZUo.js +18 -0
  62. package/dist/hash-Dp7EzZUo.js.map +1 -0
  63. package/dist/headers-BRNMVpzu.js +19 -0
  64. package/dist/headers-BRNMVpzu.js.map +1 -0
  65. package/dist/index-C5w9ripz.d.ts +204 -0
  66. package/dist/index.d.ts +6 -160
  67. package/dist/index.js +37 -5
  68. package/dist/index.js.map +1 -1
  69. package/dist/inline-BbS93GAT.js +682 -0
  70. package/dist/inline-BbS93GAT.js.map +1 -0
  71. package/dist/json-parse-C10znB7l.js +383 -0
  72. package/dist/json-parse-C10znB7l.js.map +1 -0
  73. package/dist/llms-Dhr_5u2O.js +19 -0
  74. package/dist/llms-Dhr_5u2O.js.map +1 -0
  75. package/dist/markdown-C6dRE9zD.js +168 -0
  76. package/dist/markdown-C6dRE9zD.js.map +1 -0
  77. package/dist/markdown-path-lJB9BAVZ.js +6 -0
  78. package/dist/markdown-path-lJB9BAVZ.js.map +1 -0
  79. package/dist/{message-DT_CjUdt.js → message-CuBjgZ74.js} +2 -2
  80. package/dist/{message-DT_CjUdt.js.map → message-CuBjgZ74.js.map} +1 -1
  81. package/dist/mistral-conversations-CvaqBWjR.js +690 -0
  82. package/dist/mistral-conversations-CvaqBWjR.js.map +1 -0
  83. package/dist/models-DcT5qOEL.js +1203 -0
  84. package/dist/models-DcT5qOEL.js.map +1 -0
  85. package/dist/node-Ccvru9GE.js +26 -0
  86. package/dist/node-Ccvru9GE.js.map +1 -0
  87. package/dist/node-MEosBOF2.js +2403 -0
  88. package/dist/node-MEosBOF2.js.map +1 -0
  89. package/dist/openai-BCBEd2eO.js +17350 -0
  90. package/dist/openai-BCBEd2eO.js.map +1 -0
  91. package/dist/openai-codex-responses-vJqxeeRC.js +1268 -0
  92. package/dist/openai-codex-responses-vJqxeeRC.js.map +1 -0
  93. package/dist/openai-completions-Cb_fRAbI.js +989 -0
  94. package/dist/openai-completions-Cb_fRAbI.js.map +1 -0
  95. package/dist/openai-prompt-cache-Bc6qNWt0.js +10 -0
  96. package/dist/openai-prompt-cache-Bc6qNWt0.js.map +1 -0
  97. package/dist/openai-responses-sDuh82G5.js +268 -0
  98. package/dist/openai-responses-sDuh82G5.js.map +1 -0
  99. package/dist/openai-responses-shared-mhuo1Jov.js +599 -0
  100. package/dist/openai-responses-shared-mhuo1Jov.js.map +1 -0
  101. package/dist/openrouter-images-CRmBkzpX.js +127 -0
  102. package/dist/openrouter-images-CRmBkzpX.js.map +1 -0
  103. package/dist/oxlint.d.ts +58 -0
  104. package/dist/oxlint.js +202 -0
  105. package/dist/oxlint.js.map +1 -0
  106. package/dist/page-heads-BfjWQvau.d.ts +108 -0
  107. package/dist/{page-heads-6y-CARRQ.js → page-heads-BgbaIjj9.js} +3 -3
  108. package/dist/page-heads-BgbaIjj9.js.map +1 -0
  109. package/dist/pi-Bvw6J0gh.js +56795 -0
  110. package/dist/pi-Bvw6J0gh.js.map +1 -0
  111. package/dist/pi-messages-CejiVYvO.js +308 -0
  112. package/dist/pi-messages-CejiVYvO.js.map +1 -0
  113. package/dist/{projections-DeEFe7XT.d.ts → projections-Bk-qOOsR.d.ts} +2 -2
  114. package/dist/provider-env-t38GK5FF.js +39 -0
  115. package/dist/provider-env-t38GK5FF.js.map +1 -0
  116. package/dist/provider-retry-DzKoh1X7.js +80 -0
  117. package/dist/provider-retry-DzKoh1X7.js.map +1 -0
  118. package/dist/react.d.ts +3 -2
  119. package/dist/react.js +2 -1
  120. package/dist/react.js.map +1 -1
  121. package/dist/rolldown-runtime-B-lAHAz2.js +37 -0
  122. package/dist/sanitize-unicode-Ds14l9Om.js +28 -0
  123. package/dist/sanitize-unicode-Ds14l9Om.js.map +1 -0
  124. package/dist/sdk-C9_wiO6w.js +12503 -0
  125. package/dist/sdk-C9_wiO6w.js.map +1 -0
  126. package/dist/state-BuJP_3Lr.js +28102 -0
  127. package/dist/state-BuJP_3Lr.js.map +1 -0
  128. package/dist/system-one-shared-Dl10ZF7Z.js +167 -0
  129. package/dist/system-one-shared-Dl10ZF7Z.js.map +1 -0
  130. package/dist/tanstack-start/index.d.ts +29 -13
  131. package/dist/tanstack-start/index.js +391 -42
  132. package/dist/tanstack-start/index.js.map +1 -1
  133. package/dist/tanstack-start/markdown.d.ts +12 -0
  134. package/dist/tanstack-start/markdown.js +149 -0
  135. package/dist/tanstack-start/markdown.js.map +1 -0
  136. package/dist/tanstack-start/prerender-worker.d.ts +2 -0
  137. package/dist/tanstack-start/prerender-worker.js +7 -0
  138. package/dist/tanstack-start/prerender-worker.js.map +1 -0
  139. package/dist/tanstack-start/react.d.ts +7 -0
  140. package/dist/tanstack-start/react.js +12 -0
  141. package/dist/tanstack-start/react.js.map +1 -0
  142. package/dist/tanstack-start/server.d.ts +9 -3
  143. package/dist/tanstack-start/server.js +26 -2
  144. package/dist/tanstack-start/server.js.map +1 -1
  145. package/dist/transform-messages-BLJ8EfK6.js +468 -0
  146. package/dist/transform-messages-BLJ8EfK6.js.map +1 -0
  147. package/dist/typesafe-system-one-CwEWMV8P.js +25 -0
  148. package/dist/typesafe-system-one-CwEWMV8P.js.map +1 -0
  149. package/dist/{vite-graph-loader-01p1WxEq.js → vite-graph-loader-CsGiYNWE.js} +6 -5
  150. package/dist/vite-graph-loader-CsGiYNWE.js.map +1 -0
  151. package/dist/vite-graph-loader-DZCwejuJ.d.ts +133 -0
  152. package/package.json +47 -10
  153. package/dist/checks-uZk5Em9A.js.map +0 -1
  154. package/dist/graph-Bcsourlv.js.map +0 -1
  155. package/dist/graph-BxCY90vq.d.ts +0 -104
  156. package/dist/graph-CBIY71w6.d.ts +0 -57
  157. package/dist/page-heads-6y-CARRQ.js.map +0 -1
  158. package/dist/page-heads-DNkjMUEN.d.ts +0 -21
  159. package/dist/vite-graph-loader-01p1WxEq.js.map +0 -1
  160. package/dist/vite-graph-loader-Btgjz5RH.d.ts +0 -56
@@ -0,0 +1 @@
1
+ {"version":3,"file":"llms-Dhr_5u2O.js","names":[],"sources":["../src/markdown/llms.ts"],"sourcesContent":["import type { PageDocument } from \"./document\";\n\nexport interface LlmsPage {\n document: Pick<PageDocument, \"path\" | \"title\" | \"description\">;\n llms?: string;\n}\nexport function llmsSection(path: string): string {\n const segment = path.split(\"/\").find(Boolean);\n return segment === undefined\n ? \"Pages\"\n : segment.replaceAll(\"-\", \" \").replace(/\\b\\w/g, (letter) => letter.toUpperCase());\n}\nexport function llmsMarkdown(pages: ReadonlyArray<LlmsPage>, site: string): string {\n const groups = new Map<string, Array<LlmsPage>>();\n for (const page of [...pages].sort((a, b) => a.document.path.localeCompare(b.document.path))) {\n const group = page.llms ?? llmsSection(page.document.path);\n const entries = groups.get(group) ?? [];\n entries.push(page);\n groups.set(group, entries);\n }\n return [...groups]\n .sort(([a], [b]) => a.localeCompare(b))\n .map(\n ([group, entries]) =>\n `## ${group}\\n\\n${entries.map(({ document }) => `- [${document.title.replaceAll(\"]\", \"\\\\]\")}](${new URL(`${document.path === \"/\" ? \"/index\" : document.path}.md`, site).href}): ${document.description.replace(/\\s+/g, \" \")}`).join(\"\\n\")}\\n`,\n )\n .join(\"\\n\");\n}\n"],"mappings":";AAMA,SAAgB,YAAY,MAAsB;CAChD,MAAM,UAAU,KAAK,MAAM,GAAG,CAAC,CAAC,KAAK,OAAO;CAC5C,OAAO,YAAY,KAAA,IACf,UACA,QAAQ,WAAW,KAAK,GAAG,CAAC,CAAC,QAAQ,UAAU,WAAW,OAAO,YAAY,CAAC;AACpF;AACA,SAAgB,aAAa,OAAgC,MAAsB;CACjF,MAAM,yBAAS,IAAI,IAA6B;CAChD,KAAK,MAAM,QAAQ,CAAC,GAAG,KAAK,CAAC,CAAC,MAAM,GAAG,MAAM,EAAE,SAAS,KAAK,cAAc,EAAE,SAAS,IAAI,CAAC,GAAG;EAC5F,MAAM,QAAQ,KAAK,QAAQ,YAAY,KAAK,SAAS,IAAI;EACzD,MAAM,UAAU,OAAO,IAAI,KAAK,KAAK,CAAC;EACtC,QAAQ,KAAK,IAAI;EACjB,OAAO,IAAI,OAAO,OAAO;CAC3B;CACA,OAAO,CAAC,GAAG,MAAM,CAAC,CACf,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,cAAc,CAAC,CAAC,CAAC,CACtC,KACE,CAAC,OAAO,aACP,MAAM,MAAM,MAAM,QAAQ,KAAK,EAAE,eAAe,MAAM,SAAS,MAAM,WAAW,KAAK,KAAK,EAAE,IAAI,IAAI,IAAI,GAAG,SAAS,SAAS,MAAM,WAAW,SAAS,KAAK,MAAM,IAAI,CAAC,CAAC,KAAK,KAAK,SAAS,YAAY,QAAQ,QAAQ,GAAG,GAAG,CAAC,CAAC,KAAK,IAAI,EAAE,GAC9O,CAAC,CACA,KAAK,IAAI;AACd"}
@@ -0,0 +1,168 @@
1
+ import { n as inlineMarkdown } from "./inline-BbS93GAT.js";
2
+ //#region src/markdown/markdown.ts
3
+ const customKinds = /* @__PURE__ */ new Map();
4
+ const builtInKinds = /* @__PURE__ */ new Set([
5
+ "hero",
6
+ "prose",
7
+ "steps",
8
+ "cards",
9
+ "faq",
10
+ "table",
11
+ "code",
12
+ "cta",
13
+ "for-all",
14
+ "for-agents",
15
+ "for-humans"
16
+ ]);
17
+ /** A kind can be passed directly to Section; importing its definition registers its serializer. */
18
+ function defineSectionKind(definition) {
19
+ if (!definition.kind || builtInKinds.has(definition.kind)) throw new Error(`Cannot redefine document section kind "${definition.kind}"`);
20
+ customKinds.set(definition.kind, definition);
21
+ return definition;
22
+ }
23
+ const titleMarkdown = (value) => {
24
+ if (value === void 0) return "";
25
+ if (typeof value === "string") return value;
26
+ return value.audience === "humans" ? "" : inlineMarkdown(value.tree, { emphasis: false });
27
+ };
28
+ function linkedItemTitle(item, section, href) {
29
+ const labelTree = (tree) => tree.flatMap((node) => {
30
+ if (typeof node === "string" || "fact" in node) return [node];
31
+ if (node.tag === "a" && node.href !== href) throw new Error(`Linked item in section "${section.id}" at ${item.source} targets "${href}" but its title links to "${node.href}"`);
32
+ const children = labelTree(node.children);
33
+ return node.tag === "a" ? children : [{
34
+ ...node,
35
+ children
36
+ }];
37
+ });
38
+ const children = item.title === void 0 || item.title.audience === "humans" ? [] : labelTree(item.title.tree);
39
+ if (!inlineMarkdown(children, { emphasis: false }).trim()) throw new Error(`Linked item in section "${section.id}" at ${item.source} targeting "${href}" needs a visible title`);
40
+ return inlineMarkdown([{
41
+ tag: "a",
42
+ href,
43
+ children
44
+ }], { emphasis: false });
45
+ }
46
+ const markdown = {
47
+ text(value) {
48
+ if (value === void 0) return "";
49
+ if (typeof value === "string") return value;
50
+ return value.audience === "humans" ? "" : inlineMarkdown(value.tree);
51
+ },
52
+ heading(level, value) {
53
+ const text = titleMarkdown(value);
54
+ if (!Number.isInteger(level) || level < 1 || level > 6) throw new Error(`Invalid markdown heading level ${level}`);
55
+ return text ? `${"#".repeat(level)} ${text}\n\n` : "";
56
+ },
57
+ table(rows) {
58
+ if (rows.length === 0) return "";
59
+ const width = rows[0]?.length;
60
+ if (width === void 0 || width === 0 || rows.some((row) => row.length !== width)) throw new Error("Document table rows need equal, nonempty cells");
61
+ const lines = rows.map((row) => `| ${row.map((cell) => this.text(cell).replaceAll("|", "\\|").replaceAll("\n", "<br>")).join(" | ")} |`);
62
+ lines.splice(1, 0, `| ${Array.from({ length: width }, () => "---").join(" | ")} |`);
63
+ return `${lines.join("\n")}\n\n`;
64
+ }
65
+ };
66
+ const visibleBody = (body) => body.filter((entry) => (entry.type === "message" ? entry.message.audience : entry.audience) !== "humans");
67
+ const bodyMarkdown = (body) => visibleBody(body).map((entry) => entry.type === "message" ? markdown.text(entry.message) : entry.text).filter(Boolean).join("\n\n");
68
+ const paragraph = (text) => text ? `${text}\n\n` : "";
69
+ function publicSection(section) {
70
+ const { claimsMarkdown: _claimsMarkdown, title: _title, ...visibleSection } = section;
71
+ const publicMessage = (message) => message?.audience === "humans" ? void 0 : message;
72
+ const publicBody = (body) => body.filter((entry) => (entry.type === "message" ? entry.message.audience : entry.audience) !== "humans");
73
+ const title = publicMessage(section.title);
74
+ return {
75
+ ...visibleSection,
76
+ ...title === void 0 ? {} : { title },
77
+ body: publicBody(section.body),
78
+ items: section.items.filter((item) => item.audience !== "humans").map((item) => {
79
+ const { title: _itemTitle, ...publicItem } = item;
80
+ const itemTitle = publicMessage(item.title);
81
+ return {
82
+ ...publicItem,
83
+ ...itemTitle === void 0 ? {} : { title: itemTitle },
84
+ body: publicBody(item.body),
85
+ cells: item.cells.filter((cell) => cell.audience !== "humans")
86
+ };
87
+ })
88
+ };
89
+ }
90
+ function sectionMarkdown(section, options = {}) {
91
+ if (options.includeHumans) {
92
+ const message = (value) => ({
93
+ ...value,
94
+ audience: "all"
95
+ });
96
+ const body = (entries) => entries.map((entry) => entry.type === "message" ? {
97
+ ...entry,
98
+ message: message(entry.message)
99
+ } : {
100
+ ...entry,
101
+ audience: "all"
102
+ });
103
+ return sectionMarkdown({
104
+ ...section,
105
+ audience: "all",
106
+ ...section.title === void 0 ? {} : { title: message(section.title) },
107
+ body: body(section.body),
108
+ items: section.items.map((item) => ({
109
+ ...item,
110
+ audience: "all",
111
+ ...item.title === void 0 ? {} : { title: message(item.title) },
112
+ body: body(item.body),
113
+ cells: item.cells.map(message)
114
+ }))
115
+ });
116
+ }
117
+ if (section.audience === "humans") return "";
118
+ const custom = customKinds.get(section.kind);
119
+ if (custom !== void 0) return custom.markdown(publicSection(section), markdown);
120
+ const items = section.items.filter((item) => item.audience !== "humans");
121
+ const heading = markdown.heading(2, section.title);
122
+ const body = paragraph(bodyMarkdown(section.body));
123
+ switch (section.kind) {
124
+ case "hero": {
125
+ const entries = visibleBody(section.body);
126
+ const title = section.title ?? (entries[0]?.type === "message" ? entries[0].message : void 0);
127
+ if (title === void 0) throw new Error(`Hero "${section.id}" needs a document heading`);
128
+ return markdown.heading(1, title) + paragraph(bodyMarkdown(section.title === void 0 ? entries.slice(1) : entries));
129
+ }
130
+ case "prose":
131
+ case "cta":
132
+ case "for-all":
133
+ case "for-agents":
134
+ case "for-humans": return heading + body;
135
+ case "steps":
136
+ case "cards": return heading + body + paragraph(items.map((item, index) => {
137
+ const title = section.kind === "cards" && item.href !== void 0 ? linkedItemTitle(item, section, item.href) : titleMarkdown(item.title);
138
+ const label = title && section.kind === "cards" && item.href !== void 0 ? title : title ? `**${title}**` : "";
139
+ const prefix = section.kind === "steps" ? `${index + 1}.` : "-";
140
+ const content = bodyMarkdown(item.body).replaceAll("\n", "\n ");
141
+ return `${prefix} ${label ? `${label}${section.kind === "cards" && content ? ":" : ""} ` : ""}${content}`.trimEnd();
142
+ }).join("\n"));
143
+ case "faq": return heading + body + items.map((item) => markdown.heading(3, item.title) + paragraph(bodyMarkdown(item.body))).join("");
144
+ case "table": return heading + body + markdown.table(items.map((item) => item.cells.filter((cell) => cell.audience !== "humans")));
145
+ case "code": {
146
+ const code = visibleBody(section.body).map((entry) => entry.type === "message" ? entry.message.text : entry.text).join("\n");
147
+ const fence = "`".repeat(Math.max(2, ...(code.match(/`+/g) ?? []).map((run) => run.length)) + 1);
148
+ return heading + `${fence}${section.language ?? ""}\n${code}\n${fence}\n\n`;
149
+ }
150
+ default: throw new Error(`Unknown document section kind "${section.kind}"; use defineSectionKind`);
151
+ }
152
+ }
153
+ /** One public twin, in authored section order. Human-only messages never enter it. */
154
+ function documentMarkdown(document, site) {
155
+ const parts = document.sections.map((section) => sectionMarkdown(section));
156
+ const url = `URL: ${new URL(document.path, site).href}\n\n`;
157
+ const heroIndex = document.sections.findIndex((section) => section.kind === "hero" && section.audience !== "humans");
158
+ if (heroIndex === -1) return `${markdown.heading(1, document.title)}${url}${parts.join("")}`.trimEnd() + "\n";
159
+ const hero = parts[heroIndex];
160
+ if (hero === void 0) throw new Error(`Missing hero on ${document.path}`);
161
+ const end = hero.indexOf("\n\n");
162
+ parts[heroIndex] = hero.slice(0, end + 2) + url + hero.slice(end + 2);
163
+ return parts.join("").trimEnd() + "\n";
164
+ }
165
+ //#endregion
166
+ export { documentMarkdown as n, sectionMarkdown as r, defineSectionKind as t };
167
+
168
+ //# sourceMappingURL=markdown-C6dRE9zD.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"markdown-C6dRE9zD.js","names":[],"sources":["../src/markdown/markdown.ts"],"sourcesContent":["import type {\n BodyEntry,\n InlineNode,\n Message,\n PageDocument,\n SectionDocument,\n SectionItem,\n} from \"./document\";\nimport { inlineMarkdown } from \"./inline\";\n\nexport interface MarkdownWriter {\n text(value: Message | string | undefined): string;\n heading(level: number, value: Message | string | undefined): string;\n table(rows: ReadonlyArray<ReadonlyArray<Message | string>>): string;\n}\nexport interface SectionKind {\n readonly kind: string;\n readonly markdown: (section: SectionDocument, md: MarkdownWriter) => string;\n}\nconst customKinds = new Map<string, SectionKind>();\nconst builtInKinds = new Set([\n \"hero\",\n \"prose\",\n \"steps\",\n \"cards\",\n \"faq\",\n \"table\",\n \"code\",\n \"cta\",\n \"for-all\",\n \"for-agents\",\n \"for-humans\",\n]);\n\n/** A kind can be passed directly to Section; importing its definition registers its serializer. */\nexport function defineSectionKind<const K extends string>(\n definition: SectionKind & { kind: K },\n): SectionKind & { kind: K } {\n if (!definition.kind || builtInKinds.has(definition.kind))\n throw new Error(`Cannot redefine document section kind \"${definition.kind}\"`);\n customKinds.set(definition.kind, definition);\n return definition;\n}\n\nconst titleMarkdown = (value: Message | string | undefined): string => {\n if (value === undefined) return \"\";\n if (typeof value === \"string\") return value;\n return value.audience === \"humans\" ? \"\" : inlineMarkdown(value.tree, { emphasis: false });\n};\n\nfunction linkedItemTitle(item: SectionItem, section: SectionDocument, href: string): string {\n const labelTree = (tree: ReadonlyArray<InlineNode>): Array<InlineNode> =>\n tree.flatMap((node): Array<InlineNode> => {\n if (typeof node === \"string\" || \"fact\" in node) return [node];\n if (node.tag === \"a\" && node.href !== href)\n throw new Error(`Linked item in section \"${section.id}\" at ${item.source} targets \"${href}\" but its title links to \"${node.href}\"`);\n const children = labelTree(node.children);\n return node.tag === \"a\" ? children : [{ ...node, children }];\n });\n const children =\n item.title === undefined || item.title.audience === \"humans\" ? [] : labelTree(item.title.tree);\n if (!inlineMarkdown(children, { emphasis: false }).trim())\n throw new Error(`Linked item in section \"${section.id}\" at ${item.source} targeting \"${href}\" needs a visible title`);\n return inlineMarkdown([{ tag: \"a\", href, children }], { emphasis: false });\n}\n\nexport const markdown: MarkdownWriter = {\n text(value) {\n if (value === undefined) return \"\";\n if (typeof value === \"string\") return value;\n return value.audience === \"humans\" ? \"\" : inlineMarkdown(value.tree);\n },\n heading(level, value) {\n const text = titleMarkdown(value);\n if (!Number.isInteger(level) || level < 1 || level > 6)\n throw new Error(`Invalid markdown heading level ${level}`);\n return text ? `${\"#\".repeat(level)} ${text}\\n\\n` : \"\";\n },\n table(rows) {\n if (rows.length === 0) return \"\";\n const width = rows[0]?.length;\n if (width === undefined || width === 0 || rows.some((row) => row.length !== width))\n throw new Error(\"Document table rows need equal, nonempty cells\");\n const lines = rows.map(\n (row) =>\n `| ${row.map((cell) => this.text(cell).replaceAll(\"|\", \"\\\\|\").replaceAll(\"\\n\", \"<br>\")).join(\" | \")} |`,\n );\n lines.splice(1, 0, `| ${Array.from({ length: width }, () => \"---\").join(\" | \")} |`);\n return `${lines.join(\"\\n\")}\\n\\n`;\n },\n};\n\nconst visibleBody = (body: ReadonlyArray<BodyEntry>): ReadonlyArray<BodyEntry> =>\n body.filter(\n (entry) => (entry.type === \"message\" ? entry.message.audience : entry.audience) !== \"humans\",\n );\nconst bodyMarkdown = (body: ReadonlyArray<BodyEntry>): string =>\n visibleBody(body)\n .map((entry) => (entry.type === \"message\" ? markdown.text(entry.message) : entry.text))\n .filter(Boolean)\n .join(\"\\n\\n\");\nconst paragraph = (text: string): string => (text ? `${text}\\n\\n` : \"\");\n\nfunction publicSection(section: SectionDocument): SectionDocument {\n const { claimsMarkdown: _claimsMarkdown, title: _title, ...visibleSection } = section;\n const publicMessage = (message: Message | undefined): Message | undefined =>\n message?.audience === \"humans\" ? undefined : message;\n const publicBody = (body: ReadonlyArray<BodyEntry>): Array<BodyEntry> =>\n body.filter(\n (entry) => (entry.type === \"message\" ? entry.message.audience : entry.audience) !== \"humans\",\n );\n const title = publicMessage(section.title);\n return {\n ...visibleSection,\n ...(title === undefined ? {} : { title }),\n body: publicBody(section.body),\n items: section.items\n .filter((item) => item.audience !== \"humans\")\n .map((item) => {\n const { title: _itemTitle, ...publicItem } = item;\n const itemTitle = publicMessage(item.title);\n return {\n ...publicItem,\n ...(itemTitle === undefined ? {} : { title: itemTitle }),\n body: publicBody(item.body),\n cells: item.cells.filter((cell) => cell.audience !== \"humans\"),\n };\n }),\n };\n}\n\nexport function sectionMarkdown(\n section: SectionDocument,\n options: { includeHumans?: boolean } = {},\n): string {\n if (options.includeHumans) {\n const message = (value: Message): Message => ({ ...value, audience: \"all\" });\n const body = (entries: ReadonlyArray<BodyEntry>): ReadonlyArray<BodyEntry> =>\n entries.map((entry) =>\n entry.type === \"message\"\n ? { ...entry, message: message(entry.message) }\n : { ...entry, audience: \"all\" },\n );\n return sectionMarkdown({\n ...section,\n audience: \"all\",\n ...(section.title === undefined ? {} : { title: message(section.title) }),\n body: body(section.body),\n items: section.items.map((item) => ({\n ...item,\n audience: \"all\",\n ...(item.title === undefined ? {} : { title: message(item.title) }),\n body: body(item.body),\n cells: item.cells.map(message),\n })),\n });\n }\n if (section.audience === \"humans\") return \"\";\n const custom = customKinds.get(section.kind);\n if (custom !== undefined) return custom.markdown(publicSection(section), markdown);\n const items = section.items.filter((item) => item.audience !== \"humans\");\n const heading = markdown.heading(2, section.title);\n const body = paragraph(bodyMarkdown(section.body));\n switch (section.kind) {\n case \"hero\": {\n const entries = visibleBody(section.body);\n const title =\n section.title ?? (entries[0]?.type === \"message\" ? entries[0].message : undefined);\n if (title === undefined)\n throw new Error(`Hero \"${section.id}\" needs a document heading`);\n return (\n markdown.heading(1, title) +\n paragraph(bodyMarkdown(section.title === undefined ? entries.slice(1) : entries))\n );\n }\n case \"prose\":\n case \"cta\":\n case \"for-all\":\n case \"for-agents\":\n case \"for-humans\":\n return heading + body;\n case \"steps\":\n case \"cards\":\n return (\n heading +\n body +\n paragraph(\n items\n .map((item, index) => {\n const title =\n section.kind === \"cards\" && item.href !== undefined\n ? linkedItemTitle(item, section, item.href)\n : titleMarkdown(item.title);\n const label =\n title && section.kind === \"cards\" && item.href !== undefined\n ? title\n : title\n ? `**${title}**`\n : \"\";\n const prefix = section.kind === \"steps\" ? `${index + 1}.` : \"-\";\n const content = bodyMarkdown(item.body).replaceAll(\"\\n\", \"\\n \");\n return `${prefix} ${label ? `${label}${section.kind === \"cards\" && content ? \":\" : \"\"} ` : \"\"}${content}`.trimEnd();\n })\n .join(\"\\n\"),\n )\n );\n case \"faq\":\n return (\n heading +\n body +\n items\n .map((item) => markdown.heading(3, item.title) + paragraph(bodyMarkdown(item.body)))\n .join(\"\")\n );\n case \"table\":\n return (\n heading +\n body +\n markdown.table(items.map((item) => item.cells.filter((cell) => cell.audience !== \"humans\")))\n );\n case \"code\": {\n const code = visibleBody(section.body)\n .map((entry) => (entry.type === \"message\" ? entry.message.text : entry.text))\n .join(\"\\n\");\n const fence = \"`\".repeat(\n Math.max(2, ...(code.match(/`+/g) ?? []).map((run) => run.length)) + 1,\n );\n return heading + `${fence}${section.language ?? \"\"}\\n${code}\\n${fence}\\n\\n`;\n }\n default:\n throw new Error(`Unknown document section kind \"${section.kind}\"; use defineSectionKind`);\n }\n}\n\n/** One public twin, in authored section order. Human-only messages never enter it. */\nexport function documentMarkdown(document: PageDocument, site: string): string {\n const parts = document.sections.map((section) => sectionMarkdown(section));\n const url = `URL: ${new URL(document.path, site).href}\\n\\n`;\n const heroIndex = document.sections.findIndex(\n (section) => section.kind === \"hero\" && section.audience !== \"humans\",\n );\n if (heroIndex === -1)\n return `${markdown.heading(1, document.title)}${url}${parts.join(\"\")}`.trimEnd() + \"\\n\";\n const hero = parts[heroIndex];\n if (hero === undefined)\n throw new Error(`Missing hero on ${document.path}`);\n const end = hero.indexOf(\"\\n\\n\");\n parts[heroIndex] = hero.slice(0, end + 2) + url + hero.slice(end + 2);\n return parts.join(\"\").trimEnd() + \"\\n\";\n}\n"],"mappings":";;AAmBA,MAAM,8BAAc,IAAI,IAAyB;AACjD,MAAM,+BAAe,IAAI,IAAI;CAC3B;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF,CAAC;;AAGD,SAAgB,kBACd,YAC2B;CAC3B,IAAI,CAAC,WAAW,QAAQ,aAAa,IAAI,WAAW,IAAI,GACtD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,IAAI;CACrF,MAAM,OAAO,MAAM;CACnB,IAAI,SAAS,KAAA,GACX,MAAM,IAAI,MAAM,mBAAmB,SAAS,MAAM;CACpD,MAAM,MAAM,KAAK,QAAQ,MAAM;CAC/B,MAAM,aAAa,KAAK,MAAM,GAAG,MAAM,CAAC,IAAI,MAAM,KAAK,MAAM,MAAM,CAAC;CACpE,OAAO,MAAM,KAAK,EAAE,CAAC,CAAC,QAAQ,IAAI;AACpC"}
@@ -0,0 +1,6 @@
1
+ //#region src/tanstack-start/markdown-path.ts
2
+ const MARKDOWN_CAPTURE_PATH = "/__pagegraph/markdown.json";
3
+ //#endregion
4
+ export { MARKDOWN_CAPTURE_PATH as t };
5
+
6
+ //# sourceMappingURL=markdown-path-lJB9BAVZ.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"markdown-path-lJB9BAVZ.js","names":[],"sources":["../src/tanstack-start/markdown-path.ts"],"sourcesContent":["export const MARKDOWN_CAPTURE_PATH = \"/__pagegraph/markdown.json\";\n"],"mappings":";AAAA,MAAa,wBAAwB"}
@@ -5,8 +5,8 @@
5
5
  * parser, or drive Node I/O, so a runtime bundle that reaches one would fail at
6
6
  * request time with an unrelated crash. Throwing at import names the mistake.
7
7
  */
8
- const buildOnlyError = (entry) => /* @__PURE__ */ new Error(`"${entry}" is build-time only and cannot be imported from a Worker or browser bundle. Keep it in vite.config.ts, seo.config.ts, or other build/CLI modules, and import runtime helpers (renderSitemap, renderRobots, pageHeads, the graph types) from "pagegraph".`);
8
+ const buildOnlyError = (entry) => /* @__PURE__ */ new Error(`"${entry}" is build-time only and cannot be imported from a Worker or browser bundle. Keep it in vite.config.ts, pagegraph.config.ts, or other build/CLI modules, and import runtime helpers (renderSitemap, renderRobots, pageHeads, the graph types) from "pagegraph".`);
9
9
  //#endregion
10
10
  export { buildOnlyError as t };
11
11
 
12
- //# sourceMappingURL=message-DT_CjUdt.js.map
12
+ //# sourceMappingURL=message-CuBjgZ74.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"message-DT_CjUdt.js","names":[],"sources":["../src/build-only/message.ts"],"sourcesContent":["/**\n * Build-only entries resolve here under the `workerd`, `worker`, and `browser`\n * export conditions. They load the app through Vite, parse routes with a native\n * parser, or drive Node I/O, so a runtime bundle that reaches one would fail at\n * request time with an unrelated crash. Throwing at import names the mistake.\n */\nexport const buildOnlyError = (entry: string): Error =>\n new Error(\n `\"${entry}\" is build-time only and cannot be imported from a Worker or browser bundle. ` +\n `Keep it in vite.config.ts, seo.config.ts, or other build/CLI modules, and import runtime ` +\n `helpers (renderSitemap, renderRobots, pageHeads, the graph types) from \"pagegraph\".`,\n );\n"],"mappings":";;;;;;;AAMA,MAAa,kBAAkB,0BAC7B,IAAI,MACF,IAAI,MAAM,0PAGZ"}
1
+ {"version":3,"file":"message-CuBjgZ74.js","names":[],"sources":["../src/build-only/message.ts"],"sourcesContent":["/**\n * Build-only entries resolve here under the `workerd`, `worker`, and `browser`\n * export conditions. They load the app through Vite, parse routes with a native\n * parser, or drive Node I/O, so a runtime bundle that reaches one would fail at\n * request time with an unrelated crash. Throwing at import names the mistake.\n */\nexport const buildOnlyError = (entry: string): Error =>\n new Error(\n `\"${entry}\" is build-time only and cannot be imported from a Worker or browser bundle. ` +\n `Keep it in vite.config.ts, pagegraph.config.ts, or other build/CLI modules, and import runtime ` +\n `helpers (renderSitemap, renderRobots, pageHeads, the graph types) from \"pagegraph\".`,\n );\n"],"mappings":";;;;;;;AAMA,MAAa,kBAAkB,0BAC7B,IAAI,MACF,IAAI,MAAM,gQAGZ"}