@graphlearning/graphl-flow 0.1.0 → 0.3.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.
package/dist/routing.d.ts CHANGED
@@ -23,6 +23,8 @@ export interface Routed {
23
23
  side: 'on' | 'before' | 'after';
24
24
  seg: 'h' | 'v';
25
25
  };
26
+ /** How many edges hold a slot in this edge's channel (0: none). The layout widens the gap for them. */
27
+ slots: number;
26
28
  }
27
29
  /** An edge ends this far OUTSIDE its node, so the arrowhead never touches the border. */
28
30
  export declare const ANCHOR_OUTSET = 4;
@@ -30,6 +32,17 @@ export declare const ANCHOR_OUTSET = 4;
30
32
  export declare const PORT_INSET = 12;
31
33
  /** Two ports closer than this on one face make the whole face spread evenly. */
32
34
  export declare const PORT_MIN_GAP = 14;
35
+ /** The arrowhead's length (its marker is 10 user units): a slot keeps at least this run to each anchor. */
36
+ export declare const HEAD_LEN = 10;
37
+ /** Between two slots in one channel. */
38
+ export declare const SLOT_GAP = 8;
39
+ /**
40
+ * The gap a channel needs for `n` slots: a full head's run at each end, outside each anchor, and
41
+ * SLOT_GAP between neighbours. One slot needs 28 — inside EDGE_GAP — so only a SHARED channel grows.
42
+ * Without it, three arrows fanning into one node through a 32px gap left a 4px last run, which the
43
+ * 6px head trim reversed: the arrowhead pointed back into the gap (0.2, edge-fan-in).
44
+ */
45
+ export declare const slotRoom: (n: number) => number;
33
46
  /**
34
47
  * `sides[i]` names the two SIBLINGS edge i runs between — the children of its lowest common
35
48
  * ancestor that contain each end. The faces are chosen from THEIR boxes, not the nodes': two nested
package/dist/styles.css CHANGED
@@ -177,3 +177,13 @@
177
177
  }
178
178
  /* A plot never scales: in a narrow column use `compact`, the second fixed size. Too wide is overflow,
179
179
  which check fails — scaling down silently shrank the text past reading in a 560px side pane. */
180
+
181
+ /* Focus: a ring and a glow in the node's own accent, by box-shadow — NO layout effect, so moving the
182
+ focus between sections never moves the scene. An unframed item gains a frame while focused. */
183
+ [data-focus] {
184
+ box-shadow: 0 0 0 2px var(--gf-accent), 0 0 24px 2px color-mix(in srgb, var(--gf-accent) 45%, transparent);
185
+ border-radius: 8px;
186
+ }
187
+ .gf-item[data-focus] { background: color-mix(in srgb, var(--gf-accent) 12%, var(--gf-surface)); }
188
+ tr[data-focus] td, .gf-line[data-focus], .gf-tree-row[data-focus] { background: color-mix(in srgb, var(--gf-accent) 18%, transparent); }
189
+ tr[data-focus], .gf-line[data-focus], .gf-tree-row[data-focus] { box-shadow: inset 3px 0 0 var(--gf-accent); border-radius: 0; }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@graphlearning/graphl-flow",
3
- "version": "0.1.0",
3
+ "version": "0.3.0",
4
4
  "description": "Declarative diagram engine — authors describe groups, items and edges; the browser lays them out and the engine draws the edges.",
5
5
  "license": "UNLICENSED",
6
6
  "repository": {