Skip to content

Commit 6ffa70e

Browse files
committed
fix build
1 parent b028a1b commit 6ffa70e

File tree

4 files changed

+14
-12
lines changed

4 files changed

+14
-12
lines changed

examples/03-ui-components/11-uppy-file-panel/src/FileReplaceButton.tsx

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
import {
2-
baseFilePropSchema,
2+
baseFileZodPropSchema,
33
blockHasType,
44
BlockSchema,
55
InlineContentSchema,
6-
optionalFileProps,
6+
optionalFileZodPropSchema,
77
StyleSchema,
8+
createPropSchemaFromZod
89
} from "@blocknote/core";
910
import {
1011
useBlockNoteEditor,
@@ -47,9 +48,10 @@ export const FileReplaceButton = () => {
4748
block,
4849
editor,
4950
block.type,
50-
baseFilePropSchema.extend({
51-
...optionalFileProps.pick({ url: true }).shape,
52-
}),
51+
// TODO
52+
createPropSchemaFromZod(baseFileZodPropSchema.extend({
53+
...optionalFileZodPropSchema.pick({ url: true }).shape,
54+
})),
5355
) ||
5456
!editor.isEditable
5557
) {

packages/core/src/schema/propTypes.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export type PropSchema<Output = any, Input = any> = {
1313

1414
// Props type is derived from the Zod schema output
1515
export type Props<PSchema extends PropSchema<any, any>> =
16-
PSchema extends PropSchema<infer O, any> ? O : never;
16+
PSchema extends PropSchema<infer O, any> ? O : any;
1717

1818
// We infer Output/Input from the provided schema using z.output / z.input
1919
export function createPropSchemaFromZod<S extends z.$ZodObject>(schema: S) {

packages/xl-ai/src/util/emptyBlock.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import type { Block } from "@blocknote/core";
1+
import type { PartialBlock } from "@blocknote/core";
22

3-
export function isEmptyParagraph(block: Block<any, any, any>) {
3+
export function isEmptyParagraph(block: PartialBlock<any, any, any>) {
44
return (
55
((block.type === "paragraph" || !block.type) && !block.content) ||
66
(Array.isArray(block.content) && block.content.length === 0)
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { createBlockSpecFromTiptapNode } from "@blocknote/core";
1+
import { createBlockSpecFromTiptapNode, createPropSchemaFromZod } from "@blocknote/core";
22
import * as z from "zod/v4";
33
import { Column } from "../../pm-nodes/Column.js";
44
import { ColumnList } from "../../pm-nodes/ColumnList.js";
@@ -9,9 +9,9 @@ export const ColumnBlock = createBlockSpecFromTiptapNode(
99
type: "column",
1010
content: "none",
1111
},
12-
z.object({
12+
createPropSchemaFromZod(z.object({
1313
width: z.number().default(1),
14-
}),
14+
})),
1515
);
1616

1717
export const ColumnListBlock = createBlockSpecFromTiptapNode(
@@ -20,5 +20,5 @@ export const ColumnListBlock = createBlockSpecFromTiptapNode(
2020
type: "columnList",
2121
content: "none",
2222
},
23-
z.object({}),
23+
createPropSchemaFromZod(z.object({})),
2424
);

0 commit comments

Comments
 (0)