@fileverse-dev/ddoc 4.8.4 → 4.8.6-patch-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.
@@ -3,7 +3,7 @@ var Wr = (t, e, O) => e in t ? Vr(t, e, { enumerable: !0, configurable: !0, writ
3
3
  var gt = (t, e, O) => Wr(t, typeof e != "symbol" ? e + "" : e, O);
4
4
  import { jsx as Cr } from "react/jsx-runtime";
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-DE-dOVUQ.mjs";
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-C4ZU6jFH.mjs";
7
7
  class ua {
8
8
  /**
9
9
  Create a new completion context. (Mostly useful for testing
@@ -8,7 +8,15 @@ interface DBlockTemplateTarget {
8
8
  node: ProseMirrorNode;
9
9
  pos: number;
10
10
  }
11
+ export declare const isDocumentBlank: (doc: ProseMirrorNode) => boolean;
12
+ export declare const getTemplateTargetFromBlankState: (editor: Editor | null, runtimeState: DBlockRuntimeState, documentIsBlank: boolean) => DBlockTemplateTarget | null;
11
13
  export declare const getTemplateTarget: (editor: Editor | null, runtimeState: DBlockRuntimeState) => DBlockTemplateTarget | null;
14
+ export declare const DBlockTemplateOverlay: ({ editor, enableFanficTemplate, onApplyTabbedTemplate, runtimeState, }: {
15
+ editor: Editor | null;
16
+ enableFanficTemplate: boolean;
17
+ onApplyTabbedTemplate?: (template: TabbedJSONContent) => void;
18
+ runtimeState: DBlockRuntimeState;
19
+ }) => React.ReactPortal | null;
12
20
  export declare const DBlockToolbarProvider: ({ children, editor, enableFanficTemplate, runtimeState, isPreviewEditor, onApplyTabbedTemplate, onCopyHeadingLink, }: {
13
21
  children: React.ReactNode;
14
22
  editor: Editor | null;
@@ -1,5 +1,7 @@
1
1
  import { Editor } from '@tiptap/core';
2
2
  import { TableOfContentsStorage } from '@tiptap/extension-table-of-contents';
3
+ import { Node as ProseMirrorNode } from '@tiptap/pm/model';
4
+ import { Transaction } from '@tiptap/pm/state';
3
5
 
4
6
  type EditorWithTableOfContentsStorage = {
5
7
  storage?: {
@@ -7,5 +9,7 @@ type EditorWithTableOfContentsStorage = {
7
9
  };
8
10
  };
9
11
  export declare const clearTableOfContentsStorage: (target: Editor | EditorWithTableOfContentsStorage | TableOfContentsStorage | null | undefined) => boolean;
12
+ export declare const getHeadingSignature: (doc: ProseMirrorNode) => string;
13
+ export declare const transactionCouldTouchHeading: (transaction: Transaction) => boolean;
10
14
  export declare const DdocTableOfContents: import('@tiptap/core').Extension<import('@tiptap/extension-table-of-contents').TableOfContentsOptions, TableOfContentsStorage>;
11
15
  export {};
@@ -1,7 +1,7 @@
1
1
  import { jsx as m, jsxs as L } from "react/jsx-runtime";
2
2
  import { useRef as D, useState as E, useEffect as A } from "react";
3
3
  import { DynamicDropdown as P, Tooltip as O, IconButton as T } from "@fileverse/ui";
4
- import { a3 as _, a4 as w, c as R } from "./index-DE-dOVUQ.mjs";
4
+ import { a3 as _, a4 as w, c as R } from "./index-C4ZU6jFH.mjs";
5
5
  const p = (e, n, o = n) => {
6
6
  const { state: i } = e, l = i.changeByRange((t) => {
7
7
  const d = i.sliceDoc(t.from, t.to), r = i.sliceDoc(