@folijs/view 0.2.0 → 0.4.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/dist/render.d.ts CHANGED
@@ -1,8 +1,6 @@
1
1
  import type { Node as ModelNode } from "@folijs/core";
2
2
  /** Marks the <br> of an explicit page break. */
3
3
  export declare const PAGE_BREAK_ATTR = "data-page-break";
4
- /** Marks a container element (list, list item) the view created around blocks. */
5
- export declare const WRAPPER_ATTR = "data-foli-wrapper";
6
4
  /**
7
5
  * A rendered inline leaf (a text node or hard break) and where it sits in its block's content.
8
6
  * A text node split across fragments is two leaves, one per fragment.
@@ -24,22 +22,4 @@ export interface BlockDesc {
24
22
  readonly splits: readonly number[];
25
23
  readonly leaves: readonly LeafDesc[];
26
24
  }
27
- /**
28
- * Renders one leaf block (a textblock, or a block leaf such as a rule) with
29
- * createElement/textContent only (never innerHTML), and records its leaves for position
30
- * mapping. With `splits`, a textblock's content is rendered as several fragments of the same
31
- * element type: each continued fragment has no bottom margin and each continuation no top
32
- * margin, so together they take the same height as the whole block.
33
- */
34
- export declare function renderBlock(node: ModelNode, doc: Document, splits?: readonly number[]): BlockDesc;
35
- export declare function createWrapper(node: ModelNode, doc: Document): HTMLElement;
36
- /** Whether `element` is the container element `createWrapper` makes for `node`. */
37
- export declare function isWrapperFor(element: Node | null, node: ModelNode): element is HTMLElement;
38
- /** Whether `node` is a container element the view created. */
39
- export declare function isWrapper(node: Node | null): node is HTMLElement;
40
- /**
41
- * Renders a fragment of blocks as one DOM tree, for the clipboard: containers become their
42
- * elements (with the list's start number), leaf blocks as in the editor, unsplit.
43
- */
44
- export declare function renderTree(content: Iterable<ModelNode>, parent: Node, doc: Document): void;
45
25
  //# sourceMappingURL=render.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"render.d.ts","sourceRoot":"","sources":["../src/render.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,IAAI,IAAI,SAAS,EAAkB,MAAM,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.d.ts","sourceRoot":"","sources":["../src/render.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,IAAI,SAAS,EAAE,MAAM,cAAc,CAAC;AAEtD,gDAAgD;AAChD,eAAO,MAAM,eAAe,oBAAoB,CAAC;AAEjD;;;GAGG;AACH,MAAM,WAAW,QAAQ;IACvB,QAAQ,CAAC,GAAG,EAAE,IAAI,CAAC;IACnB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACvB;AAED;;;GAGG;AACH,MAAM,WAAW,SAAS;IACxB,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAC;IACzB,QAAQ,CAAC,GAAG,EAAE,WAAW,CAAC;IAC1B,QAAQ,CAAC,SAAS,EAAE,SAAS,WAAW,EAAE,CAAC;IAC3C,+FAA+F;IAC/F,QAAQ,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CAAC;IACnC,QAAQ,CAAC,MAAM,EAAE,SAAS,QAAQ,EAAE,CAAC;CACtC"}
package/dist/render.js CHANGED
@@ -1,166 +1,3 @@
1
- // Every mark without attributes has a tag. Marks with attributes are rendered by `markElement`;
2
- // marks of other schemas fall back to <span>.
3
- const MARK_TAGS = new Map(Object.entries({
4
- bold: "strong",
5
- italic: "em",
6
- underline: "u",
7
- strike: "s",
8
- }));
9
1
  /** Marks the <br> of an explicit page break. */
10
2
  export const PAGE_BREAK_ATTR = "data-page-break";
11
- /** Marks a container element (list, list item) the view created around blocks. */
12
- export const WRAPPER_ATTR = "data-foli-wrapper";
13
- /** The element for a container node: lists and list items; anything else is a <div>. */
14
- const WRAPPER_TAGS = new Map([
15
- ["bulletList", "ul"],
16
- ["orderedList", "ol"],
17
- ["listItem", "li"],
18
- ]);
19
- /** The element for a mark: a tag, a link, or a span with a color. Values come validated. */
20
- function markElement(mark, doc) {
21
- const { name } = mark.type;
22
- if (name === "link") {
23
- const a = doc.createElement("a");
24
- // The schema only lets safe hrefs into a document (isSafeHref); clicks do not navigate.
25
- a.setAttribute("href", String(mark.attrs.href));
26
- return a;
27
- }
28
- const element = doc.createElement(MARK_TAGS.get(name) ?? "span");
29
- if (name === "textColor")
30
- element.style.color = String(mark.attrs.color);
31
- if (name === "highlight")
32
- element.style.backgroundColor = String(mark.attrs.color);
33
- return element;
34
- }
35
- /** The element for a block: a heading or paragraph tag, or a rule. */
36
- function blockTag(node) {
37
- if (node.type.name === "heading")
38
- return `h${String(node.attrs.level)}`;
39
- if (node.type.name === "horizontalRule")
40
- return "hr";
41
- return "p";
42
- }
43
- /**
44
- * Renders one leaf block (a textblock, or a block leaf such as a rule) with
45
- * createElement/textContent only (never innerHTML), and records its leaves for position
46
- * mapping. With `splits`, a textblock's content is rendered as several fragments of the same
47
- * element type: each continued fragment has no bottom margin and each continuation no top
48
- * margin, so together they take the same height as the whole block.
49
- */
50
- export function renderBlock(node, doc, splits = []) {
51
- const tag = blockTag(node);
52
- const align = node.attrs.align;
53
- const fragments = [0, ...splits].map((_, i, all) => {
54
- const fragment = doc.createElement(tag);
55
- if (typeof align === "string" && align !== "start")
56
- fragment.style.textAlign = align;
57
- if (all.length > 1) {
58
- fragment.dataset.fragment = String(i);
59
- if (i > 0)
60
- fragment.style.marginTop = "0";
61
- if (i < all.length - 1)
62
- fragment.style.marginBottom = "0";
63
- }
64
- return fragment;
65
- });
66
- const leaves = [];
67
- const dom = fragments[0];
68
- // A block leaf (a rule) has no content: nothing to map, nothing to split.
69
- if (!node.isTextblock)
70
- return { node, dom, fragments, splits, leaves };
71
- /** The fragment that holds content offset `at` (a split offset starts the next fragment). */
72
- const fragmentAt = (at) => {
73
- let i = 0;
74
- while (i < splits.length && splits[i] <= at)
75
- i++;
76
- return fragments[i];
77
- };
78
- node.forEach((child, offset) => {
79
- if (!child.isText) {
80
- // A hard break or a page break: both end their line (the flow ends the page at a page break).
81
- const br = doc.createElement("br");
82
- if (child.type.name === "pageBreak")
83
- br.setAttribute(PAGE_BREAK_ATTR, "");
84
- leaves.push({ dom: br, offset, size: child.nodeSize });
85
- // Text only: a mark wrapper around <br> would add nothing visible.
86
- fragmentAt(offset).append(br);
87
- return;
88
- }
89
- const text = child.text ?? "";
90
- const cuts = splits.filter((split) => split > offset && split < offset + text.length);
91
- let from = offset;
92
- for (const to of [...cuts, offset + text.length]) {
93
- const leaf = doc.createTextNode(text.slice(from - offset, to - offset));
94
- leaves.push({ dom: leaf, offset: from, size: to - from });
95
- let outer = leaf;
96
- // Marks are in canonical order, outermost first (a link wraps the formatting inside it).
97
- for (const mark of [...child.marks].reverse()) {
98
- const wrapper = markElement(mark, doc);
99
- wrapper.append(outer);
100
- outer = wrapper;
101
- }
102
- fragmentAt(from).append(outer);
103
- from = to;
104
- }
105
- });
106
- // An empty block, or one ending in a hard break, needs an extra <br> to show its last line.
107
- if (!node.lastChild?.isText)
108
- fragments[fragments.length - 1].append(doc.createElement("br"));
109
- // A fragment's last line is not the paragraph's last line: justified text stays justified up
110
- // to the page break (CSS aligns a block's last line to the start). `text-align-last` also
111
- // applies to every line before a forced break, which the paragraph shows start-aligned, so it
112
- // is only set on fragments without one.
113
- // shortcut: a fragment holding a hard break keeps its last line start-aligned at the page break; fixing that needs a per-line wrapper.
114
- if (align === "justify")
115
- for (const fragment of fragments.slice(0, -1))
116
- if (!fragment.querySelector("br"))
117
- fragment.style.textAlignLast = "justify";
118
- return { node, dom, fragments, splits, leaves };
119
- }
120
- /**
121
- * Creates the element for a container (list, list item). It takes no vertical space of its own
122
- * (block margins and paddings 0): the page flow treats the blocks inside as siblings, whose
123
- * margins collapse through it (ADR-0004).
124
- */
125
- /** Every container element the view created (a set: checked for every block on every render). */
126
- const wrappers = new WeakSet();
127
- export function createWrapper(node, doc) {
128
- const element = doc.createElement(WRAPPER_TAGS.get(node.type.name) ?? "div");
129
- element.setAttribute(WRAPPER_ATTR, "");
130
- wrappers.add(element);
131
- const { style } = element;
132
- style.marginTop = style.marginBottom = style.paddingTop = style.paddingBottom = "0";
133
- return element;
134
- }
135
- /** Whether `element` is the container element `createWrapper` makes for `node`. */
136
- export function isWrapperFor(element, node) {
137
- return (element !== null &&
138
- wrappers.has(element) &&
139
- element.localName === (WRAPPER_TAGS.get(node.type.name) ?? "div"));
140
- }
141
- /** Whether `node` is a container element the view created. */
142
- export function isWrapper(node) {
143
- return node !== null && wrappers.has(node);
144
- }
145
- /**
146
- * Renders a fragment of blocks as one DOM tree, for the clipboard: containers become their
147
- * elements (with the list's start number), leaf blocks as in the editor, unsplit.
148
- */
149
- export function renderTree(content, parent, doc) {
150
- for (const node of content) {
151
- if (node.isTextblock || node.isLeaf) {
152
- parent.appendChild(renderBlock(node, doc).dom);
153
- continue;
154
- }
155
- const element = createWrapper(node, doc);
156
- wrappers.delete(element);
157
- element.removeAttribute(WRAPPER_ATTR);
158
- element.removeAttribute("style");
159
- const start = node.attrs.start;
160
- if (typeof start === "number" && start !== 1)
161
- element.setAttribute("start", String(start));
162
- renderTree(node.content.content, element, doc);
163
- parent.appendChild(element);
164
- }
165
- }
166
3
  //# sourceMappingURL=render.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"render.js","sourceRoot":"","sources":["../src/render.ts"],"names":[],"mappings":"AAEA,gGAAgG;AAChG,8CAA8C;AAC9C,MAAM,SAAS,GAAgC,IAAI,GAAG,CACpD,MAAM,CAAC,OAAO,CAAC;IACb,IAAI,EAAE,QAAQ;IACd,MAAM,EAAE,IAAI;IACZ,SAAS,EAAE,GAAG;IACd,MAAM,EAAE,GAAG;CAC6B,CAAC,CAC5C,CAAC;AAEF,gDAAgD;AAChD,MAAM,CAAC,MAAM,eAAe,GAAG,iBAAiB,CAAC;AAEjD,kFAAkF;AAClF,MAAM,CAAC,MAAM,YAAY,GAAG,mBAAmB,CAAC;AAEhD,wFAAwF;AACxF,MAAM,YAAY,GAAgC,IAAI,GAAG,CAAC;IACxD,CAAC,YAAY,EAAE,IAAI,CAAC;IACpB,CAAC,aAAa,EAAE,IAAI,CAAC;IACrB,CAAC,UA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C,OAAO,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC;QACjC,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC;QAC/B,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,CAAC;YAAE,OAAO,CAAC,YAAY,CAAC,OAAO,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;QAC3F,UAAU,CAAC,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE,OAAO,EAAE,GAAG,CAAC,CAAC;QAC/C,MAAM,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC;IAC9B,CAAC;AACH,CAAC"}
1
+ {"version":3,"file":"render.js","sourceRoot":"","sources":["../src/render.ts"],"names":[],"mappings":"AAEA,gDAAgD;AAChD,MAAM,CAAC,MAAM,eAAe,GAAG,iBAAiB,CAAC"}
package/dist/view.d.ts CHANGED
@@ -18,9 +18,8 @@ export interface EditorViewOptions {
18
18
  * view cannot prevent (Android keyboards, extensions). A MutationObserver records those; the view
19
19
  * then reads the changed text back into a transaction (`readBack`) and re-renders.
20
20
  *
21
- * Blocks are the leaf blocks of the document at any depth (paragraphs, headings, rules); the
22
- * containers around them (lists, list items) are rebuilt on each page around the blocks it holds
23
- * (ADR-0004).
21
+ * Blocks are the document's paragraphs and opaque blocks (a schema v3 document has no
22
+ * containers: a list is numbered paragraphs).
24
23
  */
25
24
  export declare class EditorView {
26
25
  readonly host: HTMLElement;
@@ -29,12 +28,8 @@ export declare class EditorView {
29
28
  private blocks;
30
29
  /** Position before each block, parallel to `blocks`. */
31
30
  private starts;
32
- /** The containers around each block, outermost first, parallel to `blocks`. */
33
- private chains;
34
31
  /** The index of each block in `blocks`. */
35
32
  private indexOf;
36
- /** The container types around each block at its last render (a change means re-measuring). */
37
- private chainKeys;
38
33
  /** The element that shows a node selection, if any. */
39
34
  private selectedDom;
40
35
  /** The page of each fragment of each block. */
@@ -43,7 +38,16 @@ export declare class EditorView {
43
38
  private owner;
44
39
  /** The page elements, in order; the host's only children. */
45
40
  private pages;
46
- private pageStyle;
41
+ /** The page setup of each page (its section's), parallel to `pages`. */
42
+ private sheets;
43
+ /** The page setups the print rules were written for. */
44
+ private printKey;
45
+ /**
46
+ * Each block's page setup and whether a section break follows it, as last rendered: a block
47
+ * whose layout changed (a section break inserted or removed around it) is measured and
48
+ * flowed again.
49
+ */
50
+ private layoutKeys;
47
51
  /** Marks the host for this view's print rules (`printStyles`). */
48
52
  private readonly id;
49
53
  /**
@@ -58,7 +62,7 @@ export declare class EditorView {
58
62
  * Measurements by model node: a node's rendered height, margins and lines only depend on
59
63
  * its content (unchanged node, same identity), the page width and the CSS. Cleared when the
60
64
  * page settings or the fonts change; single entries go stale when a block's size changes
61
- * without an edit (`ResizeObserver`: CSS, fonts, a container).
65
+ * without an edit (`ResizeObserver`: CSS, fonts).
62
66
  */
63
67
  private measures;
64
68
  private readonly stale;
@@ -83,6 +87,8 @@ export declare class EditorView {
83
87
  private readonly observer;
84
88
  private readonly unsubscribe;
85
89
  private editable;
90
+ /** Escape was the last key: Tab now leaves the editor. */
91
+ private tabLeaves;
86
92
  private placeholder;
87
93
  /** The block that shows the placeholder, if any. */
88
94
  private placeholderDom;
@@ -90,6 +96,14 @@ export declare class EditorView {
90
96
  private pointerFocus;
91
97
  /** Whether the view added the host's tabindex (a read-only host must stay focusable). */
92
98
  private readonly addedTabIndex;
99
+ /** Renders the document's blocks; made by the first render. */
100
+ private word;
101
+ /** How tracked changes show. */
102
+ private review;
103
+ /** Fonts' normal line height ratios, measured once per family (Word's single spacing). */
104
+ private readonly ratios;
105
+ /** Web fonts loaded since the v3 blocks were drawn: the next render draws them again. */
106
+ private fontsChanged;
93
107
  constructor(host: HTMLElement, editor: Editor, options?: EditorViewOptions);
94
108
  destroy(): void;
95
109
  /** Focuses the host, shows the model selection in it and scrolls it into view. */
@@ -117,17 +131,20 @@ export declare class EditorView {
117
131
  * Measurements are cached by node and the flow restarts at the first changed block (5.4).
118
132
  */
119
133
  private render;
134
+ /** A font's normal line height ratio, measured outside the host (no input to read back). */
135
+ private lineRatio;
120
136
  /**
121
137
  * Puts each fragment of each block into its page (pages are non-decreasing in document
122
- * order), inside the elements of the block's containers (lists, list items), creating and
123
- * removing pages as needed. A page reuses the container elements already at the same place
124
- * (same tag, in order), so an edit inside a list moves no DOM. Anything else in the host, a
125
- * page or a container (stray DOM) is removed.
138
+ * order), creating and removing pages as needed, and gives each page the page setup of its
139
+ * blocks' section (one per page: `separateSheets`, section breaks). Anything else in the host
140
+ * or a page (stray DOM) is removed.
126
141
  */
127
142
  private place;
128
143
  private createPage;
129
- /** Page size and margins from the document settings, applied to every page when they change. */
130
- private applyGeometry;
144
+ /** The last section's page setup (the envelope's), for an empty document. */
145
+ private lastSheet;
146
+ /** The print rules for the document's page setups, written when they change. */
147
+ private applyPrintStyles;
131
148
  /** Forgets every measurement: the next flow measures the whole document again. */
132
149
  private invalidateLayout;
133
150
  /** Re-flows the pages once web fonts have loaded: line heights and wrapping change. */
@@ -143,7 +160,7 @@ export declare class EditorView {
143
160
  private scheduleRelayout;
144
161
  /** The block element (a fragment of a rendered block) that contains `node`, or null. */
145
162
  private blockElement;
146
- /** Whether `node` holds blocks rather than content: the host, a page or a container. */
163
+ /** Whether `node` holds blocks rather than content: the host or a page. */
147
164
  private holdsBlocks;
148
165
  /** Index of the first block that starts at or after `pos` (the block count if none). */
149
166
  private blockFrom;
@@ -208,6 +225,12 @@ export declare class EditorView {
208
225
  * shortcut: left-to-right only (ArrowRight is forward); bidi text needs visual order here and in the line measurement.
209
226
  */
210
227
  private crossFragmentEdge;
228
+ /**
229
+ * A v3 list number is not text, but browsers stop the caret before it as well as after: Right
230
+ * at the end of the paragraph before, or Left at a numbered paragraph's start, would seem to do
231
+ * nothing. Moves over the paragraph boundary in one step (word moves are left to the browser).
232
+ */
233
+ private crossListNumber;
211
234
  /** Safety net: a DOM change that was not prevented is read back into the model. */
212
235
  private onInput;
213
236
  private onCompositionStart;
@@ -1 +1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