@fileverse-dev/ddoc 3.2.2-sg-5 → 3.2.3-linkcaption-1

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
@@ -2,7 +2,7 @@
2
2
  "name": "@fileverse-dev/ddoc",
3
3
  "private": false,
4
4
  "description": "DDoc",
5
- "version": "3.2.2-sg-5",
5
+ "version": "3.2.3-linkcaption-1",
6
6
  "main": "dist/index.es.js",
7
7
  "module": "dist/index.es.js",
8
8
  "exports": {
@@ -154,4 +154,4 @@
154
154
  "typescript": "^5.2.2",
155
155
  "vite": "^5.0.0"
156
156
  }
157
- }
157
+ }
@@ -1,17 +0,0 @@
1
- import { SuggestionDraftFloatingCardProps } from './types';
2
-
3
- /**
4
- * SuggestionDraftFloatingCard
5
- *
6
- * Shown while a viewer is composing a suggestion (in suggestion mode).
7
- * Uses the same one-line diff format as the submitted thread card
8
- * (Add: "X" / Delete: "X" / Replace: "X" with "Y") plus a Submit action
9
- * and a Discard (X) button.
10
- *
11
- * When the viewer hasn't joined yet (no username / wallet), the card
12
- * renders FloatingAuthPrompt inside — same pattern as the inline-comment
13
- * draft card. The first keystroke that triggered this card is preserved
14
- * as the draft's first character; once the viewer joins, the card
15
- * transitions to the normal diff/Submit UI without losing what they typed.
16
- */
17
- export declare const SuggestionDraftFloatingCard: ({ card, isHidden, registerCardNode, }: SuggestionDraftFloatingCardProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,15 +0,0 @@
1
- import { ThreadFloatingCardProps } from './types';
2
-
3
- /**
4
- * SuggestionThreadFloatingCard
5
- *
6
- * Shown in place of the generic ThreadFloatingCard for submitted suggestions
7
- * (comments with `isSuggestion: true`). Renders the Figma-specified layout:
8
- * author + timestamp header, Accept/Reject (owner) or Withdraw (author)
9
- * actions, a one-line diff summary (Add/Delete/Replace), and a reply input.
10
- *
11
- * Renders from the underlying IComment — the same source ThreadFloatingCard
12
- * uses — so once a draft is submitted, nothing else in the pipeline needs
13
- * to change to show the suggestion here.
14
- */
15
- export declare const SuggestionThreadFloatingCard: ({ thread, comment, isHidden, registerCardNode, }: ThreadFloatingCardProps) => import("react/jsx-runtime").JSX.Element | null;
@@ -1,43 +0,0 @@
1
- import { Extension } from '@tiptap/core';
2
- import { PluginKey } from '@tiptap/pm/state';
3
- import { SuggestionType } from '../../types';
4
- import { CommentAnchor } from '../comment/comment-decoration-plugin';
5
-
6
- import * as Y from 'yjs';
7
- export interface SuggestionReadyData {
8
- suggestionId: string;
9
- anchorFrom: Y.RelativePosition;
10
- anchorTo: Y.RelativePosition;
11
- suggestionType: SuggestionType;
12
- originalContent: string;
13
- suggestedContent: string;
14
- }
15
- export interface SuggestionTrackingOptions {
16
- /** Returns true when the editor is in suggestion mode. */
17
- getIsSuggestionMode: () => boolean;
18
- /** Viewer types text with a collapsed cursor (Add gesture). */
19
- onTextInput: (text: string) => void;
20
- /** Viewer types text over a non-empty selection (Replace gesture). */
21
- onReplaceTyping: (from: number, to: number, text: string) => void;
22
- /** Viewer presses Backspace/Delete with a non-empty selection. */
23
- onDeleteSelection: (from: number, to: number) => void;
24
- /**
25
- * Viewer presses Backspace/Delete with a collapsed cursor.
26
- * The consumer decides whether this should shrink an active draft or create
27
- * a new one-character delete suggestion at the caret.
28
- */
29
- onDeleteAtCursor: (direction: 'backward' | 'forward') => void;
30
- /**
31
- * Browser attempted to delete a concrete range without an explicit
32
- * user selection (for example, a beforeinput/IME path that bypassed
33
- * keydown). Lets the consumer preserve "undo active draft" semantics
34
- * while still creating delete drafts for normal text.
35
- */
36
- onDeleteRangeWithoutSelection: (from: number, to: number) => void;
37
- /** Viewer presses Cmd+Z (or Ctrl+Z). Shrinks the active draft by one keystroke. */
38
- onUndo: () => void;
39
- onLiveSuggestion?: ((anchor: CommentAnchor) => void) | null;
40
- onSuggestionReady?: ((data: SuggestionReadyData) => void) | null;
41
- }
42
- export declare const suggestionTrackingPluginKey: PluginKey<null>;
43
- export declare const SuggestionTrackingExtension: Extension<SuggestionTrackingOptions, any>;