@metaobjectsdev/docs-site 0.15.8-rc.1

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 (104) hide show
  1. package/LICENSE +189 -0
  2. package/README.md +62 -0
  3. package/assets/site.css +13 -0
  4. package/assets/site.js +25 -0
  5. package/dist/badges.d.ts +14 -0
  6. package/dist/badges.d.ts.map +1 -0
  7. package/dist/badges.js +21 -0
  8. package/dist/badges.js.map +1 -0
  9. package/dist/builders/extras.d.ts +23 -0
  10. package/dist/builders/extras.d.ts.map +1 -0
  11. package/dist/builders/extras.js +70 -0
  12. package/dist/builders/extras.js.map +1 -0
  13. package/dist/builders/index-data.d.ts +52 -0
  14. package/dist/builders/index-data.d.ts.map +1 -0
  15. package/dist/builders/index-data.js +115 -0
  16. package/dist/builders/index-data.js.map +1 -0
  17. package/dist/builders/object-data.d.ts +97 -0
  18. package/dist/builders/object-data.d.ts.map +1 -0
  19. package/dist/builders/object-data.js +336 -0
  20. package/dist/builders/object-data.js.map +1 -0
  21. package/dist/builders/output-data.d.ts +26 -0
  22. package/dist/builders/output-data.d.ts.map +1 -0
  23. package/dist/builders/output-data.js +35 -0
  24. package/dist/builders/output-data.js.map +1 -0
  25. package/dist/builders/package-data.d.ts +48 -0
  26. package/dist/builders/package-data.d.ts.map +1 -0
  27. package/dist/builders/package-data.js +142 -0
  28. package/dist/builders/package-data.js.map +1 -0
  29. package/dist/builders/prompt-data.d.ts +31 -0
  30. package/dist/builders/prompt-data.d.ts.map +1 -0
  31. package/dist/builders/prompt-data.js +68 -0
  32. package/dist/builders/prompt-data.js.map +1 -0
  33. package/dist/coverage.d.ts +19 -0
  34. package/dist/coverage.d.ts.map +1 -0
  35. package/dist/coverage.js +26 -0
  36. package/dist/coverage.js.map +1 -0
  37. package/dist/index.d.ts +4 -0
  38. package/dist/index.d.ts.map +1 -0
  39. package/dist/index.js +3 -0
  40. package/dist/index.js.map +1 -0
  41. package/dist/link-check.d.ts +2 -0
  42. package/dist/link-check.d.ts.map +1 -0
  43. package/dist/link-check.js +30 -0
  44. package/dist/link-check.js.map +1 -0
  45. package/dist/link-graph.d.ts +54 -0
  46. package/dist/link-graph.d.ts.map +1 -0
  47. package/dist/link-graph.js +198 -0
  48. package/dist/link-graph.js.map +1 -0
  49. package/dist/load.d.ts +11 -0
  50. package/dist/load.d.ts.map +1 -0
  51. package/dist/load.js +40 -0
  52. package/dist/load.js.map +1 -0
  53. package/dist/mermaid.d.ts +56 -0
  54. package/dist/mermaid.d.ts.map +1 -0
  55. package/dist/mermaid.js +136 -0
  56. package/dist/mermaid.js.map +1 -0
  57. package/dist/mustache-highlight.d.ts +10 -0
  58. package/dist/mustache-highlight.d.ts.map +1 -0
  59. package/dist/mustache-highlight.js +55 -0
  60. package/dist/mustache-highlight.js.map +1 -0
  61. package/dist/package-docs.d.ts +12 -0
  62. package/dist/package-docs.d.ts.map +1 -0
  63. package/dist/package-docs.js +34 -0
  64. package/dist/package-docs.js.map +1 -0
  65. package/dist/scaffold.d.ts +7 -0
  66. package/dist/scaffold.d.ts.map +1 -0
  67. package/dist/scaffold.js +24 -0
  68. package/dist/scaffold.js.map +1 -0
  69. package/dist/site.d.ts +23 -0
  70. package/dist/site.d.ts.map +1 -0
  71. package/dist/site.js +219 -0
  72. package/dist/site.js.map +1 -0
  73. package/dist/yaml-comments.d.ts +6 -0
  74. package/dist/yaml-comments.d.ts.map +1 -0
  75. package/dist/yaml-comments.js +49 -0
  76. package/dist/yaml-comments.js.map +1 -0
  77. package/package.json +45 -0
  78. package/src/badges.ts +26 -0
  79. package/src/builders/extras.ts +61 -0
  80. package/src/builders/index-data.ts +95 -0
  81. package/src/builders/object-data.ts +261 -0
  82. package/src/builders/output-data.ts +35 -0
  83. package/src/builders/package-data.ts +134 -0
  84. package/src/builders/prompt-data.ts +61 -0
  85. package/src/coverage.ts +29 -0
  86. package/src/index.ts +3 -0
  87. package/src/link-check.ts +24 -0
  88. package/src/link-graph.ts +204 -0
  89. package/src/load.ts +47 -0
  90. package/src/mermaid.ts +142 -0
  91. package/src/mustache-highlight.ts +43 -0
  92. package/src/package-docs.ts +33 -0
  93. package/src/scaffold.ts +26 -0
  94. package/src/site.ts +289 -0
  95. package/src/yaml-comments.ts +33 -0
  96. package/templates/chrome-foot.mustache +17 -0
  97. package/templates/chrome-head.mustache +21 -0
  98. package/templates/coverage.html.mustache +24 -0
  99. package/templates/enums.html.mustache +14 -0
  100. package/templates/index.html.mustache +54 -0
  101. package/templates/object.html.mustache +46 -0
  102. package/templates/output.html.mustache +16 -0
  103. package/templates/package.html.mustache +43 -0
  104. package/templates/prompt.html.mustache +28 -0
package/LICENSE ADDED
@@ -0,0 +1,189 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship made available under
36
+ the License, as indicated by a copyright notice that is included in
37
+ or attached to the work (an example is provided in the Appendix below).
38
+
39
+ "Derivative Works" shall mean any work, whether in Source or Object
40
+ form, that is based on (or derived from) the Work and for which the
41
+ editorial revisions, annotations, elaborations, or other transformations
42
+ represent, as a whole, an original work of authorship. For the purposes
43
+ of this License, Derivative Works shall not include works that remain
44
+ separable from, or merely link (or bind by name) to the interfaces of,
45
+ the Work and Derivative Works thereof.
46
+
47
+ "Contribution" shall mean, as submitted to the Licensor for inclusion
48
+ in the Work by the copyright owner or by an individual or Legal Entity
49
+ authorized to submit on behalf of the copyright owner. For the purposes
50
+ of this definition, "submitted" means any form of electronic, verbal,
51
+ or written communication sent to the Licensor or its representatives,
52
+ including but not limited to communication on electronic mailing lists,
53
+ source code control systems, and issue tracking systems that are managed
54
+ by, or on behalf of, the Licensor for the purpose of recording and
55
+ discussing modifications to the Work, but excluding communication that
56
+ is conspicuously marked or designated in writing by the copyright owner
57
+ as "Not a Contribution."
58
+
59
+ "Contributor" shall mean Licensor and any Legal Entity on behalf of
60
+ whom a Contribution has been received by the Licensor and included
61
+ within the Work.
62
+
63
+ 2. Grant of Copyright License. Subject to the terms and conditions of
64
+ this License, each Contributor hereby grants to You a perpetual,
65
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
66
+ copyright license to reproduce, prepare Derivative Works of,
67
+ publicly display, publicly perform, sublicense, and distribute the
68
+ Work and such Derivative Works in Source or Object form.
69
+
70
+ 3. Grant of Patent License. Subject to the terms and conditions of
71
+ this License, each Contributor hereby grants to You a perpetual,
72
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
73
+ (except as stated in this section) patent license to make, have made,
74
+ use, offer to sell, sell, import, and otherwise transfer the Work,
75
+ where such license applies only to those patent claims licensable
76
+ by such Contributor that are necessarily infringed by their
77
+ Contribution(s) alone or by the combination of their Contribution(s)
78
+ with the Work to which such Contribution(s) was submitted. If You
79
+ institute patent litigation against any entity (including a cross-claim
80
+ or counterclaim in a lawsuit) alleging that the Work or any
81
+ Contribution embodied within the Work constitutes direct or contributory
82
+ patent infringement, then any patent licenses granted to You under
83
+ this License for that Work shall terminate as of the date such
84
+ litigation is filed.
85
+
86
+ 4. Redistribution. You may reproduce and distribute copies of the
87
+ Work or Derivative Works thereof in any medium, with or without
88
+ modifications, and in Source or Object form, provided that You
89
+ meet the following conditions:
90
+
91
+ (a) You must give any other recipients of the Work or Derivative
92
+ Works a copy of this License; and
93
+
94
+ (b) You must cause any modified files to carry prominent notices
95
+ stating that You changed the files; and
96
+
97
+ (c) You must retain, in the Source form of any Derivative Works
98
+ that You distribute, all copyright, patent, trademark, and
99
+ attribution notices from the Source form of the Work,
100
+ excluding those notices that do not pertain to any part of
101
+ the Derivative Works; and
102
+
103
+ (d) If the Work includes a "NOTICE" text file as part of its
104
+ distribution, You must include a readable copy of the
105
+ attribution notices contained within such NOTICE file, in
106
+ at least one of the following places: within a NOTICE text
107
+ file distributed as part of the Derivative Works; within
108
+ the Source form or documentation, if provided along with the
109
+ Derivative Works; or, within a display generated by the
110
+ Derivative Works, if and wherever such third-party notices
111
+ normally appear. The contents of the NOTICE file are for
112
+ informational purposes only and do not modify the License.
113
+ You may add Your own attribution notices within Derivative
114
+ Works that You distribute, alongside or in addition to the
115
+ NOTICE text from the Work, provided that such additional
116
+ attribution notices cannot be construed as modifying the License.
117
+
118
+ You may add Your own license statement for Your modifications and
119
+ may provide additional grant of rights to use, reproduce, modify,
120
+ prepare derivative works of, distribute, and sublicense such modifications,
121
+ as an additional requirement of this License.
122
+
123
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
124
+ any Contribution intentionally submitted for inclusion in the Work
125
+ by You to the Licensor shall be under the terms and conditions of
126
+ this License, without any additional terms or conditions.
127
+ Notwithstanding the above, nothing herein shall supersede or modify
128
+ the terms of any separate license agreement you may have executed
129
+ with Licensor regarding such Contributions.
130
+
131
+ 6. Trademarks. This License does not grant permission to use the trade
132
+ names, trademarks, service marks, or product names of the Licensor,
133
+ except as required for reasonable and customary use in describing the
134
+ origin of the Work and reproducing the content of the NOTICE file.
135
+
136
+ 7. Disclaimer of Warranty. Unless required by applicable law or
137
+ agreed to in writing, Licensor provides the Work (and each
138
+ Contributor provides its Contributions) on an "AS IS" BASIS,
139
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
140
+ implied, including, without limitation, any conditions of TITLE,
141
+ NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR
142
+ PURPOSE. You are solely responsible for determining the
143
+ appropriateness of using or reproducing the Work and assume any
144
+ risks associated with Your exercise of permissions under this License.
145
+
146
+ 8. Limitation of Liability. In no event and under no legal theory,
147
+ whether in tort (including negligence), contract, or otherwise,
148
+ unless required by applicable law (such as deliberate and grossly
149
+ negligent acts) or agreed to in writing, shall any Contributor be
150
+ liable to You for damages, including any direct, indirect, special,
151
+ incidental, or exemplary damages of any character arising as a
152
+ result of this License or out of the use or inability to use the
153
+ Work (including but not limited to damages for loss of goodwill,
154
+ work stoppage, computer failure or malfunction, or all other
155
+ commercial damages or losses), even if such Contributor has been
156
+ advised of the possibility of such damages.
157
+
158
+ 9. Accepting Warranty or Additional Liability. While redistributing
159
+ the Work or Derivative Works thereof, You may choose to offer,
160
+ and charge a fee for, acceptance of support, warranty, indemnity,
161
+ or other liability obligations and/or rights consistent with this
162
+ License. However, in accepting such obligations, You may offer
163
+ only obligations consistent to this License provided that the
164
+ obligations are consistent with this License.
165
+
166
+ END OF TERMS AND CONDITIONS
167
+
168
+ APPENDIX: How to apply the Apache License to your work.
169
+
170
+ To apply the Apache License to your work, attach the following
171
+ boilerplate notice, with the fields enclosed by brackets "[]"
172
+ replaced with your own identifying information. (Don't include
173
+ the brackets!) The text should be enclosed in the appropriate
174
+ comment syntax for the file format in question. Also add information
175
+ on how to contact you electronically and/or by mail.
176
+
177
+ Copyright 2026 MetaObjects Contributors
178
+
179
+ Licensed under the Apache License, Version 2.0 (the "License");
180
+ you may not use this file except in compliance with the License.
181
+ You may obtain a copy of the License at
182
+
183
+ http://www.apache.org/licenses/LICENSE-2.0
184
+
185
+ Unless required by applicable law or agreed to in writing, software
186
+ distributed under the License is distributed on an "AS IS" BASIS,
187
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
188
+ See the License for the specific language governing permissions and
189
+ limitations under the License.
package/README.md ADDED
@@ -0,0 +1,62 @@
1
+ # @metaobjectsdev/docs-site
2
+
3
+ HTML documentation-site generator for metaobjects models — a browsable multi-page
4
+ site (package nav, Cmd+K search, per-object / package / prompt / output pages, and
5
+ kind-aware ER diagrams that encode object kind by shape and domain by color).
6
+
7
+ It is the engine behind the `meta docs --site` CLI surface. Output is deterministic
8
+ and link-checked.
9
+
10
+ ## Usage (via the CLI)
11
+
12
+ ```
13
+ meta docs --site # writes the site to ./docs/site/
14
+ meta docs --site --out web # writes to web/site/
15
+ ```
16
+
17
+ `--site` is additive to the markdown doc surfaces: combined with `--model`/`--api` it
18
+ emits both; alone, it emits only the site.
19
+
20
+ ## Usage (as a library)
21
+
22
+ ```ts
23
+ import { generateSite } from "@metaobjectsdev/docs-site";
24
+
25
+ await generateSite({
26
+ sourceDirs: ["path/to/metaobjects"],
27
+ outDir: "docs/site",
28
+ title: "My Model",
29
+ stamp: "2026-07-04",
30
+ commit: "",
31
+ });
32
+ ```
33
+
34
+ `generateSite` throws if the generated site contains any dangling link.
35
+
36
+ ## Own your docs-site theme
37
+
38
+ The site ships with bundled templates + assets. To customize them, scaffold owned
39
+ copies into your repo:
40
+
41
+ ```
42
+ meta docs --scaffold-site
43
+ ```
44
+
45
+ This writes the 9 mustache templates to `codegen/docs-site/templates/` and the CSS/JS
46
+ to `codegen/docs-site/assets/` — only files that don't already exist, so your edits are
47
+ never clobbered. Edit them, then regenerate:
48
+
49
+ ```
50
+ meta docs --site
51
+ ```
52
+
53
+ `meta docs --site` auto-detects `codegen/docs-site/` and uses your owned copies; any
54
+ file you didn't override falls back to the bundled default. The engine
55
+ (`@metaobjectsdev/docs-site`) stays a versioned dependency — you own only the theme.
56
+
57
+ When calling `generateSite` directly, pass `templatesDir` / `assetsDir` to point at your
58
+ owned copies (a file of the same basename there wins over the bundled one).
59
+
60
+ ## License
61
+
62
+ Apache-2.0
@@ -0,0 +1,13 @@
1
+ .pl-mu { background:#0b1220; color:#cbd5e1; font-family:ui-monospace,monospace; font-size:.78rem; line-height:1.55; padding:1rem; border-radius:.5rem; overflow-x:auto; white-space:pre; }
2
+ .mu-sec { color:#f472b6; font-weight:600; } .mu-var { color:#7dd3fc; } .mu-raw { color:#fbbf24; }
3
+ .mu-par { color:#4ade80; } .mu-com { color:#64748b; font-style:italic; }
4
+ .mu-unresolved { text-decoration: underline dotted #ef4444; }
5
+ /* diagrams fit the container WIDTH (mermaid useMaxWidth), and the box scrolls if a diagram is tall.
6
+ Native scroll = mobile-friendly; caps runaway height so a diagram never dominates the page. */
7
+ .pl-diagram { max-height: min(72vh, 560px); overflow: auto; border-radius: .5rem; }
8
+ .pl-diagram pre.mermaid { margin: 0; }
9
+ .pl-diagram svg { width: 100%; height: auto; max-width: none; display: block; }
10
+ .pl-toc a { display:block; opacity:.6; border-left:2px solid transparent; padding-left:.5rem; }
11
+ .pl-toc a:hover, .pl-toc a.active { opacity:1; border-left-color:#60a5fa; }
12
+ section[id] { scroll-margin-top:1rem; }
13
+ @media print { .pl-sidebar, .pl-toc { display:none } }
package/assets/site.js ADDED
@@ -0,0 +1,25 @@
1
+ // mermaid: theme comes from each diagram's %%{init}%% prelude; useMaxWidth fits diagrams to the
2
+ // container width. The .pl-diagram box scrolls (native, mobile-friendly) if a diagram is tall.
3
+ mermaid.initialize({ startOnLoad: false, securityLevel: "loose", er: { useMaxWidth: true }, flowchart: { useMaxWidth: true } });
4
+ mermaid.run({ querySelector: ".mermaid" });
5
+ // scroll-spy TOC
6
+ const secs = [...document.querySelectorAll("section[id]")];
7
+ const tocLinks = new Map([...document.querySelectorAll(".pl-toc a")].map((a) => [a.getAttribute("href").replace(/^#/, ""), a]));
8
+ if (secs.length && tocLinks.size) {
9
+ const io = new IntersectionObserver((es) => es.forEach((e) => { const a = tocLinks.get(e.target.id); if (a) a.classList.toggle("active", e.isIntersecting); }), { rootMargin: "0px 0px -70% 0px" });
10
+ secs.forEach((s) => io.observe(s));
11
+ }
12
+ // Cmd+K search
13
+ const modal = document.getElementById("search-modal"), box = document.getElementById("search"), results = document.getElementById("search-results");
14
+ const openBtn = document.getElementById("search-open");
15
+ const open = () => { modal?.showModal(); box.value = ""; results.innerHTML = ""; box.focus(); };
16
+ openBtn?.addEventListener("click", open);
17
+ document.addEventListener("keydown", (e) => { if ((e.key === "k" && (e.metaKey || e.ctrlKey)) || (e.key === "/" && document.activeElement !== box)) { e.preventDefault(); open(); } });
18
+ let INDEX = null;
19
+ box?.addEventListener("input", async () => {
20
+ INDEX ??= await (await fetch(window.__REL_ROOT__ + "assets/search-index.json")).json();
21
+ const q = box.value.trim().toLowerCase();
22
+ if (!q) { results.innerHTML = ""; return; }
23
+ const scored = INDEX.map((e) => { const t = e.t.toLowerCase(); const i = t.indexOf(q); return i < 0 ? null : { e, s: (i === 0 ? 0 : 1) + t.length / 500 }; }).filter(Boolean).sort((a, b) => a.s - b.s).slice(0, 40);
24
+ results.innerHTML = scored.map(({ e }) => `<a class="btn btn-ghost btn-sm justify-start font-mono font-normal" href="${window.__REL_ROOT__}${e.h}">${e.t} <span class="opacity-40 ml-auto">${e.k}</span></a>`).join("");
25
+ });
@@ -0,0 +1,14 @@
1
+ export declare const esc: (s: unknown) => string;
2
+ export interface Badge {
3
+ text: string;
4
+ cls: string;
5
+ href?: string;
6
+ title?: string;
7
+ }
8
+ export declare function badge(b: Badge): string;
9
+ export declare const LEGEND: {
10
+ label: string;
11
+ cls: string;
12
+ }[];
13
+ export declare function legendHtml(): string;
14
+ //# sourceMappingURL=badges.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"badges.d.ts","sourceRoot":"","sources":["../src/badges.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,GAAG,GAAI,GAAG,OAAO,WACwE,CAAC;AAEvG,MAAM,WAAW,KAAK;IAAG,IAAI,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAC;CAAE;AAEpF,wBAAgB,KAAK,CAAC,CAAC,EAAE,KAAK,GAAG,MAAM,CAMtC;AAED,eAAO,MAAM,MAAM,EAAE;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,EAQlD,CAAC;AAEF,wBAAgB,UAAU,IAAI,MAAM,CAEnC"}
package/dist/badges.js ADDED
@@ -0,0 +1,21 @@
1
+ export const esc = (s) => String(s).replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;");
2
+ export function badge(b) {
3
+ const cls = `badge ${b.cls} badge-xs`;
4
+ const title = b.title ? ` title="${esc(b.title)}"` : "";
5
+ return b.href
6
+ ? `<a href="${esc(b.href)}" class="${cls}"${title}>${esc(b.text)}</a>`
7
+ : `<span class="${cls}"${title}>${esc(b.text)}</span>`;
8
+ }
9
+ export const LEGEND = [
10
+ { label: "reference (fk)", cls: "badge-soft badge-info" },
11
+ { label: "contains (nested)", cls: "badge-soft badge-secondary" },
12
+ { label: "indexed / pk", cls: "badge-soft badge-success" },
13
+ { label: "required", cls: "badge-soft badge-error" },
14
+ { label: "deprecated", cls: "badge-soft badge-warning" },
15
+ { label: "enum", cls: "badge-soft badge-accent" },
16
+ { label: "optional", cls: "badge-soft badge-neutral" },
17
+ ];
18
+ export function legendHtml() {
19
+ return LEGEND.map((l) => `<span class="badge ${l.cls} badge-xs">${esc(l.label)}</span>`).join(" ");
20
+ }
21
+ //# sourceMappingURL=badges.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"badges.js","sourceRoot":"","sources":["../src/badges.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,GAAG,GAAG,CAAC,CAAU,EAAE,EAAE,CAChC,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,OAAO,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,sBAAsB,CAAC,CAAC,GAAG,cAAc,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AACrG,CAAC"}
@@ -0,0 +1,23 @@
1
+ import { LinkGraph } from "../link-graph";
2
+ export interface EnumRow {
3
+ owner: string;
4
+ ownerHref: string;
5
+ field: string;
6
+ values: string[];
7
+ deflt: string;
8
+ }
9
+ export declare function buildEnumsPage(g: LinkGraph): EnumRow[];
10
+ export interface Anomaly {
11
+ kind: string;
12
+ subject: string;
13
+ href: string;
14
+ detail: string;
15
+ }
16
+ export declare function findAnomalies(g: LinkGraph, sourceDirs: string[]): Anomaly[];
17
+ export interface SearchEntry {
18
+ t: string;
19
+ h: string;
20
+ k: "object" | "prompt" | "output" | "field";
21
+ }
22
+ export declare function buildSearchIndex(g: LinkGraph): SearchEntry[];
23
+ //# sourceMappingURL=extras.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"extras.d.ts","sourceRoot":"","sources":["../../src/builders/extras.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAS,MAAM,eAAe,CAAC;AAEjD,MAAM,WAAW,OAAO;IAAG,KAAK,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,EAAE,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;CAAE;AAC9G,wBAAgB,cAAc,CAAC,CAAC,EAAE,SAAS,GAAG,OAAO,EAAE,CAStD;AAED,MAAM,WAAW,OAAO;IAAG,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;CAAE;AACzF,wBAAgB,aAAa,CAAC,CAAC,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,EAAE,GAAG,OAAO,EAAE,CAiC3E;AAED,MAAM,WAAW,WAAW;IAAG,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,QAAQ,GAAG,QAAQ,GAAG,QAAQ,GAAG,OAAO,CAAC;CAAE;AACnG,wBAAgB,gBAAgB,CAAC,CAAC,EAAE,SAAS,GAAG,WAAW,EAAE,CAO5D"}
@@ -0,0 +1,70 @@
1
+ import { existsSync } from "node:fs";
2
+ import { join } from "node:path";
3
+ import { LinkGraph, fqnOf } from "../link-graph";
4
+ export function buildEnumsPage(g) {
5
+ const rows = [];
6
+ for (const o of g.nodes().filter((n) => n.kind === "object")) {
7
+ for (const f of o.node.childrenOfType("field")) {
8
+ const values = f.attr("values");
9
+ if (Array.isArray(values))
10
+ rows.push({ owner: o.name, ownerHref: o.href, field: f.name, values: values.map(String), deflt: String(f.attr("default") ?? "") });
11
+ }
12
+ }
13
+ return rows.sort((a, b) => (a.owner + a.field).localeCompare(b.owner + b.field));
14
+ }
15
+ export function findAnomalies(g, sourceDirs) {
16
+ const out = [];
17
+ const objs = g.nodes().filter((n) => n.kind === "object");
18
+ for (const o of objs) {
19
+ const fqn = fqnOf(o.node);
20
+ if (!o.node.isAbstract && g.degree(fqn) === 0)
21
+ out.push({ kind: "orphan", subject: o.name, href: o.href, detail: "no inbound or outbound references" });
22
+ if (o.node.isAbstract && g.extendedBy(fqn).length === 0)
23
+ out.push({ kind: "unextended-abstract", subject: o.name, href: o.href, detail: "abstract with no descendants" });
24
+ const fkFields = new Set();
25
+ for (const i of o.node.childrenOfType("identity").filter((i) => i.subType === "reference")) {
26
+ const fv = i.attr("fields");
27
+ const names = Array.isArray(fv) ? fv.map(String) : [String(fv ?? "")];
28
+ for (const n of names)
29
+ fkFields.add(n);
30
+ }
31
+ for (const f of o.node.childrenOfType("field")) {
32
+ if (/(^|[a-z])Id$/.test(f.name) && (f.subType === "string" || f.subType === "uuid") && f.attr("objectRef") === undefined && !fkFields.has(f.name) && !o.node.isAbstract)
33
+ out.push({ kind: "implied-ref", subject: `${o.name}.${f.name}`, href: `${o.href}#f-${f.name}`, detail: "looks like a reference but declares none" });
34
+ }
35
+ }
36
+ // unreachable payload VOs: object.value not reached from any template payload tree
37
+ const reachable = new Set();
38
+ for (const t of g.nodes().filter((n) => n.kind !== "object")) {
39
+ const q = g.refsFrom(fqnOf(t.node)).filter((r) => r.kind === "payload").map((r) => r.to);
40
+ while (q.length) {
41
+ const cur = q.shift();
42
+ if (reachable.has(cur))
43
+ continue;
44
+ reachable.add(cur);
45
+ for (const r of g.refsFrom(cur))
46
+ if (r.kind === "field")
47
+ q.push(r.to);
48
+ }
49
+ }
50
+ for (const o of objs.filter((o) => o.node.subType === "value" && g.nodes().some((t) => t.kind !== "object" && t.pkg === o.pkg)))
51
+ if (!reachable.has(fqnOf(o.node)) && g.degree(fqnOf(o.node)) === 0)
52
+ out.push({ kind: "unreachable-vo", subject: o.name, href: o.href, detail: "value object not reachable from any template payload" });
53
+ for (const t of g.nodes().filter((n) => n.kind !== "object")) {
54
+ const ref = String(t.node.attr("textRef") ?? "");
55
+ if (ref && !sourceDirs.some((d) => existsSync(join(d, ...ref.split("/")) + ".mustache")))
56
+ out.push({ kind: "unresolved-textref", subject: t.name, href: t.href, detail: `@textRef ${ref} does not resolve (forward-pointing)` });
57
+ }
58
+ return out.sort((a, b) => (a.kind + a.subject).localeCompare(b.kind + b.subject));
59
+ }
60
+ export function buildSearchIndex(g) {
61
+ const out = [];
62
+ for (const n of g.nodes()) {
63
+ out.push({ t: `${n.pkg}::${n.name}`, h: n.href, k: n.kind });
64
+ if (n.kind === "object")
65
+ for (const f of n.node.childrenOfType("field"))
66
+ out.push({ t: `${n.name}.${f.name}`, h: `${n.href}#f-${f.name}`, k: "field" });
67
+ }
68
+ return out.sort((a, b) => a.t.localeCompare(b.t));
69
+ }
70
+ //# sourceMappingURL=extras.js.map
@@ -0,0 +1 @@
1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cAAc,CAAC,OAAO,CAAC;gBAAE,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,GAAG,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,EAAE,GAAG,CAAC,CAAC,IAAI,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,EAAE,OAAO,EAAE,CAAC,CAAC;IAC1J,CAAC;IACD,OAAO,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AACpD,CAAC"}
@@ -0,0 +1,52 @@
1
+ import { LinkGraph } from "../link-graph";
2
+ import type { CoverageTracker } from "../coverage";
3
+ export interface PkgCard {
4
+ pkg: string;
5
+ href: string;
6
+ objectCount: number;
7
+ promptCount: number;
8
+ contractCount: number;
9
+ purpose: string;
10
+ }
11
+ export interface CoreConfig {
12
+ pin?: string[];
13
+ exclude?: string[];
14
+ n?: number;
15
+ }
16
+ export interface IndexPageData {
17
+ title: string;
18
+ stamp: string;
19
+ commit: string;
20
+ stats: {
21
+ objects: number;
22
+ tables: number;
23
+ packages: number;
24
+ promptVos: number;
25
+ prompts: number;
26
+ contracts: number;
27
+ enums: number;
28
+ };
29
+ coreMermaid: string;
30
+ coreCaption: string;
31
+ coreLegend: {
32
+ pkg: string;
33
+ fill: string;
34
+ stroke: string;
35
+ }[];
36
+ packageMermaid: string;
37
+ fullEdges: {
38
+ from: string;
39
+ to: string;
40
+ n: number;
41
+ }[];
42
+ dataPackages: PkgCard[];
43
+ promptPackages: PkgCard[];
44
+ }
45
+ export declare function buildIndexPage(g: LinkGraph, cov: CoverageTracker, opts: {
46
+ title: string;
47
+ stamp: string;
48
+ commit: string;
49
+ core?: CoreConfig | undefined;
50
+ sourceDirs?: string[] | undefined;
51
+ }): IndexPageData;
52
+ //# sourceMappingURL=index-data.d.ts.map
@@ -0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KAAE,EAAE,CAAC;IAAC,YAAY,EAAE,OAAO,EAAE,CAAC;IAAC,cAAc,EAAE,OAAO,EAAE,CAAC;CAAE;AAE7b,wBAAgB,cAAc,CAAC,CAAC,EAAE,SAAS,EAAE,GAAG,EAAE,eAAe,EAAE,IAAI,EAAE;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,UAAU,GAAG,SAAS,CAAC;IAAC,UAAU,CAAC,EAAE,MAAM,EAAE,GAAG,SAAS,CAAA;CAAE,GAAG,aAAa,CAoF1M"}
@@ -0,0 +1,115 @@
1
+ import { LinkGraph, fqnOf } from "../link-graph";
2
+ import { flowchartDomain, packageFlowchart } from "../mermaid";
3
+ import { harvestPackageDocs } from "../package-docs";
4
+ import { esc } from "../badges";
5
+ export function buildIndexPage(g, cov, opts) {
6
+ const objs = g.nodes().filter((n) => n.kind === "object");
7
+ const tpls = g.nodes().filter((n) => n.kind !== "object");
8
+ const pkgs = [...new Set(g.nodes().map((n) => n.pkg))].sort();
9
+ const promptPkgSet = new Set(tpls.map((t) => t.pkg));
10
+ const shortPkg = (p) => p.split("::").pop();
11
+ // core map = a CONNECTED cluster of the most-connected objects of ALL kinds (entities, projections,
12
+ // value objects), traversing every edge type (fk, field.object, origin, extends, relationship).
13
+ // Seed by total degree, pull in the seeds' neighbors so nothing dangles, cap the total, drop isolates.
14
+ const CORE_MAX = opts.core?.n ?? 28;
15
+ const excluded = new Set(opts.core?.exclude ?? []);
16
+ const degOf = (fqn) => g.refsFrom(fqn).length + g.refsTo(fqn).length;
17
+ // seed a BALANCED mix so all object kinds appear (payload VOs otherwise dominate by degree):
18
+ // top entities (data-model backbone) + top value objects (payload structure) + projections (views).
19
+ const topByType = (st, k) => objs.filter((n) => !n.node.isAbstract && n.node.subType === st && !excluded.has(fqnOf(n.node)))
20
+ .map((dn) => ({ dn, fqn: fqnOf(dn.node), deg: degOf(fqnOf(dn.node)) }))
21
+ .sort((a, b) => b.deg - a.deg || a.dn.name.localeCompare(b.dn.name)).slice(0, k);
22
+ const seeds = [...topByType("entity", 8), ...topByType("value", 5), ...topByType("projection", 3)];
23
+ const shown = new Map();
24
+ // pinned objects are force-included (author override), never excluded.
25
+ for (const f of opts.core?.pin ?? []) {
26
+ if (excluded.has(f))
27
+ continue;
28
+ const dn = g.byFqn(f);
29
+ if (dn && dn.kind === "object")
30
+ shown.set(f, dn);
31
+ }
32
+ for (const s of seeds) {
33
+ if (shown.size >= CORE_MAX)
34
+ break;
35
+ if (!shown.has(s.fqn))
36
+ shown.set(s.fqn, s.dn);
37
+ }
38
+ // rank candidate neighbors by how many shown nodes touch them, add until the cap
39
+ const cand = new Map();
40
+ for (const f of shown.keys()) {
41
+ for (const e of g.refsFrom(f))
42
+ cand.set(e.to, (cand.get(e.to) ?? 0) + 1);
43
+ for (const e of g.refsTo(f))
44
+ cand.set(e.from, (cand.get(e.from) ?? 0) + 1);
45
+ }
46
+ for (const [f] of [...cand.entries()].filter(([f]) => !shown.has(f) && !excluded.has(f)).sort((a, b) => b[1] - a[1] || a[0].localeCompare(b[0]))) {
47
+ if (shown.size >= CORE_MAX)
48
+ break;
49
+ const dn = g.byFqn(f);
50
+ if (dn && dn.kind === "object")
51
+ shown.set(f, dn);
52
+ }
53
+ // edges among the shown set — collapse parallel edges between a pair to ONE unlabeled edge
54
+ // (a projection can join a source object on 6-12 fields; the overview only needs the connection).
55
+ const heroEdges = [];
56
+ const seenEdge = new Set();
57
+ for (const [f, dn] of shown)
58
+ for (const e of g.refsFrom(f))
59
+ if (shown.has(e.to)) {
60
+ const to = g.byFqn(e.to).name;
61
+ const key = `${dn.name}|${to}`;
62
+ if (!seenEdge.has(key)) {
63
+ seenEdge.add(key);
64
+ heroEdges.push({ from: dn.name, to, label: "", ...(e.cardinality === "many" ? { style: "dashed" } : {}) });
65
+ }
66
+ }
67
+ const connected = new Set(heroEdges.flatMap((e) => [e.from, e.to]));
68
+ const heroNodes = [...shown.values()].filter((dn) => connected.has(dn.name));
69
+ const hero = flowchartDomain(heroNodes.map((dn) => ({ name: dn.name, pkg: dn.pkg, kind: dn.node.subType })), heroEdges);
70
+ const coreMermaid = hero.mermaid, coreLegend = hero.legend;
71
+ const coreCaption = `${heroNodes.length} of the most-connected objects (entities, views, and payloads), colored by domain.`;
72
+ // package docs for purpose cards
73
+ const pdocs = harvestPackageDocs(opts.sourceDirs ?? []);
74
+ // package edges
75
+ const pkgEdges = new Map();
76
+ for (const o of objs)
77
+ for (const r of g.refsFrom(fqnOf(o.node))) {
78
+ if (r.kind === "extends")
79
+ continue;
80
+ const t = g.byFqn(r.to);
81
+ if (!t || t.pkg === o.pkg)
82
+ continue;
83
+ const k = `${shortPkg(o.pkg)}→${shortPkg(t.pkg)}`;
84
+ pkgEdges.set(k, (pkgEdges.get(k) ?? 0) + 1);
85
+ }
86
+ const fullEdges = [...pkgEdges.entries()].sort().map(([k, n]) => { const [from = "", to = ""] = k.split("→"); return { from, to, n }; });
87
+ const counts = new Map();
88
+ for (const o of objs)
89
+ counts.set(shortPkg(o.pkg), (counts.get(shortPkg(o.pkg)) ?? 0) + 1);
90
+ const card = (p) => {
91
+ const doc = pdocs.get(p);
92
+ const purpose = esc((doc?.title ? doc.title + " — " : "") + (doc?.description ?? "")).slice(0, 160);
93
+ return { pkg: p, href: `${p.split("::").join("/")}/index.html`,
94
+ objectCount: objs.filter((o) => o.pkg === p).length,
95
+ promptCount: tpls.filter((t) => t.pkg === p && t.kind === "prompt").length,
96
+ contractCount: tpls.filter((t) => t.pkg === p && t.kind === "output").length,
97
+ purpose };
98
+ };
99
+ const enums = objs.reduce((n, o) => n + o.node.childrenOfType("field").filter((f) => Array.isArray(f.attr("values"))).length, 0);
100
+ return { title: opts.title, stamp: opts.stamp, commit: opts.commit,
101
+ stats: { objects: objs.length,
102
+ tables: objs.filter((o) => o.node.childrenOfType("source").length > 0).length,
103
+ packages: pkgs.length,
104
+ promptVos: objs.filter((o) => promptPkgSet.has(o.pkg)).length,
105
+ prompts: tpls.filter((t) => t.kind === "prompt").length,
106
+ contracts: tpls.filter((t) => t.kind === "output").length, enums },
107
+ coreMermaid,
108
+ coreCaption,
109
+ coreLegend,
110
+ packageMermaid: packageFlowchart(fullEdges.filter((e) => e.n >= 2), counts),
111
+ fullEdges,
112
+ dataPackages: pkgs.filter((p) => !promptPkgSet.has(p)).map(card),
113
+ promptPackages: pkgs.filter((p) => promptPkgSet.has(p)).map(card) };
114
+ }
115
+ //# sourceMappingURL=index-data.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-data.js","sourceRoot":"","sources":["../../src/builders/index-data.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAEjD,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAC/D,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;AAMhC,MAAM,UAAU,cAAc,CAAC,CAAY,EAAE,GAAoB,EAAE,IAAwH;IACzL,MAAM,IAAI,GAAG,CAAC,CAAC,KAAK,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,QAAQ,CAAC,CAAC;IAC1D,MAAM,IAAI,GAAG,CAAC,CAAC,KAAK,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,QAAQ,CAAC,CAAC;IAC1D,MAAM,IAAI,GAAG,CAAC,GAAG,IAAI,GAAG,CAAC,CAAC,CAAC,KAAK,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;IAC9D,MAAM,YAAY,GAAG,IAAI,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