@fusion.dev/helix-headless 0.120.0 → 0.122.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.
@@ -49992,6 +49992,38 @@
49992
49992
  "module": "./root/graph-model.js"
49993
49993
  }
49994
49994
  },
49995
+ {
49996
+ "kind": "js",
49997
+ "name": "GraphNodeEmphasis",
49998
+ "declaration": {
49999
+ "name": "GraphNodeEmphasis",
50000
+ "module": "./root/graph-model.js"
50001
+ }
50002
+ },
50003
+ {
50004
+ "kind": "js",
50005
+ "name": "GraphNodeMaterial",
50006
+ "declaration": {
50007
+ "name": "GraphNodeMaterial",
50008
+ "module": "./root/graph-model.js"
50009
+ }
50010
+ },
50011
+ {
50012
+ "kind": "js",
50013
+ "name": "GraphNodeShape",
50014
+ "declaration": {
50015
+ "name": "GraphNodeShape",
50016
+ "module": "./root/graph-model.js"
50017
+ }
50018
+ },
50019
+ {
50020
+ "kind": "js",
50021
+ "name": "GraphNodeTone",
50022
+ "declaration": {
50023
+ "name": "GraphNodeTone",
50024
+ "module": "./root/graph-model.js"
50025
+ }
50026
+ },
49995
50027
  {
49996
50028
  "kind": "js",
49997
50029
  "name": "Relation",
@@ -50622,13 +50654,13 @@
50622
50654
  {
50623
50655
  "name": "positions",
50624
50656
  "type": {
50625
- "text": "Record<string, { x: number; y: number }>"
50657
+ "text": "Record<string, { x: number; y: number; z?: number | undefined }>"
50626
50658
  }
50627
50659
  }
50628
50660
  ],
50629
50661
  "description": "Says where a layout put each note, by its `id`: sends\n`helix-graph-layout` for the page to keep. Called by `connectGraph` once\nits layout has settled; a page laying out its own graph calls it the same\nway.",
50630
50662
  "type": {
50631
- "text": "laidOut(positions: Record<string, { x: number; y: number }>) => void"
50663
+ "text": "laidOut(positions: Record<string, { x: number; y: number; z?: number | undefined }>) => void"
50632
50664
  }
50633
50665
  },
50634
50666
  {
@@ -52080,7 +52112,7 @@
52080
52112
  "type": {
52081
52113
  "text": "HelixGraphLayoutEvent"
52082
52114
  },
52083
- "description": "A layout settled, with where it put each note, sent by `laidOut()`. Keep the positions and pass them back as each note's `x` and `y`.",
52115
+ "description": "A layout settled, with where it put each note, sent by `laidOut()`. Keep the positions and pass them back as each note's `x` and `y`, and `z` where a renderer draws in three dimensions.",
52084
52116
  "name": "helix-graph-layout",
52085
52117
  "reactProp": "onhelix-graph-layout"
52086
52118
  },
@@ -1,3 +1,3 @@
1
- export type { Adjacency, Entry, GraphLink, GraphNode, Relation } from './root/graph-model.js';
1
+ export type { Adjacency, Entry, GraphLink, GraphNode, GraphNodeEmphasis, GraphNodeMaterial, GraphNodeShape, GraphNodeTone, Relation, } from './root/graph-model.js';
2
2
  export { adjacencyOf, entriesOf, nameOf, sortedOf, within } from './root/graph-model.js';
3
3
  export { HelixHeadlessGraph } from './root/graph-root.js';
@@ -1,17 +1,45 @@
1
+ /** The shapes a note can be drawn in, from the `shape` axis. */
2
+ export type GraphNodeShape = 'circle' | 'diamond' | 'ring' | 'square';
3
+ /** How heavily a note is drawn, from the `emphasis` axis. */
4
+ export type GraphNodeEmphasis = 'outlined' | 'solid' | 'subtle';
5
+ /** What a note is drawn as made of, from the `material` axis. */
6
+ export type GraphNodeMaterial = 'frosted' | 'glass';
7
+ /** What a note means, from the `tone` axis, which colors it over its group. */
8
+ export type GraphNodeTone = 'accent' | 'danger' | 'info' | 'neutral' | 'primary' | 'success' | 'warning';
1
9
  /** One note in a graph. */
2
10
  export interface GraphNode {
3
11
  /** Unique in the graph, and what `active` and a link's ends name. */
4
12
  id: string;
5
13
  /** What the note is called. Its `id` where it has none. */
6
14
  label?: string | undefined;
15
+ /**
16
+ * How heavily it is drawn: `solid`, filled, which unset is; `outlined`, a
17
+ * ring with the ground showing through; `subtle`, a tinted fill with a
18
+ * ring. Unset is the renderer's own.
19
+ */
20
+ emphasis?: GraphNodeEmphasis | undefined;
7
21
  /** A kind the note belongs to, such as a tag, which a renderer colors it by. */
8
22
  group?: string | undefined;
23
+ /** What it is drawn as made of: `glass` or `frosted`. Unset is the renderer's own. */
24
+ material?: GraphNodeMaterial | undefined;
25
+ /**
26
+ * Its shape, which says what kind of note it is at a glance: a person as a
27
+ * circle and a document as a square. Unset is the renderer's own.
28
+ */
29
+ shape?: GraphNodeShape | undefined;
30
+ /**
31
+ * What it means, which colors it over its group's color: `danger` for an
32
+ * incident, `success` for something done.
33
+ */
34
+ tone?: GraphNodeTone | undefined;
9
35
  /** How large the renderer draws it, relative to the others. */
10
36
  size?: number | undefined;
11
37
  /** Where the note stands, where the page already knows. Laid out where it does not. */
12
38
  x?: number | undefined;
13
39
  /** Where the note stands, where the page already knows. Laid out where it does not. */
14
40
  y?: number | undefined;
41
+ /** How near the viewer the note stands, for a renderer that draws in three dimensions. */
42
+ z?: number | undefined;
15
43
  }
16
44
  /** One link between two notes, from `source` to `target`. */
17
45
  export interface GraphLink {
@@ -41,7 +41,7 @@ declare const HelixHeadlessGraph_base: (new (...args: any[]) => import("@fusion.
41
41
  *
42
42
  * @event {HelixActivateEvent} helix-activate - A note was selected, in the list or in the drawing. The detail's `value` is its `id`.
43
43
  * @event {HelixBeforeActivateEvent} helix-before-activate - A note is about to be selected. Cancelable: cancel it to keep the selection in your own state.
44
- * @event {HelixGraphLayoutEvent} helix-graph-layout - A layout settled, with where it put each note, sent by `laidOut()`. Keep the positions and pass them back as each note's `x` and `y`.
44
+ * @event {HelixGraphLayoutEvent} helix-graph-layout - A layout settled, with where it put each note, sent by `laidOut()`. Keep the positions and pass them back as each note's `x` and `y`, and `z` where a renderer draws in three dimensions.
45
45
  * @event {HelixGraphPanEvent} helix-graph-pan - A pan button or arrow key was pressed. `connectGraph` moves the drawing.
46
46
  * @event {HelixGraphPartChangeEvent} helix-graph-part-change - The notes, the links, the selection, the depth or the gestures changed. Used by `connectGraph`; pages do not need to listen for it.
47
47
  * @event {HelixGraphReadyEvent} helix-graph-ready - The graph has been drawn whole, laid out and settled. Sent each time `drawn()` says it is drawn after it was not.
@@ -157,6 +157,7 @@ export declare class HelixHeadlessGraph extends HelixHeadlessGraph_base {
157
157
  laidOut(positions: Record<string, {
158
158
  x: number;
159
159
  y: number;
160
+ z?: number | undefined;
160
161
  }>): void;
161
162
  /**
162
163
  * Shows something passing from one note to another, such as a message, a
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@fusion.dev/helix-headless",
3
3
  "description": "Headless component tier. Structure, accessibility, state, and form participation. No styling.",
4
- "version": "0.120.0",
4
+ "version": "0.122.0",
5
5
  "license": "MIT",
6
6
  "author": "Ross Sheppard <ross.sheppard@fusion.dev>",
7
7
  "repository": {
@@ -46,13 +46,13 @@
46
46
  },
47
47
  "bugs": "https://github.com/project-fusion/fusion/issues",
48
48
  "dependencies": {
49
- "@fusion.dev/helix-core": "0.120.0",
50
- "@fusion.dev/helix-icons": "0.120.0",
49
+ "@fusion.dev/helix-core": "0.122.0",
50
+ "@fusion.dev/helix-icons": "0.122.0",
51
51
  "uqr": "^0.1.3"
52
52
  },
53
53
  "devDependencies": {
54
- "@fusion.dev/helix-cem": "0.120.0",
55
- "@fusion.dev/helix-testing": "0.120.0",
54
+ "@fusion.dev/helix-cem": "0.122.0",
55
+ "@fusion.dev/helix-testing": "0.122.0",
56
56
  "@fusion.dev/scripts": "0.0.0-dev",
57
57
  "@happy-dom/global-registrator": "^20.0.0",
58
58
  "@lit-labs/ssr": "^4.1.0",
package/types/jsx.d.ts CHANGED
@@ -9629,7 +9629,7 @@ Ignored once `active` is written. */
9629
9629
  "onhelix-before-activate"?: ((
9630
9630
  e: HelixHeadlessGraphHelixBeforeActivateElementEvent,
9631
9631
  ) => void) | undefined;
9632
- /** A layout settled, with where it put each note, sent by `laidOut()`. Keep the positions and pass them back as each note's `x` and `y`. */
9632
+ /** A layout settled, with where it put each note, sent by `laidOut()`. Keep the positions and pass them back as each note's `x` and `y`, and `z` where a renderer draws in three dimensions. */
9633
9633
  "onhelix-graph-layout"?: ((
9634
9634
  e: HelixHeadlessGraphHelixGraphLayoutElementEvent,
9635
9635
  ) => void) | undefined;
@@ -9891,7 +9891,7 @@ Ignored once `active` is written. */
9891
9891
  "on:helix-before-activate"?: ((
9892
9892
  e: HelixHeadlessGraphHelixBeforeActivateElementEvent,
9893
9893
  ) => void) | undefined;
9894
- /** A layout settled, with where it put each note, sent by `laidOut()`. Keep the positions and pass them back as each note's `x` and `y`. */
9894
+ /** A layout settled, with where it put each note, sent by `laidOut()`. Keep the positions and pass them back as each note's `x` and `y`, and `z` where a renderer draws in three dimensions. */
9895
9895
  "on:helix-graph-layout"?: ((
9896
9896
  e: HelixHeadlessGraphHelixGraphLayoutElementEvent,
9897
9897
  ) => void) | undefined;
@@ -31398,7 +31398,7 @@ export type CustomElements = {
31398
31398
  *
31399
31399
  * - `helix-activate`: A note was selected, in the list or in the drawing. The detail's `value` is its `id`.
31400
31400
  * - `helix-before-activate`: A note is about to be selected. Cancelable: cancel it to keep the selection in your own state.
31401
- * - `helix-graph-layout`: A layout settled, with where it put each note, sent by `laidOut()`. Keep the positions and pass them back as each note's `x` and `y`.
31401
+ * - `helix-graph-layout`: A layout settled, with where it put each note, sent by `laidOut()`. Keep the positions and pass them back as each note's `x` and `y`, and `z` where a renderer draws in three dimensions.
31402
31402
  * - `helix-graph-pan`: A pan button or arrow key was pressed. `connectGraph` moves the drawing.
31403
31403
  * - `helix-graph-part-change`: The notes, the links, the selection, the depth or the gestures changed. Used by `connectGraph`; pages do not need to listen for it.
31404
31404
  * - `helix-graph-ready`: The graph has been drawn whole, laid out and settled. Sent each time `drawn()` says it is drawn after it was not.
@@ -31423,7 +31423,7 @@ export type CustomElements = {
31423
31423
  * its own graph calls it when that graph is finished. The first call after
31424
31424
  * the graph was not drawn sends `helix-graph-ready` and turns on
31425
31425
  * `:state(ready)`.
31426
- * - `laidOut(positions: Record<string, { x: number; y: number }>) => void`: Says where a layout put each note, by its `id`: sends
31426
+ * - `laidOut(positions: Record<string, { x: number; y: number; z?: number | undefined }>) => void`: Says where a layout put each note, by its `id`: sends
31427
31427
  * `helix-graph-layout` for the page to keep. Called by `connectGraph` once
31428
31428
  * its layout has settled; a page laying out its own graph calls it the same
31429
31429
  * way.
@@ -51775,7 +51775,7 @@ export type CustomElementsSolidJs = {
51775
51775
  *
51776
51776
  * - `helix-activate`: A note was selected, in the list or in the drawing. The detail's `value` is its `id`.
51777
51777
  * - `helix-before-activate`: A note is about to be selected. Cancelable: cancel it to keep the selection in your own state.
51778
- * - `helix-graph-layout`: A layout settled, with where it put each note, sent by `laidOut()`. Keep the positions and pass them back as each note's `x` and `y`.
51778
+ * - `helix-graph-layout`: A layout settled, with where it put each note, sent by `laidOut()`. Keep the positions and pass them back as each note's `x` and `y`, and `z` where a renderer draws in three dimensions.
51779
51779
  * - `helix-graph-pan`: A pan button or arrow key was pressed. `connectGraph` moves the drawing.
51780
51780
  * - `helix-graph-part-change`: The notes, the links, the selection, the depth or the gestures changed. Used by `connectGraph`; pages do not need to listen for it.
51781
51781
  * - `helix-graph-ready`: The graph has been drawn whole, laid out and settled. Sent each time `drawn()` says it is drawn after it was not.
@@ -51800,7 +51800,7 @@ export type CustomElementsSolidJs = {
51800
51800
  * its own graph calls it when that graph is finished. The first call after
51801
51801
  * the graph was not drawn sends `helix-graph-ready` and turns on
51802
51802
  * `:state(ready)`.
51803
- * - `laidOut(positions: Record<string, { x: number; y: number }>) => void`: Says where a layout put each note, by its `id`: sends
51803
+ * - `laidOut(positions: Record<string, { x: number; y: number; z?: number | undefined }>) => void`: Says where a layout put each note, by its `id`: sends
51804
51804
  * `helix-graph-layout` for the page to keep. Called by `connectGraph` once
51805
51805
  * its layout has settled; a page laying out its own graph calls it the same
51806
51806
  * way.
package/types/vue.d.ts CHANGED
@@ -5065,7 +5065,7 @@ export type HelixHeadlessGraphVueEvents = {
5065
5065
  "helix-activate": HelixHeadlessGraphHelixActivateElementEvent;
5066
5066
  /** A note is about to be selected. Cancelable: cancel it to keep the selection in your own state. */
5067
5067
  "helix-before-activate": HelixHeadlessGraphHelixBeforeActivateElementEvent;
5068
- /** A layout settled, with where it put each note, sent by `laidOut()`. Keep the positions and pass them back as each note's `x` and `y`. */
5068
+ /** A layout settled, with where it put each note, sent by `laidOut()`. Keep the positions and pass them back as each note's `x` and `y`, and `z` where a renderer draws in three dimensions. */
5069
5069
  "helix-graph-layout": HelixHeadlessGraphHelixGraphLayoutElementEvent;
5070
5070
  /** A pan button or arrow key was pressed. `connectGraph` moves the drawing. */
5071
5071
  "helix-graph-pan": HelixHeadlessGraphHelixGraphPanElementEvent;