🎉 initiate project *astro_rewrite*

This commit is contained in:
sindrekjelsrud 2023-07-19 21:31:30 +02:00
parent ffd4d5e86c
commit 2ba37bfbe3
8658 changed files with 2268794 additions and 2538 deletions

1
node_modules/astro/dist/runtime/client/hmr.d.ts generated vendored Normal file
View file

@ -0,0 +1 @@
export {};

37
node_modules/astro/dist/runtime/client/hmr.js generated vendored Normal file
View file

@ -0,0 +1,37 @@
if (import.meta.hot) {
const injectedStyles = getInjectedStyles();
const mo = new MutationObserver((records) => {
var _a;
for (const record of records) {
for (const node of record.addedNodes) {
if (isViteInjectedStyle(node)) {
(_a = injectedStyles.get(node.getAttribute("data-vite-dev-id"))) == null ? void 0 : _a.remove();
}
}
}
});
mo.observe(document.documentElement, { subtree: true, childList: true });
import.meta.hot.on("vite:beforeUpdate", async (payload) => {
for (const file of payload.updates) {
if (file.acceptedPath.includes("vue&type=style")) {
const link = document.querySelector(`link[href="${file.acceptedPath}"]`);
if (link) {
link.replaceWith(link.cloneNode(true));
}
}
}
});
}
function getInjectedStyles() {
const injectedStyles = /* @__PURE__ */ new Map();
document.querySelectorAll("style[data-astro-dev-id]").forEach((el) => {
injectedStyles.set(el.getAttribute("data-astro-dev-id"), el);
});
return injectedStyles;
}
function isStyle(node) {
return node.nodeType === node.ELEMENT_NODE && node.tagName.toLowerCase() === "style";
}
function isViteInjectedStyle(node) {
return isStyle(node) && node.getAttribute("type") === "text/css" && !!node.getAttribute("data-vite-dev-id");
}

3
node_modules/astro/dist/runtime/client/idle.d.ts generated vendored Normal file
View file

@ -0,0 +1,3 @@
import type { ClientDirective } from '../../@types/astro';
declare const idleDirective: ClientDirective;
export default idleDirective;

15
node_modules/astro/dist/runtime/client/idle.js generated vendored Normal file
View file

@ -0,0 +1,15 @@
const idleDirective = (load) => {
const cb = async () => {
const hydrate = await load();
await hydrate();
};
if ("requestIdleCallback" in window) {
window.requestIdleCallback(cb);
} else {
setTimeout(cb, 200);
}
};
var idle_default = idleDirective;
export {
idle_default as default
};

View file

@ -0,0 +1,7 @@
/**
* This file is prebuilt from packages/astro/src/runtime/client/idle.ts
* Do not edit this directly, but instead edit that file and rerun the prebuild
* to generate this file.
*/
declare const _default: "(()=>{var i=t=>{let e=async()=>{await(await t())()};\"requestIdleCallback\"in window?window.requestIdleCallback(e):setTimeout(e,200)};(self.Astro||(self.Astro={})).idle=i;window.dispatchEvent(new Event(\"astro:idle\"));})();";
export default _default;

View file

@ -0,0 +1,4 @@
var idle_prebuilt_default = `(()=>{var i=t=>{let e=async()=>{await(await t())()};"requestIdleCallback"in window?window.requestIdleCallback(e):setTimeout(e,200)};(self.Astro||(self.Astro={})).idle=i;window.dispatchEvent(new Event("astro:idle"));})();`;
export {
idle_prebuilt_default as default
};

3
node_modules/astro/dist/runtime/client/load.d.ts generated vendored Normal file
View file

@ -0,0 +1,3 @@
import type { ClientDirective } from '../../@types/astro';
declare const loadDirective: ClientDirective;
export default loadDirective;

8
node_modules/astro/dist/runtime/client/load.js generated vendored Normal file
View file

@ -0,0 +1,8 @@
const loadDirective = async (load) => {
const hydrate = await load();
await hydrate();
};
var load_default = loadDirective;
export {
load_default as default
};

View file

@ -0,0 +1,7 @@
/**
* This file is prebuilt from packages/astro/src/runtime/client/load.ts
* Do not edit this directly, but instead edit that file and rerun the prebuild
* to generate this file.
*/
declare const _default: "(()=>{var e=async t=>{await(await t())()};(self.Astro||(self.Astro={})).load=e;window.dispatchEvent(new Event(\"astro:load\"));})();";
export default _default;

View file

@ -0,0 +1,4 @@
var load_prebuilt_default = `(()=>{var e=async t=>{await(await t())()};(self.Astro||(self.Astro={})).load=e;window.dispatchEvent(new Event("astro:load"));})();`;
export {
load_prebuilt_default as default
};

6
node_modules/astro/dist/runtime/client/media.d.ts generated vendored Normal file
View file

@ -0,0 +1,6 @@
import type { ClientDirective } from '../../@types/astro';
/**
* Hydrate this component when a matching media query is found
*/
declare const mediaDirective: ClientDirective;
export default mediaDirective;

18
node_modules/astro/dist/runtime/client/media.js generated vendored Normal file
View file

@ -0,0 +1,18 @@
const mediaDirective = (load, options) => {
const cb = async () => {
const hydrate = await load();
await hydrate();
};
if (options.value) {
const mql = matchMedia(options.value);
if (mql.matches) {
cb();
} else {
mql.addEventListener("change", cb, { once: true });
}
}
};
var media_default = mediaDirective;
export {
media_default as default
};

View file

@ -0,0 +1,7 @@
/**
* This file is prebuilt from packages/astro/src/runtime/client/media.ts
* Do not edit this directly, but instead edit that file and rerun the prebuild
* to generate this file.
*/
declare const _default: "(()=>{var s=(i,t)=>{let a=async()=>{await(await i())()};if(t.value){let e=matchMedia(t.value);e.matches?a():e.addEventListener(\"change\",a,{once:!0})}};(self.Astro||(self.Astro={})).media=s;window.dispatchEvent(new Event(\"astro:media\"));})();";
export default _default;

View file

@ -0,0 +1,4 @@
var media_prebuilt_default = `(()=>{var s=(i,t)=>{let a=async()=>{await(await i())()};if(t.value){let e=matchMedia(t.value);e.matches?a():e.addEventListener("change",a,{once:!0})}};(self.Astro||(self.Astro={})).media=s;window.dispatchEvent(new Event("astro:media"));})();`;
export {
media_prebuilt_default as default
};

6
node_modules/astro/dist/runtime/client/only.d.ts generated vendored Normal file
View file

@ -0,0 +1,6 @@
import type { ClientDirective } from '../../@types/astro';
/**
* Hydrate this component only on the client
*/
declare const onlyDirective: ClientDirective;
export default onlyDirective;

8
node_modules/astro/dist/runtime/client/only.js generated vendored Normal file
View file

@ -0,0 +1,8 @@
const onlyDirective = async (load) => {
const hydrate = await load();
await hydrate();
};
var only_default = onlyDirective;
export {
only_default as default
};

View file

@ -0,0 +1,7 @@
/**
* This file is prebuilt from packages/astro/src/runtime/client/only.ts
* Do not edit this directly, but instead edit that file and rerun the prebuild
* to generate this file.
*/
declare const _default: "(()=>{var e=async t=>{await(await t())()};(self.Astro||(self.Astro={})).only=e;window.dispatchEvent(new Event(\"astro:only\"));})();";
export default _default;

View file

@ -0,0 +1,4 @@
var only_prebuilt_default = `(()=>{var e=async t=>{await(await t())()};(self.Astro||(self.Astro={})).only=e;window.dispatchEvent(new Event("astro:only"));})();`;
export {
only_prebuilt_default as default
};

8
node_modules/astro/dist/runtime/client/visible.d.ts generated vendored Normal file
View file

@ -0,0 +1,8 @@
import type { ClientDirective } from '../../@types/astro';
/**
* Hydrate this component when one of it's children becomes visible
* We target the children because `astro-island` is set to `display: contents`
* which doesn't work with IntersectionObserver
*/
declare const visibleDirective: ClientDirective;
export default visibleDirective;

22
node_modules/astro/dist/runtime/client/visible.js generated vendored Normal file
View file

@ -0,0 +1,22 @@
const visibleDirective = (load, _options, el) => {
const cb = async () => {
const hydrate = await load();
await hydrate();
};
const io = new IntersectionObserver((entries) => {
for (const entry of entries) {
if (!entry.isIntersecting)
continue;
io.disconnect();
cb();
break;
}
});
for (const child of el.children) {
io.observe(child);
}
};
var visible_default = visibleDirective;
export {
visible_default as default
};

View file

@ -0,0 +1,7 @@
/**
* This file is prebuilt from packages/astro/src/runtime/client/visible.ts
* Do not edit this directly, but instead edit that file and rerun the prebuild
* to generate this file.
*/
declare const _default: "(()=>{var r=(i,c,n)=>{let s=async()=>{await(await i())()},t=new IntersectionObserver(e=>{for(let o of e)if(o.isIntersecting){t.disconnect(),s();break}});for(let e of n.children)t.observe(e)};(self.Astro||(self.Astro={})).visible=r;window.dispatchEvent(new Event(\"astro:visible\"));})();";
export default _default;

View file

@ -0,0 +1,4 @@
var visible_prebuilt_default = `(()=>{var r=(i,c,n)=>{let s=async()=>{await(await i())()},t=new IntersectionObserver(e=>{for(let o of e)if(o.isIntersecting){t.disconnect(),s();break}});for(let e of n.children)t.observe(e)};(self.Astro||(self.Astro={})).visible=r;window.dispatchEvent(new Event("astro:visible"));})();`;
export {
visible_prebuilt_default as default
};