@graview/primitives 0.1.68 → 0.1.70

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.
Files changed (78) hide show
  1. package/dist/app-bar.d.ts.map +1 -1
  2. package/dist/app-bar.js +0 -6
  3. package/dist/app-bar.js.map +1 -1
  4. package/dist/bar-activity.d.ts.map +1 -1
  5. package/dist/bar-activity.js +7 -5
  6. package/dist/bar-activity.js.map +1 -1
  7. package/dist/bar-suggested.d.ts +6 -0
  8. package/dist/bar-suggested.d.ts.map +1 -1
  9. package/dist/bar-suggested.js +2 -0
  10. package/dist/bar-suggested.js.map +1 -1
  11. package/dist/display-options-switch.d.ts +9 -0
  12. package/dist/display-options-switch.d.ts.map +1 -0
  13. package/dist/display-options-switch.js +296 -0
  14. package/dist/display-options-switch.js.map +1 -0
  15. package/dist/display-options.d.ts +120 -0
  16. package/dist/display-options.d.ts.map +1 -0
  17. package/dist/display-options.js +435 -0
  18. package/dist/display-options.js.map +1 -0
  19. package/dist/first-look-door.d.ts +1 -1
  20. package/dist/first-look-door.js +1 -1
  21. package/dist/first-look.js +2 -2
  22. package/dist/first-look.js.map +1 -1
  23. package/dist/inbox-pane.d.ts +10 -4
  24. package/dist/inbox-pane.d.ts.map +1 -1
  25. package/dist/inbox-pane.js +83 -6
  26. package/dist/inbox-pane.js.map +1 -1
  27. package/dist/inbox.d.ts +17 -2
  28. package/dist/inbox.d.ts.map +1 -1
  29. package/dist/inbox.js +76 -25
  30. package/dist/inbox.js.map +1 -1
  31. package/dist/index.d.ts +1 -1
  32. package/dist/index.d.ts.map +1 -1
  33. package/dist/index.js +1 -1
  34. package/dist/index.js.map +1 -1
  35. package/dist/page-parts.d.ts +13 -0
  36. package/dist/page-parts.d.ts.map +1 -1
  37. package/dist/page-parts.js +35 -0
  38. package/dist/page-parts.js.map +1 -1
  39. package/dist/pages.d.ts +1 -1
  40. package/dist/pages.d.ts.map +1 -1
  41. package/dist/pages.js +1 -1
  42. package/dist/pages.js.map +1 -1
  43. package/dist/problem-sentence.d.ts +10 -0
  44. package/dist/problem-sentence.d.ts.map +1 -0
  45. package/dist/problem-sentence.js +12 -0
  46. package/dist/problem-sentence.js.map +1 -0
  47. package/dist/scene-skips.d.ts.map +1 -1
  48. package/dist/scene-skips.js +3 -7
  49. package/dist/scene-skips.js.map +1 -1
  50. package/dist/seat-move.d.ts +13 -4
  51. package/dist/seat-move.d.ts.map +1 -1
  52. package/dist/seat-move.js +27 -8
  53. package/dist/seat-move.js.map +1 -1
  54. package/dist/section-door.d.ts +8 -0
  55. package/dist/section-door.d.ts.map +1 -1
  56. package/dist/section-door.js +31 -0
  57. package/dist/section-door.js.map +1 -1
  58. package/dist/section-menu.d.ts +16 -3
  59. package/dist/section-menu.d.ts.map +1 -1
  60. package/dist/section-menu.js +47 -2
  61. package/dist/section-menu.js.map +1 -1
  62. package/dist/shell.d.ts +3 -1
  63. package/dist/shell.d.ts.map +1 -1
  64. package/dist/shell.js +4 -3
  65. package/dist/shell.js.map +1 -1
  66. package/dist/suggested.d.ts +20 -2
  67. package/dist/suggested.d.ts.map +1 -1
  68. package/dist/suggested.js +72 -20
  69. package/dist/suggested.js.map +1 -1
  70. package/dist/workbench/activity.d.ts +5 -2
  71. package/dist/workbench/activity.d.ts.map +1 -1
  72. package/dist/workbench/activity.js +23 -10
  73. package/dist/workbench/activity.js.map +1 -1
  74. package/dist/workbench/standing.d.ts +9 -12
  75. package/dist/workbench/standing.d.ts.map +1 -1
  76. package/dist/workbench/standing.js +15 -59
  77. package/dist/workbench/standing.js.map +1 -1
  78. package/package.json +7 -7
@@ -0,0 +1,296 @@
1
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { isCurrent, isoToday } from "@graview/core";
3
+ import { ViewBoundary } from "@graview/react/drawing";
4
+ import { useGraph, useGraview } from "@graview/react/provider";
5
+ import { draftSight, mayChangeDeclaration } from "@graview/tools/draft";
6
+ import { inlineAiOn } from "@graview/tools/frame";
7
+ import { documentOfApp } from "@graview/tools/reshape";
8
+ import { memo, useEffect, useLayoutEffect, useMemo, useRef, useState, useSyncExternalStore } from "react";
9
+ import { createPortal } from "react-dom";
10
+ import { DraftBar } from "./better-bar.js";
11
+ import { declaredLensView } from "./declared-lenses.js";
12
+ import { choicesFrom, createOptionSwitch, displayOptionsFor, modelOption, namesOfRecords, offersFrom, optionOfOffer, readChoices } from "./display-options.js";
13
+ import { appKeyOf } from "./reader-lenses.js";
14
+ import "./frame.js"; // A door: tied to what the page drew first (TIED DOORS, packages/primitives/src/frame.ts).
15
+ /*
16
+ * OTHER WAYS TO SHOW THIS, DRAWN (Roadmap f-display-options-switch), fetched
17
+ * as the menu that offers it is prepared.
18
+ *
19
+ * DRAWN AHEAD. Every option is drawn at once, in real data, in a stage under
20
+ * the page's heading, each stacked on the others and out of sight: flipping
21
+ * lights one and puts out another, and nothing is drawn or fetched at the
22
+ * flip. What a drawing could not show of the records is dropped before
23
+ * anybody is offered it, so a draft is checked before it is shown.
24
+ *
25
+ * NOTHING IS WRITTEN UNTIL IT IS KEPT. An option is a picture to look at
26
+ * and no more (`inert`): a card on a board cannot be carried to another
27
+ * column in a draft of a board. The page as it stands is the first of the
28
+ * options, one arrow from any other, so before and after are side by side
29
+ * in the same place. Keep hands the host one change, with one Undo after.
30
+ */
31
+ /** What a switch asked for is at, kept apart from what draws it: a host that hands the page a changed app may draw it all again, and this with it. */
32
+ const SWITCHES = /* @__PURE__ */ new Map();
33
+ /** The page's own region inside the face: its <main>, never the app's bar and footer around it. */
34
+ const regionOf = (face) => face?.querySelector("main") ?? face ?? null;
35
+ const pageNow = (part) => regionOf(part.main?.isConnected ? part.main : (document.querySelector("[data-graview-page-main], main") ?? document.querySelector("[data-graview-face]")));
36
+ /** What stays over the option: the page's heading. A page with none has the stage first. */
37
+ function headOf(region) {
38
+ const title = region.querySelector("[data-graview-page-title]");
39
+ const head = title?.closest("header") ?? title?.parentElement ?? null;
40
+ return head && head !== region && region.contains(head) ? head : null;
41
+ }
42
+ const UNDER = "data-graview-under-option";
43
+ /* A place's page stands in the wider column: the option is shown as wide as it would be kept. */
44
+ const WIDE = "data-graview-option-wide";
45
+ const NOW = "__now__";
46
+ /** The picture of one option, live on the app's data, drawn whether it is shown or not; it tells when it first shows any of the records. */
47
+ const OptionPane = memo(function OptionPane({ option, shown, names, nodes, drew, failed }) {
48
+ const at = useRef(null);
49
+ const inner = useRef(null);
50
+ useLayoutEffect(() => {
51
+ if (inner.current)
52
+ inner.current.inert = true;
53
+ }, []);
54
+ /* Judged as it draws: the option that never shows one of the records is taken away. A lens may draw in a moment or two, not longer. */
55
+ useLayoutEffect(() => {
56
+ const shows = () => {
57
+ const text = (at.current?.textContent ?? "").toLowerCase();
58
+ return names.some((name) => text.includes(name.toLowerCase()));
59
+ };
60
+ if (shows())
61
+ return drew(option.key);
62
+ const times = [100, 400, 1500].map((ms, index, all) => setTimeout(() => {
63
+ if (shows())
64
+ drew(option.key);
65
+ else if (index === all.length - 1)
66
+ failed(option.key);
67
+ }, ms));
68
+ return () => times.forEach(clearTimeout);
69
+ // eslint-disable-next-line react-hooks/exhaustive-deps
70
+ }, [option.key]);
71
+ const View = useMemo(() => declaredLensView(option.drawn), [option.drawn]);
72
+ const flows = option.drawn.lens === "blocks";
73
+ return (_jsx("div", { ref: at, "data-testid": "display-option-pane", "data-display-option": option.key, "data-shown": shown ? "" : undefined, style: { ...(flows ? PANE_FLOWS : PANE), ...(shown ? {} : PANE_OFF) }, children: _jsx("div", { ref: inner, style: flows ? undefined : INNER, children: _jsx(ViewBoundary, { kind: option.drawn.kinds[0] ?? "", view: option.title, children: _jsx(View, { nodes: nodes, label: option.title, fidelity: "full", cardinality: "many", mode: "fullscreen", selected: false }) }) }) }));
74
+ });
75
+ /** Every option, drawn ahead, in the stage under the heading. */
76
+ function Stage({ options, shown, names, drew, failed, kind }) {
77
+ const { store } = useGraview();
78
+ // Live: drawn again as the graph changes, as what is kept would be.
79
+ useGraph();
80
+ const definition = store.schema.tryDefinition(kind);
81
+ const nodes = store.graph.nodesOfKind(kind).filter((node) => isCurrent(definition, node));
82
+ return (_jsxs(_Fragment, { children: [_jsx("style", { children: `[${UNDER}]{display:none !important}[${WIDE}]{max-width:1160px !important}` }), options.map((option) => (_jsx(OptionPane, { option: option, shown: option.key === shown, names: names, nodes: nodes, drew: drew, failed: failed }, option.key)))] }));
83
+ }
84
+ export function DisplaySwitch({ ask, close }) {
85
+ const here = useGraview();
86
+ const { ai, app, brand, composeChange, displayOptions: host, onProposeChange, principal, store } = here;
87
+ const part = ask.part;
88
+ const kind = part.kind;
89
+ const appKey = appKeyOf(brand, store.schema);
90
+ const nodesOf = () => store.graph.nodesOfKind(kind).filter((node) => isCurrent(store.schema.tryDefinition(kind), node));
91
+ const [names] = useState(() => namesOfRecords(store.schema, kind, nodesOf()));
92
+ const [held] = useState(() => {
93
+ const had = SWITCHES.get(ask.at);
94
+ if (had)
95
+ return had;
96
+ const declared = { ...app, schema: store.schema };
97
+ const input = {
98
+ app: declared,
99
+ document: documentOfApp(app ?? {}),
100
+ compose: composeChange,
101
+ kind,
102
+ name: part.name,
103
+ nodes: nodesOf(),
104
+ today: store.today() ?? isoToday(),
105
+ sight: draftSight(declared, principal),
106
+ linked: (id, edge) => store.graph.outEdges(id).some((one) => one.kind === edge),
107
+ ...(part.slot === "place" ? { place: part.name } : {}),
108
+ };
109
+ const choices = [...readChoices(appKey), ...choicesFrom(host)];
110
+ const asked = { kind, name: part.name, ...(part.slot === "place" ? { place: part.name } : {}) };
111
+ const offers = offersFrom(host, asked);
112
+ const flips = createOptionSwitch({
113
+ options: displayOptionsFor({ ...input, choices, offers: offers.now }),
114
+ name: part.name,
115
+ kind,
116
+ appKey,
117
+ propose: (proposal) => onProposeChange(proposal),
118
+ ...(host?.onChoice ? { onKept: host.onChoice } : {}),
119
+ });
120
+ /* What is slower than the first draw joins when it answers, and what is shown does not move: a host's promise, a model the host lent. */
121
+ void offers.late?.then((late) => flips.join(late.flatMap((offer) => optionOfOffer(input, offer) ?? [])));
122
+ if (inlineAiOn(ai)) {
123
+ const thinking = ai.thinking;
124
+ const complete = thinking ? ((asked) => thinking.think({ prompt: asked.prompt, system: asked.system ?? "", state: {}, catalog: [] })) : ai.complete;
125
+ if (complete)
126
+ void modelOption(input, complete).then((one) => (one ? flips.join([one]) : undefined));
127
+ }
128
+ const made = { flips, opened: false };
129
+ SWITCHES.set(ask.at, made);
130
+ return made;
131
+ });
132
+ const { flips } = held;
133
+ const state = useSyncExternalStore(flips.subscribe, flips.get, flips.get);
134
+ const { options, shown, phase, said, note } = state;
135
+ const choosing = phase === "choosing" || phase === "keeping";
136
+ /* What has shown the records: only these are offered, and the first of them is what opens. */
137
+ const [passed, setPassed] = useState(() => new Set());
138
+ const drew = useMemo(() => (key) => setPassed((was) => (was.has(key) ? was : new Set([...was, key]))), []);
139
+ const failed = useMemo(() => (key) => flips.drop(key), [flips]);
140
+ const offered = options.filter((one) => passed.has(one.key));
141
+ useEffect(() => {
142
+ if (held.opened || phase !== "choosing" || offered.length === 0)
143
+ return;
144
+ held.opened = true;
145
+ flips.flip(offered[0].key);
146
+ }, [held, flips, phase, offered]);
147
+ /* The stage: a child of the page's region under its heading, while there is a choice to make. */
148
+ const [stage, setStage] = useState(null);
149
+ useLayoutEffect(() => {
150
+ if (!choosing)
151
+ return;
152
+ const region = pageNow(part);
153
+ if (!region)
154
+ return;
155
+ const own = document.createElement("div");
156
+ own.setAttribute("data-testid", "display-options-stage");
157
+ Object.assign(own.style, STAGE);
158
+ const head = headOf(region);
159
+ if (head?.parentElement)
160
+ head.parentElement.insertBefore(own, head.nextSibling);
161
+ else
162
+ region.insertBefore(own, region.firstChild);
163
+ setStage(own);
164
+ return () => {
165
+ own.remove();
166
+ setStage(null);
167
+ };
168
+ // eslint-disable-next-line react-hooks/exhaustive-deps
169
+ }, [choosing]);
170
+ /* The page under the heading gives way to the option shown, and comes straight back. React draws on underneath; its elements are only marked. */
171
+ useLayoutEffect(() => {
172
+ const region = stage ? pageNow(part) : null;
173
+ if (!region)
174
+ return;
175
+ const asItIs = shown === null;
176
+ stage.style.position = asItIs ? "absolute" : "relative";
177
+ stage.style.height = asItIs ? "0" : "auto";
178
+ stage.style.visibility = asItIs ? "hidden" : "visible";
179
+ stage.setAttribute("data-display-shown", shown ?? NOW);
180
+ if (!asItIs) {
181
+ region.setAttribute(WIDE, "");
182
+ for (let at = stage; at !== region && at.parentElement; at = at.parentElement) {
183
+ for (const child of at.parentElement.children)
184
+ if (child !== at && child !== headOf(region) && child.localName !== "style")
185
+ child.setAttribute(UNDER, "");
186
+ }
187
+ }
188
+ return () => {
189
+ region.removeAttribute(WIDE);
190
+ for (const child of region.querySelectorAll(`[${UNDER}]`))
191
+ child.removeAttribute(UNDER);
192
+ };
193
+ });
194
+ const put = () => {
195
+ SWITCHES.delete(ask.at);
196
+ close();
197
+ };
198
+ /*
199
+ * PUT AWAY BY THE PERSON, THE KEYBOARD BACK WHERE IT WAS. What it came from
200
+ * is out of sight while an option is shown, and a thing out of sight takes
201
+ * no focus: the page is given back first, here, not when React gets to it.
202
+ */
203
+ const putAway = () => {
204
+ const region = pageNow(part);
205
+ for (const child of region?.querySelectorAll(`[${UNDER}]`) ?? [])
206
+ child.removeAttribute(UNDER);
207
+ if (stage)
208
+ stage.style.display = "none";
209
+ const back = ask.returnTo?.isConnected ? ask.returnTo : document.querySelector("[data-graview-page-title], main h1");
210
+ if (back && !back.hasAttribute("tabindex") && !back.matches("a[href], button, input, select, textarea"))
211
+ back.setAttribute("tabindex", "-1");
212
+ back?.focus?.({ preventScroll: true });
213
+ put();
214
+ };
215
+ /*
216
+ * GONE FROM THE PAGE: the switch goes with it, nothing kept. Under memory
217
+ * routing the address never moves, so the page says: its stage gone, or
218
+ * another title. Never while a Keep is on its way: what it answers is what
219
+ * Undo takes back.
220
+ */
221
+ useEffect(() => {
222
+ if (!choosing || !stage)
223
+ return;
224
+ const was = location.pathname;
225
+ const titleOf = () => pageNow(part)?.querySelector("[data-graview-page-title]")?.textContent ?? null;
226
+ const title = titleOf();
227
+ const watching = setInterval(() => {
228
+ if (flips.get().phase === "keeping")
229
+ return;
230
+ if (location.pathname !== was || !stage.isConnected || titleOf() !== title)
231
+ put();
232
+ }, 250);
233
+ return () => clearInterval(watching);
234
+ // eslint-disable-next-line react-hooks/exhaustive-deps
235
+ }, [choosing, stage]);
236
+ /* Escape puts it away, heard first and only where nothing over it has the key: one Escape, one thing. Never while a Keep is on its way. */
237
+ const latestPutAway = useRef(putAway);
238
+ latestPutAway.current = putAway;
239
+ useEffect(() => {
240
+ const key = (event) => {
241
+ if (event.key !== "Escape" || flips.get().phase === "keeping")
242
+ return;
243
+ if (document.querySelector("[data-graview-popover]:not([data-better-bar]):not([hidden]), [data-testid='context-menu']"))
244
+ return;
245
+ event.preventDefault();
246
+ latestPutAway.current();
247
+ };
248
+ document.addEventListener("keydown", key, true);
249
+ return () => document.removeEventListener("keydown", key, true);
250
+ }, [flips]);
251
+ /* Asked on every draw, as the page's own card is: a person who may no longer change the app is offered no Keep, and the switch goes. */
252
+ const may = mayChangeDeclaration(store, principal);
253
+ useEffect(() => {
254
+ if (!may && phase === "choosing")
255
+ putAway();
256
+ // eslint-disable-next-line react-hooks/exhaustive-deps
257
+ }, [may, phase]);
258
+ /* The keyboard on the option shown, as the switch opens and whenever it is the choosing it comes back to. */
259
+ const group = useRef(null);
260
+ const placed = useRef(false);
261
+ useEffect(() => {
262
+ if (phase !== "choosing" || shown === null || placed.current)
263
+ return;
264
+ placed.current = true;
265
+ group.current?.querySelector('[role="radio"][aria-checked="true"]')?.focus({ preventScroll: true });
266
+ }, [phase, offered.length, shown]);
267
+ const all = [{ key: NOW, label: "As it is now" }, ...offered];
268
+ const onKey = (event) => {
269
+ const step = event.key === "ArrowRight" || event.key === "ArrowDown" ? 1 : event.key === "ArrowLeft" || event.key === "ArrowUp" ? -1 : 0;
270
+ const to = step !== 0 ? all[(all.findIndex((one) => one.key === (shown ?? NOW)) + step + all.length) % all.length] : event.key === "Home" ? all[0] : event.key === "End" ? all.at(-1) : undefined;
271
+ if (!to)
272
+ return;
273
+ event.preventDefault();
274
+ flips.flip(to.key === NOW ? null : to.key);
275
+ group.current?.querySelector(`[data-option="${CSS.escape(to.key)}"]`)?.focus({ preventScroll: true });
276
+ };
277
+ const current = options.find((one) => one.key === shown);
278
+ const line = choosing ? (said ?? (current ? current.label : `${part.name} as it is now`)) : (said ?? "");
279
+ const nothing = phase === "choosing" && options.length === 0;
280
+ return (_jsxs(_Fragment, { children: [stage && choosing ? createPortal(_jsx(Stage, { options: options, shown: shown, names: names, drew: drew, failed: failed, kind: kind }), stage) : null, _jsx(DraftBar, { phase: `options-${phase}`, name: part.name, said: nothing ? `There are no other ways to show ${part.name} yet.` : line, ...(choosing && !nothing ? { scope: "Nothing changes until you keep one. Everyone in this app sees the one you keep." } : {}), ...(note ? { note } : {}), ...(phase === "choosing" && current && may ? { keep: () => void flips.keep() } : {}), ...(phase === "kept" && state.canUndo && may ? { undo: () => void flips.undo() } : {}), ...(phase !== "keeping" ? { close: putAway } : {}), children: phase === "choosing" && !nothing ? (_jsx("div", { ref: group, role: "radiogroup", "aria-label": `Ways to show ${part.name}`, "data-testid": "display-options", onKeyDown: onKey, style: CHOICES, children: all.map((one) => {
281
+ const on = one.key === (shown ?? NOW);
282
+ return (_jsx("button", { type: "button", role: "radio", "aria-checked": on, tabIndex: on ? 0 : -1, "data-testid": "display-option", "data-option": one.key, onClick: () => flips.flip(one.key === NOW ? null : one.key), style: on ? CHOICE_ON : CHOICE, children: one.label }, one.key));
283
+ }) })) : null })] }));
284
+ }
285
+ const STAGE = { position: "relative", minWidth: "0", maxWidth: "100%", width: "100%", overflow: "clip" };
286
+ /* What a lens fills: as its place's page gives it, a frame most of the window tall that scrolls inside itself. */
287
+ const PANE = { boxSizing: "border-box", height: "min(72vh, 760px)", display: "grid", gridTemplateRows: "minmax(0, 1fr)", gridTemplateColumns: "minmax(0, 1fr)", overflow: "auto", maxWidth: "100%", borderRadius: 12, border: "1px solid var(--graview-edge)", background: "var(--graview-panel)" };
288
+ const PANE_FLOWS = { display: "grid", gridTemplateColumns: "minmax(0, 1fr)", maxWidth: "100%" };
289
+ /* Out of sight, laid out as if shown, so showing it moves nothing. */
290
+ const PANE_OFF = { position: "absolute", top: 0, left: 0, right: 0, visibility: "hidden", pointerEvents: "none" };
291
+ const INNER = { display: "grid", gridTemplateRows: "minmax(0, 1fr)", gridTemplateColumns: "minmax(0, 1fr)", minWidth: 0, minHeight: 0 };
292
+ const CHOICES = { display: "flex", flexWrap: "wrap", gap: 6, marginTop: 4 };
293
+ const CHOICE = { minHeight: 34, padding: "0 12px", font: "inherit", borderRadius: 8, cursor: "pointer", color: "var(--graview-ink)", background: "transparent", border: "1px solid var(--graview-edge)" };
294
+ /* Which one is shown, said by its edge and its weight: the one filled button on the screen is Keep. */
295
+ const CHOICE_ON = { ...CHOICE, fontWeight: 600, border: "1px solid var(--graview-accent)", boxShadow: "inset 0 0 0 1px var(--graview-accent)" };
296
+ //# sourceMappingURL=display-options-switch.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"display-options-switch.js","sourceRoot":"","sources":["../src/display-options-switch.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAuD,MAAM,eAAe,CAAC;AACzG,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACtD,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAC/D,OAAO,EAAE,UAAU,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AACxE,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,eAAe,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,oBAAoB,EAA0C,MAAM,OAAO,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gBAAgB,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,QAAQ,EAAE,CAAC,EAAE,SAAS,EAAE,CAAC,EAAE,CAAC;AACvJ,MAAM,OAAO,GAAkB,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC,EAAE,SAAS,EAAE,CAAC,EAAE,CAAC;AAC3F,MAAM,MAAM,GAAkB,EAAE,SAAS,EAAE,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,SAAS,EAAE,YAAY,EAAE,CAAC,EAAE,MAAM,EAAE,SAAS,EAAE,KAAK,EAAE,oBAAoB,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,EAAE,+BAA+B,EAAE,CAAC;AACzN,uGAAuG;AACvG,MAAM,SAAS,GAAkB,EAAE,GAAG,MAAM,EAAE,UAAU,EAAE,GAAG,EAAE,MAAM,EAAE,iCAAiC,EAAE,SAAS,EAAE,uCAAuC,EAAE,CAAC"}
@@ -0,0 +1,120 @@
1
+ import { type AnySchema, type DisplayChoice, type DisplayChoiceHeard, type DisplayOptionOffer, type DisplayOptionsAsked, type DisplayOptionsHost, type DrawnLens, type GraviewApp } from "@graview/core";
2
+ import { type DraftSight } from "@graview/tools/draft";
3
+ import type { Completion } from "@graview/tools";
4
+ import type { ComposeChangeHost, ProposeChangeAnswer, ReshapeProposal } from "@graview/tools/reshape";
5
+ /** A way to show the data, worked out and judged. */
6
+ export interface DisplayOption {
7
+ /** Which one: the same on every offer of it. */
8
+ readonly key: string;
9
+ /** What the switch calls it: "Board by status". */
10
+ readonly label: string;
11
+ /** How a sentence says it: "a board by status". */
12
+ readonly phrase: string;
13
+ /** What sort of picture it is: what a choice ranks the next offer by. */
14
+ readonly shape: string;
15
+ readonly from: DisplayChoice["from"];
16
+ readonly hostId?: string;
17
+ /** Added to what was chosen before, when the offer is ranked. */
18
+ readonly weight?: number;
19
+ /** Its title, as what it draws is called. */
20
+ readonly title: string;
21
+ /** What it draws, whoever offered it: no two options, nor the page as it stands, draw the same. */
22
+ readonly drawing: string;
23
+ readonly drawn: DrawnLens;
24
+ /** The change keeping it makes, as one. */
25
+ readonly edits: readonly unknown[];
26
+ }
27
+ type Node = {
28
+ readonly id: string;
29
+ readonly kind: string;
30
+ } & Readonly<Record<string, unknown>>;
31
+ export interface OptionsInput {
32
+ readonly app: Pick<GraviewApp<AnySchema>, "schema"> & Partial<GraviewApp<AnySchema>>;
33
+ /** The document the app was made from: what its host's composer checks a change against. */
34
+ readonly document: object | undefined;
35
+ readonly compose: ComposeChangeHost | undefined;
36
+ readonly kind: string;
37
+ /** The place's title, on a place. */
38
+ readonly place?: string;
39
+ /** What the page is called. */
40
+ readonly name: string;
41
+ /** The records as this seat sees them. */
42
+ readonly nodes: readonly Node[];
43
+ readonly today: string;
44
+ readonly sight?: DraftSight;
45
+ /** How many of this kind's records link to a kind across a relation: what a grid is drawn from. */
46
+ readonly linked?: (id: string, edge: string) => boolean;
47
+ readonly offers?: readonly DisplayOptionOffer[];
48
+ readonly choices?: readonly DisplayChoice[];
49
+ }
50
+ /** The most an offer shows at once. */
51
+ export declare const MOST_OPTIONS = 4;
52
+ /** THE WAYS TO SHOW THIS PAGE, judged and ranked, the page as it stands not among them, and at most `MOST_OPTIONS`: at least one of a host's where it handed any in. */
53
+ export declare function displayOptionsFor(input: OptionsInput): readonly DisplayOption[];
54
+ /** One option a host handed in, judged and checked, or nothing: what a host says never takes the page down. */
55
+ export declare function optionOfOffer(input: OptionsInput, offer: unknown): DisplayOption | undefined;
56
+ /** What a host hands in, now or later; what throws or is no list is nothing said. */
57
+ export declare function offersFrom(host: DisplayOptionsHost | undefined, asked: DisplayOptionsAsked): {
58
+ readonly now: readonly unknown[];
59
+ readonly late?: Promise<readonly unknown[]>;
60
+ };
61
+ /** What a host remembers being chosen, the choices that read as choices. */
62
+ export declare function choicesFrom(host: DisplayOptionsHost | undefined): readonly DisplayChoice[];
63
+ /**
64
+ * ONE MORE, WHERE A HOST LENT A MODEL: a lens it writes for this kind, judged
65
+ * as any other. The options are there without it; it joins when it answers,
66
+ * and an answer that does not draw is none at all.
67
+ */
68
+ export declare function modelOption(input: OptionsInput, complete: Completion): Promise<DisplayOption | undefined>;
69
+ /**
70
+ * THE OFFER, RANKED: a kind of picture kept for this kind counts most, kept
71
+ * for another kind counts too, then what a host weighs it at; otherwise the
72
+ * order the fields made them in.
73
+ */
74
+ export declare function rankOptions(options: readonly DisplayOption[], choices: readonly DisplayChoice[], kind: string): readonly DisplayOption[];
75
+ /** What this browser remembers being chosen in this app. */
76
+ export declare function readChoices(app: string): readonly DisplayChoice[];
77
+ export declare function keepChoice(app: string, choice: DisplayChoice): void;
78
+ /** A choice taken back: it ranks nothing any more. */
79
+ export declare function forgetChoice(app: string, key: string, at: string): void;
80
+ export interface OptionSwitchState {
81
+ readonly options: readonly DisplayOption[];
82
+ /** The option drawn on the page, by its key; null is the page as it stands. */
83
+ readonly shown: string | null;
84
+ readonly phase: "choosing" | "keeping" | "kept" | "undone";
85
+ /** What became of the last thing asked, in a sentence. */
86
+ readonly said?: string;
87
+ /** What the host said of the change it kept. */
88
+ readonly note?: string;
89
+ readonly canUndo: boolean;
90
+ }
91
+ export interface OptionSwitch {
92
+ get(): OptionSwitchState;
93
+ subscribe(listener: () => void): () => void;
94
+ /** Shows an option on the page, or (null) the page as it stands: nothing is written. */
95
+ flip(key: string | null): void;
96
+ /** More options, joining the offer; what is shown does not move. */
97
+ join(options: readonly DisplayOption[]): void;
98
+ /** An option that did not draw: never offered after all. */
99
+ drop(key: string): void;
100
+ keep(): Promise<void>;
101
+ undo(): Promise<void>;
102
+ }
103
+ export interface OptionSwitchOptions {
104
+ readonly options: readonly DisplayOption[];
105
+ readonly name: string;
106
+ /** Applies the change, as one, through the host's door to a change to the app. */
107
+ readonly propose: (proposal: ReshapeProposal) => ProposeChangeAnswer | Promise<ProposeChangeAnswer>;
108
+ readonly kind?: string;
109
+ /** The app's key, under which this browser remembers. */
110
+ readonly appKey?: string;
111
+ readonly onKept?: (heard: DisplayChoiceHeard) => void;
112
+ }
113
+ /** What a host is handed: the change to the app, said in plain words. */
114
+ export declare function proposalOfOption(option: DisplayOption, name: string): ReshapeProposal;
115
+ /** The switch's state, apart from what draws it, so what is kept outlives a page drawn again. */
116
+ export declare function createOptionSwitch(given: OptionSwitchOptions): OptionSwitch;
117
+ /** The records' names, for telling whether a drawing shows any of them. */
118
+ export declare function namesOfRecords(schema: AnySchema, kind: string, nodes: readonly Node[]): readonly string[];
119
+ export {};
120
+ //# sourceMappingURL=display-options.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"display-options.d.ts","sourceRoot":"","sources":["../src/display-options.ts"],"names":[],"mappings":"AAAA,OAAO,EAA+B,KAAK,SAAS,EAAE,KAAK,aAAa,EAAE,KAAK,kBAAkB,EAAE,KAAK,kBAAkB,EAAE,KAAK,mBAAmB,EAAE,KAAK,kBAAkB,EAAE,KAAK,SAAS,EAAE,KAAK,UAAU,EAAE,MAAM,eAAe,CAAC;AAItO,OAAO,EAAqG,KAAK,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAC1J,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,KAAK,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAyBtG,qDAAqD;AACrD,MAAM,WAAW,aAAa;IAC5B,gDAAgD;IAChD,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,mDAAmD;IACnD,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,mDAAmD;IACnD,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,yEAAyE;IACzE,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,IAAI,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;IACrC,QAAQ,CAAC,MAAM,CAAC,EAAE,MAA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