pax_global_header 0000666 0000000 0000000 00000000064 15177314732 0014524 g ustar 00root root 0000000 0000000 52 comment=d5e3e8042bd780e922bffaa06df22a88dd2a37cc
swup-swup-d5e3e80/ 0000775 0000000 0000000 00000000000 15177314732 0014135 5 ustar 00root root 0000000 0000000 swup-swup-d5e3e80/.editorconfig 0000775 0000000 0000000 00000000436 15177314732 0016620 0 ustar 00root root 0000000 0000000 root = true
[*]
charset = utf-8
end_of_line = lf
trim_trailing_whitespace = true
insert_final_newline = true
max_line_length = 100
[*.{js,mjs,ts}]
indent_style = tab
indent_size = 4
[*.{json,md,yaml,yml}]
indent_style = space
indent_size = 2
[*.md]
trim_trailing_whitespace = false
swup-swup-d5e3e80/.eslintrc.compat.cjs 0000664 0000000 0000000 00000002314 15177314732 0020021 0 ustar 00root root 0000000 0000000 /* eslint-env node */
/**
* TODO: migrate this to a supported combination of ESLint and plugins
*
* Issues:
* - `eslint-plugin-ecmascript-compat` is unmaintained and goes up to ESLint 8
* - An alternative is `eslint-config-target-es, but it only goes up to ESLint 9
*/
// Tweak these and run "npm run lint:compat" to see the compatibliity against these browsers
const browsers = [
'defaults',
'Chrome >= 80',
'Safari >= 13.1',
'iOS >= 13.4',
'Firefox >= 74',
'Edge >= 80',
'>=1%',
'not op_mini all',
'not dead',
];
// Required to fix an issue when combining existing browserslist config with the one from this file
// where any negations ("not op_mini all") are removed
process.env.BROWSERSLIST = browsers.join(',');
module.exports = {
root: true,
/* First exclude everything, then re-include /dist */
ignorePatterns: ['/*', '!/dist'],
env: {
browser: true,
es2024: true
},
extends: [
'plugin:compat/recommended',
'plugin:ecmascript-compat/recommended'
],
plugins: ['compat'],
rules: {
'compat/compat': 'error',
'ecmascript-compat/compat': ['error', { 'overrideBrowserslist': browsers }]
},
parserOptions: {
project: true,
sourceType: 'module'
},
settings: {
browsers
}
};
swup-swup-d5e3e80/.github/ 0000775 0000000 0000000 00000000000 15177314732 0015475 5 ustar 00root root 0000000 0000000 swup-swup-d5e3e80/.github/workflows/ 0000775 0000000 0000000 00000000000 15177314732 0017532 5 ustar 00root root 0000000 0000000 swup-swup-d5e3e80/.github/workflows/codeql.yml 0000664 0000000 0000000 00000002030 15177314732 0021517 0 ustar 00root root 0000000 0000000 name: "CodeQL"
on:
push:
branches: [main, master, next]
pull_request:
branches: [main, master, next]
schedule:
- cron: "45 4 * * 0"
jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write
strategy:
fail-fast: false
matrix:
language: [ javascript ]
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Initialize CodeQL
uses: github/codeql-action/init@c793b717bc78562f491db7b0e93a3a178b099162 # v4.32.5
with:
languages: ${{ matrix.language }}
queries: +security-and-quality
- name: Autobuild
uses: github/codeql-action/autobuild@c793b717bc78562f491db7b0e93a3a178b099162 # v4.32.5
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@c793b717bc78562f491db7b0e93a3a178b099162 # v4.32.5
with:
category: "/language:${{ matrix.language }}"
swup-swup-d5e3e80/.github/workflows/e2e-tests.yml 0000664 0000000 0000000 00000014430 15177314732 0022072 0 ustar 00root root 0000000 0000000 name: E2E tests
on:
push:
branches: [main, master, next]
pull_request:
workflow_dispatch:
jobs:
install:
name: Install
runs-on: ubuntu-latest
timeout-minutes: 5
outputs:
playwright-version: ${{ steps.playwright-version.outputs.version }}
steps:
- name: Check out repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Set up node
uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
with:
node-version: 20
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Bundle library
run: npm run build
- name: Get playwright version
id: playwright-version
run: echo "version=$(cat ./package-lock.json | jq -re '.packages["node_modules/@playwright/test"].version')" >> $GITHUB_OUTPUT
- name: Upload dist folder
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
if: always()
with:
name: dist-folder
path: dist
retention-days: 1
test:
name: Run playwright tests (${{ matrix.shard }})
runs-on: ubuntu-latest
container:
image: mcr.microsoft.com/playwright:v${{ needs.install.outputs.playwright-version }}-jammy
timeout-minutes: 20
needs: install
strategy:
fail-fast: false
matrix:
shard: [1/4, 2/4, 3/4, 4/4]
# project: [chromium, firefox, webkit]
steps:
- name: Check out repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Set up node
uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
with:
node-version: 20
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Download dist folder
uses: actions/download-artifact@70fc10c6e5e1ce46ad2ea6f2b72d43f7d47b13c3 # v8.0.0
with:
name: dist-folder
path: dist
- name: Run tests
run: HOME=/root npx playwright test --config ./tests/config/playwright.config.ts --shard ${{ matrix.shard }} # --workers 1
- name: Sanitize shard name
id: sanitize-shard
run: echo "shard=$(echo ${{ matrix.shard }} | tr -d '/')" >> $GITHUB_OUTPUT
- name: Upload blob report
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
if: always()
with:
name: blob-report-${{ steps.sanitize-shard.outputs.shard }}
path: tests/reports/blobs
retention-days: 1
report:
name: Create report
if: always()
runs-on: ubuntu-latest
timeout-minutes: 5
needs: test
permissions:
pull-requests: write
contents: write
steps:
- name: Check out repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Set up node
uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
with:
node-version: 20
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Download blob reports
uses: actions/download-artifact@70fc10c6e5e1ce46ad2ea6f2b72d43f7d47b13c3 # v8.0.0
with:
pattern: blob-report-*
path: playwright-blob-reports
merge-multiple: true
- name: Merge blob reports
run: PLAYWRIGHT_JSON_OUTPUT_NAME=results.json npx playwright merge-reports --reporter html,json ./playwright-blob-reports
- name: Upload HTML report
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
if: always()
with:
name: html-report # --attempt-${{ github.run_attempt }}
path: playwright-report
retention-days: 14
- name: Check repo context
id: context-check
run: |
if [ "${{ github.event_name }}" = "pull_request" ]; then
if [ "${{ github.event.pull_request.head.repo.full_name }}" = "${{ github.repository }}" ]; then
echo "internal=true" >> $GITHUB_OUTPUT
else
echo "internal=false" >> $GITHUB_OUTPUT
fi
else
echo "internal=true" >> $GITHUB_OUTPUT
fi
- name: Check out reports branch
if: steps.context-check.outputs.internal == 'true'
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
ref: test-reports
path: test-reports-branch
fetch-depth: 0
- name: Generate report name and URL
id: report-id
if: steps.context-check.outputs.internal == 'true'
run: |
name=$(date +"%Y-%m-%d-%H-%M-%S")
echo "name=$name" >> $GITHUB_OUTPUT
echo "path=reports/$name" >> $GITHUB_OUTPUT
echo "url=https://swup.github.io/swup/reports/$name/" >> $GITHUB_OUTPUT
- name: Copy html report and push reports branch
if: steps.context-check.outputs.internal == 'true'
run: |
mkdir -p test-reports-branch/${{ steps.report-id.outputs.path }}
cp -r playwright-report/. test-reports-branch/${{ steps.report-id.outputs.path }}
cd test-reports-branch
git config user.name github-actions
git config user.email github-actions@github.com
git add reports
git commit -m "Add test report for run ${{ github.run_id }} (attempt: ${{ github.run_attempt }})"
while true; do
git pull --rebase
if [ $? -ne 0 ]; then
echo "Failed to rebase. Please review manually."
exit 1
fi
git push
if [ $? -eq 0 ]; then
echo "Successfully pushed HTML report to repo."
exit 0
fi
done
- name: Output report url
if: steps.context-check.outputs.internal == 'true'
run: |
echo "::notice title=Published Playwright test report::${{ steps.report-id.outputs.url }}"
- name: Create report comment
id: report-summary
uses: daun/playwright-report-summary@be9e270edd5ad86038604d3caa84a819a6ff6fed # v3.10.0
with:
report-file: results.json
report-url: ${{ steps.report-id.outputs.url }}
job-summary: true
swup-swup-d5e3e80/.github/workflows/lint.yml 0000664 0000000 0000000 00000001127 15177314732 0021224 0 ustar 00root root 0000000 0000000 name: Lint
on:
push:
branches: [main, master, next]
pull_request:
permissions:
checks: write
contents: write
jobs:
run-linters:
name: Run linters
runs-on: ubuntu-latest
steps:
- name: Check out repo
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Set up node
uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
with:
node-version: 20
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Run linters
run: npm run lint
swup-swup-d5e3e80/.github/workflows/npm-prerelease.yml 0000664 0000000 0000000 00000002066 15177314732 0023200 0 ustar 00root root 0000000 0000000 # This workflow publishes a package to NPM under the `next` tag
name: Prerelease package on npm
on:
push:
branches:
- prerelease
jobs:
prerelease:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Set up node
uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
with:
node-version: 20
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Get package version
uses: martinbeentjes/npm-get-version-action@3cf273023a0dda27efcd3164bdfb51908dd46a5b # v1.3.1
id: version
- name: Publish if prerelease
run: |
if [[ "${{ steps.version.outputs.current-version}}" =~ ^(.*-(alpha|beta|next|rc)(\..+)?)$ ]]; then
npm publish --access public --tag next
else
echo "Skipping publish since version is not a prerelease."
fi
env:
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
swup-swup-d5e3e80/.github/workflows/npm-publish.yml 0000664 0000000 0000000 00000001135 15177314732 0022513 0 ustar 00root root 0000000 0000000 # This workflow publishes a package to NPM
name: Publish package
on:
release:
types: [published]
workflow_dispatch:
permissions:
contents: read
id-token: write # For OIDC Trusted Publishing
jobs:
publish-npm:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
with:
registry-url: https://registry.npmjs.org
node-version: 24
cache: 'npm'
- run: npm ci
- run: npm publish --access public
swup-swup-d5e3e80/.github/workflows/size.yml 0000664 0000000 0000000 00000000524 15177314732 0021230 0 ustar 00root root 0000000 0000000 name: Bundle size
on:
push:
branches: [main, master, next]
pull_request:
jobs:
build:
name: Check bundle size
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: preactjs/compressed-size-action@8518045ed95e94e971b83333085e1cb99aa18aa8 # 2.9.0
swup-swup-d5e3e80/.github/workflows/unit-tests.yml 0000664 0000000 0000000 00000001201 15177314732 0022366 0 ustar 00root root 0000000 0000000 name: Unit tests
on:
push:
branches: [main, master, next]
pull_request:
jobs:
run-tests:
name: Run unit tests
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Check out repo
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Set up node
uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
with:
node-version: 20
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Bundle library
run: npm run build
- name: Run tests
run: npm run test:unit
swup-swup-d5e3e80/.github/workflows/version-update.yml 0000664 0000000 0000000 00000002240 15177314732 0023220 0 ustar 00root root 0000000 0000000 # This workflow bumps the package.json version and creates a PR
name: Update package version
on:
workflow_dispatch:
inputs:
segment:
description: 'Semver segment to update'
required: true
default: 'patch'
type: choice
options:
- minor
- patch
jobs:
update-version:
name: Update package version
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
with:
node-version: 20
cache: 'npm'
- run: echo "Updating ${{ inputs.segment }} version"
- name: Update version
run: npm --no-git-tag-version version ${{ inputs.segment }}
- uses: peter-evans/create-pull-request@c0f553fe549906ede9cf27b5156039d195d2ece0 # v8.1.0
with:
base: 'main'
branch: 'version/automated'
title: 'Update package version (automated)'
commit-message: 'Update package version'
body: 'Automated update to ${{ inputs.segment }} version'
token: ${{ secrets.DISPATCH_TOKEN }}
swup-swup-d5e3e80/.gitignore 0000775 0000000 0000000 00000001131 15177314732 0016124 0 ustar 00root root 0000000 0000000 # Files to never ignore (even if they match other patterns)
!.gitignore
!.htaccess
!web.config
# OS-specific files
.DS_Store
*.DS_Store
Thumbs.db
# Dependency directories
node_modules
bower_components
# Editors and IDEs
*.sublime-project
*.sublime-workspace
.idea
.vscode
# Wiki related
wiki-common
wiki-images files
wiki-wishlist
# Build or output files and directories
/lib
/dist
*.tgz
# Testing tools and outputs
/cypress/fixtures/dist/
/cypress/screenshots/
/cypress/videos/
/tests/reports/
/tests/results/
/tests/fixtures/dist/
/playwright/.cache/
/playwright-report/
/coverage
.nyc_output
swup-swup-d5e3e80/.husky/ 0000775 0000000 0000000 00000000000 15177314732 0015356 5 ustar 00root root 0000000 0000000 swup-swup-d5e3e80/.husky/pre-commit 0000664 0000000 0000000 00000000015 15177314732 0017351 0 ustar 00root root 0000000 0000000 npm run lint
swup-swup-d5e3e80/.nvmrc 0000664 0000000 0000000 00000000003 15177314732 0015254 0 ustar 00root root 0000000 0000000 24
swup-swup-d5e3e80/AGENTS.md 0000664 0000000 0000000 00000010003 15177314732 0015432 0 ustar 00root root 0000000 0000000 # Agents
This file provides context for AI coding agents working on the swup codebase.
## Project Overview
**swup** is a versatile and extensible page transition library for server-rendered websites. It manages the complete page load lifecycle, animates between pages, and provides features like caching, smart preloading, native browser history support, and enhanced accessibility.
- **Repository**: [swup/swup](https://github.com/swup/swup)
- **Documentation**: [swup.js.org](https://swup.js.org)
- **License**: MIT
## Tech Stack
- **Language**: TypeScript
- **Build Tool**: microbundle
- **Unit Tests**: Vitest
- **E2E Tests**: Playwright
- **Linting**: ESLint + Prettier
- **Git Hooks**: Husky
## Project Structure
```
src/
├── Swup.ts # Main Swup class
├── index.ts # Public exports
├── helpers.ts # Re-exports from helpers/
├── utils.ts # Re-exports from utils/
├── config/
│ └── version.ts # Library version
├── helpers/ # Helper functions (classify, delegateEvent, Location, etc.)
├── modules/ # Core modules (Cache, Hooks, Visit, navigation, animations, etc.)
└── utils/ # Utility functions
tests/
├── config/ # Test configuration (vitest, playwright)
├── fixtures/ # HTML fixtures for E2E tests
├── functional/ # Playwright E2E tests
├── unit/ # Vitest unit tests
└── support/ # Test utilities and commands
```
## Common Commands
```bash
# Development
npm run dev # Watch mode with modern output
# Building
npm run build # Build all formats (module + bundle)
npm run clean # Remove dist folder
# Linting
npm run lint # Run both TypeScript and ESLint checks
npm run lint:ts # Type check only
npm run lint:es # ESLint only
npm run format # Auto-fix lint issues
# Testing
npm run test # Run all tests (unit + e2e)
npm run test:unit # Run unit tests
npm run test:unit:watch # Run unit tests in watch mode
npm run test:e2e # Run E2E tests
npm run test:e2e:dev # Run E2E tests with UI
```
## Architecture
### Core Concepts
1. **Visit**: Represents a single page navigation with all its state (from/to URLs, trigger, scroll positions, animation settings)
2. **Hooks**: Event system for the page load lifecycle. Hooks can be sync or async, and handlers can modify visit behavior.
3. **Cache**: In-memory page cache storing fetched HTML for faster subsequent visits
4. **Classes**: Manages animation CSS classes on the document during transitions
5. **Plugins**: Extend swup functionality. Plugins have `mount()` and `unmount()` lifecycle methods.
### Page Load Lifecycle
1. Link click or `navigate()` call triggers a visit
2. `visit:start` hook fires
3. Page is fetched (or retrieved from cache)
4. Out-animation plays (`animation:out:start` → `animation:out:await` → `animation:out:end`)
5. Content is replaced
6. In-animation plays (`animation:in:start` → `animation:in:await` → `animation:in:end`)
7. `visit:end` hook fires
### Key Files
- [src/Swup.ts](src/Swup.ts) - Main class with options, initialization, and public API
- [src/modules/Hooks.ts](src/modules/Hooks.ts) - Hook system implementation
- [src/modules/Visit.ts](src/modules/Visit.ts) - Visit state management
- [src/modules/navigate.ts](src/modules/navigate.ts) - Navigation logic
- [src/modules/Cache.ts](src/modules/Cache.ts) - Page cache implementation
## Code Style
- Use TypeScript strict mode
- Prefer named exports except for the main Swup class
- Use JSDoc comments for public APIs
- Follow existing patterns for hooks and modules
- Keep the core small; add features via plugins
## Testing Guidelines
- Unit tests go in `tests/unit/` with `.test.ts` extension
- E2E tests go in `tests/functional/` with `.spec.ts` extension
- Use fixtures in `tests/fixtures/` for E2E test pages
- E2E tests use a custom `swup` fixture that provides helpers
## Dependencies
- **delegate-it**: Event delegation
- **path-to-regexp**: URL path matching
swup-swup-d5e3e80/CHANGELOG.md 0000775 0000000 0000000 00000024524 15177314732 0015760 0 ustar 00root root 0000000 0000000 # Changelog
## [4.9.0] - 2026-05-08
- Allow ignoring visits from hook handlers
## [4.8.3] - 2026-02-24
- Remove `postinstall` script to prevent warnings when installing swup via pnpm
## [4.8.2] - 2025-04-29
- Fix `matchPath` to treat an empty array like an empty string
## [4.8.1] - 2024-09-28
- Fix usage of combined hook options `once` and `replace`
## [4.8.0] - 2024-09-25
- Add `hooks` option to allow registering all hooks at once
- Add `visit.meta` key for custom data
## [4.7.0] - 2024-07-18
- Inherit `data-swup-*` attributes from parent elements
- Store current location as object at `swup.location`
- Deprecate `swup.currentPageUrl` in favor of `swup.location.url`
- Make previous page's hash available at `visit.from.hash`
## [4.6.1] - 2024-03-26
- Reduce bundle size by eliminating unused code paths
## [4.6.0] - 2024-02-09
- Provide access to the parsed document through `visit.to.document`
## [4.5.2] - 2024-01-27
- Fix reflow helper being optimized away during build step
## [4.5.1] - 2024-01-08
- Wait with transition class mutations when pausing before `content:replace`
- Ignore errors in user hooks
## [4.5.0] - 2023-12-01
- Support View Transitions API in new native mode
- Handle rapid link clicks to achieve smooth transitions
- Abort superseded visits with new `visit:abort` hook
## [4.4.4] - 2023-11-17
- Dispatch DOM event `swup:any` every time a hook is run
- Allow listening to DOM events from the `window`
- Improve working with DOM events in TypeScript
## [4.4.3] - 2023-11-16
- Improve compatibility with older Safari versions
## [4.4.2] - 2023-09-28
- Export types for hook handlers and return values
## [4.4.1] - 2023-09-25
- Fix multiple rapid clicks on links
## [4.4.0] - 2023-09-19
- Enable experimental View Transition support
- Extend test coverage to all major browsers
- Add request timeout option
## [4.3.4] - 2023-08-24
- Add unique id to visit object
## [4.3.3] - 2023-08-21
- Restore history index on reload
## [4.3.2] - 2023-08-20
- Update history entry on links to the current page
## [4.3.1] - 2023-08-17
- Improve scroll restoration on history visits
## [4.3.0] - 2023-08-16
- Persist elements across page loads using `data-swup-persist`
- Add `visit.cache` key to control cache behavior
- Enforce parameter and return types of hook handlers
## [4.2.0] - 2023-08-09
- Add option `linkToSelf` to control behavior for links to the current page
- Don't create history records for repeated visits to the current page
- Allow updating `visit.to.hash` and `visit.scroll.target` separately
## [4.1.0] - 2023-07-29
- Prevent unintentional cache mutation
- Use recommended order for package.json exports
- Infer element type from delegate selector
## [4.0.1] - 2023-07-28
- Export additional types to allow augmentation from plugins
## [4.0.0] - 2023-07-26
See the [release notes](https://swup.js.org/announcements/swup-4/) and
[upgrade guide](https://swup.js.org/getting-started/upgrading/) for details.
### Features
- Built-in scroll support
- New hook system for customizing the page load lifecycle
- Context object for controlling the transition process
- Animation scope: add animation classes to html element or to containers
- Easier customization of official themes
- Allow pruning cache entries
### Breaking changes
- Hooks replace events: `swup.hooks.on()`
- Use the `visit` argument in hooks instead of `swup.transition`
- Container selectors now only match one single element per selector
- Custom animation attribute renamed to `data-swup-animation`
- Swup no longer adds `data-swup` attributes to containers
- Navigation method renamed: `swup.navigate()`
- Simplified cache API: `cache.set()`
- Support for custom payload formats was dropped
## [3.1.1] - 2023-06-23
- Accept `#top` as special scroll target
## [3.1.0] - 2023-06-13
- Allow replacing the current history entry instead of pushing to it
## [3.0.8] - 2023-06-04
- Create smaller bundle for modern browsers
- Make warning about missing transitions less strict
## [3.0.7] - 2023-05-26
- Update event delegation library
- Fix edge case in detecting transition events
- Improve selection of scroll anchor targets
## [3.0.6] - 2023-04-06
- Fix `exports` field in package.json
- Fully qualify imports to support TypeScript `moduleResolution: node16`
- Switch to Vitest for unit tests
## [3.0.5] - 2023-03-02
- Ensure correct `Referer` request header
## [3.0.4] - 2023-01-29
- Clarify/improve event typings for Swup event handlers
## [3.0.3] - 2023-01-27
- Use shared browserslist config
## [3.0.2] - 2023-01-20
- Make sure ignoreVisit option is called when visiting pages programmatically
## [3.0.1] - 2023-01-20
- Fix: remove origin from ignoreVisit parameter
## [3.0.0] - 2023-01-19
- Support CSS animations and keyframes
- Allow ignoring visits via callback function
- Rewritten in TypeScript
- Export typings and native ESM modules
- Smaller bundle size for modern browsers: 4.5 kB
- Improved test coverage
### Breaking changes
See [upgrade instructions](https://swup.js.org/getting-started/upgrading-v3/) for details.
- Swup will now wait for the longest transitioned property
- Swup will no longer add `to-*` classes for the next URL
- UMD and CDN bundle names have changed
- Import paths for helpers have changed
## [2.0.19] - 2022-08-23
- Gracefully handle missing document title
- Disable caching of initial page to avoid caching modified DOM
- Force-reload if next page has no swup containers
- Remove all reliance on global window.swup instance
## [2.0.18] - 2022-08-09
- Fix buggy behavior when navigating rapidly between pages
## [2.0.17] - 2022-08-01
- Gracefully handle missing transitions on container
- Warn about missing container
- Scope transition selector to body
- Normalize cache paths
## [2.0.16] - 2022-06-30
- Improve handling of scroll anchors with special characters (@knokmki612)
## [2.0.15] - 2022-06-14
- Update dependencies (@fregante)
- Improve test coverage (@daun)
## [2.0.14] - 2020-12-27
- Update readme
## [2.0.13] - 2020-12-06
- Update readme
## [2.0.12] - 2020-11-29
- Fix bug where animateHistoryBrowsing option was ignored for OUT animations
## [2.0.11] - 2020-07-09
- Update readme
## [2.0.10] - 2020-06-07
- Test autopublish feature
## [2.0.9] - 2020-06-07
- Ensure removal of popstate handler on destroy
- Implement end-to-end tests
## 2.0.8 - 2019-11-01
- Fix issue where `body` text is interpreted as tag
## 2.0.7 - 2019-09-23
- Update readme
## 2.0.6 - 2019-09-23
- Add funding information
## 2.0.5 - 2019-07-14
- Restore IE10 support
- Fix build script error
## 2.0.4 - 2019-05-30
- Update readme
## 2.0.3 - 2019-05-30
- Fix import filenames
## 2.0.2 - 2019-05-26
- Update readme
## 2.0.1 - 2019-05-26
- Update readme
## 2.0.0 - 2019-05-26
- Create plugin system to slim down core library
- Extract previous core functionality into plugins
- Simplify support check and make it required
- Allow setting custom request headers
- Rename selector option to containers
- Restructure project repository
## 1.9.0 - 2019-02-03
- Return promise when preloading pages
## 1.8.0 - 2019-02-03
- Ignore clicks when special key pressed
## 1.7.0 - 2018-10-28
- Implement event handler system
## 1.6.0 - 2018-10-28
- Allow setting custom transition via data attribute
## 1.5.0 - 2018-10-25
- Trigger events for animation start
## 1.4.0 - 2018-10-12
- Display final url after redirects
## 1.3.0 - 2018-10-08
- Enable animated history visits
## 1.2.0 - 2018-09-23
- Change default link selector and animation class
## 1.1.0 - 2018-09-14
- Improve server error handling
## 1.0.4 - 2018-09-07
- Update readme
## 1.0.3 - 2018-09-07
- Update readme
## 1.0.2 - 2018-09-04
- Improve IE/Edge compatibility
## 1.0.1 - 2018-08-26
- Remove manual browser detection
## 1.0.0 - 2018-08-26
- Initial release
[4.9.0]: https://github.com/swup/swup/releases/tag/4.9.0
[4.8.3]: https://github.com/swup/swup/releases/tag/4.8.3
[4.8.2]: https://github.com/swup/swup/releases/tag/4.8.2
[4.8.1]: https://github.com/swup/swup/releases/tag/4.8.1
[4.8.0]: https://github.com/swup/swup/releases/tag/4.8.0
[4.7.0]: https://github.com/swup/swup/releases/tag/4.7.0
[4.6.1]: https://github.com/swup/swup/releases/tag/4.6.1
[4.6.0]: https://github.com/swup/swup/releases/tag/4.6.0
[4.5.2]: https://github.com/swup/swup/releases/tag/4.5.2
[4.5.1]: https://github.com/swup/swup/releases/tag/4.5.1
[4.5.0]: https://github.com/swup/swup/releases/tag/4.5.0
[4.4.4]: https://github.com/swup/swup/releases/tag/4.4.4
[4.4.3]: https://github.com/swup/swup/releases/tag/4.4.3
[4.4.2]: https://github.com/swup/swup/releases/tag/4.4.3
[4.4.1]: https://github.com/swup/swup/releases/tag/4.4.1
[4.4.0]: https://github.com/swup/swup/releases/tag/4.4.0
[4.3.4]: https://github.com/swup/swup/releases/tag/4.3.4
[4.3.3]: https://github.com/swup/swup/releases/tag/4.3.3
[4.3.2]: https://github.com/swup/swup/releases/tag/4.3.2
[4.3.1]: https://github.com/swup/swup/releases/tag/4.3.1
[4.3.0]: https://github.com/swup/swup/releases/tag/4.3.0
[4.2.0]: https://github.com/swup/swup/releases/tag/4.2.0
[4.1.0]: https://github.com/swup/swup/releases/tag/4.1.0
[4.0.1]: https://github.com/swup/swup/releases/tag/4.0.1
[4.0.0]: https://github.com/swup/swup/releases/tag/4.0.0
[3.1.1]: https://github.com/swup/swup/releases/tag/3.1.1
[3.1.0]: https://github.com/swup/swup/releases/tag/3.1.0
[3.0.8]: https://github.com/swup/swup/releases/tag/3.0.8
[3.0.7]: https://github.com/swup/swup/releases/tag/3.0.7
[3.0.6]: https://github.com/swup/swup/releases/tag/3.0.6
[3.0.5]: https://github.com/swup/swup/releases/tag/3.0.5
[3.0.4]: https://github.com/swup/swup/releases/tag/3.0.4
[3.0.3]: https://github.com/swup/swup/releases/tag/3.0.3
[3.0.2]: https://github.com/swup/swup/releases/tag/3.0.2
[3.0.1]: https://github.com/swup/swup/releases/tag/3.0.1
[3.0.0]: https://github.com/swup/swup/releases/tag/3.0.0
[2.0.19]: https://github.com/swup/swup/releases/tag/2.0.19
[2.0.18]: https://github.com/swup/swup/releases/tag/2.0.18
[2.0.17]: https://github.com/swup/swup/releases/tag/2.0.17
[2.0.16]: https://github.com/swup/swup/releases/tag/2.0.16
[2.0.15]: https://github.com/swup/swup/releases/tag/2.0.15
[2.0.14]: https://github.com/swup/swup/releases/tag/2.0.14
[2.0.13]: https://github.com/swup/swup/releases/tag/2.0.13
[2.0.12]: https://github.com/swup/swup/releases/tag/2.0.12
[2.0.11]: https://github.com/swup/swup/releases/tag/2.0.11
[2.0.10]: https://github.com/swup/swup/releases/tag/2.0.10
[2.0.9]: https://github.com/swup/swup/releases/tag/2.0.9
swup-swup-d5e3e80/LICENSE 0000775 0000000 0000000 00000002057 15177314732 0015151 0 ustar 00root root 0000000 0000000 MIT License
Copyright (c) 2017 Georgy Marchuk
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
swup-swup-d5e3e80/README.md 0000775 0000000 0000000 00000011374 15177314732 0015425 0 ustar 00root root 0000000 0000000
**swup 4 is released 🎉 Check out the [release notes](https://swup.js.org/announcements/swup-4/) and [upgrade guide](https://swup.js.org/getting-started/upgrading/).**