@folijs/view 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/CHANGELOG.md +26 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/dist/layout/flow.d.ts +2 -0
- package/dist/layout/flow.d.ts.map +1 -1
- package/dist/layout/flow.js +1 -1
- package/dist/layout/flow.js.map +1 -1
- package/dist/view.d.ts +190 -4
- package/dist/view.d.ts.map +1 -1
- package/dist/view.js +1243 -95
- package/dist/view.js.map +1 -1
- package/dist/word/blocks.d.ts +70 -2
- package/dist/word/blocks.d.ts.map +1 -1
- package/dist/word/blocks.js +356 -5
- package/dist/word/blocks.js.map +1 -1
- package/dist/word/edit.d.ts +18 -9
- package/dist/word/edit.d.ts.map +1 -1
- package/dist/word/edit.js +67 -16
- package/dist/word/edit.js.map +1 -1
- package/dist/word/pages.d.ts +8 -0
- package/dist/word/pages.d.ts.map +1 -1
- package/dist/word/pages.js +47 -2
- package/dist/word/pages.js.map +1 -1
- package/dist/word/table.d.ts +79 -0
- package/dist/word/table.d.ts.map +1 -0
- package/dist/word/table.js +210 -0
- package/dist/word/table.js.map +1 -0
- package/package.json +2 -2
- package/src/index.ts +8 -1
- package/src/layout/flow.ts +3 -1
- package/src/view.ts +1385 -95
- package/src/word/blocks.ts +404 -4
- package/src/word/edit.ts +85 -14
- package/src/word/pages.ts +53 -2
- package/src/word/table.ts +267 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,31 @@
|
|
|
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
|
+
|
|
3
29
|
## 0.4.0
|
|
4
30
|
|
|
5
31
|
### 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
|
package/dist/index.d.ts.map
CHANGED
|
@@ -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,
|
|
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,
|
|
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"}
|
package/dist/layout/flow.d.ts
CHANGED
|
@@ -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,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C1B;AAED,eAAO,MAAM,aAAa,EAAE,SAAqC,CAAC;AAElE,4FAA4F;AAC5F,wBAAgB,aAAa,CAAC,EAAE,QAAQ,EAAE,OAAO,EAAE,EAAE,gBAAgB,GAAG,MAAM,CAE7E;AAKD,sFAAsF;AACtF,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,cAAc,EAAE,MAAM,CAAC;IACvB,MAAM,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"}
|
package/dist/layout/flow.js
CHANGED
|
@@ -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)
|
package/dist/layout/flow.js.map
CHANGED
|
@@ -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;
|
|
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;AAkDnC,MAAM,CAAC,MAAM,aAAa,GAAc,EAAE,OAAO,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,CAAC;AAElE,4FAA4F;AAC5F,MAAM,UAAU,aAAa,CAAC,EAAE,QAAQ,EAAE,OAAO,EAAoB;IACnE,OAAO,CAAC,QAAQ,CAAC,MAAM,GAAG,OAAO,CAAC,GAAG,GAAG,OAAO,CAAC,MAAM,CAAC,GAAG,SAAS,CAAC;AACtE,CAAC;AAED,2FAA2F;AAC3F,MAAM,KAAK,GAAG,GAAG,CAAC;AAclB;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,UAAU,IAAI,CAClB,KAA0B,EAC1B,UAAkB,EAClB,KAAK,GAAc,aAAa;IAEhC,OAAO,QAAQ,CAAC,KAAK,EAAE,UAAU,EAAE,KAAK,CAAC,CAAC,SAAS,CAAC;AACtD,CAAC;AAoBD;;;;;GAKG;AACH,MAAM,UAAU,QAAQ,CACtB,KAA0B,EAC1B,UAAkB,EAClB,KAAK,GAAc,aAAa,EAChC,KAAa;IAEb,IAAI,KAAK,GAAG,KAAK,CAAC,CAAC,CAAC,IA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GAAG,KAAK,CAAC;gBACd,SAAS;YACX,CAAC;QACH,CAAC;QACD,KAAK,EAAE,CAAC;IACV,CAAC;IACD,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC,GAAG,SAAS,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,EAAE,EAAE,GAAG,KAAK,EAAE,CAAC,EAAE,CAAC;AAC5F,CAAC;AAED,SAAS,SAAS,CAAC,CAAY,EAAE,CAAY;IAC3C,OAAO,CACL,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
|
|
36
|
-
private
|
|
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,14 @@ 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;
|
|
101
158
|
/** How tracked changes show. */
|
|
102
159
|
private review;
|
|
103
160
|
/** Fonts' normal line height ratios, measured once per family (Word's single spacing). */
|
|
@@ -131,6 +188,15 @@ export declare class EditorView {
|
|
|
131
188
|
* Measurements are cached by node and the flow restarts at the first changed block (5.4).
|
|
132
189
|
*/
|
|
133
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;
|
|
134
200
|
/** A font's normal line height ratio, measured outside the host (no input to read back). */
|
|
135
201
|
private lineRatio;
|
|
136
202
|
/**
|
|
@@ -140,6 +206,11 @@ export declare class EditorView {
|
|
|
140
206
|
* or a page (stray DOM) is removed.
|
|
141
207
|
*/
|
|
142
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;
|
|
143
214
|
private createPage;
|
|
144
215
|
/** The last section's page setup (the envelope's), for an empty document. */
|
|
145
216
|
private lastSheet;
|
|
@@ -160,7 +231,10 @@ export declare class EditorView {
|
|
|
160
231
|
private scheduleRelayout;
|
|
161
232
|
/** The block element (a fragment of a rendered block) that contains `node`, or null. */
|
|
162
233
|
private blockElement;
|
|
163
|
-
/**
|
|
234
|
+
/**
|
|
235
|
+
* Whether `node` holds blocks rather than content: the host, a page, or a table's wrapper,
|
|
236
|
+
* table, rows and cells.
|
|
237
|
+
*/
|
|
164
238
|
private holdsBlocks;
|
|
165
239
|
/** Index of the first block that starts at or after `pos` (the block count if none). */
|
|
166
240
|
private blockFrom;
|
|
@@ -172,6 +246,14 @@ export declare class EditorView {
|
|
|
172
246
|
private readSelection;
|
|
173
247
|
/** The rendered block a node selection selects, if it selects one. */
|
|
174
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;
|
|
175
257
|
/** Marks the element of a node-selected block, for styling (the DOM selection is around it). */
|
|
176
258
|
private showSelectedNode;
|
|
177
259
|
/**
|
|
@@ -199,6 +281,61 @@ export declare class EditorView {
|
|
|
199
281
|
private onBeforeInput;
|
|
200
282
|
/** Runs the first command bound to `name` that applies, through the view's dispatch. */
|
|
201
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>;
|
|
202
339
|
/**
|
|
203
340
|
* Triple-click selects the clicked block's content. Chromium and WebKit natively extend the
|
|
204
341
|
* selection to the start of the next block, so typing over it would merge the two blocks.
|
|
@@ -275,10 +412,59 @@ export declare class EditorView {
|
|
|
275
412
|
paste(data: Pick<DataTransfer, "getData">, autolink?: boolean): boolean;
|
|
276
413
|
private onSelectionChange;
|
|
277
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
|
+
}
|
|
278
452
|
/**
|
|
279
453
|
* Normalizes a key event to a keymap name: modifiers in the order `Mod-Ctrl-Meta-Alt-Shift-`,
|
|
280
454
|
* then the key (single characters lower-cased). `Mod` is Cmd on Apple platforms, Ctrl elsewhere.
|
|
281
455
|
*/
|
|
282
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>;
|
|
283
469
|
export {};
|
|
284
470
|
//# sourceMappingURL=view.d.ts.map
|
package/dist/view.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"view.d.ts","sourceRoot":"","sources":["../src/view.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"view.d.ts","sourceRoot":"","sources":["../src/view.ts"],"names":[],"mappings":"AAAA,OAAO,EAaL,KAAK,MAAM,EACX,KAAK,WAAW,EAgBhB,KAAK,YAAY,EAsBlB,MAAM,cAAc,CAAC;AAYtB,OAAO,EAAE,KAAK,SAAS,EAAmB,MAAM,aAAa,CAAC;AAG9D,OAAO,EAGL,KAAK,aAAa,EAGnB,MAAM,gBAAgB,CAAC;AAExB,OAAO,EAIL,KAAK,KAAK,EAIX,MAAM,iBAAiB,CAAC;AAazB,8FAA8F;AAC9F,UAAU,SAAS;IACjB,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,OAAO,EAAE,MAAM,EAAE,CAAC;CACnB;AAUD,8EAA8E;AAC9E,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;IACxC,gGAAgG;IAChG,IAAI,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC,CAAC;IACjC,wFAAwF;IACxF,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;CACnB;AAYD,UAAU,QAAQ;IAChB,IAAI,EAAE,IAAI,CAAC;IACX,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,iBAAiB;IA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