@jmbarzee/force-graph 0.1.0 → 0.1.1

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/README.md CHANGED
@@ -9,7 +9,8 @@ their values on those axes, and mounts `GraphView`. The view lays the graph out
9
9
  pull on any axis the nodes carry, two layout axes keyed on an axis or a
10
10
  computed scalar), filters it on any declared axis, highlights it, and lets the
11
11
  user tune the forces — without knowing what any node or edge means. The host's
12
- vocabulary never enters this package.
12
+ vocabulary never enters this package. What the user sees and does is
13
+ [SPEC.md](SPEC.md).
13
14
 
14
15
  ## Install
15
16
 
@@ -295,15 +296,14 @@ the console. Everything else is optional.
295
296
  refused; with `classifyEdge` given, its answer stands. Derived containment
296
297
  edges are `in:<id>` (numbered on a collision) and reach `highlight` and
297
298
  `collapse`. An error diagnostic drops the edge, or the later node of a
298
- duplicated id, or clears the `parentId`, it names. The search dropdown lists visible matches; hidden ones badge the
299
- chip hiding them. The pane's theme observer watches every `data-theme` in
300
- the document unless `systemTheme` is given.
299
+ duplicated id, or clears the `parentId`, it names. The pane's theme
300
+ observer watches every `data-theme` in the document unless `systemTheme` is
301
+ given.
301
302
  - **Keyboard.** `keyboard` scopes the shortcuts: `pane` (the default — the
302
303
  focusable root handles the keys that reach it, so a page keeps Tab and
303
304
  Space for its own controls), `global` (the window — a page that is the
304
- pane, or a tab shell's active tab) or `none` (a hidden tab). Tab cycles
305
- nodes, Enter selects, Escape closes, arrows pan, `+`/`-` zoom, F fits, `/`
306
- opens search (while the search is offered), Space pauses, `?` lists them.
305
+ pane, or a tab shell's active tab) or `none` (a hidden tab). The keys are
306
+ [SPEC § Keyboard](SPEC.md#keyboard).
307
307
 
308
308
  ## Two views sharing a bar
309
309
 
@@ -342,9 +342,8 @@ last `linked.focus` asked of it with `onFocusResult` (a `FilterBar` ignores
342
342
  those two); it throws for a view the hook was not given (`views` is read
343
343
  once). `linked.active` is the view shown.
344
344
  `linked.switchTo(to, transition?)` switches from the active view and makes
345
- `to` active: a manual switch (the default) adopts the active view's
346
- selections except where locked, a focus widens the destination to show its
347
- target. `linked.focus(view, node)` is the focus switch and the request in one.
345
+ `to` active, reconciling as [SPEC § Linked views](SPEC.md#linked-views) says
346
+ (a manual switch is the default). `linked.focus(view, node)` is the focus switch and the request in one.
348
347
  `linked.updateFilter(view, fn)` rewrites one view's filter and
349
348
  `linked.updateFilters(fn)` every view's (a stale value pruned when the data
350
349
  changes — `reseedFilter` is the rule the hook itself applies to every view
@@ -358,7 +357,8 @@ its own data, the `counts`. The lock toggles appear only when `locks` is
358
357
  controlled with its callback — `useLinkedViews` does — or `chrome.locks` asks.
359
358
  The bar tracks the values that just turned on for its chip flash
360
359
  (`RecentlyChanged`, a set per axis); a host with its own rule passes
361
- `recentlyChanged`.
360
+ `recentlyChanged`. `refreshFlash` flashes the bar each time the host bumps
361
+ it.
362
362
 
363
363
  What the pane computes for its own bar is exported for the second view:
364
364
  `passesSelection({ filter, taxonomy, axes, node })` decides visibility on the
@@ -387,8 +387,8 @@ stylesheet per theme (`--gv-color-bg`, `--gv-color-text`, `--gv-accent`,
387
387
  `--gv-font-sans`, …), and every class is `gv-*`; a host overrides a token by
388
388
  redeclaring it on an ancestor. Each style value's fill and border are
389
389
  published on the pane under the name `taxonomy.colorVar(value)` answers —
390
- `--gv-node-` and the value id in kebab case (`nexusEndpoint` →
391
- `--gv-node-nexus-endpoint`), or a numbered name when the id kebab-cases to
390
+ `--gv-node-` and the value id in kebab case (a value id such as
391
+ `teachingLab` → `--gv-node-teaching-lab`), or a numbered name when the id kebab-cases to
392
392
  nothing or to another value's — and `-border` for the border. A host's own
393
393
  chrome beside the pane reads the same tints through `schemeVars(taxonomy,
394
394
  theme)` inline, or `schemeStylesheet(taxonomy, darkSelector?)` mounted once
@@ -411,8 +411,7 @@ draw in lanes.
411
411
 
412
412
  The charge force is O(n²) over the visible nodes: a few hundred draw
413
413
  smoothly, a few thousand do not. The push/pull and layout controls bound their
414
- tokens by a ceiling (an axis with more values than the ceiling is offered but
415
- cannot be tuned on, and a tuning that outgrows it returns to the style axis).
414
+ tokens by a ceiling ([SPEC § The control panel](SPEC.md#the-control-panel)).
416
415
  What is not built is filed as issues: colour by another axis
417
416
  ([#9](https://github.com/jmbarzee/force-graph/issues/9)), an opaque `Taxonomy`
418
417
  ([#10](https://github.com/jmbarzee/force-graph/issues/10)), undirected edges