@graview/primitives 0.1.18 → 0.1.20
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 +30 -6
- package/dist/app-bar.d.ts.map +1 -1
- package/dist/app-bar.js +55 -27
- package/dist/app-bar.js.map +1 -1
- package/dist/arrange-bar.d.ts +42 -25
- package/dist/arrange-bar.d.ts.map +1 -1
- package/dist/arrange-bar.js +129 -194
- package/dist/arrange-bar.js.map +1 -1
- package/dist/arrange-lists.d.ts +56 -0
- package/dist/arrange-lists.d.ts.map +1 -0
- package/dist/arrange-lists.js +196 -0
- package/dist/arrange-lists.js.map +1 -0
- package/dist/bar-panes.d.ts +3 -1
- package/dist/bar-panes.d.ts.map +1 -1
- package/dist/bar-panes.js +36 -21
- package/dist/bar-panes.js.map +1 -1
- package/dist/chat.d.ts +68 -30
- package/dist/chat.d.ts.map +1 -1
- package/dist/chat.js +205 -222
- package/dist/chat.js.map +1 -1
- package/dist/connections.d.ts.map +1 -1
- package/dist/connections.js +19 -3
- package/dist/connections.js.map +1 -1
- package/dist/declared-lens-doors.d.ts +18 -0
- package/dist/declared-lens-doors.d.ts.map +1 -1
- package/dist/declared-lens-doors.js +25 -3
- package/dist/declared-lens-doors.js.map +1 -1
- package/dist/declared-lenses.d.ts.map +1 -1
- package/dist/declared-lenses.js +4 -7
- package/dist/declared-lenses.js.map +1 -1
- package/dist/draft-door.d.ts +3 -0
- package/dist/draft-door.d.ts.map +1 -0
- package/dist/draft-door.js +22 -0
- package/dist/draft-door.js.map +1 -0
- package/dist/draft-frame.d.ts +25 -0
- package/dist/draft-frame.d.ts.map +1 -0
- package/dist/draft-frame.js +69 -0
- package/dist/draft-frame.js.map +1 -0
- package/dist/editable.d.ts +4 -1
- package/dist/editable.d.ts.map +1 -1
- package/dist/editable.js +9 -8
- package/dist/editable.js.map +1 -1
- package/dist/find.d.ts.map +1 -1
- package/dist/find.js +23 -5
- package/dist/find.js.map +1 -1
- package/dist/frame.d.ts +5 -4
- package/dist/frame.d.ts.map +1 -1
- package/dist/frame.js +5 -4
- package/dist/frame.js.map +1 -1
- package/dist/index.d.ts +14 -7
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +15 -6
- package/dist/index.js.map +1 -1
- package/dist/lens/board.d.ts.map +1 -1
- package/dist/lens/board.js +7 -3
- package/dist/lens/board.js.map +1 -1
- package/dist/lens/calendar-options.d.ts +8 -1
- package/dist/lens/calendar-options.d.ts.map +1 -1
- package/dist/lens/calendar-options.js +5 -0
- package/dist/lens/calendar-options.js.map +1 -1
- package/dist/lens/calendar-view.d.ts.map +1 -1
- package/dist/lens/calendar-view.js +2 -2
- package/dist/lens/calendar-view.js.map +1 -1
- package/dist/lens/columns.d.ts.map +1 -1
- package/dist/lens/columns.js +2 -2
- package/dist/lens/columns.js.map +1 -1
- package/dist/lens/coverage.d.ts.map +1 -1
- package/dist/lens/coverage.js +14 -10
- package/dist/lens/coverage.js.map +1 -1
- package/dist/lens/more.d.ts.map +1 -1
- package/dist/lens/more.js +2 -1
- package/dist/lens/more.js.map +1 -1
- package/dist/lens-keeping.d.ts +17 -0
- package/dist/lens-keeping.d.ts.map +1 -0
- package/dist/lens-keeping.js +127 -0
- package/dist/lens-keeping.js.map +1 -0
- package/dist/lines-key.d.ts +12 -0
- package/dist/lines-key.d.ts.map +1 -0
- package/dist/lines-key.js +74 -0
- package/dist/lines-key.js.map +1 -0
- package/dist/notice-place.d.ts +3 -3
- package/dist/notice-place.d.ts.map +1 -1
- package/dist/notice-place.js +4 -4
- package/dist/notice-place.js.map +1 -1
- package/dist/notices.d.ts +6 -0
- package/dist/notices.d.ts.map +1 -1
- package/dist/notices.js +7 -1
- package/dist/notices.js.map +1 -1
- package/dist/pages.d.ts +10 -5
- package/dist/pages.d.ts.map +1 -1
- package/dist/pages.js +10 -5
- package/dist/pages.js.map +1 -1
- package/dist/places.d.ts +0 -24
- package/dist/places.d.ts.map +1 -1
- package/dist/places.js +5 -1
- package/dist/places.js.map +1 -1
- package/dist/profile.d.ts +7 -1
- package/dist/profile.d.ts.map +1 -1
- package/dist/profile.js +2 -2
- package/dist/profile.js.map +1 -1
- package/dist/quick-relations.d.ts.map +1 -1
- package/dist/quick-relations.js +2 -2
- package/dist/quick-relations.js.map +1 -1
- package/dist/reader-lenses.d.ts +21 -0
- package/dist/reader-lenses.d.ts.map +1 -0
- package/dist/reader-lenses.js +27 -0
- package/dist/reader-lenses.js.map +1 -0
- package/dist/relation-key.d.ts +2 -0
- package/dist/relation-key.d.ts.map +1 -1
- package/dist/relation-key.js +13 -23
- package/dist/relation-key.js.map +1 -1
- package/dist/rule-line.d.ts +36 -0
- package/dist/rule-line.d.ts.map +1 -0
- package/dist/rule-line.js +91 -0
- package/dist/rule-line.js.map +1 -0
- package/dist/scene-bar.d.ts +29 -0
- package/dist/scene-bar.d.ts.map +1 -0
- package/dist/scene-bar.js +72 -0
- package/dist/scene-bar.js.map +1 -0
- package/dist/scene-css.d.ts.map +1 -1
- package/dist/scene-css.js +525 -0
- package/dist/scene-css.js.map +1 -1
- package/dist/scene.d.ts +5 -2
- package/dist/scene.d.ts.map +1 -1
- package/dist/scene.js +5 -1
- package/dist/scene.js.map +1 -1
- package/dist/seat-field.d.ts +58 -0
- package/dist/seat-field.d.ts.map +1 -0
- package/dist/seat-field.js +171 -0
- package/dist/seat-field.js.map +1 -0
- package/dist/seat-move.d.ts +32 -0
- package/dist/seat-move.d.ts.map +1 -0
- package/dist/seat-move.js +56 -0
- package/dist/seat-move.js.map +1 -0
- package/dist/seat-panel.d.ts +37 -0
- package/dist/seat-panel.d.ts.map +1 -0
- package/dist/seat-panel.js +134 -0
- package/dist/seat-panel.js.map +1 -0
- package/dist/seat.d.ts +20 -58
- package/dist/seat.d.ts.map +1 -1
- package/dist/seat.js +28 -45
- package/dist/seat.js.map +1 -1
- package/dist/seeding.d.ts.map +1 -1
- package/dist/seeding.js +4 -4
- package/dist/seeding.js.map +1 -1
- package/dist/shell.d.ts +25 -21
- package/dist/shell.d.ts.map +1 -1
- package/dist/shell.js +46 -116
- package/dist/shell.js.map +1 -1
- package/dist/spec-css.d.ts.map +1 -1
- package/dist/spec-css.js +2 -0
- package/dist/spec-css.js.map +1 -1
- package/dist/spec-views.d.ts.map +1 -1
- package/dist/spec-views.js +10 -2
- package/dist/spec-views.js.map +1 -1
- package/dist/subject.d.ts +4 -2
- package/dist/subject.d.ts.map +1 -1
- package/dist/subject.js +12 -8
- package/dist/subject.js.map +1 -1
- package/dist/theme.d.ts.map +1 -1
- package/dist/theme.js +6 -523
- package/dist/theme.js.map +1 -1
- package/dist/view-doors.d.ts.map +1 -1
- package/dist/view-doors.js +7 -0
- package/dist/view-doors.js.map +1 -1
- package/dist/workbench/activity.d.ts.map +1 -1
- package/dist/workbench/activity.js +9 -9
- package/dist/workbench/activity.js.map +1 -1
- package/dist/workbench/back-out.js +3 -3
- package/dist/workbench/back-out.js.map +1 -1
- package/dist/workbench/inspector.d.ts +11 -6
- package/dist/workbench/inspector.d.ts.map +1 -1
- package/dist/workbench/inspector.js +42 -56
- package/dist/workbench/inspector.js.map +1 -1
- package/dist/workbench/standing.d.ts +8 -2
- package/dist/workbench/standing.d.ts.map +1 -1
- package/dist/workbench/standing.js +9 -4
- package/dist/workbench/standing.js.map +1 -1
- package/dist/workbench/trail.d.ts +10 -17
- package/dist/workbench/trail.d.ts.map +1 -1
- package/dist/workbench/trail.js +29 -41
- package/dist/workbench/trail.js.map +1 -1
- package/package.json +7 -7
- package/dist/companion.d.ts +0 -58
- package/dist/companion.d.ts.map +0 -1
- package/dist/companion.js +0 -463
- package/dist/companion.js.map +0 -1
- package/dist/ladder.d.ts +0 -2
- package/dist/ladder.d.ts.map +0 -1
- package/dist/ladder.js +0 -48
- package/dist/ladder.js.map +0 -1
- package/dist/popover.d.ts +0 -21
- package/dist/popover.d.ts.map +0 -1
- package/dist/popover.js +0 -28
- package/dist/popover.js.map +0 -1
- package/dist/wordmark.d.ts +0 -15
- package/dist/wordmark.d.ts.map +0 -1
- package/dist/wordmark.js +0 -50
- package/dist/wordmark.js.map +0 -1
package/dist/companion.js
DELETED
|
@@ -1,463 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { labelOf, layer } from "@graview/core";
|
|
3
|
-
import { withFocus } from "@graview/layout/view";
|
|
4
|
-
import { aggregateId } from "@graview/layout";
|
|
5
|
-
import { useGraview, useSeatWork, useSelection } from "@graview/react";
|
|
6
|
-
import { useEffect, useLayoutEffect, useRef, useState } from "react";
|
|
7
|
-
import { ChatPanel } from "./chat.js";
|
|
8
|
-
import { QuickRelations } from "./quick-relations.js";
|
|
9
|
-
import { RelationKey } from "./relation-key.js";
|
|
10
|
-
import { Inspector } from "./workbench/index.js";
|
|
11
|
-
import { VISUALLY_HIDDEN } from "./primitives/index.js";
|
|
12
|
-
import { useSubject } from "./subject.js";
|
|
13
|
-
/**
|
|
14
|
-
* THE SEAT IS A COMPANION ATTACHED TO THE VIEWFRAME.
|
|
15
|
-
*
|
|
16
|
-
* The scene used to say the current subject four times over: the inspector
|
|
17
|
-
* listed its acts (and was the context menu at the pointer), the quick
|
|
18
|
-
* relations offered its relations, the relation key named the lines, and a
|
|
19
|
-
* robot figure walked the ground with the chat panel anchored beside it as
|
|
20
|
-
* a bubble. Four panels, one subject — and the figure had no place at all
|
|
21
|
-
* inside a full-screen lens, where there is no ground to walk on.
|
|
22
|
-
*
|
|
23
|
-
* One construct instead, on the left, where the scene already reserves a
|
|
24
|
-
* rail: a subject header, the acts, the relations, the conversation, and
|
|
25
|
-
* the key at the foot. It is fixed to the frame, so it is the same at
|
|
26
|
-
* altitude, on the ground, flying closer and inside a lens. Right-click
|
|
27
|
-
* still opens the acts at the pointer — the same pane, from the same
|
|
28
|
-
* derivation — so the context menu and the assistant are one thing.
|
|
29
|
-
*/
|
|
30
|
-
/**
|
|
31
|
-
* The key a card answers with its acts. A letter, and only on the card that
|
|
32
|
-
* has the keyboard — a character key bound to focus is not one a voice
|
|
33
|
-
* user's dictation sets off by accident (WCAG 2.1.4).
|
|
34
|
-
*/
|
|
35
|
-
export const ACTS_KEY = "A";
|
|
36
|
-
const RULE = "1px solid var(--graview-edge)";
|
|
37
|
-
/** What the seat is doing, in one word, from the state it already reports. */
|
|
38
|
-
function seatSays(mode) {
|
|
39
|
-
switch (mode) {
|
|
40
|
-
case "reading":
|
|
41
|
-
return { word: "reading", tone: "var(--graview-ink-muted)" };
|
|
42
|
-
case "writing":
|
|
43
|
-
return { word: "working", tone: "var(--graview-accent)" };
|
|
44
|
-
case "asking":
|
|
45
|
-
return { word: "asked you something", tone: "var(--graview-accent)" };
|
|
46
|
-
case "refused":
|
|
47
|
-
return { word: "refused", tone: "var(--graview-warn)" };
|
|
48
|
-
default:
|
|
49
|
-
return { word: "listening", tone: "var(--graview-ink-faint)" };
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
/** The slim tab the seat is put away to, in pixels: the picture has everything else. */
|
|
53
|
-
export const COMPANION_TAB = 36;
|
|
54
|
-
/** Narrower than this the open seat is laid over the picture rather than taking a column of it. */
|
|
55
|
-
export const COMPANION_OVERLAY_BELOW = 960;
|
|
56
|
-
const COMPANION_KEY = (app) => `graview:companion:${app}`;
|
|
57
|
-
/** What the reader chose last time for this app, if their browser lets the page remember. */
|
|
58
|
-
function remembered(memory, app) {
|
|
59
|
-
if (!app)
|
|
60
|
-
return null;
|
|
61
|
-
try {
|
|
62
|
-
const kept = (memory ?? localStorage).getItem(COMPANION_KEY(app));
|
|
63
|
-
return kept === "open" || kept === "collapsed" ? kept : null;
|
|
64
|
-
}
|
|
65
|
-
catch {
|
|
66
|
-
// A private window, a sandboxed frame: the start stands.
|
|
67
|
-
return null;
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
function remember(memory, app, mode) {
|
|
71
|
-
if (!app)
|
|
72
|
-
return;
|
|
73
|
-
try {
|
|
74
|
-
(memory ?? localStorage).setItem(COMPANION_KEY(app), mode);
|
|
75
|
-
}
|
|
76
|
-
catch {
|
|
77
|
-
// Put away for this visit only.
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
export function Companion({ respond, onCall, onPick, chat = true, framed = false, start, rememberAs } = {}) {
|
|
81
|
-
const { seatWho, robots, session, store, setView: setViewOf, registerActsDoor, registerRail, memory } = useGraview();
|
|
82
|
-
const { set: chooseOf } = useSelection();
|
|
83
|
-
const subject = useSubject();
|
|
84
|
-
/*
|
|
85
|
-
* THE SEAT CAN BE PUT AWAY (FR-78). The rail took a fifth of the picture
|
|
86
|
-
* on every screen whether anybody was talking to it or not. Put away, it
|
|
87
|
-
* is a slim tab at the picture's edge and the city has the rest; the
|
|
88
|
-
* reader's choice is remembered for this app. On a phone it is the sheet
|
|
89
|
-
* along the bottom, which starts shut, as it always has.
|
|
90
|
-
*/
|
|
91
|
-
const [mode, setModeState] = useState(() => (start === "hidden" ? "hidden" : (remembered(memory, rememberAs) ?? start ?? "open")));
|
|
92
|
-
const [sheetOpen, setSheetOpen] = useState(false);
|
|
93
|
-
const robot = robots.get(`agent:${seatWho ?? "chat"}:${session}`);
|
|
94
|
-
const state = seatSays(robot?.mode);
|
|
95
|
-
const said = robot?.say ?? null;
|
|
96
|
-
const name = seatWho ?? "the seat";
|
|
97
|
-
/*
|
|
98
|
-
* A NARROW SCENE HAS NO RAIL. The same argument the inspector makes: a
|
|
99
|
-
* rail down the side of a 390-wide picture covers the picture. There it
|
|
100
|
-
* is a sheet along the bottom, which is where a phone has always put
|
|
101
|
-
* this, and it starts closed so the picture is the first thing.
|
|
102
|
-
*/
|
|
103
|
-
/*
|
|
104
|
-
* AND BELOW A LAPTOP'S WIDTH IT IS LAID OVER THE PICTURE rather than
|
|
105
|
-
* taking a column of it: a column of 22% of a tablet's picture is a
|
|
106
|
-
* column the city never gets back. The tab keeps its place at the edge.
|
|
107
|
-
*/
|
|
108
|
-
const [shape, setShape] = useState("column");
|
|
109
|
-
const narrow = shape === "sheet";
|
|
110
|
-
const frame = useRef(null);
|
|
111
|
-
useEffect(() => {
|
|
112
|
-
if (framed)
|
|
113
|
-
return;
|
|
114
|
-
const element = frame.current?.parentElement;
|
|
115
|
-
if (!element || typeof ResizeObserver === "undefined")
|
|
116
|
-
return;
|
|
117
|
-
const measure = () => {
|
|
118
|
-
const width = element.getBoundingClientRect().width;
|
|
119
|
-
setShape(width < 640 ? "sheet" : width < COMPANION_OVERLAY_BELOW ? "overlay" : "column");
|
|
120
|
-
};
|
|
121
|
-
const watch = new ResizeObserver(measure);
|
|
122
|
-
watch.observe(element);
|
|
123
|
-
measure();
|
|
124
|
-
return () => watch.disconnect();
|
|
125
|
-
}, [mode === "hidden"]);
|
|
126
|
-
const open = framed ? true : narrow ? sheetOpen : mode === "open";
|
|
127
|
-
/** Opens or puts it away; a choice the reader made is kept for this app. */
|
|
128
|
-
const setOpen = (next, kept = true) => {
|
|
129
|
-
if (narrow) {
|
|
130
|
-
setSheetOpen(next);
|
|
131
|
-
return;
|
|
132
|
-
}
|
|
133
|
-
const to = next ? "open" : "collapsed";
|
|
134
|
-
setModeState(to);
|
|
135
|
-
if (kept)
|
|
136
|
-
remember(memory, rememberAs, to);
|
|
137
|
-
};
|
|
138
|
-
const tabbed = !framed && !narrow && mode !== "hidden" && (mode === "collapsed" || shape === "overlay");
|
|
139
|
-
/*
|
|
140
|
-
* WHAT THE SEAT TAKES OF THE PICTURE. As a column, the scene keeps its
|
|
141
|
-
* proportional rail; as a tab, an overlay or nothing, the picture's own
|
|
142
|
-
* box gives up only the tab (below) and the city lays out into the rest.
|
|
143
|
-
*/
|
|
144
|
-
useEffect(() => {
|
|
145
|
-
if (framed || narrow)
|
|
146
|
-
return;
|
|
147
|
-
registerRail(mode === "hidden" || tabbed ? 8 : null);
|
|
148
|
-
return () => registerRail(null);
|
|
149
|
-
}, [framed, narrow, mode, tabbed, registerRail]);
|
|
150
|
-
useLayoutEffect(() => {
|
|
151
|
-
const parent = frame.current?.parentElement;
|
|
152
|
-
if (!parent || !tabbed)
|
|
153
|
-
return;
|
|
154
|
-
const before = parent.style.paddingLeft;
|
|
155
|
-
parent.style.paddingLeft = `${COMPANION_TAB}px`;
|
|
156
|
-
return () => {
|
|
157
|
-
parent.style.paddingLeft = before;
|
|
158
|
-
};
|
|
159
|
-
}, [tabbed]);
|
|
160
|
-
const tab = useRef(null);
|
|
161
|
-
/* The keyboard follows the control: put away from the header, it lands on the tab; opened from the tab, on the header. */
|
|
162
|
-
const followTo = useRef(null);
|
|
163
|
-
useLayoutEffect(() => {
|
|
164
|
-
const to = followTo.current;
|
|
165
|
-
followTo.current = null;
|
|
166
|
-
if (to === "tab")
|
|
167
|
-
tab.current?.focus({ preventScroll: true });
|
|
168
|
-
else if (to === "dock")
|
|
169
|
-
dock.current?.focus({ preventScroll: true });
|
|
170
|
-
});
|
|
171
|
-
/*
|
|
172
|
-
* AND THE PICTURE MAKES ROOM FOR THE SHEET. Laid over a 390-wide scene,
|
|
173
|
-
* an open sheet covers the districts and the control that opens one —
|
|
174
|
-
* the very thing it is about. The same trade the actions strip makes: the
|
|
175
|
-
* scene's box loses the sheet's height while it is there, and the layout
|
|
176
|
-
* runs again into what is left.
|
|
177
|
-
*/
|
|
178
|
-
useLayoutEffect(() => {
|
|
179
|
-
const parent = frame.current?.offsetParent;
|
|
180
|
-
if (!parent || !narrow || framed)
|
|
181
|
-
return;
|
|
182
|
-
const room = `${Math.round(frame.current?.getBoundingClientRect().height ?? 0) + 20}px`;
|
|
183
|
-
if (parent.style.paddingBottom === room)
|
|
184
|
-
return;
|
|
185
|
-
const before = parent.style.paddingBottom;
|
|
186
|
-
parent.style.paddingBottom = room;
|
|
187
|
-
return () => {
|
|
188
|
-
parent.style.paddingBottom = before;
|
|
189
|
-
};
|
|
190
|
-
});
|
|
191
|
-
/*
|
|
192
|
-
* AND THE KEYBOARD GETS THERE IN ONE KEY. Folded, the sheet's toggle sat a
|
|
193
|
-
* dozen Tabs from the card the keyboard was on — past every other card
|
|
194
|
-
* and the controls inside them — so every act from the keyboard on a
|
|
195
|
-
* phone began with that walk. The scene's cards answer A instead, the way
|
|
196
|
-
* a right-click is answered: the card chosen, the seat opened, and the
|
|
197
|
-
* keyboard put on its first act. Put away again from the keyboard, the
|
|
198
|
-
* keyboard goes back to the card it came from. The rail does the same
|
|
199
|
-
* where it is already open, so a laptop's keyboard gets the short way too.
|
|
200
|
-
*/
|
|
201
|
-
const cameFrom = useRef(null);
|
|
202
|
-
const dock = useRef(null);
|
|
203
|
-
const [asked, setAsked] = useState(0);
|
|
204
|
-
useEffect(() => {
|
|
205
|
-
// Hidden by the host, there is no seat to open: a card's acts stay at the pointer.
|
|
206
|
-
if (framed || mode === "hidden")
|
|
207
|
-
return;
|
|
208
|
-
registerActsDoor({
|
|
209
|
-
key: ACTS_KEY,
|
|
210
|
-
open: (from) => {
|
|
211
|
-
cameFrom.current = from;
|
|
212
|
-
setOpen(true, false);
|
|
213
|
-
setAsked((count) => count + 1);
|
|
214
|
-
},
|
|
215
|
-
});
|
|
216
|
-
return () => registerActsDoor(null);
|
|
217
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
218
|
-
}, [framed, registerActsDoor, narrow, mode === "hidden"]);
|
|
219
|
-
/* Whether the keyboard stands on a card, so the seat can say the key where it is seen. */
|
|
220
|
-
const [onACard, setOnACard] = useState(false);
|
|
221
|
-
useEffect(() => {
|
|
222
|
-
if (framed || typeof document === "undefined")
|
|
223
|
-
return;
|
|
224
|
-
const watch = () => {
|
|
225
|
-
const active = document.activeElement;
|
|
226
|
-
setOnACard(active instanceof HTMLElement && active.closest("[data-graview-view][aria-keyshortcuts]") !== null);
|
|
227
|
-
};
|
|
228
|
-
document.addEventListener("focusin", watch);
|
|
229
|
-
document.addEventListener("focusout", watch);
|
|
230
|
-
return () => {
|
|
231
|
-
document.removeEventListener("focusin", watch);
|
|
232
|
-
document.removeEventListener("focusout", watch);
|
|
233
|
-
};
|
|
234
|
-
}, [framed]);
|
|
235
|
-
const anything = store.graph.allEdges().length > 0;
|
|
236
|
-
const docked = !narrow && !framed;
|
|
237
|
-
const overlaid = docked && shape === "overlay";
|
|
238
|
-
/* The conversation, rendered once and placed by the pane's shape. */
|
|
239
|
-
const conversation = (_jsx(ChatPanel, { inside: true, ...(onPick ? { onPick } : {}),
|
|
240
|
-
/* What the graph can answer about THIS, offered before anybody types. */
|
|
241
|
-
offer: [
|
|
242
|
-
"What's wrong?",
|
|
243
|
-
...(subject.id && store.graph.getNode(subject.id) ? [`Tell me about ${subject.name}`] : []),
|
|
244
|
-
"What is here?",
|
|
245
|
-
], ...(respond ? { respond } : {}), ...(onCall ? { onCall } : {}) }));
|
|
246
|
-
const work = useSeatWork();
|
|
247
|
-
/* Questions back, from every seat in this tab: they wait for an answer, so they are listed until answered. */
|
|
248
|
-
const asking = [...robots.values()].filter((one) => one.mode === "asking" && one.say);
|
|
249
|
-
const { setView, choose } = { setView: setViewOf, choose: chooseOf };
|
|
250
|
-
/*
|
|
251
|
-
* THE WAY BACK TO WHAT IT DID. Where you are decides what "show me"
|
|
252
|
-
* means: from altitude the district the thing lives in, since a single
|
|
253
|
-
* task is a building up there; on the ground the thing itself, chosen
|
|
254
|
-
* and focused, which is what a person would have clicked.
|
|
255
|
-
*/
|
|
256
|
-
const showMe = (id) => {
|
|
257
|
-
const node = store.graph.getNode(id);
|
|
258
|
-
choose([id]);
|
|
259
|
-
setView((current) => current.overview && node
|
|
260
|
-
? withFocus(current, aggregateId(node.kind))
|
|
261
|
-
: withFocus(current, id));
|
|
262
|
-
};
|
|
263
|
-
/*
|
|
264
|
-
* AN ASK COMES TO THE TOP. Answering an act's open question is a
|
|
265
|
-
* conversation of its own, and in a scrolling column it can open below
|
|
266
|
-
* the fold — the pane asking a question nobody can see.
|
|
267
|
-
*/
|
|
268
|
-
const column = useRef(null);
|
|
269
|
-
useEffect(() => {
|
|
270
|
-
const scroller = column.current;
|
|
271
|
-
if (!scroller || typeof MutationObserver === "undefined")
|
|
272
|
-
return;
|
|
273
|
-
const bring = () => {
|
|
274
|
-
const ask = scroller.querySelector("[data-graview-asking]");
|
|
275
|
-
ask?.scrollIntoView?.({ block: "nearest" });
|
|
276
|
-
};
|
|
277
|
-
const watch = new MutationObserver(bring);
|
|
278
|
-
watch.observe(scroller, { childList: true, subtree: true, attributes: true, attributeFilter: ["data-graview-asking"] });
|
|
279
|
-
return () => watch.disconnect();
|
|
280
|
-
}, [open]);
|
|
281
|
-
useEffect(() => {
|
|
282
|
-
if (asked === 0)
|
|
283
|
-
return;
|
|
284
|
-
/*
|
|
285
|
-
* The acts are derived after the choice the key made, so the first one
|
|
286
|
-
* may be a frame or two behind the press: asked for a little while, and
|
|
287
|
-
* only while the keyboard has not gone somewhere else meanwhile.
|
|
288
|
-
*/
|
|
289
|
-
let tries = 12;
|
|
290
|
-
let frame = 0;
|
|
291
|
-
const land = () => {
|
|
292
|
-
const active = document.activeElement;
|
|
293
|
-
const stillThere = active === document.body || active === null || (active instanceof Node && cameFrom.current?.closest("[data-graview-view]")?.contains(active));
|
|
294
|
-
if (!stillThere)
|
|
295
|
-
return;
|
|
296
|
-
const pane = column.current;
|
|
297
|
-
const act = pane?.querySelector('[data-testid="affordances"] button:not([disabled])');
|
|
298
|
-
if (act) {
|
|
299
|
-
act.focus();
|
|
300
|
-
return;
|
|
301
|
-
}
|
|
302
|
-
if (tries-- > 0) {
|
|
303
|
-
frame = requestAnimationFrame(land);
|
|
304
|
-
return;
|
|
305
|
-
}
|
|
306
|
-
// Nothing to do here: the first thing the seat holds, so the keyboard is in what opened.
|
|
307
|
-
(pane?.querySelector("button:not([disabled]), input, select, textarea, summary") ?? dock.current)?.focus();
|
|
308
|
-
};
|
|
309
|
-
frame = requestAnimationFrame(land);
|
|
310
|
-
return () => cancelAnimationFrame(frame);
|
|
311
|
-
}, [asked]);
|
|
312
|
-
/*
|
|
313
|
-
* A REGION, NOT A LANDMARK INSIDE ONE (FR-40). The seat was an `<aside>`,
|
|
314
|
-
* a complementary landmark, drawn inside the Shell's main and inside an
|
|
315
|
-
* embed's own region, so axe's `landmark-complementary-is-top-level`
|
|
316
|
-
* failed on every hosted app at every size. It lives in the picture it is
|
|
317
|
-
* about, so it is a labeled region there, and what it holds are groups.
|
|
318
|
-
*/
|
|
319
|
-
if (mode === "hidden" && !framed)
|
|
320
|
-
return null;
|
|
321
|
-
if (tabbed && !open) {
|
|
322
|
-
/*
|
|
323
|
-
* PUT AWAY: a slim tab at the picture's edge, the whole height of it,
|
|
324
|
-
* and one control that opens the seat again.
|
|
325
|
-
*/
|
|
326
|
-
return (_jsx("section", { ref: frame, "aria-label": `The seat — about ${subject.name}`, "data-testid": "companion", "data-graview-companion": "shut", "data-graview-companion-mode": "collapsed", "data-graview-subject": subject.id ?? "", "data-graview-offstage": "", onMouseDown: (event) => event.stopPropagation(), style: {
|
|
327
|
-
zIndex: layer("rail"),
|
|
328
|
-
position: "absolute",
|
|
329
|
-
left: 0,
|
|
330
|
-
top: 0,
|
|
331
|
-
bottom: 0,
|
|
332
|
-
width: COMPANION_TAB,
|
|
333
|
-
boxSizing: "border-box",
|
|
334
|
-
display: "flex",
|
|
335
|
-
flexDirection: "column",
|
|
336
|
-
alignItems: "center",
|
|
337
|
-
paddingTop: 8,
|
|
338
|
-
borderRight: RULE,
|
|
339
|
-
background: "var(--graview-bar)",
|
|
340
|
-
}, children: _jsxs("button", { type: "button", ref: tab, "data-testid": "companion-tab", "aria-expanded": false, "aria-label": `Open the seat — about ${subject.name}`, title: `Open the seat — about ${subject.name}`, onClick: (event) => {
|
|
341
|
-
if (document.activeElement === event.currentTarget)
|
|
342
|
-
followTo.current = "dock";
|
|
343
|
-
setOpen(true);
|
|
344
|
-
}, style: { display: "grid", justifyItems: "center", gap: 8, width: 28, minHeight: 28, padding: "6px 0", borderRadius: 8, fontSize: "0.75rem", color: "var(--graview-ink-muted)" }, children: [_jsx("span", { "aria-hidden": "true", children: "\u25C6" }), _jsx("span", { "aria-hidden": "true", style: { writingMode: "vertical-rl", letterSpacing: "0.12em", textTransform: "uppercase", fontSize: "0.6875rem" }, children: "The seat" })] }) }));
|
|
345
|
-
}
|
|
346
|
-
return (_jsxs("section", { ref: frame, "aria-label": `The seat — about ${subject.name}`, "data-testid": "companion", "data-graview-companion": open ? "open" : "shut", "data-graview-companion-mode": narrow ? (open ? "open" : "collapsed") : mode, "data-graview-companion-shape": framed ? "framed" : shape, "data-graview-subject": subject.id ?? "", "data-graview-because": subject.because, "data-graview-offstage": "", onMouseDown: (event) => event.stopPropagation(), style: {
|
|
347
|
-
zIndex: layer("rail"),
|
|
348
|
-
boxSizing: "border-box",
|
|
349
|
-
display: "flex",
|
|
350
|
-
flexDirection: "column",
|
|
351
|
-
gap: 8,
|
|
352
|
-
borderRadius: "var(--graview-radius, 12px)",
|
|
353
|
-
/* Each side by itself: docking takes three away, and React warns when a shorthand and its longhands trade places. */
|
|
354
|
-
borderTop: RULE,
|
|
355
|
-
borderRight: RULE,
|
|
356
|
-
borderBottom: RULE,
|
|
357
|
-
borderLeft: RULE,
|
|
358
|
-
background: "var(--graview-float)",
|
|
359
|
-
boxShadow: "var(--graview-lift-high)",
|
|
360
|
-
...(framed
|
|
361
|
-
? { position: "static", width: "auto", maxHeight: "100%", padding: "10px 12px" }
|
|
362
|
-
: narrow
|
|
363
|
-
? { position: "absolute", left: 10, right: 10, bottom: 10, maxHeight: open ? "min(58cqh, 420px)" : undefined, padding: open ? "10px 12px" : "6px 10px" }
|
|
364
|
-
: overlaid
|
|
365
|
-
? {
|
|
366
|
-
/*
|
|
367
|
-
* LAID OVER THE PICTURE, from the tab's edge: the floating
|
|
368
|
-
* panel's look, the high lift, and the picture underneath
|
|
369
|
-
* keeps its whole width.
|
|
370
|
-
*/
|
|
371
|
-
position: "absolute",
|
|
372
|
-
left: 0,
|
|
373
|
-
top: 0,
|
|
374
|
-
bottom: 0,
|
|
375
|
-
width: "min(300px, calc(100% - 48px))",
|
|
376
|
-
padding: "12px 12px 10px",
|
|
377
|
-
borderRadius: 0,
|
|
378
|
-
borderTop: "none",
|
|
379
|
-
borderBottom: "none",
|
|
380
|
-
borderLeft: "none",
|
|
381
|
-
display: "grid",
|
|
382
|
-
gridTemplateRows: "auto minmax(0, 1fr) auto",
|
|
383
|
-
}
|
|
384
|
-
: {
|
|
385
|
-
/*
|
|
386
|
-
* DOCKED, NOT FLOATING. The layout keeps this rail clear of the
|
|
387
|
-
* picture in every mode (see railInset), so the pane stands in
|
|
388
|
-
* it as a column of the interface — the scene's height, a rule
|
|
389
|
-
* down its right edge, no shadow — rather than as a card
|
|
390
|
-
* dropped over the corner of the picture. The width is the
|
|
391
|
-
* rail's share, so the two can never disagree.
|
|
392
|
-
*/
|
|
393
|
-
position: "absolute",
|
|
394
|
-
left: 0,
|
|
395
|
-
top: 0,
|
|
396
|
-
bottom: 0,
|
|
397
|
-
width: "min(264px, 22cqw)",
|
|
398
|
-
padding: open ? "12px 12px 10px" : "10px 12px",
|
|
399
|
-
borderRadius: 0,
|
|
400
|
-
borderTop: "none",
|
|
401
|
-
borderBottom: "none",
|
|
402
|
-
borderLeft: "none",
|
|
403
|
-
boxShadow: "none",
|
|
404
|
-
background: "var(--graview-bar)",
|
|
405
|
-
...(open ? { display: "grid", gridTemplateRows: "auto minmax(0, 1fr) auto" } : {}),
|
|
406
|
-
}),
|
|
407
|
-
overflow: "hidden",
|
|
408
|
-
}, children: [_jsxs("h2", { style: { ...VISUALLY_HIDDEN, margin: 0 }, children: ["The seat \u2014 about ", subject.name] }), _jsxs("button", { type: "button", ref: dock, "data-testid": "companion-dock", "aria-expanded": open, onClick: (event) => {
|
|
409
|
-
// Put away from the header where there is a tab to put it away to, the keyboard lands on the tab —
|
|
410
|
-
// when the keyboard was on the header. A press a host's script makes leaves the reader's keyboard where it is.
|
|
411
|
-
if (open && !narrow && document.activeElement === event.currentTarget)
|
|
412
|
-
followTo.current = "tab";
|
|
413
|
-
setOpen(!open);
|
|
414
|
-
/*
|
|
415
|
-
* Put away from the keyboard (a click no pointer made), the
|
|
416
|
-
* keyboard goes back to the card the key brought it from rather
|
|
417
|
-
* than staying on a toggle at the foot of the screen.
|
|
418
|
-
*/
|
|
419
|
-
const back = cameFrom.current;
|
|
420
|
-
cameFrom.current = null;
|
|
421
|
-
if (open && narrow && event.detail === 0 && back?.isConnected)
|
|
422
|
-
back.focus({ preventScroll: true });
|
|
423
|
-
}, title: open ? "Put the seat away" : `Talk to the seat about ${subject.name}`, style: {
|
|
424
|
-
all: "unset",
|
|
425
|
-
outline: "revert-layer",
|
|
426
|
-
cursor: "pointer",
|
|
427
|
-
display: "grid",
|
|
428
|
-
/* The subject, then its toggle at the header's end: with a third column the toggle stood in the middle one, a stray mark beside the name. */
|
|
429
|
-
gridTemplateColumns: "minmax(0, 1fr) auto",
|
|
430
|
-
alignItems: "center",
|
|
431
|
-
gap: 8,
|
|
432
|
-
minHeight: 32,
|
|
433
|
-
}, children: [_jsxs("span", { style: { display: "grid", gap: 1, minWidth: 0 }, children: [_jsx("span", { style: { fontSize: "0.6875rem", letterSpacing: "0.12em", textTransform: "uppercase", color: subject.because === "selection" ? "var(--graview-accent)" : "var(--graview-ink-faint)" }, children: subject.because === "selection" ? "Selected" : subject.because === "hover" ? "Under the pointer" : "In view" }), _jsx("span", { style: { fontSize: "0.9375rem", fontWeight: 600, color: "var(--graview-ink)", overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" }, children: _jsx("span", { "data-testid": "companion-subject", children: subject.name }) }), _jsxs("span", { "data-testid": "companion-state", style: state.word === "listening"
|
|
434
|
-
? { position: "absolute", width: 1, height: 1, overflow: "hidden", clipPath: "inset(50%)" }
|
|
435
|
-
: { fontSize: "0.75rem", color: state.tone, overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" }, children: [name, " \u00B7 ", state.word] })] }), _jsxs("span", { style: { display: "flex", alignItems: "center", gap: 6, fontSize: "0.75rem", color: "var(--graview-ink-faint)" }, children: [onACard ? (_jsxs("span", { "data-testid": "companion-acts-key", style: { color: "var(--graview-ink-muted)", whiteSpace: "nowrap" }, children: [_jsx("kbd", { style: { font: "inherit", fontWeight: 600, padding: "0 4px", border: "1px solid var(--graview-edge)", borderRadius: 4 }, children: ACTS_KEY }), " its acts"] })) : null, _jsx("span", { "aria-hidden": "true", children: open ? "▾" : "▸" })] })] }), open && said && (robot?.mode === "refused" || robot?.mode === "asking") ? (_jsx("p", { "data-testid": "companion-said", style: { margin: 0, fontSize: "0.8125rem", color: state.tone }, children: said })) : null, open ? (_jsxs("div", { ref: column, style: {
|
|
436
|
-
display: "grid",
|
|
437
|
-
/*
|
|
438
|
-
* EVERY SECTION IS AS TALL AS ITS CONTENT, and the column
|
|
439
|
-
* scrolls. Left to itself a grid with a definite height hands
|
|
440
|
-
* each row a share of the space — and a row whose item has no
|
|
441
|
-
* automatic minimum is compressed below what is in it, which
|
|
442
|
-
* paints the conversation's chips and field straight over the
|
|
443
|
-
* relations underneath. Rows sized by their content, packed at
|
|
444
|
-
* the top, cannot do that: what does not fit is scrolled to.
|
|
445
|
-
*/
|
|
446
|
-
gridAutoRows: "min-content",
|
|
447
|
-
alignContent: "start",
|
|
448
|
-
gap: 10,
|
|
449
|
-
minHeight: 0,
|
|
450
|
-
overflowY: "auto",
|
|
451
|
-
overflowX: "hidden",
|
|
452
|
-
}, children: [_jsx(Inspector, { placement: "rail" }), _jsx(QuickRelations, { inside: true }), chat && !docked ? conversation : null, asking.length > 0 ? (_jsxs("section", { "data-testid": "companion-asking", style: { display: "grid", gap: 6 }, children: [_jsx("span", { style: { fontSize: "0.75rem", letterSpacing: "0.12em", textTransform: "uppercase", color: "var(--graview-accent)" }, children: asking.length === 1 ? "It asked" : `It asked ${asking.length} things` }), _jsx("ul", { style: { margin: 0, padding: 0, listStyle: "none", display: "grid", gap: 4 }, children: asking.map((one) => (_jsxs("li", { style: { display: "grid", gridTemplateColumns: "minmax(0, 1fr) auto", gap: 6, alignItems: "baseline" }, children: [_jsx("span", { style: { fontSize: "0.8125rem", color: "var(--graview-ink)", overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" }, title: one.say, children: one.say }), one.at ? (_jsx("button", { type: "button", "data-testid": "companion-show-me", "data-graview-show": one.at, "aria-label": `Show me what ${one.who} is asking about`, title: "Show me what it is asking about", onClick: () => showMe(one.at), style: { font: "inherit", fontSize: "0.75rem", minHeight: 24, padding: "0 8px", maxWidth: 110, overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" }, children: (() => {
|
|
453
|
-
const about = store.graph.getNode(one.at);
|
|
454
|
-
return about ? labelOf(store.schema.tryDefinition(about.kind), about) : "Show me";
|
|
455
|
-
})() })) : null] }, one.participant))) })] })) : null, work.acts.length > 0 ? (_jsxs("section", { "data-testid": "companion-log", style: { display: "grid", gap: 6 }, children: [_jsx("span", { style: { fontSize: "0.75rem", letterSpacing: "0.12em", textTransform: "uppercase", color: "var(--graview-ink-faint)" }, children: "What it did" }), _jsx("ul", { style: { margin: 0, padding: 0, listStyle: "none", display: "grid", gap: 4 }, children: work.acts.slice(0, 4).map((act) => {
|
|
456
|
-
const first = act.wrote[0];
|
|
457
|
-
const node = first ? store.graph.getNode(first) : undefined;
|
|
458
|
-
return (_jsxs("li", { style: { display: "grid", gridTemplateColumns: "minmax(0, 1fr) auto", gap: 6, alignItems: "baseline" }, children: [_jsx("span", { style: { fontSize: "0.8125rem", color: "var(--graview-ink)", overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" }, title: act.intent, children: act.intent }), node ? (
|
|
459
|
-
/* Named, not "Show me" three times: a row of identical labels is a list nobody can read. */
|
|
460
|
-
_jsx("button", { type: "button", "data-testid": "companion-show-me", "data-graview-show": first, "aria-label": `Show me ${labelOf(store.schema.tryDefinition(node.kind), node)}`, title: `Show me ${labelOf(store.schema.tryDefinition(node.kind), node)}`, onClick: () => showMe(first), style: { font: "inherit", fontSize: "0.75rem", minHeight: 24, padding: "0 8px", maxWidth: 110, overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" }, children: labelOf(store.schema.tryDefinition(node.kind), node) })) : null] }, act.batch));
|
|
461
|
-
}) })] })) : null, anything ? (_jsxs("details", { "data-testid": "companion-key", children: [_jsx("summary", { style: { cursor: "pointer", fontSize: "0.75rem", letterSpacing: "0.12em", textTransform: "uppercase", color: "var(--graview-ink-faint)", minHeight: 24 }, children: "What the lines mean" }), _jsx(RelationKey, { inside: true })] })) : null] })) : null, open && chat && docked ? (_jsx("div", { style: { paddingTop: 8, borderTop: "1px solid var(--graview-edge)", minWidth: 0 }, children: conversation })) : null] }));
|
|
462
|
-
}
|
|
463
|
-
//# sourceMappingURL=companion.js.map
|
package/dist/companion.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"companion.js","sourceRoot":"","sources":["../src/companion.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,OAAO,EAAE,KAAK,EAAkB,MAAM,eAAe,CAAC;AAC/D,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACjD,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,YAAY,EAAqB,MAAM,gBAAgB,CAAC;AAC1F,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACrE,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AACtC,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACjD,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C;;;;;;;;;;;;;;;;GAgBG;AAEH;;;;GAIG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG,GAAG,CAAC;AAE5B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CAkBb,CACN,CAAC;gCACJ,CAAC,CAAC,GACC,IACG,CACX,CAAC,CAAC,CAAC,IAAI,EAEP,QAAQ,CAAC,CAAC,CAAC,CACV,kCAAqB,eAAe,aAClC,kBAAS,KAAK,EAAE,EAAE,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAE,SAAS,EAAE,aAAa,EAAE,QAAQ,EAAE,aAAa,EAAE,WAAW,EAAE,KAAK,EAAE,0BAA0B,EAAE,SAAS,EAAE,EAAE,EAAE,oCAEvJ,EACV,KAAC,WAAW,IAAI,MAAM,SAAG,IACjB,CACX,CAAC,CAAC,CAAC,IAAI,IACJ,CACP,CAAC,CAAC,CAAC,IAAI,EACP,IAAI,IAAI,IAAI,IAAI,MAAM,CAAC,CAAC,CAAC,CACxB,cAAK,KAAK,EAAE,EAAE,UAAU,EAAE,CAAC,EAAE,SAAS,EAAE,+BAA+B,EAAE,QAAQ,EAAE,CAAC,EAAE,YAAG,YAAY,GAAO,CAC7G,CAAC,CAAC,CAAC,IAAI,IACA,CACX,CAAC;AACJ,CAAC"}
|
package/dist/ladder.d.ts
DELETED
package/dist/ladder.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ladder.d.ts","sourceRoot":"","sources":["../src/ladder.tsx"],"names":[],"mappings":"AAuCA,wBAAgB,aAAa,gCAgG5B"}
|
package/dist/ladder.js
DELETED
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { useGraview } from "@graview/react/provider";
|
|
3
|
-
import { choiceStyle } from "./choice.js";
|
|
4
|
-
/*
|
|
5
|
-
* THE LADDER, AS ONE ROW IN THE PROFILE. Which rung answers the chat —
|
|
6
|
-
* this graph, a model on this device, Jev (which decides and does not
|
|
7
|
-
* talk), or a frontier model with the person's own key — beside text size
|
|
8
|
-
* and scheme, in the same pills. It used to be a pane of prose the chat's
|
|
9
|
-
* gear opened over the map: four radios with a paragraph each, a key field
|
|
10
|
-
* with a placeholder about the dev server, three more sentences on where a
|
|
11
|
-
* key goes, clipped at the window's edge. That was configuration written
|
|
12
|
-
* as documentation. Here it is a setting: one short label per rung, a key
|
|
13
|
-
* field only when the rung needs one, one sentence on screen and the rest
|
|
14
|
-
* in a tooltip.
|
|
15
|
-
*/
|
|
16
|
-
const RUNGS = [
|
|
17
|
-
{ value: "graph", label: "this graph", why: "Keyless and instant: the graph answers from its own structure." },
|
|
18
|
-
{ value: "local", label: "on this device", why: "A small model runs in this browser. First use downloads about 1–2 GB; then it is free and private." },
|
|
19
|
-
{ value: "decision", label: "Jev, which decides", why: "A decision provider answers typed questions exactly — which surface, which zone, does this help — with a confidence. It writes no prose, so the graph still answers the chat." },
|
|
20
|
-
{ value: "remote", label: "a model, with my key", why: "A frontier model answers. Calls go straight from this browser to the provider." },
|
|
21
|
-
];
|
|
22
|
-
const field = {
|
|
23
|
-
font: "inherit",
|
|
24
|
-
fontSize: "0.875rem",
|
|
25
|
-
padding: "5px 9px",
|
|
26
|
-
minHeight: 24,
|
|
27
|
-
borderRadius: 8,
|
|
28
|
-
border: "1px solid var(--graview-edge)",
|
|
29
|
-
background: "var(--graview-panel)",
|
|
30
|
-
color: "var(--graview-ink)",
|
|
31
|
-
width: "100%",
|
|
32
|
-
boxSizing: "border-box",
|
|
33
|
-
};
|
|
34
|
-
const hint = { fontSize: "0.8125rem", color: "var(--graview-ink-muted)", lineHeight: 1.4 };
|
|
35
|
-
export function LadderSetting() {
|
|
36
|
-
const { intelligence, chooseIntelligence } = useGraview();
|
|
37
|
-
const current = RUNGS.find((rung) => rung.value === intelligence.source) ?? RUNGS[0];
|
|
38
|
-
const remote = intelligence.remote ?? { preset: "xai", apiKey: "" };
|
|
39
|
-
return (_jsxs("fieldset", { "data-testid": "setting-intelligence", style: { border: 0, margin: 0, padding: 0, display: "grid", gap: 5 }, children: [_jsx("legend", { style: { fontSize: "0.75rem", letterSpacing: "0.14em", textTransform: "uppercase", color: "var(--graview-ink-faint)", padding: 0 }, children: "Answers come from" }), _jsx("div", { style: { display: "flex", flexWrap: "wrap", gap: 4 }, children: RUNGS.map((rung) => {
|
|
40
|
-
const chosen = rung.value === intelligence.source;
|
|
41
|
-
return (_jsx("button", { type: "button", "aria-pressed": chosen, "data-testid": `setting-intelligence-${rung.value}`, title: rung.why, onClick: () => chooseIntelligence({ ...intelligence, source: rung.value }), style: {
|
|
42
|
-
...choiceStyle(chosen),
|
|
43
|
-
// The others are words to choose; the one chosen is pressed, as the bar's switch is (FR-117, FR-137).
|
|
44
|
-
borderColor: "transparent",
|
|
45
|
-
}, children: rung.label }, rung.value));
|
|
46
|
-
}) }), _jsx("span", { style: hint, "data-testid": "setting-intelligence-why", children: current.why.split(/(?<=\.)\s/)[0] }), intelligence.source === "decision" ? (_jsxs("label", { style: { display: "grid", gap: 3 }, children: [_jsx("span", { style: hint, children: "TypeSafe key \u2014 kept in this browser, sent only there. Empty uses this app's own door." }), _jsx("input", { type: "password", "data-testid": "intelligence-decision-key", value: intelligence.decision?.apiKey ?? "", onChange: (event) => chooseIntelligence({ ...intelligence, decision: { ...(intelligence.decision ?? {}), apiKey: event.target.value } }), autoComplete: "off", style: field })] })) : null, intelligence.source === "remote" ? (_jsxs("div", { style: { display: "grid", gap: 6 }, children: [_jsxs("div", { style: { display: "grid", gridTemplateColumns: "1fr 1fr", gap: 6 }, children: [_jsxs("select", { "data-testid": "intelligence-provider", value: remote.preset ?? "xai", onChange: (event) => chooseIntelligence({ ...intelligence, remote: { ...remote, preset: event.target.value } }), style: field, "aria-label": "Provider", children: [_jsx("option", { value: "xai", children: "xAI (Grok)" }), _jsx("option", { value: "custom", children: "OpenAI-compatible" })] }), _jsx("input", { "data-testid": "intelligence-model", value: remote.model ?? "", onChange: (event) => chooseIntelligence({ ...intelligence, remote: { ...remote, model: event.target.value } }), placeholder: remote.preset === "custom" ? "model id" : "grok-4-fast", "aria-label": "Model", style: field })] }), remote.preset === "custom" ? (_jsx("input", { "data-testid": "intelligence-base-url", value: remote.baseUrl ?? "", onChange: (event) => chooseIntelligence({ ...intelligence, remote: { ...remote, baseUrl: event.target.value } }), placeholder: "https://\u2026/v1", "aria-label": "Base URL", style: field })) : null, _jsxs("label", { style: { display: "grid", gap: 3 }, children: [_jsx("span", { style: hint, children: "API key \u2014 kept in this browser, sent only to the provider above." }), _jsx("input", { type: "password", "data-testid": "intelligence-key", value: remote.apiKey ?? "", onChange: (event) => chooseIntelligence({ ...intelligence, remote: { ...remote, apiKey: event.target.value } }), placeholder: remote.preset === "custom" ? "sk-…" : "xai-…", autoComplete: "off", style: field })] })] })) : null] }));
|
|
47
|
-
}
|
|
48
|
-
//# sourceMappingURL=ladder.js.map
|
package/dist/ladder.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ladder.js","sourceRoot":"","sources":["../src/ladder.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAErD,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE1C;;;;;;;;;;;GAWG;AAEH,MAAM,KAAK,GAA8G;IACvH,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,YAAY,EAAE,GAAG,EAAE,gEAAgE,EAAE;IAC9G,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,gBAAgB,EAAE,GAAG,EAAE,oGAAoG,EAAE;IACtJ,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,oBAAoB,EAAE,GAAG,EAAE,+KAA+K,EAAE;IACxO,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,sBAAsB,EAAE,GAAG,EAAE,gFAAgF,EAAE;CAC1I,CAAC;AAEF,MAAM,KAAK,GAAkB;IAC3B,IAAI,EAAE,SAAS;IACf,QAAQ,EAAE,UAAU;IACpB,OAAO,EAAE,SAAS;IAClB,SAAS,EAAE,EAAE;IACb,YAAY,EAAE,CAAC;IACf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gBACf,UAAU,EACrB,KAAK,EAAE,KAAK,GACZ,CACH,CAAC,CAAC,CAAC,IAAI,EACR,iBAAO,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC,EAAE,aACvC,eAAM,KAAK,EAAE,IAAI,sFAAyE,EAC1F,gBACE,IAAI,EAAC,UAAU,iBACH,kBAAkB,EAC9B,KAAK,EAAE,MAAM,CAAC,MAAM,IAAI,EAAE,EAC1B,QAAQ,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,kBAAkB,CAAC,EAAE,GAAG,YAAY,EAAE,MAAM,EAAE,EAAE,GAAG,MAAM,EAAE,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,KAAK,EAAE,EAAE,CAAC,EAC/G,WAAW,EAAE,MAAM,CAAC,MAAM,KAAK,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,EAC1D,YAAY,EAAC,KAAK,EAClB,KAAK,EAAE,KAAK,GACZ,IACI,IACJ,CACP,CAAC,CAAC,CAAC,IAAI,IACC,CACZ,CAAC;AACJ,CAAC"}
|
package/dist/popover.d.ts
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* CLOSE A POPOVER AND GIVE THE KEYBOARD BACK TO WHAT OPENED IT.
|
|
3
|
-
*
|
|
4
|
-
* Every popover on the bar closes on Escape, and every one of them left the
|
|
5
|
-
* keyboard where it was — on a control inside the pane it had just taken
|
|
6
|
-
* away. A removed or hidden element takes focus to <body>, so pressing
|
|
7
|
-
* Escape after "undo" in the activity list put somebody working from the
|
|
8
|
-
* keyboard at the top of the document, and in WebKit the next Tab went
|
|
9
|
-
* nowhere at all. The button that opened the popover is where the keyboard
|
|
10
|
-
* came from, and it is still there.
|
|
11
|
-
*
|
|
12
|
-
* `anchor` holds the trigger (the element with `aria-expanded`) and the
|
|
13
|
-
* pane; the keyboard is moved only when it was inside the pane, so a press
|
|
14
|
-
* that opened the popover and closed it again stays exactly where it was.
|
|
15
|
-
*
|
|
16
|
-
* The pane itself stands in the browser's top layer (`useTopLayer`), placed
|
|
17
|
-
* by its trigger and kept to the viewport, so it is never cut off by the
|
|
18
|
-
* box it opened in (FR-76).
|
|
19
|
-
*/
|
|
20
|
-
export declare function closeToTrigger(anchor: HTMLElement | null, close: () => void): void;
|
|
21
|
-
//# sourceMappingURL=popover.d.ts.map
|
package/dist/popover.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"popover.d.ts","sourceRoot":"","sources":["../src/popover.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE,WAAW,GAAG,IAAI,EAAE,KAAK,EAAE,MAAM,IAAI,GAAG,IAAI,CAMlF"}
|