@xyd-js/content 0.1.0-xyd.4 → 0.1.0-xyd.6
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 +17 -0
- package/dist/index.d.ts +4 -1729
- package/dist/index.js +1807 -31
- package/dist/index.js.map +1 -0
- package/dist/vite.d.ts +972 -0
- package/dist/vite.js +223 -0
- package/dist/vite.js.map +1 -0
- package/package.json +4 -3
- package/packages/md/index.ts +13 -0
- package/packages/md/plugins/index.ts +24 -0
- package/packages/md/plugins/md-codegroup.ts +36 -0
- package/{src/vite-plugins → packages/vite}/index.ts +2 -3
- package/src/{utils/index.ts → fs.ts} +4 -4
- package/src/index.ts +8 -0
- package/src/{navigation/index.ts → navigation.ts} +7 -23
- package/tsup.config.ts +6 -6
- package/dist/navigation.d.ts +0 -6
- package/dist/navigation.js +0 -2345
- package/index.ts +0 -10
- package/navigation.ts +0 -4
- package/src/mdx/options.ts +0 -23
- package/vite.config.js +0 -53
- /package/{src/mdx/code.ts → packages/md/plugins/md-code.ts} +0 -0
- /package/{src/mdx/page.ts → packages/md/plugins/md-page.ts} +0 -0
- /package/{src/mdx/themeSettings.ts → packages/md/plugins/md-themeSettings.ts} +0 -0
- /package/{src/mdx/toc.ts → packages/md/plugins/md-toc.ts} +0 -0
package/index.ts
DELETED
package/navigation.ts
DELETED
package/src/mdx/options.ts
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import remarkFrontmatter from "remark-frontmatter";
|
|
2
|
-
import remarkMdxFrontmatter from "remark-mdx-frontmatter";
|
|
3
|
-
import remarkGfm from "remark-gfm";
|
|
4
|
-
|
|
5
|
-
import {remarkMdxToc, RemarkMdxTocOptions} from "@/mdx/toc";
|
|
6
|
-
import {remarkInjectCodeMeta} from "@/mdx/code";
|
|
7
|
-
import {extractThemeSettings} from "@/mdx/themeSettings";
|
|
8
|
-
import {extractPage} from "@/mdx/page";
|
|
9
|
-
|
|
10
|
-
export function mdxOptions(toc: RemarkMdxTocOptions) {
|
|
11
|
-
return {
|
|
12
|
-
remarkPlugins: [
|
|
13
|
-
remarkFrontmatter,
|
|
14
|
-
remarkMdxFrontmatter,
|
|
15
|
-
remarkGfm,
|
|
16
|
-
remarkInjectCodeMeta,
|
|
17
|
-
remarkMdxToc(toc),
|
|
18
|
-
extractThemeSettings,
|
|
19
|
-
extractPage
|
|
20
|
-
],
|
|
21
|
-
rehypePlugins: []
|
|
22
|
-
}
|
|
23
|
-
}
|
package/vite.config.js
DELETED
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import {defineConfig} from 'vite';
|
|
2
|
-
|
|
3
|
-
export default defineConfig(async () => {
|
|
4
|
-
const mdx = await import('@mdx-js/rollup');
|
|
5
|
-
const remix = await import('@remix-run/dev');
|
|
6
|
-
const remarkFrontmatter = await import('remark-frontmatter');
|
|
7
|
-
const remarkMdxFrontmatter = await import('remark-mdx-frontmatter');
|
|
8
|
-
const remarkGfm = await import('remark-gfm');
|
|
9
|
-
const rehypePrettyCode = await import('rehype-pretty-code'); // TODO: for some reasons does not work
|
|
10
|
-
// const { remarkCodeHike, recmaCodeHike } = await import('codehike/mdx'); // TODO: delete because we use this inside components?
|
|
11
|
-
|
|
12
|
-
const settings = await import("./settings.json");
|
|
13
|
-
|
|
14
|
-
return {
|
|
15
|
-
optimizeDeps: {
|
|
16
|
-
include: ["react/jsx-runtime"],
|
|
17
|
-
},
|
|
18
|
-
resolve: {},
|
|
19
|
-
plugins: [
|
|
20
|
-
mdx.default({
|
|
21
|
-
// providerImportSource: '@mdx-js/react',
|
|
22
|
-
remarkPlugins: [
|
|
23
|
-
// remarkCodeHike,
|
|
24
|
-
remarkFrontmatter.default,
|
|
25
|
-
remarkMdxFrontmatter.default,
|
|
26
|
-
remarkGfm.default
|
|
27
|
-
],
|
|
28
|
-
rehypePlugins: [
|
|
29
|
-
// recmaCodeHike,
|
|
30
|
-
// rehypePrettyCode.default, TODO: for some reasons does not work
|
|
31
|
-
],
|
|
32
|
-
}),
|
|
33
|
-
remix.vitePlugin({
|
|
34
|
-
// routes(defineRoutes) {
|
|
35
|
-
// return defineRoutes((route) => {
|
|
36
|
-
// route(
|
|
37
|
-
// "authentication",
|
|
38
|
-
// "routes/_index.tsx",
|
|
39
|
-
// {id: 'routes/__main-index'},
|
|
40
|
-
// () => {
|
|
41
|
-
// route(
|
|
42
|
-
// "test",
|
|
43
|
-
// "routes/$page.tsx",
|
|
44
|
-
// {id: 'routes/__main-index-2'},
|
|
45
|
-
// );
|
|
46
|
-
// });
|
|
47
|
-
// });
|
|
48
|
-
// },
|
|
49
|
-
}),
|
|
50
|
-
// Add other plugins here
|
|
51
|
-
],
|
|
52
|
-
};
|
|
53
|
-
});
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|