@graview/react 0.1.29 → 0.1.30
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/connectors.d.ts.map +1 -1
- package/dist/connectors.js +9 -2
- package/dist/connectors.js.map +1 -1
- package/dist/context.d.ts +55 -2
- package/dist/context.d.ts.map +1 -1
- package/dist/context.js +36 -3
- package/dist/context.js.map +1 -1
- package/dist/drawing.d.ts +2 -0
- package/dist/drawing.d.ts.map +1 -1
- package/dist/drawing.js +2 -0
- package/dist/drawing.js.map +1 -1
- package/dist/edge-signs.d.ts +11 -1
- package/dist/edge-signs.d.ts.map +1 -1
- package/dist/edge-signs.js +49 -8
- package/dist/edge-signs.js.map +1 -1
- package/dist/go.d.ts +28 -10
- package/dist/go.d.ts.map +1 -1
- package/dist/go.js +14 -5
- package/dist/go.js.map +1 -1
- package/dist/index.d.ts +6 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -1
- package/dist/index.js.map +1 -1
- package/dist/linked-reads.d.ts +3 -0
- package/dist/linked-reads.d.ts.map +1 -0
- package/dist/linked-reads.js +50 -0
- package/dist/linked-reads.js.map +1 -0
- package/dist/menu-sections.d.ts +67 -0
- package/dist/menu-sections.d.ts.map +1 -0
- package/dist/menu-sections.js +35 -0
- package/dist/menu-sections.js.map +1 -0
- package/dist/past.d.ts +58 -0
- package/dist/past.d.ts.map +1 -0
- package/dist/past.js +70 -0
- package/dist/past.js.map +1 -0
- package/dist/popover.d.ts +9 -1
- package/dist/popover.d.ts.map +1 -1
- package/dist/popover.js +3 -1
- package/dist/popover.js.map +1 -1
- package/dist/provider.d.ts +5 -2
- package/dist/provider.d.ts.map +1 -1
- package/dist/provider.js +3 -1
- package/dist/provider.js.map +1 -1
- package/dist/routes.d.ts +6 -0
- package/dist/routes.d.ts.map +1 -1
- package/dist/routes.js +8 -0
- package/dist/routes.js.map +1 -1
- package/dist/scene-lines.d.ts.map +1 -1
- package/dist/scene-lines.js +91 -2
- package/dist/scene-lines.js.map +1 -1
- package/dist/scene-options.d.ts +3 -1
- package/dist/scene-options.d.ts.map +1 -1
- package/dist/scene-options.js +5 -2
- package/dist/scene-options.js.map +1 -1
- package/dist/scene-root.d.ts +6 -0
- package/dist/scene-root.d.ts.map +1 -1
- package/dist/scene-root.js +31 -8
- package/dist/scene-root.js.map +1 -1
- package/dist/tie-labels.d.ts +83 -0
- package/dist/tie-labels.d.ts.map +1 -0
- package/dist/tie-labels.js +98 -0
- package/dist/tie-labels.js.map +1 -0
- package/dist/view-host.d.ts.map +1 -1
- package/dist/view-host.js +1 -1
- package/dist/view-host.js.map +1 -1
- package/package.json +5 -5
package/dist/drawing.js
CHANGED
|
@@ -19,4 +19,6 @@ export { NOTHING_FOUND, useFlagged, useImplicated, useReached } from "./emphasis
|
|
|
19
19
|
export { kitConnector, useKit } from "./kit.js";
|
|
20
20
|
export { anchorOf, AUDIENCE_ROW, placeOthers } from "./placement.js";
|
|
21
21
|
export { ViewBoundary } from "./view-boundary.js";
|
|
22
|
+
// A face's own sections of the context menu, beside the host's: drawn only once a menu is.
|
|
23
|
+
export { MenuSections, useMenuSections } from "./menu-sections.js";
|
|
22
24
|
//# sourceMappingURL=drawing.js.map
|
package/dist/drawing.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"drawing.js","sourceRoot":"","sources":["../src/drawing.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAE1E,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AACrF,OAAO,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAChD,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAErE,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC"}
|
|
1
|
+
{"version":3,"file":"drawing.js","sourceRoot":"","sources":["../src/drawing.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAE1E,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AACrF,OAAO,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAChD,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAErE,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,2FAA2F;AAC3F,OAAO,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC"}
|
package/dist/edge-signs.d.ts
CHANGED
|
@@ -1,9 +1,19 @@
|
|
|
1
1
|
import { type AnySchema } from "@graview/core";
|
|
2
2
|
import { type Layout } from "@graview/layout";
|
|
3
3
|
import type { ReactElement } from "react";
|
|
4
|
-
export declare function EdgeSigns({ result, schema, onGo, }: {
|
|
4
|
+
export declare function EdgeSigns({ result, schema, chrome, onGo, }: {
|
|
5
5
|
readonly result: Pick<Layout, "nodes" | "width" | "height" | "city" | "visible">;
|
|
6
6
|
readonly schema: AnySchema;
|
|
7
|
+
/**
|
|
8
|
+
* The controls standing on the ground, in canvas pixels (the layout's
|
|
9
|
+
* `chrome`): the altitude control and the key in the top right corner.
|
|
10
|
+
*/
|
|
11
|
+
readonly chrome?: readonly {
|
|
12
|
+
readonly x: number;
|
|
13
|
+
readonly y: number;
|
|
14
|
+
readonly width: number;
|
|
15
|
+
readonly height: number;
|
|
16
|
+
}[];
|
|
7
17
|
/** Pan the ground by this much. */
|
|
8
18
|
readonly onGo: (by: {
|
|
9
19
|
readonly x: number;
|
package/dist/edge-signs.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"edge-signs.d.ts","sourceRoot":"","sources":["../src/edge-signs.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA6B,KAAK,SAAS,EAAE,MAAM,eAAe,CAAC;AAC1E,OAAO,EAAwB,KAAK,MAAM,EAAoB,MAAM,iBAAiB,CAAC;AACtF,OAAO,KAAK,EAAiB,YAAY,EAAE,MAAM,OAAO,CAAC;AAqBzD,wBAAgB,SAAS,CAAC,EACxB,MAAM,EACN,MAAM,EACN,IAAI,GACL,EAAE;IACD,QAAQ,CAAC,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,OAAO,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,GAAG,SAAS,CAAC,CAAC;IACjF,QAAQ,CAAC,MAAM,EAAE,SAAS,CAAC;IAC3B,mCAAmC;IACnC,QAAQ,CAAC,IAAI,EAAE,CAAC,EAAE,EAAE;QAAE,QAAQ,CAAC,CAAC,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,CAAC,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAAC;CACzE,GAAG,YAAY,GAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"edge-signs.d.ts","sourceRoot":"","sources":["../src/edge-signs.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA6B,KAAK,SAAS,EAAE,MAAM,eAAe,CAAC;AAC1E,OAAO,EAAwB,KAAK,MAAM,EAAoB,MAAM,iBAAiB,CAAC;AACtF,OAAO,KAAK,EAAiB,YAAY,EAAE,MAAM,OAAO,CAAC;AAqBzD,wBAAgB,SAAS,CAAC,EACxB,MAAM,EACN,MAAM,EACN,MAAW,EACX,IAAI,GACL,EAAE;IACD,QAAQ,CAAC,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,OAAO,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,GAAG,SAAS,CAAC,CAAC;IACjF,QAAQ,CAAC,MAAM,EAAE,SAAS,CAAC;IAC3B;;;OAGG;IACH,QAAQ,CAAC,MAAM,CAAC,EAAE,SAAS;QAAE,QAAQ,CAAC,CAAC,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,CAAC,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;IACzH,mCAAmC;IACnC,QAAQ,CAAC,IAAI,EAAE,CAAC,EAAE,EAAE;QAAE,QAAQ,CAAC,CAAC,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,CAAC,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAAC;CACzE,GAAG,YAAY,GAAG,IAAI,CA0FtB"}
|
package/dist/edge-signs.js
CHANGED
|
@@ -19,7 +19,7 @@ const ARROW = { left: "←", right: "→", top: "↑", bottom: "↓" };
|
|
|
19
19
|
const SPACING = 36;
|
|
20
20
|
/** Room kept clear at the canvas's ends: the zoom in one corner, the way in at the other. */
|
|
21
21
|
const MARGIN = 56;
|
|
22
|
-
export function EdgeSigns({ result, schema, onGo, }) {
|
|
22
|
+
export function EdgeSigns({ result, schema, chrome = [], onGo, }) {
|
|
23
23
|
const past = districtsPastTheEdge(result);
|
|
24
24
|
if (past.length === 0)
|
|
25
25
|
return null;
|
|
@@ -34,24 +34,55 @@ export function EdgeSigns({ result, schema, onGo, }) {
|
|
|
34
34
|
const card = result.nodes.find((node) => node.id === hung.id);
|
|
35
35
|
return card ? [{ left: card.x + hung.x, top: card.y + hung.y, right: card.x + hung.x + hung.width, bottom: card.y + hung.y + hung.height }] : [];
|
|
36
36
|
});
|
|
37
|
+
/*
|
|
38
|
+
* AND CLEAR OF THE CORNER. On a phone the city runs past the right edge
|
|
39
|
+
* near the top, and the sign for the district there stood under "Close
|
|
40
|
+
* the map", its name read through the control. The corner the altitude
|
|
41
|
+
* control and the key stand in is ground a sign steps past too.
|
|
42
|
+
*/
|
|
43
|
+
const taken = [...showings, ...chrome.map((box) => ({ left: box.x, top: box.y, right: box.x + box.width, bottom: box.y + box.height }))];
|
|
37
44
|
const signs = [];
|
|
38
45
|
for (const side of ["left", "right", "top", "bottom"]) {
|
|
39
46
|
// The reader's window: a panel over the scene is not part of it (`Layout.visible`).
|
|
40
47
|
const seen = result.visible ?? result;
|
|
41
48
|
const span = side === "left" || side === "right" ? seen.height : seen.width;
|
|
42
|
-
|
|
49
|
+
const across = side === "left" || side === "right";
|
|
50
|
+
/*
|
|
51
|
+
* ONE SIGN NEVER STANDS ON ANOTHER (the tenth walk's carried pass: the
|
|
52
|
+
* watch's `control-covered`). Along the foot a sign is as long as its
|
|
53
|
+
* name, not 36 pixels, so "Plots" stood on "Gardeners"; and where more
|
|
54
|
+
* districts lay past an edge than it had room for, the last were all
|
|
55
|
+
* held at its end, one on another. Each stands past the one before by
|
|
56
|
+
* its own length; one with no room left on its edge is not drawn —
|
|
57
|
+
* its district is still panned to, and listed with the folded ones.
|
|
58
|
+
* The foot's far end is the zoom's, and so is each side's foot: on a
|
|
59
|
+
* phone the zoom runs most of the way across.
|
|
60
|
+
*/
|
|
61
|
+
const end = side === "bottom" ? ZOOM_ROOM : side === "top" ? MARGIN : ZOOM_TALL + MARGIN / 2;
|
|
62
|
+
let reached = -Infinity;
|
|
63
|
+
const placed = [];
|
|
43
64
|
const onSide = past.filter((one) => one.side === side).sort((a, b) => a.along - b.along);
|
|
44
65
|
for (const one of onSide) {
|
|
45
66
|
const plural = pluralLabel(schema, one.kind);
|
|
46
|
-
const
|
|
47
|
-
|
|
67
|
+
const length = signLength(plural);
|
|
68
|
+
const half = across ? HALF_TALL : length / 2;
|
|
69
|
+
const limit = span - end - (across ? 0 : half);
|
|
70
|
+
const wanted = Math.max(MARGIN, one.along, reached + half + SIGN_GAP);
|
|
71
|
+
if (wanted > limit)
|
|
72
|
+
continue;
|
|
73
|
+
const { at, inset } = clearOf([...taken, ...placed], side, wanted, length, seen, span);
|
|
74
|
+
if (at > limit + 0.5)
|
|
75
|
+
continue;
|
|
76
|
+
reached = at + half;
|
|
77
|
+
placed.push(signBox(side, at, length, seen, inset));
|
|
48
78
|
const place = side === "left"
|
|
49
79
|
? { left: inset, top: at, transform: "translateY(-50%)" }
|
|
50
80
|
: side === "right"
|
|
51
81
|
? { right: `calc(${inset}px + var(--graview-dock, 0px))`, top: at, transform: "translateY(-50%)" }
|
|
52
82
|
: side === "top"
|
|
53
83
|
? { top: inset, left: at, transform: "translateX(-50%)" }
|
|
54
|
-
:
|
|
84
|
+
: // Above the ask field on a phone, as the zoom is (`--graview-scene-foot`), and above a sheet.
|
|
85
|
+
{ bottom: `calc(${inset}px + var(--graview-scene-foot, var(--graview-sheet, 0px)))`, left: at, transform: "translateX(-50%)" };
|
|
55
86
|
signs.push(_jsx("button", { type: "button", className: "graview-edge-sign", "data-graview-past-edge": one.id, "aria-label": `${plural}, past the ${side} edge — bring it into view`, title: `${plural} is past the ${side} edge`,
|
|
56
87
|
/*
|
|
57
88
|
* Not a tab stop: the keys reach the district itself, and focus
|
|
@@ -74,6 +105,18 @@ const signLength = (plural) => (plural.length + 2) * 7.4 + 22;
|
|
|
74
105
|
const HALF_TALL = SPACING / 2;
|
|
75
106
|
/** How far in from its edge a sign stands. */
|
|
76
107
|
const EDGE_INSET = 6;
|
|
108
|
+
/** The least ground between two signs along one edge. */
|
|
109
|
+
const SIGN_GAP = 6;
|
|
110
|
+
/** The foot's far end, the zoom's: its −, its level, its + and "From above", and its inset from the corner. */
|
|
111
|
+
const ZOOM_ROOM = 236;
|
|
112
|
+
/** How tall the zoom stands from the foot, its inset with it. */
|
|
113
|
+
const ZOOM_TALL = 56;
|
|
114
|
+
/** A sign's box at `along` on its edge, `inset` in from it, in the window's pixels. */
|
|
115
|
+
function signBox(side, along, length, seen, inset = EDGE_INSET) {
|
|
116
|
+
return side === "left" || side === "right"
|
|
117
|
+
? { left: side === "left" ? inset : seen.width - inset - length, right: side === "left" ? inset + length : seen.width - inset, top: along - HALF_TALL, bottom: along + HALF_TALL }
|
|
118
|
+
: { left: along - length / 2, right: along + length / 2, top: side === "top" ? inset : seen.height - inset - SPACING, bottom: side === "top" ? inset + SPACING : seen.height - inset };
|
|
119
|
+
}
|
|
77
120
|
/**
|
|
78
121
|
* Where a sign stands clear of the showings: where it was asked to, else
|
|
79
122
|
* just past the showings along its edge, else — no room along it — beside
|
|
@@ -82,9 +125,7 @@ const EDGE_INSET = 6;
|
|
|
82
125
|
function clearOf(showings, side, at, length, seen, span) {
|
|
83
126
|
const across = side === "left" || side === "right";
|
|
84
127
|
// The sign's box at `along`, from the edge it stands on.
|
|
85
|
-
const box = (along) =>
|
|
86
|
-
? { left: side === "left" ? EDGE_INSET : seen.width - EDGE_INSET - length, right: side === "left" ? EDGE_INSET + length : seen.width - EDGE_INSET, top: along - HALF_TALL, bottom: along + HALF_TALL }
|
|
87
|
-
: { left: along - length / 2, right: along + length / 2, top: side === "top" ? EDGE_INSET : seen.height - EDGE_INSET - SPACING, bottom: side === "top" ? EDGE_INSET + SPACING : seen.height - EDGE_INSET };
|
|
128
|
+
const box = (along) => signBox(side, along, length, seen);
|
|
88
129
|
const covers = (along) => showings.find((hung) => { const b = box(along); return b.left < hung.right && hung.left < b.right && b.top < hung.bottom && hung.top < b.bottom; });
|
|
89
130
|
const hung = covers(at);
|
|
90
131
|
if (!hung)
|
package/dist/edge-signs.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"edge-signs.js","sourceRoot":"","sources":["../src/edge-signs.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,WAAW,EAAE,YAAY,EAAkB,MAAM,eAAe,CAAC;AAC1E,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AAE,CAAC;AACxD,CAAC;AAED,MAAM,IAAI,GAAkB;IAC1B,QAAQ,EAAE,UAAU;IACpB,MAAM,EAAE,YAAY,CAAC,KAAK;IAC1B,SAAS,EAAE,EAAE;IACb,QAAQ,EAAE,KAAK;IACf,OAAO,EAAE,UAAU;IACnB,IAAI,EAAE,SAAS;IACf,QAAQ,EAAE,SAAS;IACnB,aAAa,EAAE,QAAQ;IACvB,UAAU,EAAE,QAAQ;IACpB,QAAQ,EAAE,QAAQ;IAClB,YAAY,EAAE,UAAU;IACxB,KAAK,EAAE,oBAAoB;IAC3B,UAAU,EAAE,sBAAsB;IAClC,MAAM,EAAE,+BAA+B;IACvC,oFAAoF;IACpF,YAAY,EAAE,CAAC;IACf,SAAS,EAAE,6BAA6B;IACxC,MAAM,EAAE,SAAS;CAClB,CAAC"}
|
package/dist/go.d.ts
CHANGED
|
@@ -3,20 +3,38 @@ import type { AnySchema } from "@graview/core";
|
|
|
3
3
|
* WHERE A VIEW SENDS THE READER, ON WHICHEVER FACE IT IS DRAWN.
|
|
4
4
|
*
|
|
5
5
|
* A view that is not React — a guest in a worker (FR-93) — can name a
|
|
6
|
-
* record
|
|
7
|
-
* name it with. On the Graview face going to a record is
|
|
8
|
-
* choosing it,
|
|
9
|
-
* of with that picture
|
|
10
|
-
* addresses, by
|
|
6
|
+
* record, a place of the app or a kind's list, and nothing else, and has
|
|
7
|
+
* no router to name it with. On the Graview face going to a record is
|
|
8
|
+
* focusing and choosing it, going to a place is focusing the kind it is a
|
|
9
|
+
* picture of with that picture, and going to a list is focusing the kind's
|
|
10
|
+
* district; the routed face says otherwise, with its own addresses, by
|
|
11
|
+
* providing `GoToContext`.
|
|
12
|
+
*
|
|
13
|
+
* NARROWED, AND TO A SECTION. A list or a place may be gone to narrowed —
|
|
14
|
+
* a `filter` in the words an address already carries it in (`stage:building`,
|
|
15
|
+
* `?filter=` on a page, `in.filter` in a stop) — and any of them to a
|
|
16
|
+
* section of the page: a heading's words or an element's id, `#<section>`
|
|
17
|
+
* on the routed face (`revealSection`). A stop in the scene is a picture,
|
|
18
|
+
* not a page of headings: the scene goes to the stop and leaves the
|
|
19
|
+
* section unsought.
|
|
11
20
|
*/
|
|
12
21
|
export interface GoTo {
|
|
13
|
-
/** Go to a record, by id. */
|
|
14
|
-
record(id: string): void;
|
|
15
|
-
/** Go to a named place, by its slug (`placeSlug(title)`). */
|
|
16
|
-
place(as: string): void;
|
|
22
|
+
/** Go to a record, by id; to one section of its page, given one. */
|
|
23
|
+
record(id: string, also?: GoToAlso): void;
|
|
24
|
+
/** Go to a named place, by its slug (`placeSlug(title)`), narrowed and to a section, given them. */
|
|
25
|
+
place(as: string, also?: GoToAlso): void;
|
|
26
|
+
/** Go to a kind's list, by the kind's name, narrowed and to a section, given them. */
|
|
27
|
+
list(kind: string, also?: GoToAlso): void;
|
|
28
|
+
}
|
|
29
|
+
/** Where on the page a destination is, and what it is narrowed to. */
|
|
30
|
+
export interface GoToAlso {
|
|
31
|
+
/** What the list or the picture keeps, in the address's words: `stage:building`, `stage:building,owner:user:ada`. */
|
|
32
|
+
readonly filter?: string;
|
|
33
|
+
/** A section of the page: an element's id or a heading's words (`"Shipping soon"`, `"shipping-soon"`). */
|
|
34
|
+
readonly section?: string;
|
|
17
35
|
}
|
|
18
36
|
/** What a face says going somewhere means there. The Graview face's own, when none is given. */
|
|
19
37
|
export declare const GoToContext: import("react").Context<GoTo | null>;
|
|
20
|
-
/** How to go to a record or a
|
|
38
|
+
/** How to go to a record, a place or a list from here. */
|
|
21
39
|
export declare function useGoTo<S extends AnySchema>(): GoTo;
|
|
22
40
|
//# sourceMappingURL=go.d.ts.map
|
package/dist/go.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"go.d.ts","sourceRoot":"","sources":["../src/go.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAK/C
|
|
1
|
+
{"version":3,"file":"go.d.ts","sourceRoot":"","sources":["../src/go.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAK/C;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,WAAW,IAAI;IACnB,oEAAoE;IACpE,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,QAAQ,GAAG,IAAI,CAAC;IAC1C,oGAAoG;IACpG,KAAK,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,QAAQ,GAAG,IAAI,CAAC;IACzC,sFAAsF;IACtF,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,QAAQ,GAAG,IAAI,CAAC;CAC3C;AAED,sEAAsE;AACtE,MAAM,WAAW,QAAQ;IACvB,qHAAqH;IACrH,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IACzB,0GAA0G;IAC1G,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED,gGAAgG;AAChG,eAAO,MAAM,WAAW,sCAAmC,CAAC;AAE5D,0DAA0D;AAC1D,wBAAgB,OAAO,CAAC,CAAC,SAAS,SAAS,KAAK,IAAI,CA2BnD"}
|
package/dist/go.js
CHANGED
|
@@ -1,12 +1,18 @@
|
|
|
1
|
-
import { withFocus, withOverview,
|
|
1
|
+
import { aggregateId, withFocus, withOverview, withWithin } from "@graview/layout/view";
|
|
2
2
|
import { createContext, useContext, useMemo } from "react";
|
|
3
3
|
import { useGraviewIfAny } from "./context.js";
|
|
4
4
|
/** What a face says going somewhere means there. The Graview face's own, when none is given. */
|
|
5
5
|
export const GoToContext = createContext(null);
|
|
6
|
-
/** How to go to a record or a
|
|
6
|
+
/** How to go to a record, a place or a list from here. */
|
|
7
7
|
export function useGoTo() {
|
|
8
8
|
const given = useContext(GoToContext);
|
|
9
9
|
const graview = useGraviewIfAny();
|
|
10
|
+
/*
|
|
11
|
+
* A KIND'S DISTRICT, with a picture of it or its own stop, narrowed as
|
|
12
|
+
* asked (`in.filter`, which the stop's arranging line reads) — or not at
|
|
13
|
+
* all: a destination gone to without a filter is not narrowed by the last.
|
|
14
|
+
*/
|
|
15
|
+
const stop = (kind, as, also) => graview?.setView((view) => withWithin(withWithin(withOverview(withFocus(view, aggregateId(kind)), false), "view", as), "filter", also?.filter ?? null));
|
|
10
16
|
return useMemo(() => given ?? {
|
|
11
17
|
record: (id) => {
|
|
12
18
|
if (!graview)
|
|
@@ -14,11 +20,14 @@ export function useGoTo() {
|
|
|
14
20
|
graview.setView((view) => withFocus(withOverview(view, false), id));
|
|
15
21
|
graview.setSelection([id]);
|
|
16
22
|
},
|
|
17
|
-
place: (as) => {
|
|
23
|
+
place: (as, also) => {
|
|
18
24
|
const place = graview?.views.places().find((candidate) => candidate.as === as);
|
|
19
25
|
if (place)
|
|
20
|
-
|
|
26
|
+
stop(place.kind, place.as, also);
|
|
21
27
|
},
|
|
22
|
-
|
|
28
|
+
list: (kind, also) => stop(kind, null, also),
|
|
29
|
+
},
|
|
30
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
31
|
+
[given, graview]);
|
|
23
32
|
}
|
|
24
33
|
//# sourceMappingURL=go.js.map
|
package/dist/go.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"go.js","sourceRoot":"","sources":["../src/go.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,
|
|
1
|
+
{"version":3,"file":"go.js","sourceRoot":"","sources":["../src/go.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AACxF,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAC3D,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAsC/C,gGAAgG;AAChG,MAAM,CAAC,MAAM,W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AAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC;KAC7C;IACH,uDAAuD;IACvD,CAAC,KAAK,EAAE,OAAO,CAAC,CACjB,CAAC;AACJ,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
export { GraviewProvider, matchWith, openingView, ROBOT_REST_MS, useFound, useGraph, useGraview, useGraviewIfAny, useNode, useRobots, useScenePointer, useTheWatchKnowsWhatIsUnseen, useViewMode, useWhereIs, ViewModeProvider } from "./context.js";
|
|
1
|
+
export { GraviewProvider, hasLanded, markLanded, matchWith, openingView, ROBOT_REST_MS, useFound, useGraph, useGraview, useGraviewIfAny, useNode, useRobots, useScenePointer, useTheWatchKnowsWhatIsUnseen, useViewMode, useWhereIs, ViewModeProvider } from "./context.js";
|
|
2
2
|
export { GoToContext, useGoTo } from "./go.js";
|
|
3
|
+
export { MenuSections, useMenuSections } from "./menu-sections.js";
|
|
4
|
+
export type { MenuItem, MenuSection, MenuSectionSource, MenuTarget } from "./menu-sections.js";
|
|
3
5
|
export { BesideTheMap } from "./beside-the-map.js";
|
|
4
6
|
export { HostFilesContext, useHostFiles } from "./files.js";
|
|
5
|
-
export type { GoTo } from "./go.js";
|
|
7
|
+
export type { GoTo, GoToAlso } from "./go.js";
|
|
6
8
|
export { Figure, Occupants, PersonFigure } from "./occupants.js";
|
|
7
9
|
export { HEARTBEAT_MS, PRESENCE_SETTINGS, SHARE_OVER, SHARE_WHERE, tabSession, usePresenceState } from "./presence.js";
|
|
8
10
|
export type { PresenceInputs, PresenceState } from "./presence.js";
|
|
@@ -60,4 +62,6 @@ export { createSeatTalk, seatTalkKey, useSeatDrawn, useSeatTalkState } from "./s
|
|
|
60
62
|
export type { KeepLensAnswer, KeepLensHost, LensEdit, SeatKept, SeatOutcome, SeatSide, SeatTalk, SeatTalkState, SeatTurn } from "./seat-talk.js";
|
|
61
63
|
export type { LazyModule, LazyPartOptions } from "./lazy-part.js";
|
|
62
64
|
export { useAffordances, useApplyAffordance } from "./affordances.js";
|
|
65
|
+
export { PlaybackContext, useLiveStore, useOwnPlayback, usePlayback } from "./past.js";
|
|
66
|
+
export type { PastShown, Playback } from "./past.js";
|
|
63
67
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,SAAS,EAAE,WAAW,EAAE,aAAa,EAAE,QAAQ,EAAE,QAAQ,EAAE,UAAU,EAAE,eAAe,EAAE,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,4BAA4B,EAAE,WAAW,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,SAAS,EAAE,UAAU,EAAE,SAAS,EAAE,WAAW,EAAE,aAAa,EAAE,QAAQ,EAAE,QAAQ,EAAE,UAAU,EAAE,eAAe,EAAE,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,4BAA4B,EAAE,WAAW,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAC5Q,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAC/C,OAAO,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACnE,YAAY,EAAE,QAAQ,EAAE,WAAW,EAAE,iBAAiB,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAC/F,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAC5D,YAAY,EAAE,IAAI,EAAE,QAAQ,EAAE,MA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AAM,cAAc,CAAC;AAC1H,YAAY,EAAE,YAAY,EAAE,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AACtG,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAE5D,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAC7F,YAAY,EAAE,cAAc,EAAE,YAAY,EAAE,QAAQ,EAAE,QAAQ,EAAE,WAAW,EAAE,QAAQ,EAAE,QAAQ,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AACjJ,YAAY,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAClE,OAAO,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAEtE,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AACvF,YAAY,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
export { GraviewProvider, matchWith, openingView, ROBOT_REST_MS, useFound, useGraph, useGraview, useGraviewIfAny, useNode, useRobots, useScenePointer, useTheWatchKnowsWhatIsUnseen, useViewMode, useWhereIs, ViewModeProvider } from "./context.js";
|
|
1
|
+
export { GraviewProvider, hasLanded, markLanded, matchWith, openingView, ROBOT_REST_MS, useFound, useGraph, useGraview, useGraviewIfAny, useNode, useRobots, useScenePointer, useTheWatchKnowsWhatIsUnseen, useViewMode, useWhereIs, ViewModeProvider } from "./context.js";
|
|
2
2
|
export { GoToContext, useGoTo } from "./go.js";
|
|
3
|
+
export { MenuSections, useMenuSections } from "./menu-sections.js";
|
|
3
4
|
export { BesideTheMap } from "./beside-the-map.js";
|
|
4
5
|
export { HostFilesContext, useHostFiles } from "./files.js";
|
|
5
6
|
export { Figure, Occupants, PersonFigure } from "./occupants.js";
|
|
@@ -38,4 +39,6 @@ export { lazyModule, retryLazyParts } from "./lazy-part.js";
|
|
|
38
39
|
// The conversation with the seat, held by the app so a face switch keeps it.
|
|
39
40
|
export { createSeatTalk, seatTalkKey, useSeatDrawn, useSeatTalkState } from "./seat-talk.js";
|
|
40
41
|
export { useAffordances, useApplyAffordance } from "./affordances.js";
|
|
42
|
+
// The app as it was (Roadmap f-playback): the moment a face draws instead of now, held by its outermost provider.
|
|
43
|
+
export { PlaybackContext, useLiveStore, useOwnPlayback, usePlayback } from "./past.js";
|
|
41
44
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,SAAS,EAAE,WAAW,EAAE,aAAa,EAAE,QAAQ,EAAE,QAAQ,EAAE,UAAU,EAAE,eAAe,EAAE,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,4BAA4B,EAAE,WAAW,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,SAAS,EAAE,UAAU,EAAE,SAAS,EAAE,WAAW,EAAE,aAAa,EAAE,QAAQ,EAAE,QAAQ,EAAE,UAAU,EAAE,eAAe,EAAE,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,4BAA4B,EAAE,WAAW,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAC5Q,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAC/C,OAAO,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAEnE,OAAO,EAAE,YAAY,EAAE,MAA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AAM,cAAc,CAAC;AAE1H,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAC5D,6EAA6E;AAC7E,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAG7F,OAAO,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AACtE,kHAAkH;AAClH,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { type AnySchema, type LinkedReads, type LinkedRecords, type Principal, type Store } from "@graview/core";
|
|
2
|
+
export declare function useLinkedReads<S extends AnySchema>(store: Store<S>, host: LinkedRecords | undefined, viewer: Principal): LinkedReads | undefined;
|
|
3
|
+
//# sourceMappingURL=linked-reads.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"linked-reads.d.ts","sourceRoot":"","sources":["../src/linked-reads.ts"],"names":[],"mappings":"AAAA,OAAO,EAAmD,KAAK,SAAS,EAAE,KAAK,WAAW,EAAE,KAAK,aAAa,EAAE,KAAK,SAAS,EAAE,KAAK,KAAK,EAAE,MAAM,eAAe,CAAC;AAmBlK,wBAAgB,cAAc,CAAC,CAAC,SAAS,SAAS,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,aAAa,GAAG,SAAS,EAAE,MAAM,EAAE,SAAS,GAAG,WAAW,GAAG,SAAS,CA8BhJ"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { linkedReads, linkedRelations, readLinkedThrough } from "@graview/core";
|
|
2
|
+
import { useEffect, useState } from "react";
|
|
3
|
+
/*
|
|
4
|
+
* RECORDS IN ANOTHER APP, READ AS WHOEVER IS LOOKING (FR-171).
|
|
5
|
+
*
|
|
6
|
+
* Where the host hands the provider `linkedRecords` and the app has a
|
|
7
|
+
* relation to another app's kind, the page reads far records through one
|
|
8
|
+
* cache for this viewer: each asked of the host once, and the store told
|
|
9
|
+
* to read again (`store.reread()`) as answers arrive — so a computed value,
|
|
10
|
+
* a rule or a label that walks the link reads the far value once it is in,
|
|
11
|
+
* and reads it as not read until then. Registered on the store's graph, so
|
|
12
|
+
* every expression judged over it walks the link as this viewer. What draws
|
|
13
|
+
* a linked record is `@graview/primitives`'s, fetched with the first one.
|
|
14
|
+
*/
|
|
15
|
+
/** Whether an app has a relation to another app's kind at all. */
|
|
16
|
+
const linksAnotherApp = (schema) => schema.definitions.some((definition) => linkedRelations(definition).size > 0);
|
|
17
|
+
export function useLinkedReads(store, host, viewer) {
|
|
18
|
+
const [reads, setReads] = useState(undefined);
|
|
19
|
+
const roles = (viewer.roles ?? []).join("\u0000");
|
|
20
|
+
useEffect(() => {
|
|
21
|
+
if (!host || !linksAnotherApp(store.schema)) {
|
|
22
|
+
setReads(undefined);
|
|
23
|
+
return;
|
|
24
|
+
}
|
|
25
|
+
let live = true;
|
|
26
|
+
let soon = false;
|
|
27
|
+
const graph = store.graph;
|
|
28
|
+
// Many answers in one turn are one reading again.
|
|
29
|
+
const answered = () => {
|
|
30
|
+
if (soon)
|
|
31
|
+
return;
|
|
32
|
+
soon = true;
|
|
33
|
+
queueMicrotask(() => {
|
|
34
|
+
soon = false;
|
|
35
|
+
if (live)
|
|
36
|
+
store.reread();
|
|
37
|
+
});
|
|
38
|
+
};
|
|
39
|
+
const made = linkedReads(host, { kind: viewer.kind, ...(viewer.id === undefined ? {} : { id: viewer.id }), ...(viewer.roles ? { roles: viewer.roles } : {}) }, answered);
|
|
40
|
+
readLinkedThrough(graph, made.read);
|
|
41
|
+
setReads(made);
|
|
42
|
+
store.reread();
|
|
43
|
+
return () => {
|
|
44
|
+
live = false;
|
|
45
|
+
readLinkedThrough(graph, undefined);
|
|
46
|
+
};
|
|
47
|
+
}, [store, host, viewer.kind, viewer.id, roles]);
|
|
48
|
+
return re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AC;gBACb,IAAI,IAAI;oBAAE,KAAK,CAAC,MAAM,EAAE,CAAC;YAC3B,CAAC,CAAC,CAAC;QACL,CAAC,CAAC;QACF,MAAM,IAAI,GAAG,WAAW,CAAC,IAAI,EAAE,EAAE,IAAI,EAAE,MAAM,CAAC,IAAI,EAAE,GAAG,CAAC,MAAM,CAAC,EAAE,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE,EAAE,MAAM,CAAC,EAAE,EAAE,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,QAAQ,CAAC,CAAC;QACzK,iBAAiB,CAAC,KAAK,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;QACpC,QAAQ,CAAC,IAAI,CAAC,CAAC;QACf,KAAK,CAAC,MAAM,EAAE,CAAC;QACf,OAAO,GAAG,EAAE;YACV,IAAI,GAAG,KAAK,CAAC;YACb,iBAAiB,CAAC,KAAK,EAAE,SAAS,CAAC,CAAC;QACtC,CAAC,CAAC;IACJ,CAAC,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC,EAAE,EAAE,KAAK,CAAC,CAAC,CAAC;IACjD,OAAO,KAAK,CAAC;AACf,CAAC"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
/**
|
|
3
|
+
* WHAT A CONTEXT MENU IS OPENED ON, as a section of it is told: the record,
|
|
4
|
+
* the kind or the relation under the gesture (`on`), what the acts are
|
|
5
|
+
* derived for (`about`), the field and the place it landed in, which face
|
|
6
|
+
* opened it, and the element it was opened from.
|
|
7
|
+
*/
|
|
8
|
+
export interface MenuTarget {
|
|
9
|
+
/** The face the menu was opened on. */
|
|
10
|
+
readonly face: "scene" | "pages";
|
|
11
|
+
/** The node, kind card or edge the gesture landed on, when it landed on one. */
|
|
12
|
+
readonly on?: string | undefined;
|
|
13
|
+
/** What the acts in the menu are derived for. */
|
|
14
|
+
readonly about: readonly string[];
|
|
15
|
+
/** The field of `on` it landed on, on a record's page. */
|
|
16
|
+
readonly field?: string | undefined;
|
|
17
|
+
/** The place (a lens, by the name it is registered under) it landed in. */
|
|
18
|
+
readonly place?: string | undefined;
|
|
19
|
+
/** The address it landed on, when that was a link. */
|
|
20
|
+
readonly href?: string | undefined;
|
|
21
|
+
/** The element it was opened from, which the keyboard goes back to. */
|
|
22
|
+
readonly element?: HTMLElement | null | undefined;
|
|
23
|
+
}
|
|
24
|
+
/** One row of a section: pressed, it runs and the menu closes. */
|
|
25
|
+
export interface MenuItem {
|
|
26
|
+
/** Unique in its section; carried as `data-menu-item`. */
|
|
27
|
+
readonly id: string;
|
|
28
|
+
/** What pressing it does, in the reader's words. */
|
|
29
|
+
readonly label: string;
|
|
30
|
+
readonly run: () => void;
|
|
31
|
+
/** Said under the label, quietly: where it goes, or why. */
|
|
32
|
+
readonly hint?: string;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* A SECTION OF THE CONTEXT MENU, beside the acts the derivation offers. The
|
|
36
|
+
* face's own ("Open", "Change the date") and a host's — the inline AI is
|
|
37
|
+
* one — are both sections, drawn by the one menu: rows from `items`, or what
|
|
38
|
+
* `render` draws, handed the way to close the menu.
|
|
39
|
+
*/
|
|
40
|
+
export interface MenuSection {
|
|
41
|
+
/** Unique in the menu; carried as `data-menu-section`. */
|
|
42
|
+
readonly id: string;
|
|
43
|
+
/** A heading over the section; none for a plain run of rows. */
|
|
44
|
+
readonly heading?: string;
|
|
45
|
+
/** Before the acts (`"start"`) or after them (the default). */
|
|
46
|
+
readonly at?: "start" | "end";
|
|
47
|
+
readonly items?: readonly MenuItem[];
|
|
48
|
+
/** Drawn in place of rows, for a section that needs more than rows. */
|
|
49
|
+
readonly render?: (close: () => void) => ReactNode;
|
|
50
|
+
}
|
|
51
|
+
/** A host's or a face's contribution: told what the menu is opened on, it answers a section or nothing. */
|
|
52
|
+
export type MenuSectionSource = (target: MenuTarget) => MenuSection | null | undefined;
|
|
53
|
+
/**
|
|
54
|
+
* A FACE'S OWN SECTIONS (the routed face's "Open", "Change …"), added to
|
|
55
|
+
* every context menu drawn inside it, after those of any around it. A
|
|
56
|
+
* host's are the provider's `menuSections`, and are drawn after these.
|
|
57
|
+
*/
|
|
58
|
+
export declare function MenuSections({ sections, children }: {
|
|
59
|
+
readonly sections: readonly MenuSectionSource[];
|
|
60
|
+
readonly children: ReactNode;
|
|
61
|
+
}): import("react").JSX.Element;
|
|
62
|
+
/** The sections every source here gives for a target, the ones before the acts first. */
|
|
63
|
+
export declare function useMenuSections(target: MenuTarget | null): {
|
|
64
|
+
readonly start: readonly MenuSection[];
|
|
65
|
+
readonly end: readonly MenuSection[];
|
|
66
|
+
};
|
|
67
|
+
//# sourceMappingURL=menu-sections.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"menu-sections.d.ts","sourceRoot":"","sources":["../src/menu-sections.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAsC,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAG3E;;;;;GAKG;AACH,MAAM,WAAW,UAAU;IACzB,uCAAuC;IACvC,QAAQ,CAAC,IAAI,EAAE,OAAO,GAAG,OAAO,CAAC;IACjC,gFAAgF;IAChF,QAAQ,CAAC,EAAE,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACjC,iDAAiD;IACjD,QAAQ,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,CAAC;IAClC,0DAA0D;IAC1D,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACpC,2EAA2E;IAC3E,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACpC,sDAAsD;IACtD,QAAQ,CAAC,IAAI,CAAC,E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,WAAW,EAAE,CAAC;IAAC,QAAQ,CAAC,GAAG,EAAE,SAAS,WAAW,EAAE,CAAA;CAAE,CAgB3I"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { createContext, useContext, useMemo } from "react";
|
|
3
|
+
import { useGraviewIfAny } from "./context.js";
|
|
4
|
+
const MenuSectionsContext = createContext([]);
|
|
5
|
+
/**
|
|
6
|
+
* A FACE'S OWN SECTIONS (the routed face's "Open", "Change …"), added to
|
|
7
|
+
* every context menu drawn inside it, after those of any around it. A
|
|
8
|
+
* host's are the provider's `menuSections`, and are drawn after these.
|
|
9
|
+
*/
|
|
10
|
+
export function MenuSections({ sections, children }) {
|
|
11
|
+
const outer = useContext(MenuSectionsContext);
|
|
12
|
+
const all = useMemo(() => [...outer, ...sections.filter((source) => !outer.includes(source))], [outer, sections]);
|
|
13
|
+
return _jsx(MenuSectionsContext.Provider, { value: all, children: children });
|
|
14
|
+
}
|
|
15
|
+
/** The sections every source here gives for a target, the ones before the acts first. */
|
|
16
|
+
export function useMenuSections(target) {
|
|
17
|
+
const faces = useContext(MenuSectionsContext);
|
|
18
|
+
const host = useGraviewIfAny()?.menuSections;
|
|
19
|
+
// The same source given twice — a face's and a host's — is drawn once.
|
|
20
|
+
const sources = host ? [...faces, ...host.filter((source) => !faces.includes(source))] : faces;
|
|
21
|
+
if (target === null || sources.length === 0)
|
|
22
|
+
return { start: [], end: [] };
|
|
23
|
+
const sections = sources.flatMap((source) => {
|
|
24
|
+
try {
|
|
25
|
+
const section = source(target);
|
|
26
|
+
return section && ((section.items?.length ?? 0) > 0 || section.render) ? [section] : [];
|
|
27
|
+
}
|
|
28
|
+
catch {
|
|
29
|
+
// A host's section that throws is left out, never the menu.
|
|
30
|
+
return [];
|
|
31
|
+
}
|
|
32
|
+
});
|
|
33
|
+
return { start: sections.filter((section) => section.at === "start"), end: sections.filter((section) => section.at !== "start") };
|
|
34
|
+
}
|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I,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,EAAE,KAAK,EAAE,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE,CAAC;IAC3E,MAAM,QAAQ,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,EAAE;QAC1C,IAAI,CAAC;YACH,MAAM,OAAO,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC;YAC/B,OAAO,OAAO,IAAI,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,MAAM,IAAI,CAAC,CAAC,GAAG,CAAC,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;QAC1F,CAAC;QAAC,MAAM,CAAC;YACP,4DAA4D;YAC5D,OAAO,EAAE,CAAC;QACZ,CAAC;IACH,CAAC,CAAC,CAAC;IACH,OAAO,EAAE,KAAK,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,EAAE,KAAK,OAAO,CAAC,EAAE,GAAG,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,EAAE,KAAK,OAAO,CAAC,EAAE,CAAC;AACpI,CAAC"}
|
package/dist/past.d.ts
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import type { AnySchema, Principal, Store } from "@graview/core";
|
|
2
|
+
import type { HistoryHost } from "@graview/core/history";
|
|
3
|
+
/**
|
|
4
|
+
* THE APP AS IT WAS, SHOWN (Roadmap f-playback): which moment a face is
|
|
5
|
+
* drawing instead of now, and the store of it (`pastOf`) every surface
|
|
6
|
+
* under it reads — the scene, the pages, the problems, the lenses — so the
|
|
7
|
+
* past is drawn by the one renderer the present is.
|
|
8
|
+
*/
|
|
9
|
+
export interface PastShown<S extends AnySchema = AnySchema> {
|
|
10
|
+
/** The ops before this seq are in it, none after. */
|
|
11
|
+
readonly seq: number;
|
|
12
|
+
/** When the last op in it was made. */
|
|
13
|
+
readonly at: string | undefined;
|
|
14
|
+
/** The whole store as it stood: read, never changed, offering no act. */
|
|
15
|
+
readonly store: Store<S>;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* PLAYBACK, AS A FACE HOLDS IT: the moment shown (or `null`, now), the way
|
|
19
|
+
* to show another, and the live store — what the timeline reads its ticks
|
|
20
|
+
* from and a "Restore to here" changes. Held by the outermost provider of
|
|
21
|
+
* a face (`GraviewProvider`, or the routed face's `PagesApp`), so a face
|
|
22
|
+
* drawn inside another shares the one moment.
|
|
23
|
+
*/
|
|
24
|
+
export interface Playback<S extends AnySchema = AnySchema> {
|
|
25
|
+
/** The moment drawn instead of now; `null` while now is drawn. */
|
|
26
|
+
readonly past: PastShown<S> | null;
|
|
27
|
+
/** Whether the timeline is open: at a moment, or at now with the way back still in reach. */
|
|
28
|
+
readonly open: boolean;
|
|
29
|
+
/**
|
|
30
|
+
* Show the app as it stood at `seq` — the timeline opens on it; a seq at
|
|
31
|
+
* or past the log's end is now, with the timeline still open. `null`
|
|
32
|
+
* closes the timeline and comes back to now.
|
|
33
|
+
*/
|
|
34
|
+
show(seq: number | null): void;
|
|
35
|
+
/** The store as it is now, whole: read through the seat's sight (`seenBy`). */
|
|
36
|
+
readonly live: Store<S>;
|
|
37
|
+
/** What the host keeps outside the log: declaration changes, a script view's code at a moment. */
|
|
38
|
+
readonly host: HistoryHost | undefined;
|
|
39
|
+
/** Whether `store` is this playback's — now's or the moment's, whole or as one seat sees it. */
|
|
40
|
+
owns(store: Store<AnySchema>, principal: Principal): boolean;
|
|
41
|
+
}
|
|
42
|
+
export declare const PlaybackContext: import("react").Context<Playback<AnySchema> | null>;
|
|
43
|
+
/** The playback the face under this is drawn with, if any. */
|
|
44
|
+
export declare function usePlayback<S extends AnySchema = AnySchema>(): Playback<S> | null;
|
|
45
|
+
/**
|
|
46
|
+
* THE STORE AS IT IS NOW, as this seat sees it, whatever moment the face
|
|
47
|
+
* draws — what Activity lists and a timeline counts its ticks from — drawn
|
|
48
|
+
* again as it changes. The provider's own store where there is no playback.
|
|
49
|
+
*/
|
|
50
|
+
export declare function useLiveStore<S extends AnySchema>(shown: Store<S>, principal: Principal): Store<S>;
|
|
51
|
+
/**
|
|
52
|
+
* A FACE'S OWN PLAYBACK over `live`, or the one it is drawn inside when
|
|
53
|
+
* that one holds this store. Nothing past is folded — or fetched — until
|
|
54
|
+
* somebody asks to see it; a moment the log no longer reaches (cut back
|
|
55
|
+
* under it) is now.
|
|
56
|
+
*/
|
|
57
|
+
export declare function useOwnPlayback<S extends AnySchema>(live: Store<S>, principal: Principal, host: HistoryHost | undefined): Playback<S>;
|
|
58
|
+
//# sourceMappingURL=past.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"past.d.ts","sourceRoot":"","sources":["../src/past.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACjE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAIzD;;;;;GAKG;AACH,MAAM,WAAW,SAAS,CAAC,CAAC,SAAS,SAAS,GAAG,SAAS;IACxD,qDAAqD;IACrD,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,uCAAuC;IACvC,QAAQ,CAAC,EAAE,EAAE,MAAM,GAAG,SAAS,CAAC;IAChC,yEAAyE;IACzE,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC;CAC1B;AAED;;;;;;GAMG;AACH,MAAM,WAAW,QAAQ,CAAC,CAAC,SAAS,SAAS,GAAG,SAAS;IACvD,kEAAkE;IAClE,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC;IACnC,6FAA6F;IAC7F,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;IACvB;;;;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