@fusion.dev/helix-graph 0.206.0 → 0.207.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.
@@ -93,10 +93,7 @@ export const connectGraph = (frame, driver, options = {}) => {
93
93
  current = looksOf({
94
94
  along: reached?.along,
95
95
  colors,
96
- font: getComputedStyle(frame)
97
- .fontFamily.split(',')[0]
98
- ?.trim()
99
- .replace(/^["']|["']$/g, ''),
96
+ font: getComputedStyle(frame).fontFamily.trim(),
100
97
  groups: nodes.flatMap((node) => (node.group === undefined ? [] : [node.group])),
101
98
  keyed: graph.keyed?.id,
102
99
  links: links.length,
@@ -105,7 +105,7 @@ export interface LinkLook {
105
105
  export interface GraphLooks {
106
106
  /** A note's own color, its tone's or its group's, whatever the selection fades. */
107
107
  colorOf(id: string): string;
108
- /** The typeface the labels are drawn in: the first of the frame's own. */
108
+ /** The typefaces the labels are drawn in: the frame's own font stack, as CSS writes it. */
109
109
  font: string;
110
110
  /** What the drawing is laid on, which a name is ringed in so it reads over the links. */
111
111
  ground: string;
@@ -1349,13 +1349,16 @@ export const threeDriver = (container, options = {}) => {
1349
1349
  wake();
1350
1350
  })
1351
1351
  .catch((cause) => {
1352
+ if (done) {
1353
+ return;
1354
+ }
1352
1355
  reportRuntime({
1353
1356
  detail: cause,
1354
1357
  kind: 'missing-layout',
1355
1358
  level: 'error',
1356
1359
  message: 'The three.js driver could not load d3-force-3d to lay out the notes. Install d3-force-3d alongside @fusion.dev/helix-graph.',
1357
1360
  });
1358
- if (!done && !stopped) {
1361
+ if (!stopped) {
1359
1362
  done = true;
1360
1363
  placed(new Map(nodes.map((node) => [node.id, { x: node.x, y: node.y, z: node.z }])));
1361
1364
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@fusion.dev/helix-graph",
3
3
  "description": "Connects the Helix Graph frame to a graph renderer: Sigma.js, cosmos.gl, three.js, or a driver of your own.",
4
- "version": "0.206.0",
4
+ "version": "0.207.1",
5
5
  "license": "MIT",
6
6
  "author": "Ross Sheppard <ross.sheppard@fusion.dev>",
7
7
  "repository": {
@@ -29,6 +29,7 @@
29
29
  "types": "./dist/model/index.d.ts",
30
30
  "default": "./dist/model/index.js"
31
31
  },
32
+ "./package.json": "./package.json",
32
33
  "./shapes": {
33
34
  "types": "./dist/shapes/index.d.ts",
34
35
  "default": "./dist/shapes/index.js"
@@ -59,12 +60,12 @@
59
60
  },
60
61
  "bugs": "https://github.com/project-fusion/fusion/issues",
61
62
  "dependencies": {
62
- "@fusion.dev/helix-core": "0.206.0"
63
+ "@fusion.dev/helix-core": "0.207.1"
63
64
  },
64
65
  "devDependencies": {
65
66
  "@cosmos.gl/graph": "^3.4.2",
66
- "@fusion.dev/helix-headless": "0.206.0",
67
- "@fusion.dev/helix-testing": "0.206.0",
67
+ "@fusion.dev/helix-headless": "0.207.1",
68
+ "@fusion.dev/helix-testing": "0.207.1",
68
69
  "@types/bun": "^1.4.2",
69
70
  "@types/three": "^0.186.0",
70
71
  "d3-force-3d": "^3.0.6",