@plumix/core 0.1.4 → 0.3.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.
Files changed (170) hide show
  1. package/dist/admin-bar/collect.d.ts.map +1 -1
  2. package/dist/admin-bar/collect.js +1 -15
  3. package/dist/admin-bar/collect.js.map +1 -1
  4. package/dist/admin-bar/styles.d.ts.map +1 -1
  5. package/dist/admin-bar/styles.js +1 -11
  6. package/dist/admin-bar/styles.js.map +1 -1
  7. package/dist/cli/worker-codegen.d.ts.map +1 -1
  8. package/dist/cli/worker-codegen.js +3 -5
  9. package/dist/cli/worker-codegen.js.map +1 -1
  10. package/dist/context/app.d.ts +8 -0
  11. package/dist/context/app.d.ts.map +1 -1
  12. package/dist/context/app.js +7 -0
  13. package/dist/context/app.js.map +1 -1
  14. package/dist/context/debug.d.ts +25 -0
  15. package/dist/context/debug.d.ts.map +1 -0
  16. package/dist/context/debug.js +13 -0
  17. package/dist/context/debug.js.map +1 -0
  18. package/dist/context/stores.d.ts +2 -0
  19. package/dist/context/stores.d.ts.map +1 -1
  20. package/dist/context/stores.js.map +1 -1
  21. package/dist/css-tag.d.ts +2 -0
  22. package/dist/css-tag.d.ts.map +1 -0
  23. package/dist/css-tag.js +13 -0
  24. package/dist/css-tag.js.map +1 -0
  25. package/dist/db/libsql.d.ts.map +1 -1
  26. package/dist/db/libsql.js +13 -2
  27. package/dist/db/libsql.js.map +1 -1
  28. package/dist/debug-bar/collect.d.ts.map +1 -1
  29. package/dist/debug-bar/collect.js +1 -15
  30. package/dist/debug-bar/collect.js.map +1 -1
  31. package/dist/debug-bar/collector.d.ts +9 -0
  32. package/dist/debug-bar/collector.d.ts.map +1 -0
  33. package/dist/debug-bar/collector.js +80 -0
  34. package/dist/debug-bar/collector.js.map +1 -0
  35. package/dist/debug-bar/component.d.ts.map +1 -1
  36. package/dist/debug-bar/component.js +15 -2
  37. package/dist/debug-bar/component.js.map +1 -1
  38. package/dist/debug-bar/core-panels.d.ts.map +1 -1
  39. package/dist/debug-bar/core-panels.js +12 -1
  40. package/dist/debug-bar/core-panels.js.map +1 -1
  41. package/dist/debug-bar/db-query.d.ts +21 -0
  42. package/dist/debug-bar/db-query.d.ts.map +1 -0
  43. package/dist/debug-bar/db-query.js +23 -0
  44. package/dist/debug-bar/db-query.js.map +1 -0
  45. package/dist/debug-bar/format-param.d.ts +14 -0
  46. package/dist/debug-bar/format-param.d.ts.map +1 -0
  47. package/dist/debug-bar/format-param.js +27 -0
  48. package/dist/debug-bar/format-param.js.map +1 -0
  49. package/dist/debug-bar/highlight-sql.d.ts +11 -0
  50. package/dist/debug-bar/highlight-sql.d.ts.map +1 -0
  51. package/dist/debug-bar/highlight-sql.js +82 -0
  52. package/dist/debug-bar/highlight-sql.js.map +1 -0
  53. package/dist/debug-bar/panels/app.d.ts +8 -0
  54. package/dist/debug-bar/panels/app.d.ts.map +1 -0
  55. package/dist/debug-bar/panels/app.js +32 -0
  56. package/dist/debug-bar/panels/app.js.map +1 -0
  57. package/dist/debug-bar/panels/database.d.ts +9 -0
  58. package/dist/debug-bar/panels/database.d.ts.map +1 -0
  59. package/dist/debug-bar/panels/database.js +33 -0
  60. package/dist/debug-bar/panels/database.js.map +1 -0
  61. package/dist/debug-bar/panels/request.d.ts +2 -2
  62. package/dist/debug-bar/panels/request.d.ts.map +1 -1
  63. package/dist/debug-bar/panels/request.js +24 -11
  64. package/dist/debug-bar/panels/request.js.map +1 -1
  65. package/dist/debug-bar/panels/template.d.ts +14 -0
  66. package/dist/debug-bar/panels/template.d.ts.map +1 -0
  67. package/dist/debug-bar/panels/template.js +40 -0
  68. package/dist/debug-bar/panels/template.js.map +1 -0
  69. package/dist/debug-bar/panels/timeline.d.ts +11 -0
  70. package/dist/debug-bar/panels/timeline.d.ts.map +1 -0
  71. package/dist/debug-bar/panels/timeline.js +46 -0
  72. package/dist/debug-bar/panels/timeline.js.map +1 -0
  73. package/dist/debug-bar/primitives.d.ts +12 -3
  74. package/dist/debug-bar/primitives.d.ts.map +1 -1
  75. package/dist/debug-bar/primitives.js +17 -1
  76. package/dist/debug-bar/primitives.js.map +1 -1
  77. package/dist/debug-bar/styles.d.ts.map +1 -1
  78. package/dist/debug-bar/styles.js +229 -17
  79. package/dist/debug-bar/styles.js.map +1 -1
  80. package/dist/debug-bar/template-node-label.d.ts +6 -0
  81. package/dist/debug-bar/template-node-label.d.ts.map +1 -0
  82. package/dist/debug-bar/template-node-label.js +18 -0
  83. package/dist/debug-bar/template-node-label.js.map +1 -0
  84. package/dist/debug-bar/timeline-geometry.d.ts +30 -0
  85. package/dist/debug-bar/timeline-geometry.d.ts.map +1 -0
  86. package/dist/debug-bar/timeline-geometry.js +26 -0
  87. package/dist/debug-bar/timeline-geometry.js.map +1 -0
  88. package/dist/debug-bar/timeline-model.d.ts +23 -0
  89. package/dist/debug-bar/timeline-model.d.ts.map +1 -0
  90. package/dist/debug-bar/timeline-model.js +34 -0
  91. package/dist/debug-bar/timeline-model.js.map +1 -0
  92. package/dist/debug-bar/trace-libsql.d.ts +18 -0
  93. package/dist/debug-bar/trace-libsql.d.ts.map +1 -0
  94. package/dist/debug-bar/trace-libsql.js +42 -0
  95. package/dist/debug-bar/trace-libsql.js.map +1 -0
  96. package/dist/debug-bar/types.d.ts +6 -0
  97. package/dist/debug-bar/types.d.ts.map +1 -1
  98. package/dist/hooks/registry.d.ts +14 -3
  99. package/dist/hooks/registry.d.ts.map +1 -1
  100. package/dist/hooks/registry.js +22 -0
  101. package/dist/hooks/registry.js.map +1 -1
  102. package/dist/index.d.ts +8 -6
  103. package/dist/index.d.ts.map +1 -1
  104. package/dist/index.js +7 -3
  105. package/dist/index.js.map +1 -1
  106. package/dist/plugin/manifest.d.ts +3 -0
  107. package/dist/plugin/manifest.d.ts.map +1 -1
  108. package/dist/plugin/manifest.js +1 -0
  109. package/dist/plugin/manifest.js.map +1 -1
  110. package/dist/plugin/register.d.ts.map +1 -1
  111. package/dist/plugin/register.js +1 -0
  112. package/dist/plugin/register.js.map +1 -1
  113. package/dist/route/render/render-template.d.ts +6 -4
  114. package/dist/route/render/render-template.d.ts.map +1 -1
  115. package/dist/route/render/render-template.js +48 -44
  116. package/dist/route/render/render-template.js.map +1 -1
  117. package/dist/route/render/resolved-entry.d.ts +10 -5
  118. package/dist/route/render/resolved-entry.d.ts.map +1 -1
  119. package/dist/route/render/template-builders.d.ts +72 -0
  120. package/dist/route/render/template-builders.d.ts.map +1 -0
  121. package/dist/route/render/template-builders.js +113 -0
  122. package/dist/route/render/template-builders.js.map +1 -0
  123. package/dist/route/render/template-hierarchy.d.ts +53 -38
  124. package/dist/route/render/template-hierarchy.d.ts.map +1 -1
  125. package/dist/route/render/template-hierarchy.js +127 -74
  126. package/dist/route/render/template-hierarchy.js.map +1 -1
  127. package/dist/route/resolve.d.ts +3 -3
  128. package/dist/route/resolve.d.ts.map +1 -1
  129. package/dist/route/resolve.js +30 -32
  130. package/dist/route/resolve.js.map +1 -1
  131. package/dist/runtime/app.d.ts +8 -13
  132. package/dist/runtime/app.d.ts.map +1 -1
  133. package/dist/runtime/app.js +1 -39
  134. package/dist/runtime/app.js.map +1 -1
  135. package/dist/runtime/dispatcher.d.ts.map +1 -1
  136. package/dist/runtime/dispatcher.js +8 -9
  137. package/dist/runtime/dispatcher.js.map +1 -1
  138. package/dist/template-deps.js +1 -1
  139. package/dist/template-registry.d.ts +57 -0
  140. package/dist/template-registry.d.ts.map +1 -0
  141. package/dist/template-registry.js +1 -0
  142. package/dist/template-registry.js.map +1 -0
  143. package/dist/template.d.ts +2 -2
  144. package/dist/test/default-theme.d.ts.map +1 -1
  145. package/dist/test/default-theme.js +7 -6
  146. package/dist/test/default-theme.js.map +1 -1
  147. package/dist/test/dispatcher.d.ts +3 -0
  148. package/dist/test/dispatcher.d.ts.map +1 -1
  149. package/dist/test/dispatcher.js +8 -2
  150. package/dist/test/dispatcher.js.map +1 -1
  151. package/dist/test/harness.d.ts.map +1 -1
  152. package/dist/test/harness.js +12 -2
  153. package/dist/test/harness.js.map +1 -1
  154. package/dist/theme-errors.d.ts +0 -3
  155. package/dist/theme-errors.d.ts.map +1 -1
  156. package/dist/theme-errors.js +7 -18
  157. package/dist/theme-errors.js.map +1 -1
  158. package/dist/theme.d.ts +59 -23
  159. package/dist/theme.d.ts.map +1 -1
  160. package/dist/theme.js +21 -10
  161. package/dist/theme.js.map +1 -1
  162. package/dist/welcome-theme.d.ts +2 -2
  163. package/dist/welcome-theme.d.ts.map +1 -1
  164. package/dist/welcome-theme.js +7 -6
  165. package/dist/welcome-theme.js.map +1 -1
  166. package/package.json +7 -7
  167. package/dist/route/render/archive-props.d.ts +0 -39
  168. package/dist/route/render/archive-props.d.ts.map +0 -1
  169. package/dist/route/render/archive-props.js +0 -32
  170. package/dist/route/render/archive-props.js.map +0 -1
@@ -6,21 +6,17 @@
6
6
  // structural elements, which neutralizes the common `table {}`/`label {}`-style
7
7
  // theme element selectors — not airtight, but enough for a dev tool. Zero-JS:
8
8
  // a native <details> toggles the panel and radio inputs drive the tabs.
9
- // No-op tag for editor syntax-highlighting + stylelint (see admin-bar/styles).
10
- function css(strings, ...values) {
11
- let out = strings[0] ?? "";
12
- for (let i = 0; i < values.length; i++) {
13
- out += values[i] + (strings[i + 1] ?? "");
14
- }
15
- return out;
16
- }
9
+ import { css } from "../css-tag.js";
17
10
  // Upper bound on pure-CSS tab wiring. Panels beyond this still render but
18
11
  // their tab won't toggle; core ships far fewer than this.
19
12
  const MAX_TABS = 16;
20
13
  function tabRules() {
21
14
  let out = "";
22
15
  for (let n = 1; n <= MAX_TABS; n++) {
16
+ // Show the checked tab's pane...
23
17
  out += `.plumix-debug-bar__radio:nth-of-type(${n}):checked ~ .plumix-debug-bar__panes > .plumix-debug-bar__pane:nth-of-type(${n}){display:block}`;
18
+ // ...and highlight its label so the active tab is obvious.
19
+ out += `.plumix-debug-bar__radio:nth-of-type(${n}):checked ~ .plumix-debug-bar__labels > label:nth-of-type(${n}){background:#1d2327;color:#fff}`;
24
20
  }
25
21
  return out;
26
22
  }
@@ -49,7 +45,10 @@ export const DEBUG_BAR_CSS = css `
49
45
  font-size: 12px;
50
46
  line-height: 1.5;
51
47
  color: #e6e6e6;
52
- max-width: min(560px, calc(100vw - 24px));
48
+ /* Fixed width (not max-width) so switching tabs can't resize the bar —
49
+ a content-driven width shifts the anchored edges and moves the tab
50
+ labels out from under the cursor. */
51
+ width: min(440px, calc(100vw - 24px));
53
52
  }
54
53
  .plumix-debug-bar *,
55
54
  .plumix-debug-bar *::before,
@@ -69,7 +68,10 @@ export const DEBUG_BAR_CSS = css `
69
68
  .plumix-debug-bar tbody,
70
69
  .plumix-debug-bar tr,
71
70
  .plumix-debug-bar th,
72
- .plumix-debug-bar td {
71
+ .plumix-debug-bar td,
72
+ .plumix-debug-bar dl,
73
+ .plumix-debug-bar dt,
74
+ .plumix-debug-bar dd {
73
75
  margin: 0;
74
76
  padding: 0;
75
77
  border: 0;
@@ -77,6 +79,15 @@ export const DEBUG_BAR_CSS = css `
77
79
  font: inherit;
78
80
  color: inherit;
79
81
  text-align: inherit;
82
+ /* The font shorthand omits these — reset them so a theme's element
83
+ rules (e.g. label text-transform/letter-spacing) can't bleed in. */
84
+ text-transform: none;
85
+ letter-spacing: normal;
86
+ word-spacing: normal;
87
+ text-decoration: none;
88
+ text-indent: 0;
89
+ white-space: normal;
90
+ box-shadow: none;
80
91
  }
81
92
  .plumix-debug-bar > details {
82
93
  background: #1d2327;
@@ -96,36 +107,115 @@ export const DEBUG_BAR_CSS = css `
96
107
  .plumix-debug-bar summary::-webkit-details-marker {
97
108
  display: none;
98
109
  }
110
+ /* Toggle affordance: chevron points right when collapsed, down when open,
111
+ so it's clear the header opens and closes the bar. */
112
+ .plumix-debug-bar summary::after {
113
+ content: "▸";
114
+ float: right;
115
+ opacity: 0.6;
116
+ }
117
+ .plumix-debug-bar > details[open] > summary::after {
118
+ content: "▾";
119
+ }
99
120
  .plumix-debug-bar__radio {
100
121
  position: absolute;
101
122
  opacity: 0;
102
123
  pointer-events: none;
103
124
  }
104
- .plumix-debug-bar__labels {
125
+ /* Qualified with nav so this out-specifies the element reset (which zeroes
126
+ nav padding) — otherwise the tabs get no left inset and hug the border. */
127
+ .plumix-debug-bar nav.plumix-debug-bar__labels {
105
128
  display: flex;
106
129
  flex-wrap: wrap;
107
- gap: 2px;
108
- padding: 6px 8px 0;
130
+ gap: 6px;
131
+ /* 12px left inset matches the summary and panes; generous top padding
132
+ gives the tab row space below the header. */
133
+ padding: 14px 12px 0;
109
134
  border-top: 1px solid #3c434a;
110
135
  }
111
136
  .plumix-debug-bar__labels label {
112
- padding: 4px 8px;
137
+ /* No LEFT padding, so the tab text aligns exactly with the title and
138
+ content at 12px. Right padding gives the active box separation without
139
+ letting it overhang toward the border. */
140
+ padding: 3px 8px 3px 0;
113
141
  border-radius: 4px 4px 0 0;
114
142
  cursor: pointer;
115
143
  color: #b9c0c7;
144
+ /* Intentional small-caps tab look, matching __section-title. Our own
145
+ rule (wins over the reset by source order), so it's theme-independent. */
146
+ font-size: 11px;
147
+ text-transform: uppercase;
148
+ letter-spacing: 0.04em;
116
149
  }
117
150
  .plumix-debug-bar__labels label:hover {
118
151
  background: #2c3338;
119
152
  color: #fff;
120
153
  }
121
154
  .plumix-debug-bar__panes {
122
- padding: 10px 12px 12px;
123
- max-height: min(60vh, 480px);
155
+ /* Small horizontal inset so cards sit just off the bar edge; the card's
156
+ own padding adds the rest, landing content text at 12px — flush with
157
+ the summary title and tab row above. */
158
+ padding: 10px 4px 12px;
159
+ /* Fixed height (not max-height) so the bar doesn't grow/shrink between
160
+ tabs; each pane scrolls within the stable frame. */
161
+ height: min(50vh, 320px);
124
162
  overflow: auto;
163
+ /* Narrow, theme-matched scrollbar instead of the OS default. */
164
+ scrollbar-width: thin;
165
+ scrollbar-color: #3c434a transparent;
166
+ }
167
+ .plumix-debug-bar__panes::-webkit-scrollbar {
168
+ width: 8px;
169
+ height: 8px;
170
+ }
171
+ .plumix-debug-bar__panes::-webkit-scrollbar-thumb {
172
+ background: #3c434a;
173
+ border-radius: 4px;
174
+ }
175
+ .plumix-debug-bar__panes::-webkit-scrollbar-thumb:hover {
176
+ background: #4a535b;
177
+ }
178
+ .plumix-debug-bar__panes::-webkit-scrollbar-track {
179
+ background: transparent;
125
180
  }
126
181
  .plumix-debug-bar__pane {
127
182
  display: none;
128
183
  }
184
+ .plumix-debug-bar__section-title {
185
+ margin: 0 0 6px;
186
+ font-size: 11px;
187
+ text-transform: uppercase;
188
+ letter-spacing: 0.04em;
189
+ color: #8a929a;
190
+ }
191
+ /* Key/value description list — a fixed first column so every value lines
192
+ up the same distance in, across all sections. */
193
+ .plumix-debug-bar__kv {
194
+ display: grid;
195
+ grid-template-columns: 104px 1fr;
196
+ gap: 3px 8px;
197
+ align-items: baseline;
198
+ }
199
+ .plumix-debug-bar__kv dt {
200
+ color: #8a929a;
201
+ }
202
+ .plumix-debug-bar__kv dd {
203
+ color: #fff;
204
+ overflow-wrap: anywhere;
205
+ }
206
+ /* Group each section as a subtle card. */
207
+ .plumix-debug-bar__pane > section {
208
+ background: #23282f;
209
+ border-radius: 6px;
210
+ padding: 8px;
211
+ }
212
+ .plumix-debug-bar__pane > section + section {
213
+ margin-top: 8px;
214
+ }
215
+ .plumix-debug-bar__error {
216
+ margin: 0;
217
+ color: #f0a5a5;
218
+ }
129
219
  .plumix-debug-bar table {
130
220
  width: 100%;
131
221
  border-collapse: collapse;
@@ -143,12 +233,134 @@ export const DEBUG_BAR_CSS = css `
143
233
  }
144
234
  .plumix-debug-bar td.plumix-debug-bar__val {
145
235
  white-space: normal;
146
- word-break: break-word;
236
+ /* Wrap long values at spaces (and break a word only if it would
237
+ overflow) without squeezing short cells — word-break:break-word
238
+ shrank the numeric columns until a value like 1.8 wrapped. */
239
+ overflow-wrap: break-word;
147
240
  color: #fff;
148
241
  }
149
242
  .plumix-debug-bar th {
150
243
  color: #8a929a;
151
244
  }
245
+ .plumix-debug-bar__empty {
246
+ margin: 0;
247
+ color: #8a929a;
248
+ }
249
+ /* Template panel — per-rule resolution status */
250
+ .plumix-debug-bar__status {
251
+ font-weight: 600;
252
+ }
253
+ .plumix-debug-bar__status--matched {
254
+ color: #7ee787;
255
+ }
256
+ .plumix-debug-bar__status--skipped {
257
+ color: #d29922;
258
+ }
259
+ .plumix-debug-bar__status--never-evaluated {
260
+ color: #8a929a;
261
+ }
262
+ /* Timeline panel — SVG waterfall */
263
+ .plumix-debug-bar__timeline {
264
+ display: block;
265
+ overflow: visible;
266
+ }
267
+ .plumix-debug-bar__timeline-bar {
268
+ fill: #6ea8fe;
269
+ }
270
+ .plumix-debug-bar__timeline-name {
271
+ fill: #e6e6e6;
272
+ font-size: 10px;
273
+ }
274
+ .plumix-debug-bar__timeline-ms {
275
+ fill: #8a929a;
276
+ font-size: 9px;
277
+ }
278
+ /* Database panel — query list */
279
+ .plumix-debug-bar__queries {
280
+ list-style: none;
281
+ margin: 0;
282
+ padding: 0;
283
+ display: flex;
284
+ flex-direction: column;
285
+ gap: 8px;
286
+ }
287
+ .plumix-debug-bar__query {
288
+ display: flex;
289
+ flex-direction: column;
290
+ gap: 3px;
291
+ padding-bottom: 8px;
292
+ border-bottom: 1px solid #2c3338;
293
+ }
294
+ .plumix-debug-bar__query:last-child {
295
+ border-bottom: 0;
296
+ padding-bottom: 0;
297
+ }
298
+ .plumix-debug-bar__query-head {
299
+ display: flex;
300
+ gap: 6px;
301
+ align-items: baseline;
302
+ }
303
+ .plumix-debug-bar__kind {
304
+ flex: 0 0 auto;
305
+ font-size: 9px;
306
+ text-transform: uppercase;
307
+ letter-spacing: 0.04em;
308
+ padding: 1px 5px;
309
+ border-radius: 3px;
310
+ background: #2c3338;
311
+ color: #b9c0c7;
312
+ }
313
+ .plumix-debug-bar__kind--select {
314
+ background: rgba(126, 231, 135, 0.15);
315
+ color: #7ee787;
316
+ }
317
+ .plumix-debug-bar__kind--insert {
318
+ background: rgba(110, 168, 254, 0.15);
319
+ color: #6ea8fe;
320
+ }
321
+ .plumix-debug-bar__kind--update {
322
+ background: rgba(227, 179, 65, 0.15);
323
+ color: #e3b341;
324
+ }
325
+ .plumix-debug-bar__kind--delete {
326
+ background: rgba(240, 165, 165, 0.15);
327
+ color: #f0a5a5;
328
+ }
329
+ .plumix-debug-bar__sql {
330
+ font-family: inherit;
331
+ color: #c9d1d9;
332
+ overflow-wrap: anywhere;
333
+ }
334
+ .plumix-debug-bar__tok--keyword {
335
+ color: #6ea8fe;
336
+ }
337
+ .plumix-debug-bar__tok--string {
338
+ color: #7ee787;
339
+ }
340
+ .plumix-debug-bar__tok--number {
341
+ color: #56d4dd;
342
+ }
343
+ .plumix-debug-bar__params {
344
+ display: flex;
345
+ flex-wrap: wrap;
346
+ gap: 6px;
347
+ padding-left: 10px;
348
+ }
349
+ .plumix-debug-bar__param {
350
+ color: #b9c0c7;
351
+ }
352
+ .plumix-debug-bar__param--string {
353
+ color: #7ee787;
354
+ }
355
+ .plumix-debug-bar__param--number {
356
+ color: #56d4dd;
357
+ }
358
+ .plumix-debug-bar__param--boolean {
359
+ color: #e3b341;
360
+ }
361
+ .plumix-debug-bar__param--null {
362
+ color: #8a929a;
363
+ }
152
364
  ` +
153
365
  POSITION_CSS +
154
366
  tabRules();
@@ -1 +1 @@
1
- {"version":3,"file":"styles.js","sourceRoot":"","sources":["../../src/debug-bar/styles.ts"],"names":[],"mappings":"AAAA,yEAAyE;AACzE,4EAA4E;AAC5E,8EAA8E;AAC9E,8EAA8E;AAC9E,uEAAuE;AACvE,gFAAgF;AAChF,8EAA8E;AAC9E,wEAAwE;AAExE,+EAA+E;AAC/E,SAAS,GAAG,CACV,OAA6B,EAC7B,GAAG,MAAyB;IAE5B,IAAI,GAAG,GAAG,OAAO,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;IAC3B,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;QACvC,GAAG,IAAI,MAAM,CAAC,CAAC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CAAC,8EAA8E,CAAC,kBAAkB,CAAC;QAClJ,2DAA2D;QAC3D,GAAG,IAAI,wCAAwC,CAAC,6DAA6D,CAAC,kCAAkC,CAAC;IACnJ,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC;AAED,MAAM,YAAY,GAAG,GAAG,CAAA;;;;;;;;;;;;;CAavB,CAAC;AAEF,MAAM,CAAC,MAAM,aAAa,GACxB,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuUF;IACD,YAAY;IACZ,QAAQ,EAAE,CAAC"}
@@ -0,0 +1,6 @@
1
+ import type { ResolvedNode } from "../route/render/template-hierarchy.js";
2
+ /** Panel id + collector namespace for the template hierarchy resolution. */
3
+ export declare const TEMPLATE_PANEL_ID = "template";
4
+ /** A human label for the resolved route node, for the Template panel. */
5
+ export declare function templateNodeLabel(node: ResolvedNode): string;
6
+ //# sourceMappingURL=template-node-label.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"template-node-label.d.ts","sourceRoot":"","sources":["../../src/debug-bar/template-node-label.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uCAAuC,CAAC;AAE1E,4EAA4E;AAC5E,eAAO,MAAM,iBAAiB,aAAa,CAAC;AAE5C,yEAAyE;AACzE,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,YAAY,GAAG,MAAM,CAa5D"}
@@ -0,0 +1,18 @@
1
+ /** Panel id + collector namespace for the template hierarchy resolution. */
2
+ export const TEMPLATE_PANEL_ID = "template";
3
+ /** A human label for the resolved route node, for the Template panel. */
4
+ export function templateNodeLabel(node) {
5
+ switch (node.kind) {
6
+ case "content":
7
+ return `${node.entryType}: ${node.slug}`;
8
+ case "term":
9
+ return `${node.taxonomy}: ${node.slug}`;
10
+ case "content-type-archive":
11
+ return `${node.entryType} archive`;
12
+ case "front-page":
13
+ return "front page";
14
+ case "search":
15
+ return "search";
16
+ }
17
+ }
18
+ //# sourceMappingURL=template-node-label.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"template-node-label.js","sourceRoot":"","sources":["../../src/debug-bar/template-node-label.ts"],"names":[],"mappings":"AAEA,4EAA4E;AAC5E,MAAM,CAAC,MAAM,iBAAiB,GAAG,UAAU,CAAC;AAE5C,yEAAyE;AACzE,MAAM,UAAU,iBAAiB,CAAC,IAAkB;IAClD,QAAQ,IAAI,CAAC,IAAI,EAAE,CAAC;QAClB,KAAK,SAAS;YACZ,OAAO,GAAG,IAAI,CAAC,SAAS,KAAK,IAAI,CAAC,IAAI,EAAE,CAAC;QAC3C,KAAK,MAAM;YACT,OAAO,GAAG,IAAI,CAAC,QAAQ,KAAK,IAAI,CAAC,IAAI,EAAE,CAAC;QAC1C,KAAK,sBAAsB;YACzB,OAAO,GAAG,IAAI,CAAC,SAAS,UAAU,CAAC;QACrC,KAAK,YAAY;YACf,OAAO,YAAY,CAAC;QACtB,KAAK,QAAQ;YACX,OAAO,QAAQ,CAAC;IACpB,CAAC;AACH,CAAC"}
@@ -0,0 +1,30 @@
1
+ import type { Timeline } from "./timeline-model.js";
2
+ export interface TimelineRectOptions {
3
+ /** Total SVG width the waterfall is scaled into. */
4
+ readonly width: number;
5
+ readonly rowHeight: number;
6
+ /** Vertical gap between rows. */
7
+ readonly rowGap: number;
8
+ /** Floor width so zero- and sub-pixel-duration bars stay visible. */
9
+ readonly minBarWidth: number;
10
+ }
11
+ interface TimelineRect {
12
+ readonly name: string;
13
+ readonly x: number;
14
+ readonly y: number;
15
+ readonly width: number;
16
+ readonly height: number;
17
+ }
18
+ export interface TimelineGeometry {
19
+ readonly width: number;
20
+ readonly height: number;
21
+ readonly rects: readonly TimelineRect[];
22
+ }
23
+ /**
24
+ * Maps a {@link Timeline} to SVG rectangle coordinates for the waterfall. Pure
25
+ * and dimensionless of any DOM — one row per span, stacked top to bottom, each
26
+ * bar positioned and scaled against the window. The panel renders the rects.
27
+ */
28
+ export declare function timelineGeometry(timeline: Timeline, options: TimelineRectOptions): TimelineGeometry;
29
+ export {};
30
+ //# sourceMappingURL=timeline-geometry.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"timeline-geometry.d.ts","sourceRoot":"","sources":["../../src/debug-bar/timeline-geometry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAEpD,MAAM,WAAW,mBAAmB;IAClC,oDAAoD;IACpD,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,iCAAiC;IACjC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,qEAAqE;IACrE,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;CAC9B;AAED,UAAU,YAAY;IACpB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CACzB;AAED,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,KAAK,EAAE,SAAS,YAAY,EAAE,CAAC;CACzC;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAC9B,QAAQ,EAAE,QAAQ,EAClB,OAAO,EAAE,mBAAmB,GAC3B,gBAAgB,CAuBlB"}
@@ -0,0 +1,26 @@
1
+ /**
2
+ * Maps a {@link Timeline} to SVG rectangle coordinates for the waterfall. Pure
3
+ * and dimensionless of any DOM — one row per span, stacked top to bottom, each
4
+ * bar positioned and scaled against the window. The panel renders the rects.
5
+ */
6
+ export function timelineGeometry(timeline, options) {
7
+ const { width, rowHeight, rowGap, minBarWidth } = options;
8
+ const { rows, totalMs } = timeline;
9
+ const scale = totalMs > 0 ? width / totalMs : 0;
10
+ const rects = rows.map((row, i) => {
11
+ const barWidth = Math.max(row.durationMs * scale, minBarWidth);
12
+ return {
13
+ name: row.name,
14
+ // Clamp so a bar at (or near) the window end doesn't spill past the edge.
15
+ x: Math.min(row.offsetMs * scale, width - barWidth),
16
+ y: i * (rowHeight + rowGap),
17
+ width: barWidth,
18
+ height: rowHeight,
19
+ };
20
+ });
21
+ const height = rows.length === 0
22
+ ? 0
23
+ : rows.length * rowHeight + (rows.length - 1) * rowGap;
24
+ return { width, height, rects };
25
+ }
26
+ //# sourceMappingURL=timeline-geometry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"timeline-geometry.js","sourceRoot":"","sources":["../../src/debug-bar/timeline-geometry.ts"],"names":[],"mappings":"AA0BA;;;;GAIG;AACH,MAAM,UAAU,gBAAgB,CAC9B,QAAkB,EAClB,OAA4B;IAE5B,MAAM,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,EAAE,WAAW,EAAE,GAAG,OAAO,CAAC;IAC1D,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,QAAQ,CAAC;IACnC,MAAM,KAAK,GAAG,OAAO,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC;IAEhD,MAAM,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,CAAC,EAAE,EAAE;QAChC,MAAM,QAAQ,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,UAAU,GAAG,KAAK,EAAE,WAAW,CAAC,CAAC;QAC/D,OAAO;YACL,IAAI,EAAE,GAAG,CAAC,IAAI;YACd,0EAA0E;YAC1E,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,QAAQ,GAAG,KAAK,EAAE,KAAK,GAAG,QAAQ,CAAC;YACnD,CAAC,EAAE,CAAC,GAAG,CAAC,SAAS,GAAG,MAAM,CAAC;YAC3B,KAAK,EAAE,QAAQ;YACf,MAAM,EAAE,SAAS;SAClB,CAAC;IACJ,CAAC,CAAC,CAAC;IAEH,MAAM,MAAM,GACV,IAAI,CAAC,MAAM,KAAK,CAAC;QACf,CAAC,CAAC,CAAC;QACH,CAAC,CAAC,IAAI,CAAC,MAAM,GAAG,SAAS,GAAG,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,GAAG,MAAM,CAAC;IAE3D,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC;AAClC,CAAC"}
@@ -0,0 +1,23 @@
1
+ import type { TraceSpan } from "../context/stores.js";
2
+ /** A span flattened into a single waterfall row. */
3
+ interface TimelineRow {
4
+ readonly name: string;
5
+ /** Nesting depth; 0 for a root span. */
6
+ readonly depth: number;
7
+ /** Start offset from the timeline window's start, in ms. */
8
+ readonly offsetMs: number;
9
+ readonly durationMs: number;
10
+ }
11
+ export interface Timeline {
12
+ readonly rows: readonly TimelineRow[];
13
+ /** Window span: latest end minus earliest start, in ms. */
14
+ readonly totalMs: number;
15
+ }
16
+ /**
17
+ * Flattens a trace-span tree into an ordered list of waterfall rows, each
18
+ * positioned relative to the request's overall time window. Pure — the panel
19
+ * feeds it {@link TraceSpan} roots from the collector and renders the result.
20
+ */
21
+ export declare function buildTimeline(roots: readonly TraceSpan[]): Timeline;
22
+ export {};
23
+ //# sourceMappingURL=timeline-model.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"timeline-model.d.ts","sourceRoot":"","sources":["../../src/debug-bar/timeline-model.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAEtD,oDAAoD;AACpD,UAAU,WAAW;IACnB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,wCAAwC;IACxC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,4DAA4D;IAC5D,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;CAC7B;AAED,MAAM,WAAW,QAAQ;IACvB,QAAQ,CAAC,IAAI,EAAE,SAAS,WAAW,EAAE,CAAC;IACtC,2DAA2D;IAC3D,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CAC1B;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,SAAS,SAAS,EAAE,GAAG,QAAQ,CAwBnE"}
@@ -0,0 +1,34 @@
1
+ /**
2
+ * Flattens a trace-span tree into an ordered list of waterfall rows, each
3
+ * positioned relative to the request's overall time window. Pure — the panel
4
+ * feeds it {@link TraceSpan} roots from the collector and renders the result.
5
+ */
6
+ export function buildTimeline(roots) {
7
+ let windowStart = Infinity;
8
+ let windowEnd = -Infinity;
9
+ const visit = (span) => {
10
+ windowStart = Math.min(windowStart, span.startedAt);
11
+ windowEnd = Math.max(windowEnd, span.startedAt + span.durationMs);
12
+ for (const child of span.children)
13
+ visit(child);
14
+ };
15
+ for (const root of roots)
16
+ visit(root);
17
+ if (roots.length === 0)
18
+ return { rows: [], totalMs: 0 };
19
+ const rows = [];
20
+ const flatten = (span, depth) => {
21
+ rows.push({
22
+ name: span.name,
23
+ depth,
24
+ offsetMs: span.startedAt - windowStart,
25
+ durationMs: span.durationMs,
26
+ });
27
+ for (const child of span.children)
28
+ flatten(child, depth + 1);
29
+ };
30
+ for (const root of roots)
31
+ flatten(root, 0);
32
+ return { rows, totalMs: windowEnd - windowStart };
33
+ }
34
+ //# sourceMappingURL=timeline-model.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"timeline-model.js","sourceRoot":"","sources":["../../src/debug-bar/timeline-model.ts"],"names":[],"mappings":"AAkBA;;;;GAIG;AACH,MAAM,UAAU,aAAa,CAAC,KAA2B;IACvD,IAAI,WAAW,GAAG,QAAQ,CAAC;IAC3B,IAAI,SAAS,GAAG,CAAC,QAAQ,CAAC;IAC1B,MAAM,KAAK,GAAG,CAAC,IAAe,EAAQ,EAAE;QACtC,WAAW,GAAG,IAAI,CAAC,GAAG,CAAC,WAAW,EAAE,IAAI,CAAC,SAAS,CAAC,CAAC;QACpD,SAAS,GAAG,IAAI,CAAC,GAAG,CAAC,SAAS,EAAE,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,UAAU,CAAC,CAAC;QAClE,KAAK,MAAM,KAAK,IAAI,IAAI,CAAC,QAAQ;YAAE,KAAK,CAAC,KAAK,CAAC,CAAC;IAClD,CAAC,CAAC;IACF,KAAK,MAAM,IAAI,IAAI,KAAK;QAAE,KAAK,CAAC,IAAI,CAAC,CAAC;IACtC,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,EAAE,IAAI,EAAE,EAAE,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;IAExD,MAAM,IAAI,GAAkB,EAAE,CAAC;IAC/B,MAAM,OAAO,GAAG,CAAC,IAAe,EAAE,KAAa,EAAQ,EAAE;QACvD,IAAI,CAAC,IAAI,CAAC;YACR,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,KAAK;YACL,QAAQ,EAAE,IAAI,CAAC,SAAS,GAAG,WAAW;YACtC,UAAU,EAAE,IAAI,CAAC,UAAU;SAC5B,CAAC,CAAC;QACH,KAAK,MAAM,KAAK,IAAI,IAAI,CAAC,QAAQ;YAAE,OAAO,CAAC,KAAK,EAAE,KAAK,GAAG,CAAC,CAAC,CAAC;IAC/D,CAAC,CAAC;IACF,KAAK,MAAM,IAAI,IAAI,KAAK;QAAE,OAAO,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC;IAE3C,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,SAAS,GAAG,WAAW,EAAE,CAAC;AACpD,CAAC"}
@@ -0,0 +1,18 @@
1
+ import type { Client } from "@libsql/client";
2
+ /**
3
+ * Wraps a libsql client so every `execute` runs inside a timed `ctx.debug.span`
4
+ * — the Timeline panel's source of per-query durations, which drizzle's logger
5
+ * contract can't provide. Dev-only (call it behind the `PLUMIX_DEV` gate); a
6
+ * no-op outside a request, and tree-shaken from prod along with its callers.
7
+ *
8
+ * Lives apart from the driver-agnostic query logger so the libsql type import
9
+ * stays out of adapters that don't use libsql (e.g. the D1 runtime).
10
+ *
11
+ * Assumes drizzle's single-argument call convention (`execute(stmt)`,
12
+ * `batch(stmts)`); it forwards only that first argument, so a direct
13
+ * `execute(sql, args)` call would drop its params. Queries inside a drizzle
14
+ * transaction run through `tx.execute` and aren't timed — acceptable for a dev
15
+ * panel.
16
+ */
17
+ export declare function traceSqlClient(client: Client): Client;
18
+ //# sourceMappingURL=trace-libsql.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"trace-libsql.d.ts","sourceRoot":"","sources":["../../src/debug-bar/trace-libsql.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAe,MAAM,gBAAgB,CAAC;AAK1D;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CA0BrD"}
@@ -0,0 +1,42 @@
1
+ import { tryGetContext } from "../context/stores.js";
2
+ import { queryKind } from "./highlight-sql.js";
3
+ /**
4
+ * Wraps a libsql client so every `execute` runs inside a timed `ctx.debug.span`
5
+ * — the Timeline panel's source of per-query durations, which drizzle's logger
6
+ * contract can't provide. Dev-only (call it behind the `PLUMIX_DEV` gate); a
7
+ * no-op outside a request, and tree-shaken from prod along with its callers.
8
+ *
9
+ * Lives apart from the driver-agnostic query logger so the libsql type import
10
+ * stays out of adapters that don't use libsql (e.g. the D1 runtime).
11
+ *
12
+ * Assumes drizzle's single-argument call convention (`execute(stmt)`,
13
+ * `batch(stmts)`); it forwards only that first argument, so a direct
14
+ * `execute(sql, args)` call would drop its params. Queries inside a drizzle
15
+ * transaction run through `tx.execute` and aren't timed — acceptable for a dev
16
+ * panel.
17
+ */
18
+ export function traceSqlClient(client) {
19
+ const stmtSql = (stmt) => typeof stmt === "string" ? stmt : stmt.sql;
20
+ const rawExecute = client.execute.bind(client);
21
+ client.execute = (stmt) => {
22
+ const ctx = tryGetContext();
23
+ const run = () => rawExecute(stmt);
24
+ if (!ctx)
25
+ return run();
26
+ return ctx.debug.span(`db: ${queryKind(stmtSql(stmt))}`, run);
27
+ };
28
+ // Relational reads and transactions run as one batched round-trip; time the
29
+ // whole batch as a single span (labelled by kind when uniform).
30
+ const rawBatch = client.batch.bind(client);
31
+ client.batch = (stmts, ...rest) => {
32
+ const ctx = tryGetContext();
33
+ const run = () => rawBatch(stmts, ...rest);
34
+ if (!ctx || !Array.isArray(stmts))
35
+ return run();
36
+ const kinds = new Set(stmts.map((stmt) => queryKind(stmtSql(stmt))));
37
+ const label = kinds.size === 1 ? `db: ${[...kinds][0]}` : "db: batch";
38
+ return ctx.debug.span(`${label} (${stmts.length})`, run);
39
+ };
40
+ return client;
41
+ }
42
+ //# sourceMappingURL=trace-libsql.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"trace-libsql.js","sourceRoot":"","sources":["../../src/debug-bar/trace-libsql.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAE/C;;;;;;;;;;;;;;GAcG;AACH,MAAM,UAAU,cAAc,CAAC,MAAc;IAC3C,MAAM,OAA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CAAC,OAAO,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,WAAW,CAAC;QACtE,OAAO,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,KAAK,KAAK,KAAK,CAAC,MAAM,GAAG,EAAE,GAAG,CAAC,CAAC;IAC3D,CAAC,CAAC;IAEF,OAAO,MAAM,CAAC;AAChB,CAAC"}
@@ -12,6 +12,12 @@ export interface DebugPanel {
12
12
  readonly title: Label;
13
13
  /** Ascending; unset sorts after ordered panels (see DEFAULT_PANEL_ORDER). */
14
14
  readonly order?: number;
15
+ /**
16
+ * Rendered in isolation (its own SSR pass) so a throw can't crash the host
17
+ * page. Read request data off `ctx` (and `ctx.debug.get(id)` for your own
18
+ * recorded entries) — outer React context providers are NOT visible across
19
+ * the isolated render, so don't rely on `useContext` from the page tree.
20
+ */
15
21
  readonly render: (ctx: AppContext) => ReactNode;
16
22
  }
17
23
  declare module "../hooks/types.js" {
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/debug-bar/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAE9C;;;;;GAKG;AACH,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC;IACtB,6EAA6E;IAC7E,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,UAAU,KAAK,SAAS,CAAC;CACjD;AAED,OAAO,QAAQ,mBAAmB,CAAC;IACjC,UAAU,cAAc;QACtB,kBAAkB,EAAE,CAClB,MAAM,EAAE,SAAS,UAAU,EAAE,EAC7B,GAAG,EAAE,UAAU,KACZ,SAAS,UAAU,EAAE,CAAC;KAC5B;CACF"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/debug-bar/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAE9C;;;;;GAKG;AACH,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC;IACtB,6EAA6E;IAC7E,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB;;;;;OAKG;IACH,QAAQ,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,UAAU,KAAK,SAAS,CAAC;CACjD;AAED,OAAO,QAAQ,mBAAmB,CAAC;IACjC,UAAU,cAAc;QACtB,kBAAkB,EAAE,CAClB,MAAM,EAAE,SAAS,UAAU,EAAE,EAC7B,GAAG,EAAE,UAAU,KACZ,SAAS,UAAU,EAAE,CAAC;KAC5B;CACF"}
@@ -10,11 +10,21 @@ export interface HookExecutor {
10
10
  * surfaces immediately instead of leaking a rejected value downstream.
11
11
  */
12
12
  applyFilterSync<TName extends FilterName>(name: TName, input: FilterInput<TName>, ...rest: FilterRest<TName>): FilterInput<TName>;
13
+ /**
14
+ * Synchronous array-accumulating filter pipeline with per-handler error
15
+ * isolation: a handler that throws or returns a non-array is logged and
16
+ * skipped, and the chain continues from the last good value. Used by the
17
+ * collector surfaces (admin bar, debug bar) that gather contributions and
18
+ * must not let one misbehaving plugin take down the whole bar. Only valid
19
+ * for array-valued filters — the runtime treats a non-array return as the
20
+ * skip signal, so a scalar filter's every return would be discarded.
21
+ */
22
+ applyFilterIsolated<TName extends FilterName>(name: TName, seed: FilterInput<TName>, ...rest: FilterRest<TName>): FilterInput<TName>;
13
23
  /**
14
24
  * Sorted snapshot of a filter's registered handlers — for surfaces that
15
- * want full per-handler control (try/catch boundary, return-shape
16
- * validation, custom accumulator) instead of the linear pipeline that
17
- * `applyFilterSync` provides. Admin-bar is the first consumer.
25
+ * run the handlers themselves rather than as an accumulating pipeline.
26
+ * `admin-search` is the consumer: it fans the handlers out in parallel
27
+ * (`Promise.all`) instead of threading one result into the next.
18
28
  */
19
29
  getFilterHandlers<TName extends FilterName>(name: TName): readonly {
20
30
  readonly fn: FilterFn<TName>;
@@ -41,6 +51,7 @@ export declare class HookRegistry implements HookExecutor {
41
51
  }): void;
42
52
  applyFilter<TName extends FilterName>(name: TName, input: FilterInput<TName>, ...rest: FilterRest<TName>): Promise<FilterInput<TName>>;
43
53
  applyFilterSync<TName extends FilterName>(name: TName, input: FilterInput<TName>, ...rest: FilterRest<TName>): FilterInput<TName>;
54
+ applyFilterIsolated<TName extends FilterName>(name: TName, seed: FilterInput<TName>, ...rest: FilterRest<TName>): FilterInput<TName>;
44
55
  getFilterHandlers<TName extends FilterName>(name: TName): readonly {
45
56
  readonly fn: FilterFn<TName>;
46
57
  readonly plugin: string | null;
@@ -1 +1 @@
1
- {"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../src/hooks/registry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,UAAU,EACV,QAAQ,EACR,UAAU,EACV,QAAQ,EACR,WAAW,EACX,UAAU,EACV,UAAU,EACV,WAAW,EACZ,MAAM,YAAY,CAAC;AAmBpB,MAAM,WAAW,YAAY;IAC3B,WAAW,CAAC,KAAK,SAAS,UAAU,EAClC,IAAI,EAAE,KAAK,EACX,KAAK,EAAE,WAAW,CAAC,KAAK,CAAC,EACzB,GAAG,IAAI,EAAE,UAAU,CAAC,KAAK,CAAC,GACzB,OAAO,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC,CAAC;IAC/B;;;;;;;OAOG;IACH,e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