@orkestrel/guide 0.0.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.
@@ -0,0 +1,1185 @@
1
+ import { createMarkdown, flattenText, isCodeBlockNode, isCodeSpanNode, isEmphasisNode, isHeadingNode, isLinkNode, isTableNode, walkNodes } from "@orkestrel/markdown";
2
+ import { arrayOf, arrayShape, createContract, isEmptyString, isNonEmptyArray, isNonEmptyString, isString, literalOf, literalShape, objectShape, recordOf, stringShape, unionOf, unionShape } from "@orkestrel/contract";
3
+ //#region src/core/constants.ts
4
+ /**
5
+ * The `## Surface` heading text a guide's documented exports section is keyed on.
6
+ */
7
+ var SURFACE = "Surface";
8
+ /**
9
+ * The `## Methods` heading text a guide's documented interface-methods section is keyed on.
10
+ */
11
+ var METHODS = "Methods";
12
+ /**
13
+ * The `## Tests` heading text a guide's documented test-link section is keyed on.
14
+ */
15
+ var TESTS = "Tests";
16
+ /**
17
+ * The `## By concept` heading text the manifest's run-map table is keyed on.
18
+ */
19
+ var MANIFEST = "By concept";
20
+ /**
21
+ * The link `href` schemes a guides-parity link check skips as external — a link
22
+ * with one of these prefixes (or a bare `#` anchor, handled separately in
23
+ * `isExternalLink`) is never resolved against the filesystem.
24
+ */
25
+ var EXTERNAL_SCHEMES = Object.freeze([
26
+ "http:",
27
+ "https:",
28
+ "mailto:",
29
+ "tel:"
30
+ ]);
31
+ //#endregion
32
+ //#region src/core/helpers.ts
33
+ /**
34
+ * A module scope normalized to its directory list — a single directory
35
+ * becomes a one-element list so every scanner walks the same shape.
36
+ *
37
+ * @param module - The module scope to normalize
38
+ * @returns The directory list `module` denotes
39
+ *
40
+ * @example
41
+ * ```ts
42
+ * moduleDirs('src/core') // ['src/core']
43
+ * moduleDirs(['src/core', 'src/browser']) // ['src/core', 'src/browser']
44
+ * ```
45
+ */
46
+ function moduleDirs(module) {
47
+ return typeof module === "string" ? [module] : module;
48
+ }
49
+ /**
50
+ * The file inventory's keys belonging to a {@link GuideModule} scope, sorted —
51
+ * a key belongs when it starts with one of the scope's directories, ends in
52
+ * `.ts`, and is neither that directory's `index.ts` nor a `.test.ts` file.
53
+ *
54
+ * @param files - The workspace file inventory, root-relative path → file text
55
+ * @param module - The module scope to filter to
56
+ * @returns The scope's file keys, root-relative and sorted
57
+ *
58
+ * @example
59
+ * ```ts
60
+ * moduleKeys({ 'src/core/Guide.ts': '', 'src/core/index.ts': '' }, 'src/core') // ['src/core/Guide.ts']
61
+ * ```
62
+ */
63
+ function moduleKeys(files, module) {
64
+ const dirs = moduleDirs(module);
65
+ const keys = [];
66
+ for (const key of Object.keys(files)) {
67
+ if (!key.endsWith(".ts")) continue;
68
+ if (key.endsWith(".test.ts")) continue;
69
+ const dir = dirs.find((candidate) => key.startsWith(`${candidate}/`));
70
+ if (dir === void 0) continue;
71
+ if (key === `${dir}/index.ts`) continue;
72
+ keys.push(key);
73
+ }
74
+ return keys.sort();
75
+ }
76
+ /**
77
+ * The bijection key for a surface symbol — its kind and name combined — so a
78
+ * symbol-set comparison diffs (name, kind) pairs rather than names alone.
79
+ *
80
+ * @param symbol - The symbol to key
81
+ * @returns The `${kind} ${name}` key
82
+ *
83
+ * @example
84
+ * ```ts
85
+ * symbolKey({ name: 'Markdown', kind: 'class' }) // 'class Markdown'
86
+ * ```
87
+ */
88
+ function symbolKey(symbol) {
89
+ return `${symbol.kind} ${symbol.name}`;
90
+ }
91
+ /**
92
+ * The names present in `names` but absent from `source` — the set-difference
93
+ * behind a both-directions bijection assertion.
94
+ *
95
+ * @param names - The candidate names
96
+ * @param source - The names to compare against
97
+ * @returns The names in `names` that are not in `source`
98
+ *
99
+ * @example
100
+ * ```ts
101
+ * findMissing(['a', 'b'], ['a']) // ['b']
102
+ * ```
103
+ */
104
+ function findMissing(names, source) {
105
+ const existing = new Set(source);
106
+ return names.filter((name) => !existing.has(name));
107
+ }
108
+ /**
109
+ * The symbol-key set-difference between two symbol lists — `symbols` present but
110
+ * absent from `source`, compared by {@link symbolKey} so a symbol can drift in
111
+ * neither name nor kind.
112
+ *
113
+ * @param symbols - The candidate symbols
114
+ * @param source - The symbols to compare against
115
+ * @returns The symbol keys in `symbols` that are not in `source`
116
+ *
117
+ * @example
118
+ * ```ts
119
+ * missingSymbols([{ name: 'X', kind: 'class' }], []) // ['class X']
120
+ * ```
121
+ */
122
+ function missingSymbols(symbols, source) {
123
+ return findMissing(symbols.map(symbolKey), source.map(symbolKey));
124
+ }
125
+ /**
126
+ * The names in `names` that have no example — a fence containing the name at a
127
+ * word boundary in `fences`, or a membership in `examples`, both count as
128
+ * "has an example"; presence-only, fence and JSDoc content are never checked.
129
+ *
130
+ * @param names - The candidate symbol/member names to check
131
+ * @param fences - The guide's ```ts Patterns fence bodies to search
132
+ * @param examples - The names already known to carry an `@example` JSDoc block
133
+ * @returns The names in `names` with no fence mention and no `@example`
134
+ *
135
+ * @example
136
+ * ```ts
137
+ * findUnexampled(['walk', 'fold'], ['walk()'], []) // ['fold']
138
+ * findUnexampled(['walk'], [], ['walk']) // []
139
+ * ```
140
+ */
141
+ function findUnexampled(names, fences, examples) {
142
+ const exampled = new Set(examples);
143
+ return names.filter((name) => {
144
+ if (exampled.has(name)) return false;
145
+ const boundary = new RegExp(`\\b${name}\\b`);
146
+ return !fences.some((fence) => boundary.test(fence));
147
+ });
148
+ }
149
+ /**
150
+ * Parse a fence's `import` statements into per-specifier imported identifier
151
+ * names — handles `import type`, mixed multiline braces, and `x as y` aliases
152
+ * (resolved to the local name `x`... the ORIGINAL exported name, since it is
153
+ * the export that must exist in `source.exports()`).
154
+ *
155
+ * @param fence - A ```ts Patterns fence's verbatim body text
156
+ * @returns One entry per `import ... from 'specifier'` statement, in fence order
157
+ *
158
+ * @example
159
+ * ```ts
160
+ * fenceImports("import { a, b as c } from 'x'\n") // [{ specifier: 'x', names: ['a', 'b'] }]
161
+ * ```
162
+ */
163
+ function fenceImports(fence) {
164
+ const results = [];
165
+ const pattern = /import\s+(?:type\s+)?\{([^}]*)\}\s*from\s*['"]([^'"]+)['"]/gs;
166
+ let match;
167
+ while ((match = pattern.exec(fence)) !== null) {
168
+ const body = match[1];
169
+ const specifier = match[2];
170
+ if (body === void 0 || specifier === void 0) continue;
171
+ const names = body.split(",").map((part) => part.trim()).filter((part) => part.length > 0).map((part) => part.replace(/^type\s+/, "")).map((part) => {
172
+ return part.match(/^(\w+)\s+as\s+\w+$/)?.[1] ?? part;
173
+ }).filter((part) => /^\w+$/.test(part));
174
+ results.push({
175
+ specifier,
176
+ names
177
+ });
178
+ }
179
+ return results;
180
+ }
181
+ /**
182
+ * Whether a link `href` should be skipped by the guides-parity link checks — an
183
+ * external scheme ({@link EXTERNAL_SCHEMES}) or a bare in-document `#` anchor.
184
+ *
185
+ * @param href - The link destination
186
+ * @returns `true` when the link should not be resolved against the filesystem
187
+ *
188
+ * @example
189
+ * ```ts
190
+ * isExternalLink('https://example.com') // true
191
+ * isExternalLink('../helpers.ts') // false
192
+ * ```
193
+ */
194
+ function isExternalLink(href) {
195
+ if (href.startsWith("#")) return true;
196
+ return EXTERNAL_SCHEMES.some((scheme) => href.startsWith(scheme));
197
+ }
198
+ /**
199
+ * Resolve a relative link `target` against `from` and normalize the result — `from`
200
+ * is treated as a file (its directory is everything before the last `/`) when it
201
+ * carries a `/`, or as a bare directory itself when it does not; `.` segments drop
202
+ * and `..` segments pop the preceding component, purely (no `node:path`).
203
+ *
204
+ * @param from - The declaring guide path (a file) or manifest base (a directory)
205
+ * @param target - The relative link destination to resolve
206
+ * @returns The normalized, workspace-root-relative path
207
+ *
208
+ * @example
209
+ * ```ts
210
+ * resolveLink('guides/src/markdown.md', '../../src/core/helpers.ts') // 'src/core/helpers.ts'
211
+ * resolveLink('guides', '../src/core') // 'src/core'
212
+ * ```
213
+ */
214
+ function resolveLink(from, target) {
215
+ const index = from.lastIndexOf("/");
216
+ const dir = index < 0 ? from : from.slice(0, index);
217
+ const combined = dir === "" ? target : `${dir}/${target}`;
218
+ const segments = [];
219
+ for (const segment of combined.split("/")) {
220
+ if (segment === "" || segment === ".") continue;
221
+ if (segment === "..") {
222
+ if (segments.length > 0) segments.pop();
223
+ else segments.push(segment);
224
+ continue;
225
+ }
226
+ segments.push(segment);
227
+ }
228
+ return segments.join("/");
229
+ }
230
+ /**
231
+ * The first code-span value found by descending an inline node list, following
232
+ * into `emphasis` / `link` children — the extraction rule behind a Surface or
233
+ * Methods table row's first-column identifier.
234
+ *
235
+ * @param nodes - The inline nodes to search
236
+ * @returns The first code span's literal text, or `undefined` when none is found
237
+ *
238
+ * @example
239
+ * ```ts
240
+ * firstCode([{ element: 'codeSpan', value: 'Markdown' }]) // 'Markdown'
241
+ * ```
242
+ */
243
+ function firstCode(nodes) {
244
+ for (const node of nodes) {
245
+ if (isCodeSpanNode(node)) return node.value;
246
+ if (isEmphasisNode(node) || isLinkNode(node)) {
247
+ const value = firstCode(node.children);
248
+ if (value !== void 0) return value;
249
+ }
250
+ }
251
+ }
252
+ /**
253
+ * The link hrefs found within one table cell's inline content.
254
+ *
255
+ * @param cell - The cell's inline nodes
256
+ * @returns The cell's link hrefs, in walk order
257
+ *
258
+ * @example
259
+ * ```ts
260
+ * cellLinks([{ element: 'link', href: 'x.ts', children: [] }]) // ['x.ts']
261
+ * ```
262
+ */
263
+ function cellLinks(cell) {
264
+ const links = [];
265
+ for (const node of walkNodes({
266
+ element: "paragraph",
267
+ children: cell
268
+ })) if (isLinkNode(node)) links.push(node.href);
269
+ return links;
270
+ }
271
+ /**
272
+ * The identifier prefix of a code-span text — everything before its first `<`,
273
+ * trimmed. Guide cells and headings may annotate a generic-parameterized name
274
+ * (`MarkdownHandler<TNode, T>`) for readability, but the bijection key is the
275
+ * bare identifier the source scanner captures, so both sides must normalize
276
+ * the same way.
277
+ *
278
+ * @param code - A code span's literal text
279
+ * @returns The identifier prefix, or an empty string when `code` is empty
280
+ *
281
+ * @example
282
+ * ```ts
283
+ * identifierOf('MarkdownHandler<TNode, T>') // 'MarkdownHandler'
284
+ * identifierOf('fold') // 'fold'
285
+ * ```
286
+ */
287
+ function identifierOf(code) {
288
+ const index = code.indexOf("<");
289
+ return (index < 0 ? code : code.slice(0, index)).trim();
290
+ }
291
+ /**
292
+ * The index of a table's `Kind` column, found by its header text so it survives
293
+ * column reordering. The match is exact and case-sensitive (`'Kind'`) — a table
294
+ * without that exact header contributes no symbols to the surface it feeds.
295
+ *
296
+ * @param table - The table to inspect
297
+ * @returns The `Kind` column's index, or `undefined` when the table has no `Kind` header
298
+ *
299
+ * @example
300
+ * ```ts
301
+ * kindIndex(table) // 1, or undefined
302
+ * ```
303
+ */
304
+ function kindIndex(table) {
305
+ for (let index = 0; index < table.header.length; index += 1) {
306
+ const cell = table.header[index];
307
+ if (cell !== void 0 && flattenText({
308
+ element: "paragraph",
309
+ children: cell
310
+ }).trim() === "Kind") return index;
311
+ }
312
+ }
313
+ //#endregion
314
+ //#region src/core/validators.ts
315
+ /**
316
+ * Whether `value` is one of the five documented {@link ExportKind} literals — the
317
+ * guard behind extracting a Surface table's `Kind` cell into a typed symbol.
318
+ *
319
+ * @param value - The candidate value
320
+ * @returns `true` when `value` is a valid {@link ExportKind}
321
+ *
322
+ * @example
323
+ * ```ts
324
+ * isExportKind('class') // true
325
+ * isExportKind('enum') // false
326
+ * ```
327
+ */
328
+ var isExportKind = literalOf("type", "interface", "const", "function", "class");
329
+ /**
330
+ * Whether `value` is a well-formed {@link SurfaceSymbol} — a `name` string
331
+ * paired with a valid {@link ExportKind}.
332
+ *
333
+ * @param value - The value to test
334
+ * @returns `true` when `value` is a well-formed {@link SurfaceSymbol}
335
+ *
336
+ * @example
337
+ * ```ts
338
+ * isSurfaceSymbol({ name: 'Markdown', kind: 'class' }) // true
339
+ * isSurfaceSymbol({ name: 'Markdown', kind: 'enum' }) // false
340
+ * ```
341
+ */
342
+ var isSurfaceSymbol = recordOf({
343
+ name: isString,
344
+ kind: isExportKind
345
+ });
346
+ /**
347
+ * Whether `value` is a well-formed {@link MethodGroup} — a backticked
348
+ * `interface` name paired with its documented `methods`.
349
+ *
350
+ * @param value - The value to test
351
+ * @returns `true` when `value` is a well-formed {@link MethodGroup}
352
+ *
353
+ * @example
354
+ * ```ts
355
+ * isMethodGroup({ interface: 'MarkdownInterface', methods: ['walk'] }) // true
356
+ * isMethodGroup({ interface: 'MarkdownInterface', methods: [1] }) // false
357
+ * ```
358
+ */
359
+ var isMethodGroup = recordOf({
360
+ interface: isString,
361
+ methods: arrayOf(isString)
362
+ });
363
+ /**
364
+ * Whether `value` is a well-formed {@link ManifestEntry} — a `## By concept`
365
+ * manifest row, its `source` accepting either a single directory or several.
366
+ *
367
+ * @param value - The value to test
368
+ * @returns `true` when `value` is a well-formed {@link ManifestEntry}
369
+ *
370
+ * @example
371
+ * ```ts
372
+ * isManifestEntry({ concept: 'Markdown', spec: 'guides/src/markdown.md', source: 'src/core', tests: 'tests/src/core' }) // true
373
+ * isManifestEntry({ concept: 1 }) // false
374
+ * ```
375
+ */
376
+ var isManifestEntry = recordOf({
377
+ concept: isString,
378
+ spec: isString,
379
+ source: unionOf(isString, arrayOf(isString)),
380
+ tests: isString
381
+ });
382
+ //#endregion
383
+ //#region src/core/parsers.ts
384
+ /**
385
+ * The module-scope exports declared in one file's source text — matches
386
+ * `export (async)? (function(\*)?|class|const|interface|type) Name`, deduped
387
+ * by (kind, name). A generator export (`export function* walk`) scans as kind
388
+ * `function` — its trailing `*` is stripped before the {@link ExportKind} check.
389
+ *
390
+ * @param source - The file's source text
391
+ * @returns The file's exported symbols, in file order
392
+ *
393
+ * @example
394
+ * ```ts
395
+ * exportsFrom('export class Markdown {}\n') // [{ name: 'Markdown', kind: 'class' }]
396
+ * exportsFrom('export function* walk() {}\n') // [{ name: 'walk', kind: 'function' }]
397
+ * ```
398
+ */
399
+ function exportsFrom(source) {
400
+ const symbols = [];
401
+ const seen = /* @__PURE__ */ new Set();
402
+ for (const line of source.split(/\r?\n/)) {
403
+ const match = line.match(/^export (?:async )?(function\*?|class|const|interface|type) (\w+)/);
404
+ const rawKind = match?.[1];
405
+ const name = match?.[2];
406
+ const kind = rawKind === void 0 ? void 0 : rawKind.replace(/\*$/, "");
407
+ if (!isNonEmptyString(kind) || !isNonEmptyString(name) || !isExportKind(kind)) continue;
408
+ const key = `${kind} ${name}`;
409
+ if (seen.has(key)) continue;
410
+ seen.add(key);
411
+ symbols.push({
412
+ name,
413
+ kind
414
+ });
415
+ }
416
+ return symbols;
417
+ }
418
+ /**
419
+ * The module-scope declarations LACKING the `export` keyword in one file's
420
+ * source text — the mirror image of {@link exportsFrom}'s grammar, anchored
421
+ * the same way (column 0, so an indented inner declaration never matches).
422
+ * Scans only the five {@link ExportKind} keywords (`function` / `class` /
423
+ * `const` / `interface` / `type`) — a module-scope `let` or `var` is a
424
+ * different violation class (AGENTS §1 bans `var`; a bare `let` is not a
425
+ * declaration kind this scanner's five-kind grammar covers) and is out of
426
+ * this check's contract.
427
+ *
428
+ * @param source - The file's source text
429
+ * @returns The file's hidden (non-exported) symbols, in file order
430
+ *
431
+ * @example
432
+ * ```ts
433
+ * hiddenFrom('function secretHelper() {}\n') // [{ name: 'secretHelper', kind: 'function' }]
434
+ * hiddenFrom('export class X {}\n') // []
435
+ * ```
436
+ */
437
+ function hiddenFrom(source) {
438
+ const symbols = [];
439
+ const seen = /* @__PURE__ */ new Set();
440
+ for (const line of source.split(/\r?\n/)) {
441
+ if (line.startsWith("export ")) continue;
442
+ const match = line.match(/^(?:async )?(function\*?|class|const|interface|type) (\w+)/);
443
+ const rawKind = match?.[1];
444
+ const name = match?.[2];
445
+ const kind = rawKind === void 0 ? void 0 : rawKind.replace(/\*$/, "");
446
+ if (!isNonEmptyString(kind) || !isNonEmptyString(name) || !isExportKind(kind)) continue;
447
+ const key = `${kind} ${name}`;
448
+ if (seen.has(key)) continue;
449
+ seen.add(key);
450
+ symbols.push({
451
+ name,
452
+ kind
453
+ });
454
+ }
455
+ return symbols;
456
+ }
457
+ /**
458
+ * Join the declaration head starting at `start` into one space-separated
459
+ * line, consuming lines until the first that ends with `{`.
460
+ *
461
+ * @param lines - The file's source lines
462
+ * @param start - The index of the head's first line
463
+ * @returns The joined head, or `undefined` when no line opens a body
464
+ *
465
+ * @example
466
+ * ```ts
467
+ * joinHead(['export class X {'], 0) // { text: 'export class X {', end: 0 }
468
+ * ```
469
+ */
470
+ function joinHead(lines, start) {
471
+ const parts = [];
472
+ for (let index = start; index < lines.length; index += 1) {
473
+ const line = lines[index];
474
+ if (line === void 0) break;
475
+ parts.push(index === start ? line.trimEnd() : line.trim());
476
+ if (line.trimEnd().endsWith("{")) return {
477
+ text: parts.join(" "),
478
+ end: index
479
+ };
480
+ }
481
+ }
482
+ /**
483
+ * The body lines of the named `export class` / `export interface` declaration
484
+ * within one file's source text — everything between the head's opening `{`
485
+ * and the column-0 closing `}`.
486
+ *
487
+ * @param source - The file's source text to search
488
+ * @param keyword - Whether to look for a `class` or an `interface`
489
+ * @param name - The declaration's identifier
490
+ * @returns The declaration's body lines, or an empty array when `source` does not declare it
491
+ *
492
+ * @example
493
+ * ```ts
494
+ * declarationBody('export interface X {\n\twalk(): void\n}\n', 'interface', 'X') // ['\twalk(): void']
495
+ * ```
496
+ */
497
+ function declarationBody(source, keyword, name) {
498
+ const opener = `export ${keyword} ${name}`;
499
+ const declaration = new RegExp(`^export ${keyword} ${name}(?:<.*>)?(?: .*)? \\{$`);
500
+ const lines = source.split(/\r?\n/);
501
+ for (let index = 0; index < lines.length; index += 1) {
502
+ const line = lines[index];
503
+ if (line === void 0 || !line.startsWith(opener)) continue;
504
+ const head = joinHead(lines, index);
505
+ if (head === void 0 || !declaration.test(head.text)) continue;
506
+ const body = [];
507
+ for (const member of lines.slice(head.end + 1)) {
508
+ if (member === "}") return body;
509
+ body.push(member);
510
+ }
511
+ }
512
+ return [];
513
+ }
514
+ /**
515
+ * The member lines declaring a callable member: plain, `async`, generator
516
+ * (`*`), and optional (`records?(`) methods all count; getters, setters,
517
+ * `static` members, and `#` privates never do (their keyword or `#` breaks
518
+ * the `name(` shape).
519
+ *
520
+ * @param lines - A declaration's body lines
521
+ * @returns The declared method names, deduped and sorted
522
+ *
523
+ * @example
524
+ * ```ts
525
+ * memberMethods(['\tmap(): void', '\tfilter(): void']) // ['filter', 'map']
526
+ * ```
527
+ */
528
+ function memberMethods(lines) {
529
+ const methods = [];
530
+ for (const line of lines) {
531
+ const method = line.match(/^\t(?:async )?\*?(\w+)(<.*>)?\??\(/);
532
+ if (method?.[1] !== void 0) methods.push(method[1]);
533
+ }
534
+ return Array.from(new Set(methods)).sort();
535
+ }
536
+ /**
537
+ * The block nodes under the named `##` heading, up to the next `##`-or-higher
538
+ * heading (or the document's end) — the section-scoping window `extractSurface` /
539
+ * `extractMethods` walk over.
540
+ *
541
+ * @param document - The parsed guide document
542
+ * @param heading - The `##` heading text to scope to (e.g. `Surface`)
543
+ * @returns The blocks belonging to that section, in document order
544
+ *
545
+ * @example
546
+ * ```ts
547
+ * sectionBlocks(document, 'Surface') // the blocks between `## Surface` and the next `##`
548
+ * ```
549
+ */
550
+ function sectionBlocks(document, heading) {
551
+ const blocks = [];
552
+ let active = false;
553
+ for (const block of document.children) {
554
+ if (isHeadingNode(block) && block.level <= 2) {
555
+ if (block.level === 2 && flattenText(block).trim() === heading) {
556
+ active = true;
557
+ continue;
558
+ }
559
+ if (active) break;
560
+ }
561
+ if (active) blocks.push(block);
562
+ }
563
+ return blocks;
564
+ }
565
+ /**
566
+ * Every `## Surface` identifier the guide documents — each table row's column 0
567
+ * code span (the name) paired with its `Kind` column (located by header text)
568
+ * UNION every backticked H3 entity heading in the section
569
+ * (`{name: <codeSpan>, kind: 'class'}`), deduped by {@link symbolKey}. A row with
570
+ * no code-span name, or an unrecognized `Kind` text, is skipped.
571
+ *
572
+ * @param document - The parsed guide document
573
+ * @returns The documented surface, in encounter order
574
+ *
575
+ * @example
576
+ * ```ts
577
+ * extractSurface(document) // [{ name: 'Markdown', kind: 'class' }, ...]
578
+ * ```
579
+ */
580
+ function extractSurface(document) {
581
+ const symbols = [];
582
+ const seen = /* @__PURE__ */ new Set();
583
+ for (const block of sectionBlocks(document, SURFACE)) {
584
+ if (isTableNode(block)) {
585
+ const column = kindIndex(block);
586
+ for (const row of block.rows) {
587
+ const nameCell = row[0];
588
+ const rawName = nameCell === void 0 ? void 0 : firstCode(nameCell);
589
+ const name = rawName === void 0 ? void 0 : identifierOf(rawName);
590
+ if (name === void 0) continue;
591
+ const kindCell = column === void 0 ? void 0 : row[column];
592
+ const kindText = kindCell === void 0 ? "" : flattenText({
593
+ element: "paragraph",
594
+ children: kindCell
595
+ }).trim();
596
+ if (!isExportKind(kindText)) continue;
597
+ const symbol = {
598
+ name,
599
+ kind: kindText
600
+ };
601
+ const key = symbolKey(symbol);
602
+ if (seen.has(key)) continue;
603
+ seen.add(key);
604
+ symbols.push(symbol);
605
+ }
606
+ continue;
607
+ }
608
+ if (isHeadingNode(block) && block.level === 3) {
609
+ const rawName = firstCode(block.children);
610
+ const name = rawName === void 0 ? void 0 : identifierOf(rawName);
611
+ if (name === void 0) continue;
612
+ const symbol = {
613
+ name,
614
+ kind: "class"
615
+ };
616
+ const key = symbolKey(symbol);
617
+ if (seen.has(key)) continue;
618
+ seen.add(key);
619
+ symbols.push(symbol);
620
+ }
621
+ }
622
+ return symbols;
623
+ }
624
+ /**
625
+ * One {@link MethodGroup} per documented behavioral interface in `## Methods` —
626
+ * an H4 with a code span sets the current interface, and the table immediately
627
+ * following becomes its documented methods.
628
+ *
629
+ * @param document - The parsed guide document
630
+ * @returns The documented method groups, in document order
631
+ *
632
+ * @example
633
+ * ```ts
634
+ * extractMethods(document) // [{ interface: 'MarkdownInterface', methods: ['walk', ...] }]
635
+ * ```
636
+ */
637
+ function extractMethods(document) {
638
+ const groups = [];
639
+ let current;
640
+ for (const block of sectionBlocks(document, METHODS)) {
641
+ if (isHeadingNode(block) && block.level === 4) {
642
+ const rawInterface = firstCode(block.children);
643
+ current = rawInterface === void 0 ? void 0 : identifierOf(rawInterface);
644
+ continue;
645
+ }
646
+ if (isTableNode(block) && current !== void 0) {
647
+ const methods = [];
648
+ for (const row of block.rows) {
649
+ const cell = row[0];
650
+ const rawName = cell === void 0 ? void 0 : firstCode(cell);
651
+ const name = rawName === void 0 ? void 0 : identifierOf(rawName);
652
+ if (name !== void 0) methods.push(name);
653
+ }
654
+ groups.push({
655
+ interface: current,
656
+ methods
657
+ });
658
+ current = void 0;
659
+ }
660
+ }
661
+ return groups;
662
+ }
663
+ /**
664
+ * Every link href in the guide document, including table cells — a full,
665
+ * depth-first walk of the whole AST.
666
+ *
667
+ * @param document - The parsed guide document
668
+ * @returns Every link's href, in walk order
669
+ *
670
+ * @example
671
+ * ```ts
672
+ * extractLinks(document) // ['../../src/core/helpers.ts', 'https://example.com']
673
+ * ```
674
+ */
675
+ function extractLinks(document) {
676
+ const links = [];
677
+ for (const node of walkNodes(document)) if (isLinkNode(node)) links.push(node.href);
678
+ return links;
679
+ }
680
+ /**
681
+ * The relative test links declared under `## Tests` — every link href found
682
+ * within that section only.
683
+ *
684
+ * @param document - The parsed guide document
685
+ * @returns The `## Tests` section's link hrefs, in walk order
686
+ *
687
+ * @example
688
+ * ```ts
689
+ * extractTests(document) // ['../../tests/src/core/Markdown.test.ts', ...]
690
+ * ```
691
+ */
692
+ function extractTests(document) {
693
+ const links = [];
694
+ for (const block of sectionBlocks(document, TESTS)) for (const node of walkNodes(block)) if (isLinkNode(node)) links.push(node.href);
695
+ return links;
696
+ }
697
+ /**
698
+ * The exported functions in one file's source text whose immediately preceding
699
+ * JSDoc block carries `@example` — walked line by line, tracking the current
700
+ * comment block; the block resets on any non-comment, non-export line so an
701
+ * `@example` never attaches to a declaration it does not directly precede.
702
+ *
703
+ * @param source - The file's source text
704
+ * @returns The exported function names with an `@example`, in file order
705
+ *
706
+ * @example
707
+ * ```ts
708
+ * const block = ['/**', ' * @example', ' *' + '/', 'export function walk() {}', ''].join('\n')
709
+ * examplesFrom(block) // ['walk']
710
+ * examplesFrom('export function walk() {}\n') // []
711
+ * ```
712
+ */
713
+ function examplesFrom(source) {
714
+ const names = [];
715
+ const seen = /* @__PURE__ */ new Set();
716
+ let inBlock = false;
717
+ let blockHasExample = false;
718
+ let pending = false;
719
+ for (const line of source.split(/\r?\n/)) {
720
+ const trimmed = line.trim();
721
+ if (!inBlock && trimmed.startsWith("/**")) {
722
+ inBlock = true;
723
+ blockHasExample = trimmed.includes("@example");
724
+ pending = false;
725
+ if (trimmed.length > 3 && trimmed.endsWith("*/")) {
726
+ inBlock = false;
727
+ pending = blockHasExample;
728
+ }
729
+ continue;
730
+ }
731
+ if (inBlock) {
732
+ if (trimmed.includes("@example")) blockHasExample = true;
733
+ if (trimmed.endsWith("*/")) {
734
+ inBlock = false;
735
+ pending = blockHasExample;
736
+ }
737
+ continue;
738
+ }
739
+ const name = line.match(/^export (?:async )?function\*? (\w+)/)?.[1];
740
+ if (pending && isNonEmptyString(name) && !seen.has(name)) {
741
+ seen.add(name);
742
+ names.push(name);
743
+ }
744
+ pending = false;
745
+ }
746
+ return names;
747
+ }
748
+ /**
749
+ * The callable-member names in a declaration body (per {@link memberMethods}'
750
+ * grammar) whose immediately preceding JSDoc block, within the same body,
751
+ * carries `@example` — the member-level mirror of {@link examplesFrom}.
752
+ *
753
+ * @param lines - A declaration's body lines
754
+ * @returns The exemplified member names, deduped and sorted
755
+ *
756
+ * @example
757
+ * ```ts
758
+ * exampleMethods(['\t/**', '\t * @example', '\t *' + '/', '\twalk(): void']) // ['walk']
759
+ * ```
760
+ */
761
+ function exampleMethods(lines) {
762
+ const methods = [];
763
+ const seen = /* @__PURE__ */ new Set();
764
+ let inBlock = false;
765
+ let blockHasExample = false;
766
+ let pending = false;
767
+ for (const line of lines) {
768
+ const trimmed = line.trim();
769
+ if (!inBlock && trimmed.startsWith("/**")) {
770
+ inBlock = true;
771
+ blockHasExample = trimmed.includes("@example");
772
+ pending = false;
773
+ if (trimmed.length > 3 && trimmed.endsWith("*/")) {
774
+ inBlock = false;
775
+ pending = blockHasExample;
776
+ }
777
+ continue;
778
+ }
779
+ if (inBlock) {
780
+ if (trimmed.includes("@example")) blockHasExample = true;
781
+ if (trimmed.endsWith("*/")) {
782
+ inBlock = false;
783
+ pending = blockHasExample;
784
+ }
785
+ continue;
786
+ }
787
+ const name = line.match(/^\t(?:async )?\*?(\w+)(<.*>)?\??\(/)?.[1];
788
+ if (pending && isNonEmptyString(name) && !seen.has(name)) {
789
+ seen.add(name);
790
+ methods.push(name);
791
+ }
792
+ pending = false;
793
+ }
794
+ return Array.from(new Set(methods)).sort();
795
+ }
796
+ /**
797
+ * Every ```ts fenced code block's body text anywhere in the guide document —
798
+ * a full AST walk so a fence nested inside a blockquote or list still counts.
799
+ *
800
+ * @param document - The parsed guide document
801
+ * @returns Every `ts`-lang fence's verbatim code, in walk order
802
+ *
803
+ * @example
804
+ * ```ts
805
+ * extractPatterns(document) // ["import { X } from './x.js'\nX()"]
806
+ * ```
807
+ */
808
+ function extractPatterns(document) {
809
+ const patterns = [];
810
+ for (const node of walkNodes(document)) if (isCodeBlockNode(node) && node.lang === "ts") patterns.push(node.code);
811
+ return patterns;
812
+ }
813
+ /**
814
+ * Parse a `## By concept` manifest table into its {@link ManifestEntry} rows —
815
+ * each row's Concept cell (flattened text), Spec / Tests cells (a single link
816
+ * href, resolved against `base`), and Source cell (every link href, resolved
817
+ * against `base`; one directory collapses to a `string`, several become a
818
+ * `readonly string[]`). A row missing a concept, spec link, tests link, or
819
+ * source link is skipped as malformed.
820
+ *
821
+ * @param markdown - The manifest markdown source (e.g. `guides/README.md`'s content)
822
+ * @param base - A single directory name relative to the workspace root that the manifest's
823
+ * links are resolved against (e.g. `'guides'`) — {@link resolveLink}'s arithmetic supports
824
+ * only one path segment, so a deeper or nested base is not supported
825
+ * @returns The manifest's entries, in row order
826
+ *
827
+ * @example
828
+ * ```ts
829
+ * parseManifest(readme, 'guides') // [{ concept: 'Markdown', spec: 'guides/src/markdown.md', ... }]
830
+ * ```
831
+ */
832
+ function parseManifest(markdown, base) {
833
+ const document = createMarkdown(markdown).document;
834
+ const entries = [];
835
+ for (const block of sectionBlocks(document, MANIFEST)) {
836
+ if (!isTableNode(block)) continue;
837
+ for (const row of block.rows) {
838
+ const conceptCell = row[0];
839
+ const specCell = row[1];
840
+ const sourceCell = row[2];
841
+ const testsCell = row[3];
842
+ if (conceptCell === void 0 || specCell === void 0 || sourceCell === void 0 || testsCell === void 0) continue;
843
+ const concept = flattenText({
844
+ element: "paragraph",
845
+ children: conceptCell
846
+ }).trim();
847
+ if (isEmptyString(concept)) continue;
848
+ const specHref = cellLinks(specCell)[0];
849
+ const testsHref = cellLinks(testsCell)[0];
850
+ if (specHref === void 0 || testsHref === void 0) continue;
851
+ const sourceHrefs = cellLinks(sourceCell).map((href) => resolveLink(base, href));
852
+ if (!isNonEmptyArray(sourceHrefs)) continue;
853
+ const [firstSource] = sourceHrefs;
854
+ const source = sourceHrefs.length === 1 ? firstSource : sourceHrefs;
855
+ entries.push({
856
+ concept,
857
+ spec: resolveLink(base, specHref),
858
+ source,
859
+ tests: resolveLink(base, testsHref)
860
+ });
861
+ }
862
+ }
863
+ return entries;
864
+ }
865
+ //#endregion
866
+ //#region src/core/shapers.ts
867
+ /**
868
+ * The shape of a {@link SurfaceSymbol} — a documented / exported symbol's
869
+ * `name` paired with its {@link ExportKind}.
870
+ *
871
+ * @example
872
+ * ```ts
873
+ * import { createContract } from '@orkestrel/contract'
874
+ * import { surfaceSymbolShape } from '@orkestrel/guide/core'
875
+ *
876
+ * const surfaceSymbol = createContract(surfaceSymbolShape)
877
+ * surfaceSymbol.is({ name: 'Markdown', kind: 'class' }) // true
878
+ * ```
879
+ */
880
+ var surfaceSymbolShape = objectShape({
881
+ name: stringShape(),
882
+ kind: literalShape([
883
+ "type",
884
+ "interface",
885
+ "const",
886
+ "function",
887
+ "class"
888
+ ])
889
+ });
890
+ /**
891
+ * The shape of a {@link MethodGroup} — a backticked `interface` name paired
892
+ * with its documented `methods`.
893
+ *
894
+ * @example
895
+ * ```ts
896
+ * import { createContract } from '@orkestrel/contract'
897
+ * import { methodGroupShape } from '@orkestrel/guide/core'
898
+ *
899
+ * const methodGroup = createContract(methodGroupShape)
900
+ * methodGroup.is({ interface: 'MarkdownInterface', methods: ['walk'] }) // true
901
+ * ```
902
+ */
903
+ var methodGroupShape = objectShape({
904
+ interface: stringShape(),
905
+ methods: arrayShape(stringShape())
906
+ });
907
+ /**
908
+ * The shape of a {@link ManifestEntry} — one `## By concept` manifest row,
909
+ * `source` accepting either a single directory or several.
910
+ *
911
+ * @example
912
+ * ```ts
913
+ * import { createContract } from '@orkestrel/contract'
914
+ * import { manifestEntryShape } from '@orkestrel/guide/core'
915
+ *
916
+ * const manifestEntry = createContract(manifestEntryShape)
917
+ * manifestEntry.is({ concept: 'Markdown', spec: 'guides/src/markdown.md', source: 'src/core', tests: 'tests/src/core' }) // true
918
+ * ```
919
+ */
920
+ var manifestEntryShape = objectShape({
921
+ concept: stringShape(),
922
+ spec: stringShape(),
923
+ source: unionShape(stringShape(), arrayShape(stringShape())),
924
+ tests: stringShape()
925
+ });
926
+ //#endregion
927
+ //#region src/core/Guide.ts
928
+ /**
929
+ * A stateful, structured view over one parsed guide — the five documented
930
+ * projections (`sections` / `surface` / `methods` / `links` / `tests`) are
931
+ * extracted once at construction and cached.
932
+ *
933
+ * @remarks
934
+ * Pure: parses `source` once via `@orkestrel/markdown` and never touches the
935
+ * filesystem — `Guide` has no notion of "where" the guide came from, only its
936
+ * markdown text. Every accessor returns the same cached, readonly array on
937
+ * every call.
938
+ *
939
+ * @example
940
+ * ```ts
941
+ * import { Guide } from '@orkestrel/guide/core'
942
+ *
943
+ * const guide = new Guide('## Surface\n\n| Name | Kind |\n| --- | --- |\n| `X` | class |')
944
+ * guide.surface() // [{ name: 'X', kind: 'class' }]
945
+ * ```
946
+ */
947
+ var Guide = class {
948
+ #sections;
949
+ #surface;
950
+ #methods;
951
+ #links;
952
+ #tests;
953
+ #patterns;
954
+ constructor(source) {
955
+ const document = createMarkdown(source).document;
956
+ this.#sections = document.children.filter(isHeadingNode).filter((heading) => heading.level === 2).map((heading) => flattenText(heading).trim());
957
+ this.#surface = extractSurface(document);
958
+ this.#methods = extractMethods(document);
959
+ this.#links = extractLinks(document);
960
+ this.#tests = extractTests(document);
961
+ this.#patterns = extractPatterns(document);
962
+ }
963
+ sections() {
964
+ return this.#sections;
965
+ }
966
+ surface() {
967
+ return this.#surface;
968
+ }
969
+ methods() {
970
+ return this.#methods;
971
+ }
972
+ links() {
973
+ return this.#links;
974
+ }
975
+ tests() {
976
+ return this.#tests;
977
+ }
978
+ patterns() {
979
+ return this.#patterns;
980
+ }
981
+ };
982
+ //#endregion
983
+ //#region src/core/Source.ts
984
+ /**
985
+ * A pure `SourceInterface` — reflects a module scope's exports and member
986
+ * methods over a consumer-supplied file inventory (AGENTS §22, `PROPOSAL.md`
987
+ * §7), using text-only line scanners rather than the TypeScript compiler API
988
+ * or the filesystem. `Source` never touches disk: the consumer gathers the
989
+ * inventory however their environment allows (`node:fs` in a Node script,
990
+ * `import.meta.glob` in a browser/vitest run) and passes it in as `files`.
991
+ *
992
+ * @example
993
+ * ```ts
994
+ * import { Source } from '@orkestrel/guide'
995
+ *
996
+ * const source = new Source({
997
+ * files: {
998
+ * 'src/core/Guide.ts': 'export class Guide {}\n',
999
+ * 'src/core/types.ts': 'export interface GuideInterface {\n\tsections(): void\n}\n',
1000
+ * },
1001
+ * module: 'src/core',
1002
+ * })
1003
+ * source.exports() // [{ name: 'Guide', kind: 'class' }, { name: 'GuideInterface', kind: 'interface' }]
1004
+ * source.methods('GuideInterface') // ['sections']
1005
+ * source.exists('src/core/Guide.ts') // true
1006
+ * ```
1007
+ */
1008
+ var Source = class {
1009
+ #files;
1010
+ #module;
1011
+ #exports;
1012
+ #hidden;
1013
+ #examples;
1014
+ constructor(options) {
1015
+ this.#files = options.files;
1016
+ this.#module = options.module;
1017
+ }
1018
+ exports() {
1019
+ if (this.#exports === void 0) this.#exports = this.#scanSymbols(exportsFrom);
1020
+ return this.#exports;
1021
+ }
1022
+ methods(name) {
1023
+ const interfaceBody = this.#declarationBody("interface", name);
1024
+ if (interfaceBody.length > 0) return memberMethods(interfaceBody);
1025
+ return memberMethods(this.#declarationBody("class", name)).filter((method) => method !== "constructor");
1026
+ }
1027
+ exists(relative) {
1028
+ return Object.keys(this.#files).some((key) => key === relative || key.startsWith(`${relative}/`));
1029
+ }
1030
+ hidden() {
1031
+ if (this.#hidden === void 0) this.#hidden = this.#scanSymbols(hiddenFrom);
1032
+ return this.#hidden;
1033
+ }
1034
+ examples(name) {
1035
+ if (name === void 0) {
1036
+ if (this.#examples === void 0) this.#examples = this.#scanExamples();
1037
+ return this.#examples;
1038
+ }
1039
+ return this.#exampleMembers(name);
1040
+ }
1041
+ #scanExamples() {
1042
+ const names = [];
1043
+ const seen = /* @__PURE__ */ new Set();
1044
+ for (const key of moduleKeys(this.#files, this.#module)) {
1045
+ const text = this.#files[key];
1046
+ if (text === void 0) continue;
1047
+ for (const name of examplesFrom(text)) {
1048
+ if (seen.has(name)) continue;
1049
+ seen.add(name);
1050
+ names.push(name);
1051
+ }
1052
+ }
1053
+ return names;
1054
+ }
1055
+ #exampleMembers(name) {
1056
+ const interfaceBody = this.#declarationBody("interface", name);
1057
+ const classBody = this.#declarationBody("class", name);
1058
+ const members = /* @__PURE__ */ new Set([...exampleMethods(interfaceBody), ...exampleMethods(classBody)]);
1059
+ return Array.from(members).sort();
1060
+ }
1061
+ #scanSymbols(scan) {
1062
+ const symbols = [];
1063
+ const seen = /* @__PURE__ */ new Set();
1064
+ for (const key of moduleKeys(this.#files, this.#module)) {
1065
+ const text = this.#files[key];
1066
+ if (text === void 0) continue;
1067
+ for (const symbol of scan(text)) {
1068
+ const identity = symbolKey(symbol);
1069
+ if (seen.has(identity)) continue;
1070
+ seen.add(identity);
1071
+ symbols.push(symbol);
1072
+ }
1073
+ }
1074
+ return symbols.sort((a, b) => a.name === b.name ? 0 : a.name < b.name ? -1 : 1);
1075
+ }
1076
+ #declarationBody(keyword, name) {
1077
+ for (const key of moduleKeys(this.#files, this.#module)) {
1078
+ const text = this.#files[key];
1079
+ if (text === void 0) continue;
1080
+ const body = declarationBody(text, keyword, name);
1081
+ if (body.length > 0) return body;
1082
+ }
1083
+ return [];
1084
+ }
1085
+ };
1086
+ //#endregion
1087
+ //#region src/core/factories.ts
1088
+ /**
1089
+ * Create a structured {@link GuideInterface} view over one guide's markdown
1090
+ * source — parses once and caches its `sections` / `surface` / `methods` /
1091
+ * `links` / `tests` projections.
1092
+ *
1093
+ * @param source - The guide's markdown source text
1094
+ * @returns A working {@link GuideInterface}
1095
+ *
1096
+ * @example
1097
+ * ```ts
1098
+ * import { createGuide } from '@orkestrel/guide'
1099
+ *
1100
+ * const guide = createGuide('## Surface\n\n| Name | Kind |\n| --- | --- |\n| `X` | class |')
1101
+ * guide.surface() // [{ name: 'X', kind: 'class' }]
1102
+ * ```
1103
+ */
1104
+ function createGuide(source) {
1105
+ return new Guide(source);
1106
+ }
1107
+ /**
1108
+ * Create a pure {@link SourceInterface} over a consumer-supplied file
1109
+ * inventory — see {@link Source}.
1110
+ *
1111
+ * @param options - The file inventory and module scope to reflect
1112
+ * @returns A `SourceInterface` reflecting the given module scope
1113
+ *
1114
+ * @example
1115
+ * ```ts
1116
+ * import { createSource } from '@orkestrel/guide'
1117
+ *
1118
+ * const source = createSource({
1119
+ * files: { 'src/core/Guide.ts': 'export class Guide {}\n' },
1120
+ * module: 'src/core',
1121
+ * })
1122
+ * source.exports() // [{ name: 'Guide', kind: 'class' }]
1123
+ * ```
1124
+ */
1125
+ function createSource(options) {
1126
+ return new Source(options);
1127
+ }
1128
+ /**
1129
+ * Compile the {@link surfaceSymbolShape} into a {@link ContractInterface} for
1130
+ * {@link SurfaceSymbol} — a guard, coercing parser, JSON Schema, and seeded
1131
+ * generator from one shape declaration (AGENTS §14).
1132
+ *
1133
+ * @returns A `SurfaceSymbol` contract bundling `schema` / `is` / `parse` / `generate`
1134
+ *
1135
+ * @example
1136
+ * ```ts
1137
+ * import { createSurfaceSymbolContract } from '@orkestrel/guide/core'
1138
+ *
1139
+ * const surfaceSymbol = createSurfaceSymbolContract()
1140
+ * surfaceSymbol.is({ name: 'Markdown', kind: 'class' }) // true
1141
+ * ```
1142
+ */
1143
+ function createSurfaceSymbolContract() {
1144
+ return createContract(surfaceSymbolShape);
1145
+ }
1146
+ /**
1147
+ * Compile the {@link methodGroupShape} into a {@link ContractInterface} for
1148
+ * {@link MethodGroup} — a guard, coercing parser, JSON Schema, and seeded
1149
+ * generator from one shape declaration (AGENTS §14).
1150
+ *
1151
+ * @returns A `MethodGroup` contract bundling `schema` / `is` / `parse` / `generate`
1152
+ *
1153
+ * @example
1154
+ * ```ts
1155
+ * import { createMethodGroupContract } from '@orkestrel/guide/core'
1156
+ *
1157
+ * const methodGroup = createMethodGroupContract()
1158
+ * methodGroup.is({ interface: 'MarkdownInterface', methods: ['walk'] }) // true
1159
+ * ```
1160
+ */
1161
+ function createMethodGroupContract() {
1162
+ return createContract(methodGroupShape);
1163
+ }
1164
+ /**
1165
+ * Compile the {@link manifestEntryShape} into a {@link ContractInterface} for
1166
+ * {@link ManifestEntry} — a guard, coercing parser, JSON Schema, and seeded
1167
+ * generator from one shape declaration (AGENTS §14).
1168
+ *
1169
+ * @returns A `ManifestEntry` contract bundling `schema` / `is` / `parse` / `generate`
1170
+ *
1171
+ * @example
1172
+ * ```ts
1173
+ * import { createManifestEntryContract } from '@orkestrel/guide/core'
1174
+ *
1175
+ * const manifestEntry = createManifestEntryContract()
1176
+ * manifestEntry.is({ concept: 'Markdown', spec: 'guides/src/markdown.md', source: 'src/core', tests: 'tests/src/core' }) // true
1177
+ * ```
1178
+ */
1179
+ function createManifestEntryContract() {
1180
+ return createContract(manifestEntryShape);
1181
+ }
1182
+ //#endregion
1183
+ export { EXTERNAL_SCHEMES, Guide, MANIFEST, METHODS, SURFACE, Source, TESTS, cellLinks, createGuide, createManifestEntryContract, createMethodGroupContract, createSource, createSurfaceSymbolContract, declarationBody, exampleMethods, examplesFrom, exportsFrom, extractLinks, extractMethods, extractPatterns, extractSurface, extractTests, fenceImports, findMissing, findUnexampled, firstCode, hiddenFrom, identifierOf, isExportKind, isExternalLink, isManifestEntry, isMethodGroup, isSurfaceSymbol, joinHead, kindIndex, manifestEntryShape, memberMethods, methodGroupShape, missingSymbols, moduleDirs, moduleKeys, parseManifest, resolveLink, sectionBlocks, surfaceSymbolShape, symbolKey };
1184
+
1185
+ //# sourceMappingURL=index.js.map