@thangph2146/lexical-editor 0.0.11 → 0.0.12

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 (45) 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 -3
  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 -3
  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/plugins/_floating-link-editor.scss +28 -2
  24. package/src/themes/ui-components/_button.scss +1 -1
  25. package/src/themes/ui-components/_flex.scss +1 -0
  26. package/src/ui/button-group.tsx +10 -10
  27. package/src/ui/button.tsx +38 -38
  28. package/src/ui/collapsible.tsx +67 -67
  29. package/src/ui/command.tsx +48 -48
  30. package/src/ui/dialog.tsx +146 -146
  31. package/src/ui/flex.tsx +45 -45
  32. package/src/ui/input.tsx +20 -20
  33. package/src/ui/label.tsx +20 -20
  34. package/src/ui/number-input.tsx +104 -104
  35. package/src/ui/popover.tsx +128 -128
  36. package/src/ui/scroll-area.tsx +17 -17
  37. package/src/ui/select.tsx +171 -171
  38. package/src/ui/separator.tsx +20 -20
  39. package/src/ui/slider.tsx +14 -14
  40. package/src/ui/slot.tsx +3 -3
  41. package/src/ui/tabs.tsx +87 -87
  42. package/src/ui/toggle-group.tsx +109 -109
  43. package/src/ui/toggle.tsx +28 -28
  44. package/src/ui/tooltip.tsx +28 -28
  45. package/src/ui/typography.tsx +44 -44
@@ -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;
2169
2170
  width: 100%;
2170
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 {
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);
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 {