@cosmos.gl/graph 2.5.0 → 2.6.1

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.
Files changed (181) hide show
  1. package/dist/config.d.ts +8 -2
  2. package/dist/helper.d.ts +2 -2
  3. package/dist/index.d.ts +21 -2
  4. package/dist/index.js +4950 -14357
  5. package/dist/index.js.map +1 -1
  6. package/dist/index.min.js +1 -1678
  7. package/dist/index.min.js.map +1 -1
  8. package/dist/modules/Clusters/index.d.ts +2 -2
  9. package/dist/modules/Drag/index.d.ts +3 -3
  10. package/dist/modules/ForceCenter/index.d.ts +1 -1
  11. package/dist/modules/ForceGravity/index.d.ts +1 -1
  12. package/dist/modules/ForceLink/index.d.ts +1 -1
  13. package/dist/modules/ForceManyBody/index.d.ts +1 -1
  14. package/dist/modules/ForceManyBodyQuadtree/index.d.ts +1 -1
  15. package/dist/modules/ForceMouse/index.d.ts +1 -1
  16. package/dist/modules/GraphData/index.d.ts +2 -1
  17. package/dist/modules/Lines/index.d.ts +2 -2
  18. package/dist/modules/Points/index.d.ts +5 -2
  19. package/dist/modules/Shared/buffer.d.ts +1 -1
  20. package/dist/modules/Store/index.d.ts +1 -1
  21. package/dist/modules/Zoom/index.d.ts +3 -3
  22. package/dist/modules/core-module.d.ts +5 -5
  23. package/package.json +5 -1
  24. package/.eslintrc +0 -147
  25. package/.github/SECURITY.md +0 -13
  26. package/.github/dco.yml +0 -4
  27. package/.github/workflows/github_pages.yml +0 -54
  28. package/.storybook/main.ts +0 -26
  29. package/.storybook/manager-head.html +0 -1
  30. package/.storybook/manager.ts +0 -14
  31. package/.storybook/preview.ts +0 -29
  32. package/.storybook/style.css +0 -3
  33. package/CHARTER.md +0 -69
  34. package/CODE_OF_CONDUCT.md +0 -178
  35. package/CONTRIBUTING.md +0 -22
  36. package/GOVERNANCE.md +0 -21
  37. package/cosmos-2-0-migration-notes.md +0 -98
  38. package/cosmos_awesome.md +0 -96
  39. package/dist/stories/beginners/basic-set-up/data-gen.d.ts +0 -4
  40. package/dist/stories/beginners/basic-set-up/index.d.ts +0 -5
  41. package/dist/stories/beginners/link-hovering/data-generator.d.ts +0 -19
  42. package/dist/stories/beginners/link-hovering/index.d.ts +0 -5
  43. package/dist/stories/beginners/point-labels/data.d.ts +0 -13
  44. package/dist/stories/beginners/point-labels/index.d.ts +0 -9
  45. package/dist/stories/beginners/point-labels/labels.d.ts +0 -8
  46. package/dist/stories/beginners/quick-start.d.ts +0 -5
  47. package/dist/stories/beginners/remove-points/config.d.ts +0 -2
  48. package/dist/stories/beginners/remove-points/data-gen.d.ts +0 -4
  49. package/dist/stories/beginners/remove-points/index.d.ts +0 -5
  50. package/dist/stories/beginners.stories.d.ts +0 -10
  51. package/dist/stories/clusters/polygon-selection/index.d.ts +0 -6
  52. package/dist/stories/clusters/polygon-selection/polygon.d.ts +0 -20
  53. package/dist/stories/clusters/radial.d.ts +0 -5
  54. package/dist/stories/clusters/with-labels.d.ts +0 -6
  55. package/dist/stories/clusters/worm.d.ts +0 -5
  56. package/dist/stories/clusters.stories.d.ts +0 -9
  57. package/dist/stories/create-cluster-labels.d.ts +0 -4
  58. package/dist/stories/create-cosmos.d.ts +0 -16
  59. package/dist/stories/create-story.d.ts +0 -16
  60. package/dist/stories/experiments/full-mesh.d.ts +0 -5
  61. package/dist/stories/experiments/mesh-with-holes.d.ts +0 -5
  62. package/dist/stories/experiments.stories.d.ts +0 -7
  63. package/dist/stories/generate-mesh-data.d.ts +0 -12
  64. package/dist/stories/geospatial/moscow-metro-stations/index.d.ts +0 -15
  65. package/dist/stories/geospatial/moscow-metro-stations/moscow-metro-coords.d.ts +0 -1
  66. package/dist/stories/geospatial/moscow-metro-stations/point-colors.d.ts +0 -1
  67. package/dist/stories/geospatial.stories.d.ts +0 -6
  68. package/dist/stories/shapes/all-shapes/index.d.ts +0 -5
  69. package/dist/stories/shapes/image-example/index.d.ts +0 -5
  70. package/dist/stories/shapes.stories.d.ts +0 -7
  71. package/logo.svg +0 -3
  72. package/rollup.config.js +0 -70
  73. package/src/config.ts +0 -726
  74. package/src/declaration.d.ts +0 -12
  75. package/src/graph/utils/error-message.ts +0 -23
  76. package/src/helper.ts +0 -74
  77. package/src/index.ts +0 -1608
  78. package/src/modules/Clusters/calculate-centermass.frag +0 -9
  79. package/src/modules/Clusters/calculate-centermass.vert +0 -26
  80. package/src/modules/Clusters/force-cluster.frag +0 -39
  81. package/src/modules/Clusters/index.ts +0 -200
  82. package/src/modules/Drag/index.ts +0 -33
  83. package/src/modules/FPSMonitor/css.ts +0 -53
  84. package/src/modules/FPSMonitor/index.ts +0 -28
  85. package/src/modules/ForceCenter/calculate-centermass.frag +0 -9
  86. package/src/modules/ForceCenter/calculate-centermass.vert +0 -18
  87. package/src/modules/ForceCenter/force-center.frag +0 -27
  88. package/src/modules/ForceCenter/index.ts +0 -104
  89. package/src/modules/ForceGravity/force-gravity.frag +0 -27
  90. package/src/modules/ForceGravity/index.ts +0 -33
  91. package/src/modules/ForceLink/force-spring.ts +0 -73
  92. package/src/modules/ForceLink/index.ts +0 -149
  93. package/src/modules/ForceManyBody/calculate-level.frag +0 -9
  94. package/src/modules/ForceManyBody/calculate-level.vert +0 -25
  95. package/src/modules/ForceManyBody/force-centermass.frag +0 -52
  96. package/src/modules/ForceManyBody/force-level.frag +0 -121
  97. package/src/modules/ForceManyBody/index.ts +0 -223
  98. package/src/modules/ForceManyBody/quadtree-frag-shader.ts +0 -90
  99. package/src/modules/ForceManyBodyQuadtree/calculate-level.frag +0 -9
  100. package/src/modules/ForceManyBodyQuadtree/calculate-level.vert +0 -25
  101. package/src/modules/ForceManyBodyQuadtree/index.ts +0 -157
  102. package/src/modules/ForceManyBodyQuadtree/quadtree-frag-shader.ts +0 -93
  103. package/src/modules/ForceMouse/force-mouse.frag +0 -24
  104. package/src/modules/ForceMouse/index.ts +0 -32
  105. package/src/modules/GraphData/index.ts +0 -383
  106. package/src/modules/Lines/draw-curve-line.frag +0 -46
  107. package/src/modules/Lines/draw-curve-line.vert +0 -194
  108. package/src/modules/Lines/geometry.ts +0 -18
  109. package/src/modules/Lines/hovered-line-index.frag +0 -27
  110. package/src/modules/Lines/hovered-line-index.vert +0 -8
  111. package/src/modules/Lines/index.ts +0 -273
  112. package/src/modules/Points/atlas-utils.ts +0 -137
  113. package/src/modules/Points/drag-point.frag +0 -20
  114. package/src/modules/Points/draw-highlighted.frag +0 -16
  115. package/src/modules/Points/draw-highlighted.vert +0 -86
  116. package/src/modules/Points/draw-points.frag +0 -243
  117. package/src/modules/Points/draw-points.vert +0 -127
  118. package/src/modules/Points/fill-sampled-points.frag +0 -9
  119. package/src/modules/Points/fill-sampled-points.vert +0 -29
  120. package/src/modules/Points/find-hovered-point.frag +0 -9
  121. package/src/modules/Points/find-hovered-point.vert +0 -57
  122. package/src/modules/Points/find-points-on-area-selection.frag +0 -48
  123. package/src/modules/Points/find-points-on-polygon-selection.frag +0 -65
  124. package/src/modules/Points/index.ts +0 -934
  125. package/src/modules/Points/track-positions.frag +0 -18
  126. package/src/modules/Points/update-position.frag +0 -25
  127. package/src/modules/Shared/buffer.ts +0 -37
  128. package/src/modules/Shared/clear.frag +0 -7
  129. package/src/modules/Shared/quad.vert +0 -12
  130. package/src/modules/Store/index.ts +0 -173
  131. package/src/modules/Zoom/index.ts +0 -148
  132. package/src/modules/core-module.ts +0 -28
  133. package/src/stories/1. welcome.mdx +0 -75
  134. package/src/stories/2. configuration.mdx +0 -112
  135. package/src/stories/3. api-reference.mdx +0 -591
  136. package/src/stories/beginners/basic-set-up/data-gen.ts +0 -33
  137. package/src/stories/beginners/basic-set-up/index.ts +0 -163
  138. package/src/stories/beginners/basic-set-up/style.css +0 -35
  139. package/src/stories/beginners/link-hovering/data-generator.ts +0 -198
  140. package/src/stories/beginners/link-hovering/index.ts +0 -61
  141. package/src/stories/beginners/link-hovering/style.css +0 -73
  142. package/src/stories/beginners/point-labels/data.ts +0 -73
  143. package/src/stories/beginners/point-labels/index.ts +0 -65
  144. package/src/stories/beginners/point-labels/labels.ts +0 -46
  145. package/src/stories/beginners/point-labels/style.css +0 -16
  146. package/src/stories/beginners/quick-start.ts +0 -50
  147. package/src/stories/beginners/remove-points/config.ts +0 -25
  148. package/src/stories/beginners/remove-points/data-gen.ts +0 -30
  149. package/src/stories/beginners/remove-points/index.ts +0 -92
  150. package/src/stories/beginners/remove-points/style.css +0 -31
  151. package/src/stories/beginners.stories.ts +0 -117
  152. package/src/stories/clusters/polygon-selection/index.ts +0 -51
  153. package/src/stories/clusters/polygon-selection/polygon.ts +0 -143
  154. package/src/stories/clusters/polygon-selection/style.css +0 -8
  155. package/src/stories/clusters/radial.ts +0 -24
  156. package/src/stories/clusters/with-labels.ts +0 -53
  157. package/src/stories/clusters/worm.ts +0 -40
  158. package/src/stories/clusters.stories.ts +0 -77
  159. package/src/stories/create-cluster-labels.ts +0 -50
  160. package/src/stories/create-cosmos.ts +0 -68
  161. package/src/stories/create-story.ts +0 -51
  162. package/src/stories/experiments/full-mesh.ts +0 -13
  163. package/src/stories/experiments/mesh-with-holes.ts +0 -13
  164. package/src/stories/experiments.stories.ts +0 -43
  165. package/src/stories/generate-mesh-data.ts +0 -125
  166. package/src/stories/geospatial/moscow-metro-stations/index.ts +0 -62
  167. package/src/stories/geospatial/moscow-metro-stations/moscow-metro-coords.ts +0 -1
  168. package/src/stories/geospatial/moscow-metro-stations/point-colors.ts +0 -46
  169. package/src/stories/geospatial/moscow-metro-stations/style.css +0 -30
  170. package/src/stories/geospatial.stories.ts +0 -30
  171. package/src/stories/shapes/all-shapes/index.ts +0 -69
  172. package/src/stories/shapes/image-example/icons/box.png +0 -0
  173. package/src/stories/shapes/image-example/icons/lego.png +0 -0
  174. package/src/stories/shapes/image-example/icons/s.png +0 -0
  175. package/src/stories/shapes/image-example/icons/swift.png +0 -0
  176. package/src/stories/shapes/image-example/icons/toolbox.png +0 -0
  177. package/src/stories/shapes/image-example/index.ts +0 -238
  178. package/src/stories/shapes.stories.ts +0 -37
  179. package/src/variables.ts +0 -68
  180. package/tsconfig.json +0 -41
  181. package/vite.config.ts +0 -54
@@ -1,5 +1,5 @@
1
- import { default as regl } from 'regl';
2
- import { CoreModule } from '../core-module';
1
+ import regl from 'regl';
2
+ import { CoreModule } from '@/graph/modules/core-module';
3
3
  export declare class Clusters extends CoreModule {
4
4
  centermassFbo: regl.Framebuffer2D | undefined;
5
5
  clusterCount: number | undefined;
@@ -1,9 +1,9 @@
1
- import { Store } from '../Store';
2
- import { GraphConfigInterface } from '../../config';
1
+ import { Store } from '@/graph/modules/Store';
2
+ import { GraphConfigInterface } from '@/graph/config';
3
3
  export declare class Drag {
4
4
  readonly store: Store;
5
5
  readonly config: GraphConfigInterface;
6
6
  isActive: boolean;
7
- behavior: import('d3-drag').DragBehavior<HTMLCanvasElement, undefined, import('d3-drag').SubjectPosition | undefined>;
7
+ behavior: import("d3-drag").DragBehavior<HTMLCanvasElement, undefined, import("d3-drag").SubjectPosition | undefined>;
8
8
  constructor(store: Store, config: GraphConfigInterface);
9
9
  }
@@ -1,4 +1,4 @@
1
- import { CoreModule } from '../core-module';
1
+ import { CoreModule } from '@/graph/modules/core-module';
2
2
  export declare class ForceCenter extends CoreModule {
3
3
  private centermassFbo;
4
4
  private clearCentermassCommand;
@@ -1,4 +1,4 @@
1
- import { CoreModule } from '../core-module';
1
+ import { CoreModule } from '@/graph/modules/core-module';
2
2
  export declare class ForceGravity extends CoreModule {
3
3
  private runCommand;
4
4
  initPrograms(): void;
@@ -1,4 +1,4 @@
1
- import { CoreModule } from '../core-module';
1
+ import { CoreModule } from '@/graph/modules/core-module';
2
2
  export declare enum LinkDirection {
3
3
  OUTGOING = "outgoing",
4
4
  INCOMING = "incoming"
@@ -1,4 +1,4 @@
1
- import { CoreModule } from '../core-module';
1
+ import { CoreModule } from '@/graph/modules/core-module';
2
2
  export declare class ForceManyBody extends CoreModule {
3
3
  private randomValuesFbo;
4
4
  private levelsFbos;
@@ -1,4 +1,4 @@
1
- import { CoreModule } from '../core-module';
1
+ import { CoreModule } from '@/graph/modules/core-module';
2
2
  export declare class ForceManyBodyQuadtree extends CoreModule {
3
3
  private randomValuesFbo;
4
4
  private levelsTextures;
@@ -1,4 +1,4 @@
1
- import { CoreModule } from '../core-module';
1
+ import { CoreModule } from '@/graph/modules/core-module';
2
2
  export declare class ForceMouse extends CoreModule {
3
3
  private runCommand;
4
4
  initPrograms(): void;
@@ -1,4 +1,4 @@
1
- import { GraphConfig } from '../../config';
1
+ import { GraphConfig } from '@/graph/config';
2
2
  export declare enum PointShape {
3
3
  Circle = 0,
4
4
  Square = 1,
@@ -24,6 +24,7 @@ export declare class GraphData {
24
24
  inputPointClusters: (number | undefined)[] | undefined;
25
25
  inputClusterPositions: (number | undefined)[] | undefined;
26
26
  inputClusterStrength: Float32Array | undefined;
27
+ inputPinnedPoints: number[] | undefined;
27
28
  pointPositions: Float32Array | undefined;
28
29
  pointColors: Float32Array | undefined;
29
30
  pointSizes: Float32Array | undefined;
@@ -1,5 +1,5 @@
1
- import { default as regl } from 'regl';
2
- import { CoreModule } from '../core-module';
1
+ import regl from 'regl';
2
+ import { CoreModule } from '@/graph/modules/core-module';
3
3
  export declare class Lines extends CoreModule {
4
4
  linkIndexFbo: regl.Framebuffer2D | undefined;
5
5
  hoveredLineIndexFbo: regl.Framebuffer2D | undefined;
@@ -1,5 +1,5 @@
1
- import { default as regl } from 'regl';
2
- import { CoreModule } from '../core-module';
1
+ import regl from 'regl';
2
+ import { CoreModule } from '@/graph/modules/core-module';
3
3
  export declare class Points extends CoreModule {
4
4
  currentPositionFbo: regl.Framebuffer2D | undefined;
5
5
  previousPositionFbo: regl.Framebuffer2D | undefined;
@@ -39,6 +39,8 @@ export declare class Points extends CoreModule {
39
39
  private trackedIndices;
40
40
  private selectedTexture;
41
41
  private greyoutStatusTexture;
42
+ private pinnedStatusTexture;
43
+ private pinnedStatusFbo;
42
44
  private sizeTexture;
43
45
  private trackedIndicesTexture;
44
46
  private polygonPathTexture;
@@ -51,6 +53,7 @@ export declare class Points extends CoreModule {
51
53
  initPrograms(): void;
52
54
  updateColor(): void;
53
55
  updateGreyoutStatus(): void;
56
+ updatePinnedStatus(): void;
54
57
  updateSize(): void;
55
58
  updateShape(): void;
56
59
  updateImageIndices(): void;
@@ -1,4 +1,4 @@
1
- import { default as regl } from 'regl';
1
+ import regl from 'regl';
2
2
  export declare function createQuadBuffer(reglInstance: regl.Regl): {
3
3
  buffer: regl.Buffer;
4
4
  size: number;
@@ -1,5 +1,5 @@
1
1
  import { mat3 } from 'gl-matrix';
2
- import { GraphConfigInterface } from '../../config';
2
+ import type { GraphConfigInterface } from '@/graph/config';
3
3
  export declare const ALPHA_MIN = 0.001;
4
4
  export declare const MAX_POINT_SIZE = 64;
5
5
  /**
@@ -1,11 +1,11 @@
1
1
  import { ZoomTransform } from 'd3-zoom';
2
- import { Store } from '../Store';
3
- import { GraphConfigInterface } from '../../config';
2
+ import { Store } from '@/graph/modules/Store';
3
+ import { GraphConfigInterface } from '@/graph/config';
4
4
  export declare class Zoom {
5
5
  readonly store: Store;
6
6
  readonly config: GraphConfigInterface;
7
7
  eventTransform: ZoomTransform;
8
- behavior: import('d3-zoom').ZoomBehavior<HTMLCanvasElement, undefined>;
8
+ behavior: import("d3-zoom").ZoomBehavior<HTMLCanvasElement, undefined>;
9
9
  isRunning: boolean;
10
10
  constructor(store: Store, config: GraphConfigInterface);
11
11
  /**
@@ -1,8 +1,8 @@
1
- import { default as regl } from 'regl';
2
- import { GraphConfigInterface } from '../config';
3
- import { GraphData } from './GraphData';
4
- import { Points } from './Points';
5
- import { Store } from './Store';
1
+ import regl from 'regl';
2
+ import { GraphConfigInterface } from '@/graph/config';
3
+ import { GraphData } from '@/graph/modules/GraphData';
4
+ import { Points } from '@/graph/modules/Points';
5
+ import { Store } from '@/graph/modules/Store';
6
6
  export declare class CoreModule {
7
7
  readonly reglInstance: regl.Regl;
8
8
  readonly config: GraphConfigInterface;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cosmos.gl/graph",
3
- "version": "2.5.0",
3
+ "version": "2.6.1",
4
4
  "description": "GPU-based force graph layout and rendering",
5
5
  "jsdelivr": "dist/index.min.js",
6
6
  "main": "dist/index.js",
@@ -8,6 +8,10 @@
8
8
  "license": "MIT",
9
9
  "repository": "git://github.com/cosmos.gl/graph.git",
10
10
  "type": "module",
11
+ "files": [
12
+ "dist",
13
+ "CITATION.cff"
14
+ ],
11
15
  "scripts": {
12
16
  "build": "rm -rf dist; rollup -c",
13
17
  "build:vite": "rm -rf dist; vite build",
package/.eslintrc DELETED
@@ -1,147 +0,0 @@
1
- {
2
- "extends": [
3
- "plugin:@typescript-eslint/recommended",
4
- "standard"
5
- ],
6
- "env": {
7
- "es6": true,
8
- "node": true,
9
- "browser": true
10
- },
11
- "plugins": [
12
- "import",
13
- "unicorn"
14
- ],
15
- "parser": "@typescript-eslint/parser",
16
- "parserOptions": {
17
- "project": "./tsconfig.json"
18
- },
19
- "rules": {
20
- "object-curly-spacing": ["error", "always"],
21
- "prefer-template": "error",
22
- "no-useless-constructor": "off",
23
- "import/extensions": 0,
24
- "import/no-extraneous-dependencies": 0,
25
- "import/no-default-export": "error",
26
- "import/prefer-default-export": 0,
27
- "import/first": ["error", "absolute-first"],
28
- "import/order": ["error",
29
- {
30
- "groups": ["builtin", "external", "internal", "parent", "sibling", "index", "object"],
31
- "pathGroups": [
32
- {
33
- "pattern": "@/**",
34
- "group": "internal"
35
- }
36
- ],
37
- }
38
- ],
39
- "comma-dangle": ["error", {
40
- "arrays": "always-multiline",
41
- "objects": "always-multiline",
42
- "imports": "always-multiline",
43
- "exports": "always-multiline",
44
- "functions": "never"
45
- }],
46
- "indent": ["error", 2],
47
- "consistent-return": "error",
48
- "no-console": ["error", { "allow": ["warn", "error"] }],
49
- "no-undef": 0,
50
- "no-unused-expressions": "off",
51
- "no-multiple-empty-lines": 2,
52
- "no-use-before-define": "off",
53
- "@typescript-eslint/no-use-before-define": ["error", {"variables": false}],
54
- "no-unused-vars": "off",
55
- "@typescript-eslint/no-unused-vars": ["error"],
56
- "@typescript-eslint/no-unused-expressions": ["error"],
57
- "@typescript-eslint/no-explicit-any": ["error"],
58
- "@typescript-eslint/indent": "off",
59
- "@typescript-eslint/type-annotation-spacing": ["error"],
60
- "@typescript-eslint/member-delimiter-style": ["error", {
61
- "multiline": {
62
- "delimiter": "semi",
63
- "requireLast": true
64
- },
65
- "singleline": {
66
- "delimiter": "semi",
67
- "requireLast": false
68
- }
69
- }],
70
- "@typescript-eslint/member-ordering": "error",
71
- "@typescript-eslint/explicit-member-accessibility": "error",
72
- "@typescript-eslint/explicit-function-return-type": "error",
73
- "@typescript-eslint/naming-convention": [
74
- "error",
75
- {
76
- "selector": "default",
77
- "format": ["camelCase"],
78
- "leadingUnderscore": "allow",
79
- "trailingUnderscore": "allow"
80
- },
81
- {
82
- "selector": "import",
83
- "format": ["camelCase", "PascalCase"]
84
- },
85
- {
86
- "selector": "classProperty",
87
- "format": ["camelCase", "UPPER_CASE"],
88
- "leadingUnderscore": "allow",
89
- "trailingUnderscore": "allow"
90
- },
91
- {
92
- "selector": "classProperty",
93
- "types": ["boolean"],
94
- "format": ["PascalCase"],
95
- "prefix": ["is", "should", "has", "can", "did", "will", "are"],
96
- "leadingUnderscore": "allow",
97
- "trailingUnderscore": "allow"
98
- },
99
- {
100
- "selector": "function",
101
- "format": ["camelCase", "PascalCase"],
102
- "modifiers": ["exported"],
103
- "leadingUnderscore": "allow",
104
- "trailingUnderscore": "allow"
105
- },
106
- {
107
- "selector": "variable",
108
- "format": ["camelCase", "UPPER_CASE"],
109
- "leadingUnderscore": "allow",
110
- "trailingUnderscore": "allow"
111
- },
112
- {
113
- "selector": "variable",
114
- "modifiers": ["exported"],
115
- "format": ["camelCase", "UPPER_CASE", "PascalCase"]
116
- },
117
- {
118
- "selector": "typeLike",
119
- "format": ["PascalCase"]
120
- },
121
- {
122
- "selector": "enumMember",
123
- "format": ["PascalCase"]
124
- },
125
- {
126
- "selector": "property",
127
- "leadingUnderscore": "allowSingleOrDouble",
128
- "format": ["camelCase", "snake_case", "UPPER_CASE"]
129
- }
130
- ],
131
- "max-len": ["warn", { "code": 160, "comments": 160 }],
132
- "unicorn/filename-case": "error",
133
- "unicorn/no-for-loop": "error",
134
- "unicorn/prefer-array-some": "error",
135
- "unicorn/no-instanceof-array": "error",
136
- "unicorn/prefer-includes": "error",
137
- "unicorn/prefer-keyboard-event-key": "error"
138
- },
139
- "overrides": [
140
- {
141
- "files": ["src/stories/**/*.ts"],
142
- "rules": {
143
- "no-console": "off"
144
- }
145
- }
146
- ]
147
- }
@@ -1,13 +0,0 @@
1
- # Security Policy
2
-
3
- ## Supported Versions
4
-
5
- Security updates are applied only to the latest release.
6
-
7
- ## Reporting a Vulnerability
8
-
9
- If you have discovered a security vulnerability in this project, please report it privately. **Do not disclose it as a public issue.** This gives us time to work with you to fix the issue before public exposure, reducing the chance that the exploit will be used before a patch is released.
10
-
11
- Please disclose it at [security advisory](https://github.com/cosmograph-org/cosmos/security/advisories/new).
12
-
13
- This project is maintained by a team of volunteers on a reasonable-effort basis. As such, please give us at least 90 days to work on a fix before public exposure.
package/.github/dco.yml DELETED
@@ -1,4 +0,0 @@
1
- allowRemediationCommits:
2
- individual: true
3
- require:
4
- members: false
@@ -1,54 +0,0 @@
1
- name: Deploy to GitHub Pages
2
-
3
- on:
4
- push:
5
- branches:
6
- - main
7
-
8
- # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
9
- permissions:
10
- contents: read
11
- pages: write
12
- id-token: write
13
-
14
- # Allow one concurrent deployment
15
- concurrency:
16
- group: "pages"
17
- cancel-in-progress: false
18
-
19
- jobs:
20
- # Build job
21
- build:
22
- runs-on: ubuntu-latest
23
- steps:
24
- - name: Checkout
25
- uses: actions/checkout@v4
26
- - name: Setup Pages
27
- uses: actions/configure-pages@v5
28
- - name: Cache dependencies
29
- uses: actions/cache@v4
30
- with:
31
- path: ~/.npm
32
- key: npm-${{ hashFiles('package-lock.json') }}
33
- restore-keys: npm-
34
- - name: Build
35
- uses: actions/setup-node@v4
36
- with:
37
- node-version: '20.x'
38
- - run: npm install -g npm@10
39
- - run: npm ci
40
- - run: npm run build:storybook -- -o _site
41
- - name: Upload artifact
42
- uses: actions/upload-pages-artifact@v3
43
-
44
- # Deployment job
45
- deploy:
46
- environment:
47
- name: github-pages
48
- url: ${{ steps.deployment.outputs.page_url }}
49
- runs-on: ubuntu-latest
50
- needs: build
51
- steps:
52
- - name: Deploy to GitHub Pages
53
- id: deployment
54
- uses: actions/deploy-pages@v4
@@ -1,26 +0,0 @@
1
- import type { StorybookConfig } from "@storybook/html-vite";
2
- import remarkGfm from 'remark-gfm';
3
-
4
- const config: StorybookConfig = {
5
- stories: ["../src/**/*.mdx", "../src/**/*.stories.@(js|jsx|mjs|ts|tsx)"],
6
- addons: [
7
- "@jls-digital/storybook-addon-code",
8
- "@storybook/addon-essentials",
9
- "@storybook/addon-interactions",
10
- {
11
- name: '@storybook/addon-docs',
12
- options: {
13
- mdxPluginOptions: {
14
- mdxCompileOptions: {
15
- remarkPlugins: [remarkGfm],
16
- },
17
- },
18
- },
19
- },
20
- ],
21
- framework: {
22
- name: "@storybook/html-vite",
23
- options: {},
24
- },
25
- };
26
- export default config;
@@ -1 +0,0 @@
1
- <link rel="icon" type="image/png" href="https://cosmograph.app/img/favicon.png" />
@@ -1,14 +0,0 @@
1
- import { addons } from '@storybook/manager-api';
2
- import { create } from '@storybook/theming';
3
-
4
- const theme = create({
5
- base: 'dark',
6
- brandTitle: 'cosmos.gl',
7
- brandUrl: 'https://cosmosgl.github.io/graph',
8
- brandImage: 'https://d.cosmograph.app/cosmos-dark-theme.svg',
9
- brandTarget: '_self',
10
- });
11
-
12
- addons.setConfig({
13
- theme,
14
- });
@@ -1,29 +0,0 @@
1
- import type { Preview } from "@storybook/html";
2
- import { themes } from '@storybook/theming';
3
-
4
- import './style.css';
5
-
6
- const preview: Preview = {
7
- parameters: {
8
- layout: 'fullscreen',
9
- controls: {
10
- disable: true,
11
- matchers: {
12
- color: /(background|color)$/i,
13
- date: /Date$/i,
14
- },
15
- },
16
- docs: {
17
- theme: themes.dark,
18
- },
19
- backgrounds: {
20
- default: 'dark',
21
- values: [
22
- { name: 'light', value: '#fff' },
23
- { name: 'dark', value: '#192132' },
24
- ],
25
- },
26
- },
27
- };
28
-
29
- export default preview;
@@ -1,3 +0,0 @@
1
- tr:nth-of-type(2n) {
2
- background-color: #1e2326;
3
- }
package/CHARTER.md DELETED
@@ -1,69 +0,0 @@
1
- # cosmos.gl Charter
2
-
3
- ## **Section 0: Guiding Principles**
4
-
5
- **Mission:** Provide the web development community with a high-performance framework for visualizing network graphs and scatter plots.
6
-
7
- **Vision:** Deliver fast, robust, open-source data visualization tools that empower interactive, scalable analysis in the browser.
8
-
9
- **Values:**
10
-
11
- - **Performance First:** Prioritize speed and efficiency in every feature and implementation.
12
- - **Accessibility:** Ensure the API is intuitive and the tooling easy to adopt, lowering barriers for developers.
13
- - **Community:** Foster open collaboration, welcoming contributions and feedback.
14
- - **Transparency:** Maintain clear documentation, benchmarks, and decision-making processes.
15
-
16
- ## **Section 1: Scope**
17
-
18
- cosmos.gl is a browser-native, GPU-accelerated force-directed graph layout and rendering engine designed to visualize and interact with massive, complex datasets at scale. By leveraging WebGL, it delivers fast simulations and real-time rendering of millions of nodes and edges directly in the browser. cosmos.gl bridges the gap between high-performance data visualization and interactive web-based research workflows, serving developers, researchers, and analysts. Its value lies in unlocking scalable, explainable graph exploration for AI, biotech, finance, and data science stakeholders.
19
-
20
- ### **1.1: In-scope**
21
-
22
- - GPU-accelerated graph algorithms
23
- - WebGL- and WebGPU-based rendering of large-scale network graph and machine learning embeddings
24
- - Browser-native integration with frontend tooling and workflows
25
-
26
- ### **1.2: Out-of-Scope**
27
-
28
- - Server-side computation, backend data processing and pipelines
29
- - Native desktop or mobile applications (outside browser environment)
30
- - Direct integration with domain-specific tools
31
-
32
- ## **Section 2: Relationship with OpenJS Foundation CPC**
33
-
34
- Technical leadership of the cosmos.gl project is delegated to the cosmos.gl Technical Steering Committee (TSC) by the OpenJS Cross Project Council (CPC). Amendments to this charter require approval from both the CPC, through its [decision-making process](https://github.com/openjs-foundation/cross-project-council/blob/master/CPC-CHARTER.md#section-9-decision-making), and the TSC.
35
-
36
- ## **Section 3: Technical Steering Committee (TSC)**
37
-
38
- TSC members may attend meetings, participate in discussions, and vote on all matters before the TSC.
39
-
40
- TSC memberships are not time-limited. There is no maximum size of the TSC.
41
-
42
- There is no specific set of requirements or qualifications for TSC membership beyond these rules. A TSC member can be removed from the TSC by voluntary resignation or by a standard TSC motion.
43
-
44
- The TSC shall meet regularly using tools that enable participation by the community. The meeting shall be directed by the TSC chairperson. Responsibility for directing individual meetings may be delegated by the TSC chairperson to any other TSC member. Minutes or an appropriate recording shall be taken and made available to the community through accessible public postings.
45
-
46
- TSC members are expected to regularly participate in TSC activities.
47
-
48
- The TSC chairperson is elected by a simple majority vote of all TSC members. The chairperson serves until they resign or are replaced by a TSC vote. Any TSC member may call for a vote at any time, provided the proposal is made in writing and shared with the full TSC. Votes may be held in meetings or asynchronously using any communication tool commonly used by the TSC.
49
-
50
- ## **Section 4: Roles & Responsibilities**
51
- The roles and responsibilities of cosmos.gl's TSC are described in [GOVERNANCE.md](./GOVERNANCE.md).
52
-
53
- ### **Section 4.1 Project Operations & Management**
54
- The Project Operations & Management processes are defined in [GOVERNANCE.md](./GOVERNANCE.md).
55
-
56
- ### **Section 4.2: Decision-making, Voting, and/or Elections**
57
-
58
- Project decisions shall operate under a model of Lazy Consensus by default. The TSC shall define appropriate guidelines for implementing Lazy Consensus (e.g., notification periods, review windows) within the development process.
59
-
60
- When consensus cannot be reached, the TSC shall decide via public voting.
61
-
62
- Each vote presents the available options in a format that supports clear expression of member preferences—this may include polls, emoji reactions, checklists, or comparable methods. TSC members may vote for one or more options or abstain. Unless otherwise specified, the winning option is the one that receives the greatest support among participating members.
63
-
64
- For decisions involving three or more options, the TSC may optionally conduct pairwise comparisons between all candidates. In such cases, the winner is the candidate who secures a simple majority against every other candidate in head-to-head matchups (Condorcet winner). All votes are public, and voting activity may be adjusted until the close of the voting period.
65
-
66
- ## **Section 5: Definitions**
67
- ### **Agenda Item**
68
-
69
- An agenda item is a specific topic, proposal, or issue scheduled for discussion or decision during a TSC meeting. Examples include proposed technical changes, governance matters, or any subject requiring TSC review or input. Agenda items are published in advance to allow TSC members and the community to prepare for discussion or decision-making.