@firecms/editor 3.0.0-canary.23 → 3.0.0-canary.231
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/LICENSE +114 -21
- package/dist/SampleCustomComponent.d.ts +10 -0
- package/dist/components/index.d.ts +0 -3
- package/dist/editor.d.ts +18 -2
- package/dist/editor_extensions.d.ts +6 -0
- package/dist/extensions/CustomBlockComponent.d.ts +7 -0
- package/dist/extensions/HighlightDecorationExtension.d.ts +35 -0
- package/dist/extensions/Image.d.ts +6 -3
- package/dist/extensions/InlineAutocomplete.d.ts +7 -0
- package/dist/extensions/TextLoadingDecorationExtension.d.ts +18 -0
- package/dist/extensions/_image-resizer.d.ts +0 -1
- package/dist/extensions/index.d.ts +1 -2
- package/dist/extensions/slashCommand.d.ts +91 -0
- package/dist/index.es.js +1847 -859
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +1934 -8
- package/dist/index.umd.js.map +1 -1
- package/dist/selectors/node-selector.d.ts +2 -1
- package/dist/types.d.ts +3 -0
- package/dist/utils/utils.d.ts +1 -1
- package/package.json +49 -33
- package/dist/components/editor-command-item.d.ts +0 -20
- package/dist/components/editor-command.d.ts +0 -24
- package/dist/components/editor.d.ts +0 -51
- package/dist/extensions/slash-command.d.ts +0 -29
- package/dist/extensions/updated-image.d.ts +0 -2
package/package.json
CHANGED
@@ -1,12 +1,11 @@
|
|
1
1
|
{
|
2
2
|
"name": "@firecms/editor",
|
3
|
-
"version": "3.0.0-canary.
|
3
|
+
"version": "3.0.0-canary.231",
|
4
4
|
"description": "Notion-style WYSIWYG editor for FireCMS",
|
5
|
-
"license": "Apache-2.0",
|
6
5
|
"type": "module",
|
7
6
|
"main": "dist/index.cjs",
|
8
7
|
"module": "dist/index.js",
|
9
|
-
"types": "dist/
|
8
|
+
"types": "dist/index.d.ts",
|
10
9
|
"publishConfig": {
|
11
10
|
"access": "public"
|
12
11
|
},
|
@@ -26,41 +25,58 @@
|
|
26
25
|
"clean": "rm -rf dist && find ./src -name '*.js' -type f | xargs rm -f"
|
27
26
|
},
|
28
27
|
"peerDependencies": {
|
29
|
-
"react": "
|
30
|
-
"react-dom": "
|
28
|
+
"react": ">=18.0.0",
|
29
|
+
"react-dom": ">=18.0.0"
|
31
30
|
},
|
32
31
|
"dependencies": {
|
33
|
-
"@firecms/ui": "^3.0.0-canary.
|
34
|
-
"@radix-ui/react-slot": "^1.
|
35
|
-
"@tiptap/core": "
|
36
|
-
"@tiptap/extension-
|
37
|
-
"@tiptap/extension-
|
38
|
-
"@tiptap/extension-
|
39
|
-
"@tiptap/extension-
|
40
|
-
"@tiptap/extension-
|
41
|
-
"@tiptap/extension-
|
42
|
-
"@tiptap/extension-
|
43
|
-
"@tiptap/extension-
|
44
|
-
"@tiptap/extension-
|
45
|
-
"@tiptap/extension-
|
46
|
-
"@tiptap/
|
47
|
-
"@tiptap/
|
48
|
-
"@tiptap/
|
49
|
-
"@tiptap/
|
50
|
-
"@
|
51
|
-
"
|
52
|
-
"
|
53
|
-
"
|
32
|
+
"@firecms/ui": "^3.0.0-canary.231",
|
33
|
+
"@radix-ui/react-slot": "^1.1.1",
|
34
|
+
"@tiptap/core": "2.11.5",
|
35
|
+
"@tiptap/extension-blockquote": "2.11.5",
|
36
|
+
"@tiptap/extension-bold": "2.11.5",
|
37
|
+
"@tiptap/extension-bullet-list": "2.11.5",
|
38
|
+
"@tiptap/extension-code": "2.11.5",
|
39
|
+
"@tiptap/extension-code-block": "2.11.5",
|
40
|
+
"@tiptap/extension-color": "2.11.5",
|
41
|
+
"@tiptap/extension-document": "2.11.5",
|
42
|
+
"@tiptap/extension-heading": "2.11.5",
|
43
|
+
"@tiptap/extension-highlight": "2.11.5",
|
44
|
+
"@tiptap/extension-horizontal-rule": "2.11.5",
|
45
|
+
"@tiptap/extension-image": "2.11.5",
|
46
|
+
"@tiptap/extension-italic": "2.11.5",
|
47
|
+
"@tiptap/extension-link": "2.11.5",
|
48
|
+
"@tiptap/extension-list-item": "2.11.5",
|
49
|
+
"@tiptap/extension-ordered-list": "2.11.5",
|
50
|
+
"@tiptap/extension-placeholder": "2.11.5",
|
51
|
+
"@tiptap/extension-strike": "2.11.5",
|
52
|
+
"@tiptap/extension-task-item": "2.11.5",
|
53
|
+
"@tiptap/extension-task-list": "2.11.5",
|
54
|
+
"@tiptap/extension-text-style": "2.11.5",
|
55
|
+
"@tiptap/extension-underline": "2.11.5",
|
56
|
+
"@tiptap/pm": "2.11.5",
|
57
|
+
"@tiptap/react": "2.11.5",
|
58
|
+
"@tiptap/starter-kit": "2.11.5",
|
59
|
+
"@tiptap/suggestion": "2.11.5",
|
60
|
+
"@types/node": "20.17.14",
|
61
|
+
"prosemirror-view": "1.37.2",
|
62
|
+
"react-compiler-runtime": "^19.0.0-beta-e552027-20250112",
|
63
|
+
"react-markdown": "^9.0.3",
|
54
64
|
"react-moveable": "^0.56.0",
|
55
65
|
"tippy.js": "^6.3.7",
|
56
|
-
"tiptap-markdown": "^0.8.
|
57
|
-
"tunnel-rat": "^0.1.2"
|
66
|
+
"tiptap-markdown": "^0.8.10"
|
58
67
|
},
|
59
68
|
"devDependencies": {
|
60
|
-
"@types/react": "^18.
|
61
|
-
"@types/react-dom": "18.
|
62
|
-
"
|
63
|
-
"
|
69
|
+
"@types/react": "^18.3.18",
|
70
|
+
"@types/react-dom": "^18.3.0",
|
71
|
+
"@types/react-measure": "^2.0.12",
|
72
|
+
"@vitejs/plugin-react": "^4.3.4",
|
73
|
+
"babel-jest": "^29.7.0",
|
74
|
+
"babel-plugin-react-compiler": "beta",
|
75
|
+
"eslint-plugin-react-compiler": "beta",
|
76
|
+
"jest": "^29.7.0",
|
77
|
+
"ts-jest": "^29.2.5",
|
78
|
+
"typescript": "^5.7.3",
|
79
|
+
"vite": "^5.4.14"
|
64
80
|
},
|
65
|
-
"gitHead": "
|
81
|
+
"gitHead": "c38a44b87565537d51e654a0565b0921c933c55e"
|
66
82
|
}
|
@@ -1,20 +0,0 @@
|
|
1
|
-
/// <reference types="react" />
|
2
|
-
import { Editor, type Range } from "@tiptap/core";
|
3
|
-
interface EditorCommandItemProps {
|
4
|
-
onCommand: ({ editor, range }: {
|
5
|
-
editor: Editor;
|
6
|
-
range: Range;
|
7
|
-
}) => void;
|
8
|
-
}
|
9
|
-
export declare const EditorCommandItem: import("react").ForwardRefExoticComponent<EditorCommandItemProps & Omit<{
|
10
|
-
children?: import("react").ReactNode;
|
11
|
-
} & Omit<import("react").HTMLAttributes<HTMLDivElement>, "onSelect" | "value" | "disabled"> & {
|
12
|
-
disabled?: boolean | undefined;
|
13
|
-
onSelect?: ((value: string) => void) | undefined;
|
14
|
-
value?: string | undefined;
|
15
|
-
forceMount?: boolean | undefined;
|
16
|
-
} & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
17
|
-
export declare const EditorCommandEmpty: import("react").ForwardRefExoticComponent<{
|
18
|
-
children?: import("react").ReactNode;
|
19
|
-
} & import("react").HTMLAttributes<HTMLDivElement> & import("react").RefAttributes<HTMLDivElement>>;
|
20
|
-
export default EditorCommandItem;
|
@@ -1,24 +0,0 @@
|
|
1
|
-
/// <reference types="react" />
|
2
|
-
import type { Range } from "@tiptap/core";
|
3
|
-
export declare const queryAtom: import("jotai").PrimitiveAtom<string> & {
|
4
|
-
init: string;
|
5
|
-
};
|
6
|
-
export declare const rangeAtom: import("jotai").PrimitiveAtom<Range | null> & {
|
7
|
-
init: Range | null;
|
8
|
-
};
|
9
|
-
export declare const EditorCommandOut: ({ query, range, }: {
|
10
|
-
query: string;
|
11
|
-
range: Range;
|
12
|
-
}) => JSX.Element;
|
13
|
-
export declare const EditorCommand: import("react").ForwardRefExoticComponent<Omit<{
|
14
|
-
children?: import("react").ReactNode;
|
15
|
-
} & import("react").HTMLAttributes<HTMLDivElement> & {
|
16
|
-
label?: string | undefined;
|
17
|
-
shouldFilter?: boolean | undefined;
|
18
|
-
filter?: ((value: string, search: string) => number) | undefined;
|
19
|
-
defaultValue?: string | undefined;
|
20
|
-
value?: string | undefined;
|
21
|
-
onValueChange?: ((value: string) => void) | undefined;
|
22
|
-
loop?: boolean | undefined;
|
23
|
-
vimBindings?: boolean | undefined;
|
24
|
-
} & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
@@ -1,51 +0,0 @@
|
|
1
|
-
import { type ReactNode } from "react";
|
2
|
-
export declare const editorStore: {
|
3
|
-
get: <Value>(atom: import("jotai").Atom<Value>) => Value;
|
4
|
-
set: <Value_1, Args extends unknown[], Result>(atom: import("jotai").WritableAtom<Value_1, Args, Result>, ...args: Args) => Result;
|
5
|
-
sub: (atom: import("jotai").Atom<unknown>, listener: () => void) => () => void;
|
6
|
-
dev_subscribe_store: (l: (action: {
|
7
|
-
type: "write";
|
8
|
-
flushed: Set<import("jotai").Atom<unknown>>;
|
9
|
-
} | {
|
10
|
-
type: "async-write";
|
11
|
-
flushed: Set<import("jotai").Atom<unknown>>;
|
12
|
-
} | {
|
13
|
-
type: "sub";
|
14
|
-
flushed: Set<import("jotai").Atom<unknown>>;
|
15
|
-
} | {
|
16
|
-
type: "unsub";
|
17
|
-
} | {
|
18
|
-
type: "restore";
|
19
|
-
flushed: Set<import("jotai").Atom<unknown>>;
|
20
|
-
}) => void, rev: 2) => () => void;
|
21
|
-
dev_get_mounted_atoms: () => IterableIterator<import("jotai").Atom<unknown>>;
|
22
|
-
dev_get_atom_state: (a: import("jotai").Atom<unknown>) => ({
|
23
|
-
d: Map<import("jotai").Atom<unknown>, any & ({
|
24
|
-
e: unknown;
|
25
|
-
} | {
|
26
|
-
v: unknown;
|
27
|
-
})>;
|
28
|
-
} & ({
|
29
|
-
e: unknown;
|
30
|
-
} | {
|
31
|
-
v: unknown;
|
32
|
-
})) | undefined;
|
33
|
-
dev_get_mounted: (a: import("jotai").Atom<unknown>) => {
|
34
|
-
l: Set<() => void>;
|
35
|
-
t: Set<import("jotai").Atom<unknown>>;
|
36
|
-
u?: (() => void) | undefined;
|
37
|
-
} | undefined;
|
38
|
-
dev_restore_atoms: (values: Iterable<readonly [import("jotai").Atom<unknown>, unknown]>) => void;
|
39
|
-
} | {
|
40
|
-
get: <Value_2>(atom: import("jotai").Atom<Value_2>) => Value_2;
|
41
|
-
set: <Value_1_1, Args_1 extends unknown[], Result_1>(atom: import("jotai").WritableAtom<Value_1_1, Args_1, Result_1>, ...args: Args_1) => Result_1;
|
42
|
-
sub: (atom: import("jotai").Atom<unknown>, listener: () => void) => () => void;
|
43
|
-
dev_subscribe_store?: undefined;
|
44
|
-
dev_get_mounted_atoms?: undefined;
|
45
|
-
dev_get_atom_state?: undefined;
|
46
|
-
dev_get_mounted?: undefined;
|
47
|
-
dev_restore_atoms?: undefined;
|
48
|
-
};
|
49
|
-
export declare const EditorRoot: ({ children }: {
|
50
|
-
children: ReactNode;
|
51
|
-
}) => JSX.Element;
|
@@ -1,29 +0,0 @@
|
|
1
|
-
import { type Editor, type Range, Extension } from "@tiptap/core";
|
2
|
-
import type { ReactNode } from "react";
|
3
|
-
declare const Command: Extension<any, any>;
|
4
|
-
declare const renderItems: () => {
|
5
|
-
onStart: (props: {
|
6
|
-
editor: Editor;
|
7
|
-
clientRect: DOMRect;
|
8
|
-
}) => void;
|
9
|
-
onUpdate: (props: {
|
10
|
-
editor: Editor;
|
11
|
-
clientRect: DOMRect;
|
12
|
-
}) => void;
|
13
|
-
onKeyDown: (props: {
|
14
|
-
event: KeyboardEvent;
|
15
|
-
}) => any;
|
16
|
-
onExit: () => void;
|
17
|
-
};
|
18
|
-
export interface SuggestionItem {
|
19
|
-
title: string;
|
20
|
-
description: string;
|
21
|
-
icon: ReactNode;
|
22
|
-
searchTerms?: string[];
|
23
|
-
command?: (props: {
|
24
|
-
editor: Editor;
|
25
|
-
range: Range;
|
26
|
-
}) => void;
|
27
|
-
}
|
28
|
-
export declare const createSuggestionItems: (items: SuggestionItem[]) => SuggestionItem[];
|
29
|
-
export { Command, renderItems };
|