@graview/primitives

The primitive set, the three lenses, the workbench and the visual system.

pnpm add @graview/primitives

What it is

A rich primitive set, five lenses, the workbench and the visual system.

Primitives — Panel, Chip, Roster, Grid, Axis, Connector, Aggregate, Fields. Enough that a new node kind renders sensibly at all three fidelities before anyone writes a view for it.

Lenses — a timeline, a calendar, a coverage matrix, a board and a plan. Each binds ROLES to an app's own fields or kinds, so a lens written for one domain is reused by another without learning anything about it. All five are built from the public primitives, which makes them the worked example of the authoring API rather than privileged insiders. The board draws discs when every slot's code is three characters or fewer and tokens — a pill sized to the word, the occupants inside it — when any code is longer; arrange: "shelf" lays a board whose x and y are categories out as headed bands.

Workbench — the parts of an interface that are not about the domain: what is selected and what can be done with it, whether the rules hold, what just happened and how to take it back, how to back out of a view. All derived from the schema, the invariants and the op log.

Visual system — themeCss(scheme, brand). Two schemes that are not inversions of each other: dark loses luminance, light loses contrast and gains haze. A brand supplies its own and graview check measures it.

What it exports (134)

Read off the package's own barrel, so this is what is there today.

  • activeWindow
  • ActivityRail
  • actThatMoves
  • addDays
  • addMonths
  • AgentSeat
  • Aggregate
  • AnswerArgs
  • ArrangeBar
  • arrangementCaption
  • arrangementOf
  • assignLanes
  • Axis
  • BackOut
  • Backtrack
  • Begin
  • BOARD_REQUIRED_ROLES
  • BoardBindingError
  • BoardView
  • buildBoard
  • buildCoverage
  • buildPlanLens
  • buildReach
  • CALENDAR_RANGES
  • CALENDAR_REQUIRED_ROLES
  • CalendarBindingError
  • capCoverage
  • ChatPanel
  • Chip
  • Companion
  • Connections
  • Connector
  • COVERAGE_MAX_COLUMNS
  • COVERAGE_MAX_ROWS
  • COVERAGE_REQUIRED_ROLES
  • CoverageBindingError
  • CoverageView
  • createBoardLens
  • createCalendarLens
  • createCoverageLens
  • createPlanLens
  • createTimelineLens
  • DARK
  • dayOf
  • daysBetween
  • daysFrom
  • descentTarget
  • describeSource
  • Door
  • downscale
  • EditableTitle
  • EditableValue
  • endOfMonth
  • entriesIn
  • entriesOn
  • FAINT_TEXT
  • Fields
  • FindBox
  • finerThan
  • GRAVIEW_BRAND
  • Grid
  • handles
  • hasFigure
  • hueFor
  • humanise
  • Inspector
  • Intake
  • KindFigure
  • LadderSetting
  • LIGHT
  • minutesOf
  • MUTED_TEXT
  • nameOf
  • OverviewButton
  • Panel
  • PHOTO_MAX_EDGE
  • PHOTO_QUALITY
  • placeOnCalendar
  • placeOnTimeline
  • Places
  • PLAN_REQUIRED_ROLES
  • PlanBindingError
  • PlanReview
  • PlanView
  • Profile
  • proposalKey
  • Prose
  • QuickRelations
  • rangesOf
  • reachLens
  • ReachView
  • registerDefaultViews
  • RelationKey
  • RelationMark
  • relationWords
  • Roster
  • rosterOf
  • sayCondition
  • SCHEMES
  • SeatComposer
  • SeatHeader
  • Seats
  • SeatSettings
  • SeatThread
  • Settled
  • Shell
  • ShowInstallation
  • spanOf
  • splitAside
  • Standing
  • StartFresh
  • startOfMonth
  • startOfQuarter
  • startOfWeek
  • themeCss
  • themeVariables
  • THUMBNAIL_BUDGET
  • TIMELINE_REQUIRED_ROLES
  • TimelineBindingError
  • TimelineView
  • titleOf
  • Trail
  • UndoTurn
  • useArranging
  • useMarkup
  • useRecentChanges
  • useSeatConversation
  • useSubject
  • useWidth
  • VISUALLY_HIDDEN
  • weekdayOf
  • withArrangement
  • withMore
  • Wordmark