@opensip-cli/dashboard 0.1.6 → 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.
Files changed (199) hide show
  1. package/README.md +2 -2
  2. package/dist/__tests__/catalog-provenance.test.js +6 -24
  3. package/dist/__tests__/catalog-provenance.test.js.map +1 -1
  4. package/dist/__tests__/coupling-attribution.test.js +10 -14
  5. package/dist/__tests__/coupling-attribution.test.js.map +1 -1
  6. package/dist/__tests__/dashboard-bundle-weight.test.d.ts +9 -2
  7. package/dist/__tests__/dashboard-bundle-weight.test.d.ts.map +1 -1
  8. package/dist/__tests__/dashboard-bundle-weight.test.js +19 -12
  9. package/dist/__tests__/dashboard-bundle-weight.test.js.map +1 -1
  10. package/dist/__tests__/dashboard-cell-containment.test.js +5 -2
  11. package/dist/__tests__/dashboard-cell-containment.test.js.map +1 -1
  12. package/dist/__tests__/dashboard-editor-link.test.d.ts +9 -0
  13. package/dist/__tests__/dashboard-editor-link.test.d.ts.map +1 -1
  14. package/dist/__tests__/dashboard-editor-link.test.js +72 -21
  15. package/dist/__tests__/dashboard-editor-link.test.js.map +1 -1
  16. package/dist/__tests__/dashboard-filters.test.js +6 -14
  17. package/dist/__tests__/dashboard-filters.test.js.map +1 -1
  18. package/dist/__tests__/dashboard-function-card-singleton.test.js +15 -27
  19. package/dist/__tests__/dashboard-function-card-singleton.test.js.map +1 -1
  20. package/dist/__tests__/dashboard-function-card.test.d.ts +4 -4
  21. package/dist/__tests__/dashboard-function-card.test.js +23 -44
  22. package/dist/__tests__/dashboard-function-card.test.js.map +1 -1
  23. package/dist/__tests__/dashboard-function-row.test.js +6 -16
  24. package/dist/__tests__/dashboard-function-row.test.js.map +1 -1
  25. package/dist/__tests__/dashboard-generator-graph-catalog.test.js +3 -1
  26. package/dist/__tests__/dashboard-generator-graph-catalog.test.js.map +1 -1
  27. package/dist/__tests__/dashboard-graph-offline.integration.test.js +3 -1
  28. package/dist/__tests__/dashboard-graph-offline.integration.test.js.map +1 -1
  29. package/dist/__tests__/dashboard-help-drawer.test.js +11 -17
  30. package/dist/__tests__/dashboard-help-drawer.test.js.map +1 -1
  31. package/dist/__tests__/dashboard-indexes.test.d.ts +6 -4
  32. package/dist/__tests__/dashboard-indexes.test.d.ts.map +1 -1
  33. package/dist/__tests__/dashboard-indexes.test.js +10 -7
  34. package/dist/__tests__/dashboard-indexes.test.js.map +1 -1
  35. package/dist/__tests__/dashboard-path-utils.test.d.ts +7 -0
  36. package/dist/__tests__/dashboard-path-utils.test.d.ts.map +1 -1
  37. package/dist/__tests__/dashboard-path-utils.test.js +11 -3
  38. package/dist/__tests__/dashboard-path-utils.test.js.map +1 -1
  39. package/dist/__tests__/dashboard-search.test.d.ts +5 -0
  40. package/dist/__tests__/dashboard-search.test.d.ts.map +1 -1
  41. package/dist/__tests__/dashboard-search.test.js +9 -3
  42. package/dist/__tests__/dashboard-search.test.js.map +1 -1
  43. package/dist/__tests__/dashboard-sessions.test.js +13 -11
  44. package/dist/__tests__/dashboard-sessions.test.js.map +1 -1
  45. package/dist/__tests__/dashboard-trace.test.d.ts +11 -0
  46. package/dist/__tests__/dashboard-trace.test.d.ts.map +1 -1
  47. package/dist/__tests__/dashboard-trace.test.js +55 -32
  48. package/dist/__tests__/dashboard-trace.test.js.map +1 -1
  49. package/dist/__tests__/dashboard-view-conformance.test.js +9 -15
  50. package/dist/__tests__/dashboard-view-conformance.test.js.map +1 -1
  51. package/dist/__tests__/dashboard-view-coupling.test.js +14 -35
  52. package/dist/__tests__/dashboard-view-coupling.test.js.map +1 -1
  53. package/dist/__tests__/dashboard-view-distribution.test.js +14 -37
  54. package/dist/__tests__/dashboard-view-distribution.test.js.map +1 -1
  55. package/dist/__tests__/dashboard-view-graph.test.js +29 -62
  56. package/dist/__tests__/dashboard-view-graph.test.js.map +1 -1
  57. package/dist/__tests__/dashboard-view-template.test.d.ts +13 -14
  58. package/dist/__tests__/dashboard-view-template.test.d.ts.map +1 -1
  59. package/dist/__tests__/dashboard-view-template.test.js +165 -112
  60. package/dist/__tests__/dashboard-view-template.test.js.map +1 -1
  61. package/dist/__tests__/graph-tab.test.js +4 -2
  62. package/dist/__tests__/graph-tab.test.js.map +1 -1
  63. package/dist/client-bundle.generated.d.ts +2 -0
  64. package/dist/client-bundle.generated.d.ts.map +1 -0
  65. package/dist/client-bundle.generated.js +3 -0
  66. package/dist/client-bundle.generated.js.map +1 -0
  67. package/dist/code-paths/__tests__/views-registry.test.d.ts +13 -8
  68. package/dist/code-paths/__tests__/views-registry.test.d.ts.map +1 -1
  69. package/dist/code-paths/__tests__/views-registry.test.js +27 -25
  70. package/dist/code-paths/__tests__/views-registry.test.js.map +1 -1
  71. package/dist/code-paths.d.ts +21 -62
  72. package/dist/code-paths.d.ts.map +1 -1
  73. package/dist/code-paths.js +24 -349
  74. package/dist/code-paths.js.map +1 -1
  75. package/dist/generator.d.ts +2 -0
  76. package/dist/generator.d.ts.map +1 -1
  77. package/dist/generator.js +28 -17
  78. package/dist/generator.js.map +1 -1
  79. package/package.json +5 -4
  80. package/dist/checks.d.ts +0 -7
  81. package/dist/checks.d.ts.map +0 -1
  82. package/dist/checks.js +0 -283
  83. package/dist/checks.js.map +0 -1
  84. package/dist/code-paths/catalog-provenance.d.ts +0 -22
  85. package/dist/code-paths/catalog-provenance.d.ts.map +0 -1
  86. package/dist/code-paths/catalog-provenance.js +0 -108
  87. package/dist/code-paths/catalog-provenance.js.map +0 -1
  88. package/dist/code-paths/catalog-recipes-tables.d.ts +0 -11
  89. package/dist/code-paths/catalog-recipes-tables.d.ts.map +0 -1
  90. package/dist/code-paths/catalog-recipes-tables.js +0 -86
  91. package/dist/code-paths/catalog-recipes-tables.js.map +0 -1
  92. package/dist/code-paths/editor-link.d.ts +0 -10
  93. package/dist/code-paths/editor-link.d.ts.map +0 -1
  94. package/dist/code-paths/editor-link.js +0 -20
  95. package/dist/code-paths/editor-link.js.map +0 -1
  96. package/dist/code-paths/filters.d.ts +0 -19
  97. package/dist/code-paths/filters.d.ts.map +0 -1
  98. package/dist/code-paths/filters.js +0 -47
  99. package/dist/code-paths/filters.js.map +0 -1
  100. package/dist/code-paths/function-card.d.ts +0 -15
  101. package/dist/code-paths/function-card.d.ts.map +0 -1
  102. package/dist/code-paths/function-card.js +0 -169
  103. package/dist/code-paths/function-card.js.map +0 -1
  104. package/dist/code-paths/function-row.d.ts +0 -17
  105. package/dist/code-paths/function-row.d.ts.map +0 -1
  106. package/dist/code-paths/function-row.js +0 -77
  107. package/dist/code-paths/function-row.js.map +0 -1
  108. package/dist/code-paths/graph-controls.d.ts +0 -27
  109. package/dist/code-paths/graph-controls.d.ts.map +0 -1
  110. package/dist/code-paths/graph-controls.js +0 -257
  111. package/dist/code-paths/graph-controls.js.map +0 -1
  112. package/dist/code-paths/graph-stylesheet.d.ts +0 -22
  113. package/dist/code-paths/graph-stylesheet.d.ts.map +0 -1
  114. package/dist/code-paths/graph-stylesheet.js +0 -121
  115. package/dist/code-paths/graph-stylesheet.js.map +0 -1
  116. package/dist/code-paths/help-drawer.d.ts +0 -18
  117. package/dist/code-paths/help-drawer.d.ts.map +0 -1
  118. package/dist/code-paths/help-drawer.js +0 -54
  119. package/dist/code-paths/help-drawer.js.map +0 -1
  120. package/dist/code-paths/indexes.d.ts +0 -28
  121. package/dist/code-paths/indexes.d.ts.map +0 -1
  122. package/dist/code-paths/indexes.js +0 -97
  123. package/dist/code-paths/indexes.js.map +0 -1
  124. package/dist/code-paths/path-utils.d.ts +0 -15
  125. package/dist/code-paths/path-utils.d.ts.map +0 -1
  126. package/dist/code-paths/path-utils.js +0 -47
  127. package/dist/code-paths/path-utils.js.map +0 -1
  128. package/dist/code-paths/search.d.ts +0 -14
  129. package/dist/code-paths/search.d.ts.map +0 -1
  130. package/dist/code-paths/search.js +0 -54
  131. package/dist/code-paths/search.js.map +0 -1
  132. package/dist/code-paths/trace.d.ts +0 -11
  133. package/dist/code-paths/trace.d.ts.map +0 -1
  134. package/dist/code-paths/trace.js +0 -60
  135. package/dist/code-paths/trace.js.map +0 -1
  136. package/dist/code-paths/view-coupling.d.ts +0 -22
  137. package/dist/code-paths/view-coupling.d.ts.map +0 -1
  138. package/dist/code-paths/view-coupling.js +0 -218
  139. package/dist/code-paths/view-coupling.js.map +0 -1
  140. package/dist/code-paths/view-distribution.d.ts +0 -20
  141. package/dist/code-paths/view-distribution.d.ts.map +0 -1
  142. package/dist/code-paths/view-distribution.js +0 -82
  143. package/dist/code-paths/view-distribution.js.map +0 -1
  144. package/dist/code-paths/view-graph.d.ts +0 -35
  145. package/dist/code-paths/view-graph.d.ts.map +0 -1
  146. package/dist/code-paths/view-graph.js +0 -379
  147. package/dist/code-paths/view-graph.js.map +0 -1
  148. package/dist/code-paths/view-template.d.ts +0 -154
  149. package/dist/code-paths/view-template.d.ts.map +0 -1
  150. package/dist/code-paths/view-template.js +0 -218
  151. package/dist/code-paths/view-template.js.map +0 -1
  152. package/dist/code-paths/views-registry.d.ts +0 -13
  153. package/dist/code-paths/views-registry.d.ts.map +0 -1
  154. package/dist/code-paths/views-registry.js +0 -53
  155. package/dist/code-paths/views-registry.js.map +0 -1
  156. package/dist/overview.d.ts +0 -13
  157. package/dist/overview.d.ts.map +0 -1
  158. package/dist/overview.js +0 -91
  159. package/dist/overview.js.map +0 -1
  160. package/dist/recipes.d.ts +0 -6
  161. package/dist/recipes.d.ts.map +0 -1
  162. package/dist/recipes.js +0 -68
  163. package/dist/recipes.js.map +0 -1
  164. package/dist/sessions.d.ts +0 -6
  165. package/dist/sessions.d.ts.map +0 -1
  166. package/dist/sessions.js +0 -288
  167. package/dist/sessions.js.map +0 -1
  168. package/dist/shared/el.d.ts +0 -13
  169. package/dist/shared/el.d.ts.map +0 -1
  170. package/dist/shared/el.js +0 -27
  171. package/dist/shared/el.js.map +0 -1
  172. package/dist/shared/pagination.d.ts +0 -15
  173. package/dist/shared/pagination.d.ts.map +0 -1
  174. package/dist/shared/pagination.js +0 -113
  175. package/dist/shared/pagination.js.map +0 -1
  176. package/dist/shared/sortable.d.ts +0 -14
  177. package/dist/shared/sortable.d.ts.map +0 -1
  178. package/dist/shared/sortable.js +0 -101
  179. package/dist/shared/sortable.js.map +0 -1
  180. package/dist/shared/tab-activators.d.ts +0 -16
  181. package/dist/shared/tab-activators.d.ts.map +0 -1
  182. package/dist/shared/tab-activators.js +0 -33
  183. package/dist/shared/tab-activators.js.map +0 -1
  184. package/dist/shared/tab-bar.d.ts +0 -8
  185. package/dist/shared/tab-bar.d.ts.map +0 -1
  186. package/dist/shared/tab-bar.js +0 -20
  187. package/dist/shared/tab-bar.js.map +0 -1
  188. package/dist/shared.d.ts +0 -26
  189. package/dist/shared.d.ts.map +0 -1
  190. package/dist/shared.js +0 -39
  191. package/dist/shared.js.map +0 -1
  192. package/dist/subtab-bar.d.ts +0 -23
  193. package/dist/subtab-bar.d.ts.map +0 -1
  194. package/dist/subtab-bar.js +0 -77
  195. package/dist/subtab-bar.js.map +0 -1
  196. package/dist/tool-tabs.d.ts +0 -12
  197. package/dist/tool-tabs.d.ts.map +0 -1
  198. package/dist/tool-tabs.js +0 -80
  199. package/dist/tool-tabs.js.map +0 -1
@@ -1,356 +1,31 @@
1
- // @fitness-ignore-file module-coupling-fan-out -- Panel aggregator: composes JS-string emitters from sibling view-*.ts modules; fan-out is intrinsic to its role as the entry point
2
1
  /**
3
- * Dashboard Code Paths panel — graph-tool surface with two subtabs:
4
- * 1. Sessions — recent graph runs and their per-rule findings
5
- * (uses the shared renderSessionTable from sessions.ts).
6
- * 2. Exploreinteractive catalog browser with three views
7
- * (Graph, Coupling, Functions/distribution). The Graph view
8
- * carries the SCC cycle highlight that the standalone SCCs view
9
- * used to own. The Functions view absorbs the former standalone
10
- * Search subtab via an in-table name filter.
11
- *
12
- * Architecture: vanilla DOM, no framework. Each view-*.ts emits a
13
- * JS string that pushes a `View` literal into the singleton `views`
14
- * registry. The Explore subtab renders the view tab bar + one
15
- * container per view; Sessions subtab renders the standard session
16
- * table.
17
- *
18
- * The file imports JS-string emitters from sibling modules under
19
- * `code-paths/`. It MUST NOT import from `@opensip-cli/graph`
20
- * the catalog is consumed by JSON shape only (the structural shape
21
- * lives in @opensip-cli/contracts to keep this panel decoupled
22
- * from the graph engine's runtime types).
2
+ * Code Paths panel — the vendored-renderer orchestrator.
3
+ *
4
+ * The Code Paths panel's client JS (the three views Coupling / Functions /
5
+ * Visualizationtheir controls + stylesheet, the ranked-view template, and
6
+ * the panel orchestrator) has been migrated to the typed, DOM-checked client
7
+ * bundle (`src/client/*.ts`, L4). generator.ts inlines that bundle, which
8
+ * registers the views and exposes `renderCodePathsTab` as a page global.
9
+ *
10
+ * The ONLY thing still string-emitted here is the vendored Cytoscape UMD blob
11
+ * (a ~493KB third-party bundle that is NOT our client JS and is deliberately
12
+ * left inlined as a vendor blob). It defines the browser `cytoscape` /
13
+ * `cytoscapeDagre` globals the Visualization view consumes at render time;
14
+ * generator.ts emits it BEFORE the bundle so those globals are present.
15
+ *
16
+ * The graph catalog / view-model JSON blobs are emitted by generator.ts as
17
+ * `<script type="application/json">` elements; the render calls (including
18
+ * `renderCodePathsTab()`) are emitted by generator.ts's registry-derived render
19
+ * block.
23
20
  */
24
- import { dashboardCatalogProvenanceJs } from './code-paths/catalog-provenance.js';
25
- import { dashboardCatalogRecipesTablesJs } from './code-paths/catalog-recipes-tables.js';
26
21
  import { dashboardCytoscapeVendorJs } from './code-paths/cytoscape-vendor.js';
27
- import { dashboardEditorLinkJs } from './code-paths/editor-link.js';
28
- import { dashboardFiltersJs } from './code-paths/filters.js';
29
- import { dashboardFunctionCardJs } from './code-paths/function-card.js';
30
- import { dashboardFunctionRowJs } from './code-paths/function-row.js';
31
- import { dashboardHelpDrawerJs } from './code-paths/help-drawer.js';
32
- import { dashboardIndexesJs } from './code-paths/indexes.js';
33
- import { dashboardPathUtilsJs } from './code-paths/path-utils.js';
34
- import { dashboardSearchJs } from './code-paths/search.js';
35
- import { dashboardTraceJs } from './code-paths/trace.js';
36
- import { dashboardViewCouplingJs } from './code-paths/view-coupling.js';
37
- import { dashboardViewDistributionJs } from './code-paths/view-distribution.js';
38
- import { dashboardViewGraphJs } from './code-paths/view-graph.js';
39
- import { dashboardViewsRegistryJs } from './code-paths/views-registry.js';
40
- /**
41
- * Build flag for the Code Paths explore-tab restructure.
42
- *
43
- * `true` (Plan D default, current): the restructured set — graph (with the
44
- * SCC-highlight fold) / coupling + the ranked-distribution "Functions"
45
- * affordance (which hosts the in-table name filter that replaced the
46
- * former standalone Search subtab). The legacy single-metric views
47
- * (`view-big/hot/wide/untested/sccs`) were deleted in Plan D once their
48
- * signal moved into the engine gate rules (`graph:large-function`,
49
- * `graph:wide-function`, `graph:high-blast-untested`, `graph:cycle`); the
50
- * standalone SCCs view's signal lives on as the graph view's cycle highlight.
51
- *
52
- * `false`: there is no legacy branch anymore — the constant is retained only
53
- * as the default for the `dashboardCodePathsJs(restructured)` test seam, which
54
- * always exercises the restructured set.
55
- *
56
- * This is a build-time, server-side seam — no runtime toggle in the page.
57
- */
58
- const RESTRUCTURED_EXPLORE_TABS = true;
59
22
  /**
60
- * Concatenation order is load-bearing each emitter declares
61
- * top-level names that later emitters reference. The order below is
62
- * the topological sort; reordering will silently break the page with
63
- * `<name> is not defined`. Free-identifier dependencies of each
64
- * emitter, listed against the emitter that supplies them:
65
- *
66
- * 1. path-utils — declares `displayName`, `packageOfPath`, `pkgOf`,
67
- * `shortPkg`.
68
- * 2. indexes — declares `buildIndexes`, `resolveCalleeOcc`. Uses
69
- * `pkgOf` (path-utils, above).
70
- * 3. filters — declares `filterState` (default, non-interactive),
71
- * `passesFilter`, `packagesInCatalog`, `KIND_LIST`.
72
- * Uses `pkgOf` (path-utils, above).
73
- * 4. editor-link — declares `editorLink`. Reads `EDITOR_PROTOCOL`
74
- * (declared in generator.ts before the script
75
- * block).
76
- * 5. trace — declares `findUpstreamTrace`. Uses `indexes`.
77
- * 6. search — declares `searchFunctions`. Uses `indexes`,
78
- * `displayName`.
79
- * 7. function-row — declares `renderFunctionRows` and the empty
80
- * states it uses. Calls `el`, `displayName`,
81
- * `packageOfPath`, `passesFilter`.
82
- * 8. function-card — declares `openFunctionCard`, `closeFunctionCard`.
83
- * Uses `editorLink`, `findUpstreamTrace`, `el`.
84
- * 9. views-registry — declares the singleton `views = []` array.
85
- * Must come before any view emitter.
86
- * 10. help-drawer — declares `openHelpDrawer`. No external deps
87
- * beyond `el`.
88
- * 11-13. view-* — push View descriptors into `views` in TAB order:
89
- * coupling / distribution / graph (alphabetical:
90
- * Coupling, Functions, Visualization — the first is the
91
- * default view). Each renderer closes over `el`,
92
- * `passesFilter`, `displayName`, `packageOfPath`,
93
- * `renderFunctionRows`, plus its own utilities; the
94
- * Visualization renderer also uses `resolveCalleeOcc`
95
- * (prelude) for its function-level projection.
96
- * 15. panelOrchestrator — top-level `renderCodePathsTab`,
97
- * `renderCodePathsExplore`, `openCodePathsSession`.
98
- * Uses every name above plus `renderSubtabBar`
99
- * (from shared/) and `registerTabActivator`.
100
- *
101
- * If the list grows past ~30 entries, replace this manual order with
102
- * a `{ id, deps, emit }` topological sort.
23
+ * Emit the vendored Cytoscape renderer blob for the Code Paths panel. Kept as a
24
+ * function (rather than re-exporting `dashboardCytoscapeVendorJs` directly) so
25
+ * generator.ts and the bundle-weight test keep a stable, panel-scoped entry
26
+ * point as the vendor blob is the only remaining string-emitted Code Paths JS.
103
27
  */
104
- export function dashboardCodePathsJs(_restructured = RESTRUCTURED_EXPLORE_TABS) {
105
- // The explore-tab restructure has shipped: there is one view set (coupling /
106
- // distribution / graph). The `_restructured` parameter is kept
107
- // for the test seam's call-shape compatibility but no longer selects a
108
- // legacy branch (the single-metric view emitters were deleted in Plan D).
109
- // Shared prelude — utilities + the views registry + help drawer. Every view
110
- // emitter depends on these top-level names.
111
- const prelude = [
112
- // 0. cytoscape vendor — defines the `cytoscape` / `cytoscapeDagre`
113
- // browser globals the Graph view consumes. MUST precede any view
114
- // emitter that references them. No deps of its own.
115
- dashboardCytoscapeVendorJs(),
116
- dashboardPathUtilsJs(),
117
- dashboardIndexesJs(),
118
- dashboardFiltersJs(),
119
- // Depends on `packagesInCatalog` (filters, above) + `el`; declares
120
- // `renderCatalogProvenance`, called at the top of the Explore body.
121
- dashboardCatalogProvenanceJs(),
122
- // Declares `renderGraphRuleCatalog` / `renderGraphRecipeCatalog` (the
123
- // Catalog/Recipes subtab tables); only needs `el`.
124
- dashboardCatalogRecipesTablesJs(),
125
- dashboardEditorLinkJs(),
126
- dashboardTraceJs(),
127
- dashboardSearchJs(),
128
- dashboardFunctionRowJs(),
129
- dashboardFunctionCardJs(),
130
- dashboardViewsRegistryJs(),
131
- dashboardHelpDrawerJs(),
132
- ];
133
- // The kept visualizations + the ranked-distribution affordance, in TAB
134
- // order (alphabetical): Coupling, Functions, Visualization. `views[0]` is
135
- // the default view, so Coupling opens first. SCCs fold into the graph view's
136
- // cycle highlight; the single-metric tabs were dropped (their signal moved
137
- // into the engine gate rules). `renderCodePathsExplore` iterates `views` to
138
- // build the tab bar. Emission order here is also the runtime registry order;
139
- // the three view emitters have no cross-dependencies (each only references
140
- // prelude names), so this order is free to match the desired tab order.
141
- const views = [dashboardViewCouplingJs(), dashboardViewDistributionJs(), dashboardViewGraphJs()];
142
- return [...prelude, ...views, panelOrchestratorJs()].join('\n');
143
- }
144
- /**
145
- * Top-level orchestrator emitter for the Code Paths tab. Concerns,
146
- * with the section delimiters that mark them in the emitted JS:
147
- *
148
- * 1. CATALOG STATE — singleton `graphCatalog` and `graphIndexes`.
149
- * 2. CATALOG LOAD — `loadGraphCatalogFromBlob` reads the inline
150
- * `<script id="graph-catalog">` blob.
151
- * 3. PANEL ENTRY — `renderCodePathsTab` mounts the Sessions /
152
- * Explore subtabs via `renderSubtabBar` (F2).
153
- * 4. EXPLORE BODY — `renderCodePathsExplore` builds the view tab
154
- * bar, view containers, row-click delegation, escape handler,
155
- * and runs each view's initial render.
156
- * 5. HASH ROUTE — `readViewIdFromHash` parses `#code-paths/<id>`
157
- * for deep-link initial view.
158
- * 6. CROSS-TAB NAV — `openCodePathsSession` is the activator
159
- * Overview's row-click handler invokes via
160
- * `activateTabForSession` for graph sessions.
161
- * 7. ACTIVATOR REGISTRATION — registers `openCodePathsSession`
162
- * under key `'graph'` in the shared `tabActivators` registry.
163
- *
164
- * The escape handler in EXPLORE BODY is attached to `document`; if
165
- * `renderCodePathsTab` runs more than once (it does not today) the
166
- * handler would leak.
167
- */
168
- function panelOrchestratorJs() {
169
- return String.raw `
170
- // =======================================================
171
- // CODE PATHS — CATALOG STATE
172
- // =======================================================
173
- let graphCatalog = null;
174
- let graphIndexes = { byBodyHash: new Map(), occurrencesByHash: new Map(), bySimpleName: new Map(), callees: new Map(), callers: new Map() };
175
-
176
- // =======================================================
177
- // CODE PATHS — CATALOG LOAD
178
- // =======================================================
179
- function loadGraphCatalogFromBlob() {
180
- const blob = document.getElementById('graph-catalog');
181
- if (!blob || !blob.textContent) return null;
182
- try {
183
- return JSON.parse(blob.textContent);
184
- } catch (err) {
185
- return null;
186
- }
187
- }
188
-
189
- // =======================================================
190
- // CODE PATHS — PANEL ENTRY (Sessions | Explore subtabs)
191
- // =======================================================
192
- function renderCodePathsTab() {
193
- const panel = document.getElementById('panel-code-paths');
194
- if (!panel) return;
195
- while (panel.firstChild) panel.removeChild(panel.firstChild);
196
-
197
- const graphSessions = sessions.filter(s => s.tool === 'graph');
198
- graphCatalog = loadGraphCatalogFromBlob();
199
-
200
- // Code Paths uses the shared renderSubtabBar Strategy (F2). The
201
- // two-subtab Sessions/Explore shape is a config; the DOM-and-click
202
- // boilerplate now lives in subtab-bar.ts and is shared with
203
- // renderToolTab's three-subtab shape. The subtabs render even when
204
- // empty so the tab matches the visual pattern used by Fitness and
205
- // Simulation (subtab bar + italic-centered .empty placeholder).
206
- renderSubtabBar(panel, [
207
- {
208
- id: 'sessions',
209
- label: 'Sessions',
210
- render: function(p) {
211
- if (graphSessions.length > 0) {
212
- renderSessionTable(p, graphSessions, 'var(--accent)');
213
- } else {
214
- p.appendChild(el('div', { class: 'empty', text: 'No sessions yet.' }));
215
- }
216
- },
217
- },
218
- {
219
- id: 'catalog',
220
- label: 'Catalog',
221
- render: function(p) {
222
- renderGraphRuleCatalog(p, typeof graphRuleCatalog !== 'undefined' ? graphRuleCatalog : []);
223
- },
224
- },
225
- {
226
- id: 'recipes',
227
- label: 'Recipes',
228
- render: function(p) {
229
- renderGraphRecipeCatalog(p, typeof graphRecipeCatalog !== 'undefined' ? graphRecipeCatalog : []);
230
- },
231
- },
232
- {
233
- id: 'explore',
234
- label: 'Explore',
235
- render: function(p) {
236
- if (graphCatalog) {
237
- renderCodePathsExplore(p);
238
- } else {
239
- p.appendChild(el('div', { class: 'empty', text: 'No catalog yet.' }));
240
- }
241
- },
242
- },
243
- ]);
244
- }
245
-
246
- // =======================================================
247
- // CODE PATHS — EXPLORE BODY (view tab bar + view stack)
248
- // =======================================================
249
- function renderCodePathsExplore(host) {
250
- graphIndexes = buildIndexes(graphCatalog);
251
-
252
- // Provenance bar — what this Explore view is built from (package scope,
253
- // function count, build time, engine). Shown above the view tabs so a SCOPED
254
- // or stale catalog (e.g. a 'graph packages/contracts' run) reads as "1
255
- // package, built 8 min ago", not as a broken/empty graph. Covers all three
256
- // views since they share the one cached catalog.
257
- renderCatalogProvenance(host, graphCatalog);
258
-
259
- // (No shared filter chip bar — the Visualization view owns its own controls;
260
- // the Functions table reads the default filterState via passesFilter.)
261
-
262
- // View tab bar — built from the registered views.
263
- const tabBar = el('div', { class: 'code-paths-tabs', id: 'code-paths-tabs' });
264
- for (const view of views) {
265
- const tab = el('div', {
266
- class: 'code-paths-tab',
267
- 'data-view': view.id,
268
- text: view.label,
269
- onclick: () => activateView(view.id),
270
- });
271
- tabBar.appendChild(tab);
272
- }
273
- host.appendChild(tabBar);
274
-
275
- // One container per view; only one is .active at a time.
276
- const stack = el('div', { class: 'code-paths-view-container', id: 'code-paths-view-container' });
277
- for (const view of views) {
278
- const c = el('div', { class: 'code-paths-view', id: 'code-paths-view-' + view.id });
279
- stack.appendChild(c);
280
- }
281
- host.appendChild(stack);
282
-
283
- // Delegate row clicks to the function card.
284
- stack.addEventListener('click', e => {
285
- const row = e.target.closest && e.target.closest('[data-body-hash]');
286
- if (!row) return;
287
- openFunctionCard(row.dataset.bodyHash);
288
- });
289
-
290
- // Escape closes the function card.
291
- document.addEventListener('keydown', e => {
292
- if (e.key === 'Escape') closeFunctionCard();
293
- });
294
-
295
- // Render every view once on init.
296
- for (const view of views) {
297
- const container = document.getElementById('code-paths-view-' + view.id);
298
- if (container) view.render(container, graphCatalog, graphIndexes, filterState);
299
- }
300
- const initialId = readViewIdFromHash() || (views[0] && views[0].id);
301
- if (initialId) activateView(initialId);
302
- }
303
-
304
- // =======================================================
305
- // CODE PATHS — HASH ROUTE (deep-link initial view)
306
- // =======================================================
307
- function readViewIdFromHash() {
308
- const m = /^#code-paths\/([a-z]+)/.exec(window.location.hash || '');
309
- return m ? m[1] : null;
310
- }
311
-
312
- // =======================================================
313
- // CODE PATHS — CROSS-TAB NAV (graph sessions deep-link)
314
- // =======================================================
315
- /**
316
- * Open the Code Paths tab on the Sessions subtab, scrolling to and
317
- * selecting the row matching the given session id. Used by the
318
- * Overview row-click handler so a graph row in Recent Activity opens
319
- * the same per-session detail view that fit/sim rows open.
320
- *
321
- * Registered into the shared tabActivators registry under the key
322
- * 'graph' (the StoredSession.tool value for graph runs); the Overview
323
- * row-click handler invokes it through activateTabForSession() rather
324
- * than naming this function directly.
325
- */
326
- function openCodePathsSession(sessionId) {
327
- const tab = document.querySelector('.tab[data-tab="code-paths"]');
328
- const panel = document.getElementById('panel-code-paths');
329
- if (!tab || !panel) return;
330
- document.querySelectorAll('.tab').forEach(t => t.classList.remove('active'));
331
- document.querySelectorAll('.tab-panel').forEach(p => p.classList.remove('active'));
332
- tab.classList.add('active');
333
- panel.classList.add('active');
334
- // Force the Sessions subtab.
335
- const sessionsSub = panel.querySelector('.subtab[data-subtab="sessions"]');
336
- const exploreSub = panel.querySelector('.subtab[data-subtab="explore"]');
337
- const sessionsPanel = document.getElementById('panel-code-paths-sessions');
338
- const explorePanel = document.getElementById('panel-code-paths-explore');
339
- if (sessionsSub) sessionsSub.classList.add('active');
340
- if (exploreSub) exploreSub.classList.remove('active');
341
- if (sessionsPanel) sessionsPanel.classList.add('active');
342
- if (explorePanel) explorePanel.classList.remove('active');
343
- // Click the matching row to trigger the standard renderDetail flow.
344
- const row = sessionsPanel && sessionsPanel.querySelector('tr[data-session-id="' + sessionId + '"]');
345
- if (row) row.click();
346
- }
347
-
348
- // =======================================================
349
- // CODE PATHS — ACTIVATOR REGISTRATION
350
- // =======================================================
351
- if (typeof registerTabActivator === 'function') {
352
- registerTabActivator('graph', openCodePathsSession);
353
- }
354
- `;
28
+ export function dashboardCodePathsVendorJs() {
29
+ return dashboardCytoscapeVendorJs();
355
30
  }
356
31
  //# sourceMappingURL=code-paths.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"code-paths.js","sourceRoot":"","sources":["../src/code-paths.ts"],"names":[],"mappings":"AAAA,oLAAoL;AACpL;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,EAAE,4BAA4B,EAAE,MAAM,oCAAoC,CAAC;AAClF,OAAO,EAAE,+BAA+B,EAAE,MAAM,wCAAwC,CAAC;AACzF,OAAO,EAAE,0BAA0B,EAAE,MAAM,kCAAkC,CAAC;AAC9E,OAAO,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AACpE,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,EAAE,uBAAuB,EAAE,MAAM,+BAA+B,CAAC;AACxE,OAAO,EAAE,sBAAsB,EAAE,MAAM,8BAA8B,CAAC;AACtE,OAAO,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AACpE,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAClE,OAA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GAAG,OAAO,EAAE,GAAG,KAAK,EAAE,mBAAmB,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAClE,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,SAAS,mBAAmB;IAC1B,OAAO,MAAM,CAAC,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyLlB,CAAC;AACF,CAAC"}
1
+ {"version":3,"file":"code-paths.js","sourceRoot":"","sources":["../src/code-paths.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,0BAA0B,EAAE,MAAM,kCAAkC,CAAC;AAE9E;;;;;GAKG;AACH,MAAM,UAAU,0BAA0B;IACxC,OAAO,0BAA0B,EAAE,CAAC;AACtC,CAAC"}
@@ -26,6 +26,8 @@ export interface DashboardInput {
26
26
  graphCatalog?: GraphCatalog | null;
27
27
  graphRuleCatalog?: readonly unknown[];
28
28
  graphRecipeCatalog?: readonly unknown[];
29
+ simScenarioCatalog?: readonly unknown[];
30
+ simRecipeCatalog?: readonly unknown[];
29
31
  editorProtocol?: string | null;
30
32
  }
31
33
  /** Renders a self-contained HTML dashboard string from sessions and catalog inputs. */
@@ -1 +1 @@
1
- {"version":3,"file":"generator.d.ts","sourceRoot":"","sources":["../src/generator.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAYH,OAAO,8BAA8B,CAAC;AAGtC,OAAO,KAAK,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAE1E;;;;;;;;;;;;GAYG;AACH,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,aAAa,EAAE,CAAC;IAM1B,YAAY,CAAC,EAAE,SAAS,OAAO,EAAE,CAAC;IAClC,aAAa,CAAC,EAAE,SAAS,OAAO,EAAE,CAAC;IACnC,YAAY,CAAC,EAAE,YAAY,GAAG,IAAI,CAAC;IAMnC,gBAAgB,CAAC,EAAE,SAAS,OAAO,EAAE,CAAC;IACtC,kBAAkB,CAAC,EAAE,SAAS,OAAO,EAAE,CAAC;IACxC,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAChC;AAiDD,uFAAuF;AACvF,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,cAAc,GAAG,MAAM,CA2GnE"}
1
+ {"version":3,"file":"generator.d.ts","sourceRoot":"","sources":["../src/generator.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAaH,OAAO,8BAA8B,CAAC;AAEtC,OAAO,KAAK,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAE1E;;;;;;;;;;;;GAYG;AACH,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,aAAa,EAAE,CAAC;IAM1B,YAAY,CAAC,EAAE,SAAS,OAAO,EAAE,CAAC;IAClC,aAAa,CAAC,EAAE,SAAS,OAAO,EAAE,CAAC;IACnC,YAAY,CAAC,EAAE,YAAY,GAAG,IAAI,CAAC;IAMnC,gBAAgB,CAAC,EAAE,SAAS,OAAO,EAAE,CAAC;IACtC,kBAAkB,CAAC,EAAE,SAAS,OAAO,EAAE,CAAC;IAIxC,kBAAkB,CAAC,EAAE,SAAS,OAAO,EAAE,CAAC;IACxC,gBAAgB,CAAC,EAAE,SAAS,OAAO,EAAE,CAAC;IACtC,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAChC;AAiDD,uFAAuF;AACvF,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,cAAc,GAAG,MAAM,CA0HnE"}
package/dist/generator.js CHANGED
@@ -4,18 +4,18 @@
4
4
  * Composes CSS, shared JS, and tab-specific JS into one HTML string with all data inlined.
5
5
  * Each tool tab (Fitness, Simulation) has subtabs: Sessions, Catalog, Recipes.
6
6
  */
7
- import { dashboardChecksJs } from './checks.js';
7
+ // Bundled, type-checked client modules (L4 migration). Generated by
8
+ // scripts/bundle-client.mjs from src/client/*.ts; inlined before the legacy
9
+ // string emitters so its exposed globals (e.g. `el`, `renderOverview`,
10
+ // `renderFitnessTab`) resolve for them and for the render block below. The
11
+ // subtab-bar / overview / sessions / checks / recipes / tool-tabs renderers now
12
+ // live in that bundle (src/client/*.ts).
13
+ import { DASHBOARD_CLIENT_BUNDLE } from './client-bundle.generated.js';
8
14
  import { projectCatalogToGraphViewModel } from './code-paths/graph-view-model.js';
9
- import { dashboardCodePathsJs } from './code-paths.js';
15
+ import { dashboardCodePathsVendorJs } from './code-paths.js';
10
16
  import { dashboardCss } from './css.js';
11
- import { dashboardOverviewJs } from './overview.js';
12
- import { dashboardRecipesJs } from './recipes.js';
13
- import { dashboardSessionsJs } from './sessions.js';
14
- import { dashboardSharedJs } from './shared.js';
15
- import { dashboardSubtabBarJs } from './subtab-bar.js';
16
17
  import { listToolTabs } from './tool-tab-registry.js';
17
18
  import './tool-tabs-registrations.js'; // side-effect: registers fit/sim/graph
18
- import { dashboardToolTabsJs } from './tool-tabs.js';
19
19
  // Escape all < and > to prevent script injection in HTML <script> context
20
20
  function escapeForScriptContext(json) {
21
21
  return json.replaceAll('<', String.raw `\u003c`).replaceAll('>', String.raw `\u003e`);
@@ -62,7 +62,7 @@ function serializeOptionalBlob(id, value, kind) {
62
62
  }
63
63
  /** Renders a self-contained HTML dashboard string from sessions and catalog inputs. */
64
64
  export function generateDashboardHtml(input) {
65
- const { sessions, checkCatalog = [], recipeCatalog = [], graphCatalog = null, graphRuleCatalog = [], graphRecipeCatalog = [], editorProtocol = null, } = input;
65
+ const { sessions, checkCatalog = [], recipeCatalog = [], graphCatalog = null, graphRuleCatalog = [], graphRecipeCatalog = [], simScenarioCatalog = [], simRecipeCatalog = [], editorProtocol = null, } = input;
66
66
  const latest = sessions[0];
67
67
  // Coerce score to a finite number before interpolating into the <title>
68
68
  // tag — `latest.score` is typed `number` but originates from a SQLite
@@ -75,6 +75,8 @@ export function generateDashboardHtml(input) {
75
75
  const safeRecipeJson = escapeForScriptContext(JSON.stringify(recipeCatalog));
76
76
  const safeGraphRuleCatalogJson = escapeForScriptContext(JSON.stringify(graphRuleCatalog));
77
77
  const safeGraphRecipeCatalogJson = escapeForScriptContext(JSON.stringify(graphRecipeCatalog));
78
+ const safeSimScenarioCatalogJson = escapeForScriptContext(JSON.stringify(simScenarioCatalog));
79
+ const safeSimRecipeCatalogJson = escapeForScriptContext(JSON.stringify(simRecipeCatalog));
78
80
  const graphCatalogBlock = serializeOptionalBlob('graph-catalog', graphCatalog, 'json');
79
81
  // The Visualization view (view-graph.ts) consumes a slim, pre-projected
80
82
  // view-model rather than the raw catalog: projection aggregates the
@@ -98,6 +100,12 @@ export function generateDashboardHtml(input) {
98
100
  .map((t) => `<div id="panel-${t.id}" class="tab-panel"></div>`)
99
101
  .join('\n');
100
102
  const toolTabRenderCalls = toolTabs.map((t) => `${t.renderFunctionName}();`).join('\n');
103
+ // Overview's `tool → badge style` and `tool → tab id` maps, derived from the
104
+ // same registry and injected as page globals so the bundled overview renderer
105
+ // (src/client/overview.ts) reads them as ambient data — the registry
106
+ // derivation stays type-checked Node code rather than a string template (F1/F8).
107
+ const toolBadgeStylesJson = JSON.stringify(Object.fromEntries(toolTabs.map((t) => [t.tool, t.badgeStyle])));
108
+ const tabMapJson = JSON.stringify(Object.fromEntries(toolTabs.map((t) => [t.tool, t.id])));
101
109
  return `<!DOCTYPE html>
102
110
  <html lang="en">
103
111
  <head>
@@ -136,18 +144,21 @@ const checkCatalog = ${safeCatalogJson};
136
144
  const recipeCatalog = ${safeRecipeJson};
137
145
  const graphRuleCatalog = ${safeGraphRuleCatalogJson};
138
146
  const graphRecipeCatalog = ${safeGraphRecipeCatalogJson};
147
+ const simScenarioCatalog = ${safeSimScenarioCatalogJson};
148
+ const simRecipeCatalog = ${safeSimRecipeCatalogJson};
139
149
  ${editorProtocolJs}
140
150
  const fitSessions = sessions.filter(s => s.tool === 'fit');
141
151
  const simSessions = sessions.filter(s => s.tool === 'sim');
152
+ // Registry-derived Overview maps (tool → badge style / tab id), consumed as page
153
+ // globals by the bundled overview renderer (src/client/overview.ts).
154
+ const toolBadgeStyles = ${toolBadgeStylesJson};
155
+ const tabMap = ${tabMapJson};
142
156
 
143
- ${dashboardSharedJs()}
144
- ${dashboardSubtabBarJs()}
145
- ${dashboardOverviewJs()}
146
- ${dashboardSessionsJs()}
147
- ${dashboardChecksJs()}
148
- ${dashboardRecipesJs()}
149
- ${dashboardToolTabsJs()}
150
- ${dashboardCodePathsJs()}
157
+ // The vendored Cytoscape renderer (defines the cytoscape / cytoscapeDagre
158
+ // browser globals the Visualization view consumes). Inlined BEFORE the bundle so
159
+ // those globals are present; it is a third-party UMD blob, not our client JS.
160
+ ${dashboardCodePathsVendorJs()}
161
+ ${DASHBOARD_CLIENT_BUNDLE}
151
162
 
152
163
  // =======================================================
153
164
  // RENDER TABS
@@ -1 +1 @@
1
- {"version":3,"file":"generator.js","sourceRoot":"","sources":["../src/generator.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,EAAE,8BAA8B,EAAE,MAAM,kCAAkC,CAAC;AAClF,OAAO,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AACvD,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AACxC,OAAO,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AACpD,OAAO,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAClD,OAAO,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AACpD,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AACv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0B,EAAE;EAC5B,uBAAuB;;;;;;EAMvB,kBAAkB;;;QAGZ,CAAC;AACT,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opensip-cli/dashboard",
3
- "version": "0.1.6",
3
+ "version": "0.1.8",
4
4
  "license": "Apache-2.0",
5
5
  "description": "Self-contained HTML dashboard generator for OpenSIP CLI — renders the fit/sim/graph report from session data and graph catalogs",
6
6
  "keywords": [
@@ -32,20 +32,21 @@
32
32
  "NOTICE"
33
33
  ],
34
34
  "dependencies": {
35
- "@opensip-cli/contracts": "0.1.6"
35
+ "@opensip-cli/contracts": "0.1.8"
36
36
  },
37
37
  "devDependencies": {
38
38
  "@types/node": "^24.13.2",
39
39
  "cytoscape": "3.34.0",
40
40
  "cytoscape-dagre": "4.0.0",
41
+ "esbuild": "^0.28.1",
41
42
  "jsdom": "^29.1.1",
42
43
  "typescript": "~6.0.3",
43
44
  "vitest": "^4.1.8"
44
45
  },
45
46
  "scripts": {
46
- "build": "tsc && node scripts/copy-vendor.mjs",
47
+ "build": "tsc -p src/client/tsconfig.json --noEmit && node scripts/bundle-client.mjs && tsc && node scripts/copy-vendor.mjs",
47
48
  "test": "vitest run --passWithNoTests",
48
- "typecheck": "tsc --noEmit",
49
+ "typecheck": "tsc --noEmit && tsc -p src/client/tsconfig.json --noEmit",
49
50
  "vendor:cytoscape": "node scripts/vendor-cytoscape.mjs",
50
51
  "clean": "rm -rf dist"
51
52
  }
package/dist/checks.d.ts DELETED
@@ -1,7 +0,0 @@
1
- /**
2
- * Checks catalog rendering — browsable catalog of checks with run stats.
3
- * Reusable: renderChecksCatalog(container, catalogData) can be called from any panel.
4
- * Returns JS code as a string.
5
- */
6
- export declare function dashboardChecksJs(): string;
7
- //# sourceMappingURL=checks.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"checks.d.ts","sourceRoot":"","sources":["../src/checks.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,wBAAgB,iBAAiB,IAAI,MAAM,CAoR1C"}