@graview/primitives 0.1.8 → 0.1.10
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/chat.d.ts.map +1 -1
- package/dist/chat.js +15 -32
- package/dist/chat.js.map +1 -1
- package/dist/companion.d.ts +16 -1
- package/dist/companion.d.ts.map +1 -1
- package/dist/companion.js +178 -39
- package/dist/companion.js.map +1 -1
- package/dist/declared-lens-doors.d.ts +18 -0
- package/dist/declared-lens-doors.d.ts.map +1 -0
- package/dist/declared-lens-doors.js +73 -0
- package/dist/declared-lens-doors.js.map +1 -0
- package/dist/declared-lenses.d.ts +6 -0
- package/dist/declared-lenses.d.ts.map +1 -0
- package/dist/declared-lenses.js +83 -0
- package/dist/declared-lenses.js.map +1 -0
- package/dist/declared-views.d.ts +11 -0
- package/dist/declared-views.d.ts.map +1 -0
- package/dist/declared-views.js +15 -0
- package/dist/declared-views.js.map +1 -0
- package/dist/default-views.d.ts.map +1 -1
- package/dist/default-views.js +5 -1
- package/dist/default-views.js.map +1 -1
- package/dist/find.d.ts.map +1 -1
- package/dist/find.js +21 -12
- package/dist/find.js.map +1 -1
- package/dist/frame.d.ts +4 -0
- package/dist/frame.d.ts.map +1 -1
- package/dist/frame.js +2 -0
- package/dist/frame.js.map +1 -1
- package/dist/home-landing.d.ts +18 -0
- package/dist/home-landing.d.ts.map +1 -0
- package/dist/home-landing.js +59 -0
- package/dist/home-landing.js.map +1 -0
- package/dist/home-view.d.ts +4 -0
- package/dist/home-view.d.ts.map +1 -0
- package/dist/home-view.js +19 -0
- package/dist/home-view.js.map +1 -0
- package/dist/index.d.ts +10 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +7 -2
- package/dist/index.js.map +1 -1
- package/dist/lens/coverage.d.ts.map +1 -1
- package/dist/lens/coverage.js +4 -4
- package/dist/lens/coverage.js.map +1 -1
- package/dist/notices.d.ts +70 -0
- package/dist/notices.d.ts.map +1 -0
- package/dist/notices.js +219 -0
- package/dist/notices.js.map +1 -0
- package/dist/pages.d.ts +2 -0
- package/dist/pages.d.ts.map +1 -1
- package/dist/pages.js +3 -0
- package/dist/pages.js.map +1 -1
- package/dist/popover.d.ts +4 -11
- package/dist/popover.d.ts.map +1 -1
- package/dist/popover.js +4 -35
- package/dist/popover.js.map +1 -1
- package/dist/profile.d.ts +15 -2
- package/dist/profile.d.ts.map +1 -1
- package/dist/profile.js +34 -53
- 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/relation-key.d.ts.map +1 -1
- package/dist/relation-key.js +2 -2
- package/dist/relation-key.js.map +1 -1
- package/dist/scene.d.ts +21 -0
- package/dist/scene.d.ts.map +1 -0
- package/dist/scene.js +20 -0
- package/dist/scene.js.map +1 -0
- package/dist/seeding.d.ts +0 -8
- package/dist/seeding.d.ts.map +1 -1
- package/dist/seeding.js +50 -16
- package/dist/seeding.js.map +1 -1
- package/dist/shell.d.ts +23 -2
- package/dist/shell.d.ts.map +1 -1
- package/dist/shell.js +9 -3
- package/dist/shell.js.map +1 -1
- package/dist/spec-css.d.ts +1 -1
- package/dist/spec-css.d.ts.map +1 -1
- package/dist/spec-css.js +26 -1
- package/dist/spec-css.js.map +1 -1
- package/dist/spec-views.d.ts +32 -58
- package/dist/spec-views.d.ts.map +1 -1
- package/dist/spec-views.js +130 -195
- package/dist/spec-views.js.map +1 -1
- package/dist/theme.d.ts.map +1 -1
- package/dist/theme.js +54 -34
- package/dist/theme.js.map +1 -1
- package/dist/workbench/activity.d.ts.map +1 -1
- package/dist/workbench/activity.js +13 -34
- package/dist/workbench/activity.js.map +1 -1
- package/dist/workbench/back-out.d.ts.map +1 -1
- package/dist/workbench/back-out.js +2 -1
- package/dist/workbench/back-out.js.map +1 -1
- package/dist/workbench/inspector.d.ts.map +1 -1
- package/dist/workbench/inspector.js +38 -33
- package/dist/workbench/inspector.js.map +1 -1
- package/dist/workbench/standing.d.ts.map +1 -1
- package/dist/workbench/standing.js +15 -35
- package/dist/workbench/standing.js.map +1 -1
- package/package.json +10 -6
package/dist/notices.js
ADDED
|
@@ -0,0 +1,219 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { layer } from "@graview/core";
|
|
3
|
+
import { inTopLayer, raiseOverPopovers } from "@graview/react/provider";
|
|
4
|
+
import { useEffect, useLayoutEffect, useRef, useState, useSyncExternalStore } from "react";
|
|
5
|
+
import { VISUALLY_HIDDEN } from "./primitives/index.js";
|
|
6
|
+
/** The time a toast with nothing to answer stays. */
|
|
7
|
+
export const TOAST_MS = 6000;
|
|
8
|
+
/** One board of notices: what `notify` writes and `Notices` draws. */
|
|
9
|
+
export function createNoticeBoard() {
|
|
10
|
+
let held = [];
|
|
11
|
+
let sequence = 0;
|
|
12
|
+
const listeners = new Set();
|
|
13
|
+
const timers = new Map();
|
|
14
|
+
const tell = () => {
|
|
15
|
+
for (const listener of [...listeners])
|
|
16
|
+
listener();
|
|
17
|
+
};
|
|
18
|
+
const time = (notice) => {
|
|
19
|
+
clearTimeout(timers.get(notice.id));
|
|
20
|
+
timers.delete(notice.id);
|
|
21
|
+
if (notice.kind !== "toast")
|
|
22
|
+
return;
|
|
23
|
+
const acts = (notice.actions?.length ?? 0) + (notice.action ? 1 : 0);
|
|
24
|
+
const after = notice.timeout ?? (acts > 0 ? false : TOAST_MS);
|
|
25
|
+
if (after === false)
|
|
26
|
+
return;
|
|
27
|
+
timers.set(notice.id, setTimeout(() => dismiss(notice.id), after));
|
|
28
|
+
};
|
|
29
|
+
const dismiss = (id) => {
|
|
30
|
+
clearTimeout(timers.get(id));
|
|
31
|
+
timers.delete(id);
|
|
32
|
+
if (!held.some((one) => one.id === id))
|
|
33
|
+
return;
|
|
34
|
+
held = held.filter((one) => one.id !== id);
|
|
35
|
+
tell();
|
|
36
|
+
};
|
|
37
|
+
const put = (notice) => {
|
|
38
|
+
held = held.some((one) => one.id === notice.id) ? held.map((one) => (one.id === notice.id ? notice : one)) : [...held, notice];
|
|
39
|
+
time(notice);
|
|
40
|
+
tell();
|
|
41
|
+
};
|
|
42
|
+
return {
|
|
43
|
+
notify(notice) {
|
|
44
|
+
const id = notice.id ?? `notice-${++sequence}`;
|
|
45
|
+
put({ ...notice, id, said: ++sequence });
|
|
46
|
+
return {
|
|
47
|
+
id,
|
|
48
|
+
dismiss: () => dismiss(id),
|
|
49
|
+
update: (change) => {
|
|
50
|
+
const now = held.find((one) => one.id === id);
|
|
51
|
+
if (now)
|
|
52
|
+
put({ ...now, ...change, id, kind: now.kind, said: change.sentence !== undefined && change.sentence !== now.sentence ? ++sequence : now.said });
|
|
53
|
+
},
|
|
54
|
+
};
|
|
55
|
+
},
|
|
56
|
+
dismiss,
|
|
57
|
+
list: () => held,
|
|
58
|
+
subscribe(listener) {
|
|
59
|
+
listeners.add(listener);
|
|
60
|
+
return () => listeners.delete(listener);
|
|
61
|
+
},
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
const TONE = {
|
|
65
|
+
info: "var(--graview-accent)",
|
|
66
|
+
good: "var(--graview-good)",
|
|
67
|
+
warn: "var(--graview-warn)",
|
|
68
|
+
bad: "var(--graview-bad)",
|
|
69
|
+
};
|
|
70
|
+
/** A stack of notices in the top layer, placed at the top or the foot of the picture it is about. */
|
|
71
|
+
function Stack({ notices, at, anchor, board }) {
|
|
72
|
+
const pane = useRef(null);
|
|
73
|
+
const shown = notices.length > 0;
|
|
74
|
+
useLayoutEffect(() => {
|
|
75
|
+
const element = pane.current;
|
|
76
|
+
if (!shown || !element)
|
|
77
|
+
return;
|
|
78
|
+
if (typeof element.showPopover === "function" && !inTopLayer(element)) {
|
|
79
|
+
try {
|
|
80
|
+
element.showPopover();
|
|
81
|
+
}
|
|
82
|
+
catch {
|
|
83
|
+
// The toast rung holds it over every rail where the top layer is not there.
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
const place = () => {
|
|
87
|
+
const box = anchor()?.getBoundingClientRect() ?? { left: 0, right: innerWidth, top: 0, bottom: innerHeight };
|
|
88
|
+
const view = { width: document.documentElement.clientWidth || innerWidth, height: innerHeight };
|
|
89
|
+
const left = Math.max(0, box.left);
|
|
90
|
+
const right = Math.min(view.width, box.right);
|
|
91
|
+
element.style.left = `${Math.round(left + (right - left) / 2)}px`;
|
|
92
|
+
if (at === "top")
|
|
93
|
+
element.style.top = `${Math.round(Math.max(8, box.top + 12))}px`;
|
|
94
|
+
else
|
|
95
|
+
element.style.bottom = `${Math.round(Math.max(8, view.height - box.bottom + 16))}px`;
|
|
96
|
+
};
|
|
97
|
+
place();
|
|
98
|
+
const unraise = raiseOverPopovers(element);
|
|
99
|
+
addEventListener("resize", place);
|
|
100
|
+
addEventListener("scroll", place, true);
|
|
101
|
+
return () => {
|
|
102
|
+
unraise();
|
|
103
|
+
removeEventListener("resize", place);
|
|
104
|
+
removeEventListener("scroll", place, true);
|
|
105
|
+
if (element.isConnected && inTopLayer(element)) {
|
|
106
|
+
try {
|
|
107
|
+
element.hidePopover();
|
|
108
|
+
}
|
|
109
|
+
catch {
|
|
110
|
+
// Gone already.
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
};
|
|
114
|
+
}, [shown, at, anchor]);
|
|
115
|
+
if (!shown)
|
|
116
|
+
return null;
|
|
117
|
+
return (_jsx("div", { ref: pane, popover: "manual", role: "region", "aria-label": at === "top" ? "Notices" : "Messages", "data-testid": at === "top" ? "notices-banners" : "notices-toasts", "data-graview-offstage": "", style: {
|
|
118
|
+
position: "fixed",
|
|
119
|
+
inset: "auto",
|
|
120
|
+
margin: 0,
|
|
121
|
+
padding: 0,
|
|
122
|
+
border: "none",
|
|
123
|
+
background: "none",
|
|
124
|
+
overflow: "visible",
|
|
125
|
+
zIndex: layer("toast"),
|
|
126
|
+
translate: "-50% 0",
|
|
127
|
+
width: "max-content",
|
|
128
|
+
maxWidth: "min(560px, calc(100vw - 32px))",
|
|
129
|
+
display: "grid",
|
|
130
|
+
gap: 8,
|
|
131
|
+
color: "var(--graview-ink)",
|
|
132
|
+
}, children: notices.map((notice) => (_jsx(NoticeCard, { notice: notice, board: board }, notice.id))) }));
|
|
133
|
+
}
|
|
134
|
+
function NoticeCard({ notice, board }) {
|
|
135
|
+
const tone = notice.tone ?? "info";
|
|
136
|
+
const acts = [...(notice.action ? [notice.action] : []), ...(notice.actions ?? [])];
|
|
137
|
+
const close = () => board.dismiss(notice.id);
|
|
138
|
+
return (_jsxs("div", { "data-testid": "notice", "data-kind": notice.kind, "data-tone": tone, style: {
|
|
139
|
+
boxSizing: "border-box",
|
|
140
|
+
display: "flex",
|
|
141
|
+
flexWrap: "wrap",
|
|
142
|
+
alignItems: "center",
|
|
143
|
+
gap: "8px 12px",
|
|
144
|
+
padding: notice.kind === "banner" ? "8px 10px 8px 14px" : "10px 12px 10px 14px",
|
|
145
|
+
borderRadius: "var(--graview-radius, 12px)",
|
|
146
|
+
borderTop: "1px solid var(--graview-edge)",
|
|
147
|
+
borderRight: "1px solid var(--graview-edge)",
|
|
148
|
+
borderBottom: "1px solid var(--graview-edge)",
|
|
149
|
+
borderLeft: `3px solid ${TONE[tone]}`,
|
|
150
|
+
background: "var(--graview-float)",
|
|
151
|
+
boxShadow: "var(--graview-lift-high)",
|
|
152
|
+
fontSize: "0.875rem",
|
|
153
|
+
lineHeight: 1.45,
|
|
154
|
+
}, children: [_jsx("span", { "aria-hidden": "true", style: { width: 7, height: 7, borderRadius: 999, flex: "0 0 auto", background: TONE[tone] } }), _jsx("span", { style: { flex: "1 1 16rem", minWidth: 0 }, children: notice.sentence }), acts.length > 0 ? (_jsx("span", { style: { display: "flex", flexWrap: "wrap", gap: 6 }, children: acts.map((act, index) => act.href !== undefined ? (_jsx("a", { href: act.href, ...(act.target ? { target: act.target, rel: "noopener" } : {}), "data-testid": "notice-action", onClick: () => {
|
|
155
|
+
act.onSelect?.();
|
|
156
|
+
close();
|
|
157
|
+
}, style: { ...ACT, ...(index === 0 ? FIRST : {}) }, children: act.label }, act.label)) : (_jsx("button", { type: "button", "data-testid": "notice-action", onClick: () => {
|
|
158
|
+
close();
|
|
159
|
+
act.onSelect?.();
|
|
160
|
+
}, style: { ...ACT, ...(index === 0 ? FIRST : {}) }, children: act.label }, act.label))) })) : null, _jsx("button", { type: "button", "data-testid": "notice-dismiss", "aria-label": `Dismiss: ${notice.sentence}`, title: "Dismiss", onClick: close, style: DISMISS, children: "\u00D7" })] }));
|
|
161
|
+
}
|
|
162
|
+
const ACT = {
|
|
163
|
+
display: "inline-flex",
|
|
164
|
+
alignItems: "center",
|
|
165
|
+
minHeight: 28,
|
|
166
|
+
padding: "2px 12px",
|
|
167
|
+
borderRadius: 9,
|
|
168
|
+
border: "1px solid var(--graview-edge)",
|
|
169
|
+
background: "var(--graview-panel)",
|
|
170
|
+
color: "var(--graview-ink)",
|
|
171
|
+
font: "inherit",
|
|
172
|
+
fontWeight: 500,
|
|
173
|
+
textDecoration: "none",
|
|
174
|
+
cursor: "pointer",
|
|
175
|
+
};
|
|
176
|
+
/** The first act is the one the notice asks for. */
|
|
177
|
+
const FIRST = { background: "var(--graview-accent)", borderColor: "var(--graview-accent)", color: "var(--graview-accent-ink)" };
|
|
178
|
+
const DISMISS = {
|
|
179
|
+
minWidth: 28,
|
|
180
|
+
minHeight: 28,
|
|
181
|
+
padding: 0,
|
|
182
|
+
border: "none",
|
|
183
|
+
background: "none",
|
|
184
|
+
boxShadow: "none",
|
|
185
|
+
color: "var(--graview-ink-muted)",
|
|
186
|
+
fontSize: "1rem",
|
|
187
|
+
cursor: "pointer",
|
|
188
|
+
};
|
|
189
|
+
/**
|
|
190
|
+
* SAID ALOUD, as each notice arrives: politely, or as an alert when its
|
|
191
|
+
* tone is bad. Two live regions that are always there, so a reader is told
|
|
192
|
+
* even when the notice itself is drawn in the top layer, and emptied a beat
|
|
193
|
+
* before each sentence so the same words said twice are said twice.
|
|
194
|
+
*/
|
|
195
|
+
function Spoken({ notices }) {
|
|
196
|
+
const latest = notices.reduce((last, one) => (!last || one.said > last.said ? one : last), undefined);
|
|
197
|
+
const [polite, setPolite] = useState("");
|
|
198
|
+
const [alarm, setAlarm] = useState("");
|
|
199
|
+
const heard = useRef(0);
|
|
200
|
+
useEffect(() => {
|
|
201
|
+
if (!latest || latest.said === heard.current)
|
|
202
|
+
return;
|
|
203
|
+
heard.current = latest.said;
|
|
204
|
+
const bad = latest.tone === "bad";
|
|
205
|
+
(bad ? setAlarm : setPolite)("");
|
|
206
|
+
const soon = setTimeout(() => (bad ? setAlarm : setPolite)(latest.sentence), 50);
|
|
207
|
+
return () => clearTimeout(soon);
|
|
208
|
+
}, [latest]);
|
|
209
|
+
return (_jsxs(_Fragment, { children: [_jsx("div", { role: "status", "aria-live": "polite", "data-testid": "notices-said", style: VISUALLY_HIDDEN, children: polite }), _jsx("div", { role: "alert", "data-testid": "notices-alarm", style: VISUALLY_HIDDEN, children: alarm })] }));
|
|
210
|
+
}
|
|
211
|
+
/**
|
|
212
|
+
* The notices on a board, drawn over the picture `anchor` returns (the
|
|
213
|
+
* embed's face, the Shell's scene): banners at its top, toasts at its foot.
|
|
214
|
+
*/
|
|
215
|
+
export function Notices({ board, anchor }) {
|
|
216
|
+
const notices = useSyncExternalStore(board.subscribe, board.list, board.list);
|
|
217
|
+
return (_jsxs(_Fragment, { children: [_jsx(Stack, { notices: notices.filter((one) => one.kind === "banner"), at: "top", anchor: anchor, board: board }), _jsx(Stack, { notices: notices.filter((one) => one.kind === "toast"), at: "foot", anchor: anchor, board: board }), _jsx(Spoken, { notices: notices })] }));
|
|
218
|
+
}
|
|
219
|
+
//# sourceMappingURL=notices.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"notices.js","sourceRoot":"","sources":["../src/notices.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACtC,OAAO,EAAE,UAAU,EAAE,iBAA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,CAAC,CAAC;IAClC,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC;IACb,OAAO,CACL,8BACE,cAAK,IAAI,EAAC,QAAQ,eAAW,QAAQ,iBAAa,cAAc,EAAC,KAAK,EAAE,eAAe,YACpF,MAAM,GACH,EACN,cAAK,IAAI,EAAC,OAAO,iBAAa,eAAe,EAAC,KAAK,EAAE,eAAe,YACjE,KAAK,GACF,IACL,CACJ,CAAC;AACJ,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,OAAO,CAAC,EAAE,KAAK,EAAE,MAAM,EAA8E;IACnH,MAAM,OAAO,GAAG,oBAAoB,CAAC,KAAK,CAAC,SAAS,EAAE,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;IAC9E,OAAO,CACL,8BACE,KAAC,KAAK,IAAC,OAAO,EAAE,OAAO,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,IAAI,KAAK,QAAQ,CAAC,EAAE,EAAE,EAAC,KAAK,EAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,GAAI,EACzG,KAAC,KAAK,IAAC,OAAO,EAAE,OAAO,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,IAAI,KAAK,OAAO,CAAC,EAAE,EAAE,EAAC,MAAM,EAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,GAAI,EACzG,KAAC,MAAM,IAAC,OAAO,EAAE,OAAO,GAAI,IAC3B,CACJ,CAAC;AACJ,CAAC"}
|
package/dist/pages.d.ts
CHANGED
|
@@ -17,4 +17,6 @@ export { KindFigure } from "./figure.js";
|
|
|
17
17
|
export { LadderSetting } from "./ladder.js";
|
|
18
18
|
export { useMarkup } from "./markup.js";
|
|
19
19
|
export { RelationMark } from "./relation-key.js";
|
|
20
|
+
export { registerDefaultViews } from "./default-views.js";
|
|
21
|
+
export { registerViewSpecs, SpecLinks } from "./spec-views.js";
|
|
20
22
|
//# sourceMappingURL=pages.d.ts.map
|
package/dist/pages.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pages.d.ts","sourceRoot":"","sources":["../src/pages.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,OAAO,EAAE,UAAU,EAAE,kBAAkB,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAClG,YAAY,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACxD,OAAO,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AACzD,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC"}
|
|
1
|
+
{"version":3,"file":"pages.d.ts","sourceRoot":"","sources":["../src/pages.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,OAAO,EAAE,UAAU,EAAE,kBAAkB,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAClG,YAAY,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACxD,OAAO,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AACzD,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEjD,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC1D,OAAO,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC"}
|
package/dist/pages.js
CHANGED
|
@@ -16,4 +16,7 @@ export { KindFigure } from "./figure.js";
|
|
|
16
16
|
export { LadderSetting } from "./ladder.js";
|
|
17
17
|
export { useMarkup } from "./markup.js";
|
|
18
18
|
export { RelationMark } from "./relation-key.js";
|
|
19
|
+
// The framework's own views and the declaration's specs, for a routed face that registers them outright (`@graview/embed/pages`) without reaching every lens through the package's main entry.
|
|
20
|
+
export { registerDefaultViews } from "./default-views.js";
|
|
21
|
+
export { registerViewSpecs, SpecLinks } from "./spec-views.js";
|
|
19
22
|
//# sourceMappingURL=pages.js.map
|
package/dist/pages.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pages.js","sourceRoot":"","sources":["../src/pages.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,OAAO,EAAE,UAAU,EAAE,kBAAkB,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAElG,OAAO,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AACzD,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC"}
|
|
1
|
+
{"version":3,"file":"pages.js","sourceRoot":"","sources":["../src/pages.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,OAAO,EAAE,UAAU,EAAE,kBAAkB,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAElG,OAAO,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AACzD,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,+LAA+L;AAC/L,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC1D,OAAO,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC"}
|
package/dist/popover.d.ts
CHANGED
|
@@ -12,17 +12,10 @@
|
|
|
12
12
|
* `anchor` holds the trigger (the element with `aria-expanded`) and the
|
|
13
13
|
* pane; the keyboard is moved only when it was inside the pane, so a press
|
|
14
14
|
* that opened the popover and closed it again stays exactly where it was.
|
|
15
|
-
*/
|
|
16
|
-
export declare function closeToTrigger(anchor: HTMLElement | null, close: () => void): void;
|
|
17
|
-
/**
|
|
18
|
-
* A POPOVER STAYS IN THE BOX IT OPENED IN.
|
|
19
15
|
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
* settings were cut in half at 1280 and began off the screen at 390. When
|
|
24
|
-
* the pane is inside an embed, it is slid back inside the embed's box and
|
|
25
|
-
* no taller than the room under its top — nudged, never re-laid out.
|
|
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).
|
|
26
19
|
*/
|
|
27
|
-
export declare function
|
|
20
|
+
export declare function closeToTrigger(anchor: HTMLElement | null, close: () => void): void;
|
|
28
21
|
//# sourceMappingURL=popover.d.ts.map
|
package/dist/popover.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"popover.d.ts","sourceRoot":"","sources":["../src/popover.ts"],"names":[],"mappings":"AAAA
|
|
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"}
|
package/dist/popover.js
CHANGED
|
@@ -12,6 +12,10 @@
|
|
|
12
12
|
* `anchor` holds the trigger (the element with `aria-expanded`) and the
|
|
13
13
|
* pane; the keyboard is moved only when it was inside the pane, so a press
|
|
14
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).
|
|
15
19
|
*/
|
|
16
20
|
export function closeToTrigger(anchor, close) {
|
|
17
21
|
const at = typeof document === "undefined" ? null : document.activeElement;
|
|
@@ -21,39 +25,4 @@ export function closeToTrigger(anchor, close) {
|
|
|
21
25
|
if (inside)
|
|
22
26
|
trigger?.focus();
|
|
23
27
|
}
|
|
24
|
-
/**
|
|
25
|
-
* A POPOVER STAYS IN THE BOX IT OPENED IN.
|
|
26
|
-
*
|
|
27
|
-
* On somebody else's page the app is one element with `overflow: hidden`,
|
|
28
|
-
* and a pane anchored to its button's right edge, 280 pixels wide, opened
|
|
29
|
-
* from a button near the element's left side ran off it: the profile's
|
|
30
|
-
* settings were cut in half at 1280 and began off the screen at 390. When
|
|
31
|
-
* the pane is inside an embed, it is slid back inside the embed's box and
|
|
32
|
-
* no taller than the room under its top — nudged, never re-laid out.
|
|
33
|
-
*/
|
|
34
|
-
export function keepInside(pane) {
|
|
35
|
-
if (!pane)
|
|
36
|
-
return;
|
|
37
|
-
pane.style.translate = "";
|
|
38
|
-
const box = pane.closest("[data-graview-embed]")?.getBoundingClientRect();
|
|
39
|
-
if (!box)
|
|
40
|
-
return;
|
|
41
|
-
const at = pane.getBoundingClientRect();
|
|
42
|
-
if (at.width === 0)
|
|
43
|
-
return;
|
|
44
|
-
const GAP = 8;
|
|
45
|
-
let dx = 0;
|
|
46
|
-
if (at.left < box.left + GAP)
|
|
47
|
-
dx = box.left + GAP - at.left;
|
|
48
|
-
else if (at.right > box.right - GAP)
|
|
49
|
-
dx = box.right - GAP - at.right;
|
|
50
|
-
if (dx !== 0)
|
|
51
|
-
pane.style.translate = `${Math.round(dx)}px 0`;
|
|
52
|
-
const room = box.bottom - GAP - at.top;
|
|
53
|
-
if (at.height > room) {
|
|
54
|
-
// `max-height` is the content box's: the pane's own padding and border come on top of it.
|
|
55
|
-
const frame = at.height - parseFloat(getComputedStyle(pane).height || "0");
|
|
56
|
-
pane.style.maxHeight = `${Math.max(120, Math.floor(room - (Number.isFinite(frame) ? frame : 0)))}px`;
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
28
|
//# sourceMappingURL=popover.js.map
|
package/dist/popover.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"popover.js","sourceRoot":"","sources":["../src/popover.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"popover.js","sourceRoot":"","sources":["../src/popover.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,UAAU,cAAc,CAAC,MAA0B,EAAE,KAAiB;IAC1E,MAAM,EAAE,GAAG,OAAO,QAAQ,KAAK,WAAW,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC,aAAa,CAAC;IAC3E,MAAM,OAAO,GAAG,MAAM,EAAE,aAAa,CAAc,iBAAiB,CAAC,IAAI,IAAI,CAAC;IAC9E,MAAM,MAAM,GAAG,EAAE,YAAY,WAAW,IAAI,MAAM,KAAK,IAAI,IAAI,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,KAAK,OAAO,CAAC;IACrG,KAAK,EAAE,CAAC;IACR,IAAI,MAAM;QAAE,OAAO,EAAE,KAAK,EAAE,CAAC;AAC/B,CAAC"}
|
package/dist/profile.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type AnySchema } from "@graview/core";
|
|
2
|
-
import {
|
|
2
|
+
import type { ReactNode } from "react";
|
|
3
3
|
/**
|
|
4
4
|
* WHO YOU ARE AT THIS KEYBOARD, AND WHAT YOU SET FOR YOURSELF.
|
|
5
5
|
*
|
|
@@ -48,7 +48,7 @@ profileHref,
|
|
|
48
48
|
* node. Both of them render nothing for a seat that may not administer,
|
|
49
49
|
* and the block they sit in hides itself when they do.
|
|
50
50
|
*/
|
|
51
|
-
keeping, compact, }: {
|
|
51
|
+
keeping, hostActions, compact, }: {
|
|
52
52
|
/** Just the mark: the name is the title. For a bar without the room. */
|
|
53
53
|
readonly compact?: boolean;
|
|
54
54
|
/**
|
|
@@ -61,5 +61,18 @@ keeping, compact, }: {
|
|
|
61
61
|
readonly onScheme?: (scheme: "light" | "dark") => void;
|
|
62
62
|
readonly profileHref?: (userId: string) => string;
|
|
63
63
|
readonly keeping?: ReactNode;
|
|
64
|
+
/** The host's own ways out and about: its links, drawn under who you are (FR-72). */
|
|
65
|
+
readonly hostActions?: readonly HostAction[];
|
|
64
66
|
}): import("react").JSX.Element;
|
|
67
|
+
/**
|
|
68
|
+
* ONE OF A HOST'S OWN ACTIONS, in the profile menu (FR-72): a link
|
|
69
|
+
* (`href`, and `target` if it opens elsewhere) or a press (`onSelect`).
|
|
70
|
+
* Given both, the link is followed and `onSelect` is told.
|
|
71
|
+
*/
|
|
72
|
+
export interface HostAction {
|
|
73
|
+
readonly label: string;
|
|
74
|
+
readonly href?: string;
|
|
75
|
+
readonly target?: string;
|
|
76
|
+
readonly onSelect?: () => void;
|
|
77
|
+
}
|
|
65
78
|
//# sourceMappingURL=profile.d.ts.map
|
package/dist/profile.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"profile.d.ts","sourceRoot":"","sources":["../src/profile.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAwC,KAAK,SAAS,EAAE,MAAM,eAAe,CAAC;AAGrF,OAAO,
|
|
1
|
+
{"version":3,"file":"profile.d.ts","sourceRoot":"","sources":["../src/profile.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAwC,KAAK,SAAS,EAAE,MAAM,eAAe,CAAC;AAGrF,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,wBAAgB,OAAO,CAAC,CAAC,SAAS,SAAS,EAAE,EAC3C,MAAM,EACN,QAAQ;AACR,6EAA6E;AAC7E,WAAW;AACX;;;;;;;;GAQG;AACH,OAAO,EACP,WAA6B,EAC7B,OAAe,GAChB,EAAE;IACD,wEAAwE;IACxE,QAAQ,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC;IAC3B;;;;;OAKG;IACH,QAAQ,CAAC,MAAM,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IACnC,QAAQ,CAAC,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,OAAO,GAAG,MAAM,KAAK,IAAI,CAAC;IACvD,QAAQ,CAAC,WAAW,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,MAAM,CAAC;IAClD,QAAQ,CAAC,OAAO,CAAC,EAAE,SAAS,CAAC;IAC7B,qFAAqF;IACrF,QAAQ,CAAC,WAAW,CAAC,EAAE,SAAS,UAAU,EAAE,CAAC;CAC9C,+BAqVA;AAED;;;;GAIG;AACH,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;CAChC"}
|
package/dist/profile.js
CHANGED
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { humaniseField, labelOf, nameOfAuthor } from "@graview/core";
|
|
3
|
-
import { useGraview } from "@graview/react/provider";
|
|
3
|
+
import { POPOVER_STYLE, useGraview, usePopover } from "@graview/react/provider";
|
|
4
4
|
import { LadderSetting } from "./ladder.js";
|
|
5
|
-
import { useEffect, useLayoutEffect, useRef, useState } from "react";
|
|
6
5
|
import { Seats } from "./seats.js";
|
|
7
|
-
import { closeToTrigger, keepInside } from "./popover.js";
|
|
8
6
|
/**
|
|
9
7
|
* WHO YOU ARE AT THIS KEYBOARD, AND WHAT YOU SET FOR YOURSELF.
|
|
10
8
|
*
|
|
@@ -53,42 +51,18 @@ profileHref,
|
|
|
53
51
|
* node. Both of them render nothing for a seat that may not administer,
|
|
54
52
|
* and the block they sit in hides itself when they do.
|
|
55
53
|
*/
|
|
56
|
-
keeping, compact = false, }) {
|
|
54
|
+
keeping, hostActions = NO_HOST_ACTIONS, compact = false, }) {
|
|
57
55
|
const { store, principal, seats, people, settings, settingValues, chooseSetting, sharing, hostAnswers } = useGraview();
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
* A CONTROL IN HERE MAY OPEN SOMETHING BIGGER THAN HERE.
|
|
69
|
-
*
|
|
70
|
-
* The studio is a full-screen dialog portalled to the body, and its
|
|
71
|
-
* button lives in this pane. Treating the first press inside the
|
|
72
|
-
* studio as "away" closed the pane, which unmounted the button, which
|
|
73
|
-
* took the portal with it — the studio opened and vanished on the
|
|
74
|
-
* next click. Anything that is itself a dialog or an overlay is not
|
|
75
|
-
* away from the thing that opened it.
|
|
76
|
-
*/
|
|
77
|
-
if (target instanceof Element && target.closest('[role="dialog"], [data-graview-overlay]'))
|
|
78
|
-
return;
|
|
79
|
-
setOpen(false);
|
|
80
|
-
};
|
|
81
|
-
const key = (event) => {
|
|
82
|
-
if (event.key === "Escape")
|
|
83
|
-
closeToTrigger(anchor.current, () => setOpen(false));
|
|
84
|
-
};
|
|
85
|
-
document.addEventListener("mousedown", away);
|
|
86
|
-
document.addEventListener("keydown", key);
|
|
87
|
-
return () => {
|
|
88
|
-
document.removeEventListener("mousedown", away);
|
|
89
|
-
document.removeEventListener("keydown", key);
|
|
90
|
-
};
|
|
91
|
-
}, [open]);
|
|
56
|
+
/*
|
|
57
|
+
* ONE OF THE FAMILY (FR-77): opening it closes any other popover, the
|
|
58
|
+
* keyboard goes in, Escape or a press outside closes it and gives the
|
|
59
|
+
* keyboard back to the button, and it hangs from the button in the top
|
|
60
|
+
* layer, turned over or scrolling so no row is under the viewport's edge.
|
|
61
|
+
* A press inside a dialog it opened (the studio, from "keeping") is not a
|
|
62
|
+
* press away from it.
|
|
63
|
+
*/
|
|
64
|
+
const popover = usePopover("profile");
|
|
65
|
+
const open = popover.open;
|
|
92
66
|
/*
|
|
93
67
|
* The person's own record, WHERE THERE IS ONE.
|
|
94
68
|
*
|
|
@@ -98,12 +72,6 @@ keeping, compact = false, }) {
|
|
|
98
72
|
* pane says who you are from the principal alone rather than inventing a
|
|
99
73
|
* name.
|
|
100
74
|
*/
|
|
101
|
-
// Inside an embed the pane stays inside the embed's box (see `keepInside`).
|
|
102
|
-
const pane = useRef(null);
|
|
103
|
-
useLayoutEffect(() => {
|
|
104
|
-
if (open)
|
|
105
|
-
keepInside(pane.current);
|
|
106
|
-
}, [open]);
|
|
107
75
|
const me = principal.id === undefined ? undefined : store.graph.getNode(principal.id);
|
|
108
76
|
const name = me === undefined
|
|
109
77
|
? principal.id === undefined
|
|
@@ -111,7 +79,7 @@ keeping, compact = false, }) {
|
|
|
111
79
|
: nameOfAuthor(principal, { graph: store.graph, schema: store.schema, seats, people })
|
|
112
80
|
: labelOf(store.schema.tryDefinition(me.kind), me);
|
|
113
81
|
const roles = principal.roles ?? [];
|
|
114
|
-
return (_jsxs("div", {
|
|
82
|
+
return (_jsxs("div", { style: { position: "relative" }, children: [_jsxs("button", { type: "button", "data-testid": "profile-button", ...popover.trigger, onClick: popover.toggle, title: "Who you are signed in as, and your own settings", style: {
|
|
115
83
|
display: "inline-flex",
|
|
116
84
|
alignItems: "center",
|
|
117
85
|
gap: 7,
|
|
@@ -137,13 +105,8 @@ keeping, compact = false, }) {
|
|
|
137
105
|
fontSize: "0.75rem",
|
|
138
106
|
background: "var(--graview-panel-muted)",
|
|
139
107
|
color: "var(--graview-ink-muted)",
|
|
140
|
-
}, children: initial(name) }), _jsx("span", { style: compact ? { position: "absolute", width: 1, height: 1, overflow: "hidden", clipPath: "inset(50%)" } : { overflow: "hidden", textOverflow: "ellipsis" }, children: name }), _jsx("span", { "aria-hidden": "true", "data-testid": "profile-gear", style: { fontSize: "0.75rem", color: "var(--graview-ink-faint)" }, children: "\u2699" })] }), _jsxs("section", {
|
|
141
|
-
|
|
142
|
-
}, "aria-label": "Profile", "data-testid": "profile", "data-graview-offstage": "", "data-graview-overlay": "", hidden: !open, style: {
|
|
143
|
-
position: "absolute",
|
|
144
|
-
top: "calc(100% + 6px)",
|
|
145
|
-
right: 0,
|
|
146
|
-
zIndex: 20,
|
|
108
|
+
}, children: initial(name) }), _jsx("span", { style: compact ? { position: "absolute", width: 1, height: 1, overflow: "hidden", clipPath: "inset(50%)" } : { overflow: "hidden", textOverflow: "ellipsis" }, children: name }), _jsx("span", { "aria-hidden": "true", "data-testid": "profile-gear", style: { fontSize: "0.75rem", color: "var(--graview-ink-faint)" }, children: "\u2699" })] }), _jsxs("section", { ...popover.pane, "aria-label": "Profile", "data-testid": "profile", "data-graview-offstage": "", hidden: !open, style: {
|
|
109
|
+
...POPOVER_STYLE,
|
|
147
110
|
width: 280,
|
|
148
111
|
maxWidth: "calc(100vw - 32px)",
|
|
149
112
|
maxHeight: "min(62cqh, 520px)",
|
|
@@ -186,7 +149,13 @@ keeping, compact = false, }) {
|
|
|
186
149
|
color: "var(--graview-accent)",
|
|
187
150
|
}, children: "Your record \u2197" })) : null, sharing ? (
|
|
188
151
|
/* How the others here see you — the name on the figure that stands where you are. */
|
|
189
|
-
_jsxs("span", { "data-testid": "profile-seen-as", style: { fontSize: "0.8125rem", color: "var(--graview-ink-muted)" }, children: ["Seen by others as ", sharing.name] })) : null] }),
|
|
152
|
+
_jsxs("span", { "data-testid": "profile-seen-as", style: { fontSize: "0.8125rem", color: "var(--graview-ink-muted)" }, children: ["Seen by others as ", sharing.name] })) : null] }), hostActions.length > 0 ? (_jsx("ul", { role: "list", "aria-label": "From the host", "data-testid": "host-actions", style: { ...ruled, margin: 0, paddingLeft: 0, listStyle: "none", display: "grid", gap: 2 }, children: hostActions.map((action) => (_jsx("li", { children: action.href !== undefined ? (_jsx("a", { href: action.href, "data-testid": "host-action", className: "graview-host-action", ...(action.target ? { target: action.target, rel: "noopener" } : {}), onClick: () => {
|
|
153
|
+
action.onSelect?.();
|
|
154
|
+
popover.setOpen(false);
|
|
155
|
+
}, style: hostRow, children: action.label })) : (_jsx("button", { type: "button", "data-testid": "host-action", className: "graview-host-action", onClick: () => {
|
|
156
|
+
popover.setOpen(false);
|
|
157
|
+
action.onSelect?.();
|
|
158
|
+
}, style: { ...hostRow, width: "100%", textAlign: "left", border: "none", background: "none", boxShadow: "none", font: "inherit", cursor: "pointer" }, children: action.label })) }, action.label))) })) : null, _jsxs("div", { className: "graview-profile-keeping", "data-testid": "profile-keeping", style: ruled, children: [_jsx("span", { style: eyebrow, children: "Keeping this app" }), keeping] }), seats.length > 1 ? (_jsxs("div", { style: { display: "grid", gap: 6, ...ruled }, children: [_jsx("span", { style: eyebrow, children: "Sit as somebody else" }), _jsx(Seats, {})] })) : null, hostAnswers ? null : (_jsx("div", { style: { display: "grid", gap: 6, ...ruled }, children: _jsx(LadderSetting, {}) })), settings.length > 0 ? (_jsx("div", { style: { display: "grid", gap: 10, ...ruled }, children: settings.map((setting) => (_jsxs("fieldset", { "data-testid": `setting-${setting.name}`, style: { border: 0, margin: 0, padding: 0, display: "grid", gap: 5 }, children: [_jsx("legend", { style: { ...eyebrow, padding: 0 }, children: setting.title }), setting.description ? (_jsx("span", { style: { fontSize: "0.8125rem", color: "var(--graview-ink-muted)" }, children: setting.description })) : null, _jsx("div", { style: { display: "flex", flexWrap: "wrap", gap: 4 }, children: setting.options.map((option) => {
|
|
190
159
|
const chosen = (settingValues[setting.name] ?? setting.initial) === option.value;
|
|
191
160
|
return (_jsx("button", { type: "button", "aria-pressed": chosen, "data-testid": `setting-${setting.name}-${option.value}`, onClick: () => chooseSetting(setting.name, option.value), style: {
|
|
192
161
|
/*
|
|
@@ -216,6 +185,18 @@ keeping, compact = false, }) {
|
|
|
216
185
|
background: scheme === candidate ? "var(--graview-panel)" : "transparent",
|
|
217
186
|
}, children: candidate === "light" ? "☀ Light" : "☾ Dark" }, candidate))) })] })) : null] })] }));
|
|
218
187
|
}
|
|
188
|
+
const NO_HOST_ACTIONS = [];
|
|
189
|
+
/** A row of the host's: a full fingertip, the ink of the pane, the accent when the keyboard is on it. */
|
|
190
|
+
const hostRow = {
|
|
191
|
+
display: "flex",
|
|
192
|
+
alignItems: "center",
|
|
193
|
+
minHeight: 28,
|
|
194
|
+
padding: "2px 8px",
|
|
195
|
+
borderRadius: 7,
|
|
196
|
+
fontSize: "0.875rem",
|
|
197
|
+
color: "var(--graview-ink)",
|
|
198
|
+
textDecoration: "none",
|
|
199
|
+
};
|
|
219
200
|
const eyebrow = {
|
|
220
201
|
fontSize: "0.75rem",
|
|
221
202
|
letterSpacing: "0.14em",
|
package/dist/profile.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"profile.js","sourceRoot":"","sources":["../src/profile.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,aAAa,EAAE,OAAO,EAAE,YAAY,EAAkB,MAAM,eAAe,CAAC;AACrF,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"profile.js","sourceRoot":"","sources":["../src/profile.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,aAAa,EAAE,OAAO,EAAE,YAAY,EAAkB,MAAM,eAAe,CAAC;AACrF,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAChF,OAAO,EAAE,aAA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AAqB;wCACnF,KAAK,EAAE,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,uBAAuB,CAAC,CAAC,CAAC,0BAA0B;wCAClF,UAAU,EAAE,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,sBAAsB,CAAC,CAAC,CAAC,aAAa;qCAC1E,YAEA,SAAS,KAAK,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,QAAQ,IAjBxC,SAAS,CAkBP,CACV,CAAC,GACE,IACF,CACL,CAAC,CAAC,CAAC,IAAI,IAEA,IACR,CACP,CAAC;AACJ,CAAC;AAcD,MAAM,eAAe,GAA0B,EAAE,CAAC;AAElD,yGAAyG;AACzG,MAAM,OAAO,GAAG;IACd,OAAO,EAAE,MAAM;IACf,UAAU,EAAE,QAAQ;IACpB,SAAS,EAAE,EAAE;IACb,OAAO,EAAE,SAAS;IAClB,YAAY,EAAE,CAAC;IACf,QAAQ,EAAE,UAAU;IACpB,KAAK,EAAE,oBAAoB;IAC3B,cAAc,EAAE,MAAM;CACvB,CAAC;AAEF,MAAM,OAAO,GAAG;IACd,QAAQ,EAAE,SAAS;IACnB,aAAa,EAAE,QAAQ;IACvB,aAAa,EAAE,WAAoB;IACnC,KAAK,EAAE,0BAA0B;CAClC,CAAC;AAEF,MAAM,KAAK,GAAG;IACZ,UAAU,EAAE,EAAE;IACd,SAAS,EAAE,+BAA+B;CAC3C,CAAC;AAEF,mEAAmE;AACnE,SAAS,OAAO,CAAC,IAAY;IAC3B,OAAO,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,IAAI,GAAG,CAAC,CAAC,WAAW,EAAE,CAAC;AAC/C,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"quick-relations.d.ts","sourceRoot":"","sources":["../src/quick-relations.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"quick-relations.d.ts","sourceRoot":"","sources":["../src/quick-relations.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAkB,KAAK,SAAS,EAAE,MAAM,eAAe,CAAC;AAsC/D;;;;;;;;;GASG;AACH,wBAAgB,OAAO,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,EAAE,IAAI,SAAa,GAAG,MAAM,EAAE,CAmB9E;AAED,wBAAgB,cAAc,CAAC,CAAC,SAAS,SAAS,EAAE,EAAE,MAAc,EAAE,GAAE;IAAE,QAAQ,CAAC,MAAM,CAAC,EAAE,OAAO,CAAA;CAAO,sCA4JzG"}
|
package/dist/quick-relations.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { labelOf } from "@graview/core";
|
|
2
|
+
import { labelOf, layer } from "@graview/core";
|
|
3
3
|
import { kindsOfAggregate } from "@graview/layout/view";
|
|
4
4
|
import { useGraph, useGraview, useSelection } from "@graview/react/provider";
|
|
5
5
|
import { useMemo } from "react";
|
|
@@ -136,7 +136,7 @@ export function QuickRelations({ inside = false } = {}) {
|
|
|
136
136
|
position: "absolute",
|
|
137
137
|
left: 16,
|
|
138
138
|
top: 14,
|
|
139
|
-
zIndex:
|
|
139
|
+
zIndex: layer("rail"),
|
|
140
140
|
display: "grid",
|
|
141
141
|
gap: 5,
|
|
142
142
|
maxWidth: "min(250px, 21cqw)",
|