@mintlify/common 1.0.493 → 1.0.495
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/getFileCategory.js
CHANGED
|
@@ -8,6 +8,7 @@ export const generatedStaticFiles = [
|
|
|
8
8
|
'llms-full.txt',
|
|
9
9
|
];
|
|
10
10
|
const supportedStaticFileExtensions = [
|
|
11
|
+
// Image formats
|
|
11
12
|
'.jpeg',
|
|
12
13
|
'.jpg',
|
|
13
14
|
'.jfif',
|
|
@@ -22,14 +23,43 @@ const supportedStaticFileExtensions = [
|
|
|
22
23
|
'.apng',
|
|
23
24
|
'.avif',
|
|
24
25
|
'.bmp',
|
|
26
|
+
'.tiff',
|
|
27
|
+
'.tif',
|
|
28
|
+
// Video formats
|
|
25
29
|
'.mp4',
|
|
26
30
|
'.webm',
|
|
27
31
|
'.ogg',
|
|
28
32
|
'.avi',
|
|
33
|
+
'.mov',
|
|
34
|
+
'.wmv',
|
|
35
|
+
'.flv',
|
|
36
|
+
'.mkv',
|
|
37
|
+
'.m4v',
|
|
38
|
+
// Audio formats
|
|
29
39
|
'.mp3',
|
|
30
40
|
'.wav',
|
|
31
41
|
'.flac',
|
|
42
|
+
'.aac',
|
|
43
|
+
'.ogg',
|
|
44
|
+
'.wma',
|
|
45
|
+
'.m4a',
|
|
46
|
+
// Document formats
|
|
47
|
+
'.pdf',
|
|
48
|
+
'.txt',
|
|
49
|
+
'.doc',
|
|
50
|
+
'.docx',
|
|
51
|
+
'.xls',
|
|
52
|
+
'.xlsx',
|
|
53
|
+
'.ppt',
|
|
54
|
+
'.pptx',
|
|
55
|
+
'.rtf',
|
|
56
|
+
'.odt',
|
|
57
|
+
'.ods',
|
|
58
|
+
'.odp',
|
|
59
|
+
// Data formats
|
|
32
60
|
'.csv',
|
|
61
|
+
'.tsv',
|
|
62
|
+
'.xml',
|
|
33
63
|
];
|
|
34
64
|
export const getFileCategory = (filePath) => {
|
|
35
65
|
filePath = filePath.toLowerCase();
|
|
@@ -4,11 +4,21 @@ export const rehypeZoomImages = () => (tree) => {
|
|
|
4
4
|
visit(tree, 'mdxJsxFlowElement', (node, index, parent) => {
|
|
5
5
|
if (node.name === 'img' || node.name === 'picture' || node.name === 'figure') {
|
|
6
6
|
const noZoom = node.attributes.find((attr) => attr.type === 'mdxJsxAttribute' && attr.name === 'noZoom');
|
|
7
|
-
if (
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
7
|
+
if (parent && index != null) {
|
|
8
|
+
// For img elements, replace with OptimizedImage (it applies Zoom internally)
|
|
9
|
+
if (node.name === 'img') {
|
|
10
|
+
const optimizedImg = u('mdxJsxFlowElement', {
|
|
11
|
+
name: 'OptimizedImage',
|
|
12
|
+
attributes: node.attributes,
|
|
13
|
+
}, []);
|
|
14
|
+
parent.children.splice(index, 1, optimizedImg);
|
|
15
|
+
}
|
|
16
|
+
else if (!noZoom) {
|
|
17
|
+
parent.children.splice(index, 1, u('element', {
|
|
18
|
+
tagName: 'ZoomImage',
|
|
19
|
+
properties: {},
|
|
20
|
+
}, [node]));
|
|
21
|
+
}
|
|
12
22
|
}
|
|
13
23
|
}
|
|
14
24
|
});
|