@inkbar/core 0.4.0 → 0.5.0
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/README.md +18 -7
- package/dist/dom.d.mts +142 -26
- package/dist/dom.d.mts.map +1 -1
- package/dist/dom.mjs +1277 -898
- package/dist/dom.mjs.map +1 -1
- package/dist/index.d.mts +3 -36
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +3 -3
- package/dist/index.mjs.map +1 -1
- package/dist/{signatures-BHYKTwYE.d.mts → signatures-BwaXi7C8.d.mts} +615 -611
- package/dist/signatures-BwaXi7C8.d.mts.map +1 -0
- package/dist/{signatures-DF2VmNVa.mjs → signatures-CMapTKrC.mjs} +1071 -281
- package/dist/signatures-CMapTKrC.mjs.map +1 -0
- package/package.json +4 -7
- package/dist/signatures-BHYKTwYE.d.mts.map +0 -1
- package/dist/signatures-DF2VmNVa.mjs.map +0 -1
- package/schema.json +0 -1356
package/README.md
CHANGED
|
@@ -49,13 +49,15 @@ const json = doc.exportAnnotations('json')
|
|
|
49
49
|
|
|
50
50
|
`file` can be a `File`, `Blob`, `Uint8Array`, a URL string, `{ url, key }` when the URL is signed and changes between loads, or `{ data, key }` for bytes you want to identify. `quads` is a list of quads in PDF user space.
|
|
51
51
|
|
|
52
|
+
`exportAnnotations('json')` returns a [Gloss](https://gloss-format.org) document, an open JSON format for PDF annotations, and `importAnnotations` reads one. Gloss has no loupe, mask, pen pressure or free-text border colour, so Inkbar writes them under `custom.inkbar`. It writes a loupe as a circle and a mask as a circle or square, so other Gloss readers can still draw them. Inkbar leaves your own keys under `custom` as they are. In the store and the API, loupes, masks, `pressure` and `borderColor` keep their plain names.
|
|
53
|
+
|
|
52
54
|
Writing annotations back into the PDF needs `@inkbar/engine`, which is not released yet. Until then `save()` rejects with `EngineUnavailable`. Persist `exportAnnotations('json')` instead and re-import it on the next open. `doc.key` stays the same between opens only when you open with a key: a URL string, `{ url, key }` or `{ data, key }`. A `File`, `Blob` or raw bytes get a new random key each time.
|
|
53
55
|
|
|
54
56
|
The DOM layer (`@inkbar/core/dom`) provides the viewport, canvas renderer, text layer, overlay and tools for hosts without a framework package. Vue hosts should use [`@inkbar/vue`](https://github.com/inkbar/inkbar/tree/main/packages/vue), React hosts [`@inkbar/react`](https://github.com/inkbar/inkbar/tree/main/packages/react), Svelte hosts [`@inkbar/svelte`](https://github.com/inkbar/inkbar/tree/main/packages/svelte).
|
|
55
57
|
|
|
56
58
|
### Without a framework
|
|
57
59
|
|
|
58
|
-
`createViewer` opens a document and renders it into an element, with a comment thread popover for notes and highlights
|
|
60
|
+
`createViewer` opens a document and renders it into an element, with a comment thread popover for notes and highlights. The toolbars are yours: build them from the controls below, which use the same markup as the framework packages, so `@inkbar/theme` styles them.
|
|
59
61
|
|
|
60
62
|
```ts
|
|
61
63
|
import {
|
|
@@ -101,7 +103,7 @@ viewer.open(lockedFile, { password }) // this password applies to this load only
|
|
|
101
103
|
viewer.destroy()
|
|
102
104
|
```
|
|
103
105
|
|
|
104
|
-
It takes the [`mountViewer` options](#mounting-a-viewer) except `container` and `document`, plus `source` and `assets` (both required), `password`, `defaults`, `history`, `onReady` and `onError`. Set `threads`
|
|
106
|
+
It takes the [`mountViewer` options](#mounting-a-viewer) except `container` and `document`, plus `source` and `assets` (both required), `password`, `defaults`, `history`, `onReady` and `onError`. Set `threads` to `false` to leave out the thread popover. `viewer.status`, `viewer.document`, `viewer.engine`, `viewer.viewport` and `viewer.tools` are readables; the last two change when the engine rebuilds. `viewer.activated` is a readable too: the id of the annotation the user last clicked or activated with Enter, or `null`. `viewer.setActivated(id)` activates one from your code without calling `onActivate`; it ignores an id the document doesn't have, and `setActivated(null)` clears it. A password you pass to `open` replaces the `createViewer` one for that load. The controls are `createToolButton`, `createUndo`, `createRedo`, `createZoomIn`, `createZoomOut`, `createZoomSelect`, `createPageInput`, `createPageCount`, `createPrevPage` and `createNextPage`. Each one disables itself while no document is ready and lives as long as its viewer. Buttons show an icon from [`@inkbar/icons`](https://github.com/inkbar/inkbar/tree/main/packages/icons). Replace their children with your own icon and the accessible name stays; `createIcon` draws any `@inkbar/icons` icon for your own buttons. `createToolbar` gives one Tab stop to all its buttons, with arrow keys between them, and `createToolbarSeparator` divides groups of controls in it. An input, select or textarea you add keeps its arrow keys and its own `tabindex`: it is a Tab stop unless you give it `tabindex="-1"`.
|
|
105
107
|
|
|
106
108
|
`createViewer` reads the theme's colours from the element you pass, so that element needs to be in the page when you call it.
|
|
107
109
|
|
|
@@ -130,11 +132,14 @@ Options:
|
|
|
130
132
|
- `gap`, `buffer` and `customAnnotations` are fixed for a build. Change them with `engine.rebuild`.
|
|
131
133
|
- `toolOptions` holds the tools' options, such as the shape kind. Pass one from `createToolOptions()` and keep it to carry the options over to the next document; `createViewer` keeps one for its whole life. The tool style (colours, line style, text style) belongs to the document: each new document starts from the theme's defaults.
|
|
132
134
|
- `signatures` is where saved signatures live (see [Signatures](#signatures)); `signatureFonts` lists the handwriting fonts a typed signature offers.
|
|
135
|
+
- `decorateAnnotation(annotation)` returns your own `data`, `classes` and `description` for an annotation's element, or `undefined`. `{ data: { 'my-flag': 'on' } }` writes `data-my-flag="on"`, and `description` becomes the element's `aria-description`. Inkbar re-applies them whenever the annotations change. Call `engine.redecorate()` when they depend on anything else. Core's own attributes and `ink-` classes always win.
|
|
133
136
|
- `onActivate(id)` fires when the user activates an annotation.
|
|
134
137
|
- `onBuild(viewport, tools)` fires after every build, the first one included, before `mountViewer` returns. Subscribe to the new viewport and tool controller here.
|
|
135
138
|
- `onPageMount(page, mount, host)` and `onPageUnmount(page)` fire as pages enter and leave the mounted range.
|
|
136
139
|
- `onPageError(page, error)` reports a page whose canvas or text layer failed, and `onPageError(page, null)` once every failed layer renders again. Unmounting a failed page emits no `null`, so clear any per-page error in `onPageUnmount`.
|
|
137
140
|
|
|
141
|
+
To open your own card next to an annotation, use `createPopover`: it anchors a panel to the annotation's element, follows it as pages mount and unmount, and calls your `onDismiss` on Escape or a press outside. `placePanel` positions a panel against any other rectangle.
|
|
142
|
+
|
|
138
143
|
The viewport mounts pages synchronously, so a build's page callbacks fire before its `onBuild`. During a rebuild, `engine.viewport` and `engine.tools` still point at the destroyed objects while those callbacks run. Read the arguments instead, or wait for `onBuild`.
|
|
139
144
|
|
|
140
145
|
## Annotation changes
|
|
@@ -164,16 +169,22 @@ A callout's corner handles resize its text box: the tip and bend stay, and the p
|
|
|
164
169
|
|
|
165
170
|
## Limits of PDF import
|
|
166
171
|
|
|
167
|
-
Inkbar reads the annotations embedded in a PDF through PDF.js, which passes on only part of each one. Import keeps `intent` (`/IT`) for every type.
|
|
172
|
+
Inkbar reads the annotations embedded in a PDF through PDF.js, which passes on only part of each one. Import keeps `intent` (`/IT`) for every type. Once the document is ready, Inkbar reads from the file itself the fields PDF.js leaves out: a FreeText's `callout`, `fringe`, `head` and font, and a note's icon. They arrive as one `replace` change with `reason: 'embedded'`. That change adds no undo step and keeps the undo history.
|
|
173
|
+
|
|
174
|
+
Inkbar does not read callout, icon or font fields from encrypted PDFs, from annotations stored as direct objects, or from a file with a broken cross-reference table.
|
|
168
175
|
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
- Keep line endings Inkbar does not know. PDF.js turns them into `None`. Annotations loaded from JSON keep them.
|
|
176
|
+
One gap remains:
|
|
177
|
+
|
|
178
|
+
- Keep line endings Inkbar does not know on lines and polylines. PDF.js turns them into `None`. Annotations loaded from JSON keep them.
|
|
172
179
|
|
|
173
180
|
## Tools and keyboard
|
|
174
181
|
|
|
175
182
|
`createToolController` from `@inkbar/core/dom` routes pointer and key events on the viewport to the active tool: `select-text`, `select`, `highlight`, `redact-area`, `sketch`, `draw`, `shape`, `freetext`, `signature` or `note`. Highlights, text redactions, notes and signatures can be made from the keyboard. Area redactions, sketches and drawings need a pointer.
|
|
176
183
|
|
|
184
|
+
Most creation tools are one-shot: `shape`, `freetext`, `note`, `redact-area` and `signature` each make one thing, select it, then hand back to `select-text`. After a one-shot tool has made something, a press on empty page or `Escape` clears the selection and switches to `select-text` without making anything more. The press that closes a new text box, or a new note's popover, counts as that press too. Until then, what it made keeps its edit handles: drag it to move it, drag a handle to resize it, and the tool stays on. A press on another annotation switches to `select-text` and selects it, and a drag moves it. Removing what the tool made (`Delete`, undo, or a controlled host refusing the add) leaves the tool on for another go, and the selection moving to something else switches to `select-text`. Picking a tool again starts it afresh. While the tool waits for that press, the viewport carries `data-ink-made`. `draw`, `sketch` and `highlight` are sticky: they stay on until you pick another tool.
|
|
185
|
+
|
|
186
|
+
A host tool says which it is with `kind: 'one-shot' | 'sticky'` (no `kind` is sticky). A one-shot tool adds and selects what it makes, then calls `ctx.made(ids)`; `ctx.done()` clears the selection and switches to `select-text` itself. Under a sticky tool, `ctx.made` does nothing. The controller's `active` readable reports every switch, including one a one-shot tool makes.
|
|
187
|
+
|
|
177
188
|
| Where focus is | Key | Effect |
|
|
178
189
|
| ---------------------------- | ----------------------------------- | --------------------------------------------------------------------------------------------------- |
|
|
179
190
|
| Viewport, `highlight` tool | `Enter` | Turns the text selection into a highlight |
|
|
@@ -213,7 +224,7 @@ The `shape` tool's `loupe` kind adds a loupe: a circle that shows the page under
|
|
|
213
224
|
|
|
214
225
|
The `shape` tool's `mask` and `ovalMask` kinds add a mask: the page is dimmed everywhere outside a rectangle or an ellipse (`shape: 'rect' | 'ellipse'`), by `dim` (0 to 1, 0.5 by default) in black. A drag sizes it, with `Shift` for a square or circle, and a click places one 72 pt across. Like the loupe it needs a pointer: `Enter` places no mask. A page has one mask: adding a second replaces the first in the same undo step, and in a controlled store in the same `onChange`. The dimming is an SVG (`svg[data-ink-mask-layer]`) between the page and the annotation overlay that never takes the pointer; the mask annotation's own element is the shape, and only a thin band along its edge takes presses. Inside the shape the page works as usual: select text, highlight it, add shapes or notes. The style controls have nothing to change on a mask.
|
|
215
226
|
|
|
216
|
-
With either select tool (`select-text` or `select`), a selected area redaction, text box, shape, loupe, mask, polyline, polygon or drawing shows four corner handles (`.ink-handle[data-handle="nw|ne|sw|se"]`), and a selected line shows one on each end (`data-handle="start|end"`). Dragging a corner resizes the annotation, scaling its points with it; `Shift` keeps its aspect ratio. Dragging a line end moves that end only. The store records a single update on release. Drag the annotation itself to move it, or any member of a multi-selection to move them all in one undo step. Text markup in the selection stays on its text unless it is the one you drag.
|
|
227
|
+
With either select tool (`select-text` or `select`), or on what a one-shot tool just made, a selected area redaction, text box, shape, loupe, mask, polyline, polygon or drawing shows four corner handles (`.ink-handle[data-handle="nw|ne|sw|se"]`), and a selected line shows one on each end (`data-handle="start|end"`). Dragging a corner resizes the annotation, scaling its points with it; `Shift` keeps its aspect ratio. Dragging a line end moves that end only. The store records a single update on release. Drag the annotation itself to move it, or any member of a multi-selection to move them all in one undo step. Text markup in the selection stays on its text unless it is the one you drag.
|
|
217
228
|
|
|
218
229
|
A press on text markup (a highlight, underline, strikeout or squiggly) does nothing at first. A click selects it; a drag selects the text under it, as a drag on the bare text would. Presses on every other annotation select it straight away.
|
|
219
230
|
|
package/dist/dom.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { D as OpenOptions, E as InkStatus, H as AnnotationStore, M as InkError, Rt as NoteAnnotation, T as InkDocument, _ as StyleGroup, a as SignatureStore, b as ToolStyle, cn as PageInfo, dn as Matrix, fn as Point, g as ScopedToolStyle, i as SignatureOptions, it as cssVariableDefaults, j as DocumentSource, jt as LineEnding, m as CurrentStyle, mn as Rect, o as SignatureTemplate, pn as Quad, r as SignatureLibrary, rn as Readable, rt as AnnotationDefaults, st as Annotation, tn as TextMarkupAnnotation, un as PdfAssets, v as StyleKey, y as StyleProps, yt as FreeTextAnnotation } from "./signatures-BwaXi7C8.mjs";
|
|
2
2
|
import { IconNode } from "@inkbar/icons";
|
|
3
3
|
//#region src/dom/transform.d.ts
|
|
4
4
|
type ViewRotation = 0 | 90 | 180 | 270;
|
|
@@ -256,16 +256,38 @@ interface OverlayOptions {
|
|
|
256
256
|
document?: InkDocument;
|
|
257
257
|
/** Fixed device pixel ratio for loupes; `window.devicePixelRatio` when omitted. */
|
|
258
258
|
devicePixelRatio?: number;
|
|
259
|
+
/**
|
|
260
|
+
* The app's own data attributes, classes and description for an annotation's element, read
|
|
261
|
+
* whenever the annotations change and on `redecorate`. Core's own attributes and `ink-`
|
|
262
|
+
* classes win over them.
|
|
263
|
+
*/
|
|
264
|
+
decorate?: DecorateAnnotation;
|
|
265
|
+
}
|
|
266
|
+
/**
|
|
267
|
+
* Data attributes, classes and a description an app adds to an annotation's element, to style
|
|
268
|
+
* or find its own marks. Each `data` key is written as `data-<key>`.
|
|
269
|
+
*/
|
|
270
|
+
interface AnnotationDecoration {
|
|
271
|
+
/** Written as data-<key>; keys are lower-case kebab (/^[a-z][a-z0-9-]*$/). */
|
|
272
|
+
data?: Readonly<Record<string, string>>;
|
|
273
|
+
classes?: readonly string[];
|
|
274
|
+
/**
|
|
275
|
+
* Extra words screen readers announce after the element's label, such as "Needs review".
|
|
276
|
+
* Written as `aria-description`.
|
|
277
|
+
*/
|
|
278
|
+
description?: string;
|
|
259
279
|
}
|
|
280
|
+
/** Returns the decoration for an annotation's element, or undefined for none. */
|
|
281
|
+
type DecorateAnnotation = (annotation: Annotation) => AnnotationDecoration | undefined;
|
|
260
282
|
interface Overlay {
|
|
261
283
|
readonly element: HTMLElement;
|
|
262
284
|
/** Repositions every element and redraws content for a new zoom or rotation. */
|
|
263
285
|
update(transform: PageTransform): void;
|
|
264
286
|
elementFor(id: string): HTMLElement | undefined;
|
|
287
|
+
/** Runs `decorate` again for every element, for when its output changed but no annotation did. */
|
|
288
|
+
redecorate(): void;
|
|
265
289
|
destroy(): void;
|
|
266
290
|
}
|
|
267
|
-
/** The `data-confidence` bucket for a suggested redaction; undefined for everything else. */
|
|
268
|
-
export declare function confidenceAttr(a: Annotation): 'low' | 'medium' | 'high' | undefined;
|
|
269
291
|
export declare function createOverlay(opts: OverlayOptions): Overlay;
|
|
270
292
|
//#endregion
|
|
271
293
|
//#region src/dom/overlay-render.d.ts
|
|
@@ -287,6 +309,8 @@ interface PageMountOptions {
|
|
|
287
309
|
store: AnnotationStore;
|
|
288
310
|
onActivate?(id: string): void;
|
|
289
311
|
isCustom?(a: Annotation): boolean;
|
|
312
|
+
/** The app's data attributes and classes for each annotation element (see `OverlayOptions`). */
|
|
313
|
+
decorate?: DecorateAnnotation;
|
|
290
314
|
/** Defaults to `window.devicePixelRatio`. */
|
|
291
315
|
devicePixelRatio?: number;
|
|
292
316
|
/**
|
|
@@ -328,6 +352,11 @@ export declare function createToolOptions(tools?: readonly Tool[]): ToolOptions;
|
|
|
328
352
|
type BuiltinToolId = 'select-text' | 'select' | 'highlight' | 'redact-area' | 'note' | 'shape' | 'freetext' | 'draw' | 'sketch' | 'signature';
|
|
329
353
|
/** A built-in tool's id, or any id a host registers its own tool under. */
|
|
330
354
|
type ToolId = BuiltinToolId | (string & {});
|
|
355
|
+
/**
|
|
356
|
+
* A one-shot tool switches back to `select-text` once it has made something and the user moves
|
|
357
|
+
* on; a sticky tool stays on. A tool without a kind is sticky.
|
|
358
|
+
*/
|
|
359
|
+
type ToolKind = 'one-shot' | 'sticky';
|
|
331
360
|
interface PageHit extends ViewportHit {
|
|
332
361
|
/** Pointer position in user space. */
|
|
333
362
|
user: Point;
|
|
@@ -356,9 +385,18 @@ interface ToolContext {
|
|
|
356
385
|
};
|
|
357
386
|
/** The signature templates the `signature` tool places. Without it, it places nothing. */
|
|
358
387
|
signatures?: SignatureLibrary | undefined;
|
|
388
|
+
/**
|
|
389
|
+
* A one-shot tool reports what it just made, already added and selected. Does nothing under
|
|
390
|
+
* a sticky tool or with an empty list.
|
|
391
|
+
*/
|
|
392
|
+
made(ids: readonly string[]): void;
|
|
393
|
+
/** Clears the selection and switches to `select-text`. */
|
|
394
|
+
done(): void;
|
|
359
395
|
}
|
|
360
396
|
interface Tool<O extends object = object> {
|
|
361
397
|
id: ToolId;
|
|
398
|
+
/** Default sticky. */
|
|
399
|
+
kind?: ToolKind;
|
|
362
400
|
cursor: string;
|
|
363
401
|
/** Style group the tool creates into; select tools have none. */
|
|
364
402
|
styleGroup?: StyleGroup;
|
|
@@ -395,8 +433,11 @@ interface ToolController {
|
|
|
395
433
|
destroy(): void;
|
|
396
434
|
}
|
|
397
435
|
interface ToolControllerOptions {
|
|
398
|
-
/**
|
|
399
|
-
|
|
436
|
+
/**
|
|
437
|
+
* The controller adds `options`, `made` and `done`; `toolStyle` defaults to one of the
|
|
438
|
+
* controller's own.
|
|
439
|
+
*/
|
|
440
|
+
ctx: Omit<ToolContext, 'toolStyle' | 'options' | 'made' | 'done'> & {
|
|
400
441
|
toolStyle?: ToolStyle;
|
|
401
442
|
};
|
|
402
443
|
/** Default `'select-text'`. */
|
|
@@ -628,9 +669,11 @@ interface ColorMenuModel {
|
|
|
628
669
|
}
|
|
629
670
|
/**
|
|
630
671
|
* What a colour menu shows for a style: the palette with the matching swatch checked, "No fill"
|
|
631
|
-
* for `fill`, and the trigger's swatch. Shared by the bindings and the vanilla menu.
|
|
672
|
+
* for `fill`, and the trigger's swatch. Shared by the bindings and the vanilla menu. `fallback`
|
|
673
|
+
* is the colour new annotations get while the style leaves it unset: the trigger shows it
|
|
674
|
+
* rather than an empty swatch.
|
|
632
675
|
*/
|
|
633
|
-
export declare function colorMenuModel(property: ColorProperty, current: CurrentStyle, supported: ReadonlySet<StyleKey
|
|
676
|
+
export declare function colorMenuModel(property: ColorProperty, current: CurrentStyle, supported: ReadonlySet<StyleKey>, fallback?: string): ColorMenuModel;
|
|
634
677
|
/** A typed size as the menu stores it: a whole number of points within the range. */
|
|
635
678
|
export declare function clampFontSize(size: number): number;
|
|
636
679
|
type TextToggleKey = 'bold' | 'italic' | 'underline';
|
|
@@ -739,10 +782,6 @@ interface AnnotationSlotProps {
|
|
|
739
782
|
locked: boolean;
|
|
740
783
|
select: () => void;
|
|
741
784
|
remove: () => void;
|
|
742
|
-
/** Turns a suggested redaction into the user's own. No-op for anything else. */
|
|
743
|
-
accept: () => void;
|
|
744
|
-
/** Removes a suggested redaction. No-op for anything else. */
|
|
745
|
-
dismiss: () => void;
|
|
746
785
|
}
|
|
747
786
|
/** The thread popover's accessible name: "Note thread" for a note, "Comment thread" for markup. */
|
|
748
787
|
export declare function threadPopoverLabel(root: Pick<Annotation, 'type'>): string;
|
|
@@ -760,15 +799,6 @@ interface ThreadPopoverSlotProps {
|
|
|
760
799
|
remove: () => void;
|
|
761
800
|
close: () => void;
|
|
762
801
|
}
|
|
763
|
-
/** What a host-rendered suggestion card receives. */
|
|
764
|
-
interface SuggestionCardSlotProps {
|
|
765
|
-
annotation: RedactAnnotation;
|
|
766
|
-
suggestion: Suggestion | undefined;
|
|
767
|
-
bucket: ConfidenceBucket | undefined;
|
|
768
|
-
accept: () => void;
|
|
769
|
-
dismiss: () => void;
|
|
770
|
-
close: () => void;
|
|
771
|
-
}
|
|
772
802
|
/** The signature controls' words, shared so every binding announces the same names. */
|
|
773
803
|
export declare const SIGNATURE_LABELS: {
|
|
774
804
|
/** The menu's group and main button. */
|
|
@@ -828,19 +858,30 @@ interface FreeTextEditor {
|
|
|
828
858
|
/** Closes the editor, handing its text to `commit` (true) or calling `cancel` (false). */
|
|
829
859
|
close(commit: boolean): void;
|
|
830
860
|
}
|
|
861
|
+
/**
|
|
862
|
+
* What closed an editor: Escape, a press outside it, focus leaving it, or a call to `close`
|
|
863
|
+
* (a redraw, the page unmounting, the box being removed, a tool switch).
|
|
864
|
+
*/
|
|
865
|
+
type EditorCloseReason = 'escape' | 'press' | 'focus' | 'api';
|
|
831
866
|
interface FreeTextEditorOptions {
|
|
832
867
|
transform: PageTransform;
|
|
833
868
|
/**
|
|
834
869
|
* The edited text and the box's rect, grown to fit it (`grownFreeText`), in user space.
|
|
835
870
|
* `grown` is the growth alone, in CSS px (0 when the box kept its height), for a caller whose
|
|
836
|
-
* box may have moved or been resized while the editor was open.
|
|
871
|
+
* box may have moved or been resized while the editor was open. `how` says what closed it.
|
|
837
872
|
*/
|
|
838
|
-
commit(contents: string, rect: Rect, grown: number): void;
|
|
873
|
+
commit(contents: string, rect: Rect, grown: number, how: EditorCloseReason): void;
|
|
839
874
|
cancel(): void;
|
|
875
|
+
/** Where to put the caret, a client point (a click on the box); at the end when absent. */
|
|
876
|
+
caret?: {
|
|
877
|
+
clientX: number;
|
|
878
|
+
clientY: number;
|
|
879
|
+
} | undefined;
|
|
840
880
|
}
|
|
841
881
|
/**
|
|
842
882
|
* Opens an editor on `el`, the overlay element showing `a` (or a stand-in for a box not in the
|
|
843
|
-
* store yet)
|
|
883
|
+
* store yet), with the caret at `opts.caret` or after the text. `Escape` commits; a press
|
|
884
|
+
* outside the editor, or focus leaving it, commits too.
|
|
844
885
|
* Closing while the editor has focus hands focus to `el`. Keys typed in the
|
|
845
886
|
* editor stop there, so no viewport or tool shortcut sees them. Opening a second editor on the
|
|
846
887
|
* same element commits the first.
|
|
@@ -908,6 +949,54 @@ interface FocusReturn {
|
|
|
908
949
|
}
|
|
909
950
|
export declare function createFocusReturn(opts: FocusReturnOptions): FocusReturn;
|
|
910
951
|
//#endregion
|
|
952
|
+
//#region src/dom/viewer/popover.d.ts
|
|
953
|
+
/** Options for `createPopover`. */
|
|
954
|
+
interface PopoverOptions {
|
|
955
|
+
/** The viewer root (`[data-ink-root]`): anchors are looked up and focus returns inside it. */
|
|
956
|
+
root: HTMLElement;
|
|
957
|
+
/**
|
|
958
|
+
* Attributes for the panel, such as `class`, `aria-label` or the app's own `data-*` keys.
|
|
959
|
+
* `role` and `data-ink-popover` are always set by `createPopover`.
|
|
960
|
+
*/
|
|
961
|
+
attrs: Record<string, string>;
|
|
962
|
+
/** Where focus goes when the panel hides: `createFocusReturn` over the same root. */
|
|
963
|
+
focusReturn: FocusReturn;
|
|
964
|
+
/**
|
|
965
|
+
* Called on Escape inside the panel or the viewer, and on a press outside the panel that will
|
|
966
|
+
* not activate another annotation. Hide the panel (or clear the activation) here.
|
|
967
|
+
*/
|
|
968
|
+
onDismiss(): void;
|
|
969
|
+
}
|
|
970
|
+
/** A panel anchored to one annotation at a time; see `createPopover`. */
|
|
971
|
+
interface Popover {
|
|
972
|
+
/** The panel element, on `<body>`. Fill it with the card's content. */
|
|
973
|
+
readonly panel: HTMLElement;
|
|
974
|
+
/** The anchored annotation's element, or null while it is not in the DOM (page unmounted). */
|
|
975
|
+
readonly anchor: HTMLElement | null;
|
|
976
|
+
/**
|
|
977
|
+
* Anchors the panel to annotation `id`. The panel shows whenever that annotation's element
|
|
978
|
+
* is in the DOM, and follows it when it is replaced.
|
|
979
|
+
*/
|
|
980
|
+
show(id: string): void;
|
|
981
|
+
/** Hides the panel, then returns focus through `focusReturn`. */
|
|
982
|
+
hide(): void;
|
|
983
|
+
/** Removes the panel and its listeners. */
|
|
984
|
+
destroy(): void;
|
|
985
|
+
}
|
|
986
|
+
/**
|
|
987
|
+
* Positions `panel` (fixed) below the `anchor` rectangle, or above it when only that fits,
|
|
988
|
+
* kept inside the window. For panels anchored to something other than an annotation.
|
|
989
|
+
*/
|
|
990
|
+
export declare function placePanel(panel: HTMLElement, anchor: DOMRect): void;
|
|
991
|
+
/**
|
|
992
|
+
* Creates a non-modal `role="dialog"` panel on `<body>`, marked `data-ink-popover` so the theme
|
|
993
|
+
* gives it its tokens, that an app anchors to an annotation with `show(id)` (for instance on
|
|
994
|
+
* `viewer.activated`). The panel follows the annotation's element as pages mount and unmount:
|
|
995
|
+
* it hides while the element is gone and comes back with it. Tab loops inside the panel, and
|
|
996
|
+
* Escape or a press outside calls `onDismiss`. Call `destroy` when done.
|
|
997
|
+
*/
|
|
998
|
+
export declare function createPopover(opts: PopoverOptions): Popover;
|
|
999
|
+
//#endregion
|
|
911
1000
|
//#region src/dom/viewer-engine.d.ts
|
|
912
1001
|
interface MountViewerOptions {
|
|
913
1002
|
container: HTMLElement;
|
|
@@ -968,6 +1057,14 @@ interface MountViewerOptions {
|
|
|
968
1057
|
signatureFonts?: string[];
|
|
969
1058
|
/** Annotation content is rendered by the host (custom slots). Changing it needs `rebuild`. */
|
|
970
1059
|
customAnnotations?: boolean;
|
|
1060
|
+
/**
|
|
1061
|
+
* The app's own data attributes, classes and description for each annotation element, to
|
|
1062
|
+
* style or find its marks: `{ data: { 'my-flag': 'on' } }` writes `data-my-flag="on"`.
|
|
1063
|
+
* Decorations re-apply whenever the annotations change; when the function's output changes
|
|
1064
|
+
* for another reason (app state it reads), call `redecorate()`. Core's attributes and `ink-`
|
|
1065
|
+
* classes cannot be overridden.
|
|
1066
|
+
*/
|
|
1067
|
+
decorateAnnotation?: DecorateAnnotation;
|
|
971
1068
|
onActivate?(id: string): void;
|
|
972
1069
|
/**
|
|
973
1070
|
* After every (re)build: subscribe to the new viewport and controller here. It fires inside
|
|
@@ -1017,6 +1114,11 @@ interface ViewerEngine {
|
|
|
1017
1114
|
buffer?: number;
|
|
1018
1115
|
customAnnotations?: boolean;
|
|
1019
1116
|
}): void;
|
|
1117
|
+
/**
|
|
1118
|
+
* Runs `decorateAnnotation` again for every mounted annotation element, without re-rendering
|
|
1119
|
+
* anything else. Call it when the decorations would change but no annotation did.
|
|
1120
|
+
*/
|
|
1121
|
+
redecorate(): void;
|
|
1020
1122
|
destroy(): void;
|
|
1021
1123
|
}
|
|
1022
1124
|
export declare function mountViewer(opts: MountViewerOptions): ViewerEngine;
|
|
@@ -1037,8 +1139,6 @@ interface CreateViewerOptions extends Omit<MountViewerOptions, 'container' | 'do
|
|
|
1037
1139
|
history?: OpenOptions['history'];
|
|
1038
1140
|
/** The thread popover for notes and text markup. Default true. */
|
|
1039
1141
|
threads?: boolean;
|
|
1040
|
-
/** Suggested-redaction card. Default true. */
|
|
1041
|
-
suggestions?: boolean;
|
|
1042
1142
|
onReady?(this: void, doc: InkDocument): void;
|
|
1043
1143
|
onError?(this: void, error: InkError): void;
|
|
1044
1144
|
}
|
|
@@ -1055,6 +1155,18 @@ interface Viewer {
|
|
|
1055
1155
|
*/
|
|
1056
1156
|
readonly viewport: Readable<Viewport | null>;
|
|
1057
1157
|
readonly tools: Readable<ToolController | null>;
|
|
1158
|
+
/**
|
|
1159
|
+
* The activated annotation's id: the one last clicked, or activated with Enter or Space.
|
|
1160
|
+
* The note thread opens from it, and an app can anchor its own popover (`createPopover`) to
|
|
1161
|
+
* it. `null` when none is, and again once that annotation is removed or the document closes.
|
|
1162
|
+
*/
|
|
1163
|
+
readonly activated: Readable<string | null>;
|
|
1164
|
+
/**
|
|
1165
|
+
* Activates annotation `id`, or clears the activation with `null` (closing the thread
|
|
1166
|
+
* popover). Unlike a click, it does not select the annotation or call `onActivate`. An id
|
|
1167
|
+
* not in the open document's annotations is ignored.
|
|
1168
|
+
*/
|
|
1169
|
+
setActivated(id: string | null): void;
|
|
1058
1170
|
/**
|
|
1059
1171
|
* Opens another document in place; the previous one is destroyed. Latest call wins.
|
|
1060
1172
|
* `password` is used for this load only; without it, the constructor's `password` applies.
|
|
@@ -1123,6 +1235,8 @@ interface ColorMenuOptions {
|
|
|
1123
1235
|
* colour whatever tool is active, and recolours the selection only when it is all in the group.
|
|
1124
1236
|
*/
|
|
1125
1237
|
group?: StyleGroup;
|
|
1238
|
+
/** The colour new annotations get while the style leaves it unset; the trigger shows it. */
|
|
1239
|
+
fallback?: Readable<string | undefined>;
|
|
1126
1240
|
}
|
|
1127
1241
|
/** A button that opens a colour menu for one colour property of the selection or tool. */
|
|
1128
1242
|
export declare function createColorMenu(viewer: Viewer, opts: ColorMenuOptions): HTMLButtonElement;
|
|
@@ -1156,6 +1270,8 @@ interface MenuOptions {
|
|
|
1156
1270
|
* focusable one.
|
|
1157
1271
|
*/
|
|
1158
1272
|
role?: 'menu' | 'dialog';
|
|
1273
|
+
/** The element the panel lines up under. Default `trigger`; a split button passes itself. */
|
|
1274
|
+
anchor?: HTMLElement;
|
|
1159
1275
|
/**
|
|
1160
1276
|
* Whether `target` belongs to a menu nested in this one (its panel sits outside this panel
|
|
1161
1277
|
* in the DOM). Presses, focus and Escape inside it neither dismiss this menu nor close it.
|
|
@@ -1295,5 +1411,5 @@ export declare function createSignatureDialog(viewer: Viewer, opts?: SignatureDi
|
|
|
1295
1411
|
export declare function createSignaturePreview(t: SignatureTemplate): HTMLElement;
|
|
1296
1412
|
export declare function createSignatureMenu(viewer: Viewer, opts?: SignatureDialogOptions): HTMLElement;
|
|
1297
1413
|
//#endregion
|
|
1298
|
-
export { type AnnotationSlotProps, type AnnotationState, type ArrowheadChoice, type BuiltinToolId, type ColorMenuModel, type ColorMenuOptions, type ColorMenuSwatch, type ColorProperty, type ColorTrigger, type CreateViewerOptions, type CssLayout, type CssLayoutInput, type CssPageBox, type CssRect, type CurrentStyle, type FocusReturn, type FocusReturnOptions, type FreeTextEditor, type FreeTextEditorOptions, type HighlightMenuItem, type HighlightMenuModel, type HighlightOptions, type LayoutMode, type LineStyleMenuItem, type LineStyleMenuModel, type LineStyleMenuSection, type MarkupKind, type Menu, type MenuOptions, type MountViewerOptions, type Overlay, type OverlayOptions, type PageHit, type PageLayer, type PageMount, type PageMountOptions, type PageRenderer, type PageRendererOptions, type PageTransform, type Palette, type ScopedToolStyle, type SelectionQuads, type ShapeKind, type ShapeMenuItem, type ShapeMenuModel, type ShapeOptions, type SignatureDialog, type SignatureDialogOptions, type SignatureDraft, type SignatureDraftState, type SignatureMenuItem, type SignatureMenuModel, type SignatureOptions, type SignaturePad, type SignatureTab, type StyleGroup, type StyleKey, type StyleProps, type
|
|
1414
|
+
export { type AnnotationDecoration, type AnnotationSlotProps, type AnnotationState, type ArrowheadChoice, type BuiltinToolId, type ColorMenuModel, type ColorMenuOptions, type ColorMenuSwatch, type ColorProperty, type ColorTrigger, type CreateViewerOptions, type CssLayout, type CssLayoutInput, type CssPageBox, type CssRect, type CurrentStyle, type DecorateAnnotation, type EditorCloseReason, type FocusReturn, type FocusReturnOptions, type FreeTextEditor, type FreeTextEditorOptions, type HighlightMenuItem, type HighlightMenuModel, type HighlightOptions, type LayoutMode, type LineStyleMenuItem, type LineStyleMenuModel, type LineStyleMenuSection, type MarkupKind, type Menu, type MenuOptions, type MountViewerOptions, type Overlay, type OverlayOptions, type PageHit, type PageLayer, type PageMount, type PageMountOptions, type PageRenderer, type PageRendererOptions, type PageTransform, type Palette, type Popover, type PopoverOptions, type ScopedToolStyle, type SelectionQuads, type ShapeKind, type ShapeMenuItem, type ShapeMenuModel, type ShapeOptions, type SignatureDialog, type SignatureDialogOptions, type SignatureDraft, type SignatureDraftState, type SignatureMenuItem, type SignatureMenuModel, type SignatureOptions, type SignaturePad, type SignatureTab, type StyleGroup, type StyleKey, type StyleProps, type TextAlignChoice, type TextAlignKey, type TextLayerHandle, type TextLayerOptions, type TextStyleMenuModel, type TextStyleToggle, type TextToggleKey, type ThreadPopoverSlotProps, type Tool, type ToolContext, type ToolController, type ToolControllerOptions, type ToolId, type ToolKind, type ToolOptions, type ToolStyle, type ToolStyleTracker, type TypedSignatureOptions, type ViewRotation, type Viewer, type ViewerEngine, type Viewport, type ViewportHit, type ViewportKeysOptions, type ViewportOptions, type ZoomValue, cssVariableDefaults };
|
|
1299
1415
|
//# sourceMappingURL=dom.d.mts.map
|
package/dist/dom.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dom.d.mts","names":[],"sources":["../src/dom/transform.ts","../src/dom/layout.ts","../src/dom/viewport.ts","../src/dom/viewport-keys.ts","../src/dom/page-renderer.ts","../src/dom/text-layer.ts","../src/dom/selection.ts","../src/dom/overlay.ts","../src/dom/overlay-render.ts","../src/dom/page-mount.ts","../src/dom/tools/options.ts","../src/dom/tools/controller.ts","../src/dom/tools/freetext.ts","../src/dom/tools/highlight.ts","../src/dom/tools/note.ts","../src/dom/tools/redact-area.ts","../src/dom/tools/select.ts","../src/dom/tools/select-text.ts","../src/model/annotations/shape-geometry.ts","../src/dom/tools/shape.ts","../src/dom/tools/signature.ts","../src/dom/tools/index.ts","../src/dom/ui.ts","../src/dom/palette.ts","../src/dom/freetext-editor.ts","../src/dom/menu-keys.ts","../src/dom/annotation-element.ts","../src/dom/popover-focus.ts","../src/dom/viewer-engine.ts","../src/dom/viewer/create-viewer.ts","../src/dom/viewer/controls.ts","../src/dom/viewer/style-menu.ts","../src/dom/viewer/color-menu.ts","../src/dom/viewer/text-style-menu.ts","../src/dom/viewer/shape-menu.ts","../src/dom/viewer/highlight-menu.ts","../src/dom/shape-icons.ts","../src/dom/markup-icons.ts","../src/dom/viewer/menu.ts","../src/dom/signature-pad.ts","../src/dom/signature-draft.ts","../src/dom/viewer/signature-dialog.ts","../src/dom/viewer/signature-menu.ts"],"mappings":";;;KAWY;;UAGK;EACf;EACA;EACA;EACA;;UAGe;WACN,MAAM;;WAEN;;;;;WAKA;;WAEA,UAAU;;WAEV,eAAe;;WAEf;;WAEA;;WAEA,QAAQ;EACjB,MAAM,GAAG,QAAQ;EACjB,UAAU,GAAG,OAAO;EACpB,UAAU,GAAG,OAAO;;EAEpB,YAAY;EACZ,QAAQ,GAAG,QAAQ;EACnB,YAAY,GAAG,UAAU;;EAEzB,cAAc;;;wBAIA,kBAAkB,cAAc;;;;;wBAWhC,oBACd,MAAM,UACN,cACA,eAAc,eACb;;;KC/DS;;UAGK;EACf;EACA;EACA;EACA;EACA;;;UAIe;EACf,OAAO;EACP;EACA;;UAGe;EACf,gBAAgB;EAChB;EACA,UAAU;;EAEV;EACA,MAAM;;EAEN;;EAEA;;;wBASc,iBAAiB,OAAO,iBAAiB;;wBAyBzC,WACd,MAAM,UACN,UAAU,cACV;EAAa;EAAe;GAC5B,gCACA;;;;;wBAac,gBACd,QAAQ,WACR,mBACA,wBACA;;wBAec,mBACd,QAAQ,WACR,mBACA;;;KChFU;UAEK;EACf,WAAW;EACX,UAAU;;EAEV,OAAO;;EAEP,OAAO;;EAEP,WAAW;;EAEX;;EAEA;;EAEA;;EAEA;EACA,QAAQ,cAAc,MAAM,aAAa,WAAW;EACpD,SAAS,cAAc,MAAM,aAAa,WAAW;EACrD,UAAU,cAAc,MAAM;;;UAIf;EACf;EACA,MAAM;EACN,WAAW;;UAGI;WACN,MAAM,SAAS;;WAEf,OAAO;WACP,aAAa;WACb,SAAS;WACT,QAAQ,SAAS;WACjB,UAAU,SAAS;WACnB,MAAM,SAAS;;EAExB,QAAQ,MAAM,WAAW,YAAY;EACrC,OAAO,gBAAgB,YAAY;EACnC,QAAQ,MAAM;EACd,YAAY,UAAU;EACtB,aAAa,eAAe;IAAS,WAAW;;;EAEhD,aAAa,cAAc,MAAM;EACjC,aAAa,eAAe;EAC5B,QAAQ,eAAe;;EAEvB,UAAU,iBAAiB,kBAAkB;EAC7C;;wBAOc,eAAe,MAAM,kBAAkB;;;UCnFtC;EACf,UAAU;;EAEV;;;;;;;;;wBAiBc,mBACd,IAAI,aACJ,MAAM;;;UCdS;EACf,UAAU;;EAEV;;EAEA,MAAM;EACN,WAAW;;;;;EAKX;EACA;;EAEA,SAAS;;UAGM;WACN,SAAS;;;;;;WAMT,UAAU;EACnB,OAAO,WAAW;EAClB;;wBAMc,mBAAmB,MAAM,sBAAsB;;;UChC9C;EACf,UAAU;;EAEV;;EAEA,MAAM;EACN,WAAW;;;;;EAKX,SAAS;;EAET;;UAGe;WACN,SAAS;;WAET,OAAO;EAChB,OAAO,WAAW;EAClB;;wBAGc,gBAAgB,MAAM,mBAAmB;;;UC7BxC;;EAEf;;EAEA,OAAO;EACP;;;;;;wBAOc,oBACd,OAAO,SAAS,UAChB,MAAM,aACN,WAAW,gBACV;;;;;;wBAsBa,kBACd,MAAM,aACN,UAAU,MAAM;EAAkB;EAAc,WAAW;gBAC1D;;;
|
|
1
|
+
{"version":3,"file":"dom.d.mts","names":[],"sources":["../src/dom/transform.ts","../src/dom/layout.ts","../src/dom/viewport.ts","../src/dom/viewport-keys.ts","../src/dom/page-renderer.ts","../src/dom/text-layer.ts","../src/dom/selection.ts","../src/dom/overlay.ts","../src/dom/overlay-render.ts","../src/dom/page-mount.ts","../src/dom/tools/options.ts","../src/dom/tools/controller.ts","../src/dom/tools/freetext.ts","../src/dom/tools/highlight.ts","../src/dom/tools/note.ts","../src/dom/tools/redact-area.ts","../src/dom/tools/select.ts","../src/dom/tools/select-text.ts","../src/model/annotations/shape-geometry.ts","../src/dom/tools/shape.ts","../src/dom/tools/signature.ts","../src/dom/tools/index.ts","../src/dom/ui.ts","../src/dom/palette.ts","../src/dom/freetext-editor.ts","../src/dom/menu-keys.ts","../src/dom/annotation-element.ts","../src/dom/popover-focus.ts","../src/dom/viewer/popover.ts","../src/dom/viewer-engine.ts","../src/dom/viewer/create-viewer.ts","../src/dom/viewer/controls.ts","../src/dom/viewer/style-menu.ts","../src/dom/viewer/color-menu.ts","../src/dom/viewer/text-style-menu.ts","../src/dom/viewer/shape-menu.ts","../src/dom/viewer/highlight-menu.ts","../src/dom/shape-icons.ts","../src/dom/markup-icons.ts","../src/dom/viewer/menu.ts","../src/dom/signature-pad.ts","../src/dom/signature-draft.ts","../src/dom/viewer/signature-dialog.ts","../src/dom/viewer/signature-menu.ts"],"mappings":";;;KAWY;;UAGK;EACf;EACA;EACA;EACA;;UAGe;WACN,MAAM;;WAEN;;;;;WAKA;;WAEA,UAAU;;WAEV,eAAe;;WAEf;;WAEA;;WAEA,QAAQ;EACjB,MAAM,GAAG,QAAQ;EACjB,UAAU,GAAG,OAAO;EACpB,UAAU,GAAG,OAAO;;EAEpB,YAAY;EACZ,QAAQ,GAAG,QAAQ;EACnB,YAAY,GAAG,UAAU;;EAEzB,cAAc;;;wBAIA,kBAAkB,cAAc;;;;;wBAWhC,oBACd,MAAM,UACN,cACA,eAAc,eACb;;;KC/DS;;UAGK;EACf;EACA;EACA;EACA;EACA;;;UAIe;EACf,OAAO;EACP;EACA;;UAGe;EACf,gBAAgB;EAChB;EACA,UAAU;;EAEV;EACA,MAAM;;EAEN;;EAEA;;;wBASc,iBAAiB,OAAO,iBAAiB;;wBAyBzC,WACd,MAAM,UACN,UAAU,cACV;EAAa;EAAe;GAC5B,gCACA;;;;;wBAac,gBACd,QAAQ,WACR,mBACA,wBACA;;wBAec,mBACd,QAAQ,WACR,mBACA;;;KChFU;UAEK;EACf,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