Skip to content

Commit

Permalink
changeset
Browse files Browse the repository at this point in the history
  • Loading branch information
julianbenegas committed Dec 13, 2024
1 parent 4271b78 commit a8910b6
Show file tree
Hide file tree
Showing 8 changed files with 27 additions and 8 deletions.
5 changes: 5 additions & 0 deletions .changeset/nasty-bananas-ring.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"basehub": patch
---

fix rich text and pump return types
1 change: 1 addition & 0 deletions .changeset/pre.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"lovely-carrots-bathe",
"mean-panthers-give",
"modern-tools-repeat",
"nasty-bananas-ring",
"neat-dingos-push",
"new-avocados-repeat",
"odd-elephants-heal",
Expand Down
6 changes: 6 additions & 0 deletions packages/basehub/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# basehub

## 8.0.0-canary.25

### Patch Changes

- fix rich text and pump return types

## 8.0.0-canary.24

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/basehub/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "basehub",
"description": "A very fast Headless CMS.",
"author": "JB <[email protected]>",
"version": "8.0.0-canary.24",
"version": "8.0.0-canary.25",
"license": "MIT",
"repository": "basehub-ai/basehub",
"bugs": "https://github.com/basehub-ai/basehub/issues",
Expand Down
2 changes: 1 addition & 1 deletion packages/basehub/src/react/pump/server-pump.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export const Pump = async <Queries extends Array<PumpQuery>>({
children,
queries,
...basehubProps
}: PumpProps<Queries>) => {
}: PumpProps<Queries>): Promise<React.JSX.Element> => {
// passed to the client to toast
const errors: Array<ResponseCache["errors"]> = [];
const responseHashes: Array<ResponseCache["responseHash"]> = [];
Expand Down
10 changes: 5 additions & 5 deletions packages/basehub/src/react/rich-text/primitive.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* eslint-disable jsx-a11y/alt-text */
/* eslint-disable @next/next/no-img-element */
import type { ReactNode } from "react";
import type { JSX, ReactNode } from "react";
import GithubSlugger from "github-slugger";
import { extractTextFromNode } from "./util/heading-id";
import type { Language } from "../code-block";
Expand Down Expand Up @@ -123,7 +123,7 @@ export const RichText = <
CustomBlocks extends CustomBlocksBase = readonly any[],
>(
props: RichTextProps<CustomBlocks>
): ReactNode => {
): JSX.Element => {
const value = (props.content ?? props.children) as RichTextNode[] | undefined;
const slugger = new GithubSlugger();

Expand Down Expand Up @@ -619,7 +619,7 @@ export function createRichTextWithDefaultComponents(
) {
return <CustomBlocks extends CustomBlocksBase = readonly any[]>(
props: RichTextProps<CustomBlocks>
): ReactNode => {
): JSX.Element => {
return (
<RichText<CustomBlocks>
{...props}
Expand All @@ -638,7 +638,7 @@ export function createRichTextWithDefaultComponents(

type TocHandlers = Pick<Handlers, "ol" | "p" | "a">;

export type TocProps = {
export type TOCProps = {
content?: RichTextTocNode[];
/**
* @deprecated Use `content` instead.
Expand All @@ -648,7 +648,7 @@ export type TocProps = {
disableDefaultComponents?: boolean;
};

export const TOC = (props: TocProps): ReactNode => {
export const TOC = (props: TOCProps): JSX.Element => {
const slugger = new GithubSlugger();

const value = (props.content ?? props.children) as RichTextTocNode[];
Expand Down
7 changes: 7 additions & 0 deletions playground/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# playground

## 0.0.164-canary.25

### Patch Changes

- Updated dependencies
- [email protected]

## 0.0.164-canary.24

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion playground/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "playground",
"private": true,
"version": "0.0.164-canary.24",
"version": "0.0.164-canary.25",
"scripts": {
"dev": "basehub dev & next dev --port 3003",
"build": "basehub && next build",
Expand Down

0 comments on commit a8910b6

Please sign in to comment.