-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update @theguild/components to use Nextra 4 (#1762)
Co-authored-by: Piotr Monwid-Olechnowicz <hasparus@gmail.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
- Loading branch information
1 parent
1c3c16b
commit b16cee8
Showing
110 changed files
with
1,438 additions
and
1,500 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
--- | ||
"@theguild/components": patch | ||
--- | ||
dependencies updates: | ||
- Updated dependency [`nextra@4.0.0-app-router.34` ↗︎](https://www.npmjs.com/package/nextra/v/4.0.0) (from `3.2.5`, in `dependencies`) | ||
- Updated dependency [`nextra-theme-docs@4.0.0-app-router.34` ↗︎](https://www.npmjs.com/package/nextra-theme-docs/v/4.0.0) (from `3.2.5`, in `dependencies`) | ||
- Removed dependency [`next-videos@1.5.0` ↗︎](https://www.npmjs.com/package/next-videos/v/1.5.0) (from `dependencies`) | ||
- Removed dependency [`remark-mdx-disable-explicit-jsx@0.1.0` ↗︎](https://www.npmjs.com/package/remark-mdx-disable-explicit-jsx/v/0.1.0) (from `dependencies`) | ||
- Updated dependency [`@theguild/tailwind-config@^0.6.2` ↗︎](https://www.npmjs.com/package/@theguild/tailwind-config/v/0.6.2) (from `0.6.2`, in `peerDependencies`) |
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,6 @@ | ||
--- | ||
"@theguild/components": patch | ||
--- | ||
dependencies updates: | ||
- Updated dependency [`nextra@4.0.0-app-router.34` ↗︎](https://www.npmjs.com/package/nextra/v/4.0.0) (from `4.0.0-app-router.28`, in `dependencies`) | ||
- Updated dependency [`nextra-theme-docs@4.0.0-app-router.34` ↗︎](https://www.npmjs.com/package/nextra-theme-docs/v/4.0.0) (from `4.0.0-app-router.21`, in `dependencies`) |
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,6 @@ | ||
--- | ||
"@theguild/components": patch | ||
--- | ||
dependencies updates: | ||
- Updated dependency [`nextra@4.0.0-app-router.34` ↗︎](https://www.npmjs.com/package/nextra/v/4.0.0) (from `4.0.0-app-router.28`, in `dependencies`) | ||
- Updated dependency [`nextra-theme-docs@4.0.0-app-router.34` ↗︎](https://www.npmjs.com/package/nextra-theme-docs/v/4.0.0) (from `4.0.0-app-router.28`, in `dependencies`) |
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,5 @@ | ||
--- | ||
"@theguild/components": patch | ||
--- | ||
|
||
Add `NextPageProps` utility type |
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,5 @@ | ||
--- | ||
"@theguild/components": patch | ||
--- | ||
|
||
Use green card variant only for Hive |
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,5 @@ | ||
--- | ||
'@theguild/components': major | ||
--- | ||
|
||
Update components to be compatible with Nextra 4 and server components |
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,5 @@ | ||
--- | ||
'@theguild/components': patch | ||
--- | ||
|
||
Add ContactTextLink and ContactButton |
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,5 @@ | ||
--- | ||
"@theguild/components": patch | ||
--- | ||
|
||
Add "use client" to Heading |
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,5 @@ | ||
--- | ||
'@theguild/remark-mermaid': minor | ||
--- | ||
|
||
`"typesVersions"` field is removed from `package.json`, use `"moduleResolution": "node"` in your `tsconfig.json` |
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 |
---|---|---|
@@ -1,8 +1,6 @@ | ||
import { ClassValue, clsx } from 'clsx'; | ||
import { clsx } from 'clsx'; | ||
import { twMerge } from 'tailwind-merge'; | ||
|
||
export type { ClassValue }; | ||
|
||
export function cn(...inputs: ClassValue[]) { | ||
return twMerge(clsx(inputs)); | ||
} | ||
export const cn: typeof clsx = (...args) => { | ||
return twMerge(clsx(args)); | ||
}; |
This file was deleted.
Oops, something went wrong.
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 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,44 @@ | ||
'use client'; | ||
|
||
import { cn } from '../cn'; | ||
import { CallToAction, CallToActionProps } from './call-to-action'; | ||
|
||
const openCrisp = (event: React.MouseEvent<HTMLAnchorElement>) => { | ||
if (window.$crisp) { | ||
window.$crisp.push(['do', 'chat:open']); | ||
event.preventDefault(); | ||
} | ||
}; | ||
|
||
// the errors are more readable if you add an interface for this | ||
// eslint-disable-next-line @typescript-eslint/no-empty-object-type | ||
export interface ContactTextLinkProps | ||
extends Omit<React.HTMLAttributes<HTMLAnchorElement>, 'href' | 'onClick'> {} | ||
|
||
export function ContactTextLink(props: ContactTextLinkProps) { | ||
return ( | ||
<a | ||
{...props} | ||
className={cn( | ||
'hive-focus -m-2 rounded p-2 font-medium hover:text-blue-700 hover:underline dark:hover:text-blue-100', | ||
props.className, | ||
)} | ||
href="https://the-guild.dev/contact" | ||
onClick={openCrisp} | ||
> | ||
{props.children || 'Contact Us'} | ||
</a> | ||
); | ||
} | ||
|
||
// eslint-disable-next-line @typescript-eslint/no-empty-object-type | ||
export interface ContactButtonProps | ||
extends Omit<CallToActionProps.AnchorProps, 'onClick' | 'href'> {} | ||
|
||
export function ContactButton(props: ContactButtonProps) { | ||
return ( | ||
<CallToAction href="https://the-guild.dev/contact" onClick={openCrisp} {...props}> | ||
{props.children || 'Contact Us'} | ||
</CallToAction> | ||
); | ||
} |
Oops, something went wrong.