@fileverse-dev/ddoc 3.5.1-split-view-patch.1 → 3.5.1-split-view-patch.3
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-G7EzOiBS.mjs → index-B07WW9ra.mjs} +11965 -11895
- package/dist/{index-BwzVuZF7.mjs → index-LTFTMuA7.mjs} +1 -1
- package/dist/index.es.js +1 -1
- package/dist/{markdown-source-pane-CRJa8ebw.mjs → markdown-source-pane-vq0vi90M.mjs} +2 -2
- package/dist/package/components/split-view/split-view-markdown-pane.d.ts +3 -1
- package/dist/package/extensions/d-block/dblock-runtime.d.ts +1 -0
- package/dist/package/hooks/use-split-resize.d.ts +26 -0
- package/dist/{split-view-toolbar-ZvjclGfv.mjs → split-view-toolbar-CsKiWsyk.mjs} +2 -2
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -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-B07WW9ra.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,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20,,4,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,22,2,r,,,,,,1j,e,,5,,2,5,b,,10,9,,2u,4,,6,,2,2,2,p,2,4,3,g,4,d,,2,2,6,,f,,jj,3,qa,3,t,3,t,2,u,2,1s,2,,7,8,,2,b,9,,19,3,3b,2,y,,3a,3,4,2,9,,6,3,63,2,2,,1m,,,7,,,,,2,8,6,a,2,,1c,h,1r,4,1c,7,,,5,,14,9,c,2,w,4,2,2,,3,1k,,,2,3,,,3,1m,8,2,2,48,3,,d,,7,4,,6,,3,2,5i,1m,,5,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,p,2,5,,47,2,q,i,d,,12,8,p,b,1a,3,1c,,2,4,2,2,13,,1v,6,2,2,2,2,c,,8,,1b,,1f,,,3,2,2,5,2,,,16,2,8,,6m,,2,,4,,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,ar,2,49,b,4w,,1i,f,1k,3,1d,4,2,2,1x,3,10,5,,8,1q,,c,2,1g,9,a,4,2,,2n,3,2,,,2,6,,4g,,3,8,l,2,1l,2,,,,,m,,e,7,3,5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,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-B07WW9ra.mjs";
|
|
2
2
|
export {
|
|
3
3
|
e as DdocEditor,
|
|
4
4
|
o as DdocExportModal,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
var qr = Object.defineProperty;
|
|
2
2
|
var Vr = (t, e, O) => e in t ? qr(t, e, { enumerable: !0, configurable: !0, writable: !0, value: O }) : t[e] = O;
|
|
3
3
|
var gt = (t, e, O) => Vr(t, typeof e != "symbol" ? e + "" : e, O);
|
|
4
|
-
import { j as Wr } from "./index-
|
|
4
|
+
import { j as Wr } from "./index-B07WW9ra.mjs";
|
|
5
5
|
import { useRef as pe, useEffect as St } from "react";
|
|
6
|
-
import { s as y, A as pO, T as Cr, a as Gr, S as et, b as Lr, P as dO, E as j, i as fO, c as _, D as le, k as tt, F as Ar, M as Pt, W as Er, R as Ur, d as QO, N as oe, e as V, f as Mr, g as Ot, h as ce, p as mO, 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 $O, r as te, u as gO, v as Br, w as Nr, x as SO, y as PO, z as Dr, B as Fr, C as Kr, G as Oe, H as kO, 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 Cr, a as Gr, S as et, b as Lr, P as dO, E as j, i as fO, c as _, D as le, k as tt, F as Ar, M as Pt, W as Er, R as Ur, d as QO, N as oe, e as V, f as Mr, g as Ot, h as ce, p as mO, 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 $O, r as te, u as gO, v as Br, w as Nr, x as SO, y as PO, z as Dr, B as Fr, C as Kr, G as Oe, H as kO, 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-LTFTMuA7.mjs";
|
|
7
7
|
class ua {
|
|
8
8
|
/**
|
|
9
9
|
Create a new completion context. (Mostly useful for testing
|
|
@@ -8,6 +8,8 @@ interface SplitViewMarkdownPaneProps {
|
|
|
8
8
|
/** Same uploader the editor uses — for the markdown toolbar's Image button. */
|
|
9
9
|
ipfsImageUploadFn?: (file: File) => Promise<IpfsImageUploadResponse>;
|
|
10
10
|
onError?: (error: string) => void;
|
|
11
|
+
/** Sizing for the resizable split (flex-grow set by the draggable splitter). */
|
|
12
|
+
style?: React.CSSProperties;
|
|
11
13
|
}
|
|
12
14
|
/**
|
|
13
15
|
* Split View LEFT pane: the dedicated markdown toolbar + the
|
|
@@ -15,5 +17,5 @@ interface SplitViewMarkdownPaneProps {
|
|
|
15
17
|
* real ddoc editor itself — see ddoc-editor.tsx, which keeps that editor mounted
|
|
16
18
|
* in place (never a second <EditorContent>) so its React node views survive.
|
|
17
19
|
*/
|
|
18
|
-
export declare const SplitViewMarkdownPane: ({ markdown, onMarkdownChange, onExitSplitView, ipfsImageUploadFn, onError, }: SplitViewMarkdownPaneProps) => import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
export declare const SplitViewMarkdownPane: ({ markdown, onMarkdownChange, onExitSplitView, ipfsImageUploadFn, onError, style, }: SplitViewMarkdownPaneProps) => import("react/jsx-runtime").JSX.Element;
|
|
19
21
|
export {};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { MouseEvent as ReactMouseEvent } from 'react';
|
|
2
|
+
|
|
3
|
+
interface UseSplitResizeOptions {
|
|
4
|
+
/** Left-pane fraction at rest (0–1). */
|
|
5
|
+
defaultRatio?: number;
|
|
6
|
+
/** Clamp so neither pane can collapse. */
|
|
7
|
+
min?: number;
|
|
8
|
+
max?: number;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Drives a two-pane resizable split. Apply `leftRatio` as the left pane's
|
|
12
|
+
* `flexGrow` and `1 - leftRatio` as the right pane's; dragging the divider
|
|
13
|
+
* updates the ratio.
|
|
14
|
+
*
|
|
15
|
+
* The pointer listeners live on `document` (so the drag keeps tracking when the
|
|
16
|
+
* cursor leaves the thin divider) and are always torn down — on mouse-up AND on
|
|
17
|
+
* unmount. The unmount teardown matters: without it, a drag interrupted by the
|
|
18
|
+
* editor unmounting (e.g. navigation) would leave `document.body` with text
|
|
19
|
+
* selection disabled and a resize cursor stuck for the rest of the page's life.
|
|
20
|
+
*/
|
|
21
|
+
export declare const useSplitResize: ({ defaultRatio, min, max, }?: UseSplitResizeOptions) => {
|
|
22
|
+
containerRef: import('react').MutableRefObject<HTMLDivElement | null>;
|
|
23
|
+
leftRatio: number;
|
|
24
|
+
onSeparatorMouseDown: (e: ReactMouseEvent) => void;
|
|
25
|
+
};
|
|
26
|
+
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { j as r } from "./index-
|
|
1
|
+
import { j as r } from "./index-B07WW9ra.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-
|
|
4
|
+
import { a3 as A, a4 as _, c as O } from "./index-LTFTMuA7.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(
|