vitepress-plugin-caniuse 0.1.1 → 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/dist/client/browser/index.js +1 -1
- package/dist/client/ssr/index.js +1 -1
- package/dist/node/index.d.ts +15 -15
- package/dist/node/index.js +7 -4
- package/package.json +3 -3
|
@@ -5,7 +5,7 @@ import { useData } from "vitepress/client";
|
|
|
5
5
|
//#region src/client/VPCaniuse.vue
|
|
6
6
|
const _hoisted_1 = ["src", "title"];
|
|
7
7
|
const url = "https://caniuse.pengzhanbo.cn/";
|
|
8
|
-
const _sfc_main =
|
|
8
|
+
const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
9
9
|
__name: "VPCaniuse",
|
|
10
10
|
props: {
|
|
11
11
|
feature: {},
|
package/dist/client/ssr/index.js
CHANGED
|
@@ -4,7 +4,7 @@ import { useEventListener } from "@vueuse/core";
|
|
|
4
4
|
import { useData } from "vitepress/client";
|
|
5
5
|
//#region src/client/VPCaniuse.vue
|
|
6
6
|
const url = "https://caniuse.pengzhanbo.cn/";
|
|
7
|
-
const _sfc_main =
|
|
7
|
+
const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
8
8
|
__name: "VPCaniuse",
|
|
9
9
|
__ssrInlineRender: true,
|
|
10
10
|
props: {
|
package/dist/node/index.d.ts
CHANGED
|
@@ -1,35 +1,35 @@
|
|
|
1
1
|
import { PluginSimple } from "markdown-it";
|
|
2
2
|
|
|
3
|
-
//#region src/node/
|
|
3
|
+
//#region src/node/plugin.d.ts
|
|
4
4
|
/**
|
|
5
5
|
* @example
|
|
6
6
|
* `.vitepress/config.ts`
|
|
7
7
|
* ```ts
|
|
8
|
-
* import { definePlugin } from 'vitepress'
|
|
9
|
-
* import
|
|
8
|
+
* import { definePlugin } from 'vitepress-tuck'
|
|
9
|
+
* import caniuse from 'vitepress-plugin-caniuse'
|
|
10
10
|
* export default defineConfig({
|
|
11
|
-
*
|
|
12
|
-
* config: (md) => {
|
|
13
|
-
* md.use(caniuseMarkdownPlugin)
|
|
14
|
-
* },
|
|
15
|
-
* },
|
|
11
|
+
* plugins: [caniuse()],
|
|
16
12
|
* })
|
|
17
13
|
* ```
|
|
18
14
|
*/
|
|
19
|
-
declare const
|
|
15
|
+
declare const caniuse: (options?: unknown) => import("vitepress-tuck").VitepressPlugin;
|
|
20
16
|
//#endregion
|
|
21
|
-
//#region src/node/
|
|
17
|
+
//#region src/node/markdown.d.ts
|
|
22
18
|
/**
|
|
23
19
|
* @example
|
|
24
20
|
* `.vitepress/config.ts`
|
|
25
21
|
* ```ts
|
|
26
|
-
* import { definePlugin } from 'vitepress
|
|
27
|
-
* import
|
|
22
|
+
* import { definePlugin } from 'vitepress'
|
|
23
|
+
* import { caniuseMarkdownPlugin } from 'vitepress-plugin-caniuse'
|
|
28
24
|
* export default defineConfig({
|
|
29
|
-
*
|
|
25
|
+
* markdown: {
|
|
26
|
+
* config: (md) => {
|
|
27
|
+
* md.use(caniuseMarkdownPlugin)
|
|
28
|
+
* },
|
|
29
|
+
* },
|
|
30
30
|
* })
|
|
31
31
|
* ```
|
|
32
32
|
*/
|
|
33
|
-
declare const
|
|
33
|
+
declare const caniuseMarkdownPlugin: PluginSimple;
|
|
34
34
|
//#endregion
|
|
35
|
-
export {
|
|
35
|
+
export { caniuse, caniuse as default, caniuseMarkdownPlugin };
|
package/dist/node/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { definePlugin } from "vitepress-tuck";
|
|
2
2
|
import { createEmbedRuleBlock, stringifyAttrs } from "vitepress-plugin-toolkit";
|
|
3
|
-
//#region src/node/
|
|
3
|
+
//#region src/node/markdown.ts
|
|
4
4
|
/**
|
|
5
5
|
* @example
|
|
6
6
|
* `.vitepress/config.ts`
|
|
@@ -57,7 +57,7 @@ function resolveVersions(versions) {
|
|
|
57
57
|
};
|
|
58
58
|
}
|
|
59
59
|
//#endregion
|
|
60
|
-
//#region src/node/
|
|
60
|
+
//#region src/node/plugin.ts
|
|
61
61
|
/**
|
|
62
62
|
* @example
|
|
63
63
|
* `.vitepress/config.ts`
|
|
@@ -69,7 +69,7 @@ function resolveVersions(versions) {
|
|
|
69
69
|
* })
|
|
70
70
|
* ```
|
|
71
71
|
*/
|
|
72
|
-
|
|
72
|
+
const caniuse = definePlugin(() => ({
|
|
73
73
|
name: "vitepress-plugin-caniuse",
|
|
74
74
|
client: { enhance: "enhanceAppWithCaniuse" },
|
|
75
75
|
markdown: { config: (md) => {
|
|
@@ -78,4 +78,7 @@ var node_default = definePlugin(() => ({
|
|
|
78
78
|
vite: { ssr: { noExternal: ["vitepress-plugin-caniuse"] } }
|
|
79
79
|
}));
|
|
80
80
|
//#endregion
|
|
81
|
-
|
|
81
|
+
//#region src/node/index.ts
|
|
82
|
+
var node_default = caniuse;
|
|
83
|
+
//#endregion
|
|
84
|
+
export { caniuse, caniuseMarkdownPlugin, node_default as default };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vitepress-plugin-caniuse",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.3.0",
|
|
5
5
|
"description": "Embed caniuse.com data in your VitePress site",
|
|
6
6
|
"author": "pengzhanbo <q942450674@outlook.com> (https://github.com/pengzhanbo/)",
|
|
7
7
|
"license": "MIT",
|
|
@@ -35,8 +35,8 @@
|
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"@vueuse/core": "^14.3.0",
|
|
38
|
-
"vitepress-
|
|
39
|
-
"vitepress-
|
|
38
|
+
"vitepress-tuck": "0.3.0",
|
|
39
|
+
"vitepress-plugin-toolkit": "0.3.0"
|
|
40
40
|
},
|
|
41
41
|
"publishConfig": {
|
|
42
42
|
"access": "public",
|