@graview/primitives 0.1.0

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 (207) hide show
  1. package/LICENSE +96 -0
  2. package/README.md +25 -0
  3. package/dist/arrange-bar.d.ts +49 -0
  4. package/dist/arrange-bar.d.ts.map +1 -0
  5. package/dist/arrange-bar.js +264 -0
  6. package/dist/arrange-bar.js.map +1 -0
  7. package/dist/chat.d.ts +46 -0
  8. package/dist/chat.d.ts.map +1 -0
  9. package/dist/chat.js +343 -0
  10. package/dist/chat.js.map +1 -0
  11. package/dist/companion.d.ts +58 -0
  12. package/dist/companion.d.ts.map +1 -0
  13. package/dist/companion.js +433 -0
  14. package/dist/companion.js.map +1 -0
  15. package/dist/connections.d.ts +23 -0
  16. package/dist/connections.d.ts.map +1 -0
  17. package/dist/connections.js +100 -0
  18. package/dist/connections.js.map +1 -0
  19. package/dist/default-views.d.ts +35 -0
  20. package/dist/default-views.d.ts.map +1 -0
  21. package/dist/default-views.js +605 -0
  22. package/dist/default-views.js.map +1 -0
  23. package/dist/editable.d.ts +71 -0
  24. package/dist/editable.d.ts.map +1 -0
  25. package/dist/editable.js +225 -0
  26. package/dist/editable.js.map +1 -0
  27. package/dist/figure.d.ts +30 -0
  28. package/dist/figure.d.ts.map +1 -0
  29. package/dist/figure.js +66 -0
  30. package/dist/figure.js.map +1 -0
  31. package/dist/find.d.ts +5 -0
  32. package/dist/find.d.ts.map +1 -0
  33. package/dist/find.js +252 -0
  34. package/dist/find.js.map +1 -0
  35. package/dist/index.d.ts +51 -0
  36. package/dist/index.d.ts.map +1 -0
  37. package/dist/index.js +44 -0
  38. package/dist/index.js.map +1 -0
  39. package/dist/installation.d.ts +17 -0
  40. package/dist/installation.d.ts.map +1 -0
  41. package/dist/installation.js +37 -0
  42. package/dist/installation.js.map +1 -0
  43. package/dist/ladder.d.ts +2 -0
  44. package/dist/ladder.d.ts.map +1 -0
  45. package/dist/ladder.js +53 -0
  46. package/dist/ladder.js.map +1 -0
  47. package/dist/lens/arranging.d.ts +41 -0
  48. package/dist/lens/arranging.d.ts.map +1 -0
  49. package/dist/lens/arranging.js +38 -0
  50. package/dist/lens/arranging.js.map +1 -0
  51. package/dist/lens/board.d.ts +146 -0
  52. package/dist/lens/board.d.ts.map +1 -0
  53. package/dist/lens/board.js +658 -0
  54. package/dist/lens/board.js.map +1 -0
  55. package/dist/lens/calendar-dates.d.ts +19 -0
  56. package/dist/lens/calendar-dates.d.ts.map +1 -0
  57. package/dist/lens/calendar-dates.js +55 -0
  58. package/dist/lens/calendar-dates.js.map +1 -0
  59. package/dist/lens/calendar-drawing.d.ts +59 -0
  60. package/dist/lens/calendar-drawing.d.ts.map +1 -0
  61. package/dist/lens/calendar-drawing.js +229 -0
  62. package/dist/lens/calendar-drawing.js.map +1 -0
  63. package/dist/lens/calendar-options.d.ts +107 -0
  64. package/dist/lens/calendar-options.d.ts.map +1 -0
  65. package/dist/lens/calendar-options.js +19 -0
  66. package/dist/lens/calendar-options.js.map +1 -0
  67. package/dist/lens/calendar-placing.d.ts +35 -0
  68. package/dist/lens/calendar-placing.d.ts.map +1 -0
  69. package/dist/lens/calendar-placing.js +113 -0
  70. package/dist/lens/calendar-placing.js.map +1 -0
  71. package/dist/lens/calendar-spans.d.ts +48 -0
  72. package/dist/lens/calendar-spans.d.ts.map +1 -0
  73. package/dist/lens/calendar-spans.js +146 -0
  74. package/dist/lens/calendar-spans.js.map +1 -0
  75. package/dist/lens/calendar-view.d.ts +34 -0
  76. package/dist/lens/calendar-view.d.ts.map +1 -0
  77. package/dist/lens/calendar-view.js +228 -0
  78. package/dist/lens/calendar-view.js.map +1 -0
  79. package/dist/lens/calendar.d.ts +43 -0
  80. package/dist/lens/calendar.d.ts.map +1 -0
  81. package/dist/lens/calendar.js +43 -0
  82. package/dist/lens/calendar.js.map +1 -0
  83. package/dist/lens/coverage.d.ts +183 -0
  84. package/dist/lens/coverage.d.ts.map +1 -0
  85. package/dist/lens/coverage.js +732 -0
  86. package/dist/lens/coverage.js.map +1 -0
  87. package/dist/lens/horizon.d.ts +14 -0
  88. package/dist/lens/horizon.d.ts.map +1 -0
  89. package/dist/lens/horizon.js +20 -0
  90. package/dist/lens/horizon.js.map +1 -0
  91. package/dist/lens/more.d.ts +16 -0
  92. package/dist/lens/more.d.ts.map +1 -0
  93. package/dist/lens/more.js +17 -0
  94. package/dist/lens/more.js.map +1 -0
  95. package/dist/lens/plan-lens.d.ts +17 -0
  96. package/dist/lens/plan-lens.d.ts.map +1 -0
  97. package/dist/lens/plan-lens.js +24 -0
  98. package/dist/lens/plan-lens.js.map +1 -0
  99. package/dist/lens/plan-state.d.ts +122 -0
  100. package/dist/lens/plan-state.d.ts.map +1 -0
  101. package/dist/lens/plan-state.js +152 -0
  102. package/dist/lens/plan-state.js.map +1 -0
  103. package/dist/lens/plan-view.d.ts +10 -0
  104. package/dist/lens/plan-view.d.ts.map +1 -0
  105. package/dist/lens/plan-view.js +576 -0
  106. package/dist/lens/plan-view.js.map +1 -0
  107. package/dist/lens/plan.d.ts +25 -0
  108. package/dist/lens/plan.d.ts.map +1 -0
  109. package/dist/lens/plan.js +25 -0
  110. package/dist/lens/plan.js.map +1 -0
  111. package/dist/lens/reach.d.ts +47 -0
  112. package/dist/lens/reach.d.ts.map +1 -0
  113. package/dist/lens/reach.js +67 -0
  114. package/dist/lens/reach.js.map +1 -0
  115. package/dist/lens/timeline.d.ts +137 -0
  116. package/dist/lens/timeline.d.ts.map +1 -0
  117. package/dist/lens/timeline.js +426 -0
  118. package/dist/lens/timeline.js.map +1 -0
  119. package/dist/markup.d.ts +23 -0
  120. package/dist/markup.d.ts.map +1 -0
  121. package/dist/markup.js +24 -0
  122. package/dist/markup.js.map +1 -0
  123. package/dist/places.d.ts +24 -0
  124. package/dist/places.d.ts.map +1 -0
  125. package/dist/places.js +227 -0
  126. package/dist/places.js.map +1 -0
  127. package/dist/popover.d.ts +28 -0
  128. package/dist/popover.d.ts.map +1 -0
  129. package/dist/popover.js +59 -0
  130. package/dist/popover.js.map +1 -0
  131. package/dist/primitives/index.d.ts +214 -0
  132. package/dist/primitives/index.d.ts.map +1 -0
  133. package/dist/primitives/index.js +381 -0
  134. package/dist/primitives/index.js.map +1 -0
  135. package/dist/profile.d.ts +65 -0
  136. package/dist/profile.d.ts.map +1 -0
  137. package/dist/profile.js +233 -0
  138. package/dist/profile.js.map +1 -0
  139. package/dist/quick-relations.d.ts +16 -0
  140. package/dist/quick-relations.d.ts.map +1 -0
  141. package/dist/quick-relations.js +183 -0
  142. package/dist/quick-relations.js.map +1 -0
  143. package/dist/relation-key.d.ts +44 -0
  144. package/dist/relation-key.d.ts.map +1 -0
  145. package/dist/relation-key.js +196 -0
  146. package/dist/relation-key.js.map +1 -0
  147. package/dist/seat.d.ts +137 -0
  148. package/dist/seat.d.ts.map +1 -0
  149. package/dist/seat.js +162 -0
  150. package/dist/seat.js.map +1 -0
  151. package/dist/seats.d.ts +21 -0
  152. package/dist/seats.d.ts.map +1 -0
  153. package/dist/seats.js +62 -0
  154. package/dist/seats.js.map +1 -0
  155. package/dist/seeding.d.ts +150 -0
  156. package/dist/seeding.d.ts.map +1 -0
  157. package/dist/seeding.js +538 -0
  158. package/dist/seeding.js.map +1 -0
  159. package/dist/shell.d.ts +74 -0
  160. package/dist/shell.d.ts.map +1 -0
  161. package/dist/shell.js +86 -0
  162. package/dist/shell.js.map +1 -0
  163. package/dist/theme.d.ts +50 -0
  164. package/dist/theme.d.ts.map +1 -0
  165. package/dist/theme.js +1692 -0
  166. package/dist/theme.js.map +1 -0
  167. package/dist/wordmark.d.ts +15 -0
  168. package/dist/wordmark.d.ts.map +1 -0
  169. package/dist/wordmark.js +55 -0
  170. package/dist/wordmark.js.map +1 -0
  171. package/dist/workbench/activity.d.ts +75 -0
  172. package/dist/workbench/activity.d.ts.map +1 -0
  173. package/dist/workbench/activity.js +259 -0
  174. package/dist/workbench/activity.js.map +1 -0
  175. package/dist/workbench/agent-seat.d.ts +51 -0
  176. package/dist/workbench/agent-seat.d.ts.map +1 -0
  177. package/dist/workbench/agent-seat.js +112 -0
  178. package/dist/workbench/agent-seat.js.map +1 -0
  179. package/dist/workbench/answer-args.d.ts +31 -0
  180. package/dist/workbench/answer-args.d.ts.map +1 -0
  181. package/dist/workbench/answer-args.js +257 -0
  182. package/dist/workbench/answer-args.js.map +1 -0
  183. package/dist/workbench/back-out.d.ts +71 -0
  184. package/dist/workbench/back-out.d.ts.map +1 -0
  185. package/dist/workbench/back-out.js +238 -0
  186. package/dist/workbench/back-out.js.map +1 -0
  187. package/dist/workbench/following.d.ts +7 -0
  188. package/dist/workbench/following.d.ts.map +1 -0
  189. package/dist/workbench/following.js +26 -0
  190. package/dist/workbench/following.js.map +1 -0
  191. package/dist/workbench/index.d.ts +23 -0
  192. package/dist/workbench/index.d.ts.map +1 -0
  193. package/dist/workbench/index.js +23 -0
  194. package/dist/workbench/index.js.map +1 -0
  195. package/dist/workbench/inspector.d.ts +27 -0
  196. package/dist/workbench/inspector.d.ts.map +1 -0
  197. package/dist/workbench/inspector.js +745 -0
  198. package/dist/workbench/inspector.js.map +1 -0
  199. package/dist/workbench/standing.d.ts +16 -0
  200. package/dist/workbench/standing.d.ts.map +1 -0
  201. package/dist/workbench/standing.js +102 -0
  202. package/dist/workbench/standing.js.map +1 -0
  203. package/dist/workbench/trail.d.ts +35 -0
  204. package/dist/workbench/trail.d.ts.map +1 -0
  205. package/dist/workbench/trail.js +150 -0
  206. package/dist/workbench/trail.js.map +1 -0
  207. package/package.json +62 -0
@@ -0,0 +1,74 @@
1
+ import type { AnySchema } from "@graview/core";
2
+ import { type Scheme, type SceneProps } from "@graview/react";
3
+ import type { Responder, ToolCall } from "@graview/tools";
4
+ import { type ReactNode } from "react";
5
+ /**
6
+ * The shell: everything an application's window holds that is not about
7
+ * its domain.
8
+ *
9
+ * The command bar — the wordmark that is the way home, the browser's own
10
+ * back and forward made visible, the trail, the other face, whether the
11
+ * rules hold, the chat, the activity and the seat, the scheme — then the
12
+ * scene with its key, its quick relations, the altitude control and the
13
+ * inspector. Three apps carried this same eighty lines each and drifted;
14
+ * now an app supplies a home, a sentence for when nothing is wrong, and
15
+ * whatever seat it wants to give an agent, and the rest is derived.
16
+ *
17
+ * Landmarks are here too, once: a heading for assistive technology (the
18
+ * wordmark is the visible one) and a main region around the scene.
19
+ */
20
+ export interface ShellProps<S extends AnySchema> {
21
+ /** The view id that is "home" for the trail and for Escape; null for the whole graph. */
22
+ readonly home?: string | null;
23
+ readonly homeLabel?: string;
24
+ /** What Standing says when no rule is broken. */
25
+ readonly standing?: string;
26
+ /** The seat in the activity rail, given the rail's own call recorder. */
27
+ readonly seat?: (onCall: (call: ToolCall) => void) => ReactNode;
28
+ /** Anything the bar shows between the browser controls and the trail — a places switcher, say. */
29
+ readonly nav?: ReactNode;
30
+ /** Where the routed face lives; null hides the link. */
31
+ readonly pagesHref?: string | null;
32
+ /** Whether the store is remembered in this browser (the rail says so, and offers the way back). */
33
+ readonly remembers?: boolean;
34
+ /** Whether the view rides the URL. */
35
+ readonly syncUrl?: boolean;
36
+ readonly renderer?: "gpu" | "dom" | "auto";
37
+ readonly attachRenderer?: SceneProps["attachRenderer"];
38
+ readonly scheme: Scheme;
39
+ readonly onScheme: (scheme: Scheme) => void;
40
+ /**
41
+ * The chat seat, on by default: it answers from the graph with no key.
42
+ *
43
+ * `{ respond }` hands it the app's OWN responder. `ChatPanel` has always
44
+ * taken one — the agent-seat skill is about writing one — and the shell
45
+ * that every app uses, and that the scaffolder wires up, exposed the panel
46
+ * as a boolean. So an app that wrote a domain responder had no way to put
47
+ * it in the scene's chat: it could turn the chat off and rebuild that part
48
+ * of the shell, or leave the generic answer in the surface most people
49
+ * actually type into. A seam is only as reachable as the most convenient
50
+ * component sitting on top of it, and a prop the shell does not forward is
51
+ * in practice a prop that does not exist.
52
+ */
53
+ readonly chat?: boolean | {
54
+ readonly respond?: Responder<S>;
55
+ };
56
+ /**
57
+ * Where a person's own record lives on the routed face. Given, the
58
+ * profile pane links to it; absent, the pane says who you are without
59
+ * pretending there is somewhere to go.
60
+ */
61
+ readonly profileHref?: (userId: string) => string;
62
+ /**
63
+ * The way into the app's own declaration — `<StudioPlace app={...} />`
64
+ * from `@graview/studio`, which an app passes because only the app knows
65
+ * which declaration it is running.
66
+ *
67
+ * A slot rather than a direct import: the shell would otherwise depend on
68
+ * the studio, the studio already depends on the shell's own primitives,
69
+ * and the cycle would be real rather than a typing accident.
70
+ */
71
+ readonly studio?: ReactNode;
72
+ }
73
+ export declare function Shell<S extends AnySchema>({ home, homeLabel, standing, seat, nav, pagesHref, remembers, syncUrl, renderer, attachRenderer, scheme, onScheme, chat, profileHref, studio, }: ShellProps<S>): import("react").JSX.Element;
74
+ //# sourceMappingURL=shell.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"shell.d.ts","sourceRoot":"","sources":["../src/shell.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,EAA4D,KAAK,MAAM,EAAE,KAAK,UAAU,EAAE,MAAM,gBAAgB,CAAC;AACxH,OAAO,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC1D,OAAO,EAAyB,KAAK,SAAS,EAAU,MAAM,OAAO,CAAC;AAmBtE;;;;;;;;;;;;;;GAcG;AACH,MAAM,WAAW,UAAU,CAAC,CAAC,SAAS,SAAS;IAC7C,yFAAyF;IACzF,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B,iDAAiD;IACjD,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC3B,yEAAyE;IACzE,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,QAAQ,KAAK,IAAI,KAAK,SAAS,CAAC;IAChE,k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Graview, UrlSync, useTheKeyboardLandsSomewhere } from "@graview/react";
3
+ import { useCallback, useState, useRef } from "react";
4
+ import { Companion } from "./companion.js";
5
+ import { VISUALLY_HIDDEN, useWidth } from "./primitives/index.js";
6
+ import { FindBox } from "./find.js";
7
+ import { ShowInstallation } from "./installation.js";
8
+ import { Profile } from "./profile.js";
9
+ import { Places } from "./places.js";
10
+ import { ActivityRail, BackOut, Backtrack, Inspector, OverviewButton, FollowingLine, Standing, Trail, } from "./workbench/index.js";
11
+ import { Wordmark } from "./wordmark.js";
12
+ /** The narrowest the Find box gets at a desk: room for a word, not a sliver. */
13
+ const FIND_FLOOR = "6rem";
14
+ export function Shell({ home = null, homeLabel, standing = "Everything is in order", seat, nav, pagesHref = "/pages", remembers = false, syncUrl = false, renderer = "dom", attachRenderer, scheme, onScheme, chat = true, profileHref, studio, }) {
15
+ const { brand } = useGraview();
16
+ // Below a laptop's width the standing and the profile keep their marks and
17
+ // give up their words; the words are their titles either way.
18
+ const bar = useRef(null);
19
+ const barWidth = useWidth(bar);
20
+ // An act that removes what the keyboard stood on lands it on what still stands.
21
+ const shell = useRef(null);
22
+ useTheKeyboardLandsSomewhere(shell);
23
+ // The standing's sentence goes first — the app's own places are worth
24
+ // more than "everything is in order" said in words — and the name behind
25
+ // the profile's mark goes at a laptop's width.
26
+ const quiet = barWidth !== null && barWidth < 1560;
27
+ const compact = barWidth !== null && barWidth < 1100;
28
+ /*
29
+ * A PHONE GETS TWO ROWS. One row that hides what it cannot hold is the
30
+ * failure the old bar was built against: at 390 a scaffolded app had no
31
+ * undo, no activity and no way back to light, painted off the edge with
32
+ * nothing to say so. Below a small laptop's width the bar wraps — the
33
+ * places as one menu on their own line — and the picture starts under it.
34
+ * The line is where one row stops holding the name, the places, a Find
35
+ * box with room to type in and the profile: at 720 a long record's name
36
+ * pushed the profile — the seat switcher — off the screen, so it is 920.
37
+ */
38
+ const narrow = barWidth !== null && barWidth < 920;
39
+ const [calls, setCalls] = useState([]);
40
+ const onCall = useCallback((call) => {
41
+ setCalls((current) => {
42
+ // A call that settles replaces its own "running" entry rather than
43
+ // stacking on it, so the rail shows twelve turns, not twelve halves.
44
+ const settling = call.phase !== "running" && current[0]?.name === call.name && current[0]?.at === call.at;
45
+ return [call, ...(settling ? current.slice(1) : current)].slice(0, 12);
46
+ });
47
+ }, []);
48
+ return (_jsxs("div", { ref: shell, style: { display: "flex", flexDirection: "column", height: "100vh", overflow: "hidden" }, children: [_jsxs("header", { ref: bar,
49
+ /*
50
+ * ONE ROW. Three regions: who this is and the way back, on the
51
+ * left; the app's own places, in the middle, as one segmented
52
+ * control that hands what it cannot hold to a menu rather than
53
+ * wrapping; and what is true and who you are, on the right, which
54
+ * shed their words before the bar sheds anything else. The bar
55
+ * used to wrap into two rows of equal pills at a laptop's width,
56
+ * and a bar that is two rows tall is a picture that starts lower.
57
+ */
58
+ style: {
59
+ display: "flex",
60
+ alignItems: "center",
61
+ flexWrap: narrow ? "wrap" : "nowrap",
62
+ gap: narrow ? "6px 10px" : 14,
63
+ boxSizing: "border-box",
64
+ padding: narrow ? "8px 12px" : "0 16px",
65
+ ...(narrow ? { minHeight: 54 } : { height: 54 }),
66
+ flex: "0 0 auto",
67
+ borderBottom: "1px solid var(--graview-edge)",
68
+ background: "var(--graview-bar)",
69
+ backdropFilter: "blur(14px)",
70
+ position: "relative",
71
+ zIndex: 20,
72
+ // Never clipped: the profile, the standing and the activity hang
73
+ // their panes from this bar, and a clip here cut them off at the
74
+ // bar's foot. The places row keeps its own overflow.
75
+ }, children: [syncUrl ? _jsx(UrlSync, {}) : null, _jsx("h1", { style: { ...VISUALLY_HIDDEN, margin: 0 }, children: brand?.name ?? "Graview" }), _jsxs("div", { style: { display: "flex", alignItems: "center", gap: 10, minWidth: 0, ...(narrow ? { flexWrap: "wrap", flex: "1 1 auto", rowGap: 6 } : { flex: "0 0 auto" }) }, children: [_jsx(Wordmark, {}), _jsx(Backtrack, {}), pagesHref ? (
76
+ // THE TWO FACES, as one switch: the scene, and the same app as pages.
77
+ _jsxs("div", { role: "group", "aria-label": "Face", "data-testid": "faces", style: { display: "inline-flex", padding: 3, gap: 2, borderRadius: 999, border: "1px solid var(--graview-edge)", background: "var(--graview-panel-muted)", flex: "0 0 auto" }, children: [_jsx("span", { "aria-current": "page", style: { display: "inline-flex", alignItems: "center", minHeight: 26, padding: "2px 11px", borderRadius: 999, fontSize: "0.8125rem", fontWeight: 600, color: "var(--graview-ink)", background: "var(--graview-panel)", border: "1px solid var(--graview-edge)" }, children: "Scene" }), _jsx("a", { href: pagesHref, "data-testid": "pages-link", title: "The same app, as ordinary pages", style: { display: "inline-flex", alignItems: "center", minHeight: 26, padding: "2px 11px", borderRadius: 999, fontSize: "0.8125rem", fontWeight: 500, color: "var(--graview-ink-muted)", textDecoration: "none" }, children: "Pages" })] })) : null, nav, _jsx(Trail, { home: home, ...(homeLabel !== undefined ? { homeLabel } : {}) })] }), _jsx("div", { style: narrow ? { flex: "1 1 100%", order: 3, minWidth: 0, display: "flex" } : { flex: "1 1 auto", minWidth: 0, display: "flex", justifyContent: "center" }, children: _jsx(Places, { compact: narrow }) }), _jsx("div", { style: narrow ? { flex: "1 1 100%", order: 4, minWidth: 0, display: "flex" } : { flex: "0 1 15rem", minWidth: FIND_FLOOR, display: "flex" }, children: _jsx(FindBox, { compact: narrow }) }), _jsxs("div", { style: {
78
+ display: "flex",
79
+ alignItems: "center",
80
+ justifyContent: "flex-end",
81
+ gap: 8,
82
+ flex: narrow ? "1 1 auto" : "0 0 auto",
83
+ minWidth: 0,
84
+ }, children: [_jsx(Standing, { clean: standing, compact: quiet }), _jsx(FollowingLine, {}), _jsx(ActivityRail, { remembers: remembers, calls: calls, seat: seat?.(onCall) }), _jsx(Profile, { scheme: scheme, onScheme: onScheme, compact: compact, ...(profileHref ? { profileHref } : {}), keeping: _jsxs(_Fragment, { children: [_jsx(ShowInstallation, {}), studio] }) })] })] }), _jsx(BackOut, { home: home }), _jsxs("main", { tabIndex: -1, style: { position: "relative", flex: "1 1 auto", minHeight: 0, containerType: "size", outline: "none" }, children: [_jsx(Scene, { renderer: renderer, ...(attachRenderer ? { attachRenderer } : {}) }), _jsx(OverviewButton, {}), _jsx(Companion, { chat: chat !== false, onCall: onCall, ...(typeof chat === "object" && chat.respond ? { respond: chat.respond } : {}) }), _jsx(Inspector, { placement: "menu" })] })] }));
85
+ }
86
+ //# sourceMappingURL=shell.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"shell.js","sourceRoot":"","sources":["../src/shell.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,OAAO,EAAE,4BAA4B,EAAgC,MAAM,gBAAgB,CAAC;AAExH,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAkB,MAAM,EAAE,MAAM,OAAO,CAAC;AACtE,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAClE,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EACL,YAAY,EACZ,OAAO,EACP,SAAS,EACT,SAAS,EACT,cAAc,EACd,aAAa,EACb,QAAQ,EACR,KAAK,GACN,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAqEzC,gFAAgF;AAChF,MAAM,UAAU,GAAG,MAAM,CAAC;AAE1B,MAAM,UAAU,KAAK,CAAsB,EACzC,IAAI,GAAG,IAAI,EACX,SAAS,EACT,QAAQ,GAAG,wBAAwB,EACnC,IAAI,EACJ,GAAG,EACH,SAAS,GAAG,QAAQ,EACpB,SAAS,GAAG,KAAK,EACjB,OAAO,GAAG,KAAK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AE,IAAI,EAAE,IAAI,EAAE,CAAC,MAAM,CAAC,GAAI,EAQ1E,KAAC,OAAO,IACN,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,QAAQ,EAClB,OAAO,EAAE,OAAO,KACZ,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE,WAAW,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,EACxC,OAAO,EACL,8BACE,KAAC,gBAAgB,KAAM,EACtB,MAAM,IACN,GAEL,IACE,IACC,EAET,KAAC,OAAO,IAAC,IAAI,EAAE,IAAI,GAAI,EAMvB,gBACE,QAAQ,EAAE,CAAC,CAAC,EACZ,KAAK,EAAE,EAAE,QAAQ,EAAE,UAAU,EAAE,IAAI,EAAE,UAAU,EAAE,SAAS,EAAE,CAAC,EAAE,aAAa,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,aAEvG,KAAC,KAAK,IAAC,QAAQ,EAAE,QAAQ,KAAM,CAAC,cAAc,CAAC,CAAC,CAAC,EAAE,cAAc,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,GAAI,EAE7E,KAAC,cAAc,KAAG,EASlB,KAAC,SAAS,IACR,IAAI,EAAE,IAAI,KAAK,KAAK,EACpB,MAAM,EAAE,MAAM,KACV,CAAC,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,GAC/E,EAEF,KAAC,SAAS,IAAC,SAAS,EAAC,MAAM,GAAG,IACzB,IACH,CACP,CAAC;AACJ,CAAC"}
@@ -0,0 +1,50 @@
1
+ /**
2
+ * The visual system.
3
+ *
4
+ * Two schemes, and they are not inversions of each other. Depth is the thing
5
+ * being drawn, and depth behaves differently in the two:
6
+ *
7
+ * - **Dark** is a lit control surface. Things at depth lose luminance and
8
+ * dissolve into the ground; the accent reads as light, and separation comes
9
+ * from glow and a lit edge.
10
+ * - **Light** is daylight and paper. Things at depth lose CONTRAST and gain
11
+ * haze — real atmospheric perspective — and separation comes from soft
12
+ * cast shadow, the way objects on a desk separate. Inverting the dark
13
+ * scheme would give grey-on-grey mush, because glow does not exist in
14
+ * daylight.
15
+ *
16
+ * One rule holds across both: **secondary text is a colour, never an
17
+ * opacity.** Opacity composites against whatever is behind and fails contrast
18
+ * silently. axe-core checks this on every run of `scripts/run-a11y.mjs`.
19
+ */
20
+ export type { Brand, Scheme, ThemeTokens } from "@graview/core";
21
+ import type { Brand, Scheme, ThemeTokens } from "@graview/core";
22
+ export { DARK, LIGHT, SCHEMES } from "@graview/core";
23
+ /**
24
+ * The framework's own brand, expressed as an ordinary declared one.
25
+ *
26
+ * No special case for the built-ins: `themeCss` takes a brand and this is
27
+ * simply the default value. That is the only way to know a third party's
28
+ * theme goes through the same path — if the shipped one took a shortcut, the
29
+ * shortcut is where a stranger's theme would break.
30
+ */
31
+ export declare const GRAVIEW_BRAND: Brand;
32
+ export declare function themeVariables(tokens: ThemeTokens): string;
33
+ /**
34
+ * The stylesheet an app drops in.
35
+ *
36
+ * Everything the primitives reference is a custom property, so a host can
37
+ * override a single token without forking a component — and switching scheme
38
+ * is one `replaceSync`, not a re-render.
39
+ */
40
+ export interface ThemeCssOptions {
41
+ /**
42
+ * A selector to scope the theme to — an embed's root element — instead of
43
+ * the document. The tokens land on that element and the ground, type and
44
+ * colour that `html, body` would have taken land there too, so a Graview
45
+ * inside somebody else's page is themed without touching their page.
46
+ */
47
+ readonly scope?: string;
48
+ }
49
+ export declare function themeCss(scheme?: Scheme, brand?: Brand, options?: ThemeCssOptions): string;
50
+ //# sourceMappingURL=theme.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../src/theme.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAYH,YAAY,EAAE,KAAK,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAChE,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAUhE,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAIrD;;;;;;;GAOG;AACH,eAAO,MAAM,aAAa,EAAE,KAO3B,CAAC;AA4BF,wBAAgB,cAAc,CAAC,MAAM,EAAE,WAAW,GAAG,MAAM,CAI1D;AAED;;;;;;GAMG;AACH,MAAM,WAAW,eAAe;IAC9B;;;;;OAKG;IACH,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;CACzB;AA0BD,wBAAgB,QAAQ,CACtB,MAAM,GAAE,MAAe,EACvB,KAAK,GAAE,KAAqB,EAC5B,OAAO,GAAE,eAAoB,GAC5B,MAAM,CA+jDR"}