@folijs/view 0.3.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/CHANGELOG.md CHANGED
@@ -1,5 +1,58 @@
1
1
  # @folijs/view
2
2
 
3
+ ## 0.5.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 18f838a: Tables and pictures as Word models them: imported, edited on pages and written back to `.docx`.
8
+ - **Schema v4** (`@folijs/core`, ADR-0006): `table`, `tableRow` and `tableCell` nodes with Word's table, row and cell properties (grid, merges, borders, shading, widths, header rows, `cantSplit`), table styles resolved as Word does (conditional formatting for first and last rows and columns, bands), `picture` nodes (inline or floating: `float` with Word's position and wrapping) and the envelope's `resources` (the pictures' images by key: content type, size, a URL or an opted-in `data:` URL; no base64 by default). `SCHEMA_VERSION` 4: v3 documents migrate on load.
9
+ - **Table editing** (`@folijs/core`, `@folijs/view`): cells isolate edits; typing, Enter, Backspace and Delete in cells; Tab and Shift+Tab between cells (Tab in the last cell adds a row); arrows across rows, pages and out of the table; `CellSelection` (drag, Shift+arrows) with copy, cut, paste and delete; commands `insertTable`, `insertRow`, `deleteRows`, `insertColumn`, `deleteColumns`, `deleteTable`, `mergeCells`, `splitCell`, `toggleHeaderRow`, `setTableStyle`, `setCellShading`, `setColumnWidth`; column borders dragged in the view. Rows inserted and deleted while tracking are tracked as Word records them.
10
+ - **Tables on pages** (`@folijs/view`): tables drawn from the model, rows flowed across pages (split at a line, header rows repeated, `cantSplit` kept whole); 277 of the corpus's 280 cell paragraphs on Word's page.
11
+ - **Pictures** (`@folijs/core`, `@folijs/view`): `insertPicture` (alt text required unless decorative, or `{ requireAlt: false }`: pasted and dropped files go in so and are marked), `setPictureSize`, `setPictureAlt`, `selectedPicture`; pictures drawn at their size, selected by a click, resized by a handle with their aspect ratio kept; image files pasted or dropped go through the app's `upload` hook (`EditorViewOptions.upload`, `view.insertFiles`), images shown through `EditorViewOptions.resource`; floating pictures laid out with the text around them (square, top and bottom, behind and in front of text), where Word places them in the corpus. `measureImageFile`, `textWidthEmu` and `EMU_PER_PX` are exported.
12
+ - **React** (`@folijs/react`): `FoliToolbar` gets a Table menu (insert table dialog, rows, columns, merge, split, header row, delete), a table style box, a cell shading menu and a Picture… dialog (insert from a file with alt text; edit a picture's alt text and size); `FoliEditor` and `FoliCanvas` take `upload` and `resource` props, `FoliToolbar` `upload`. Keyboard-usable and axe-clean in Chromium, Firefox and WebKit.
13
+ - **DOCX** (`@folijs/docx`): tables read into the model and written back (unchanged ones as written, changed ones child by child; tracked row changes); inline (`wp:inline`) and floating (`wp:anchor`) pictures read as picture nodes with their images as resources, written back byte for byte when unchanged, new images as media parts from `data:` URLs or `ExportOptions.resource`; `packageImages(pkg)` gives the view URLs for a package's images; `report.picturesWithoutAlt`. Word opens the corpus's tables and pictures exported unchanged and edited.
14
+
15
+ 0.4.0 cannot read documents saved by 0.5.0 (schema v4). Known limits are in [Known limitations](https://github.com/josep-audenis/foli/blob/main/docs/limitations.md) (tables and pictures sections).
16
+
17
+ Changed behaviour (pre-1.0 minor):
18
+ - `.docx` tables and drawings that imported as `opaqueBlock` and `opaqueInline` now import as `table` and `picture` nodes; a v3 document's opaque tables stay opaque until the `.docx` is imported again.
19
+ - `exportDocx` needs the bytes of a picture added since import: a `data:` URL resource or `ExportOptions.resource(key, resource)`; without them it throws a `DocxError` (never drops the picture).
20
+ - The editor's pages are `position: relative; isolation: isolate; display: flow-root` (pictures behind and in front of text are positioned against them; a floating picture past the page's text makes the page taller).
21
+ - Inserting or deleting a table while tracking is recorded as tracked rows (0.4.0 did not make the edit), and `deleteComment` and `deleteAllComments` remove comments anchored in tables (0.4.0 kept them: tables were opaque).
22
+ - `FoliToolbar` shows the Table menu, table style box, cell shading menu and Picture… button.
23
+
24
+ ### Patch Changes
25
+
26
+ - Updated dependencies [18f838a]
27
+ - @folijs/core@0.5.0
28
+
29
+ ## 0.4.0
30
+
31
+ ### Minor Changes
32
+
33
+ - e2a6e23: Review as in Word: tracked changes recorded, shown, accepted and rejected; comments written, answered and resolved; both round-trip with Word.
34
+ - **Tracked changes** (`@folijs/core`): with tracking on (`createEditor({ author, trackChanges })`, `editor.commands.setTrackChanges`), every edit is recorded as Word records it: what is removed stays marked deleted, what is added is marked inserted, paragraph marks removed or added are recorded on the paragraph, formatting changes keep the properties from before the first change (`formatChange`), and deleting your own insertion removes it. Commands need no tracking code: the editor rebuilds each transaction it dispatches (`trackTransaction`). Accept and reject (`acceptChange`, `rejectChange` at the caret or in the selection, `acceptAllChanges(author?)`, `rejectAllChanges(author?)`, `nextChange`, `previousChange`, `trackedChanges(doc)`), each its own undo step; both ends of a move together. A property test checks that accepting everything gives the same document as the edits made untracked and rejecting everything gives the original.
35
+ - **Comments** (`@folijs/core`): `addComment`, `replyToComment`, `editComment`, `resolveComment`, `deleteComment`, `deleteAllComments`, with Word's anchors; comment changes are part of undo history (`CommentStep`); a comment whose text is deleted with its reference goes with it.
36
+ - **Review view** (`@folijs/core` state, drawn by `@folijs/view`): tracked changes shown as all markup (author colors, a bar beside changed paragraphs), simple markup or no markup while editing (`setReviewView`, `createEditor({ reviewView })`); while tracking, or where it is hidden, Backspace and Delete step over deleted text; the caret never goes into hidden text.
37
+ - **React** (`@folijs/react`): a review group in `FoliToolbar` (New comment, Track changes, Show changes as, previous and next change, Accept, Reject, Accept all, Reject all); `FoliComments`, a comments pane beside the pages (threads level with their text; reply, edit, resolve, delete), shown by `FoliEditor` while the document has comments (`comments` prop); `FoliEditor` props `author`, `trackChanges`, `reviewView`.
38
+ - **DOCX** (`@folijs/docx`): `DocxImport.trackRevisions` and `exportDocx(document, package?, { trackRevisions })` read and write Word's tracking setting. Checked with Word on the corpus: files with changes and comments made in Foli open without a repair prompt with those changes, authors and threads; Word's accepted and rejected text equals Foli's (case aside; table paragraphs, fields and content controls aside; one corpus document, with a content control around paragraphs, not compared); Foli reads Word's own changes and replies back.
39
+
40
+ No document format change (schema 3): 0.3.0 and 0.4.0 read each other's documents. Known limits are in [Known limitations](https://github.com/josep-audenis/foli/blob/main/docs/limitations.md) (tables are not tracked yet; dates are written in UTC).
41
+
42
+ Changed behaviour (pre-1.0 minor):
43
+ - A paragraph left with nothing by a join or by a deletion from its start is removed whole: the next paragraph keeps its own properties (before, the merged paragraph took the first one's).
44
+ - `closeHistory` makes a transaction an undo step of its own on both sides: typing right after a paste, cut or drop is now its own step.
45
+ - `FoliToolbar` shows a review group by default (Track changes, Show changes as, previous and next change, Accept, Reject, Accept all, Reject all); New comment only with its new `comments` prop (`FoliEditor` passes it).
46
+ - Tracked changes in markup are drawn in each author's color (was one fixed red), with a bar beside changed paragraphs; commented text carries `data-foli-comments`.
47
+ - `withEnvelope` ignores comments: change them with `setComments` (or the comment commands).
48
+ - `FoliEditor` puts the canvas inside a `.foli-editor-body` element (beside the comments pane): CSS that relied on `.foli-canvas` being a direct child of the editor's parent needs updating.
49
+ - Imported `w:rPrChange` properties are in canonical form (default attributes left out); inserted and deleted text in `renderDocument` and the editor is titled "Inserted by …" / "Deleted by …".
50
+
51
+ ### Patch Changes
52
+
53
+ - Updated dependencies [e2a6e23]
54
+ - @folijs/core@0.4.0
55
+
3
56
  ## 0.3.0
4
57
 
5
58
  ### Minor Changes
package/dist/index.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  export { FOLI_MIME, htmlToDoc, textToDoc } from "./clipboard.js";
2
- export { EditorView, type EditorViewOptions, keyName } from "./view.js";
2
+ export { EditorView, type EditorViewOptions, keyName, measureImageFile, textWidthEmu, } from "./view.js";
3
+ export { EMU_PER_PX } from "./word/blocks.js";
3
4
  export { type DocumentPages, type ReviewView, renderDocument, WORD_PAGE_CLASS, } from "./word/pages.js";
4
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AACjE,OAAO,EAAE,UAAU,EAAE,KAAK,iBAAiB,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACxE,OAAO,EACL,KAAK,aAAa,EAClB,KAAK,UAAU,EACf,cAAc,EACd,eAAe,GAChB,MAAM,iBAAiB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AACjE,OAAO,EACL,UAAU,EACV,KAAK,iBAAiB,EACtB,OAAO,EACP,gBAAgB,EAChB,YAAY,GACb,MAAM,WAAW,CAAC;AACnB,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EACL,KAAK,aAAa,EAClB,KAAK,UAAU,EACf,cAAc,EACd,eAAe,GAChB,MAAM,iBAAiB,CAAC"}
package/dist/index.js CHANGED
@@ -1,4 +1,5 @@
1
1
  export { FOLI_MIME, htmlToDoc, textToDoc } from "./clipboard.js";
2
- export { EditorView, keyName } from "./view.js";
2
+ export { EditorView, keyName, measureImageFile, textWidthEmu, } from "./view.js";
3
+ export { EMU_PER_PX } from "./word/blocks.js";
3
4
  export { renderDocument, WORD_PAGE_CLASS, } from "./word/pages.js";
4
5
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AACjE,OAAO,EAAE,UAAU,EAA0B,OAAO,EAAE,MAAM,WAAW,CAAC;AACxE,OAAO,EAGL,cAAc,EACd,eAAe,GAChB,MAAM,iBAAiB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AACjE,OAAO,EACL,UAAU,EAEV,OAAO,EACP,gBAAgB,EAChB,YAAY,GACb,MAAM,WAAW,CAAC;AACnB,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAGL,cAAc,EACd,eAAe,GAChB,MAAM,iBAAiB,CAAC"}
@@ -18,6 +18,8 @@ export interface BlockBox {
18
18
  breaksAfter?(): readonly number[];
19
19
  /** Height shown again at the top of each fragment after the first (a table's header rows). */
20
20
  repeat?: number;
21
+ /** Splits at any of its line ends, without widow and orphan control (a table's rows). */
22
+ anyLine?: boolean;
21
23
  /**
22
24
  * Content height of the pages this block goes on, when not the flow's (a section's page). A
23
25
  * block with another page height than the one before it must start a page (an explicit
@@ -1 +1 @@
1
- {"version":3,"file":"flow.d.ts","sourceRoot":"","sources":["../../src/layout/flow.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAErD,iEAAiE;AACjE,eAAO,MAAM,SAAS,QAAY,CAAC;AAEnC,4EAA4E;AAC5E,MAAM,WAAW,QAAQ;IACvB,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB;;;;OAIG;IACH,KAAK,IAAI,SAAS,MAAM,EAAE,CAAC;IAC3B,uEAAuE;IACvE,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,uFAAuF;IACvF,WAAW,CAAC,IAAI,SAAS,MAAM,EAAE,CAAC;IAClC,8FAA8F;IAC9F,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;;OAIG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,qGAAqG;AACrG,MAAM,WAAW,QAAQ;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,SAA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AM,EAAE,MAAM,CAAC;IACf,uFAAuF;IACvF,YAAY,EAAE,OAAO,CAAC;IACtB,iGAAiG;IACjG,UAAU,EAAE,OAAO,CAAC;CACrB;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,IAAI,CAClB,KAAK,EAAE,SAAS,QAAQ,EAAE,EAC1B,UAAU,EAAE,MAAM,EAClB,KAAK,GAAE,SAAyB,GAC/B,QAAQ,EAAE,EAAE,CAEd;AAED,kGAAkG;AAClG,MAAM,WAAW,UAAU;IACzB,SAAS,EAAE,QAAQ,EAAE,EAAE,CAAC;IACxB,MAAM,EAAE,SAAS,EAAE,CAAC;CACrB;AAED,gEAAgE;AAChE,MAAM,WAAW,KAAK;IACpB,QAAQ,EAAE,UAAU,CAAC;IACrB,0FAA0F;IAC1F,IAAI,EAAE,MAAM,CAAC;IACb;;;OAGG;IACH,aAAa,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CAClC;AAED;;;;;GAKG;AACH,wBAAgB,QAAQ,CACtB,KAAK,EAAE,SAAS,QAAQ,EAAE,EAC1B,UAAU,EAAE,MAAM,EAClB,KAAK,GAAE,SAAyB,EAChC,KAAK,CAAC,EAAE,KAAK,GACZ,UAAU,CA+JZ"}
@@ -98,7 +98,7 @@ export function flowFrom(boxes, flowHeight, rules = DEFAULT_RULES, reuse) {
98
98
  break;
99
99
  end++;
100
100
  }
101
- if (end < segmentEnd && end > line) {
101
+ if (end < segmentEnd && end > line && !box.anyLine) {
102
102
  // A natural split: keep `widows` lines for the next page and `orphans` on this one.
103
103
  const kept = Math.min(end, segmentEnd - rules.widows);
104
104
  if (kept - line >= rules.orphans)
@@ -1 +1 @@
1
- {"version":3,"file":"flow.js","sourceRoot":"","sources":["../../src/layout/flow.ts"],"names":[],"mappings":"AAEA,iEAAiE;AACjE,MAAM,CAAC,MAAM,SAAS,GAAG,EAAE,GAAG,IAAI,CAAC;AAgDnC,MAAM,CAAC,MAAM,aAAa,GAAc,EAA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,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,IAAI;QACjB,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,IAAI;QACjB,CAAC,CAAC,cAAc,KAAK,CAAC,CAAC,cAAc;QACrC,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC,MAAM;QACrB,CAAC,CAAC,YAAY,KAAK,CAAC,CAAC,YAAY;QACjC,CAAC,CAAC,UAAU,KAAK,CAAC,CAAC,UAAU,CAC9B,CAAC;AACJ,CAAC"}
package/dist/view.d.ts CHANGED
@@ -1,4 +1,23 @@
1
- import { type Editor } from "@folijs/core";
1
+ import { type Editor, type EditorState, type ResourceJSON } from "@folijs/core";
2
+ import { type BlockDesc } from "./render.js";
3
+ import { type WordBlockDesc } from "./word/edit.js";
4
+ import { type Frame } from "./word/table.js";
5
+ /** Where a table's fragment is: the rows it shows, the header rows drawn again above them. */
6
+ interface TablePart {
7
+ rows: number[];
8
+ headers: number[];
9
+ }
10
+ /** A table's measurement, in layout px from the table's top (drawn whole). */
11
+ export interface TableMeasure {
12
+ rows: {
13
+ top: number;
14
+ bottom: number;
15
+ }[];
16
+ /** The top of each of its units (by index into the units), null for one not shown (covered). */
17
+ tops: Map<number, number | null>;
18
+ /** Where the table may break: inside rows that may split, and between rows (sorted). */
19
+ breaks?: number[];
20
+ }
2
21
  interface DomPoint {
3
22
  node: Node;
4
23
  offset: number;
@@ -8,6 +27,25 @@ export interface EditorViewOptions {
8
27
  editable?: boolean;
9
28
  /** Shown while the document is one empty block (default: none). */
10
29
  placeholder?: string;
30
+ /**
31
+ * The URL to show a picture's image from (`key` in the document's `resources`): an image in
32
+ * the .docx package it came from has none of its own (`packageImages` in `@folijs/docx` gives
33
+ * object URLs). Undefined for a key: the resource's own image `data:` URL or web URL (fetched
34
+ * as it is shown), else a box of the picture's size; `null` (or "") for a key: that box (an
35
+ * app that does not fetch web URLs found in documents says so here). `null` clears it.
36
+ */
37
+ resource?: ((key: string, resource: ResourceJSON) => string | null | undefined) | null;
38
+ /**
39
+ * Where pasted and dropped image files go (ADR-0006's upload hook): the URL the app stores the
40
+ * file at (or a `data:` URL, opting in), and the alt text if it has asked for it. Without it,
41
+ * image files are not pasted or dropped. A picture inserted without alt text is marked, as an
42
+ * imported one is.
43
+ */
44
+ upload?: ((file: File) => Promise<string | {
45
+ src: string;
46
+ alt?: string;
47
+ decorative?: boolean;
48
+ }>) | null;
11
49
  }
12
50
  /**
13
51
  * The editable view of an `Editor` from `@folijs/core`: renders its state into one
@@ -32,8 +70,19 @@ export declare class EditorView {
32
70
  private indexOf;
33
71
  /** The element that shows a node selection, if any. */
34
72
  private selectedDom;
35
- /** The page of each fragment of each block. */
36
- private fragmentPages;
73
+ /** The cells a cell selection marks, and the caret written in its head cell. */
74
+ private selectedCells;
75
+ private cellCaret;
76
+ /** The pages of each top-level item (a paragraph's fragments, a table's wrappers), by node. */
77
+ private itemPages;
78
+ /** Each table as last rendered, by node. */
79
+ private frames;
80
+ /** The table each wrapper element draws (part of). */
81
+ private frameOf;
82
+ /** Each table as last rendered, by its index among the top-level items. */
83
+ private frameAt;
84
+ /** Elements the view itself removed: the read-back does not take them for input. */
85
+ private viewRemoved;
37
86
  /** The block each fragment element belongs to. */
38
87
  private owner;
39
88
  /** The page elements, in order; the host's only children. */
@@ -98,6 +147,16 @@ export declare class EditorView {
98
147
  private readonly addedTabIndex;
99
148
  /** Renders the document's blocks; made by the first render. */
100
149
  private word;
150
+ /** Where pasted and dropped image files go (`EditorViewOptions.upload`). */
151
+ private upload;
152
+ /** The selected picture's span (with its resize handle). */
153
+ private selectedPicture;
154
+ /** A picture being resized: its position, element, size at the press, scale, the press. */
155
+ private resize;
156
+ /** The app's URLs for pictures' images (`EditorViewOptions.resource`). */
157
+ private resource;
158
+ /** How tracked changes show. */
159
+ private review;
101
160
  /** Fonts' normal line height ratios, measured once per family (Word's single spacing). */
102
161
  private readonly ratios;
103
162
  /** Web fonts loaded since the v3 blocks were drawn: the next render draws them again. */
@@ -129,6 +188,15 @@ export declare class EditorView {
129
188
  * Measurements are cached by node and the flow restarts at the first changed block (5.4).
130
189
  */
131
190
  private render;
191
+ /**
192
+ * A floating picture reaches into the blocks after its paragraph (their lines go around it):
193
+ * a block that changed (new, drawn again or stale) on a page holding one has the blocks after
194
+ * it on that page and the next measured again. A new block counts on the page of the block
195
+ * before it, where `place` first puts it, and the next (it may have been that page's first);
196
+ * only blocks that changed reach on, not the ones this marks, so an edit re-measures three
197
+ * pages at most.
198
+ */
199
+ private staleAroundFloats;
132
200
  /** A font's normal line height ratio, measured outside the host (no input to read back). */
133
201
  private lineRatio;
134
202
  /**
@@ -138,6 +206,11 @@ export declare class EditorView {
138
206
  * or a page (stray DOM) is removed.
139
207
  */
140
208
  private place;
209
+ /**
210
+ * What a table's cell shows in one of its fragments: its blocks' elements that `takes` puts
211
+ * there, and nested tables whole (where their first block goes).
212
+ */
213
+ private cellContent;
141
214
  private createPage;
142
215
  /** The last section's page setup (the envelope's), for an empty document. */
143
216
  private lastSheet;
@@ -158,7 +231,10 @@ export declare class EditorView {
158
231
  private scheduleRelayout;
159
232
  /** The block element (a fragment of a rendered block) that contains `node`, or null. */
160
233
  private blockElement;
161
- /** Whether `node` holds blocks rather than content: the host or a page. */
234
+ /**
235
+ * Whether `node` holds blocks rather than content: the host, a page, or a table's wrapper,
236
+ * table, rows and cells.
237
+ */
162
238
  private holdsBlocks;
163
239
  /** Index of the first block that starts at or after `pos` (the block count if none). */
164
240
  private blockFrom;
@@ -170,6 +246,14 @@ export declare class EditorView {
170
246
  private readSelection;
171
247
  /** The rendered block a node selection selects, if it selects one. */
172
248
  private selectedBlock;
249
+ /** The span of the picture a node selection selects, if it selects one. */
250
+ private pictureSpan;
251
+ /** Marks the selected picture and gives it a resize handle (when the document is editable). */
252
+ private showSelectedPicture;
253
+ /** Marks the cells of a cell selection (their table cell elements, on every page). */
254
+ private showSelectedCells;
255
+ /** The first wrapper of a node-selected table, if a table is selected. */
256
+ private selectedTable;
173
257
  /** Marks the element of a node-selected block, for styling (the DOM selection is around it). */
174
258
  private showSelectedNode;
175
259
  /**
@@ -197,6 +281,61 @@ export declare class EditorView {
197
281
  private onBeforeInput;
198
282
  /** Runs the first command bound to `name` that applies, through the view's dispatch. */
199
283
  private runKey;
284
+ /** A column border being dragged: its table and column, the column's width, the press, the guide. */
285
+ private drag;
286
+ /** Whether this view set the host's cursor (an embedder's own cursor is left alone). */
287
+ private resizeCursor;
288
+ /**
289
+ * The column border of a top-level table near the pointer (within 4 px): an edge of the cell
290
+ * under it (a grid line through a merged cell is no border), or the table's right edge from
291
+ * outside; as the grid column left of it, with the table's px per twip. None in read-only
292
+ * mode, during a composition, or while tracking (column widths do not change then).
293
+ */
294
+ private columnBorder;
295
+ /** The pointer over a column border shows that it can be dragged. */
296
+ private onMouseMove;
297
+ /**
298
+ * A press on a column border (no Shift: Shift-click extends the selection) starts dragging it:
299
+ * a guide line follows the pointer and the release moves the border by as much as the pointer
300
+ * moved (`setColumnWidth`); a press without a move changes nothing; Escape, the button let go
301
+ * elsewhere or the window losing the focus cancel.
302
+ */
303
+ private startColumnDrag;
304
+ private onDragMove;
305
+ private onDragEnd;
306
+ private onDragKey;
307
+ private onDragBlur;
308
+ /** Ends a drag (its guide and listeners gone) and returns it. */
309
+ private endDrag;
310
+ /**
311
+ * A press on a picture selects it (a node selection); on the selected picture's handle it
312
+ * starts a resize that keeps its aspect ratio (`setPictureSize` on release, Escape cancels).
313
+ */
314
+ private pictureMouseDown;
315
+ /** The size (layout px) a resize gives at the pointer: the larger move, the ratio kept. */
316
+ private resizedTo;
317
+ private onResizeMove;
318
+ private onResizeEnd;
319
+ private onResizeKey;
320
+ private onResizeCancel;
321
+ /** Ends a resize (its listeners gone) and returns it. */
322
+ private endResize;
323
+ private textWidthEmu;
324
+ /** Image files in a transfer (paste or drop), when the app takes uploads. */
325
+ private imageFiles;
326
+ /** Whether a drag carries files (from outside the page). */
327
+ private static carriesFiles;
328
+ private onDragOver;
329
+ private onDrop;
330
+ /**
331
+ * Inserts image files where the selection is now, one picture each, in order: each measured
332
+ * first (one the browser cannot show is skipped, not uploaded), then given to the `upload`
333
+ * option, then inserted at its natural size (96 px per inch) no wider than the page's text,
334
+ * where the selection was, however the document changed meanwhile (after a composition that
335
+ * runs then). A file whose upload fails is skipped (reported on the console). Resolves to
336
+ * the number inserted (none without `upload`); never rejects.
337
+ */
338
+ insertFiles(files: readonly File[]): Promise<number>;
200
339
  /**
201
340
  * Triple-click selects the clicked block's content. Chromium and WebKit natively extend the
202
341
  * selection to the start of the next block, so typing over it would merge the two blocks.
@@ -273,10 +412,59 @@ export declare class EditorView {
273
412
  paste(data: Pick<DataTransfer, "getData">, autolink?: boolean): boolean;
274
413
  private onSelectionChange;
275
414
  }
415
+ /** A block's measurement: border-box height across its fragments (layout px), margins, lines. */
416
+ export interface Measure {
417
+ height: number;
418
+ marginTop: number;
419
+ marginBottom: number;
420
+ /** Vertical padding and border, which every fragment of a split block repeats. */
421
+ box: number;
422
+ lines?: Lines;
423
+ /** A table's rows and blocks. */
424
+ table?: TableMeasure;
425
+ }
426
+ /**
427
+ * Where a table may break across pages (from its top, sorted): after each row, and inside a row
428
+ * at its cells' line ends, unless the row may not split (`cantSplit`, unless taller than a
429
+ * page), is part of a vertical merge or holds a nested table (shortcut: those split only
430
+ * between rows; a nested table stays whole within its row).
431
+ */
432
+ export declare function breaksOf(frame: Frame, measure: Measure, blocks: readonly WordBlockDesc[], pageHeight: number, lines: (desc: BlockDesc) => Lines): number[];
433
+ /**
434
+ * A flowed table cut into its fragments: the rows each shows (a row split across pages in
435
+ * both), the header rows drawn again above a continuation, the fragment of the table each
436
+ * block's fragments go in, and where a block of a split row splits (content offsets).
437
+ */
438
+ export declare function cutTable(frame: Frame, measure: Measure, fragments: readonly {
439
+ fromLine: number;
440
+ toLine: number;
441
+ }[], blocks: readonly WordBlockDesc[], lines: (desc: BlockDesc) => Lines): {
442
+ parts: TablePart[];
443
+ partOf: Map<number, number[]>;
444
+ splits: Map<number, number[]>;
445
+ };
446
+ export interface Lines {
447
+ /** Content offset where each line starts. */
448
+ starts: number[];
449
+ /** Bottom of each line box, in layout px from the block's top, as if it were not split. */
450
+ bottoms: number[];
451
+ }
276
452
  /**
277
453
  * Normalizes a key event to a keymap name: modifiers in the order `Mod-Ctrl-Meta-Alt-Shift-`,
278
454
  * then the key (single characters lower-cased). `Mod` is Cmd on Apple platforms, Ctrl elsewhere.
279
455
  */
280
456
  export declare function keyName(event: KeyboardEvent): string;
457
+ /**
458
+ * The text width of a document's (last) section in EMU (635 per twip; Word's Letter page and
459
+ * margins where it does not say): the widest a picture is inserted or resized.
460
+ * shortcut: the last section's, not the caret's section or table cell; use the caret's when
461
+ * documents mix page sizes.
462
+ */
463
+ export declare function textWidthEmu(state: EditorState): number;
464
+ /** A file's image's natural size (CSS px) from a local object URL, before any upload. */
465
+ export declare function measureImageFile(file: File, doc: Document): Promise<{
466
+ width: number;
467
+ height: number;
468
+ } | null>;
281
469
  export {};
282
470
  //# sourceMappingURL=view.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"view.d.ts","sourceRoot":"","sources":["../src/view.ts"],"names":[],"mappings":"AAAA,OAAO,EAUL,KAAK,MAAM,EA4BZ,MAAM,cAAc,CAAC;AAsBtB,UAAU,QAAQ;IAChB,IAAI,EAAE,IAAI,CAAC;IACX,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,iBAAiB;IAChC,0FAA0F;IAC1F,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,mEAAmE;IACnE,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAsJD;;;;;;;;;;;GAWG;AACH,qBAAa,UAAU;IAiFnB,QAAQ,CAAC,IAAI,EAAE,WAAW;IAC1B,QAAQ,CAAC,MAAM,EAAE,MAAM;IAjFzB,OAAO,CAAC,KAAK,CAAc;IAC3B,OAAO,CAAC,MAAM,CAAuB;IACrC,wDAAwD;IACxD,OAAO,CAAC,MAAM,CAAgB;IAC9B,2C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