do11y 0.4.0 → 0.4.2

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,8 +5,10 @@ import { render } from "./render.js";
5
5
  export const indexHtml = (folder, key) => ({
6
6
  writeBundle() {
7
7
  const html = render(`/assets/${key}.js`, `/assets/${key}.css`);
8
- const indexHtmlFile = join(output, `${key}.html`);
9
- writeFileSync(indexHtmlFile, html);
8
+ writeFileSync(join(output, `${key}.html`), html);
9
+ if (key === "index") {
10
+ writeFileSync(join(output, "404.html"), html);
11
+ }
10
12
  },
11
13
  configureServer(server) {
12
14
  const bundle = join(folder, `${key}.js`);
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,resolveComponent as o,unref as s}from"vue";import c from"do11y:options";import{createRouter as l,createWebHistory as u}from"vue-router";import d from"do11y:routes";import f from"do11y:page-layout";import p from"do11y:css";var m=r({__name:`Page`,setup(e){return i(async()=>{let e=document.createElement(`style`);e.innerHTML=p,document.head.appendChild(e)}),(e,n)=>{let r=o(`RouterView`);return s(f)?(a(),t(s(f),{key:0})):(a(),t(r,{key:1}))}}});(async()=>{let t=l({history:u(`/`),routes:d,scrollBehavior(e,t,n){if(!e.hash)return;let r=document.querySelector(e.hash);if(!r)return;let i=parseFloat(getComputedStyle(r).scrollMarginTop);return{el:e.hash,top:isNaN(i)?n?.top??0:i}}}),n=e(m);await c.setup?.(n,t),n.use(t),n.mount(`#app`)})();
1
+ import{createApp as e,createBlock as t,defineComponent as n,onBeforeMount as r,openBlock as i,resolveComponent as a,unref as o}from"vue";import s from"do11y:options";import{createRouter as c,createWebHistory as l}from"vue-router";import u from"do11y:routes";import d from"do11y:page-layout";import f from"do11y:css";var p=n({__name:`Page`,setup(e){return r(async()=>{let e=document.createElement(`style`);e.innerHTML=f,document.head.appendChild(e)}),(e,n)=>{let r=a(`RouterView`);return o(d)?(i(),t(o(d),{key:0})):(i(),t(r,{key:1}))}}});(async()=>{let t=c({history:l(`/`),routes:u,scrollBehavior(e,t,n){if(!e.hash)return;let r=document.querySelector(e.hash);if(!r)return;let i=parseFloat(getComputedStyle(r).scrollMarginTop);return{el:e.hash,top:isNaN(i)?n?.top??0:i}}}),n=e(p);await s.setup?.(n,t),n.use(t),n.mount(`#app`)})();
@@ -1 +1 @@
1
- import{computed as e,createBlock as t,createCommentVNode as n,createElementBlock as r,defineComponent as i,mergeProps as a,onBeforeMount as o,openBlock as s,shallowRef as c,unref as l}from"vue";import u from"do11y:options";var d=[`src`],f=i({__name:`SandboxIframe`,props:{id:{},url:{},highlightedSource:{},highlightedStylelessSource:{},highlightedCssSource:{},passedProps:{}},setup(n){let i=n,f=e(()=>`/sandbox?id=${i.id}`),p=c();return o(async()=>{p.value=(await u.SandboxIframe?.())?.default}),(e,i)=>p.value?(s(),t(l(p),a({key:0,id:n.id,url:f.value,"highlighted-source":n.highlightedSource,"highlighted-css-source":n.highlightedCssSource,"highlighted-styleless-source":n.highlightedStylelessSource},n.passedProps),null,16,[`id`,`url`,`highlighted-source`,`highlighted-css-source`,`highlighted-styleless-source`])):(s(),r(`iframe`,{key:1,src:f.value},null,8,d))}});export{f as default};
1
+ import{computed as e,createBlock as t,createElementBlock as n,defineComponent as r,mergeProps as i,onBeforeMount as a,openBlock as o,shallowRef as s,unref as c}from"vue";import l from"do11y:options";var u=[`src`],d=r({__name:`SandboxIframe`,props:{id:{},url:{},highlightedSource:{},highlightedStylelessSource:{},highlightedCssSource:{},passedProps:{}},setup(r){let d=r,f=e(()=>`/sandbox?id=${d.id}`),p=s();return a(async()=>{p.value=(await l.SandboxIframe?.())?.default}),(e,a)=>p.value?(o(),t(c(p),i({key:0,id:r.id,url:f.value,"highlighted-source":r.highlightedSource,"highlighted-css-source":r.highlightedCssSource,"highlighted-styleless-source":r.highlightedStylelessSource},r.passedProps),null,16,[`id`,`url`,`highlighted-source`,`highlighted-css-source`,`highlighted-styleless-source`])):(o(),n(`iframe`,{key:1,src:f.value},null,8,u))}});export{d as default};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "do11y",
3
- "version": "0.4.0",
3
+ "version": "0.4.2",
4
4
  "description": "A bare-bones tool to document Vue components.",
5
5
  "keywords": [
6
6
  "docs-generator",
@@ -29,35 +29,35 @@
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/transformers": "^3.22.0",
33
- "@types/markdown-it": "^14.1.2",
32
+ "@shikijs/transformers": "^4.0.2",
34
33
  "front-matter": "^4.0.2",
35
- "jsdom": "^28.1.0",
34
+ "jsdom": "^29.0.0",
36
35
  "markdown-it": "^14.1.1",
37
36
  "markdown-it-attrs": "^4.3.1",
38
- "shiki": "^3.22.0",
37
+ "shiki": "^4.0.2",
39
38
  "tinyglobby": "^0.2.15",
40
39
  "v-custom-block": "^1.0.67",
41
- "vue-component-meta": "^3.2.4"
40
+ "vue-component-meta": "^3.2.6"
42
41
  },
43
42
  "devDependencies": {
44
43
  "@tsconfig/node24": "^24.0.4",
45
- "@types/jsdom": "^27.0.0",
44
+ "@types/jsdom": "^28.0.0",
45
+ "@types/markdown-it": "^14.1.2",
46
46
  "@types/markdown-it-attrs": "^4.1.3",
47
- "@types/node": "24.10.3",
48
- "@vue/tsconfig": "^0.8.1",
47
+ "@types/node": "25.5.0",
48
+ "@vue/tsconfig": "^0.9.0",
49
49
  "copyfiles": "^2.4.1",
50
50
  "jiti": "^2.6.1",
51
- "oxfmt": "^0.32.0",
52
- "oxlint": "^1.47.0",
51
+ "oxfmt": "^0.41.0",
52
+ "oxlint": "^1.56.0",
53
53
  "typescript": "~5.9.3"
54
54
  },
55
55
  "peerDependencies": {
56
- "@vitejs/plugin-vue": "^6.0.3",
57
- "vite": "8.0.0-beta.14",
58
- "vue": "^3.5.28",
59
- "vue-router": "^5.0.2",
60
- "vue-tsc": "^3.2.4"
56
+ "@vitejs/plugin-vue": "^6.0.5",
57
+ "vite": "8.0.0",
58
+ "vue": "^3.5.30",
59
+ "vue-router": "^5.0.3",
60
+ "vue-tsc": "^3.2.6"
61
61
  },
62
62
  "engines": {
63
63
  "node": ">=24"