@prismicio/editor-fields 0.4.63 → 0.4.64-alpha.fix-simulator-issue.0

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.
Files changed (68) hide show
  1. package/dist/EditorConfig.d.ts +12 -3
  2. package/dist/core/APIExplorer/APIExplorer.d.ts +2 -0
  3. package/dist/core/APIExplorer/components/APIExplorerContext.d.ts +54 -0
  4. package/dist/core/APIExplorer/components/APIExplorerRequest.d.ts +2 -0
  5. package/dist/core/APIExplorer/components/APIExplorerResponse.d.ts +2 -0
  6. package/dist/core/APIExplorer/components/Request/GetByTypeRequest.d.ts +1 -0
  7. package/dist/core/APIExplorer/components/Request/GetByUIDRequest.d.ts +1 -0
  8. package/dist/core/APIExplorer/components/Request/GetRepositoryRequest.d.ts +1 -0
  9. package/dist/core/APIExplorer/components/Request/GetRequest.d.ts +1 -0
  10. package/dist/core/APIExplorer/components/Request/GetSingleRequest.d.ts +1 -0
  11. package/dist/core/APIExplorer/components/Request/components/RequestFormInput.d.ts +4 -0
  12. package/dist/core/APIExplorer/components/Request/components/RequestFormInputBase.d.ts +6 -0
  13. package/dist/core/APIExplorer/components/Request/components/RequestFormSelect.d.ts +4 -0
  14. package/dist/core/APIExplorer/components/Request/components/RequestPaginationFieldset.d.ts +5 -0
  15. package/dist/core/APIExplorer/components/Request/components/RequestTypeFieldset.d.ts +7 -0
  16. package/dist/core/APIExplorer/components/Request/components/index.d.ts +3 -0
  17. package/dist/core/APIExplorer/components/Request/createRequest.d.ts +20 -0
  18. package/dist/core/APIExplorer/components/Request/index.d.ts +1 -0
  19. package/dist/core/APIExplorer/components/Request/types.d.ts +14 -0
  20. package/dist/core/APIExplorer/index.d.ts +1 -0
  21. package/dist/core/MediaLibrary/hooks/mediaLibraryData.d.ts +80 -80
  22. package/dist/core/MediaLibrary/hooks/tagData.d.ts +3 -3
  23. package/dist/core/MediaLibrary/hooks/useMediaLibraryUpload.d.ts +8 -8
  24. package/dist/core/MediaLibrary/hooks/useSelectedMedia.d.ts +8 -8
  25. package/dist/core/UnsplashLibrary/unsplashData.d.ts +9 -9
  26. package/dist/core/service/aiSeoMetadata.d.ts +2 -6
  27. package/dist/core/service/customType.d.ts +20 -20
  28. package/dist/core/service/document.d.ts +213 -213
  29. package/dist/core/service/documentSearch.d.ts +47 -47
  30. package/dist/core/service/repository.d.ts +30 -30
  31. package/dist/core/service/role.d.ts +267 -46
  32. package/dist/core/service/user.d.ts +11 -7
  33. package/dist/fields/ImageField/useImageField.d.ts +8 -8
  34. package/dist/fields/ImageField/useImageFieldImageUpload.d.ts +8 -8
  35. package/dist/fields/LinkField/Documents/documentsData.d.ts +16 -16
  36. package/dist/fields/LinkField/useLinkField.d.ts +1 -1
  37. package/dist/fields/RichTextField/RichTextField.d.ts +2 -0
  38. package/dist/fields/RichTextField/coreExtensions/ListItem.d.ts +4 -4
  39. package/dist/fields/RichTextField/extensions/Image/useImageView.d.ts +8 -8
  40. package/dist/fields/RichTextField/extensions/Table/Table.d.ts +4 -4
  41. package/dist/fields/RichTextField/extensions/Table/TableCell/TableCell.d.ts +10 -0
  42. package/dist/fields/RichTextField/extensions/Table/TableCell/TableHeaderCell.d.ts +10 -0
  43. package/dist/fields/RichTextField/extensions/Table/TableCell/index.d.ts +2 -0
  44. package/dist/fields/RichTextField/extensions/Table/TableCell/plugins/TableHandles/TableHandlesPlugin.d.ts +8 -0
  45. package/dist/fields/RichTextField/extensions/Table/TableCell/plugins/TableHandles/TableHandlesPluginView.d.ts +34 -0
  46. package/dist/fields/RichTextField/extensions/Table/TableCell/plugins/TableHandles/events.d.ts +19 -0
  47. package/dist/fields/RichTextField/extensions/Table/TableCell/plugins/TableHandles/index.d.ts +1 -0
  48. package/dist/fields/RichTextField/extensions/Table/TableCell/plugins/TableHandles/utils.d.ts +23 -0
  49. package/dist/fields/RichTextField/extensions/Table/TableCell/plugins/index.d.ts +1 -0
  50. package/dist/fields/RichTextField/extensions/Table/TableCell/types.d.ts +17 -0
  51. package/dist/fields/RichTextField/extensions/Table/TableCell/utils.d.ts +15 -0
  52. package/dist/fields/RichTextField/extensions/Table/TableEvent.d.ts +31 -0
  53. package/dist/fields/RichTextField/extensions/Table/TableLimitToast.d.ts +7 -0
  54. package/dist/fields/RichTextField/extensions/Table/TableRow.d.ts +9 -0
  55. package/dist/fields/RichTextField/extensions/Table/TableView.d.ts +20 -0
  56. package/dist/fields/RichTextField/extensions/Table/menus/TableColumnMenu.d.ts +11 -0
  57. package/dist/fields/RichTextField/extensions/Table/menus/TableFloatingMenus.d.ts +7 -0
  58. package/dist/fields/RichTextField/extensions/Table/menus/TableRowMenu.d.ts +10 -0
  59. package/dist/fields/RichTextField/extensions/Table/menus/TriggerAnchor.d.ts +11 -0
  60. package/dist/fields/RichTextField/extensions/Table/menus/index.d.ts +2 -0
  61. package/dist/fields/RichTextField/extensions/Table/menus/utils.d.ts +23 -0
  62. package/dist/fields/RichTextField/extensions/Table/utils.d.ts +60 -0
  63. package/dist/fields/RichTextField/extensions/extensions.d.ts +1 -1
  64. package/dist/index.cjs.js +138 -38
  65. package/dist/index.d.ts +1 -0
  66. package/dist/index.es.js +59001 -10823
  67. package/dist/slices/utils.d.ts +4 -4
  68. package/package.json +6 -6
@@ -3,7 +3,7 @@ declare const _default: {
3
3
  component: import("@tiptap/core").Node<import("@tiptap/extension-list-item").ListItemOptions, any>;
4
4
  converter: {
5
5
  fromPrismic(schema: Schema<any, any>): (list: {
6
- type: "image" | "embed" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "list-item" | "o-list-item" | "rtl";
6
+ type: "image" | "paragraph" | "embed" | "em" | "strong" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "preformatted" | "hyperlink" | "list-item" | "o-list-item" | "rtl";
7
7
  content: {
8
8
  text: string;
9
9
  } & {
@@ -56,7 +56,7 @@ declare const _default: {
56
56
  } | {
57
57
  start: number;
58
58
  end: number;
59
- type: "strong" | "em" | "list-item";
59
+ type: "em" | "strong" | "list-item";
60
60
  })[] | undefined;
61
61
  };
62
62
  } & {
@@ -64,7 +64,7 @@ declare const _default: {
64
64
  direction?: string | undefined;
65
65
  }) => ProsemirrorNode | undefined;
66
66
  toPrismic(node: ProsemirrorNode, nodeType: "list-item" | "o-list-item"): readonly ({
67
- type: "image" | "embed" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "list-item" | "o-list-item" | "rtl";
67
+ type: "image" | "paragraph" | "embed" | "em" | "strong" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "preformatted" | "hyperlink" | "list-item" | "o-list-item" | "rtl";
68
68
  content: {
69
69
  text: string;
70
70
  } & {
@@ -117,7 +117,7 @@ declare const _default: {
117
117
  } | {
118
118
  start: number;
119
119
  end: number;
120
- type: "strong" | "em" | "list-item";
120
+ type: "em" | "strong" | "list-item";
121
121
  })[] | undefined;
122
122
  };
123
123
  } & {
@@ -20,31 +20,31 @@ export declare function useImageView(props: useImageViewProps): {
20
20
  updateContent: (content?: ImageBlockData) => void;
21
21
  onClear: () => void;
22
22
  uploadImage: import("@tanstack/react-query/build/legacy/types").UseMutateFunction<{
23
+ id: string;
24
+ size: number;
25
+ kind: string;
26
+ url: string;
23
27
  tags: {
24
- name: string;
25
28
  id: string;
29
+ name: string;
26
30
  created_at: number;
27
31
  last_modified: number;
28
32
  count: number;
29
33
  uploader_id?: string | undefined;
30
34
  }[];
31
- id: string;
32
- url: string;
33
- kind: string;
34
- size: number;
35
35
  last_modified: number;
36
36
  filename: string;
37
- width?: number | undefined;
37
+ notes?: string | undefined;
38
38
  height?: number | undefined;
39
+ width?: number | undefined;
39
40
  credits?: string | undefined;
40
41
  alt?: string | undefined;
41
- notes?: string | undefined;
42
42
  uploader_id?: string | undefined;
43
43
  extension?: string | undefined;
44
44
  search_highlight?: {
45
+ notes?: string | undefined;
45
46
  credits?: string | undefined;
46
47
  alt?: string | undefined;
47
- notes?: string | undefined;
48
48
  filename?: string | undefined;
49
49
  } | undefined;
50
50
  }, Error, File, unknown>;
@@ -5,15 +5,15 @@ declare module "@tiptap/core" {
5
5
  /**
6
6
  * Add a row at the end of the table
7
7
  * @returns True if the command was successful, otherwise false
8
- * @example editor.commands.addRowEnd()
8
+ * @example editor.commands.addRowToEnd()
9
9
  */
10
- addRowEnd: () => ReturnType;
10
+ addRowToEnd: () => ReturnType;
11
11
  /**
12
12
  * Add a column at the end of the table
13
13
  * @returns True if the command was successful, otherwise false
14
- * @example editor.commands.addColumnEnd()
14
+ * @example editor.commands.addColumnToEnd()
15
15
  */
16
- addColumnEnd: () => ReturnType;
16
+ addColumnToEnd: () => ReturnType;
17
17
  };
18
18
  }
19
19
  }
@@ -0,0 +1,10 @@
1
+ import { TableContent } from "@prismicio/types-internal/lib/content";
2
+ import { Node as ProseMirrorNode, type Schema } from "@tiptap/pm/model";
3
+ type TableRowBlock = TableContent["content"][number];
4
+ type TableCellOrHeaderBlock = TableRowBlock["content"][number];
5
+ export declare const TableCell: import("@tiptap/core").Node<import("@tiptap/extension-table-cell").TableCellOptions, any>;
6
+ export declare const tableCellConverter: {
7
+ fromPrismic(schema: Schema): (cell: TableCellOrHeaderBlock) => ProseMirrorNode;
8
+ toPrismic(node: ProseMirrorNode): TableCellOrHeaderBlock;
9
+ };
10
+ export {};
@@ -0,0 +1,10 @@
1
+ import { TableContent } from "@prismicio/types-internal/lib/content";
2
+ import type { Node as ProseMirrorNode, Schema } from "@tiptap/pm/model";
3
+ type TableRowBlock = TableContent["content"][number];
4
+ type TableCellOrHeaderBlock = TableRowBlock["content"][number];
5
+ export declare const TableHeader: import("@tiptap/core").Node<import("@tiptap/extension-table-header").TableHeaderOptions, any>;
6
+ export declare const tableHeaderCellConverter: {
7
+ fromPrismic(schema: Schema): (header: TableCellOrHeaderBlock) => ProseMirrorNode;
8
+ toPrismic(node: ProseMirrorNode): TableCellOrHeaderBlock;
9
+ };
10
+ export {};
@@ -0,0 +1,2 @@
1
+ export * from "./TableCell";
2
+ export * from "./TableHeaderCell";
@@ -0,0 +1,8 @@
1
+ import type { Editor } from "@tiptap/core";
2
+ import { Plugin } from "@tiptap/pm/state";
3
+ import { DecorationSet } from "@tiptap/pm/view";
4
+ /** Plugin responsible for showing and hiding the row and column handles. */
5
+ export declare function TableHandlesPlugin(this: {
6
+ editor: Editor;
7
+ name: string;
8
+ }): Plugin<DecorationSet>;
@@ -0,0 +1,34 @@
1
+ import { type PluginView } from "@tiptap/pm/state";
2
+ import type { EditorView } from "@tiptap/pm/view";
3
+ /**
4
+ * This plugin centralizes the logic for showing and hiding the row and column
5
+ * handle buttons (the ones that on click open a floating menu).
6
+ *
7
+ * Ideally, hiding and showing the handles would be handled using only CSS,
8
+ * but identifying the topmost cell in a column is not trivial, as the grouping
9
+ * of cells in a column is not clearly defined in the DOM (only by colgroup),
10
+ * and CSS cannot dynamically select it depending on the hovered cell.
11
+ *
12
+ * Another option was to dynamically generate hardcoded selectors, given that
13
+ * we know the number of rows and cells, but inline styles can only contain
14
+ * property declarations, not pseudo-classes like :hover.
15
+ *
16
+ * That leaves us with handling it solely in JavaScript, which is what this
17
+ * plugin does.
18
+ */
19
+ export declare class TableHandlesPluginView implements PluginView {
20
+ private readonly view;
21
+ private abortController;
22
+ private currentRowHandle;
23
+ private currentColumnHandle;
24
+ constructor(view: EditorView);
25
+ update(view: EditorView): void;
26
+ destroy(): void;
27
+ private attachEventListeners;
28
+ private showCurrentHandles;
29
+ private hidePreviousHandles;
30
+ private getRowHandle;
31
+ private getColumnHandle;
32
+ private displayHandle;
33
+ private hideHandle;
34
+ }
@@ -0,0 +1,19 @@
1
+ import type { Editor } from "@tiptap/core";
2
+ export type TableHandleEventDetail = {
3
+ type: "row" | "column";
4
+ referenceElement: HTMLElement;
5
+ };
6
+ export type TableHandleEventType = {
7
+ name: "handleClick";
8
+ detail: TableHandleEventDetail;
9
+ };
10
+ export declare class TableHandleEvent extends CustomEvent<TableHandleEventType["detail"]> {
11
+ constructor({ name, detail }: TableHandleEventType);
12
+ static dispatch<TEvent extends TableHandleEventType>(name: TEvent["name"], args: {
13
+ editor: Editor;
14
+ } & TEvent["detail"]): void;
15
+ static listen<TEvent extends TableHandleEventType>(name: TEvent["name"], args: {
16
+ editor: Editor;
17
+ callback: (detail: TEvent["detail"]) => void;
18
+ }): () => void;
19
+ }
@@ -0,0 +1 @@
1
+ export { TableHandlesPlugin } from "./TableHandlesPlugin";
@@ -0,0 +1,23 @@
1
+ import { type Editor } from "@tiptap/core";
2
+ import type { Node as ProseMirrorNode } from "@tiptap/pm/model";
3
+ import type { Selection } from "@tiptap/pm/state";
4
+ interface NodePos {
5
+ pos: number;
6
+ start: number;
7
+ node: ProseMirrorNode | null | undefined;
8
+ }
9
+ export declare function getCellsInColumn(columnIndex: number | number[]): (selection: Selection) => NodePos[] | null;
10
+ export declare function getCellsInRow(rowIndex: number | number[]): (selection: Selection) => NodePos[] | null;
11
+ /** Finds the table handle element for the given type and element. */
12
+ export declare function findTableHandleElement(args: {
13
+ type: "row" | "column";
14
+ element: Element;
15
+ }): Element;
16
+ /** Creates a table handle element for the given type. */
17
+ export declare function createTableHandleElement(args: {
18
+ type: "row" | "column";
19
+ editor: Editor;
20
+ rowIndex: number;
21
+ columnIndex: number;
22
+ }): HTMLButtonElement;
23
+ export {};
@@ -0,0 +1 @@
1
+ export { TableHandlesPlugin } from "./TableHandles";
@@ -0,0 +1,17 @@
1
+ import { z } from "zod";
2
+ export declare const tableCellAttrs: z.ZodObject<{
3
+ key: z.ZodOptional<z.ZodNullable<z.ZodString>>;
4
+ colspan: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
5
+ rowspan: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
6
+ colwidth: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodNumber, "many">>>;
7
+ }, "strip", z.ZodTypeAny, {
8
+ key?: string | null | undefined;
9
+ colspan?: number | null | undefined;
10
+ rowspan?: number | null | undefined;
11
+ colwidth?: number[] | null | undefined;
12
+ }, {
13
+ key?: string | null | undefined;
14
+ colspan?: number | null | undefined;
15
+ rowspan?: number | null | undefined;
16
+ colwidth?: number[] | null | undefined;
17
+ }>;
@@ -0,0 +1,15 @@
1
+ import type { Block } from "@prismicio/types-internal/lib/content";
2
+ import type { Node as ProseMirrorNode, Schema } from "@tiptap/pm/model";
3
+ export declare function mapTableCellToParagraph(schema: Schema, block: Block): ProseMirrorNode | undefined;
4
+ interface CreateButtonElementArgs {
5
+ title: string;
6
+ className: string;
7
+ tabIndex?: number;
8
+ onMouseDown?: (event: MouseEvent, currentTarget: HTMLButtonElement) => void;
9
+ onClick: (event: MouseEvent, currentTarget: HTMLButtonElement) => void;
10
+ [key: `data-${string}`]: string | number | boolean;
11
+ [key: `aria-${string}`]: string | number | boolean;
12
+ }
13
+ export declare function createButtonElement(args: CreateButtonElementArgs): HTMLButtonElement;
14
+ export declare function renderHtmlFromString(html: string): ChildNode | null;
15
+ export {};
@@ -0,0 +1,31 @@
1
+ import type { Editor } from "@tiptap/core";
2
+ type Type = "row" | "column";
3
+ export type TableHandleEventDetail = {
4
+ type: Type;
5
+ referenceElement: HTMLElement;
6
+ };
7
+ export type TableAddAtLimitEventDetail = {
8
+ type: Type;
9
+ };
10
+ export type TableEventType = {
11
+ name: "handleClick";
12
+ detail: TableHandleEventDetail;
13
+ } | {
14
+ name: "addAtLimit";
15
+ detail: TableAddAtLimitEventDetail;
16
+ };
17
+ type EventName = TableEventType["name"];
18
+ type EventDetail<TName extends EventName> = Extract<TableEventType, {
19
+ name: TName;
20
+ }>["detail"];
21
+ export declare class TableEvent extends CustomEvent<TableEventType["detail"]> {
22
+ constructor({ name, detail }: TableEventType);
23
+ static dispatch<TName extends EventName>(name: TName, args: {
24
+ editor: Editor;
25
+ } & EventDetail<TName>): void;
26
+ static listen<TName extends EventName>(name: TName, args: {
27
+ editor: Editor;
28
+ callback: (detail: EventDetail<TName>) => void;
29
+ }): () => void;
30
+ }
31
+ export {};
@@ -0,0 +1,7 @@
1
+ /// <reference types="react" />
2
+ import type { Editor } from "@tiptap/core";
3
+ interface LimitModalProps {
4
+ editor: Editor;
5
+ }
6
+ export declare function TableLimitToast(props: LimitModalProps): JSX.Element;
7
+ export {};
@@ -0,0 +1,9 @@
1
+ import { TableContent } from "@prismicio/types-internal/lib/content";
2
+ import type { Node as ProseMirrorNode, Schema } from "@tiptap/pm/model";
3
+ type TableRowBlock = TableContent["content"][number];
4
+ export declare const TableRow: import("@tiptap/core").Node<import("@tiptap/extension-table-row").TableRowOptions, any>;
5
+ export declare const tableRowConverter: {
6
+ fromPrismic(schema: Schema): (row: TableRowBlock) => ProseMirrorNode;
7
+ toPrismic(node: ProseMirrorNode): TableRowBlock;
8
+ };
9
+ export {};
@@ -0,0 +1,20 @@
1
+ import type { TableOptions as TTTableOptions } from "@tiptap/extension-table";
2
+ import type { Node as ProseMirrorNode } from "@tiptap/pm/model";
3
+ import { TableView as TTTableView } from "@tiptap/pm/tables";
4
+ import type { NodeView, ViewMutationRecord } from "@tiptap/pm/view";
5
+ import { Editor } from "@tiptap/react";
6
+ export interface TableOptions extends TTTableOptions {
7
+ defaultCellMinWidth: number;
8
+ }
9
+ /**
10
+ * Renders a custom table, with a container for the table and the add
11
+ * row/column buttons, while keeping the default table view for the
12
+ * table content.
13
+ */
14
+ export declare class TableView extends TTTableView implements NodeView {
15
+ constructor(args: {
16
+ node: ProseMirrorNode;
17
+ editor: Editor;
18
+ }, options: TableOptions);
19
+ ignoreMutation(mutation: ViewMutationRecord): boolean;
20
+ }
@@ -0,0 +1,11 @@
1
+ import type { Editor } from "@tiptap/core";
2
+ import { type CSSProperties } from "react";
3
+ interface TableColumnMenuProps {
4
+ editor: Editor;
5
+ style?: CSSProperties;
6
+ open?: boolean;
7
+ onOpenChange?: (open: boolean) => void;
8
+ triggerElement: HTMLElement | undefined;
9
+ }
10
+ export declare function TableColumnMenu(props: TableColumnMenuProps): JSX.Element;
11
+ export {};
@@ -0,0 +1,7 @@
1
+ /// <reference types="react" />
2
+ import type { Editor } from "@tiptap/core";
3
+ interface TableHandlesMenusProps {
4
+ editor: Editor;
5
+ }
6
+ export declare function TableFloatingMenus(props: TableHandlesMenusProps): JSX.Element;
7
+ export {};
@@ -0,0 +1,10 @@
1
+ /// <reference types="react" />
2
+ import type { Editor } from "@tiptap/core";
3
+ interface TableRowMenuProps {
4
+ editor: Editor;
5
+ open?: boolean;
6
+ onOpenChange?: (open: boolean) => void;
7
+ triggerElement: HTMLElement | undefined;
8
+ }
9
+ export declare function TableRowMenu(props: TableRowMenuProps): JSX.Element;
10
+ export {};
@@ -0,0 +1,11 @@
1
+ import { type HTMLAttributes } from "react";
2
+ interface TriggerProps extends HTMLAttributes<HTMLDivElement> {
3
+ anchorElement: HTMLElement | undefined;
4
+ }
5
+ /**
6
+ * This component serves as a dummy trigger for radix dialog to be able to open.
7
+ * It won't be visible, and it's only purpose is to sync the props that are
8
+ * passed to it by radix with the real trigger via the anchorRef prop.
9
+ */
10
+ export declare const TriggerAnchor: (props: TriggerProps & import("react").RefAttributes<HTMLElement>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | null;
11
+ export {};
@@ -0,0 +1,2 @@
1
+ export { TableFloatingMenus } from "./TableFloatingMenus";
2
+ export { TableRowMenu } from "./TableRowMenu";
@@ -0,0 +1,23 @@
1
+ import type { Editor } from "@tiptap/core";
2
+ /**
3
+ * Row utilities
4
+ */
5
+ export declare const isFirstRow: (editor: Editor) => boolean;
6
+ export declare function isFirstOrLastRow(editor: Editor): {
7
+ isFirstRow: boolean;
8
+ isLastRow: boolean;
9
+ };
10
+ export declare function isSecondRow(editor: Editor): boolean;
11
+ export declare const isHeaderRowToggled: (editor: Editor) => boolean;
12
+ export declare const isSingleRow: (editor: Editor) => boolean;
13
+ /**
14
+ * Column utilities
15
+ */
16
+ export declare const isFirstColumn: (editor: Editor) => boolean;
17
+ export declare function isSecondColumn(editor: Editor): boolean;
18
+ export declare function isFirstOrLastColumn(editor: Editor): {
19
+ isFirstColumn: boolean;
20
+ isLastColumn: boolean;
21
+ };
22
+ export declare const isHeaderColumnToggled: (editor: Editor) => boolean;
23
+ export declare const isSingleColumn: (editor: Editor) => boolean;
@@ -0,0 +1,60 @@
1
+ import { Editor } from "@tiptap/core";
2
+ import { type Schema } from "@tiptap/pm/model";
3
+ import type { EditorState, Selection, Transaction } from "@tiptap/pm/state";
4
+ export declare function getNodeFromSchema(schema: Schema, name: string): import("prosemirror-model").NodeType;
5
+ export declare function findTable(selection: Selection): {
6
+ pos: number;
7
+ start: number;
8
+ depth: number;
9
+ node: import("prosemirror-model").Node;
10
+ } | undefined;
11
+ export declare function findRow(selection: Selection): {
12
+ pos: number;
13
+ start: number;
14
+ depth: number;
15
+ node: import("prosemirror-model").Node;
16
+ } | undefined;
17
+ export declare function findCell(selection: Selection): {
18
+ pos: number;
19
+ start: number;
20
+ depth: number;
21
+ node: import("prosemirror-model").Node;
22
+ } | undefined;
23
+ type FindableNodeName = "cell" | "row" | "table";
24
+ export declare function findParentNodes<TNodeName extends FindableNodeName>(selection: Selection, ...elements: TNodeName[]): { [key in TNodeName]: {
25
+ pos: number;
26
+ start: number;
27
+ depth: number;
28
+ node: import("prosemirror-model").Node;
29
+ } | undefined; };
30
+ export declare function getTableColumnCount(editor: Editor): number;
31
+ export declare function getTableRowCount(editor: Editor): number;
32
+ export declare function isTableColumnLimitReached(editor: Editor): boolean;
33
+ export declare function isTableRowLimitReached(editor: Editor): boolean;
34
+ export declare function select(type: "row" | "column", args: {
35
+ index: number;
36
+ tr: Transaction;
37
+ }): Transaction;
38
+ export declare function selectRow(args: {
39
+ index: number;
40
+ tr: Transaction;
41
+ }): Transaction;
42
+ export declare function selectColumn(args: {
43
+ index: number;
44
+ tr: Transaction;
45
+ }): Transaction;
46
+ export declare function moveRow(args: {
47
+ direction: "up" | "down";
48
+ state: EditorState;
49
+ }): {
50
+ tr: Transaction;
51
+ index: number;
52
+ } | undefined;
53
+ export declare function moveColumn(args: {
54
+ direction: "left" | "right";
55
+ state: EditorState;
56
+ }): {
57
+ tr: Transaction;
58
+ index: number;
59
+ } | undefined;
60
+ export {};
@@ -12,7 +12,7 @@ import { Link } from "./Link/Link";
12
12
  import { default as OrderedList } from "./OrderedList/OrderedList";
13
13
  import { default as Paragraph } from "./Paragraph/Paragraph";
14
14
  import { Table } from "./Table/Table";
15
- export declare const MarkExtensions: (import("./Bold/BoldModel").BoldExtension | import("./Italic/ItalicModel").ItalicExtension | import("./Link/LinkModel").LinkExtension | import("./Label/LabelModel").LabelExtension)[];
15
+ export declare const MarkExtensions: (import("./Link/LinkModel").LinkExtension | import("./Bold/BoldModel").BoldExtension | import("./Italic/ItalicModel").ItalicExtension | import("./Label/LabelModel").LabelExtension)[];
16
16
  export type MarkExtensionName = (typeof MarkExtensions)[number]["name"];
17
17
  export declare function getAllExtensions(nodeTypes?: Set<ExtendedRichTextNodeType>): WidgetExtension[];
18
18
  export { Bold, BulletList, CodeBlock, Embed, Heading, Image, Italic, Label, Link, OrderedList, Paragraph, Table, };