data-navigator 1.2.0 → 1.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/dist/data-navigator.d.ts +112 -0
- package/dist/examples/static-app.d.ts +1 -0
- package/dist/examples/vega-lite-app.d.ts +1 -0
- package/dist/examples/vis-demo.d.ts +1 -0
- package/dist/src/consts.d.ts +4 -0
- package/dist/src/index.d.ts +11 -0
- package/dist/src/input.d.ts +2 -0
- package/dist/src/rendering.d.ts +2 -0
- package/dist/src/structure.d.ts +14 -0
- package/dist/src/utilities.d.ts +1 -0
- package/package.json +2 -3
- package/dist/chunk-JJEPMSK4.mjs +0 -1
- package/dist/data-navigator.d.js +0 -0
- package/dist/data-navigator.d.mjs +0 -0
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
type StructureOptions = {
|
|
2
|
+
[key: string | number]: any;
|
|
3
|
+
};
|
|
4
|
+
type InputOptions = {
|
|
5
|
+
structure: Structure;
|
|
6
|
+
navigationRules: NavigationRules;
|
|
7
|
+
entryPoint?: NodeId;
|
|
8
|
+
exitPoint?: RenderId;
|
|
9
|
+
};
|
|
10
|
+
type RenderingOptions = {
|
|
11
|
+
elementData: ElementData | Nodes;
|
|
12
|
+
suffixId: string;
|
|
13
|
+
root: RootObject;
|
|
14
|
+
defaults?: RenderObject;
|
|
15
|
+
entryButton?: EntryObject;
|
|
16
|
+
exitElement?: ExitObject;
|
|
17
|
+
};
|
|
18
|
+
type Structure = {
|
|
19
|
+
nodes: Nodes;
|
|
20
|
+
edges: Edges;
|
|
21
|
+
navigationRules?: NavigationRules;
|
|
22
|
+
elementData?: ElementData;
|
|
23
|
+
};
|
|
24
|
+
type Nodes = Record<NodeId, NodeObject>;
|
|
25
|
+
type Edges = Record<EdgeId, EdgeObject>;
|
|
26
|
+
type NavigationRules = Record<NavId, NavObject>;
|
|
27
|
+
type ElementData = Record<RenderId, RenderObject>;
|
|
28
|
+
type EdgeList = Array<EdgeId>;
|
|
29
|
+
type NavigationList = Array<NavId>;
|
|
30
|
+
type Semantics = ((RenderObject?: any, DatumObject?: any) => SemanticsObject) | SemanticsObject;
|
|
31
|
+
type Dimensions = ((RenderObject?: any, DatumObject?: any) => DimensionsObject) | DimensionsObject;
|
|
32
|
+
type Attributes = ((RenderObject?: any, DatumObject?: any) => AttributesObject) | AttributesObject;
|
|
33
|
+
type NodeObject = {
|
|
34
|
+
id: NodeId;
|
|
35
|
+
edges: EdgeList;
|
|
36
|
+
renderId?: RenderId;
|
|
37
|
+
[key: string | number]: any;
|
|
38
|
+
};
|
|
39
|
+
type EdgeObject = {
|
|
40
|
+
source: (() => EdgeId) | EdgeId;
|
|
41
|
+
target: (() => EdgeId) | EdgeId;
|
|
42
|
+
navigationRules: NavigationList;
|
|
43
|
+
};
|
|
44
|
+
type NavObject = {
|
|
45
|
+
direction: Direction;
|
|
46
|
+
key?: string;
|
|
47
|
+
};
|
|
48
|
+
type RenderObject = {
|
|
49
|
+
cssClass?: DynamicString;
|
|
50
|
+
dimensions?: Dimensions;
|
|
51
|
+
semantics?: Semantics;
|
|
52
|
+
parentSemantics?: Semantics;
|
|
53
|
+
existingElement?: ExistingElement;
|
|
54
|
+
showText?: boolean;
|
|
55
|
+
};
|
|
56
|
+
type RootObject = {
|
|
57
|
+
id: string;
|
|
58
|
+
cssClass?: string;
|
|
59
|
+
description?: string;
|
|
60
|
+
width?: string | number;
|
|
61
|
+
height?: string | number;
|
|
62
|
+
};
|
|
63
|
+
type EntryObject = {
|
|
64
|
+
include: boolean;
|
|
65
|
+
callbacks?: EntryCallbacks;
|
|
66
|
+
};
|
|
67
|
+
type ExitObject = {
|
|
68
|
+
include: boolean;
|
|
69
|
+
callbacks?: ExitCallbacks;
|
|
70
|
+
};
|
|
71
|
+
type SemanticsObject = {
|
|
72
|
+
label?: DynamicString;
|
|
73
|
+
elementType?: DynamicString;
|
|
74
|
+
role?: DynamicString;
|
|
75
|
+
attributes?: Attributes;
|
|
76
|
+
};
|
|
77
|
+
type DimensionsObject = {
|
|
78
|
+
x?: DynamicNumber;
|
|
79
|
+
y?: DynamicNumber;
|
|
80
|
+
width?: DynamicNumber;
|
|
81
|
+
height?: DynamicNumber;
|
|
82
|
+
path?: DynamicString;
|
|
83
|
+
};
|
|
84
|
+
type DescriptionOptions = {
|
|
85
|
+
omitKeyNames?: boolean;
|
|
86
|
+
semanticLabel?: string;
|
|
87
|
+
};
|
|
88
|
+
type ExistingElement = {
|
|
89
|
+
useForDimensions: boolean;
|
|
90
|
+
dimensions?: Dimensions;
|
|
91
|
+
};
|
|
92
|
+
type EntryCallbacks = {
|
|
93
|
+
focus?: Function;
|
|
94
|
+
click?: Function;
|
|
95
|
+
};
|
|
96
|
+
type ExitCallbacks = {
|
|
97
|
+
focus?: Function;
|
|
98
|
+
blur?: Function;
|
|
99
|
+
};
|
|
100
|
+
type DatumObject = {
|
|
101
|
+
[key: string | number]: any;
|
|
102
|
+
};
|
|
103
|
+
type AttributesObject = {
|
|
104
|
+
[key: string]: string;
|
|
105
|
+
};
|
|
106
|
+
type DynamicNumber = ((RenderObject?: any, DatumObject?: any) => number) | number;
|
|
107
|
+
type DynamicString = ((RenderObject?: any, DatumObject?: any) => string) | string;
|
|
108
|
+
type NodeId = string;
|
|
109
|
+
type EdgeId = string;
|
|
110
|
+
type RenderId = string;
|
|
111
|
+
type NavId = string;
|
|
112
|
+
type Direction = "target" | "source";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
structure: (options: StructureOptions) => {
|
|
3
|
+
nodes: {};
|
|
4
|
+
edges: {};
|
|
5
|
+
elementData: {};
|
|
6
|
+
navigationRules: NavigationRules;
|
|
7
|
+
};
|
|
8
|
+
input: (options: InputOptions) => any;
|
|
9
|
+
rendering: (options: RenderingOptions) => any;
|
|
10
|
+
};
|
|
11
|
+
export default _default;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
declare const _default: (options: StructureOptions) => {
|
|
2
|
+
nodes: {};
|
|
3
|
+
edges: {};
|
|
4
|
+
elementData: {};
|
|
5
|
+
navigationRules: NavigationRules;
|
|
6
|
+
};
|
|
7
|
+
export default _default;
|
|
8
|
+
export declare const buildNodeStructureFromVegaLite: (options: any) => {
|
|
9
|
+
nodes: {};
|
|
10
|
+
edges: {};
|
|
11
|
+
elementData: {};
|
|
12
|
+
navigationRules: NavigationRules;
|
|
13
|
+
};
|
|
14
|
+
export declare const buildNodeStructure: (options: any) => {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const describeNode: (d: DatumObject, descriptionOptions?: DescriptionOptions) => string;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "data-navigator",
|
|
3
3
|
"author": "Frank Elavsky",
|
|
4
|
-
"version": "1.2.
|
|
4
|
+
"version": "1.2.2",
|
|
5
5
|
"main": "./dist/index.jsm",
|
|
6
6
|
"module": "./dist/index",
|
|
7
7
|
"types": "./dist/data-navigator.d.ts",
|
|
@@ -29,10 +29,9 @@
|
|
|
29
29
|
"description": "Data-navigator is a JavaScript library that allows for serial navigation of data structures using a variety of input modalities and assistive technologies.",
|
|
30
30
|
"scripts": {
|
|
31
31
|
"clean": "rm -rf ./dist && rm -rf ./app",
|
|
32
|
-
"build": "yarn build:app && yarn build:index && yarn build:
|
|
32
|
+
"build": "yarn build:app && yarn build:index && yarn build:modules",
|
|
33
33
|
"build:app": "webpack",
|
|
34
34
|
"build:index": "tsup src/index.ts --format cjs,esm",
|
|
35
|
-
"build:types": "tsup data-navigator.d.ts --format cjs,esm",
|
|
36
35
|
"build:modules": "tsup src/structure.ts src/input.ts src/rendering.ts src/utilities.ts src/consts.ts --format cjs,esm --minify",
|
|
37
36
|
"server": "python -m http.server",
|
|
38
37
|
"prettier-all-check": "prettier --config ./.prettierrc --ignore ./.prettierignore --debug-check \"**/*.{js,jsx,ts,tsx,html,jsx,json,css,scss,md}\"",
|
package/dist/chunk-JJEPMSK4.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var a=(t,c)=>{let s=Object.keys(t),e="";return s.forEach(o=>{e+=`${c.omitKeyNames?"":o+": "}${t[o]}. `}),e+=c.semanticLabel||"Data point.",e};export{a};
|
package/dist/data-navigator.d.js
DELETED
|
File without changes
|
|
File without changes
|