@opensip-cli/dashboard 0.1.7 → 0.1.8
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 +2 -2
- package/dist/__tests__/catalog-provenance.test.js +6 -24
- package/dist/__tests__/catalog-provenance.test.js.map +1 -1
- package/dist/__tests__/coupling-attribution.test.js +10 -14
- package/dist/__tests__/coupling-attribution.test.js.map +1 -1
- package/dist/__tests__/dashboard-bundle-weight.test.d.ts +9 -2
- package/dist/__tests__/dashboard-bundle-weight.test.d.ts.map +1 -1
- package/dist/__tests__/dashboard-bundle-weight.test.js +19 -12
- package/dist/__tests__/dashboard-bundle-weight.test.js.map +1 -1
- package/dist/__tests__/dashboard-cell-containment.test.js +5 -2
- package/dist/__tests__/dashboard-cell-containment.test.js.map +1 -1
- package/dist/__tests__/dashboard-editor-link.test.d.ts +9 -0
- package/dist/__tests__/dashboard-editor-link.test.d.ts.map +1 -1
- package/dist/__tests__/dashboard-editor-link.test.js +72 -21
- package/dist/__tests__/dashboard-editor-link.test.js.map +1 -1
- package/dist/__tests__/dashboard-filters.test.js +6 -14
- package/dist/__tests__/dashboard-filters.test.js.map +1 -1
- package/dist/__tests__/dashboard-function-card-singleton.test.js +15 -27
- package/dist/__tests__/dashboard-function-card-singleton.test.js.map +1 -1
- package/dist/__tests__/dashboard-function-card.test.d.ts +4 -4
- package/dist/__tests__/dashboard-function-card.test.js +23 -44
- package/dist/__tests__/dashboard-function-card.test.js.map +1 -1
- package/dist/__tests__/dashboard-function-row.test.js +6 -16
- package/dist/__tests__/dashboard-function-row.test.js.map +1 -1
- package/dist/__tests__/dashboard-generator-graph-catalog.test.js +3 -1
- package/dist/__tests__/dashboard-generator-graph-catalog.test.js.map +1 -1
- package/dist/__tests__/dashboard-graph-offline.integration.test.js +3 -1
- package/dist/__tests__/dashboard-graph-offline.integration.test.js.map +1 -1
- package/dist/__tests__/dashboard-help-drawer.test.js +11 -17
- package/dist/__tests__/dashboard-help-drawer.test.js.map +1 -1
- package/dist/__tests__/dashboard-indexes.test.d.ts +6 -4
- package/dist/__tests__/dashboard-indexes.test.d.ts.map +1 -1
- package/dist/__tests__/dashboard-indexes.test.js +10 -7
- package/dist/__tests__/dashboard-indexes.test.js.map +1 -1
- package/dist/__tests__/dashboard-path-utils.test.d.ts +7 -0
- package/dist/__tests__/dashboard-path-utils.test.d.ts.map +1 -1
- package/dist/__tests__/dashboard-path-utils.test.js +11 -3
- package/dist/__tests__/dashboard-path-utils.test.js.map +1 -1
- package/dist/__tests__/dashboard-search.test.d.ts +5 -0
- package/dist/__tests__/dashboard-search.test.d.ts.map +1 -1
- package/dist/__tests__/dashboard-search.test.js +9 -3
- package/dist/__tests__/dashboard-search.test.js.map +1 -1
- package/dist/__tests__/dashboard-sessions.test.js +13 -11
- package/dist/__tests__/dashboard-sessions.test.js.map +1 -1
- package/dist/__tests__/dashboard-trace.test.d.ts +11 -0
- package/dist/__tests__/dashboard-trace.test.d.ts.map +1 -1
- package/dist/__tests__/dashboard-trace.test.js +55 -32
- package/dist/__tests__/dashboard-trace.test.js.map +1 -1
- package/dist/__tests__/dashboard-view-conformance.test.js +9 -15
- package/dist/__tests__/dashboard-view-conformance.test.js.map +1 -1
- package/dist/__tests__/dashboard-view-coupling.test.js +14 -35
- package/dist/__tests__/dashboard-view-coupling.test.js.map +1 -1
- package/dist/__tests__/dashboard-view-distribution.test.js +14 -37
- package/dist/__tests__/dashboard-view-distribution.test.js.map +1 -1
- package/dist/__tests__/dashboard-view-graph.test.js +29 -62
- package/dist/__tests__/dashboard-view-graph.test.js.map +1 -1
- package/dist/__tests__/dashboard-view-template.test.d.ts +13 -14
- package/dist/__tests__/dashboard-view-template.test.d.ts.map +1 -1
- package/dist/__tests__/dashboard-view-template.test.js +165 -112
- package/dist/__tests__/dashboard-view-template.test.js.map +1 -1
- package/dist/__tests__/graph-tab.test.js +4 -2
- package/dist/__tests__/graph-tab.test.js.map +1 -1
- package/dist/client-bundle.generated.d.ts +2 -0
- package/dist/client-bundle.generated.d.ts.map +1 -0
- package/dist/client-bundle.generated.js +3 -0
- package/dist/client-bundle.generated.js.map +1 -0
- package/dist/code-paths/__tests__/views-registry.test.d.ts +13 -8
- package/dist/code-paths/__tests__/views-registry.test.d.ts.map +1 -1
- package/dist/code-paths/__tests__/views-registry.test.js +27 -25
- package/dist/code-paths/__tests__/views-registry.test.js.map +1 -1
- package/dist/code-paths.d.ts +21 -62
- package/dist/code-paths.d.ts.map +1 -1
- package/dist/code-paths.js +24 -349
- package/dist/code-paths.js.map +1 -1
- package/dist/generator.d.ts +2 -0
- package/dist/generator.d.ts.map +1 -1
- package/dist/generator.js +28 -17
- package/dist/generator.js.map +1 -1
- package/package.json +5 -4
- package/dist/checks.d.ts +0 -7
- package/dist/checks.d.ts.map +0 -1
- package/dist/checks.js +0 -283
- package/dist/checks.js.map +0 -1
- package/dist/code-paths/catalog-provenance.d.ts +0 -22
- package/dist/code-paths/catalog-provenance.d.ts.map +0 -1
- package/dist/code-paths/catalog-provenance.js +0 -108
- package/dist/code-paths/catalog-provenance.js.map +0 -1
- package/dist/code-paths/catalog-recipes-tables.d.ts +0 -11
- package/dist/code-paths/catalog-recipes-tables.d.ts.map +0 -1
- package/dist/code-paths/catalog-recipes-tables.js +0 -86
- package/dist/code-paths/catalog-recipes-tables.js.map +0 -1
- package/dist/code-paths/editor-link.d.ts +0 -10
- package/dist/code-paths/editor-link.d.ts.map +0 -1
- package/dist/code-paths/editor-link.js +0 -20
- package/dist/code-paths/editor-link.js.map +0 -1
- package/dist/code-paths/filters.d.ts +0 -19
- package/dist/code-paths/filters.d.ts.map +0 -1
- package/dist/code-paths/filters.js +0 -47
- package/dist/code-paths/filters.js.map +0 -1
- package/dist/code-paths/function-card.d.ts +0 -15
- package/dist/code-paths/function-card.d.ts.map +0 -1
- package/dist/code-paths/function-card.js +0 -169
- package/dist/code-paths/function-card.js.map +0 -1
- package/dist/code-paths/function-row.d.ts +0 -17
- package/dist/code-paths/function-row.d.ts.map +0 -1
- package/dist/code-paths/function-row.js +0 -77
- package/dist/code-paths/function-row.js.map +0 -1
- package/dist/code-paths/graph-controls.d.ts +0 -27
- package/dist/code-paths/graph-controls.d.ts.map +0 -1
- package/dist/code-paths/graph-controls.js +0 -257
- package/dist/code-paths/graph-controls.js.map +0 -1
- package/dist/code-paths/graph-stylesheet.d.ts +0 -22
- package/dist/code-paths/graph-stylesheet.d.ts.map +0 -1
- package/dist/code-paths/graph-stylesheet.js +0 -121
- package/dist/code-paths/graph-stylesheet.js.map +0 -1
- package/dist/code-paths/help-drawer.d.ts +0 -18
- package/dist/code-paths/help-drawer.d.ts.map +0 -1
- package/dist/code-paths/help-drawer.js +0 -54
- package/dist/code-paths/help-drawer.js.map +0 -1
- package/dist/code-paths/indexes.d.ts +0 -28
- package/dist/code-paths/indexes.d.ts.map +0 -1
- package/dist/code-paths/indexes.js +0 -97
- package/dist/code-paths/indexes.js.map +0 -1
- package/dist/code-paths/path-utils.d.ts +0 -15
- package/dist/code-paths/path-utils.d.ts.map +0 -1
- package/dist/code-paths/path-utils.js +0 -47
- package/dist/code-paths/path-utils.js.map +0 -1
- package/dist/code-paths/search.d.ts +0 -14
- package/dist/code-paths/search.d.ts.map +0 -1
- package/dist/code-paths/search.js +0 -54
- package/dist/code-paths/search.js.map +0 -1
- package/dist/code-paths/trace.d.ts +0 -11
- package/dist/code-paths/trace.d.ts.map +0 -1
- package/dist/code-paths/trace.js +0 -60
- package/dist/code-paths/trace.js.map +0 -1
- package/dist/code-paths/view-coupling.d.ts +0 -22
- package/dist/code-paths/view-coupling.d.ts.map +0 -1
- package/dist/code-paths/view-coupling.js +0 -218
- package/dist/code-paths/view-coupling.js.map +0 -1
- package/dist/code-paths/view-distribution.d.ts +0 -20
- package/dist/code-paths/view-distribution.d.ts.map +0 -1
- package/dist/code-paths/view-distribution.js +0 -82
- package/dist/code-paths/view-distribution.js.map +0 -1
- package/dist/code-paths/view-graph.d.ts +0 -35
- package/dist/code-paths/view-graph.d.ts.map +0 -1
- package/dist/code-paths/view-graph.js +0 -379
- package/dist/code-paths/view-graph.js.map +0 -1
- package/dist/code-paths/view-template.d.ts +0 -154
- package/dist/code-paths/view-template.d.ts.map +0 -1
- package/dist/code-paths/view-template.js +0 -218
- package/dist/code-paths/view-template.js.map +0 -1
- package/dist/code-paths/views-registry.d.ts +0 -13
- package/dist/code-paths/views-registry.d.ts.map +0 -1
- package/dist/code-paths/views-registry.js +0 -53
- package/dist/code-paths/views-registry.js.map +0 -1
- package/dist/overview.d.ts +0 -13
- package/dist/overview.d.ts.map +0 -1
- package/dist/overview.js +0 -91
- package/dist/overview.js.map +0 -1
- package/dist/recipes.d.ts +0 -6
- package/dist/recipes.d.ts.map +0 -1
- package/dist/recipes.js +0 -68
- package/dist/recipes.js.map +0 -1
- package/dist/sessions.d.ts +0 -6
- package/dist/sessions.d.ts.map +0 -1
- package/dist/sessions.js +0 -288
- package/dist/sessions.js.map +0 -1
- package/dist/shared/el.d.ts +0 -13
- package/dist/shared/el.d.ts.map +0 -1
- package/dist/shared/el.js +0 -27
- package/dist/shared/el.js.map +0 -1
- package/dist/shared/pagination.d.ts +0 -15
- package/dist/shared/pagination.d.ts.map +0 -1
- package/dist/shared/pagination.js +0 -113
- package/dist/shared/pagination.js.map +0 -1
- package/dist/shared/sortable.d.ts +0 -14
- package/dist/shared/sortable.d.ts.map +0 -1
- package/dist/shared/sortable.js +0 -101
- package/dist/shared/sortable.js.map +0 -1
- package/dist/shared/tab-activators.d.ts +0 -16
- package/dist/shared/tab-activators.d.ts.map +0 -1
- package/dist/shared/tab-activators.js +0 -33
- package/dist/shared/tab-activators.js.map +0 -1
- package/dist/shared/tab-bar.d.ts +0 -8
- package/dist/shared/tab-bar.d.ts.map +0 -1
- package/dist/shared/tab-bar.js +0 -20
- package/dist/shared/tab-bar.js.map +0 -1
- package/dist/shared.d.ts +0 -26
- package/dist/shared.d.ts.map +0 -1
- package/dist/shared.js +0 -39
- package/dist/shared.js.map +0 -1
- package/dist/subtab-bar.d.ts +0 -23
- package/dist/subtab-bar.d.ts.map +0 -1
- package/dist/subtab-bar.js +0 -77
- package/dist/subtab-bar.js.map +0 -1
- package/dist/tool-tabs.d.ts +0 -12
- package/dist/tool-tabs.d.ts.map +0 -1
- package/dist/tool-tabs.js +0 -80
- package/dist/tool-tabs.js.map +0 -1
|
@@ -1,121 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @fileoverview Cytoscape stylesheet for the Code Graph "Visualization" view.
|
|
3
|
-
*
|
|
4
|
-
* A render helper (registers no view), extracted from `view-graph.ts` to keep
|
|
5
|
-
* that emitter under the file-length budget and deliberately named out of the
|
|
6
|
-
* `view-*` namespace so it stays clear of the views-disjoint architecture
|
|
7
|
-
* rule. Emits the `gvStylesheet()` browser function as a JS string; the main
|
|
8
|
-
* emitter interpolates it into its `<script>` body.
|
|
9
|
-
*
|
|
10
|
-
* PACKAGE granularity (item 10): nodes are packages, not functions. The
|
|
11
|
-
* visual encoding is therefore simpler than the function-level original —
|
|
12
|
-
* uniform round-rectangle nodes sized by total coupling degree, edges
|
|
13
|
-
* thickened by call-count weight, plus the cross-package SCC accent and the
|
|
14
|
-
* shared selection/search/impact highlight classes.
|
|
15
|
-
*/
|
|
16
|
-
/**
|
|
17
|
-
* Emit the `gvStylesheet()` browser function as a JS string. No leading or
|
|
18
|
-
* trailing newline, so the main emitter can interpolate it where the inline
|
|
19
|
-
* function used to sit.
|
|
20
|
-
*/
|
|
21
|
-
export function dashboardViewGraphStylesheetJs() {
|
|
22
|
-
return String.raw `function gvStylesheet() {
|
|
23
|
-
return [
|
|
24
|
-
{
|
|
25
|
-
selector: 'node',
|
|
26
|
-
style: {
|
|
27
|
-
'background-color': '#c4956a',
|
|
28
|
-
'border-color': function(ele) { return ele.data('sccColor') || '#8a8a8a'; },
|
|
29
|
-
'border-width': function(ele) { return ele.data('sccId') ? 3 : 1; },
|
|
30
|
-
'shape': 'round-rectangle',
|
|
31
|
-
// Size by total coupling degree (fan-in + fan-out call count). The
|
|
32
|
-
// log-ish clamp keeps a megabus package from dwarfing the canvas.
|
|
33
|
-
'width': function(ele) { return 22 + Math.min(56, Math.sqrt(ele.data('totalCoupling') || 0) * 6); },
|
|
34
|
-
'height': function(ele) { return 22 + Math.min(56, Math.sqrt(ele.data('totalCoupling') || 0) * 6); },
|
|
35
|
-
'label': function(ele) { return ele.data('label') || ''; },
|
|
36
|
-
'font-size': 9,
|
|
37
|
-
'color': '#ddd',
|
|
38
|
-
'text-valign': 'bottom',
|
|
39
|
-
'text-halign': 'center',
|
|
40
|
-
'text-margin-y': 2,
|
|
41
|
-
'text-wrap': 'none',
|
|
42
|
-
},
|
|
43
|
-
},
|
|
44
|
-
{
|
|
45
|
-
selector: 'edge',
|
|
46
|
-
style: {
|
|
47
|
-
// Thickness by call-count weight (clamped). A solid uniform style —
|
|
48
|
-
// resolution/confidence encoding is function-level and not meaningful
|
|
49
|
-
// once edges are aggregated to packages.
|
|
50
|
-
'width': function(ele) { return 1 + Math.min(7, Math.sqrt(ele.data('weight') || 1) * 1.2); },
|
|
51
|
-
'line-color': '#5a5a5a',
|
|
52
|
-
'target-arrow-color': '#5a5a5a',
|
|
53
|
-
'target-arrow-shape': 'triangle',
|
|
54
|
-
'arrow-scale': 0.8,
|
|
55
|
-
'curve-style': 'bezier',
|
|
56
|
-
},
|
|
57
|
-
},
|
|
58
|
-
{
|
|
59
|
-
selector: 'edge[?isCycleEdge]',
|
|
60
|
-
style: { 'line-color': '#d46a6a', 'target-arrow-color': '#d46a6a' },
|
|
61
|
-
},
|
|
62
|
-
// Function-level "+ cross-package" mode only: a callee that lives OUTSIDE
|
|
63
|
-
// the selected package is drawn as a faded ellipse so the boundary reads
|
|
64
|
-
// at a glance. Package-level view-models never set 'external', so this
|
|
65
|
-
// selector is inert there.
|
|
66
|
-
{
|
|
67
|
-
selector: 'node[?external]',
|
|
68
|
-
style: { 'background-color': '#3a3a3a', 'border-color': '#666', 'color': '#9a9a9a', 'shape': 'ellipse', 'opacity': 0.55 },
|
|
69
|
-
},
|
|
70
|
-
{
|
|
71
|
-
selector: 'node.gv-search-hit',
|
|
72
|
-
style: { 'background-color': '#e0a96d', 'border-color': '#fff', 'border-width': 3, 'opacity': 1 },
|
|
73
|
-
},
|
|
74
|
-
{
|
|
75
|
-
selector: 'node.gv-search-fade',
|
|
76
|
-
style: { 'opacity': 0.12 },
|
|
77
|
-
},
|
|
78
|
-
{
|
|
79
|
-
selector: 'edge.gv-search-fade',
|
|
80
|
-
style: { 'opacity': 0.05 },
|
|
81
|
-
},
|
|
82
|
-
// Impact highlight (adapted to packages): clicking a package lights its
|
|
83
|
-
// direct caller packages (upstream) and callee packages (downstream).
|
|
84
|
-
// Accent palette mirrors the dashboard theme: --accent (selected),
|
|
85
|
-
// --accent-fitness (downstream), --accent-sim (upstream). Hard-coded
|
|
86
|
-
// because the Cytoscape canvas can't read CSS custom properties.
|
|
87
|
-
{
|
|
88
|
-
selector: 'node.gv-selected',
|
|
89
|
-
style: { 'background-color': '#e0a96d', 'border-color': '#fff', 'border-width': 4, 'opacity': 1 },
|
|
90
|
-
},
|
|
91
|
-
{
|
|
92
|
-
selector: 'node.gv-upstream',
|
|
93
|
-
style: { 'background-color': '#6a9bd4', 'opacity': 1 },
|
|
94
|
-
},
|
|
95
|
-
{
|
|
96
|
-
selector: 'node.gv-downstream',
|
|
97
|
-
style: { 'background-color': '#7ec47e', 'opacity': 1 },
|
|
98
|
-
},
|
|
99
|
-
{
|
|
100
|
-
selector: '.gv-dimmed',
|
|
101
|
-
style: { 'opacity': 0.1 },
|
|
102
|
-
},
|
|
103
|
-
// Cross-package cycle highlight (folded-in "Cycles / SCCs" affordance).
|
|
104
|
-
// Cycle members get a bright accent fill; cycle edges turn red and
|
|
105
|
-
// thicken; the acyclic remainder fades so multi-package cycles stand out.
|
|
106
|
-
{
|
|
107
|
-
selector: 'node.gv-scc-member',
|
|
108
|
-
style: { 'background-color': '#d46a6a', 'border-color': '#fff', 'border-width': 3, 'opacity': 1 },
|
|
109
|
-
},
|
|
110
|
-
{
|
|
111
|
-
selector: 'edge.gv-scc-edge',
|
|
112
|
-
style: { 'line-color': '#d46a6a', 'target-arrow-color': '#d46a6a', 'width': 3, 'opacity': 1 },
|
|
113
|
-
},
|
|
114
|
-
{
|
|
115
|
-
selector: '.gv-scc-dimmed',
|
|
116
|
-
style: { 'opacity': 0.08 },
|
|
117
|
-
},
|
|
118
|
-
];
|
|
119
|
-
}`;
|
|
120
|
-
}
|
|
121
|
-
//# sourceMappingURL=graph-stylesheet.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"graph-stylesheet.js","sourceRoot":"","sources":["../../src/code-paths/graph-stylesheet.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH;;;;GAIG;AACH,MAAM,UAAU,8BAA8B;IAC5C,OAAO,MAAM,CAAC,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAiGjB,CAAC;AACH,CAAC"}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Right-side help drawer — explains a single Explore view.
|
|
3
|
-
*
|
|
4
|
-
* Each view-*.ts puts a `help` field on its View literal:
|
|
5
|
-
* { title: string, sections: { heading: string, body: string }[] }
|
|
6
|
-
* Clicking the ⓘ icon next to a tab opens this drawer with that
|
|
7
|
-
* view's help. Clicking the backdrop, the × button, or pressing
|
|
8
|
-
* Escape closes it. There is one drawer at a time.
|
|
9
|
-
*
|
|
10
|
-
* The drawer resolves help dynamically via `getView(viewId).help` — there is
|
|
11
|
-
* NO static per-view help map. So the Plan B Code Paths restructure
|
|
12
|
-
* (dropping `big`/`hot`/`wide`/`untested`/`sccs` and folding cycle guidance
|
|
13
|
-
* into the graph view's help) needs no edit here: the drawer simply renders
|
|
14
|
-
* whatever views are registered. The SCC explanation now lives on the graph
|
|
15
|
-
* view's `help` ("Cycles / SCCs" section, view-graph.ts).
|
|
16
|
-
*/
|
|
17
|
-
export declare function dashboardHelpDrawerJs(): string;
|
|
18
|
-
//# sourceMappingURL=help-drawer.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"help-drawer.d.ts","sourceRoot":"","sources":["../../src/code-paths/help-drawer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,wBAAgB,qBAAqB,IAAI,MAAM,CAoC9C"}
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Right-side help drawer — explains a single Explore view.
|
|
3
|
-
*
|
|
4
|
-
* Each view-*.ts puts a `help` field on its View literal:
|
|
5
|
-
* { title: string, sections: { heading: string, body: string }[] }
|
|
6
|
-
* Clicking the ⓘ icon next to a tab opens this drawer with that
|
|
7
|
-
* view's help. Clicking the backdrop, the × button, or pressing
|
|
8
|
-
* Escape closes it. There is one drawer at a time.
|
|
9
|
-
*
|
|
10
|
-
* The drawer resolves help dynamically via `getView(viewId).help` — there is
|
|
11
|
-
* NO static per-view help map. So the Plan B Code Paths restructure
|
|
12
|
-
* (dropping `big`/`hot`/`wide`/`untested`/`sccs` and folding cycle guidance
|
|
13
|
-
* into the graph view's help) needs no edit here: the drawer simply renders
|
|
14
|
-
* whatever views are registered. The SCC explanation now lives on the graph
|
|
15
|
-
* view's `help` ("Cycles / SCCs" section, view-graph.ts).
|
|
16
|
-
*/
|
|
17
|
-
export function dashboardHelpDrawerJs() {
|
|
18
|
-
return String.raw `
|
|
19
|
-
function openHelpDrawer(viewId) {
|
|
20
|
-
const view = (typeof getView === 'function') ? getView(viewId) : null;
|
|
21
|
-
if (!view || !view.help) return;
|
|
22
|
-
closeHelpDrawer();
|
|
23
|
-
const overlay = el('div', { class: 'help-drawer-overlay', id: 'help-drawer-overlay' });
|
|
24
|
-
overlay.addEventListener('click', e => { if (e.target === overlay) closeHelpDrawer(); });
|
|
25
|
-
const drawer = el('aside', { class: 'help-drawer', role: 'dialog', 'aria-label': view.help.title || view.label });
|
|
26
|
-
const header = el('div', { class: 'help-drawer-header' });
|
|
27
|
-
header.appendChild(el('h3', { text: view.help.title || view.label }));
|
|
28
|
-
const closeBtn = el('button', { class: 'help-drawer-close', 'aria-label': 'Close', text: '×', onclick: closeHelpDrawer });
|
|
29
|
-
header.appendChild(closeBtn);
|
|
30
|
-
drawer.appendChild(header);
|
|
31
|
-
const body = el('div', { class: 'help-drawer-body' });
|
|
32
|
-
for (const section of (view.help.sections || [])) {
|
|
33
|
-
body.appendChild(el('h4', { text: section.heading }));
|
|
34
|
-
body.appendChild(el('p', { text: section.body }));
|
|
35
|
-
}
|
|
36
|
-
drawer.appendChild(body);
|
|
37
|
-
overlay.appendChild(drawer);
|
|
38
|
-
document.body.appendChild(overlay);
|
|
39
|
-
// Animate in on next frame so the CSS transition takes effect.
|
|
40
|
-
requestAnimationFrame(() => overlay.classList.add('open'));
|
|
41
|
-
closeBtn.focus();
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
function closeHelpDrawer() {
|
|
45
|
-
const existing = document.getElementById('help-drawer-overlay');
|
|
46
|
-
if (existing && existing.parentNode) existing.parentNode.removeChild(existing);
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
document.addEventListener('keydown', e => {
|
|
50
|
-
if (e.key === 'Escape' && document.getElementById('help-drawer-overlay')) closeHelpDrawer();
|
|
51
|
-
});
|
|
52
|
-
`;
|
|
53
|
-
}
|
|
54
|
-
//# sourceMappingURL=help-drawer.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"help-drawer.js","sourceRoot":"","sources":["../../src/code-paths/help-drawer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,MAAM,UAAU,qBAAqB;IACnC,OAAO,MAAM,CAAC,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkClB,CAAC;AACF,CAAC"}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Browser-side `Indexes` builder — emitted as a JS string for the
|
|
3
|
-
* inlined dashboard script. Mirrors v0.2's `pipeline/indexes.ts`
|
|
4
|
-
* but ported to vanilla JS that runs in the page.
|
|
5
|
-
*
|
|
6
|
-
* The catalog persists only `functions[name][i].calls[].to[]`. v0.2's
|
|
7
|
-
* O(1) `Indexes` is in-memory only; the dashboard rebuilds it on
|
|
8
|
-
* panel-init time. Output: { byBodyHash, occurrencesByHash,
|
|
9
|
-
* bySimpleName, callees, callers }.
|
|
10
|
-
*
|
|
11
|
-
* Blast radius is no longer computed here. The engine's features stage
|
|
12
|
-
* (`pipeline/features.ts`, Plan C) is the single canonical home for the
|
|
13
|
-
* bounded reverse-BFS blast score; a dashboard-bound run materializes it
|
|
14
|
-
* into `catalog.features.function[bodyHash].blast` and the Hot view reads
|
|
15
|
-
* it from there (falling back to the raw inbound-caller count when the
|
|
16
|
-
* catalog carries no features). This builder now only assembles the
|
|
17
|
-
* adjacency the views need for navigation and member resolution.
|
|
18
|
-
*
|
|
19
|
-
* Also emits `resolveCalleeOcc(target, callerOcc, indexes)` — the shared
|
|
20
|
-
* call-target → callee-occurrence resolver. It lives here (not in any single
|
|
21
|
-
* view) because more than one view needs it: the Coupling drilldown AND the
|
|
22
|
-
* function-level Visualization both resolve a call target's bodyHash to the
|
|
23
|
-
* occurrence the caller can actually reach, disambiguating body-hash
|
|
24
|
-
* collisions across packages. Emitting it in the prelude (ahead of every
|
|
25
|
-
* view) removes the load-bearing cross-view emission order it used to imply.
|
|
26
|
-
*/
|
|
27
|
-
export declare function dashboardIndexesJs(): string;
|
|
28
|
-
//# sourceMappingURL=indexes.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"indexes.d.ts","sourceRoot":"","sources":["../../src/code-paths/indexes.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,wBAAgB,kBAAkB,IAAI,MAAM,CAqE3C"}
|
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Browser-side `Indexes` builder — emitted as a JS string for the
|
|
3
|
-
* inlined dashboard script. Mirrors v0.2's `pipeline/indexes.ts`
|
|
4
|
-
* but ported to vanilla JS that runs in the page.
|
|
5
|
-
*
|
|
6
|
-
* The catalog persists only `functions[name][i].calls[].to[]`. v0.2's
|
|
7
|
-
* O(1) `Indexes` is in-memory only; the dashboard rebuilds it on
|
|
8
|
-
* panel-init time. Output: { byBodyHash, occurrencesByHash,
|
|
9
|
-
* bySimpleName, callees, callers }.
|
|
10
|
-
*
|
|
11
|
-
* Blast radius is no longer computed here. The engine's features stage
|
|
12
|
-
* (`pipeline/features.ts`, Plan C) is the single canonical home for the
|
|
13
|
-
* bounded reverse-BFS blast score; a dashboard-bound run materializes it
|
|
14
|
-
* into `catalog.features.function[bodyHash].blast` and the Hot view reads
|
|
15
|
-
* it from there (falling back to the raw inbound-caller count when the
|
|
16
|
-
* catalog carries no features). This builder now only assembles the
|
|
17
|
-
* adjacency the views need for navigation and member resolution.
|
|
18
|
-
*
|
|
19
|
-
* Also emits `resolveCalleeOcc(target, callerOcc, indexes)` — the shared
|
|
20
|
-
* call-target → callee-occurrence resolver. It lives here (not in any single
|
|
21
|
-
* view) because more than one view needs it: the Coupling drilldown AND the
|
|
22
|
-
* function-level Visualization both resolve a call target's bodyHash to the
|
|
23
|
-
* occurrence the caller can actually reach, disambiguating body-hash
|
|
24
|
-
* collisions across packages. Emitting it in the prelude (ahead of every
|
|
25
|
-
* view) removes the load-bearing cross-view emission order it used to imply.
|
|
26
|
-
*/
|
|
27
|
-
export function dashboardIndexesJs() {
|
|
28
|
-
return String.raw `
|
|
29
|
-
function buildIndexes(catalog) {
|
|
30
|
-
const byBodyHash = new Map();
|
|
31
|
-
// All occurrences per body. byBodyHash keeps only one (last-writer-wins),
|
|
32
|
-
// collapsing identical bodies across packages; occurrencesByHash preserves
|
|
33
|
-
// every occurrence so coupling can attribute a callee to the correct
|
|
34
|
-
// package instead of the collision winner.
|
|
35
|
-
const occurrencesByHash = new Map();
|
|
36
|
-
const bySimpleName = new Map();
|
|
37
|
-
const callees = new Map();
|
|
38
|
-
const callers = new Map();
|
|
39
|
-
if (!catalog || !catalog.functions) {
|
|
40
|
-
return { byBodyHash, occurrencesByHash, bySimpleName, callees, callers };
|
|
41
|
-
}
|
|
42
|
-
// Pass 1: byBodyHash + occurrencesByHash + bySimpleName.
|
|
43
|
-
for (const name of Object.keys(catalog.functions)) {
|
|
44
|
-
const occs = catalog.functions[name] || [];
|
|
45
|
-
for (const occ of occs) {
|
|
46
|
-
byBodyHash.set(occ.bodyHash, occ);
|
|
47
|
-
let all = occurrencesByHash.get(occ.bodyHash);
|
|
48
|
-
if (!all) { all = []; occurrencesByHash.set(occ.bodyHash, all); }
|
|
49
|
-
all.push(occ);
|
|
50
|
-
let bucket = bySimpleName.get(name);
|
|
51
|
-
if (!bucket) { bucket = []; bySimpleName.set(name, bucket); }
|
|
52
|
-
bucket.push(occ.bodyHash);
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
// Pass 2: callees (forward) + callers (reverse). Edges that resolve
|
|
56
|
-
// to a hash not in byBodyHash are dropped; this mirrors v0.2's
|
|
57
|
-
// behavior for unresolved/external targets.
|
|
58
|
-
for (const occ of byBodyHash.values()) {
|
|
59
|
-
const out = [];
|
|
60
|
-
for (const edge of (occ.calls || [])) {
|
|
61
|
-
for (const target of (edge.to || [])) {
|
|
62
|
-
if (!byBodyHash.has(target)) continue;
|
|
63
|
-
out.push(target);
|
|
64
|
-
let inb = callers.get(target);
|
|
65
|
-
if (!inb) { inb = []; callers.set(target, inb); }
|
|
66
|
-
inb.push(occ.bodyHash);
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
if (out.length > 0) callees.set(occ.bodyHash, out);
|
|
70
|
-
}
|
|
71
|
-
return { byBodyHash, occurrencesByHash, bySimpleName, callees, callers };
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
// Resolve a call target (a bodyHash) to the callee occurrence the caller can
|
|
75
|
-
// reach, disambiguating body-hash collisions across packages. byBodyHash
|
|
76
|
-
// keeps only one occurrence per hash (the collision winner), which
|
|
77
|
-
// mis-attributes the callee's package; occurrencesByHash preserves all, so we
|
|
78
|
-
// prefer the caller's own package, else fall back deterministically (lowest
|
|
79
|
-
// qualifiedName). The dashboard catalog carries no import set, so this mirrors
|
|
80
|
-
// the engine's fast-mode (same-package-only) attribution. Used by the Coupling
|
|
81
|
-
// drilldown and the function-level Visualization projection.
|
|
82
|
-
function resolveCalleeOcc(target, callerOcc, indexes) {
|
|
83
|
-
const candidates = (indexes.occurrencesByHash && indexes.occurrencesByHash.get(target)) || null;
|
|
84
|
-
if (!candidates || candidates.length === 0) return indexes.byBodyHash.get(target);
|
|
85
|
-
if (candidates.length === 1) return candidates[0];
|
|
86
|
-
const callerPkg = pkgOf(callerOcc);
|
|
87
|
-
let samePkg = null;
|
|
88
|
-
let lowest = candidates[0];
|
|
89
|
-
for (const c of candidates) {
|
|
90
|
-
if (!samePkg && pkgOf(c) === callerPkg) samePkg = c;
|
|
91
|
-
if (c.qualifiedName < lowest.qualifiedName) lowest = c;
|
|
92
|
-
}
|
|
93
|
-
return samePkg || lowest;
|
|
94
|
-
}
|
|
95
|
-
`;
|
|
96
|
-
}
|
|
97
|
-
//# sourceMappingURL=indexes.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"indexes.js","sourceRoot":"","sources":["../../src/code-paths/indexes.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,MAAM,UAAU,kBAAkB;IAChC,OAAO,MAAM,CAAC,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmElB,CAAC;AACF,CAAC"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Path / name display helpers shared across the Explore views.
|
|
3
|
-
*
|
|
4
|
-
* - pkgOf: the package an occurrence belongs to — prefers the
|
|
5
|
-
* build-time-stamped `occurrence.package` (nearest package.json name, shown
|
|
6
|
-
* scope-stripped), falling back to the path heuristic for old catalogs.
|
|
7
|
-
* - packageOfPath: path-only fallback (first segment under packages/).
|
|
8
|
-
* - displayName: collapse synthetic graph names like
|
|
9
|
-
* "<arrow:packages/.../foo.ts:234:45>" into a short tag the table
|
|
10
|
-
* can render without horizontal overflow. The underlying simpleName
|
|
11
|
-
* is preserved as the identity (data-body-hash); only the cell text
|
|
12
|
-
* is shortened.
|
|
13
|
-
*/
|
|
14
|
-
export declare function dashboardPathUtilsJs(): string;
|
|
15
|
-
//# sourceMappingURL=path-utils.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"path-utils.d.ts","sourceRoot":"","sources":["../../src/code-paths/path-utils.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,wBAAgB,oBAAoB,IAAI,MAAM,CAgC7C"}
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Path / name display helpers shared across the Explore views.
|
|
3
|
-
*
|
|
4
|
-
* - pkgOf: the package an occurrence belongs to — prefers the
|
|
5
|
-
* build-time-stamped `occurrence.package` (nearest package.json name, shown
|
|
6
|
-
* scope-stripped), falling back to the path heuristic for old catalogs.
|
|
7
|
-
* - packageOfPath: path-only fallback (first segment under packages/).
|
|
8
|
-
* - displayName: collapse synthetic graph names like
|
|
9
|
-
* "<arrow:packages/.../foo.ts:234:45>" into a short tag the table
|
|
10
|
-
* can render without horizontal overflow. The underlying simpleName
|
|
11
|
-
* is preserved as the identity (data-body-hash); only the cell text
|
|
12
|
-
* is shortened.
|
|
13
|
-
*/
|
|
14
|
-
export function dashboardPathUtilsJs() {
|
|
15
|
-
return String.raw `
|
|
16
|
-
function packageOfPath(filePath) {
|
|
17
|
-
if (typeof filePath !== 'string' || filePath.length === 0) return '<unknown>';
|
|
18
|
-
const m = /^packages\/([^/]+)\//.exec(filePath);
|
|
19
|
-
return m ? m[1] : '<unknown>';
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
// Strip an npm scope for display: "@opensip-cli/lang-typescript" -> "lang-typescript".
|
|
23
|
-
function shortPkg(name) {
|
|
24
|
-
if (typeof name !== 'string') return '<unknown>';
|
|
25
|
-
return name.charCodeAt(0) === 64 /* @ */ ? name.slice(name.indexOf('/') + 1) : name;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
// The package an occurrence belongs to. Prefers the build-time-stamped
|
|
29
|
-
// occurrence.package (accurate for any repo layout); falls back to the path
|
|
30
|
-
// heuristic for legacy catalogs. Scope-stripped for compact display.
|
|
31
|
-
function pkgOf(occ) {
|
|
32
|
-
if (occ && typeof occ.package === 'string' && occ.package.length > 0) return shortPkg(occ.package);
|
|
33
|
-
return packageOfPath(occ ? occ.filePath : '');
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
function displayName(simpleName) {
|
|
37
|
-
if (typeof simpleName !== 'string') return '';
|
|
38
|
-
// Synthetic names from the graph tool are angle-bracketed:
|
|
39
|
-
// <arrow:path:line:col>, <fn-expr:path:line:col>, <module-init:path>, <default>
|
|
40
|
-
// Render just the kind tag — file:line is shown in the File column.
|
|
41
|
-
const m = /^<([a-z-]+)(?::|>)/.exec(simpleName);
|
|
42
|
-
if (m) return '<' + m[1] + '>';
|
|
43
|
-
return simpleName;
|
|
44
|
-
}
|
|
45
|
-
`;
|
|
46
|
-
}
|
|
47
|
-
//# sourceMappingURL=path-utils.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"path-utils.js","sourceRoot":"","sources":["../../src/code-paths/path-utils.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,MAAM,UAAU,oBAAoB;IAClC,OAAO,MAAM,CAAC,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8BlB,CAAC;AACF,CAAC"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Substring-with-character-skip fuzzy match for the persistent search
|
|
3
|
-
* input and View 7. Pure algorithm emitted as a JS string.
|
|
4
|
-
*
|
|
5
|
-
* Algorithm: each character of the query must appear in the candidate
|
|
6
|
-
* in order, but not necessarily contiguously. Score is built from:
|
|
7
|
-
* - prefix match (start at index 0): +50
|
|
8
|
-
* - exact-case bonus per matched char: +1
|
|
9
|
-
* - contiguous-run bonus (matched-after-matched): +2 per
|
|
10
|
-
* - shorter candidate preferred: -length * 0.01
|
|
11
|
-
* Returns top matches sorted by score desc, score >= 0.
|
|
12
|
-
*/
|
|
13
|
-
export declare function dashboardSearchJs(): string;
|
|
14
|
-
//# sourceMappingURL=search.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"search.d.ts","sourceRoot":"","sources":["../../src/code-paths/search.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,wBAAgB,iBAAiB,IAAI,MAAM,CAwC1C"}
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Substring-with-character-skip fuzzy match for the persistent search
|
|
3
|
-
* input and View 7. Pure algorithm emitted as a JS string.
|
|
4
|
-
*
|
|
5
|
-
* Algorithm: each character of the query must appear in the candidate
|
|
6
|
-
* in order, but not necessarily contiguously. Score is built from:
|
|
7
|
-
* - prefix match (start at index 0): +50
|
|
8
|
-
* - exact-case bonus per matched char: +1
|
|
9
|
-
* - contiguous-run bonus (matched-after-matched): +2 per
|
|
10
|
-
* - shorter candidate preferred: -length * 0.01
|
|
11
|
-
* Returns top matches sorted by score desc, score >= 0.
|
|
12
|
-
*/
|
|
13
|
-
export function dashboardSearchJs() {
|
|
14
|
-
return String.raw `
|
|
15
|
-
function fuzzyMatch(query, names) {
|
|
16
|
-
const q = (query || '').trim();
|
|
17
|
-
if (q.length === 0) return [];
|
|
18
|
-
const qLower = q.toLowerCase();
|
|
19
|
-
const out = [];
|
|
20
|
-
for (const name of names) {
|
|
21
|
-
const score = fuzzyScore(qLower, q, name);
|
|
22
|
-
if (score < 0) continue;
|
|
23
|
-
out.push({ name, score });
|
|
24
|
-
}
|
|
25
|
-
out.sort((a, b) => b.score - a.score);
|
|
26
|
-
return out;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
function fuzzyScore(qLower, q, name) {
|
|
30
|
-
if (typeof name !== 'string' || name.length === 0) return -1;
|
|
31
|
-
const nameLower = name.toLowerCase();
|
|
32
|
-
let qi = 0;
|
|
33
|
-
let score = 0;
|
|
34
|
-
let lastMatchIdx = -2;
|
|
35
|
-
for (let i = 0; i < name.length && qi < qLower.length; i++) {
|
|
36
|
-
if (nameLower[i] === qLower[qi]) {
|
|
37
|
-
// Exact-case bonus.
|
|
38
|
-
if (name[i] === q[qi]) score += 1;
|
|
39
|
-
// Contiguous-run bonus.
|
|
40
|
-
if (i === lastMatchIdx + 1) score += 2;
|
|
41
|
-
// Prefix bonus when matching the very first char at index 0.
|
|
42
|
-
if (i === 0 && qi === 0) score += 50;
|
|
43
|
-
lastMatchIdx = i;
|
|
44
|
-
qi++;
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
if (qi < qLower.length) return -1;
|
|
48
|
-
// Shorter is better.
|
|
49
|
-
score -= name.length * 0.01;
|
|
50
|
-
return score;
|
|
51
|
-
}
|
|
52
|
-
`;
|
|
53
|
-
}
|
|
54
|
-
//# sourceMappingURL=search.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"search.js","sourceRoot":"","sources":["../../src/code-paths/search.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,MAAM,UAAU,iBAAiB;IAC/B,OAAO,MAAM,CAAC,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsClB,CAAC;AACF,CAAC"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* BFS from inferred entry-point set to a target bodyHash.
|
|
3
|
-
*
|
|
4
|
-
* Entry-point heuristic mirrors v0.2's: any function in
|
|
5
|
-
* `packages/cli/src/index.ts`, plus any exported function with no
|
|
6
|
-
* callers in catalog. Returns the shortest path as a bodyHash[]
|
|
7
|
-
* starting at an entry point and ending at the target. Returns null
|
|
8
|
-
* when no entry point reaches the target.
|
|
9
|
-
*/
|
|
10
|
-
export declare function dashboardTraceJs(): string;
|
|
11
|
-
//# sourceMappingURL=trace.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"trace.d.ts","sourceRoot":"","sources":["../../src/code-paths/trace.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,wBAAgB,gBAAgB,IAAI,MAAM,CAiDzC"}
|
package/dist/code-paths/trace.js
DELETED
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* BFS from inferred entry-point set to a target bodyHash.
|
|
3
|
-
*
|
|
4
|
-
* Entry-point heuristic mirrors v0.2's: any function in
|
|
5
|
-
* `packages/cli/src/index.ts`, plus any exported function with no
|
|
6
|
-
* callers in catalog. Returns the shortest path as a bodyHash[]
|
|
7
|
-
* starting at an entry point and ending at the target. Returns null
|
|
8
|
-
* when no entry point reaches the target.
|
|
9
|
-
*/
|
|
10
|
-
export function dashboardTraceJs() {
|
|
11
|
-
return String.raw `
|
|
12
|
-
function inferEntryPointHashes(catalog, indexes) {
|
|
13
|
-
const entries = [];
|
|
14
|
-
if (!catalog || !catalog.functions) return entries;
|
|
15
|
-
for (const occ of indexes.byBodyHash.values()) {
|
|
16
|
-
const isCli = occ.filePath === 'packages/cli/src/index.ts';
|
|
17
|
-
const callerList = indexes.callers.get(occ.bodyHash) || [];
|
|
18
|
-
const isExportedRoot = occ.visibility === 'exported' && callerList.length === 0;
|
|
19
|
-
if (isCli || isExportedRoot) entries.push(occ.bodyHash);
|
|
20
|
-
}
|
|
21
|
-
return entries;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
function traceFromEntry(targetHash, catalog, indexes) {
|
|
25
|
-
if (!targetHash || !indexes || !indexes.byBodyHash.has(targetHash)) return null;
|
|
26
|
-
const entries = inferEntryPointHashes(catalog, indexes);
|
|
27
|
-
if (entries.length === 0) return null;
|
|
28
|
-
// BFS over the forward (callees) graph; record predecessors so we
|
|
29
|
-
// can reconstruct the path on the first hit.
|
|
30
|
-
const queue = [];
|
|
31
|
-
const visited = new Set();
|
|
32
|
-
const parent = new Map();
|
|
33
|
-
for (const e of entries) {
|
|
34
|
-
queue.push(e);
|
|
35
|
-
visited.add(e);
|
|
36
|
-
}
|
|
37
|
-
while (queue.length > 0) {
|
|
38
|
-
const v = queue.shift();
|
|
39
|
-
if (v === targetHash) {
|
|
40
|
-
const path = [];
|
|
41
|
-
let cur = v;
|
|
42
|
-
while (cur !== undefined) {
|
|
43
|
-
path.unshift(cur);
|
|
44
|
-
cur = parent.get(cur);
|
|
45
|
-
}
|
|
46
|
-
return path;
|
|
47
|
-
}
|
|
48
|
-
const adj = indexes.callees.get(v) || [];
|
|
49
|
-
for (const w of adj) {
|
|
50
|
-
if (visited.has(w)) continue;
|
|
51
|
-
visited.add(w);
|
|
52
|
-
parent.set(w, v);
|
|
53
|
-
queue.push(w);
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
return null;
|
|
57
|
-
}
|
|
58
|
-
`;
|
|
59
|
-
}
|
|
60
|
-
//# sourceMappingURL=trace.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"trace.js","sourceRoot":"","sources":["../../src/code-paths/trace.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,MAAM,UAAU,gBAAgB;IAC9B,OAAO,MAAM,CAAC,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+ClB,CAAC;AACF,CAAC"}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* View 4 — "Package coupling heat map".
|
|
3
|
-
*
|
|
4
|
-
* Reads the engine-emitted `catalog.features.edge` rows (Plan C — the
|
|
5
|
-
* dashboard no longer re-aggregates call edges client-side); each row is a
|
|
6
|
-
* { callerPackage, calleePackage, count } directed coupling edge. Renders a
|
|
7
|
-
* per-package N×N table with text-shaded density (CSS custom property
|
|
8
|
-
* --coupling-density).
|
|
9
|
-
*
|
|
10
|
-
* The matrix is the WHOLE-GRAPH (unfiltered) coupling matrix — the filter
|
|
11
|
-
* chips no longer narrow it (it is a whole-graph insight). When the catalog
|
|
12
|
-
* carries no `edge` feature (a non-dashboard run) the view shows a no-data
|
|
13
|
-
* empty state.
|
|
14
|
-
*
|
|
15
|
-
* Empty cells (no calls in this direction) show '·' and are not
|
|
16
|
-
* clickable. Non-empty cells render the count; click → opens a
|
|
17
|
-
* Function Card list of the actual call sites for that pair (the drilldown
|
|
18
|
-
* keeps its own per-call-site walk, which the aggregate edge feature can't
|
|
19
|
-
* provide).
|
|
20
|
-
*/
|
|
21
|
-
export declare function dashboardViewCouplingJs(): string;
|
|
22
|
-
//# sourceMappingURL=view-coupling.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"view-coupling.d.ts","sourceRoot":"","sources":["../../src/code-paths/view-coupling.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,wBAAgB,uBAAuB,IAAI,MAAM,CAoMhD"}
|