@meta-1/editor 1.0.5 → 1.0.6

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": "@meta-1/editor",
3
- "version": "1.0.5",
3
+ "version": "1.0.6",
4
4
  "keywords": [
5
5
  "meta",
6
6
  "tailwindcss",
@@ -1,5 +1,9 @@
1
1
  @reference "@meta-1/design/theme.css";
2
2
 
3
+ .tiptap.ProseMirror[data-dragging="true"] .ProseMirror-selectednode .tiptap-image .tiptap-image-container {
4
+ outline: none !important;
5
+ }
6
+
3
7
  .tiptap.ProseMirror .ProseMirror-selectednode .tiptap-image .tiptap-image-container {
4
8
  @apply rounded-sm;
5
9
  outline: 0.125rem solid transparent;
@@ -13,6 +13,10 @@
13
13
  @apply outline-indigo-500;
14
14
  }
15
15
 
16
+ .tiptap.ProseMirror[data-dragging="true"] img:not([data-type="emoji"] img).ProseMirror-selectednode {
17
+ outline: none !important;
18
+ }
19
+
16
20
  /* Thread image handling */
17
21
  .tiptap.ProseMirror .tiptap-thread:has(> img) {
18
22
  @apply my-8;
@@ -316,11 +316,15 @@ export const DragContextMenu: React.FC<DragContextMenuProps> = ({
316
316
  const onElementDragStart = useCallback(() => {
317
317
  if (!editor) return;
318
318
  editor.commands.setIsDragging(true);
319
+ // Add data attribute to hide selected outline in drag ghost
320
+ editor.view.dom.setAttribute("data-dragging", "true");
319
321
  }, [editor]);
320
322
 
321
323
  const onElementDragEnd = useCallback(() => {
322
324
  if (!editor) return;
323
325
  editor.commands.setIsDragging(false);
326
+ // Remove data attribute
327
+ editor.view.dom.removeAttribute("data-dragging");
324
328
 
325
329
  setTimeout(() => {
326
330
  editor.view.dom.blur();