pipeup 0.4.0 → 0.4.1-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -6,11 +6,11 @@ export declare const ACTIVATES = "a,button,summary,[role=button],[role=link],[ro
6
6
  export declare const KEYS_HINT = "Tab moves between blocks \u00B7 \u2191 \u2193 change level \u00B7 Enter comments \u00B7 Esc to finish \u00B7 F7 selects text";
7
7
  /** Comment mode's view. */
8
8
  export interface CommentMode extends View {
9
- /** Escape's step: clears a chosen block, else puts the block cursor away; false when there was neither. */
9
+ /** Escape's step: clears a chosen block; false when there was none (comment mode ends next). */
10
10
  back(): boolean;
11
- /** The keyboard's block cursor is in use (started, and not put away). */
11
+ /** The keyboard's block cursor is in use (started, and not put away by a click, a selection or the mouse). */
12
12
  cursor(): boolean;
13
- /** The block cursor was put away: the shortcut brings it back. */
13
+ /** The block cursor was put away by the mouse or a selection: the shortcut brings it back. */
14
14
  away(): boolean;
15
15
  /** Starts the block cursor, or brings it back: on its last block if still here, else where focus is, else the first block in view. */
16
16
  resume(): boolean;
@@ -14,6 +14,18 @@ export interface Look {
14
14
  width: number;
15
15
  height: number;
16
16
  };
17
+ /**
18
+ * How the element sits in the page, for the keyboard's tree: its computed `display` and `position`, whether it
19
+ * clips what overflows it (hidden or clip, never a scroll box), and whether it is set not to respond to the
20
+ * pointer. Optional: without it every block counts.
21
+ */
22
+ flow?(el: Element): Flow;
23
+ }
24
+ export interface Flow {
25
+ display: string;
26
+ position: string;
27
+ clips: boolean;
28
+ off: boolean;
17
29
  }
18
30
  /** `el` is a block a click would choose: big enough to see, and marked, obvious, drawn or grouping things. */
19
31
  export declare function isBlock(el: Element, look: Look): boolean;
@@ -32,7 +44,10 @@ export interface Block {
32
44
  /**
33
45
  * Every block under `root` in page order, each with the block around it as `parentBlock` finds it: wrappers the
34
46
  * same size fold into the innermost, unless the outer one is marked (`data-pipeup-id`) and the inner one isn't.
35
- * Ignored areas, and subtrees `keep` rejects (hidden, on another slide), are left out.
47
+ * Ignored areas, subtrees hidden from screen readers or clipped out of sight, and subtrees `keep` rejects
48
+ * (hidden, on another slide), are left out. The keyboard stops only where a reviewer would click: never on what
49
+ * doesn't take the pointer, on the parts inside a control (the control is the stop), on words styled inside a
50
+ * line of text, or on tiny decorations; what the author marked always counts.
36
51
  */
37
52
  export declare function blockTree(root: Element, look: Look, keep?: (el: Element) => boolean): Block[];
38
53
  /** The blocks Tab visits at level `k`: at that level or below, with no block of that level around them. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pipeup",
3
- "version": "0.4.0",
3
+ "version": "0.4.1-beta.1",
4
4
  "description": "Comments and feedback right on any HTML page: documents, slide decks and whole sites.",
5
5
  "keywords": [
6
6
  "comments",