@trycourier/react-designer 0.0.0-canary-20260105180635 → 0.0.0-canary-20260107090842

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,15 +1,15 @@
1
1
  import { Node } from "@tiptap/core";
2
- import type { ListProps } from "./List.types";
2
+ import { defaultListProps, type ListProps } from "./List.types";
3
3
  declare module "@tiptap/core" {
4
4
  interface Commands<ReturnType> {
5
5
  list: {
6
6
  setList: (props?: Partial<ListProps>) => ReturnType;
7
7
  toggleList: () => ReturnType;
8
8
  toggleOrderedList: () => ReturnType;
9
- toggleBulletList: () => ReturnType;
9
+ toggleUnorderedList: () => ReturnType;
10
10
  };
11
11
  }
12
12
  }
13
- export declare const defaultListProps: ListProps;
13
+ export { defaultListProps };
14
14
  export declare const List: Node<any, any>;
15
15
  export default List;
@@ -1,9 +1,38 @@
1
+ import { z } from "zod";
2
+ export declare const listSchema: z.ZodObject<{
3
+ id: z.ZodOptional<z.ZodString>;
4
+ listType: z.ZodEnum<["ordered", "unordered"]>;
5
+ borderColor: z.ZodString;
6
+ borderWidth: z.ZodNumber;
7
+ paddingVertical: z.ZodNumber;
8
+ paddingHorizontal: z.ZodNumber;
9
+ }, "strip", z.ZodTypeAny, {
10
+ borderColor: string;
11
+ borderWidth: number;
12
+ paddingVertical: number;
13
+ paddingHorizontal: number;
14
+ listType: "ordered" | "unordered";
15
+ id?: string | undefined;
16
+ }, {
17
+ borderColor: string;
18
+ borderWidth: number;
19
+ paddingVertical: number;
20
+ paddingHorizontal: number;
21
+ listType: "ordered" | "unordered";
22
+ id?: string | undefined;
23
+ }>;
1
24
  export interface ListProps {
2
25
  /** Whether the list is ordered (numbered) or unordered (bulleted) */
3
26
  listType: "ordered" | "unordered";
4
27
  /** Unique identifier for the list node */
5
28
  id?: string;
6
- /** Locale-specific content overrides */
7
- locales?: Record<string, unknown>;
29
+ /** Border color for list markers (bullets/numbers) */
30
+ borderColor?: string;
31
+ /** Border width in pixels */
32
+ borderWidth?: number;
33
+ /** Vertical padding in pixels */
34
+ paddingVertical?: number;
35
+ /** Horizontal padding in pixels */
36
+ paddingHorizontal?: number;
8
37
  }
9
38
  export declare const defaultListProps: ListProps;
@@ -0,0 +1,9 @@
1
+ import type { Node as ProseMirrorNode } from "@tiptap/pm/model";
2
+ import type { Editor } from "@tiptap/react";
3
+ interface ListFormProps {
4
+ element?: ProseMirrorNode;
5
+ editor: Editor | null;
6
+ hideCloseButton?: boolean;
7
+ }
8
+ export declare const ListForm: ({ element, editor, hideCloseButton }: ListFormProps) => import("react/jsx-runtime").JSX.Element | null;
9
+ export {};
@@ -1,2 +1,4 @@
1
1
  export { List, defaultListProps } from "./List";
2
+ export { ListForm } from "./ListForm";
2
3
  export type { ListProps } from "./List.types";
4
+ export { listSchema } from "./List.types";
@@ -0,0 +1,2 @@
1
+ import { type BlockBaseProps } from "../Block";
2
+ export declare const ListBlock: ({ draggable }: Pick<BlockBaseProps, "draggable">) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export * from "./ListBlock";
@@ -6,5 +6,6 @@ export * from "./CustomCodeBlock";
6
6
  export * from "./DividerBlock";
7
7
  export * from "./HeadingBlock";
8
8
  export * from "./ImageBlock";
9
+ export * from "./ListBlock";
9
10
  export * from "./SpacerBlock";
10
11
  export * from "./TextBlock";
@@ -1,5 +1,5 @@
1
1
  interface FormHeaderProps {
2
- type: "text" | "image" | "spacer" | "divider" | "button" | "blockquote" | "heading" | "customCode" | "column";
2
+ type: "text" | "image" | "spacer" | "divider" | "button" | "blockquote" | "heading" | "customCode" | "column" | "list";
3
3
  label?: string;
4
4
  hideCloseButton?: boolean;
5
5
  }
@@ -7,8 +7,10 @@ export interface SortableItemWrapperProps extends NodeViewWrapperProps {
7
7
  className?: string;
8
8
  editor: Editor;
9
9
  getPos?: (() => number) | boolean;
10
+ /** If true, this element will not accept drops (but can still be dragged) */
11
+ disableDropTarget?: boolean;
10
12
  }
11
- export declare const SortableItemWrapper: ({ children, id, className, editor, getPos: _getPos, ...props }: SortableItemWrapperProps) => import("react/jsx-runtime").JSX.Element;
13
+ export declare const SortableItemWrapper: ({ children, id, className, editor, getPos: _getPos, disableDropTarget, ...props }: SortableItemWrapperProps) => import("react/jsx-runtime").JSX.Element;
12
14
  export interface SortableItemProps {
13
15
  children: React.ReactNode;
14
16
  id?: string;
@@ -29,7 +29,7 @@ export interface TextMenuConfig {
29
29
  alignJustify?: TextMenuItem;
30
30
  quote?: TextMenuItem;
31
31
  orderedList?: TextMenuItem;
32
- bulletList?: TextMenuItem;
32
+ unorderedList?: TextMenuItem;
33
33
  link?: TextMenuItem;
34
34
  variable?: TextMenuItem;
35
35
  conditionalRules?: ConditionalRule[];
@@ -7,7 +7,7 @@ interface TextMenuStates {
7
7
  isStrike: boolean;
8
8
  isQuote: boolean;
9
9
  isOrderedList: boolean;
10
- isBulletList: boolean;
10
+ isUnorderedList: boolean;
11
11
  isAlignLeft: boolean;
12
12
  isAlignCenter: boolean;
13
13
  isAlignRight: boolean;
@@ -26,7 +26,7 @@ export declare const useTextmenuCommands: (editor: Editor, config?: TextMenuConf
26
26
  onLink: (url: string, inNewTab?: boolean) => boolean;
27
27
  onQuote: () => void;
28
28
  onOrderedList: () => void;
29
- onBulletList: () => void;
29
+ onUnorderedList: () => void;
30
30
  resetButtonFormatting: () => boolean;
31
31
  };
32
32
  export {};
@@ -10,7 +10,7 @@ export declare const useTextmenuStates: (editor: Editor | null) => {
10
10
  isAlignJustify: boolean;
11
11
  isQuote: boolean;
12
12
  isOrderedList: boolean;
13
- isBulletList: boolean;
13
+ isUnorderedList: boolean;
14
14
  isLink: boolean;
15
15
  shouldShow: ({ editor }: {
16
16
  editor: Editor;
@@ -0,0 +1,3 @@
1
+ import type { IconProps } from "./Icon";
2
+ export declare const UnorderedListIcon: ({ color, active, ...props }: IconProps) => import("react/jsx-runtime").JSX.Element;
3
+ export default UnorderedListIcon;
@@ -4,7 +4,7 @@ export { BinIcon } from "./BinIcon";
4
4
  export { BoldIcon } from "./BoldIcon";
5
5
  export { BorderRadiusIcon } from "./BorderRadiusIcon";
6
6
  export { BorderWidthIcon } from "./BorderWidthIcon";
7
- export { BulletListIcon } from "./BulletListIcon";
7
+ export { UnorderedListIcon } from "./UnorderedListIcon";
8
8
  export { CenterAlignIcon } from "./CenterAlignIcon";
9
9
  export { CloseIcon } from "./CloseIcon";
10
10
  export { ColorIcon } from "./ColorIcon";