- Add missing
svelte-navigator.css
to npm package
- Fix
disableInlineStyles
prop being ignored in nestedRouter
s
- Add
disableInlineStyles
prop toRouter
, sosvelte-navigator
can be used with strict CSP configuration #83
- State should only be replaced when all of the location is identical, not just the pathname #86
- Prevent status div messing with layout #28
- Update dependencies
- Fix untyped Link and Route props #21
- Support hash fragments in memory locations
- Add more tests #19
- Update dependencies
- Add prepublish hook
- Fix incorrect search string when parsing url with empty search and hash in ssr
- Remove unused ref binding to announcement live region in
Router
- Prevent navigations getting lost, that occur before the
Router
mounts #16
- TypeScript support 🎉 #14
- Provide a warning when passing a
basepath
prop to a non-top-levelRouter
- Provide a warning when passing a NavigationOptions object to
navigate
, when the first argument is a number
- Check if an element, that might be an anchor is null, when using
use:links
, to avoid error #12
- Update dependencies
- Fix serialize-javascript security alert (originating from rollup-plugin-terser)
- Bump svelte-navigator version in examples
- Update dependencies
- Fix lodash security alert
- In-page jumps via fragment links work properly now
#3:
- Focus management is disabled, when jumpin in-page, so the browser can move focus correctly
- Navigation is not announced, when a fragment is added to the url, but the
Route
does not change
- Fix
window is undefined
in SSR mode
- Server side rendering works properly now:
window is undefined
error is fixed- All matched Routes and nested Routes will be rendered
- Accessing params in slots and Route component is fixed
- Search string is extracted from url and can be accessed in location
- Update SSR example
- Refactor Route and Link component to be 'sveltier'
- Slightly improve bundle size
- Warn, when hooks are called outside of a required context
- Asyncronous focus now works correctly, when location changes, but the component does not
- Fix cased links in README
- Add
useFocus
link in README
Router
now automatically manages focus in your app- It focuses an appropriate heading, when changing
Route
s - It makes an announcement to screen reader users when changing
Route
s - You can customize which element should be focused after the
Route
transition via theuseFocus
hook - You can customize the screen reader announcement via the
a11y.createAnnouncement
prop
- It focuses an appropriate heading, when changing
Route
s can now be nested- The
useParams
hook allows access to url params, matched by the parentRoute
- The
useResolvable
hook allows to subscribe to a resolved path
- Link props and getProps return value will be merged, with getProps taking precedent
- Path resolution now does not treat the base of a nested Router as an absolute base any more
- The
useActiveRoute
has been removed. You should useuseMatch
oruseParams
instead - The
useBase
hook has been removed - The
useLinkResolve
hook has been renamed touseResolve
- Mark package as side effect free
- Add URL Bar example
- Add REPL Links to all examples
- Fix automatic usage of memory history in Svelte REPL
- Add Lazy Loading example
- Add
useMatch
hook - Add
meta
prop toRoute
- Fix incorrect resolving of links after component initialization, when using
useLinkResolve
- Remove
name
prop fromRoute
. Usemeta
prop instead - Remove the apps basepath from the location, so the location always looks the same, no matter where the app is served from
- Add tests
- Add module, umd and unpkg builds
- Add warnings for common usage mistakes
- Always dispatch action from history when updating location
- Add
name
prop toRoute
, to identify a specificRoute
for example, when using theuseActiveRoute
hook - Always keep the
route.path
intact. Useroute.fullPath
for resolved absolute path in navigation - Use a unique id internally for matching, instead of object identity
- Expose scoped
navigate
function as prop ofRoute
component
and in slots withlet:navigate
- Allow configuration of
Router
history throughhistory
prop, and exposition ofcreateHistory
andcreateMemorySource
functions - Allow passing of custom
navigate
function tolink
andlinks
actions viause:link={myCustomNavigate}
- Add more examples and improve documentation
- Remove default value for
to
prop inLink
- Remove confusing
useRouterBase
hook. UseuseActiveRoute
instead. - Improve code documentation
- Improve Readme
- Fix link resolution
Checkout svelte-routings Changelog for previous changes.