@thangph2146/lexical-editor 0.0.11 → 0.0.13

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 (46) hide show
  1. package/README.md +2 -1
  2. package/dist/editor-x/editor.cjs +280 -20
  3. package/dist/editor-x/editor.cjs.map +1 -1
  4. package/dist/editor-x/editor.css +27 -4
  5. package/dist/editor-x/editor.css.map +1 -1
  6. package/dist/editor-x/editor.js +281 -21
  7. package/dist/editor-x/editor.js.map +1 -1
  8. package/dist/index.cjs +292 -23
  9. package/dist/index.cjs.map +1 -1
  10. package/dist/index.css +27 -4
  11. package/dist/index.css.map +1 -1
  12. package/dist/index.d.cts +26 -1
  13. package/dist/index.d.ts +26 -1
  14. package/dist/index.js +293 -24
  15. package/dist/index.js.map +1 -1
  16. package/package.json +1 -1
  17. package/src/components/lexical-editor.tsx +19 -6
  18. package/src/context/uploads-context.tsx +1 -0
  19. package/src/editor-ui/content-editable.tsx +18 -2
  20. package/src/editor-x/nodes.ts +2 -0
  21. package/src/nodes/download-link-node.tsx +118 -0
  22. package/src/plugins/floating-link-editor-plugin.tsx +338 -91
  23. package/src/themes/core/_tables.scss +0 -1
  24. package/src/themes/plugins/_floating-link-editor.scss +28 -2
  25. package/src/themes/ui-components/_button.scss +1 -1
  26. package/src/themes/ui-components/_flex.scss +1 -0
  27. package/src/ui/button-group.tsx +10 -10
  28. package/src/ui/button.tsx +38 -38
  29. package/src/ui/collapsible.tsx +67 -67
  30. package/src/ui/command.tsx +48 -48
  31. package/src/ui/dialog.tsx +146 -146
  32. package/src/ui/flex.tsx +45 -45
  33. package/src/ui/input.tsx +20 -20
  34. package/src/ui/label.tsx +20 -20
  35. package/src/ui/number-input.tsx +104 -104
  36. package/src/ui/popover.tsx +128 -128
  37. package/src/ui/scroll-area.tsx +17 -17
  38. package/src/ui/select.tsx +171 -171
  39. package/src/ui/separator.tsx +20 -20
  40. package/src/ui/slider.tsx +14 -14
  41. package/src/ui/slot.tsx +3 -3
  42. package/src/ui/tabs.tsx +87 -87
  43. package/src/ui/toggle-group.tsx +109 -109
  44. package/src/ui/toggle.tsx +28 -28
  45. package/src/ui/tooltip.tsx +28 -28
  46. package/src/ui/typography.tsx +44 -44
package/dist/index.css CHANGED
@@ -134,6 +134,7 @@
134
134
  }
135
135
  .editor-shrink-0 {
136
136
  flex-shrink: 0;
137
+ gap: 8px !important;
137
138
  }
138
139
  .editor-flex-grow {
139
140
  flex-grow: 1;
@@ -1025,7 +1026,7 @@
1025
1026
  position: relative;
1026
1027
  padding: 8px 16px;
1027
1028
  box-sizing: border-box;
1028
- box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05) !important;
1029
+ box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06) !important;
1029
1030
  }
1030
1031
  .editor-btn:hover:not(:disabled):not([data-state=on]):not([data-state=active]) {
1031
1032
  transform: translateY(-1px);
@@ -2165,15 +2166,38 @@
2165
2166
  display: flex;
2166
2167
  align-items: center;
2167
2168
  gap: 4px;
2168
- padding: 4px;
2169
+ padding: 8px;
2170
+ width: 100%;
2171
+ }
2172
+ .editor-floating-link-editor__library {
2173
+ display: flex;
2174
+ flex-direction: column;
2175
+ gap: 4px;
2176
+ width: 100%;
2177
+ max-height: 220px;
2178
+ overflow: auto;
2179
+ border-top: 1px solid var(--border);
2180
+ padding: 8px;
2181
+ }
2182
+ .editor-floating-link-editor__library-item {
2169
2183
  width: 100%;
2184
+ text-align: left;
2185
+ background: transparent;
2186
+ border: 0;
2187
+ color: var(--foreground);
2188
+ padding: 4px;
2189
+ border-radius: calc(var(--radius, 8px) - 2px);
2190
+ cursor: pointer;
2191
+ }
2192
+ .editor-floating-link-editor__library-item:hover {
2193
+ background: var(--muted);
2170
2194
  }
2171
2195
  .editor-floating-link-editor__view-container {
2172
2196
  display: flex;
2173
2197
  align-items: center;
2174
2198
  justify-content: space-between;
2175
2199
  gap: 8px;
2176
- padding: 4px 4px 4px 12px;
2200
+ padding: 4px 4px 4px 12px !important;
2177
2201
  width: 100%;
2178
2202
  }
2179
2203
  .editor-floating-link-editor__link {
@@ -3003,7 +3027,6 @@
3003
3027
  .lexical-editor-root .editor-table {
3004
3028
  border-collapse: collapse;
3005
3029
  border-spacing: 0;
3006
- width: 100%;
3007
3030
  table-layout: fixed;
3008
3031
  margin: 16px 0;
3009
3032
  border-radius: var(--radius, 8px);