@graview/primitives 0.1.65 → 0.1.67
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/app-bar.d.ts +114 -15
- package/dist/app-bar.d.ts.map +1 -1
- package/dist/app-bar.js +192 -130
- package/dist/app-bar.js.map +1 -1
- package/dist/app-menu.d.ts +9 -0
- package/dist/app-menu.d.ts.map +1 -0
- package/dist/app-menu.js +60 -0
- package/dist/app-menu.js.map +1 -0
- package/dist/bar-activity.d.ts +5 -9
- package/dist/bar-activity.d.ts.map +1 -1
- package/dist/bar-activity.js +24 -7
- package/dist/bar-activity.js.map +1 -1
- package/dist/bar-panes.d.ts +5 -5
- package/dist/bar-panes.d.ts.map +1 -1
- package/dist/bar-panes.js +9 -5
- package/dist/bar-panes.js.map +1 -1
- package/dist/bar-suggested.d.ts +9 -1
- package/dist/bar-suggested.d.ts.map +1 -1
- package/dist/bar-suggested.js +11 -17
- package/dist/bar-suggested.js.map +1 -1
- package/dist/better-bar.d.ts +77 -0
- package/dist/better-bar.d.ts.map +1 -0
- package/dist/better-bar.js +312 -0
- package/dist/better-bar.js.map +1 -0
- package/dist/better-panel.d.ts +55 -0
- package/dist/better-panel.d.ts.map +1 -0
- package/dist/better-panel.js +151 -0
- package/dist/better-panel.js.map +1 -0
- package/dist/editable.d.ts +8 -1
- package/dist/editable.d.ts.map +1 -1
- package/dist/editable.js +140 -16
- package/dist/editable.js.map +1 -1
- package/dist/first-look-door.d.ts +2 -2
- package/dist/first-look-door.js +2 -2
- package/dist/first-look.d.ts.map +1 -1
- package/dist/first-look.js +9 -7
- package/dist/first-look.js.map +1 -1
- package/dist/frame.d.ts +2 -2
- package/dist/frame.d.ts.map +1 -1
- package/dist/frame.js +1 -1
- package/dist/frame.js.map +1 -1
- package/dist/inbox-pane.d.ts +31 -0
- package/dist/inbox-pane.d.ts.map +1 -0
- package/dist/inbox-pane.js +89 -0
- package/dist/inbox-pane.js.map +1 -0
- package/dist/inbox.d.ts +17 -0
- package/dist/inbox.d.ts.map +1 -0
- package/dist/inbox.js +84 -0
- package/dist/inbox.js.map +1 -0
- package/dist/index.d.ts +4 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -2
- package/dist/index.js.map +1 -1
- package/dist/lens/calendar-drawing.js +7 -3
- package/dist/lens/calendar-drawing.js.map +1 -1
- package/dist/menu-suggested.d.ts +54 -0
- package/dist/menu-suggested.d.ts.map +1 -0
- package/dist/menu-suggested.js +140 -0
- package/dist/menu-suggested.js.map +1 -0
- package/dist/menu-told-door.js +1 -1
- package/dist/menu-told-door.js.map +1 -1
- package/dist/menu-told.d.ts +7 -0
- package/dist/menu-told.d.ts.map +1 -1
- package/dist/menu-told.js +24 -0
- package/dist/menu-told.js.map +1 -1
- package/dist/notify-sheet.js +2 -2
- package/dist/notify-sheet.js.map +1 -1
- package/dist/page-better.d.ts +27 -0
- package/dist/page-better.d.ts.map +1 -0
- package/dist/page-better.js +747 -0
- package/dist/page-better.js.map +1 -0
- package/dist/page-parts.d.ts +41 -0
- package/dist/page-parts.d.ts.map +1 -0
- package/dist/page-parts.js +101 -0
- package/dist/page-parts.js.map +1 -0
- package/dist/pages.d.ts +2 -3
- package/dist/pages.d.ts.map +1 -1
- package/dist/pages.js +2 -3
- package/dist/pages.js.map +1 -1
- package/dist/profile.d.ts +1 -10
- package/dist/profile.d.ts.map +1 -1
- package/dist/profile.js +2 -3
- package/dist/profile.js.map +1 -1
- package/dist/scene-bar.d.ts +1 -1
- package/dist/scene-bar.d.ts.map +1 -1
- package/dist/scene-bar.js +4 -7
- package/dist/scene-bar.js.map +1 -1
- package/dist/section-better.d.ts +66 -9
- package/dist/section-better.d.ts.map +1 -1
- package/dist/section-better.js +285 -136
- package/dist/section-better.js.map +1 -1
- package/dist/section-door.d.ts +7 -0
- package/dist/section-door.d.ts.map +1 -1
- package/dist/section-door.js +39 -5
- package/dist/section-door.js.map +1 -1
- package/dist/section-menu.d.ts +23 -9
- package/dist/section-menu.d.ts.map +1 -1
- package/dist/section-menu.js +176 -23
- package/dist/section-menu.js.map +1 -1
- package/dist/section-words.d.ts +8 -0
- package/dist/section-words.d.ts.map +1 -1
- package/dist/section-words.js +25 -0
- package/dist/section-words.js.map +1 -1
- package/dist/shell.d.ts +7 -1
- package/dist/shell.d.ts.map +1 -1
- package/dist/shell.js +4 -2
- package/dist/shell.js.map +1 -1
- package/dist/suggested.d.ts +21 -10
- package/dist/suggested.d.ts.map +1 -1
- package/dist/suggested.js +80 -66
- package/dist/suggested.js.map +1 -1
- package/dist/suggestion-sentence.d.ts +50 -0
- package/dist/suggestion-sentence.d.ts.map +1 -0
- package/dist/suggestion-sentence.js +119 -0
- package/dist/suggestion-sentence.js.map +1 -0
- package/dist/told-card.js +1 -1
- package/dist/told-card.js.map +1 -1
- package/dist/told-ui.d.ts +1 -1
- package/dist/told-ui.d.ts.map +1 -1
- package/dist/told-ui.js +1 -1
- package/dist/told-ui.js.map +1 -1
- package/dist/when-words.d.ts +21 -0
- package/dist/when-words.d.ts.map +1 -0
- package/dist/when-words.js +43 -0
- package/dist/when-words.js.map +1 -0
- package/dist/workbench/activity.d.ts +44 -0
- package/dist/workbench/activity.d.ts.map +1 -1
- package/dist/workbench/activity.js +74 -59
- package/dist/workbench/activity.js.map +1 -1
- package/dist/workbench/inspector.d.ts.map +1 -1
- package/dist/workbench/inspector.js +170 -31
- package/dist/workbench/inspector.js.map +1 -1
- package/dist/workbench/standing.d.ts.map +1 -1
- package/dist/workbench/standing.js +1 -1
- package/dist/workbench/standing.js.map +1 -1
- package/package.json +6 -6
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import type { DrawnRead } from "@graview/tools/section";
|
|
2
|
+
import { type ReactNode } from "react";
|
|
3
|
+
/**
|
|
4
|
+
* THE RECORDS A VIEW'S DRAWING SHOWS, BY NAME (Roadmap
|
|
5
|
+
* f-better-ui-draws-first-time): each keyed row or card (`data-key`) and
|
|
6
|
+
* each record it links to (`data-record`), named as its record is — the
|
|
7
|
+
* label its kind gives it (`labelOf`, by its id) where the row says it,
|
|
8
|
+
* else a link's own words — never a row's words run together, which glue a
|
|
9
|
+
* tag to the name beside it ("bookedThe Velvet Notes"). A row of several
|
|
10
|
+
* runs of words and no link names nothing it could be sure of.
|
|
11
|
+
*/
|
|
12
|
+
export declare function recordLabelsOf(root: ParentNode | null | undefined, labelOf?: (id: string) => string | undefined): string[];
|
|
13
|
+
/** The headings of a part, each in its own words: what may be reworded where a person asks it of that part. */
|
|
14
|
+
export declare function headingsOf(elements: readonly Element[]): string[];
|
|
15
|
+
/**
|
|
16
|
+
* A DRAWING READ FOR JUDGING: its headings in order, each record a label
|
|
17
|
+
* names — the innermost element that says it, where it stands and how big
|
|
18
|
+
* its type is, what its row or card says beside its name and the heading
|
|
19
|
+
* it sits under — and all its words, through each worker view's drawing.
|
|
20
|
+
*/
|
|
21
|
+
export declare function readDrawn(root: Element | null | undefined, labels: readonly string[]): DrawnRead;
|
|
22
|
+
/**
|
|
23
|
+
* THE PART BEING CHANGED, COVERED WHILE GRAVIEW WORKS ON IT: whole, so a
|
|
24
|
+
* draft drawn under it to be judged is never seen, with the words of what
|
|
25
|
+
* is happening on it. Gone once a draft passed, or none did.
|
|
26
|
+
*/
|
|
27
|
+
export declare function Redesigning({ over, name, said }: {
|
|
28
|
+
readonly over: Element | null | undefined;
|
|
29
|
+
readonly name: string;
|
|
30
|
+
readonly said?: string;
|
|
31
|
+
}): import("react").JSX.Element;
|
|
32
|
+
export interface DraftBarProps {
|
|
33
|
+
/** The phase the flow is at, carried as `data-section-phase` for the card it was. */
|
|
34
|
+
readonly phase: string;
|
|
35
|
+
/** What the bar is about: “Lists”. */
|
|
36
|
+
readonly name: string;
|
|
37
|
+
/** The one line of what changed, in the code's words. */
|
|
38
|
+
readonly said: string;
|
|
39
|
+
/** Who it changes it for, in a sentence. */
|
|
40
|
+
readonly scope?: string;
|
|
41
|
+
/** A line under it, quiet: what the host said when it kept it. */
|
|
42
|
+
readonly note?: string;
|
|
43
|
+
/** The draft's steps: how many, and whether the one before can be gone back to. */
|
|
44
|
+
readonly step?: {
|
|
45
|
+
readonly at: number;
|
|
46
|
+
readonly of: number;
|
|
47
|
+
readonly back?: () => void;
|
|
48
|
+
};
|
|
49
|
+
/** Before and After: whether the original is shown now, and the switch. */
|
|
50
|
+
readonly compare?: {
|
|
51
|
+
readonly before: boolean;
|
|
52
|
+
readonly toggle: (before: boolean) => void;
|
|
53
|
+
};
|
|
54
|
+
/** Words that change the draft again. */
|
|
55
|
+
readonly iterate?: (words: string) => void;
|
|
56
|
+
/** Its buttons: Keep and Discard on a draft, Undo and Close once kept, Close where it ends. */
|
|
57
|
+
readonly keep?: () => void;
|
|
58
|
+
readonly discard?: () => void;
|
|
59
|
+
readonly undo?: () => void;
|
|
60
|
+
readonly close?: () => void;
|
|
61
|
+
/** Words that try again, where nothing passed. */
|
|
62
|
+
readonly retry?: (words: string) => void;
|
|
63
|
+
/** Try harder: the full model, once, where the light one could not keep the page. */
|
|
64
|
+
readonly tryHarder?: () => void;
|
|
65
|
+
/** Cancel what is thinking: at once, the page as it was. */
|
|
66
|
+
readonly cancel?: () => void;
|
|
67
|
+
readonly busy?: boolean;
|
|
68
|
+
readonly children?: ReactNode;
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* THE DRAFT'S BAR: one line of what changed, said by code; who it changes
|
|
72
|
+
* it for; Before and After to compare in place; "Tell it what to change…"
|
|
73
|
+
* to take another step, and a step back; Keep and Discard. Docked at the
|
|
74
|
+
* foot of the window, full width on a phone, never over what it changed.
|
|
75
|
+
*/
|
|
76
|
+
export declare function DraftBar(props: DraftBarProps): import("react").JSX.Element;
|
|
77
|
+
//# sourceMappingURL=better-bar.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"better-bar.d.ts","sourceRoot":"","sources":["../src/better-bar.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAA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Q,CAAC,IAAI,CAAC,EAAE,MAAM,IAAI,CAAA;KAAE,CAAC;IACzF,2EAA2E;IAC3E,QAAQ,CAAC,OAAO,CAAC,EAAE;QAAE,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC;QAAC,QAAQ,CAAC,MAAM,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,IAAI,CAAA;KAAE,CAAC;IAC5F,yCAAyC;IACzC,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAC3C,+FAA+F;IAC/F,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,IAAI,CAAC;IAC3B,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IAC9B,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,IAAI,CAAC;IAC3B,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,IAAI,CAAC;IAC5B,kDAAkD;IAClD,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACzC,qFAAqF;IACrF,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;IAChC,4DAA4D;IAC5D,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IAC7B,QAAQ,CAAC,IAAI,CAAC,EAAE,OAAO,CAAC;IACxB,QAAQ,CAAC,QAAQ,CAAC,EAAE,SAAS,CAAC;CAC/B;AAED;;;;;GAKG;AACH,wBAAgB,QAAQ,CAAC,KAAK,EAAE,aAAa,+BA4G5C"}
|
|
@@ -0,0 +1,312 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { layer } from "@graview/core";
|
|
3
|
+
import { useEffect, useLayoutEffect, useRef, useState } from "react";
|
|
4
|
+
import { boxOf } from "./section-outline.js";
|
|
5
|
+
import { VISUALLY_HIDDEN } from "./primitives/measure.js";
|
|
6
|
+
/*
|
|
7
|
+
* THE BETTER UI FLOW, DRAWN (Roadmap f-make-any-page-better): the part
|
|
8
|
+
* being changed covered while Graview works on it, the draft given the
|
|
9
|
+
* page once it passed, and the controls out of its way in a slim bar
|
|
10
|
+
* docked at the foot of the window — a bottom sheet's peek on a phone.
|
|
11
|
+
* Shared by a built-in page's card (`page-better.tsx`) and a view's
|
|
12
|
+
* section (`section-better.tsx`).
|
|
13
|
+
*/
|
|
14
|
+
const words = (text) => (text ?? "").replace(/\s+/g, " ").trim();
|
|
15
|
+
/** The roots a drawing is read through: the element, and each worker view's own drawing inside it. */
|
|
16
|
+
function rootsOf(root) {
|
|
17
|
+
const roots = [root];
|
|
18
|
+
if (root.shadowRoot)
|
|
19
|
+
roots.push(root.shadowRoot);
|
|
20
|
+
for (const region of root.querySelectorAll("[data-worker-view]"))
|
|
21
|
+
if (region.shadowRoot)
|
|
22
|
+
roots.push(region.shadowRoot);
|
|
23
|
+
return roots;
|
|
24
|
+
}
|
|
25
|
+
/** The text a person reads in a root: what is drawn and shown, not what is hidden. */
|
|
26
|
+
function shownText(root) {
|
|
27
|
+
if (root instanceof HTMLElement)
|
|
28
|
+
return root.innerText ?? root.textContent ?? "";
|
|
29
|
+
return [...root.children].map((one) => (one instanceof HTMLElement ? (one.innerText ?? one.textContent ?? "") : (one.textContent ?? ""))).join(" ");
|
|
30
|
+
}
|
|
31
|
+
/** Words a row says that are its controls or its marks, not what it tells of the record. */
|
|
32
|
+
const NOT_A_FACT = /^[\s·•|,:;–—\-+…✓✔×↓↑▸▾☆★⋯]*$/u;
|
|
33
|
+
/**
|
|
34
|
+
* WHAT A RECORD'S ROW OR CARD SAYS BESIDE ITS NAME: each bit of words drawn
|
|
35
|
+
* apart in it ("Todo", "Sep 3, 2026", "3 tasks"), not its name, not a
|
|
36
|
+
* control's label, nothing hidden — the facts a draft must still say.
|
|
37
|
+
*/
|
|
38
|
+
function factsOf(row, name) {
|
|
39
|
+
const facts = [];
|
|
40
|
+
const walker = (row.ownerDocument ?? document).createTreeWalker(row, NodeFilter.SHOW_TEXT);
|
|
41
|
+
const byParent = new Map();
|
|
42
|
+
for (let node = walker.nextNode(); node; node = walker.nextNode()) {
|
|
43
|
+
const parent = node.parentElement;
|
|
44
|
+
// A link goes somewhere (the trail, "In the scene", another record): where it goes is not what the row says of the record.
|
|
45
|
+
if (!parent || name.contains(parent) || parent.closest("button, input, select, textarea, [role='button'], nav, [hidden], [aria-hidden='true'], script, style"))
|
|
46
|
+
continue;
|
|
47
|
+
const link = parent.closest("a[href]");
|
|
48
|
+
if (link && !link.contains(name))
|
|
49
|
+
continue;
|
|
50
|
+
byParent.set(parent, (byParent.get(parent) ?? "") + (node.textContent ?? ""));
|
|
51
|
+
}
|
|
52
|
+
// Facts a row says together ("Sep 3, 2026 · Done: no") are each a fact of their own.
|
|
53
|
+
for (const [parent, text] of [...byParent].flatMap(([parent, text]) => text.split(/\s+·\s+/).map((one) => [parent, one]))) {
|
|
54
|
+
const said = words(text);
|
|
55
|
+
// Words or a number: a mark alone ("⚠", "·") says nothing a draft must keep.
|
|
56
|
+
if (!said || said.length > 40 || NOT_A_FACT.test(said) || !/[\p{L}\p{N}]/u.test(said) || parent.getClientRects().length === 0)
|
|
57
|
+
continue;
|
|
58
|
+
if (!facts.includes(said))
|
|
59
|
+
facts.push(said);
|
|
60
|
+
if (facts.length >= 6)
|
|
61
|
+
break;
|
|
62
|
+
}
|
|
63
|
+
return facts;
|
|
64
|
+
}
|
|
65
|
+
/** The runs of words a person reads in an element, each apart: never its controls, nothing hidden. */
|
|
66
|
+
function runsOf(element) {
|
|
67
|
+
const runs = [];
|
|
68
|
+
const walker = (element.ownerDocument ?? document).createTreeWalker(element, NodeFilter.SHOW_TEXT);
|
|
69
|
+
for (let node = walker.nextNode(); node; node = walker.nextNode()) {
|
|
70
|
+
const said = words(node.textContent);
|
|
71
|
+
if (said && !node.parentElement?.closest("button, script, style, [hidden], [aria-hidden='true']"))
|
|
72
|
+
runs.push(said);
|
|
73
|
+
}
|
|
74
|
+
return runs;
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* THE RECORDS A VIEW'S DRAWING SHOWS, BY NAME (Roadmap
|
|
78
|
+
* f-better-ui-draws-first-time): each keyed row or card (`data-key`) and
|
|
79
|
+
* each record it links to (`data-record`), named as its record is — the
|
|
80
|
+
* label its kind gives it (`labelOf`, by its id) where the row says it,
|
|
81
|
+
* else a link's own words — never a row's words run together, which glue a
|
|
82
|
+
* tag to the name beside it ("bookedThe Velvet Notes"). A row of several
|
|
83
|
+
* runs of words and no link names nothing it could be sure of.
|
|
84
|
+
*/
|
|
85
|
+
export function recordLabelsOf(root, labelOf) {
|
|
86
|
+
if (!root)
|
|
87
|
+
return [];
|
|
88
|
+
const labels = [];
|
|
89
|
+
const add = (label) => {
|
|
90
|
+
const said = words(label);
|
|
91
|
+
if (said.length > 1 && said.length < 80 && !labels.some((one) => one.toLowerCase() === said.toLowerCase()))
|
|
92
|
+
labels.push(said);
|
|
93
|
+
};
|
|
94
|
+
for (const row of root.querySelectorAll("[data-key], [data-record]")) {
|
|
95
|
+
const id = row.getAttribute("data-record") ?? row.getAttribute("data-key") ?? "";
|
|
96
|
+
const runs = runsOf(row);
|
|
97
|
+
const own = id && labelOf ? labelOf(id) : undefined;
|
|
98
|
+
if (own && runs.join(" ").toLowerCase().includes(words(own).toLowerCase()))
|
|
99
|
+
add(own);
|
|
100
|
+
// A keyed row with a link in it is named by the link, read on its own.
|
|
101
|
+
else if (!row.hasAttribute("data-record") && row.querySelector("[data-record]"))
|
|
102
|
+
continue;
|
|
103
|
+
else if (runs.length === 1)
|
|
104
|
+
add(runs[0]);
|
|
105
|
+
}
|
|
106
|
+
return labels.slice(0, 40);
|
|
107
|
+
}
|
|
108
|
+
/** The headings of a part, each in its own words: what may be reworded where a person asks it of that part. */
|
|
109
|
+
export function headingsOf(elements) {
|
|
110
|
+
const out = [];
|
|
111
|
+
for (const element of elements)
|
|
112
|
+
for (const heading of [element, ...element.querySelectorAll("*")]) {
|
|
113
|
+
if (!heading.matches("h1, h2, h3, h4, h5, h6, [role='heading']"))
|
|
114
|
+
continue;
|
|
115
|
+
const copy = heading.cloneNode(true);
|
|
116
|
+
for (const span of copy.querySelectorAll("span"))
|
|
117
|
+
if (/^[\s·\d]+$/.test(span.textContent ?? ""))
|
|
118
|
+
span.remove();
|
|
119
|
+
const said = words(copy.textContent).replace(/^[▸▾]\s*/, "");
|
|
120
|
+
if (said && !out.includes(said))
|
|
121
|
+
out.push(said);
|
|
122
|
+
}
|
|
123
|
+
return out;
|
|
124
|
+
}
|
|
125
|
+
/**
|
|
126
|
+
* A DRAWING READ FOR JUDGING: its headings in order, each record a label
|
|
127
|
+
* names — the innermost element that says it, where it stands and how big
|
|
128
|
+
* its type is, what its row or card says beside its name and the heading
|
|
129
|
+
* it sits under — and all its words, through each worker view's drawing.
|
|
130
|
+
*/
|
|
131
|
+
export function readDrawn(root, labels) {
|
|
132
|
+
if (!root?.isConnected)
|
|
133
|
+
return { headings: [], records: [], text: "" };
|
|
134
|
+
const roots = rootsOf(root);
|
|
135
|
+
const headings = [];
|
|
136
|
+
const headingAt = [];
|
|
137
|
+
for (const one of roots)
|
|
138
|
+
for (const heading of one.querySelectorAll("h1, h2, h3, [role='heading']")) {
|
|
139
|
+
if (heading.closest("[data-graview-popover], [hidden], [aria-hidden='true'], nav"))
|
|
140
|
+
continue;
|
|
141
|
+
const copy = heading.cloneNode(true);
|
|
142
|
+
for (const span of copy.querySelectorAll("span"))
|
|
143
|
+
if (/^[\s·\d]+$/.test(span.textContent ?? ""))
|
|
144
|
+
span.remove();
|
|
145
|
+
const said = words(copy.textContent).replace(/^[▸▾]\s*/, "");
|
|
146
|
+
if (said) {
|
|
147
|
+
headings.push(said);
|
|
148
|
+
headingAt.push({ element: heading, said });
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
const named = new Map();
|
|
152
|
+
for (const label of labels) {
|
|
153
|
+
const want = words(label).toLowerCase();
|
|
154
|
+
if (!want || named.has(label))
|
|
155
|
+
continue;
|
|
156
|
+
let best;
|
|
157
|
+
for (const one of roots)
|
|
158
|
+
for (const element of one.querySelectorAll("a, li, p, span, h2, h3, h4, strong, div, button, td")) {
|
|
159
|
+
if (words(element.textContent).toLowerCase() !== want)
|
|
160
|
+
continue;
|
|
161
|
+
if (!best || best.contains(element))
|
|
162
|
+
best = element;
|
|
163
|
+
}
|
|
164
|
+
if (best)
|
|
165
|
+
named.set(label, best);
|
|
166
|
+
}
|
|
167
|
+
const names = [...named.values()];
|
|
168
|
+
const records = [];
|
|
169
|
+
for (const [label, best] of named) {
|
|
170
|
+
// Its row or card: the widest box around its name that holds no other record's name.
|
|
171
|
+
let row = best;
|
|
172
|
+
for (let up = best.parentElement; up && up !== root && !(up instanceof HTMLBodyElement); up = up.parentElement) {
|
|
173
|
+
if (names.some((other) => other !== best && up.contains(other)))
|
|
174
|
+
break;
|
|
175
|
+
if (up.matches("main, section, ul, ol, table, tbody, [data-graview-page]"))
|
|
176
|
+
break;
|
|
177
|
+
row = up;
|
|
178
|
+
}
|
|
179
|
+
// The heading it sits under: the last one before it in the same drawing that is not in its own row.
|
|
180
|
+
let under;
|
|
181
|
+
// A heading that is a record's own name (a list's card titled "This week") heads that record, not a group.
|
|
182
|
+
const ownNames = new Set(labels.map((one) => words(one).toLowerCase()));
|
|
183
|
+
for (const one of headingAt) {
|
|
184
|
+
if (one.element.getRootNode() !== best.getRootNode() || row.contains(one.element) || one.element.contains(best) || ownNames.has(one.said.toLowerCase()))
|
|
185
|
+
continue;
|
|
186
|
+
if (one.element.compareDocumentPosition(best) & Node.DOCUMENT_POSITION_FOLLOWING)
|
|
187
|
+
under = one.said;
|
|
188
|
+
}
|
|
189
|
+
const box = best.getBoundingClientRect();
|
|
190
|
+
const size = Number.parseFloat(getComputedStyle(best).fontSize) || 16;
|
|
191
|
+
const rowText = row instanceof HTMLElement ? (row.innerText ?? row.textContent ?? "") : (row.textContent ?? "");
|
|
192
|
+
// A record that is the page itself (its title) has the page for its row: what it says is the page's headings and records, judged as those.
|
|
193
|
+
const isPage = best.matches("h1, [data-graview-page-title]") || best.closest("h1, [data-graview-page-title]") !== null;
|
|
194
|
+
// What a person could do on it there: press a control in its row (a circle that finishes it), and open it by its name.
|
|
195
|
+
const presses = !isPage && row !== best && [...row.querySelectorAll("button, [role='button'], [role='checkbox'], [aria-pressed], input[type='checkbox'], [data-act]")].some((one) => !one.contains(best) && !best.contains(one));
|
|
196
|
+
const opens = !isPage && best.closest("a[href], [data-record]") !== null;
|
|
197
|
+
records.push({ label, top: Math.round(box.top), left: Math.round(box.left), size, facts: isPage ? [] : factsOf(row, best), row: words(rowText), ...(under ? { under } : {}), ...(presses ? { presses } : {}), ...(opens ? { opens } : {}) });
|
|
198
|
+
}
|
|
199
|
+
records.sort((a, b) => a.top - b.top || a.left - b.left);
|
|
200
|
+
return { headings, records, text: roots.map(shownText).join(" ") };
|
|
201
|
+
}
|
|
202
|
+
/** Keeps a box over an element as the page moves, each frame. */
|
|
203
|
+
function useOver(target, box, pad = 0) {
|
|
204
|
+
useLayoutEffect(() => {
|
|
205
|
+
let frame = 0;
|
|
206
|
+
const place = () => {
|
|
207
|
+
const at = box.current;
|
|
208
|
+
const over = target?.isConnected ? boxOf([target]) : null;
|
|
209
|
+
if (at && over) {
|
|
210
|
+
const top = Math.max(over.top, 0);
|
|
211
|
+
const bottom = Math.min(over.bottom, innerHeight);
|
|
212
|
+
at.style.display = bottom > top ? "grid" : "none";
|
|
213
|
+
at.style.left = `${Math.round(over.left - pad)}px`;
|
|
214
|
+
at.style.top = `${Math.round(top - pad)}px`;
|
|
215
|
+
at.style.width = `${Math.round(over.width + 2 * pad)}px`;
|
|
216
|
+
at.style.height = `${Math.round(bottom - top + 2 * pad)}px`;
|
|
217
|
+
}
|
|
218
|
+
frame = requestAnimationFrame(place);
|
|
219
|
+
};
|
|
220
|
+
place();
|
|
221
|
+
return () => cancelAnimationFrame(frame);
|
|
222
|
+
}, [target, box, pad]);
|
|
223
|
+
}
|
|
224
|
+
const SHIMMER_CSS = `@keyframes graview-redesign{0%{background-position:100% 0}100%{background-position:-100% 0}}
|
|
225
|
+
[data-graview-redesigning]{background:linear-gradient(90deg,var(--graview-ground) 0%,color-mix(in srgb,var(--graview-panel) 70%,var(--graview-accent) 6%) 50%,var(--graview-ground) 100%);background-size:200% 100%;animation:graview-redesign 1.6s linear infinite}
|
|
226
|
+
@media (prefers-reduced-motion: reduce){[data-graview-redesigning]{animation:none}}`;
|
|
227
|
+
/**
|
|
228
|
+
* THE PART BEING CHANGED, COVERED WHILE GRAVIEW WORKS ON IT: whole, so a
|
|
229
|
+
* draft drawn under it to be judged is never seen, with the words of what
|
|
230
|
+
* is happening on it. Gone once a draft passed, or none did.
|
|
231
|
+
*/
|
|
232
|
+
export function Redesigning({ over, name, said }) {
|
|
233
|
+
const cover = useRef(null);
|
|
234
|
+
useOver(over, cover, 2);
|
|
235
|
+
return (_jsxs("div", { ref: cover, "data-graview-redesigning": "", "data-testid": "redesigning", "data-graview-popover": "", style: COVER, children: [_jsx("style", { children: SHIMMER_CSS }), _jsxs("p", { role: "status", "aria-live": "polite", style: COVER_WORDS, children: [_jsx("span", { "aria-hidden": "true", style: MARK, children: "\u2726" }), " ", said ?? `Graview is redesigning “${name}”…`] })] }));
|
|
236
|
+
}
|
|
237
|
+
/** Room at the foot of the page for the bar, so the end of what is drawn can be scrolled clear of it. */
|
|
238
|
+
function useRoomBelow(bar) {
|
|
239
|
+
useLayoutEffect(() => {
|
|
240
|
+
const before = document.body.style.paddingBottom;
|
|
241
|
+
const room = () => {
|
|
242
|
+
const height = bar.current?.getBoundingClientRect().height ?? 0;
|
|
243
|
+
document.body.style.paddingBottom = `${Math.round(height + 24)}px`;
|
|
244
|
+
};
|
|
245
|
+
room();
|
|
246
|
+
const watch = typeof ResizeObserver === "function" && bar.current ? new ResizeObserver(room) : null;
|
|
247
|
+
if (watch && bar.current)
|
|
248
|
+
watch.observe(bar.current);
|
|
249
|
+
return () => {
|
|
250
|
+
watch?.disconnect();
|
|
251
|
+
document.body.style.paddingBottom = before;
|
|
252
|
+
};
|
|
253
|
+
}, [bar]);
|
|
254
|
+
}
|
|
255
|
+
/**
|
|
256
|
+
* THE DRAFT'S BAR: one line of what changed, said by code; who it changes
|
|
257
|
+
* it for; Before and After to compare in place; "Tell it what to change…"
|
|
258
|
+
* to take another step, and a step back; Keep and Discard. Docked at the
|
|
259
|
+
* foot of the window, full width on a phone, never over what it changed.
|
|
260
|
+
*/
|
|
261
|
+
export function DraftBar(props) {
|
|
262
|
+
const bar = useRef(null);
|
|
263
|
+
const [typed, setTyped] = useState("");
|
|
264
|
+
useRoomBelow(bar);
|
|
265
|
+
/* The keyboard goes to the bar's first button, else the bar itself: never left on what the card was. */
|
|
266
|
+
useEffect(() => {
|
|
267
|
+
(bar.current?.querySelector("[data-first]") ?? bar.current)?.focus({ preventScroll: true });
|
|
268
|
+
}, [props.phase]);
|
|
269
|
+
const ask = props.iterate ?? props.retry;
|
|
270
|
+
return (_jsxs("div", { ref: bar, tabIndex: -1, role: "region", "aria-label": `Changing “${props.name}”`, "data-testid": "section-card", "data-better-bar": "", "data-section-phase": props.phase, "data-graview-popover": "", style: BAR, children: [_jsxs("div", { style: { display: "grid", gap: 2, minWidth: 0 }, children: [_jsx("p", { role: "status", "aria-live": "polite", "data-testid": "section-status", style: props.busy ? BUSY : SAID, children: props.said }), props.scope ? (_jsx("p", { "data-testid": "section-scope", style: QUIET_LINE, children: props.scope })) : null, props.note ? (_jsx("p", { "data-testid": "section-note", style: QUIET_LINE, children: props.note })) : null, props.children] }), _jsxs("div", { style: CONTROLS, children: [props.compare ? (_jsx("div", { role: "group", "aria-label": "Compare", style: SWITCH, children: ["Before", "After"].map((side) => {
|
|
271
|
+
const on = side === "Before" ? props.compare.before : !props.compare.before;
|
|
272
|
+
return (_jsx("button", { type: "button", "data-testid": `section-${side.toLowerCase()}`, "aria-pressed": on, onClick: () => props.compare.toggle(side === "Before"), style: on ? SWITCH_ON : SWITCH_OFF, children: side }, side));
|
|
273
|
+
}) })) : null, props.step && props.step.of > 1 ? (_jsxs("span", { style: { display: "inline-flex", alignItems: "center", gap: 6 }, children: [_jsxs("span", { "data-testid": "section-step", style: QUIET_LINE, children: ["Step ", props.step.at, " of ", props.step.of] }), props.step.back ? (_jsx("button", { type: "button", "data-testid": "section-step-back", onClick: props.step.back, style: QUIET, children: "\u2190 Step back" })) : null] })) : null, ask ? (_jsxs("form", { onSubmit: (event) => {
|
|
274
|
+
event.preventDefault();
|
|
275
|
+
if (!typed.trim())
|
|
276
|
+
return;
|
|
277
|
+
ask(typed.trim());
|
|
278
|
+
setTyped("");
|
|
279
|
+
}, style: { display: "flex", gap: 6, flex: "1 1 220px", minWidth: 0 }, children: [_jsx("label", { htmlFor: "graview-better-words", style: VISUALLY_HIDDEN, children: props.iterate ? "Tell it what to change" : "Try again with words" }), _jsx("input", { id: "graview-better-words", "data-testid": "section-iterate", value: typed, disabled: props.busy, onChange: (event) => setTyped(event.target.value), placeholder: props.iterate ? "Tell it what to change…" : "Try again with words…", style: FIELD })] })) : null, _jsxs("span", { style: { display: "inline-flex", gap: 6, marginLeft: "auto" }, children: [props.tryHarder ? (_jsx("button", { type: "button", "data-first": "", "data-testid": "section-try-harder", onClick: props.tryHarder, style: PRIMARY, children: "Try harder" })) : null, props.retry && !props.iterate ? (_jsx("button", { type: "button", ...(props.tryHarder ? {} : { "data-first": "" }), "data-testid": "section-say-differently", onClick: () => bar.current?.querySelector('[data-testid="section-iterate"]')?.focus(), style: QUIET, children: "Say it differently" })) : null, props.cancel ? (_jsx("button", { type: "button", "data-first": "", "data-testid": "section-cancel", onClick: props.cancel, style: QUIET, children: "Cancel" })) : null, props.keep ? (_jsx("button", { type: "button", "data-first": "", "data-testid": "section-keep", disabled: props.busy, onClick: props.keep, style: PRIMARY, children: "Keep" })) : null, props.discard ? (_jsx("button", { type: "button", "data-testid": "section-discard", onClick: props.discard, style: QUIET, children: "Discard" })) : null, props.undo ? (_jsx("button", { type: "button", "data-first": "", "data-testid": "section-undo", onClick: props.undo, style: QUIET, children: "Undo" })) : null, props.close ? (_jsx("button", { type: "button", ...(props.keep || props.undo || props.tryHarder || props.retry ? {} : { "data-first": "" }), "data-testid": "section-close", onClick: props.close, style: QUIET, children: "Close" })) : null] })] })] }));
|
|
280
|
+
}
|
|
281
|
+
const COVER = { position: "fixed", display: "none", placeItems: "center", boxSizing: "border-box", borderRadius: 12, zIndex: layer("popover"), pointerEvents: "auto", overflow: "hidden" };
|
|
282
|
+
const COVER_WORDS = { margin: 0, padding: "8px 14px", borderRadius: 999, fontSize: "0.9375rem", color: "var(--graview-ink)", background: "var(--graview-float, var(--graview-panel))", border: "1px solid var(--graview-edge)", boxShadow: "var(--graview-lift-low)", position: "sticky", top: 16 };
|
|
283
|
+
const MARK = { color: "var(--graview-accent)" };
|
|
284
|
+
const BAR = {
|
|
285
|
+
position: "fixed",
|
|
286
|
+
left: "max(12px, calc(50% - 440px))",
|
|
287
|
+
right: "max(12px, calc(50% - 440px))",
|
|
288
|
+
bottom: 12,
|
|
289
|
+
zIndex: layer("popover"),
|
|
290
|
+
boxSizing: "border-box",
|
|
291
|
+
display: "grid",
|
|
292
|
+
gap: 8,
|
|
293
|
+
padding: "10px 12px",
|
|
294
|
+
borderRadius: 14,
|
|
295
|
+
border: "1px solid var(--graview-edge)",
|
|
296
|
+
background: "var(--graview-float, var(--graview-panel))",
|
|
297
|
+
color: "var(--graview-ink)",
|
|
298
|
+
boxShadow: "var(--graview-lift-high)",
|
|
299
|
+
fontSize: "0.875rem",
|
|
300
|
+
};
|
|
301
|
+
const SAID = { margin: 0, fontWeight: 600, overflowWrap: "anywhere" };
|
|
302
|
+
const BUSY = { margin: 0, fontStyle: "italic", overflowWrap: "anywhere" };
|
|
303
|
+
const QUIET_LINE = { margin: 0, color: "var(--graview-ink-muted)", fontSize: "0.8125rem" };
|
|
304
|
+
const CONTROLS = { display: "flex", flexWrap: "wrap", alignItems: "center", gap: 8 };
|
|
305
|
+
const BUTTON = { minHeight: 34, padding: "0 12px", font: "inherit", borderRadius: 8, cursor: "pointer" };
|
|
306
|
+
const PRIMARY = { ...BUTTON, color: "var(--graview-accent-ink, #fff)", background: "var(--graview-accent)", border: "1px solid var(--graview-accent)" };
|
|
307
|
+
const QUIET = { ...BUTTON, color: "var(--graview-ink)", background: "transparent", border: "1px solid var(--graview-edge)" };
|
|
308
|
+
const SWITCH = { display: "inline-flex", border: "1px solid var(--graview-edge)", borderRadius: 999, padding: 2 };
|
|
309
|
+
const SWITCH_ON = { ...BUTTON, minHeight: 28, padding: "0 10px", borderRadius: 999, border: 0, color: "var(--graview-accent-ink, #fff)", background: "var(--graview-accent)" };
|
|
310
|
+
const SWITCH_OFF = { ...BUTTON, minHeight: 28, padding: "0 10px", borderRadius: 999, border: 0, color: "var(--graview-ink)", background: "transparent" };
|
|
311
|
+
const FIELD = { boxSizing: "border-box", flex: "1 1 auto", minWidth: 0, height: 34, padding: "0 10px", font: "inherit", fontSize: "max(1rem,16px)", color: "var(--graview-ink)", background: "var(--graview-panel)", border: "1px solid var(--graview-edge)", borderRadius: 8 };
|
|
312
|
+
//# sourceMappingURL=better-bar.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"better-bar.js","sourceRoot":"","sources":["../src/better-bar.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAEtC,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,EAAE,QAAQ,EAAsC,MAAM,OAAO,CAAC;AACzG,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAC7C,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAE1D;;;;;;;GAOG;AAEH,MAAM,KAAK,GAAG,CAAC,IAA+B,EAAE,EAAE,CAAC,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,MAAM,EAAE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E,EAAE,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,GAAG,EAAE,MAAM,EAAE,CAAC,EAAE,KAAK,EAAE,iCAAiC,EAAE,UAAU,EAAE,uBAAuB,EAAE,CAAC;AAC9L,MAAM,UAAU,GAAkB,EAAE,GAAG,MAAM,EAAE,SAAS,EAAE,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,GAAG,EAAE,MAAM,EAAE,CAAC,EAAE,KAAK,EAAE,oBAAoB,EAAE,UAAU,EAAE,aAAa,EAAE,CAAC;AACxK,MAAM,KAAK,GAAkB,EAAE,SAAS,EAAE,YAAY,EAAE,IAAI,EAAE,UAAU,EAAE,QAAQ,EAAE,CAAC,EAAE,MAAM,EAAE,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,gBAAgB,EAAE,KAAK,EAAE,oBAAoB,EAAE,UAAU,EAAE,sBAAsB,EAAE,MAAM,EAAE,+BAA+B,EAAE,YAAY,EAAE,CAAC,EAAE,CAAC"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
/** A line of the conversation, as the panel shows it. */
|
|
3
|
+
export interface PanelLine {
|
|
4
|
+
readonly who: "person" | "graview";
|
|
5
|
+
readonly said: string;
|
|
6
|
+
}
|
|
7
|
+
/** A step Graview took, as the panel shows it: done, the one it is on, or one that found something to fix. */
|
|
8
|
+
export interface PanelStep {
|
|
9
|
+
readonly text: string;
|
|
10
|
+
readonly kind: string;
|
|
11
|
+
}
|
|
12
|
+
export interface BetterPanelProps {
|
|
13
|
+
/** What is being changed: “Tasks”. */
|
|
14
|
+
readonly name: string;
|
|
15
|
+
/** Who it changes it for, in a sentence. */
|
|
16
|
+
readonly scope: string;
|
|
17
|
+
readonly phase: string;
|
|
18
|
+
readonly talk: readonly PanelLine[];
|
|
19
|
+
/** This turn's steps, oldest first. */
|
|
20
|
+
readonly steps: readonly PanelStep[];
|
|
21
|
+
/** When this turn began, for its running time. */
|
|
22
|
+
readonly since: number;
|
|
23
|
+
readonly working: boolean;
|
|
24
|
+
/** The draft on the page, in the code's words: what changed. Absent with no draft. */
|
|
25
|
+
readonly draft?: {
|
|
26
|
+
readonly said: string;
|
|
27
|
+
readonly before: boolean;
|
|
28
|
+
};
|
|
29
|
+
/** Kept: what the host said, and Undo. */
|
|
30
|
+
readonly kept?: {
|
|
31
|
+
readonly note?: string;
|
|
32
|
+
readonly undo?: () => void;
|
|
33
|
+
};
|
|
34
|
+
/** Two drafts failed the same way (said in the conversation): Keep anyway, where the last one drew, or Stop. */
|
|
35
|
+
readonly stuck?: {
|
|
36
|
+
readonly keepAnyway?: () => void;
|
|
37
|
+
readonly stop: () => void;
|
|
38
|
+
};
|
|
39
|
+
/** What the person pointed at, said. */
|
|
40
|
+
readonly pointed?: string;
|
|
41
|
+
/** What the conversation is about, by its name: the part right-clicked ("Tasks"), or the one pointed at ("Someday"). */
|
|
42
|
+
readonly about?: string;
|
|
43
|
+
readonly ask: (words: string) => void;
|
|
44
|
+
readonly just: () => void;
|
|
45
|
+
readonly point: () => void;
|
|
46
|
+
readonly stop: () => void;
|
|
47
|
+
readonly compare: (before: boolean) => void;
|
|
48
|
+
readonly keep: () => void;
|
|
49
|
+
readonly discard: () => void;
|
|
50
|
+
readonly close: () => void;
|
|
51
|
+
/** Drawn under the draft's buttons: a rating of what it answered, where the host keeps tellings. */
|
|
52
|
+
readonly children?: ReactNode;
|
|
53
|
+
}
|
|
54
|
+
export declare function BetterPanel(props: BetterPanelProps): import("react").JSX.Element;
|
|
55
|
+
//# sourceMappingURL=better-panel.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"better-panel.d.ts","sourceRoot":"","sources":["../src/better-panel.tsx"],"names":[],"mappings":"AACA,OAAO,EAA8E,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAenH,yDAAyD;AACzD,MAAM,WAAW,SAAS;I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