-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #10 from maxholman/animation
feat: add support for view transition api et al
- Loading branch information
Showing
47 changed files
with
4,932 additions
and
3,675 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
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,24 +1,26 @@ | ||
name: Deploy | ||
|
||
on: | ||
workflow_dispatch: {} | ||
workflow_dispatch: | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
publish-npm: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: pnpm/action-setup@v2 | ||
with: | ||
version: 8 | ||
- uses: actions/setup-node@v3 | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: pnpm/action-setup@v4 | ||
|
||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: 18 | ||
registry-url: https://registry.npmjs.org/ | ||
cache: 'pnpm' | ||
registry-url: 'https://registry.npmjs.org' | ||
node-version-file: .node-version | ||
|
||
- run: make | ||
|
||
- run: pnpm publish --access=public --no-git-checks | ||
env: | ||
NODE_AUTH_TOKEN: ${{secrets.npm_token}} | ||
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} |
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 +1 @@ | ||
18 | ||
20 |
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,9 @@ | ||
Credit to [@nikparo](https://github.com/nikparo) for "Running React parent effects before child effects" | ||
|
||
``` | ||
// Sometimes you want to run parent effects before those of the children. E.g. when setting | ||
// something up or binding document event listeners. By passing the effect to the first child it | ||
// will run before any effects by later children. | ||
``` | ||
|
||
https://gist.github.com/nikparo/33544fe0228dd5aa6f0de8d03e96c378 |
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
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
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 |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import type { RouteComponentProps } from './types.js'; | ||
import { useRouteMatch } from './use-route-match.js'; | ||
|
||
export const Route = <TPath extends string>( | ||
props: RouteComponentProps<TPath>, | ||
) => { | ||
const match = useRouteMatch<TPath>(); | ||
|
||
if (match) { | ||
if ( | ||
props && | ||
'component' in props && | ||
typeof props.component === 'function' | ||
) { | ||
return props.component(match.params); | ||
} | ||
|
||
if ('children' in props) { | ||
return <>{props.children}</>; | ||
} | ||
|
||
return <props.component {...match.params} />; | ||
} | ||
|
||
return null; | ||
}; |
Oops, something went wrong.