@fileverse-dev/ddoc 4.8.2 → 4.8.4
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/headless-editor-utils.es.js +1 -1
- package/dist/{index-SyVp89z7.mjs → index-DE-dOVUQ.mjs} +1 -1
- package/dist/index.es.js +5820 -5947
- package/dist/{markdown-source-pane-zl8gaBEG.mjs → markdown-source-pane-CZtWK2lH.mjs} +1 -1
- package/dist/package/common/carousel.d.ts +6 -1
- package/dist/package/components/editor-bubble-menu/props.d.ts +2 -1
- package/dist/package/components/editor-toolbar/font-family.d.ts +5 -1
- package/dist/package/components/editor-toolbar/font-size.d.ts +4 -1
- package/dist/package/components/editor-utils.d.ts +6 -6
- package/dist/package/components/mobile-toolbar.d.ts +3 -2
- package/dist/package/stores/mobile-toolbar-store.d.ts +13 -0
- package/dist/package/utils/colors.d.ts +5 -0
- package/dist/package/utils/dismiss-native-selection.d.ts +14 -0
- package/dist/{split-view-toolbar-C7u41qZI.mjs → split-view-toolbar-CvWe-bz8.mjs} +1 -1
- package/dist/style.css +1 -1
- package/dist/{use-headless-editor-YGYoTi3o.mjs → use-headless-editor-WdZumV6P.mjs} +12984 -12730
- package/package.json +1 -1
|
@@ -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-
|
|
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";
|
|
7
7
|
class ua {
|
|
8
8
|
/**
|
|
9
9
|
Create a new completion context. (Mostly useful for testing
|
|
@@ -10,6 +10,9 @@ type CarouselProps = {
|
|
|
10
10
|
plugins?: CarouselPlugin;
|
|
11
11
|
orientation?: 'horizontal' | 'vertical';
|
|
12
12
|
setApi?: (api: CarouselApi) => void;
|
|
13
|
+
/** Slides visible per view. Embla has no option for this — slide size is
|
|
14
|
+
* CSS-driven (`--slide-size` → flex-basis), which is what this sets. */
|
|
15
|
+
slidesPerView?: number;
|
|
13
16
|
};
|
|
14
17
|
declare const Carousel: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & CarouselProps & React.RefAttributes<HTMLDivElement>>;
|
|
15
18
|
declare const CarouselContent: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -17,6 +20,8 @@ declare const CarouselItem: React.ForwardRefExoticComponent<React.HTMLAttributes
|
|
|
17
20
|
declare const CarouselIndicator: React.ForwardRefExoticComponent<React.ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
18
21
|
index: number;
|
|
19
22
|
} & React.RefAttributes<HTMLButtonElement>>;
|
|
23
|
+
/** Renders one CarouselIndicator per Embla scroll snap. */
|
|
24
|
+
declare const CarouselDots: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
20
25
|
declare const CarouselPrevious: React.ForwardRefExoticComponent<React.ButtonHTMLAttributes<HTMLButtonElement> & React.RefAttributes<HTMLButtonElement>>;
|
|
21
26
|
declare const CarouselNext: React.ForwardRefExoticComponent<React.ButtonHTMLAttributes<HTMLButtonElement> & React.RefAttributes<HTMLButtonElement>>;
|
|
22
|
-
export { type CarouselApi, Carousel, CarouselContent, CarouselItem, CarouselIndicator, CarouselPrevious, CarouselNext, };
|
|
27
|
+
export { type CarouselApi, Carousel, CarouselContent, CarouselItem, CarouselIndicator, CarouselDots, CarouselPrevious, CarouselNext, };
|
|
@@ -12,9 +12,10 @@ export declare const shouldShowIgnoringFocus: (editor: Editor) => boolean;
|
|
|
12
12
|
* `z-50`, so a modal cannot paint over it — anything that owns the screen has
|
|
13
13
|
* to hide the menu explicitly or it overlaps the dialog.
|
|
14
14
|
*/
|
|
15
|
-
export declare const isBubbleMenuHidden: ({ isCommentOpen, isLinkPopupOpen, isBubbleMenuSuppressed, isCustomSpacingOpen, }: {
|
|
15
|
+
export declare const isBubbleMenuHidden: ({ isCommentOpen, isLinkPopupOpen, isBubbleMenuSuppressed, isCustomSpacingOpen, isMobileToolbarOpen, }: {
|
|
16
16
|
isCommentOpen: boolean;
|
|
17
17
|
isLinkPopupOpen: boolean;
|
|
18
18
|
isBubbleMenuSuppressed: boolean;
|
|
19
19
|
isCustomSpacingOpen: boolean;
|
|
20
|
+
isMobileToolbarOpen: boolean;
|
|
20
21
|
}) => boolean;
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
import { Editor } from '@tiptap/core';
|
|
2
2
|
import { FontDescriptor } from '../../types';
|
|
3
3
|
|
|
4
|
-
export declare const FontFamilyDropdown: ({ consumerFonts, editor, }: {
|
|
4
|
+
export declare const FontFamilyDropdown: ({ consumerFonts, editor, triggerClassName, focusEditor, mobileSheet, }: {
|
|
5
5
|
consumerFonts?: FontDescriptor[];
|
|
6
6
|
editor: Editor;
|
|
7
|
+
triggerClassName?: string;
|
|
8
|
+
focusEditor?: boolean;
|
|
9
|
+
/** Mobile sheet layout: menu matches trigger width, 8px radius/padding */
|
|
10
|
+
mobileSheet?: boolean;
|
|
7
11
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import { Editor } from '@tiptap/core';
|
|
2
2
|
|
|
3
|
-
export declare const FontSizeDropdown: ({ editor, currentSize, onSetFontSize, }: {
|
|
3
|
+
export declare const FontSizeDropdown: ({ editor, currentSize, onSetFontSize, triggerClassName, mobileSheet, }: {
|
|
4
4
|
editor: Editor;
|
|
5
5
|
currentSize?: string;
|
|
6
6
|
onSetFontSize: (fontSize: string) => void;
|
|
7
|
+
triggerClassName?: string;
|
|
8
|
+
/** Mobile sheet layout: menu matches trigger width, 8px radius, 320px cap */
|
|
9
|
+
mobileSheet?: boolean;
|
|
7
10
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -19,7 +19,7 @@ export type CopyAo3Html = (getHtml: () => Promise<string>) => Promise<boolean>;
|
|
|
19
19
|
type PickerEntry = {
|
|
20
20
|
title: string;
|
|
21
21
|
value: string;
|
|
22
|
-
command: (editor: Editor) => void;
|
|
22
|
+
command: (editor: Editor, focus?: boolean) => void;
|
|
23
23
|
preview?: React.ReactNode;
|
|
24
24
|
};
|
|
25
25
|
export declare const baselineFonts: PickerEntry[];
|
|
@@ -92,11 +92,13 @@ export declare const TextHighlighter: ({ editor, setVisibility, elementRef, }: {
|
|
|
92
92
|
elementRef: React.RefObject<HTMLDivElement>;
|
|
93
93
|
setVisibility: Dispatch<SetStateAction<IEditorTool>>;
|
|
94
94
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
95
|
-
export declare const EditorFontFamily: ({ elementRef, editor, setToolVisibility, fonts: consumerFonts, }: {
|
|
95
|
+
export declare const EditorFontFamily: ({ elementRef, editor, setToolVisibility, fonts: consumerFonts, focusEditor, mobileSheet, }: {
|
|
96
96
|
elementRef: React.RefObject<HTMLDivElement>;
|
|
97
97
|
editor: Editor;
|
|
98
98
|
setToolVisibility: Dispatch<SetStateAction<IEditorTool>>;
|
|
99
99
|
fonts?: FontDescriptor[];
|
|
100
|
+
focusEditor?: boolean;
|
|
101
|
+
mobileSheet?: boolean;
|
|
100
102
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
101
103
|
export declare const EditorAlignment: ({ elementRef, editor, setToolVisibility, }: {
|
|
102
104
|
elementRef: React.RefObject<HTMLDivElement>;
|
|
@@ -160,14 +162,12 @@ export declare const LineHeightPicker: ({ editor, setVisibility, elementRef, cur
|
|
|
160
162
|
onSetLineHeight: (lineHeight: string) => void;
|
|
161
163
|
onOpenCustomSpacing?: () => void;
|
|
162
164
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
163
|
-
export declare const TextFormatingPopup: ({ editor, isOpen, setIsOpen, setToolVisibility, }: {
|
|
165
|
+
export declare const TextFormatingPopup: ({ editor, isOpen, setIsOpen, setToolVisibility, fonts, }: {
|
|
164
166
|
editor: Editor | null;
|
|
165
167
|
isOpen: boolean;
|
|
166
168
|
setIsOpen: (open: boolean) => void;
|
|
167
169
|
setToolVisibility: Dispatch<SetStateAction<IEditorTool>>;
|
|
168
|
-
|
|
169
|
-
export declare const TextColorPicker: ({ editor }: {
|
|
170
|
-
editor: Editor;
|
|
170
|
+
fonts?: FontDescriptor[];
|
|
171
171
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
172
172
|
export declare const checkActiveListsAndDBlocks: (editor: Editor) => {
|
|
173
173
|
activeListTypes: string[];
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { Editor } from '@tiptap/react';
|
|
3
|
-
import { IpfsImageFetchPayload, IpfsImageUploadResponse } from '../types';
|
|
3
|
+
import { FontDescriptor, IpfsImageFetchPayload, IpfsImageUploadResponse } from '../types';
|
|
4
4
|
|
|
5
|
-
declare const MemoizedMobileToolbar: React.MemoExoticComponent<({ editor, onError, isKeyboardVisible, isNavbarVisible, setIsNavbarVisible, ipfsImageUploadFn, isLoading, ipfsImageFetchFn, fetchV1ImageFn, }: {
|
|
5
|
+
declare const MemoizedMobileToolbar: React.MemoExoticComponent<({ editor, onError, isKeyboardVisible, isNavbarVisible, setIsNavbarVisible, ipfsImageUploadFn, isLoading, ipfsImageFetchFn, fetchV1ImageFn, fonts, }: {
|
|
6
6
|
editor: Editor | null;
|
|
7
7
|
onError?: (errorString: string) => void;
|
|
8
8
|
isKeyboardVisible: boolean;
|
|
@@ -15,5 +15,6 @@ declare const MemoizedMobileToolbar: React.MemoExoticComponent<({ editor, onErro
|
|
|
15
15
|
file: File;
|
|
16
16
|
}>;
|
|
17
17
|
fetchV1ImageFn?: (url: string) => Promise<ArrayBuffer | undefined>;
|
|
18
|
+
fonts?: FontDescriptor[];
|
|
18
19
|
}) => import("react/jsx-runtime").JSX.Element>;
|
|
19
20
|
export default MemoizedMobileToolbar;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
type Store = {
|
|
2
|
+
isMobileToolbarOpen: boolean;
|
|
3
|
+
setMobileToolbarOpen: (val: boolean) => void;
|
|
4
|
+
};
|
|
5
|
+
/**
|
|
6
|
+
* Whether one of the mobile toolbar's sheets/modals (text formatting, link)
|
|
7
|
+
* owns the screen. Module-level like custom-spacing-store: the bubble menu is
|
|
8
|
+
* a separate tree and must hide itself while these are open — on native
|
|
9
|
+
* mobile it shows for any in-editor selection, focus or not, and its inline
|
|
10
|
+
* z-index sits above the drawer.
|
|
11
|
+
*/
|
|
12
|
+
export declare const useMobileToolbarStore: import('zustand').UseBoundStore<import('zustand').StoreApi<Store>>;
|
|
13
|
+
export {};
|
|
@@ -9,5 +9,10 @@ export declare const textColors: {
|
|
|
9
9
|
light: string;
|
|
10
10
|
dark: string;
|
|
11
11
|
}[];
|
|
12
|
+
export declare const mobileTextColors: {
|
|
13
|
+
name: string;
|
|
14
|
+
light: string;
|
|
15
|
+
dark: string;
|
|
16
|
+
}[];
|
|
12
17
|
export declare const resolveEditorColorVars: (value: string) => string;
|
|
13
18
|
export declare const getResponsiveColor: (color?: string, theme?: ThemeKey) => string | undefined;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
type EditorLike = {
|
|
2
|
+
view: {
|
|
3
|
+
dom: HTMLElement;
|
|
4
|
+
};
|
|
5
|
+
} | null | undefined;
|
|
6
|
+
/**
|
|
7
|
+
* Drop the DOM selection that lives inside the editor (and blur it) so iOS /
|
|
8
|
+
* Android dismiss their native edit menu and selection handles when a sheet
|
|
9
|
+
* takes over the screen. ProseMirror ignores `selectionchange` while the view
|
|
10
|
+
* is unfocused, so `state.selection` survives and commands issued from the
|
|
11
|
+
* sheet still apply to the selected text.
|
|
12
|
+
*/
|
|
13
|
+
export declare const dismissNativeSelection: (editor: EditorLike) => void;
|
|
14
|
+
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-
|
|
4
|
+
import { a3 as _, a4 as w, c as R } from "./index-DE-dOVUQ.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(
|