@mirrordown/remd-tabs 0.0.0 → 0.1.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.
- package/CHANGELOG.md +52 -0
- package/README.md +144 -0
- package/dist/index.d.mts +2450 -0
- package/dist/index.d.mts.map +1 -0
- package/dist/index.mjs +461 -0
- package/dist/index.mjs.map +1 -0
- package/dist/tabs.css +369 -0
- package/package.json +37 -2
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":["VFileMessage","Options","Node","NodeLike","Point","Position","Error","Array","constructor","reason","options","parent","origin","place","cause","ancestors","column","fatal","file","line","ruleId","source","actual","expected","note","url","type","position","VFileMessage","Options","_$__lib_index_js0","VFile","Compatible","Data","Array","VFileMessage","Value","Map","URL","MessageOptions","Node","NodeLike","Point","Position","Error","constructor","value","cwd","data","history","messages","map","result","stored","basename","path","dirname","extname","stem","fail","reason","options","parent","origin","place","cause","info","message","toString","encoding","type","position","Options","VFile","emptyObjectSymbol","Options","MessageOptions","Compatible","VFileCompatible","DataMap","VFileDataMap","Data","VFileData","VFileOptions","ReporterSettings","VFileReporterSettings","Reporter","VFileReporter","Value","VFileValue","URL","Map","Array","file","mappings","names","sourcesContent","sourceRoot","sources","version","Record","Partial","key","basename","cwd","data","dirname","extname","history","path","stem","value","Settings","files","options","Uint8Array","createState","MdastNodes","Options","State","tree","options","wrap","Type","HastRootContent","Array","HastText","nodes","loose","Handler","MdastParents","HastElementContent","state","node","parent","Handlers","Record","Partial","VFile","FootnoteBackContentTemplate","FootnoteBackLabelTemplate","HastProperties","allowDangerousHtml","clobberPrefix","file","footnoteBackContent","footnoteBackLabel","footnoteLabel","footnoteLabelProperties","footnoteLabelTagName","handlers","passThrough","unknownHandler","HastNodes","HastElement","MdastDefinition","Map","MdastFootnoteDefinition","all","applyData","from","to","definitionById","footnoteById","footnoteCounts","footnoteOrder","one","patch","Nodes","RootContent","Text","Parents","ElementContent","Properties","Element","Definition","FootnoteDefinition","defaultFootnoteBackContent","ElementContent","Array","_","rereferenceIndex","defaultFootnoteBackLabel","referenceIndex","footer","State","Element","state","FootnoteBackContentTemplate","FootnoteBackLabelTemplate","Data","ElementContent","Literal","Properties","FootnoteBackContentTemplate","FootnoteBackLabelTemplate","Handler","Handlers","Options","State","handlers","defaultHandlers","defaultFootnoteBackContent","defaultFootnoteBackLabel","toHast","Raw","RawData","type","data","_0","ElementData","meta","ElementContentMap","raw","RootContentMap","sideEffect","_1","hChildren","hName","hProperties"],"sources":["../../../node_modules/vfile-message/lib/index.d.ts","../../../node_modules/vfile-message/index.d.ts","../../../node_modules/vfile/lib/index.d.ts","../../../node_modules/vfile/index.d.ts","../../../node_modules/mdast-util-to-hast/lib/state.d.ts","../../../node_modules/mdast-util-to-hast/lib/footer.d.ts","../../../node_modules/mdast-util-to-hast/index.d.ts","../src/types.ts","../src/index.ts"],"x_google_ignoreList":[0,1,2,3,4,5,6],"mappings":";;;;;;;;;cAGaA,YAAAA,SAAqBM,KAAAA;;;AAAlC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAuDIE,WAAAA,CAAYC,MAAAA,UAAgBC,OAAAA,GAAUT,SAAAA;EA4N+CW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsMzF;;;;;;;;;AAOA;;;;;;;;;;;EAlXIJ,WAAAA,CAAYC,MAAAA,UAAgBE,MAAAA,EAAQT,IAAAA,GAAOC,UAAAA,qBAA6BS,MAAAA;EAsXtDV;;;;;;;;;;;;;ACtetB;;;;;;;;ACDA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EFwKIM,WAAAA,CAAYC,MAAAA,UAAgBI,KAAAA,EAAOT,KAAAA,GAAQC,QAAAA,qBAA6BO,MAAAA;EEqqBduB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EF9mB1D3B,WAAAA,CAAYC,MAAAA,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;;;;;;IM7VAuM,WAAAA,GAAc1B,UAAAA;EAAAA;AAAAA;;;UCxFD,WAAA;EACf,cAAA;AAAA;AAAA,UAKe,YAAA;EACf,IAAA;EACA,KAAA;EACA,cAAA;EACA,OAAA;EACA,OAAA;EACA,QAAA,EAAU,YAAA;EACV,IAAA;IAAS,SAAA;IAAoB,WAAA,GAAc,UAAA;EAAA;AAAA;AAAA,UAG5B,YAAA;EACf,IAAA;EACA,KAAA;EACA,KAAA,EAAO,eAAA;EACP,SAAA;EACA,IAAA;EACA,QAAA,EAAU,KAAA,CAAM,YAAA,GAAe,iBAAA,GAAoB,YAAA;EACnD,IAAA;IACE,SAAA;IACA,UAAA,GAAa,eAAA;IACb,cAAA;IACA,WAAA,GAAc,UAAA;EAAA;AAAA;AAAA;EAAA,UAMN,cAAA;IACR,QAAA,EAAU,YAAA;IACV,QAAA,EAAU,YAAA;EAAA;EAAA,UAEF,eAAA;IACR,QAAA,EAAU,YAAA;EAAA;AAAA;;;cC0iBD,UAAA,EAAY,MAAA,EAAQ,WAAA,IAAe,IAAA;AAAA,cAyJnC,gBAAA;EAAA,2BACK,KAAA,EAAK,IAAA,EAAQ,YAAA,KAAe,cAAA;AAAA"}
|
package/dist/index.mjs
ADDED
|
@@ -0,0 +1,461 @@
|
|
|
1
|
+
import { visit } from "unist-util-visit";
|
|
2
|
+
//#region src/utils.ts
|
|
3
|
+
const TAB_HEADER_RE = /^(%{1,6})(\+)? (.*)/;
|
|
4
|
+
const parseTabHeader = (line) => {
|
|
5
|
+
const m = TAB_HEADER_RE.exec(line);
|
|
6
|
+
if (!m) return null;
|
|
7
|
+
return {
|
|
8
|
+
depth: m[1].length,
|
|
9
|
+
open: m[2] === "+",
|
|
10
|
+
label: m[3]
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
const djb2 = (str) => {
|
|
14
|
+
let h = 5381;
|
|
15
|
+
for (let i = 0; i < str.length; i++) h = (h << 5) + h + str.charCodeAt(i) >>> 0;
|
|
16
|
+
return h;
|
|
17
|
+
};
|
|
18
|
+
const stripAttrs = (text) => text.replace(/\s*\{[^}]*\}\s*$/, "").trimEnd();
|
|
19
|
+
const slugify = (text) => text.toLowerCase().trim().replace(/[^\w\s-]/g, "").replace(/[\s_]+/g, "-").replace(/^-+|-+$/g, "");
|
|
20
|
+
const groupId = (labels) => {
|
|
21
|
+
return djb2([...labels].map(slugify).sort().join("-")).toString(16);
|
|
22
|
+
};
|
|
23
|
+
const blockId = (startLine, gId) => {
|
|
24
|
+
return "tabs-" + djb2(`${startLine}:${gId}`).toString(16);
|
|
25
|
+
};
|
|
26
|
+
//#endregion
|
|
27
|
+
//#region src/index.ts
|
|
28
|
+
const paraToLines = (para) => {
|
|
29
|
+
const segs = [];
|
|
30
|
+
for (const child of para.children) if (child.type === "text") {
|
|
31
|
+
const parts = child.value.split("\n");
|
|
32
|
+
for (let p = 0; p < parts.length; p++) {
|
|
33
|
+
if (p > 0) segs.push(null);
|
|
34
|
+
if (parts[p] !== "") segs.push({
|
|
35
|
+
type: "text",
|
|
36
|
+
value: parts[p]
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
} else if (child.type === "break") segs.push(null);
|
|
40
|
+
else segs.push(child);
|
|
41
|
+
const lines = [[]];
|
|
42
|
+
for (const seg of segs) if (seg === null) lines.push([]);
|
|
43
|
+
else lines[lines.length - 1].push(seg);
|
|
44
|
+
return lines;
|
|
45
|
+
};
|
|
46
|
+
const toPlainText = (nodes) => nodes.map((n) => {
|
|
47
|
+
if (n.type === "text" || n.type === "inlineCode") return "value" in n ? n.value : "";
|
|
48
|
+
if ("children" in n) return toPlainText(n.children);
|
|
49
|
+
return "";
|
|
50
|
+
}).join("");
|
|
51
|
+
const extractHeaderPara = (para, requireDepthOne = true, prevDepth = 0) => {
|
|
52
|
+
const lines = paraToLines(para);
|
|
53
|
+
const tabs = [];
|
|
54
|
+
let currentDepth = prevDepth;
|
|
55
|
+
for (const lineSegs of lines) {
|
|
56
|
+
const first = lineSegs[0];
|
|
57
|
+
if (first?.type !== "text") return null;
|
|
58
|
+
const header = parseTabHeader(first.value);
|
|
59
|
+
if (!header) return null;
|
|
60
|
+
const { depth, open } = header;
|
|
61
|
+
if (tabs.length === 0 && requireDepthOne && depth !== 1) return null;
|
|
62
|
+
if (depth > currentDepth + 1) break;
|
|
63
|
+
currentDepth = depth;
|
|
64
|
+
const labelText = header.label;
|
|
65
|
+
const labelNodes = labelText ? [{
|
|
66
|
+
type: "text",
|
|
67
|
+
value: labelText
|
|
68
|
+
}, ...lineSegs.slice(1)] : lineSegs.slice(1);
|
|
69
|
+
tabs.push({
|
|
70
|
+
depth,
|
|
71
|
+
open,
|
|
72
|
+
labelNodes,
|
|
73
|
+
labelText: toPlainText(labelNodes),
|
|
74
|
+
body: []
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
return tabs.length > 0 ? tabs : null;
|
|
78
|
+
};
|
|
79
|
+
const isExplicitBQ = (bq) => bq.children.some((child) => {
|
|
80
|
+
if (child.type !== "paragraph") return false;
|
|
81
|
+
const first = child.children[0];
|
|
82
|
+
return first?.type === "text" && parseTabHeader(first.value.split("\n")[0]) !== null;
|
|
83
|
+
});
|
|
84
|
+
const extractTrailingTabHeader = (node) => {
|
|
85
|
+
const path = [];
|
|
86
|
+
let current = node;
|
|
87
|
+
while ("children" in current && current.children.length > 0) {
|
|
88
|
+
const last = current.children[current.children.length - 1];
|
|
89
|
+
if (last.type === "paragraph") {
|
|
90
|
+
path.push(current);
|
|
91
|
+
const lines = paraToLines(last);
|
|
92
|
+
const lastLine = lines[lines.length - 1];
|
|
93
|
+
if (!lastLine) return null;
|
|
94
|
+
const first = lastLine[0];
|
|
95
|
+
if (first?.type !== "text") return null;
|
|
96
|
+
const header = parseTabHeader(first.value);
|
|
97
|
+
if (!header) return null;
|
|
98
|
+
const labelText = header.label;
|
|
99
|
+
const labelNodes = labelText ? [{
|
|
100
|
+
type: "text",
|
|
101
|
+
value: labelText
|
|
102
|
+
}, ...lastLine.slice(1)] : lastLine.slice(1);
|
|
103
|
+
return {
|
|
104
|
+
header: {
|
|
105
|
+
depth: header.depth,
|
|
106
|
+
open: header.open,
|
|
107
|
+
labelNodes,
|
|
108
|
+
labelText: toPlainText(labelNodes),
|
|
109
|
+
body: []
|
|
110
|
+
},
|
|
111
|
+
truncatedPara: buildParagraph(lines.slice(0, -1)),
|
|
112
|
+
path
|
|
113
|
+
};
|
|
114
|
+
}
|
|
115
|
+
if (!("children" in last)) break;
|
|
116
|
+
path.push(current);
|
|
117
|
+
current = last;
|
|
118
|
+
}
|
|
119
|
+
return null;
|
|
120
|
+
};
|
|
121
|
+
const splitBlockquote = (bq, explicit) => {
|
|
122
|
+
const segments = [];
|
|
123
|
+
let currentSegment = {
|
|
124
|
+
header: null,
|
|
125
|
+
body: [],
|
|
126
|
+
explicit
|
|
127
|
+
};
|
|
128
|
+
for (const child of bq.children) {
|
|
129
|
+
if (child.type !== "paragraph") {
|
|
130
|
+
const extracted = extractTrailingTabHeader(child);
|
|
131
|
+
if (extracted) {
|
|
132
|
+
const cloned = JSON.parse(JSON.stringify(child));
|
|
133
|
+
let target = cloned;
|
|
134
|
+
for (let pi = 1; pi < extracted.path.length; pi++) target = target.children[target.children.length - 1];
|
|
135
|
+
const deepestParent = target;
|
|
136
|
+
if (extracted.truncatedPara) deepestParent.children[deepestParent.children.length - 1] = extracted.truncatedPara;
|
|
137
|
+
else deepestParent.children.splice(deepestParent.children.length - 1, 1);
|
|
138
|
+
currentSegment.body.push(cloned);
|
|
139
|
+
segments.push(currentSegment);
|
|
140
|
+
currentSegment = {
|
|
141
|
+
header: extracted.header,
|
|
142
|
+
body: [],
|
|
143
|
+
explicit
|
|
144
|
+
};
|
|
145
|
+
} else currentSegment.body.push(child);
|
|
146
|
+
continue;
|
|
147
|
+
}
|
|
148
|
+
const lines = paraToLines(child);
|
|
149
|
+
let bodyLines = [];
|
|
150
|
+
for (const lineSegs of lines) {
|
|
151
|
+
const first = lineSegs[0];
|
|
152
|
+
if (first?.type === "text") {
|
|
153
|
+
const header = parseTabHeader(first.value);
|
|
154
|
+
if (header) {
|
|
155
|
+
if (bodyLines.length > 0) {
|
|
156
|
+
const bodyPara = buildParagraph(bodyLines);
|
|
157
|
+
if (bodyPara) currentSegment.body.push(bodyPara);
|
|
158
|
+
bodyLines = [];
|
|
159
|
+
}
|
|
160
|
+
segments.push(currentSegment);
|
|
161
|
+
const labelText = header.label;
|
|
162
|
+
const labelNodes = labelText ? [{
|
|
163
|
+
type: "text",
|
|
164
|
+
value: labelText
|
|
165
|
+
}, ...lineSegs.slice(1)] : lineSegs.slice(1);
|
|
166
|
+
currentSegment = {
|
|
167
|
+
header: {
|
|
168
|
+
depth: header.depth,
|
|
169
|
+
open: header.open,
|
|
170
|
+
labelNodes,
|
|
171
|
+
labelText: toPlainText(labelNodes),
|
|
172
|
+
body: []
|
|
173
|
+
},
|
|
174
|
+
body: [],
|
|
175
|
+
explicit
|
|
176
|
+
};
|
|
177
|
+
continue;
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
bodyLines.push(lineSegs);
|
|
181
|
+
}
|
|
182
|
+
if (bodyLines.length > 0) {
|
|
183
|
+
const bodyPara = buildParagraph(bodyLines);
|
|
184
|
+
if (bodyPara) currentSegment.body.push(bodyPara);
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
segments.push(currentSegment);
|
|
188
|
+
return segments;
|
|
189
|
+
};
|
|
190
|
+
const buildParagraph = (lines) => {
|
|
191
|
+
const children = [];
|
|
192
|
+
for (let i = 0; i < lines.length; i++) {
|
|
193
|
+
if (i > 0) children.push({
|
|
194
|
+
type: "text",
|
|
195
|
+
value: "\n"
|
|
196
|
+
});
|
|
197
|
+
children.push(...lines[i]);
|
|
198
|
+
}
|
|
199
|
+
if (children.length === 0) return null;
|
|
200
|
+
return {
|
|
201
|
+
type: "paragraph",
|
|
202
|
+
children
|
|
203
|
+
};
|
|
204
|
+
};
|
|
205
|
+
const buildTree = (rawTabs, targetDepth, start, end, containerClass, startLine) => {
|
|
206
|
+
const gId = groupId(rawTabs.slice(start, end).filter((t) => t.depth === targetDepth).map((t) => t.labelText));
|
|
207
|
+
const bId = blockId(startLine, gId);
|
|
208
|
+
const explicitOpenIdx = rawTabs.slice(start, end).findIndex((t) => t.depth === targetDepth && t.open);
|
|
209
|
+
const explicitOpenAbsIdx = explicitOpenIdx >= 0 ? start + explicitOpenIdx : -1;
|
|
210
|
+
const items = [];
|
|
211
|
+
let tabCounter = 0;
|
|
212
|
+
let i = start;
|
|
213
|
+
while (i < end) {
|
|
214
|
+
const raw = rawTabs[i];
|
|
215
|
+
if (raw.depth !== targetDepth) {
|
|
216
|
+
i++;
|
|
217
|
+
continue;
|
|
218
|
+
}
|
|
219
|
+
let childEnd = i + 1;
|
|
220
|
+
while (childEnd < end && rawTabs[childEnd].depth > targetDepth) childEnd++;
|
|
221
|
+
const isOpen = explicitOpenAbsIdx >= 0 ? i === explicitOpenAbsIdx : tabCounter === 0;
|
|
222
|
+
const bodyChildren = [...raw.body];
|
|
223
|
+
if (rawTabs.slice(i + 1, childEnd).some((t) => t.depth === targetDepth + 1)) {
|
|
224
|
+
const nested = buildTree(rawTabs, targetDepth + 1, i + 1, childEnd, containerClass, startLine);
|
|
225
|
+
nested.containerClass = containerClass;
|
|
226
|
+
bodyChildren.push(nested);
|
|
227
|
+
}
|
|
228
|
+
items.push({
|
|
229
|
+
type: "tabsItem",
|
|
230
|
+
depth: targetDepth,
|
|
231
|
+
label: raw.labelNodes,
|
|
232
|
+
labelText: raw.labelText,
|
|
233
|
+
open: isOpen,
|
|
234
|
+
children: bodyChildren,
|
|
235
|
+
data: {
|
|
236
|
+
attrsRole: "containerItem",
|
|
237
|
+
attrsTitle: raw.labelNodes,
|
|
238
|
+
attrsItemTitle: true,
|
|
239
|
+
hProperties: {}
|
|
240
|
+
}
|
|
241
|
+
});
|
|
242
|
+
tabCounter++;
|
|
243
|
+
i = childEnd;
|
|
244
|
+
}
|
|
245
|
+
return {
|
|
246
|
+
type: "tabsList",
|
|
247
|
+
depth: targetDepth,
|
|
248
|
+
groupId: gId,
|
|
249
|
+
blockId: bId,
|
|
250
|
+
children: items,
|
|
251
|
+
data: {
|
|
252
|
+
attrsRole: "container",
|
|
253
|
+
hProperties: {}
|
|
254
|
+
}
|
|
255
|
+
};
|
|
256
|
+
};
|
|
257
|
+
const processTabsInChildren = (children, containerClass, checkBlankLines = true) => {
|
|
258
|
+
const newChildren = [];
|
|
259
|
+
let i = 0;
|
|
260
|
+
while (i < children.length) {
|
|
261
|
+
const node = children[i];
|
|
262
|
+
if (node.type === "paragraph") {
|
|
263
|
+
const headerTabs = extractHeaderPara(node);
|
|
264
|
+
if (headerTabs && headerTabs.length > 0) {
|
|
265
|
+
const rawTabs = [...headerTabs];
|
|
266
|
+
const startLine = (node.position?.start.line ?? 1) - 1;
|
|
267
|
+
let j = i + 1;
|
|
268
|
+
let currentTabIdx = rawTabs.length - 1;
|
|
269
|
+
let prevEndLine = node.position?.end.line ?? 0;
|
|
270
|
+
while (j < children.length) {
|
|
271
|
+
const sibling = children[j];
|
|
272
|
+
const siblingStartLine = sibling.position?.start.line ?? prevEndLine + 1;
|
|
273
|
+
if (checkBlankLines && siblingStartLine > prevEndLine + 1) break;
|
|
274
|
+
if (sibling.type === "blockquote") {
|
|
275
|
+
const bq = sibling;
|
|
276
|
+
const explicit = isExplicitBQ(bq);
|
|
277
|
+
const segments = splitBlockquote(bq, explicit);
|
|
278
|
+
const firstSeg = segments[0];
|
|
279
|
+
if (firstSeg?.header === null) rawTabs[currentTabIdx].body.push(...firstSeg.body);
|
|
280
|
+
const depthOffset = explicit ? rawTabs[rawTabs.length - 1].depth : 0;
|
|
281
|
+
for (let s = 1; s < segments.length; s++) {
|
|
282
|
+
const seg = segments[s];
|
|
283
|
+
if (!seg.header) continue;
|
|
284
|
+
const adjustedDepth = depthOffset + seg.header.depth;
|
|
285
|
+
if (adjustedDepth > rawTabs[rawTabs.length - 1].depth + 1) continue;
|
|
286
|
+
seg.header.depth = adjustedDepth;
|
|
287
|
+
if (explicit) {
|
|
288
|
+
const deferredInnerSegs = [];
|
|
289
|
+
const escapedSegs = [];
|
|
290
|
+
for (const b of seg.body) {
|
|
291
|
+
if (b.type !== "blockquote") {
|
|
292
|
+
if (escapedSegs.length > 0) escapedSegs[escapedSegs.length - 1].body.push(b);
|
|
293
|
+
else seg.header.body.push(b);
|
|
294
|
+
continue;
|
|
295
|
+
}
|
|
296
|
+
const innerBq = b;
|
|
297
|
+
if (!isExplicitBQ(innerBq)) {
|
|
298
|
+
const innerSegs = splitBlockquote(innerBq, false);
|
|
299
|
+
const innerFirst = innerSegs[0];
|
|
300
|
+
if (innerFirst?.header === null) seg.header.body.push(...innerFirst.body);
|
|
301
|
+
for (let is = 1; is < innerSegs.length; is++) {
|
|
302
|
+
const innerSeg = innerSegs[is];
|
|
303
|
+
if (!innerSeg.header) continue;
|
|
304
|
+
if (innerSeg.body.length === 0) {
|
|
305
|
+
innerSeg.header.depth = depthOffset;
|
|
306
|
+
escapedSegs.push(innerSeg.header);
|
|
307
|
+
deferredInnerSegs.push(innerSeg);
|
|
308
|
+
continue;
|
|
309
|
+
}
|
|
310
|
+
const tentativeDepth = depthOffset + innerSeg.header.depth;
|
|
311
|
+
if (tentativeDepth > rawTabs[rawTabs.length - 1].depth + 1) continue;
|
|
312
|
+
innerSeg.header.depth = tentativeDepth;
|
|
313
|
+
innerSeg.header.body.push(...innerSeg.body);
|
|
314
|
+
deferredInnerSegs.push(innerSeg);
|
|
315
|
+
}
|
|
316
|
+
} else seg.header.body.push(...innerBq.children);
|
|
317
|
+
}
|
|
318
|
+
rawTabs.push(seg.header);
|
|
319
|
+
currentTabIdx = rawTabs.length - 1;
|
|
320
|
+
for (const innerSeg of deferredInnerSegs) {
|
|
321
|
+
if (!innerSeg.header) continue;
|
|
322
|
+
rawTabs.push(innerSeg.header);
|
|
323
|
+
currentTabIdx = rawTabs.length - 1;
|
|
324
|
+
}
|
|
325
|
+
} else {
|
|
326
|
+
seg.header.body.push(...seg.body);
|
|
327
|
+
rawTabs.push(seg.header);
|
|
328
|
+
currentTabIdx = rawTabs.length - 1;
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
prevEndLine = sibling.position?.end.line ?? prevEndLine;
|
|
332
|
+
j++;
|
|
333
|
+
} else if (sibling.type === "paragraph") {
|
|
334
|
+
const prevDepth = rawTabs[rawTabs.length - 1].depth;
|
|
335
|
+
const contHeaders = extractHeaderPara(sibling, false, prevDepth);
|
|
336
|
+
if (contHeaders && contHeaders.length > 0) {
|
|
337
|
+
rawTabs.push(...contHeaders);
|
|
338
|
+
currentTabIdx = rawTabs.length - 1;
|
|
339
|
+
prevEndLine = sibling.position?.end.line ?? prevEndLine;
|
|
340
|
+
j++;
|
|
341
|
+
continue;
|
|
342
|
+
}
|
|
343
|
+
break;
|
|
344
|
+
} else break;
|
|
345
|
+
}
|
|
346
|
+
const list = buildTree(rawTabs, 1, 0, rawTabs.length, containerClass, startLine);
|
|
347
|
+
list.containerClass = containerClass;
|
|
348
|
+
newChildren.push(list);
|
|
349
|
+
i = j;
|
|
350
|
+
continue;
|
|
351
|
+
}
|
|
352
|
+
}
|
|
353
|
+
newChildren.push(node);
|
|
354
|
+
i++;
|
|
355
|
+
}
|
|
356
|
+
children.splice(0, children.length, ...newChildren);
|
|
357
|
+
};
|
|
358
|
+
const remarkTabs = function(options = {}) {
|
|
359
|
+
const { containerClass = "markdown-tabs" } = options;
|
|
360
|
+
return (tree) => {
|
|
361
|
+
processTabsInChildren(tree.children, containerClass);
|
|
362
|
+
visit(tree, (node) => {
|
|
363
|
+
if ("children" in node && node.type !== "root") {
|
|
364
|
+
const parent = node;
|
|
365
|
+
if (parent.children.length > 0) processTabsInChildren(parent.children, containerClass, false);
|
|
366
|
+
}
|
|
367
|
+
});
|
|
368
|
+
};
|
|
369
|
+
};
|
|
370
|
+
const mergeHProperties = (base, extra) => {
|
|
371
|
+
if (!extra) return base;
|
|
372
|
+
const { class: extraClass, ...rest } = extra;
|
|
373
|
+
const result = {
|
|
374
|
+
...base,
|
|
375
|
+
...rest
|
|
376
|
+
};
|
|
377
|
+
if (extraClass) result.class = base.class ? `${String(base.class)} ${String(extraClass)}` : extraClass;
|
|
378
|
+
return result;
|
|
379
|
+
};
|
|
380
|
+
const buildTabsHast = (list, containerClass, state) => {
|
|
381
|
+
const labelChildren = [];
|
|
382
|
+
const panelChildren = [];
|
|
383
|
+
list.children.forEach((item, idx) => {
|
|
384
|
+
const labelPlain = stripAttrs(item.labelText);
|
|
385
|
+
const inputId = `${list.blockId}-${idx}`;
|
|
386
|
+
const inputProps = {
|
|
387
|
+
type: "radio",
|
|
388
|
+
name: list.blockId,
|
|
389
|
+
id: inputId,
|
|
390
|
+
hidden: true,
|
|
391
|
+
...item.open ? { checked: true } : {}
|
|
392
|
+
};
|
|
393
|
+
labelChildren.push({
|
|
394
|
+
type: "element",
|
|
395
|
+
tagName: "input",
|
|
396
|
+
properties: inputProps,
|
|
397
|
+
children: []
|
|
398
|
+
});
|
|
399
|
+
const labelProps = mergeHProperties({
|
|
400
|
+
class: `${containerClass}-label`,
|
|
401
|
+
for: inputId
|
|
402
|
+
}, item.data?.hProperties);
|
|
403
|
+
labelChildren.push({
|
|
404
|
+
type: "element",
|
|
405
|
+
tagName: "label",
|
|
406
|
+
properties: labelProps,
|
|
407
|
+
children: state.all({
|
|
408
|
+
type: "paragraph",
|
|
409
|
+
children: item.label
|
|
410
|
+
})
|
|
411
|
+
});
|
|
412
|
+
const bodyBlocks = item.children.filter((c) => c.type !== "tabsList");
|
|
413
|
+
const nestedLists = item.children.filter((c) => c.type === "tabsList");
|
|
414
|
+
const sectionChildren = [];
|
|
415
|
+
if (bodyBlocks.length > 0) sectionChildren.push(...state.all({
|
|
416
|
+
type: "root",
|
|
417
|
+
children: bodyBlocks
|
|
418
|
+
}));
|
|
419
|
+
for (const nested of nestedLists) sectionChildren.push(buildTabsHast(nested, nested.containerClass ?? containerClass, state));
|
|
420
|
+
const sectionProps = mergeHProperties({
|
|
421
|
+
class: `${containerClass}-panel`,
|
|
422
|
+
"aria-label": labelPlain
|
|
423
|
+
}, void 0);
|
|
424
|
+
panelChildren.push({
|
|
425
|
+
type: "element",
|
|
426
|
+
tagName: "section",
|
|
427
|
+
properties: sectionProps,
|
|
428
|
+
children: sectionChildren
|
|
429
|
+
});
|
|
430
|
+
});
|
|
431
|
+
const labelsDiv = {
|
|
432
|
+
type: "element",
|
|
433
|
+
tagName: "div",
|
|
434
|
+
properties: { class: `${containerClass}-labels` },
|
|
435
|
+
children: labelChildren
|
|
436
|
+
};
|
|
437
|
+
const panelsDiv = {
|
|
438
|
+
type: "element",
|
|
439
|
+
tagName: "div",
|
|
440
|
+
properties: { class: `${containerClass}-panels` },
|
|
441
|
+
children: panelChildren
|
|
442
|
+
};
|
|
443
|
+
const result = {
|
|
444
|
+
type: "element",
|
|
445
|
+
tagName: "div",
|
|
446
|
+
properties: mergeHProperties({
|
|
447
|
+
class: containerClass,
|
|
448
|
+
"data-tabs-group": list.groupId
|
|
449
|
+
}, list.data?.hProperties),
|
|
450
|
+
children: [labelsDiv, panelsDiv]
|
|
451
|
+
};
|
|
452
|
+
state.patch(list, result);
|
|
453
|
+
return result;
|
|
454
|
+
};
|
|
455
|
+
const tabsHastHandlers = { tabsList(state, node) {
|
|
456
|
+
return buildTabsHast(node, node.containerClass ?? "markdown-tabs", state);
|
|
457
|
+
} };
|
|
458
|
+
//#endregion
|
|
459
|
+
export { remarkTabs, tabsHastHandlers };
|
|
460
|
+
|
|
461
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","names":["para"],"sources":["../src/utils.ts","../src/index.ts"],"sourcesContent":["// Matches: %{1,6}+? label text (prefix-plus form: %+ Label)\n// Groups: 1=% string (depth), 2=+ (open marker, optional), 3=label text\nexport const TAB_HEADER_RE = /^(%{1,6})(\\+)? (.*)/;\n\n// Matches: > or ><space> continuation line\nexport const CONTINUATION_RE = /^> ?/;\n\nexport interface ParsedTabHeader {\n depth: number;\n open: boolean;\n label: string;\n}\n\nexport const parseTabHeader = (line: string): ParsedTabHeader | null => {\n const m = TAB_HEADER_RE.exec(line);\n if (!m) return null;\n return { depth: m[1].length, open: m[2] === \"+\", label: m[3] };\n};\n\nexport const stripContinuation = (line: string): string =>\n line.replace(/^> ?/, \"\");\n\n// djb2 hash — returns an unsigned 32-bit integer\nconst djb2 = (str: string): number => {\n let h = 5381;\n for (let i = 0; i < str.length; i++) {\n h = ((h << 5) + h + str.charCodeAt(i)) >>> 0;\n }\n return h;\n};\n\n// Strip a trailing attrs block like {.class #id} from plain label text.\nexport const stripAttrs = (text: string): string =>\n text.replace(/\\s*\\{[^}]*\\}\\s*$/, \"\").trimEnd();\n\nexport const slugify = (text: string): string =>\n text\n .toLowerCase()\n .trim()\n .replace(/[^\\w\\s-]/g, \"\")\n .replace(/[\\s_]+/g, \"-\")\n .replace(/^-+|-+$/g, \"\");\n\n// content-based: same label set → same id regardless of page position\nexport const groupId = (labels: string[]): string => {\n const key = [...labels].map(slugify).sort().join(\"-\");\n return djb2(key).toString(16);\n};\n\n// position-based: unique per block even when label sets match\nexport const blockId = (startLine: number, gId: string): string => {\n const key = `${startLine}:${gId}`;\n return \"tabs-\" + djb2(key).toString(16);\n};\n","// This plugin performs heavy tree-rewriting across mdast/hast/unist types\n// that don't unify cleanly; type assertions bridging those boundaries are\n// reviewed and intentional, so the rule is disabled file-wide rather than\n// per-cast. Defensive optional chains on array[i] accesses are also kept\n// because TS doesn't model index access as fallible (noUncheckedIndexedAccess\n// is off project-wide).\n/* oxlint-disable typescript/no-unsafe-type-assertion */\n/* oxlint-disable typescript/no-unnecessary-condition */\nimport { visit } from \"unist-util-visit\";\nimport type { Plugin } from \"unified\";\nimport type {\n Root,\n Paragraph,\n Blockquote,\n PhrasingContent,\n BlockContent,\n DefinitionContent,\n RootContent\n} from \"mdast\";\nimport type { Element, ElementContent, Properties } from \"hast\";\nimport type { Parent } from \"unist\";\nimport type { State } from \"mdast-util-to-hast\";\nimport type { TabsOptions, TabsListNode, TabsItemNode } from \"./types.js\";\nimport { parseTabHeader, stripAttrs, groupId, blockId } from \"./utils.js\";\n\nexport type { TabsOptions };\n\n// ── Raw extraction types ──────────────────────────────────────────────────────\n\ninterface RawTab {\n depth: number;\n open: boolean;\n labelNodes: PhrasingContent[]; // inline nodes for the label\n labelText: string; // plain text for aria-label / data-tab\n body: Array<BlockContent | DefinitionContent>; // blockquote contents\n}\n\n// ── Paragraph line splitting ──────────────────────────────────────────────────\n\n// Split a paragraph's inline children into lines by text \"\\n\" boundaries.\nconst paraToLines = (para: Paragraph): PhrasingContent[][] => {\n type Seg = PhrasingContent | null;\n const segs: Seg[] = [];\n\n for (const child of para.children) {\n if (child.type === \"text\") {\n const parts = child.value.split(\"\\n\");\n for (let p = 0; p < parts.length; p++) {\n if (p > 0) segs.push(null);\n if (parts[p] !== \"\") segs.push({ type: \"text\", value: parts[p] });\n }\n } else if (child.type === \"break\") {\n segs.push(null);\n } else {\n segs.push(child);\n }\n }\n\n const lines: PhrasingContent[][] = [[]];\n for (const seg of segs) {\n if (seg === null) lines.push([]);\n else lines[lines.length - 1].push(seg);\n }\n return lines;\n};\n\n// Extract plain text from PhrasingContent nodes (strips all markup)\nconst toPlainText = (nodes: PhrasingContent[]): string =>\n nodes\n .map((n) => {\n if (n.type === \"text\" || n.type === \"inlineCode\")\n return \"value\" in n ? n.value : \"\";\n if (\"children\" in n) return toPlainText(n.children);\n return \"\";\n })\n .join(\"\");\n\n// ── Tab group extraction ──────────────────────────────────────────────────────\n\n// Parse a paragraph node that consists entirely of % tab headers (no body\n// content). Returns null if the paragraph isn't all headers.\n// requireDepthOne: if true, the first header must be depth 1 (top-level group start).\n// If false, allows any starting depth (for continuation paragraphs).\nconst extractHeaderPara = (\n para: Paragraph,\n requireDepthOne = true,\n prevDepth = 0\n): RawTab[] | null => {\n const lines = paraToLines(para);\n const tabs: RawTab[] = [];\n let currentDepth = prevDepth;\n\n for (const lineSegs of lines) {\n const first = lineSegs[0];\n if (first?.type !== \"text\") return null;\n\n const header = parseTabHeader(first.value);\n if (!header) return null;\n\n const { depth, open } = header;\n if (tabs.length === 0 && requireDepthOne && depth !== 1) return null;\n if (depth > currentDepth + 1) break;\n currentDepth = depth;\n\n const labelText = header.label;\n const labelNodes: PhrasingContent[] = labelText\n ? [{ type: \"text\", value: labelText }, ...lineSegs.slice(1)]\n : lineSegs.slice(1);\n\n tabs.push({\n depth,\n open,\n labelNodes,\n labelText: toPlainText(labelNodes),\n body: []\n });\n }\n\n return tabs.length > 0 ? tabs : null;\n};\n\n// Split a blockquote node into segments separated by % tab header lines.\n// Each segment is { header: RawTab | null, body: blockquote-like children }.\n//\n// Remark absorbs adjacent non-blank lines into a blockquote, so:\n// % Tab One\n// > Content for tab one.\n// % Tab Two\n// > Content for tab two.\n//\n// Produces: paragraph(\"% Tab One\") + blockquote containing:\n// paragraph(\"Content for tab one.\\n% Tab Two\\nContent for tab two.\")\n//\n// We need to split that paragraph on lines matching tab headers, then\n// reconstruct the body content for each segment.\ninterface BQSegment {\n header: RawTab | null; // null means pre-header content (goes to prev tab)\n body: Array<BlockContent | DefinitionContent>;\n // true when this blockquote was written with explicit `> %` nesting (multiple\n // block children) rather than being the standard absorbed-tabs pattern where\n // remark collapses consecutive `% Tab\\n> body` lines into one blockquote.\n // Used to apply a depth offset and to unwrap nested blockquote bodies.\n explicit: boolean;\n}\n\n// A blockquote is \"explicit\" (`> % Label` nesting) when at least one of its\n// direct paragraph children starts with a tab header. The absorbed pattern\n// (remark collapsing consecutive `% Tab\\n> body` lines into one blockquote)\n// never produces standalone header paragraphs — headers are only embedded\n// inside multi-line text nodes.\nconst isExplicitBQ = (bq: Blockquote): boolean =>\n bq.children.some((child) => {\n if (child.type !== \"paragraph\") return false;\n const first = child.children[0];\n return (\n first?.type === \"text\" &&\n parseTabHeader(first.value.split(\"\\n\")[0]) !== null\n );\n });\n\n// Walk to the deepest last child of a node and return its paragraph if it\n// has a trailing tab header line, along with the truncated paragraph and the\n// extracted RawTab header. Returns null if no trailing tab header is found.\n// This handles cases where remark plugins (e.g. remarkDefinitionList) transform\n// absorbed paragraphs into custom nodes — the trailing \"% Code\" line ends up\n// inside a nested paragraph rather than at the blockquote's top level.\nconst extractTrailingTabHeader = (\n node: BlockContent | DefinitionContent\n): {\n header: RawTab;\n truncatedPara: Paragraph | null;\n path: Array<BlockContent | DefinitionContent>;\n} | null => {\n // Walk to the deepest last child that is a paragraph\n const path: Array<BlockContent | DefinitionContent> = [];\n let current: BlockContent | DefinitionContent = node;\n while (\"children\" in current && current.children.length > 0) {\n const last = current.children[current.children.length - 1] as\n | BlockContent\n | DefinitionContent;\n if (last.type === \"paragraph\") {\n path.push(current);\n // Check if this paragraph's last line is a tab header\n const para = last;\n const lines = paraToLines(para);\n const lastLine = lines[lines.length - 1];\n if (!lastLine) return null;\n const first = lastLine[0];\n if (first?.type !== \"text\") return null;\n const header = parseTabHeader(first.value);\n if (!header) return null;\n const labelText = header.label;\n const labelNodes: PhrasingContent[] = labelText\n ? [{ type: \"text\", value: labelText }, ...lastLine.slice(1)]\n : lastLine.slice(1);\n const rawTab: RawTab = {\n depth: header.depth,\n open: header.open,\n labelNodes,\n labelText: toPlainText(labelNodes),\n body: []\n };\n // Build truncated paragraph without the last line\n const truncatedLines = lines.slice(0, -1);\n const truncatedPara = buildParagraph(truncatedLines);\n return { header: rawTab, truncatedPara, path };\n }\n if (!(\"children\" in last)) break;\n path.push(current);\n current = last;\n }\n return null;\n};\n\nconst splitBlockquote = (bq: Blockquote, explicit: boolean): BQSegment[] => {\n const segments: BQSegment[] = [];\n let currentSegment: BQSegment = { header: null, body: [], explicit };\n\n for (const child of bq.children) {\n if (child.type !== \"paragraph\") {\n // For non-paragraph children (e.g. defList from remarkDefinitionList),\n // check if the deepest last-child paragraph has a trailing tab header.\n // Remark may have absorbed a \"% NextTab\" line into that nested paragraph.\n const extracted = extractTrailingTabHeader(\n child as BlockContent | DefinitionContent\n );\n if (extracted) {\n // Clone the child with the trailing header line removed from its nested paragraph\n const cloned = JSON.parse(JSON.stringify(child)) as\n | BlockContent\n | DefinitionContent;\n // Navigate to the deepest last child and replace the paragraph.\n // Tree walking through heterogeneous mdast Parent shapes — no narrow\n // type fits all the intermediate nodes we descend through.\n interface ParentLike {\n children: ParentLike[];\n }\n let target: ParentLike = cloned as unknown as ParentLike;\n for (let pi = 1; pi < extracted.path.length; pi++) {\n target = target.children[target.children.length - 1];\n }\n const deepestParent = target as unknown as Parent;\n if (extracted.truncatedPara) {\n deepestParent.children[deepestParent.children.length - 1] =\n extracted.truncatedPara;\n } else {\n deepestParent.children.splice(deepestParent.children.length - 1, 1);\n }\n currentSegment.body.push(cloned);\n // Start a new segment for the extracted tab header\n segments.push(currentSegment);\n currentSegment = { header: extracted.header, body: [], explicit };\n } else {\n currentSegment.body.push(child as BlockContent);\n }\n continue;\n }\n\n // Check if this paragraph contains tab headers mixed with body text\n const lines = paraToLines(child);\n let bodyLines: PhrasingContent[][] = [];\n\n for (const lineSegs of lines) {\n const first = lineSegs[0];\n if (first?.type === \"text\") {\n const header = parseTabHeader(first.value);\n if (header) {\n // Flush accumulated body lines into current segment\n if (bodyLines.length > 0) {\n const bodyPara = buildParagraph(bodyLines);\n if (bodyPara) currentSegment.body.push(bodyPara);\n bodyLines = [];\n }\n\n // Save current segment, start a new one\n segments.push(currentSegment);\n\n const labelText = header.label;\n const labelNodes: PhrasingContent[] = labelText\n ? [{ type: \"text\", value: labelText }, ...lineSegs.slice(1)]\n : lineSegs.slice(1);\n\n currentSegment = {\n header: {\n depth: header.depth,\n open: header.open,\n labelNodes,\n labelText: toPlainText(labelNodes),\n body: []\n },\n body: [],\n explicit\n };\n continue;\n }\n }\n bodyLines.push(lineSegs);\n }\n\n // Flush remaining body lines\n if (bodyLines.length > 0) {\n const bodyPara = buildParagraph(bodyLines);\n if (bodyPara) currentSegment.body.push(bodyPara);\n }\n }\n\n segments.push(currentSegment);\n return segments;\n};\n\n// Reconstruct a paragraph node from line arrays\nconst buildParagraph = (lines: PhrasingContent[][]): Paragraph | null => {\n const children: PhrasingContent[] = [];\n for (let i = 0; i < lines.length; i++) {\n if (i > 0) children.push({ type: \"text\", value: \"\\n\" });\n children.push(...lines[i]);\n }\n if (children.length === 0) return null;\n return { type: \"paragraph\", children };\n};\n\n// ── Tree builder ──────────────────────────────────────────────────────────────\n\nconst buildTree = (\n rawTabs: RawTab[],\n targetDepth: number,\n start: number,\n end: number,\n containerClass: string,\n startLine: number\n): TabsListNode => {\n const depthLabels = rawTabs\n .slice(start, end)\n .filter((t) => t.depth === targetDepth)\n .map((t) => t.labelText);\n\n const gId = groupId(depthLabels);\n const bId = blockId(startLine, gId);\n\n // Absolute index of the first %+ tab at this depth (-1 if none)\n const explicitOpenIdx = rawTabs\n .slice(start, end)\n .findIndex((t) => t.depth === targetDepth && t.open);\n const explicitOpenAbsIdx =\n explicitOpenIdx >= 0 ? start + explicitOpenIdx : -1;\n\n const items: TabsItemNode[] = [];\n let tabCounter = 0;\n let i = start;\n\n while (i < end) {\n const raw = rawTabs[i];\n if (raw.depth !== targetDepth) {\n i++;\n continue;\n }\n\n let childEnd = i + 1;\n while (childEnd < end && rawTabs[childEnd].depth > targetDepth) childEnd++;\n\n // First %+ wins; if none, first tab is open\n const isOpen =\n explicitOpenAbsIdx >= 0 ? i === explicitOpenAbsIdx : tabCounter === 0;\n const bodyChildren: TabsItemNode[\"children\"] = [...raw.body];\n\n const hasDeeper = rawTabs\n .slice(i + 1, childEnd)\n .some((t) => t.depth === targetDepth + 1);\n\n if (hasDeeper) {\n const nested = buildTree(\n rawTabs,\n targetDepth + 1,\n i + 1,\n childEnd,\n containerClass,\n startLine\n );\n nested.containerClass = containerClass;\n bodyChildren.push(nested as unknown as BlockContent);\n }\n\n items.push({\n type: \"tabsItem\",\n depth: targetDepth,\n label: raw.labelNodes,\n labelText: raw.labelText,\n open: isOpen,\n children: bodyChildren,\n data: {\n attrsRole: \"containerItem\",\n attrsTitle: raw.labelNodes,\n attrsItemTitle: true,\n hProperties: {}\n }\n });\n\n tabCounter++;\n i = childEnd;\n }\n\n return {\n type: \"tabsList\",\n depth: targetDepth,\n groupId: gId,\n blockId: bId,\n children: items,\n data: { attrsRole: \"container\", hProperties: {} }\n };\n};\n\n// ── Remark plugin ─────────────────────────────────────────────────────────────\n\n// Process all tab groups found in a children array in-place.\n// Used at root level and recursively inside any parent node's children.\n// checkBlankLines: when false, skip the line-gap termination check (for nested contexts\n// where blank lines inside blockquotes produce position gaps but are still part of the group).\nconst processTabsInChildren = (\n children: Array<BlockContent | DefinitionContent | RootContent>,\n containerClass: string,\n checkBlankLines = true\n): void => {\n const newChildren: typeof children = [];\n let i = 0;\n\n while (i < children.length) {\n const node = children[i];\n\n if (node.type === \"paragraph\") {\n const headerTabs = extractHeaderPara(node);\n\n if (headerTabs && headerTabs.length > 0) {\n const rawTabs: RawTab[] = [...headerTabs];\n const startLine = (node.position?.start.line ?? 1) - 1;\n let j = i + 1;\n let currentTabIdx = rawTabs.length - 1;\n let prevEndLine = node.position?.end.line ?? 0;\n\n while (j < children.length) {\n const sibling = children[j];\n const siblingStartLine =\n (sibling as { position?: { start: { line: number } } }).position\n ?.start.line ?? prevEndLine + 1;\n\n if (checkBlankLines && siblingStartLine > prevEndLine + 1) break;\n\n if (sibling.type === \"blockquote\") {\n const bq = sibling;\n const explicit = isExplicitBQ(bq);\n const segments = splitBlockquote(bq, explicit);\n\n const firstSeg = segments[0];\n if (firstSeg?.header === null) {\n rawTabs[currentTabIdx].body.push(...firstSeg.body);\n }\n\n // Explicit blockquotes (`> % Label` nesting) have their headers\n // implicitly one level deeper than the owning tab. Apply a depth\n // offset so they nest correctly.\n // Absorbed blockquotes (standard `% Tab\\n> body` pattern) keep\n // literal depths — remark collapses them into a single paragraph child.\n const depthOffset = explicit\n ? rawTabs[rawTabs.length - 1].depth\n : 0;\n\n for (let s = 1; s < segments.length; s++) {\n const seg = segments[s];\n if (!seg.header) continue;\n\n const adjustedDepth = depthOffset + seg.header.depth;\n const prevDepth = rawTabs[rawTabs.length - 1].depth;\n if (adjustedDepth > prevDepth + 1) continue;\n\n seg.header.depth = adjustedDepth;\n\n if (explicit) {\n // For explicit `> %` blockquotes, body items are wrapped in a\n // nested `> >` blockquote. Unwrap each nested blockquote:\n // - Non-explicit (absorbed) inner BQs are re-split to extract\n // tab headers that remark collapsed into a single paragraph.\n // - Explicit inner BQs use their children directly.\n //\n // \"Escaped\" segments: when remark absorbs an outer-level tab header\n // (e.g. `% Code` at root depth) into an inner BQ paragraph, the tab's\n // body node (code fence etc.) is hoisted to the outer BQ as a direct\n // child after that inner BQ. Re-split segments with an empty body had\n // their body hoisted — they are outer-level siblings, not inner children.\n // Subsequent non-blockquote nodes in seg.body belong to those escaped tabs.\n const deferredInnerSegs: BQSegment[] = [];\n // Tracks which re-split segments have empty bodies (body hoisted to outer BQ)\n const escapedSegs: RawTab[] = [];\n\n for (const b of seg.body) {\n if (b.type !== \"blockquote\") {\n // Non-BQ outer sibling — belongs to the first escaped seg's body\n if (escapedSegs.length > 0) {\n escapedSegs[escapedSegs.length - 1].body.push(\n b as BlockContent | DefinitionContent\n );\n } else {\n seg.header.body.push(\n b as BlockContent | DefinitionContent\n );\n }\n continue;\n }\n const innerBq = b;\n if (!isExplicitBQ(innerBq)) {\n // Re-split absorbed inner blockquote to extract sibling headers\n const innerSegs = splitBlockquote(innerBq, false);\n const innerFirst = innerSegs[0];\n if (innerFirst?.header === null) {\n seg.header.body.push(...innerFirst.body);\n }\n for (let is = 1; is < innerSegs.length; is++) {\n const innerSeg = innerSegs[is];\n if (!innerSeg.header) continue;\n // If the re-split segment has no body, its body was hoisted to\n // the outer BQ as a direct child — it is an outer-level escaped\n // tab (originally root-level, absorbed by remark into this inner BQ).\n // Push it at depthOffset (the owning explicit BQ's parent depth).\n if (innerSeg.body.length === 0) {\n innerSeg.header.depth = depthOffset;\n escapedSegs.push(innerSeg.header);\n deferredInnerSegs.push(innerSeg);\n continue;\n }\n const tentativeDepth =\n depthOffset + innerSeg.header.depth;\n const innerPrevDepth = rawTabs[rawTabs.length - 1].depth;\n if (tentativeDepth > innerPrevDepth + 1) continue;\n innerSeg.header.depth = tentativeDepth;\n innerSeg.header.body.push(...innerSeg.body);\n deferredInnerSegs.push(innerSeg);\n }\n } else {\n // Explicit inner blockquote — use children directly\n seg.header.body.push(...innerBq.children);\n }\n }\n // Push the current seg first, then any deferred inner siblings\n rawTabs.push(seg.header);\n currentTabIdx = rawTabs.length - 1;\n for (const innerSeg of deferredInnerSegs) {\n if (!innerSeg.header) continue;\n rawTabs.push(innerSeg.header);\n currentTabIdx = rawTabs.length - 1;\n }\n } else {\n seg.header.body.push(...seg.body);\n rawTabs.push(seg.header);\n currentTabIdx = rawTabs.length - 1;\n }\n }\n\n prevEndLine = sibling.position?.end.line ?? prevEndLine;\n j++;\n } else if (sibling.type === \"paragraph\") {\n const prevDepth = rawTabs[rawTabs.length - 1].depth;\n const contHeaders = extractHeaderPara(sibling, false, prevDepth);\n if (contHeaders && contHeaders.length > 0) {\n rawTabs.push(...contHeaders);\n currentTabIdx = rawTabs.length - 1;\n prevEndLine = sibling.position?.end.line ?? prevEndLine;\n j++;\n continue;\n }\n break;\n } else {\n break;\n }\n }\n\n const list = buildTree(\n rawTabs,\n 1,\n 0,\n rawTabs.length,\n containerClass,\n startLine\n );\n list.containerClass = containerClass;\n newChildren.push(list as unknown as RootContent);\n i = j;\n continue;\n }\n }\n\n newChildren.push(node);\n i++;\n }\n\n children.splice(0, children.length, ...newChildren);\n};\n\nexport const remarkTabs: Plugin<[TabsOptions?], Root> = function (\n options = {}\n) {\n const { containerClass = \"markdown-tabs\" } = options;\n\n return (tree) => {\n // Process tabs at root level first\n processTabsInChildren(tree.children, containerClass);\n\n // Then visit every parent node whose children may contain tab syntax —\n // this handles tabs nested inside step bodies or other block containers.\n // Blank-line position checks are disabled for nested content: blank lines\n // inside a blockquote produce position gaps that would incorrectly terminate\n // a tab group when the content has been lifted out of its blockquote context.\n visit(tree, (node) => {\n if (\"children\" in node && node.type !== \"root\") {\n const parent = node as {\n children: Array<BlockContent | DefinitionContent>;\n };\n if (parent.children.length > 0) {\n processTabsInChildren(parent.children, containerClass, false);\n }\n }\n });\n };\n};\n\n// ── HAST handlers ─────────────────────────────────────────────────────────────\n\nconst mergeHProperties = (base: Properties, extra?: Properties): Properties => {\n if (!extra) return base;\n const { class: extraClass, ...rest } = extra;\n const result: Properties = { ...base, ...rest };\n if (extraClass)\n result.class = base.class\n ? `${String(base.class)} ${String(extraClass)}`\n : extraClass;\n return result;\n};\n\nconst buildTabsHast = (\n list: TabsListNode,\n containerClass: string,\n state: State\n): Element => {\n const labelChildren: ElementContent[] = [];\n const panelChildren: ElementContent[] = [];\n\n list.children.forEach((item, idx) => {\n const labelPlain = stripAttrs(item.labelText);\n const inputId = `${list.blockId}-${idx}`;\n\n // <input type=\"radio\">\n const inputProps: Properties = {\n type: \"radio\",\n name: list.blockId,\n id: inputId,\n hidden: true,\n ...(item.open ? { checked: true } : {})\n };\n labelChildren.push({\n type: \"element\",\n tagName: \"input\",\n properties: inputProps,\n children: []\n });\n\n // <label>\n const labelProps = mergeHProperties(\n { class: `${containerClass}-label`, for: inputId },\n item.data?.hProperties\n );\n labelChildren.push({\n type: \"element\",\n tagName: \"label\",\n properties: labelProps,\n children: state.all({\n type: \"paragraph\",\n children: item.label\n } as Parameters<typeof state.all>[0])\n });\n\n // Panel body and nested lists\n const bodyBlocks = item.children.filter(\n (c) => (c as { type: string }).type !== \"tabsList\"\n );\n const nestedLists = item.children.filter(\n (c) => (c as { type: string }).type === \"tabsList\"\n ) as unknown as TabsListNode[];\n\n const sectionChildren: ElementContent[] = [];\n\n if (bodyBlocks.length > 0) {\n sectionChildren.push(\n ...state.all({\n type: \"root\",\n children: bodyBlocks\n } as Parameters<typeof state.all>[0])\n );\n }\n\n for (const nested of nestedLists) {\n sectionChildren.push(\n buildTabsHast(nested, nested.containerClass ?? containerClass, state)\n );\n }\n\n // <section>\n const sectionProps = mergeHProperties(\n { class: `${containerClass}-panel`, \"aria-label\": labelPlain },\n undefined\n );\n panelChildren.push({\n type: \"element\",\n tagName: \"section\",\n properties: sectionProps,\n children: sectionChildren\n });\n });\n\n // <div class=\"...-labels\">\n const labelsDiv: Element = {\n type: \"element\",\n tagName: \"div\",\n properties: { class: `${containerClass}-labels` },\n children: labelChildren\n };\n\n // <div class=\"...-panels\">\n const panelsDiv: Element = {\n type: \"element\",\n tagName: \"div\",\n properties: { class: `${containerClass}-panels` },\n children: panelChildren\n };\n\n // <div> container\n const divProps = mergeHProperties(\n { class: containerClass, \"data-tabs-group\": list.groupId },\n list.data?.hProperties\n );\n\n const result: Element = {\n type: \"element\",\n tagName: \"div\",\n properties: divProps,\n children: [labelsDiv, panelsDiv]\n };\n\n state.patch(list as unknown as Parameters<typeof state.patch>[0], result);\n return result;\n};\n\nexport const tabsHastHandlers = {\n tabsList(state: State, node: TabsListNode): ElementContent {\n const containerClass = node.containerClass ?? \"markdown-tabs\";\n return buildTabsHast(node, containerClass, state);\n }\n} as const;\n"],"mappings":";;AAEA,MAAa,gBAAgB;AAW7B,MAAa,kBAAkB,SAAyC;CACtE,MAAM,IAAI,cAAc,KAAK,KAAK;AAClC,KAAI,CAAC,EAAG,QAAO;AACf,QAAO;EAAE,OAAO,EAAE,GAAG;EAAQ,MAAM,EAAE,OAAO;EAAK,OAAO,EAAE;EAAI;;AAOhE,MAAM,QAAQ,QAAwB;CACpC,IAAI,IAAI;AACR,MAAK,IAAI,IAAI,GAAG,IAAI,IAAI,QAAQ,IAC9B,MAAM,KAAK,KAAK,IAAI,IAAI,WAAW,EAAE,KAAM;AAE7C,QAAO;;AAIT,MAAa,cAAc,SACzB,KAAK,QAAQ,oBAAoB,GAAG,CAAC,SAAS;AAEhD,MAAa,WAAW,SACtB,KACG,aAAa,CACb,MAAM,CACN,QAAQ,aAAa,GAAG,CACx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