@vuebro/runtime 1.4.2 → 1.4.3

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.
@@ -1 +1 @@
1
- {"_markdown-ZQs2xtk_.js":{"file":"assets/markdown-ZQs2xtk_.js","name":"markdown"},"_mermaid-DJVpeobB.js":{"file":"assets/mermaid-DJVpeobB.js","name":"mermaid"},"_shared-BzxCZaHp.js":{"file":"assets/shared-BzxCZaHp.js","name":"shared","isDynamicEntry":true,"imports":["_markdown-ZQs2xtk_.js"]},"index.html":{"file":"assets/index-DtvNdQUV.js","name":"index","src":"index.html","isEntry":true,"imports":["_shared-BzxCZaHp.js","_mermaid-DJVpeobB.js","_markdown-ZQs2xtk_.js"],"dynamicImports":["_shared-BzxCZaHp.js","_shared-BzxCZaHp.js"],"css":["assets/index-vGiKZPT9.css"]},"node_modules/vue/dist/vue.esm-browser.prod.js":{"file":"assets/vue.esm-browser.prod-3.5.25.js","isStaticEntry":true,"name":"vue"},"node_modules/vue-router/dist/vue-router.esm-browser.prod.js":{"file":"assets/vue-router.esm-browser.prod-4.6.3.js","isStaticEntry":true,"name":"vue-router"},"node_modules/@vuebro/loader-sfc/dist/loader-sfc.esm-browser.prod.js":{"file":"assets/loader-sfc.esm-browser.prod-2.4.2.js","isStaticEntry":true,"name":"@vuebro/loader-sfc"}}
1
+ {"_markdown-ZQs2xtk_.js":{"file":"assets/markdown-ZQs2xtk_.js","name":"markdown"},"_mermaid-DJVpeobB.js":{"file":"assets/mermaid-DJVpeobB.js","name":"mermaid"},"_shared-BzxCZaHp.js":{"file":"assets/shared-BzxCZaHp.js","name":"shared","isDynamicEntry":true,"imports":["_markdown-ZQs2xtk_.js"]},"index.html":{"file":"assets/index-C07bLvA7.js","name":"index","src":"index.html","isEntry":true,"imports":["_shared-BzxCZaHp.js","_mermaid-DJVpeobB.js","_markdown-ZQs2xtk_.js"],"dynamicImports":["_shared-BzxCZaHp.js","_shared-BzxCZaHp.js"],"css":["assets/index-vGiKZPT9.css"]},"node_modules/vue/dist/vue.esm-browser.prod.js":{"file":"assets/vue.esm-browser.prod-3.5.25.js","isStaticEntry":true,"name":"vue"},"node_modules/vue-router/dist/vue-router.esm-browser.prod.js":{"file":"assets/vue-router.esm-browser.prod-4.6.3.js","isStaticEntry":true,"name":"vue-router"},"node_modules/@vuebro/loader-sfc/dist/loader-sfc.esm-browser.prod.js":{"file":"assets/loader-sfc.esm-browser.prod-2.4.2.js","isStaticEntry":true,"name":"@vuebro/loader-sfc"}}
@@ -418,4 +418,4 @@ ${e.sfcBlocks?.script?.content??""}
418
418
  ${e.sfcBlocks?.scriptSetup?.content??""}
419
419
  ${e.sfcBlocks?.styles.map(({content:n})=>n).join(`
420
420
  `)??""}
421
- `,{scriptOptions:{inlineTemplate:!0}}))};function Ao(t,e){const n=t.type,r=n==="html"?"htmlAttrs":n==="body"?"bodyAttrs":n;if(typeof r!="string"||!(r in e))return;const o=t.props||{};if(t.children){const i="children";o.children=Array.isArray(t.children)?t.children[0][i]:t[i]}Array.isArray(e[r])?e[r].push(o):r==="title"?e.title=o.children:e[r]=o}function Km(t){const e={title:void 0,htmlAttrs:void 0,bodyAttrs:void 0,base:void 0,meta:[],link:[],style:[],script:[],noscript:[]};for(const n of t)if(typeof n.type=="symbol"&&Array.isArray(n.children))for(const r of n.children)Ao(r,e);else Ao(n,e);return e}const Gm=Wt({name:"Head",setup(t,{slots:e}){const n=wt({}),r=Un(n);return Po(()=>{r.dispose()}),()=>(We(()=>{e.default&&r.patch(Km(e.default()))}),null)}}),Ym=Wt({__name:"NotFoundView",setup(t){return(e,n)=>(gt(),Oe(Ro,null,[$s(_t(Gm),null,{default:Nn(()=>[...n[0]||(n[0]=[qt("title",null,"Page Not Found",-1)])]),_:1}),n[1]||(n[1]=qt("div",{class:"absolute inset-0 grid place-items-center"},[qt("div",{class:"text-center"},[qt("div",{class:"text-9xl"},"404"),qt("p",null,"Oops. Nothing here...")])],-1))],64))}}),Xm={mounted(t,e){if(typeof e.value=="function"){const n=e.value;bt(mo(t),r=>n(r),{immediate:!0})}else{const[n,r]=e.value;bt(mo(t,r),o=>n(o),{immediate:!0})}}};function Zm(){let t=!1;const e=mt(!1);return(n,r)=>{if(e.value=r.value,t)return;t=!0;const o=Wh(n,r.value);bt(e,i=>o.value=i)}}Zm();const Qm=["id"],Jm=Wt({__name:"PageView",setup(t){const e=Q(et,"$these"),n=Q(Dt,"kvNodes"),{intersecting:r,promises:o}=et,i=()=>{[r,o].forEach(a=>{a.clear()})},s=G(()=>new Map(e.value.map(({id:a})=>[a,ls(a)])));return We(()=>{i(),e.value.forEach(({id:a})=>{r.set(a,!1),o.set(a,as())})}),Lo(()=>{i()}),(a,l)=>(gt(!0),Oe(Ro,null,xs(s.value,([c,f])=>Ss((gt(),Oe("div",{id:c,key:c,class:Fo(n.value[c]?.class),"un-cloak":""},[(gt(),ce(Vn(f),{id:c,onVnodeMounted:d=>_t(o).get(c)?.resolve(void 0)},null,8,["id","onVnodeMounted"]))],10,Qm)),[[_t(Xm),[d=>{_t(r).set(c,d)},{threshold:.1}]]])),128))}}),t0=["id"],e0=Wt({__name:"RootView",setup(t){const e=Q(Dt,"nodes"),{root:n}=et,r=G(()=>e.value[0]&&ls(e.value[0].id));return(o,i)=>(gt(),ce(Cs,null,{default:Nn(()=>[e.value[0]?.enabled?(gt(),Oe("div",{key:0,id:e.value[0].id,class:Fo(e.value[0].class),"un-cloak":""},[(gt(),ce(Vn(r.value),{id:e.value[0].id,onVnodeMounted:i[0]||(i[0]=s=>_t(n).resolve(void 0))},null,8,["id"]))],10,t0)):Es("",!0)]),_:1}))}});let Oo=Q(et,"routeName");const cs=De(et),n0=Q(cs,"$these"),r0=Q(cs,"that"),us=De(Dt),o0=Q(us,"kvNodes"),Mo=Q(us,"nodes"),[i0,s0]=(await Promise.all(["index","fonts"].map(t=>Wn(`${t}.json`)))).map(t=>t??[]),fs=js(Dm),{intersecting:a0,promises:l0,root:c0}=et,{pathname:u0}=new URL(document.baseURI);Io.info("👊 VueBro / https://github.com/vuebro / runtime ver.:","1.4.2");Dt.tree=i0;await sl({defaults:{presets:$h({webFontsOptions:{customFetch:_s,fonts:Object.fromEntries(s0.map(t=>[t.toLowerCase().replace(/ /g,"_"),t]))}})},ready:({extractAll:t,toggleObserver:e})=>{let n=!1;const r=As({history:Os(u0),routes:[...Mo.value.filter(({path:a})=>a!==void 0).map(a=>{const{id:l,loc:c,path:f}=a,d=c?.replace(/ /g,"_").replace(/^\/?/,"/").replace(/\/?$/,"/");return{...d&&{alias:d},children:[{component:Jm,name:l,path:""}],component:e0,path:f.replace(/^\/?/,"/").replace(/\/?$/,"/")}}),{component:Ym,name:"404",path:"/:pathMatch(.*)*"}],scrollBehavior:async({hash:a,name:l})=>{if(l)if(Oo.value=l,n)n=!1;else{const{index:c,parent:{flat:f}={}}=r0.value??{};return e(!0),await c0.promise,await Promise.all([...l0.values()].map(({promise:d})=>d)),await t(),e(!1),"requestIdleCallback"in window?await new Promise(d=>requestIdleCallback(d)):(await new Promise(d=>requestAnimationFrame(d)),await new Promise(d=>setTimeout(d))),{behavior:"smooth",...a||f&&c?{el:a||`#${String(l)}`}:{left:0,top:0}}}return!1}}),o=Nh(window,{onStop:()=>{const[a]=n0.value,[l]=Mo.value;if(l&&a){const{$children:[{id:c}={}]=[]}=l,f=!Math.floor(i.value)&&!Math.floor(s.value)&&a.id===c?l.id:[...a0.entries()].find(([,d])=>d)?.[0]??a.id;f!==Oo.value&&(n=!0,r.push({name:f}).catch(Io.error))}}}),i=Q(o,"x"),s=Q(o,"y");return r.beforeEach(({path:a})=>a!==decodeURI(a)?decodeURI(a):void 0),fs.use(r),!1},rootElement:()=>document.getElementById("app")??void 0});fs.use(Ea()).provide("pages",Ah(o0.value)).mount("#app");
421
+ `,{scriptOptions:{inlineTemplate:!0}}))};function Ao(t,e){const n=t.type,r=n==="html"?"htmlAttrs":n==="body"?"bodyAttrs":n;if(typeof r!="string"||!(r in e))return;const o=t.props||{};if(t.children){const i="children";o.children=Array.isArray(t.children)?t.children[0][i]:t[i]}Array.isArray(e[r])?e[r].push(o):r==="title"?e.title=o.children:e[r]=o}function Km(t){const e={title:void 0,htmlAttrs:void 0,bodyAttrs:void 0,base:void 0,meta:[],link:[],style:[],script:[],noscript:[]};for(const n of t)if(typeof n.type=="symbol"&&Array.isArray(n.children))for(const r of n.children)Ao(r,e);else Ao(n,e);return e}const Gm=Wt({name:"Head",setup(t,{slots:e}){const n=wt({}),r=Un(n);return Po(()=>{r.dispose()}),()=>(We(()=>{e.default&&r.patch(Km(e.default()))}),null)}}),Ym=Wt({__name:"NotFoundView",setup(t){return(e,n)=>(gt(),Oe(Ro,null,[$s(_t(Gm),null,{default:Nn(()=>[...n[0]||(n[0]=[qt("title",null,"Page Not Found",-1)])]),_:1}),n[1]||(n[1]=qt("div",{class:"absolute inset-0 grid place-items-center"},[qt("div",{class:"text-center"},[qt("div",{class:"text-9xl"},"404"),qt("p",null,"Oops. Nothing here...")])],-1))],64))}}),Xm={mounted(t,e){if(typeof e.value=="function"){const n=e.value;bt(mo(t),r=>n(r),{immediate:!0})}else{const[n,r]=e.value;bt(mo(t,r),o=>n(o),{immediate:!0})}}};function Zm(){let t=!1;const e=mt(!1);return(n,r)=>{if(e.value=r.value,t)return;t=!0;const o=Wh(n,r.value);bt(e,i=>o.value=i)}}Zm();const Qm=["id"],Jm=Wt({__name:"PageView",setup(t){const e=Q(et,"$these"),n=Q(Dt,"kvNodes"),{intersecting:r,promises:o}=et,i=()=>{[r,o].forEach(a=>{a.clear()})},s=G(()=>new Map(e.value.map(({id:a})=>[a,ls(a)])));return We(()=>{i(),e.value.forEach(({id:a})=>{r.set(a,!1),o.set(a,as())})}),Lo(()=>{i()}),(a,l)=>(gt(!0),Oe(Ro,null,xs(s.value,([c,f])=>Ss((gt(),Oe("div",{id:c,key:c,class:Fo(n.value[c]?.class),"un-cloak":""},[(gt(),ce(Vn(f),{id:c,onVnodeMounted:d=>_t(o).get(c)?.resolve(void 0)},null,8,["id","onVnodeMounted"]))],10,Qm)),[[_t(Xm),[d=>{_t(r).set(c,d)},{threshold:.1}]]])),128))}}),t0=["id"],e0=Wt({__name:"RootView",setup(t){const e=Q(Dt,"nodes"),{root:n}=et,r=G(()=>e.value[0]&&ls(e.value[0].id));return(o,i)=>(gt(),ce(Cs,null,{default:Nn(()=>[e.value[0]?.enabled?(gt(),Oe("div",{key:0,id:e.value[0].id,class:Fo(e.value[0].class),"un-cloak":""},[(gt(),ce(Vn(r.value),{id:e.value[0].id,onVnodeMounted:i[0]||(i[0]=s=>_t(n).resolve(void 0))},null,8,["id"]))],10,t0)):Es("",!0)]),_:1}))}});let Oo=Q(et,"routeName");const cs=De(et),n0=Q(cs,"$these"),r0=Q(cs,"that"),us=De(Dt),o0=Q(us,"kvNodes"),Mo=Q(us,"nodes"),[i0,s0]=(await Promise.all(["index","fonts"].map(t=>Wn(`${t}.json`)))).map(t=>t??[]),fs=js(Dm),{intersecting:a0,promises:l0,root:c0}=et,{pathname:u0}=new URL(document.baseURI);Io.info("👊 VueBro / https://github.com/vuebro / runtime ver.:","1.4.3");Dt.tree=i0;await sl({defaults:{presets:$h({webFontsOptions:{customFetch:_s,fonts:Object.fromEntries(s0.map(t=>[t.toLowerCase().replace(/ /g,"_"),t]))}})},ready:({extractAll:t,toggleObserver:e})=>{let n=!1;const r=As({history:Os(u0),routes:[...Mo.value.filter(({path:a})=>a!==void 0).map(a=>{const{id:l,loc:c,path:f}=a,d=c?.replace(/ /g,"_").replace(/^\/?/,"/").replace(/\/?$/,"/");return{...d&&{alias:d},children:[{component:Jm,name:l,path:""}],component:e0,path:f.replace(/^\/?/,"/").replace(/\/?$/,"/")}}),{component:Ym,name:"404",path:"/:pathMatch(.*)*"}],scrollBehavior:async({hash:a,name:l})=>{if(l)if(Oo.value=l,n)n=!1;else{const{index:c,parent:{flat:f}={}}=r0.value??{};return e(!0),await c0.promise,await Promise.all([...l0.values()].map(({promise:d})=>d)),await t(),e(!1),"requestIdleCallback"in window?await new Promise(d=>requestIdleCallback(d)):(await new Promise(d=>requestAnimationFrame(d)),await new Promise(d=>setTimeout(d))),{behavior:"smooth",...a||f&&c?{el:a||`#${String(l)}`}:{left:0,top:0}}}return!1}}),o=Nh(window,{onStop:()=>{const[a]=n0.value,[l]=Mo.value;if(l&&a){const{$children:[{id:c}={}]=[]}=l,f=!Math.floor(i.value)&&!Math.floor(s.value)&&a.id===c?l.id:[...a0.entries()].find(([,d])=>d)?.[0]??a.id;f!==Oo.value&&(n=!0,r.push({name:f}).catch(Io.error))}}}),i=Q(o,"x"),s=Q(o,"y");return r.beforeEach(({path:a})=>a!==decodeURI(a)?decodeURI(a):void 0),fs.use(r),!1},rootElement:()=>document.getElementById("app")??void 0});fs.use(Ea()).provide("pages",Ah(o0.value)).mount("#app");
package/dist/index.html CHANGED
@@ -6,7 +6,7 @@
6
6
  <base href="" />
7
7
  <link rel="preload" crossorigin href="./index.json" as="fetch" />
8
8
  <link rel="preload" crossorigin href="./fonts.json" as="fetch" />
9
- <script type="module" crossorigin src="/assets/index-DtvNdQUV.js"></script>
9
+ <script type="module" crossorigin src="/assets/index-C07bLvA7.js"></script>
10
10
  <link rel="modulepreload" crossorigin href="/assets/markdown-ZQs2xtk_.js">
11
11
  <link rel="modulepreload" crossorigin href="/assets/shared-BzxCZaHp.js">
12
12
  <link rel="modulepreload" crossorigin href="/assets/mermaid-DJVpeobB.js">
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://www.schemastore.org/package",
3
3
  "name": "@vuebro/runtime",
4
- "version": "1.4.2",
4
+ "version": "1.4.3",
5
5
  "description": "Vue.js-based runtime for VueBro applications with dynamic loading, SEO optimization, and intersection observer tracking.",
6
6
  "keywords": [
7
7
  "vue",
@@ -68,7 +68,7 @@
68
68
  "@types/markdown-it-emoji": "^3.0.1",
69
69
  "@types/markdown-it-footnote": "^3.0.4",
70
70
  "@types/node": "^24.10.1",
71
- "@vuebro/configs": "^1.2.17",
71
+ "@vuebro/configs": "^1.2.19",
72
72
  "eslint": "^9.39.1",
73
73
  "unocss": "^66.5.9",
74
74
  "vite": "^7.2.4",