Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
3f070bc
wip: converting to ts and improving media queries
marlonmarcello Nov 27, 2023
620dac7
wip: converts remaining to TS
marlonmarcello Nov 27, 2023
11a4cf7
wip: adds changeset
marlonmarcello Nov 27, 2023
737252f
wip: adds use-animate-presence
marlonmarcello Nov 27, 2023
c0e5e3b
fix: changeset repo
marlonmarcello Nov 27, 2023
7e03ba1
fix: persisted media query now fully prioritizes media query
marlonmarcello Nov 28, 2023
8809f9a
wip: adds docs
marlonmarcello Nov 28, 2023
e5914a6
wip: fixes docs and adds workflow
marlonmarcello Nov 28, 2023
35e2c85
wip: fixes pages workflow
marlonmarcello Nov 28, 2023
e2973d4
wip: fixes readme
marlonmarcello Nov 28, 2023
6a265bb
Create curvy-crabs-pay.md
marlonmarcello Nov 28, 2023
c27fabf
chore: correct nvmrc version
andrewrubin Nov 28, 2023
137264f
docs: minor tweaks
andrewrubin Nov 28, 2023
b74b3df
chore(useInView): default setInViewIfScrolledPast to false
andrewrubin Nov 28, 2023
fb6f59d
wip: monorepo
marlonmarcello Nov 28, 2023
6aacba3
Merge branch 'feature/use-animate-presence' of github.com:wethegit/re…
marlonmarcello Nov 28, 2023
71e9060
wip: husky commit
marlonmarcello Nov 28, 2023
0b61362
wip: cleanup repo
marlonmarcello Nov 28, 2023
ac942f1
wip: tweaks useAnimatePresence docs
marlonmarcello Nov 28, 2023
88492bd
wip: eslint ignore
marlonmarcello Nov 28, 2023
e23a7f0
wip: tweaks readme for development
marlonmarcello Nov 28, 2023
39e7c0d
fix: useAnimatePresence api
marlonmarcello Nov 28, 2023
09a1869
wips: adds more examples to docs
marlonmarcello Nov 28, 2023
13a72cb
wip: normalize package version
marlonmarcello Nov 28, 2023
055b1df
fix: package version
marlonmarcello Nov 28, 2023
828c571
fix: lock
marlonmarcello Nov 28, 2023
b64044d
fix: locks output to ES only
marlonmarcello Nov 28, 2023
b3f0462
fix: mount delay
marlonmarcello Nov 28, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .changeset/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Changesets

Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
with multi-package repos, or single-package repos to help you version and publish your code. You can
find the full documentation for it [in our repository](https://github.com/changesets/changesets)

We have a quick list of common questions to get you started engaging with this project in
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)
16 changes: 16 additions & 0 deletions .changeset/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"$schema": "https://unpkg.com/@changesets/config@2.3.1/schema.json",
"changelog": [
"@changesets/changelog-github",
{
"repo": "wethegit/react-hooks"
}
],
"commit": false,
"fixed": [],
"linked": [],
"access": "public",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": []
}
17 changes: 17 additions & 0 deletions .changeset/curvy-crabs-pay.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
"@wethegit/react-hooks": major
---

New features:
1. `typescript` and exported types
2. `changeset` for version control
3. documentation with `docusaurus`
4. `useAnimatePresence`, hook for animating components in/out of DOM
5. `useMediaQuery`, hook for matching a media query and listening to changes
6. `usePersistedMediaQuery`, hook for matching a media query, listening to changes and persisting on `localStorage`

Fixes:
- Fixes #5 with new `usePersisteMediaQuery` hook

Changes:
- `useLocalStorage` is now `usePersistedState`
17 changes: 0 additions & 17 deletions .eslintrc

This file was deleted.

1 change: 1 addition & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @wethegit/reviewers
21 changes: 21 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<!--
Use the following format as PR title:

[docs/hooks] fix/release/feature/patch: title of pr
-->

## Description

A **brief** description of the feature or bug, just to make the developer reviewing your work more familiar.

## Solution

A **brief** summary of why you fixed/created something the way you did and any known limitations because of this (i.e. browser support).

## Additional Notes

Any additional notes or information that should be made or highlighted.

## Screenshots

Screenshots/videos showcasing your updates - if applicable.
56 changes: 56 additions & 0 deletions .github/workflows/docusaurus.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Storybook

on:
push:
branches:
- main

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

jobs:
docs:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

runs-on: ubuntu-latest

steps:
- name: Checkout Repo
uses: actions/checkout@v3

- name: Setup Node.js 18.x
uses: actions/setup-node@v3
with:
node-version: 18

- name: Install Dependencies
run: yarn install --immutable

- name: Build Docusaurus
run: npx turbo run build --filter=docs

- name: Setup Pages
uses: actions/configure-pages@v3

- name: Upload artifact
uses: actions/upload-pages-artifact@v2
with:
path: "./apps/docusaurus/build"

- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2
30 changes: 30 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Release

on:
push:
branches:
- main

pull_request:
types: [opened, edited, reopened, synchronize]

concurrency: ${{ github.workflow }}-${{ github.ref }}

jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v3

- name: Setup Node.js 18.x
uses: actions/setup-node@v3
with:
node-version: 18

- name: Install Dependencies
run: yarn install --immutable

- name: Lint
run: yarn run lint
22 changes: 0 additions & 22 deletions .github/workflows/publish-package.yml

This file was deleted.

41 changes: 41 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Release

on:
push:
branches:
- main

concurrency: ${{ github.workflow }}-${{ github.ref }}

jobs:
release:
permissions:
contents: write # to create release (changesets/action)
issues: write # to post issue comments (changesets/action)
pull-requests: write # to create pull request (changesets/action)
name: Release
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v3

- name: Setup Node.js 18.x
uses: actions/setup-node@v3
with:
node-version: 18

- name: Install Dependencies
run: yarn install --immutable

- name: Lint
run: yarn lint

- name: Create Release Pull Request or Publish to npm
id: changesets
uses: changesets/action@v1
with:
version: yarn version
publish: yarn release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ lerna-debug.log*

node_modules
dist
build
dist-ssr
*.local

Expand All @@ -25,3 +26,5 @@ dist-ssr
*.njsproj
*.sln
*.sw?

.turbo
2 changes: 1 addition & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

npx lint-staged
yarn format && yarn lint
10 changes: 0 additions & 10 deletions .npmignore

This file was deleted.

2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
16.14.2
18.18.2
13 changes: 7 additions & 6 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
.github
.husky
.vscode
node_modules
dist
*.md
**/.github
**/.husky
**/.vscode
**/node_modules
**/dist
**/*.md
**/.docusaurus
6 changes: 2 additions & 4 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,10 @@
},
"eslint.format.enable": true,
"eslint.nodePath": "",
"eslint.packageManager": "npm",
"files.associations": {
"*.js": "javascriptreact",
"*.jsx": "javascriptreact",
"*.json": "json",
"*.json": "json"
},
"javascript.updateImportsOnFileMove.enabled": "always",
"stylelint.validate": ["css", "scss"]
"javascript.updateImportsOnFileMove.enabled": "always"
}
Loading