@graview/primitives 0.1.18 → 0.1.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/app-bar.d.ts +30 -6
- package/dist/app-bar.d.ts.map +1 -1
- package/dist/app-bar.js +55 -27
- package/dist/app-bar.js.map +1 -1
- package/dist/arrange-bar.d.ts +42 -25
- package/dist/arrange-bar.d.ts.map +1 -1
- package/dist/arrange-bar.js +129 -194
- package/dist/arrange-bar.js.map +1 -1
- package/dist/arrange-lists.d.ts +56 -0
- package/dist/arrange-lists.d.ts.map +1 -0
- package/dist/arrange-lists.js +196 -0
- package/dist/arrange-lists.js.map +1 -0
- package/dist/bar-panes.d.ts +3 -1
- package/dist/bar-panes.d.ts.map +1 -1
- package/dist/bar-panes.js +36 -21
- package/dist/bar-panes.js.map +1 -1
- package/dist/chat.d.ts +68 -30
- package/dist/chat.d.ts.map +1 -1
- package/dist/chat.js +205 -222
- package/dist/chat.js.map +1 -1
- package/dist/connections.d.ts.map +1 -1
- package/dist/connections.js +19 -3
- package/dist/connections.js.map +1 -1
- package/dist/declared-lens-doors.d.ts +18 -0
- package/dist/declared-lens-doors.d.ts.map +1 -1
- package/dist/declared-lens-doors.js +25 -3
- package/dist/declared-lens-doors.js.map +1 -1
- package/dist/declared-lenses.d.ts.map +1 -1
- package/dist/declared-lenses.js +4 -7
- package/dist/declared-lenses.js.map +1 -1
- package/dist/draft-door.d.ts +3 -0
- package/dist/draft-door.d.ts.map +1 -0
- package/dist/draft-door.js +22 -0
- package/dist/draft-door.js.map +1 -0
- package/dist/draft-frame.d.ts +25 -0
- package/dist/draft-frame.d.ts.map +1 -0
- package/dist/draft-frame.js +69 -0
- package/dist/draft-frame.js.map +1 -0
- package/dist/editable.d.ts +4 -1
- package/dist/editable.d.ts.map +1 -1
- package/dist/editable.js +9 -8
- package/dist/editable.js.map +1 -1
- package/dist/find.d.ts.map +1 -1
- package/dist/find.js +23 -5
- package/dist/find.js.map +1 -1
- package/dist/frame.d.ts +5 -4
- package/dist/frame.d.ts.map +1 -1
- package/dist/frame.js +5 -4
- package/dist/frame.js.map +1 -1
- package/dist/index.d.ts +14 -7
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +15 -6
- package/dist/index.js.map +1 -1
- package/dist/lens/board.d.ts.map +1 -1
- package/dist/lens/board.js +7 -3
- package/dist/lens/board.js.map +1 -1
- package/dist/lens/calendar-options.d.ts +8 -1
- package/dist/lens/calendar-options.d.ts.map +1 -1
- package/dist/lens/calendar-options.js +5 -0
- package/dist/lens/calendar-options.js.map +1 -1
- package/dist/lens/calendar-view.d.ts.map +1 -1
- package/dist/lens/calendar-view.js +2 -2
- package/dist/lens/calendar-view.js.map +1 -1
- package/dist/lens/columns.d.ts.map +1 -1
- package/dist/lens/columns.js +2 -2
- package/dist/lens/columns.js.map +1 -1
- package/dist/lens/coverage.d.ts.map +1 -1
- package/dist/lens/coverage.js +14 -10
- package/dist/lens/coverage.js.map +1 -1
- package/dist/lens/more.d.ts.map +1 -1
- package/dist/lens/more.js +2 -1
- package/dist/lens/more.js.map +1 -1
- package/dist/lens-keeping.d.ts +17 -0
- package/dist/lens-keeping.d.ts.map +1 -0
- package/dist/lens-keeping.js +127 -0
- package/dist/lens-keeping.js.map +1 -0
- package/dist/lines-key.d.ts +12 -0
- package/dist/lines-key.d.ts.map +1 -0
- package/dist/lines-key.js +74 -0
- package/dist/lines-key.js.map +1 -0
- package/dist/notice-place.d.ts +3 -3
- package/dist/notice-place.d.ts.map +1 -1
- package/dist/notice-place.js +4 -4
- package/dist/notice-place.js.map +1 -1
- package/dist/notices.d.ts +6 -0
- package/dist/notices.d.ts.map +1 -1
- package/dist/notices.js +7 -1
- package/dist/notices.js.map +1 -1
- package/dist/pages.d.ts +10 -5
- package/dist/pages.d.ts.map +1 -1
- package/dist/pages.js +10 -5
- package/dist/pages.js.map +1 -1
- package/dist/places.d.ts +0 -24
- package/dist/places.d.ts.map +1 -1
- package/dist/places.js +5 -1
- package/dist/places.js.map +1 -1
- package/dist/profile.d.ts +7 -1
- package/dist/profile.d.ts.map +1 -1
- package/dist/profile.js +2 -2
- package/dist/profile.js.map +1 -1
- package/dist/quick-relations.d.ts.map +1 -1
- package/dist/quick-relations.js +2 -2
- package/dist/quick-relations.js.map +1 -1
- package/dist/reader-lenses.d.ts +21 -0
- package/dist/reader-lenses.d.ts.map +1 -0
- package/dist/reader-lenses.js +27 -0
- package/dist/reader-lenses.js.map +1 -0
- package/dist/relation-key.d.ts +2 -0
- package/dist/relation-key.d.ts.map +1 -1
- package/dist/relation-key.js +13 -23
- package/dist/relation-key.js.map +1 -1
- package/dist/rule-line.d.ts +36 -0
- package/dist/rule-line.d.ts.map +1 -0
- package/dist/rule-line.js +91 -0
- package/dist/rule-line.js.map +1 -0
- package/dist/scene-bar.d.ts +29 -0
- package/dist/scene-bar.d.ts.map +1 -0
- package/dist/scene-bar.js +72 -0
- package/dist/scene-bar.js.map +1 -0
- package/dist/scene-css.d.ts.map +1 -1
- package/dist/scene-css.js +525 -0
- package/dist/scene-css.js.map +1 -1
- package/dist/scene.d.ts +5 -2
- package/dist/scene.d.ts.map +1 -1
- package/dist/scene.js +5 -1
- package/dist/scene.js.map +1 -1
- package/dist/seat-field.d.ts +58 -0
- package/dist/seat-field.d.ts.map +1 -0
- package/dist/seat-field.js +171 -0
- package/dist/seat-field.js.map +1 -0
- package/dist/seat-move.d.ts +32 -0
- package/dist/seat-move.d.ts.map +1 -0
- package/dist/seat-move.js +56 -0
- package/dist/seat-move.js.map +1 -0
- package/dist/seat-panel.d.ts +37 -0
- package/dist/seat-panel.d.ts.map +1 -0
- package/dist/seat-panel.js +134 -0
- package/dist/seat-panel.js.map +1 -0
- package/dist/seat.d.ts +20 -58
- package/dist/seat.d.ts.map +1 -1
- package/dist/seat.js +28 -45
- package/dist/seat.js.map +1 -1
- package/dist/seeding.d.ts.map +1 -1
- package/dist/seeding.js +4 -4
- package/dist/seeding.js.map +1 -1
- package/dist/shell.d.ts +25 -21
- package/dist/shell.d.ts.map +1 -1
- package/dist/shell.js +46 -116
- package/dist/shell.js.map +1 -1
- package/dist/spec-css.d.ts.map +1 -1
- package/dist/spec-css.js +2 -0
- package/dist/spec-css.js.map +1 -1
- package/dist/spec-views.d.ts.map +1 -1
- package/dist/spec-views.js +10 -2
- package/dist/spec-views.js.map +1 -1
- package/dist/subject.d.ts +4 -2
- package/dist/subject.d.ts.map +1 -1
- package/dist/subject.js +12 -8
- package/dist/subject.js.map +1 -1
- package/dist/theme.d.ts.map +1 -1
- package/dist/theme.js +6 -523
- package/dist/theme.js.map +1 -1
- package/dist/view-doors.d.ts.map +1 -1
- package/dist/view-doors.js +7 -0
- package/dist/view-doors.js.map +1 -1
- package/dist/workbench/activity.d.ts.map +1 -1
- package/dist/workbench/activity.js +9 -9
- package/dist/workbench/activity.js.map +1 -1
- package/dist/workbench/back-out.js +3 -3
- package/dist/workbench/back-out.js.map +1 -1
- package/dist/workbench/inspector.d.ts +11 -6
- package/dist/workbench/inspector.d.ts.map +1 -1
- package/dist/workbench/inspector.js +42 -56
- package/dist/workbench/inspector.js.map +1 -1
- package/dist/workbench/standing.d.ts +8 -2
- package/dist/workbench/standing.d.ts.map +1 -1
- package/dist/workbench/standing.js +9 -4
- package/dist/workbench/standing.js.map +1 -1
- package/dist/workbench/trail.d.ts +10 -17
- package/dist/workbench/trail.d.ts.map +1 -1
- package/dist/workbench/trail.js +29 -41
- package/dist/workbench/trail.js.map +1 -1
- package/package.json +7 -7
- package/dist/companion.d.ts +0 -58
- package/dist/companion.d.ts.map +0 -1
- package/dist/companion.js +0 -463
- package/dist/companion.js.map +0 -1
- package/dist/ladder.d.ts +0 -2
- package/dist/ladder.d.ts.map +0 -1
- package/dist/ladder.js +0 -48
- package/dist/ladder.js.map +0 -1
- package/dist/popover.d.ts +0 -21
- package/dist/popover.d.ts.map +0 -1
- package/dist/popover.js +0 -28
- package/dist/popover.js.map +0 -1
- package/dist/wordmark.d.ts +0 -15
- package/dist/wordmark.d.ts.map +0 -1
- package/dist/wordmark.js +0 -50
- package/dist/wordmark.js.map +0 -1
|
@@ -1,23 +1,10 @@
|
|
|
1
1
|
import { type ReactNode } from "react";
|
|
2
2
|
/**
|
|
3
3
|
* Where you are, and the way back. The view used to be printed as a raw URL
|
|
4
|
-
* fragment; the same information reads as a trail.
|
|
4
|
+
* fragment; the same information reads as a trail. Back and forward are the
|
|
5
|
+
* browser's own: every stop is a URL, and the bar no longer draws them again.
|
|
5
6
|
*/
|
|
6
|
-
|
|
7
|
-
* Back and forward, because every stop here is a URL.
|
|
8
|
-
*
|
|
9
|
-
* Traveling into a task changes `focusId`, which changes the address, which
|
|
10
|
-
* means the browser's own back button already works — and that is exactly the
|
|
11
|
-
* problem: the person using the app has to KNOW that its navigation is the
|
|
12
|
-
* browser's. On a screen you reached by double-clicking, the only way out was
|
|
13
|
-
* a breadcrumb crumb or a keyboard shortcut nobody was told about.
|
|
14
|
-
*
|
|
15
|
-
* Disabled rather than hidden at the ends of the history, so the control does
|
|
16
|
-
* not appear and disappear as you move — and never enabled when there is
|
|
17
|
-
* nowhere to go, since an arrow that does nothing is worse than no arrow.
|
|
18
|
-
*/
|
|
19
|
-
export declare function Backtrack(): import("react").JSX.Element;
|
|
20
|
-
export declare function Trail({ home, homeLabel, children, }: {
|
|
7
|
+
export declare function Trail({ home, homeLabel, children, onPicture, }: {
|
|
21
8
|
readonly home: string | null;
|
|
22
9
|
/**
|
|
23
10
|
* The name of the place you are in — omit it when something else on screen
|
|
@@ -31,5 +18,11 @@ export declare function Trail({ home, homeLabel, children, }: {
|
|
|
31
18
|
*/
|
|
32
19
|
readonly homeLabel?: string;
|
|
33
20
|
readonly children?: ReactNode;
|
|
34
|
-
|
|
21
|
+
/**
|
|
22
|
+
* Drawn over the picture (`SceneTrail`) rather than in a row of chrome: on
|
|
23
|
+
* the picture's own float, and nothing at all while there is nothing to
|
|
24
|
+
* say — a box that says nothing over a picture is a box in the way.
|
|
25
|
+
*/
|
|
26
|
+
readonly onPicture?: boolean;
|
|
27
|
+
}): import("react").JSX.Element | null;
|
|
35
28
|
//# sourceMappingURL=trail.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"trail.d.ts","sourceRoot":"","sources":["../../src/workbench/trail.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"trail.d.ts","sourceRoot":"","sources":["../../src/workbench/trail.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAY,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAIjD;;;;GAIG;AACH,wBAAgB,KAAK,CAAC,EACpB,IAAI,EACJ,SAAS,EACT,QAAQ,EACR,SAAiB,GAClB,EAAE;IACD,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B;;;;;;;;;OASG;IACH,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,QAAQ,CAAC,EAAE,SAAS,CAAC;IAC9B;;;;OAIG;IACH,QAAQ,CAAC,SAAS,CAAC,EAAE,OAAO,CAAC;CAC9B,sCA2NA"}
|
package/dist/workbench/trail.js
CHANGED
|
@@ -1,45 +1,15 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { pluralLabel } from "@graview/core";
|
|
2
3
|
import { withoutMoves, withPast, withZoom } from "@graview/layout/view";
|
|
3
|
-
import {
|
|
4
|
+
import { useGraview, useNavigation } from "@graview/react/provider";
|
|
4
5
|
import { Fragment } from "react";
|
|
5
6
|
import { nameOf } from "./answer-args.js";
|
|
6
7
|
/**
|
|
7
8
|
* Where you are, and the way back. The view used to be printed as a raw URL
|
|
8
|
-
* fragment; the same information reads as a trail.
|
|
9
|
+
* fragment; the same information reads as a trail. Back and forward are the
|
|
10
|
+
* browser's own: every stop is a URL, and the bar no longer draws them again.
|
|
9
11
|
*/
|
|
10
|
-
|
|
11
|
-
* Back and forward, because every stop here is a URL.
|
|
12
|
-
*
|
|
13
|
-
* Traveling into a task changes `focusId`, which changes the address, which
|
|
14
|
-
* means the browser's own back button already works — and that is exactly the
|
|
15
|
-
* problem: the person using the app has to KNOW that its navigation is the
|
|
16
|
-
* browser's. On a screen you reached by double-clicking, the only way out was
|
|
17
|
-
* a breadcrumb crumb or a keyboard shortcut nobody was told about.
|
|
18
|
-
*
|
|
19
|
-
* Disabled rather than hidden at the ends of the history, so the control does
|
|
20
|
-
* not appear and disappear as you move — and never enabled when there is
|
|
21
|
-
* nowhere to go, since an arrow that does nothing is worse than no arrow.
|
|
22
|
-
*/
|
|
23
|
-
export function Backtrack() {
|
|
24
|
-
const { canGoBack, canGoForward, back, forward } = useBacktrack();
|
|
25
|
-
// Ghost buttons: the way back is furniture, not a call to action.
|
|
26
|
-
const style = {
|
|
27
|
-
minWidth: 30,
|
|
28
|
-
height: 30,
|
|
29
|
-
display: "inline-grid",
|
|
30
|
-
placeItems: "center",
|
|
31
|
-
padding: "0 8px",
|
|
32
|
-
fontSize: "0.9375rem",
|
|
33
|
-
lineHeight: 1,
|
|
34
|
-
borderRadius: 999,
|
|
35
|
-
border: "1px solid transparent",
|
|
36
|
-
background: "transparent",
|
|
37
|
-
boxShadow: "none",
|
|
38
|
-
color: "var(--graview-ink-muted)",
|
|
39
|
-
};
|
|
40
|
-
return (_jsxs("div", { style: { display: "inline-flex", gap: 2 }, "data-testid": "backtrack", children: [_jsx("button", { type: "button", onClick: back, disabled: !canGoBack, "aria-label": "Back", title: "Back", style: style, children: "\u2190" }), _jsx("button", { type: "button", onClick: forward, disabled: !canGoForward, "aria-label": "Forward", title: "Forward", style: style, children: "\u2192" })] }));
|
|
41
|
-
}
|
|
42
|
-
export function Trail({ home, homeLabel, children, }) {
|
|
12
|
+
export function Trail({ home, homeLabel, children, onPicture = false, }) {
|
|
43
13
|
const { view, focus, show, go } = useNavigation();
|
|
44
14
|
const { store } = useGraview();
|
|
45
15
|
/*
|
|
@@ -50,7 +20,7 @@ export function Trail({ home, homeLabel, children, }) {
|
|
|
50
20
|
const { movedByHand } = useGraview();
|
|
51
21
|
const moved = movedByHand && (view.pan !== undefined || Object.keys(view.pins).length > 0);
|
|
52
22
|
const focused = view.focusId && view.focusId !== home ? store.graph.getNode(view.focusId) : undefined;
|
|
53
|
-
const plural = (kind) => store.schema
|
|
23
|
+
const plural = (kind) => pluralLabel(store.schema, kind);
|
|
54
24
|
const chip = {
|
|
55
25
|
display: "inline-flex",
|
|
56
26
|
alignItems: "center",
|
|
@@ -58,12 +28,13 @@ export function Trail({ home, homeLabel, children, }) {
|
|
|
58
28
|
// A crumb is a control, and a control is at least a fingertip tall.
|
|
59
29
|
// A crumb of where you are: quiet, since the picture already shows it.
|
|
60
30
|
minHeight: 26,
|
|
61
|
-
padding: "2px
|
|
31
|
+
padding: "2px 6px",
|
|
62
32
|
fontSize: "0.8125rem",
|
|
63
|
-
|
|
33
|
+
// Words on the bar, not a capsule: the crumb is where you are and its ×, as plain as "Lists" beside it.
|
|
34
|
+
borderRadius: 6,
|
|
64
35
|
border: "1px solid transparent",
|
|
65
36
|
boxShadow: "none",
|
|
66
|
-
background: "
|
|
37
|
+
background: "transparent",
|
|
67
38
|
color: "var(--graview-ink-muted)",
|
|
68
39
|
whiteSpace: "nowrap",
|
|
69
40
|
};
|
|
@@ -85,7 +56,13 @@ export function Trail({ home, homeLabel, children, }) {
|
|
|
85
56
|
*/
|
|
86
57
|
const crumb = homeLabel !== undefined && focused !== undefined;
|
|
87
58
|
const chips = [];
|
|
88
|
-
|
|
59
|
+
/*
|
|
60
|
+
* On the picture the record in focus is not named again: its own card,
|
|
61
|
+
* drawn there, says its name, and a crumb in the picture's corner stood
|
|
62
|
+
* over that card's title in a box narrower than a desk. Escape, Back and
|
|
63
|
+
* the bar's places are the ways out of it.
|
|
64
|
+
*/
|
|
65
|
+
if (focused && !onPicture) {
|
|
89
66
|
chips.push({
|
|
90
67
|
key: "focused",
|
|
91
68
|
node: (_jsxs("button", { type: "button", "data-testid": "focused",
|
|
@@ -138,7 +115,18 @@ export function Trail({ home, homeLabel, children, }) {
|
|
|
138
115
|
node: (_jsxs("button", { type: "button", "data-testid": "raised", onClick: () => show(null), title: `Stop showing ${plural(view.relation)}`, style: chip, children: [plural(view.relation), _jsx("span", { "aria-hidden": "true", style: { opacity: 0.7 }, children: "\u00D7" })] })),
|
|
139
116
|
});
|
|
140
117
|
}
|
|
141
|
-
|
|
118
|
+
if (onPicture && !crumb && chips.length === 0 && children === undefined)
|
|
119
|
+
return null;
|
|
120
|
+
return (_jsxs("nav", { "aria-label": "View", "data-testid": "trail", style: {
|
|
121
|
+
display: "flex",
|
|
122
|
+
alignItems: "center",
|
|
123
|
+
gap: 8,
|
|
124
|
+
fontSize: "0.875rem",
|
|
125
|
+
minWidth: 0,
|
|
126
|
+
...(onPicture
|
|
127
|
+
? { pointerEvents: "auto", padding: "4px 6px", borderRadius: 8, background: "var(--graview-float)", boxShadow: "var(--graview-lift-low)", overflow: "hidden" }
|
|
128
|
+
: {}),
|
|
129
|
+
}, children: [crumb ? (_jsx("button", { type: "button", onClick: () => focus(home), style: {
|
|
142
130
|
border: "none",
|
|
143
131
|
background: "none",
|
|
144
132
|
padding: "3px 0",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"trail.js","sourceRoot":"","sources":["../../src/workbench/trail.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"trail.js","sourceRoot":"","sources":["../../src/workbench/trail.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AACxE,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACpE,OAAO,EAAE,QAAQ,EAAkB,MAAM,OAAO,CAAC;AACjD,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAG1C;;;;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ACxF,IAAI,KAFQ,GAAG,CAGP,CACZ,CAAC,EACD,QAAQ,IACL,CACP,CAAC;AACJ,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@graview/primitives",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.20",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -25,11 +25,11 @@
|
|
|
25
25
|
"./montserrat-latin.woff2": "./fonts/montserrat-latin.woff2"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@graview/core": "0.1.
|
|
29
|
-
"@graview/layout": "0.1.
|
|
30
|
-
"@graview/
|
|
31
|
-
"@graview/
|
|
32
|
-
"@graview/tools": "0.1.
|
|
28
|
+
"@graview/core": "0.1.20",
|
|
29
|
+
"@graview/layout": "0.1.20",
|
|
30
|
+
"@graview/render": "0.1.20",
|
|
31
|
+
"@graview/react": "0.1.20",
|
|
32
|
+
"@graview/tools": "0.1.20"
|
|
33
33
|
},
|
|
34
34
|
"peerDependencies": {
|
|
35
35
|
"react": ">=18"
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"devDependencies": {
|
|
38
38
|
"zod": "^4.6.5"
|
|
39
39
|
},
|
|
40
|
-
"description": "The primitive set, the
|
|
40
|
+
"description": "The primitive set, the lenses, the workbench and the visual system.",
|
|
41
41
|
"keywords": [
|
|
42
42
|
"graview",
|
|
43
43
|
"context-graph",
|
package/dist/companion.d.ts
DELETED
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import { type AnySchema } from "@graview/core";
|
|
2
|
-
import { ChatPanel } from "./chat.js";
|
|
3
|
-
/**
|
|
4
|
-
* THE SEAT IS A COMPANION ATTACHED TO THE VIEWFRAME.
|
|
5
|
-
*
|
|
6
|
-
* The scene used to say the current subject four times over: the inspector
|
|
7
|
-
* listed its acts (and was the context menu at the pointer), the quick
|
|
8
|
-
* relations offered its relations, the relation key named the lines, and a
|
|
9
|
-
* robot figure walked the ground with the chat panel anchored beside it as
|
|
10
|
-
* a bubble. Four panels, one subject — and the figure had no place at all
|
|
11
|
-
* inside a full-screen lens, where there is no ground to walk on.
|
|
12
|
-
*
|
|
13
|
-
* One construct instead, on the left, where the scene already reserves a
|
|
14
|
-
* rail: a subject header, the acts, the relations, the conversation, and
|
|
15
|
-
* the key at the foot. It is fixed to the frame, so it is the same at
|
|
16
|
-
* altitude, on the ground, flying closer and inside a lens. Right-click
|
|
17
|
-
* still opens the acts at the pointer — the same pane, from the same
|
|
18
|
-
* derivation — so the context menu and the assistant are one thing.
|
|
19
|
-
*/
|
|
20
|
-
/**
|
|
21
|
-
* The key a card answers with its acts. A letter, and only on the card that
|
|
22
|
-
* has the keyboard — a character key bound to focus is not one a voice
|
|
23
|
-
* user's dictation sets off by accident (WCAG 2.1.4).
|
|
24
|
-
*/
|
|
25
|
-
export declare const ACTS_KEY = "A";
|
|
26
|
-
export interface CompanionProps<S extends AnySchema> {
|
|
27
|
-
/** How the seat answers; passed through to the conversation. */
|
|
28
|
-
readonly respond?: Parameters<typeof ChatPanel<S>>[0]["respond"];
|
|
29
|
-
readonly onCall?: Parameters<typeof ChatPanel<S>>[0]["onCall"];
|
|
30
|
-
/** Where a pick in the conversation goes; the scene's own travel when unsaid. */
|
|
31
|
-
readonly onPick?: Parameters<typeof ChatPanel<S>>[0]["onPick"];
|
|
32
|
-
/** Whether a conversation is offered at all. An app with no seat still gets the acts and the relations. */
|
|
33
|
-
readonly chat?: boolean;
|
|
34
|
-
/**
|
|
35
|
-
* Already given a box of its own — a drawer on the routed face — rather
|
|
36
|
-
* than floating over a picture. Framed, it fills what it was given,
|
|
37
|
-
* stays open, and never collapses itself for want of room: the host
|
|
38
|
-
* decided how much room there is before it mounted.
|
|
39
|
-
*/
|
|
40
|
-
readonly framed?: boolean;
|
|
41
|
-
/**
|
|
42
|
-
* HOW IT STARTS (FR-78): `"open"`, `"collapsed"` to a slim tab at the
|
|
43
|
-
* picture's edge, or `"hidden"` — no seat drawn at all. The reader's own
|
|
44
|
-
* choice, once they have made one, is remembered and wins over the
|
|
45
|
-
* start, except over `"hidden"`, which is the host's to make.
|
|
46
|
-
*/
|
|
47
|
-
readonly start?: CompanionMode;
|
|
48
|
-
/** The name the reader's choice is kept under — the app's, so two apps on one page each keep their own. */
|
|
49
|
-
readonly rememberAs?: string;
|
|
50
|
-
}
|
|
51
|
-
/** Open, put away to a slim tab, or not drawn at all (FR-78). */
|
|
52
|
-
export type CompanionMode = "open" | "collapsed" | "hidden";
|
|
53
|
-
/** The slim tab the seat is put away to, in pixels: the picture has everything else. */
|
|
54
|
-
export declare const COMPANION_TAB = 36;
|
|
55
|
-
/** Narrower than this the open seat is laid over the picture rather than taking a column of it. */
|
|
56
|
-
export declare const COMPANION_OVERLAY_BELOW = 960;
|
|
57
|
-
export declare function Companion<S extends AnySchema>({ respond, onCall, onPick, chat, framed, start, rememberAs }?: CompanionProps<S>): import("react").JSX.Element | null;
|
|
58
|
-
//# sourceMappingURL=companion.d.ts.map
|
package/dist/companion.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"companion.d.ts","sourceRoot":"","sources":["../src/companion.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAkB,KAAK,SAAS,EAAE,MAAM,eAAe,CAAC;AAK/D,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAOtC;;;;;;;;;;;;;;;;GAgBG;AAEH;;;;GAIG;AACH,eAAO,MAAM,QAAQ,MAAM,CAAC;AAoB5B,MAAM,WAAW,cAAc,CAAC,CAAC,SAAS,SAAS;IACjD,gEAAgE;IAChE,QAAQ,CAAC,OAAO,CAAC,EAAE,UAAU,CAAC,OAAO,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC;IACjE,QAAQ,CAAC,MAAM,CAA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