diff --git a/src/Swup/assets/dist/controller.d.ts b/src/Swup/assets/dist/controller.d.ts index 399e62e5fab..d0cbe00df37 100644 --- a/src/Swup/assets/dist/controller.d.ts +++ b/src/Swup/assets/dist/controller.d.ts @@ -13,6 +13,7 @@ export default class extends Controller { readonly hasLinkSelectorValue: boolean; readonly themeValue: string; readonly debugValue: boolean; + readonly useProgressBarValue: boolean; static values: { animateHistoryBrowsing: BooleanConstructor; animationSelector: StringConstructor; @@ -22,6 +23,7 @@ export default class extends Controller { theme: StringConstructor; debug: BooleanConstructor; mainElement: StringConstructor; + useProgressBar: BooleanConstructor; }; connect(): void; private dispatchEvent; diff --git a/src/Swup/assets/dist/controller.js b/src/Swup/assets/dist/controller.js index f3a05eefed0..2cbc0763e77 100644 --- a/src/Swup/assets/dist/controller.js +++ b/src/Swup/assets/dist/controller.js @@ -4,6 +4,7 @@ import SwupDebugPlugin from '@swup/debug-plugin'; import SwupFormsPlugin from '@swup/forms-plugin'; import SwupFadeTheme from '@swup/fade-theme'; import SwupSlideTheme from '@swup/slide-theme'; +import SwupProgressPlugin from '@swup/progress-plugin'; class default_1 extends Controller { connect() { @@ -40,6 +41,9 @@ class default_1 extends Controller { if (this.debugValue) { options.plugins.push(new SwupDebugPlugin()); } + if (this.useProgressBarValue) { + options.plugins.push(new SwupProgressPlugin()); + } this.dispatchEvent('pre-connect', { options }); const swup = new Swup(options); this.dispatchEvent('connect', { swup, options }); @@ -57,6 +61,7 @@ default_1.values = { theme: String, debug: Boolean, mainElement: String, + useProgressBar: Boolean, }; export { default_1 as default }; diff --git a/src/Swup/assets/package.json b/src/Swup/assets/package.json index c08798b284b..3ac45bff63a 100644 --- a/src/Swup/assets/package.json +++ b/src/Swup/assets/package.json @@ -18,6 +18,7 @@ "@swup/fade-theme": "^1.0", "@swup/slide-theme": "^1.0", "@swup/forms-plugin": "^1.0||^2.0", + "@swup/progress-plugin": "^1.0||^2.0", "@swup/debug-plugin": "^1.0||^2.0||^3.0", "swup": "^2.0||^3.0", "@hotwired/stimulus": "^3.0.0" @@ -27,6 +28,7 @@ "@swup/fade-theme": "^1.0", "@swup/slide-theme": "^1.0", "@swup/forms-plugin": "^1.0||^2.0", + "@swup/progress-plugin": "^1.0||^2.0", "@swup/debug-plugin": "^1.0||^2.0||^3.0", "swup": "^2.0||^3.0", "@hotwired/stimulus": "^3.0.0" @@ -35,6 +37,7 @@ "@swup/fade-theme": "^1.0", "@swup/slide-theme": "^1.0", "@swup/forms-plugin": "^1.0", + "@swup/progress-plugin": "^1.0||^2.0", "@swup/debug-plugin": "^1.0", "swup": "^2.0", "@hotwired/stimulus": "^3.0.0" diff --git a/src/Swup/assets/src/controller.ts b/src/Swup/assets/src/controller.ts index 6080e190ca8..e26a7586105 100644 --- a/src/Swup/assets/src/controller.ts +++ b/src/Swup/assets/src/controller.ts @@ -15,6 +15,7 @@ import SwupDebugPlugin from '@swup/debug-plugin'; import SwupFormsPlugin from '@swup/forms-plugin'; import SwupFadeTheme from '@swup/fade-theme'; import SwupSlideTheme from '@swup/slide-theme'; +import SwupProgressPlugin from '@swup/progress-plugin'; export default class extends Controller { declare readonly animateHistoryBrowsingValue: boolean; @@ -30,6 +31,7 @@ export default class extends Controller { declare readonly hasLinkSelectorValue: boolean; declare readonly themeValue: string; declare readonly debugValue: boolean; + declare readonly useProgressBarValue: boolean; static values = { animateHistoryBrowsing: Boolean, @@ -42,6 +44,7 @@ export default class extends Controller { theme: String, debug: Boolean, mainElement: String, + useProgressBar: Boolean, }; connect() { @@ -81,6 +84,9 @@ export default class extends Controller { if (this.debugValue) { options.plugins.push(new SwupDebugPlugin()); } + if (this.useProgressBarValue) { + options.plugins.push(new SwupProgressPlugin()); + } this.dispatchEvent('pre-connect', { options }); diff --git a/src/Swup/assets/src/index.d.ts b/src/Swup/assets/src/index.d.ts index 784797fca74..f24d017305e 100644 --- a/src/Swup/assets/src/index.d.ts +++ b/src/Swup/assets/src/index.d.ts @@ -3,3 +3,4 @@ declare module '@swup/debug-plugin'; declare module '@swup/forms-plugin'; declare module '@swup/fade-theme'; declare module '@swup/slide-theme'; +declare module '@swup/progress-plugin';