@opensip-cli/dashboard 0.1.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/LICENSE +202 -0
- package/NOTICE +8 -0
- package/README.md +31 -0
- package/dist/__tests__/catalog-provenance.test.d.ts +11 -0
- package/dist/__tests__/catalog-provenance.test.d.ts.map +1 -0
- package/dist/__tests__/catalog-provenance.test.js +130 -0
- package/dist/__tests__/catalog-provenance.test.js.map +1 -0
- package/dist/__tests__/coupling-attribution.test.d.ts +9 -0
- package/dist/__tests__/coupling-attribution.test.d.ts.map +1 -0
- package/dist/__tests__/coupling-attribution.test.js +99 -0
- package/dist/__tests__/coupling-attribution.test.js.map +1 -0
- package/dist/__tests__/dashboard-bundle-weight.test.d.ts +16 -0
- package/dist/__tests__/dashboard-bundle-weight.test.d.ts.map +1 -0
- package/dist/__tests__/dashboard-bundle-weight.test.js +73 -0
- package/dist/__tests__/dashboard-bundle-weight.test.js.map +1 -0
- package/dist/__tests__/dashboard-cell-containment.test.d.ts +2 -0
- package/dist/__tests__/dashboard-cell-containment.test.d.ts.map +1 -0
- package/dist/__tests__/dashboard-cell-containment.test.js +49 -0
- package/dist/__tests__/dashboard-cell-containment.test.js.map +1 -0
- package/dist/__tests__/dashboard-cytoscape-vendor.test.d.ts +10 -0
- package/dist/__tests__/dashboard-cytoscape-vendor.test.d.ts.map +1 -0
- package/dist/__tests__/dashboard-cytoscape-vendor.test.js +40 -0
- package/dist/__tests__/dashboard-cytoscape-vendor.test.js.map +1 -0
- package/dist/__tests__/dashboard-editor-link.test.d.ts +5 -0
- package/dist/__tests__/dashboard-editor-link.test.d.ts.map +1 -0
- package/dist/__tests__/dashboard-editor-link.test.js +36 -0
- package/dist/__tests__/dashboard-editor-link.test.js.map +1 -0
- package/dist/__tests__/dashboard-filters.test.d.ts +9 -0
- package/dist/__tests__/dashboard-filters.test.d.ts.map +1 -0
- package/dist/__tests__/dashboard-filters.test.js +95 -0
- package/dist/__tests__/dashboard-filters.test.js.map +1 -0
- package/dist/__tests__/dashboard-function-card-singleton.test.d.ts +9 -0
- package/dist/__tests__/dashboard-function-card-singleton.test.d.ts.map +1 -0
- package/dist/__tests__/dashboard-function-card-singleton.test.js +87 -0
- package/dist/__tests__/dashboard-function-card-singleton.test.js.map +1 -0
- package/dist/__tests__/dashboard-function-card.test.d.ts +10 -0
- package/dist/__tests__/dashboard-function-card.test.d.ts.map +1 -0
- package/dist/__tests__/dashboard-function-card.test.js +403 -0
- package/dist/__tests__/dashboard-function-card.test.js.map +1 -0
- package/dist/__tests__/dashboard-function-row.test.d.ts +11 -0
- package/dist/__tests__/dashboard-function-row.test.d.ts.map +1 -0
- package/dist/__tests__/dashboard-function-row.test.js +101 -0
- package/dist/__tests__/dashboard-function-row.test.js.map +1 -0
- package/dist/__tests__/dashboard-generator-graph-catalog.test.d.ts +9 -0
- package/dist/__tests__/dashboard-generator-graph-catalog.test.d.ts.map +1 -0
- package/dist/__tests__/dashboard-generator-graph-catalog.test.js +75 -0
- package/dist/__tests__/dashboard-generator-graph-catalog.test.js.map +1 -0
- package/dist/__tests__/dashboard-graph-offline.integration.test.d.ts +13 -0
- package/dist/__tests__/dashboard-graph-offline.integration.test.d.ts.map +1 -0
- package/dist/__tests__/dashboard-graph-offline.integration.test.js +55 -0
- package/dist/__tests__/dashboard-graph-offline.integration.test.js.map +1 -0
- package/dist/__tests__/dashboard-graph-scc.test.d.ts +17 -0
- package/dist/__tests__/dashboard-graph-scc.test.d.ts.map +1 -0
- package/dist/__tests__/dashboard-graph-scc.test.js +89 -0
- package/dist/__tests__/dashboard-graph-scc.test.js.map +1 -0
- package/dist/__tests__/dashboard-graph-view-model.test.d.ts +12 -0
- package/dist/__tests__/dashboard-graph-view-model.test.d.ts.map +1 -0
- package/dist/__tests__/dashboard-graph-view-model.test.js +331 -0
- package/dist/__tests__/dashboard-graph-view-model.test.js.map +1 -0
- package/dist/__tests__/dashboard-help-drawer.test.d.ts +9 -0
- package/dist/__tests__/dashboard-help-drawer.test.d.ts.map +1 -0
- package/dist/__tests__/dashboard-help-drawer.test.js +101 -0
- package/dist/__tests__/dashboard-help-drawer.test.js.map +1 -0
- package/dist/__tests__/dashboard-html.test.d.ts +2 -0
- package/dist/__tests__/dashboard-html.test.d.ts.map +1 -0
- package/dist/__tests__/dashboard-html.test.js +169 -0
- package/dist/__tests__/dashboard-html.test.js.map +1 -0
- package/dist/__tests__/dashboard-indexes.test.d.ts +9 -0
- package/dist/__tests__/dashboard-indexes.test.d.ts.map +1 -0
- package/dist/__tests__/dashboard-indexes.test.js +211 -0
- package/dist/__tests__/dashboard-indexes.test.js.map +1 -0
- package/dist/__tests__/dashboard-path-utils.test.d.ts +6 -0
- package/dist/__tests__/dashboard-path-utils.test.d.ts.map +1 -0
- package/dist/__tests__/dashboard-path-utils.test.js +54 -0
- package/dist/__tests__/dashboard-path-utils.test.js.map +1 -0
- package/dist/__tests__/dashboard-search.test.d.ts +5 -0
- package/dist/__tests__/dashboard-search.test.d.ts.map +1 -0
- package/dist/__tests__/dashboard-search.test.js +46 -0
- package/dist/__tests__/dashboard-search.test.js.map +1 -0
- package/dist/__tests__/dashboard-sessions.test.d.ts +14 -0
- package/dist/__tests__/dashboard-sessions.test.d.ts.map +1 -0
- package/dist/__tests__/dashboard-sessions.test.js +330 -0
- package/dist/__tests__/dashboard-sessions.test.js.map +1 -0
- package/dist/__tests__/dashboard-trace.test.d.ts +5 -0
- package/dist/__tests__/dashboard-trace.test.d.ts.map +1 -0
- package/dist/__tests__/dashboard-trace.test.js +147 -0
- package/dist/__tests__/dashboard-trace.test.js.map +1 -0
- package/dist/__tests__/dashboard-validation.integration.test.d.ts +14 -0
- package/dist/__tests__/dashboard-validation.integration.test.d.ts.map +1 -0
- package/dist/__tests__/dashboard-validation.integration.test.js +221 -0
- package/dist/__tests__/dashboard-validation.integration.test.js.map +1 -0
- package/dist/__tests__/dashboard-view-conformance.test.d.ts +12 -0
- package/dist/__tests__/dashboard-view-conformance.test.d.ts.map +1 -0
- package/dist/__tests__/dashboard-view-conformance.test.js +58 -0
- package/dist/__tests__/dashboard-view-conformance.test.js.map +1 -0
- package/dist/__tests__/dashboard-view-coupling.test.d.ts +7 -0
- package/dist/__tests__/dashboard-view-coupling.test.d.ts.map +1 -0
- package/dist/__tests__/dashboard-view-coupling.test.js +381 -0
- package/dist/__tests__/dashboard-view-coupling.test.js.map +1 -0
- package/dist/__tests__/dashboard-view-distribution.test.d.ts +10 -0
- package/dist/__tests__/dashboard-view-distribution.test.d.ts.map +1 -0
- package/dist/__tests__/dashboard-view-distribution.test.js +272 -0
- package/dist/__tests__/dashboard-view-distribution.test.js.map +1 -0
- package/dist/__tests__/dashboard-view-graph.test.d.ts +13 -0
- package/dist/__tests__/dashboard-view-graph.test.d.ts.map +1 -0
- package/dist/__tests__/dashboard-view-graph.test.js +332 -0
- package/dist/__tests__/dashboard-view-graph.test.js.map +1 -0
- package/dist/__tests__/dashboard-view-template.test.d.ts +21 -0
- package/dist/__tests__/dashboard-view-template.test.d.ts.map +1 -0
- package/dist/__tests__/dashboard-view-template.test.js +153 -0
- package/dist/__tests__/dashboard-view-template.test.js.map +1 -0
- package/dist/__tests__/dashboard.test.d.ts +2 -0
- package/dist/__tests__/dashboard.test.d.ts.map +1 -0
- package/dist/__tests__/dashboard.test.js +129 -0
- package/dist/__tests__/dashboard.test.js.map +1 -0
- package/dist/__tests__/graph-tab.test.d.ts +10 -0
- package/dist/__tests__/graph-tab.test.d.ts.map +1 -0
- package/dist/__tests__/graph-tab.test.js +76 -0
- package/dist/__tests__/graph-tab.test.js.map +1 -0
- package/dist/checks.d.ts +7 -0
- package/dist/checks.d.ts.map +1 -0
- package/dist/checks.js +283 -0
- package/dist/checks.js.map +1 -0
- package/dist/code-paths/__tests__/views-registry.test.d.ts +13 -0
- package/dist/code-paths/__tests__/views-registry.test.d.ts.map +1 -0
- package/dist/code-paths/__tests__/views-registry.test.js +39 -0
- package/dist/code-paths/__tests__/views-registry.test.js.map +1 -0
- package/dist/code-paths/catalog-provenance.d.ts +22 -0
- package/dist/code-paths/catalog-provenance.d.ts.map +1 -0
- package/dist/code-paths/catalog-provenance.js +108 -0
- package/dist/code-paths/catalog-provenance.js.map +1 -0
- package/dist/code-paths/catalog-recipes-tables.d.ts +11 -0
- package/dist/code-paths/catalog-recipes-tables.d.ts.map +1 -0
- package/dist/code-paths/catalog-recipes-tables.js +86 -0
- package/dist/code-paths/catalog-recipes-tables.js.map +1 -0
- package/dist/code-paths/cytoscape-vendor.d.ts +27 -0
- package/dist/code-paths/cytoscape-vendor.d.ts.map +1 -0
- package/dist/code-paths/cytoscape-vendor.js +68 -0
- package/dist/code-paths/cytoscape-vendor.js.map +1 -0
- package/dist/code-paths/editor-link.d.ts +10 -0
- package/dist/code-paths/editor-link.d.ts.map +1 -0
- package/dist/code-paths/editor-link.js +20 -0
- package/dist/code-paths/editor-link.js.map +1 -0
- package/dist/code-paths/filters.d.ts +19 -0
- package/dist/code-paths/filters.d.ts.map +1 -0
- package/dist/code-paths/filters.js +47 -0
- package/dist/code-paths/filters.js.map +1 -0
- package/dist/code-paths/function-card.d.ts +15 -0
- package/dist/code-paths/function-card.d.ts.map +1 -0
- package/dist/code-paths/function-card.js +169 -0
- package/dist/code-paths/function-card.js.map +1 -0
- package/dist/code-paths/function-row.d.ts +17 -0
- package/dist/code-paths/function-row.d.ts.map +1 -0
- package/dist/code-paths/function-row.js +77 -0
- package/dist/code-paths/function-row.js.map +1 -0
- package/dist/code-paths/graph-controls.d.ts +27 -0
- package/dist/code-paths/graph-controls.d.ts.map +1 -0
- package/dist/code-paths/graph-controls.js +257 -0
- package/dist/code-paths/graph-controls.js.map +1 -0
- package/dist/code-paths/graph-scc.d.ts +32 -0
- package/dist/code-paths/graph-scc.d.ts.map +1 -0
- package/dist/code-paths/graph-scc.js +136 -0
- package/dist/code-paths/graph-scc.js.map +1 -0
- package/dist/code-paths/graph-stylesheet.d.ts +22 -0
- package/dist/code-paths/graph-stylesheet.d.ts.map +1 -0
- package/dist/code-paths/graph-stylesheet.js +121 -0
- package/dist/code-paths/graph-stylesheet.js.map +1 -0
- package/dist/code-paths/graph-view-model.d.ts +120 -0
- package/dist/code-paths/graph-view-model.d.ts.map +1 -0
- package/dist/code-paths/graph-view-model.js +199 -0
- package/dist/code-paths/graph-view-model.js.map +1 -0
- package/dist/code-paths/help-drawer.d.ts +18 -0
- package/dist/code-paths/help-drawer.d.ts.map +1 -0
- package/dist/code-paths/help-drawer.js +54 -0
- package/dist/code-paths/help-drawer.js.map +1 -0
- package/dist/code-paths/indexes.d.ts +28 -0
- package/dist/code-paths/indexes.d.ts.map +1 -0
- package/dist/code-paths/indexes.js +97 -0
- package/dist/code-paths/indexes.js.map +1 -0
- package/dist/code-paths/path-utils.d.ts +15 -0
- package/dist/code-paths/path-utils.d.ts.map +1 -0
- package/dist/code-paths/path-utils.js +47 -0
- package/dist/code-paths/path-utils.js.map +1 -0
- package/dist/code-paths/search.d.ts +14 -0
- package/dist/code-paths/search.d.ts.map +1 -0
- package/dist/code-paths/search.js +54 -0
- package/dist/code-paths/search.js.map +1 -0
- package/dist/code-paths/trace.d.ts +11 -0
- package/dist/code-paths/trace.d.ts.map +1 -0
- package/dist/code-paths/trace.js +60 -0
- package/dist/code-paths/trace.js.map +1 -0
- package/dist/code-paths/view-coupling.d.ts +22 -0
- package/dist/code-paths/view-coupling.d.ts.map +1 -0
- package/dist/code-paths/view-coupling.js +218 -0
- package/dist/code-paths/view-coupling.js.map +1 -0
- package/dist/code-paths/view-distribution.d.ts +20 -0
- package/dist/code-paths/view-distribution.d.ts.map +1 -0
- package/dist/code-paths/view-distribution.js +82 -0
- package/dist/code-paths/view-distribution.js.map +1 -0
- package/dist/code-paths/view-graph.d.ts +35 -0
- package/dist/code-paths/view-graph.d.ts.map +1 -0
- package/dist/code-paths/view-graph.js +379 -0
- package/dist/code-paths/view-graph.js.map +1 -0
- package/dist/code-paths/view-template.d.ts +154 -0
- package/dist/code-paths/view-template.d.ts.map +1 -0
- package/dist/code-paths/view-template.js +218 -0
- package/dist/code-paths/view-template.js.map +1 -0
- package/dist/code-paths/views-registry.d.ts +13 -0
- package/dist/code-paths/views-registry.d.ts.map +1 -0
- package/dist/code-paths/views-registry.js +53 -0
- package/dist/code-paths/views-registry.js.map +1 -0
- package/dist/code-paths.d.ts +69 -0
- package/dist/code-paths.d.ts.map +1 -0
- package/dist/code-paths.js +356 -0
- package/dist/code-paths.js.map +1 -0
- package/dist/css/cards.d.ts +9 -0
- package/dist/css/cards.d.ts.map +1 -0
- package/dist/css/cards.js +36 -0
- package/dist/css/cards.js.map +1 -0
- package/dist/css/code-paths.d.ts +9 -0
- package/dist/css/code-paths.d.ts.map +1 -0
- package/dist/css/code-paths.js +111 -0
- package/dist/css/code-paths.js.map +1 -0
- package/dist/css/data-table.d.ts +12 -0
- package/dist/css/data-table.d.ts.map +1 -0
- package/dist/css/data-table.js +103 -0
- package/dist/css/data-table.js.map +1 -0
- package/dist/css/function-card.d.ts +6 -0
- package/dist/css/function-card.d.ts.map +1 -0
- package/dist/css/function-card.js +26 -0
- package/dist/css/function-card.js.map +1 -0
- package/dist/css/help-drawer.d.ts +6 -0
- package/dist/css/help-drawer.d.ts.map +1 -0
- package/dist/css/help-drawer.js +22 -0
- package/dist/css/help-drawer.js.map +1 -0
- package/dist/css/tabs.d.ts +9 -0
- package/dist/css/tabs.d.ts.map +1 -0
- package/dist/css/tabs.js +28 -0
- package/dist/css/tabs.js.map +1 -0
- package/dist/css/theme.d.ts +8 -0
- package/dist/css/theme.d.ts.map +1 -0
- package/dist/css/theme.js +34 -0
- package/dist/css/theme.js.map +1 -0
- package/dist/css.d.ts +13 -0
- package/dist/css.d.ts.map +1 -0
- package/dist/css.js +30 -0
- package/dist/css.js.map +1 -0
- package/dist/generator.d.ts +33 -0
- package/dist/generator.d.ts.map +1 -0
- package/dist/generator.js +161 -0
- package/dist/generator.js.map +1 -0
- package/dist/index.d.ts +21 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +20 -0
- package/dist/index.js.map +1 -0
- package/dist/overview.d.ts +13 -0
- package/dist/overview.d.ts.map +1 -0
- package/dist/overview.js +91 -0
- package/dist/overview.js.map +1 -0
- package/dist/recipes.d.ts +6 -0
- package/dist/recipes.d.ts.map +1 -0
- package/dist/recipes.js +68 -0
- package/dist/recipes.js.map +1 -0
- package/dist/sessions.d.ts +6 -0
- package/dist/sessions.d.ts.map +1 -0
- package/dist/sessions.js +288 -0
- package/dist/sessions.js.map +1 -0
- package/dist/shared/el.d.ts +13 -0
- package/dist/shared/el.d.ts.map +1 -0
- package/dist/shared/el.js +27 -0
- package/dist/shared/el.js.map +1 -0
- package/dist/shared/pagination.d.ts +15 -0
- package/dist/shared/pagination.d.ts.map +1 -0
- package/dist/shared/pagination.js +113 -0
- package/dist/shared/pagination.js.map +1 -0
- package/dist/shared/sortable.d.ts +14 -0
- package/dist/shared/sortable.d.ts.map +1 -0
- package/dist/shared/sortable.js +101 -0
- package/dist/shared/sortable.js.map +1 -0
- package/dist/shared/tab-activators.d.ts +16 -0
- package/dist/shared/tab-activators.d.ts.map +1 -0
- package/dist/shared/tab-activators.js +33 -0
- package/dist/shared/tab-activators.js.map +1 -0
- package/dist/shared/tab-bar.d.ts +8 -0
- package/dist/shared/tab-bar.d.ts.map +1 -0
- package/dist/shared/tab-bar.js +20 -0
- package/dist/shared/tab-bar.js.map +1 -0
- package/dist/shared.d.ts +26 -0
- package/dist/shared.d.ts.map +1 -0
- package/dist/shared.js +39 -0
- package/dist/shared.js.map +1 -0
- package/dist/subtab-bar.d.ts +23 -0
- package/dist/subtab-bar.d.ts.map +1 -0
- package/dist/subtab-bar.js +77 -0
- package/dist/subtab-bar.js.map +1 -0
- package/dist/tool-tab-registry.d.ts +76 -0
- package/dist/tool-tab-registry.d.ts.map +1 -0
- package/dist/tool-tab-registry.js +44 -0
- package/dist/tool-tab-registry.js.map +1 -0
- package/dist/tool-tabs-registrations.d.ts +19 -0
- package/dist/tool-tabs-registrations.d.ts.map +1 -0
- package/dist/tool-tabs-registrations.js +46 -0
- package/dist/tool-tabs-registrations.js.map +1 -0
- package/dist/tool-tabs.d.ts +12 -0
- package/dist/tool-tabs.d.ts.map +1 -0
- package/dist/tool-tabs.js +80 -0
- package/dist/tool-tabs.js.map +1 -0
- package/dist/vendor/cytoscape-bundle.js +600 -0
- package/package.json +52 -0
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Vendored Cytoscape emitter.
|
|
3
|
+
*
|
|
4
|
+
* Reads the committed `src/vendor/cytoscape-bundle.js` UMD blob at
|
|
5
|
+
* generation time and returns it as a JS string for inlining into the
|
|
6
|
+
* report's single `<script>` block. The bundle registers the `cytoscape`
|
|
7
|
+
* and `cytoscapeDagre` browser globals the Graph view (`view-graph.ts`)
|
|
8
|
+
* consumes — fully offline, no CDN, no network at view time.
|
|
9
|
+
*
|
|
10
|
+
* Architectural note: this module reads the bundle via `node:fs`, it does
|
|
11
|
+
* NOT `import 'cytoscape'`. That is deliberate — the `dashboard-no-ui-
|
|
12
|
+
* framework` dependency-cruiser rule forbids importing a visualization
|
|
13
|
+
* library into `packages/dashboard/src/`. The renderer reaches the report
|
|
14
|
+
* as committed source text, never as a module dependency. The `cytoscape`
|
|
15
|
+
* / `cytoscape-dagre` packages are devDependencies used only by the vendor
|
|
16
|
+
* build script (`scripts/vendor-cytoscape.mjs`), which lives outside
|
|
17
|
+
* `src/` and so is out of the rule's scope.
|
|
18
|
+
*/
|
|
19
|
+
import { readFileSync } from 'node:fs';
|
|
20
|
+
import { dirname, join } from 'node:path';
|
|
21
|
+
import { fileURLToPath } from 'node:url';
|
|
22
|
+
const HERE = dirname(fileURLToPath(import.meta.url));
|
|
23
|
+
/**
|
|
24
|
+
* Candidate locations for the committed bundle. The first is the build
|
|
25
|
+
* copy that lives next to the compiled module (`dist/vendor/` — produced
|
|
26
|
+
* by the `copy-vendor` build step and shipped in the published tarball);
|
|
27
|
+
* the rest resolve back to the source tree for the monorepo / test runs
|
|
28
|
+
* where `dist/vendor/` may not exist.
|
|
29
|
+
*/
|
|
30
|
+
const BUNDLE_CANDIDATES = [
|
|
31
|
+
join(HERE, '..', 'vendor', 'cytoscape-bundle.js'),
|
|
32
|
+
join(HERE, '..', '..', 'src', 'vendor', 'cytoscape-bundle.js'),
|
|
33
|
+
];
|
|
34
|
+
let cachedBundle = null;
|
|
35
|
+
/**
|
|
36
|
+
* Read and cache the committed Cytoscape UMD bundle from the first candidate
|
|
37
|
+
* path that exists.
|
|
38
|
+
*
|
|
39
|
+
* @throws {Error} When the bundle is absent from every candidate path (the
|
|
40
|
+
* `vendor:cytoscape` build step has not been run / the asset was not shipped).
|
|
41
|
+
*/
|
|
42
|
+
function readVendorBundle() {
|
|
43
|
+
if (cachedBundle !== null)
|
|
44
|
+
return cachedBundle;
|
|
45
|
+
for (const candidate of BUNDLE_CANDIDATES) {
|
|
46
|
+
try {
|
|
47
|
+
cachedBundle = readFileSync(candidate, 'utf8');
|
|
48
|
+
return cachedBundle;
|
|
49
|
+
}
|
|
50
|
+
catch {
|
|
51
|
+
// @swallow-ok candidate-path probe: a missing candidate is expected
|
|
52
|
+
// (dist vs src layout). The final `throw` below reports if ALL fail.
|
|
53
|
+
continue;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
throw new Error('cytoscape-bundle.js not found. Run `pnpm --filter=@opensip-cli/dashboard vendor:cytoscape`.');
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Emit the vendored Cytoscape UMD bundle as a JS string for inlining.
|
|
60
|
+
*
|
|
61
|
+
* MUST be concatenated into the Code Paths script BEFORE any view emitter
|
|
62
|
+
* that references the `cytoscape` global (i.e. before
|
|
63
|
+
* `dashboardViewGraphJs()`).
|
|
64
|
+
*/
|
|
65
|
+
export function dashboardCytoscapeVendorJs() {
|
|
66
|
+
return readVendorBundle();
|
|
67
|
+
}
|
|
68
|
+
//# sourceMappingURL=cytoscape-vendor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cytoscape-vendor.js","sourceRoot":"","sources":["../../src/code-paths/cytoscape-vendor.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC,MAAM,IAAI,GAAG,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;AAErD;;;;;;GAMG;AACH,MAAM,iBAAiB,GAAG;IACxB,IAAI,CAAC,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,qBAAqB,CAAC;IACjD,IAAI,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAE,qBAAqB,CAAC;CAC/D,CAAC;AAEF,IAAI,YAAY,GAAkB,IAAI,CAAC;AAEvC;;;;;;GAMG;AACH,SAAS,gBAAgB;IACvB,IAAI,YAAY,KAAK,IAAI;QAAE,OAAO,YAAY,CAAC;IAC/C,KAAK,MAAM,SAAS,IAAI,iBAAiB,EAAE,CAAC;QAC1C,IAAI,CAAC;YACH,YAAY,GAAG,YAAY,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC;YAC/C,OAAO,YAAY,CAAC;QACtB,CAAC;QAAC,MAAM,CAAC;YACP,oEAAoE;YACpE,qEAAqE;YACrE,SAAS;QACX,CAAC;IACH,CAAC;IACD,MAAM,IAAI,KAAK,CACb,6FAA6F,CAC9F,CAAC;AACJ,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,0BAA0B;IACxC,OAAO,gBAAgB,EAAE,CAAC;AAC5B,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Editor deep-link URL generator.
|
|
3
|
+
*
|
|
4
|
+
* Reads the embedded `EDITOR_PROTOCOL` constant set by `generator.ts`
|
|
5
|
+
* (passed through from `dashboard.editor` in opensip-cli.config.yml).
|
|
6
|
+
* Recognized values: 'vscode', 'cursor'. Anything else returns null and
|
|
7
|
+
* the Function Card falls back to a "Copy path" button.
|
|
8
|
+
*/
|
|
9
|
+
export declare function dashboardEditorLinkJs(): string;
|
|
10
|
+
//# sourceMappingURL=editor-link.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"editor-link.d.ts","sourceRoot":"","sources":["../../src/code-paths/editor-link.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,wBAAgB,qBAAqB,IAAI,MAAM,CAU9C"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Editor deep-link URL generator.
|
|
3
|
+
*
|
|
4
|
+
* Reads the embedded `EDITOR_PROTOCOL` constant set by `generator.ts`
|
|
5
|
+
* (passed through from `dashboard.editor` in opensip-cli.config.yml).
|
|
6
|
+
* Recognized values: 'vscode', 'cursor'. Anything else returns null and
|
|
7
|
+
* the Function Card falls back to a "Copy path" button.
|
|
8
|
+
*/
|
|
9
|
+
export function dashboardEditorLinkJs() {
|
|
10
|
+
return String.raw `
|
|
11
|
+
function editorLinkUrl(filePath, line) {
|
|
12
|
+
if (typeof EDITOR_PROTOCOL !== 'string' || !EDITOR_PROTOCOL) return null;
|
|
13
|
+
if (EDITOR_PROTOCOL === 'vscode' || EDITOR_PROTOCOL === 'cursor') {
|
|
14
|
+
return EDITOR_PROTOCOL + '://file/' + filePath + ':' + (line || 1);
|
|
15
|
+
}
|
|
16
|
+
return null;
|
|
17
|
+
}
|
|
18
|
+
`;
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=editor-link.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"editor-link.js","sourceRoot":"","sources":["../../src/code-paths/editor-link.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,MAAM,UAAU,qBAAqB;IACnC,OAAO,MAAM,CAAC,GAAG,CAAA;;;;;;;;CAQlB,CAAC;AACF,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Filter primitives for the Code Paths panel.
|
|
3
|
+
*
|
|
4
|
+
* The interactive "Filters" chip drawer that used to sit between the Explore
|
|
5
|
+
* subtab and the view tab bar was removed — the Visualization view owns its own
|
|
6
|
+
* controls and the other views don't need a shared chip bar. What remains is
|
|
7
|
+
* the small shared surface still consumed elsewhere:
|
|
8
|
+
*
|
|
9
|
+
* - `filterState` — default, non-interactive filter (production-only, all
|
|
10
|
+
* packages, all kinds). The Functions table reads it via `passesFilter`;
|
|
11
|
+
* the Coupling drilldown passes it through. Nothing mutates it now.
|
|
12
|
+
* - `passesFilter(occ, filterState)` — the per-row predicate the Functions
|
|
13
|
+
* view (and the Coupling drilldown) applies.
|
|
14
|
+
* - `packagesInCatalog(catalog)` / `KIND_LIST` — the package list and kind
|
|
15
|
+
* vocabulary the Visualization controls (`graph-controls.ts`) drive their
|
|
16
|
+
* Package and Kind selectors from.
|
|
17
|
+
*/
|
|
18
|
+
export declare function dashboardFiltersJs(): string;
|
|
19
|
+
//# sourceMappingURL=filters.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"filters.d.ts","sourceRoot":"","sources":["../../src/code-paths/filters.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,wBAAgB,kBAAkB,IAAI,MAAM,CA4B3C"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Filter primitives for the Code Paths panel.
|
|
3
|
+
*
|
|
4
|
+
* The interactive "Filters" chip drawer that used to sit between the Explore
|
|
5
|
+
* subtab and the view tab bar was removed — the Visualization view owns its own
|
|
6
|
+
* controls and the other views don't need a shared chip bar. What remains is
|
|
7
|
+
* the small shared surface still consumed elsewhere:
|
|
8
|
+
*
|
|
9
|
+
* - `filterState` — default, non-interactive filter (production-only, all
|
|
10
|
+
* packages, all kinds). The Functions table reads it via `passesFilter`;
|
|
11
|
+
* the Coupling drilldown passes it through. Nothing mutates it now.
|
|
12
|
+
* - `passesFilter(occ, filterState)` — the per-row predicate the Functions
|
|
13
|
+
* view (and the Coupling drilldown) applies.
|
|
14
|
+
* - `packagesInCatalog(catalog)` / `KIND_LIST` — the package list and kind
|
|
15
|
+
* vocabulary the Visualization controls (`graph-controls.ts`) drive their
|
|
16
|
+
* Package and Kind selectors from.
|
|
17
|
+
*/
|
|
18
|
+
export function dashboardFiltersJs() {
|
|
19
|
+
return String.raw `
|
|
20
|
+
const filterState = {
|
|
21
|
+
packages: new Set(),
|
|
22
|
+
kinds: new Set(),
|
|
23
|
+
includeTests: false,
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
const KIND_LIST = ['function-declaration', 'function-expression', 'method', 'arrow', 'constructor', 'getter', 'setter', 'module-init'];
|
|
27
|
+
|
|
28
|
+
function packagesInCatalog(catalog) {
|
|
29
|
+
const pkgs = new Set();
|
|
30
|
+
if (!catalog || !catalog.functions) return [];
|
|
31
|
+
for (const name of Object.keys(catalog.functions)) {
|
|
32
|
+
for (const occ of (catalog.functions[name] || [])) {
|
|
33
|
+
pkgs.add(pkgOf(occ));
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
return Array.from(pkgs).sort();
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
function passesFilter(occ, fs) {
|
|
40
|
+
if (!fs.includeTests && occ.inTestFile) return false;
|
|
41
|
+
if (fs.packages.size > 0 && !fs.packages.has(pkgOf(occ))) return false;
|
|
42
|
+
if (fs.kinds.size > 0 && !fs.kinds.has(occ.kind)) return false;
|
|
43
|
+
return true;
|
|
44
|
+
}
|
|
45
|
+
`;
|
|
46
|
+
}
|
|
47
|
+
//# sourceMappingURL=filters.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"filters.js","sourceRoot":"","sources":["../../src/code-paths/filters.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,MAAM,UAAU,kBAAkB;IAChC,OAAO,MAAM,CAAC,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;CA0BlB,CAAC;AACF,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Universal Function Card overlay — opened by every view's row click.
|
|
3
|
+
*
|
|
4
|
+
* `openFunctionCard(bodyHash)` looks up the occurrence in
|
|
5
|
+
* `graphIndexes.byBodyHash`, renders a card with name + location +
|
|
6
|
+
* meta + callers + callees + action buttons, and appends a single
|
|
7
|
+
* `.function-card-overlay` element to <body>. Re-opening swaps the
|
|
8
|
+
* content of the same overlay (singleton invariant — §10.2).
|
|
9
|
+
*
|
|
10
|
+
* Closes on Escape key (panel orchestrator), close-button click, and click on
|
|
11
|
+
* the overlay backdrop. "Trace from entry" renders the shortest indexed path
|
|
12
|
+
* from an inferred entry point when one exists.
|
|
13
|
+
*/
|
|
14
|
+
export declare function dashboardFunctionCardJs(): string;
|
|
15
|
+
//# sourceMappingURL=function-card.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"function-card.d.ts","sourceRoot":"","sources":["../../src/code-paths/function-card.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,wBAAgB,uBAAuB,IAAI,MAAM,CA0JhD"}
|
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Universal Function Card overlay — opened by every view's row click.
|
|
3
|
+
*
|
|
4
|
+
* `openFunctionCard(bodyHash)` looks up the occurrence in
|
|
5
|
+
* `graphIndexes.byBodyHash`, renders a card with name + location +
|
|
6
|
+
* meta + callers + callees + action buttons, and appends a single
|
|
7
|
+
* `.function-card-overlay` element to <body>. Re-opening swaps the
|
|
8
|
+
* content of the same overlay (singleton invariant — §10.2).
|
|
9
|
+
*
|
|
10
|
+
* Closes on Escape key (panel orchestrator), close-button click, and click on
|
|
11
|
+
* the overlay backdrop. "Trace from entry" renders the shortest indexed path
|
|
12
|
+
* from an inferred entry point when one exists.
|
|
13
|
+
*/
|
|
14
|
+
export function dashboardFunctionCardJs() {
|
|
15
|
+
return String.raw `
|
|
16
|
+
function openFunctionCard(bodyHash) {
|
|
17
|
+
if (!bodyHash) return;
|
|
18
|
+
const occ = graphIndexes.byBodyHash.get(bodyHash);
|
|
19
|
+
if (!occ) return;
|
|
20
|
+
|
|
21
|
+
// Singleton: reuse the existing overlay if it's open.
|
|
22
|
+
let overlay = document.querySelector('.function-card-overlay');
|
|
23
|
+
if (!overlay) {
|
|
24
|
+
overlay = el('div', { class: 'function-card-overlay' });
|
|
25
|
+
overlay.addEventListener('click', e => {
|
|
26
|
+
if (e.target === overlay) closeFunctionCard();
|
|
27
|
+
});
|
|
28
|
+
document.body.appendChild(overlay);
|
|
29
|
+
}
|
|
30
|
+
while (overlay.firstChild) overlay.removeChild(overlay.firstChild);
|
|
31
|
+
|
|
32
|
+
const card = el('div', { class: 'function-card' });
|
|
33
|
+
overlay.appendChild(card);
|
|
34
|
+
|
|
35
|
+
const closeBtn = el('button', { class: 'fc-close', text: '×', onclick: closeFunctionCard });
|
|
36
|
+
card.appendChild(closeBtn);
|
|
37
|
+
|
|
38
|
+
card.appendChild(el('h3', { text: displayName(occ.simpleName || '<anonymous>') }));
|
|
39
|
+
card.appendChild(el('div', { class: 'fc-loc', text: occ.filePath + ':' + occ.line }));
|
|
40
|
+
|
|
41
|
+
const paramText = (occ.params || []).map(p => (p.rest ? '...' : '') + p.name + (p.optional ? '?' : '')).join(', ');
|
|
42
|
+
const metaText = 'Body: ' + Math.max(0, (occ.endLine || occ.line) - occ.line + 1) + ' lines · '
|
|
43
|
+
+ (occ.kind || 'function') + ' · '
|
|
44
|
+
+ (occ.visibility || 'module-local')
|
|
45
|
+
+ (paramText ? ' · params: (' + paramText + ')' : '')
|
|
46
|
+
+ (occ.returnType ? ' · returns: ' + occ.returnType : '');
|
|
47
|
+
card.appendChild(el('div', { class: 'fc-meta', text: metaText }));
|
|
48
|
+
|
|
49
|
+
// Callers section, grouped by package of caller.
|
|
50
|
+
const callerHashes = graphIndexes.callers.get(occ.bodyHash) || [];
|
|
51
|
+
const callerSection = el('div', { class: 'fc-section' });
|
|
52
|
+
callerSection.appendChild(el('h4', { text: 'Callers (' + callerHashes.length + ')' }));
|
|
53
|
+
if (callerHashes.length === 0) {
|
|
54
|
+
callerSection.appendChild(el('div', { class: 'empty', text: 'No callers in catalog.' }));
|
|
55
|
+
} else {
|
|
56
|
+
const list = el('ul', { class: 'fc-list' });
|
|
57
|
+
const grouped = new Map();
|
|
58
|
+
for (const h of callerHashes) {
|
|
59
|
+
const c = graphIndexes.byBodyHash.get(h);
|
|
60
|
+
if (!c) continue;
|
|
61
|
+
const pkg = pkgOf(c);
|
|
62
|
+
let bucket = grouped.get(pkg);
|
|
63
|
+
if (!bucket) { bucket = []; grouped.set(pkg, bucket); }
|
|
64
|
+
bucket.push(c);
|
|
65
|
+
}
|
|
66
|
+
const pkgNames = Array.from(grouped.keys()).sort();
|
|
67
|
+
for (const pkg of pkgNames) {
|
|
68
|
+
const groupHeader = el('li', { class: 'external', text: pkg + ' (' + grouped.get(pkg).length + ')' });
|
|
69
|
+
list.appendChild(groupHeader);
|
|
70
|
+
for (const c of grouped.get(pkg)) {
|
|
71
|
+
const item = el('li', {
|
|
72
|
+
'data-body-hash': c.bodyHash,
|
|
73
|
+
text: displayName(c.simpleName) + ' — ' + c.filePath + ':' + c.line,
|
|
74
|
+
});
|
|
75
|
+
item.addEventListener('click', () => openFunctionCard(c.bodyHash));
|
|
76
|
+
list.appendChild(item);
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
callerSection.appendChild(list);
|
|
80
|
+
}
|
|
81
|
+
card.appendChild(callerSection);
|
|
82
|
+
|
|
83
|
+
// Callees section.
|
|
84
|
+
const calleeHashes = graphIndexes.callees.get(occ.bodyHash) || [];
|
|
85
|
+
const externalCalls = (occ.calls || []).reduce((n, e) => {
|
|
86
|
+
let c = 0;
|
|
87
|
+
for (const t of (e.to || [])) if (!graphIndexes.byBodyHash.has(t)) c++;
|
|
88
|
+
return n + c + ((e.to || []).length === 0 ? 1 : 0);
|
|
89
|
+
}, 0);
|
|
90
|
+
const calleeSection = el('div', { class: 'fc-section' });
|
|
91
|
+
calleeSection.appendChild(el('h4', { text: 'Callees (' + calleeHashes.length + ' resolved' + (externalCalls > 0 ? ', ' + externalCalls + ' external' : '') + ')' }));
|
|
92
|
+
if (calleeHashes.length === 0 && externalCalls === 0) {
|
|
93
|
+
calleeSection.appendChild(el('div', { class: 'empty', text: 'No callees.' }));
|
|
94
|
+
} else {
|
|
95
|
+
const list = el('ul', { class: 'fc-list' });
|
|
96
|
+
for (const h of calleeHashes) {
|
|
97
|
+
const c = graphIndexes.byBodyHash.get(h);
|
|
98
|
+
if (!c) continue;
|
|
99
|
+
const item = el('li', { 'data-body-hash': c.bodyHash, text: displayName(c.simpleName) + ' — ' + c.filePath + ':' + c.line });
|
|
100
|
+
item.addEventListener('click', () => openFunctionCard(c.bodyHash));
|
|
101
|
+
list.appendChild(item);
|
|
102
|
+
}
|
|
103
|
+
if (externalCalls > 0) {
|
|
104
|
+
list.appendChild(el('li', { class: 'external', text: externalCalls + ' external or unresolved call(s)' }));
|
|
105
|
+
}
|
|
106
|
+
calleeSection.appendChild(list);
|
|
107
|
+
}
|
|
108
|
+
card.appendChild(calleeSection);
|
|
109
|
+
|
|
110
|
+
// Action buttons.
|
|
111
|
+
const actions = el('div', { class: 'fc-actions' });
|
|
112
|
+
const editorUrl = editorLinkUrl(occ.filePath, occ.line);
|
|
113
|
+
if (editorUrl) {
|
|
114
|
+
const a = el('a', { class: 'fc-action', href: editorUrl, text: 'Open in editor' });
|
|
115
|
+
actions.appendChild(a);
|
|
116
|
+
} else {
|
|
117
|
+
const copyBtn = el('button', {
|
|
118
|
+
class: 'fc-action',
|
|
119
|
+
text: 'Copy path',
|
|
120
|
+
onclick: () => {
|
|
121
|
+
if (navigator && navigator.clipboard) navigator.clipboard.writeText(occ.filePath + ':' + occ.line);
|
|
122
|
+
},
|
|
123
|
+
});
|
|
124
|
+
actions.appendChild(copyBtn);
|
|
125
|
+
}
|
|
126
|
+
const traceBtn = el('button', {
|
|
127
|
+
class: 'fc-action',
|
|
128
|
+
text: 'Trace from entry',
|
|
129
|
+
onclick: () => {
|
|
130
|
+
const path = traceFromEntry(occ.bodyHash, graphCatalog, graphIndexes);
|
|
131
|
+
renderTraceInCard(card, path);
|
|
132
|
+
},
|
|
133
|
+
});
|
|
134
|
+
actions.appendChild(traceBtn);
|
|
135
|
+
card.appendChild(actions);
|
|
136
|
+
|
|
137
|
+
// Move keyboard focus to the close button (accessibility).
|
|
138
|
+
closeBtn.focus();
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
function renderTraceInCard(card, path) {
|
|
142
|
+
// Replace the body of the card with the rendered trace path.
|
|
143
|
+
const old = card.querySelector('.fc-trace-result');
|
|
144
|
+
if (old) old.parentNode.removeChild(old);
|
|
145
|
+
const section = el('div', { class: 'fc-section fc-trace-result' });
|
|
146
|
+
section.appendChild(el('h4', { text: 'Trace from entry point' }));
|
|
147
|
+
if (!path || path.length === 0) {
|
|
148
|
+
section.appendChild(el('div', { class: 'empty', text: 'No path from any entry point.' }));
|
|
149
|
+
} else {
|
|
150
|
+
const list = el('ol', { class: 'fc-list' });
|
|
151
|
+
for (const h of path) {
|
|
152
|
+
const occ = graphIndexes.byBodyHash.get(h);
|
|
153
|
+
if (!occ) continue;
|
|
154
|
+
const item = el('li', { 'data-body-hash': occ.bodyHash, text: displayName(occ.simpleName) + ' — ' + occ.filePath + ':' + occ.line });
|
|
155
|
+
item.addEventListener('click', () => openFunctionCard(occ.bodyHash));
|
|
156
|
+
list.appendChild(item);
|
|
157
|
+
}
|
|
158
|
+
section.appendChild(list);
|
|
159
|
+
}
|
|
160
|
+
card.appendChild(section);
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
function closeFunctionCard() {
|
|
164
|
+
const overlay = document.querySelector('.function-card-overlay');
|
|
165
|
+
if (overlay && overlay.parentNode) overlay.parentNode.removeChild(overlay);
|
|
166
|
+
}
|
|
167
|
+
`;
|
|
168
|
+
}
|
|
169
|
+
//# sourceMappingURL=function-card.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"function-card.js","sourceRoot":"","sources":["../../src/code-paths/function-card.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,MAAM,UAAU,uBAAuB;IACrC,OAAO,MAAM,CAAC,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwJlB,CAAC;AACF,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Reusable simple-table renderer for the Hot/Big/Wide/Untested/Search
|
|
3
|
+
* views.
|
|
4
|
+
*
|
|
5
|
+
* Wraps the rendered table in the same .section + .card shell used by
|
|
6
|
+
* fit/sim's renderSessionTable so all dashboard tables share one shape:
|
|
7
|
+
* a section heading, a card-bordered sortable table, and a pagination
|
|
8
|
+
* footer wired through paginateTable (defined in shared.ts).
|
|
9
|
+
*
|
|
10
|
+
* Each caller passes its own `columns` array, a `heading` string, and
|
|
11
|
+
* an optional `viewId` (used to attach the help-drawer info icon to
|
|
12
|
+
* the heading). The helper handles header, body, click delegation
|
|
13
|
+
* via data-body-hash, sortable activation, and pagination at 10
|
|
14
|
+
* rows/page.
|
|
15
|
+
*/
|
|
16
|
+
export declare function dashboardFunctionRowJs(): string;
|
|
17
|
+
//# sourceMappingURL=function-row.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"function-row.d.ts","sourceRoot":"","sources":["../../src/code-paths/function-row.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,wBAAgB,sBAAsB,IAAI,MAAM,CA4D/C"}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Reusable simple-table renderer for the Hot/Big/Wide/Untested/Search
|
|
3
|
+
* views.
|
|
4
|
+
*
|
|
5
|
+
* Wraps the rendered table in the same .section + .card shell used by
|
|
6
|
+
* fit/sim's renderSessionTable so all dashboard tables share one shape:
|
|
7
|
+
* a section heading, a card-bordered sortable table, and a pagination
|
|
8
|
+
* footer wired through paginateTable (defined in shared.ts).
|
|
9
|
+
*
|
|
10
|
+
* Each caller passes its own `columns` array, a `heading` string, and
|
|
11
|
+
* an optional `viewId` (used to attach the help-drawer info icon to
|
|
12
|
+
* the heading). The helper handles header, body, click delegation
|
|
13
|
+
* via data-body-hash, sortable activation, and pagination at 10
|
|
14
|
+
* rows/page.
|
|
15
|
+
*/
|
|
16
|
+
export function dashboardFunctionRowJs() {
|
|
17
|
+
return String.raw `
|
|
18
|
+
function makeSectionHeading(text, viewId) {
|
|
19
|
+
// Heading + optional ⓘ button that opens the help drawer for this
|
|
20
|
+
// view. SCCs and Coupling use the same shape inline.
|
|
21
|
+
const h3 = el('h3');
|
|
22
|
+
h3.appendChild(document.createTextNode(text));
|
|
23
|
+
if (viewId && typeof openHelpDrawer === 'function') {
|
|
24
|
+
const info = el('button', {
|
|
25
|
+
class: 'section-info',
|
|
26
|
+
'aria-label': 'About this view',
|
|
27
|
+
title: 'About this view',
|
|
28
|
+
text: 'i',
|
|
29
|
+
});
|
|
30
|
+
info.addEventListener('click', e => {
|
|
31
|
+
e.stopPropagation();
|
|
32
|
+
openHelpDrawer(viewId);
|
|
33
|
+
});
|
|
34
|
+
h3.appendChild(info);
|
|
35
|
+
}
|
|
36
|
+
return h3;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
function renderFunctionRows(container, occurrences, columns, heading, viewId, skipHeading) {
|
|
40
|
+
while (container.firstChild) container.removeChild(container.firstChild);
|
|
41
|
+
if (!occurrences || occurrences.length === 0) {
|
|
42
|
+
container.appendChild(el('div', { class: 'empty', text: 'No functions to show.' }));
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
45
|
+
const headingText = (heading || 'Results') + ' (' + occurrences.length + ')';
|
|
46
|
+
const section = el('div', { class: 'section' });
|
|
47
|
+
// skipHeading lets a caller render the section heading itself (e.g. ABOVE its
|
|
48
|
+
// own controls row) rather than at the top of the rows host.
|
|
49
|
+
if (!skipHeading) section.appendChild(makeSectionHeading(headingText, viewId));
|
|
50
|
+
const card = el('div', { class: 'card' });
|
|
51
|
+
const table = el('table', { class: 'data-table sortable' });
|
|
52
|
+
const thead = el('thead');
|
|
53
|
+
const headRow = el('tr');
|
|
54
|
+
for (const col of columns) headRow.appendChild(el('th', { text: col.label }));
|
|
55
|
+
thead.appendChild(headRow);
|
|
56
|
+
table.appendChild(thead);
|
|
57
|
+
const tbody = el('tbody');
|
|
58
|
+
for (const occ of occurrences) {
|
|
59
|
+
const tr = el('tr', { class: 'clickable', 'data-body-hash': occ.bodyHash });
|
|
60
|
+
for (const col of columns) {
|
|
61
|
+
const v = col.value(occ);
|
|
62
|
+
tr.appendChild(el('td', { text: v == null ? '' : String(v) }));
|
|
63
|
+
}
|
|
64
|
+
tbody.appendChild(tr);
|
|
65
|
+
}
|
|
66
|
+
table.appendChild(tbody);
|
|
67
|
+
const pag = el('div', { class: 'pagination' });
|
|
68
|
+
card.appendChild(table);
|
|
69
|
+
card.appendChild(pag);
|
|
70
|
+
section.appendChild(card);
|
|
71
|
+
container.appendChild(section);
|
|
72
|
+
if (typeof paginateTable === 'function') paginateTable(tbody, pag, 10);
|
|
73
|
+
if (typeof makeSortable === 'function') makeSortable(table);
|
|
74
|
+
}
|
|
75
|
+
`;
|
|
76
|
+
}
|
|
77
|
+
//# sourceMappingURL=function-row.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"function-row.js","sourceRoot":"","sources":["../../src/code-paths/function-row.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,MAAM,UAAU,sBAAsB;IACpC,OAAO,MAAM,CAAC,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0DlB,CAAC;AACF,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Visualization control toolbar + function-level projector.
|
|
3
|
+
*
|
|
4
|
+
* A render helper (registers no view), extracted from `view-graph.ts` to keep
|
|
5
|
+
* that emitter under the file-length budget — and, like `graph-stylesheet.ts`,
|
|
6
|
+
* deliberately named out of the `view-*` namespace so it stays clear of the
|
|
7
|
+
* views-disjoint architecture rule. Emits two browser functions plus a tiny
|
|
8
|
+
* helper as a JS string; the main emitter interpolates it into its `<script>`
|
|
9
|
+
* body, so they share one runtime scope with the view's state vars
|
|
10
|
+
* (`gvLevel`, `gvSelectedPackage`, …) and `gvRenderGraph`.
|
|
11
|
+
*
|
|
12
|
+
* - `gvRenderControls(host, catalog, indexes)` — the self-contained Level /
|
|
13
|
+
* Scope / Package / Kind / Edges control bar. Package + Kind are disabled at
|
|
14
|
+
* package level (they only apply at function level). Every change re-renders
|
|
15
|
+
* the graph in place via `gvRenderGraph`.
|
|
16
|
+
* - `gvBuildFunctionElements(indexes, pkg, includeTests, kinds, crossPackage)`
|
|
17
|
+
* — projects ONE package's function call graph client-side from the catalog
|
|
18
|
+
* indexes (the package→package view-model blob can't express it).
|
|
19
|
+
* - `gvAddOptions(sel, pairs, current)` — small `<select>` option builder.
|
|
20
|
+
*
|
|
21
|
+
* Free identifiers (supplied by earlier prelude emitters / the host template):
|
|
22
|
+
* `el`, `pkgOf`, `displayName`, `resolveCalleeOcc`, `packagesInCatalog`,
|
|
23
|
+
* `KIND_LIST`, `gvRenderGraph`, `GV_LAYOUTS`, `gvRunLayout`, `gvSccHighlight`,
|
|
24
|
+
* `gvApplySccHighlight`, and the `gv*` control-state vars.
|
|
25
|
+
*/
|
|
26
|
+
export declare function dashboardGraphControlsJs(): string;
|
|
27
|
+
//# sourceMappingURL=graph-controls.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"graph-controls.d.ts","sourceRoot":"","sources":["../../src/code-paths/graph-controls.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,wBAAwB,IAAI,MAAM,CAsOjD"}
|