swup / astro Goto Github PK
View Code? Open in Web Editor NEWAstro integration for swup 🚀
Astro integration for swup 🚀
Describe the problem
Describe the proposed solution
types
key to the exports
in package.json
How important is this feature to you?
Describe the problem
window.swup
is not available immediately: #6swup:enable
event on the document before accessing itDescribe the proposed solution
<script>
console.log('swup not yet enabled', window.swup);
document.addEventListener('swup:enable', () => {
console.log('swup enabled', window.swup);
});
</script>
Hello!
First of all thanks for this package. i was already using swup with astro for an year but this make everything cleaner and easy.
I just wanted to warn you that with the last version of yesterday (1.3.1) there is something broken with the SwupA11yPlugin (maybe some versions?).
I also tryed with a clean astro project and same error.
The error is: Uncaught (in promise) TypeError: Cannot create property 'announcements' on boolean 'true'.
Am i doing something wrong? Thanks!
Description of the issue
When assigning globalInstance: true
in the configuration, window.swup returns undefined.
How to reproduce the issue
Just start an astro project with the CLI, install swup with the CLI, and assign globalInstance to true in the config.
Context and environment
Happens in Firefox and Chrome, haven't checked others.
@swup/astro version is 1.0.2.
// astro.config.mjs
import { defineConfig } from "astro/config";
import swup from "@swup/astro";
export default defineConfig({
integrations: [
swup({
globalInstance: true,
}),
],
});
// script anywhere in the app
console.log(window.swup) // returns undefined
Before creating this issue...
Describe the problem
When using a built in theme, we cannot pass a configuration object. this makes it impossible to change the direction of the overlay theme easely.
Describe the proposed solution
adding a themeConfig object that can be passed to the new SwupOverlayTheme()
class, like so :
SwupOverlayTheme({
direction: 'to-right'
});
How important is this feature to you?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.