@innoviatech/lexical-text-editor 0.0.6 → 0.0.8
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/dist/components/AlignmentSelectionList.d.ts +9 -0
- package/dist/components/ColorPicker.d.ts +7 -0
- package/dist/components/ContentPreview.d.ts +10 -0
- package/dist/components/DropdownList.d.ts +9 -0
- package/dist/components/HeadingSelectionList.d.ts +9 -0
- package/dist/components/ImageComponent.d.ts +11 -0
- package/dist/components/InsertDropdownList.d.ts +1 -0
- package/dist/components/LexicalTextEditor.d.ts +9 -0
- package/dist/components/LinkModal.d.ts +9 -0
- package/dist/components/Separator.d.ts +1 -0
- package/dist/components/ui/button.d.ts +14 -0
- package/dist/components/ui/command.d.ts +18 -0
- package/dist/components/ui/dialog.d.ts +15 -0
- package/dist/components/ui/input.d.ts +3 -0
- package/dist/components/ui/popover.d.ts +7 -0
- package/dist/components/ui/scroll-area.d.ts +5 -0
- package/dist/components/ui/tooltip.d.ts +7 -0
- package/dist/constants/index.d.ts +71 -0
- package/dist/index.d.ts +12 -0
- package/dist/index.esm.js +2 -0
- package/dist/index.esm.js.map +1 -0
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -0
- package/dist/lib/utils.d.ts +1 -0
- package/dist/nodes/ImageNode.d.ts +43 -0
- package/dist/nodes/VideoNode.d.ts +30 -0
- package/dist/nodes/YoutubeNode.d.ts +25 -0
- package/dist/plugins/ColorPlugin.d.ts +1 -0
- package/dist/plugins/CustomOnChangePlugin.d.ts +6 -0
- package/dist/plugins/ImagePlugin.d.ts +1 -0
- package/dist/plugins/ListPlugin.d.ts +5 -0
- package/dist/plugins/ToolbarPlugin.d.ts +3 -0
- package/dist/plugins/VideoPlugin.d.ts +1 -0
- package/dist/style.css +2 -0
- package/package.json +48 -48
- package/src/components/ui/popover.tsx +1 -1
- package/src/styles/lexical-editor.css +152 -0
package/package.json
CHANGED
|
@@ -1,49 +1,49 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@innoviatech/lexical-text-editor",
|
|
3
|
-
"version": "0.0.
|
|
4
|
-
"type": "module",
|
|
5
|
-
"main": "./dist/index.js",
|
|
6
|
-
"module": "./dist/index.esm.js",
|
|
7
|
-
"types": "./dist/index.d.ts",
|
|
8
|
-
"exports": {
|
|
9
|
-
".": {
|
|
10
|
-
"import": "./dist/index.esm.js",
|
|
11
|
-
"require": "./dist/index.js",
|
|
12
|
-
"types": "./dist/index.d.ts"
|
|
13
|
-
},
|
|
14
|
-
"./style.css": "./dist/style.css"
|
|
15
|
-
},
|
|
16
|
-
"scripts": {
|
|
17
|
-
"build": "rollup -c",
|
|
18
|
-
"dev": "rollup -c --watch",
|
|
19
|
-
"prepublishOnly": "npm run build"
|
|
20
|
-
},
|
|
21
|
-
"peerDependencies": {
|
|
22
|
-
"react": ">=18",
|
|
23
|
-
"react-dom": ">=18",
|
|
24
|
-
"lexical": "^0.36.2",
|
|
25
|
-
"@lexical/react": "^0.36.2",
|
|
26
|
-
"@lexical/rich-text": "^0.36.2",
|
|
27
|
-
"@lexical/list": "^0.36.2",
|
|
28
|
-
"@lexical/link": "^0.36.2",
|
|
29
|
-
"@lexical/code": "^0.36.2"
|
|
30
|
-
},
|
|
31
|
-
"devDependencies": {
|
|
32
|
-
"@rollup/plugin-commonjs": "^28.0.0",
|
|
33
|
-
"@rollup/plugin-node-resolve": "^16.0.0",
|
|
34
|
-
"@rollup/plugin-terser": "^0.4.0",
|
|
35
|
-
"@rollup/plugin-typescript": "^12.0.0",
|
|
36
|
-
"typescript": "^5.0.0",
|
|
37
|
-
"tslib": "^2.6.0",
|
|
38
|
-
"rollup-plugin-dts": "^6.1.0",
|
|
39
|
-
"rollup-plugin-peer-deps-external": "^2.2.4",
|
|
40
|
-
"rollup-plugin-postcss": "^4.0.2",
|
|
41
|
-
"autoprefixer": "^10.4.0",
|
|
42
|
-
"postcss": "^8.4.0",
|
|
43
|
-
"tailwindcss": "^3.3.0",
|
|
44
|
-
"react": "^18.0.0",
|
|
45
|
-
"react-dom": "^18.0.0",
|
|
46
|
-
"@types/react": "^18.0.0",
|
|
47
|
-
"@types/react-dom": "^18.0.0"
|
|
48
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@innoviatech/lexical-text-editor",
|
|
3
|
+
"version": "0.0.8",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"main": "./dist/index.js",
|
|
6
|
+
"module": "./dist/index.esm.js",
|
|
7
|
+
"types": "./dist/index.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"import": "./dist/index.esm.js",
|
|
11
|
+
"require": "./dist/index.js",
|
|
12
|
+
"types": "./dist/index.d.ts"
|
|
13
|
+
},
|
|
14
|
+
"./style.css": "./dist/style.css"
|
|
15
|
+
},
|
|
16
|
+
"scripts": {
|
|
17
|
+
"build": "rollup -c",
|
|
18
|
+
"dev": "rollup -c --watch",
|
|
19
|
+
"prepublishOnly": "npm run build"
|
|
20
|
+
},
|
|
21
|
+
"peerDependencies": {
|
|
22
|
+
"react": ">=18",
|
|
23
|
+
"react-dom": ">=18",
|
|
24
|
+
"lexical": "^0.36.2",
|
|
25
|
+
"@lexical/react": "^0.36.2",
|
|
26
|
+
"@lexical/rich-text": "^0.36.2",
|
|
27
|
+
"@lexical/list": "^0.36.2",
|
|
28
|
+
"@lexical/link": "^0.36.2",
|
|
29
|
+
"@lexical/code": "^0.36.2"
|
|
30
|
+
},
|
|
31
|
+
"devDependencies": {
|
|
32
|
+
"@rollup/plugin-commonjs": "^28.0.0",
|
|
33
|
+
"@rollup/plugin-node-resolve": "^16.0.0",
|
|
34
|
+
"@rollup/plugin-terser": "^0.4.0",
|
|
35
|
+
"@rollup/plugin-typescript": "^12.0.0",
|
|
36
|
+
"typescript": "^5.0.0",
|
|
37
|
+
"tslib": "^2.6.0",
|
|
38
|
+
"rollup-plugin-dts": "^6.1.0",
|
|
39
|
+
"rollup-plugin-peer-deps-external": "^2.2.4",
|
|
40
|
+
"rollup-plugin-postcss": "^4.0.2",
|
|
41
|
+
"autoprefixer": "^10.4.0",
|
|
42
|
+
"postcss": "^8.4.0",
|
|
43
|
+
"tailwindcss": "^3.3.0",
|
|
44
|
+
"react": "^18.0.0",
|
|
45
|
+
"react-dom": "^18.0.0",
|
|
46
|
+
"@types/react": "^18.0.0",
|
|
47
|
+
"@types/react-dom": "^18.0.0"
|
|
48
|
+
}
|
|
49
49
|
}
|
|
@@ -28,7 +28,7 @@ function PopoverContent({
|
|
|
28
28
|
align={align}
|
|
29
29
|
sideOffset={sideOffset}
|
|
30
30
|
className={cn(
|
|
31
|
-
"bg-
|
|
31
|
+
"bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden",
|
|
32
32
|
className
|
|
33
33
|
)}
|
|
34
34
|
{...props}
|
|
@@ -3,6 +3,158 @@
|
|
|
3
3
|
@tailwind components;
|
|
4
4
|
@tailwind utilities;
|
|
5
5
|
|
|
6
|
+
:root {
|
|
7
|
+
font-family: system-ui, Avenir, Helvetica, Arial, sans-serif;
|
|
8
|
+
line-height: 1.5;
|
|
9
|
+
font-weight: 400;
|
|
10
|
+
|
|
11
|
+
color-scheme: light dark;
|
|
12
|
+
color: rgba(255, 255, 255, 0.87);
|
|
13
|
+
background-color: #242424;
|
|
14
|
+
|
|
15
|
+
font-synthesis: none;
|
|
16
|
+
text-rendering: optimizeLegibility;
|
|
17
|
+
-webkit-font-smoothing: antialiased;
|
|
18
|
+
-moz-osx-font-smoothing: grayscale;
|
|
19
|
+
--radius: 0.625rem;
|
|
20
|
+
--background: oklch(1 0 0);
|
|
21
|
+
--foreground: oklch(0.145 0 0);
|
|
22
|
+
--card: oklch(1 0 0);
|
|
23
|
+
--card-foreground: oklch(0.145 0 0);
|
|
24
|
+
--popover: oklch(1 0 0);
|
|
25
|
+
--popover-foreground: oklch(0.145 0 0);
|
|
26
|
+
--primary: oklch(0.205 0 0);
|
|
27
|
+
--primary-foreground: oklch(0.985 0 0);
|
|
28
|
+
--secondary: oklch(0.97 0 0);
|
|
29
|
+
--secondary-foreground: oklch(0.205 0 0);
|
|
30
|
+
--muted: oklch(0.97 0 0);
|
|
31
|
+
--muted-foreground: oklch(0.556 0 0);
|
|
32
|
+
--accent: oklch(0.97 0 0);
|
|
33
|
+
--accent-foreground: oklch(0.205 0 0);
|
|
34
|
+
--destructive: oklch(0.577 0.245 27.325);
|
|
35
|
+
--border: oklch(0.922 0 0);
|
|
36
|
+
--input: oklch(0.922 0 0);
|
|
37
|
+
--ring: oklch(0.708 0 0);
|
|
38
|
+
--chart-1: oklch(0.646 0.222 41.116);
|
|
39
|
+
--chart-2: oklch(0.6 0.118 184.704);
|
|
40
|
+
--chart-3: oklch(0.398 0.07 227.392);
|
|
41
|
+
--chart-4: oklch(0.828 0.189 84.429);
|
|
42
|
+
--chart-5: oklch(0.769 0.188 70.08);
|
|
43
|
+
--sidebar: oklch(0.985 0 0);
|
|
44
|
+
--sidebar-foreground: oklch(0.145 0 0);
|
|
45
|
+
--sidebar-primary: oklch(0.205 0 0);
|
|
46
|
+
--sidebar-primary-foreground: oklch(0.985 0 0);
|
|
47
|
+
--sidebar-accent: oklch(0.97 0 0);
|
|
48
|
+
--sidebar-accent-foreground: oklch(0.205 0 0);
|
|
49
|
+
--sidebar-border: oklch(0.922 0 0);
|
|
50
|
+
--sidebar-ring: oklch(0.708 0 0);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
a {
|
|
54
|
+
font-weight: 500;
|
|
55
|
+
color: #646cff;
|
|
56
|
+
text-decoration: inherit;
|
|
57
|
+
}
|
|
58
|
+
a:hover {
|
|
59
|
+
color: #535bf2;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
body {
|
|
63
|
+
margin: 0;
|
|
64
|
+
display: flex;
|
|
65
|
+
place-items: center;
|
|
66
|
+
min-width: 320px;
|
|
67
|
+
min-height: 100vh;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
@media (prefers-color-scheme: light) {
|
|
73
|
+
:root {
|
|
74
|
+
color: #213547;
|
|
75
|
+
background-color: #ffffff;
|
|
76
|
+
}
|
|
77
|
+
a:hover {
|
|
78
|
+
color: #747bff;
|
|
79
|
+
}
|
|
80
|
+
button {
|
|
81
|
+
background-color: #f9f9f9;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
@theme inline {
|
|
86
|
+
--radius-sm: calc(var(--radius) - 4px);
|
|
87
|
+
--radius-md: calc(var(--radius) - 2px);
|
|
88
|
+
--radius-lg: var(--radius);
|
|
89
|
+
--radius-xl: calc(var(--radius) + 4px);
|
|
90
|
+
--color-background: var(--background);
|
|
91
|
+
--color-foreground: var(--foreground);
|
|
92
|
+
--color-card: var(--card);
|
|
93
|
+
--color-card-foreground: var(--card-foreground);
|
|
94
|
+
--color-popover: var(--popover);
|
|
95
|
+
--color-popover-foreground: var(--popover-foreground);
|
|
96
|
+
--color-primary: var(--primary);
|
|
97
|
+
--color-primary-foreground: var(--primary-foreground);
|
|
98
|
+
--color-secondary: var(--secondary);
|
|
99
|
+
--color-secondary-foreground: var(--secondary-foreground);
|
|
100
|
+
--color-muted: var(--muted);
|
|
101
|
+
--color-muted-foreground: var(--muted-foreground);
|
|
102
|
+
--color-accent: var(--accent);
|
|
103
|
+
--color-accent-foreground: var(--accent-foreground);
|
|
104
|
+
--color-destructive: var(--destructive);
|
|
105
|
+
--color-border: var(--border);
|
|
106
|
+
--color-input: var(--input);
|
|
107
|
+
--color-ring: var(--ring);
|
|
108
|
+
--color-chart-1: var(--chart-1);
|
|
109
|
+
--color-chart-2: var(--chart-2);
|
|
110
|
+
--color-chart-3: var(--chart-3);
|
|
111
|
+
--color-chart-4: var(--chart-4);
|
|
112
|
+
--color-chart-5: var(--chart-5);
|
|
113
|
+
--color-sidebar: var(--sidebar);
|
|
114
|
+
--color-sidebar-foreground: var(--sidebar-foreground);
|
|
115
|
+
--color-sidebar-primary: var(--sidebar-primary);
|
|
116
|
+
--color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
|
|
117
|
+
--color-sidebar-accent: var(--sidebar-accent);
|
|
118
|
+
--color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
|
|
119
|
+
--color-sidebar-border: var(--sidebar-border);
|
|
120
|
+
--color-sidebar-ring: var(--sidebar-ring);
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
.dark {
|
|
124
|
+
--background: oklch(0.145 0 0);
|
|
125
|
+
--foreground: oklch(0.985 0 0);
|
|
126
|
+
--card: oklch(0.205 0 0);
|
|
127
|
+
--card-foreground: oklch(0.985 0 0);
|
|
128
|
+
--popover: oklch(0.205 0 0);
|
|
129
|
+
--popover-foreground: oklch(0.985 0 0);
|
|
130
|
+
--primary: oklch(0.922 0 0);
|
|
131
|
+
--primary-foreground: oklch(0.205 0 0);
|
|
132
|
+
--secondary: oklch(0.269 0 0);
|
|
133
|
+
--secondary-foreground: oklch(0.985 0 0);
|
|
134
|
+
--muted: oklch(0.269 0 0);
|
|
135
|
+
--muted-foreground: oklch(0.708 0 0);
|
|
136
|
+
--accent: oklch(0.269 0 0);
|
|
137
|
+
--accent-foreground: oklch(0.985 0 0);
|
|
138
|
+
--destructive: oklch(0.704 0.191 22.216);
|
|
139
|
+
--border: oklch(1 0 0 / 10%);
|
|
140
|
+
--input: oklch(1 0 0 / 15%);
|
|
141
|
+
--ring: oklch(0.556 0 0);
|
|
142
|
+
--chart-1: oklch(0.488 0.243 264.376);
|
|
143
|
+
--chart-2: oklch(0.696 0.17 162.48);
|
|
144
|
+
--chart-3: oklch(0.769 0.188 70.08);
|
|
145
|
+
--chart-4: oklch(0.627 0.265 303.9);
|
|
146
|
+
--chart-5: oklch(0.645 0.246 16.439);
|
|
147
|
+
--sidebar: oklch(0.205 0 0);
|
|
148
|
+
--sidebar-foreground: oklch(0.985 0 0);
|
|
149
|
+
--sidebar-primary: oklch(0.488 0.243 264.376);
|
|
150
|
+
--sidebar-primary-foreground: oklch(0.985 0 0);
|
|
151
|
+
--sidebar-accent: oklch(0.269 0 0);
|
|
152
|
+
--sidebar-accent-foreground: oklch(0.985 0 0);
|
|
153
|
+
--sidebar-border: oklch(1 0 0 / 10%);
|
|
154
|
+
--sidebar-ring: oklch(0.556 0 0);
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
|
|
6
158
|
/* Component-specific styles - scoped to your editor */
|
|
7
159
|
.lexical-text-editor {
|
|
8
160
|
/* Custom scrollbar styles - scoped to editor only */
|