@cosmos.gl/graph 3.0.0-beta.1 → 3.0.0-beta.3
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/{src/config.d.ts → config.d.ts} +13 -13
- package/dist/{src/index.d.ts → index.d.ts} +16 -5
- package/dist/index.js +6417 -15
- package/dist/index.js.map +1 -1
- package/dist/index.min.js +80 -57
- package/dist/index.min.js.map +1 -1
- package/dist/{src/modules → modules}/Store/index.d.ts +1 -1
- package/dist/{src/modules → modules}/Zoom/index.d.ts +6 -5
- package/package.json +5 -14
- package/dist/index-C08ZBzdl.js +0 -19898
- package/dist/index-C08ZBzdl.js.map +0 -1
- package/dist/vite.config.d.ts +0 -2
- package/dist/webgl-device-Bbjp2SUN.js +0 -3933
- package/dist/webgl-device-Bbjp2SUN.js.map +0 -1
- /package/dist/{src/graph → graph}/utils/error-message.d.ts +0 -0
- /package/dist/{src/helper.d.ts → helper.d.ts} +0 -0
- /package/dist/{src/modules → modules}/Clusters/index.d.ts +0 -0
- /package/dist/{src/modules → modules}/Drag/index.d.ts +0 -0
- /package/dist/{src/modules → modules}/FPSMonitor/css.d.ts +0 -0
- /package/dist/{src/modules → modules}/FPSMonitor/index.d.ts +0 -0
- /package/dist/{src/modules → modules}/ForceCenter/index.d.ts +0 -0
- /package/dist/{src/modules → modules}/ForceGravity/index.d.ts +0 -0
- /package/dist/{src/modules → modules}/ForceLink/force-spring.d.ts +0 -0
- /package/dist/{src/modules → modules}/ForceLink/index.d.ts +0 -0
- /package/dist/{src/modules → modules}/ForceManyBody/index.d.ts +0 -0
- /package/dist/{src/modules → modules}/ForceMouse/index.d.ts +0 -0
- /package/dist/{src/modules → modules}/GraphData/index.d.ts +0 -0
- /package/dist/{src/modules → modules}/Lines/geometry.d.ts +0 -0
- /package/dist/{src/modules → modules}/Lines/index.d.ts +0 -0
- /package/dist/{src/modules → modules}/Points/atlas-utils.d.ts +0 -0
- /package/dist/{src/modules → modules}/Points/index.d.ts +0 -0
- /package/dist/{src/modules → modules}/Shared/buffer.d.ts +0 -0
- /package/dist/{src/modules → modules}/Shared/texture-utils.d.ts +0 -0
- /package/dist/{src/modules → modules}/Shared/uniform-utils.d.ts +0 -0
- /package/dist/{src/modules → modules}/core-module.d.ts +0 -0
- /package/dist/{src/variables.d.ts → variables.d.ts} +0 -0
|
@@ -165,7 +165,7 @@ export declare class Store {
|
|
|
165
165
|
setHoveredPointRingColor(color: string | [number, number, number, number]): void;
|
|
166
166
|
setFocusedPointRingColor(color: string | [number, number, number, number]): void;
|
|
167
167
|
setGreyoutPointColor(color: string | [number, number, number, number] | undefined): void;
|
|
168
|
-
updateLinkHoveringEnabled(config: Pick<GraphConfigInterface, 'onLinkClick' | '
|
|
168
|
+
updateLinkHoveringEnabled(config: Pick<GraphConfigInterface, 'onLinkClick' | 'onLinkContextMenu' | 'onLinkMouseOver' | 'onLinkMouseOut'>): void;
|
|
169
169
|
setHoveredLinkColor(color?: string | [number, number, number, number]): void;
|
|
170
170
|
setFocusedPoint(index?: number): void;
|
|
171
171
|
addAlpha(decay: number): number;
|
|
@@ -9,13 +9,14 @@ export declare class Zoom {
|
|
|
9
9
|
isRunning: boolean;
|
|
10
10
|
constructor(store: Store, config: GraphConfigInterface);
|
|
11
11
|
/**
|
|
12
|
-
*
|
|
12
|
+
* Returns the zoom transform that fits the given point positions into the viewport.
|
|
13
13
|
*
|
|
14
|
-
* @param positions
|
|
15
|
-
* @param scale
|
|
16
|
-
* @param padding Padding around the viewport
|
|
14
|
+
* @param positions Flat array of point coordinates as `[x0, y0, x1, y1, ...]` (number[] or Float32Array).
|
|
15
|
+
* @param scale Optional scale factor to apply to the transform.
|
|
16
|
+
* @param padding Padding around the viewport as a fraction of the viewport size (e.g. 0.1 = 10%).
|
|
17
|
+
* @returns The zoom transform that fits the positions.
|
|
17
18
|
*/
|
|
18
|
-
getTransform(positions:
|
|
19
|
+
getTransform(positions: number[] | Float32Array, scale?: number, padding?: number): ZoomTransform;
|
|
19
20
|
getDistanceToPoint(position: [number, number]): number;
|
|
20
21
|
getMiddlePointTransform(position: [number, number]): ZoomTransform;
|
|
21
22
|
convertScreenToSpacePosition(screenPosition: [number, number]): [number, number];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cosmos.gl/graph",
|
|
3
|
-
"version": "3.0.0-beta.
|
|
3
|
+
"version": "3.0.0-beta.3",
|
|
4
4
|
"description": "GPU-based force graph layout and rendering",
|
|
5
5
|
"jsdelivr": "dist/index.min.js",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -13,17 +13,16 @@
|
|
|
13
13
|
"CITATION.cff"
|
|
14
14
|
],
|
|
15
15
|
"scripts": {
|
|
16
|
-
"build": "
|
|
17
|
-
"
|
|
18
|
-
"watch": "rollup -c -w",
|
|
16
|
+
"build": "vite build --mode es && vite build --mode umd",
|
|
17
|
+
"watch": "vite build --watch",
|
|
19
18
|
"lint": "eslint --cache ./src --ext .ts --ignore-path .gitignore",
|
|
20
19
|
"lint:staged": "npx lint-staged",
|
|
21
20
|
"storybook": "storybook dev -p 6006",
|
|
22
21
|
"build:storybook": "storybook build",
|
|
23
|
-
"prepublishOnly": "npm run build
|
|
22
|
+
"prepublishOnly": "npm run build"
|
|
24
23
|
},
|
|
25
24
|
"engines": {
|
|
26
|
-
"node": ">=
|
|
25
|
+
"node": ">=18.0.0",
|
|
27
26
|
"npm": ">=7.0.0"
|
|
28
27
|
},
|
|
29
28
|
"keywords": [
|
|
@@ -38,11 +37,6 @@
|
|
|
38
37
|
"devDependencies": {
|
|
39
38
|
"@interacta/css-labels": "^0.1.2",
|
|
40
39
|
"@jls-digital/storybook-addon-code": "^1.0.4",
|
|
41
|
-
"@rollup/plugin-alias": "^3.1.9",
|
|
42
|
-
"@rollup/plugin-commonjs": "^22.0.1",
|
|
43
|
-
"@rollup/plugin-node-resolve": "^13.3.0",
|
|
44
|
-
"@rollup/plugin-terser": "^0.4.4",
|
|
45
|
-
"@rollup/plugin-typescript": "^11.1.6",
|
|
46
40
|
"@storybook/addon-essentials": "^8.4.5",
|
|
47
41
|
"@storybook/addon-interactions": "^8.4.5",
|
|
48
42
|
"@storybook/blocks": "^8.4.5",
|
|
@@ -61,7 +55,6 @@
|
|
|
61
55
|
"@types/dompurify": "^3.0.5",
|
|
62
56
|
"@typescript-eslint/eslint-plugin": "^6.21.0",
|
|
63
57
|
"@typescript-eslint/parser": "^6.21.0",
|
|
64
|
-
"@zerollup/ts-transform-paths": "^1.7.18",
|
|
65
58
|
"d3-scale-chromatic": "^3.1.0",
|
|
66
59
|
"eslint": "^8.57.1",
|
|
67
60
|
"eslint-config-standard": "^17.0.0",
|
|
@@ -73,8 +66,6 @@
|
|
|
73
66
|
"lint-staged": "^13.0.3",
|
|
74
67
|
"pre-commit": "^1.2.2",
|
|
75
68
|
"remark-gfm": "^4.0.0",
|
|
76
|
-
"rollup": "^2.76.0",
|
|
77
|
-
"rollup-plugin-glslify": "^1.3.0",
|
|
78
69
|
"storybook": "^8.4.5",
|
|
79
70
|
"typescript": "^5.5.2",
|
|
80
71
|
"vite": "^6.3.4",
|