@cosmos.gl/graph 2.6.2-rc.0 → 2.7.0-beta.0

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 (186) hide show
  1. package/.eslintrc +147 -0
  2. package/.github/SECURITY.md +13 -0
  3. package/.github/dco.yml +4 -0
  4. package/.github/workflows/github_pages.yml +54 -0
  5. package/.storybook/main.ts +26 -0
  6. package/.storybook/manager-head.html +1 -0
  7. package/.storybook/manager.ts +14 -0
  8. package/.storybook/preview.ts +29 -0
  9. package/.storybook/style.css +3 -0
  10. package/CHARTER.md +69 -0
  11. package/CODE_OF_CONDUCT.md +178 -0
  12. package/CONTRIBUTING.md +22 -0
  13. package/GOVERNANCE.md +21 -0
  14. package/cosmos-2-0-migration-notes.md +98 -0
  15. package/cosmos_awesome.md +96 -0
  16. package/dist/config.d.ts +5 -9
  17. package/dist/graph/utils/error-message.d.ts +1 -1
  18. package/dist/helper.d.ts +39 -2
  19. package/dist/index-FUIgayhu.js +19827 -0
  20. package/dist/index-FUIgayhu.js.map +1 -0
  21. package/dist/index.d.ts +17 -64
  22. package/dist/index.js +14 -14654
  23. package/dist/index.js.map +1 -1
  24. package/dist/index.min.js +1062 -475
  25. package/dist/index.min.js.map +1 -1
  26. package/dist/modules/Clusters/index.d.ts +11 -3
  27. package/dist/modules/ForceCenter/index.d.ts +10 -3
  28. package/dist/modules/ForceGravity/index.d.ts +5 -1
  29. package/dist/modules/ForceLink/index.d.ts +8 -5
  30. package/dist/modules/ForceManyBody/index.d.ts +16 -7
  31. package/dist/modules/ForceMouse/index.d.ts +5 -1
  32. package/dist/modules/GraphData/index.d.ts +0 -1
  33. package/dist/modules/Lines/index.d.ts +11 -5
  34. package/dist/modules/Points/index.d.ts +31 -13
  35. package/dist/modules/Store/index.d.ts +93 -0
  36. package/dist/modules/core-module.d.ts +3 -3
  37. package/dist/stories/beginners/basic-set-up/data-gen.d.ts +4 -0
  38. package/dist/stories/beginners/basic-set-up/index.d.ts +6 -0
  39. package/dist/stories/beginners/link-hovering/data-generator.d.ts +19 -0
  40. package/dist/stories/beginners/link-hovering/index.d.ts +6 -0
  41. package/dist/stories/beginners/point-labels/data.d.ts +13 -0
  42. package/dist/stories/beginners/point-labels/index.d.ts +10 -0
  43. package/dist/stories/beginners/point-labels/labels.d.ts +8 -0
  44. package/dist/stories/beginners/quick-start.d.ts +6 -0
  45. package/dist/stories/beginners/remove-points/config.d.ts +2 -0
  46. package/dist/stories/beginners/remove-points/data-gen.d.ts +4 -0
  47. package/dist/stories/beginners/remove-points/index.d.ts +6 -0
  48. package/dist/stories/beginners.stories.d.ts +10 -0
  49. package/dist/stories/clusters/polygon-selection/index.d.ts +6 -0
  50. package/dist/stories/clusters/polygon-selection/polygon.d.ts +20 -0
  51. package/dist/stories/clusters/radial.d.ts +6 -0
  52. package/dist/stories/clusters/with-labels.d.ts +6 -0
  53. package/dist/stories/clusters/worm.d.ts +6 -0
  54. package/dist/stories/clusters.stories.d.ts +9 -0
  55. package/dist/stories/create-cluster-labels.d.ts +4 -0
  56. package/dist/stories/create-cosmos.d.ts +17 -0
  57. package/dist/stories/create-story.d.ts +16 -0
  58. package/dist/stories/experiments/full-mesh.d.ts +6 -0
  59. package/dist/stories/experiments/mesh-with-holes.d.ts +6 -0
  60. package/dist/stories/experiments.stories.d.ts +7 -0
  61. package/dist/stories/generate-mesh-data.d.ts +12 -0
  62. package/dist/stories/geospatial/moscow-metro-stations/index.d.ts +16 -0
  63. package/dist/stories/geospatial/moscow-metro-stations/moscow-metro-coords.d.ts +1 -0
  64. package/dist/stories/geospatial/moscow-metro-stations/point-colors.d.ts +1 -0
  65. package/dist/stories/geospatial.stories.d.ts +6 -0
  66. package/dist/stories/shapes/all-shapes/index.d.ts +6 -0
  67. package/dist/stories/shapes/image-example/index.d.ts +6 -0
  68. package/dist/stories/shapes.stories.d.ts +7 -0
  69. package/dist/stories/test-luma-migration.d.ts +6 -0
  70. package/dist/stories/test.stories.d.ts +6 -0
  71. package/dist/webgl-device-B9ewDj5L.js +3923 -0
  72. package/dist/webgl-device-B9ewDj5L.js.map +1 -0
  73. package/logo.svg +3 -0
  74. package/package.json +5 -7
  75. package/rollup.config.js +70 -0
  76. package/src/config.ts +728 -0
  77. package/src/declaration.d.ts +12 -0
  78. package/src/graph/utils/error-message.ts +23 -0
  79. package/src/helper.ts +113 -0
  80. package/src/index.ts +1769 -0
  81. package/src/modules/Clusters/calculate-centermass.frag +12 -0
  82. package/src/modules/Clusters/calculate-centermass.vert +38 -0
  83. package/src/modules/Clusters/force-cluster.frag +55 -0
  84. package/src/modules/Clusters/index.ts +578 -0
  85. package/src/modules/Drag/index.ts +33 -0
  86. package/src/modules/FPSMonitor/css.ts +53 -0
  87. package/src/modules/FPSMonitor/index.ts +28 -0
  88. package/src/modules/ForceCenter/calculate-centermass.frag +9 -0
  89. package/src/modules/ForceCenter/calculate-centermass.vert +26 -0
  90. package/src/modules/ForceCenter/force-center.frag +37 -0
  91. package/src/modules/ForceCenter/index.ts +284 -0
  92. package/src/modules/ForceGravity/force-gravity.frag +40 -0
  93. package/src/modules/ForceGravity/index.ts +107 -0
  94. package/src/modules/ForceLink/force-spring.ts +89 -0
  95. package/src/modules/ForceLink/index.ts +293 -0
  96. package/src/modules/ForceManyBody/calculate-level.frag +9 -0
  97. package/src/modules/ForceManyBody/calculate-level.vert +37 -0
  98. package/src/modules/ForceManyBody/force-centermass.frag +61 -0
  99. package/src/modules/ForceManyBody/force-level.frag +138 -0
  100. package/src/modules/ForceManyBody/index.ts +525 -0
  101. package/src/modules/ForceManyBody/quadtree-frag-shader.ts +89 -0
  102. package/src/modules/ForceManyBodyQuadtree/calculate-level.frag +9 -0
  103. package/src/modules/ForceManyBodyQuadtree/calculate-level.vert +25 -0
  104. package/src/modules/ForceManyBodyQuadtree/index.ts +157 -0
  105. package/src/modules/ForceManyBodyQuadtree/quadtree-frag-shader.ts +93 -0
  106. package/src/modules/ForceMouse/force-mouse.frag +35 -0
  107. package/src/modules/ForceMouse/index.ts +102 -0
  108. package/src/modules/GraphData/index.ts +383 -0
  109. package/src/modules/Lines/draw-curve-line.frag +59 -0
  110. package/src/modules/Lines/draw-curve-line.vert +248 -0
  111. package/src/modules/Lines/geometry.ts +18 -0
  112. package/src/modules/Lines/hovered-line-index.frag +43 -0
  113. package/src/modules/Lines/hovered-line-index.vert +13 -0
  114. package/src/modules/Lines/index.ts +661 -0
  115. package/src/modules/Points/atlas-utils.ts +137 -0
  116. package/src/modules/Points/drag-point.frag +34 -0
  117. package/src/modules/Points/draw-highlighted.frag +44 -0
  118. package/src/modules/Points/draw-highlighted.vert +145 -0
  119. package/src/modules/Points/draw-points.frag +259 -0
  120. package/src/modules/Points/draw-points.vert +203 -0
  121. package/src/modules/Points/fill-sampled-points.frag +12 -0
  122. package/src/modules/Points/fill-sampled-points.vert +51 -0
  123. package/src/modules/Points/find-hovered-point.frag +15 -0
  124. package/src/modules/Points/find-hovered-point.vert +90 -0
  125. package/src/modules/Points/find-points-on-area-selection.frag +88 -0
  126. package/src/modules/Points/find-points-on-polygon-selection.frag +89 -0
  127. package/src/modules/Points/index.ts +2292 -0
  128. package/src/modules/Points/track-positions.frag +30 -0
  129. package/src/modules/Points/update-position.frag +39 -0
  130. package/src/modules/Shared/buffer.ts +39 -0
  131. package/src/modules/Shared/clear.frag +10 -0
  132. package/src/modules/Shared/quad.vert +13 -0
  133. package/src/modules/Store/index.ts +283 -0
  134. package/src/modules/Zoom/index.ts +148 -0
  135. package/src/modules/core-module.ts +28 -0
  136. package/src/stories/1. welcome.mdx +75 -0
  137. package/src/stories/2. configuration.mdx +111 -0
  138. package/src/stories/3. api-reference.mdx +591 -0
  139. package/src/stories/beginners/basic-set-up/data-gen.ts +33 -0
  140. package/src/stories/beginners/basic-set-up/index.ts +167 -0
  141. package/src/stories/beginners/basic-set-up/style.css +35 -0
  142. package/src/stories/beginners/link-hovering/data-generator.ts +198 -0
  143. package/src/stories/beginners/link-hovering/index.ts +65 -0
  144. package/src/stories/beginners/link-hovering/style.css +73 -0
  145. package/src/stories/beginners/point-labels/data.ts +73 -0
  146. package/src/stories/beginners/point-labels/index.ts +69 -0
  147. package/src/stories/beginners/point-labels/labels.ts +46 -0
  148. package/src/stories/beginners/point-labels/style.css +16 -0
  149. package/src/stories/beginners/quick-start.ts +54 -0
  150. package/src/stories/beginners/remove-points/config.ts +25 -0
  151. package/src/stories/beginners/remove-points/data-gen.ts +30 -0
  152. package/src/stories/beginners/remove-points/index.ts +96 -0
  153. package/src/stories/beginners/remove-points/style.css +31 -0
  154. package/src/stories/beginners.stories.ts +130 -0
  155. package/src/stories/clusters/polygon-selection/index.ts +52 -0
  156. package/src/stories/clusters/polygon-selection/polygon.ts +143 -0
  157. package/src/stories/clusters/polygon-selection/style.css +8 -0
  158. package/src/stories/clusters/radial.ts +24 -0
  159. package/src/stories/clusters/with-labels.ts +54 -0
  160. package/src/stories/clusters/worm.ts +40 -0
  161. package/src/stories/clusters.stories.ts +77 -0
  162. package/src/stories/create-cluster-labels.ts +50 -0
  163. package/src/stories/create-cosmos.ts +72 -0
  164. package/src/stories/create-story.ts +51 -0
  165. package/src/stories/experiments/full-mesh.ts +13 -0
  166. package/src/stories/experiments/mesh-with-holes.ts +13 -0
  167. package/src/stories/experiments.stories.ts +43 -0
  168. package/src/stories/generate-mesh-data.ts +125 -0
  169. package/src/stories/geospatial/moscow-metro-stations/index.ts +66 -0
  170. package/src/stories/geospatial/moscow-metro-stations/moscow-metro-coords.ts +1 -0
  171. package/src/stories/geospatial/moscow-metro-stations/point-colors.ts +46 -0
  172. package/src/stories/geospatial/moscow-metro-stations/style.css +30 -0
  173. package/src/stories/geospatial.stories.ts +30 -0
  174. package/src/stories/shapes/all-shapes/index.ts +73 -0
  175. package/src/stories/shapes/image-example/icons/box.png +0 -0
  176. package/src/stories/shapes/image-example/icons/lego.png +0 -0
  177. package/src/stories/shapes/image-example/icons/s.png +0 -0
  178. package/src/stories/shapes/image-example/icons/swift.png +0 -0
  179. package/src/stories/shapes/image-example/icons/toolbox.png +0 -0
  180. package/src/stories/shapes/image-example/index.ts +246 -0
  181. package/src/stories/shapes.stories.ts +37 -0
  182. package/src/stories/test-luma-migration.ts +195 -0
  183. package/src/stories/test.stories.ts +25 -0
  184. package/src/variables.ts +68 -0
  185. package/tsconfig.json +41 -0
  186. package/vite.config.ts +52 -0
package/.eslintrc ADDED
@@ -0,0 +1,147 @@
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
+ }
@@ -0,0 +1,13 @@
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.
@@ -0,0 +1,4 @@
1
+ allowRemediationCommits:
2
+ individual: true
3
+ require:
4
+ members: false
@@ -0,0 +1,54 @@
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
@@ -0,0 +1,26 @@
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;
@@ -0,0 +1 @@
1
+ <link rel="icon" type="image/png" href="https://cosmograph.app/img/favicon.png" />
@@ -0,0 +1,14 @@
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
+ });
@@ -0,0 +1,29 @@
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;
@@ -0,0 +1,3 @@
1
+ tr:nth-of-type(2n) {
2
+ background-color: #1e2326;
3
+ }
package/CHARTER.md ADDED
@@ -0,0 +1,69 @@
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.
@@ -0,0 +1,178 @@
1
+ # Code of Conduct
2
+
3
+ Cosmos, as member project of the OpenJS Foundation, use [Contributor Covenant
4
+ v2.0](https://contributor-covenant.org/version/2/0/code_of_conduct) as their
5
+ code of conduct. The full text is included
6
+ [below](#contributor-covenant-code-of-conduct) in English, and translations are
7
+ available from the Contributor Covenant organisation:
8
+
9
+ - [contributor-covenant.org/translations](https://www.contributor-covenant.org/translations)
10
+ - [github.com/ContributorCovenant](https://github.com/ContributorCovenant/contributor_covenant/tree/release/content/version/2/0)
11
+
12
+ Refer to the sections on reporting and escalation in this document for the
13
+ specific emails that can be used to report and escalate issues.
14
+
15
+ ## Reporting
16
+
17
+ ### Project Spaces
18
+
19
+ For reporting issues in spaces related to cosmos.gl please use the email
20
+ `cosmosgl@rokotyan.com`. Cosmos.gl handles CoC issues
21
+ related to the spaces that it maintains. Projects maintainers commit to:
22
+
23
+ - maintain the confidentiality with regard to the reporter of an incident
24
+ - to participate in the path for escalation as outlined in the section on
25
+ Escalation when required.
26
+
27
+ ### Foundation Spaces
28
+
29
+ For reporting issues in spaces managed by the OpenJS Foundation, for example,
30
+ repositories within the OpenJS organization, use the email
31
+ `report@lists.openjsf.org`. The Cross Project Council (CPC) is responsible for
32
+ managing these reports and commits to:
33
+
34
+ - maintain the confidentiality with regard to the reporter of an incident
35
+ - to participate in the path for escalation as outlined in the section on
36
+ Escalation when required.
37
+
38
+ ## Escalation
39
+
40
+ The OpenJS Foundation maintains a Code of Conduct Panel (CoCP). This is a
41
+ foundation-wide team established to manage escalation when a reporter believes
42
+ that a report to a member project or the CPC has not been properly handled. In
43
+ order to escalate to the CoCP send an email to
44
+ `coc-escalation@lists.openjsf.org`.
45
+
46
+ For more information, refer to the full [Code of Conduct governance
47
+ document](https://github.com/openjs-foundation/cross-project-council/blob/HEAD/CODE_OF_CONDUCT.md).
48
+
49
+ ---
50
+
51
+ ## Contributor Covenant Code of Conduct v2.0
52
+
53
+ ### Our Pledge
54
+
55
+ We as members, contributors, and leaders pledge to make participation in our
56
+ community a harassment-free experience for everyone, regardless of age, body
57
+ size, visible or invisible disability, ethnicity, sex characteristics, gender
58
+ identity and expression, level of experience, education, socio-economic status,
59
+ nationality, personal appearance, race, religion, or sexual identity and
60
+ orientation.
61
+
62
+ We pledge to act and interact in ways that contribute to an open, welcoming,
63
+ diverse, inclusive, and healthy community.
64
+
65
+ ### Our Standards
66
+
67
+ Examples of behavior that contributes to a positive environment for our
68
+ community include:
69
+
70
+ * Demonstrating empathy and kindness toward other people
71
+ * Being respectful of differing opinions, viewpoints, and experiences
72
+ * Giving and gracefully accepting constructive feedback
73
+ * Accepting responsibility and apologizing to those affected by our mistakes,
74
+ and learning from the experience
75
+ * Focusing on what is best not just for us as individuals, but for the overall
76
+ community
77
+
78
+ Examples of unacceptable behavior include:
79
+
80
+ * The use of sexualized language or imagery, and sexual attention or advances of
81
+ any kind
82
+ * Trolling, insulting or derogatory comments, and personal or political attacks
83
+ * Public or private harassment
84
+ * Publishing others' private information, such as a physical or email address,
85
+ without their explicit permission
86
+ * Other conduct which could reasonably be considered inappropriate in a
87
+ professional setting
88
+
89
+ ### Enforcement Responsibilities
90
+
91
+ Community leaders are responsible for clarifying and enforcing our standards of
92
+ acceptable behavior and will take appropriate and fair corrective action in
93
+ response to any behavior that they deem inappropriate, threatening, offensive,
94
+ or harmful.
95
+
96
+ Community leaders have the right and responsibility to remove, edit, or reject
97
+ comments, commits, code, wiki edits, issues, and other contributions that are
98
+ not aligned to this Code of Conduct, and will communicate reasons for moderation
99
+ decisions when appropriate.
100
+
101
+ ### Scope
102
+
103
+ This Code of Conduct applies within all community spaces, and also applies when
104
+ an individual is officially representing the community in public spaces.
105
+ Examples of representing our community include using an official e-mail address,
106
+ posting via an official social media account, or acting as an appointed
107
+ representative at an online or offline event.
108
+
109
+ ### Enforcement
110
+
111
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be
112
+ reported to the community leaders responsible for enforcement at the email
113
+ addresses listed above in the [Reporting](#reporting) and
114
+ [Escalation](#escalation) sections. All complaints will be reviewed and
115
+ investigated promptly and fairly.
116
+
117
+ All community leaders are obligated to respect the privacy and security of the
118
+ reporter of any incident.
119
+
120
+ ### Enforcement Guidelines
121
+
122
+ Community leaders will follow these Community Impact Guidelines in determining
123
+ the consequences for any action they deem in violation of this Code of Conduct:
124
+
125
+ #### 1. Correction
126
+
127
+ **Community Impact**: Use of inappropriate language or other behavior deemed
128
+ unprofessional or unwelcome in the community.
129
+
130
+ **Consequence**: A private, written warning from community leaders, providing
131
+ clarity around the nature of the violation and an explanation of why the
132
+ behavior was inappropriate. A public apology may be requested.
133
+
134
+ #### 2. Warning
135
+
136
+ **Community Impact**: A violation through a single incident or series of
137
+ actions.
138
+
139
+ **Consequence**: A warning with consequences for continued behavior. No
140
+ interaction with the people involved, including unsolicited interaction with
141
+ those enforcing the Code of Conduct, for a specified period of time. This
142
+ includes avoiding interactions in community spaces as well as external channels
143
+ like social media. Violating these terms may lead to a temporary or permanent
144
+ ban.
145
+
146
+ #### 3. Temporary Ban
147
+
148
+ **Community Impact**: A serious violation of community standards, including
149
+ sustained inappropriate behavior.
150
+
151
+ **Consequence**: A temporary ban from any sort of interaction or public
152
+ communication with the community for a specified period of time. No public or
153
+ private interaction with the people involved, including unsolicited interaction
154
+ with those enforcing the Code of Conduct, is allowed during this period.
155
+ Violating these terms may lead to a permanent ban.
156
+
157
+ #### 4. Permanent Ban
158
+
159
+ **Community Impact**: Demonstrating a pattern of violation of community
160
+ standards, including sustained inappropriate behavior, harassment of an
161
+ individual, or aggression toward or disparagement of classes of individuals.
162
+
163
+ **Consequence**: A permanent ban from any sort of public interaction within the
164
+ project community.
165
+
166
+ ### Attribution
167
+
168
+ This Code of Conduct is adapted from the [Contributor
169
+ Covenant](https://www.contributor-covenant.org), version 2.0, available at
170
+ [contributor-covenant.org/version/2/0/code_of_conduct](https://www.contributor-covenant.org/version/2/0/code_of_conduct).
171
+
172
+ Community Impact Guidelines were inspired by [Mozilla's code of conduct
173
+ enforcement ladder](https://github.com/mozilla/diversity).
174
+
175
+ For answers to common questions about this code of conduct, see the FAQ at
176
+ [contributor-covenant.org/faq](https://www.contributor-covenant.org/faq).
177
+ Translations are available at
178
+ [contributor-covenant.org/translations](https://www.contributor-covenant.org/translations).
@@ -0,0 +1,22 @@
1
+ # Contributing to _Cosmos_
2
+ We want to make contributing to this project as easy and transparent as possible.
3
+
4
+ ## Code of Conduct
5
+ cosmos.gl has a Code of Conduct that we expect project participants to adhere
6
+ to. Please read [the full text](https://github.com/cosmos.gl/graph/CODE_OF_CONDUCT.md) so that you can understand
7
+ what actions will and will not be tolerated.
8
+
9
+ ## Our Development Process
10
+ We use Storybook to simplify the development process. You can start it by running `npm run storybook` in the root directory.
11
+ If you've added a new feature, changed the configuration or public methods, please add a new example with its source code to Storybook if applicable and suggest changes to the docs.
12
+
13
+ ## Pull Requests
14
+ We actively welcome pull requests. If you want to submit one, please follow the following process:
15
+
16
+ 1. Fork the repo and create your branch from `main`;
17
+ 2. Code;
18
+ 3. Make sure the project lints and builds after your changes;
19
+ 4. Submit your PR!
20
+
21
+ ## License
22
+ By contributing to _Cosmos_, you agree that your contributions will be licensed its MIT license.
package/GOVERNANCE.md ADDED
@@ -0,0 +1,21 @@
1
+ # cosmos.gl Governance Guidelines
2
+
3
+ The [TSC Charter](./CHARTER.md) governs the operations of the TSC. All changes to the Charter need approval by the OpenJS Foundation Cross-Project Council (CPC).
4
+
5
+ The TSC oversees all technical development in the cosmos.gl project, as long as it follows policies set by CPC, including:
6
+ - Setting release dates.
7
+ - Release quality standards.
8
+ - Technical direction.
9
+ - Project governance and process.
10
+ - GitHub repository hosting.
11
+ - Conduct guidelines.
12
+ - Maintaining the list of additional collaborators.
13
+ - Development process and any coding standards.
14
+ - Mediating technical conflicts between collaborators or foundation projects.
15
+
16
+ The TSC will define cosmos.gl project’s release vehicles.
17
+
18
+ ### **Project Operations & Management**
19
+ The TSC will establish and maintain a development process for the cosmos.gl project. The development process will establish guidelines for how the developers and community will operate. It will, for example, establish appropriate timelines for TSC review (e.g. agenda items must be published at least a certain number of hours in advance of a TSC meeting).
20
+
21
+ The TSC and entire technical community will follow any processes as may be specified by the OpenJS Foundation Board relating to the intake and license compliance review of contributions, including the OpenJS Foundation IP Policy.