@trycourier/react-designer 0.0.0-canary-20251219131027 → 0.0.0-canary-20251229151230

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.
@@ -58,7 +58,7 @@ export declare const flushAllPendingUpdates: (flushFunctions: Map<string, FlushF
58
58
  /**
59
59
  * Available block element types that can be used in the sidebar
60
60
  */
61
- export type BlockElementType = "heading" | "text" | "image" | "spacer" | "divider" | "button" | "customCode" | "column" | "blockquote";
61
+ export type BlockElementType = "heading" | "text" | "image" | "spacer" | "divider" | "button" | "customCode" | "column" | "blockquote" | "list";
62
62
  /**
63
63
  * Attributes that can be set as defaults or in presets for blocks.
64
64
  * Types match the actual TipTap node attribute types for each extension.
@@ -0,0 +1,15 @@
1
+ import { Node } from "@tiptap/core";
2
+ import type { ListProps } from "./List.types";
3
+ declare module "@tiptap/core" {
4
+ interface Commands<ReturnType> {
5
+ list: {
6
+ setList: (props?: Partial<ListProps>) => ReturnType;
7
+ toggleList: () => ReturnType;
8
+ toggleOrderedList: () => ReturnType;
9
+ toggleBulletList: () => ReturnType;
10
+ };
11
+ }
12
+ }
13
+ export declare const defaultListProps: ListProps;
14
+ export declare const List: Node<any, any>;
15
+ export default List;
@@ -0,0 +1,9 @@
1
+ export interface ListProps {
2
+ /** Whether the list is ordered (numbered) or unordered (bulleted) */
3
+ listType: "ordered" | "unordered";
4
+ /** Unique identifier for the list node */
5
+ id?: string;
6
+ /** Locale-specific content overrides */
7
+ locales?: Record<string, unknown>;
8
+ }
9
+ export declare const defaultListProps: ListProps;
@@ -0,0 +1,9 @@
1
+ import { type NodeViewProps } from "@tiptap/react";
2
+ /**
3
+ * List NodeView component that renders the list.
4
+ *
5
+ * Uses SortableItemWrapper for proper drag-and-drop reordering,
6
+ * selection styling, and action buttons (duplicate, delete).
7
+ */
8
+ export declare const ListComponentNode: (props: NodeViewProps) => import("react/jsx-runtime").JSX.Element;
9
+ export default ListComponentNode;
@@ -0,0 +1,8 @@
1
+ import type { Editor } from "@tiptap/core";
2
+ import type { Node } from "@tiptap/pm/model";
3
+ interface ListFormProps {
4
+ element: Node;
5
+ editor: Editor | null;
6
+ }
7
+ export declare const ListForm: ({ element, editor }: ListFormProps) => import("react/jsx-runtime").JSX.Element | null;
8
+ export default ListForm;
@@ -0,0 +1,3 @@
1
+ export { List, defaultListProps } from "./List";
2
+ export { ListForm } from "./ListForm";
3
+ export type { ListProps } from "./List.types";
@@ -0,0 +1,34 @@
1
+ import { Node } from "@tiptap/core";
2
+ import type { ListItemProps } from "./ListItem.types";
3
+ declare module "@tiptap/core" {
4
+ interface Commands<ReturnType> {
5
+ listItem: {
6
+ /** Split the list item at the current cursor position */
7
+ splitListItem: (typeOrName: string) => ReturnType;
8
+ /** Lift the list item out of the list (outdent) */
9
+ liftListItem: (typeOrName: string) => ReturnType;
10
+ /** Sink the list item into a nested list (indent) */
11
+ sinkListItem: (typeOrName: string) => ReturnType;
12
+ /** Wrap selection in a list */
13
+ wrapInList: (typeOrName: string, attrs?: Record<string, unknown>) => ReturnType;
14
+ };
15
+ }
16
+ }
17
+ export declare const defaultListItemProps: ListItemProps;
18
+ /**
19
+ * Custom ListItem extension with prosemirror-schema-list commands.
20
+ *
21
+ * Provides commands:
22
+ * - splitListItem: Split list item at cursor (creates new bullet)
23
+ * - liftListItem: Lift list item out of list (outdent)
24
+ * - sinkListItem: Sink list item into nested list (indent)
25
+ * - wrapInList: Wrap selection in a list
26
+ *
27
+ * Keyboard shortcuts:
28
+ * - Enter: Split list item (handled in List extension)
29
+ * - Tab: Sink list item (handled in List extension)
30
+ * - Shift-Tab: Lift list item (handled in List extension)
31
+ * - Shift-Enter: Add a hard break (new line within the paragraph)
32
+ */
33
+ export declare const ListItem: Node<any, any>;
34
+ export default ListItem;
@@ -0,0 +1,7 @@
1
+ export interface ListItemProps {
2
+ /** Background color for the list item */
3
+ backgroundColor?: string;
4
+ /** Unique identifier for the list item node */
5
+ id?: string;
6
+ }
7
+ export declare const defaultListItemProps: ListItemProps;
@@ -0,0 +1,7 @@
1
+ import { type NodeViewProps } from "@tiptap/react";
2
+ /**
3
+ * Simple ListItem NodeView that renders as a standard <li> element.
4
+ * Uses NodeViewContent to allow prosemirror to manage the content.
5
+ */
6
+ export declare const ListItemComponentNode: (props: NodeViewProps) => import("react/jsx-runtime").JSX.Element;
7
+ export default ListItemComponentNode;
@@ -0,0 +1,2 @@
1
+ export { ListItem, defaultListItemProps } from "./ListItem";
2
+ export type { ListItemProps } from "./ListItem.types";
@@ -23,6 +23,8 @@ export { FixedChannelSelection } from "./FixedChannelSelection";
23
23
  export { Heading } from "./Heading";
24
24
  export { ImageBlock } from "./ImageBlock";
25
25
  export { Link } from "./Link";
26
+ export { List } from "./List";
27
+ export { ListItem } from "./ListItem";
26
28
  export { Paragraph } from "./Paragraph";
27
29
  export { Selection } from "./Selection";
28
30
  export { SlashMenu } from "./SlashMenu";
@@ -0,0 +1,3 @@
1
+ import { type BlockBaseProps } from "../Block";
2
+ export declare const ListBlockIcon: () => import("react/jsx-runtime").JSX.Element;
3
+ 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
  }
5
5
  export declare const FormHeader: ({ type }: FormHeaderProps) => import("react/jsx-runtime").JSX.Element;
@@ -31,5 +31,7 @@ export interface VariableChipBaseProps {
31
31
  textColorOverride?: string;
32
32
  /** Custom color getter function (kept for API compatibility, colors handled by CSS) */
33
33
  getColors?: (isInvalid: boolean, hasValue: boolean) => VariableColors;
34
+ /** Whether the chip is read-only (prevents editing) */
35
+ readOnly?: boolean;
34
36
  }
35
37
  export declare const VariableChipBase: React.FC<VariableChipBaseProps>;