-
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix missing props propagation in integration
- Loading branch information
Showing
10 changed files
with
54 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"astro-vtbot": patch | ||
--- | ||
|
||
Fixes a bug where explicitly set properties of `<ViewTransitions />` were lost. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,23 @@ | ||
--- | ||
export interface Props {} | ||
--- | ||
|
||
<script> | ||
import "https://unpkg.com/@swup/progress-plugin@3" | ||
import 'https://unpkg.com/@swup/progress-plugin@3'; | ||
import { loading } from './loading-indicator'; | ||
|
||
import { TRANSITION_AFTER_SWAP } from 'astro:transitions/client'; | ||
//@ts-ignore | ||
const plugin = new SwupProgressPlugin(); | ||
|
||
document.addEventListener('astro:after-swap', () => plugin.progressBar.installStyleElement()); | ||
document.addEventListener(TRANSITION_AFTER_SWAP, () => plugin.progressBar.installStyleElement()); | ||
|
||
loading(() => plugin.startShowingProgress(), () => plugin.stopShowingProgress()); | ||
loading( | ||
() => plugin.startShowingProgress(), | ||
() => plugin.stopShowingProgress() | ||
); | ||
</script> | ||
|
||
<style is:global> | ||
.swup-progress-bar { | ||
} | ||
</style> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export default function ProgressBar(_props: import('./ProgressBar.astro').Props): any; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,33 @@ | ||
--- | ||
import LoadingIndicator from 'astro-vtbot/components/LoadingIndicator.astro' | ||
import LoadingIndicator from 'astro-vtbot/components/LoadingIndicator.astro'; | ||
--- | ||
|
||
{/* By rendering <LoadingIndicator/> here, | ||
you inherit the logic that sets the "loading" CSS class */} | ||
{ | ||
/* By rendering <LoadingIndicator/> here, | ||
you inherit the logic that sets the "loading" CSS class */ | ||
} | ||
<LoadingIndicator /> | ||
|
||
{/* Defining this div is only necessary | ||
if you do not want to use the default element that holds the favicon image */} | ||
<div id="vtbot-loading-indicator"> <!-- make sure to use this id --> | ||
... | ||
<div> | ||
|
||
<style is:global> | ||
#vtbot-loading-indicator { | ||
/* basic styling, typically with position: fixed */ | ||
/* hide the indicator with display: none, opacity: 0, visibility: hidden, right: -100vw, ... */ | ||
... | ||
} | ||
html.loading #vtbot-loading-indicator { | ||
/* show the indicator with display: block, opacity: 1, visibility: visible, right: 3vw, ... */ | ||
... | ||
} | ||
</style> | ||
{ | ||
/* Defining this div is only necessary | ||
if you do not want to use the default element that holds the favicon image */ | ||
} | ||
<div id="vtbot-loading-indicator"> | ||
<!-- make sure to use this id --> | ||
<!-- ... --> | ||
<div> | ||
<style is:global> | ||
#vtbot-loading-indicator { | ||
/* basic styling, typically with position: fixed */ | ||
/* hide the indicator with display: none, opacity: 0, visibility: hidden, right: -100vw, ... */ | ||
|
||
/* ... */ | ||
} | ||
html.loading #vtbot-loading-indicator { | ||
/* show the indicator with display: block, opacity: 1, visibility: visible, right: 3vw, ... */ | ||
|
||
/* ... */ | ||
} | ||
</style> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
/// <reference types="astro/client" /> | ||
/// <reference types="astro/client" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters