@fileverse-dev/ddoc 4.0.0 → 4.0.2-accessibility-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/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-7mMbgzOo.mjs";
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-towGleCE.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-7mMbgzOo.mjs";
4
+ import { j as Cr } from "./index-towGleCE.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-hLcUjTe-.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-CEdtaJ1I.mjs";
7
7
  class ua {
8
8
  /**
9
9
  Create a new completion context. (Mostly useful for testing
@@ -4,6 +4,7 @@ export interface DBlockRuntimeState {
4
4
  isPreviewEditor: boolean;
5
5
  isCollaboratorsDoc: boolean;
6
6
  isSplitView: boolean;
7
+ isFocusMode: boolean;
7
8
  }
8
9
  export declare const DEFAULT_DBLOCK_RUNTIME_STATE: DBlockRuntimeState;
9
10
  export type DBlockRuntimeStateRef = {
@@ -34,6 +34,7 @@ interface UseTabEditorArgs {
34
34
  isAIAgentEnabled?: boolean;
35
35
  setCharacterCount?: DdocProps['setCharacterCount'];
36
36
  setWordCount?: DdocProps['setWordCount'];
37
+ setSelectedWordCount?: DdocProps['setSelectedWordCount'];
37
38
  setPageCount?: DdocProps['setPageCount'];
38
39
  setIsContentLoading: Dispatch<SetStateAction<boolean>>;
39
40
  setIsCollabContentLoading: Dispatch<SetStateAction<boolean>>;
@@ -55,7 +56,7 @@ interface UseTabEditorArgs {
55
56
  initialCommentAnchors?: SerializedCommentAnchor[];
56
57
  dBlockRuntimeStateRef?: DBlockRuntimeStateRef;
57
58
  }
58
- export declare const useTabEditor: ({ ydoc, isVersionMode, hasTabState, versionId, isPreviewMode, viewerMode, initialContent, collaboration, isReady, isSyncing, awareness, disableInlineComment, isFocusMode, onCommentInteraction, onError, ipfsImageUploadFn, metadataProxyUrl, onCopyHeadingLink, ipfsImageFetchFn, fetchV1ImageFn, isConnected, activeModel, maxTokens, isAIAgentEnabled, setCharacterCount, setWordCount, setPageCount, setIsContentLoading, setIsCollabContentLoading, unFocused, zoomLevel, isPresentationMode, onInvalidContentError, ignoreCorruptedData, onCollaboratorChange, onConnect, hasCollabContentInitialised, initialiseYjsIndexedDbProvider, externalExtensions, isContentLoading, activeTabId, tabIds, theme, editorRef, initialCommentAnchors, dBlockRuntimeStateRef, }: UseTabEditorArgs) => {
59
+ export declare const useTabEditor: ({ ydoc, isVersionMode, hasTabState, versionId, isPreviewMode, viewerMode, initialContent, collaboration, isReady, isSyncing, awareness, disableInlineComment, isFocusMode, onCommentInteraction, onError, ipfsImageUploadFn, metadataProxyUrl, onCopyHeadingLink, ipfsImageFetchFn, fetchV1ImageFn, isConnected, activeModel, maxTokens, isAIAgentEnabled, setCharacterCount, setWordCount, setSelectedWordCount, setPageCount, setIsContentLoading, setIsCollabContentLoading, unFocused, zoomLevel, isPresentationMode, onInvalidContentError, ignoreCorruptedData, onCollaboratorChange, onConnect, hasCollabContentInitialised, initialiseYjsIndexedDbProvider, externalExtensions, isContentLoading, activeTabId, tabIds, theme, editorRef, initialCommentAnchors, dBlockRuntimeStateRef, }: UseTabEditorArgs) => {
59
60
  editor: Editor | null;
60
61
  cachedEditorEntries: import('./use-tab-editor-cache').CachedTabEditorRenderEntry[];
61
62
  ref: import('react').RefObject<HTMLDivElement>;
@@ -182,6 +182,7 @@ export interface DdocProps extends CommentAccountProps {
182
182
  onError?: (error: string) => void;
183
183
  setCharacterCount?: React.Dispatch<SetStateAction<number>>;
184
184
  setWordCount?: React.Dispatch<SetStateAction<number>>;
185
+ setSelectedWordCount?: React.Dispatch<SetStateAction<number>>;
185
186
  setPageCount?: React.Dispatch<SetStateAction<number>>;
186
187
  tags?: Array<{
187
188
  name: string;
@@ -2,7 +2,7 @@ import { DdocProps } from './types';
2
2
  import { Editor } from '@tiptap/react';
3
3
  import { DBlockRuntimeState } from './extensions/d-block/dblock-runtime';
4
4
 
5
- export declare const useDdocEditor: ({ isPreviewMode, viewerMode, initialContent, versionHistoryState, collaboration, onChange, onCollaboratorChange, onCommentInteraction, onError, setCharacterCount, setWordCount, setPageCount, ipfsImageUploadFn, ddocId, enableIndexeddbSync, unFocused, isFocusMode, theme, zoomLevel, onInvalidContentError, ignoreCorruptedData, isPresentationMode, metadataProxyUrl, extensions: externalExtensions, onCopyHeadingLink, ipfsImageFetchFn, fetchV1ImageFn, isConnected, activeModel, maxTokens, isAIAgentEnabled, onIndexedDbError, disableInlineComment, initialCommentAnchors, isPreviewEditor, fonts, ...rest }: Partial<DdocProps> & {
5
+ export declare const useDdocEditor: ({ isPreviewMode, viewerMode, initialContent, versionHistoryState, collaboration, onChange, onCollaboratorChange, onCommentInteraction, onError, setCharacterCount, setWordCount, setSelectedWordCount, setPageCount, ipfsImageUploadFn, ddocId, enableIndexeddbSync, unFocused, isFocusMode, theme, zoomLevel, onInvalidContentError, ignoreCorruptedData, isPresentationMode, metadataProxyUrl, extensions: externalExtensions, onCopyHeadingLink, ipfsImageFetchFn, fetchV1ImageFn, isConnected, activeModel, maxTokens, isAIAgentEnabled, onIndexedDbError, disableInlineComment, initialCommentAnchors, isPreviewEditor, fonts, ...rest }: Partial<DdocProps> & {
6
6
  isFocusMode?: boolean;
7
7
  isPreviewEditor?: boolean;
8
8
  }) => {
@@ -11,5 +11,5 @@ type TemplateButtonProps = {
11
11
  declare const createMoreTemplates: (addTemplate: (template: JSONContent) => void) => TemplateButtonProps;
12
12
  declare const createTemplateButtons: (addTemplate: (template: JSONContent) => void) => TemplateButtonProps;
13
13
  declare const renderIcon: (icon: IconType, className?: string) => import("react/jsx-runtime").JSX.Element | null;
14
- declare const renderTemplateButtons: (templateButtons: TemplateButtonProps, moreTemplates: TemplateButtonProps, visibleTemplateCount: number, toggleAllTemplates: () => void, isExpanded: boolean, isCollaboratorsDoc: boolean, isPreviewMode: boolean) => import("react/jsx-runtime").JSX.Element | null;
14
+ declare const renderTemplateButtons: (templateButtons: TemplateButtonProps, moreTemplates: TemplateButtonProps, visibleTemplateCount: number, toggleAllTemplates: () => void, isExpanded: boolean, isCollaboratorsDoc: boolean, isPreviewMode: boolean, isFocusMode: boolean) => import("react/jsx-runtime").JSX.Element | null;
15
15
  export { renderIcon, createTemplateButtons, createMoreTemplates, renderTemplateButtons, };
@@ -1,7 +1,7 @@
1
- import { j as r } from "./index-7mMbgzOo.mjs";
1
+ import { j as r } from "./index-towGleCE.mjs";
2
2
  import { useRef as I, useState as D, useEffect as E } from "react";
3
3
  import { DynamicDropdown as P, Tooltip as y, IconButton as L } from "@fileverse/ui";
4
- import { a3 as A, a4 as _, c as O } from "./index-hLcUjTe-.mjs";
4
+ import { a3 as A, a4 as _, c as O } from "./index-CEdtaJ1I.mjs";
5
5
  const p = (e, n, s = n) => {
6
6
  const { state: o } = e, l = o.changeByRange((t) => {
7
7
  const u = o.sliceDoc(t.from, t.to), a = o.sliceDoc(