Generalize article interaction ownership
This commit is contained in:
parent
14852a5ee1
commit
67db92910b
3 changed files with 7 additions and 8 deletions
|
|
@ -43,6 +43,12 @@ The public viewer API is intentionally coarse:
|
||||||
- `selection`, `focusSelection`, `expandedNode`, and callbacks for app integration
|
- `selection`, `focusSelection`, `expandedNode`, and callbacks for app integration
|
||||||
- typed state and event payloads
|
- typed state and event payloads
|
||||||
|
|
||||||
|
Norn owns graph layout, viewport motion, selection, focus, inspection, and the
|
||||||
|
interaction boundary of expanded node articles. Consumers own graph meaning and
|
||||||
|
article content. When an expanded article fills a node surface, Norn derives wheel
|
||||||
|
and drag behavior from that surface's committed article geometry; consumers do not
|
||||||
|
need product-specific classes or data attributes to make the article scrollable.
|
||||||
|
|
||||||
## What It Does
|
## What It Does
|
||||||
|
|
||||||
The support generator:
|
The support generator:
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite",
|
"dev": "vite",
|
||||||
"build": "npm run build:lib && npm run build:demo",
|
"build": "npm run build:lib && npm run build:demo",
|
||||||
"build:lib": "tsup src/index.ts --format esm,cjs --dts --external react --external react-dom --clean",
|
"build:lib": "tsup src/index.ts --format \"esm,cjs\" --dts --external react --external react-dom --clean",
|
||||||
"build:demo": "vite build --outDir dist/demo",
|
"build:demo": "vite build --outDir dist/demo",
|
||||||
"build:solver:wasm": "powershell -ExecutionPolicy Bypass -File ./scripts/Build-RustSolverWasm.ps1",
|
"build:solver:wasm": "powershell -ExecutionPolicy Bypass -File ./scripts/Build-RustSolverWasm.ps1",
|
||||||
"typecheck": "tsc --noEmit",
|
"typecheck": "tsc --noEmit",
|
||||||
|
|
|
||||||
|
|
@ -2844,13 +2844,6 @@ function isArticleContentTarget(target: EventTarget | null) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
const articleContent = target.closest<HTMLElement>(
|
|
||||||
"[data-epiphany-article-content], .zyphos-spa-article",
|
|
||||||
);
|
|
||||||
if (!articleContent) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
const surface = target.closest<HTMLElement>(".norn-node-surface");
|
const surface = target.closest<HTMLElement>(".norn-node-surface");
|
||||||
if (!surface) {
|
if (!surface) {
|
||||||
return false;
|
return false;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue