reactjs-tiptap-editor 0.0.3 → 0.0.5

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "reactjs-tiptap-editor",
3
- "version": "0.0.3",
3
+ "version": "0.0.5",
4
4
  "main": "./lib/reactjs-tiptap-editor.js",
5
5
  "module": "./lib/reactjs-tiptap-editor.mjs",
6
6
  "types": "./lib/index.d.ts",
@@ -43,7 +43,8 @@
43
43
  "build:playground": "pnpm build:lib && pnpm --dir ./playground run build",
44
44
  "docs:dev": "pnpm --parallel --filter docs... dev",
45
45
  "docs:build": "pnpm --filter docs... build",
46
- "docs:preview": "pnpm -C docs preview"
46
+ "docs:preview": "pnpm -C docs preview",
47
+ "prepublishOnly": "pnpm build:lib"
47
48
  },
48
49
  "dependencies": {
49
50
  "@radix-ui/react-dropdown-menu": "^2.1.1",
@@ -1,6 +0,0 @@
1
- import { Node } from '@tiptap/core';
2
-
3
- export interface TableCellOptions {
4
- HTMLAttributes: Record<string, any>;
5
- }
6
- export declare const TableCell: Node<TableCellOptions, any>;
@@ -1,5 +0,0 @@
1
- export type TableHeaderOptions = {
2
- HTMLAttributes: Record<string, any>;
3
- };
4
- export declare const TableHeader: import('@tiptap/core').Node<TableHeaderOptions, any>;
5
- export default TableHeader;
@@ -1,5 +0,0 @@
1
- interface IPropsTableBubbleMenu {
2
- editor: any;
3
- }
4
- declare const TableBubbleMenu: (props: IPropsTableBubbleMenu) => import("react/jsx-runtime").JSX.Element;
5
- export default TableBubbleMenu;
@@ -1,21 +0,0 @@
1
- import { Editor as CoreEditor } from '@tiptap/core';
2
- import { EditorState } from '@tiptap/pm/state';
3
- import { EditorView } from '@tiptap/pm/view';
4
-
5
- interface IPropsTableCellMenu {
6
- editor: any;
7
- onDeleteTable: () => void;
8
- onSplitCell: () => void;
9
- onMergeCell: () => void;
10
- onSetCellBackground: (color: string) => void;
11
- }
12
- export interface ShouldShowProps {
13
- editor?: CoreEditor;
14
- view: EditorView;
15
- state?: EditorState;
16
- oldState?: EditorState;
17
- from?: number;
18
- to?: number;
19
- }
20
- declare const TableCellMenu: (props: IPropsTableCellMenu) => import("react/jsx-runtime").JSX.Element;
21
- export default TableCellMenu;
@@ -1,20 +0,0 @@
1
- import { Editor as CoreEditor } from '@tiptap/core';
2
- import { EditorState } from '@tiptap/pm/state';
3
- import { EditorView } from '@tiptap/pm/view';
4
-
5
- interface IPropsTableColumnMenu {
6
- editor: any;
7
- onSplitCell: () => void;
8
- onMergeCell: () => void;
9
- onSetCellBackground: (color: string) => void;
10
- }
11
- export interface ShouldShowProps {
12
- editor?: CoreEditor;
13
- view: EditorView;
14
- state?: EditorState;
15
- oldState?: EditorState;
16
- from?: number;
17
- to?: number;
18
- }
19
- declare const TableColumnMenu: (props: IPropsTableColumnMenu) => import("react/jsx-runtime").JSX.Element;
20
- export default TableColumnMenu;
@@ -1,20 +0,0 @@
1
- import { Editor as CoreEditor } from '@tiptap/core';
2
- import { EditorState } from '@tiptap/pm/state';
3
- import { EditorView } from '@tiptap/pm/view';
4
-
5
- interface IPropsTableRowMenu {
6
- editor: any;
7
- onSplitCell: () => void;
8
- onMergeCell: () => void;
9
- onSetCellBackground: (color: string) => void;
10
- }
11
- export interface ShouldShowProps {
12
- editor?: CoreEditor;
13
- view: EditorView;
14
- state?: EditorState;
15
- oldState?: EditorState;
16
- from?: number;
17
- to?: number;
18
- }
19
- declare const TableRowMenu: (props: IPropsTableRowMenu) => import("react/jsx-runtime").JSX.Element;
20
- export default TableRowMenu;
@@ -1,2 +0,0 @@
1
- export declare const TableRow: import('@tiptap/core').Node<import('@tiptap/extension-table-row').TableRowOptions, any>;
2
- export default TableRow;
@@ -1,67 +0,0 @@
1
- import { Editor } from '@tiptap/core';
2
- import { Node, ResolvedPos } from '@tiptap/pm/model';
3
- import { EditorState, Selection, Transaction } from '@tiptap/pm/state';
4
- import { CellSelection } from '@tiptap/pm/tables';
5
- import { EditorView } from '@tiptap/pm/view';
6
-
7
- export declare const isRectSelected: (rect: any) => (selection: CellSelection) => boolean;
8
- export declare const findTable: (selection: Selection) => {
9
- pos: number;
10
- start: number;
11
- depth: number;
12
- node: Node;
13
- } | undefined;
14
- export declare const isCellSelection: (selection: any) => boolean;
15
- export declare const isColumnSelected: (columnIndex: number) => (selection: any) => boolean;
16
- export declare const isRowSelected: (rowIndex: number) => (selection: any) => boolean;
17
- export declare const isTableSelected: (selection: any) => boolean;
18
- export declare const getCellsInColumn: (columnIndex: number | number[]) => (selection: Selection) => any;
19
- export declare const getCellsInRow: (rowIndex: number | number[]) => (selection: Selection) => {
20
- pos: number;
21
- start: number;
22
- node: Node | null | undefined;
23
- }[] | null;
24
- export declare const getCellsInTable: (selection: Selection) => {
25
- pos: number;
26
- start: number;
27
- node: Node | null;
28
- }[] | null;
29
- export declare const findParentNodeClosestToPos: ($pos: ResolvedPos, predicate: (node: Node) => boolean) => {
30
- pos: number;
31
- start: number;
32
- depth: number;
33
- node: Node;
34
- } | null;
35
- export declare const findCellClosestToPos: ($pos: ResolvedPos) => {
36
- pos: number;
37
- start: number;
38
- depth: number;
39
- node: Node;
40
- } | null;
41
- export declare const selectColumn: (index: number) => (tr: Transaction) => Transaction;
42
- export declare const selectRow: (index: number) => (tr: Transaction) => Transaction;
43
- export declare const selectTable: (tr: Transaction) => Transaction;
44
- export declare const analyzeCellSelection: (editor: Editor) => {
45
- isRowSelection: boolean;
46
- isColSelection: boolean;
47
- cellCount: number;
48
- mergedCellCount: number;
49
- };
50
- export declare const isTableCellSelected: ({ editor, view, state, from, }: {
51
- editor: Editor;
52
- view: EditorView;
53
- state: EditorState;
54
- from: number;
55
- }) => boolean;
56
- export declare const isColumnGripSelected: ({ editor, view, state, from, }: {
57
- editor: Editor;
58
- view: EditorView;
59
- state: EditorState;
60
- from: number;
61
- }) => boolean;
62
- export declare const isRowGripSelected: ({ editor, view, state, from, }: {
63
- editor: Editor;
64
- view: EditorView;
65
- state: EditorState;
66
- from: number;
67
- }) => boolean;