@graview/graverse
@graview/graverse is one of the 16 npm packages of Graview, a TypeScript framework that derives an app’s interface, permissions and agent tools from one declaration. The Graverse: every app the local hub reaches drawn as one space, read and found across from a search box, each app and record opened through the hub. A plain page that works from the keyboard and without WebGL, and a lazy drawing in three dimensions. Experimental.
pnpm add @graview/graverseEntry points: @graview/graverse, @graview/graverse/space, @graview/graverse/layout, @graview/graverse/camera
What it is
The Graverse: every app the local hub reaches, drawn as one space, found across from one box, and opened at its own page through the hub. Read and navigate; nothing here changes an app, though its last part changes which apps the hub knows. Experimental.
graview hub start # prints the address to open; the Graverse is the hub's own pageThe graview tool carries this page, built, in dist/graverse/, and the hub serves it at its address. Nothing here is a product's dependency, and no app's page carries it or three.
The page
mountGraverse(element) draws the plain page: the index of spaces and apps, the search box, the matches grouped by app with every field that matched, a breadcrumb, where to start, and the detail of what is chosen, with an app's records changed lately. It is the whole page with WebGL off, and the whole page from the keyboard: Tab to an app, Enter to choose it, Tab to Open. / finds, and Escape steps back along the breadcrumb, then clears the search once nothing is chosen.
It asks the hub three things (hubClient): the universe described (POST /universe/describe), a find read one app's answer at a time as each arrives (POST /universe/find, lines of JSON), and one app's cloud, its records as the seat sees them, asked live when the camera comes near (POST /universe/cloud). Records are never kept by the hub for the page.
At the end of the index, "Apps on this machine" manages which apps the hub knows: each registered app and its checkouts, to remove one or make another current; a folder to add, looked at first so the address it lands at is said before anything is written; and "Find Graview apps on this machine", a scan whose findings arrive as it walks, each added with one press. Its body, fetched the first time it is opened, asks the hub's /hub/apps, /hub/look, /hub/use and /hub/scan; looking and scanning read manifests alone, and only adding runs an app's declaration, on the hub.
Where WebGL is there (canDrawSpace), the page fetches its drawing, @graview/graverse/space (mountSpace), which is the only module that imports three. Spaces are faint grounds; an app far away is one point of light, as bright as it is recent; come near and its records gather into its kinds where its city map puts them (cityMap from @graview/core/city). At rest one label per space shows; while a search is on, every app with matches is labeled with its count.
The arithmetic
@graview/graverse/camera is the camera with no drawing library: dragTo keeps the grabbed point under the pointer, zoomAbout keeps the point under the pointer where it is, turnAbout keeps the pressed point where it was, glide moves between two cameras (a cut under reduced motion), and project, pointUnder and framing read the screen. @graview/graverse/layout places everything, the same way every time: universeLayout packs a space's apps by the cube root of their records, kindPlaces stands an app's kinds on its city map and recordPlaces puts each record by its own id.
Elastic License 2.0
What it exports (4)
Read off the package's own barrel, so this is what is there today.
canDrawSpacehubClientmountGraverseNAMES_KEY