@meta-1/editor 1.0.4 → 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.
Files changed (43) hide show
  1. package/package.json +1 -1
  2. package/src/components/tiptap-node/blockquote-node/blockquote-node.css +1 -1
  3. package/src/components/tiptap-node/code-block-node/code-block-node.css +1 -1
  4. package/src/components/tiptap-node/heading-node/heading-node.css +1 -1
  5. package/src/components/tiptap-node/horizontal-rule-node/horizontal-rule-node.css +1 -1
  6. package/src/components/tiptap-node/image-node/image-node-view.css +5 -1
  7. package/src/components/tiptap-node/image-node/image-node.css +5 -1
  8. package/src/components/tiptap-node/image-upload-node/image-upload-node.css +1 -1
  9. package/src/components/tiptap-node/list-node/list-node.css +1 -1
  10. package/src/components/tiptap-node/paragraph-node/paragraph-node.css +1 -1
  11. package/src/components/tiptap-node/table-node/styles/prosemirror-table.css +1 -1
  12. package/src/components/tiptap-node/table-node/styles/table-node.css +1 -1
  13. package/src/components/tiptap-node/table-node/ui/table-cell-handle-menu/table-cell-handle-menu.css +1 -1
  14. package/src/components/tiptap-node/table-node/ui/table-extend-row-column-button/table-extend-row-column-button.css +1 -1
  15. package/src/components/tiptap-node/table-node/ui/table-handle-menu/table-handle-menu.css +1 -1
  16. package/src/components/tiptap-node/table-node/ui/table-trigger-button/table-grid-selector.css +1 -1
  17. package/src/components/tiptap-ui/color-highlight-button/color-highlight-button.css +1 -1
  18. package/src/components/tiptap-ui/color-text-button/color-text-button.css +1 -1
  19. package/src/components/tiptap-ui/color-text-popover/color-text-popover.css +1 -1
  20. package/src/components/tiptap-ui/drag-context-menu/drag-context-menu.css +1 -1
  21. package/src/components/tiptap-ui/drag-context-menu/drag-context-menu.tsx +4 -0
  22. package/src/components/tiptap-ui/emoji-menu/emoji-menu.css +1 -1
  23. package/src/components/tiptap-ui/slash-dropdown-menu/slash-dropdown-menu.css +1 -1
  24. package/src/components/tiptap-ui-primitive/avatar/avatar.css +1 -1
  25. package/src/components/tiptap-ui-primitive/badge/badge-colors.css +1 -1
  26. package/src/components/tiptap-ui-primitive/badge/badge-group.css +1 -1
  27. package/src/components/tiptap-ui-primitive/badge/badge.css +1 -1
  28. package/src/components/tiptap-ui-primitive/button/button-colors.css +1 -1
  29. package/src/components/tiptap-ui-primitive/button/button-group.css +1 -1
  30. package/src/components/tiptap-ui-primitive/button/button.css +1 -1
  31. package/src/components/tiptap-ui-primitive/card/card.css +1 -1
  32. package/src/components/tiptap-ui-primitive/combobox/combobox.css +1 -1
  33. package/src/components/tiptap-ui-primitive/dropdown-menu/dropdown-menu.css +1 -1
  34. package/src/components/tiptap-ui-primitive/input/input.css +1 -1
  35. package/src/components/tiptap-ui-primitive/label/label.css +1 -1
  36. package/src/components/tiptap-ui-primitive/menu/menu.css +1 -1
  37. package/src/components/tiptap-ui-primitive/popover/popover.css +1 -1
  38. package/src/components/tiptap-ui-primitive/separator/separator.css +1 -1
  39. package/src/components/tiptap-ui-primitive/sidebar/sidebar.css +1 -1
  40. package/src/components/tiptap-ui-primitive/toolbar/toolbar.css +1 -1
  41. package/src/components/tiptap-ui-primitive/tooltip/tooltip.css +1 -1
  42. package/src/content/style.css +1 -1
  43. package/src/styles/variables.css +1 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@meta-1/editor",
3
- "version": "1.0.4",
3
+ "version": "1.0.6",
4
4
  "keywords": [
5
5
  "meta",
6
6
  "tailwindcss",
@@ -1,4 +1,4 @@
1
- @import "tailwindcss";
1
+ @reference "@meta-1/design/theme.css";
2
2
 
3
3
  /* =====================
4
4
  BLOCKQUOTE
@@ -1,4 +1,4 @@
1
- @import "tailwindcss";
1
+ @reference "@meta-1/design/theme.css";
2
2
 
3
3
  /* =====================
4
4
  CODE FORMATTING
@@ -1,4 +1,4 @@
1
- @import "tailwindcss";
1
+ @reference "@meta-1/design/theme.css";
2
2
 
3
3
  .tiptap.ProseMirror {
4
4
  h1,
@@ -1,4 +1,4 @@
1
- @import "tailwindcss";
1
+ @reference "@meta-1/design/theme.css";
2
2
 
3
3
  /* =====================
4
4
  HORIZONTAL RULE
@@ -1,4 +1,8 @@
1
- @import "tailwindcss";
1
+ @reference "@meta-1/design/theme.css";
2
+
3
+ .tiptap.ProseMirror[data-dragging="true"] .ProseMirror-selectednode .tiptap-image .tiptap-image-container {
4
+ outline: none !important;
5
+ }
2
6
 
3
7
  .tiptap.ProseMirror .ProseMirror-selectednode .tiptap-image .tiptap-image-container {
4
8
  @apply rounded-sm;
@@ -1,4 +1,4 @@
1
- @import "tailwindcss";
1
+ @reference "@meta-1/design/theme.css";
2
2
 
3
3
  .tiptap.ProseMirror img {
4
4
  @apply max-w-full h-auto block;
@@ -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;
@@ -1,4 +1,4 @@
1
- @import "tailwindcss";
1
+ @reference "@meta-1/design/theme.css";
2
2
 
3
3
  .tiptap-image-upload input[type="file"] {
4
4
  @apply hidden;
@@ -1,4 +1,4 @@
1
- @import "tailwindcss";
1
+ @reference "@meta-1/design/theme.css";
2
2
 
3
3
  /* =====================
4
4
  LISTS
@@ -1,4 +1,4 @@
1
- @import "tailwindcss";
1
+ @reference "@meta-1/design/theme.css";
2
2
 
3
3
  /* Ensure each top-level node has relative positioning
4
4
  so absolutely positioned placeholders work correctly */
@@ -1,4 +1,4 @@
1
- @import "tailwindcss";
1
+ @reference "@meta-1/design/theme.css";
2
2
 
3
3
  .ProseMirror .tableWrapper {
4
4
  @apply overflow-x-auto;
@@ -1,4 +1,4 @@
1
- @import "tailwindcss";
1
+ @reference "@meta-1/design/theme.css";
2
2
 
3
3
  .tiptap [data-content-type="table"] .tableWrapper {
4
4
  @apply overflow-y-hidden p-4;
@@ -1,4 +1,4 @@
1
- @import "tailwindcss";
1
+ @reference "@meta-1/design/theme.css";
2
2
 
3
3
  .expandable-menu-button {
4
4
  @apply absolute top-1/2 -translate-y-1/2 w-4 h-4 bg-transparent rounded-full cursor-pointer flex items-center justify-center pointer-events-auto;
@@ -1,4 +1,4 @@
1
- @import "tailwindcss";
1
+ @reference "@meta-1/design/theme.css";
2
2
 
3
3
  .tiptap-table-extend-row-column-button {
4
4
  @apply border-0 flex items-center justify-center bg-gray-100 dark:bg-gray-800 rounded-lg;
@@ -1,4 +1,4 @@
1
- @import "tailwindcss";
1
+ @reference "@meta-1/design/theme.css";
2
2
 
3
3
  .tiptap-table-handle-menu {
4
4
  @apply border-0 flex items-center justify-center bg-gray-100 dark:bg-gray-800 rounded-lg cursor-grab;
@@ -1,4 +1,4 @@
1
- @import "tailwindcss";
1
+ @reference "@meta-1/design/theme.css";
2
2
 
3
3
  /* Grid container */
4
4
  .tiptap-table-grid {
@@ -1,4 +1,4 @@
1
- @import "tailwindcss";
1
+ @reference "@meta-1/design/theme.css";
2
2
 
3
3
  .tiptap-button-highlight {
4
4
  @apply relative rounded-full;
@@ -1,4 +1,4 @@
1
- @import "tailwindcss";
1
+ @reference "@meta-1/design/theme.css";
2
2
 
3
3
  .tiptap-button-color-text {
4
4
  @apply flex items-center justify-center relative rounded-full;
@@ -1,4 +1,4 @@
1
- @import "tailwindcss";
1
+ @reference "@meta-1/design/theme.css";
2
2
 
3
3
  .tiptap-button-color-text-popover {
4
4
  @apply relative flex items-center justify-center rounded-full;
@@ -1,4 +1,4 @@
1
- @import "tailwindcss";
1
+ @reference "@meta-1/design/theme.css";
2
2
 
3
3
  .drag-handle {
4
4
  transition-property: top;
@@ -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();
@@ -1,4 +1,4 @@
1
- @import "tailwindcss";
1
+ @reference "@meta-1/design/theme.css";
2
2
 
3
3
  :root {
4
4
  --emoji-input-bg-color: var(--white);
@@ -1,4 +1,4 @@
1
- @import "tailwindcss";
1
+ @reference "@meta-1/design/theme.css";
2
2
 
3
3
  span.tiptap-slash-decoration {
4
4
  @apply bg-gray-100 rounded-sm;
@@ -1,4 +1,4 @@
1
- @import "tailwindcss";
1
+ @reference "@meta-1/design/theme.css";
2
2
 
3
3
  .tiptap-avatar {
4
4
  @apply relative inline-flex items-center justify-center align-middle overflow-hidden select-none flex-shrink-0;
@@ -1,4 +1,4 @@
1
- @import "tailwindcss";
1
+ @reference "@meta-1/design/theme.css";
2
2
 
3
3
  /* Default variant - White background */
4
4
  .tiptap-badge {
@@ -1,4 +1,4 @@
1
- @import "tailwindcss";
1
+ @reference "@meta-1/design/theme.css";
2
2
 
3
3
  .tiptap-badge-group {
4
4
  align-items: center;
@@ -1,4 +1,4 @@
1
- @import "tailwindcss";
1
+ @reference "@meta-1/design/theme.css";
2
2
 
3
3
  .tiptap-badge {
4
4
  @apply text-[0.625rem] font-bold leading-[1.15] h-5 min-w-[1.25rem] px-1 flex items-center justify-center border border-solid rounded-md;
@@ -1,4 +1,4 @@
1
- @import "tailwindcss";
1
+ @reference "@meta-1/design/theme.css";
2
2
 
3
3
  /*
4
4
  * This file is retained for compatibility but the variables defined here are not used.
@@ -1,4 +1,4 @@
1
- @import "tailwindcss";
1
+ @reference "@meta-1/design/theme.css";
2
2
 
3
3
  .tiptap-button-group {
4
4
  @apply relative flex align-middle;
@@ -1,4 +1,4 @@
1
- @import "tailwindcss";
1
+ @reference "@meta-1/design/theme.css";
2
2
 
3
3
  .tiptap-button {
4
4
  @apply text-sm font-medium h-8 min-w-8 border-0 p-2 gap-1 flex items-center justify-center rounded-lg;
@@ -1,4 +1,4 @@
1
- @import "tailwindcss";
1
+ @reference "@meta-1/design/theme.css";
2
2
 
3
3
  .tiptap-card {
4
4
  @apply rounded-xl shadow-lg bg-white border border-gray-200 flex flex-col outline-none items-center relative min-w-0 break-words;
@@ -1,4 +1,4 @@
1
- @import "tailwindcss";
1
+ @reference "@meta-1/design/theme.css";
2
2
 
3
3
  .tiptap-combobox-list {
4
4
  @apply h-full rounded-xl border border-gray-200 bg-white text-gray-600 p-1.5 shadow-lg outline-none max-w-64 overflow-y-auto;
@@ -1,4 +1,4 @@
1
- @import "tailwindcss";
1
+ @reference "@meta-1/design/theme.css";
2
2
 
3
3
  .tiptap-dropdown-menu {
4
4
  @apply z-50 outline-none;
@@ -1,4 +1,4 @@
1
- @import "tailwindcss";
1
+ @reference "@meta-1/design/theme.css";
2
2
 
3
3
  .tiptap-input {
4
4
  @apply block w-full h-8 text-sm font-normal rounded-md bg-transparent appearance-none outline-none;
@@ -1,4 +1,4 @@
1
- @import "tailwindcss";
1
+ @reference "@meta-1/design/theme.css";
2
2
 
3
3
  .tiptap-label {
4
4
  @apply mt-3 mx-2 mb-1 text-xs font-semibold leading-normal capitalize text-gray-800;
@@ -1,4 +1,4 @@
1
- @import "tailwindcss";
1
+ @reference "@meta-1/design/theme.css";
2
2
 
3
3
  .tiptap-menu-content {
4
4
  @apply z-50 flex flex-col h-full outline-none;
@@ -1,4 +1,4 @@
1
- @import "tailwindcss";
1
+ @reference "@meta-1/design/theme.css";
2
2
 
3
3
  .tiptap-popover {
4
4
  @apply z-50 outline-none;
@@ -1,4 +1,4 @@
1
- @import "tailwindcss";
1
+ @reference "@meta-1/design/theme.css";
2
2
 
3
3
  .tiptap-separator {
4
4
  @apply flex-shrink-0 bg-gray-200;
@@ -1,4 +1,4 @@
1
- @import "tailwindcss";
1
+ @reference "@meta-1/design/theme.css";
2
2
 
3
3
  .sidebar {
4
4
  @apply hidden md:block;
@@ -1,4 +1,4 @@
1
- @import "tailwindcss";
1
+ @reference "@meta-1/design/theme.css";
2
2
 
3
3
  .tiptap-toolbar {
4
4
  @apply flex items-center gap-1;
@@ -1,4 +1,4 @@
1
- @import "tailwindcss";
1
+ @reference "@meta-1/design/theme.css";
2
2
 
3
3
  .tiptap-tooltip {
4
4
  @apply z-[200] overflow-hidden rounded-md bg-gray-900 px-2 py-1.5 text-xs font-medium text-white text-center;
@@ -1,4 +1,4 @@
1
- @import "tailwindcss";
1
+ @reference "@meta-1/design/theme.css";
2
2
 
3
3
  .meta1-content .tiptap [data-content-type="table"] .tableWrapper {
4
4
  @apply p-0;
@@ -1,3 +1,4 @@
1
+ @reference "@meta-1/design/theme.css";
1
2
  :root {
2
3
  /* Text colors - Light mode */
3
4
  --tt-color-text: hsl(0, 0%, 20%);