@multiplatform.one/node-graph 7.88.3 → 7.88.5

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 (65) hide show
  1. package/dist/cjs/edges/GraphEdge.cjs +27 -2
  2. package/dist/cjs/edges/GraphEdge.native.js +29 -5
  3. package/dist/cjs/edges/GraphEdge.native.js.map +1 -1
  4. package/dist/cjs/edges/edgeStyle.cjs +32 -7
  5. package/dist/cjs/edges/edgeStyle.native.js +34 -6
  6. package/dist/cjs/edges/edgeStyle.native.js.map +1 -1
  7. package/dist/cjs/nodes/GraphNode.cjs +15 -5
  8. package/dist/cjs/nodes/GraphNode.native.js +15 -5
  9. package/dist/cjs/nodes/GraphNode.native.js.map +1 -1
  10. package/dist/cjs/react-flow/flowAdapter.cjs +0 -5
  11. package/dist/cjs/react-flow/flowAdapter.native.js +0 -5
  12. package/dist/cjs/react-flow/flowAdapter.native.js.map +1 -1
  13. package/dist/esm/edges/GraphEdge.mjs +29 -4
  14. package/dist/esm/edges/GraphEdge.mjs.map +1 -1
  15. package/dist/esm/edges/GraphEdge.native.js +31 -7
  16. package/dist/esm/edges/GraphEdge.native.js.map +1 -1
  17. package/dist/esm/edges/edgeStyle.mjs +30 -8
  18. package/dist/esm/edges/edgeStyle.mjs.map +1 -1
  19. package/dist/esm/edges/edgeStyle.native.js +32 -7
  20. package/dist/esm/edges/edgeStyle.native.js.map +1 -1
  21. package/dist/esm/nodes/GraphNode.mjs +17 -7
  22. package/dist/esm/nodes/GraphNode.mjs.map +1 -1
  23. package/dist/esm/nodes/GraphNode.native.js +17 -7
  24. package/dist/esm/nodes/GraphNode.native.js.map +1 -1
  25. package/dist/esm/react-flow/flowAdapter.mjs +0 -5
  26. package/dist/esm/react-flow/flowAdapter.mjs.map +1 -1
  27. package/dist/esm/react-flow/flowAdapter.native.js +0 -5
  28. package/dist/esm/react-flow/flowAdapter.native.js.map +1 -1
  29. package/dist/jsx/edges/GraphEdge.mjs +29 -4
  30. package/dist/jsx/edges/GraphEdge.mjs.map +1 -1
  31. package/dist/jsx/edges/GraphEdge.native.js +29 -5
  32. package/dist/jsx/edges/GraphEdge.native.js.map +1 -1
  33. package/dist/jsx/edges/edgeStyle.mjs +30 -8
  34. package/dist/jsx/edges/edgeStyle.mjs.map +1 -1
  35. package/dist/jsx/edges/edgeStyle.native.js +34 -6
  36. package/dist/jsx/edges/edgeStyle.native.js.map +1 -1
  37. package/dist/jsx/nodes/GraphNode.mjs +17 -7
  38. package/dist/jsx/nodes/GraphNode.mjs.map +1 -1
  39. package/dist/jsx/nodes/GraphNode.native.js +15 -5
  40. package/dist/jsx/nodes/GraphNode.native.js.map +1 -1
  41. package/dist/jsx/react-flow/flowAdapter.mjs +0 -5
  42. package/dist/jsx/react-flow/flowAdapter.mjs.map +1 -1
  43. package/dist/jsx/react-flow/flowAdapter.native.js +0 -5
  44. package/dist/jsx/react-flow/flowAdapter.native.js.map +1 -1
  45. package/package.json +7 -7
  46. package/src/dom/NodeGraphDomShell.ts +40 -41
  47. package/src/dom/domEntry.spec.ts +22 -11
  48. package/src/dom/importGraph.spec.ts +6 -7
  49. package/src/edges/GraphEdge.tsx +37 -6
  50. package/src/edges/edgeStyle.spec.ts +73 -13
  51. package/src/edges/edgeStyle.ts +68 -15
  52. package/src/nodes/GraphNode.tsx +27 -15
  53. package/src/nodes/Overview.stories.spec.tsx +35 -0
  54. package/src/nodes/Overview.stories.tsx +26 -11
  55. package/src/nodes/arrowheadPlacement.spec.tsx +109 -0
  56. package/src/react-flow/flowAdapter.ts +4 -7
  57. package/src/react-flow/useGraphController.spec.tsx +6 -6
  58. package/types/dom/NodeGraphDomShell.d.ts +10 -3
  59. package/types/dom/NodeGraphDomShell.d.ts.map +1 -1
  60. package/types/edges/GraphEdge.d.ts.map +1 -1
  61. package/types/edges/edgeStyle.d.ts +41 -9
  62. package/types/edges/edgeStyle.d.ts.map +1 -1
  63. package/types/nodes/GraphNode.d.ts.map +1 -1
  64. package/types/react-flow/flowAdapter.d.ts +4 -5
  65. package/types/react-flow/flowAdapter.d.ts.map +1 -1
@@ -17,6 +17,12 @@
17
17
  * The readout above each canvas prints React Flow's OWN measured handle
18
18
  * positions and node height for one node, so the check is a readable number on
19
19
  * both sides of the crossover rather than a squint at a pixel.
20
+ *
21
+ * On device the canvas is the same `NodeGraph` inside its WebView, and the
22
+ * readout and React Flow chrome stay on the web: they read React Flow's store,
23
+ * which lives on the other side of the bridge. Mounting `NodeGraphWeb` here
24
+ * directly put its `<style>` element on Hermes and took the story down
25
+ * (FZ-9001).
20
26
  */
21
27
 
22
28
  import { Switch } from "@multiplatform.one/forms";
@@ -27,7 +33,8 @@ import type { BuiltinEdgeData } from "../edges/edgeKinds";
27
33
  import type { GraphDocument } from "../model/index";
28
34
  import { demoGraphSchema } from "../react-flow/demoNodeBody";
29
35
  import type { DemoNodeData } from "../react-flow/fixtures";
30
- import { NodeGraphWeb } from "../react-flow/NodeGraphWeb";
36
+ import { hasDomRealm } from "../native/DomOnlyStory";
37
+ import { NodeGraph } from "../NodeGraph";
31
38
  import { Background, Controls, MiniMap, useStore } from "../react-flow/xy";
32
39
  import { defaultOverviewZoom, lodForZoom } from "./lod";
33
40
  import { SizableText } from "@multiplatform.one/components";
@@ -171,12 +178,16 @@ export const main = {
171
178
  <Surface size="$4">
172
179
  <YStack gap="$3" padding="$3">
173
180
  <View width="100%" height={620}>
174
- <NodeGraphWeb schema={schema} defaultDocument={bigDoc}>
175
- <Readout nodeId="n1" />
176
- <Background />
177
- <Controls />
178
- <MiniMap pannable zoomable />
179
- </NodeGraphWeb>
181
+ <NodeGraph schema={schema} defaultDocument={bigDoc}>
182
+ {hasDomRealm ? (
183
+ <>
184
+ <Readout nodeId="n1" />
185
+ <Background />
186
+ <Controls />
187
+ <MiniMap pannable zoomable />
188
+ </>
189
+ ) : null}
190
+ </NodeGraph>
180
191
  </View>
181
192
  <SizableText size="$2" opacity={0.7}>
182
193
  500 nodes, 333 edges. Zoom through 0.35 with the controls or a pinch and watch the
@@ -211,14 +222,18 @@ export const crossover = {
211
222
  label={`overviewZoom 1 (everything is overview) instead of ${defaultOverviewZoom}`}
212
223
  />
213
224
  <View width="100%" height={560}>
214
- <NodeGraphWeb
225
+ <NodeGraph
215
226
  schema={schema}
216
227
  defaultDocument={bigDoc}
217
228
  overviewZoom={high ? 1 : defaultOverviewZoom}
218
229
  >
219
- <Readout nodeId="n1" />
220
- <Controls />
221
- </NodeGraphWeb>
230
+ {hasDomRealm ? (
231
+ <>
232
+ <Readout nodeId="n1" />
233
+ <Controls />
234
+ </>
235
+ ) : null}
236
+ </NodeGraph>
222
237
  </View>
223
238
  <SizableText size="$2" opacity={0.7}>
224
239
  Flip the switch and read the height. The node fades to a plain box and the number does
@@ -0,0 +1,109 @@
1
+ /**
2
+ * FZ-9012. Every arrowhead ends at the target port's outer edge, outside its
3
+ * ring AND outside the node body.
4
+ *
5
+ * React Flow ends a path at the handle box's outer edge (`getHandlePosition`,
6
+ * `center: false`), and `GraphEdge` draws the head back from that point
7
+ * (`edgeArrowhead`). Edges paint UNDER nodes, so a head that lands inside the
8
+ * frame is painted over by the node's own surface. That is what happened while
9
+ * the port rows sat inside the frame's padding: the disc centred `padding` px
10
+ * in from the edge, and the head fell on the node body.
11
+ *
12
+ * happy-dom does no layout, so the port centre is summed from the emitted
13
+ * declarations: the frame's left border and padding, plus the port anchor's
14
+ * `left` offset. `handleGeometry.portGeometry` gives the handle box around it.
15
+ */
16
+
17
+ import { panelPaddingPx, Preset, Surface, useResolvedKnobs } from "@multiplatform.one/theme";
18
+ import { renderWithProviders } from "@multiplatform.one/test-utils";
19
+ import { cleanup } from "@testing-library/react";
20
+ import { afterEach, describe, expect, it, vi } from "vitest";
21
+ import { declarationFor } from "../../tests/styles";
22
+ import { edgeArrowheadLength, edgeStrokeWidth } from "../edges/edgeStyle";
23
+ import type { GraphNodePort } from "./nodeMeasure";
24
+ import { paintedPortSizePx, portGeometry } from "./handleGeometry";
25
+
26
+ vi.mock("../react-flow/xy", async (importOriginal) => {
27
+ const actual = await importOriginal<typeof import("../react-flow/xy")>();
28
+ return { ...actual, useUpdateNodeInternals: () => vi.fn() };
29
+ });
30
+
31
+ const { GraphNode } = await import("./GraphNode");
32
+
33
+ afterEach(cleanup);
34
+
35
+ const inPort: GraphNodePort[] = [{ id: "in", side: "left", direction: "in", label: "rows" }];
36
+
37
+ function renderNode() {
38
+ const captured = { border: 0, padding: "" };
39
+ function Probe() {
40
+ const { knobProps } = useResolvedKnobs({ component: "GraphNode" });
41
+ captured.border = Number(knobProps.surface.borderWidth ?? 0);
42
+ captured.padding = knobProps.panelPadding.padding;
43
+ return null;
44
+ }
45
+ const { container } = renderWithProviders(
46
+ <Preset cascade={false}>
47
+ <Surface size="$true">
48
+ <Probe />
49
+ <GraphNode
50
+ id="n1"
51
+ title="Sink"
52
+ ports={inPort}
53
+ renderPort={(port) => <span data-graph-port={port.id} />}
54
+ />
55
+ </Surface>
56
+ </Preset>,
57
+ );
58
+ const frame = container.querySelector("[data-graph-node]") as HTMLElement;
59
+ const anchor = container.querySelector('[data-graph-node-port-anchor="left"]');
60
+ const px = (declaration: string | undefined): number => {
61
+ if (!declaration) return 0;
62
+ const token = declaration.match(/^var\(--(?:t-)?space-(\d+)\)$/);
63
+ if (token) {
64
+ expect(`$${token[1]}`, "the frame pads by the panelPadding role").toBe(captured.padding);
65
+ return panelPaddingPx();
66
+ }
67
+ return Number.parseFloat(declaration);
68
+ };
69
+ return {
70
+ border: captured.border,
71
+ framePad: px(declarationFor(frame, "padding-left")),
72
+ anchorLeft: anchor ? px(declarationFor(anchor, "left")) : 0,
73
+ };
74
+ }
75
+
76
+ describe("FZ-9012: the arrowhead lands outside the port ring and the node body", () => {
77
+ it("centres a port on the frame's padding edge (design §7.1 H6)", () => {
78
+ const { framePad, anchorLeft } = renderNode();
79
+ expect(framePad, "the frame pads its content").toBeGreaterThan(0);
80
+ expect(framePad + anchorLeft).toBe(0);
81
+ });
82
+
83
+ it("keeps the whole head off the node body, at every port size and edge stroke", () => {
84
+ const { border, framePad, anchorLeft } = renderNode();
85
+ const centreX = border + framePad + anchorLeft;
86
+
87
+ for (const painted of Object.values(paintedPortSizePx)) {
88
+ const { box } = portGeometry({
89
+ painted,
90
+ hit: painted,
91
+ side: "left",
92
+ nodeWidth: 160,
93
+ nodeHeight: 80,
94
+ offset: 40,
95
+ });
96
+ // The path's end, and so the head's tip, for a left target: the handle
97
+ // box's left edge, which is the outside of the painted ring.
98
+ const tip = centreX + box.x;
99
+ for (const stop of ["none", "small", "medium", "large"] as const) {
100
+ for (const weight of ["value", "control"] as const) {
101
+ const tail = tip - edgeArrowheadLength(edgeStrokeWidth(stop, weight));
102
+ const label = `painted ${painted}, ${stop} ${weight}`;
103
+ expect(tip, `${label}: the tip lands on the node body`).toBeLessThan(0);
104
+ expect(tail, `${label}: the head runs into the ring`).toBeLessThan(tip);
105
+ }
106
+ }
107
+ }
108
+ });
109
+ });
@@ -2,17 +2,16 @@
2
2
  * Document → React Flow arrays. Pure, so the mapping can be asserted without
3
3
  * mounting anything.
4
4
  *
5
- * Two things happen here that cannot happen later:
5
+ * One thing happens here that cannot happen later:
6
6
  *
7
7
  * - **Size seeding (design §5).** Every node carries `width` / `height` from
8
8
  * `graphNodeMeasure` BEFORE first paint, so React Flow's per-node
9
9
  * `ResizeObserver` CORRECTS a measurement rather than discovering one. On a
10
10
  * 200-node knob flip that is the difference between 200 observer callbacks
11
11
  * resizing the world and 200 confirming it.
12
- * - **The edge marker.** `markerEnd` on the edge OBJECT, because React Flow
13
- * builds its `<marker>` defs from the edges array. Choosing it inside the
14
- * edge component is too late — measured in task 1.10, where the arrowheads
15
- * painted and the lines did not.
12
+ *
13
+ * The edge carries no `markerEnd`. React Flow would paint that head in its own
14
+ * grey; `GraphEdge` draws it in the edge's stroke instead (FZ-9012).
16
15
  */
17
16
 
18
17
  import type {
@@ -26,7 +25,6 @@ import type {
26
25
  } from "../model/index";
27
26
  import { nodeKindSpec, resolvePorts } from "../model/index";
28
27
  import { graphEdgeType } from "../edges/GraphEdge";
29
- import { edgeMarkerEnd } from "../edges/edgeStyle";
30
28
  import type { GraphNodeSizeKnob } from "../nodes/nodeMeasure";
31
29
  import { graphNodeMeasure } from "../nodes/nodeMeasure";
32
30
  import type { Edge, Node } from "./xy";
@@ -134,7 +132,6 @@ function flowEdge<N extends NodeKindDefs, E extends EdgeKindDefs>(
134
132
  sourceHandle: edge.source.port,
135
133
  target: edge.target.node,
136
134
  targetHandle: edge.target.port,
137
- markerEnd: edgeMarkerEnd({ kind: edge.kind, appearance }),
138
135
  data: { kind: edge.kind, appearance, label: edge.label },
139
136
  };
140
137
  }
@@ -584,9 +584,9 @@ describe("the React Flow arrays", () => {
584
584
  expect(edge.target).toBe("b");
585
585
  expect(edge.targetHandle).toBe("in");
586
586
  expect((edge.data as { kind?: string }).kind).toBe("flow");
587
- // The marker rides on the edge object: React Flow builds its defs from the
588
- // edges array, so choosing it in the component is too late.
589
- expect(edge.markerEnd).toBeDefined();
587
+ // No React Flow marker: its defs paint in a grey no kind uses, so
588
+ // `GraphEdge` draws the head in the edge's own stroke (FZ-9012).
589
+ expect(edge.markerEnd).toBeUndefined();
590
590
  });
591
591
 
592
592
  it("passes each node its resolved ports, not the raw kind", () => {
@@ -670,9 +670,9 @@ describe("relayout — task 4.4", () => {
670
670
  result.current.undo();
671
671
  });
672
672
 
673
- expect(result.current.document.nodes.map((node) => ({ id: node.id, ...node.position }))).toEqual(
674
- before.nodes.map((node) => ({ id: node.id, ...node.position })),
675
- );
673
+ expect(
674
+ result.current.document.nodes.map((node) => ({ id: node.id, ...node.position })),
675
+ ).toEqual(before.nodes.map((node) => ({ id: node.id, ...node.position })));
676
676
  expect(result.current.canUndo).toBe(false);
677
677
  });
678
678
 
@@ -15,9 +15,16 @@
15
15
  * top-level dependency happens before any error boundary exists. So the shell
16
16
  * imports nothing of ours at the top, stamps how far boot got on a global as
17
17
  * early as the module body allows, and only then reaches for the real tree
18
- * through a dynamic `import()` inside a try/catch. Under Metro that becomes a
19
- * `require`, so a module-eval throw is catchable and reportable instead of
20
- * fatal.
18
+ * through a `require` inside a try/catch, so a module-eval throw is catchable
19
+ * and reportable instead of fatal.
20
+ *
21
+ * A `require`, never an `import()` (FZ-9001). In a production export Metro
22
+ * splits an `import()` into a lazy chunk under `_expo/static/js/web/`, and an
23
+ * OTA update stores its assets flat in `.expo-internal/`, so on the iOS Kitchen
24
+ * Sink the chunk's URL pointed at a file that was never there and every canvas
25
+ * died with "Loading module ... NodeGraphDomInner-<hash>.js failed". A
26
+ * `require` puts the inner tree in the entry script, which is the one file the
27
+ * update store does carry.
21
28
  *
22
29
  * Two consequences worth naming, because both look like mistakes:
23
30
  *
@@ -1 +1 @@
1
- {"version":3,"file":"NodeGraphDomShell.d.ts","sourceRoot":"","sources":["../../src/dom/NodeGraphDomShell.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8CG;AAEH,OAAO,EAAE,SAAS,EAAuD,MAAM,OAAO,CAAC;AAEvF,OAAO,KAAK,EAAiB,SAAS,EAAE,SAAS,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AACtE,OAAO,KAAK,EAAwB,QAAQ,EAAE,MAAM,UAAU,CAAC;AAC/D,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAC;AAC1D,OAAO,KAAK,EAAE,YAAY,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9E,OAAO,KAAK,EAAE,gBAAgB,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAClG,OAAO,KAAK,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,QAAQ,CAAC;AAmB3D;;;;GAIG;AACH,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;IAC5B,0EAA0E;IAC1E,QAAQ,CAAC,aAAa,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cAAc,EAAE,SAAS,CAAC,gBAAgB,CAAC,CAAC;IACrD,QAAQ,CAAC,cAAc,EAAE,SAAS,CAAC,gBAAgB,CAAC,CAAC;CACtD;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAC3B,IAAI,EAAE,YAAY,EAClB,QAAQ,EAAE,YAAY,GACrB,CAAC,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAgC7C;AAED;;;;;;;;;GASG;AACH,wBAAgB,YAAY,IAAI;IAAE,WAAW,EAAE,WAAW,CAAC;IAAC,SAAS,EAAE,SAAS,CAAA;CAAE,CAIjF;AA0BD,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,SAAS,2CAgElD;AA+BD,eAAO,MAAM,SAAS,gEAA2B,CAAC;AAElD,qDAAqD;AACrD,eAAO,MAAM,cAAc;;CAA0C,CAAC"}
@@ -5,8 +5,11 @@
5
5
  * table can be asserted without mounting anything, which is what makes
6
6
  * `edgeStyle.spec.ts` a cheap test rather than a render.
7
7
  *
8
- * Stroke width is NOT per kind (design §4.4's last line): it comes from the
9
- * `borderWidth` knob, so one flip moves every edge on the canvas. Task 1.7's
8
+ * Stroke width comes from the `borderWidth` knob, so one flip moves every edge
9
+ * on the canvas. The kind picks only a WEIGHT on top of it: control edges
10
+ * (flow, error) stroke `controlEdgeWeight` times the value edges (data,
11
+ * conditional), because a one-step shade apart the two read as one line
12
+ * (FZ-9012). Task 1.7's
10
13
  * `theme/graphVars.ts` reads `edgeStrokeWidth` from here rather than repeating
11
14
  * the ladder — §11's borderWidth row cites that file, and one ladder in two
12
15
  * places is one ladder that can drift.
@@ -15,6 +18,7 @@ import type { Animation, BorderWidth } from "@multiplatform.one/theme";
15
18
  import type { BuiltinEdgeKind } from "./edgeKinds";
16
19
  export type EdgePathKind = "bezier" | "smoothstep" | "step" | "straight";
17
20
  export type EdgeMarker = "arrow" | "arrowclosed";
21
+ export type EdgeWeight = "control" | "value";
18
22
  export interface EdgeAppearance {
19
23
  readonly path: EdgePathKind;
20
24
  /** A token expression. A hex literal here fails `edgeStyle.spec.ts`. */
@@ -22,9 +26,16 @@ export interface EdgeAppearance {
22
26
  /** SVG `stroke-dasharray`. Absent means a solid line. */
23
27
  readonly dash?: string;
24
28
  readonly marker: EdgeMarker;
29
+ readonly weight: EdgeWeight;
25
30
  }
26
31
  /** Design §4.4's table, verbatim. */
27
32
  export declare const edgeAppearances: Readonly<Record<BuiltinEdgeKind, EdgeAppearance>>;
33
+ /**
34
+ * How much heavier a control edge strokes than a value edge, at every
35
+ * `borderWidth` stop. A ratio rather than a second ladder, so the knob still
36
+ * moves both together and the gap between them never closes.
37
+ */
38
+ export declare const controlEdgeWeight = 1.5;
28
39
  /**
29
40
  * §11: an edge is a stroke, not a border, and a 0-width edge erases the graph's
30
41
  * primary information. The theme's own border widths are 0 / hairline / 1 / 2
@@ -35,17 +46,17 @@ export declare const edgeAppearances: Readonly<Record<BuiltinEdgeKind, EdgeAppea
35
46
  * not a divider.
36
47
  */
37
48
  export declare const edgeStrokeWidths: Readonly<Record<BorderWidth, number>>;
38
- export declare function edgeStrokeWidth(borderWidth: BorderWidth): number;
49
+ export declare function edgeStrokeWidth(borderWidth: BorderWidth, weight?: EdgeWeight): number;
39
50
  /** The keyframes live in `css/graph.css`, which lands with task 1.7. */
40
51
  export declare const dashAnimation = "mp-graph-dash 0.5s linear infinite";
41
52
  /**
42
- * The marker goes on the EDGE OBJECT, not on the rendered path.
53
+ * The marker TYPE for an edge object, for a consumer that builds React Flow
54
+ * edges and lets React Flow draw the head.
43
55
  *
44
- * React Flow builds its `<marker>` defs from the edges array and hands the
45
- * component an already-resolved `url(#...)` string, so `BaseEdge`'s `markerEnd`
46
- * is a string and cannot take a type. Measured against
47
- * `@xyflow/react` 12.11.5's `BaseEdgeProps`. So whoever BUILDS the edges — the
48
- * controller in task 1.11, or a story — reads the marker from here.
56
+ * The house canvas does not: React Flow paints its own `<marker>` defs in
57
+ * `defaultMarkerColor`, a grey that matches no edge kind, so `GraphEdge` draws
58
+ * the head itself from `resolveEdgeStyle(...).marker` in the edge's own stroke
59
+ * (`edgeArrowhead` below), and `flowAdapter` leaves `markerEnd` unset.
49
60
  */
50
61
  export declare function edgeMarkerEnd(input: {
51
62
  readonly kind: string;
@@ -53,6 +64,27 @@ export declare function edgeMarkerEnd(input: {
53
64
  }): {
54
65
  readonly type: EdgeMarker;
55
66
  };
67
+ /**
68
+ * The arrowhead `GraphEdge` draws, in marker units. `markerUnits` is
69
+ * `strokeWidth`, so the head scales with the edge and a control edge's head is
70
+ * heavier with its line.
71
+ *
72
+ * The tip is the marker's origin (`refX` / `refY` 0) and every point runs back
73
+ * from it, so the head ends exactly where the path ends: React Flow ends a path
74
+ * at the handle box's outer edge, which is the outside of the port's ring.
75
+ */
76
+ export declare const edgeArrowhead: {
77
+ readonly viewBox: "-10 -10 20 20";
78
+ readonly size: 12.5;
79
+ readonly refX: 0;
80
+ readonly refY: 0;
81
+ readonly points: {
82
+ readonly arrow: "-5,-4 0,0 -5,4";
83
+ readonly arrowclosed: "-5,-4 0,0 -5,4 -5,-4";
84
+ };
85
+ };
86
+ /** How far the head reaches back from the tip, in px, for a stroke width. */
87
+ export declare function edgeArrowheadLength(strokeWidth: number): number;
56
88
  export interface EdgeStyleInput {
57
89
  /** `edge.kind` from the model, not React Flow's `edge.type`. */
58
90
  readonly kind: string;
@@ -1 +1 @@
1
- {"version":3,"file":"edgeStyle.d.ts","sourceRoot":"","sources":["../../src/edges/edgeStyle.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAEnD,MAAM,MAAM,YAAY,GAAG,QAAQ,GAAG,YAAY,GAAG,MAAM,GAAG,UAAU,CAAC;AACzE,MAAM,MAAM,UAAU,GAAG,OAAO,GA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EACN,QAAgB,EAChB,QAAgB,EAChB,OAAO,EACP,UAAqB,EACrB,aAAqB,EACrB,UAAU,EACV,QAAQ,GACT,EAAE,cAAc,2CAgKhB"}
@@ -2,17 +2,16 @@
2
2
  * Document → React Flow arrays. Pure, so the mapping can be asserted without
3
3
  * mounting anything.
4
4
  *
5
- * Two things happen here that cannot happen later:
5
+ * One thing happens here that cannot happen later:
6
6
  *
7
7
  * - **Size seeding (design §5).** Every node carries `width` / `height` from
8
8
  * `graphNodeMeasure` BEFORE first paint, so React Flow's per-node
9
9
  * `ResizeObserver` CORRECTS a measurement rather than discovering one. On a
10
10
  * 200-node knob flip that is the difference between 200 observer callbacks
11
11
  * resizing the world and 200 confirming it.
12
- * - **The edge marker.** `markerEnd` on the edge OBJECT, because React Flow
13
- * builds its `<marker>` defs from the edges array. Choosing it inside the
14
- * edge component is too late — measured in task 1.10, where the arrowheads
15
- * painted and the lines did not.
12
+ *
13
+ * The edge carries no `markerEnd`. React Flow would paint that head in its own
14
+ * grey; `GraphEdge` draws it in the edge's stroke instead (FZ-9012).
16
15
  */
17
16
  import type { EdgeKindDefs, GraphDocument, GraphSchema, NodeKindDefs, PortSpec } from "../model/index";
18
17
  import type { GraphNodeSizeKnob } from "../nodes/nodeMeasure";
@@ -1 +1 @@
1
- {"version":3,"file":"flowAdapter.d.ts","sourceRoot":"","sources":["../../src/react-flow/flowAdapter.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,EACV,YAAY,EACZ,aAAa,EAGb,WAAW,EACX,YAAY,EACZ,QAAQ,EACT,MAAM,gBAAgB,CAAC;AAIxB,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAE9D,OAAO,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAEvC;;;;;;;;GAQG;AACH,MAAM,MAAM,iBAAiB,GAAG;IAC9B,QAAQ,CAAC,IAAI,EAAE,MAAM,CA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