Skip to content

Commit

Permalink
feat: add @portabletext/react and @portabletext/types exports
Browse files Browse the repository at this point in the history
  • Loading branch information
stipsan committed Mar 7, 2024
1 parent d2be37e commit 43bbdb8
Show file tree
Hide file tree
Showing 5 changed files with 58 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .github/renovate.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
},
{
"matchDepTypes": ["dependencies", "peerDependencies"],
"matchPackageNames": ["@sanity/client", "@sanity/preview-kit", "@sanity/webhook"],
"matchPackageNames": ["@sanity/client", "@sanity/preview-kit", "@sanity/webhook", "@portabletext/react", "@portabletext/types"],
"rangeStrategy": "bump",
"matchFileNames": ["packages/next-sanity/package.json"],
"semanticCommitType": "fix"
Expand Down
11 changes: 6 additions & 5 deletions packages/next-sanity/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ The official [Sanity.io][sanity] toolkit for Next.js apps.
- [Visual Editing](#visual-editing-with-content-source-maps)
- [GROQ syntax highlighting][groq-syntax-highlighting]
- Embedded Sanity Studio
- Block content with [Portable Text][portable-text]

## Table of contents

Expand Down Expand Up @@ -67,22 +68,22 @@ bun install next-sanity

### Common dependencies

Building with Sanity and Next.js, you‘re likely to want libraries to handle [On-Demand Image Transformations][image-url] and block content with [Portable Text][portable-text]:
Building with Sanity and Next.js, you‘re likely to want libraries to handle [On-Demand Image Transformations][image-url] and [Visual Editing](https://www.sanity.io/docs/loaders-and-overlays):

```bash
npm install @portabletext/react @sanity/image-url
npm install @sanity/image-url @sanity/react-loader
```

```bash
yarn add @portabletext/react @sanity/image-url
yarn add @sanity/image-url @sanity/react-loader
```

```bash
pnpm install @portabletext/react @sanity/image-url
pnpm install @sanity/image-url @sanity/react-loader
```

```bash
bun install @portabletext/react @sanity/image-url
bun install @sanity/image-url @sanity/react-loader
```

### Peer dependencies for embedded Sanity Studio
Expand Down
2 changes: 2 additions & 0 deletions packages/next-sanity/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,8 @@
},
"browserslist": "extends @sanity/browserslist-config",
"dependencies": {
"@portabletext/react": "^3.0.11",
"@portabletext/types": "^2.0.8",
"@sanity/client": "^6.15.2",
"@sanity/preview-kit": "5.0.30",
"@sanity/visual-editing": "1.7.0",
Expand Down
2 changes: 2 additions & 0 deletions packages/next-sanity/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
export * from './client'
export {VisualEditing} from './visual-editing'
export type {VisualEditingProps} from './visual-editing/VisualEditing'
export * from '@portabletext/react'
export type {PortableTextBlock} from '@portabletext/types'
export {default as groq} from 'groq'

0 comments on commit 43bbdb8

Please sign in to comment.