@knapsack/source-conflicts-adapter 4.100.4--canary.8036.d933ec7.0 → 4.100.4--canary.7934.dbdc23f.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.
- package/dist/mdx/selectSections.d.ts +5 -12
- package/dist/mdx/selectSections.d.ts.map +1 -1
- package/dist/mdx/selectSections.js +14 -92
- package/dist/mdx/selectSections.js.map +1 -1
- package/package.json +6 -6
- package/dist/mdx/selectSections.vitest.d.ts +0 -16
- package/dist/mdx/selectSections.vitest.d.ts.map +0 -1
- package/dist/mdx/selectSections.vitest.js +0 -284
- package/dist/mdx/selectSections.vitest.js.map +0 -1
|
@@ -1,21 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Section selection over distro entity MDX.
|
|
3
3
|
*
|
|
4
|
-
* Sections are markdown-AST node groups delimited by
|
|
5
|
-
* heading's `{#anchor}` convention (`{#.props}` → `props`,
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* operations; the body is re-serialized through remark.
|
|
9
|
-
*
|
|
10
|
-
* NOTE: this is a fourth site hand-parsing the informal anchor grammar
|
|
11
|
-
* emitted by the ingest adapters. ENG-9145 tracks consolidating that grammar
|
|
12
|
-
* into a single source of truth at the emission point.
|
|
4
|
+
* Sections are markdown-AST node groups delimited by depth ≤ 2 headings,
|
|
5
|
+
* keyed by the heading's `{#anchor}` convention (`{#.props}` → `props`,
|
|
6
|
+
* `{#tab.overview}` → `tabs`). Selection, ordering, and the omitted-sections
|
|
7
|
+
* enumeration are tree operations; the body is re-serialized through remark.
|
|
13
8
|
*/
|
|
14
9
|
/**
|
|
15
10
|
* Serve an entity MDX document with only the requested sections, props
|
|
16
|
-
* first. `include` names sections by key;
|
|
17
|
-
* served, so a multi-template component returns each template's props rather
|
|
18
|
-
* than the first match only. Absent `include` means `['props']`;
|
|
11
|
+
* first. `include` names sections by key; absent means `['props']`;
|
|
19
12
|
* `['all']` serves everything. Omitted section keys are enumerated at the
|
|
20
13
|
* end so a caller can request them. A body the parser cannot handle is
|
|
21
14
|
* served verbatim — fallback, never an error.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"selectSections.d.ts","sourceRoot":"","sources":["../../src/mdx/selectSections.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"selectSections.d.ts","sourceRoot":"","sources":["../../src/mdx/selectSections.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAyFH;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,EAC7B,OAAO,EACP,OAAO,GACR,EAAE;IACD,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;CACpB,GAAG,MAAM,CAwCT"}
|
|
@@ -1,15 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Section selection over distro entity MDX.
|
|
3
3
|
*
|
|
4
|
-
* Sections are markdown-AST node groups delimited by
|
|
5
|
-
* heading's `{#anchor}` convention (`{#.props}` → `props`,
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* operations; the body is re-serialized through remark.
|
|
9
|
-
*
|
|
10
|
-
* NOTE: this is a fourth site hand-parsing the informal anchor grammar
|
|
11
|
-
* emitted by the ingest adapters. ENG-9145 tracks consolidating that grammar
|
|
12
|
-
* into a single source of truth at the emission point.
|
|
4
|
+
* Sections are markdown-AST node groups delimited by depth ≤ 2 headings,
|
|
5
|
+
* keyed by the heading's `{#anchor}` convention (`{#.props}` → `props`,
|
|
6
|
+
* `{#tab.overview}` → `tabs`). Selection, ordering, and the omitted-sections
|
|
7
|
+
* enumeration are tree operations; the body is re-serialized through remark.
|
|
13
8
|
*/
|
|
14
9
|
import { unified } from 'unified';
|
|
15
10
|
import remarkParse from 'remark-parse';
|
|
@@ -46,100 +41,29 @@ function headingAnchor(node) {
|
|
|
46
41
|
return undefined;
|
|
47
42
|
return text.slice(open + 2, -1);
|
|
48
43
|
}
|
|
49
|
-
/**
|
|
50
|
-
* Anchors whose leading segment is emitted in one form but addressed in
|
|
51
|
-
* another. `include` speaks the plural.
|
|
52
|
-
*/
|
|
53
|
-
const ANCHOR_ALIASES = {
|
|
54
|
-
tab: 'tabs', // emitted singular, addressed plural
|
|
55
|
-
};
|
|
56
|
-
/**
|
|
57
|
-
* Namespaces that *contain* a vocabulary rather than being one. `template` is
|
|
58
|
-
* the only such namespace: `{#template.<slug>.props}` is a props section that
|
|
59
|
-
* happens to be scoped to a template, so its vocabulary word sits after the
|
|
60
|
-
* slug. Every other anchor is keyed by its leading segment, so a child anchor
|
|
61
|
-
* such as `{#props.variant}` stays part of `props` instead of becoming a
|
|
62
|
-
* `variant` key no caller could guess.
|
|
63
|
-
*/
|
|
64
|
-
const CONTAINER_NAMESPACES = new Set(['template']);
|
|
65
|
-
/**
|
|
66
|
-
* Split an anchor into its vocabulary word and qualifier.
|
|
67
|
-
*
|
|
68
|
-
* `.props` → props · `template.tabsbar.props` → props/tabsbar ·
|
|
69
|
-
* `template.tabsbar` → template/tabsbar · `snippets.tabsbar.default` →
|
|
70
|
-
* snippets/tabsbar.default · `tab.overview` → tabs/overview ·
|
|
71
|
-
* `props.variant` → props/variant.
|
|
72
|
-
*/
|
|
73
|
-
function parseAnchor(anchor) {
|
|
74
|
-
const segments = anchor.split('.').filter(Boolean);
|
|
75
|
-
if (segments.length === 0)
|
|
76
|
-
return undefined;
|
|
77
|
-
const [head, ...rest] = segments;
|
|
78
|
-
const normalize = (segment) => ANCHOR_ALIASES[segment] ?? segment;
|
|
79
|
-
if (CONTAINER_NAMESPACES.has(head)) {
|
|
80
|
-
const [slug, ...tail] = rest;
|
|
81
|
-
// `template.<slug>` alone is the template's own body (heading + import).
|
|
82
|
-
return {
|
|
83
|
-
key: tail.length ? normalize(tail[0]) : head,
|
|
84
|
-
qualifier: slug ?? '',
|
|
85
|
-
};
|
|
86
|
-
}
|
|
87
|
-
return { key: normalize(head), qualifier: rest.join('.') };
|
|
88
|
-
}
|
|
89
44
|
/** Normalize an anchor (or heading text) to a section key. */
|
|
90
45
|
function sectionKey(node) {
|
|
91
46
|
const anchor = headingAnchor(node);
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
47
|
+
if (anchor) {
|
|
48
|
+
const bare = anchor.startsWith('.') ? anchor.slice(1) : anchor;
|
|
49
|
+
const head = bare.split('.')[0];
|
|
50
|
+
return head === 'tab' ? 'tabs' : head;
|
|
51
|
+
}
|
|
95
52
|
const text = node.children
|
|
96
53
|
.filter((c) => c.type === 'text')
|
|
97
54
|
.map((c) => c.value)
|
|
98
55
|
.join(' ');
|
|
99
|
-
return
|
|
100
|
-
}
|
|
101
|
-
/**
|
|
102
|
-
* Does this heading start a section of its own?
|
|
103
|
-
*
|
|
104
|
-
* Depth ≤ 2 always does. Depth 3 does only when its anchor is *qualified* and
|
|
105
|
-
* resolves to a different vocabulary word than the section it sits in — that is
|
|
106
|
-
* the multi-template `### Props {#template.<slug>.props}` shape, which would
|
|
107
|
-
* otherwise fold invisibly into the enclosing template body.
|
|
108
|
-
*
|
|
109
|
-
* Everything else at depth 3 stays with its parent, where a caller expects to
|
|
110
|
-
* find it. Three ways that happens:
|
|
111
|
-
*
|
|
112
|
-
* - no anchor at all (a prose subhead)
|
|
113
|
-
* - an unqualified anchor (`{#accessibility-notes}`)
|
|
114
|
-
* - a qualified anchor resolving to the key it already sits under
|
|
115
|
-
* (`### <demo> {#snippets.default}` inside `## Snippets {#snippets}`, or
|
|
116
|
-
* `### variant {#props.variant}` inside `## Props {#.props}`)
|
|
117
|
-
*
|
|
118
|
-
* That last case is the subtle one: the anchor *is* qualified, so the test that
|
|
119
|
-
* matters is the key comparison, not the segment count.
|
|
120
|
-
*/
|
|
121
|
-
function opensSection(node, currentKey) {
|
|
122
|
-
if (node.depth <= 2)
|
|
123
|
-
return true;
|
|
124
|
-
if (node.depth > 3)
|
|
125
|
-
return false;
|
|
126
|
-
const anchor = headingAnchor(node);
|
|
127
|
-
if (!anchor)
|
|
128
|
-
return false;
|
|
129
|
-
const parsed = parseAnchor(anchor);
|
|
130
|
-
if (!parsed || !parsed.qualifier)
|
|
131
|
-
return false;
|
|
132
|
-
return parsed.key !== currentKey;
|
|
56
|
+
return kebabCase(text) || 'untitled';
|
|
133
57
|
}
|
|
134
|
-
/** Group a body tree into anchored sections. */
|
|
58
|
+
/** Group a body tree into anchored sections split at depth ≤ 2 headings. */
|
|
135
59
|
function sectionize(root) {
|
|
136
60
|
const sections = [];
|
|
137
61
|
let current = null;
|
|
138
62
|
for (const node of root.children) {
|
|
139
|
-
if (node.type === 'heading' &&
|
|
63
|
+
if (node.type === 'heading' && node.depth <= 2) {
|
|
140
64
|
if (current)
|
|
141
65
|
sections.push(current);
|
|
142
|
-
current = { key: sectionKey(node)
|
|
66
|
+
current = { key: sectionKey(node), nodes: [node] };
|
|
143
67
|
}
|
|
144
68
|
else if (current) {
|
|
145
69
|
current.nodes.push(node);
|
|
@@ -165,9 +89,7 @@ function omittedStub(keys) {
|
|
|
165
89
|
}
|
|
166
90
|
/**
|
|
167
91
|
* Serve an entity MDX document with only the requested sections, props
|
|
168
|
-
* first. `include` names sections by key;
|
|
169
|
-
* served, so a multi-template component returns each template's props rather
|
|
170
|
-
* than the first match only. Absent `include` means `['props']`;
|
|
92
|
+
* first. `include` names sections by key; absent means `['props']`;
|
|
171
93
|
* `['all']` serves everything. Omitted section keys are enumerated at the
|
|
172
94
|
* end so a caller can request them. A body the parser cannot handle is
|
|
173
95
|
* served verbatim — fallback, never an error.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"selectSections.js","sourceRoot":"","sources":["../../src/mdx/selectSections.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"selectSections.js","sourceRoot":"","sources":["../../src/mdx/selectSections.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,WAAW,MAAM,cAAc,CAAC;AAC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,CAAC;AACvC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@knapsack/source-conflicts-adapter",
|
|
3
3
|
"description": "Source conflicts ContextSrcAdapter — detect and compare entity conflicts across sources.",
|
|
4
|
-
"version": "4.100.4--canary.
|
|
4
|
+
"version": "4.100.4--canary.7934.dbdc23f.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"types": "dist/index.d.ts",
|
|
@@ -23,8 +23,8 @@
|
|
|
23
23
|
},
|
|
24
24
|
"author": "Knapsack (https://www.knapsack.cloud)",
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@knapsack/adapter-core": "4.100.4--canary.
|
|
27
|
-
"@knapsack/utils": "4.100.4--canary.
|
|
26
|
+
"@knapsack/adapter-core": "4.100.4--canary.7934.dbdc23f.0",
|
|
27
|
+
"@knapsack/utils": "4.100.4--canary.7934.dbdc23f.0",
|
|
28
28
|
"diff": "^8.0.3",
|
|
29
29
|
"fast-json-stable-stringify": "^2.1.0",
|
|
30
30
|
"gray-matter": "^4.0.3",
|
|
@@ -40,8 +40,8 @@
|
|
|
40
40
|
"yaml": "^2.8.4"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
|
-
"@knapsack/eslint-config-starter": "4.100.4--canary.
|
|
44
|
-
"@knapsack/typescript-config-starter": "4.100.4--canary.
|
|
43
|
+
"@knapsack/eslint-config-starter": "4.100.4--canary.7934.dbdc23f.0",
|
|
44
|
+
"@knapsack/typescript-config-starter": "4.100.4--canary.7934.dbdc23f.0",
|
|
45
45
|
"@types/mdast": "^4.0.4",
|
|
46
46
|
"@types/node": "^24.13.2",
|
|
47
47
|
"eslint": "^9.20.0",
|
|
@@ -57,5 +57,5 @@
|
|
|
57
57
|
"directory": "libs/ingest-pipeline/adapters/source-conflicts",
|
|
58
58
|
"type": "git"
|
|
59
59
|
},
|
|
60
|
-
"gitHead": "
|
|
60
|
+
"gitHead": "dbdc23fc9b4e122d963f36b82455641192a91c3b"
|
|
61
61
|
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Section selection over distro entity MDX.
|
|
3
|
-
*
|
|
4
|
-
* The cases that matter here are the two shapes the knapsack adapter emits
|
|
5
|
-
* for props (see extract-components.ts):
|
|
6
|
-
*
|
|
7
|
-
* - single-template: `## Props {#.props}` at depth 2
|
|
8
|
-
* - multi-template: `### Props {#template.<slug>.props}` at depth 3, one
|
|
9
|
-
* per template, nested under `## <Title> {#template.<slug>}`
|
|
10
|
-
*
|
|
11
|
-
* A multi-template component must serve *every* template's props for
|
|
12
|
-
* `include: ['props']` — serving only the first match looks correct and
|
|
13
|
-
* silently drops contracts.
|
|
14
|
-
*/
|
|
15
|
-
export {};
|
|
16
|
-
//# sourceMappingURL=selectSections.vitest.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"selectSections.vitest.d.ts","sourceRoot":"","sources":["../../src/mdx/selectSections.vitest.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG"}
|
|
@@ -1,284 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Section selection over distro entity MDX.
|
|
3
|
-
*
|
|
4
|
-
* The cases that matter here are the two shapes the knapsack adapter emits
|
|
5
|
-
* for props (see extract-components.ts):
|
|
6
|
-
*
|
|
7
|
-
* - single-template: `## Props {#.props}` at depth 2
|
|
8
|
-
* - multi-template: `### Props {#template.<slug>.props}` at depth 3, one
|
|
9
|
-
* per template, nested under `## <Title> {#template.<slug>}`
|
|
10
|
-
*
|
|
11
|
-
* A multi-template component must serve *every* template's props for
|
|
12
|
-
* `include: ['props']` — serving only the first match looks correct and
|
|
13
|
-
* silently drops contracts.
|
|
14
|
-
*/
|
|
15
|
-
import { describe, it, expect } from 'vitest';
|
|
16
|
-
import { selectSections } from './selectSections.js';
|
|
17
|
-
/**
|
|
18
|
-
* `selectSections` preserves frontmatter verbatim, so each fixture carries its
|
|
19
|
-
* own title rather than sharing one. A Chiclet fixture claiming `title: Tabs`
|
|
20
|
-
* only makes a failure harder to read.
|
|
21
|
-
*/
|
|
22
|
-
function frontmatter(title) {
|
|
23
|
-
return `---
|
|
24
|
-
entityKind: COMPONENT
|
|
25
|
-
title: ${title}
|
|
26
|
-
platform: react
|
|
27
|
-
---
|
|
28
|
-
`;
|
|
29
|
-
}
|
|
30
|
-
const TABS_FRONTMATTER = frontmatter('Tabs');
|
|
31
|
-
const CHICLET_FRONTMATTER = frontmatter('Chiclet');
|
|
32
|
-
const WIDGET_FRONTMATTER = frontmatter('Widget');
|
|
33
|
-
/**
|
|
34
|
-
* Two templates, each with a prop name unique to that template.
|
|
35
|
-
*
|
|
36
|
-
* The heading/anchor shape below is not invented — it mirrors what the ingest
|
|
37
|
-
* pipeline actually emits into a distro build, verified by the protocol
|
|
38
|
-
* evidence harness at
|
|
39
|
-
* `apps/mcp/mcp-remote-server/tests/protocol-evidence/` (build-distro.sh drives
|
|
40
|
-
* real source input through parse -> transform -> mount -> detect -> build and
|
|
41
|
-
* prints the emitted headings). Emission for a 2-template component:
|
|
42
|
-
*
|
|
43
|
-
* ## <TemplateTitle> {#template.<slug>}
|
|
44
|
-
* ### <DemoTitle> {#snippets.<slug>.<demoslug>} <- depth 3
|
|
45
|
-
* ### Props {#template.<slug>.props} <- depth 3
|
|
46
|
-
*
|
|
47
|
-
* Keep this fixture in step with that harness: a unit test asserting on a
|
|
48
|
-
* shape the pipeline never emits is worse than no unit test.
|
|
49
|
-
*/
|
|
50
|
-
const MULTI_TEMPLATE_MDX = `${TABS_FRONTMATTER}
|
|
51
|
-
# Tabs {#description}
|
|
52
|
-
|
|
53
|
-
Long usage prose lives here.
|
|
54
|
-
|
|
55
|
-
## Status {#status}
|
|
56
|
-
|
|
57
|
-
| Status Set | Value |
|
|
58
|
-
|------------|-------|
|
|
59
|
-
| Design | Ready |
|
|
60
|
-
|
|
61
|
-
## TabsBar {#template.tabsbar}
|
|
62
|
-
|
|
63
|
-
\`import { TabsBar } from '@acme/tabs'\`
|
|
64
|
-
|
|
65
|
-
### Default {#snippets.tabsbar.default}
|
|
66
|
-
|
|
67
|
-
| Prop | Value |
|
|
68
|
-
|------|-------|
|
|
69
|
-
| tabsBarOrientation | \`"horizontal"\` |
|
|
70
|
-
|
|
71
|
-
### Props {#template.tabsbar.props}
|
|
72
|
-
|
|
73
|
-
| Prop | Type | Required |
|
|
74
|
-
|------|------|----------|
|
|
75
|
-
| tabsBarOrientation | string | No |
|
|
76
|
-
|
|
77
|
-
## TabsLink {#template.tabslink}
|
|
78
|
-
|
|
79
|
-
\`import { TabsLink } from '@acme/tabs'\`
|
|
80
|
-
|
|
81
|
-
### Default {#snippets.tabslink.default}
|
|
82
|
-
|
|
83
|
-
| Prop | Value |
|
|
84
|
-
|------|-------|
|
|
85
|
-
| tabsLinkHref | \`"/home"\` |
|
|
86
|
-
|
|
87
|
-
### Props {#template.tabslink.props}
|
|
88
|
-
|
|
89
|
-
| Prop | Type | Required |
|
|
90
|
-
|------|------|----------|
|
|
91
|
-
| tabsLinkHref | string | Yes |
|
|
92
|
-
`;
|
|
93
|
-
/**
|
|
94
|
-
* The depth-2 shape that serves the majority of React docs today — also
|
|
95
|
-
* verified against real distro emission (`## Props {#.props}`, with snippets
|
|
96
|
-
* under `## Snippets {#snippets}` / `### <demo> {#snippets.<demoslug>}`).
|
|
97
|
-
*/
|
|
98
|
-
const SINGLE_TEMPLATE_MDX = `${CHICLET_FRONTMATTER}
|
|
99
|
-
# Chiclet {#description}
|
|
100
|
-
|
|
101
|
-
A compact product option tile.
|
|
102
|
-
|
|
103
|
-
## Status {#status}
|
|
104
|
-
|
|
105
|
-
| Status Set | Value |
|
|
106
|
-
|------------|-------|
|
|
107
|
-
| Design | Ready |
|
|
108
|
-
|
|
109
|
-
## Snippets {#snippets}
|
|
110
|
-
|
|
111
|
-
### Default {#snippets.default}
|
|
112
|
-
|
|
113
|
-
| Prop | Value |
|
|
114
|
-
|------|-------|
|
|
115
|
-
| variant | \`"medium"\` |
|
|
116
|
-
|
|
117
|
-
## Props {#.props}
|
|
118
|
-
|
|
119
|
-
| Prop | Type | Required |
|
|
120
|
-
|------|------|----------|
|
|
121
|
-
| chicletVariant | string | No |
|
|
122
|
-
|
|
123
|
-
## Slots {#.slots}
|
|
124
|
-
|
|
125
|
-
| Slot | Title |
|
|
126
|
-
|------|-------|
|
|
127
|
-
| children | Children |
|
|
128
|
-
`;
|
|
129
|
-
describe('selectSections — multi-template (depth-3) props', () => {
|
|
130
|
-
it('serves props from EVERY template, not just the first match', () => {
|
|
131
|
-
const out = selectSections({
|
|
132
|
-
content: MULTI_TEMPLATE_MDX,
|
|
133
|
-
include: ['props'],
|
|
134
|
-
});
|
|
135
|
-
expect(out).toContain('tabsBarOrientation');
|
|
136
|
-
expect(out).toContain('tabsLinkHref');
|
|
137
|
-
// Both props tables, each still carrying its template-qualified anchor.
|
|
138
|
-
expect(out).toContain('{#template.tabsbar.props}');
|
|
139
|
-
expect(out).toContain('{#template.tabslink.props}');
|
|
140
|
-
});
|
|
141
|
-
it('serves props by default (no include) for a multi-template component', () => {
|
|
142
|
-
const out = selectSections({ content: MULTI_TEMPLATE_MDX });
|
|
143
|
-
expect(out).toContain('tabsBarOrientation');
|
|
144
|
-
expect(out).toContain('tabsLinkHref');
|
|
145
|
-
expect(out).not.toContain('Long usage prose');
|
|
146
|
-
});
|
|
147
|
-
it('enumerates props in the section vocabulary instead of hiding it', () => {
|
|
148
|
-
const out = selectSections({
|
|
149
|
-
content: MULTI_TEMPLATE_MDX,
|
|
150
|
-
include: ['status'],
|
|
151
|
-
});
|
|
152
|
-
expect(out).toMatch(/omitted sections/i);
|
|
153
|
-
const stub = /Omitted sections \(request via include\): (.+)\./.exec(out);
|
|
154
|
-
expect(stub).not.toBeNull();
|
|
155
|
-
const keys = stub[1].split(', ');
|
|
156
|
-
expect(keys).toContain('props');
|
|
157
|
-
expect(keys).toContain('template');
|
|
158
|
-
expect(keys).toContain('description');
|
|
159
|
-
});
|
|
160
|
-
it('keeps template body (import line) reachable under the template key', () => {
|
|
161
|
-
const out = selectSections({
|
|
162
|
-
content: MULTI_TEMPLATE_MDX,
|
|
163
|
-
include: ['template'],
|
|
164
|
-
});
|
|
165
|
-
expect(out).toContain("import { TabsBar } from '@acme/tabs'");
|
|
166
|
-
expect(out).toContain("import { TabsLink } from '@acme/tabs'");
|
|
167
|
-
// The nested props/snippets are their own sections now, not template body.
|
|
168
|
-
expect(out).not.toContain('tabsLinkHref');
|
|
169
|
-
});
|
|
170
|
-
it('groups multi-template snippets under the snippets key', () => {
|
|
171
|
-
const out = selectSections({
|
|
172
|
-
content: MULTI_TEMPLATE_MDX,
|
|
173
|
-
include: ['snippets'],
|
|
174
|
-
});
|
|
175
|
-
expect(out).toContain('{#snippets.tabsbar.default}');
|
|
176
|
-
});
|
|
177
|
-
it('include ["all"] serves everything with props first', () => {
|
|
178
|
-
const out = selectSections({
|
|
179
|
-
content: MULTI_TEMPLATE_MDX,
|
|
180
|
-
include: ['all'],
|
|
181
|
-
});
|
|
182
|
-
expect(out).toContain('Long usage prose');
|
|
183
|
-
expect(out).toContain('tabsBarOrientation');
|
|
184
|
-
expect(out).toContain('tabsLinkHref');
|
|
185
|
-
expect(out.indexOf('{#template.tabsbar.props}')).toBeLessThan(out.indexOf('# Tabs {#description}'));
|
|
186
|
-
expect(out).not.toMatch(/omitted sections/i);
|
|
187
|
-
});
|
|
188
|
-
});
|
|
189
|
-
describe('selectSections — single-template (depth-2) regression', () => {
|
|
190
|
-
it('still selects depth-2 props by default', () => {
|
|
191
|
-
const out = selectSections({ content: SINGLE_TEMPLATE_MDX });
|
|
192
|
-
expect(out).toContain('chicletVariant');
|
|
193
|
-
expect(out).toContain('## Props {#.props}');
|
|
194
|
-
expect(out).not.toContain('A compact product option tile');
|
|
195
|
-
expect(out).not.toContain('## Slots');
|
|
196
|
-
});
|
|
197
|
-
it('keeps anchored depth-3 snippet children inside the snippets section', () => {
|
|
198
|
-
const out = selectSections({
|
|
199
|
-
content: SINGLE_TEMPLATE_MDX,
|
|
200
|
-
include: ['snippets'],
|
|
201
|
-
});
|
|
202
|
-
expect(out).toContain('## Snippets {#snippets}');
|
|
203
|
-
expect(out).toContain('### Default {#snippets.default}');
|
|
204
|
-
expect(out).toContain('variant');
|
|
205
|
-
});
|
|
206
|
-
it('keeps slots addressable', () => {
|
|
207
|
-
const out = selectSections({
|
|
208
|
-
content: SINGLE_TEMPLATE_MDX,
|
|
209
|
-
include: ['slots'],
|
|
210
|
-
});
|
|
211
|
-
expect(out).toContain('| children | Children |');
|
|
212
|
-
});
|
|
213
|
-
it('preserves frontmatter verbatim', () => {
|
|
214
|
-
const out = selectSections({ content: SINGLE_TEMPLATE_MDX });
|
|
215
|
-
expect(out.startsWith(CHICLET_FRONTMATTER)).toBe(true);
|
|
216
|
-
});
|
|
217
|
-
});
|
|
218
|
-
describe('selectSections — anchor grammar edge cases', () => {
|
|
219
|
-
it('normalizes tab.* anchors to the tabs key', () => {
|
|
220
|
-
const content = `${TABS_FRONTMATTER}
|
|
221
|
-
# Tabs {#description}
|
|
222
|
-
|
|
223
|
-
## Overview {#tab.overview}
|
|
224
|
-
|
|
225
|
-
Overview prose.
|
|
226
|
-
|
|
227
|
-
## Figma {#tab.figma}
|
|
228
|
-
|
|
229
|
-
Figma prose.
|
|
230
|
-
`;
|
|
231
|
-
const out = selectSections({ content, include: ['tabs'] });
|
|
232
|
-
expect(out).toContain('Overview prose');
|
|
233
|
-
expect(out).toContain('Figma prose');
|
|
234
|
-
});
|
|
235
|
-
it('does not split at an unqualified depth-3 anchor', () => {
|
|
236
|
-
const content = `${WIDGET_FRONTMATTER}
|
|
237
|
-
# Widget {#description}
|
|
238
|
-
|
|
239
|
-
## Overview {#tab.overview}
|
|
240
|
-
|
|
241
|
-
### Accessibility {#accessibility-notes}
|
|
242
|
-
|
|
243
|
-
Nested prose.
|
|
244
|
-
`;
|
|
245
|
-
const out = selectSections({ content, include: ['tabs'] });
|
|
246
|
-
expect(out).toContain('Nested prose');
|
|
247
|
-
});
|
|
248
|
-
it('does not split at an unanchored depth-3 heading', () => {
|
|
249
|
-
const content = `${WIDGET_FRONTMATTER}
|
|
250
|
-
# Widget {#description}
|
|
251
|
-
|
|
252
|
-
## Overview {#tab.overview}
|
|
253
|
-
|
|
254
|
-
### Plain Subhead
|
|
255
|
-
|
|
256
|
-
Nested prose.
|
|
257
|
-
`;
|
|
258
|
-
const out = selectSections({ content, include: ['tabs'] });
|
|
259
|
-
expect(out).toContain('Nested prose');
|
|
260
|
-
});
|
|
261
|
-
it('keeps a qualified child anchor inside its parent vocabulary', () => {
|
|
262
|
-
// `{#props.variant}` is a child *of* props, not a `variant` vocabulary of
|
|
263
|
-
// its own — splitting here would strand the prop details behind a key no
|
|
264
|
-
// caller could guess, and leave `include: ['props']` serving a bare heading.
|
|
265
|
-
const content = `${WIDGET_FRONTMATTER}
|
|
266
|
-
# Widget {#description}
|
|
267
|
-
|
|
268
|
-
## Props {#.props}
|
|
269
|
-
|
|
270
|
-
| Prop | Type |
|
|
271
|
-
| ---- | ---- |
|
|
272
|
-
| variant | string |
|
|
273
|
-
|
|
274
|
-
### variant {#props.variant}
|
|
275
|
-
|
|
276
|
-
Controls the visual treatment.
|
|
277
|
-
`;
|
|
278
|
-
const out = selectSections({ content, include: ['props'] });
|
|
279
|
-
expect(out).toContain('Controls the visual treatment');
|
|
280
|
-
expect(out).toContain('| variant | string |');
|
|
281
|
-
expect(out).not.toMatch(/Omitted sections[^\n]*variant/);
|
|
282
|
-
});
|
|
283
|
-
});
|
|
284
|
-
//# sourceMappingURL=selectSections.vitest.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"selectSections.vitest.js","sourceRoot":"","sources":["../../src/mdx/selectSections.vitest.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAE,QAAQ,EAAE,EAAE,EA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