@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.
- package/LICENSE +96 -0
- package/README.md +47 -0
- package/dist/ask.d.ts +21 -0
- package/dist/ask.d.ts.map +1 -0
- package/dist/ask.js +109 -0
- package/dist/ask.js.map +1 -0
- package/dist/face-controls.d.ts +68 -0
- package/dist/face-controls.d.ts.map +1 -0
- package/dist/face-controls.js +231 -0
- package/dist/face-controls.js.map +1 -0
- package/dist/face-placed.d.ts +16 -0
- package/dist/face-placed.d.ts.map +1 -0
- package/dist/face-placed.js +34 -0
- package/dist/face-placed.js.map +1 -0
- package/dist/facts.d.ts +115 -0
- package/dist/facts.d.ts.map +1 -0
- package/dist/facts.js +180 -0
- package/dist/facts.js.map +1 -0
- package/dist/form.d.ts +53 -0
- package/dist/form.d.ts.map +1 -0
- package/dist/form.js +183 -0
- package/dist/form.js.map +1 -0
- package/dist/index.d.ts +15 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +8 -0
- package/dist/index.js.map +1 -0
- package/dist/page-context.d.ts +74 -0
- package/dist/page-context.d.ts.map +1 -0
- package/dist/page-context.js +38 -0
- package/dist/page-context.js.map +1 -0
- package/dist/page-home.d.ts +19 -0
- package/dist/page-home.d.ts.map +1 -0
- package/dist/page-home.js +67 -0
- package/dist/page-home.js.map +1 -0
- package/dist/page-list.d.ts +23 -0
- package/dist/page-list.d.ts.map +1 -0
- package/dist/page-list.js +196 -0
- package/dist/page-list.js.map +1 -0
- package/dist/page-map.d.ts +20 -0
- package/dist/page-map.d.ts.map +1 -0
- package/dist/page-map.js +71 -0
- package/dist/page-map.js.map +1 -0
- package/dist/page-places.d.ts +72 -0
- package/dist/page-places.d.ts.map +1 -0
- package/dist/page-places.js +304 -0
- package/dist/page-places.js.map +1 -0
- package/dist/page-problems.d.ts +58 -0
- package/dist/page-problems.d.ts.map +1 -0
- package/dist/page-problems.js +113 -0
- package/dist/page-problems.js.map +1 -0
- package/dist/page-record.d.ts +14 -0
- package/dist/page-record.d.ts.map +1 -0
- package/dist/page-record.js +111 -0
- package/dist/page-record.js.map +1 -0
- package/dist/page-search.d.ts +50 -0
- package/dist/page-search.d.ts.map +1 -0
- package/dist/page-search.js +108 -0
- package/dist/page-search.js.map +1 -0
- package/dist/page-shell.d.ts +43 -0
- package/dist/page-shell.d.ts.map +1 -0
- package/dist/page-shell.js +171 -0
- package/dist/page-shell.js.map +1 -0
- package/dist/page-typography.d.ts +54 -0
- package/dist/page-typography.d.ts.map +1 -0
- package/dist/page-typography.js +166 -0
- package/dist/page-typography.js.map +1 -0
- package/dist/pages.d.ts +19 -0
- package/dist/pages.d.ts.map +1 -0
- package/dist/pages.js +19 -0
- package/dist/pages.js.map +1 -0
- package/dist/registry.d.ts +111 -0
- package/dist/registry.d.ts.map +1 -0
- package/dist/registry.js +105 -0
- package/dist/registry.js.map +1 -0
- package/dist/router.d.ts +35 -0
- package/dist/router.d.ts.map +1 -0
- package/dist/router.js +155 -0
- package/dist/router.js.map +1 -0
- package/package.json +63 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export { createPageRegistry, kindOfSlug, placeHref, placePath, pluralSlug, recordPath, spatialHref } from "./registry.js";
|
|
2
|
+
export type { RouteRegistration } from "./registry.js";
|
|
3
|
+
export type { PageRegistry, PageRegistration, PageType, ShellComponent, ShellOptions, SurfaceType } from "./registry.js";
|
|
4
|
+
export { kindFacts, kindMap, rankedRepairs, recordFacts } from "./facts.js";
|
|
5
|
+
export type { KindFacts, KindMap, KindRelation, RecordFacts, RecordLinkGroup, FactsOptions } from "./facts.js";
|
|
6
|
+
export { DerivedForm } from "./form.js";
|
|
7
|
+
export type { DerivedFormProps } from "./form.js";
|
|
8
|
+
export { DefaultHomePage, DefaultListPage, DefaultMapPage, DefaultPlacePage, DefaultPlacesPage, PlaceCard, Gallery, GalleryCard, galleryOf, PlacePicture, KindMapSection, DefaultProblemsPage, DefaultRecordPage, DefaultSearchPage, DefaultShell, PageFind, SearchToCreate, beginningsFor, beginningsFrom, WhyLine, StartFreshLink, useStoreTick, pageStyles, PageMain, Repairs, } from "./pages.js";
|
|
9
|
+
export type { PageContext, GalleryEntry, Beginning } from "./pages.js";
|
|
10
|
+
export { PageAsk } from "./ask.js";
|
|
11
|
+
export { lastChangeOf, PageUndo } from "./face-controls.js";
|
|
12
|
+
export type { FaceControl, LastChange } from "./face-controls.js";
|
|
13
|
+
export { PagesApp, PagesRoutes } from "./router.js";
|
|
14
|
+
export type { PagesAppProps, PageComponent } from "./router.js";
|
|
15
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,UAAU,EAAE,SAAS,EAAE,SAAS,EAAE,UAAU,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC1H,YAAY,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AACvD,YAAY,EAAE,YAAY,EAAE,gBAAgB,EAAE,QAAQ,EAAE,cAAc,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AACzH,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAC5E,YAAY,EAAE,SAAS,EAAE,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAC/G,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AACxC,YAAY,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAClD,OAAO,EACL,eAAe,EACf,eAAe,EACf,cAAc,EACd,gBAAgB,EAChB,iBAAiB,EACjB,SAAS,EACT,OAAO,EACP,WAAW,EACX,SAAS,EACT,YAAY,EACZ,cAAc,EACd,mBAAmB,EACnB,iBAAiB,EACjB,iBAAiB,EACjB,YAAY,EACZ,QAAQ,EACR,cAAc,EACd,aAAa,EACb,cAAc,EACd,OAAO,EACP,cAAc,EACd,YAAY,EACZ,UAAU,EACV,QAAQ,EACR,OAAO,GACR,MAAM,YAAY,CAAC;AACpB,YAAY,EAAE,WAAW,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AACvE,OAAO,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AACnC,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC5D,YAAY,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAClE,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AACpD,YAAY,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export { createPageRegistry, kindOfSlug, placeHref, placePath, pluralSlug, recordPath, spatialHref } from "./registry.js";
|
|
2
|
+
export { kindFacts, kindMap, rankedRepairs, recordFacts } from "./facts.js";
|
|
3
|
+
export { DerivedForm } from "./form.js";
|
|
4
|
+
export { DefaultHomePage, DefaultListPage, DefaultMapPage, DefaultPlacePage, DefaultPlacesPage, PlaceCard, Gallery, GalleryCard, galleryOf, PlacePicture, KindMapSection, DefaultProblemsPage, DefaultRecordPage, DefaultSearchPage, DefaultShell, PageFind, SearchToCreate, beginningsFor, beginningsFrom, WhyLine, StartFreshLink, useStoreTick, pageStyles, PageMain, Repairs, } from "./pages.js";
|
|
5
|
+
export { PageAsk } from "./ask.js";
|
|
6
|
+
export { lastChangeOf, PageUndo } from "./face-controls.js";
|
|
7
|
+
export { PagesApp, PagesRoutes } from "./router.js";
|
|
8
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,UAAU,EAAE,SAAS,EAAE,SAAS,EAAE,UAAU,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAG1H,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAE5E,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAExC,OAAO,EACL,eAAe,EACf,eAAe,EACf,cAAc,EACd,gBAAgB,EAChB,iBAAiB,EACjB,SAAS,EACT,OAAO,EACP,WAAW,EACX,SAAS,EACT,YAAY,EACZ,cAAc,EACd,mBAAmB,EACnB,iBAAiB,EACjB,iBAAiB,EACjB,YAAY,EACZ,QAAQ,EACR,cAAc,EACd,aAAa,EACb,cAAc,EACd,OAAO,EACP,cAAc,EACd,YAAY,EACZ,UAAU,EACV,QAAQ,EACR,OAAO,GACR,MAAM,YAAY,CAAC;AAEpB,OAAO,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AACnC,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAE5D,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC"}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import type { AnySchema, Brand, Principal, Store, PresenceChannel, SettingDeclaration } from "@graview/core";
|
|
2
|
+
import type { ReactViewRegistry } from "@graview/react";
|
|
3
|
+
/**
|
|
4
|
+
* The default pages: the product's own site, derived.
|
|
5
|
+
*
|
|
6
|
+
* Traditional on purpose — lists, records, links, forms, the paradigms
|
|
7
|
+
* people already know — but in the POSTURE of a good web page rather than a
|
|
8
|
+
* back office: every route opens with the thing itself, titled in the
|
|
9
|
+
* brand's display face and summarised in the app's own declared words, and
|
|
10
|
+
* the controls recede beneath the content. Nothing here is a template for
|
|
11
|
+
* any one app. It is all read off the declaration, which is what lets one
|
|
12
|
+
* component set read as a household's week, a bid document and a team
|
|
13
|
+
* sheet — and every component is a default registration an app can replace
|
|
14
|
+
* cell by cell, the same move as replacing a view.
|
|
15
|
+
*/
|
|
16
|
+
export interface PageContext<S extends AnySchema> {
|
|
17
|
+
readonly store: Store<S>;
|
|
18
|
+
readonly principal?: Principal;
|
|
19
|
+
/**
|
|
20
|
+
* The seats a person may sit in, by the names they are offered under — so
|
|
21
|
+
* the history can name another seat's work by that name rather than by
|
|
22
|
+
* the principal's id, where the app has no installation to look it up in.
|
|
23
|
+
*/
|
|
24
|
+
readonly seats?: readonly {
|
|
25
|
+
readonly label: string;
|
|
26
|
+
readonly principal: Principal;
|
|
27
|
+
}[];
|
|
28
|
+
readonly brand?: Brand;
|
|
29
|
+
/** Where the spatial face lives, for the cross-links. Default "/". */
|
|
30
|
+
readonly sceneHref?: string;
|
|
31
|
+
readonly invariantContext?: Readonly<Record<string, unknown>>;
|
|
32
|
+
/**
|
|
33
|
+
* Whether this browser remembers the edits (a ship browser adapter behind
|
|
34
|
+
* the store). When it does, the face says so and offers the way back to
|
|
35
|
+
* the example — the `fresh=1` address `@graview/ship` reads.
|
|
36
|
+
*/
|
|
37
|
+
readonly remembers?: boolean;
|
|
38
|
+
/**
|
|
39
|
+
* Whether the face is inside somebody else's page. A standalone face owns
|
|
40
|
+
* its document and its pages are its <main>; embedded, the host owns the
|
|
41
|
+
* landmarks and the face's pages are plain regions of it.
|
|
42
|
+
*/
|
|
43
|
+
readonly embedded?: boolean;
|
|
44
|
+
/**
|
|
45
|
+
* Whether a shell of the app's own is already around these pages.
|
|
46
|
+
*
|
|
47
|
+
* A design's shell owns the document's landmark — `graview-pages` says so
|
|
48
|
+
* in as many words — and the framework's own pages went on wrapping
|
|
49
|
+
* themselves in `PageMain` underneath it, so every route the design left
|
|
50
|
+
* derived had a main inside a main. Set by the router from the registry,
|
|
51
|
+
* never by an app: it is the same question `embedded` asks (does somebody
|
|
52
|
+
* above me own the landmark) with a different somebody.
|
|
53
|
+
*/
|
|
54
|
+
readonly framed?: boolean;
|
|
55
|
+
/**
|
|
56
|
+
* THE APP'S PICTURES. The view registry the scene draws from; given, every
|
|
57
|
+
* registered place is a page on this face too — an index at `/places`,
|
|
58
|
+
* each lens at `/places/<as>` — the home leads with them, each kind's page
|
|
59
|
+
* lists its own, and the nav mirrors the scene's bar. Absent, the face is
|
|
60
|
+
* the derived site it always was. A registry means a provider under the
|
|
61
|
+
* routes (the same one the embed puts there), so a lens's hooks work with
|
|
62
|
+
* no scene at all.
|
|
63
|
+
*/
|
|
64
|
+
readonly views?: ReactViewRegistry<S>;
|
|
65
|
+
/** The reader's own settings, for the provider under the pages when `views` is given. */
|
|
66
|
+
readonly settings?: readonly SettingDeclaration[];
|
|
67
|
+
/** Who else is here, for the same provider. */
|
|
68
|
+
readonly presence?: PresenceChannel;
|
|
69
|
+
}
|
|
70
|
+
/** The way back to the example, for a face whose browser remembers. */
|
|
71
|
+
export declare function StartFreshLink(): import("react").JSX.Element;
|
|
72
|
+
/** Re-render on every applied diff — the page face is as live as the scene. */
|
|
73
|
+
export declare function useStoreTick<S extends AnySchema>(store: Store<S>): number;
|
|
74
|
+
//# sourceMappingURL=page-context.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"page-context.d.ts","sourceRoot":"","sources":["../src/page-context.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,eAAe,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAE7G,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAGxD;;;;;;;;;;;;GAYG;AAEH,MAAM,WAAW,WAAW,CAAC,CAAC,SAAS,SAAS;IAC9C,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC;IACzB,QAAQ,CAAC,SAAS,CAAC,EAAE,SAAS,CAAC;IAC/B;;;;OAIG;IACH,QAAQ,CAAC,KAAK,CAAC,EAAE,SAAS;QAAE,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,SAAS,EAAE,SAAS,CAAA;KAAE,EAAE,CAAC;IACtF,QAAQ,CAAC,KAAK,CAAC,EAAE,KAAK,CAAC;IACvB,sEAAsE;IACtE,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,gBAAgB,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;IAC9D;;;;OAIG;IACH,QAAQ,CAAC,SAAS,CAAC,EAAE,OAAO,CAAC;IAC7B;;;;OAIG;IACH,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;IAC5B;;;;;;;;;OASG;IACH,QAAQ,CAAC,MAAM,CAAC,EAAE,OAAO,CAAC;IAC1B;;;;;;;;OAQG;IACH,QAAQ,CAAC,KAAK,CAAC,EAAE,iBAAiB,CAAC,CAAC,CAAC,CAAC;IACtC,yFAAyF;IACzF,QAAQ,CAAC,QAAQ,CAAC,EAAE,SAAS,kBAAkB,EAAE,CAAC;IAClD,+CAA+C;IAC/C,QAAQ,CAAC,QAAQ,CAAC,EAAE,eAAe,CAAC;CACrC;AAED,uEAAuE;AACvE,wBAAgB,cAAc,gCA8B7B;AAED,+EAA+E;AAC/E,wBAAgB,YAAY,CAAC,CAAC,SAAS,SAAS,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,GAAG,MAAM,CAczE"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useCallback, useRef, useSyncExternalStore } from "react";
|
|
3
|
+
/** The way back to the example, for a face whose browser remembers. */
|
|
4
|
+
export function StartFreshLink() {
|
|
5
|
+
return (_jsx("a", { href: "#fresh", "data-testid": "start-fresh", title: "Forget every edit made in this browser and return to the example", onClick: (event) => {
|
|
6
|
+
event.preventDefault();
|
|
7
|
+
const url = new URL(window.location.href);
|
|
8
|
+
url.searchParams.set("fresh", "1");
|
|
9
|
+
window.location.assign(url.toString());
|
|
10
|
+
},
|
|
11
|
+
/*
|
|
12
|
+
* A TARGET, not just a phrase. Inline text at 12.5px is a 15-pixel
|
|
13
|
+
* target — under the 24 WCAG 2.2 asks for, and the only control on the
|
|
14
|
+
* routed face that was: it sits in the footer of every page of every
|
|
15
|
+
* app, so every page of the pages face had exactly one control too
|
|
16
|
+
* small to hit.
|
|
17
|
+
*/
|
|
18
|
+
style: {
|
|
19
|
+
color: "inherit",
|
|
20
|
+
display: "inline-flex",
|
|
21
|
+
alignItems: "center",
|
|
22
|
+
minHeight: 24,
|
|
23
|
+
minWidth: 24,
|
|
24
|
+
}, children: "Start fresh" }));
|
|
25
|
+
}
|
|
26
|
+
/** Re-render on every applied diff — the page face is as live as the scene. */
|
|
27
|
+
export function useStoreTick(store) {
|
|
28
|
+
// The version bumps INSIDE the subscription, so the snapshot is stable
|
|
29
|
+
// between diffs — a snapshot that changed on every read would re-render
|
|
30
|
+
// for ever.
|
|
31
|
+
const version = useRef(0);
|
|
32
|
+
const subscribe = useCallback((listener) => store.subscribe(() => {
|
|
33
|
+
version.current += 1;
|
|
34
|
+
listener();
|
|
35
|
+
}), [store]);
|
|
36
|
+
return useSyncExternalStore(subscribe, () => version.current, () => 0);
|
|
37
|
+
}
|
|
38
|
+
//# sourceMappingURL=page-context.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"page-context.js","sourceRoot":"","sources":["../src/page-context.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,oBAAoB,EAAE,MAAM,OAAO,CAAC;AAsElE,uEAAuE;AACvE,MAAM,UAAU,cAAc;IAC5B,OAAO,CACL,YACE,IAAI,EAAC,QAAQ,iBACD,aAAa,EACzB,KAAK,EAAC,kEAAkE,EACxE,OAAO,EAAE,CAAC,KAAK,EAAE,EAAE;YACjB,KAAK,CAAC,cAAc,EAAE,CAAC;YACvB,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;YAC1C,GAAG,CAAC,YAAY,CAAC,GAAG,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC;YACnC,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC,CAAC;QACzC,CAAC;QACD;;;;;;WAMG;QACH,KAAK,EAAE;YACL,KAAK,EAAE,SAAS;YAChB,OAAO,EAAE,aAAa;YACtB,UAAU,EAAE,QAAQ;YACpB,SAAS,EAAE,EAAE;YACb,QAAQ,EAAE,EAAE;SACb,4BAGC,CACL,CAAC;AACJ,CAAC;AAED,+EAA+E;AAC/E,MAAM,UAAU,YAAY,CAAsB,KAAe;IAC/D,uEAAuE;IACvE,wEAAwE;IACxE,YAAY;IACZ,MAAM,OAAO,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC;IAC1B,MAAM,SAAS,GAAG,WAAW,CAC3B,CAAC,QAAoB,EAAE,EAAE,CACvB,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE;QACnB,OAAO,CAAC,OAAO,IAAI,CAAC,CAAC;QACrB,QAAQ,EAAE,CAAC;IACb,CAAC,CAAC,EACJ,CAAC,KAAK,CAAC,CACR,CAAC;IACF,OAAO,oBAAoB,CAAC,SAAS,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,OAAO,EAAE,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC;AACzE,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { type AnySchema } from "@graview/core";
|
|
2
|
+
import { type PageContext } from "./page-context.js";
|
|
3
|
+
/**
|
|
4
|
+
* THE FRONT PAGE IS THE GALLERY.
|
|
5
|
+
*
|
|
6
|
+
* It opens with the standing as its headline — what this installation holds,
|
|
7
|
+
* in a sentence made of its own plurals, and whether its rules hold — and
|
|
8
|
+
* then the pictures: every lens the app named, large and live, and a card
|
|
9
|
+
* for every kind that has none, so no app lands on an empty page. What used
|
|
10
|
+
* to follow — one section per kind with its description and four members,
|
|
11
|
+
* the relations in full — read as a readme under two small cards, and it
|
|
12
|
+
* has gone to where it is read: the kinds are one row of counts that opens
|
|
13
|
+
* each list, the relations live at /map, and Recently stays short at the
|
|
14
|
+
* foot.
|
|
15
|
+
*/
|
|
16
|
+
export declare function DefaultHomePage<S extends AnySchema>({ context }: {
|
|
17
|
+
context: PageContext<S>;
|
|
18
|
+
}): import("react").JSX.Element;
|
|
19
|
+
//# sourceMappingURL=page-home.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"page-home.d.ts","sourceRoot":"","sources":["../src/page-home.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAa,KAAK,SAAS,EAAE,MAAM,eAAe,CAAC;AAI1D,OAAO,EAAE,KAAK,WAAW,EAAgB,MAAM,mBAAmB,CAAC;AAoBnE;;;;;;;;;;;;GAYG;AACH,wBAAgB,eAAe,CAAC,CAAC,SAAS,SAAS,EAAE,EAAE,OAAO,EAAE,EAAE;IAAE,OAAO,EAAE,WAAW,CAAC,CAAC,CAAC,CAAA;CAAE,+BAyH5F"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { isCurrent } from "@graview/core";
|
|
3
|
+
import { Link } from "react-router-dom";
|
|
4
|
+
import { kindMap } from "./facts.js";
|
|
5
|
+
import { pluralSlug } from "./registry.js";
|
|
6
|
+
import { useStoreTick } from "./page-context.js";
|
|
7
|
+
import { Gallery } from "./page-places.js";
|
|
8
|
+
import { KindMark, eyebrow, h1, h2, lede, link, liveKinds, plain, pluralOf, quiet, rule, whoDid, wide, } from "./page-typography.js";
|
|
9
|
+
import { PageMain } from "./page-shell.js";
|
|
10
|
+
/**
|
|
11
|
+
* THE FRONT PAGE IS THE GALLERY.
|
|
12
|
+
*
|
|
13
|
+
* It opens with the standing as its headline — what this installation holds,
|
|
14
|
+
* in a sentence made of its own plurals, and whether its rules hold — and
|
|
15
|
+
* then the pictures: every lens the app named, large and live, and a card
|
|
16
|
+
* for every kind that has none, so no app lands on an empty page. What used
|
|
17
|
+
* to follow — one section per kind with its description and four members,
|
|
18
|
+
* the relations in full — read as a readme under two small cards, and it
|
|
19
|
+
* has gone to where it is read: the kinds are one row of counts that opens
|
|
20
|
+
* each list, the relations live at /map, and Recently stays short at the
|
|
21
|
+
* foot.
|
|
22
|
+
*/
|
|
23
|
+
export function DefaultHomePage({ context }) {
|
|
24
|
+
const { principal } = context;
|
|
25
|
+
const { store, brand, invariantContext } = context;
|
|
26
|
+
useStoreTick(store);
|
|
27
|
+
const violations = store.violations(invariantContext);
|
|
28
|
+
const recent = [...store.log.all()].slice(-5).reverse();
|
|
29
|
+
const kinds = liveKinds(store, context.principal);
|
|
30
|
+
const counted = kinds.map((kind) => ({
|
|
31
|
+
kind,
|
|
32
|
+
members: store.graph
|
|
33
|
+
.nodesOfKind(kind)
|
|
34
|
+
.filter((node) => isCurrent(store.schema.tryDefinition(kind), node)),
|
|
35
|
+
}));
|
|
36
|
+
const present = counted.filter((entry) => entry.members.length > 0);
|
|
37
|
+
// An empty installation says where to begin, in the act's own words.
|
|
38
|
+
// The beginning it names is one THIS seat may take.
|
|
39
|
+
const beginning = counted
|
|
40
|
+
.map((entry) => ({
|
|
41
|
+
entry,
|
|
42
|
+
creator: store
|
|
43
|
+
.allMutations()
|
|
44
|
+
.find((mutation) => (mutation.creates ?? []).includes(entry.kind) &&
|
|
45
|
+
store.permits({ name: mutation.name, args: {} }, context.principal).ok),
|
|
46
|
+
}))
|
|
47
|
+
.find((candidate) => candidate.creator !== undefined);
|
|
48
|
+
const summary = present.length === 0
|
|
49
|
+
? "Nothing here yet."
|
|
50
|
+
: `${present
|
|
51
|
+
.map((entry) => `${entry.members.length} ${entry.members.length === 1
|
|
52
|
+
? entry.kind
|
|
53
|
+
: pluralOf(store, entry.kind).toLowerCase()}`)
|
|
54
|
+
.join(", ")
|
|
55
|
+
.replace(/, ([^,]*)$/, " and $1")}.`;
|
|
56
|
+
const live = new Set(kinds);
|
|
57
|
+
const relations = kindMap(store).relations.filter((relation) => live.has(relation.from) && (relation.to === "*" || live.has(relation.to)));
|
|
58
|
+
return (_jsxs(PageMain, { context: context, style: wide, children: [_jsxs("header", { style: { display: "grid", gap: 12 }, children: [_jsx("p", { style: eyebrow, children: brand?.name ?? "Graview" }), _jsx("h1", { style: h1, "data-testid": "standing", children: summary }), _jsxs("p", { style: { ...lede, display: "grid", gap: 4 }, "data-testid": "standing-card", children: [present.length === 0 && beginning ? (_jsxs("span", { children: ["Begin with \u201C", beginning.creator?.title ?? beginning.creator?.name, "\u201D, under", " ", _jsx(Link, { to: `/${pluralSlug(store.schema, beginning.entry.kind)}`, style: link, children: pluralOf(store, beginning.entry.kind) }), "."] })) : null, violations.length === 0 ? (_jsx("span", { children: "All rules hold." })) : (_jsxs(Link, { to: "/problems", style: { ...link, color: "var(--graview-warn)" }, children: [violations.length, " ", violations.length === 1 ? "problem" : "problems", " \u2014 see what is broken, and what would fix it"] }))] })] }), _jsx(Gallery, { context: context }), _jsxs("section", { style: { ...rule, display: "grid", gap: 14 }, "data-testid": "kinds", children: [_jsxs("div", { style: { display: "flex", alignItems: "baseline", gap: 10, flexWrap: "wrap" }, children: [_jsx("h2", { style: h2, children: "What is here" }), relations.length > 0 ? (_jsxs(Link, { to: "/map", style: { ...link, ...quiet, marginLeft: "auto" }, "data-testid": "map-link", children: ["How it fits together \u00B7 ", relations.length === 1 ? "1 relation" : `${relations.length} relations`, " \u2192"] })) : null] }), _jsx("ul", { style: { margin: 0, padding: 0, listStyle: "none", display: "flex", flexWrap: "wrap", gap: "8px 10px" }, children: counted.map(({ kind, members }) => (_jsx("li", { children: _jsxs(Link, { to: `/${pluralSlug(store.schema, kind)}`, style: {
|
|
59
|
+
...plain,
|
|
60
|
+
gap: 8,
|
|
61
|
+
padding: "6px 14px 6px 10px",
|
|
62
|
+
borderRadius: 999,
|
|
63
|
+
border: "1px solid var(--graview-edge-bright)",
|
|
64
|
+
background: "var(--graview-panel)",
|
|
65
|
+
}, children: [_jsx(KindMark, { kind: kind, brand: brand, schema: store.schema, size: 7 }), _jsx("span", { style: { fontWeight: 550 }, children: pluralOf(store, kind) }), _jsx("span", { style: { ...quiet, fontVariantNumeric: "tabular-nums" }, children: members.length === 0 ? "none yet" : members.length })] }) }, kind))) })] }), recent.length > 0 ? (_jsxs("section", { style: { ...rule, display: "grid", gap: 10 }, children: [_jsx("h2", { style: h2, children: "Recently" }), _jsx("ul", { style: { margin: 0, padding: 0, listStyle: "none", display: "grid", gap: 6 }, children: recent.map((op) => (_jsxs("li", { style: quiet, children: [_jsx("span", { style: { color: "var(--graview-ink)" }, children: op.intent }), " \u2014 ", whoDid(op, principal, { graph: store.graph, schema: store.schema, ...(context.seats ? { seats: context.seats } : {}) })] }, op.id))) })] })) : null] }));
|
|
66
|
+
}
|
|
67
|
+
//# sourceMappingURL=page-home.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"page-home.js","sourceRoot":"","sources":["../src/page-home.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAkB,MAAM,eAAe,CAAC;AAC1D,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AACxC,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAoB,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACnE,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAC3C,OAAO,EACL,QAAQ,EACR,OAAO,EACP,EAAE,EACF,EAAE,EACF,IAAI,EACJ,IAAI,EACJ,SAAS,EACT,KAAK,EACL,QAAQ,EACR,KAAK,EACL,IAAI,EACJ,MAA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Arrangeable, type Arrangement } from "@graview/core";
|
|
2
|
+
import { type PageContext } from "./page-context.js";
|
|
3
|
+
/**
|
|
4
|
+
* A kind's page opens with the kind: its plural, its declared description,
|
|
5
|
+
* how many there are. The members read as a list of things, each with a
|
|
6
|
+
* line of its own facts. Adding one is below the list, as a section with
|
|
7
|
+
* the act's own title — not a form at the top of a grid.
|
|
8
|
+
*/
|
|
9
|
+
export declare function DefaultListPage<S extends AnySchema>({ context }: {
|
|
10
|
+
context: PageContext<S>;
|
|
11
|
+
}): import("react").JSX.Element;
|
|
12
|
+
/**
|
|
13
|
+
* The search, read as an arrangement — the shared words first, then the
|
|
14
|
+
* keys this page grew before there was a shared module, folded in so every
|
|
15
|
+
* link that ever worked still lands: `by` is a grouping, an edge kind names
|
|
16
|
+
* a far end to keep, `with` keeps the ones tied to anything, `past` widens
|
|
17
|
+
* the horizon. What the kind cannot be arranged by is named, not thrown.
|
|
18
|
+
*/
|
|
19
|
+
export declare function arrangementFromSearch(search: URLSearchParams, offers: Arrangeable, edgeKinds: readonly string[]): {
|
|
20
|
+
readonly arrangement: Arrangement;
|
|
21
|
+
readonly dropped: readonly string[];
|
|
22
|
+
};
|
|
23
|
+
//# sourceMappingURL=page-list.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"page-list.d.ts","sourceRoot":"","sources":["../src/page-list.tsx"],"names":[],"mappings":"AACA,OAAO,EAaL,KAAK,SAAS,EACd,KAAK,WAAW,EAChB,KAAK,WAAW,EAEjB,MAAM,eAAe,CAAC;AAKvB,OAAO,EAAE,KAAK,WAAW,EAAgB,MAAM,mBAAmB,CAAC;AAqBnE;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,CAAC,SAAS,SAAS,EAAE,EAAE,OAAO,EAAE,EAAE;IAAE,OAAO,EAAE,WAAW,CAAC,CAAC,CAAC,CAAA;CAAE,+BAwS5F;AAED;;;;;;GAMG;AACH,wBAAgB,qBAAqB,CACnC,MAAM,EAAE,eAAe,EACvB,MAAM,EAAE,WAAW,EACnB,SAAS,EAAE,SAAS,MAAM,EAAE,GAC3B;IAAE,QAAQ,CAAC,WAAW,EAAE,WAAW,CAAC;IAAC,QAAQ,CAAC,OAAO,EAAE,SAAS,MAAM,EAAE,CAAA;CAAE,CA0B5E"}
|
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { ArrangeBar, RelationMark } from "@graview/primitives";
|
|
3
|
+
import { admitArrangement, arrange, arrangeable, describeSearched, formatArrangement, humaniseField, asksForThePast, isCurrent, labelOf, matchNode, parseArrangement, parseQuery, } from "@graview/core";
|
|
4
|
+
import { Link, useParams, useSearchParams } from "react-router-dom";
|
|
5
|
+
import { kindFacts, kindMap } from "./facts.js";
|
|
6
|
+
import { DerivedForm } from "./form.js";
|
|
7
|
+
import { kindOfSlug, placePath, pluralSlug, recordPath } from "./registry.js";
|
|
8
|
+
import { useStoreTick } from "./page-context.js";
|
|
9
|
+
import { placesOf } from "./page-places.js";
|
|
10
|
+
import { beginningsFrom, WhyLine } from "./page-search.js";
|
|
11
|
+
import { DISPLAY, KindMark, eyebrow, glance, h1, h2, lede, link, plain, pluralOf, quiet, rule, } from "./page-typography.js";
|
|
12
|
+
import { PageMain } from "./page-shell.js";
|
|
13
|
+
import { capitalise } from "./page-typography.js";
|
|
14
|
+
/**
|
|
15
|
+
* A kind's page opens with the kind: its plural, its declared description,
|
|
16
|
+
* how many there are. The members read as a list of things, each with a
|
|
17
|
+
* line of its own facts. Adding one is below the list, as a section with
|
|
18
|
+
* the act's own title — not a form at the top of a grid.
|
|
19
|
+
*/
|
|
20
|
+
export function DefaultListPage({ context }) {
|
|
21
|
+
const { store, brand, invariantContext } = context;
|
|
22
|
+
useStoreTick(store);
|
|
23
|
+
const params = useParams();
|
|
24
|
+
const [search, setSearch] = useSearchParams();
|
|
25
|
+
const kind = kindOfSlug(store.schema, params["slug"] ?? "");
|
|
26
|
+
if (!kind) {
|
|
27
|
+
return (_jsx(PageMain, { context: context, children: _jsx("h1", { style: h1, children: "No such kind of thing here." }) }));
|
|
28
|
+
}
|
|
29
|
+
const definition = store.schema.tryDefinition(kind);
|
|
30
|
+
const all = store.graph.nodesOfKind(kind);
|
|
31
|
+
const relations = kindMap(store).relations.filter((relation) => relation.from === kind || relation.to === kind);
|
|
32
|
+
const flagged = new Set(store.violations(invariantContext).flatMap((violation) => violation.nodeIds));
|
|
33
|
+
/*
|
|
34
|
+
* ARRANGED THROUGH THE SHARED MODULE, in the shared words. `sort`, `filter`,
|
|
35
|
+
* `group` and `q` in the search are the same grammar a lens carries in its
|
|
36
|
+
* fragment, so what a person arranged here is what an agent can ask a
|
|
37
|
+
* picture for. The keys this page grew before the module existed still
|
|
38
|
+
* land — `?by=<edge>` groups, `?<edge>=<id>` and `?with=<edge>` narrow,
|
|
39
|
+
* `?past=1` widens the horizon — because a record's "all the tasks on this
|
|
40
|
+
* list" is a link somebody may have sent.
|
|
41
|
+
*/
|
|
42
|
+
const offers = arrangeable(store.schema, kind);
|
|
43
|
+
const asked = arrangementFromSearch(search, offers, relations.map((relation) => relation.edgeKind));
|
|
44
|
+
const arrangement = asked.arrangement;
|
|
45
|
+
// The words may say `is:any` too, as they do in the Find box.
|
|
46
|
+
const typed = parseQuery(arrangement.query ?? "");
|
|
47
|
+
const showingPast = [...(arrangement.filter ?? []), ...typed.conditions].some((condition) => condition.key === "is" && (condition.value === "past" || condition.value === "any")) ||
|
|
48
|
+
// `status:demo` where demos are past is the past, asked for by name.
|
|
49
|
+
asksForThePast(definition, [...(arrangement.filter ?? []), ...typed.conditions]);
|
|
50
|
+
const effective = showingPast || !definition?.lifecycle
|
|
51
|
+
? arrangement
|
|
52
|
+
: { ...arrangement, filter: [...(arrangement.filter ?? []), { key: "is", value: "current" }] };
|
|
53
|
+
const arranged = arrange(all, effective, {
|
|
54
|
+
schema: store.schema,
|
|
55
|
+
graph: store.graph,
|
|
56
|
+
flagged,
|
|
57
|
+
...(typeof invariantContext?.["today"] === "string" ? { today: invariantContext["today"] } : {}),
|
|
58
|
+
});
|
|
59
|
+
const members = arranged.nodes;
|
|
60
|
+
const current = definition?.lifecycle && !showingPast ? all.filter((node) => isCurrent(definition, node)) : all;
|
|
61
|
+
const retired = all.length - current.length;
|
|
62
|
+
const narrowing = (arrangement.filter ?? []).filter((condition) => condition.key !== "is" && relations.some((relation) => relation.edgeKind === condition.key));
|
|
63
|
+
const grouping = arrangement.group?.by ?? null;
|
|
64
|
+
const named = (id) => {
|
|
65
|
+
const node = store.graph.getNode(id);
|
|
66
|
+
return node ? labelOf(store.schema.tryDefinition(node.kind), node) : id;
|
|
67
|
+
};
|
|
68
|
+
const rearrange = (next) => {
|
|
69
|
+
const params = new URLSearchParams(search);
|
|
70
|
+
for (const key of ["sort", "filter", "group", "q", "by", "with", "past", ...relations.map((relation) => relation.edgeKind)])
|
|
71
|
+
params.delete(key);
|
|
72
|
+
const words = formatArrangement(next);
|
|
73
|
+
for (const key of ["sort", "filter", "group", "q"])
|
|
74
|
+
if (words[key])
|
|
75
|
+
params.set(key, words[key]);
|
|
76
|
+
setSearch(params);
|
|
77
|
+
};
|
|
78
|
+
/*
|
|
79
|
+
* AN ACT THE SEAT MAY NOT TAKE IS STATED, NOT OFFERED. The strip and the
|
|
80
|
+
* record page already withhold by the policy; the list page offered every
|
|
81
|
+
* creating act to everyone, and a gardener met "Agree every plot has a
|
|
82
|
+
* caretaker" as a live form that refused on submit. The verdict is the
|
|
83
|
+
* store's own, asked before anything is drawn.
|
|
84
|
+
*/
|
|
85
|
+
const { principal } = context;
|
|
86
|
+
/*
|
|
87
|
+
* THE ACTS THE DERIVATION OFFERS, not the ones the declaration lists.
|
|
88
|
+
*
|
|
89
|
+
* This scanned `allMutations()` by `creates` and checked `store.permits` —
|
|
90
|
+
* which is the thing `graview-pages` tells an app's own page not to do,
|
|
91
|
+
* done by the framework's own page. The two answers differ: the derivation
|
|
92
|
+
* also drops an act it cannot ASK for. "Add an item for someone", with
|
|
93
|
+
* nobody to hand it to yet, is withheld in the scene and was offered here
|
|
94
|
+
* as a live form whose picker was empty and whose submit could only refuse.
|
|
95
|
+
*/
|
|
96
|
+
const facts = kindFacts(store, kind, {
|
|
97
|
+
...(principal ? { principal } : {}),
|
|
98
|
+
...(context.invariantContext ? { context: context.invariantContext } : {}),
|
|
99
|
+
});
|
|
100
|
+
const creators = facts.actions.affordances
|
|
101
|
+
.map((affordance) => ({
|
|
102
|
+
affordance,
|
|
103
|
+
mutation: store.allMutations().find((m) => m.name === affordance.mutation),
|
|
104
|
+
}))
|
|
105
|
+
.filter((entry) => entry.mutation !== undefined);
|
|
106
|
+
const withheld = facts.actions.withheld;
|
|
107
|
+
// Search-to-create: when the words found nothing, the beginnings start with them as the name.
|
|
108
|
+
const startsWith = typed.words && members.length === 0
|
|
109
|
+
? Object.fromEntries(beginningsFrom(store, kind, facts.actions.affordances).map((beginning) => [beginning.mutation.name, beginning.arg]))
|
|
110
|
+
: {};
|
|
111
|
+
const plural = pluralOf(store, kind);
|
|
112
|
+
const row = (node) => {
|
|
113
|
+
const label = labelOf(definition, node);
|
|
114
|
+
const said = glance(node, definition, label);
|
|
115
|
+
// Found by the words in a field rather than the name: say which, as the Find box does.
|
|
116
|
+
const why = typed.words ? matchNode(definition, node, typed.words) : undefined;
|
|
117
|
+
return (_jsxs("li", { style: {
|
|
118
|
+
display: "grid",
|
|
119
|
+
gap: 2,
|
|
120
|
+
padding: "14px 0",
|
|
121
|
+
borderTop: "1px solid var(--graview-edge)",
|
|
122
|
+
}, children: [_jsxs(Link, { to: recordPath(store.schema, kind, node.id), style: { ...plain, fontFamily: DISPLAY, fontSize: "1.25rem", fontWeight: 600, lineHeight: 1.3 }, children: [flagged.has(node.id) ? _jsx("span", { style: { color: "var(--graview-warn)" }, children: "\u26A0 " }) : null, label] }), said ? _jsx("span", { style: quiet, children: said }) : null, why ? _jsx(WhyLine, { why: why }) : null] }, node.id));
|
|
123
|
+
};
|
|
124
|
+
return (_jsxs(PageMain, { context: context, children: [_jsxs("header", { style: { display: "grid", gap: 12 }, children: [_jsxs("p", { style: { ...eyebrow, display: "flex", alignItems: "center", gap: 8 }, children: [_jsx(KindMark, { kind: kind, brand: brand, schema: store.schema, size: 8 }), members.length === 0
|
|
125
|
+
? "None yet"
|
|
126
|
+
: `${members.length} ${members.length === 1 ? kind : plural.toLowerCase()}`] }), _jsx("h1", { style: h1, children: plural }), definition?.description ? _jsx("p", { style: lede, children: definition.description }) : null, relations.length > 0 ? (
|
|
127
|
+
/* The roads out of this district: each relation this kind takes part in, with the far end named and linked. */
|
|
128
|
+
_jsxs("p", { style: { ...quiet, margin: 0, display: "flex", flexWrap: "wrap", gap: "4px 14px", alignItems: "center" }, "data-testid": "kind-relations", children: [_jsx("span", { children: "Related:" }), relations.map((relation) => {
|
|
129
|
+
const far = relation.from === kind ? relation.to : relation.from;
|
|
130
|
+
const words = relation.from === kind ? relation.description : (relation.inverse ?? relation.description);
|
|
131
|
+
return (_jsxs("span", { style: { display: "inline-flex", alignItems: "center", gap: 6 }, title: words ? capitalise(words) : undefined, children: [_jsx(RelationMark, { edgeKind: relation.edgeKind, width: 22, ...(context.brand?.kit ? { kit: context.brand.kit } : {}) }), _jsx("span", { children: humaniseField(relation.edgeKind) }), far === "*" ? (_jsx("span", { children: "anything" })) : (_jsx(Link, { to: `/${pluralSlug(store.schema, far)}`, style: link, children: pluralOf(store, far) }))] }, `${relation.edgeKind}|${relation.from}|${relation.to}`));
|
|
132
|
+
})] })) : null, placesOf(context).some((place) => place.kind === kind) ? (
|
|
133
|
+
/* A district's board, in the page's idiom: the kind's own pictures, by name. */
|
|
134
|
+
_jsxs("p", { style: { ...quiet, margin: 0 }, "data-testid": "kind-pictures", children: ["See ", plural.toLowerCase(), " as:", " ", placesOf(context)
|
|
135
|
+
.filter((place) => place.kind === kind)
|
|
136
|
+
.map((place, index) => (_jsxs("span", { children: [index > 0 ? " · " : null, _jsx(Link, { to: placePath(place.as), style: link, children: place.title })] }, place.as)))] })) : null] }), narrowing.length > 0 ? (_jsxs("p", { style: { ...quiet, margin: 0 }, "data-testid": "list-filter-note", children: [[
|
|
137
|
+
`Only the ${plural.toLowerCase()}`,
|
|
138
|
+
...narrowing.map((condition) => condition.value === "*"
|
|
139
|
+
? `that ${humaniseField(condition.key).toLowerCase()} anything`
|
|
140
|
+
: condition.value === "none"
|
|
141
|
+
? `that ${humaniseField(condition.key).toLowerCase()} nothing`
|
|
142
|
+
: `${humaniseField(condition.key).toLowerCase()} ${named(condition.value)}`),
|
|
143
|
+
].join(" "), " · ", _jsxs(Link, { to: showingPast ? "?filter=is:any" : "?", style: link, children: ["All ", plural.toLowerCase()] })] })) : null, asked.dropped.length > 0 ? (_jsxs("p", { style: { ...quiet, margin: 0 }, "data-testid": "list-dropped", children: ["This link asked for ", asked.dropped.join(", "), ", which ", plural.toLowerCase(), " cannot be arranged by; the rest is shown."] })) : null, all.length > 1 ? (_jsx(ArrangeBar, { schema: store.schema, graph: store.graph, kind: kind, arrangement: arrangement, onChange: rearrange, kept: { shown: members.length, of: all.length },
|
|
144
|
+
// The nav's Find box narrows this list; a second box for the same
|
|
145
|
+
// `?q=` would be two answers to one question. An app's own shell
|
|
146
|
+
// has no such box, so there the row keeps its own.
|
|
147
|
+
query: context.framed === true })) : null, members.length === 0 && typed.words ? (
|
|
148
|
+
/* Honest about nothing: what was searched, and the way forward below — the name already in it. */
|
|
149
|
+
_jsxs("p", { style: { ...lede, fontSize: "1.0625rem" }, "data-testid": "none-yet", children: ["Nothing here is called \u201C", typed.words, "\u201D.", " ", _jsx("span", { style: quiet, "data-testid": "list-searched", children: describeSearched(store.schema, { kinds: [kind], past: showingPast }) }), " ", _jsx(Link, { to: "?", style: link, children: "Show every one" })] })) : members.length === 0 ? (_jsxs("p", { style: { ...lede, fontSize: "1.0625rem" }, "data-testid": "none-yet", children: [arrangement.filter?.length || arrangement.query ? "None of them." : "None yet", !arrangement.filter?.length && !arrangement.query && creators.length > 0
|
|
150
|
+
? ` — the first one starts below, with “${creators[0]?.mutation.title ?? creators[0]?.mutation.name}”.`
|
|
151
|
+
: !arrangement.filter?.length && !arrangement.query
|
|
152
|
+
? "."
|
|
153
|
+
: "", arrangement.filter?.length || arrangement.query ? (_jsxs(_Fragment, { children: [" ", _jsx(Link, { to: "?", style: link, children: "Show every one" })] })) : null] })) : arranged.grouped && grouping ? (_jsx("div", { style: { display: "grid", gap: 18 }, "data-testid": "records", "data-grouped": grouping, children: arranged.groups.map((group) => (_jsxs("section", { style: { display: "grid", gap: 0 }, "data-testid": "list-group", children: [_jsxs("h2", { style: { ...h2, fontSize: "1.0625rem", marginBottom: 4 }, children: [group.label, " ", _jsx("span", { style: quiet, children: group.nodes.length })] }), _jsx("ul", { style: { margin: 0, padding: 0, listStyle: "none", display: "grid", gap: 0 }, children: group.nodes.map(row) })] }, group.key || "-"))) })) : (_jsx("ul", { style: { margin: 0, padding: 0, listStyle: "none", display: "grid", gap: 0 }, "data-testid": "records", children: members.map(row) })), retired > 0 ? (_jsxs(Link, { to: withWord(search, "filter", "is:any"), style: { ...link, ...quiet }, "data-testid": "past-link", children: ["+", retired, " past"] })) : null, 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, ...(startsWith[mutation.name] && members.length === 0 ? { initial: { [startsWith[mutation.name]]: typed.words } } : {}), ...(context.principal ? { principal: context.principal } : {}) }, startsWith[mutation.name] && members.length === 0 ? `${mutation.name}|${typed.words}` : mutation.name)] }, affordance.id))), withheld.length > 0 ? (_jsx("ul", { style: { ...rule, margin: 0, padding: 0, listStyle: "none", display: "grid", gap: 4 }, "data-testid": "withheld", children: withheld.map((entry) => (_jsxs("li", { style: quiet, children: [_jsx("s", { children: entry.label }), " \u2014 ", entry.refusal.message] }, entry.id))) })) : null] }));
|
|
154
|
+
}
|
|
155
|
+
/**
|
|
156
|
+
* The search, read as an arrangement — the shared words first, then the
|
|
157
|
+
* keys this page grew before there was a shared module, folded in so every
|
|
158
|
+
* link that ever worked still lands: `by` is a grouping, an edge kind names
|
|
159
|
+
* a far end to keep, `with` keeps the ones tied to anything, `past` widens
|
|
160
|
+
* the horizon. What the kind cannot be arranged by is named, not thrown.
|
|
161
|
+
*/
|
|
162
|
+
export function arrangementFromSearch(search, offers, edgeKinds) {
|
|
163
|
+
const parsed = parseArrangement({
|
|
164
|
+
...(search.get("sort") ? { sort: search.get("sort") } : {}),
|
|
165
|
+
...(search.get("filter") ? { filter: search.get("filter") } : {}),
|
|
166
|
+
...(search.get("group") ? { group: search.get("group") } : {}),
|
|
167
|
+
...(search.get("q") ? { q: search.get("q") } : {}),
|
|
168
|
+
});
|
|
169
|
+
const conditions = [...(parsed.filter ?? [])];
|
|
170
|
+
const by = search.get("by");
|
|
171
|
+
const group = parsed.group ?? (by ? { by } : undefined);
|
|
172
|
+
for (const edgeKind of edgeKinds) {
|
|
173
|
+
const otherId = search.get(edgeKind);
|
|
174
|
+
if (otherId)
|
|
175
|
+
conditions.push({ key: edgeKind, value: otherId });
|
|
176
|
+
}
|
|
177
|
+
const withEdge = search.get("with");
|
|
178
|
+
if (withEdge)
|
|
179
|
+
conditions.push({ key: withEdge, value: "*" });
|
|
180
|
+
if (search.get("past") === "1" && !conditions.some((condition) => condition.key === "is"))
|
|
181
|
+
conditions.push({ key: "is", value: "any" });
|
|
182
|
+
return admitArrangement({
|
|
183
|
+
...(parsed.sort ? { sort: parsed.sort } : {}),
|
|
184
|
+
...(parsed.query ? { query: parsed.query } : {}),
|
|
185
|
+
...(conditions.length > 0 ? { filter: conditions } : {}),
|
|
186
|
+
...(group ? { group } : {}),
|
|
187
|
+
}, offers);
|
|
188
|
+
}
|
|
189
|
+
/** The current search with one word set — a link to the same list, arranged one step differently. */
|
|
190
|
+
function withWord(search, key, value) {
|
|
191
|
+
const next = new URLSearchParams(search);
|
|
192
|
+
next.set(key, value);
|
|
193
|
+
next.delete("past");
|
|
194
|
+
return `?${next.toString()}`;
|
|
195
|
+
}
|
|
196
|
+
//# sourceMappingURL=page-list.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"page-list.js","sourceRoot":"","sources":["../src/page-list.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAC/D,OAAO,EACL,gBAAgB,EAChB,OAAO,EACP,WAAW,EACX,gBAAgB,EAChB,iBAAiB,EACjB,aAAa,EACb,cAAc,EACd,SAAS,EACT,OAAO,EACP,SAAS,EACT,gBAAgB,EAChB,UAAU,GAKX,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACpE,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAChD,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AACxC,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC9E,OAAO,EAAoB,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACnE,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,cAAc,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAC3D,OAAO,EACL,OAAO,EACP,QAAQ,EACR,OAAO,EACP,MAAM,EACN,EAAE,EACF,EAAE,EACF,IAAI,EACJ,IAAI,EACJ,KAAK,EACL,QAAQ,EACR,KAAK,EACL,IAAI,GACL,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,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AU,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,SAAS,CAAC,GAAG,KAAK,IAAI,CAAC;QAAE,UAAU,CAAC,IAAI,CAAC,EAAE,GAAG,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,CAAC;IACxI,OAAO,gBAAgB,CACrB;QACE,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QAC7C,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QAChD,GAAG,CAAC,UAAU,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,UAAU,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QACxD,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;KAC5B,EACD,MAAM,CACP,CAAC;AACJ,CAAC;AAED,qGAAqG;AACrG,SAAS,QAAQ,CAAC,MAAuB,EAAE,GAAW,EAAE,KAAa;IACnE,MAAM,IAAI,GAAG,IAAI,eAAe,CAAC,MAAM,CAAC,CAAC;IACzC,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;IACrB,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IACpB,OAAO,IAAI,IAAI,CAAC,QAAQ,EAAE,EAAE,CAAC;AAC/B,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { type AnySchema } from "@graview/core";
|
|
2
|
+
import { type PageContext } from "./page-context.js";
|
|
3
|
+
/**
|
|
4
|
+
* HOW IT FITS TOGETHER: every declared relation between the kinds, in the
|
|
5
|
+
* declaration's words, with its count — the roads between the districts
|
|
6
|
+
* and the key that names them, as a page can carry them. On the home page
|
|
7
|
+
* as a section; at `/map` on its own.
|
|
8
|
+
*/
|
|
9
|
+
export declare function KindMapSection<S extends AnySchema>({ context, heading }: {
|
|
10
|
+
context: PageContext<S>;
|
|
11
|
+
heading?: boolean;
|
|
12
|
+
}): import("react").JSX.Element | null;
|
|
13
|
+
export declare function DefaultMapPage<S extends AnySchema>({ context }: {
|
|
14
|
+
context: PageContext<S>;
|
|
15
|
+
}): import("react").JSX.Element;
|
|
16
|
+
/** The questions the seat has asked and nobody has answered, each at the record it is about. */
|
|
17
|
+
export declare function SeatQuestions<S extends AnySchema>({ context }: {
|
|
18
|
+
context: PageContext<S>;
|
|
19
|
+
}): import("react").JSX.Element | null;
|
|
20
|
+
//# sourceMappingURL=page-map.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"page-map.d.ts","sourceRoot":"","sources":["../src/page-map.tsx"],"names":[],"mappings":"AACA,OAAO,EAA0B,KAAK,SAAS,EAAc,MAAM,eAAe,CAAC;AAKnF,OAAO,EAAE,KAAK,WAAW,EAAgB,MAAM,mBAAmB,CAAC;AA0DnE;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,CAAC,SAAS,SAAS,EAAE,EAAE,OAAO,EAAE,OAAc,EAAE,EAAE;IAAE,OAAO,EAAE,WAAW,CAAC,CAAC,CAAC,CAAC;IAAC,OAAO,CAAC,EAAE,OAAO,CAAA;CAAE,sCAwB9H;AAED,wBAAgB,cAAc,CAAC,CAAC,SAAS,SAAS,EAAE,EAAE,OAAO,EAAE,EAAE;IAAE,OAAO,EAAE,WAAW,CAAC,CAAC,CAAC,CAAA;CAAE,+BAiC3F;AAED,gGAAgG;AAChG,wBAAgB,aAAa,CAAC,CAAC,SAAS,SAAS,EAAE,EAAE,OAAO,EAAE,EAAE;IAAE,OAAO,EAAE,WAAW,CAAC,CAAC,CAAC,CAAA;CAAE,sCAyB1F"}
|