@medicine-wheel/graph-viz 0.17.6 → 0.17.7
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 +33 -0
- package/dist/LineageWeb.d.ts +68 -0
- package/dist/LineageWeb.d.ts.map +1 -0
- package/dist/LineageWeb.js +143 -0
- package/dist/LineageWeb.js.map +1 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +14 -1
- package/dist/index.js.map +1 -1
- package/dist/lineage-web.d.ts +138 -0
- package/dist/lineage-web.d.ts.map +1 -0
- package/dist/lineage-web.js +194 -0
- package/dist/lineage-web.js.map +1 -0
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -96,6 +96,39 @@ const positioned = applyWheelLayout(data, { radius: 300, centerX: 400, centerY:
|
|
|
96
96
|
import { buildGraphData, nodesToGraphNodes, edgesToGraphLinks } from '@medicine-wheel/graph-viz';
|
|
97
97
|
```
|
|
98
98
|
|
|
99
|
+
### `<LineageWeb>`: episodes and their relations
|
|
100
|
+
|
|
101
|
+
Episodes sit on a spine in chronicle order, each in its direction's band. Continuation arcs bow
|
|
102
|
+
above and relation arcs bow below, rising with the square root of their length and staying inside
|
|
103
|
+
the canvas. Hover or select an episode to light its arcs. A tap selects and a second tap calls
|
|
104
|
+
`onOpen`. The wheel's Episodes tab and the Miadi chronicle both draw it (jgwill/medicine-wheel#162).
|
|
105
|
+
|
|
106
|
+
```tsx
|
|
107
|
+
import { LineageWeb } from '@medicine-wheel/graph-viz';
|
|
108
|
+
|
|
109
|
+
<LineageWeb
|
|
110
|
+
episodes={[{ id: 'ep044', label: 'E044', title: 'Teaching…', direction: 'east', date: '2026-06-10', thread: 'portal' }]}
|
|
111
|
+
edges={[{ from: 'ep044', to: 'ep001', kind: 'continuation', words: 'grounds the ceremony of seeing' }]}
|
|
112
|
+
matches={query ? new Set(found) : null} // keeps what a search found and, as rings, its relatives
|
|
113
|
+
onOpen={(id) => router.push(`/episodes/${id}`)}
|
|
114
|
+
/>
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
| Prop | Default | |
|
|
118
|
+
|------|---------|---|
|
|
119
|
+
| `episodes`, `edges` | | Episodes oldest first; edges `continuation` or `relation`, with optional `words` |
|
|
120
|
+
| `selected` / `onSelect` | held by the web | Controlled selection |
|
|
121
|
+
| `onOpen` | | Called on a second tap of the selected episode |
|
|
122
|
+
| `matches`, `matchMode` | `null`, `'kin'` | `kin` keeps the matches and their relatives; `fade` dims the rest |
|
|
123
|
+
| `view` / `defaultView` / `onViewChange` | whole chronicle, depth 1, both kinds, threads on | `scope: 'all' \| 'around'`, `depth: 1 \| 2`, `kinds`, `threads` |
|
|
124
|
+
| `controls` | `true` | The options bar: whole chronicle or around the selected episode, depth, kinds, threads |
|
|
125
|
+
| `colors`, `threadColors`, `bandLabels` | `--mw-*` tokens | |
|
|
126
|
+
| `layout` | `DEFAULT_LINEAGE_WEB_LAYOUT` | Margins, band gap, head and foot room for arcs, minimum step and width |
|
|
127
|
+
| `startAt` | `'start'` | `'end'` opens scrolled to the newest episodes |
|
|
128
|
+
|
|
129
|
+
The geometry is exported without React: `visibleLineage`, `lineageNeighbourhood`,
|
|
130
|
+
`layoutLineageWeb`, `lineageArcPath`, `threadChains`.
|
|
131
|
+
|
|
99
132
|
## License
|
|
100
133
|
|
|
101
134
|
MIT — IAIP Collaborative, Shawinigan, QC
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @medicine-wheel/graph-viz — LineageWeb
|
|
3
|
+
*
|
|
4
|
+
* Episodes on a spine in chronicle order, each in its direction's band, with
|
|
5
|
+
* the relations between them drawn as arcs: continuation above, relation
|
|
6
|
+
* below. Pure SVG, no router and no CSS framework: colours come from the
|
|
7
|
+
* `--mw-*` tokens (with fallbacks) or the `colors` prop, and opening an
|
|
8
|
+
* episode is the caller's `onOpen`.
|
|
9
|
+
*
|
|
10
|
+
* Hover or select an episode to light its arcs. A tap selects, a second tap
|
|
11
|
+
* opens. A search (`matches`) keeps the episodes related to what it found.
|
|
12
|
+
* The options bar chooses the whole chronicle or the selected episode's
|
|
13
|
+
* relatives, which kinds of relation to draw, and the thread chains.
|
|
14
|
+
* jgwill/medicine-wheel#162.
|
|
15
|
+
*/
|
|
16
|
+
import React from 'react';
|
|
17
|
+
import { LINEAGE_BANDS, type LineageWebEdge, type LineageWebEpisode, type LineageWebLayoutConfig, type LineageWebView } from './lineage-web.js';
|
|
18
|
+
export interface LineageWebColors {
|
|
19
|
+
east: string;
|
|
20
|
+
south: string;
|
|
21
|
+
west: string;
|
|
22
|
+
north: string;
|
|
23
|
+
/** Episodes with no direction. */
|
|
24
|
+
undirected: string;
|
|
25
|
+
text: string;
|
|
26
|
+
muted: string;
|
|
27
|
+
border: string;
|
|
28
|
+
/** The lit arcs, the active option, the selection ring. */
|
|
29
|
+
accent: string;
|
|
30
|
+
/** The chip's ground. */
|
|
31
|
+
panel: string;
|
|
32
|
+
}
|
|
33
|
+
export declare const DEFAULT_LINEAGE_WEB_COLORS: LineageWebColors;
|
|
34
|
+
export interface LineageWebProps {
|
|
35
|
+
/** In chronicle order, oldest first. */
|
|
36
|
+
episodes: LineageWebEpisode[];
|
|
37
|
+
edges: LineageWebEdge[];
|
|
38
|
+
/** The selected episode. Pass it to control the selection; leave it out to let the web hold it. */
|
|
39
|
+
selected?: string | null;
|
|
40
|
+
onSelect?: (id: string | null) => void;
|
|
41
|
+
/** A second tap on the selected episode. */
|
|
42
|
+
onOpen?: (id: string) => void;
|
|
43
|
+
/** The episodes a search matched, or null when nothing is typed. */
|
|
44
|
+
matches?: ReadonlySet<string> | null;
|
|
45
|
+
/** `kin` (default) keeps the matches and their relatives; `fade` dims what did not match. */
|
|
46
|
+
matchMode?: 'kin' | 'fade';
|
|
47
|
+
/** Pass it to control the view; leave it out to let the options bar hold it. */
|
|
48
|
+
view?: LineageWebView;
|
|
49
|
+
defaultView?: Partial<LineageWebView>;
|
|
50
|
+
onViewChange?: (view: LineageWebView) => void;
|
|
51
|
+
/** The options bar above the canvas. Default true. */
|
|
52
|
+
controls?: boolean;
|
|
53
|
+
/** A chip naming the hovered or selected episode. Default true. */
|
|
54
|
+
chip?: boolean;
|
|
55
|
+
colors?: Partial<LineageWebColors>;
|
|
56
|
+
/** Thread name → colour of its chain. */
|
|
57
|
+
threadColors?: Record<string, string>;
|
|
58
|
+
layout?: Partial<LineageWebLayoutConfig>;
|
|
59
|
+
/** Where the canvas opens when it is wider than its box. Default `start`. */
|
|
60
|
+
startAt?: 'start' | 'end';
|
|
61
|
+
/** Words for the band labels, e.g. `{ east: 'East · Waabinong' }`. */
|
|
62
|
+
bandLabels?: Partial<Record<(typeof LINEAGE_BANDS)[number], string>>;
|
|
63
|
+
/** Each episode's `label` beside its dot. `auto` (default) shows them when 40 or fewer episodes are drawn. */
|
|
64
|
+
labels?: 'auto' | 'always' | 'never';
|
|
65
|
+
style?: React.CSSProperties;
|
|
66
|
+
}
|
|
67
|
+
export declare function LineageWeb({ episodes, edges, selected: selectedProp, onSelect, onOpen, matches, matchMode, view: viewProp, defaultView, onViewChange, controls, chip, colors: colorsProp, threadColors, layout: layoutProp, startAt, bandLabels, labels, style, }: LineageWebProps): React.JSX.Element;
|
|
68
|
+
//# sourceMappingURL=LineageWeb.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LineageWeb.d.ts","sourceRoot":"","sources":["../src/LineageWeb.tsx"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAA+C,MAAM,OAAO,CAAC;AAEpE,OAAO,EAEL,aAAa,EAMb,KAAK,cAAc,EACnB,KAAK,iBAAiB,EACtB,KAAK,sBAAsB,EAC3B,KAAK,cAAc,EACpB,MAAM,kBAAkB,CAAC;AAE1B,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAA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AO,CAAC,sBAAsB,CAAC,CAAC;IACzC,6EAA6E;IAC7E,OAAO,CAAC,EAAE,OAAO,GAAG,KAAK,CAAC;IAC1B,sEAAsE;IACtE,UAAU,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,CAAC,OAAO,aAAa,CAAC,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC;IACrE,8GAA8G;IAC9G,MAAM,CAAC,EAAE,MAAM,GAAG,QAAQ,GAAG,OAAO,CAAC;IACrC,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;CAC7B;AAID,wBAAgB,UAAU,CAAC,EACzB,QAAQ,EACR,KAAK,EACL,QAAQ,EAAE,YAAY,EACtB,QAAQ,EACR,MAAM,EACN,OAAc,EACd,SAAiB,EACjB,IAAI,EAAE,QAAQ,EACd,WAAW,EACX,YAAY,EACZ,QAAe,EACf,IAAW,EACX,MAAM,EAAE,UAAU,EAClB,YAAiB,EACjB,MAAM,EAAE,UAAU,EAClB,OAAiB,EACjB,UAAe,EACf,MAAe,EACf,KAAK,GACN,EAAE,eAAe,qBA+QjB"}
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
"use strict";
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.DEFAULT_LINEAGE_WEB_COLORS = void 0;
|
|
5
|
+
exports.LineageWeb = LineageWeb;
|
|
6
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
7
|
+
/**
|
|
8
|
+
* @medicine-wheel/graph-viz — LineageWeb
|
|
9
|
+
*
|
|
10
|
+
* Episodes on a spine in chronicle order, each in its direction's band, with
|
|
11
|
+
* the relations between them drawn as arcs: continuation above, relation
|
|
12
|
+
* below. Pure SVG, no router and no CSS framework: colours come from the
|
|
13
|
+
* `--mw-*` tokens (with fallbacks) or the `colors` prop, and opening an
|
|
14
|
+
* episode is the caller's `onOpen`.
|
|
15
|
+
*
|
|
16
|
+
* Hover or select an episode to light its arcs. A tap selects, a second tap
|
|
17
|
+
* opens. A search (`matches`) keeps the episodes related to what it found.
|
|
18
|
+
* The options bar chooses the whole chronicle or the selected episode's
|
|
19
|
+
* relatives, which kinds of relation to draw, and the thread chains.
|
|
20
|
+
* jgwill/medicine-wheel#162.
|
|
21
|
+
*/
|
|
22
|
+
const react_1 = require("react");
|
|
23
|
+
const lineage_web_js_1 = require("./lineage-web.js");
|
|
24
|
+
exports.DEFAULT_LINEAGE_WEB_COLORS = {
|
|
25
|
+
east: 'var(--mw-east-ink, #FFD700)',
|
|
26
|
+
south: 'var(--mw-south-ink, #FF7B72)',
|
|
27
|
+
west: 'var(--mw-west-ink, #9FAEC9)',
|
|
28
|
+
north: 'var(--mw-north-ink, #F7F5F0)',
|
|
29
|
+
undirected: 'var(--mw-muted, #A9A7C5)',
|
|
30
|
+
text: 'var(--mw-fg, #F0EFF7)',
|
|
31
|
+
muted: 'var(--mw-muted, #A9A7C5)',
|
|
32
|
+
border: 'var(--mw-border, #2B2B4E)',
|
|
33
|
+
accent: 'var(--mw-primary, #E0B84C)',
|
|
34
|
+
panel: 'var(--mw-card, #12122A)',
|
|
35
|
+
};
|
|
36
|
+
const FONT_MONO = 'ui-monospace, SFMono-Regular, Menlo, monospace';
|
|
37
|
+
function LineageWeb({ episodes, edges, selected: selectedProp, onSelect, onOpen, matches = null, matchMode = 'kin', view: viewProp, defaultView, onViewChange, controls = true, chip = true, colors: colorsProp, threadColors = {}, layout: layoutProp, startAt = 'start', bandLabels = {}, labels = 'auto', style, }) {
|
|
38
|
+
const colors = { ...exports.DEFAULT_LINEAGE_WEB_COLORS, ...colorsProp };
|
|
39
|
+
const [ownSelected, setOwnSelected] = (0, react_1.useState)(null);
|
|
40
|
+
const selected = selectedProp !== undefined ? selectedProp : ownSelected;
|
|
41
|
+
const [ownView, setOwnView] = (0, react_1.useState)({ ...lineage_web_js_1.DEFAULT_LINEAGE_VIEW, ...defaultView });
|
|
42
|
+
const view = viewProp ?? ownView;
|
|
43
|
+
const [hovered, setHovered] = (0, react_1.useState)(null);
|
|
44
|
+
const scroller = (0, react_1.useRef)(null);
|
|
45
|
+
const select = (id) => {
|
|
46
|
+
if (selectedProp === undefined)
|
|
47
|
+
setOwnSelected(id);
|
|
48
|
+
onSelect?.(id);
|
|
49
|
+
};
|
|
50
|
+
const changeView = (patch) => {
|
|
51
|
+
const next = { ...view, ...patch, kinds: { ...view.kinds, ...patch.kinds } };
|
|
52
|
+
if (!viewProp)
|
|
53
|
+
setOwnView(next);
|
|
54
|
+
onViewChange?.(next);
|
|
55
|
+
};
|
|
56
|
+
const shown = (0, react_1.useMemo)(() => (0, lineage_web_js_1.visibleLineage)(episodes, edges, { view, focus: selected, matches, matchMode }), [episodes, edges, view, selected, matches, matchMode]);
|
|
57
|
+
const layout = (0, react_1.useMemo)(() => (0, lineage_web_js_1.layoutLineageWeb)(shown.episodes, layoutProp), [shown.episodes, layoutProp]);
|
|
58
|
+
const chains = (0, react_1.useMemo)(() => (view.threads ? (0, lineage_web_js_1.threadChains)(shown.episodes) : []), [shown.episodes, view.threads]);
|
|
59
|
+
const byId = (0, react_1.useMemo)(() => new Map(shown.episodes.map((e) => [e.id, e])), [shown.episodes]);
|
|
60
|
+
const hasThreads = (0, react_1.useMemo)(() => episodes.some((e) => e.thread), [episodes]);
|
|
61
|
+
(0, react_1.useEffect)(() => {
|
|
62
|
+
const el = scroller.current;
|
|
63
|
+
if (el && startAt === 'end')
|
|
64
|
+
el.scrollLeft = el.scrollWidth;
|
|
65
|
+
}, [layout.width, startAt]);
|
|
66
|
+
const focus = hovered ?? selected;
|
|
67
|
+
const near = (0, react_1.useMemo)(() => {
|
|
68
|
+
if (!focus || !byId.has(focus))
|
|
69
|
+
return null;
|
|
70
|
+
const set = new Set([focus]);
|
|
71
|
+
for (const e of shown.edges) {
|
|
72
|
+
if (e.from === focus)
|
|
73
|
+
set.add(e.to);
|
|
74
|
+
if (e.to === focus)
|
|
75
|
+
set.add(e.from);
|
|
76
|
+
}
|
|
77
|
+
return set;
|
|
78
|
+
}, [focus, byId, shown.edges]);
|
|
79
|
+
const colorOf = (direction) => direction && lineage_web_js_1.LINEAGE_BANDS.includes(direction)
|
|
80
|
+
? colors[direction]
|
|
81
|
+
: colors.undirected;
|
|
82
|
+
const tap = (id) => {
|
|
83
|
+
if (selected === id)
|
|
84
|
+
onOpen?.(id);
|
|
85
|
+
else
|
|
86
|
+
select(id);
|
|
87
|
+
};
|
|
88
|
+
const active = focus ? byId.get(focus) ?? null : null;
|
|
89
|
+
const showLabels = labels === 'always' || (labels === 'auto' && shown.episodes.length <= 40);
|
|
90
|
+
const relatives = shown.found ? shown.episodes.length - shown.found.size : 0;
|
|
91
|
+
const summary = shown.found
|
|
92
|
+
? `${shown.found.size} found · ${relatives} related · ${shown.edges.length} relations`
|
|
93
|
+
: `${shown.episodes.length} episodes · ${shown.edges.length} relations`;
|
|
94
|
+
const option = (on) => ({
|
|
95
|
+
padding: '3px 10px',
|
|
96
|
+
borderRadius: 999,
|
|
97
|
+
fontSize: 12,
|
|
98
|
+
fontFamily: 'inherit',
|
|
99
|
+
cursor: 'pointer',
|
|
100
|
+
background: 'transparent',
|
|
101
|
+
color: on ? colors.text : colors.muted,
|
|
102
|
+
border: `1px solid ${on ? colors.accent : colors.border}`,
|
|
103
|
+
fontWeight: on ? 700 : 500,
|
|
104
|
+
});
|
|
105
|
+
const kindLabel = { continuation: 'continues from', relation: 'relates to' };
|
|
106
|
+
return ((0, jsx_runtime_1.jsxs)("div", { style: { display: 'flex', flexDirection: 'column', gap: 8, minWidth: 0, ...style }, children: [controls && ((0, jsx_runtime_1.jsxs)("div", { role: "toolbar", "aria-label": "Lineage view", style: { display: 'flex', gap: 6, flexWrap: 'wrap', alignItems: 'center', fontSize: 12, color: colors.muted }, children: [(0, jsx_runtime_1.jsx)("button", { type: "button", "aria-pressed": view.scope === 'all', style: option(view.scope === 'all'), onClick: () => changeView({ scope: 'all' }), children: "Whole chronicle" }), (0, jsx_runtime_1.jsx)("button", { type: "button", "aria-pressed": view.scope === 'around', style: option(view.scope === 'around'), onClick: () => changeView({ scope: 'around' }), title: "The selected episode and the episodes related to it", children: "Around the selected episode" }), (0, jsx_runtime_1.jsx)("button", { type: "button", style: option(view.depth === 2), "aria-pressed": view.depth === 2, onClick: () => changeView({ depth: view.depth === 2 ? 1 : 2 }), title: "How far relatives reach, around an episode and in a search", children: view.depth === 2 ? '2 steps' : '1 step' }), (0, jsx_runtime_1.jsx)("span", { style: { width: 1, height: 16, background: colors.border, margin: '0 4px' } }), ['continuation', 'relation'].map((kind) => ((0, jsx_runtime_1.jsxs)("button", { type: "button", "aria-pressed": view.kinds[kind], style: option(view.kinds[kind]), onClick: () => changeView({ kinds: { ...view.kinds, [kind]: !view.kinds[kind] } }), children: [(0, jsx_runtime_1.jsx)("svg", { width: 18, height: 8, "aria-hidden": true, style: { marginRight: 6, verticalAlign: 'middle' }, children: (0, jsx_runtime_1.jsx)("line", { x1: 1, y1: 4, x2: 17, y2: 4, stroke: "currentColor", strokeWidth: 1.6, strokeDasharray: kind === 'relation' ? '3 3' : undefined }) }), kindLabel[kind]] }, kind))), hasThreads && ((0, jsx_runtime_1.jsx)("button", { type: "button", "aria-pressed": view.threads, style: option(view.threads), onClick: () => changeView({ threads: !view.threads }), children: "threads" })), (0, jsx_runtime_1.jsx)("span", { style: { marginLeft: 'auto', fontFamily: FONT_MONO, fontSize: 11 }, children: summary })] })), (0, jsx_runtime_1.jsxs)("div", { style: { position: 'relative', minWidth: 0 }, children: [(0, jsx_runtime_1.jsx)("div", { ref: scroller, style: { overflowX: 'auto' }, children: (0, jsx_runtime_1.jsxs)("svg", { width: layout.width, height: layout.height, viewBox: `0 0 ${layout.width} ${layout.height}`, role: "img", "aria-label": `${summary}, in chronicle order`, style: { display: 'block', maxWidth: 'none' }, onClick: (event) => {
|
|
107
|
+
if (event.target === event.currentTarget)
|
|
108
|
+
select(null);
|
|
109
|
+
}, children: [lineage_web_js_1.LINEAGE_BANDS.map((band) => ((0, jsx_runtime_1.jsxs)("g", { pointerEvents: "none", children: [(0, jsx_runtime_1.jsx)("line", { x1: 0, x2: layout.width, y1: layout.bandY[band], y2: layout.bandY[band], stroke: colors.border, strokeWidth: 1, strokeDasharray: "2 8" }), (0, jsx_runtime_1.jsx)("text", { x: 10, y: layout.bandY[band] - 22, fill: colors[band], fontSize: 11, fontFamily: FONT_MONO, children: bandLabels[band] ?? band })] }, band))), layout.months.map((m) => ((0, jsx_runtime_1.jsx)("text", { x: m.x, y: layout.height - 7, textAnchor: m.x > layout.width - 60 ? 'end' : 'start', fontSize: 10, fontFamily: FONT_MONO, fill: colors.muted, pointerEvents: "none", children: m.label }, m.label))), chains.map((c) => {
|
|
110
|
+
const a = layout.positions.get(c.from);
|
|
111
|
+
const b = layout.positions.get(c.to);
|
|
112
|
+
if (!a || !b)
|
|
113
|
+
return null;
|
|
114
|
+
return ((0, jsx_runtime_1.jsx)("line", { x1: a.x, y1: a.y, x2: b.x, y2: b.y, stroke: threadColors[c.thread] ?? colors.muted, strokeWidth: 0.6, opacity: focus ? 0.08 : 0.2, pointerEvents: "none" }, `t:${c.from}:${c.to}`));
|
|
115
|
+
}), shown.edges.map((e, i) => {
|
|
116
|
+
const a = layout.positions.get(e.from);
|
|
117
|
+
const b = layout.positions.get(e.to);
|
|
118
|
+
if (!a || !b)
|
|
119
|
+
return null;
|
|
120
|
+
const lit = focus !== null && (e.from === focus || e.to === focus);
|
|
121
|
+
const from = byId.get(e.from);
|
|
122
|
+
return ((0, jsx_runtime_1.jsx)("path", { d: (0, lineage_web_js_1.lineageArcPath)(a, b, e.kind, layout), fill: "none", stroke: lit ? colors.accent : colorOf(from?.direction), strokeWidth: lit ? 2 : 1.2, strokeDasharray: e.kind === 'relation' ? '4 3' : undefined, opacity: lit ? 1 : focus ? 0.1 : e.kind === 'continuation' ? 0.55 : 0.4, pointerEvents: "none", children: e.words && (0, jsx_runtime_1.jsx)("title", { children: e.words }) }, e.id ?? `${e.from}:${e.kind}:${e.to}:${i}`));
|
|
123
|
+
}), shown.episodes.map((episode) => {
|
|
124
|
+
const p = layout.positions.get(episode.id);
|
|
125
|
+
const color = colorOf(episode.direction);
|
|
126
|
+
const relative = shown.found !== null && !shown.found.has(episode.id);
|
|
127
|
+
const dim = shown.faded.has(episode.id) || (near !== null && !near.has(episode.id));
|
|
128
|
+
const isSelected = episode.id === selected;
|
|
129
|
+
return ((0, jsx_runtime_1.jsxs)("g", { transform: `translate(${p.x} ${p.y})`, style: { cursor: 'pointer' }, opacity: dim ? 0.25 : 1, onClick: () => tap(episode.id), onMouseEnter: () => setHovered(episode.id), onMouseLeave: () => setHovered(null), children: [(0, jsx_runtime_1.jsx)("title", { children: `${episode.label} · ${episode.title ?? episode.id}${relative ? ' (related)' : ''}` }), (0, jsx_runtime_1.jsx)("circle", { r: 10, fill: "transparent" }), episode.id === focus && (0, jsx_runtime_1.jsx)("circle", { r: 11, fill: color, opacity: 0.22 }), relative ? ((0, jsx_runtime_1.jsx)("circle", { r: 4.5, fill: "none", stroke: color, strokeWidth: 1.6 })) : ((0, jsx_runtime_1.jsx)("circle", { r: isSelected ? 6 : 4, fill: color })), isSelected && (0, jsx_runtime_1.jsx)("circle", { r: 8.5, fill: "none", stroke: colors.text, strokeWidth: 1.4 }), showLabels && ((0, jsx_runtime_1.jsx)("text", { x: 7, y: -8, fontSize: 10, fontFamily: FONT_MONO, fill: colors.muted, pointerEvents: "none", children: episode.label }))] }, episode.id));
|
|
130
|
+
})] }) }), chip && active && ((0, jsx_runtime_1.jsxs)("div", { style: {
|
|
131
|
+
position: 'absolute',
|
|
132
|
+
left: 12,
|
|
133
|
+
bottom: 30,
|
|
134
|
+
maxWidth: 320,
|
|
135
|
+
background: colors.panel,
|
|
136
|
+
border: `1px solid ${colors.border}`,
|
|
137
|
+
borderLeft: `3px solid ${colorOf(active.direction)}`,
|
|
138
|
+
borderRadius: 10,
|
|
139
|
+
padding: '10px 12px',
|
|
140
|
+
pointerEvents: 'none',
|
|
141
|
+
}, children: [(0, jsx_runtime_1.jsxs)("div", { style: { display: 'flex', alignItems: 'center', gap: 8, marginBottom: 4, fontSize: 11, color: colors.muted }, children: [(0, jsx_runtime_1.jsx)("span", { style: { fontFamily: FONT_MONO, fontWeight: 700, color: colorOf(active.direction) }, children: active.label }), active.date && (0, jsx_runtime_1.jsx)("span", { style: { fontFamily: FONT_MONO }, children: active.date }), active.caption && (0, jsx_runtime_1.jsx)("span", { style: { marginLeft: 'auto' }, children: active.caption })] }), (0, jsx_runtime_1.jsx)("div", { style: { fontSize: 14, fontWeight: 800, lineHeight: 1.2, color: colors.text }, children: active.title ?? active.id }), shown.found && !shown.found.has(active.id) && ((0, jsx_runtime_1.jsx)("div", { style: { fontSize: 11, color: colors.muted, marginTop: 4 }, children: "related to an episode the search found" }))] }))] })] }));
|
|
142
|
+
}
|
|
143
|
+
//# sourceMappingURL=LineageWeb.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LineageWeb.js","sourceRoot":"","sources":["../src/LineageWeb.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;;AAmGb,gCAmSC;;AApYD;;;;;;;;;;;;;;GAcG;AAEH,iCAAoE;AAEpE,qDAY0B;AAkBb,QAAA,0BAA0B,GAAqB;IAC1D,IAAI,EAAE,6BAA6B;IACnC,KAAK,EAAE,8BAA8B;IACrC,IAAI,EAAE,6BAA6B;IACnC,KAAK,EAAE,8BAA8B;IACrC,UAAU,EAAE,0BAA0B;IACtC,IAAI,EAAE,uBAAuB;IAC7B,KAAK,EAAE,0BAA0B;IACjC,MAAM,EAAE,2BAA2B;IACnC,MAAM,EAAE,4BAA4B;IACpC,KAAK,EAAE,yBAAyB;CACjC,CAAC;AAoCF,MAAM,SAAS,GAAG,gDAAgD,CAAC;AAEnE,SAAgB,UAAU,CAAC,EACzB,QAAQ,EACR,KAAK,EACL,QAAQ,EAAE,YAAY,EACtB,QAAQ,EACR,MAAM,EACN,OAAO,GAAG,IAA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AE,YAAG,MAAM,CAAC,KAAK,IAAI,MAAM,CAAC,EAAE,GAAO,EACpH,KAAK,CAAC,KAAK,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,IAAI,CAC7C,gCAAK,KAAK,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,KAAK,EAAE,MAAM,CAAC,KAAK,EAAE,SAAS,EAAE,CAAC,EAAE,uDAA8C,CAC9G,IACG,CACP,IACG,IACF,CACP,CAAC;AACJ,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -8,6 +8,10 @@
|
|
|
8
8
|
* @packageDocumentation
|
|
9
9
|
*/
|
|
10
10
|
export { MedicineWheelGraph } from './MedicineWheelGraph.js';
|
|
11
|
+
export { LineageWeb, DEFAULT_LINEAGE_WEB_COLORS } from './LineageWeb.js';
|
|
12
|
+
export type { LineageWebProps, LineageWebColors } from './LineageWeb.js';
|
|
13
|
+
export { DEFAULT_LINEAGE_VIEW, DEFAULT_LINEAGE_WEB_LAYOUT, LINEAGE_BANDS, layoutLineageWeb, lineageArcPath, lineageNeighbourhood, threadChains, visibleLineage, } from './lineage-web.js';
|
|
14
|
+
export type { LineageBand, LineageEdgeKind, LineageWebEdge, LineageWebEpisode, LineageWebLayout, LineageWebLayoutConfig, LineageWebView, VisibleLineage, VisibleLineageOptions, } from './lineage-web.js';
|
|
11
15
|
export type { MWGraphNode, MWGraphNodePosition, MWGraphNodePositions, MWGraphLink, MWGraphData, LinkStyle, LayoutMode, WheelLayoutConfig, MedicineWheelGraphProps, QuadrantGeometry, } from './types.js';
|
|
12
16
|
export { applyLineageLayout, DEFAULT_LINEAGE_LAYOUT, } from './lineage-layout.js';
|
|
13
17
|
export type { LineageLayoutConfig, LineageLayoutResult } from './lineage-layout.js';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAGH,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAGH,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,EAAE,UAAU,EAAE,0BAA0B,EAAE,MAAM,iBAAiB,CAAC;AACzE,YAAY,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAGzE,OAAO,EACL,oBAAoB,EACpB,0BAA0B,EAC1B,aAAa,EACb,gBAAgB,EAChB,cAAc,EACd,oBAAoB,EACpB,YAAY,EACZ,cAAc,GACf,MAAM,kBAAkB,CAAC;AAC1B,YAAY,EACV,WAAW,EACX,eAAe,EACf,cAAc,EACd,iBAAiB,EACjB,gBAAgB,EAChB,sBAAsB,EACtB,cAAc,EACd,cAAc,EACd,qBAAqB,GACtB,MAAM,kBAAkB,CAAC;AAG1B,YAAY,EACV,WAAW,EACX,mBAAmB,EACnB,oBAAoB,EACpB,WAAW,EACX,WAAW,EACX,SAAS,EACT,UAAU,EACV,iBAAiB,EACjB,uBAAuB,EACvB,gBAAgB,GACjB,MAAM,YAAY,CAAC;AAGpB,OAAO,EACL,kBAAkB,EAClB,sBAAsB,GACvB,MAAM,qBAAqB,CAAC;AAC7B,YAAY,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAEpF,OAAO,EACL,gBAAgB,EAChB,cAAc,EACd,qBAAqB,EACrB,eAAe,EACf,cAAc,EACd,sBAAsB,EACtB,iBAAiB,EACjB,gBAAgB,GACjB,MAAM,aAAa,CAAC;AAGrB,OAAO,EACL,iBAAiB,EACjB,iBAAiB,EACjB,qBAAqB,EACrB,cAAc,GACf,MAAM,iBAAiB,CAAC;AAGzB,YAAY,EACV,gBAAgB,EAChB,gBAAgB,EAChB,eAAe,EACf,eAAe,EACf,qBAAqB,EACrB,aAAa,GACd,MAAM,eAAe,CAAC;AAEvB,OAAO,EACL,oBAAoB,EACpB,wBAAwB,EACxB,oBAAoB,EACpB,sBAAsB,EACtB,gBAAgB,GACjB,MAAM,eAAe,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -9,10 +9,23 @@
|
|
|
9
9
|
* @packageDocumentation
|
|
10
10
|
*/
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.toMermaidDiagram = exports.toCeremonyTimelineData = exports.toDirectionWheelData = exports.toReciprocityFlowDiagram = exports.toKinshipGraphLayout = exports.buildGraphData = exports.relationsToGraphLinks = exports.edgesToGraphLinks = exports.nodesToGraphNodes = exports.constrainToWheel = exports.directionForPoint = exports.directionLabelPosition = exports.curvedLinkPath = exports.quadrantArcPath = exports.getQuadrantGeometries = exports.DEFAULT_LAYOUT = exports.applyWheelLayout = exports.DEFAULT_LINEAGE_LAYOUT = exports.applyLineageLayout = exports.MedicineWheelGraph = void 0;
|
|
12
|
+
exports.toMermaidDiagram = exports.toCeremonyTimelineData = exports.toDirectionWheelData = exports.toReciprocityFlowDiagram = exports.toKinshipGraphLayout = exports.buildGraphData = exports.relationsToGraphLinks = exports.edgesToGraphLinks = exports.nodesToGraphNodes = exports.constrainToWheel = exports.directionForPoint = exports.directionLabelPosition = exports.curvedLinkPath = exports.quadrantArcPath = exports.getQuadrantGeometries = exports.DEFAULT_LAYOUT = exports.applyWheelLayout = exports.DEFAULT_LINEAGE_LAYOUT = exports.applyLineageLayout = exports.visibleLineage = exports.threadChains = exports.lineageNeighbourhood = exports.lineageArcPath = exports.layoutLineageWeb = exports.LINEAGE_BANDS = exports.DEFAULT_LINEAGE_WEB_LAYOUT = exports.DEFAULT_LINEAGE_VIEW = exports.DEFAULT_LINEAGE_WEB_COLORS = exports.LineageWeb = exports.MedicineWheelGraph = void 0;
|
|
13
13
|
// ── Component ───────────────────────────────────────────────────────────────
|
|
14
14
|
var MedicineWheelGraph_js_1 = require("./MedicineWheelGraph.js");
|
|
15
15
|
Object.defineProperty(exports, "MedicineWheelGraph", { enumerable: true, get: function () { return MedicineWheelGraph_js_1.MedicineWheelGraph; } });
|
|
16
|
+
var LineageWeb_js_1 = require("./LineageWeb.js");
|
|
17
|
+
Object.defineProperty(exports, "LineageWeb", { enumerable: true, get: function () { return LineageWeb_js_1.LineageWeb; } });
|
|
18
|
+
Object.defineProperty(exports, "DEFAULT_LINEAGE_WEB_COLORS", { enumerable: true, get: function () { return LineageWeb_js_1.DEFAULT_LINEAGE_WEB_COLORS; } });
|
|
19
|
+
// ── Lineage web (headless) ──────────────────────────────────────────────────
|
|
20
|
+
var lineage_web_js_1 = require("./lineage-web.js");
|
|
21
|
+
Object.defineProperty(exports, "DEFAULT_LINEAGE_VIEW", { enumerable: true, get: function () { return lineage_web_js_1.DEFAULT_LINEAGE_VIEW; } });
|
|
22
|
+
Object.defineProperty(exports, "DEFAULT_LINEAGE_WEB_LAYOUT", { enumerable: true, get: function () { return lineage_web_js_1.DEFAULT_LINEAGE_WEB_LAYOUT; } });
|
|
23
|
+
Object.defineProperty(exports, "LINEAGE_BANDS", { enumerable: true, get: function () { return lineage_web_js_1.LINEAGE_BANDS; } });
|
|
24
|
+
Object.defineProperty(exports, "layoutLineageWeb", { enumerable: true, get: function () { return lineage_web_js_1.layoutLineageWeb; } });
|
|
25
|
+
Object.defineProperty(exports, "lineageArcPath", { enumerable: true, get: function () { return lineage_web_js_1.lineageArcPath; } });
|
|
26
|
+
Object.defineProperty(exports, "lineageNeighbourhood", { enumerable: true, get: function () { return lineage_web_js_1.lineageNeighbourhood; } });
|
|
27
|
+
Object.defineProperty(exports, "threadChains", { enumerable: true, get: function () { return lineage_web_js_1.threadChains; } });
|
|
28
|
+
Object.defineProperty(exports, "visibleLineage", { enumerable: true, get: function () { return lineage_web_js_1.visibleLineage; } });
|
|
16
29
|
// ── Layout Engine ───────────────────────────────────────────────────────────
|
|
17
30
|
var lineage_layout_js_1 = require("./lineage-layout.js");
|
|
18
31
|
Object.defineProperty(exports, "applyLineageLayout", { enumerable: true, get: function () { return lineage_layout_js_1.applyLineageLayout; } });
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;GAQG;;;AAEH,+EAA+E;AAC/E,iEAA6D;AAApD,2HAAA,kBAAkB,OAAA;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;GAQG;;;AAEH,+EAA+E;AAC/E,iEAA6D;AAApD,2HAAA,kBAAkB,OAAA;AAC3B,iDAAyE;AAAhE,2GAAA,UAAU,OAAA;AAAE,2HAAA,0BAA0B,OAAA;AAG/C,+EAA+E;AAC/E,mDAS0B;AARxB,sHAAA,oBAAoB,OAAA;AACpB,4HAAA,0BAA0B,OAAA;AAC1B,+GAAA,aAAa,OAAA;AACb,kHAAA,gBAAgB,OAAA;AAChB,gHAAA,cAAc,OAAA;AACd,sHAAA,oBAAoB,OAAA;AACpB,8GAAA,YAAY,OAAA;AACZ,gHAAA,cAAc,OAAA;AA4BhB,+EAA+E;AAC/E,yDAG6B;AAF3B,uHAAA,kBAAkB,OAAA;AAClB,2HAAA,sBAAsB,OAAA;AAIxB,yCASqB;AARnB,6GAAA,gBAAgB,OAAA;AAChB,2GAAA,cAAc,OAAA;AACd,kHAAA,qBAAqB,OAAA;AACrB,4GAAA,eAAe,OAAA;AACf,2GAAA,cAAc,OAAA;AACd,mHAAA,sBAAsB,OAAA;AACtB,8GAAA,iBAAiB,OAAA;AACjB,6GAAA,gBAAgB,OAAA;AAGlB,+EAA+E;AAC/E,iDAKyB;AAJvB,kHAAA,iBAAiB,OAAA;AACjB,kHAAA,iBAAiB,OAAA;AACjB,sHAAA,qBAAqB,OAAA;AACrB,+GAAA,cAAc,OAAA;AAahB,6CAMuB;AALrB,mHAAA,oBAAoB,OAAA;AACpB,uHAAA,wBAAwB,OAAA;AACxB,mHAAA,oBAAoB,OAAA;AACpB,qHAAA,sBAAsB,OAAA;AACtB,+GAAA,gBAAgB,OAAA"}
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Lineage web — the geometry and the reading behind `<LineageWeb>`.
|
|
3
|
+
*
|
|
4
|
+
* Episodes sit on a spine in chronicle order, left to right, each in its
|
|
5
|
+
* direction's band. A relation between two episodes is an arc. This module is
|
|
6
|
+
* pure: it decides which episodes and arcs a view shows, where each episode
|
|
7
|
+
* sits, and the path each arc takes, so the component only draws.
|
|
8
|
+
*
|
|
9
|
+
* Two copies of this picture existed before it lived here: Miadi's chronicle
|
|
10
|
+
* (`app/chronicle/components/LineageWeb.tsx`) and the wheel's Episodes tab
|
|
11
|
+
* (`components/episode-lineage-web.tsx`, #156). jgwill/medicine-wheel#162
|
|
12
|
+
* brings them into one.
|
|
13
|
+
*
|
|
14
|
+
* @see ./lineage-layout.ts for the same spine laid out on `MWGraphData`.
|
|
15
|
+
*/
|
|
16
|
+
/** Continuation carries a thread forward; relation says two episodes speak to each other. */
|
|
17
|
+
export type LineageEdgeKind = 'continuation' | 'relation';
|
|
18
|
+
export declare const LINEAGE_BANDS: readonly ["east", "south", "west", "north"];
|
|
19
|
+
export type LineageBand = (typeof LINEAGE_BANDS)[number];
|
|
20
|
+
export interface LineageWebEpisode {
|
|
21
|
+
id: string;
|
|
22
|
+
/** Short mark shown in the chip, e.g. `E044`. */
|
|
23
|
+
label: string;
|
|
24
|
+
title?: string;
|
|
25
|
+
/** `east` | `south` | `west` | `north`; anything else sits between south and west. */
|
|
26
|
+
direction?: string;
|
|
27
|
+
/** `YYYY-MM-DD`, when known. The axis is labelled by month. */
|
|
28
|
+
date?: string;
|
|
29
|
+
/** Episodes of one thread are chained by a faint line, in order. */
|
|
30
|
+
thread?: string;
|
|
31
|
+
/** One more line for the chip, e.g. `East · Ceremony`. */
|
|
32
|
+
caption?: string;
|
|
33
|
+
}
|
|
34
|
+
export interface LineageWebEdge {
|
|
35
|
+
id?: string;
|
|
36
|
+
from: string;
|
|
37
|
+
to: string;
|
|
38
|
+
kind: LineageEdgeKind;
|
|
39
|
+
/** The words that say why the relation holds. */
|
|
40
|
+
words?: string;
|
|
41
|
+
}
|
|
42
|
+
export interface LineageWebView {
|
|
43
|
+
/** The whole chronicle, or the selected episode and its relatives. */
|
|
44
|
+
scope: 'all' | 'around';
|
|
45
|
+
/** How many relations away "around" and a search's relatives reach. */
|
|
46
|
+
depth: 1 | 2;
|
|
47
|
+
/** Which kinds of relation are drawn. */
|
|
48
|
+
kinds: Record<LineageEdgeKind, boolean>;
|
|
49
|
+
/** Thread chains on or off. */
|
|
50
|
+
threads: boolean;
|
|
51
|
+
}
|
|
52
|
+
export declare const DEFAULT_LINEAGE_VIEW: LineageWebView;
|
|
53
|
+
/**
|
|
54
|
+
* Every episode within `depth` relations of a seed, the seeds included. A
|
|
55
|
+
* relation is walked from either end: an episode that names a seed is as
|
|
56
|
+
* related as one a seed names.
|
|
57
|
+
*/
|
|
58
|
+
export declare function lineageNeighbourhood(seeds: Iterable<string>, edges: readonly LineageWebEdge[], depth?: number): Set<string>;
|
|
59
|
+
export interface VisibleLineageOptions {
|
|
60
|
+
view: LineageWebView;
|
|
61
|
+
/** The selected episode, which `scope: "around"` centres on. */
|
|
62
|
+
focus?: string | null;
|
|
63
|
+
/** The episodes a search matched, or null when nothing is typed. */
|
|
64
|
+
matches?: ReadonlySet<string> | null;
|
|
65
|
+
/**
|
|
66
|
+
* `kin` (default): show the matches and their relatives, nothing else.
|
|
67
|
+
* `fade`: show everything and fade what did not match.
|
|
68
|
+
*/
|
|
69
|
+
matchMode?: 'kin' | 'fade';
|
|
70
|
+
}
|
|
71
|
+
export interface VisibleLineage {
|
|
72
|
+
episodes: LineageWebEpisode[];
|
|
73
|
+
edges: LineageWebEdge[];
|
|
74
|
+
/** Under a `kin` search, the episodes the search found. The others shown are relatives. */
|
|
75
|
+
found: Set<string> | null;
|
|
76
|
+
/** Under a `fade` search, the episodes it did not match. */
|
|
77
|
+
faded: Set<string>;
|
|
78
|
+
}
|
|
79
|
+
/** What a view shows: which episodes, which arcs, and how each episode is marked. */
|
|
80
|
+
export declare function visibleLineage(episodes: readonly LineageWebEpisode[], edges: readonly LineageWebEdge[], { view, focus, matches, matchMode }: VisibleLineageOptions): VisibleLineage;
|
|
81
|
+
export interface LineageWebLayoutConfig {
|
|
82
|
+
marginL: number;
|
|
83
|
+
marginR: number;
|
|
84
|
+
/** Room above the east band, where continuation arcs rise. */
|
|
85
|
+
headroom: number;
|
|
86
|
+
/** Distance between two bands. */
|
|
87
|
+
bandGap: number;
|
|
88
|
+
/** Room below the north band, where relation arcs fall. */
|
|
89
|
+
footroom: number;
|
|
90
|
+
/** Height of the month axis under everything. */
|
|
91
|
+
axis: number;
|
|
92
|
+
/** Fewest pixels between neighbours before the canvas widens. */
|
|
93
|
+
minStep: number;
|
|
94
|
+
minWidth: number;
|
|
95
|
+
/** Neighbours in one band step -stagger, 0, +stagger so same-day episodes stay apart. */
|
|
96
|
+
stagger: number;
|
|
97
|
+
}
|
|
98
|
+
export declare const DEFAULT_LINEAGE_WEB_LAYOUT: LineageWebLayoutConfig;
|
|
99
|
+
export interface LineageWebLayout {
|
|
100
|
+
width: number;
|
|
101
|
+
height: number;
|
|
102
|
+
positions: Map<string, {
|
|
103
|
+
x: number;
|
|
104
|
+
y: number;
|
|
105
|
+
}>;
|
|
106
|
+
bandY: Record<LineageBand, number>;
|
|
107
|
+
/** Where each month starts along the spine. */
|
|
108
|
+
months: Array<{
|
|
109
|
+
x: number;
|
|
110
|
+
label: string;
|
|
111
|
+
}>;
|
|
112
|
+
config: LineageWebLayoutConfig;
|
|
113
|
+
}
|
|
114
|
+
/** Positions for episodes already in chronicle order. */
|
|
115
|
+
export declare function layoutLineageWeb(episodes: readonly LineageWebEpisode[], config?: Partial<LineageWebLayoutConfig>): LineageWebLayout;
|
|
116
|
+
/**
|
|
117
|
+
* The path of one arc. It bows away from the straight line between its two
|
|
118
|
+
* episodes: continuation to the upper side, relation to the lower side, so the
|
|
119
|
+
* two kinds do not share one band of the canvas. Between two bands the bow
|
|
120
|
+
* is sideways and the arc stays a gentle curve, not a loop over the top.
|
|
121
|
+
* The bow grows with the square root of the arc's length: neighbours stay
|
|
122
|
+
* close to the spine, and long relations fan out by length instead of
|
|
123
|
+
* stacking at one height. The arc never leaves the canvas.
|
|
124
|
+
*/
|
|
125
|
+
export declare function lineageArcPath(a: {
|
|
126
|
+
x: number;
|
|
127
|
+
y: number;
|
|
128
|
+
}, b: {
|
|
129
|
+
x: number;
|
|
130
|
+
y: number;
|
|
131
|
+
}, kind: LineageEdgeKind, layout: Pick<LineageWebLayout, 'width' | 'height' | 'config'>): string;
|
|
132
|
+
/** Consecutive episodes of each thread, as pairs to chain. */
|
|
133
|
+
export declare function threadChains(episodes: readonly LineageWebEpisode[]): Array<{
|
|
134
|
+
from: string;
|
|
135
|
+
to: string;
|
|
136
|
+
thread: string;
|
|
137
|
+
}>;
|
|
138
|
+
//# sourceMappingURL=lineage-web.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lineage-web.d.ts","sourceRoot":"","sources":["../src/lineage-web.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,6FAA6F;AAC7F,MAAM,MAAM,eAAe,GAAG,cAAc,GAAG,UAAU,CAAC;AAE1D,eAAO,MAAM,aAAa,6CAA8C,CAAC;AACzE,MAAM,MAAM,WAAW,GAAG,CAAC,OAAO,aAAa,CAAC,CAAC,MAAM,CAAC,CAAC;AAEzD,MAAM,WAAW,iBAAiB;IAChC,EAAE,EAAE,MAAM,CAAC;IACX,iDAAiD;IACjD,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,sFAAsF;IACtF,SAAS,CAAC,EAAE,MAAM,C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B,gBAAgB,CAC9B,QAAQ,EAAE,SAAS,iBAAiB,EAAE,EACtC,MAAM,GAAE,OAAO,CAAC,sBAAsB,CAAM,GAC3C,gBAAgB,CAkClB;AAWD;;;;;;;;GAQG;AACH,wBAAgB,cAAc,CAC5B,CAAC,EAAE;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAAE,EAC3B,CAAC,EAAE;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAAE,EAC3B,IAAI,EAAE,eAAe,EACrB,MAAM,EAAE,IAAI,CAAC,gBAAgB,EAAE,OAAO,GAAG,QAAQ,GAAG,QAAQ,CAAC,GAC5D,MAAM,CA6BR;AAED,8DAA8D;AAC9D,wBAAgB,YAAY,CAAC,QAAQ,EAAE,SAAS,iBAAiB,EAAE,GAAG,KAAK,CAAC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,EAAE,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC,CAUxH"}
|
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Lineage web — the geometry and the reading behind `<LineageWeb>`.
|
|
4
|
+
*
|
|
5
|
+
* Episodes sit on a spine in chronicle order, left to right, each in its
|
|
6
|
+
* direction's band. A relation between two episodes is an arc. This module is
|
|
7
|
+
* pure: it decides which episodes and arcs a view shows, where each episode
|
|
8
|
+
* sits, and the path each arc takes, so the component only draws.
|
|
9
|
+
*
|
|
10
|
+
* Two copies of this picture existed before it lived here: Miadi's chronicle
|
|
11
|
+
* (`app/chronicle/components/LineageWeb.tsx`) and the wheel's Episodes tab
|
|
12
|
+
* (`components/episode-lineage-web.tsx`, #156). jgwill/medicine-wheel#162
|
|
13
|
+
* brings them into one.
|
|
14
|
+
*
|
|
15
|
+
* @see ./lineage-layout.ts for the same spine laid out on `MWGraphData`.
|
|
16
|
+
*/
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.DEFAULT_LINEAGE_WEB_LAYOUT = exports.DEFAULT_LINEAGE_VIEW = exports.LINEAGE_BANDS = void 0;
|
|
19
|
+
exports.lineageNeighbourhood = lineageNeighbourhood;
|
|
20
|
+
exports.visibleLineage = visibleLineage;
|
|
21
|
+
exports.layoutLineageWeb = layoutLineageWeb;
|
|
22
|
+
exports.lineageArcPath = lineageArcPath;
|
|
23
|
+
exports.threadChains = threadChains;
|
|
24
|
+
exports.LINEAGE_BANDS = ['east', 'south', 'west', 'north'];
|
|
25
|
+
exports.DEFAULT_LINEAGE_VIEW = {
|
|
26
|
+
scope: 'all',
|
|
27
|
+
depth: 1,
|
|
28
|
+
kinds: { continuation: true, relation: true },
|
|
29
|
+
threads: true,
|
|
30
|
+
};
|
|
31
|
+
/**
|
|
32
|
+
* Every episode within `depth` relations of a seed, the seeds included. A
|
|
33
|
+
* relation is walked from either end: an episode that names a seed is as
|
|
34
|
+
* related as one a seed names.
|
|
35
|
+
*/
|
|
36
|
+
function lineageNeighbourhood(seeds, edges, depth = 1) {
|
|
37
|
+
const adjacent = new Map();
|
|
38
|
+
for (const e of edges) {
|
|
39
|
+
if (e.from === e.to)
|
|
40
|
+
continue;
|
|
41
|
+
(adjacent.get(e.from) ?? adjacent.set(e.from, []).get(e.from)).push(e.to);
|
|
42
|
+
(adjacent.get(e.to) ?? adjacent.set(e.to, []).get(e.to)).push(e.from);
|
|
43
|
+
}
|
|
44
|
+
const reached = new Set(seeds);
|
|
45
|
+
let frontier = [...reached];
|
|
46
|
+
for (let step = 0; step < depth && frontier.length; step++) {
|
|
47
|
+
const next = [];
|
|
48
|
+
for (const id of frontier) {
|
|
49
|
+
for (const other of adjacent.get(id) ?? []) {
|
|
50
|
+
if (!reached.has(other)) {
|
|
51
|
+
reached.add(other);
|
|
52
|
+
next.push(other);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
frontier = next;
|
|
57
|
+
}
|
|
58
|
+
return reached;
|
|
59
|
+
}
|
|
60
|
+
/** What a view shows: which episodes, which arcs, and how each episode is marked. */
|
|
61
|
+
function visibleLineage(episodes, edges, { view, focus = null, matches = null, matchMode = 'kin' }) {
|
|
62
|
+
const ids = new Set(episodes.map((e) => e.id));
|
|
63
|
+
const drawn = edges.filter((e) => view.kinds[e.kind] && e.from !== e.to && ids.has(e.from) && ids.has(e.to));
|
|
64
|
+
let keep = ids;
|
|
65
|
+
let found = null;
|
|
66
|
+
const faded = new Set();
|
|
67
|
+
if (matches) {
|
|
68
|
+
const hits = [...matches].filter((id) => ids.has(id));
|
|
69
|
+
if (matchMode === 'kin') {
|
|
70
|
+
found = new Set(hits);
|
|
71
|
+
keep = lineageNeighbourhood(hits, drawn, view.depth);
|
|
72
|
+
}
|
|
73
|
+
else {
|
|
74
|
+
for (const id of ids)
|
|
75
|
+
if (!matches.has(id))
|
|
76
|
+
faded.add(id);
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
if (view.scope === 'around' && focus && keep.has(focus)) {
|
|
80
|
+
const around = lineageNeighbourhood([focus], drawn, view.depth);
|
|
81
|
+
keep = new Set([...keep].filter((id) => around.has(id)));
|
|
82
|
+
}
|
|
83
|
+
return {
|
|
84
|
+
episodes: episodes.filter((e) => keep.has(e.id)),
|
|
85
|
+
edges: drawn.filter((e) => keep.has(e.from) && keep.has(e.to)),
|
|
86
|
+
found,
|
|
87
|
+
faded,
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
exports.DEFAULT_LINEAGE_WEB_LAYOUT = {
|
|
91
|
+
marginL: 64,
|
|
92
|
+
marginR: 40,
|
|
93
|
+
headroom: 120,
|
|
94
|
+
bandGap: 120,
|
|
95
|
+
footroom: 110,
|
|
96
|
+
axis: 22,
|
|
97
|
+
minStep: 19,
|
|
98
|
+
minWidth: 960,
|
|
99
|
+
stagger: 14,
|
|
100
|
+
};
|
|
101
|
+
/** Positions for episodes already in chronicle order. */
|
|
102
|
+
function layoutLineageWeb(episodes, config = {}) {
|
|
103
|
+
const cfg = { ...exports.DEFAULT_LINEAGE_WEB_LAYOUT, ...config };
|
|
104
|
+
const bandY = Object.fromEntries(exports.LINEAGE_BANDS.map((band, i) => [band, cfg.headroom + i * cfg.bandGap]));
|
|
105
|
+
const undirectedY = cfg.headroom + 1.5 * cfg.bandGap;
|
|
106
|
+
const height = cfg.headroom + 3 * cfg.bandGap + cfg.footroom + cfg.axis;
|
|
107
|
+
const n = episodes.length;
|
|
108
|
+
const width = Math.max(cfg.minWidth, cfg.marginL + cfg.marginR + Math.max(0, n - 1) * cfg.minStep);
|
|
109
|
+
const step = n > 1 ? (width - cfg.marginL - cfg.marginR) / (n - 1) : 0;
|
|
110
|
+
const positions = new Map();
|
|
111
|
+
const months = [];
|
|
112
|
+
const seenInBand = new Map();
|
|
113
|
+
let lastMonth = '';
|
|
114
|
+
episodes.forEach((episode, i) => {
|
|
115
|
+
const band = exports.LINEAGE_BANDS.includes(episode.direction ?? '')
|
|
116
|
+
? episode.direction
|
|
117
|
+
: null;
|
|
118
|
+
const key = band ?? 'undirected';
|
|
119
|
+
const nth = seenInBand.get(key) ?? 0;
|
|
120
|
+
seenInBand.set(key, nth + 1);
|
|
121
|
+
const x = cfg.marginL + i * step;
|
|
122
|
+
positions.set(episode.id, { x, y: (band ? bandY[band] : undirectedY) + ((nth % 3) - 1) * cfg.stagger });
|
|
123
|
+
const month = episode.date?.slice(0, 7) ?? '';
|
|
124
|
+
if (month && month !== lastMonth) {
|
|
125
|
+
months.push({ x, label: month });
|
|
126
|
+
lastMonth = month;
|
|
127
|
+
}
|
|
128
|
+
});
|
|
129
|
+
return { width, height, positions, bandY, months, config: cfg };
|
|
130
|
+
}
|
|
131
|
+
/** Highest and lowest y a quadratic from `ay` through control `cy` to `by` reaches. */
|
|
132
|
+
function quadraticYRange(ay, cy, by) {
|
|
133
|
+
const denom = ay - 2 * cy + by;
|
|
134
|
+
const t = denom === 0 ? -1 : (ay - cy) / denom;
|
|
135
|
+
const ys = [ay, by];
|
|
136
|
+
if (t > 0 && t < 1)
|
|
137
|
+
ys.push((1 - t) ** 2 * ay + 2 * t * (1 - t) * cy + t ** 2 * by);
|
|
138
|
+
return [Math.min(...ys), Math.max(...ys)];
|
|
139
|
+
}
|
|
140
|
+
/**
|
|
141
|
+
* The path of one arc. It bows away from the straight line between its two
|
|
142
|
+
* episodes: continuation to the upper side, relation to the lower side, so the
|
|
143
|
+
* two kinds do not share one band of the canvas. Between two bands the bow
|
|
144
|
+
* is sideways and the arc stays a gentle curve, not a loop over the top.
|
|
145
|
+
* The bow grows with the square root of the arc's length: neighbours stay
|
|
146
|
+
* close to the spine, and long relations fan out by length instead of
|
|
147
|
+
* stacking at one height. The arc never leaves the canvas.
|
|
148
|
+
*/
|
|
149
|
+
function lineageArcPath(a, b, kind, layout) {
|
|
150
|
+
const { config } = layout;
|
|
151
|
+
const dx = b.x - a.x;
|
|
152
|
+
const dy = b.y - a.y;
|
|
153
|
+
const length = Math.hypot(dx, dy) || 1;
|
|
154
|
+
// The normal to the chord, turned to the upper side for continuation and the
|
|
155
|
+
// lower side for relation. A vertical chord bows left or right.
|
|
156
|
+
let nx = -dy / length;
|
|
157
|
+
let ny = dx / length;
|
|
158
|
+
const upper = ny < 0 || (ny === 0 && nx < 0);
|
|
159
|
+
if ((kind === 'continuation') !== upper) {
|
|
160
|
+
nx = -nx;
|
|
161
|
+
ny = -ny;
|
|
162
|
+
}
|
|
163
|
+
const reach = Math.sqrt(length / Math.max(1, layout.width));
|
|
164
|
+
const maxBow = Math.min(config.headroom, config.footroom) - 10;
|
|
165
|
+
// A quadratic's middle sits halfway between the chord and its control point.
|
|
166
|
+
let bow = 2 * (12 + reach * Math.max(0, maxBow - 12));
|
|
167
|
+
const top = 6;
|
|
168
|
+
const bottom = layout.height - config.axis - 6;
|
|
169
|
+
const mx = (a.x + b.x) / 2;
|
|
170
|
+
const my = (a.y + b.y) / 2;
|
|
171
|
+
for (let i = 0; i < 8; i++) {
|
|
172
|
+
const [lo, hi] = quadraticYRange(a.y, my + ny * bow, b.y);
|
|
173
|
+
if (lo >= top && hi <= bottom)
|
|
174
|
+
break;
|
|
175
|
+
bow *= 0.7;
|
|
176
|
+
}
|
|
177
|
+
const r = (v) => Math.round(v * 10) / 10;
|
|
178
|
+
return `M ${r(a.x)} ${r(a.y)} Q ${r(mx + nx * bow)} ${r(my + ny * bow)} ${r(b.x)} ${r(b.y)}`;
|
|
179
|
+
}
|
|
180
|
+
/** Consecutive episodes of each thread, as pairs to chain. */
|
|
181
|
+
function threadChains(episodes) {
|
|
182
|
+
const last = new Map();
|
|
183
|
+
const chains = [];
|
|
184
|
+
for (const e of episodes) {
|
|
185
|
+
if (!e.thread)
|
|
186
|
+
continue;
|
|
187
|
+
const prev = last.get(e.thread);
|
|
188
|
+
if (prev)
|
|
189
|
+
chains.push({ from: prev, to: e.id, thread: e.thread });
|
|
190
|
+
last.set(e.thread, e.id);
|
|
191
|
+
}
|
|
192
|
+
return chains;
|
|
193
|
+
}
|
|
194
|
+
//# sourceMappingURL=lineage-web.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lineage-web.js","sourceRoot":"","sources":["../src/lineage-web.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAuDH,oDA0BC;AAyBD,wCAmCC;AA2CD,4CAqCC;AAoBD,wCAkCC;AAGD,oCAUC;AA3RY,QAAA,aAAa,GAAG,CAAC,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,CAAU,CAAC;AAsC5D,QAAA,oBAAoB,GAAmB;IAClD,KAAK,EAAE,KAAK;IACZ,KAAK,EAAE,CAAC;IACR,KAAK,EAAE,EAAE,YAAY,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE;IAC7C,OAAO,EAAE,IAAI;CACd,CAAC;AAEF;;;;GAIG;AACH,SAAgB,oBAAoB,CAClC,KAAuB,EACvB,KAAgC,E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S,EAAE,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,GAAG,EAAE,CAAC,GAAG,EAAE,CAAC;IACjD,OAAO,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,EAAE,GAAG,EAAE,GAAG,GAAG,CAAC,IAAI,CAAC,CAAC,EAAE,GAAG,EAAE,GAAG,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;AAC/F,CAAC;AAED,8DAA8D;AAC9D,SAAgB,YAAY,CAAC,QAAsC;IACjE,MAAM,IAAI,GAAG,IAAI,GAAG,EAAkB,CAAC;IACvC,MAAM,MAAM,GAAwD,EAAE,CAAC;IACvE,KAAK,MAAM,CAAC,IAAI,QAAQ,EAAE,CAAC;QACzB,IAAI,CAAC,CAAC,CAAC,MAAM;YAAE,SAAS;QACxB,MAAM,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC;QAChC,IAAI,IAAI;YAAE,MAAM,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,CAAC,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC;QAClE,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC;IAC3B,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@medicine-wheel/graph-viz",
|
|
3
|
-
"version": "0.17.
|
|
3
|
+
"version": "0.17.7",
|
|
4
4
|
"description": "Medicine Wheel graph visualization — circular layout with four-direction node positioning, ceremony-aware edges, and OCAP® indicators",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"directory": "src/graph-viz"
|
|
48
48
|
},
|
|
49
49
|
"dependencies": {
|
|
50
|
-
"@medicine-wheel/ontology-core": "^0.17.
|
|
50
|
+
"@medicine-wheel/ontology-core": "^0.17.7"
|
|
51
51
|
},
|
|
52
52
|
"peerDependencies": {
|
|
53
53
|
"react": ">=18.0.0",
|