Skip to content

About

Declarative map views of structured-context spaces: a short definition projects a space into a tree, nested containers or an XY plot.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

structured-context-map-views

Declarative visualisations of structured-context spaces.

A map view is a short JSON5 definition that projects every space of one schema into a visual form: a tree, nested containers, or an XY plot. The same space can be shown several ways, and readers can switch settings such as orientation or grouping through parameters the definition declares. Definitions are found the way structured-context finds plugin schemas: bundled here, in plugins, or in a map-views/ folder next to your config.

{
  $schema: 'https://raw.githubusercontent.com/mindsocket/structured-context-map-views/main/schemas/generated/latest/definition.json',
  $id: 'sctx-map-view://strategy-tree',
  title: 'Strategy tree',
  schema: 'sctx://core/strategy_general',
  regions: [{ id: 'main', layout: { type: 'tree', orientation: 'vertical' } }],
}

This repo holds:

  • The library (packages/map-views, package structured-context-map-views): React components that render a map view inside any host app, using the browser's own layout engine plus an SVG overlay for connectors.
  • An export command (structured-context-map-views export <space>): a JSON snapshot of a space (graph, validation results, map view definitions) for rendering a map view in a host that can't run structured-context.
  • A Claude artifact host (dist/artifact.html, dist/artifact.js): publishes a space's map views as a private artifact whose data lives in the artifact database.
  • The navigator (apps/navigator, not published): a standalone app for browsing your spaces through their map views.

Pre-1.0. Docs:

  • Concepts: map views, regions, layouts, occurrences, parameters
  • Definitions: writing a map view definition
  • Architecture: how the library is put together
  • API: embedding map views in a host

Development

bun install
bun run dev        # the navigator, reading spaces from your structured-context config
bun test && bun run typecheck && bun run lint
bun run test:package   # packs the library and checks it installs and typechecks in an empty project

Licence: MIT.

About

Declarative map views of structured-context spaces: a short definition projects a space into a tree, nested containers or an XY plot.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages