@f-ewald/components 1.44.0 → 1.46.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/README.md +1 -0
- package/custom-elements.json +428 -5
- package/dist/dag-graph.d.ts +25 -1
- package/dist/dag-graph.d.ts.map +1 -1
- package/dist/dag-graph.js +133 -20
- package/dist/dag-graph.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/pixel-fire.d.ts +69 -0
- package/dist/pixel-fire.d.ts.map +1 -0
- package/dist/pixel-fire.js +296 -0
- package/dist/pixel-fire.js.map +1 -0
- package/dist/utils/dag-layout.d.ts +23 -6
- package/dist/utils/dag-layout.d.ts.map +1 -1
- package/dist/utils/dag-layout.js +32 -10
- package/dist/utils/dag-layout.js.map +1 -1
- package/docs/dag-graph.md +5 -2
- package/docs/design-language.md +3 -3
- package/docs/pixel-fire.md +51 -0
- package/llms.txt +36 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -107,6 +107,7 @@ import "@f-ewald/components/roman-numeral.js";
|
|
|
107
107
|
| `<pagination-nav>` | [API reference](https://f-ewald.github.io/components/docs/pagination-nav.html) |
|
|
108
108
|
| `<percent-bar-chart>` | [API reference](https://f-ewald.github.io/components/docs/percent-bar-chart.html) |
|
|
109
109
|
| `<photo-gallery>` | [API reference](https://f-ewald.github.io/components/docs/photo-gallery.html) |
|
|
110
|
+
| `<pixel-fire>` | [API reference](https://f-ewald.github.io/components/docs/pixel-fire.html) |
|
|
110
111
|
| `<popover-panel>` | [API reference](https://f-ewald.github.io/components/docs/popover-panel.html) |
|
|
111
112
|
| `<price-history-chart>` | [API reference](https://f-ewald.github.io/components/docs/price-history-chart.html) |
|
|
112
113
|
| `<progress-bar>` | [API reference](https://f-ewald.github.io/components/docs/progress-bar.html) |
|
package/custom-elements.json
CHANGED
|
@@ -6582,7 +6582,7 @@
|
|
|
6582
6582
|
"declarations": [
|
|
6583
6583
|
{
|
|
6584
6584
|
"kind": "class",
|
|
6585
|
-
"description": "Interactive layered drawing of a directed graph — dependencies, pipelines, or any node-link data.\n\nNodes are placed in layers (via dagre) so edges flow left to right (or top to bottom with\n`direction=\"TB\"`); cycles are allowed, and the edges closing them are drawn dashed and point backward.\nEach node is a compact card sized to its label, with an optional icon, color, and border style from\n`kinds`. The whole graph is shown when it fits at a readable zoom; otherwise the selected node is centered at\n100%. Drag to pan; pinch or Ctrl/⌘ + wheel to zoom (a plain wheel scrolls the page). With keyboard\nfocus on the graph, arrow keys pan, `+`/`-` zoom, and `0` fits the graph. Clicking a node, or pressing\nEnter/Space on it, selects it. A toolbar in the top-right corner offers the `controls` you enable.\n\nSet `static` to present a fixed picture: the graph is always fitted into view, panning and zooming\nare off, and the toolbar is hidden; nodes can still be selected.\n\nColors can be changed with these custom properties: `--dag-node-background`, `--dag-node-text`,\n`--dag-edge-color`, `--dag-selected-color`, and `--dag-highlight-color`; `--dag-graph-height` sets the\nheight (default `24rem`).",
|
|
6585
|
+
"description": "Interactive layered drawing of a directed graph — dependencies, pipelines, or any node-link data.\n\nNodes are placed in layers (via dagre) so edges flow left to right (or top to bottom with\n`direction=\"TB\"`); cycles are allowed, and the edges closing them are drawn dashed and point backward.\nEach node is a compact card sized to its label, with an optional icon, color, and border style from\n`kinds`. The whole graph is shown when it fits at a readable zoom; otherwise the selected node is centered at\n100%. Drag to pan; pinch or Ctrl/⌘ + wheel to zoom (a plain wheel scrolls the page). With keyboard\nfocus on the graph, arrow keys pan, `+`/`-` zoom, and `0` fits the graph. Clicking a node, or pressing\nEnter/Space on it, selects it. A toolbar in the top-right corner offers the `controls` you enable.\n\nEdges can carry an optional `label`, drawn midway along the edge, and an optional `weight`, which draws the\nedge thicker in proportion to the heaviest weight in the graph.\n\nSet `static` to present a fixed picture: the graph is always fitted into view, panning and zooming\nare off, and the toolbar is hidden; nodes can still be selected.\n\nColors can be changed with these custom properties: `--dag-node-background`, `--dag-node-text`,\n`--dag-edge-color`, `--dag-selected-color`, and `--dag-highlight-color`; `--dag-graph-height` sets the\nheight (default `24rem`).",
|
|
6586
6586
|
"name": "DagGraph",
|
|
6587
6587
|
"slots": [
|
|
6588
6588
|
{
|
|
@@ -6890,13 +6890,118 @@
|
|
|
6890
6890
|
},
|
|
6891
6891
|
{
|
|
6892
6892
|
"kind": "method",
|
|
6893
|
-
"name": "
|
|
6893
|
+
"name": "_styledEdges",
|
|
6894
|
+
"privacy": "private",
|
|
6895
|
+
"return": {
|
|
6896
|
+
"type": {
|
|
6897
|
+
"text": "StyledEdge[]"
|
|
6898
|
+
}
|
|
6899
|
+
},
|
|
6900
|
+
"description": "Pairs each laid-out edge with its input's presentation; on duplicate edges the last one wins."
|
|
6901
|
+
},
|
|
6902
|
+
{
|
|
6903
|
+
"kind": "method",
|
|
6904
|
+
"name": "_renderWeightedArrows",
|
|
6894
6905
|
"privacy": "private",
|
|
6895
6906
|
"return": {
|
|
6896
6907
|
"type": {
|
|
6897
6908
|
"text": "SVGTemplateResult[]"
|
|
6898
6909
|
}
|
|
6899
|
-
}
|
|
6910
|
+
},
|
|
6911
|
+
"parameters": [
|
|
6912
|
+
{
|
|
6913
|
+
"name": "edges",
|
|
6914
|
+
"type": {
|
|
6915
|
+
"text": "StyledEdge[]"
|
|
6916
|
+
}
|
|
6917
|
+
}
|
|
6918
|
+
],
|
|
6919
|
+
"description": "Arrowheads for weighted edges, one per size and color: they grow more slowly than the stroke and sit just\npast the shortened path, so a thick stroke never pokes out beside the arrow's tip."
|
|
6920
|
+
},
|
|
6921
|
+
{
|
|
6922
|
+
"kind": "method",
|
|
6923
|
+
"name": "_arrowId",
|
|
6924
|
+
"privacy": "private",
|
|
6925
|
+
"return": {
|
|
6926
|
+
"type": {
|
|
6927
|
+
"text": "string"
|
|
6928
|
+
}
|
|
6929
|
+
},
|
|
6930
|
+
"parameters": [
|
|
6931
|
+
{
|
|
6932
|
+
"name": "size",
|
|
6933
|
+
"type": {
|
|
6934
|
+
"text": "number"
|
|
6935
|
+
}
|
|
6936
|
+
},
|
|
6937
|
+
{
|
|
6938
|
+
"name": "highlighted",
|
|
6939
|
+
"type": {
|
|
6940
|
+
"text": "boolean"
|
|
6941
|
+
}
|
|
6942
|
+
}
|
|
6943
|
+
]
|
|
6944
|
+
},
|
|
6945
|
+
{
|
|
6946
|
+
"kind": "method",
|
|
6947
|
+
"name": "_renderEdge",
|
|
6948
|
+
"privacy": "private",
|
|
6949
|
+
"return": {
|
|
6950
|
+
"type": {
|
|
6951
|
+
"text": "SVGTemplateResult"
|
|
6952
|
+
}
|
|
6953
|
+
},
|
|
6954
|
+
"parameters": [
|
|
6955
|
+
{
|
|
6956
|
+
"name": "edge",
|
|
6957
|
+
"type": {
|
|
6958
|
+
"text": "StyledEdge"
|
|
6959
|
+
}
|
|
6960
|
+
}
|
|
6961
|
+
]
|
|
6962
|
+
},
|
|
6963
|
+
{
|
|
6964
|
+
"kind": "method",
|
|
6965
|
+
"name": "_renderEdgeLabel",
|
|
6966
|
+
"privacy": "private",
|
|
6967
|
+
"return": {
|
|
6968
|
+
"type": {
|
|
6969
|
+
"text": "SVGTemplateResult | typeof nothing"
|
|
6970
|
+
}
|
|
6971
|
+
},
|
|
6972
|
+
"parameters": [
|
|
6973
|
+
{
|
|
6974
|
+
"name": "edge",
|
|
6975
|
+
"type": {
|
|
6976
|
+
"text": "StyledEdge"
|
|
6977
|
+
}
|
|
6978
|
+
}
|
|
6979
|
+
]
|
|
6980
|
+
},
|
|
6981
|
+
{
|
|
6982
|
+
"kind": "method",
|
|
6983
|
+
"name": "_shortenEnd",
|
|
6984
|
+
"privacy": "private",
|
|
6985
|
+
"return": {
|
|
6986
|
+
"type": {
|
|
6987
|
+
"text": "DagPoint[]"
|
|
6988
|
+
}
|
|
6989
|
+
},
|
|
6990
|
+
"parameters": [
|
|
6991
|
+
{
|
|
6992
|
+
"name": "points",
|
|
6993
|
+
"type": {
|
|
6994
|
+
"text": "DagPoint[]"
|
|
6995
|
+
}
|
|
6996
|
+
},
|
|
6997
|
+
{
|
|
6998
|
+
"name": "length",
|
|
6999
|
+
"type": {
|
|
7000
|
+
"text": "number"
|
|
7001
|
+
}
|
|
7002
|
+
}
|
|
7003
|
+
],
|
|
7004
|
+
"description": "Pulls the last point back by `length` (at most 80% of the final segment) to make room for an arrowhead."
|
|
6900
7005
|
},
|
|
6901
7006
|
{
|
|
6902
7007
|
"kind": "method",
|
|
@@ -12390,6 +12495,14 @@
|
|
|
12390
12495
|
"module": "./tree-view.js"
|
|
12391
12496
|
}
|
|
12392
12497
|
},
|
|
12498
|
+
{
|
|
12499
|
+
"kind": "js",
|
|
12500
|
+
"name": "PixelFire",
|
|
12501
|
+
"declaration": {
|
|
12502
|
+
"name": "PixelFire",
|
|
12503
|
+
"module": "./pixel-fire.js"
|
|
12504
|
+
}
|
|
12505
|
+
},
|
|
12393
12506
|
{
|
|
12394
12507
|
"kind": "js",
|
|
12395
12508
|
"name": "PopoverPanel",
|
|
@@ -17884,6 +17997,265 @@
|
|
|
17884
17997
|
}
|
|
17885
17998
|
]
|
|
17886
17999
|
},
|
|
18000
|
+
{
|
|
18001
|
+
"kind": "javascript-module",
|
|
18002
|
+
"path": "src/pixel-fire.ts",
|
|
18003
|
+
"declarations": [
|
|
18004
|
+
{
|
|
18005
|
+
"kind": "class",
|
|
18006
|
+
"description": "Pixelated, 8-bit style fire in the manner of old computer games. By default\nit is pinned full width to the bottom of the viewport as a decorative,\nclick-through overlay; `contained` pins it to the bottom of the nearest\npositioned ancestor instead.\n\nThe strip's height is set with `--pixel-fire-height` (default `8rem`). It\npaints at `z-index: 30`, above ordinary page content but below `app-shell`'s\nchrome and every dialog or popover. Under `prefers-reduced-motion: reduce`\nit draws one still frame instead of animating. The canvas is hidden from\nassistive technology.",
|
|
18007
|
+
"name": "PixelFire",
|
|
18008
|
+
"members": [
|
|
18009
|
+
{
|
|
18010
|
+
"kind": "field",
|
|
18011
|
+
"name": "pixelSize",
|
|
18012
|
+
"type": {
|
|
18013
|
+
"text": "number"
|
|
18014
|
+
},
|
|
18015
|
+
"default": "4",
|
|
18016
|
+
"description": "Size of one fire pixel in CSS pixels; larger values look chunkier.",
|
|
18017
|
+
"attribute": "pixel-size"
|
|
18018
|
+
},
|
|
18019
|
+
{
|
|
18020
|
+
"kind": "field",
|
|
18021
|
+
"name": "intensity",
|
|
18022
|
+
"type": {
|
|
18023
|
+
"text": "number"
|
|
18024
|
+
},
|
|
18025
|
+
"default": "1",
|
|
18026
|
+
"description": "Heat of the fire's source, from `0` to `1`. Lowering it shortens the\nflames; `0` lets the fire burn out.",
|
|
18027
|
+
"attribute": "intensity"
|
|
18028
|
+
},
|
|
18029
|
+
{
|
|
18030
|
+
"kind": "field",
|
|
18031
|
+
"name": "contained",
|
|
18032
|
+
"type": {
|
|
18033
|
+
"text": "boolean"
|
|
18034
|
+
},
|
|
18035
|
+
"default": "false",
|
|
18036
|
+
"description": "Pins the fire to the bottom of the nearest positioned ancestor instead of\nthe viewport.",
|
|
18037
|
+
"attribute": "contained",
|
|
18038
|
+
"reflects": true
|
|
18039
|
+
},
|
|
18040
|
+
{
|
|
18041
|
+
"kind": "field",
|
|
18042
|
+
"name": "_cols",
|
|
18043
|
+
"type": {
|
|
18044
|
+
"text": "number"
|
|
18045
|
+
},
|
|
18046
|
+
"privacy": "private",
|
|
18047
|
+
"default": "0"
|
|
18048
|
+
},
|
|
18049
|
+
{
|
|
18050
|
+
"kind": "field",
|
|
18051
|
+
"name": "_rows",
|
|
18052
|
+
"type": {
|
|
18053
|
+
"text": "number"
|
|
18054
|
+
},
|
|
18055
|
+
"privacy": "private",
|
|
18056
|
+
"default": "0"
|
|
18057
|
+
},
|
|
18058
|
+
{
|
|
18059
|
+
"kind": "field",
|
|
18060
|
+
"name": "_heat",
|
|
18061
|
+
"privacy": "private",
|
|
18062
|
+
"default": "new Float32Array(0)"
|
|
18063
|
+
},
|
|
18064
|
+
{
|
|
18065
|
+
"kind": "field",
|
|
18066
|
+
"name": "_cooling",
|
|
18067
|
+
"type": {
|
|
18068
|
+
"text": "Float32Array"
|
|
18069
|
+
},
|
|
18070
|
+
"privacy": "private",
|
|
18071
|
+
"default": "new Float32Array(0)"
|
|
18072
|
+
},
|
|
18073
|
+
{
|
|
18074
|
+
"kind": "field",
|
|
18075
|
+
"name": "_time",
|
|
18076
|
+
"type": {
|
|
18077
|
+
"text": "number"
|
|
18078
|
+
},
|
|
18079
|
+
"privacy": "private",
|
|
18080
|
+
"default": "0"
|
|
18081
|
+
},
|
|
18082
|
+
{
|
|
18083
|
+
"kind": "field",
|
|
18084
|
+
"name": "_image",
|
|
18085
|
+
"type": {
|
|
18086
|
+
"text": "ImageData | undefined"
|
|
18087
|
+
},
|
|
18088
|
+
"privacy": "private"
|
|
18089
|
+
},
|
|
18090
|
+
{
|
|
18091
|
+
"kind": "field",
|
|
18092
|
+
"name": "_frame",
|
|
18093
|
+
"type": {
|
|
18094
|
+
"text": "number | undefined"
|
|
18095
|
+
},
|
|
18096
|
+
"privacy": "private"
|
|
18097
|
+
},
|
|
18098
|
+
{
|
|
18099
|
+
"kind": "field",
|
|
18100
|
+
"name": "_lastStep",
|
|
18101
|
+
"type": {
|
|
18102
|
+
"text": "number"
|
|
18103
|
+
},
|
|
18104
|
+
"privacy": "private",
|
|
18105
|
+
"default": "0"
|
|
18106
|
+
},
|
|
18107
|
+
{
|
|
18108
|
+
"kind": "field",
|
|
18109
|
+
"name": "_resizeObserver",
|
|
18110
|
+
"type": {
|
|
18111
|
+
"text": "ResizeObserver | undefined"
|
|
18112
|
+
},
|
|
18113
|
+
"privacy": "private"
|
|
18114
|
+
},
|
|
18115
|
+
{
|
|
18116
|
+
"kind": "field",
|
|
18117
|
+
"name": "_motionQuery",
|
|
18118
|
+
"type": {
|
|
18119
|
+
"text": "MediaQueryList | undefined"
|
|
18120
|
+
},
|
|
18121
|
+
"privacy": "private"
|
|
18122
|
+
},
|
|
18123
|
+
{
|
|
18124
|
+
"kind": "field",
|
|
18125
|
+
"name": "_canvas",
|
|
18126
|
+
"type": {
|
|
18127
|
+
"text": "HTMLCanvasElement | null"
|
|
18128
|
+
},
|
|
18129
|
+
"privacy": "private",
|
|
18130
|
+
"readonly": true
|
|
18131
|
+
},
|
|
18132
|
+
{
|
|
18133
|
+
"kind": "field",
|
|
18134
|
+
"name": "_cellSize",
|
|
18135
|
+
"type": {
|
|
18136
|
+
"text": "number"
|
|
18137
|
+
},
|
|
18138
|
+
"privacy": "private",
|
|
18139
|
+
"readonly": true
|
|
18140
|
+
},
|
|
18141
|
+
{
|
|
18142
|
+
"kind": "field",
|
|
18143
|
+
"name": "_sourceHeat",
|
|
18144
|
+
"type": {
|
|
18145
|
+
"text": "number"
|
|
18146
|
+
},
|
|
18147
|
+
"privacy": "private",
|
|
18148
|
+
"readonly": true
|
|
18149
|
+
},
|
|
18150
|
+
{
|
|
18151
|
+
"kind": "field",
|
|
18152
|
+
"name": "_resize",
|
|
18153
|
+
"privacy": "private",
|
|
18154
|
+
"readonly": true,
|
|
18155
|
+
"description": "Rebuilds the fire grid to cover the host's current box, then restarts it."
|
|
18156
|
+
},
|
|
18157
|
+
{
|
|
18158
|
+
"kind": "field",
|
|
18159
|
+
"name": "_restart",
|
|
18160
|
+
"privacy": "private",
|
|
18161
|
+
"readonly": true,
|
|
18162
|
+
"description": "Animates the fire, or draws one settled frame under reduced motion."
|
|
18163
|
+
},
|
|
18164
|
+
{
|
|
18165
|
+
"kind": "method",
|
|
18166
|
+
"name": "_stop",
|
|
18167
|
+
"privacy": "private",
|
|
18168
|
+
"return": {
|
|
18169
|
+
"type": {
|
|
18170
|
+
"text": "void"
|
|
18171
|
+
}
|
|
18172
|
+
}
|
|
18173
|
+
},
|
|
18174
|
+
{
|
|
18175
|
+
"kind": "field",
|
|
18176
|
+
"name": "_tick",
|
|
18177
|
+
"privacy": "private",
|
|
18178
|
+
"readonly": true
|
|
18179
|
+
},
|
|
18180
|
+
{
|
|
18181
|
+
"kind": "method",
|
|
18182
|
+
"name": "_step",
|
|
18183
|
+
"privacy": "private",
|
|
18184
|
+
"return": {
|
|
18185
|
+
"type": {
|
|
18186
|
+
"text": ""
|
|
18187
|
+
}
|
|
18188
|
+
},
|
|
18189
|
+
"description": "Advances the fire one step: the bottom row is fed with heat and every cell\nrises one row, drifting sideways and cooling at random."
|
|
18190
|
+
},
|
|
18191
|
+
{
|
|
18192
|
+
"kind": "method",
|
|
18193
|
+
"name": "_draw",
|
|
18194
|
+
"privacy": "private",
|
|
18195
|
+
"return": {
|
|
18196
|
+
"type": {
|
|
18197
|
+
"text": "void"
|
|
18198
|
+
}
|
|
18199
|
+
},
|
|
18200
|
+
"description": "Paints the heat grid to the canvas through the palette."
|
|
18201
|
+
}
|
|
18202
|
+
],
|
|
18203
|
+
"attributes": [
|
|
18204
|
+
{
|
|
18205
|
+
"name": "pixel-size",
|
|
18206
|
+
"type": {
|
|
18207
|
+
"text": "number"
|
|
18208
|
+
},
|
|
18209
|
+
"default": "4",
|
|
18210
|
+
"description": "Size of one fire pixel in CSS pixels; larger values look chunkier.",
|
|
18211
|
+
"fieldName": "pixelSize"
|
|
18212
|
+
},
|
|
18213
|
+
{
|
|
18214
|
+
"name": "intensity",
|
|
18215
|
+
"type": {
|
|
18216
|
+
"text": "number"
|
|
18217
|
+
},
|
|
18218
|
+
"default": "1",
|
|
18219
|
+
"description": "Heat of the fire's source, from `0` to `1`. Lowering it shortens the\nflames; `0` lets the fire burn out.",
|
|
18220
|
+
"fieldName": "intensity"
|
|
18221
|
+
},
|
|
18222
|
+
{
|
|
18223
|
+
"name": "contained",
|
|
18224
|
+
"type": {
|
|
18225
|
+
"text": "boolean"
|
|
18226
|
+
},
|
|
18227
|
+
"default": "false",
|
|
18228
|
+
"description": "Pins the fire to the bottom of the nearest positioned ancestor instead of\nthe viewport.",
|
|
18229
|
+
"fieldName": "contained"
|
|
18230
|
+
}
|
|
18231
|
+
],
|
|
18232
|
+
"superclass": {
|
|
18233
|
+
"name": "LitElement",
|
|
18234
|
+
"package": "lit"
|
|
18235
|
+
},
|
|
18236
|
+
"tagName": "pixel-fire",
|
|
18237
|
+
"customElement": true
|
|
18238
|
+
}
|
|
18239
|
+
],
|
|
18240
|
+
"exports": [
|
|
18241
|
+
{
|
|
18242
|
+
"kind": "js",
|
|
18243
|
+
"name": "PixelFire",
|
|
18244
|
+
"declaration": {
|
|
18245
|
+
"name": "PixelFire",
|
|
18246
|
+
"module": "src/pixel-fire.ts"
|
|
18247
|
+
}
|
|
18248
|
+
},
|
|
18249
|
+
{
|
|
18250
|
+
"kind": "custom-element-definition",
|
|
18251
|
+
"name": "pixel-fire",
|
|
18252
|
+
"declaration": {
|
|
18253
|
+
"name": "PixelFire",
|
|
18254
|
+
"module": "src/pixel-fire.ts"
|
|
18255
|
+
}
|
|
18256
|
+
}
|
|
18257
|
+
]
|
|
18258
|
+
},
|
|
17887
18259
|
{
|
|
17888
18260
|
"kind": "javascript-module",
|
|
17889
18261
|
"path": "src/popover-panel.ts",
|
|
@@ -25254,6 +25626,33 @@
|
|
|
25254
25626
|
"default": "200",
|
|
25255
25627
|
"description": "Widest node card, in pixels; longer labels are shortened with an ellipsis."
|
|
25256
25628
|
},
|
|
25629
|
+
{
|
|
25630
|
+
"kind": "variable",
|
|
25631
|
+
"name": "DAG_EDGE_LABEL_HEIGHT",
|
|
25632
|
+
"type": {
|
|
25633
|
+
"text": "number"
|
|
25634
|
+
},
|
|
25635
|
+
"default": "16",
|
|
25636
|
+
"description": "Height of an edge label's box, in pixels."
|
|
25637
|
+
},
|
|
25638
|
+
{
|
|
25639
|
+
"kind": "variable",
|
|
25640
|
+
"name": "DAG_EDGE_LABEL_PADDING",
|
|
25641
|
+
"type": {
|
|
25642
|
+
"text": "number"
|
|
25643
|
+
},
|
|
25644
|
+
"default": "4",
|
|
25645
|
+
"description": "Space on each side of an edge label's text, inside its box."
|
|
25646
|
+
},
|
|
25647
|
+
{
|
|
25648
|
+
"kind": "variable",
|
|
25649
|
+
"name": "DAG_MAX_EDGE_LABEL_WIDTH",
|
|
25650
|
+
"type": {
|
|
25651
|
+
"text": "number"
|
|
25652
|
+
},
|
|
25653
|
+
"default": "140",
|
|
25654
|
+
"description": "Widest edge label box, in pixels; longer labels are shortened with an ellipsis."
|
|
25655
|
+
},
|
|
25257
25656
|
{
|
|
25258
25657
|
"kind": "function",
|
|
25259
25658
|
"name": "approximateTextWidth",
|
|
@@ -25312,7 +25711,7 @@
|
|
|
25312
25711
|
{
|
|
25313
25712
|
"name": "edges",
|
|
25314
25713
|
"type": {
|
|
25315
|
-
"text": "
|
|
25714
|
+
"text": "DagLayoutEdgeInput[]"
|
|
25316
25715
|
}
|
|
25317
25716
|
},
|
|
25318
25717
|
{
|
|
@@ -25330,7 +25729,7 @@
|
|
|
25330
25729
|
}
|
|
25331
25730
|
}
|
|
25332
25731
|
],
|
|
25333
|
-
"description": "Lays out a directed graph in layers (Sugiyama-style, via dagre) so every edge points along `direction`.\n\nCycles are broken only to assign layers: every edge is returned, and the ones that close a cycle are marked\n`backward`. Edges whose endpoints are not both in `nodes`, self-edges, and duplicates are ignored. The result
|
|
25732
|
+
"description": "Lays out a directed graph in layers (Sugiyama-style, via dagre) so every edge points along `direction`.\n\nCycles are broken only to assign layers: every edge is returned, and the ones that close a cycle are marked\n`backward`. Edges whose endpoints are not both in `nodes`, self-edges, and duplicates are ignored (the last\nduplicate wins). Labeled edges reserve room for their label midway along the edge. The result does not depend\non input order."
|
|
25334
25733
|
}
|
|
25335
25734
|
],
|
|
25336
25735
|
"exports": [
|
|
@@ -25374,6 +25773,30 @@
|
|
|
25374
25773
|
"module": "src/utils/dag-layout.ts"
|
|
25375
25774
|
}
|
|
25376
25775
|
},
|
|
25776
|
+
{
|
|
25777
|
+
"kind": "js",
|
|
25778
|
+
"name": "DAG_EDGE_LABEL_HEIGHT",
|
|
25779
|
+
"declaration": {
|
|
25780
|
+
"name": "DAG_EDGE_LABEL_HEIGHT",
|
|
25781
|
+
"module": "src/utils/dag-layout.ts"
|
|
25782
|
+
}
|
|
25783
|
+
},
|
|
25784
|
+
{
|
|
25785
|
+
"kind": "js",
|
|
25786
|
+
"name": "DAG_EDGE_LABEL_PADDING",
|
|
25787
|
+
"declaration": {
|
|
25788
|
+
"name": "DAG_EDGE_LABEL_PADDING",
|
|
25789
|
+
"module": "src/utils/dag-layout.ts"
|
|
25790
|
+
}
|
|
25791
|
+
},
|
|
25792
|
+
{
|
|
25793
|
+
"kind": "js",
|
|
25794
|
+
"name": "DAG_MAX_EDGE_LABEL_WIDTH",
|
|
25795
|
+
"declaration": {
|
|
25796
|
+
"name": "DAG_MAX_EDGE_LABEL_WIDTH",
|
|
25797
|
+
"module": "src/utils/dag-layout.ts"
|
|
25798
|
+
}
|
|
25799
|
+
},
|
|
25377
25800
|
{
|
|
25378
25801
|
"kind": "js",
|
|
25379
25802
|
"name": "approximateTextWidth",
|
package/dist/dag-graph.d.ts
CHANGED
|
@@ -21,6 +21,16 @@ export interface DagEdge {
|
|
|
21
21
|
target: string;
|
|
22
22
|
/** Emphasizes the edge, e.g. as part of a highlighted path or cycle. */
|
|
23
23
|
highlighted?: boolean;
|
|
24
|
+
/**
|
|
25
|
+
* Text shown midway along the edge, with room reserved for it in the layout; long labels are shortened with an
|
|
26
|
+
* ellipsis (the full text is the tooltip).
|
|
27
|
+
*/
|
|
28
|
+
label?: string;
|
|
29
|
+
/**
|
|
30
|
+
* Non-negative magnitude, e.g. a call count: the edge is drawn thicker in proportion to the graph's heaviest
|
|
31
|
+
* weight (1px for none, up to 6px), and the weight is added to its tooltip. Other values are ignored.
|
|
32
|
+
*/
|
|
33
|
+
weight?: number;
|
|
24
34
|
}
|
|
25
35
|
/** Presentation of one node kind. */
|
|
26
36
|
export interface DagNodeKind {
|
|
@@ -54,6 +64,9 @@ export interface DagNodeSelectDetail {
|
|
|
54
64
|
* focus on the graph, arrow keys pan, `+`/`-` zoom, and `0` fits the graph. Clicking a node, or pressing
|
|
55
65
|
* Enter/Space on it, selects it. A toolbar in the top-right corner offers the `controls` you enable.
|
|
56
66
|
*
|
|
67
|
+
* Edges can carry an optional `label`, drawn midway along the edge, and an optional `weight`, which draws the
|
|
68
|
+
* edge thicker in proportion to the heaviest weight in the graph.
|
|
69
|
+
*
|
|
57
70
|
* Set `static` to present a fixed picture: the graph is always fitted into view, panning and zooming
|
|
58
71
|
* are off, and the toolbar is hidden; nodes can still be selected.
|
|
59
72
|
*
|
|
@@ -123,7 +136,18 @@ export declare class DagGraph extends LitElement {
|
|
|
123
136
|
private get _controls();
|
|
124
137
|
private _renderToolbar;
|
|
125
138
|
private _toggleDirection;
|
|
126
|
-
|
|
139
|
+
/** Pairs each laid-out edge with its input's presentation; on duplicate edges the last one wins. */
|
|
140
|
+
private _styledEdges;
|
|
141
|
+
/**
|
|
142
|
+
* Arrowheads for weighted edges, one per size and color: they grow more slowly than the stroke and sit just
|
|
143
|
+
* past the shortened path, so a thick stroke never pokes out beside the arrow's tip.
|
|
144
|
+
*/
|
|
145
|
+
private _renderWeightedArrows;
|
|
146
|
+
private _arrowId;
|
|
147
|
+
private _renderEdge;
|
|
148
|
+
private _renderEdgeLabel;
|
|
149
|
+
/** Pulls the last point back by `length` (at most 80% of the final segment) to make room for an arrowhead. */
|
|
150
|
+
private _shortenEnd;
|
|
127
151
|
private _renderNode;
|
|
128
152
|
private _renderLegend;
|
|
129
153
|
private _edgeKey;
|
package/dist/dag-graph.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dag-graph.d.ts","sourceRoot":"","sources":["../src/dag-graph.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAA2B,KAAK,cAAc,EAAE,KAAK,iBAAiB,EAAE,MAAM,KAAK,CAAC;AAYvG,OAAO,kBAAkB,CAAC;AAC1B,OAAO,
|
|
1
|
+
{"version":3,"file":"dag-graph.d.ts","sourceRoot":"","sources":["../src/dag-graph.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EA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