@cudoment/cudoc 0.1.0 → 0.3.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/README.md +20 -47
- package/dist/dataset.d.ts +10 -0
- package/dist/dataset.d.ts.map +1 -0
- package/dist/dataset.js +44 -0
- package/dist/dataset.js.map +1 -0
- package/dist/document.d.ts +80 -0
- package/dist/document.d.ts.map +1 -0
- package/dist/document.js +436 -0
- package/dist/document.js.map +1 -0
- package/dist/internal/core/ast/validate.d.ts.map +1 -1
- package/dist/internal/core/ast/validate.js +9 -2
- package/dist/internal/core/ast/validate.js.map +1 -1
- package/dist/internal/core/query/nodes.d.ts.map +1 -1
- package/dist/internal/core/query/nodes.js +3 -1
- package/dist/internal/core/query/nodes.js.map +1 -1
- package/dist/internal/core/query/sections.d.ts.map +1 -1
- package/dist/internal/core/query/sections.js +2 -1
- package/dist/internal/core/query/sections.js.map +1 -1
- package/dist/internal/core/syntax/heading-metadata.js +1 -1
- package/dist/internal/core/syntax/heading-metadata.js.map +1 -1
- package/dist/internal/transforms/table-cell-list/build-table-cell-children.d.ts +5 -0
- package/dist/internal/transforms/table-cell-list/build-table-cell-children.d.ts.map +1 -0
- package/dist/internal/transforms/table-cell-list/build-table-cell-children.js +169 -0
- package/dist/internal/transforms/table-cell-list/build-table-cell-children.js.map +1 -0
- package/dist/internal/transforms/table-cell-list/elements.d.ts +15 -0
- package/dist/internal/transforms/table-cell-list/elements.d.ts.map +1 -0
- package/dist/internal/transforms/table-cell-list/elements.js +16 -0
- package/dist/internal/transforms/table-cell-list/elements.js.map +1 -0
- package/dist/internal/transforms/table-cell-list/index.d.ts +18 -0
- package/dist/internal/transforms/table-cell-list/index.d.ts.map +1 -0
- package/dist/internal/transforms/table-cell-list/index.js +45 -0
- package/dist/internal/transforms/table-cell-list/index.js.map +1 -0
- package/dist/internal/transforms/table-cell-list/nodes.d.ts +9 -0
- package/dist/internal/transforms/table-cell-list/nodes.d.ts.map +1 -0
- package/dist/internal/transforms/table-cell-list/nodes.js +24 -0
- package/dist/internal/transforms/table-cell-list/nodes.js.map +1 -0
- package/dist/internal/transforms/table-cell-list/parse-inline-markdown.d.ts +6 -0
- package/dist/internal/transforms/table-cell-list/parse-inline-markdown.d.ts.map +1 -0
- package/dist/internal/transforms/table-cell-list/parse-inline-markdown.js +101 -0
- package/dist/internal/transforms/table-cell-list/parse-inline-markdown.js.map +1 -0
- package/dist/internal/transforms/table-cell-list/parse-table-cell-list.d.ts +22 -0
- package/dist/internal/transforms/table-cell-list/parse-table-cell-list.d.ts.map +1 -0
- package/dist/internal/transforms/table-cell-list/parse-table-cell-list.js +315 -0
- package/dist/internal/transforms/table-cell-list/parse-table-cell-list.js.map +1 -0
- package/dist/internal/transforms/table-column-layout/create-table.d.ts +45 -0
- package/dist/internal/transforms/table-column-layout/create-table.d.ts.map +1 -0
- package/dist/internal/transforms/table-column-layout/create-table.js +121 -0
- package/dist/internal/transforms/table-column-layout/create-table.js.map +1 -0
- package/dist/internal/transforms/table-column-layout/index.d.ts +51 -0
- package/dist/internal/transforms/table-column-layout/index.d.ts.map +1 -0
- package/dist/internal/transforms/table-column-layout/index.js +100 -0
- package/dist/internal/transforms/table-column-layout/index.js.map +1 -0
- package/dist/internal/transforms/table-column-layout/split-cell.d.ts +24 -0
- package/dist/internal/transforms/table-column-layout/split-cell.d.ts.map +1 -0
- package/dist/internal/transforms/table-column-layout/split-cell.js +219 -0
- package/dist/internal/transforms/table-column-layout/split-cell.js.map +1 -0
- package/dist/markdown.d.ts +10 -0
- package/dist/markdown.d.ts.map +1 -0
- package/dist/markdown.js +47 -0
- package/dist/markdown.js.map +1 -0
- package/dist/node/cli.d.ts +3 -0
- package/dist/node/cli.d.ts.map +1 -0
- package/dist/node/cli.js +37 -0
- package/dist/node/cli.js.map +1 -0
- package/dist/node/dataset.d.ts +19 -0
- package/dist/node/dataset.d.ts.map +1 -0
- package/dist/node/dataset.js +51 -0
- package/dist/node/dataset.js.map +1 -0
- package/dist/node/library.d.ts +56 -0
- package/dist/node/library.d.ts.map +1 -0
- package/dist/node/library.js +163 -0
- package/dist/node/library.js.map +1 -0
- package/dist/node/paths.d.ts.map +1 -1
- package/dist/node/paths.js +1 -1
- package/dist/node/paths.js.map +1 -1
- package/dist/node/prepare-embeds.d.ts +13 -0
- package/dist/node/prepare-embeds.d.ts.map +1 -0
- package/dist/node/prepare-embeds.js +54 -0
- package/dist/node/prepare-embeds.js.map +1 -0
- package/dist/node/resolve-embed.d.ts +33 -0
- package/dist/node/resolve-embed.d.ts.map +1 -0
- package/dist/node/resolve-embed.js +386 -0
- package/dist/node/resolve-embed.js.map +1 -0
- package/dist/node/storage.d.ts +10 -0
- package/dist/node/storage.d.ts.map +1 -0
- package/dist/node/storage.js +85 -0
- package/dist/node/storage.js.map +1 -0
- package/dist/query.d.ts +1 -0
- package/dist/query.d.ts.map +1 -1
- package/dist/query.js +1 -0
- package/dist/query.js.map +1 -1
- package/dist/render.d.ts +11 -0
- package/dist/render.d.ts.map +1 -0
- package/dist/render.js +63 -0
- package/dist/render.js.map +1 -0
- package/dist/sections.d.ts +15 -0
- package/dist/sections.d.ts.map +1 -0
- package/dist/sections.js +40 -0
- package/dist/sections.js.map +1 -0
- package/package.json +66 -5
- package/styles.css +90 -0
|
@@ -0,0 +1,315 @@
|
|
|
1
|
+
import { parseInlineContent as parseInline } from "./parse-inline-markdown.js";
|
|
2
|
+
import { createTextNode } from "./nodes.js";
|
|
3
|
+
// Segmentation: split the raw cell on <br>, keeping inline code spans intact.
|
|
4
|
+
const isEscaped = (value, index) => {
|
|
5
|
+
let backslashCount = 0;
|
|
6
|
+
for (let i = index - 1; i >= 0 && value[i] === "\\"; i--) {
|
|
7
|
+
backslashCount++;
|
|
8
|
+
}
|
|
9
|
+
return backslashCount % 2 === 1;
|
|
10
|
+
};
|
|
11
|
+
const getBacktickRunLength = (value, index) => {
|
|
12
|
+
let length = 0;
|
|
13
|
+
while (value[index + length] === "`")
|
|
14
|
+
length++;
|
|
15
|
+
return length;
|
|
16
|
+
};
|
|
17
|
+
const hasClosingDelimiter = (value, startIndex, delimiterLength) => {
|
|
18
|
+
for (let i = startIndex; i < value.length; i++) {
|
|
19
|
+
if (value[i] !== "`")
|
|
20
|
+
continue;
|
|
21
|
+
const runLength = getBacktickRunLength(value, i);
|
|
22
|
+
if (runLength === delimiterLength)
|
|
23
|
+
return true;
|
|
24
|
+
i += runLength - 1;
|
|
25
|
+
}
|
|
26
|
+
return false;
|
|
27
|
+
};
|
|
28
|
+
export const splitAuthoredCellSegments = (source) => {
|
|
29
|
+
const segments = [];
|
|
30
|
+
let current = "";
|
|
31
|
+
let activeBacktickLength = null;
|
|
32
|
+
for (let i = 0; i < source.length;) {
|
|
33
|
+
if (source[i] === "`") {
|
|
34
|
+
const runLength = getBacktickRunLength(source, i);
|
|
35
|
+
if (activeBacktickLength === null &&
|
|
36
|
+
!isEscaped(source, i) &&
|
|
37
|
+
hasClosingDelimiter(source, i + runLength, runLength)) {
|
|
38
|
+
activeBacktickLength = runLength;
|
|
39
|
+
}
|
|
40
|
+
else if (activeBacktickLength === runLength) {
|
|
41
|
+
activeBacktickLength = null;
|
|
42
|
+
}
|
|
43
|
+
current += source.slice(i, i + runLength);
|
|
44
|
+
i += runLength;
|
|
45
|
+
continue;
|
|
46
|
+
}
|
|
47
|
+
if (activeBacktickLength === null && source[i] === "<") {
|
|
48
|
+
const breakMatch = source.slice(i).match(/^<br\s*\/?>/i);
|
|
49
|
+
if (breakMatch) {
|
|
50
|
+
segments.push(current);
|
|
51
|
+
current = "";
|
|
52
|
+
i += breakMatch[0].length;
|
|
53
|
+
continue;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
current += source[i];
|
|
57
|
+
i++;
|
|
58
|
+
}
|
|
59
|
+
segments.push(current);
|
|
60
|
+
return segments;
|
|
61
|
+
};
|
|
62
|
+
// Marker matching: decide which list syntax a segment uses, and at what level.
|
|
63
|
+
const dashListPattern = /(^|<br\s*\/?>)\s*(-{2,})\s*(?=\S)/i;
|
|
64
|
+
const starListPattern = /(^|<br\s*\/?>)\s*(\*{2,})\s+(?=\S)/i;
|
|
65
|
+
const numberedListItemPattern = /^(\d+)(\.+|\))\s+(.*)$/;
|
|
66
|
+
const numberedListStartPattern = /(^|<br\s*\/?>)\s*\d+(?:\.+|\))\s+/i;
|
|
67
|
+
const matchDashListItem = (text) => {
|
|
68
|
+
const match = text.match(/^(-{2,})\s*(\S.*)$/);
|
|
69
|
+
if (!match)
|
|
70
|
+
return null;
|
|
71
|
+
return { level: match[1].length - 1, content: match[2].trimStart() };
|
|
72
|
+
};
|
|
73
|
+
const matchStarListItem = (text) => {
|
|
74
|
+
const match = text.match(/^(\*{2,})\s+(\S.*)$/);
|
|
75
|
+
if (!match)
|
|
76
|
+
return null;
|
|
77
|
+
return { level: match[1].length - 1, content: match[2].trimStart() };
|
|
78
|
+
};
|
|
79
|
+
const matchStarListMarker = (text) => {
|
|
80
|
+
const match = text.match(/^(\*{2,})\s*$/);
|
|
81
|
+
if (!match)
|
|
82
|
+
return null;
|
|
83
|
+
return { level: match[1].length - 1 };
|
|
84
|
+
};
|
|
85
|
+
const matchNumberedListItem = (text) => {
|
|
86
|
+
const match = text.match(numberedListItemPattern);
|
|
87
|
+
if (!match)
|
|
88
|
+
return null;
|
|
89
|
+
const start = Number(match[1]);
|
|
90
|
+
if (!Number.isSafeInteger(start))
|
|
91
|
+
return null;
|
|
92
|
+
return {
|
|
93
|
+
contentOnly: match[3].trimStart(),
|
|
94
|
+
level: match[2] === ")" ? 0 : match[2].length - 1,
|
|
95
|
+
start,
|
|
96
|
+
};
|
|
97
|
+
};
|
|
98
|
+
const matchBasicListItem = (text) => {
|
|
99
|
+
const match = text.match(/^(\s*)[-*]\s+(.+)$/);
|
|
100
|
+
if (!match)
|
|
101
|
+
return null;
|
|
102
|
+
return {
|
|
103
|
+
indent: match[1],
|
|
104
|
+
content: match[2],
|
|
105
|
+
};
|
|
106
|
+
};
|
|
107
|
+
const matchPossibleBasicListMarker = (text) => {
|
|
108
|
+
const match = text.match(/^(\s*)[-*](\s*)(.+)?$/);
|
|
109
|
+
if (!match)
|
|
110
|
+
return null;
|
|
111
|
+
return {
|
|
112
|
+
indent: match[1],
|
|
113
|
+
spacing: match[2],
|
|
114
|
+
content: match[3],
|
|
115
|
+
};
|
|
116
|
+
};
|
|
117
|
+
const getSpaceIndentLevel = (indent) => indent.length > 0 ? Math.floor(indent.length / 2) : 0;
|
|
118
|
+
const getLeadingSpaceIndentLevel = (text) => {
|
|
119
|
+
const textWithoutNbsp = text.replace(/^(?:(?: )|\u00A0)+/, "");
|
|
120
|
+
const leadingSpaces = textWithoutNbsp.match(/^ +/)?.[0] ?? "";
|
|
121
|
+
return getSpaceIndentLevel(leadingSpaces);
|
|
122
|
+
};
|
|
123
|
+
const resolveNumberedChildLevel = (level, lastNumberedLevel) => lastNumberedLevel === null || level > 0 ? level : lastNumberedLevel + 1;
|
|
124
|
+
export const hasTableCellListPattern = (text) => {
|
|
125
|
+
const normalizedText = text.replace(/ |\u00a0/g, " ");
|
|
126
|
+
return (/(^|<br\s*\/?>)\s*[-*]\s+/.test(normalizedText) ||
|
|
127
|
+
/<br\s*\/?>\s*\*{2,}\s+/.test(normalizedText) ||
|
|
128
|
+
numberedListStartPattern.test(normalizedText) ||
|
|
129
|
+
dashListPattern.test(normalizedText) ||
|
|
130
|
+
starListPattern.test(normalizedText));
|
|
131
|
+
};
|
|
132
|
+
const getIndentLevel = (text) => {
|
|
133
|
+
if (!text)
|
|
134
|
+
return 0;
|
|
135
|
+
let count = 0;
|
|
136
|
+
let i = 0;
|
|
137
|
+
while (i < text.length && text.substring(i, i + 6) === " ") {
|
|
138
|
+
count++;
|
|
139
|
+
i += 6;
|
|
140
|
+
}
|
|
141
|
+
while (i < text.length && text.charCodeAt(i) === 0x00a0) {
|
|
142
|
+
count++;
|
|
143
|
+
i++;
|
|
144
|
+
}
|
|
145
|
+
return count >= 2 ? count - 1 : 0;
|
|
146
|
+
};
|
|
147
|
+
const removeNbspPrefix = (text) => {
|
|
148
|
+
if (!text)
|
|
149
|
+
return "";
|
|
150
|
+
let result = text;
|
|
151
|
+
while (result.startsWith(" ")) {
|
|
152
|
+
result = result.substring(6);
|
|
153
|
+
}
|
|
154
|
+
while (result.length > 0 && result.charCodeAt(0) === 0x00a0) {
|
|
155
|
+
result = result.substring(1);
|
|
156
|
+
}
|
|
157
|
+
return result.trimStart();
|
|
158
|
+
};
|
|
159
|
+
// Parse loop: walk the segments and build the intermediate representation.
|
|
160
|
+
const createListFallbackChildren = (source, children) => {
|
|
161
|
+
const authoredPrefix = source.match(/^((?:(?: )|\u00A0|[ \t])*(?:\d+(?:\.+|\))|[-*]+)[ \t]*)/)?.[1];
|
|
162
|
+
return authoredPrefix
|
|
163
|
+
? [createTextNode(authoredPrefix), ...children]
|
|
164
|
+
: [...children];
|
|
165
|
+
};
|
|
166
|
+
/** Reads raw table-cell source into text and list-item intermediate parts. */
|
|
167
|
+
export const parseTableCellList = (fullText, format = "mdx", inlineParser) => {
|
|
168
|
+
const parseInlineContent = inlineParser ?? ((text) => parseInline(text, format));
|
|
169
|
+
const parts = [];
|
|
170
|
+
const segments = splitAuthoredCellSegments(fullText);
|
|
171
|
+
let pendingBreakCount = 0;
|
|
172
|
+
let inList = false;
|
|
173
|
+
let lastNumberedLevel = null;
|
|
174
|
+
const takePendingBreaks = () => {
|
|
175
|
+
const count = pendingBreakCount;
|
|
176
|
+
pendingBreakCount = 0;
|
|
177
|
+
return count;
|
|
178
|
+
};
|
|
179
|
+
const pushText = (text) => {
|
|
180
|
+
const children = parseInlineContent(text);
|
|
181
|
+
if (children.length > 0) {
|
|
182
|
+
parts.push({
|
|
183
|
+
type: "text",
|
|
184
|
+
authoredBreaksBefore: takePendingBreaks(),
|
|
185
|
+
children,
|
|
186
|
+
});
|
|
187
|
+
}
|
|
188
|
+
inList = false;
|
|
189
|
+
};
|
|
190
|
+
const pushListItem = ({ children, fallbackSource, level, ordered = false, start, }) => {
|
|
191
|
+
parts.push({
|
|
192
|
+
type: "listItem",
|
|
193
|
+
authoredBreaksBefore: takePendingBreaks(),
|
|
194
|
+
level,
|
|
195
|
+
ordered,
|
|
196
|
+
start,
|
|
197
|
+
children,
|
|
198
|
+
fallbackChildren: createListFallbackChildren(fallbackSource, children),
|
|
199
|
+
});
|
|
200
|
+
inList = true;
|
|
201
|
+
};
|
|
202
|
+
for (let index = 0; index < segments.length; index++) {
|
|
203
|
+
if (index > 0)
|
|
204
|
+
pendingBreakCount++;
|
|
205
|
+
const segment = segments[index];
|
|
206
|
+
const spaceIndentLevel = getLeadingSpaceIndentLevel(segment);
|
|
207
|
+
const trimmedStart = segment.replace(/^\s+/, "");
|
|
208
|
+
const trimmedEnd = trimmedStart.replace(/\s+$/, "");
|
|
209
|
+
if (!trimmedEnd)
|
|
210
|
+
continue;
|
|
211
|
+
const originalIndentLevel = getIndentLevel(segment);
|
|
212
|
+
const indentLevel = getIndentLevel(trimmedEnd);
|
|
213
|
+
const textWithoutNbsp = removeNbspPrefix(trimmedEnd);
|
|
214
|
+
const numberedItemMatch = matchNumberedListItem(textWithoutNbsp);
|
|
215
|
+
if (numberedItemMatch) {
|
|
216
|
+
pushListItem({
|
|
217
|
+
children: parseInlineContent(numberedItemMatch.contentOnly),
|
|
218
|
+
fallbackSource: segment,
|
|
219
|
+
level: numberedItemMatch.level,
|
|
220
|
+
ordered: true,
|
|
221
|
+
start: numberedItemMatch.start,
|
|
222
|
+
});
|
|
223
|
+
lastNumberedLevel = numberedItemMatch.level;
|
|
224
|
+
continue;
|
|
225
|
+
}
|
|
226
|
+
const starItemMatch = inList ? matchStarListItem(textWithoutNbsp) : null;
|
|
227
|
+
if (starItemMatch) {
|
|
228
|
+
pushListItem({
|
|
229
|
+
children: parseInlineContent(starItemMatch.content),
|
|
230
|
+
fallbackSource: segment,
|
|
231
|
+
level: starItemMatch.level,
|
|
232
|
+
});
|
|
233
|
+
lastNumberedLevel = null;
|
|
234
|
+
continue;
|
|
235
|
+
}
|
|
236
|
+
if (inList) {
|
|
237
|
+
const starMarkerOnly = matchStarListMarker(textWithoutNbsp);
|
|
238
|
+
if (starMarkerOnly) {
|
|
239
|
+
pushListItem({
|
|
240
|
+
children: [],
|
|
241
|
+
fallbackSource: segment,
|
|
242
|
+
level: starMarkerOnly.level,
|
|
243
|
+
});
|
|
244
|
+
lastNumberedLevel = null;
|
|
245
|
+
continue;
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
const listItemMatch = matchBasicListItem(textWithoutNbsp);
|
|
249
|
+
const dashItemMatch = listItemMatch
|
|
250
|
+
? null
|
|
251
|
+
: matchDashListItem(textWithoutNbsp);
|
|
252
|
+
if (dashItemMatch) {
|
|
253
|
+
pushListItem({
|
|
254
|
+
children: parseInlineContent(dashItemMatch.content),
|
|
255
|
+
fallbackSource: segment,
|
|
256
|
+
level: resolveNumberedChildLevel(dashItemMatch.level, lastNumberedLevel),
|
|
257
|
+
});
|
|
258
|
+
lastNumberedLevel = null;
|
|
259
|
+
continue;
|
|
260
|
+
}
|
|
261
|
+
const startsWithListItemMarker = matchPossibleBasicListMarker(textWithoutNbsp);
|
|
262
|
+
const finalIndentLevel = Math.max(indentLevel, originalIndentLevel, spaceIndentLevel);
|
|
263
|
+
if (finalIndentLevel > 0 &&
|
|
264
|
+
(textWithoutNbsp.startsWith("*") || textWithoutNbsp.startsWith("-"))) {
|
|
265
|
+
const markerMatch = textWithoutNbsp.match(/^[-*]\s*(.+)?$/);
|
|
266
|
+
if (markerMatch) {
|
|
267
|
+
pushListItem({
|
|
268
|
+
children: parseInlineContent(markerMatch[1] ? markerMatch[1].trimStart() : ""),
|
|
269
|
+
fallbackSource: segment,
|
|
270
|
+
level: resolveNumberedChildLevel(finalIndentLevel, lastNumberedLevel),
|
|
271
|
+
});
|
|
272
|
+
lastNumberedLevel = null;
|
|
273
|
+
continue;
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
if (listItemMatch) {
|
|
277
|
+
const extraIndent = getSpaceIndentLevel(listItemMatch.indent);
|
|
278
|
+
pushListItem({
|
|
279
|
+
children: parseInlineContent(listItemMatch.content.trimStart()),
|
|
280
|
+
fallbackSource: segment,
|
|
281
|
+
level: resolveNumberedChildLevel(indentLevel + extraIndent, lastNumberedLevel),
|
|
282
|
+
});
|
|
283
|
+
lastNumberedLevel = null;
|
|
284
|
+
continue;
|
|
285
|
+
}
|
|
286
|
+
if (startsWithListItemMarker && !inList) {
|
|
287
|
+
const hasSpaceAfterMarker = startsWithListItemMarker.spacing.length > 0;
|
|
288
|
+
const hasContentAfterMarker = Boolean(startsWithListItemMarker.content);
|
|
289
|
+
if (hasContentAfterMarker && !hasSpaceAfterMarker) {
|
|
290
|
+
pushText(trimmedEnd);
|
|
291
|
+
}
|
|
292
|
+
else {
|
|
293
|
+
const content = startsWithListItemMarker.content
|
|
294
|
+
? startsWithListItemMarker.content.trimStart()
|
|
295
|
+
: "";
|
|
296
|
+
const extraIndent = getSpaceIndentLevel(startsWithListItemMarker.indent);
|
|
297
|
+
pushListItem({
|
|
298
|
+
children: parseInlineContent(content),
|
|
299
|
+
fallbackSource: segment,
|
|
300
|
+
level: indentLevel + extraIndent,
|
|
301
|
+
});
|
|
302
|
+
}
|
|
303
|
+
continue;
|
|
304
|
+
}
|
|
305
|
+
if (!inList) {
|
|
306
|
+
pushText(trimmedEnd);
|
|
307
|
+
continue;
|
|
308
|
+
}
|
|
309
|
+
inList = false;
|
|
310
|
+
lastNumberedLevel = null;
|
|
311
|
+
pushText(trimmedEnd);
|
|
312
|
+
}
|
|
313
|
+
return parts;
|
|
314
|
+
};
|
|
315
|
+
//# sourceMappingURL=parse-table-cell-list.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parse-table-cell-list.js","sourceRoot":"","sources":["../../../../src/internal/transforms/table-cell-list/parse-table-cell-list.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,kBAAkB,IAAI,WAAW,EAAE,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B,CAAC,OAAO,CAAC,SAAS,EAAE;oBAC9C,CAAC,CAAC,EAAE,CAAA;gBACN,MAAM,WAAW,GAAG,mBAAmB,CAAC,wBAAwB,CAAC,MAAM,CAAC,CAAA;gBACxE,YAAY,CAAC;oBACX,QAAQ,EAAE,kBAAkB,CAAC,OAAO,CAAC;oBACrC,cAAc,EAAE,OAAO;oBACvB,KAAK,EAAE,WAAW,GAAG,WAAW;iBACjC,CAAC,CAAA;YACJ,CAAC;YACD,SAAQ;QACV,CAAC;QAED,IAAI,CAAC,MAAM,EAAE,CAAC;YACZ,QAAQ,CAAC,UAAU,CAAC,CAAA;YACpB,SAAQ;QACV,CAAC;QAED,MAAM,GAAG,KAAK,CAAA;QACd,iBAAiB,GAAG,IAAI,CAAA;QACxB,QAAQ,CAAC,UAAU,CAAC,CAAA;IACtB,CAAC;IAED,OAAO,KAAK,CAAA;AACd,CAAC,CAAA"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Rebuilds an mdast table as explicit elements.
|
|
3
|
+
*
|
|
4
|
+
* Markdown tables cannot express a cell that spans columns, so a table whose
|
|
5
|
+
* cells need splitting has to become elements the host renders directly.
|
|
6
|
+
*
|
|
7
|
+
* The defaults are the HTML tag names, which MDX resolves against the
|
|
8
|
+
* components a host already maps `table` and `td` to — so the rebuilt table
|
|
9
|
+
* keeps the site's own table styling and nothing new has to be provided.
|
|
10
|
+
* A site whose table is a set of capitalized components names them instead.
|
|
11
|
+
*/
|
|
12
|
+
import type { Table } from "mdast";
|
|
13
|
+
import type { MdxJsxFlowElement } from "mdast-util-mdx-jsx";
|
|
14
|
+
import { type ResolvedSplitOptions } from "./split-cell.js";
|
|
15
|
+
export declare const DEFAULT_TABLE_COMPONENTS: {
|
|
16
|
+
readonly table: "table";
|
|
17
|
+
readonly header: "thead";
|
|
18
|
+
readonly body: "tbody";
|
|
19
|
+
readonly row: "tr";
|
|
20
|
+
readonly head: "th";
|
|
21
|
+
readonly cell: "td";
|
|
22
|
+
};
|
|
23
|
+
export type TableComponents = {
|
|
24
|
+
table?: string;
|
|
25
|
+
header?: string;
|
|
26
|
+
body?: string;
|
|
27
|
+
row?: string;
|
|
28
|
+
head?: string;
|
|
29
|
+
cell?: string;
|
|
30
|
+
};
|
|
31
|
+
export type ResolvedTableComponents = Required<TableComponents>;
|
|
32
|
+
export declare const resolveTableComponents: (components?: TableComponents) => ResolvedTableComponents;
|
|
33
|
+
/**
|
|
34
|
+
* A split in any body row widens the column for the whole table, so the header
|
|
35
|
+
* cell and every unsplit cell in that column carry a span to keep the grid
|
|
36
|
+
* rectangular.
|
|
37
|
+
*/
|
|
38
|
+
export declare const createLayoutTable: ({ columnIndex, components, split, spanAttribute, table, }: {
|
|
39
|
+
columnIndex: number;
|
|
40
|
+
components: ResolvedTableComponents;
|
|
41
|
+
split: ResolvedSplitOptions;
|
|
42
|
+
spanAttribute: string;
|
|
43
|
+
table: Table;
|
|
44
|
+
}) => MdxJsxFlowElement;
|
|
45
|
+
//# sourceMappingURL=create-table.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-table.d.ts","sourceRoot":"","sources":["../../../../src/internal/transforms/table-column-layout/create-table.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAAE,KAAK,EAAa,MAAM,OAAO,CAAA;AAE7C,OAAO,KAAK,EAEV,iBAAiB,EAElB,MAAM,oBAAoB,CAAA;AAQ3B,OAAO,EAAa,KAAK,oBAAoB,EAAE,MAAM,iBAAiB,CAAA;AAEtE,eAAO,MAAM,wBAAwB;;;;;;;CAO3B,CAAA;AAEV,MAAM,MAAM,eAAe,GAAG;IAC5B,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,MAAM,CAAA;CACd,CAAA;AAED,MAAM,MAAM,uBAAuB,GAAG,QAAQ,CAAC,eAAe,CAAC,CAAA;AAE/D,eAAO,MAAM,sBAAsB,GACjC,aAAY,eAAoB,KAC/B,uBAQF,CAAA;AAoDD;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,GAAI,2DAM/B;IACD,WAAW,EAAE,MAAM,CAAA;IACnB,UAAU,EAAE,uBAAuB,CAAA;IACnC,KAAK,EAAE,oBAAoB,CAAA;IAC3B,aAAa,EAAE,MAAM,CAAA;IACrB,KAAK,EAAE,KAAK,CAAA;CACb,KAAG,iBA0DH,CAAA"}
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Rebuilds an mdast table as explicit elements.
|
|
3
|
+
*
|
|
4
|
+
* Markdown tables cannot express a cell that spans columns, so a table whose
|
|
5
|
+
* cells need splitting has to become elements the host renders directly.
|
|
6
|
+
*
|
|
7
|
+
* The defaults are the HTML tag names, which MDX resolves against the
|
|
8
|
+
* components a host already maps `table` and `td` to — so the rebuilt table
|
|
9
|
+
* keeps the site's own table styling and nothing new has to be provided.
|
|
10
|
+
* A site whose table is a set of capitalized components names them instead.
|
|
11
|
+
*/
|
|
12
|
+
import { valueToEstree } from "estree-util-value-to-estree";
|
|
13
|
+
import { asFlowChildren, createMdxAttribute, createMdxFlowElement, createMdxTextElement, } from "../../core/index.js";
|
|
14
|
+
import { splitCell } from "./split-cell.js";
|
|
15
|
+
export const DEFAULT_TABLE_COMPONENTS = {
|
|
16
|
+
table: "table",
|
|
17
|
+
header: "thead",
|
|
18
|
+
body: "tbody",
|
|
19
|
+
row: "tr",
|
|
20
|
+
head: "th",
|
|
21
|
+
cell: "td",
|
|
22
|
+
};
|
|
23
|
+
export const resolveTableComponents = (components = {}) => {
|
|
24
|
+
const resolved = { ...DEFAULT_TABLE_COMPONENTS, ...components };
|
|
25
|
+
for (const [key, value] of Object.entries(resolved)) {
|
|
26
|
+
if (typeof value !== "string" || !value) {
|
|
27
|
+
throw new TypeError(`components.${key} must be a non-empty string`);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
return resolved;
|
|
31
|
+
};
|
|
32
|
+
const createHeadElement = (cell, name, attributes = []) => createMdxTextElement(name, cell.children, attributes);
|
|
33
|
+
const createCellElement = (children, name, attributes = []) => ({
|
|
34
|
+
type: "mdxJsxTextElement",
|
|
35
|
+
name,
|
|
36
|
+
attributes,
|
|
37
|
+
children: children,
|
|
38
|
+
});
|
|
39
|
+
// The native table mapping receives the same textAlign style as an ordinary
|
|
40
|
+
// Markdown table. Custom components retain control of their own prop contract.
|
|
41
|
+
const alignmentAttributes = (table, index, name) => {
|
|
42
|
+
const textAlign = table.align?.[index];
|
|
43
|
+
if (!textAlign || (name !== "th" && name !== "td"))
|
|
44
|
+
return [];
|
|
45
|
+
return [
|
|
46
|
+
{
|
|
47
|
+
type: "mdxJsxAttribute",
|
|
48
|
+
name: "style",
|
|
49
|
+
value: {
|
|
50
|
+
type: "mdxJsxAttributeValueExpression",
|
|
51
|
+
value: JSON.stringify({ textAlign }),
|
|
52
|
+
data: {
|
|
53
|
+
estree: {
|
|
54
|
+
type: "Program",
|
|
55
|
+
sourceType: "module",
|
|
56
|
+
body: [
|
|
57
|
+
{
|
|
58
|
+
type: "ExpressionStatement",
|
|
59
|
+
expression: valueToEstree({ textAlign }),
|
|
60
|
+
},
|
|
61
|
+
],
|
|
62
|
+
},
|
|
63
|
+
},
|
|
64
|
+
},
|
|
65
|
+
},
|
|
66
|
+
];
|
|
67
|
+
};
|
|
68
|
+
/**
|
|
69
|
+
* A split in any body row widens the column for the whole table, so the header
|
|
70
|
+
* cell and every unsplit cell in that column carry a span to keep the grid
|
|
71
|
+
* rectangular.
|
|
72
|
+
*/
|
|
73
|
+
export const createLayoutTable = ({ columnIndex, components, split, spanAttribute, table, }) => {
|
|
74
|
+
const headerRow = table.children[0];
|
|
75
|
+
if (!headerRow) {
|
|
76
|
+
throw new Error("cudoc: cannot lay out a table without a header row");
|
|
77
|
+
}
|
|
78
|
+
const cudocTable = table;
|
|
79
|
+
const cellLayouts = cudocTable.children.slice(1).map((row) => {
|
|
80
|
+
const cell = row.children[columnIndex];
|
|
81
|
+
return cell ? splitCell(cell.children, split) : [[]];
|
|
82
|
+
});
|
|
83
|
+
const hasSplitCell = cellLayouts.some((layout) => layout.length > 1);
|
|
84
|
+
const spanValue = String(split.columns);
|
|
85
|
+
const headerElements = headerRow.children.map((cell, index) => createHeadElement(cell, components.head, [
|
|
86
|
+
...alignmentAttributes(table, index, components.head),
|
|
87
|
+
...(index === columnIndex && hasSplitCell
|
|
88
|
+
? [createMdxAttribute(spanAttribute, spanValue)]
|
|
89
|
+
: []),
|
|
90
|
+
]));
|
|
91
|
+
const bodyRows = cudocTable.children.slice(1).map((row, rowIndex) => {
|
|
92
|
+
const cellElements = row.children.flatMap((cell, index) => {
|
|
93
|
+
const attributes = alignmentAttributes(table, index, components.cell);
|
|
94
|
+
if (index !== columnIndex) {
|
|
95
|
+
return [createCellElement(cell.children, components.cell, attributes)];
|
|
96
|
+
}
|
|
97
|
+
const layout = cellLayouts[rowIndex] ?? [cell.children];
|
|
98
|
+
if (layout.length === 1) {
|
|
99
|
+
return [
|
|
100
|
+
createCellElement(layout[0] ?? [], components.cell, [
|
|
101
|
+
...attributes,
|
|
102
|
+
...(hasSplitCell
|
|
103
|
+
? [createMdxAttribute(spanAttribute, spanValue)]
|
|
104
|
+
: []),
|
|
105
|
+
]),
|
|
106
|
+
];
|
|
107
|
+
}
|
|
108
|
+
return layout.map((children) => createCellElement(children, components.cell, attributes));
|
|
109
|
+
});
|
|
110
|
+
return createMdxFlowElement(components.row, [
|
|
111
|
+
...asFlowChildren(cellElements),
|
|
112
|
+
]);
|
|
113
|
+
});
|
|
114
|
+
return createMdxFlowElement(components.table, [
|
|
115
|
+
createMdxFlowElement(components.header, [
|
|
116
|
+
createMdxFlowElement(components.row, [...asFlowChildren(headerElements)]),
|
|
117
|
+
]),
|
|
118
|
+
createMdxFlowElement(components.body, bodyRows),
|
|
119
|
+
]);
|
|
120
|
+
};
|
|
121
|
+
//# sourceMappingURL=create-table.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-table.js","sourceRoot":"","sources":["../../../../src/internal/transforms/table-column-layout/create-table.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAGH,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAA;AAO3D,OAAO,EACL,cAAc,EACd,kBAAkB,EAClB,oBAAoB,EACpB,oBAAoB,GACrB,MAAM,qBAAqB,CAAA;AAC5B,OAAO,EAAE,SAAS,EAA6B,MAAM,iBAAiB,CAAA;AAEtE,MAAM,CAAC,MAAM,wBAAwB,GAAG;IACtC,KAAK,EAAE,OAAO;IACd,MAAM,EAAE,OAAO;IACf,IAAI,EAAE,OAAO;IACb,GAAG,EAAE,IAAI;IACT,IAAI,EAAE,IAAI;IACV,IAAI,EAAE,IAAI;CACF,CAAA;AAaV,MAAM,CAAC,MAAM,sBAAsB,GAAG,CACpC,aAA8B,EAAE,EACP,EAAE;IAC3B,MAAM,QAAQ,GAAG,EAAE,GAAG,wBAAwB,EAAE,GAAG,UAAU,EAAE,CAAA;IAC/D,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE,CAAC;QACpD,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,CAAC,KAAK,EAAE,CAAC;YACxC,MAAM,IAAI,SAAS,CAAC,cAAc,GAAG,6BAA6B,CAAC,CAAA;QACrE,CAAC;IACH,CAAC;IACD,OAAO,QAAQ,CAAA;AACjB,CAAC,CAAA;AAED,MAAM,iBAAiB,GAAG,CACxB,IAAe,EACf,IAAY,EACZ,aAAgC,EAAE,EACf,EAAE,CAAC,oBAAoB,CAAC,IAAI,EAAE,IAAI,CAAC,QAAQ,EAAE,UAAU,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@
|
|
|
1
|
+
/**
|
|
2
|
+
* Lays out a table's column as host components, optionally splitting one column
|
|
3
|
+
* across several cells.
|
|
4
|
+
*
|
|
5
|
+
* Which table this applies to is described declaratively — the heading above it
|
|
6
|
+
* and the header text of the column — because options have to survive JSON
|
|
7
|
+
* serialization on their way through a bundler config.
|
|
8
|
+
*/
|
|
9
|
+
import type { SectionSelector, TransformContext } from "../../core/index.js";
|
|
10
|
+
import { type DelimiterPair } from "../../core/index.js";
|
|
11
|
+
import { type ResolvedTableComponents, type TableComponents } from "./create-table.js";
|
|
12
|
+
import { resolveSplitOptions, type SplitOptions } from "./split-cell.js";
|
|
13
|
+
export declare const DEFAULT_SPAN_ATTRIBUTE = "colSpan";
|
|
14
|
+
export type TableColumnLayoutOptions = {
|
|
15
|
+
/** The heading that introduces the table this rule applies to. */
|
|
16
|
+
section: SectionSelector;
|
|
17
|
+
/** Header text of the column to lay out. Compared after collapsing spaces. */
|
|
18
|
+
columnHeaders: string[];
|
|
19
|
+
split?: SplitOptions;
|
|
20
|
+
components?: TableComponents;
|
|
21
|
+
/** Attribute used to widen a cell. Defaults to `colSpan`. */
|
|
22
|
+
spanAttribute?: string;
|
|
23
|
+
/**
|
|
24
|
+
* Delimiter pairs stripped from a header cell before comparison, so a column
|
|
25
|
+
* header carrying badge or id syntax still matches.
|
|
26
|
+
*/
|
|
27
|
+
metadataDelimiters?: DelimiterPair[];
|
|
28
|
+
/** Element names ignored when reading header text, such as a badge. */
|
|
29
|
+
ignoreElements?: string[];
|
|
30
|
+
};
|
|
31
|
+
export type ResolvedTableColumnLayoutOptions = {
|
|
32
|
+
section: SectionSelector;
|
|
33
|
+
columnHeaders: string[];
|
|
34
|
+
split: ReturnType<typeof resolveSplitOptions>;
|
|
35
|
+
components: ResolvedTableComponents;
|
|
36
|
+
spanAttribute: string;
|
|
37
|
+
metadataDelimiters: DelimiterPair[];
|
|
38
|
+
ignoreElements: string[];
|
|
39
|
+
};
|
|
40
|
+
export declare const resolveTableColumnLayoutOptions: (options: TableColumnLayoutOptions, optionPath?: string) => ResolvedTableColumnLayoutOptions;
|
|
41
|
+
/**
|
|
42
|
+
* Runs as a post transform: the cells it reads must already be normalized by
|
|
43
|
+
* the transforms that run on the way down, and any transform that needs to see
|
|
44
|
+
* the generated subtree has to run after this one.
|
|
45
|
+
*/
|
|
46
|
+
export declare const createTableColumnLayoutTransform: (options: ResolvedTableColumnLayoutOptions) => ({ ancestors, index, node, parent }: TransformContext) => void;
|
|
47
|
+
export { createLayoutTable, resolveTableComponents } from "./create-table.js";
|
|
48
|
+
export { resolveSplitOptions, splitCell } from "./split-cell.js";
|
|
49
|
+
export type { TableComponents } from "./create-table.js";
|
|
50
|
+
export type { SplitOptions } from "./split-cell.js";
|
|
51
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/internal/transforms/table-column-layout/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,OAAO,KAAK,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAA;AAC5E,OAAO,EAUL,KAAK,aAAa,EACnB,MAAM,qBAAqB,CAAA;AAC5B,OAAO,EAGL,KAAK,uBAAuB,EAC5B,KAAK,eAAe,EACrB,MAAM,mBAAmB,CAAA;AAC1B,OAAO,EAAE,mBAAmB,EAAE,KAAK,YAAY,EAAE,MAAM,iBAAiB,CAAA;AAExE,eAAO,MAAM,sBAAsB,YAAY,CAAA;AAE/C,MAAM,MAAM,wBAAwB,GAAG;IACrC,kEAAkE;IAClE,OAAO,EAAE,eAAe,CAAA;IACxB,8EAA8E;IAC9E,aAAa,EAAE,MAAM,EAAE,CAAA;IACvB,KAAK,CAAC,EAAE,YAAY,CAAA;IACpB,UAAU,CAAC,EAAE,eAAe,CAAA;IAC5B,6DAA6D;IAC7D,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB;;;OAGG;IACH,kBAAkB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