@dotit/editor 1.1.0 → 1.2.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/DocsToolbar.d.ts +12 -2
- package/dist/Ruler.d.ts +16 -2
- package/dist/TrustControl.d.ts +13 -0
- package/dist/block-props.d.ts +1 -1
- package/dist/index.cjs +25 -25
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.mjs +2111 -1513
- package/dist/index.mjs.map +1 -1
- package/dist/line-keymap.d.ts +2 -0
- package/dist/page-geometry.d.ts +7 -0
- package/dist/print.d.ts +3 -0
- package/dist/style.css +342 -14
- package/package.json +3 -3
package/dist/DocsToolbar.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { Editor } from "@tiptap/core";
|
|
2
|
+
import type { TrustState } from "./trust-state";
|
|
2
3
|
import type { TrustAction } from "./types";
|
|
3
4
|
interface Props {
|
|
4
5
|
editor: Editor | null;
|
|
@@ -6,12 +7,21 @@ interface Props {
|
|
|
6
7
|
onToggleRtl?: () => void;
|
|
7
8
|
/** Current .it source — used by the export actions. */
|
|
8
9
|
content: string;
|
|
10
|
+
/** Apply a new source (used by the self-contained trust control). */
|
|
11
|
+
onChange?: (source: string) => void;
|
|
9
12
|
theme: string;
|
|
10
13
|
onThemeChange: (theme: string) => void;
|
|
11
|
-
/**
|
|
14
|
+
/**
|
|
15
|
+
* Optional host override for the Trust control. When omitted the editor's own
|
|
16
|
+
* self-contained TrustControl handles sign/seal/verify/unseal via core.
|
|
17
|
+
*/
|
|
12
18
|
onTrustAction?: (action: TrustAction) => void;
|
|
19
|
+
/** Trust snapshot — drives the built-in TrustControl. */
|
|
20
|
+
trust?: TrustState;
|
|
21
|
+
/** verifyDocument().intact — null when not sealed. */
|
|
22
|
+
sealIntact?: boolean | null;
|
|
13
23
|
/** Sealed documents are read-only — formatting groups are disabled. */
|
|
14
24
|
locked?: boolean;
|
|
15
25
|
}
|
|
16
|
-
export declare function DocsToolbar({ editor, isRtl, onToggleRtl, content, theme, onThemeChange, onTrustAction, locked, }: Props): import("react/jsx-runtime").JSX.Element | null;
|
|
26
|
+
export declare function DocsToolbar({ editor, isRtl, onToggleRtl, content, onChange, theme, onThemeChange, onTrustAction, trust, sealIntact, locked, }: Props): import("react/jsx-runtime").JSX.Element | null;
|
|
17
27
|
export {};
|
package/dist/Ruler.d.ts
CHANGED
|
@@ -2,8 +2,22 @@ import type { PageGeometry } from "./page-geometry";
|
|
|
2
2
|
interface RulerProps {
|
|
3
3
|
geometry: PageGeometry;
|
|
4
4
|
zoom: number;
|
|
5
|
-
/** The scrollable canvas element — the ruler mirrors its
|
|
5
|
+
/** The scrollable canvas element — the ruler mirrors its scroll. */
|
|
6
6
|
scrollEl: React.RefObject<HTMLDivElement | null>;
|
|
7
|
+
/** Apply new margins (px) when a stop is dragged. Omit → read-only ruler. */
|
|
8
|
+
onMargins?: (next: {
|
|
9
|
+
top?: number;
|
|
10
|
+
right?: number;
|
|
11
|
+
bottom?: number;
|
|
12
|
+
left?: number;
|
|
13
|
+
}) => void;
|
|
14
|
+
/** Disable dragging (e.g. sealed document). */
|
|
15
|
+
locked?: boolean;
|
|
7
16
|
}
|
|
8
|
-
export declare function DocsRuler({ geometry, zoom, scrollEl }: RulerProps): import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
export declare function DocsRuler({ geometry, zoom, scrollEl, onMargins, locked, }: RulerProps): import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
export declare function DocsVerticalRuler({ geometry, zoom, scrollEl, onMargins, locked,
|
|
19
|
+
/** Extra px between the top of the scroll area and the page sheet top. */
|
|
20
|
+
topOffset, }: RulerProps & {
|
|
21
|
+
topOffset?: number;
|
|
22
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
9
23
|
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { TrustState } from "./trust-state";
|
|
2
|
+
interface Props {
|
|
3
|
+
/** Current .it source. */
|
|
4
|
+
content: string;
|
|
5
|
+
/** Apply a new source produced by a trust action. */
|
|
6
|
+
onChange: (source: string) => void;
|
|
7
|
+
/** Trust snapshot (drives the button label + which actions show). */
|
|
8
|
+
trust: TrustState;
|
|
9
|
+
/** verifyDocument().intact — null when not sealed. */
|
|
10
|
+
intact: boolean | null;
|
|
11
|
+
}
|
|
12
|
+
export declare function TrustControl({ content, onChange, trust, intact }: Props): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export {};
|
package/dist/block-props.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Extension } from "@tiptap/core";
|
|
2
2
|
import type { Editor } from "@tiptap/core";
|
|
3
3
|
/** Core property keys managed by the paragraph-level commands. */
|
|
4
|
-
export type BlockPropKey = "leading" | "space-before" | "space-after" | "end";
|
|
4
|
+
export type BlockPropKey = "leading" | "space-before" | "space-after" | "end" | "dir";
|
|
5
5
|
/**
|
|
6
6
|
* Extended Paragraph: a core `text:`/prose block. Adds the four core block
|
|
7
7
|
* properties as attributes and renders the `end:` value as the second side of
|