-
-
Notifications
You must be signed in to change notification settings - Fork 198
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
merge new setup into v1 branch (#208)
* add license file (#119) * Fix README hydration ThemeSwitcher example (#120) Using `resolvedTheme` will cause the select to show `light` or `dark` when `system` is selected rather than `system` as expected. Co-authored-by: Paco <34928425+pacocoursey@users.noreply.github.com> * Update documentation around `defaultTheme` (#130) The previous documentation referred to using `<ThemeProvider defaultTheme="system">`, but this is no longer necessary * Memoize ThemeContext.Provider value (#135) Every time <Theme /> renders a new object is constructed and passed to ThemeContext.Provider. This guarantees that regardless of what inputs changed the Context will be propagated. This is particularly harmful when React is doing hydration because if an unhydrated Suspense boudnary exists in the sub-tree of the Provider it will fall back to client rendering regardless of whether the context is an actual dependency for that Suspense boundary. This commit adds memoization so the value only changes if one of it's inputs change To make this memoization effective the default argument for `themes` needed to be statically extracted (it constructs a new array on each function invocation otherwise) * docs: link npm-version badge to npm package-site (#136) * Update README with instructions for Next.js 13 appDir (#168) Update README.md * make `next-themes` react agnostic (#186) * tooling: add monorepo and update playwright tests (#196) * chore: add .nvmrc * chore: convert intor a turbo based monorepo (yarn workspaces) * chore: start refactoring playwright tests * chore: add missing scripts to 'example' package and update playwright config accordingly * fix(example/tailwind): use class-attribute * chore(actions): update node version and bump setup-node to v2 * chore: move license to repository-root * Update README with note for HTML class attribute (#192) * Port #178 (#200) * port pr 178 * fix up logic * fix: add explicit undefined type to support exactOptionalPropertyTypes option (Port #177) (#201) add explicit undefined * Convert to pnpm monorepo, fix Vercel builds, improve test caching, lint (#202) * cleanup package.json files * prettier * move tests to test/ * empty commit for vercel build * empty commit for vercel build * rename root package.json * upgrade next.js and react in examples * switch to pnpm monorepo, upgrade deps * update github actions to use pnpm, add to packageManager * use workspace dep * update workflows to install pnpm * back to npx * many changes… * empty commit for vercel build * empty commit for vercel build * empty commit for vercel build * idk * revert link changes, ready to merge * chore: add @types/node & @types/jest to root to ensure IDE correctly lints jest globals * chore: fix remaining merge-issues * chore(types): improve comend for UseThemeProps.theme * chore: fix merge-issue that caused forcedTheme to not be returned as resolvedTheme * chore: cleanup README --------- Co-authored-by: Paco <34928425+pacocoursey@users.noreply.github.com> Co-authored-by: Max Leiter <mleiter@usc.edu> Co-authored-by: Bruno Crosier <bruno.crosier@gmail.com> Co-authored-by: Josh Story <josh.c.story@gmail.com> Co-authored-by: Ian Jones <witspr@gmail.com> Co-authored-by: Dimitri POSTOLOV <en3m@ya.ru> Co-authored-by: Amr Hassaballah <hassaballah.amr@gmail.com>
- Loading branch information
1 parent
8e9711f
commit 108ac74
Showing
38 changed files
with
6,224 additions
and
9,593 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
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 |
---|---|---|
|
@@ -4,3 +4,5 @@ dist/ | |
.next/ | ||
.yalc/ | ||
yalc.lock | ||
.idea/ | ||
.turbo |
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,3 @@ | ||
.next | ||
dist | ||
build |
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,7 @@ | ||
{ | ||
"semi": false, | ||
"singleQuote": true, | ||
"trailingComma": "none", | ||
"arrowParens": "avoid", | ||
"printWidth": 100 | ||
} |
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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.