data-navigator 2.2.0 → 2.2.2
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 +22 -53
- package/dist/chunk-MPFBSVCV.js +1 -0
- package/dist/{chunk-PEL3ZYDS.mjs → chunk-TZKH227U.js} +1 -1
- package/dist/consts.cjs +1 -0
- package/dist/consts.js +1 -1
- package/dist/examples/basic_list/bokeh.d.ts +1 -0
- package/dist/examples/bokeh.d.ts +1 -0
- package/dist/examples/docs.d.ts +1 -0
- package/dist/examples/force-graph.d.ts +3 -1
- package/dist/index.cjs +1453 -0
- package/dist/index.js +1262 -1375
- package/dist/input.cjs +1 -0
- package/dist/input.js +1 -1
- package/dist/rendering.cjs +1 -0
- package/dist/rendering.js +1 -1
- package/dist/structure.cjs +1 -0
- package/dist/structure.js +1 -1
- package/dist/utilities.cjs +1 -0
- package/dist/utilities.js +1 -1
- package/package.json +13 -18
- package/dist/chunk-2RRWU73A.mjs +0 -1
- package/dist/chunk-AJKFNWNF.mjs +0 -1
- package/dist/chunk-CCACYVYB.mjs +0 -1
- package/dist/chunk-CR5KNX3N.mjs +0 -1
- package/dist/chunk-FFVDZNCV.mjs +0 -1
- package/dist/chunk-GP5LYFFJ.mjs +0 -1
- package/dist/chunk-QTJ23SVE.mjs +0 -18
- package/dist/chunk-SQY245BV.mjs +0 -177
- package/dist/chunk-UIGW7IEM.mjs +0 -1
- package/dist/chunk-XICEDMQZ.mjs +0 -1
- package/dist/chunk-ZAQVAU5P.mjs +0 -1
- package/dist/consts.mjs +0 -1
- package/dist/index.mjs +0 -1339
- package/dist/input.mjs +0 -1
- package/dist/rendering.mjs +0 -1
- package/dist/structure.mjs +0 -1
- package/dist/utilities.mjs +0 -1
- /package/dist/{chunk-K476QBP2.mjs → chunk-YE5N6UCT.js} +0 -0
- /package/dist/{src/test-cases.d.ts → examples/basic_list/basic_list.d.ts} +0 -0
package/README.md
CHANGED
|
@@ -2,78 +2,47 @@
|
|
|
2
2
|
|
|
3
3
|

|
|
4
4
|
|
|
5
|
-
Data Navigator is a JavaScript library that
|
|
5
|
+
Data Navigator is a JavaScript library that enables keyboard, screen reader, and multi-modal navigation of data structures and visualizations. It works with any rendering technology — SVG, Canvas, images, or WebGL — by creating a semantic, accessible HTML layer on top of your graphics.
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
**[Documentation](https://dig.cmu.edu/data-navigator/)** · **[Getting Started](https://dig.cmu.edu/data-navigator/getting-started/)** · **[Demo](https://dig.cmu.edu/data-navigator/demo)** · **[npm](https://www.npmjs.com/package/data-navigator)**
|
|
8
8
|
|
|
9
|
-
##
|
|
10
|
-
|
|
11
|
-
Data Navigator has abstracted navigation into commands, which enables it to easily receive input from screen readers and keyboards to more interesting modalities like touch and mouse swiping, spoken commands, hand gestures, and even fabricated or totally novel interfaces, like bananas.
|
|
12
|
-
|
|
13
|
-

|
|
14
|
-
|
|
15
|
-
Data Navigator is expressive for builders and enables entire toolkits or ecosystems to become more accessible. The system provides low-level control over narratives, interaction paths, and journeys a user might want to take through an image or graphic.
|
|
16
|
-
|
|
17
|
-
Developers can build schemas that scale to work with any chart in a charting library or a single, bespoke implemetation for use in story-telling contexts like journalism, reports, presentations, and interactive infographics.
|
|
18
|
-
|
|
19
|
-

|
|
20
|
-
|
|
21
|
-
Not only are paths through an image customizeable but so are the visual indications that are rendered alongside those journeys. These visual indications use semantically rich, native HTML elements for maximized accessibility.
|
|
22
|
-
|
|
23
|
-

|
|
24
|
-
|
|
25
|
-
Visit [our landing page](http://dig.cmu.edu/data-navigator/) to try our demo, which shows a png image made into navigable experience. A variety of input modalities are enabled, including touch and mouse swiping, keyboard, screen reader, text input, voice control, and hand gesture recognition.
|
|
26
|
-
|
|
27
|
-
We also have [a vega-lite demo online](https://dig.cmu.edu/data-navigator/vega-lite.html), which (under the hood) shows how someone could write one schema that serves any chart in an ecosystem.
|
|
28
|
-
|
|
29
|
-
## System design
|
|
30
|
-
|
|
31
|
-
Data Navigator is organized into 3 separately composable modules: the first is a graph-based _structure_ of nodes and edges, the second handles _input_ and navigation logic, and the third _renders_ the structure. These may be leveraged together or independently. Read our paper to learn more!
|
|
32
|
-
|
|
33
|
-
### Types
|
|
34
|
-
|
|
35
|
-
Our types are consolidated into a single [types export file](./src/data-navigator.ts), designed (mostly) as a grammar. Each major module is broken down into subparts, each with their own types, all the way to the primitive-most types used.
|
|
36
|
-
|
|
37
|
-
## Getting started
|
|
38
|
-
|
|
39
|
-
You can install or use both esm and cjs modules in a variety of ways, in addition to importing all of data-navigator or just one part.
|
|
9
|
+
## Install
|
|
40
10
|
|
|
41
11
|
```
|
|
42
|
-
# to install into a project
|
|
43
12
|
npm install data-navigator
|
|
44
13
|
```
|
|
45
14
|
|
|
46
15
|
```js
|
|
47
|
-
|
|
48
|
-
|
|
16
|
+
import dataNavigator from 'data-navigator';
|
|
17
|
+
```
|
|
49
18
|
|
|
50
|
-
|
|
51
|
-
console.log('dataNavigator', dataNavigator);
|
|
19
|
+
## How it works
|
|
52
20
|
|
|
53
|
-
|
|
54
|
-
console.log('dataNavigator.rendering', dataNavigator.rendering);
|
|
55
|
-
```
|
|
21
|
+
Data Navigator is organized into 3 composable modules:
|
|
56
22
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
23
|
+
1. **Structure** — a graph of nodes and edges that defines navigation paths through your data
|
|
24
|
+
2. **Input** — handles keyboard, touch, voice, gesture, and custom input modalities
|
|
25
|
+
3. **Rendering** — creates semantic HTML elements overlaid on your visualization
|
|
26
|
+
|
|
27
|
+
These modules can be used together or independently. Visit [the docs](https://dig.cmu.edu/data-navigator/getting-started/) for a step-by-step guide to building your first navigable chart.
|
|
28
|
+
|
|
29
|
+
## Contributing
|
|
30
|
+
|
|
31
|
+
See [CONTRIBUTING.md](./CONTRIBUTING.md) for setup instructions and development workflow.
|
|
65
32
|
|
|
66
33
|
## Credit
|
|
67
34
|
|
|
68
|
-
Data
|
|
35
|
+
Data Navigator was developed at CMU's [Data Interaction Group](https://dig.cmu.edu/) (CMU DIG), primarily by [Frank Elavsky](https://frank.computer).
|
|
69
36
|
|
|
70
37
|
## Citing Data Navigator
|
|
71
38
|
|
|
72
39
|
```bib
|
|
73
40
|
@article{2023-data-navigator,
|
|
74
|
-
|
|
41
|
+
title = {{Data Navigator}: An Accessibility-Centered Data Navigation Toolkit},
|
|
42
|
+
publisher = {{IEEE}},
|
|
75
43
|
author = {Frank Elavsky and Lucas Nadolskis and Dominik Moritz},
|
|
76
|
-
|
|
77
|
-
|
|
44
|
+
journal = {{IEEE} Transactions on Visualization and Computer Graphics},
|
|
45
|
+
year = {2023},
|
|
46
|
+
url = {http://dig.cmu.edu/data-navigator/}
|
|
78
47
|
}
|
|
79
48
|
```
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e={Escape:!0,Enter:!0,Backspace:!0,ArrowLeft:!0,ArrowRight:!0,ArrowUp:!0,ArrowDown:!0},r={ArrowLeft:"left",ArrowRight:"right",ArrowUp:"up",ArrowDown:"down",Period:"forward",Comma:"backward",Escape:"parent",Enter:"child"},t=["KeyW","KeyJ","LeftBracket","RightBracket","Slash","Backslash"],i=["KeyW","KeyJ"],o=[["LeftBracket","RightBracket"],["Slash","Backslash"]],a={left:{key:"ArrowLeft",direction:"source"},right:{key:"ArrowRight",direction:"target"},up:{key:"ArrowUp",direction:"source"},down:{key:"ArrowDown",direction:"target"},child:{key:"Enter",direction:"target"},parent:{key:"Backspace",direction:"source"},backward:{key:"Comma",direction:"source"},forward:{key:"Period",direction:"target"},previous:{key:"Semicolon",direction:"source"},next:{key:"Quote",direction:"target"},exit:{key:"Escape",direction:"target"},help:{key:"KeyY",direction:"target"},undo:{key:"KeyZ",direction:"target"}},n=[["left","right"],["up","down"],["backward","forward"],["previous","next"]],c={left:["left","right"],right:["left","right"],up:["up","down"],down:["up","down"],backward:["backward","forward"],forward:["backward","forward"],previous:["previous","next"],next:["previous","next"],parent:["parent","child"],child:["parent","child"],exit:["exit","undo"],undo:["undo","undo"]},d={right:{key:"ArrowRight",direction:"target"},left:{key:"ArrowLeft",direction:"source"},down:{key:"ArrowDown",direction:"target"},up:{key:"ArrowUp",direction:"source"},child:{key:"Enter",direction:"target"},parent:{key:"Backspace",direction:"source"},exit:{key:"Escape",direction:"target"},undo:{key:"Period",direction:"target"},legend:{key:"KeyL",direction:"target"}},s={cssClass:void 0,spatialProperties:{x:0,y:0,width:0,height:0,path:""},semantics:{label:"",elementType:"div",role:"image",attributes:void 0},parentSemantics:{label:"",elementType:"figure",role:"figure",attributes:void 0},existingElement:{useForSpatialProperties:!1,spatialProperties:void 0}};export{e as a,r as b,t as c,i as d,o as e,a as f,n as g,c as h,d as i,s as j};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var e={Escape:!0,Enter:!0,Backspace:!0,ArrowLeft:!0,ArrowRight:!0,ArrowUp:!0,ArrowDown:!0},r={ArrowLeft:"left",ArrowRight:"right",ArrowUp:"up",ArrowDown:"down",Period:"forward",Comma:"backward",Escape:"parent",Enter:"child"},t=["KeyW","KeyJ","LeftBracket","RightBracket","Slash","Backslash"],i=["KeyW","KeyJ"],o=[["LeftBracket","RightBracket"],["Slash","Backslash"]],a={left:{key:"ArrowLeft",direction:"source"},right:{key:"ArrowRight",direction:"target"},up:{key:"ArrowUp",direction:"source"},down:{key:"ArrowDown",direction:"target"},child:{key:"Enter",direction:"target"},parent:{key:"Backspace",direction:"source"},backward:{key:"Comma",direction:"source"},forward:{key:"Period",direction:"target"},previous:{key:"Semicolon",direction:"source"},next:{key:"Quote",direction:"target"},exit:{key:"Escape",direction:"target"},help:{key:"KeyY",direction:"target"},undo:{key:"KeyZ",direction:"target"}},
|
|
1
|
+
var e={Escape:!0,Enter:!0,Backspace:!0,ArrowLeft:!0,ArrowRight:!0,ArrowUp:!0,ArrowDown:!0},r={ArrowLeft:"left",ArrowRight:"right",ArrowUp:"up",ArrowDown:"down",Period:"forward",Comma:"backward",Escape:"parent",Enter:"child"},t=["KeyW","KeyJ","LeftBracket","RightBracket","Slash","Backslash"],i=["KeyW","KeyJ"],o=[["LeftBracket","RightBracket"],["Slash","Backslash"]],a={left:{key:"ArrowLeft",direction:"source"},right:{key:"ArrowRight",direction:"target"},up:{key:"ArrowUp",direction:"source"},down:{key:"ArrowDown",direction:"target"},child:{key:"Enter",direction:"target"},parent:{key:"Backspace",direction:"source"},backward:{key:"Comma",direction:"source"},forward:{key:"Period",direction:"target"},previous:{key:"Semicolon",direction:"source"},next:{key:"Quote",direction:"target"},exit:{key:"Escape",direction:"target"},help:{key:"KeyY",direction:"target"},undo:{key:"KeyZ",direction:"target"}},c=[["left","right"],["up","down"],["backward","forward"],["previous","next"]],d={left:["left","right"],right:["left","right"],up:["up","down"],down:["up","down"],backward:["backward","forward"],forward:["backward","forward"],previous:["previous","next"],next:["previous","next"],parent:["parent","child"],child:["parent","child"],exit:["exit","undo"],undo:["undo","undo"]},n={right:{key:"ArrowRight",direction:"target"},left:{key:"ArrowLeft",direction:"source"},down:{key:"ArrowDown",direction:"target"},up:{key:"ArrowUp",direction:"source"},child:{key:"Enter",direction:"target"},parent:{key:"Backspace",direction:"source"},exit:{key:"Escape",direction:"target"},undo:{key:"Period",direction:"target"},legend:{key:"KeyL",direction:"target"}},s={cssClass:"",spatialProperties:{x:0,y:0,width:0,height:0,path:""},semantics:{label:"",elementType:"div",role:"image",attributes:void 0},parentSemantics:{label:"",elementType:"figure",role:"figure",attributes:void 0},existingElement:{useForSpatialProperties:!1,spatialProperties:void 0}};export{e as a,r as b,t as c,i as d,o as e,a as f,c as g,d as h,n as i,s as j};
|
package/dist/consts.cjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function e(e){"@swc/helpers - typeof";return e&&typeof Symbol!=="undefined"&&e.constructor===Symbol?"symbol":typeof e}var r=Object.defineProperty;var t=Object.getOwnPropertyDescriptor;var i=Object.getOwnPropertyNames;var n=Object.prototype.hasOwnProperty;var o=function e(e,t){for(var i in t)r(e,i,{get:t[i],enumerable:!0})},a=function o(o,a,c,l){var u=true,d=false,s=undefined;if(a&&(typeof a==="undefined"?"undefined":e(a))=="object"||typeof a=="function")try{var y=function(){var e=f.value;!n.call(o,e)&&e!==c&&r(o,e,{get:function r(){return a[e]},enumerable:!(l=t(a,e))||l.enumerable})};for(var p=i(a)[Symbol.iterator](),f;!(u=(f=p.next()).done);u=true)y()}catch(e){d=true;s=e}finally{try{if(!u&&p.return!=null){p.return()}}finally{if(d){throw s}}}return o};var c=function e(e){return a(r({},"__esModule",{value:!0}),e)};var l={};o(l,{GenericFullNavigationDimensions:function e(){return g},GenericFullNavigationPairs:function e(){return v},GenericFullNavigationRules:function e(){return f},GenericLimitedNavigationRules:function e(){return w},NodeElementDefaults:function e(){return k},SemanticKeys:function e(){return u},TypicallyUnreservedKeyPairs:function e(){return p},TypicallyUnreservedKeys:function e(){return s},TypicallyUnreservedSoloKeys:function e(){return y},defaultKeyBindings:function e(){return d}});module.exports=c(l);var u={Escape:!0,Enter:!0,Backspace:!0,ArrowLeft:!0,ArrowRight:!0,ArrowUp:!0,ArrowDown:!0},d={ArrowLeft:"left",ArrowRight:"right",ArrowUp:"up",ArrowDown:"down",Period:"forward",Comma:"backward",Escape:"parent",Enter:"child"},s=["KeyW","KeyJ","LeftBracket","RightBracket","Slash","Backslash"],y=["KeyW","KeyJ"],p=[["LeftBracket","RightBracket"],["Slash","Backslash"]],f={left:{key:"ArrowLeft",direction:"source"},right:{key:"ArrowRight",direction:"target"},up:{key:"ArrowUp",direction:"source"},down:{key:"ArrowDown",direction:"target"},child:{key:"Enter",direction:"target"},parent:{key:"Backspace",direction:"source"},backward:{key:"Comma",direction:"source"},forward:{key:"Period",direction:"target"},previous:{key:"Semicolon",direction:"source"},next:{key:"Quote",direction:"target"},exit:{key:"Escape",direction:"target"},help:{key:"KeyY",direction:"target"},undo:{key:"KeyZ",direction:"target"}},g=[["left","right"],["up","down"],["backward","forward"],["previous","next"]],v={left:["left","right"],right:["left","right"],up:["up","down"],down:["up","down"],backward:["backward","forward"],forward:["backward","forward"],previous:["previous","next"],next:["previous","next"],parent:["parent","child"],child:["parent","child"],exit:["exit","undo"],undo:["undo","undo"]},w={right:{key:"ArrowRight",direction:"target"},left:{key:"ArrowLeft",direction:"source"},down:{key:"ArrowDown",direction:"target"},up:{key:"ArrowUp",direction:"source"},child:{key:"Enter",direction:"target"},parent:{key:"Backspace",direction:"source"},exit:{key:"Escape",direction:"target"},undo:{key:"Period",direction:"target"},legend:{key:"KeyL",direction:"target"}},k={cssClass:void 0,spatialProperties:{x:0,y:0,width:0,height:0,path:""},semantics:{label:"",elementType:"div",role:"image",attributes:void 0},parentSemantics:{label:"",elementType:"figure",role:"figure",attributes:void 0},existingElement:{useForSpatialProperties:!1,spatialProperties:void 0}};0&&(module.exports={GenericFullNavigationDimensions:GenericFullNavigationDimensions,GenericFullNavigationPairs:GenericFullNavigationPairs,GenericFullNavigationRules:GenericFullNavigationRules,GenericLimitedNavigationRules:GenericLimitedNavigationRules,NodeElementDefaults:NodeElementDefaults,SemanticKeys:SemanticKeys,TypicallyUnreservedKeyPairs:TypicallyUnreservedKeyPairs,TypicallyUnreservedKeys:TypicallyUnreservedKeys,TypicallyUnreservedSoloKeys:TypicallyUnreservedSoloKeys,defaultKeyBindings:defaultKeyBindings});
|
package/dist/consts.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
import{a,b,c,d,e,f,g,h,i,j}from"./chunk-MPFBSVCV.js";export{g as GenericFullNavigationDimensions,h as GenericFullNavigationPairs,f as GenericFullNavigationRules,i as GenericLimitedNavigationRules,j as NodeElementDefaults,a as SemanticKeys,e as TypicallyUnreservedKeyPairs,c as TypicallyUnreservedKeys,d as TypicallyUnreservedSoloKeys,b as defaultKeyBindings};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export function plot(id: any, focusData: any): void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export function plot(id: any, focusData: any): void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export function ForceGraph({ nodes, links }: {
|
|
2
2
|
nodes: any;
|
|
3
3
|
links: any;
|
|
4
|
-
}, { nodeId, nodeGroup, nodeGroups, nodeTitle, nodeFill, nodeStroke, nodeStrokeWidth, nodeStrokeOpacity, nodeRadius, nodeStrength, linkSource, linkTarget, linkStroke, linkStrokeOpacity, linkStrokeWidth, linkStrokeLinecap, linkStrength, colors, width, height, invalidation }?: {
|
|
4
|
+
}, { nodeId, nodeGroup, nodeGroups, nodeTitle, nodeFill, nodeStroke, nodeStrokeWidth, nodeStrokeOpacity, nodeRadius, nodeStrength, linkSource, linkTarget, linkStroke, linkStrokeOpacity, linkStrokeWidth, linkStrokeLinecap, linkStrength, colors, width, height, invalidation, description, hide }?: {
|
|
5
5
|
nodeId?: (d: any) => any;
|
|
6
6
|
nodeGroup: any;
|
|
7
7
|
nodeGroups: any;
|
|
@@ -27,4 +27,6 @@ export function ForceGraph({ nodes, links }: {
|
|
|
27
27
|
width?: number;
|
|
28
28
|
height?: number;
|
|
29
29
|
invalidation: any;
|
|
30
|
+
description: any;
|
|
31
|
+
hide: any;
|
|
30
32
|
}): any;
|