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.
@@ -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 = /* @__PURE__ */ defineComponent({
8
+ const _sfc_main = /*@__PURE__*/ defineComponent({
9
9
  __name: "VPCaniuse",
10
10
  props: {
11
11
  feature: {},
@@ -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 = /* @__PURE__ */ defineComponent({
7
+ const _sfc_main = /*@__PURE__*/ defineComponent({
8
8
  __name: "VPCaniuse",
9
9
  __ssrInlineRender: true,
10
10
  props: {
@@ -1,35 +1,35 @@
1
1
  import { PluginSimple } from "markdown-it";
2
2
 
3
- //#region src/node/caniusePlugin.d.ts
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 { caniuseMarkdownPlugin } from 'vitepress-plugin-caniuse'
8
+ * import { definePlugin } from 'vitepress-tuck'
9
+ * import caniuse from 'vitepress-plugin-caniuse'
10
10
  * export default defineConfig({
11
- * markdown: {
12
- * config: (md) => {
13
- * md.use(caniuseMarkdownPlugin)
14
- * },
15
- * },
11
+ * plugins: [caniuse()],
16
12
  * })
17
13
  * ```
18
14
  */
19
- declare const caniuseMarkdownPlugin: PluginSimple;
15
+ declare const caniuse: (options?: unknown) => import("vitepress-tuck").VitepressPlugin;
20
16
  //#endregion
21
- //#region src/node/index.d.ts
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-tuck'
27
- * import caniuse from 'vitepress-plugin-caniuse'
22
+ * import { definePlugin } from 'vitepress'
23
+ * import { caniuseMarkdownPlugin } from 'vitepress-plugin-caniuse'
28
24
  * export default defineConfig({
29
- * plugins: [caniuse()],
25
+ * markdown: {
26
+ * config: (md) => {
27
+ * md.use(caniuseMarkdownPlugin)
28
+ * },
29
+ * },
30
30
  * })
31
31
  * ```
32
32
  */
33
- declare const _default: (option?: unknown) => import("vitepress-tuck").VitepressPlugin;
33
+ declare const caniuseMarkdownPlugin: PluginSimple;
34
34
  //#endregion
35
- export { caniuseMarkdownPlugin, _default as default };
35
+ export { caniuse, caniuse as default, caniuseMarkdownPlugin };
@@ -1,6 +1,6 @@
1
1
  import { definePlugin } from "vitepress-tuck";
2
2
  import { createEmbedRuleBlock, stringifyAttrs } from "vitepress-plugin-toolkit";
3
- //#region src/node/caniusePlugin.ts
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/index.ts
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
- var node_default = definePlugin(() => ({
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
- export { caniuseMarkdownPlugin, node_default as default };
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.1.1",
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-plugin-toolkit": "0.1.1",
39
- "vitepress-tuck": "0.1.1"
38
+ "vitepress-tuck": "0.3.0",
39
+ "vitepress-plugin-toolkit": "0.3.0"
40
40
  },
41
41
  "publishConfig": {
42
42
  "access": "public",