@graview/pages 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 (79) hide show
  1. package/LICENSE +96 -0
  2. package/README.md +47 -0
  3. package/dist/ask.d.ts +21 -0
  4. package/dist/ask.d.ts.map +1 -0
  5. package/dist/ask.js +109 -0
  6. package/dist/ask.js.map +1 -0
  7. package/dist/face-controls.d.ts +68 -0
  8. package/dist/face-controls.d.ts.map +1 -0
  9. package/dist/face-controls.js +231 -0
  10. package/dist/face-controls.js.map +1 -0
  11. package/dist/face-placed.d.ts +16 -0
  12. package/dist/face-placed.d.ts.map +1 -0
  13. package/dist/face-placed.js +34 -0
  14. package/dist/face-placed.js.map +1 -0
  15. package/dist/facts.d.ts +115 -0
  16. package/dist/facts.d.ts.map +1 -0
  17. package/dist/facts.js +180 -0
  18. package/dist/facts.js.map +1 -0
  19. package/dist/form.d.ts +53 -0
  20. package/dist/form.d.ts.map +1 -0
  21. package/dist/form.js +183 -0
  22. package/dist/form.js.map +1 -0
  23. package/dist/index.d.ts +15 -0
  24. package/dist/index.d.ts.map +1 -0
  25. package/dist/index.js +8 -0
  26. package/dist/index.js.map +1 -0
  27. package/dist/page-context.d.ts +74 -0
  28. package/dist/page-context.d.ts.map +1 -0
  29. package/dist/page-context.js +38 -0
  30. package/dist/page-context.js.map +1 -0
  31. package/dist/page-home.d.ts +19 -0
  32. package/dist/page-home.d.ts.map +1 -0
  33. package/dist/page-home.js +67 -0
  34. package/dist/page-home.js.map +1 -0
  35. package/dist/page-list.d.ts +23 -0
  36. package/dist/page-list.d.ts.map +1 -0
  37. package/dist/page-list.js +196 -0
  38. package/dist/page-list.js.map +1 -0
  39. package/dist/page-map.d.ts +20 -0
  40. package/dist/page-map.d.ts.map +1 -0
  41. package/dist/page-map.js +71 -0
  42. package/dist/page-map.js.map +1 -0
  43. package/dist/page-places.d.ts +72 -0
  44. package/dist/page-places.d.ts.map +1 -0
  45. package/dist/page-places.js +304 -0
  46. package/dist/page-places.js.map +1 -0
  47. package/dist/page-problems.d.ts +58 -0
  48. package/dist/page-problems.d.ts.map +1 -0
  49. package/dist/page-problems.js +113 -0
  50. package/dist/page-problems.js.map +1 -0
  51. package/dist/page-record.d.ts +14 -0
  52. package/dist/page-record.d.ts.map +1 -0
  53. package/dist/page-record.js +111 -0
  54. package/dist/page-record.js.map +1 -0
  55. package/dist/page-search.d.ts +50 -0
  56. package/dist/page-search.d.ts.map +1 -0
  57. package/dist/page-search.js +108 -0
  58. package/dist/page-search.js.map +1 -0
  59. package/dist/page-shell.d.ts +43 -0
  60. package/dist/page-shell.d.ts.map +1 -0
  61. package/dist/page-shell.js +171 -0
  62. package/dist/page-shell.js.map +1 -0
  63. package/dist/page-typography.d.ts +54 -0
  64. package/dist/page-typography.d.ts.map +1 -0
  65. package/dist/page-typography.js +166 -0
  66. package/dist/page-typography.js.map +1 -0
  67. package/dist/pages.d.ts +19 -0
  68. package/dist/pages.d.ts.map +1 -0
  69. package/dist/pages.js +19 -0
  70. package/dist/pages.js.map +1 -0
  71. package/dist/registry.d.ts +111 -0
  72. package/dist/registry.d.ts.map +1 -0
  73. package/dist/registry.js +105 -0
  74. package/dist/registry.js.map +1 -0
  75. package/dist/router.d.ts +35 -0
  76. package/dist/router.d.ts.map +1 -0
  77. package/dist/router.js +155 -0
  78. package/dist/router.js.map +1 -0
  79. package/package.json +63 -0
@@ -0,0 +1,71 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { RelationMark } from "@graview/primitives";
3
+ import { humaniseField, labelOf } from "@graview/core";
4
+ import { Link } from "react-router-dom";
5
+ import { kindMap } from "./facts.js";
6
+ import { useGraviewIfAny } from "@graview/react";
7
+ import { pluralSlug, recordPath } from "./registry.js";
8
+ import { useStoreTick } from "./page-context.js";
9
+ import { KindMark, eyebrow, h1, h2, lede, link, liveKinds, plain, pluralOf, quiet, rule } from "./page-typography.js";
10
+ import { PageMain } from "./page-shell.js";
11
+ import { capitalise } from "./page-typography.js";
12
+ /** "anything" for a relation the declaration leaves open. */
13
+ function endOf(store, kind) {
14
+ if (kind === "*")
15
+ return { label: "anything", path: null };
16
+ return { label: pluralOf(store, kind), path: `/${pluralSlug(store.schema, kind)}` };
17
+ }
18
+ /**
19
+ * ONE RELATION, AS A LINE: its mark, the two kinds it joins with the edge's
20
+ * name between them, its own words from each end, and how many of it there
21
+ * are — the count opening the far kind's list narrowed to the ones that
22
+ * have it.
23
+ */
24
+ function RelationLine({ context, relation }) {
25
+ const { store } = context;
26
+ const from = endOf(store, relation.from);
27
+ const to = endOf(store, relation.to);
28
+ const end = (one) => (one.path ? _jsx(Link, { to: one.path, style: { ...plain, fontWeight: 550 }, children: one.label }) : _jsx("span", { children: one.label }));
29
+ return (_jsxs("li", { "data-testid": "relation", "data-relation": relation.edgeKind, style: { display: "grid", gridTemplateColumns: "30px minmax(0, 1fr) auto", gap: 12, alignItems: "baseline" }, children: [_jsx(RelationMark, { edgeKind: relation.edgeKind, ...(context.brand?.kit ? { kit: context.brand.kit } : {}) }), _jsxs("span", { style: { display: "grid", gap: 1 }, children: [_jsxs("span", { children: [end(from), " ", _jsx("span", { style: quiet, children: humaniseField(relation.edgeKind) }), " ", end(to)] }), relation.description || relation.inverse ? (_jsxs("span", { style: { ...quiet, fontSize: "0.9375rem" }, children: [relation.description ? capitalise(relation.description) : null, relation.description && relation.inverse ? " · " : null, relation.inverse ? `from the other end, ${relation.inverse}` : null] })) : null] }), to.path ? (_jsx(Link, { to: `${to.path}?with=${encodeURIComponent(relation.edgeKind)}`,
30
+ // A count is a small word and a real target: a fingertip's width at least.
31
+ style: { ...link, ...quiet, fontVariantNumeric: "tabular-nums", display: "inline-block", minWidth: 24, minHeight: 24, textAlign: "center" }, title: `The ${to.label.toLowerCase()} that have this`, children: relation.count })) : (_jsx("span", { style: { ...quiet, fontVariantNumeric: "tabular-nums" }, children: relation.count }))] }));
32
+ }
33
+ /**
34
+ * HOW IT FITS TOGETHER: every declared relation between the kinds, in the
35
+ * declaration's words, with its count — the roads between the districts
36
+ * and the key that names them, as a page can carry them. On the home page
37
+ * as a section; at `/map` on its own.
38
+ */
39
+ export function KindMapSection({ context, heading = true }) {
40
+ const { store } = context;
41
+ const live = new Set(liveKinds(store, context.principal));
42
+ const relations = kindMap(store).relations.filter((relation) => live.has(relation.from) && (relation.to === "*" || live.has(relation.to)));
43
+ if (relations.length === 0)
44
+ return null;
45
+ return (_jsxs("section", { style: { ...rule, display: "grid", gap: 12 }, "data-testid": "kind-map", children: [heading ? (_jsxs("div", { style: { display: "flex", alignItems: "baseline", gap: 10, flexWrap: "wrap" }, children: [_jsx("h2", { style: h2, children: _jsx(Link, { to: "/map", style: plain, children: "How it fits together" }) }), _jsx("span", { style: quiet, children: relations.length === 1 ? "1 relation" : `${relations.length} relations` })] })) : null, _jsx("ul", { style: { margin: 0, padding: 0, listStyle: "none", display: "grid", gap: 10 }, children: relations.map((relation) => (_jsx(RelationLine, { context: context, relation: relation }, `${relation.edgeKind}|${relation.from}|${relation.to}`))) })] }));
46
+ }
47
+ export function DefaultMapPage({ context }) {
48
+ const { store } = context;
49
+ useStoreTick(store);
50
+ const live = new Set(liveKinds(store, context.principal));
51
+ const map = kindMap(store);
52
+ const relations = map.relations.filter((relation) => live.has(relation.from));
53
+ return (_jsxs(PageMain, { context: context, children: [_jsxs("header", { style: { display: "grid", gap: 12 }, children: [_jsx("p", { style: eyebrow, children: relations.length === 0 ? "No relations" : `${relations.length} ${relations.length === 1 ? "relation" : "relations"}` }), _jsx("h1", { style: h1, children: "How it fits together" }), _jsx("p", { style: lede, children: relations.length === 0
54
+ ? "Nothing here is declared to relate to anything else yet."
55
+ : "The kinds this installation holds, and the relations declared between them — each in the declaration's own words, with how many of it there are." })] }), _jsx("ul", { style: { margin: 0, padding: 0, listStyle: "none", display: "flex", flexWrap: "wrap", gap: "6px 18px" }, "data-testid": "map-kinds", children: map.kinds
56
+ .filter((entry) => live.has(entry.kind))
57
+ .map((entry) => (_jsxs("li", { style: { display: "inline-flex", alignItems: "center", gap: 8 }, children: [_jsx(KindMark, { kind: entry.kind, brand: context.brand, schema: store.schema, size: 7 }), _jsx(Link, { to: `/${pluralSlug(store.schema, entry.kind)}`, style: link, children: entry.plural }), _jsx("span", { style: quiet, children: entry.count })] }, entry.kind))) }), _jsx(KindMapSection, { context: context, heading: false })] }));
58
+ }
59
+ /** The questions the seat has asked and nobody has answered, each at the record it is about. */
60
+ export function SeatQuestions({ context }) {
61
+ const here = useGraviewIfAny();
62
+ const asked = [...(here?.robots.values() ?? [])].filter((one) => one.mode === "asking" && one.say);
63
+ if (asked.length === 0)
64
+ return null;
65
+ const { store } = context;
66
+ return (_jsxs("section", { style: { ...rule, display: "grid", gap: 10 }, "data-testid": "seat-questions", children: [_jsx("h2", { style: h2, children: asked.length === 1 ? "The seat asked something" : `The seat asked ${asked.length} things` }), _jsx("ul", { style: { margin: 0, padding: 0, listStyle: "none", display: "grid", gap: 8 }, children: asked.map((one) => {
67
+ const about = one.at ? store.graph.getNode(one.at) : undefined;
68
+ return (_jsxs("li", { style: { display: "grid", gap: 2 }, children: [_jsx("span", { children: one.say }), about ? (_jsxs(Link, { to: recordPath(store.schema, about.kind, about.id), style: { ...link, ...quiet }, children: [labelOf(store.schema.tryDefinition(about.kind), about), " \u2192"] })) : null] }, one.participant));
69
+ }) })] }));
70
+ }
71
+ //# sourceMappingURL=page-map.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"page-map.js","sourceRoot":"","sources":["../src/page-map.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,OAAO,EAA8B,MAAM,eAAe,CAAC;AACnF,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AACxC,OAAO,EAAE,OAAO,EAAqB,MAAM,YAAY,CAAC;AACxD,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC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AAE,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC,EAAE,YAC7E,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE;oBACjB,MAAM,KAAK,GAAG,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;oBAC/D,OAAO,CACL,cAA0B,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC,EAAE,aAC1D,yBAAO,GAAG,CAAC,GAAG,GAAQ,EACrB,KAAK,CAAC,CAAC,CAAC,CACP,MAAC,IAAI,IAAC,EAAE,EAAE,UAAU,CAAC,KAAK,CAAC,MAAM,EAAE,KAAK,CAAC,IAAc,EAAE,KAAK,CAAC,EAAE,CAAC,EAAE,KAAK,EAAE,EAAE,GAAG,IAAI,EAAE,GAAG,KAAK,EAAE,aAC7F,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,aAAa,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,KAAK,CAAC,eAClD,CACR,CAAC,CAAC,CAAC,IAAI,KAND,GAAG,CAAC,WAAW,CAOnB,CACN,CAAC;gBACJ,CAAC,CAAC,GACC,IACG,CACX,CAAC;AACJ,CAAC"}
@@ -0,0 +1,72 @@
1
+ import { type AnySchema, type Store, type Place } from "@graview/core";
2
+ import { type PageContext } from "./page-context.js";
3
+ /** The app's pictures this seat may see: registered places whose kind is live here. */
4
+ export declare function placesOf<S extends AnySchema>(context: PageContext<S>): readonly Place[];
5
+ /**
6
+ * ONE NAMED PICTURE, AND NOTHING ELSE: the lens registered under `as`, at
7
+ * full size, over the kind's current members — for a host that wants the
8
+ * picture without the app around it. The embed's picture face is this; a
9
+ * page of the app's own may use it the same way.
10
+ */
11
+ export declare function PlacePicture<S extends AnySchema>({ store, views, as, invariantContext, }: {
12
+ readonly store: Store<S>;
13
+ readonly views: NonNullable<PageContext<S>["views"]>;
14
+ readonly as: string;
15
+ readonly invariantContext?: PageContext<S>["invariantContext"];
16
+ }): import("react").JSX.Element | null;
17
+ /**
18
+ * ONE ENTRY OF THE GALLERY: a titled place, or a kind drawn by its default
19
+ * picture. The places come first — they are the app's own ways of looking —
20
+ * and a kind appears only when nothing was titled over it, so naming a lens
21
+ * replaces the kind's card rather than adding to it.
22
+ */
23
+ export interface GalleryEntry {
24
+ readonly key: string;
25
+ readonly kind: string;
26
+ readonly title: string;
27
+ readonly to: string;
28
+ readonly place?: Place;
29
+ }
30
+ export declare function galleryOf<S extends AnySchema>(context: PageContext<S>): readonly GalleryEntry[];
31
+ /**
32
+ * A CARD OF THE GALLERY: the picture drawn live and inert — nothing in it is
33
+ * a second control — with its name and how much it is over. The whole card
34
+ * is the way to the picture's page. A picture with nothing in it says so and
35
+ * names the act that would begin it, rather than showing a blank frame.
36
+ */
37
+ export declare function GalleryCard<S extends AnySchema>({ context, entry }: {
38
+ context: PageContext<S>;
39
+ entry: GalleryEntry;
40
+ }): import("react").JSX.Element;
41
+ /** A place as a card — the gallery's card, over one titled picture. */
42
+ export declare function PlaceCard<S extends AnySchema>({ context, place }: {
43
+ context: PageContext<S>;
44
+ place: Place;
45
+ }): import("react").JSX.Element;
46
+ export declare const cards: React.CSSProperties;
47
+ /**
48
+ * THE GALLERY: every picture the app has, large and live, and a card for
49
+ * every kind that has none — so no installation lands on an empty page,
50
+ * and the pictures are the biggest thing on it.
51
+ */
52
+ export declare function Gallery<S extends AnySchema>({ context }: {
53
+ context: PageContext<S>;
54
+ }): import("react").JSX.Element | null;
55
+ /**
56
+ * THE INDEX OF PICTURES, at its own address: the same gallery the home
57
+ * lands on, for a link that means "the pictures" and nothing else.
58
+ */
59
+ export declare function DefaultPlacesPage<S extends AnySchema>({ context }: {
60
+ context: PageContext<S>;
61
+ }): import("react").JSX.Element;
62
+ /**
63
+ * ONE PICTURE, FULL WIDTH: the lens over the kind's current members, what
64
+ * it is a picture of, its sibling pictures for the hop between them, the
65
+ * acts that begin the kind beneath it, and the way to the same picture in
66
+ * the scene. A pick inside it travels to the record — on a page, choosing a
67
+ * thing means going to it.
68
+ */
69
+ export declare function DefaultPlacePage<S extends AnySchema>({ context }: {
70
+ context: PageContext<S>;
71
+ }): import("react").JSX.Element;
72
+ //# sourceMappingURL=page-places.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"page-places.d.ts","sourceRoot":"","sources":["../src/page-places.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAsB,KAAK,SAAS,EAAE,KAAK,KAAK,EAAE,KAAK,KAAK,EAAE,MAAM,eAAe,CAAC;AAO3F,OAAO,EAAE,KAAK,WAAW,EAAgB,MAAM,mBAAmB,CAAC;AAmBnE,uFAAuF;AACvF,wBAAgB,QAAQ,CAAC,CAAC,SAAS,SAAS,EAAE,OAAO,EAAE,WAAW,CAAC,CAAC,CAAC,GAAG,SAAS,KAAK,EAAE,CAKvF;AA+CD;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,CAAC,SAAS,SAAS,EAAE,EAChD,KAAK,EACL,KAAK,EACL,EAAE,EACF,gBAAgB,GACjB,EAAE;IACD,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC;IACzB,QAAQ,CAAC,KAAK,EAAE,WAAW,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC;IACrD,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,gBAAgB,CAAC,EAAE,WAAW,CAAC,CAAC,CAAC,CAAC,kBAAkB,CAAC,CAAC;CAChE,sCAMA;AA2ED;;;;;GAKG;AACH,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ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from "react-router-dom";
4
+ import { kindFacts } from "./facts.js";
5
+ import { isDefaultView } from "@graview/react";
6
+ import { useLayoutEffect, useRef, useState } from "react";
7
+ import { DerivedForm } from "./form.js";
8
+ import { placeHref, placePath, pluralSlug, recordPath } from "./registry.js";
9
+ import { useStoreTick } from "./page-context.js";
10
+ import { DISPLAY, KindMark, eyebrow, h1, h2, lede, link, liveKinds, plain, pluralOf, quiet, rule, wide, } from "./page-typography.js";
11
+ import { PageMain } from "./page-shell.js";
12
+ /** The app's pictures this seat may see: registered places whose kind is live here. */
13
+ export function placesOf(context) {
14
+ const views = context.views;
15
+ if (!views)
16
+ return [];
17
+ const live = new Set(liveKinds(context.store, context.principal));
18
+ return views.places().filter((place) => live.has(place.kind));
19
+ }
20
+ function membersOf(store, kind) {
21
+ const definition = store.schema.tryDefinition(kind);
22
+ return store.graph.nodesOfKind(kind).filter((node) => isCurrent(definition, node));
23
+ }
24
+ /** "a picture of Tasks", "a picture of Skills across People". */
25
+ function pictureOf(store, place) {
26
+ const of = pluralOf(store, place.kind);
27
+ return place.across ? `A picture of ${of.toLowerCase()} across ${pluralOf(store, place.across).toLowerCase()}` : `A picture of ${of.toLowerCase()}`;
28
+ }
29
+ /** "2 plots", "12 plantings across 4 plots" — how much a picture is over, in the schema's plurals. */
30
+ function overOf(store, kind, across) {
31
+ const count = (n, of) => `${n} ${n === 1 ? of : pluralOf(store, of).toLowerCase()}`;
32
+ const held = count(membersOf(store, kind).length, kind);
33
+ return across ? `${held} across ${count(membersOf(store, across).length, across)}` : held;
34
+ }
35
+ /*
36
+ * THE LENS ITSELF, ON A PAGE. The same component the scene descends into,
37
+ * over the kind's current members, in fullscreen mode — the mode a view
38
+ * must already render correctly in, since jacking out of the scene is a
39
+ * promise every lens makes. Nothing here is a copy of a lens: it is the
40
+ * lens.
41
+ */
42
+ function LensOnPage({ context, place }) {
43
+ const { store, views, invariantContext } = context;
44
+ const registration = views?.resolve(place.kind, { cardinality: "many", fidelity: "full" }, place.as);
45
+ const View = registration?.view;
46
+ if (!View)
47
+ return null;
48
+ const members = membersOf(store, place.kind);
49
+ const flagged = [...new Set(store.violations(invariantContext).flatMap((violation) => violation.nodeIds))];
50
+ return (_jsx(View, { nodes: members, label: place.title, fidelity: "full", cardinality: "many", mode: "fullscreen", selected: false, ...(flagged.length > 0 ? { flagged } : {}) }));
51
+ }
52
+ /**
53
+ * ONE NAMED PICTURE, AND NOTHING ELSE: the lens registered under `as`, at
54
+ * full size, over the kind's current members — for a host that wants the
55
+ * picture without the app around it. The embed's picture face is this; a
56
+ * page of the app's own may use it the same way.
57
+ */
58
+ export function PlacePicture({ store, views, as, invariantContext, }) {
59
+ useStoreTick(store);
60
+ const context = { store, views, ...(invariantContext ? { invariantContext } : {}) };
61
+ const place = views.places().find((candidate) => candidate.as === as);
62
+ if (!place)
63
+ return null;
64
+ return _jsx(LensOnPage, { context: context, place: place });
65
+ }
66
+ /*
67
+ * A KIND WITH NO PICTURE OF ITS OWN, DRAWN ANYWAY.
68
+ *
69
+ * `registerDefaultViews` titles nothing, so a new app has no places — and
70
+ * until the gallery, no pictures on its pages at all. A group view the app
71
+ * wrote for the kind (untitled, so not a place) is the picture; the
72
+ * framework's own group view is a panel of six chips in the corner of a
73
+ * frame, so the card draws a CONTACT SHEET instead: each member at summary
74
+ * fidelity — the same card the scene stands in the district — laid out in
75
+ * rows. Given no registry whatsoever the members are named as chips, so the
76
+ * card is still a picture of what is there rather than a blank.
77
+ */
78
+ function KindOnPage({ context, kind }) {
79
+ const { store, views, invariantContext } = context;
80
+ const members = membersOf(store, kind);
81
+ const definition = store.schema.tryDefinition(kind);
82
+ const plural = pluralOf(store, kind);
83
+ const group = views?.resolve(kind, { cardinality: "many", fidelity: "full" });
84
+ const Group = group?.view;
85
+ const flagged = [...new Set(store.violations(invariantContext).flatMap((violation) => violation.nodeIds))];
86
+ if (Group && !isDefaultView(Group)) {
87
+ return (_jsx(Group, { nodes: members, label: plural, fidelity: "full", cardinality: "many", mode: "fullscreen", selected: false, ...(flagged.length > 0 ? { flagged } : {}) }));
88
+ }
89
+ const Summary = views?.resolve(kind, { cardinality: "one", fidelity: "summary" })?.view;
90
+ const SHEET = 8;
91
+ const shown = members.slice(0, SHEET);
92
+ return (_jsxs("div", { "data-testid": "kind-sheet", style: Summary
93
+ ? { display: "grid", gridTemplateColumns: "repeat(auto-fill, minmax(200px, 1fr))", gridAutoRows: "max-content", alignContent: "center", gap: 12, padding: 24 }
94
+ : { display: "flex", flexWrap: "wrap", alignContent: "center", justifyContent: "center", gap: 10, padding: 24 }, children: [shown.map((node) => Summary ? (_jsx(Summary, { node: node, fidelity: "summary", cardinality: "one", mode: "fullscreen", selected: false, ...(flagged.includes(node.id) ? { flagged: [node.id] } : {}) }, node.id)) : (_jsx("span", { style: {
95
+ fontSize: "1.0625rem",
96
+ padding: "8px 14px",
97
+ borderRadius: 999,
98
+ border: "1px solid var(--graview-edge-bright)",
99
+ background: "var(--graview-ground)",
100
+ color: "var(--graview-ink)",
101
+ }, children: labelOf(definition, node) }, node.id))), members.length > SHEET ? (_jsxs("span", { style: { ...quiet, alignSelf: "center", padding: "0 6px" }, children: ["+", members.length - SHEET, " more ", plural.toLowerCase()] })) : null] }));
102
+ }
103
+ export function galleryOf(context) {
104
+ const { store } = context;
105
+ const places = placesOf(context);
106
+ const pictured = new Set(places.map((place) => place.kind));
107
+ return [
108
+ ...places.map((place) => ({ key: `place:${place.as}`, kind: place.kind, title: place.title, to: placePath(place.as), place })),
109
+ ...liveKinds(store, context.principal)
110
+ .filter((kind) => !pictured.has(kind))
111
+ .map((kind) => ({ key: `kind:${kind}`, kind, title: pluralOf(store, kind), to: `/${pluralSlug(store.schema, kind)}` })),
112
+ ];
113
+ }
114
+ /**
115
+ * The scale a picture is drawn at inside its card. The frame's width is
116
+ * measured and the lens is laid out WIDER than the card by this factor, so
117
+ * its type lands near ten pixels whether the card is 560 wide on a desk or
118
+ * 358 on a phone — the same legibility at every width, rather than a fixed
119
+ * natural width that was readable in one column and mush in the other.
120
+ */
121
+ const PICTURE_SCALE = 0.72;
122
+ /** A frame's width before anything has measured it: about half of a desk's two-across gallery. */
123
+ const PICTURE_WIDTH_UNMEASURED = 540;
124
+ const PICTURE_ASPECT = 16 / 10;
125
+ function useMeasuredWidth(fallback) {
126
+ const ref = useRef(null);
127
+ const [width, setWidth] = useState(fallback);
128
+ useLayoutEffect(() => {
129
+ const element = ref.current;
130
+ if (!element || typeof ResizeObserver === "undefined")
131
+ return;
132
+ const measure = () => {
133
+ const measured = element.getBoundingClientRect().width;
134
+ if (measured > 0)
135
+ setWidth((was) => (Math.abs(was - measured) < 0.5 ? was : measured));
136
+ };
137
+ measure();
138
+ const watch = new ResizeObserver(measure);
139
+ watch.observe(element);
140
+ return () => watch.disconnect();
141
+ }, []);
142
+ return { ref, width };
143
+ }
144
+ /**
145
+ * A CARD OF THE GALLERY: the picture drawn live and inert — nothing in it is
146
+ * a second control — with its name and how much it is over. The whole card
147
+ * is the way to the picture's page. A picture with nothing in it says so and
148
+ * names the act that would begin it, rather than showing a blank frame.
149
+ */
150
+ export function GalleryCard({ context, entry }) {
151
+ const { store, brand, principal } = context;
152
+ const { ref, width } = useMeasuredWidth(PICTURE_WIDTH_UNMEASURED);
153
+ const natural = width / PICTURE_SCALE;
154
+ const members = membersOf(store, entry.kind);
155
+ const definition = store.schema.tryDefinition(entry.kind);
156
+ const beginning = members.length === 0
157
+ ? kindFacts(store, entry.kind, {
158
+ ...(principal ? { principal } : {}),
159
+ ...(context.invariantContext ? { context: context.invariantContext } : {}),
160
+ }).actions.affordances[0]
161
+ : undefined;
162
+ const isPlace = entry.place !== undefined;
163
+ return (_jsxs(Link, { to: entry.to, "data-testid": isPlace ? "place-card" : "kind-card", className: "graview-gallery-card", style: { ...plain, display: "grid", gap: 10, alignContent: "start", minWidth: 0 }, children: [_jsxs("span", { ref: ref, "data-testid": isPlace ? "place-picture" : "kind-picture", "aria-hidden": "true", inert: true, style: {
164
+ display: "block",
165
+ position: "relative",
166
+ width: "100%",
167
+ aspectRatio: `${PICTURE_ASPECT}`,
168
+ overflow: "hidden",
169
+ borderRadius: 12,
170
+ border: "1px solid var(--graview-edge)",
171
+ background: "var(--graview-panel)",
172
+ pointerEvents: "none",
173
+ }, children: [_jsx("span", { style: {
174
+ position: "absolute",
175
+ left: 0,
176
+ top: 0,
177
+ width: natural,
178
+ height: natural / PICTURE_ASPECT,
179
+ display: "grid",
180
+ gridTemplateRows: "minmax(0, 1fr)",
181
+ transform: `scale(${PICTURE_SCALE})`,
182
+ transformOrigin: "0 0",
183
+ }, children: entry.place ? _jsx(LensOnPage, { context: context, place: entry.place }) : _jsx(KindOnPage, { context: context, kind: entry.kind }) }), members.length === 0 ? (_jsx("span", { "data-testid": "picture-empty", style: {
184
+ position: "absolute",
185
+ inset: 0,
186
+ display: "grid",
187
+ placeContent: "center",
188
+ justifyItems: "center",
189
+ gap: 2,
190
+ padding: 20,
191
+ textAlign: "center",
192
+ }, children: _jsxs("span", { style: {
193
+ display: "grid",
194
+ gap: 2,
195
+ padding: "10px 16px",
196
+ borderRadius: 10,
197
+ border: "1px solid var(--graview-edge)",
198
+ background: "var(--graview-ground)",
199
+ color: "var(--graview-ink)",
200
+ }, children: [_jsxs("span", { style: { fontFamily: DISPLAY, fontWeight: 600, fontSize: "1.0625rem" }, children: ["No ", pluralOf(store, entry.kind).toLowerCase(), " yet"] }), beginning ? _jsxs("span", { style: quiet, children: ["Begin with \u201C", beginning.label, "\u201D"] }) : null] }) })) : null] }), _jsxs("span", { style: { display: "grid", gap: 2, minWidth: 0 }, children: [_jsxs("span", { style: { display: "flex", alignItems: "center", gap: 8, minWidth: 0 }, children: [isPlace ? null : _jsx(KindMark, { kind: entry.kind, brand: brand, schema: store.schema, size: 8 }), _jsx("span", { style: { fontFamily: DISPLAY, fontSize: "1.25rem", fontWeight: 600, lineHeight: 1.3, overflowWrap: "anywhere" }, children: entry.title })] }), _jsxs("span", { style: quiet, children: [entry.place ? overOf(store, entry.place.kind, entry.place.across) : overOf(store, entry.kind), !isPlace && definition?.description ? ` · ${definition.description}` : null] })] })] }));
201
+ }
202
+ /** A place as a card — the gallery's card, over one titled picture. */
203
+ export function PlaceCard({ context, place }) {
204
+ return _jsx(GalleryCard, { context: context, entry: { key: `place:${place.as}`, kind: place.kind, title: place.title, to: placePath(place.as), place } });
205
+ }
206
+ export const cards = {
207
+ display: "grid",
208
+ gap: "32px 28px",
209
+ gridTemplateColumns: "repeat(auto-fill, minmax(min(420px, 100%), 1fr))",
210
+ };
211
+ /*
212
+ * A card's frame answers the hand: its edge brightens under the pointer and
213
+ * under focus. A stylesheet rather than state, because a hundred cards
214
+ * should not each hold a hover flag, and because a focus ring drawn by the
215
+ * browser on a whole card is the right ring.
216
+ */
217
+ const GALLERY_CSS = `
218
+ .graview-gallery-card > span:first-child { transition: border-color 160ms ease, box-shadow 160ms ease; }
219
+ .graview-gallery-card:hover > span:first-child,
220
+ .graview-gallery-card:focus-visible > span:first-child { border-color: var(--graview-edge-bright); box-shadow: 0 1px 0 var(--graview-edge), 0 10px 30px -18px var(--graview-ink); }
221
+ `;
222
+ /**
223
+ * THE GALLERY: every picture the app has, large and live, and a card for
224
+ * every kind that has none — so no installation lands on an empty page,
225
+ * and the pictures are the biggest thing on it.
226
+ */
227
+ export function Gallery({ context }) {
228
+ useStoreTick(context.store);
229
+ const entries = galleryOf(context);
230
+ if (entries.length === 0)
231
+ return null;
232
+ return (_jsxs("section", { style: cards, "data-testid": "gallery", children: [_jsx("style", { children: GALLERY_CSS }), entries.map((entry) => (_jsx(GalleryCard, { context: context, entry: entry }, entry.key)))] }));
233
+ }
234
+ /**
235
+ * THE INDEX OF PICTURES, at its own address: the same gallery the home
236
+ * lands on, for a link that means "the pictures" and nothing else.
237
+ */
238
+ export function DefaultPlacesPage({ context }) {
239
+ const { store } = context;
240
+ useStoreTick(store);
241
+ const places = placesOf(context);
242
+ const entries = galleryOf(context);
243
+ return (_jsxs(PageMain, { context: context, style: wide, children: [_jsxs("header", { style: { display: "grid", gap: 12 }, children: [_jsx("p", { style: eyebrow, children: places.length === 0 ? "None of its own yet" : `${places.length} ${places.length === 1 ? "picture" : "pictures"}` }), _jsx("h1", { style: h1, children: "Pictures" }), _jsx("p", { style: lede, children: places.length === 0
244
+ ? "Nothing here has a picture of its own yet, so each kind is drawn as the scene draws it. Title a group view and it appears here by name."
245
+ : "The ways this installation looks at what it holds — each one the same picture the scene shows, here as a page." })] }), entries.length > 0 ? (_jsx("div", { style: cards, "data-testid": "places", children: entries.map((entry) => (_jsx(GalleryCard, { context: context, entry: entry }, entry.key))) })) : null] }));
246
+ }
247
+ /**
248
+ * ONE PICTURE, FULL WIDTH: the lens over the kind's current members, what
249
+ * it is a picture of, its sibling pictures for the hop between them, the
250
+ * acts that begin the kind beneath it, and the way to the same picture in
251
+ * the scene. A pick inside it travels to the record — on a page, choosing a
252
+ * thing means going to it.
253
+ */
254
+ export function DefaultPlacePage({ context }) {
255
+ const { store, brand, principal, sceneHref = "/" } = context;
256
+ useStoreTick(store);
257
+ const params = useParams();
258
+ const navigate = useNavigate();
259
+ const asked = decodeURIComponent(params["as"] ?? "");
260
+ const places = placesOf(context);
261
+ const place = places.find((candidate) => candidate.as === asked);
262
+ if (!place) {
263
+ return (_jsxs(PageMain, { context: context, children: [_jsx("h1", { style: h1, children: "No picture is called that." }), _jsx("p", { style: lede, children: _jsx(Link, { to: "/places", style: link, children: "The pictures there are \u2192" }) })] }));
264
+ }
265
+ const plural = pluralOf(store, place.kind);
266
+ const siblings = places.filter((other) => other.as !== place.as);
267
+ const facts = kindFacts(store, place.kind, {
268
+ ...(principal ? { principal } : {}),
269
+ ...(context.invariantContext ? { context: context.invariantContext } : {}),
270
+ });
271
+ const creators = facts.actions.affordances
272
+ .map((affordance) => ({ affordance, mutation: store.allMutations().find((m) => m.name === affordance.mutation) }))
273
+ .filter((entry) => entry.mutation !== undefined);
274
+ return (_jsxs(PageMain, { context: context, style: wide, children: [_jsxs("header", { style: { display: "grid", gap: 12 }, children: [_jsxs("p", { style: { ...eyebrow, display: "flex", alignItems: "center", gap: 8 }, children: [_jsx(KindMark, { kind: place.kind, brand: brand, schema: store.schema, size: 8 }), _jsx(Link, { to: `/${pluralSlug(store.schema, place.kind)}`, style: plain, children: pictureOf(store, place) })] }), _jsx("h1", { style: h1, children: place.title }), _jsxs("p", { style: lede, "data-testid": "place-lede", children: [overOf(store, place.kind, place.across), "."] }), _jsxs("p", { style: { ...quiet, margin: 0, display: "flex", flexWrap: "wrap", alignItems: "center", gap: "4px 16px" }, children: [_jsx("a", { href: placeHref(place.as, sceneHref), style: { ...link, ...quiet }, "data-testid": "place-stop", children: "See it in the scene \u2197" }), _jsxs(Link, { to: `/${pluralSlug(store.schema, place.kind)}`, style: { ...link, ...quiet }, children: ["All ", plural.toLowerCase(), " as a list \u2192"] })] }), siblings.length > 0 ? (
275
+ /* THE OTHER PICTURES, one press away: the gallery's hop, on the picture itself. */
276
+ _jsx("nav", { "aria-label": "Other pictures", "data-testid": "sibling-pictures", style: { display: "flex", flexWrap: "wrap", gap: 8, paddingTop: 4 }, children: siblings.map((other) => (_jsx(Link, { to: placePath(other.as), style: {
277
+ ...plain,
278
+ fontSize: "0.9375rem",
279
+ padding: "4px 12px",
280
+ borderRadius: 999,
281
+ border: "1px solid var(--graview-edge-bright)",
282
+ color: "var(--graview-ink-muted)",
283
+ }, children: other.title }, other.as))) })) : null] }), _jsx("div", { "data-testid": "place-lens", style: {
284
+ height: "min(72vh, 760px)",
285
+ display: "grid",
286
+ gridTemplateRows: "minmax(0, 1fr)",
287
+ overflow: "auto",
288
+ maxWidth: "100%",
289
+ borderRadius: 12,
290
+ border: "1px solid var(--graview-edge)",
291
+ background: "var(--graview-panel)",
292
+ }, onClick: (event) => {
293
+ const picked = event.target?.closest("[data-graview-pick]");
294
+ const id = picked?.getAttribute("data-graview-pick");
295
+ if (!id)
296
+ return;
297
+ const node = store.graph.getNode(id);
298
+ if (!node)
299
+ return;
300
+ event.preventDefault();
301
+ navigate(recordPath(store.schema, node.kind, id));
302
+ }, children: _jsx(LensOnPage, { context: context, place: place }) }), _jsx("div", { style: { maxWidth: 760, display: "grid", gap: 40 }, children: creators.map(({ affordance, mutation }) => (_jsxs("section", { style: { ...rule, display: "grid", gap: 14 }, children: [_jsx("h2", { style: h2, children: mutation.title ?? mutation.name }), mutation.description ? _jsx("p", { style: { ...quiet, margin: 0, maxWidth: "58ch" }, children: mutation.description }) : null, _jsx(DerivedForm, { store: store, mutation: mutation, prefilled: affordance.args, open: affordance.open, label: affordance.label, ...(principal ? { principal } : {}) })] }, affordance.id))) })] }));
303
+ }
304
+ //# sourceMappingURL=page-places.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"page-places.js","sourceRoot":"","sources":["../src/page-places.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAA0C,MAAM,eAAe,CAAC;AAC3F,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAChE,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AACvC,OAAO,EAAE,aAAa,EAAkB,MAAM,gBAAgB,CAAC;AAC/D,OAAO,EAAE,eAAe,EAAE,MAAM,EAAE,QAAQ,EAAsB,MAAM,OAAO,CAAC;AAC9E,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AACxC,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC7E,OAAO,EAAoB,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACnE,OAAO,EACL,OAAO,EACP,QAAQ,EACR,OAAO,EACP,EAAE,EACF,EAAE,EACF,IAAI,EACJ,IAAI,EACJ,SAAS,EACT,KAAK,EACL,QAAQ,EACR,KAAK,EACL,IAAI,EACJ,IAAI,GACL,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAG3C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Z,CAAC;AACJ,CAAC"}
@@ -0,0 +1,58 @@
1
+ import { violationsTouching, type AnySchema, type Principal, type Repair, type Store } from "@graview/core";
2
+ import { type ReactNode } from "react";
3
+ import { type PageContext } from "./page-context.js";
4
+ /**
5
+ * The standing, as a page: each broken rule in its own words, the thing it
6
+ * is about as a link, and the repairs the rule itself named.
7
+ */
8
+ export declare function DefaultProblemsPage<S extends AnySchema>({ context }: {
9
+ context: PageContext<S>;
10
+ }): import("react").JSX.Element;
11
+ /**
12
+ * A RULE'S REPAIRS, EACH IN THE SHAPE IT ACTUALLY IS.
13
+ *
14
+ * A repair that needs nothing is one press. A repair that still has an
15
+ * argument to choose — the invariant said `missing: ["owner"]` — is an ASK:
16
+ * the same derived form the record page uses, with everything the violation
17
+ * already decided filled in.
18
+ *
19
+ * Both were rendered as a bare button calling `store.apply` with the
20
+ * violation's partial args, so pressing "Hand Buy milk to somebody" on the
21
+ * problems page threw `Invalid arguments for mutation "assign-item": owner:
22
+ * expected string, received undefined` into the console and told the person
23
+ * nothing at all. The actions strip has always turned this repair into an
24
+ * ask; the two faces simply disagreed.
25
+ */
26
+ export declare function Repairs<S extends AnySchema>({ store, repairs, principal, }: {
27
+ readonly store: Store<S>;
28
+ readonly repairs: readonly Repair[];
29
+ /**
30
+ * Who is pressing. A rule names its repairs without knowing who is
31
+ * reading, so the page has to ask — the actions strip already does, by
32
+ * going through `deriveAffordances`, and a repair rendered straight from
33
+ * the violation went round it: a hand was offered "Hand Buy milk to
34
+ * somebody", pressed it, and met the refusal on submit.
35
+ */
36
+ readonly principal?: Principal;
37
+ }): ReactNode;
38
+ /** Violations that implicate one node — re-exported so pages and tests share it. */
39
+ export { violationsTouching };
40
+ /**
41
+ * The face's own type and spacing, for a page an app writes itself. A
42
+ * custom record page that had to copy these to look like its neighbours
43
+ * would drift from them by the second release; one object, shared, is how
44
+ * a heavily customised face stays one face.
45
+ */
46
+ export declare const pageStyles: {
47
+ readonly column: import("react").CSSProperties;
48
+ readonly h1: import("react").CSSProperties;
49
+ readonly h2: import("react").CSSProperties;
50
+ readonly eyebrow: import("react").CSSProperties;
51
+ readonly lede: import("react").CSSProperties;
52
+ readonly quiet: import("react").CSSProperties;
53
+ readonly rule: import("react").CSSProperties;
54
+ readonly link: import("react").CSSProperties;
55
+ readonly plain: import("react").CSSProperties;
56
+ readonly button: import("react").CSSProperties;
57
+ };
58
+ //# sourceMappingURL=page-problems.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"page-problems.d.ts","sourceRoot":"","sources":["../src/page-problems.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAW,kBAAkB,EAAE,KAAK,SAAS,EAAE,KAAK,SAAS,EAAE,KAAK,MAAM,EAAE,KAAK,KAAK,EAAE,MAAM,eAAe,CAAC;AAErH,OAAO,EAAoB,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAGzD,OAAO,EAAE,KAAK,WAAW,EAAgB,MAAM,mBAAmB,CAAC;AAMnE;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,CAAC,SAAS,SAAS,EAAE,EAAE,OAAO,EAAE,EAAE;IAAE,OAAO,EAAE,WAAW,CAAC,CAAC,CAAC,CAAA;CAAE,+BAqDhG;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,OAAO,CAAC,CAAC,SAAS,SAAS,EAAE,EAC3C,KAAK,EACL,OAAO,EACP,SAAS,GACV,EAAE;IACD,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC;IACzB,QAAQ,CAAC,OAAO,EAAE,SAAS,MAAM,EAAE,CAAC;IACpC;;;;;;OAMG;IACH,QAAQ,CAAC,SAAS,CAAC,EAAE,SAAS,CAAC;CAChC,GAAG,SAAS,CAsGZ;AAGD,oFAAoF;AACpF,OAAO,EAAE,kBAAkB,EAAE,CAAC;AAE9B;;;;;GAKG;AACH,eAAO,MAAM,UAAU;;;;;;;;;;;CAA+E,CAAC"}