@fileverse-dev/ddoc 4.6.5-ps.0 → 4.6.5-ps.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 a, a as o, E as t, P as d, f as r, i, g as n, j as m, h as E, m as c, e as l, l as p, c as u, d as C, u as f, v as D } from "./index-BOhGei2y.mjs";
1
+ import { D as a, a as o, E as t, P as d, f as r, i, g as n, j as m, h as E, m as c, e as l, l as p, c as u, d as C, u as f, v as D } from "./index-CtY7xa2V.mjs";
2
2
  export {
3
3
  a as DdocEditor,
4
4
  o as DdocExportModal,
@@ -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-C231OeHf.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-Bm6q0fMZ.mjs";
7
7
  class ua {
8
8
  /**
9
9
  Create a new completion context. (Mostly useful for testing
@@ -5,6 +5,20 @@ export type SpacingToggle = {
5
5
  label: string;
6
6
  onSelect: () => void;
7
7
  };
8
+ /**
9
+ * Write one half of the toggle.
10
+ *
11
+ * Both halves write an explicit value. Removing writes 0, because null hands
12
+ * the block back to the stylesheet — the very gap being removed. Adding writes
13
+ * SPACING_ADD_PT for the mirror-image reason: "Add" is only offered when the
14
+ * stylesheet already gives nothing, so null would leave it at zero.
15
+ *
16
+ * Exported so the second-level nav's registry entry writes exactly what the
17
+ * toolbar dropdown and bubble menu write, without rebuilding the toggle list.
18
+ */
19
+ export declare const applySpacingToggle: (editor: Editor | null, edge: "before" | "after", action: "add" | "remove") => boolean | undefined;
20
+ /** The menu wording for one half, shared so every surface reads identically. */
21
+ export declare const spacingToggleLabel: (edge: "before" | "after", action: "add" | "remove") => string;
8
22
  /**
9
23
  * The Google Docs "Add / Remove space before|after paragraph" pair, shared by
10
24
  * the toolbar dropdown and the bubble menu so the label logic exists once.
@@ -12,10 +26,5 @@ export type SpacingToggle = {
12
26
  * The label reflects what the block actually renders with, stylesheet
13
27
  * included, so a fresh paragraph offers "Remove" first — its gap comes from
14
28
  * editor.css rather than from an attribute.
15
- *
16
- * Both halves write an explicit value. Removing writes 0, because null hands
17
- * the block back to the stylesheet — the very gap being removed. Adding writes
18
- * SPACING_ADD_PT for the mirror-image reason: "Add" is only offered when the
19
- * stylesheet already gives nothing, so null would leave it at zero.
20
29
  */
21
30
  export declare const getSpacingToggles: (editor: Editor | null) => SpacingToggle[];
@@ -7,7 +7,7 @@ export type EditorCommand = {
7
7
  isEnabled: boolean;
8
8
  current?: string | null;
9
9
  };
10
- export type EditorCommandId = 'edit.undo' | 'edit.redo' | 'edit.selectAll' | 'edit.cut' | 'edit.copy' | 'edit.paste' | 'edit.pasteWithoutFormatting' | 'edit.delete' | 'edit.findReplace' | 'insert.image' | 'insert.table' | 'insert.link' | 'insert.comment' | 'insert.callout' | 'insert.quote' | 'insert.code' | 'insert.codeBlock' | 'insert.video' | 'insert.mermaid' | 'insert.plainText' | 'insert.tweet' | 'insert.soundcloud' | 'insert.divider' | 'insert.pageBreak' | 'insert.columns2' | 'insert.columns3' | 'format.bold' | 'format.italic' | 'format.underline' | 'format.strike' | 'format.superscript' | 'format.subscript' | 'format.heading' | 'format.align' | 'format.direction' | 'format.lineHeight' | 'format.customSpacing' | 'format.fontFamily' | 'format.fontSize.increase' | 'format.fontSize.decrease' | 'format.list.bullet' | 'format.list.numbered' | 'format.list.check' | 'format.clearFormatting' | 'table.addRowAbove' | 'table.addRowBelow' | 'table.mergeCells' | 'table.deleteRow' | 'table.addColumnLeft' | 'table.addColumnRight' | 'table.deleteColumn' | 'table.toggleHeaderRow' | 'table.toggleHeaderColumn' | 'table.toggleHeaderCell' | 'table.deleteTable';
10
+ export type EditorCommandId = 'edit.undo' | 'edit.redo' | 'edit.selectAll' | 'edit.cut' | 'edit.copy' | 'edit.paste' | 'edit.pasteWithoutFormatting' | 'edit.delete' | 'edit.findReplace' | 'insert.image' | 'insert.table' | 'insert.link' | 'insert.comment' | 'insert.callout' | 'insert.quote' | 'insert.code' | 'insert.codeBlock' | 'insert.video' | 'insert.mermaid' | 'insert.plainText' | 'insert.tweet' | 'insert.soundcloud' | 'insert.divider' | 'insert.pageBreak' | 'insert.columns2' | 'insert.columns3' | 'format.bold' | 'format.italic' | 'format.underline' | 'format.strike' | 'format.superscript' | 'format.subscript' | 'format.heading' | 'format.align' | 'format.direction' | 'format.lineHeight' | 'format.customSpacing' | 'format.spaceBefore' | 'format.spaceAfter' | 'format.fontFamily' | 'format.fontSize.increase' | 'format.fontSize.decrease' | 'format.list.bullet' | 'format.list.numbered' | 'format.list.check' | 'format.clearFormatting' | 'table.addRowAbove' | 'table.addRowBelow' | 'table.mergeCells' | 'table.deleteRow' | 'table.addColumnLeft' | 'table.addColumnRight' | 'table.deleteColumn' | 'table.toggleHeaderRow' | 'table.toggleHeaderColumn' | 'table.toggleHeaderCell' | 'table.deleteTable';
11
11
  export type UseEditorCommandsOptions = UploadImageOptions;
12
12
  /**
13
13
  * Reactive, editor-derived command registry (architecture doc §2 bucket 1).
@@ -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-C231OeHf.mjs";
4
+ import { a3 as _, a4 as w, c as R } from "./index-Bm6q0fMZ.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(
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@fileverse-dev/ddoc",
3
3
  "private": false,
4
4
  "description": "DDoc",
5
- "version": "4.6.5-ps.0",
5
+ "version": "4.6.5-ps.1",
6
6
  "main": "dist/index.es.js",
7
7
  "module": "dist/index.es.js",
8
8
  "exports": {