@fileverse-dev/ddoc 4.1.9 → 4.1.11
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/README.md +0 -5
- package/dist/{index-nuyyRI2j.mjs → index-BhAjJb8w.mjs} +19399 -19198
- package/dist/{index-DRxp2R0b.mjs → index-rpz9D-nF.mjs} +1 -1
- package/dist/index.es.js +1 -1
- package/dist/{markdown-source-pane-CJNood8d.mjs → markdown-source-pane-DTszGHF9.mjs} +2 -2
- package/dist/package/components/inline-comment/mobile-inline-comment-sheet.d.ts +2 -1
- package/dist/package/components/inline-comment/use-auto-submit-countdown.d.ts +10 -0
- package/dist/package/components/inline-comment/use-comment-draft-auto-submit-countdown.d.ts +11 -0
- package/dist/package/components/inline-comment/use-suggestion-auto-submit-countdown.d.ts +9 -0
- package/dist/package/extensions/comment/comment-decoration-plugin.d.ts +1 -0
- package/dist/package/extensions/suggestion/suggestion-tracking-extension.d.ts +2 -0
- package/dist/package/stores/comment-store.d.ts +7 -0
- package/dist/{split-view-toolbar-DQ9aZxVZ.mjs → split-view-toolbar-Bpk4iUtd.mjs} +2 -2
- package/dist/style.css +1 -1
- package/package.json +2 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { k as Ql, b as Zl, s as eh } from "./index-
|
|
1
|
+
import { k as Ql, b as Zl, s as eh } from "./index-BhAjJb8w.mjs";
|
|
2
2
|
let An = [], Xr = [];
|
|
3
3
|
(() => {
|
|
4
4
|
let s = "lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3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,5,gx7k,2o,3k,6o".split(",").map((e) => e ? parseInt(e, 36) : 1);
|
package/dist/index.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { D as e, a as o, E as d, P as t, d as r, h as i, m as n, c as E, u as l } from "./index-
|
|
1
|
+
import { D as e, a as o, E as d, P as t, d as r, h as i, m as n, c as E, u as l } from "./index-BhAjJb8w.mjs";
|
|
2
2
|
export {
|
|
3
3
|
e as DdocEditor,
|
|
4
4
|
o as DdocExportModal,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
var Vr = Object.defineProperty;
|
|
2
2
|
var Wr = (t, e, O) => e in t ? Vr(t, e, { enumerable: !0, configurable: !0, writable: !0, value: O }) : t[e] = O;
|
|
3
3
|
var gt = (t, e, O) => Wr(t, typeof e != "symbol" ? e + "" : e, O);
|
|
4
|
-
import { j as Cr } from "./index-
|
|
4
|
+
import { j as Cr } from "./index-BhAjJb8w.mjs";
|
|
5
5
|
import { useRef as pe, useEffect as St } from "react";
|
|
6
|
-
import { s as y, A as pO, T as dO, a as Gr, S as et, b as Lr, P as fO, E as j, i as QO, c as _, D as le, k as tt, F as Ar, M as Pt, W as Er, R as Ur, d as mO, N as oe, e as V, f as Mr, g as Ot, h as ce, p as $O, j as Y, t as h, l as Ir, I as rt, L as at, m as ye, n as ue, o as Qe, q as gO, r as te, u as SO, v as Br, w as Nr, x as PO, y as kO, z as Dr, B as Fr, C as Kr, G as Oe, H as ZO, J as Jr, K as kt, O as Hr, Q as ea, U as ta, V as Oa, X as ra, Y as aa, Z as ia, _ as sa, $ as na, a0 as la, a1 as oa, a2 as ca } from "./index-
|
|
6
|
+
import { s as y, A as pO, T as dO, a as Gr, S as et, b as Lr, P as fO, E as j, i as QO, c as _, D as le, k as tt, F as Ar, M as Pt, W as Er, R as Ur, d as mO, N as oe, e as V, f as Mr, g as Ot, h as ce, p as $O, j as Y, t as h, l as Ir, I as rt, L as at, m as ye, n as ue, o as Qe, q as gO, r as te, u as SO, v as Br, w as Nr, x as PO, y as kO, z as Dr, B as Fr, C as Kr, G as Oe, H as ZO, J as Jr, K as kt, O as Hr, Q as ea, U as ta, V as Oa, X as ra, Y as aa, Z as ia, _ as sa, $ as na, a0 as la, a1 as oa, a2 as ca } from "./index-rpz9D-nF.mjs";
|
|
7
7
|
class ua {
|
|
8
8
|
/**
|
|
9
9
|
Create a new completion context. (Mostly useful for testing
|
|
@@ -3,6 +3,7 @@ import { InlineCommentDraft } from './context/types';
|
|
|
3
3
|
interface MobileInlineCommentProps {
|
|
4
4
|
activeDraft: InlineCommentDraft | null;
|
|
5
5
|
activeDraftId: string | null;
|
|
6
|
+
isConnected: boolean;
|
|
6
7
|
isDiscardCommentOverlayVisible: boolean;
|
|
7
8
|
mobileDraftRef: React.RefObject<HTMLDivElement>;
|
|
8
9
|
onAttemptClose: () => void;
|
|
@@ -11,5 +12,5 @@ interface MobileInlineCommentProps {
|
|
|
11
12
|
onSubmit: () => void;
|
|
12
13
|
onUpdateDraftText: (draftId: string, text: string) => void;
|
|
13
14
|
}
|
|
14
|
-
export declare const MobileInlineComment: ({ activeDraft, activeDraftId, isDiscardCommentOverlayVisible, mobileDraftRef, onAttemptClose, onCancelDiscard, onConfirmDiscard, onSubmit, onUpdateDraftText, }: MobileInlineCommentProps) => import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export declare const MobileInlineComment: ({ activeDraft, activeDraftId, isConnected, isDiscardCommentOverlayVisible, mobileDraftRef, onAttemptClose, onCancelDiscard, onConfirmDiscard, onSubmit, onUpdateDraftText, }: MobileInlineCommentProps) => import("react/jsx-runtime").JSX.Element;
|
|
15
16
|
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
interface UseAutoSubmitCountdownProps {
|
|
2
|
+
label: string;
|
|
3
|
+
onSubmit: () => void;
|
|
4
|
+
resetKey: string | null;
|
|
5
|
+
shouldRun: boolean;
|
|
6
|
+
}
|
|
7
|
+
export declare const useAutoSubmitCountdown: ({ label, onSubmit, resetKey, shouldRun, }: UseAutoSubmitCountdownProps) => {
|
|
8
|
+
submitLabel: string;
|
|
9
|
+
};
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
interface UseCommentDraftAutoSubmitCountdownProps {
|
|
2
|
+
draftId: string | null;
|
|
3
|
+
canAutoSubmit: boolean;
|
|
4
|
+
onSubmit: () => void;
|
|
5
|
+
}
|
|
6
|
+
export declare const useCommentDraftAutoSubmitCountdown: ({ draftId, canAutoSubmit, onSubmit, }: UseCommentDraftAutoSubmitCountdownProps) => {
|
|
7
|
+
handleDraftBlur: () => void;
|
|
8
|
+
handleDraftFocus: () => void;
|
|
9
|
+
submitLabel: string;
|
|
10
|
+
};
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
interface UseSuggestionAutoSubmitCountdownProps {
|
|
2
|
+
suggestionId: string;
|
|
3
|
+
canAutoSubmit: boolean;
|
|
4
|
+
onSubmit: () => void;
|
|
5
|
+
}
|
|
6
|
+
export declare const useSuggestionAutoSubmitCountdown: ({ suggestionId, canAutoSubmit, onSubmit, }: UseSuggestionAutoSubmitCountdownProps) => {
|
|
7
|
+
submitLabel: string;
|
|
8
|
+
};
|
|
9
|
+
export {};
|
|
@@ -46,6 +46,7 @@ export declare function resolveCommentAnchorRangeInState(anchor: Pick<CommentAnc
|
|
|
46
46
|
* so we need a separate path that allows a point position.
|
|
47
47
|
*/
|
|
48
48
|
export declare function resolveCommentAnchorPointInState(anchor: Pick<CommentAnchor, 'anchorFrom'>, state: EditorState): number | null;
|
|
49
|
+
export declare function hasResolvableCommentAnchorInState(anchor: Pick<CommentAnchor, 'anchorFrom' | 'anchorTo' | 'isSuggestion' | 'suggestionType'>, state: EditorState): boolean;
|
|
49
50
|
export declare function resolveCommentAnchorRangeForAnalysis(anchor: Pick<CommentAnchor, 'id' | 'anchorFrom' | 'anchorTo'>, state: EditorState): CommentAnchorRange | null;
|
|
50
51
|
export declare function resolveCommentAnchorPointForAnalysis(anchor: Pick<CommentAnchor, 'id' | 'anchorFrom'>, state: EditorState): number | null;
|
|
51
52
|
/**
|
|
@@ -23,6 +23,8 @@ export interface SuggestionTrackingOptions {
|
|
|
23
23
|
onDeleteSelection: (from: number, to: number) => void;
|
|
24
24
|
/** Viewer pastes a link over selected text. */
|
|
25
25
|
onPasteLink: (from: number, to: number, href: string) => void;
|
|
26
|
+
/** Viewer attempted an unsupported paste/drop in suggestion mode. */
|
|
27
|
+
onUnsupportedPaste?: () => void;
|
|
26
28
|
/**
|
|
27
29
|
* Viewer presses Backspace/Delete with a collapsed cursor.
|
|
28
30
|
* The consumer decides whether this should shrink an active draft or create
|
|
@@ -126,6 +126,8 @@ export interface CommentStoreState {
|
|
|
126
126
|
pendingPrehydrationFloatingThreadIds: string[];
|
|
127
127
|
/** In-progress suggestion drafts — keyed by suggestionId. Viewer-local, lost on refresh. */
|
|
128
128
|
drafts: Record<string, DraftSuggestion>;
|
|
129
|
+
/** Suggestion draft currently under the focused editor cursor, if any. */
|
|
130
|
+
activeSuggestionDraftIdAtCursor: string | null;
|
|
129
131
|
inlineDrafts: InlineDraftRecordMap;
|
|
130
132
|
activeDraftId: string | null;
|
|
131
133
|
isDesktopFloatingEnabled: boolean;
|
|
@@ -255,6 +257,11 @@ export interface CommentStoreState {
|
|
|
255
257
|
* range while the viewer's draft is open.
|
|
256
258
|
*/
|
|
257
259
|
refreshDraftOriginalContent: (suggestionId: string, currentText: string) => void;
|
|
260
|
+
/**
|
|
261
|
+
* Sync the draft id under the current editor cursor. Each draft card uses
|
|
262
|
+
* this to decide whether its own auto-submit countdown should run.
|
|
263
|
+
*/
|
|
264
|
+
syncActiveSuggestionDraftAtCursor: () => void;
|
|
258
265
|
/**
|
|
259
266
|
* Promote a draft to a submitted suggestion. Pushes the anchor into
|
|
260
267
|
* commentAnchorsRef, calls onNewComment, removes the draft, and swaps the
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { j as d } from "./index-
|
|
1
|
+
import { j as d } from "./index-BhAjJb8w.mjs";
|
|
2
2
|
import { useRef as I, useState as N, useEffect as D } from "react";
|
|
3
3
|
import { DynamicDropdown as E, Tooltip as R, IconButton as O } from "@fileverse/ui";
|
|
4
|
-
import { a3 as A, a4 as P, c as y } from "./index-
|
|
4
|
+
import { a3 as A, a4 as P, c as y } from "./index-rpz9D-nF.mjs";
|
|
5
5
|
const p = (e, t, o = t) => {
|
|
6
6
|
const { state: s } = e, l = s.changeByRange((n) => {
|
|
7
7
|
const u = s.sliceDoc(n.from, n.to), r = s.sliceDoc(
|