🎉 initiate project *astro_rewrite*
This commit is contained in:
parent
ffd4d5e86c
commit
2ba37bfbe3
8658 changed files with 2268794 additions and 2538 deletions
18
node_modules/astro/dist/runtime/client/media.js
generated
vendored
Normal file
18
node_modules/astro/dist/runtime/client/media.js
generated
vendored
Normal 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
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue