@flight-framework/devtools 1.0.2 → 2.0.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.
@@ -172,45 +172,45 @@ export function renderHydrationPanel(islandsList, metrics) {
172
172
  const statusOrder = { hydrating: 0, pending: 1, hydrated: 2, error: 3 };
173
173
  return statusOrder[a.status] - statusOrder[b.status];
174
174
  });
175
- return `
176
- <div class="flight-dt-hydration-panel">
177
- <div class="flight-dt-hydration-summary">
178
- <div class="flight-dt-metric">
179
- <span class="flight-dt-metric-value">${metrics.hydratedCount}/${metrics.totalIslands}</span>
180
- <span class="flight-dt-metric-label">Hydrated</span>
181
- </div>
182
- <div class="flight-dt-metric">
183
- <span class="flight-dt-metric-value">${metrics.totalHydrationTime.toFixed(0)}ms</span>
184
- <span class="flight-dt-metric-label">Total Time</span>
185
- </div>
186
- <div class="flight-dt-metric">
187
- <span class="flight-dt-metric-value">${metrics.averageHydrationTime.toFixed(1)}ms</span>
188
- <span class="flight-dt-metric-label">Avg Time</span>
189
- </div>
190
- ${metrics.pendingCount > 0 ? `
191
- <div class="flight-dt-metric flight-dt-metric--warning">
192
- <span class="flight-dt-metric-value">${metrics.pendingCount}</span>
193
- <span class="flight-dt-metric-label">Pending</span>
194
- </div>
195
- ` : ''}
196
- </div>
197
-
198
- <div class="flight-dt-hydration-list">
199
- ${sortedIslands.map(island => `
200
- <div class="flight-dt-island" data-status="${island.status}">
201
- <div class="flight-dt-island-header">
202
- <span class="flight-dt-island-status" style="background: ${statusColors[island.status]}"></span>
203
- <span class="flight-dt-island-trigger" title="${island.trigger}">${triggerIcons[island.trigger]}</span>
204
- <span class="flight-dt-island-name">${escapeHtml(island.name)}</span>
205
- <span class="flight-dt-island-time">${island.duration ? `${island.duration.toFixed(1)}ms` : '...'}</span>
206
- </div>
207
- ${island.error ? `<div class="flight-dt-island-error">${escapeHtml(island.error)}</div>` : ''}
208
- </div>
209
- `).join('')}
210
- </div>
211
-
212
- ${sortedIslands.length === 0 ? '<div class="flight-dt-empty">No islands detected</div>' : ''}
213
- </div>
175
+ return `
176
+ <div class="flight-dt-hydration-panel">
177
+ <div class="flight-dt-hydration-summary">
178
+ <div class="flight-dt-metric">
179
+ <span class="flight-dt-metric-value">${metrics.hydratedCount}/${metrics.totalIslands}</span>
180
+ <span class="flight-dt-metric-label">Hydrated</span>
181
+ </div>
182
+ <div class="flight-dt-metric">
183
+ <span class="flight-dt-metric-value">${metrics.totalHydrationTime.toFixed(0)}ms</span>
184
+ <span class="flight-dt-metric-label">Total Time</span>
185
+ </div>
186
+ <div class="flight-dt-metric">
187
+ <span class="flight-dt-metric-value">${metrics.averageHydrationTime.toFixed(1)}ms</span>
188
+ <span class="flight-dt-metric-label">Avg Time</span>
189
+ </div>
190
+ ${metrics.pendingCount > 0 ? `
191
+ <div class="flight-dt-metric flight-dt-metric--warning">
192
+ <span class="flight-dt-metric-value">${metrics.pendingCount}</span>
193
+ <span class="flight-dt-metric-label">Pending</span>
194
+ </div>
195
+ ` : ''}
196
+ </div>
197
+
198
+ <div class="flight-dt-hydration-list">
199
+ ${sortedIslands.map(island => `
200
+ <div class="flight-dt-island" data-status="${island.status}">
201
+ <div class="flight-dt-island-header">
202
+ <span class="flight-dt-island-status" style="background: ${statusColors[island.status]}"></span>
203
+ <span class="flight-dt-island-trigger" title="${island.trigger}">${triggerIcons[island.trigger]}</span>
204
+ <span class="flight-dt-island-name">${escapeHtml(island.name)}</span>
205
+ <span class="flight-dt-island-time">${island.duration ? `${island.duration.toFixed(1)}ms` : '...'}</span>
206
+ </div>
207
+ ${island.error ? `<div class="flight-dt-island-error">${escapeHtml(island.error)}</div>` : ''}
208
+ </div>
209
+ `).join('')}
210
+ </div>
211
+
212
+ ${sortedIslands.length === 0 ? '<div class="flight-dt-empty">No islands detected</div>' : ''}
213
+ </div>
214
214
  `;
215
215
  }
216
216
  function escapeHtml(str) {
@@ -222,108 +222,108 @@ function escapeHtml(str) {
222
222
  /**
223
223
  * CSS styles for the hydration panel
224
224
  */
225
- export const hydrationPanelStyles = `
226
- .flight-dt-hydration-panel {
227
- padding: 8px;
228
- }
229
-
230
- .flight-dt-hydration-summary {
231
- display: flex;
232
- gap: 16px;
233
- padding: 8px;
234
- background: rgba(255, 255, 255, 0.05);
235
- border-radius: 6px;
236
- margin-bottom: 12px;
237
- }
238
-
239
- .flight-dt-metric {
240
- display: flex;
241
- flex-direction: column;
242
- align-items: center;
243
- }
244
-
245
- .flight-dt-metric-value {
246
- font-size: 18px;
247
- font-weight: 600;
248
- color: #e0e0e0;
249
- }
250
-
251
- .flight-dt-metric-label {
252
- font-size: 10px;
253
- color: #888;
254
- text-transform: uppercase;
255
- }
256
-
257
- .flight-dt-metric--warning .flight-dt-metric-value {
258
- color: #fbbf24;
259
- }
260
-
261
- .flight-dt-hydration-list {
262
- display: flex;
263
- flex-direction: column;
264
- gap: 4px;
265
- max-height: 200px;
266
- overflow-y: auto;
267
- }
268
-
269
- .flight-dt-island {
270
- display: flex;
271
- flex-direction: column;
272
- padding: 6px 8px;
273
- background: rgba(255, 255, 255, 0.03);
274
- border-radius: 4px;
275
- font-size: 12px;
276
- }
277
-
278
- .flight-dt-island-header {
279
- display: flex;
280
- align-items: center;
281
- gap: 8px;
282
- }
283
-
284
- .flight-dt-island-status {
285
- width: 8px;
286
- height: 8px;
287
- border-radius: 50%;
288
- }
289
-
290
- .flight-dt-island-trigger {
291
- width: 16px;
292
- height: 16px;
293
- display: flex;
294
- align-items: center;
295
- justify-content: center;
296
- background: rgba(255, 255, 255, 0.1);
297
- border-radius: 3px;
298
- font-size: 10px;
299
- font-weight: 600;
300
- color: #888;
301
- }
302
-
303
- .flight-dt-island-name {
304
- flex: 1;
305
- color: #e0e0e0;
306
- font-family: monospace;
307
- }
308
-
309
- .flight-dt-island-time {
310
- color: #888;
311
- font-family: monospace;
312
- }
313
-
314
- .flight-dt-island-error {
315
- margin-top: 4px;
316
- padding: 4px 8px;
317
- background: rgba(239, 68, 68, 0.1);
318
- border-radius: 3px;
319
- color: #ef4444;
320
- font-size: 11px;
321
- }
322
-
323
- .flight-dt-empty {
324
- text-align: center;
325
- color: #666;
326
- padding: 20px;
327
- }
225
+ export const hydrationPanelStyles = `
226
+ .flight-dt-hydration-panel {
227
+ padding: 8px;
228
+ }
229
+
230
+ .flight-dt-hydration-summary {
231
+ display: flex;
232
+ gap: 16px;
233
+ padding: 8px;
234
+ background: rgba(255, 255, 255, 0.05);
235
+ border-radius: 6px;
236
+ margin-bottom: 12px;
237
+ }
238
+
239
+ .flight-dt-metric {
240
+ display: flex;
241
+ flex-direction: column;
242
+ align-items: center;
243
+ }
244
+
245
+ .flight-dt-metric-value {
246
+ font-size: 18px;
247
+ font-weight: 600;
248
+ color: #e0e0e0;
249
+ }
250
+
251
+ .flight-dt-metric-label {
252
+ font-size: 10px;
253
+ color: #888;
254
+ text-transform: uppercase;
255
+ }
256
+
257
+ .flight-dt-metric--warning .flight-dt-metric-value {
258
+ color: #fbbf24;
259
+ }
260
+
261
+ .flight-dt-hydration-list {
262
+ display: flex;
263
+ flex-direction: column;
264
+ gap: 4px;
265
+ max-height: 200px;
266
+ overflow-y: auto;
267
+ }
268
+
269
+ .flight-dt-island {
270
+ display: flex;
271
+ flex-direction: column;
272
+ padding: 6px 8px;
273
+ background: rgba(255, 255, 255, 0.03);
274
+ border-radius: 4px;
275
+ font-size: 12px;
276
+ }
277
+
278
+ .flight-dt-island-header {
279
+ display: flex;
280
+ align-items: center;
281
+ gap: 8px;
282
+ }
283
+
284
+ .flight-dt-island-status {
285
+ width: 8px;
286
+ height: 8px;
287
+ border-radius: 50%;
288
+ }
289
+
290
+ .flight-dt-island-trigger {
291
+ width: 16px;
292
+ height: 16px;
293
+ display: flex;
294
+ align-items: center;
295
+ justify-content: center;
296
+ background: rgba(255, 255, 255, 0.1);
297
+ border-radius: 3px;
298
+ font-size: 10px;
299
+ font-weight: 600;
300
+ color: #888;
301
+ }
302
+
303
+ .flight-dt-island-name {
304
+ flex: 1;
305
+ color: #e0e0e0;
306
+ font-family: monospace;
307
+ }
308
+
309
+ .flight-dt-island-time {
310
+ color: #888;
311
+ font-family: monospace;
312
+ }
313
+
314
+ .flight-dt-island-error {
315
+ margin-top: 4px;
316
+ padding: 4px 8px;
317
+ background: rgba(239, 68, 68, 0.1);
318
+ border-radius: 3px;
319
+ color: #ef4444;
320
+ font-size: 11px;
321
+ }
322
+
323
+ .flight-dt-empty {
324
+ text-align: center;
325
+ color: #666;
326
+ padding: 20px;
327
+ }
328
328
  `;
329
329
  //# sourceMappingURL=hydration-panel.js.map