do11y 0.2.8 → 0.2.10
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.
|
@@ -22,10 +22,12 @@ export const highlightCode = (code, lang) => {
|
|
|
22
22
|
{
|
|
23
23
|
name: "do11y",
|
|
24
24
|
postprocess(html) {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
25
|
+
if (do11yOptions.highlighter.postprocess) {
|
|
26
|
+
const jsdom = new JSDOM(html);
|
|
27
|
+
const preTag = jsdom.window.document.querySelector("pre");
|
|
28
|
+
do11yOptions.highlighter.postprocess(preTag);
|
|
29
|
+
return preTag.parentElement.innerHTML;
|
|
30
|
+
}
|
|
29
31
|
},
|
|
30
32
|
},
|
|
31
33
|
],
|
package/dist/ui/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{createApp as e,createBlock as t,createCommentVNode as n,defineComponent as r,onBeforeMount as i,openBlock as a,renderSlot as o,shallowRef as s,unref as c,withCtx as l}from"vue";import u from"do11y:options";import{createRouter as d,createWebHistory as f}from"vue-router";import p from"do11y:routes";import"do11y:css";var
|
|
1
|
+
import{createApp as e,createBlock as t,createCommentVNode as n,defineComponent as r,onBeforeMount as i,openBlock as a,renderSlot as o,shallowRef as s,unref as c,withCtx as l}from"vue";import u from"do11y:options";import{createRouter as d,createWebHistory as f}from"vue-router";import p from"do11y:routes";import m from"do11y:css";var h=r({__name:`Page`,setup(e){let n=s();return i(async()=>{n.value=(await u.Layout?.())?.default;let e=document.createElement(`style`);e.innerHTML=m,document.head.appendChild(e)}),(e,r)=>n.value?(a(),t(c(n),{key:0},{default:l(()=>[o(e.$slots,`default`)]),_:3})):o(e.$slots,`default`,{key:1})}});(async()=>{let t=d({history:f(`/`),routes:p}),n=e(h);await u.setup?.(n,t),n.use(t),n.mount(`#app`)})();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "do11y",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.10",
|
|
4
4
|
"description": "A bare-bones tool to document Vue components.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"docs-generator",
|
|
@@ -29,16 +29,12 @@
|
|
|
29
29
|
"@mdit-vue/plugin-component": "^3.0.2",
|
|
30
30
|
"@mdit-vue/plugin-frontmatter": "^3.0.2",
|
|
31
31
|
"@mdit-vue/plugin-sfc": "^3.0.2",
|
|
32
|
-
"@shikijs/engine-oniguruma": "^3.22.0",
|
|
33
|
-
"@shikijs/langs": "^3.22.0",
|
|
34
|
-
"@shikijs/themes": "^3.22.0",
|
|
35
32
|
"@shikijs/transformers": "^3.22.0",
|
|
36
33
|
"@types/markdown-it": "^14.1.2",
|
|
37
34
|
"front-matter": "^4.0.2",
|
|
38
35
|
"jsdom": "^28.1.0",
|
|
39
36
|
"markdown-it": "^14.1.1",
|
|
40
37
|
"markdown-it-attrs": "^4.3.1",
|
|
41
|
-
"sass": "^1.97.3",
|
|
42
38
|
"shiki": "^3.22.0",
|
|
43
39
|
"tinyglobby": "^0.2.15",
|
|
44
40
|
"v-custom-block": "^1.0.67",
|
package/src/types.d.ts
CHANGED
|
@@ -26,9 +26,8 @@ declare module "do11y:options" {
|
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
declare module "do11y:css" {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
*/
|
|
29
|
+
const css: string;
|
|
30
|
+
export default string;
|
|
32
31
|
}
|
|
33
32
|
|
|
34
33
|
declare module "do11y:sandbox" {
|
|
@@ -49,3 +48,11 @@ declare module "*.vue?meta" {
|
|
|
49
48
|
|
|
50
49
|
export default meta;
|
|
51
50
|
}
|
|
51
|
+
|
|
52
|
+
declare module "*.vue?highlight" {
|
|
53
|
+
import type { Meta } from "do11y";
|
|
54
|
+
|
|
55
|
+
const html: string;
|
|
56
|
+
|
|
57
|
+
export default html;
|
|
58
|
+
}
|