@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.
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,8 +0,0 @@
1
- /**
2
- * Top-level tab-bar click handler.
3
- *
4
- * Wires the `#tab-bar` click event to toggle the `active` class on
5
- * both the `.tab` headers and the `.tab-panel` containers.
6
- */
7
- export declare function dashboardTabBarJs(): string;
8
- //# sourceMappingURL=tab-bar.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"tab-bar.d.ts","sourceRoot":"","sources":["../../src/shared/tab-bar.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,wBAAgB,iBAAiB,IAAI,MAAM,CAY1C"}
@@ -1,20 +0,0 @@
1
- /**
2
- * Top-level tab-bar click handler.
3
- *
4
- * Wires the `#tab-bar` click event to toggle the `active` class on
5
- * both the `.tab` headers and the `.tab-panel` containers.
6
- */
7
- export function dashboardTabBarJs() {
8
- return String.raw `
9
- // Tab switching
10
- document.getElementById('tab-bar').addEventListener('click', e => {
11
- const tab = e.target.closest('.tab');
12
- if (!tab) return;
13
- document.querySelectorAll('.tab').forEach(t => t.classList.remove('active'));
14
- document.querySelectorAll('.tab-panel').forEach(p => p.classList.remove('active'));
15
- tab.classList.add('active');
16
- document.getElementById('panel-' + tab.dataset.tab).classList.add('active');
17
- });
18
- `;
19
- }
20
- //# sourceMappingURL=tab-bar.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"tab-bar.js","sourceRoot":"","sources":["../../src/shared/tab-bar.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,UAAU,iBAAiB;IAC/B,OAAO,MAAM,CAAC,GAAG,CAAA;;;;;;;;;;CAUlB,CAAC;AACF,CAAC"}
package/dist/shared.d.ts DELETED
@@ -1,26 +0,0 @@
1
- /**
2
- * Shared dashboard JS — concatenates the per-concern emitters in
3
- * `shared/`.
4
- *
5
- * Pre-F9 this was a 237-line `String.raw` blob covering five
6
- * concerns. Each concern now lives in its own file and is composed
7
- * here in the order downstream emitters depend on:
8
- *
9
- * 1. tab-bar — top-level tab switching
10
- * 2. tab-activators — cross-tab session-aware navigation registry
11
- * 3. el — `el(tag, attrs, children)` DOM helper used by
12
- * every subsequent emitter
13
- * 4. pagination — `paginateTable` / `paginateGroupedRows` /
14
- * `renderPageButtons`
15
- * 5. sortable — `makeSortable` plus the global setTimeout(0)
16
- * scan that activates `.data-table.sortable`
17
- *
18
- * Any change to the order should be considered carefully — the
19
- * pagination helpers reference `el`, the sortable helper references
20
- * the pagination helpers, and the global activation pass at the end
21
- * fires after every preceding emitter has declared its top-level
22
- * names. New shared concerns should pick a slot rather than be
23
- * appended blindly.
24
- */
25
- export declare function dashboardSharedJs(): string;
26
- //# sourceMappingURL=shared.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../src/shared.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAQH,wBAAgB,iBAAiB,IAAI,MAAM,CAQ1C"}
package/dist/shared.js DELETED
@@ -1,39 +0,0 @@
1
- /**
2
- * Shared dashboard JS — concatenates the per-concern emitters in
3
- * `shared/`.
4
- *
5
- * Pre-F9 this was a 237-line `String.raw` blob covering five
6
- * concerns. Each concern now lives in its own file and is composed
7
- * here in the order downstream emitters depend on:
8
- *
9
- * 1. tab-bar — top-level tab switching
10
- * 2. tab-activators — cross-tab session-aware navigation registry
11
- * 3. el — `el(tag, attrs, children)` DOM helper used by
12
- * every subsequent emitter
13
- * 4. pagination — `paginateTable` / `paginateGroupedRows` /
14
- * `renderPageButtons`
15
- * 5. sortable — `makeSortable` plus the global setTimeout(0)
16
- * scan that activates `.data-table.sortable`
17
- *
18
- * Any change to the order should be considered carefully — the
19
- * pagination helpers reference `el`, the sortable helper references
20
- * the pagination helpers, and the global activation pass at the end
21
- * fires after every preceding emitter has declared its top-level
22
- * names. New shared concerns should pick a slot rather than be
23
- * appended blindly.
24
- */
25
- import { dashboardElJs } from './shared/el.js';
26
- import { dashboardPaginationJs } from './shared/pagination.js';
27
- import { dashboardSortableJs } from './shared/sortable.js';
28
- import { dashboardTabActivatorsJs } from './shared/tab-activators.js';
29
- import { dashboardTabBarJs } from './shared/tab-bar.js';
30
- export function dashboardSharedJs() {
31
- return [
32
- dashboardTabBarJs(),
33
- dashboardTabActivatorsJs(),
34
- dashboardElJs(),
35
- dashboardPaginationJs(),
36
- dashboardSortableJs(),
37
- ].join('\n');
38
- }
39
- //# sourceMappingURL=shared.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"shared.js","sourceRoot":"","sources":["../src/shared.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AAC/D,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AACtE,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAExD,MAAM,UAAU,iBAAiB;IAC/B,OAAO;QACL,iBAAiB,EAAE;QACnB,wBAAwB,EAAE;QAC1B,aAAa,EAAE;QACf,qBAAqB,EAAE;QACvB,mBAAmB,EAAE;KACtB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACf,CAAC"}
@@ -1,23 +0,0 @@
1
- /**
2
- * Subtab-bar Strategy — JS-string emitter for the shared subtab pattern.
3
- *
4
- * Both the fit/sim Tool Tab (Sessions / Catalog / Recipes — three
5
- * subtabs) and the Code Paths Tab (Sessions / Explore — two subtabs)
6
- * need the same DOM/click-delegation behaviour: a `.subtab-bar` of
7
- * clickable headers, a stack of `.subtab-panel` containers, and a
8
- * single click handler that toggles the `active` class on both.
9
- *
10
- * Pre-F2, both call sites duplicated the same 20-line block. This
11
- * emitter declares one runtime helper, `renderSubtabBar(panel,
12
- * subtabs)`, that both consumers call. The Strategy is the
13
- * `subtabs` array — each entry is `{ id, label, render(panel) }` —
14
- * and `renderSubtabBar` returns the panel-element map so callers can
15
- * still reach into specific subpanels if they need to (Code Paths
16
- * does not, fit/sim's `renderToolTab` does not either after F2).
17
- *
18
- * The emitter must be concatenated BEFORE any caller (i.e. before
19
- * `dashboardToolTabsJs` and `dashboardCodePathsJs`) since both rely
20
- * on `renderSubtabBar` being declared in scope.
21
- */
22
- export declare function dashboardSubtabBarJs(): string;
23
- //# sourceMappingURL=subtab-bar.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"subtab-bar.d.ts","sourceRoot":"","sources":["../src/subtab-bar.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,oBAAoB,IAAI,MAAM,CAsD7C"}
@@ -1,77 +0,0 @@
1
- /**
2
- * Subtab-bar Strategy — JS-string emitter for the shared subtab pattern.
3
- *
4
- * Both the fit/sim Tool Tab (Sessions / Catalog / Recipes — three
5
- * subtabs) and the Code Paths Tab (Sessions / Explore — two subtabs)
6
- * need the same DOM/click-delegation behaviour: a `.subtab-bar` of
7
- * clickable headers, a stack of `.subtab-panel` containers, and a
8
- * single click handler that toggles the `active` class on both.
9
- *
10
- * Pre-F2, both call sites duplicated the same 20-line block. This
11
- * emitter declares one runtime helper, `renderSubtabBar(panel,
12
- * subtabs)`, that both consumers call. The Strategy is the
13
- * `subtabs` array — each entry is `{ id, label, render(panel) }` —
14
- * and `renderSubtabBar` returns the panel-element map so callers can
15
- * still reach into specific subpanels if they need to (Code Paths
16
- * does not, fit/sim's `renderToolTab` does not either after F2).
17
- *
18
- * The emitter must be concatenated BEFORE any caller (i.e. before
19
- * `dashboardToolTabsJs` and `dashboardCodePathsJs`) since both rely
20
- * on `renderSubtabBar` being declared in scope.
21
- */
22
- export function dashboardSubtabBarJs() {
23
- return String.raw `
24
- // =======================================================
25
- // SUBTAB BAR (Strategy — shared by tool tabs and Code Paths)
26
- // =======================================================
27
- //
28
- // renderSubtabBar(panel, subtabs)
29
- // panel — host element (e.g. document.getElementById('panel-fitness'))
30
- // subtabs — Array<{ id: string, label: string, render(panel): void }>
31
- //
32
- // Builds the .subtab-bar (with the first subtab .active), creates one
33
- // .subtab-panel per entry, mounts them, wires up click delegation,
34
- // and finally invokes each entry's render(panel) to populate it.
35
- //
36
- // Returns the { id → panel } map so callers can reach into a specific
37
- // subpanel by id if they need to (rare; both first-party callers
38
- // don't).
39
- function renderSubtabBar(panel, subtabs) {
40
- const subtabBar = el('div', { class: 'subtab-bar' });
41
- const panels = {};
42
- subtabs.forEach((t, i) => {
43
- const subtab = el('div', {
44
- class: 'subtab' + (i === 0 ? ' active' : ''),
45
- 'data-subtab': t.id,
46
- text: t.label,
47
- });
48
- subtabBar.appendChild(subtab);
49
-
50
- const subpanel = el('div', {
51
- class: 'subtab-panel' + (i === 0 ? ' active' : ''),
52
- id: panel.id + '-' + t.id,
53
- });
54
- panels[t.id] = subpanel;
55
- });
56
-
57
- panel.appendChild(subtabBar);
58
- subtabs.forEach(t => panel.appendChild(panels[t.id]));
59
-
60
- subtabBar.addEventListener('click', e => {
61
- const tab = e.target.closest('.subtab');
62
- if (!tab) return;
63
- subtabBar.querySelectorAll('.subtab').forEach(t => t.classList.remove('active'));
64
- tab.classList.add('active');
65
- subtabs.forEach(t => panels[t.id].classList.remove('active'));
66
- panels[tab.dataset.subtab].classList.add('active');
67
- });
68
-
69
- // Render each subpanel's body. Done after mounting so renderers can
70
- // safely measure their host (the panel is in the document).
71
- subtabs.forEach(t => t.render(panels[t.id]));
72
-
73
- return panels;
74
- }
75
- `;
76
- }
77
- //# sourceMappingURL=subtab-bar.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"subtab-bar.js","sourceRoot":"","sources":["../src/subtab-bar.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,UAAU,oBAAoB;IAClC,OAAO,MAAM,CAAC,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoDlB,CAAC;AACF,CAAC"}
@@ -1,12 +0,0 @@
1
- /**
2
- * Tool tab rendering — creates subtabs (Sessions / Catalog / Recipes) under each tool tab.
3
- * Returns JS code as a string.
4
- *
5
- * Delegates the subtab DOM/click pattern to the shared `renderSubtabBar`
6
- * Strategy declared by `dashboardSubtabBarJs` (F2). The three-subtab
7
- * shape is now a config — `[overview, catalog, recipes]` — so a tool
8
- * with a different shape (e.g. Code Paths' two subtabs) is also a
9
- * config call rather than a duplicated DOM block.
10
- */
11
- export declare function dashboardToolTabsJs(): string;
12
- //# sourceMappingURL=tool-tabs.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"tool-tabs.d.ts","sourceRoot":"","sources":["../src/tool-tabs.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,wBAAgB,mBAAmB,IAAI,MAAM,CAoE5C"}
package/dist/tool-tabs.js DELETED
@@ -1,80 +0,0 @@
1
- /**
2
- * Tool tab rendering — creates subtabs (Sessions / Catalog / Recipes) under each tool tab.
3
- * Returns JS code as a string.
4
- *
5
- * Delegates the subtab DOM/click pattern to the shared `renderSubtabBar`
6
- * Strategy declared by `dashboardSubtabBarJs` (F2). The three-subtab
7
- * shape is now a config — `[overview, catalog, recipes]` — so a tool
8
- * with a different shape (e.g. Code Paths' two subtabs) is also a
9
- * config call rather than a duplicated DOM block.
10
- */
11
- export function dashboardToolTabsJs() {
12
- return `
13
- // =======================================================
14
- // TOOL SUBTAB RENDERING
15
- // =======================================================
16
-
17
- /**
18
- * Render a tool tab with subtabs: Sessions | Catalog | Recipes
19
- * (the first subtab keeps the stable id 'overview' for routing).
20
- * @param panelId - e.g., 'panel-fitness'
21
- * @param toolSessions - filtered sessions for this tool
22
- * @param accentColor - CSS var for accent
23
- * @param catalogLabel - e.g., 'Checks', 'Scenarios'
24
- * @param catalogData - check/scenario catalog entries (or empty)
25
- * @param renderCatalogFn - function(container, data) to render the catalog
26
- * @param recipesData - recipe catalog entries (or empty array). Passed
27
- * in so each tool can carry its own recipe namespace once recipes
28
- * beyond fit are supported; today fit and sim share the global
29
- * recipeCatalog by passing it through.
30
- */
31
- function renderToolTab(panelId, toolSessions, accentColor, catalogLabel, catalogData, renderCatalogFn, recipesData) {
32
- const panel = document.getElementById(panelId);
33
- renderSubtabBar(panel, [
34
- { id: 'overview', label: 'Sessions', render: function(p) {
35
- renderSessionTable(p, toolSessions, accentColor);
36
- }},
37
- { id: 'catalog', label: catalogLabel, render: function(p) {
38
- if (catalogData && catalogData.length > 0) {
39
- renderCatalogFn(p, catalogData);
40
- } else {
41
- p.appendChild(el('div', {class:'empty', text:'No ' + catalogLabel.toLowerCase() + ' available yet.'}));
42
- }
43
- }},
44
- { id: 'recipes', label: 'Recipes', render: function(p) {
45
- renderRecipesPanel(p, recipesData);
46
- }},
47
- ]);
48
- }
49
-
50
- // =======================================================
51
- // RENDER ALL TOOL TABS
52
- // =======================================================
53
-
54
- function renderFitnessTab() {
55
- renderToolTab(
56
- 'panel-fitness',
57
- fitSessions,
58
- 'var(--accent-fitness)',
59
- 'Checks',
60
- checkCatalog,
61
- function(container, data) { renderChecksCatalog(container, data); },
62
- recipeCatalog
63
- );
64
- }
65
-
66
- function renderSimulationTab() {
67
- renderToolTab(
68
- 'panel-simulation',
69
- simSessions,
70
- 'var(--accent-sim)',
71
- 'Scenarios',
72
- [], // No scenarios yet
73
- function(container, data) {},
74
- recipeCatalog
75
- );
76
- }
77
-
78
- `;
79
- }
80
- //# sourceMappingURL=tool-tabs.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"tool-tabs.js","sourceRoot":"","sources":["../src/tool-tabs.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,MAAM,UAAU,mBAAmB;IACjC,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkER,CAAC;AACF,CAAC"}