@graview/primitives 0.1.17 → 0.1.19

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 (235) hide show
  1. package/README.md +5 -2
  2. package/dist/app-bar.d.ts +54 -1
  3. package/dist/app-bar.d.ts.map +1 -1
  4. package/dist/app-bar.js +277 -62
  5. package/dist/app-bar.js.map +1 -1
  6. package/dist/arrange-bar.d.ts +1 -1
  7. package/dist/arrange-bar.d.ts.map +1 -1
  8. package/dist/arrange-bar.js +48 -16
  9. package/dist/arrange-bar.js.map +1 -1
  10. package/dist/bar-panes-door.d.ts +8 -0
  11. package/dist/bar-panes-door.d.ts.map +1 -0
  12. package/dist/bar-panes-door.js +10 -0
  13. package/dist/bar-panes-door.js.map +1 -0
  14. package/dist/bar-panes.d.ts +3 -1
  15. package/dist/bar-panes.d.ts.map +1 -1
  16. package/dist/bar-panes.js +12 -5
  17. package/dist/bar-panes.js.map +1 -1
  18. package/dist/chat.d.ts +68 -30
  19. package/dist/chat.d.ts.map +1 -1
  20. package/dist/chat.js +206 -223
  21. package/dist/chat.js.map +1 -1
  22. package/dist/connections.d.ts +7 -1
  23. package/dist/connections.d.ts.map +1 -1
  24. package/dist/connections.js +13 -13
  25. package/dist/connections.js.map +1 -1
  26. package/dist/declared-lens-doors.d.ts +21 -3
  27. package/dist/declared-lens-doors.d.ts.map +1 -1
  28. package/dist/declared-lens-doors.js +62 -27
  29. package/dist/declared-lens-doors.js.map +1 -1
  30. package/dist/declared-lenses.d.ts.map +1 -1
  31. package/dist/declared-lenses.js +4 -7
  32. package/dist/declared-lenses.js.map +1 -1
  33. package/dist/default-view.d.ts +2 -0
  34. package/dist/default-view.d.ts.map +1 -1
  35. package/dist/default-view.js +10 -4
  36. package/dist/default-view.js.map +1 -1
  37. package/dist/default-views.d.ts.map +1 -1
  38. package/dist/default-views.js +195 -42
  39. package/dist/default-views.js.map +1 -1
  40. package/dist/draft-door.d.ts +3 -0
  41. package/dist/draft-door.d.ts.map +1 -0
  42. package/dist/draft-door.js +22 -0
  43. package/dist/draft-door.js.map +1 -0
  44. package/dist/draft-frame.d.ts +25 -0
  45. package/dist/draft-frame.d.ts.map +1 -0
  46. package/dist/draft-frame.js +69 -0
  47. package/dist/draft-frame.js.map +1 -0
  48. package/dist/editable.d.ts +35 -1
  49. package/dist/editable.d.ts.map +1 -1
  50. package/dist/editable.js +93 -23
  51. package/dist/editable.js.map +1 -1
  52. package/dist/figure.js +1 -1
  53. package/dist/figure.js.map +1 -1
  54. package/dist/find.d.ts.map +1 -1
  55. package/dist/find.js +46 -11
  56. package/dist/find.js.map +1 -1
  57. package/dist/frame.d.ts +8 -6
  58. package/dist/frame.d.ts.map +1 -1
  59. package/dist/frame.js +7 -5
  60. package/dist/frame.js.map +1 -1
  61. package/dist/index.d.ts +23 -11
  62. package/dist/index.d.ts.map +1 -1
  63. package/dist/index.js +20 -9
  64. package/dist/index.js.map +1 -1
  65. package/dist/lens/board.d.ts.map +1 -1
  66. package/dist/lens/board.js +7 -3
  67. package/dist/lens/board.js.map +1 -1
  68. package/dist/lens/calendar-dates.d.ts +2 -0
  69. package/dist/lens/calendar-dates.d.ts.map +1 -1
  70. package/dist/lens/calendar-dates.js +2 -0
  71. package/dist/lens/calendar-dates.js.map +1 -1
  72. package/dist/lens/calendar-drawing.d.ts +2 -2
  73. package/dist/lens/calendar-drawing.d.ts.map +1 -1
  74. package/dist/lens/calendar-drawing.js +1 -2
  75. package/dist/lens/calendar-drawing.js.map +1 -1
  76. package/dist/lens/calendar-options.d.ts +8 -1
  77. package/dist/lens/calendar-options.d.ts.map +1 -1
  78. package/dist/lens/calendar-options.js +5 -0
  79. package/dist/lens/calendar-options.js.map +1 -1
  80. package/dist/lens/calendar-spans.d.ts.map +1 -1
  81. package/dist/lens/calendar-spans.js +1 -2
  82. package/dist/lens/calendar-spans.js.map +1 -1
  83. package/dist/lens/calendar-view.d.ts +2 -1
  84. package/dist/lens/calendar-view.d.ts.map +1 -1
  85. package/dist/lens/calendar-view.js +4 -3
  86. package/dist/lens/calendar-view.js.map +1 -1
  87. package/dist/lens/columns.d.ts.map +1 -1
  88. package/dist/lens/columns.js +2 -2
  89. package/dist/lens/columns.js.map +1 -1
  90. package/dist/lens/coverage.d.ts.map +1 -1
  91. package/dist/lens/coverage.js +14 -10
  92. package/dist/lens/coverage.js.map +1 -1
  93. package/dist/lens/more.d.ts.map +1 -1
  94. package/dist/lens/more.js +2 -1
  95. package/dist/lens/more.js.map +1 -1
  96. package/dist/lens-keeping.d.ts +17 -0
  97. package/dist/lens-keeping.d.ts.map +1 -0
  98. package/dist/lens-keeping.js +127 -0
  99. package/dist/lens-keeping.js.map +1 -0
  100. package/dist/lines-key.d.ts +12 -0
  101. package/dist/lines-key.d.ts.map +1 -0
  102. package/dist/lines-key.js +74 -0
  103. package/dist/lines-key.js.map +1 -0
  104. package/dist/notice-place.d.ts +3 -3
  105. package/dist/notice-place.d.ts.map +1 -1
  106. package/dist/notice-place.js +6 -4
  107. package/dist/notice-place.js.map +1 -1
  108. package/dist/notices.d.ts +6 -0
  109. package/dist/notices.d.ts.map +1 -1
  110. package/dist/notices.js +7 -1
  111. package/dist/notices.js.map +1 -1
  112. package/dist/pages.d.ts +14 -8
  113. package/dist/pages.d.ts.map +1 -1
  114. package/dist/pages.js +14 -7
  115. package/dist/pages.js.map +1 -1
  116. package/dist/places.d.ts +0 -24
  117. package/dist/places.d.ts.map +1 -1
  118. package/dist/places.js +7 -3
  119. package/dist/places.js.map +1 -1
  120. package/dist/profile.d.ts +7 -1
  121. package/dist/profile.d.ts.map +1 -1
  122. package/dist/profile.js +35 -10
  123. package/dist/profile.js.map +1 -1
  124. package/dist/prose-editor.d.ts +9 -0
  125. package/dist/prose-editor.d.ts.map +1 -0
  126. package/dist/prose-editor.js +64 -0
  127. package/dist/prose-editor.js.map +1 -0
  128. package/dist/quick-relations.d.ts.map +1 -1
  129. package/dist/quick-relations.js +2 -2
  130. package/dist/quick-relations.js.map +1 -1
  131. package/dist/reader-lenses.d.ts +21 -0
  132. package/dist/reader-lenses.d.ts.map +1 -0
  133. package/dist/reader-lenses.js +27 -0
  134. package/dist/reader-lenses.js.map +1 -0
  135. package/dist/record-head.d.ts +28 -0
  136. package/dist/record-head.d.ts.map +1 -0
  137. package/dist/record-head.js +3 -0
  138. package/dist/record-head.js.map +1 -0
  139. package/dist/relation-key.d.ts +2 -0
  140. package/dist/relation-key.d.ts.map +1 -1
  141. package/dist/relation-key.js +14 -24
  142. package/dist/relation-key.js.map +1 -1
  143. package/dist/scene-bar.d.ts +29 -0
  144. package/dist/scene-bar.d.ts.map +1 -0
  145. package/dist/scene-bar.js +72 -0
  146. package/dist/scene-bar.js.map +1 -0
  147. package/dist/scene-css.d.ts.map +1 -1
  148. package/dist/scene-css.js +538 -0
  149. package/dist/scene-css.js.map +1 -1
  150. package/dist/scene-places.d.ts +37 -0
  151. package/dist/scene-places.d.ts.map +1 -0
  152. package/dist/scene-places.js +77 -0
  153. package/dist/scene-places.js.map +1 -0
  154. package/dist/scene.d.ts +5 -2
  155. package/dist/scene.d.ts.map +1 -1
  156. package/dist/scene.js +5 -1
  157. package/dist/scene.js.map +1 -1
  158. package/dist/seat-field.d.ts +58 -0
  159. package/dist/seat-field.d.ts.map +1 -0
  160. package/dist/seat-field.js +144 -0
  161. package/dist/seat-field.js.map +1 -0
  162. package/dist/seat-move.d.ts +32 -0
  163. package/dist/seat-move.d.ts.map +1 -0
  164. package/dist/seat-move.js +56 -0
  165. package/dist/seat-move.js.map +1 -0
  166. package/dist/seat-panel.d.ts +37 -0
  167. package/dist/seat-panel.d.ts.map +1 -0
  168. package/dist/seat-panel.js +131 -0
  169. package/dist/seat-panel.js.map +1 -0
  170. package/dist/seat.d.ts +20 -58
  171. package/dist/seat.d.ts.map +1 -1
  172. package/dist/seat.js +28 -45
  173. package/dist/seat.js.map +1 -1
  174. package/dist/seeding.d.ts.map +1 -1
  175. package/dist/seeding.js +4 -4
  176. package/dist/seeding.js.map +1 -1
  177. package/dist/shell.d.ts +25 -21
  178. package/dist/shell.d.ts.map +1 -1
  179. package/dist/shell.js +46 -116
  180. package/dist/shell.js.map +1 -1
  181. package/dist/spec-views.d.ts +9 -2
  182. package/dist/spec-views.d.ts.map +1 -1
  183. package/dist/spec-views.js +55 -6
  184. package/dist/spec-views.js.map +1 -1
  185. package/dist/subject.d.ts +19 -0
  186. package/dist/subject.d.ts.map +1 -0
  187. package/dist/subject.js +159 -0
  188. package/dist/subject.js.map +1 -0
  189. package/dist/text-body.d.ts +28 -0
  190. package/dist/text-body.d.ts.map +1 -0
  191. package/dist/text-body.js +64 -0
  192. package/dist/text-body.js.map +1 -0
  193. package/dist/theme.d.ts.map +1 -1
  194. package/dist/theme.js +6 -523
  195. package/dist/theme.js.map +1 -1
  196. package/dist/view-doors.d.ts +5 -1
  197. package/dist/view-doors.d.ts.map +1 -1
  198. package/dist/view-doors.js +28 -14
  199. package/dist/view-doors.js.map +1 -1
  200. package/dist/workbench/activity.d.ts.map +1 -1
  201. package/dist/workbench/activity.js +9 -9
  202. package/dist/workbench/activity.js.map +1 -1
  203. package/dist/workbench/answer-args.d.ts.map +1 -1
  204. package/dist/workbench/answer-args.js +26 -2
  205. package/dist/workbench/answer-args.js.map +1 -1
  206. package/dist/workbench/back-out.js +3 -3
  207. package/dist/workbench/back-out.js.map +1 -1
  208. package/dist/workbench/inspector.d.ts +11 -6
  209. package/dist/workbench/inspector.d.ts.map +1 -1
  210. package/dist/workbench/inspector.js +42 -56
  211. package/dist/workbench/inspector.js.map +1 -1
  212. package/dist/workbench/standing.d.ts.map +1 -1
  213. package/dist/workbench/standing.js +4 -3
  214. package/dist/workbench/standing.js.map +1 -1
  215. package/dist/workbench/trail.d.ts +10 -17
  216. package/dist/workbench/trail.d.ts.map +1 -1
  217. package/dist/workbench/trail.js +29 -41
  218. package/dist/workbench/trail.js.map +1 -1
  219. package/package.json +7 -7
  220. package/dist/companion.d.ts +0 -73
  221. package/dist/companion.d.ts.map +0 -1
  222. package/dist/companion.js +0 -594
  223. package/dist/companion.js.map +0 -1
  224. package/dist/ladder.d.ts +0 -2
  225. package/dist/ladder.d.ts.map +0 -1
  226. package/dist/ladder.js +0 -48
  227. package/dist/ladder.js.map +0 -1
  228. package/dist/popover.d.ts +0 -21
  229. package/dist/popover.d.ts.map +0 -1
  230. package/dist/popover.js +0 -28
  231. package/dist/popover.js.map +0 -1
  232. package/dist/wordmark.d.ts +0 -15
  233. package/dist/wordmark.d.ts.map +0 -1
  234. package/dist/wordmark.js +0 -50
  235. package/dist/wordmark.js.map +0 -1
@@ -0,0 +1,37 @@
1
+ import { type Place } from "@graview/core";
2
+ import { type ViewState } from "@graview/layout/view";
3
+ import { WHOLE_KEY, type BarGo, type BarPlace } from "./app-bar.js";
4
+ export { WHOLE_KEY };
5
+ /** What the scene's first place is called. */
6
+ export declare const WHOLE_LABEL = "The whole thing";
7
+ /** The scene's places, the one in view, and the view each one goes to. */
8
+ export interface ScenePlaces {
9
+ readonly places: readonly BarPlace[];
10
+ readonly current: string;
11
+ /** The view a place goes to from here, or null for a key that is not the scene's. */
12
+ readonly to: (key: string, from: ViewState) => ViewState | null;
13
+ }
14
+ /**
15
+ * THE SCENE'S PLACES (FR-144): the whole thing, then each picture the seat
16
+ * may see, in the order they were registered; which is in view — the
17
+ * picture the view names on its kind's district, or the one that district
18
+ * draws when it names none on the ground, else the whole thing — the scene
19
+ * from above, where "Up" rises to; and the view each goes to.
20
+ * Each one's path is the scene's address for it (`/places/overview#…`), what
21
+ * a harness finds it by (`data-place-path`).
22
+ */
23
+ export declare function scenePlacesOf(input: {
24
+ readonly places: readonly Place[];
25
+ readonly hidden: ReadonlySet<string>;
26
+ readonly view: ViewState;
27
+ }): ScenePlaces;
28
+ /**
29
+ * The scene's places as the bar is handed them, from the view the provider
30
+ * holds: a press goes there, a step Back undoes it (the view is the address).
31
+ */
32
+ export declare function useScenePlaces(): {
33
+ readonly places: readonly BarPlace[];
34
+ readonly current: string;
35
+ readonly reach: BarGo;
36
+ };
37
+ //# sourceMappingURL=scene-places.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"scene-places.d.ts","sourceRoot":"","sources":["../src/scene-places.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,KAAK,KAAK,EAAE,MAAM,eAAe,CAAC;AAC1D,OAAO,EAAyE,KAAK,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAG7H,OAAO,EAAE,SAAS,EAAE,KAAK,KAAK,EAAE,KAAK,QAAQ,EAAE,MAAM,cAAc,CAAC;AAgBpE,OAAO,EAAE,SAAS,EAAE,CAAC;AACrB,8CAA8C;AAC9C,eAAO,MAAM,WAAW,oBAAoB,CAAC;AAE7C,0EAA0E;AAC1E,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,MAAM,EAAE,SAAS,QAAQ,EAAE,CAAC;IACrC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,qFAAqF;IACrF,QAAQ,CAAC,EAAE,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,KAAK,SAAS,GAAG,IAAI,CAAC;CACjE;AAKD;;;;;;;;GAQG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE;IAAE,QAAQ,CAAC,MAAM,EAAE,SAAS,KAAK,EAAE,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IAAC,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAA;CAAE,GAAG,WAAW,CAuBvJ;AAED;;;GAGG;AACH,wBAAgB,cAAc,IAAI;IAAE,QAAQ,CAAC,MAAM,EAAE,SAAS,QAAQ,EAAE,CAAC;IAAC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAA;CAAE,CAe1H"}
@@ -0,0 +1,77 @@
1
+ import { OVERVIEW_PATH } from "@graview/core";
2
+ import { aggregateId, EMPTY_VIEW, toUrl, withOverview, withPicture, withWithin } from "@graview/layout/view";
3
+ import { useGraview, useNavigation } from "@graview/react/provider";
4
+ import { useMemo } from "react";
5
+ import { WHOLE_KEY } from "./app-bar.js";
6
+ /*
7
+ * THE SCENE'S PLACES IN THE BAR (FR-144).
8
+ *
9
+ * On Pages the bar names the place you are on and lists every other; on the
10
+ * scene it said nothing after the switch, and the scene's pictures — its
11
+ * lenses — were chosen on the district's own marquee or from a panel that
12
+ * folds to a rail. The scene has its places in the bar now, the same
13
+ * control: what is in view, "The whole thing" or the picture showing, and
14
+ * every picture the scene has, grouped as on Pages. Choosing one moves the
15
+ * scene's `in.view` exactly as every other way to a picture does (a place's
16
+ * tab, Find, a link): the kind's district in focus, on the ground, showing
17
+ * that picture — and the address follows the view, as it always has.
18
+ */
19
+ export { WHOLE_KEY };
20
+ /** What the scene's first place is called. */
21
+ export const WHOLE_LABEL = "The whole thing";
22
+ /** A picture's key on the scene: its kind and its name, as on Pages but the scene's. */
23
+ const keyOf = (place) => `scene:${place.kind}:${place.as}`;
24
+ /**
25
+ * THE SCENE'S PLACES (FR-144): the whole thing, then each picture the seat
26
+ * may see, in the order they were registered; which is in view — the
27
+ * picture the view names on its kind's district, or the one that district
28
+ * draws when it names none on the ground, else the whole thing — the scene
29
+ * from above, where "Up" rises to; and the view each goes to.
30
+ * Each one's path is the scene's address for it (`/places/overview#…`), what
31
+ * a harness finds it by (`data-place-path`).
32
+ */
33
+ export function scenePlacesOf(input) {
34
+ const { view } = input;
35
+ const seen = new Set();
36
+ const pictures = input.places.filter((place) => {
37
+ if (input.hidden.has(place.kind) || seen.has(keyOf(place)))
38
+ return false;
39
+ seen.add(keyOf(place));
40
+ return true;
41
+ });
42
+ const to = (key, from) => {
43
+ // The whole thing is the scene from above, as "Up" rises to it: no picture in view.
44
+ if (key === WHOLE_KEY)
45
+ return withWithin(withOverview(from, true), "view", null);
46
+ const place = pictures.find((one) => keyOf(one) === key);
47
+ return place ? withPicture(from, place.kind, place.as) : null;
48
+ };
49
+ const places = [
50
+ { key: WHOLE_KEY, label: WHOLE_LABEL, path: `${OVERVIEW_PATH}${toUrl(to(WHOLE_KEY, EMPTY_VIEW))}`, group: "home" },
51
+ ...pictures.map((place) => ({ key: keyOf(place), label: place.title, path: `${OVERVIEW_PATH}${toUrl(to(keyOf(place), EMPTY_VIEW))}`, group: "pictures", kind: place.kind })),
52
+ ];
53
+ // Which picture a district draws when the view names none: the last registered for its kind, as the registry resolves it.
54
+ const showing = view.within?.["view"];
55
+ const drawnBy = (place) => view.focusId === aggregateId(place.kind) && (showing === undefined ? pictures.filter((one) => one.kind === place.kind).at(-1) === place : showing === place.as);
56
+ const here = pictures.find((place) => drawnBy(place) && (showing !== undefined || !view.overview));
57
+ return { places, current: here ? keyOf(here) : WHOLE_KEY, to };
58
+ }
59
+ /**
60
+ * The scene's places as the bar is handed them, from the view the provider
61
+ * holds: a press goes there, a step Back undoes it (the view is the address).
62
+ */
63
+ export function useScenePlaces() {
64
+ const { views, hiddenKinds } = useGraview();
65
+ const { view, go } = useNavigation();
66
+ const registered = views.places();
67
+ const scene = useMemo(() => scenePlacesOf({ places: registered, hidden: hiddenKinds, view }), [registered, hiddenKinds, view]);
68
+ const reach = useMemo(() => ({
69
+ go: (place) => {
70
+ const next = scene.to(place.key, view);
71
+ if (next)
72
+ go(next);
73
+ },
74
+ }), [scene, view, go]);
75
+ return { places: scene.places, current: scene.current, reach };
76
+ }
77
+ //# sourceMappingURL=scene-places.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"scene-places.js","sourceRoot":"","sources":["../src/scene-places.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAc,MAAM,eAAe,CAAC;AAC1D,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,KAAK,EAAE,YAAY,EAAE,WAAW,EAAE,UAAU,EAAkB,MAAM,sBAAsB,CAAC;AAC7H,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACpE,OAAO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companion.js";
16
- export type { CompanionMode } from "./companion.js";
15
+ export { SeatField } from "./seat-field.js";
16
+ export { DraftDoor } from "./draft-door.js";
17
+ export type { SeatFieldProps, SeatStart } from "./seat-field.js";
18
+ export { LinesKey } from "./lines-key.js";
17
19
  export { Inspector } from "./workbench/inspector.js";
18
20
  export { OverviewButton } from "./workbench/back-out.js";
19
21
  export { Places } from "./places.js";
20
22
  export { ShowInstallation } from "./installation.js";
21
23
  export { FindBox } from "./find.js";
22
24
  export { viewsCss } from "./views-css.js";
25
+ export { SceneBarTools, SceneTrail, useCallLog } from "./scene-bar.js";
23
26
  //# sourceMappingURL=scene.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"scene.d.ts","sourceRoot":"","sources":["../src/scene.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC1C,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,YAAY,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AACrD,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AACzD,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC"}
1
+ {"version":3,"file":"scene.d.ts","sourceRoot":"","sources":["../src/scene.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC1C,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,YAAY,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AACjE,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC1C,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AACrD,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AACzD,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAE1C,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC"}
package/dist/scene.js CHANGED
@@ -13,11 +13,15 @@
13
13
  */
14
14
  /* The scene's own rules, drawn by the scene face after the frame's sheet (FR-104). */
15
15
  export { sceneCss } from "./scene-css.js";
16
- export { Companion } from "./companion.js";
16
+ export { SeatField } from "./seat-field.js";
17
+ export { DraftDoor } from "./draft-door.js";
18
+ export { LinesKey } from "./lines-key.js";
17
19
  export { Inspector } from "./workbench/inspector.js";
18
20
  export { OverviewButton } from "./workbench/back-out.js";
19
21
  export { Places } from "./places.js";
20
22
  export { ShowInstallation } from "./installation.js";
21
23
  export { FindBox } from "./find.js";
22
24
  export { viewsCss } from "./views-css.js";
25
+ /* What the scene puts in the one bar — its Find and its Activity — and what it keeps on its picture: the same on the whole-page Shell and an embed. */
26
+ export { SceneBarTools, SceneTrail, useCallLog } from "./scene-bar.js";
23
27
  //# sourceMappingURL=scene.js.map
package/dist/scene.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"scene.js","sourceRoot":"","sources":["../src/scene.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,sFAAsF;AACtF,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC1C,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAE3C,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AACrD,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AACzD,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC"}
1
+ {"version":3,"file":"scene.js","sourceRoot":"","sources":["../src/scene.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,sFAAsF;AACtF,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC1C,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5C,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC1C,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AACrD,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AACzD,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC1C,uJAAuJ;AACvJ,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC"}
@@ -0,0 +1,58 @@
1
+ import { type AnySchema } from "@graview/core";
2
+ import type { Responder, ToolCall } from "@graview/tools";
3
+ import type { SeatPanelProps } from "./seat-panel.js";
4
+ /**
5
+ * THE SEAT FLOATS, AND IS QUIET.
6
+ *
7
+ * It was a rail down the scene's left edge — "SELECTED · Pay the deposit",
8
+ * nine acts with nine stars, a filter field, "Show 1 more", three canned
9
+ * questions, the relations, a log, the key to the lines — and on Pages a
10
+ * "◆ Ask" pill that opened the same rail as a drawer, beside the record
11
+ * page's own acts. A person read it as everything that could be done with
12
+ * the selected thing, in the mutations' own words.
13
+ *
14
+ * Now it is one quiet field at the foot of the picture, "Ask Things…",
15
+ * the Find box's geometry and nothing more. Asked, it grows up from the
16
+ * field into a panel over the picture — never pushing the page — that says
17
+ * where you are in a line, offers a few things to ask and at most three
18
+ * acts, and holds the conversation. A ⇄ snaps it to the other foot; on a
19
+ * phone it is a bottom sheet with a grab line to put it away. The same
20
+ * seat on the scene and on Pages, holding the app's one conversation.
21
+ *
22
+ * This file is what a page carries up front: the field. The panel —
23
+ * the conversation, the models behind it, what it offers — is fetched when
24
+ * the seat is first opened (or reached for), from `./seat-panel.js`.
25
+ *
26
+ * Accessible as a non-modal region named "Ask <the app>": opening it puts
27
+ * the keyboard in the field, Escape closes it and puts the keyboard back
28
+ * where it was, and everything in it is an ordinary button or link in the
29
+ * tab order. The person never reads the word "seat".
30
+ */
31
+ /** The seat is drawn as an ask field, or not at all (the host's choice). */
32
+ export type SeatStart = "field" | "hidden";
33
+ export interface SeatFieldProps<S extends AnySchema> {
34
+ /** How the seat answers; when unsaid, the graph first and the host's model (`ai` on the provider) after it. */
35
+ readonly respond?: Responder<S>;
36
+ /** Feeds the app's activity rail, like any other seat. */
37
+ readonly onCall?: (call: ToolCall) => void;
38
+ /** Where a name in an answer goes: the scene's own travel when unsaid; a record's page on Pages. */
39
+ readonly onPick?: (id: string) => void;
40
+ /** `"field"` (the default) draws the ask field; `"hidden"` draws no seat at all. */
41
+ readonly start?: SeatStart;
42
+ /** Where an answer takes the app: the router on Pages; the scene's own stops when unsaid. */
43
+ readonly onMove?: SeatPanelProps["onMove"];
44
+ /** The place the reader stands in, by its slug, when the face knows it (Pages' route). */
45
+ readonly place?: string;
46
+ /** A view was drawn: the face shows it (Pages goes to `/~draft`). */
47
+ readonly onDraft?: () => void;
48
+ }
49
+ /** The field's width on a desk, and the gap between it and the picture's edges. */
50
+ export declare const SEAT_WIDTH = 336;
51
+ /** Narrower than this the seat is a field across the foot, and a bottom sheet when open. */
52
+ export declare const SEAT_PHONE_BELOW = 640;
53
+ /**
54
+ * The seat, at the foot of the box it is drawn in — the scene's picture, or
55
+ * on Pages a box the routed face lays over the window (or its embed).
56
+ */
57
+ export declare function SeatField<S extends AnySchema>({ respond, onCall, onPick, start, onMove, place, onDraft }: SeatFieldProps<S>): import("react").JSX.Element | null;
58
+ //# sourceMappingURL=seat-field.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"seat-field.d.ts","sourceRoot":"","sources":["../src/seat-field.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAS,KAAK,SAAS,EAAE,MAAM,eAAe,CAAC;AAGtD,OAAO,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAI1D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAEtD;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,4EAA4E;AAC5E,MAAM,MAAM,SAAS,GAAG,OAAO,GAAG,QAAQ,CAAC;AAE3C,MAAM,WAAW,cAAc,CAAC,CAAC,SAAS,SAAS;IACjD,+GAA+G;IAC/G,QAAQ,CAAC,OAAO,CAAC,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC;IAChC,0DAA0D;IAC1D,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,QAAQ,KAAK,IAAI,CAAC;IAC3C,oGAAoG;IACpG,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC,oFAAoF;IACpF,QAAQ,CAAC,KAAK,CAAC,EAAE,SAAS,CAAC;IAC3B,6FAA6F;IAC7F,QAAQ,CAAC,MAAM,CAAC,EAAE,cAAc,CAAC,QAAQ,CAAC,CAAC;IAC3C,0FAA0F;IAC1F,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,qEAAqE;IACrE,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CAC/B;AAED,mFAAmF;AACnF,eAAO,MAAM,UAAU,MAAM,CAAC;AAE9B,4FAA4F;AAC5F,eAAO,MAAM,gBAAgB,MAAM,CAAC;AAWpC;;;GAGG;AACH,wBAAgB,SAAS,CAAC,CAAC,SAAS,SAAS,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,KAAe,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,cAAc,CAAC,CAAC,CAAC,sCAoKrI"}
@@ -0,0 +1,144 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { layer } from "@graview/core";
3
+ import { retryingImport } from "@graview/core/retry";
4
+ import { lazyModule, useGraview, useSeatTalkState } from "@graview/react/provider";
5
+ import { Suspense, useEffect, useLayoutEffect, useRef, useState } from "react";
6
+ import { FOOT_MOVED } from "./notice-place.js";
7
+ import { VISUALLY_HIDDEN } from "./primitives/measure.js";
8
+ /** The field's width on a desk, and the gap between it and the picture's edges. */
9
+ export const SEAT_WIDTH = 336;
10
+ const GAP = 16;
11
+ /** Narrower than this the seat is a field across the foot, and a bottom sheet when open. */
12
+ export const SEAT_PHONE_BELOW = 640;
13
+ const panelModule = lazyModule(retryingImport(() => import("./seat-panel.js")));
14
+ const Panel = panelModule.part((module, props) => {
15
+ const Drawn = module.SeatPanel;
16
+ return _jsx(Drawn, { ...props });
17
+ }, { what: "The conversation" });
18
+ /**
19
+ * The seat, at the foot of the box it is drawn in — the scene's picture, or
20
+ * on Pages a box the routed face lays over the window (or its embed).
21
+ */
22
+ export function SeatField({ respond, onCall, onPick, start = "field", onMove, place, onDraft }) {
23
+ const { brand, seatTalk } = useGraview();
24
+ const talk = useSeatTalkState(seatTalk);
25
+ const name = brand?.name?.trim() || "this app";
26
+ const region = useRef(null);
27
+ const field = useRef(null);
28
+ const [draft, setDraft] = useState("");
29
+ const [phone, setPhone] = useState(false);
30
+ /* Where the keyboard was before it came into the seat: where Escape puts it back. */
31
+ const cameFrom = useRef(null);
32
+ const hidden = start === "hidden";
33
+ const open = talk.open && !hidden;
34
+ /* Drawn: Find offers "Ask:" where a seat is. */
35
+ useEffect(() => (hidden ? undefined : seatTalk.drawn()), [seatTalk, hidden]);
36
+ /* A PHONE'S SEAT is a field across the foot, measured from the box it is drawn in, not the window. */
37
+ useLayoutEffect(() => {
38
+ const box = region.current?.parentElement;
39
+ if (!box)
40
+ return;
41
+ const measure = () => setPhone(box.getBoundingClientRect().width < SEAT_PHONE_BELOW);
42
+ measure();
43
+ if (typeof ResizeObserver === "undefined")
44
+ return;
45
+ const watch = new ResizeObserver(measure);
46
+ watch.observe(box);
47
+ return () => watch.disconnect();
48
+ }, [hidden]);
49
+ /* What stands above the foot — a notice — places itself again when the seat grows, shrinks or moves. */
50
+ useEffect(() => {
51
+ if (typeof window !== "undefined")
52
+ window.dispatchEvent(new Event(FOOT_MOVED));
53
+ }, [open, talk.side, phone]);
54
+ /* ASKED FROM ELSEWHERE (Find's "Ask:" row): the keyboard comes to the field, so the reader can go on. */
55
+ useEffect(() => {
56
+ if (!open || talk.pending === null)
57
+ return;
58
+ remember();
59
+ field.current?.focus({ preventScroll: true });
60
+ }, [open, talk.pending]);
61
+ const remember = () => {
62
+ const at = typeof document === "undefined" ? null : document.activeElement;
63
+ if (at instanceof HTMLElement && at !== document.body && !region.current?.contains(at))
64
+ cameFrom.current = at;
65
+ };
66
+ const openIt = () => {
67
+ remember();
68
+ panelModule.prefetch();
69
+ seatTalk.setOpen(true);
70
+ };
71
+ const close = () => {
72
+ seatTalk.setOpen(false);
73
+ const back = cameFrom.current;
74
+ cameFrom.current = null;
75
+ if (back?.isConnected)
76
+ back.focus({ preventScroll: true });
77
+ // Gone, or no longer something the keyboard can stand on (a view drawn over it): the field keeps it.
78
+ if (document.activeElement !== back)
79
+ field.current?.focus({ preventScroll: true });
80
+ };
81
+ if (hidden)
82
+ return null;
83
+ const right = !phone && talk.side === "right";
84
+ const style = phone
85
+ ? open
86
+ ? { left: 0, right: 0, bottom: 0, padding: `8px 12px calc(12px + env(safe-area-inset-bottom, 0px))`, borderRadius: "12px 12px 0 0", ...OPEN_BOX }
87
+ : { left: GAP, right: GAP, bottom: `calc(${GAP}px + env(safe-area-inset-bottom, 0px))` }
88
+ : open
89
+ ? /* The box around the field, so the field itself stays where it stood: its padding and hairline outside it. */
90
+ { [right ? "right" : "left"]: GAP / 2 - 1, bottom: GAP / 2 - 1, width: SEAT_WIDTH + GAP + 2, padding: GAP / 2, borderRadius: 12, ...OPEN_BOX }
91
+ : { [right ? "right" : "left"]: GAP, bottom: GAP, width: SEAT_WIDTH };
92
+ return (_jsxs("section", { ref: region, role: "region", "aria-label": `Ask ${name}`, "data-testid": "seat", "data-graview-seat": open ? "open" : "closed", "data-graview-seat-side": right ? "right" : "left", "data-graview-seat-shape": phone ? "phone" : "desk", "data-graview-foot": "", "data-graview-offstage": "", onMouseDown: (event) => event.stopPropagation(), onKeyDown: (event) => {
93
+ if (event.key !== "Escape" || !open)
94
+ return;
95
+ // The seat's Escape is the seat's: the scene's back-out does not hear it too.
96
+ event.preventDefault();
97
+ event.stopPropagation();
98
+ close();
99
+ }, style: {
100
+ position: "absolute",
101
+ zIndex: layer("rail"),
102
+ boxSizing: "border-box",
103
+ display: "flex",
104
+ flexDirection: "column",
105
+ gap: 8,
106
+ pointerEvents: "auto",
107
+ ...style,
108
+ }, children: [_jsxs("h2", { style: { ...VISUALLY_HIDDEN, margin: 0 }, children: ["Ask ", name] }), open ? (_jsx(Suspense, { fallback: null, children: _jsx(Panel, { phone: phone, side: right ? "right" : "left", name: name, onClose: close, ...(respond ? { respond: respond } : {}), ...(onCall ? { onCall } : {}), ...(onPick ? { onPick } : {}), ...(onMove ? { onMove } : {}), ...(place ? { place } : {}), ...(onDraft ? { onDraft } : {}) }) })) : null, _jsx("form", { onSubmit: (event) => {
109
+ event.preventDefault();
110
+ const asked = draft.trim();
111
+ if (!open)
112
+ openIt();
113
+ if (!asked || talk.busy)
114
+ return;
115
+ seatTalk.ask(asked);
116
+ setDraft("");
117
+ }, style: { display: "flex", margin: 0 }, children: _jsx("input", { ref: field, "data-testid": "seat-field", type: "text", enterKeyHint: "send", autoComplete: "off", value: draft, placeholder: `Ask ${name}…`, "aria-label": `Ask ${name}`, onPointerEnter: () => panelModule.prefetch(), onFocus: () => panelModule.prefetch(), onClick: () => {
118
+ if (!open)
119
+ openIt();
120
+ }, onChange: (event) => {
121
+ setDraft(event.target.value);
122
+ if (!open)
123
+ openIt();
124
+ }, style: {
125
+ flex: "1 1 auto",
126
+ minWidth: 0,
127
+ boxSizing: "border-box",
128
+ height: 38,
129
+ padding: "0 12px",
130
+ font: "inherit",
131
+ fontSize: "0.9375rem",
132
+ color: "var(--graview-ink)",
133
+ background: "var(--graview-panel)",
134
+ border: "1px solid var(--graview-edge)",
135
+ borderRadius: 8,
136
+ } }) })] }));
137
+ }
138
+ /** The open seat: the floating panel's ground, a hairline, and the lift that says it is over the picture. */
139
+ const OPEN_BOX = {
140
+ background: "var(--graview-float)",
141
+ border: "1px solid var(--graview-edge)",
142
+ boxShadow: "var(--graview-lift-high)",
143
+ };
144
+ //# sourceMappingURL=seat-field.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"seat-field.js","sourceRoot":"","sources":["../src/seat-field.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,KAAK,EAAkB,MAAM,eAAe,CAAC;AACtD,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAEnF,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,EAAE,QAAQ,EAA0C,MAAM,OAAO,CAAC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EACD,KAAK,EAAE;wBACL,IAAI,EAAE,UAAU;wBAChB,QAAQ,EAAE,CAAC;wBACX,SAAS,EAAE,YAAY;wBACvB,MAAM,EAAE,EAAE;wBACV,OAAO,EAAE,QAAQ;wBACjB,IAAI,EAAE,SAAS;wBACf,QAAQ,EAAE,WAAW;wBACrB,KAAK,EAAE,oBAAoB;wBAC3B,UAAU,EAAE,sBAAsB;wBAClC,MAAM,EAAE,+BAA+B;wBACvC,YAAY,EAAE,CAAC;qBAChB,GACD,GACG,IACC,CACX,CAAC;AACJ,CAAC;AAED,6GAA6G;AAC7G,MAAM,QAAQ,GAAkB;IAC9B,UAAU,EAAE,sBAAsB;IAClC,MAAM,EAAE,+BAA+B;IACvC,SAAS,EAAE,0BAA0B;CACtC,CAAC"}
@@ -0,0 +1,32 @@
1
+ import type { SeatMove } from "@graview/tools";
2
+ import { type ViewState } from "@graview/layout/view";
3
+ /**
4
+ * A SEAT'S MOVE, AS THE SCENE MAKES IT.
5
+ *
6
+ * The seat answers "go to The week" with data (`SeatMove`); the routed face
7
+ * navigates to its `address`, and the scene makes the same place a stop —
8
+ * through the same steps the bar, Find and a host's `go.place` already
9
+ * take, so a moved scene is one a person could have walked to and Back
10
+ * walks out of. Pure: the caller sets the view (which pushes history) or
11
+ * opens the pane.
12
+ */
13
+ export type SceneMove =
14
+ /** A stop to set. */
15
+ {
16
+ readonly view: ViewState;
17
+ }
18
+ /** A pane of the scene's own to open: the problems are the standing's list, not a stop. */
19
+ | {
20
+ readonly pane: "problems";
21
+ };
22
+ export declare function sceneMove(state: ViewState, move: SeatMove): SceneMove;
23
+ /** The standing's problems, opened or put away as a press on it would. */
24
+ export declare function problemsShown(shown: boolean): void;
25
+ /**
26
+ * THE SCENE MAKES A SEAT'S MOVE: a stop set through the provider (so the
27
+ * address follows it and Back walks out of it), or the problems opened at
28
+ * the standing. A drawn view standing in front of the picture is put away
29
+ * first: the reader asked to be somewhere else.
30
+ */
31
+ export declare function useSceneGo(): (move: SeatMove) => void;
32
+ //# sourceMappingURL=seat-move.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"seat-move.d.ts","sourceRoot":"","sources":["../src/seat-move.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAE/C,OAAO,EAAmG,KAAK,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAEvJ;;;;;;;;;GASG;AACH,MAAM,MAAM,SAAS;AACnB,qBAAqB;AACnB;IAAE,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAA;CAAE;AAC9B,2FAA2F;GACzF;IAAE,QAAQ,CAAC,IAAI,EAAE,UAAU,CAAA;CAAE,CAAC;AAElC,wBAAgB,SAAS,CAAC,KAAK,EAAE,SAAS,EAAE,IAAI,EAAE,QAAQ,GAAG,SAAS,CAwBrE;AAED,0EAA0E;AAC1E,wBAAgB,aAAa,CAAC,KAAK,EAAE,OAAO,GAAG,IAAI,CAGlD;AAED;;;;;GAKG;AACH,wBAAgB,UAAU,IAAI,CAAC,IAAI,EAAE,QAAQ,KAAK,IAAI,CAerD"}
@@ -0,0 +1,56 @@
1
+ import { useGraview } from "@graview/react/provider";
2
+ import { useCallback } from "react";
3
+ import { aggregateId, fromUrl, withFocus, withOverview, withPicture, withSelection, withWithin, withZoom } from "@graview/layout/view";
4
+ export function sceneMove(state, move) {
5
+ switch (move.to) {
6
+ case "place":
7
+ // The home and the scene itself are the scene's opening stop.
8
+ return { view: fromUrl("#") };
9
+ case "picture":
10
+ // A narrowing an earlier ask left on the stop is not this picture's: it goes.
11
+ return { view: withSelection(withPicture(withWithin(state, "filter", null), move.kind, move.as), []) };
12
+ case "kind": {
13
+ /*
14
+ * Down into the kind's district, close, narrowed by the same words a
15
+ * list page carries in `?filter=` — `in.filter` — with nothing chosen
16
+ * inside it: a picture named before would draw the narrowing in its
17
+ * own way, or not at all.
18
+ */
19
+ const down = withZoom(withOverview({ ...withFocus(state, aggregateId(move.kind)), relation: null }, false), true);
20
+ return { view: withSelection(withWithin(withWithin(down, "view", null), "filter", move.filter ?? null), []) };
21
+ }
22
+ case "record":
23
+ // On the ground at the record: the picture and the narrowing of the place it was found from go with it.
24
+ return { view: withSelection(withFocus(withOverview(withWithin(withWithin(state, "view", null), "filter", null), false), move.id), [move.id]) };
25
+ case "problems":
26
+ return { pane: "problems" };
27
+ }
28
+ }
29
+ /** The standing's problems, opened or put away as a press on it would. */
30
+ export function problemsShown(shown) {
31
+ const standing = typeof document === "undefined" ? null : document.querySelector('[data-testid="standing"]');
32
+ if (standing && (standing.getAttribute("aria-expanded") === "true") !== shown)
33
+ standing.click();
34
+ }
35
+ /**
36
+ * THE SCENE MAKES A SEAT'S MOVE: a stop set through the provider (so the
37
+ * address follows it and Back walks out of it), or the problems opened at
38
+ * the standing. A drawn view standing in front of the picture is put away
39
+ * first: the reader asked to be somewhere else.
40
+ */
41
+ export function useSceneGo() {
42
+ const { setView, seatTalk } = useGraview();
43
+ return useCallback((move) => {
44
+ if (seatTalk.get().draft)
45
+ seatTalk.setDraft(null);
46
+ // The standing is the scene's list of problems: opened as a press would open it, and put away when the seat goes elsewhere.
47
+ problemsShown(move.to === "problems");
48
+ if (move.to === "problems")
49
+ return;
50
+ setView((state) => {
51
+ const made = sceneMove(state, move);
52
+ return "view" in made ? made.view : state;
53
+ });
54
+ }, [setView, seatTalk]);
55
+ }
56
+ //# sourceMappingURL=seat-move.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"seat-move.js","sourceRoot":"","sources":["../src/seat-move.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAErD,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AACpC,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,WAAW,EAAE,aAAa,EAAE,UAAU,EAAE,QAAQ,EAAkB,MAAM,sBAAsB,CAAC;AAkBvJ,MAAM,UAAU,SAAS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0E;AAC1E,MAAM,UAAU,aAAa,CAAC,KAAc;IAC1C,MAAM,QAAQ,GAAG,OAAO,QAAQ,KAAK,WAAW,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC,aAAa,CAAoB,0BAA0B,CAAC,CAAC;IAChI,IAAI,QAAQ,IAAI,CAAC,QAAQ,CAAC,YAAY,CAAC,eAAe,CAAC,KAAK,MAAM,CAAC,KAAK,KAAK;QAAE,QAAQ,CAAC,KAAK,EAAE,CAAC;AAClG,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,UAAU;IACxB,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,GAAG,UAAU,EAAE,CAAC;IAC3C,OAAO,WAAW,CAChB,CAAC,IAAc,EAAE,EAAE;QACjB,IAAI,QAAQ,CAAC,GAAG,EAAE,CAAC,KAAK;YAAE,QAAQ,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;QAClD,4HAA4H;QAC5H,aAAa,CAAC,IAAI,CAAC,EAAE,KAAK,UAAU,CAAC,CAAC;QACtC,IAAI,IAAI,CAAC,EAAE,KAAK,UAAU;YAAE,OAAO;QACnC,OAAO,CAAC,CAAC,KAAK,EAAE,EAAE;YAChB,MAAM,IAAI,GAAG,SAAS,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;YACpC,OAAO,MAAM,IAAI,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC;QAC5C,CAAC,CAAC,CAAC;IACL,CAAC,EACD,CAAC,OAAO,EAAE,QAAQ,CAAC,CACpB,CAAC;AACJ,CAAC"}
@@ -0,0 +1,37 @@
1
+ import { type AnySchema } from "@graview/core";
2
+ import { type Responder, type SeatMove, type ToolCall } from "@graview/tools";
3
+ /**
4
+ * THE OPEN SEAT — fetched when the seat is first opened (`seat-field.tsx`).
5
+ *
6
+ * A row of two quiet controls (the other foot, and close; on a phone a
7
+ * grab line), then — with nothing asked yet — one plain line about
8
+ * where the reader is, at most three things to ask and at most three acts,
9
+ * and the conversation. No heading over it saying what it is about, no
10
+ * stack of acts, no stars, no filter: the rest is one question away.
11
+ */
12
+ export interface SeatPanelProps {
13
+ readonly phone: boolean;
14
+ readonly side: "left" | "right";
15
+ /** The app's name, as the field says it: "Ask Things". */
16
+ readonly name: string;
17
+ readonly onClose: () => void;
18
+ readonly respond?: Responder<AnySchema>;
19
+ readonly onCall?: (call: ToolCall) => void;
20
+ readonly onPick?: (id: string) => void;
21
+ /** Where an answer takes the app: the router on Pages; the scene's own stops when unsaid. */
22
+ readonly onMove?: (move: SeatMove) => void;
23
+ /** The place the reader stands in, by its slug, as the face knows it. */
24
+ readonly place?: string;
25
+ /** A view was drawn: the face shows it (Pages goes to `/~draft`). */
26
+ readonly onDraft?: () => void;
27
+ }
28
+ export declare function SeatPanel({ phone, side, name, onClose, respond, onCall, onPick, onMove, place, onDraft }: SeatPanelProps): import("react").JSX.Element;
29
+ /**
30
+ * WHERE A NAME IN AN ANSWER TAKES THE READER — the one place the seat moves
31
+ * the app. A face that knows its own way (Pages: the record's page) says so
32
+ * with `onPick`; on the scene the thing is chosen and flown to. When the
33
+ * seat's answers carry moves of their own (a place, a list narrowed by a
34
+ * date), they are applied here too, so both faces move the same way.
35
+ */
36
+ export declare function useSeatGo(onPick?: (id: string) => void): (id: string) => void;
37
+ //# sourceMappingURL=seat-panel.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"seat-panel.d.ts","sourceRoot":"","sources":["../src/seat-panel.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAgB,KAAK,SAAS,EAAE,MAAM,eAAe,CAAC;AAG7D,OAAO,EAA6B,KAAK,SAAS,EAAE,KAAK,QAAQ,EAAE,KAAK,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AASzG;;;;;;;;GAQG;AAEH,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC;IACxB,QAAQ,CAAC,IAAI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