@emeryld/rrroutes-openapi 2.5.6 → 2.5.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -0
- package/dist/docs/LeafDocsPage.d.ts +17 -1
- package/dist/index.cjs +48 -24
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +14 -27
- package/dist/index.mjs +48 -24
- package/dist/index.mjs.map +1 -1
- package/dist/public/assets/docs.js +114 -106
- package/dist/web/app.d.ts +4 -1
- package/dist/web/v2/AppShell.d.ts +3 -1
- package/dist/web/v2/components/endpoints/EndpointPlayground.d.ts +8 -3
- package/dist/web/v2/components/endpoints/KeyValueEditor.d.ts +15 -0
- package/dist/web/v2/components/endpoints/PlaygroundEditor.d.ts +4 -6
- package/dist/web/v2/components/endpoints/usePlaygroundRunner.d.ts +8 -0
- package/dist/web/v2/components/feeds/FeedPagination.d.ts +1 -2
- package/dist/web/v2/components/history/RequestDetailContent.d.ts +2 -18
- package/dist/web/v2/components/inputs/JsonInputWithTools.d.ts +3 -1
- package/dist/web/v2/components/json/JsonTree.d.ts +11 -0
- package/dist/web/v2/components/json/JsonTreeRow.d.ts +14 -0
- package/dist/web/v2/components/json/JsonViewer.d.ts +13 -1
- package/dist/web/v2/components/json/jsonViewerUtils.d.ts +3 -0
- package/dist/web/v2/components/layout/OverlayLayout.d.ts +13 -0
- package/dist/web/v2/components/layout/useMeasuredElement.d.ts +10 -0
- package/dist/web/v2/components/logs/cache/common/CacheSummaryStat.d.ts +7 -0
- package/dist/web/v2/components/logs/cache/common/CacheTraceDialog.d.ts +8 -0
- package/dist/web/v2/components/logs/cache/common/CacheValueDialog.d.ts +8 -0
- package/dist/web/v2/components/logs/cache/common/DetailField.d.ts +7 -0
- package/dist/web/v2/components/logs/cache/common/MutedText.d.ts +4 -0
- package/dist/web/v2/components/logs/cache/insights/CacheInsights.d.ts +10 -0
- package/dist/web/v2/components/logs/cache/insights/CacheInsightsKeySection.d.ts +7 -0
- package/dist/web/v2/components/logs/cache/insights/CacheInsightsKpiRow.d.ts +8 -0
- package/dist/web/v2/components/logs/cache/insights/CacheInsightsOverview.d.ts +8 -0
- package/dist/web/v2/components/logs/cache/insights/CacheInsightsTagSection.d.ts +7 -0
- package/dist/web/v2/components/logs/cache/insights/CacheProblemPanels.d.ts +7 -0
- package/dist/web/v2/components/logs/cache/insights/CacheTagInsights.d.ts +20 -0
- package/dist/web/v2/components/logs/cache/key-detail/CacheKeyDetailActions.d.ts +12 -0
- package/dist/web/v2/components/logs/cache/key-detail/CacheKeyDetailLogsTab.d.ts +3 -0
- package/dist/web/v2/components/logs/cache/{CacheKeyDetailModal.d.ts → key-detail/CacheKeyDetailModal.d.ts} +7 -2
- package/dist/web/v2/components/logs/cache/key-detail/CacheKeyDetailSummary.d.ts +17 -0
- package/dist/web/v2/components/logs/cache/key-detail/CacheKeyDetailTimelineTab.d.ts +7 -0
- package/dist/web/v2/components/logs/cache/key-detail/CacheKeyDetailTracesTab.d.ts +3 -0
- package/dist/web/v2/components/logs/cache/logs/CacheDataCard.d.ts +30 -0
- package/dist/web/v2/components/logs/cache/logs/CacheFiltersCard.d.ts +15 -0
- package/dist/web/v2/components/logs/cache/logs/CacheLogsTable.d.ts +7 -0
- package/dist/web/v2/components/logs/cache/{CacheSummaryTable.d.ts → logs/CacheSummaryTable.d.ts} +1 -1
- package/dist/web/v2/components/logs/cache/modals/CacheTagDetailModal.d.ts +11 -0
- package/dist/web/v2/components/performance/PerformanceMonitor.d.ts +207 -0
- package/dist/web/v2/components/presets/PresetForm.d.ts +2 -1
- package/dist/web/v2/components/presets/PresetOperationsTabsEditor.d.ts +17 -0
- package/dist/web/v2/components/presets/PresetsCsvActions.d.ts +7 -0
- package/dist/web/v2/components/presets/presetOperationAdapters.d.ts +11 -0
- package/dist/web/v2/components/presets/presetOperationRun.d.ts +35 -0
- package/dist/web/v2/components/presets/presetOperationUtils.d.ts +2 -0
- package/dist/web/v2/components/primitives/HoverRow.d.ts +6 -0
- package/dist/web/v2/components/primitives/InlineActionButton.d.ts +7 -0
- package/dist/web/v2/components/primitives/SurfaceActionArea.d.ts +8 -0
- package/dist/web/v2/components/request/LastRunPanel.d.ts +17 -0
- package/dist/web/v2/components/request/RequestInputsEditor.d.ts +38 -0
- package/dist/web/v2/components/request/RequestUrlSelector.d.ts +15 -0
- package/dist/web/v2/components/requests/timeline/RequestTimeline.d.ts +13 -0
- package/dist/web/v2/components/requests/timeline/RequestTimelineEventMiniCard.d.ts +13 -0
- package/dist/web/v2/components/requests/timeline/RequestTimelineFilters.d.ts +20 -0
- package/dist/web/v2/components/requests/timeline/RequestTimelineRow.d.ts +15 -0
- package/dist/web/v2/components/requests/timeline/types.d.ts +19 -0
- package/dist/web/v2/{sockets → components/sockets}/SocketEventDetailModal.d.ts +1 -1
- package/dist/web/v2/{sockets → components/sockets}/SocketEventsTable.d.ts +1 -1
- package/dist/web/v2/components/tabs/StickyIconTabs.d.ts +17 -0
- package/dist/web/v2/components/tags/DurationChip.d.ts +16 -0
- package/dist/web/v2/components/tags/LogLevelChip.d.ts +1 -2
- package/dist/web/v2/hooks/useCacheTrace.d.ts +21 -0
- package/dist/web/v2/registries/logLevelRegistry.d.ts +27 -0
- package/dist/web/v2/stores/playgroundSettingsStore.d.ts +12 -0
- package/dist/web/v2/stores/playgroundStore.d.ts +4 -8
- package/dist/web/v2/theme.d.ts +21 -0
- package/dist/web/v2/types/types.cacheLog.d.ts +351 -24
- package/dist/web/v2/types/types.endpoint.d.ts +20 -0
- package/dist/web/v2/types/types.kvRow.d.ts +8 -0
- package/dist/web/v2/types/types.log.d.ts +25 -78
- package/dist/web/v2/types/types.requestLog.d.ts +40 -44
- package/dist/web/v2/utils/cache/cacheInsightsMappers.d.ts +6 -0
- package/dist/web/v2/utils/cache/cacheInsightsMetrics.d.ts +24 -0
- package/dist/web/v2/utils/cache/cacheTraceInsights.d.ts +35 -0
- package/dist/web/v2/utils/cacheFormat.d.ts +7 -0
- package/dist/web/v2/utils/cacheUtils.d.ts +2 -0
- package/dist/web/v2/utils/colorScale.d.ts +14 -0
- package/dist/web/v2/utils/dates.d.ts +1 -0
- package/dist/web/v2/utils/downloadTextFile.d.ts +1 -0
- package/dist/web/v2/utils/kvRow.d.ts +15 -0
- package/dist/web/v2/utils/kvRowAdapters.d.ts +14 -0
- package/dist/web/v2/utils/presetCsv.d.ts +22 -0
- package/dist/web/v2/utils/presetsCsv.d.ts +6 -0
- package/dist/web/v2/utils/schemaDefaults.d.ts +7 -0
- package/dist/web/v2/utils/sizeFormat.d.ts +2 -0
- package/package.json +1 -1
- package/dist/web/v2/components/endpoints/PlaygroundTabs.d.ts +0 -11
- package/dist/web/v2/components/history/RequestTimeline.d.ts +0 -10
- package/dist/web/v2/components/logs/cache/CacheInsightsKeySection.d.ts +0 -6
- package/dist/web/v2/components/logs/cache/CacheInsightsOverview.d.ts +0 -6
- package/dist/web/v2/components/logs/cache/CacheInsightsTagSection.d.ts +0 -6
- package/dist/web/v2/components/logs/cache/CacheLogsTable.d.ts +0 -6
- package/dist/web/v2/components/logs/cache/CacheTagInsights.d.ts +0 -43
- package/dist/web/v2/components/logs/cache/CacheValueDialog.d.ts +0 -7
- package/dist/web/v2/components/presets/PresetOperationsEditor.d.ts +0 -7
- /package/dist/web/v2/components/logs/cache/{CacheLogsSection.d.ts → logs/CacheLogsSection.d.ts} +0 -0
- /package/dist/web/v2/{sockets → components/sockets}/SocketEventsSection.d.ts +0 -0
- /package/dist/web/v2/{sockets → components/sockets}/SocketPlayground.d.ts +0 -0
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
export declare function PerformanceMonitor(): null;
|
|
2
|
+
/**
|
|
3
|
+
* You are a senior performance engineer with full read/write access to my TypeScript React web app codebase. The openapi package uses TanStack Query (React Query). Your job is to identify why the UI feels slow and “blocked” (initial render appears to wait for data), and why navigation gets slower as I move through screens, then implement fixes that materially improve perceived and actual performance.
|
|
4
|
+
|
|
5
|
+
Goals (in order)
|
|
6
|
+
|
|
7
|
+
Make initial render and route transitions feel instant (render shells immediately, avoid blocking on data).
|
|
8
|
+
|
|
9
|
+
Reduce unnecessary re-renders and expensive renders (especially list/detail screens).
|
|
10
|
+
|
|
11
|
+
Prevent navigation slowdown over time (memory leaks, query/cache growth, event listeners, suspense waterfalls, etc.).
|
|
12
|
+
|
|
13
|
+
Provide measurable before/after evidence (profiling + metrics).
|
|
14
|
+
|
|
15
|
+
Deliverables
|
|
16
|
+
|
|
17
|
+
A concise root-cause report with:
|
|
18
|
+
|
|
19
|
+
Top 5 bottlenecks (what, where, why it happens)
|
|
20
|
+
|
|
21
|
+
Evidence (profiling screenshots/notes, flamegraphs, React Profiler findings, network waterfalls, query counts)
|
|
22
|
+
|
|
23
|
+
Fixes applied (files changed, reasoning, expected impact)
|
|
24
|
+
|
|
25
|
+
A PR-style set of code changes that:
|
|
26
|
+
|
|
27
|
+
Removes UI blocking on data (show immediate skeletons/placeholders, avoid “all-or-nothing” rendering)
|
|
28
|
+
|
|
29
|
+
Improves navigation performance and prevents degradation over time
|
|
30
|
+
|
|
31
|
+
Adds lightweight instrumentation so regressions are caught
|
|
32
|
+
|
|
33
|
+
A “Performance Playbook” markdown doc added to the repo with guidelines specific to this app.
|
|
34
|
+
|
|
35
|
+
Step-by-step tasks
|
|
36
|
+
1) Establish a baseline (must be reproducible)
|
|
37
|
+
|
|
38
|
+
Add minimal instrumentation (do not over-instrument):
|
|
39
|
+
|
|
40
|
+
Log route transition timings (start/end, route name).
|
|
41
|
+
|
|
42
|
+
Log React Query activity per route: active queries count, fetch durations, cache size growth.
|
|
43
|
+
|
|
44
|
+
Run the app locally and capture:
|
|
45
|
+
|
|
46
|
+
React DevTools Profiler traces for: initial load, navigating between 3–5 common routes, repeating navigation loop (A→B→C→A…).
|
|
47
|
+
|
|
48
|
+
Chrome Performance recording for the same flows.
|
|
49
|
+
|
|
50
|
+
Network tab waterfall (note slow endpoints and waterfalls).
|
|
51
|
+
|
|
52
|
+
Summarize baseline metrics:
|
|
53
|
+
|
|
54
|
+
Time to first meaningful paint (approx).
|
|
55
|
+
|
|
56
|
+
Route transition time distribution (p50/p95).
|
|
57
|
+
|
|
58
|
+
Long tasks (>50ms) frequency during navigation.
|
|
59
|
+
|
|
60
|
+
2) Find the “render waits for data” causes
|
|
61
|
+
|
|
62
|
+
Search for patterns that block rendering:
|
|
63
|
+
|
|
64
|
+
Suspense usage with query fetching (Query + Suspense) causing full-page suspension/waterfalls.
|
|
65
|
+
|
|
66
|
+
Route-level loaders gating navigation until queries resolve.
|
|
67
|
+
|
|
68
|
+
Conditional rendering like if (isLoading) return null or returning heavy spinners that block layout.
|
|
69
|
+
|
|
70
|
+
Over-fetching on route mount (many queries start at once; dependent query chains).
|
|
71
|
+
|
|
72
|
+
Query keys that change frequently (causing refetch storms).
|
|
73
|
+
|
|
74
|
+
enabled flags misused (queries refetch repeatedly).
|
|
75
|
+
|
|
76
|
+
staleTime/cacheTime/gcTime defaults causing too much refetching.
|
|
77
|
+
|
|
78
|
+
Implement fixes to ensure:
|
|
79
|
+
|
|
80
|
+
Layout renders immediately with stable structure.
|
|
81
|
+
|
|
82
|
+
Data regions render progressively (skeletons, placeholders, optimistic UI).
|
|
83
|
+
|
|
84
|
+
Avoid suspense waterfalls: co-locate suspense boundaries narrowly, or disable suspense where it blocks whole screens.
|
|
85
|
+
|
|
86
|
+
Use placeholderData / keepPreviousData appropriately for list-to-detail and pagination.
|
|
87
|
+
|
|
88
|
+
Prefetch on hover/intent and on route transitions where appropriate.
|
|
89
|
+
|
|
90
|
+
3) Identify why navigation gets slower over time
|
|
91
|
+
|
|
92
|
+
Look for:
|
|
93
|
+
|
|
94
|
+
Memory leaks (event listeners, timers, subscriptions not cleaned up).
|
|
95
|
+
|
|
96
|
+
React Query cache growth (unbounded query keys, not garbage collecting, huge cached payloads).
|
|
97
|
+
|
|
98
|
+
Components that accumulate state or keep large objects in memory.
|
|
99
|
+
|
|
100
|
+
Re-renders increasing with each navigation (global stores, context providers re-creating values, selectors missing).
|
|
101
|
+
|
|
102
|
+
Layout components that re-mount unnecessarily on navigation.
|
|
103
|
+
|
|
104
|
+
Heavy computations on render (sorting/filtering/formatting done inline).
|
|
105
|
+
|
|
106
|
+
Large lists without virtualization.
|
|
107
|
+
|
|
108
|
+
Images/fonts causing layout shifts or repeated decoding.
|
|
109
|
+
|
|
110
|
+
Confirm with evidence:
|
|
111
|
+
|
|
112
|
+
Heap snapshots before/after repeated navigation loop.
|
|
113
|
+
|
|
114
|
+
Count of mounted components and listeners over time.
|
|
115
|
+
|
|
116
|
+
Query cache size trend over time.
|
|
117
|
+
|
|
118
|
+
Fixes may include:
|
|
119
|
+
|
|
120
|
+
Stabilize query keys; remove key explosions.
|
|
121
|
+
|
|
122
|
+
Set sensible staleTime and gcTime (TanStack Query v5) or cacheTime (v4) for heavy data.
|
|
123
|
+
|
|
124
|
+
Use select in queries to reduce data shape and rerender impact.
|
|
125
|
+
|
|
126
|
+
Split providers; memoize context values; use useMemo/useCallback where it materially reduces renders.
|
|
127
|
+
|
|
128
|
+
Add list virtualization (e.g. react-virtual) for long lists.
|
|
129
|
+
|
|
130
|
+
Defer expensive work with useDeferredValue, startTransition, or moving work off render.
|
|
131
|
+
|
|
132
|
+
Ensure route-level code splitting and avoid importing heavy modules eagerly.
|
|
133
|
+
|
|
134
|
+
4) Reduce avoidable re-renders (systematically)
|
|
135
|
+
|
|
136
|
+
Use React Profiler to find top rendering components per route.
|
|
137
|
+
|
|
138
|
+
For each hotspot:
|
|
139
|
+
|
|
140
|
+
Explain what triggers re-render.
|
|
141
|
+
|
|
142
|
+
Apply the least invasive fix: memoization, stable props, selectors, splitting components, moving derived data into useMemo, etc.
|
|
143
|
+
|
|
144
|
+
Verify improvements with updated profiler traces.
|
|
145
|
+
|
|
146
|
+
5) React Query-specific audit (must do)
|
|
147
|
+
|
|
148
|
+
Review QueryClient configuration:
|
|
149
|
+
|
|
150
|
+
retries, refetchOnWindowFocus, refetchOnMount, staleTime/gcTime defaults, structuralSharing, notifyOnChangeProps.
|
|
151
|
+
|
|
152
|
+
Identify queries that:
|
|
153
|
+
|
|
154
|
+
Refetch too often.
|
|
155
|
+
|
|
156
|
+
Fetch too much data.
|
|
157
|
+
|
|
158
|
+
Cause render cascades (many subscribers).
|
|
159
|
+
|
|
160
|
+
Apply improvements:
|
|
161
|
+
|
|
162
|
+
Set global defaults + per-query overrides.
|
|
163
|
+
|
|
164
|
+
Use prefetchQuery strategically.
|
|
165
|
+
|
|
166
|
+
Use keepPreviousData for pagination and route param changes.
|
|
167
|
+
|
|
168
|
+
Use placeholderData to keep UI stable.
|
|
169
|
+
|
|
170
|
+
Use select to minimize component updates.
|
|
171
|
+
|
|
172
|
+
Consider useInfiniteQuery where appropriate.
|
|
173
|
+
|
|
174
|
+
6) Add guardrails
|
|
175
|
+
|
|
176
|
+
Add a small /docs/performance.md with:
|
|
177
|
+
|
|
178
|
+
Patterns to avoid (route-level suspense, key explosions, inline heavy work).
|
|
179
|
+
|
|
180
|
+
Standard query defaults and when to override.
|
|
181
|
+
|
|
182
|
+
How to profile this app (exact steps).
|
|
183
|
+
|
|
184
|
+
Add a simple CI/lint-style check if feasible (optional) to catch egregious patterns (like return null on isLoading in pages).
|
|
185
|
+
|
|
186
|
+
Constraints
|
|
187
|
+
|
|
188
|
+
Do not change product behavior or UX beyond making loading states progressive and navigation snappier.
|
|
189
|
+
|
|
190
|
+
Avoid large rewrites unless absolutely necessary.
|
|
191
|
+
|
|
192
|
+
Prefer targeted, well-justified changes with measurable impact.
|
|
193
|
+
|
|
194
|
+
Keep code idiomatic TypeScript/React and consistent with existing patterns.
|
|
195
|
+
|
|
196
|
+
Output format
|
|
197
|
+
|
|
198
|
+
“Findings” (ranked list with evidence)
|
|
199
|
+
|
|
200
|
+
“Fixes implemented” (bullets + file paths)
|
|
201
|
+
|
|
202
|
+
“Metrics before/after”
|
|
203
|
+
|
|
204
|
+
“Follow-ups” (optional, highest ROI next steps)
|
|
205
|
+
|
|
206
|
+
Start by scanning the codebase for route-level rendering gates and Suspense usage, then profile to confirm, then implement improvements.
|
|
207
|
+
*/
|
|
@@ -2,6 +2,7 @@ import type { PresetType } from '../../types/types.preset.js';
|
|
|
2
2
|
type PresetFormProps = {
|
|
3
3
|
value: PresetType;
|
|
4
4
|
onChange: (next: PresetType) => void;
|
|
5
|
+
disabled?: boolean;
|
|
5
6
|
};
|
|
6
|
-
export default function PresetForm({ value, onChange }: PresetFormProps): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export default function PresetForm({ value, onChange, disabled }: PresetFormProps): import("react/jsx-runtime").JSX.Element;
|
|
7
8
|
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { PresetType } from '../../types/types.preset.js';
|
|
2
|
+
type PresetOperationsTabsEditorProps = {
|
|
3
|
+
operations: PresetType['operations'];
|
|
4
|
+
onChange: (operations: PresetType['operations']) => void;
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
onRunAllStateChange?: (running: boolean) => void;
|
|
7
|
+
};
|
|
8
|
+
export type PresetOperationsTabsEditorHandle = {
|
|
9
|
+
runAll: () => Promise<void>;
|
|
10
|
+
isRunningAll: boolean;
|
|
11
|
+
commitPendingEdits: () => {
|
|
12
|
+
ok: boolean;
|
|
13
|
+
operations: PresetType['operations'];
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
declare const PresetOperationsTabsEditor: import("react").ForwardRefExoticComponent<PresetOperationsTabsEditorProps & import("react").RefAttributes<PresetOperationsTabsEditorHandle>>;
|
|
17
|
+
export default PresetOperationsTabsEditor;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { PresetType } from '../../types/types.preset.js';
|
|
2
|
+
type PresetsCsvActionsProps = {
|
|
3
|
+
presets: PresetType[];
|
|
4
|
+
onImportComplete?: () => void;
|
|
5
|
+
};
|
|
6
|
+
export default function PresetsCsvActions({ presets, onImportComplete, }: PresetsCsvActionsProps): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { PlaygroundInputs } from '../../stores/clientStore.js';
|
|
2
|
+
import type { KeyValueRow } from '../../types/types.kvRow.js';
|
|
3
|
+
import type { PresetType } from '../../types/types.preset.js';
|
|
4
|
+
export type PresetOperationEditorModel = {
|
|
5
|
+
queryRows: KeyValueRow[];
|
|
6
|
+
headerRows: KeyValueRow[];
|
|
7
|
+
bodyText: string;
|
|
8
|
+
};
|
|
9
|
+
export declare function mapOperationToEditorModel(operation: PresetType['operations'][number]): PresetOperationEditorModel;
|
|
10
|
+
export declare function mapEditorModelToOperation(operation: PresetType['operations'][number], model: PresetOperationEditorModel): PresetType['operations'][number];
|
|
11
|
+
export declare function buildPresetInputs(operation: PresetType['operations'][number]): PlaygroundInputs;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { PresetType } from '../../types/types.preset.js';
|
|
2
|
+
export type OperationRunState = {
|
|
3
|
+
status: 'idle' | 'running' | 'success' | 'error';
|
|
4
|
+
statusCode?: number;
|
|
5
|
+
durationMs?: number;
|
|
6
|
+
errorMessage?: string;
|
|
7
|
+
response?: unknown;
|
|
8
|
+
createdAt?: number;
|
|
9
|
+
};
|
|
10
|
+
export type PresetOperationRunResult = {
|
|
11
|
+
success: boolean;
|
|
12
|
+
state: OperationRunState;
|
|
13
|
+
};
|
|
14
|
+
export declare function usePresetOperationRunner(): (operation: PresetType["operations"][number]) => Promise<{
|
|
15
|
+
success: boolean;
|
|
16
|
+
state: {
|
|
17
|
+
status: "success" | "error";
|
|
18
|
+
statusCode: number;
|
|
19
|
+
durationMs: number;
|
|
20
|
+
errorMessage: string | undefined;
|
|
21
|
+
response: any;
|
|
22
|
+
createdAt: number;
|
|
23
|
+
};
|
|
24
|
+
} | {
|
|
25
|
+
success: boolean;
|
|
26
|
+
state: {
|
|
27
|
+
status: "error";
|
|
28
|
+
errorMessage: string;
|
|
29
|
+
createdAt: number;
|
|
30
|
+
statusCode?: undefined;
|
|
31
|
+
durationMs?: undefined;
|
|
32
|
+
response?: undefined;
|
|
33
|
+
};
|
|
34
|
+
}>;
|
|
35
|
+
export declare function shouldConfirmOperation(operation: PresetType['operations'][number]): boolean;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type ButtonBaseProps } from '@mui/material/ButtonBase';
|
|
2
|
+
import type { ReactNode } from 'react';
|
|
3
|
+
type InlineActionButtonProps = Omit<ButtonBaseProps, 'children'> & {
|
|
4
|
+
children: ReactNode;
|
|
5
|
+
};
|
|
6
|
+
export default function InlineActionButton({ children, sx, type, ...rest }: InlineActionButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type ButtonBaseProps } from '@mui/material/ButtonBase';
|
|
2
|
+
import { type ReactNode } from 'react';
|
|
3
|
+
type SurfaceActionAreaProps = ButtonBaseProps & {
|
|
4
|
+
children: ReactNode;
|
|
5
|
+
active?: boolean;
|
|
6
|
+
};
|
|
7
|
+
declare const _default: import("react").ForwardRefExoticComponent<Omit<SurfaceActionAreaProps, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
|
|
8
|
+
export default _default;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export type LastRunMeta = {
|
|
3
|
+
status: number;
|
|
4
|
+
duration?: number;
|
|
5
|
+
time: string;
|
|
6
|
+
errorMessage?: string;
|
|
7
|
+
response?: unknown;
|
|
8
|
+
};
|
|
9
|
+
type LastRunPanelProps = {
|
|
10
|
+
title?: string;
|
|
11
|
+
lastRun?: LastRunMeta | null;
|
|
12
|
+
runButton: ReactNode;
|
|
13
|
+
extendable?: boolean;
|
|
14
|
+
maxDetailsHeight?: number;
|
|
15
|
+
};
|
|
16
|
+
export default function LastRunPanel({ title, lastRun, runButton, extendable, maxDetailsHeight, }: LastRunPanelProps): import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { type MethodType } from '../../types/types.base.js';
|
|
3
|
+
import type { KeyValueRow } from '../../types/types.kvRow.js';
|
|
4
|
+
type SectionConfig = {
|
|
5
|
+
defaultExpanded?: boolean;
|
|
6
|
+
summaryActions?: ReactNode;
|
|
7
|
+
schemaView?: ReactNode;
|
|
8
|
+
};
|
|
9
|
+
type QuerySectionConfig = SectionConfig & {
|
|
10
|
+
showFieldMeta?: boolean;
|
|
11
|
+
};
|
|
12
|
+
type HeadersSectionConfig = SectionConfig & {
|
|
13
|
+
actions?: ReactNode;
|
|
14
|
+
};
|
|
15
|
+
type BodySectionConfig = SectionConfig & {
|
|
16
|
+
helperText?: string;
|
|
17
|
+
error?: boolean;
|
|
18
|
+
onBlur?: () => void;
|
|
19
|
+
};
|
|
20
|
+
type RequestInputsEditorProps = {
|
|
21
|
+
method: MethodType;
|
|
22
|
+
path: string;
|
|
23
|
+
queryRows: KeyValueRow[];
|
|
24
|
+
headerRows: KeyValueRow[];
|
|
25
|
+
bodyText: string;
|
|
26
|
+
onMethodChange: (method: MethodType) => void;
|
|
27
|
+
onPathChange: (path: string) => void;
|
|
28
|
+
onQueryChange: (rows: KeyValueRow[]) => void;
|
|
29
|
+
onHeadersChange: (rows: KeyValueRow[]) => void;
|
|
30
|
+
onBodyChange: (value: string) => void;
|
|
31
|
+
onBodyBlur?: () => void;
|
|
32
|
+
querySection?: QuerySectionConfig;
|
|
33
|
+
headersSection?: HeadersSectionConfig;
|
|
34
|
+
bodySection?: BodySectionConfig;
|
|
35
|
+
disabled?: boolean;
|
|
36
|
+
};
|
|
37
|
+
export default function RequestInputsEditor({ method, path, queryRows, headerRows, bodyText, onMethodChange, onPathChange, onQueryChange, onHeadersChange, onBodyChange, querySection, headersSection, bodySection, disabled, }: RequestInputsEditorProps): import("react/jsx-runtime").JSX.Element;
|
|
38
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { EndpointOption } from '../../utils/endpoints.js';
|
|
2
|
+
type RequestUrlSelectorProps = {
|
|
3
|
+
requestInput: string;
|
|
4
|
+
endpointOptions: EndpointOption[];
|
|
5
|
+
isLoading: boolean;
|
|
6
|
+
onEndpointSelect: (_: unknown, value: EndpointOption | string | null) => void;
|
|
7
|
+
onRequestInputChange: (_: unknown, value: string, reason: string) => void;
|
|
8
|
+
onCommit?: () => void;
|
|
9
|
+
onBlur?: () => void;
|
|
10
|
+
label?: string;
|
|
11
|
+
helperText?: string;
|
|
12
|
+
disabled?: boolean;
|
|
13
|
+
};
|
|
14
|
+
export default function RequestUrlSelector({ requestInput, endpointOptions, isLoading, onEndpointSelect, onRequestInputChange, onCommit, onBlur, label, helperText, disabled, }: RequestUrlSelectorProps): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { CacheTraceType } from '../../../types/types.cacheLog.js';
|
|
2
|
+
import type { LogType } from '../../../types/types.log.js';
|
|
3
|
+
import type { SocketEventType } from '../../../types/types.socket.js';
|
|
4
|
+
import type { RequestTimelineEvent } from './types.js';
|
|
5
|
+
type RequestTimelineProps = {
|
|
6
|
+
events: RequestTimelineEvent[];
|
|
7
|
+
onSelectCache?: (cache: CacheTraceType) => void;
|
|
8
|
+
onSelectLog?: (log: LogType) => void;
|
|
9
|
+
onSelectSocket?: (socket: SocketEventType) => void;
|
|
10
|
+
onSelectCacheKey?: (key: string) => void;
|
|
11
|
+
};
|
|
12
|
+
export default function RequestTimeline({ events, onSelectCache, onSelectLog, onSelectSocket, onSelectCacheKey, }: RequestTimelineProps): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { CacheTraceType } from '../../../types/types.cacheLog.js';
|
|
2
|
+
import type { LogType } from '../../../types/types.log.js';
|
|
3
|
+
import type { SocketEventType } from '../../../types/types.socket.js';
|
|
4
|
+
import type { RequestTimelineEvent } from './types.js';
|
|
5
|
+
type MiniCardProps = {
|
|
6
|
+
event: RequestTimelineEvent;
|
|
7
|
+
onSelectCache?: (cache: CacheTraceType) => void;
|
|
8
|
+
onSelectLog?: (log: LogType) => void;
|
|
9
|
+
onSelectSocket?: (socket: SocketEventType) => void;
|
|
10
|
+
onSelectCacheKey?: (key: string) => void;
|
|
11
|
+
};
|
|
12
|
+
export default function RequestTimelineEventMiniCard({ event, onSelectCache, onSelectLog, onSelectSocket, onSelectCacheKey, }: MiniCardProps): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { RequestTimelineEvent } from './types.js';
|
|
2
|
+
export type TimelineFilterState = {
|
|
3
|
+
kinds: Set<RequestTimelineEvent['kind']>;
|
|
4
|
+
logLevels: Set<string>;
|
|
5
|
+
cacheTypes: Set<string>;
|
|
6
|
+
socketDirections: Set<string>;
|
|
7
|
+
};
|
|
8
|
+
export type TimelineFilterOptions = {
|
|
9
|
+
kinds: RequestTimelineEvent['kind'][];
|
|
10
|
+
logLevels: string[];
|
|
11
|
+
cacheTypes: string[];
|
|
12
|
+
socketDirections: string[];
|
|
13
|
+
};
|
|
14
|
+
type RequestTimelineFiltersProps = {
|
|
15
|
+
available: TimelineFilterOptions;
|
|
16
|
+
value: TimelineFilterState;
|
|
17
|
+
onChange: (next: TimelineFilterState) => void;
|
|
18
|
+
};
|
|
19
|
+
export default function RequestTimelineFilters({ available, value, onChange, }: RequestTimelineFiltersProps): import("react/jsx-runtime").JSX.Element | null;
|
|
20
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { CacheTraceType } from '../../../types/types.cacheLog.js';
|
|
2
|
+
import type { LogType } from '../../../types/types.log.js';
|
|
3
|
+
import type { SocketEventType } from '../../../types/types.socket.js';
|
|
4
|
+
import type { RequestTimelineEvent } from './types.js';
|
|
5
|
+
type RequestTimelineRowProps = {
|
|
6
|
+
event: RequestTimelineEvent;
|
|
7
|
+
deltaMs: number | null;
|
|
8
|
+
maxDeltaMs: number;
|
|
9
|
+
onSelectCache?: (cache: CacheTraceType) => void;
|
|
10
|
+
onSelectLog?: (log: LogType) => void;
|
|
11
|
+
onSelectSocket?: (socket: SocketEventType) => void;
|
|
12
|
+
onSelectCacheKey?: (key: string) => void;
|
|
13
|
+
};
|
|
14
|
+
export default function RequestTimelineRow({ event, deltaMs, maxDeltaMs, onSelectCache, onSelectLog, onSelectSocket, onSelectCacheKey, }: RequestTimelineRowProps): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { CacheTraceType } from '../../../types/types.cacheLog.js';
|
|
2
|
+
import type { LogType } from '../../../types/types.log.js';
|
|
3
|
+
import type { SocketEventType } from '../../../types/types.socket.js';
|
|
4
|
+
export type RequestTimelineEvent = {
|
|
5
|
+
kind: 'cache';
|
|
6
|
+
id: string;
|
|
7
|
+
createdAt: number;
|
|
8
|
+
cache: CacheTraceType;
|
|
9
|
+
} | {
|
|
10
|
+
kind: 'log';
|
|
11
|
+
id: string;
|
|
12
|
+
createdAt: number;
|
|
13
|
+
log: LogType;
|
|
14
|
+
} | {
|
|
15
|
+
kind: 'socket';
|
|
16
|
+
id: string;
|
|
17
|
+
createdAt: number;
|
|
18
|
+
socket: SocketEventType;
|
|
19
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { SocketEventType } from '
|
|
1
|
+
import type { SocketEventType } from '../../types/types.socket.js';
|
|
2
2
|
type SocketEventsTableProps = {
|
|
3
3
|
events: SocketEventType[];
|
|
4
4
|
onSelect?: (event: SocketEventType, ordered: SocketEventType[]) => void;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
type StickyIconTabsItem = {
|
|
2
|
+
id: string;
|
|
3
|
+
};
|
|
4
|
+
type StickyIconTabsProps<Item extends StickyIconTabsItem> = {
|
|
5
|
+
items: Item[];
|
|
6
|
+
activeId: string | null;
|
|
7
|
+
isLoading?: boolean;
|
|
8
|
+
label?: string;
|
|
9
|
+
onSelect: (id: string) => void;
|
|
10
|
+
onAdd: () => void;
|
|
11
|
+
onClose: (id: string) => void;
|
|
12
|
+
canClose?: (length: number) => boolean;
|
|
13
|
+
renderLabel?: (item: Item) => string;
|
|
14
|
+
disabled?: boolean;
|
|
15
|
+
};
|
|
16
|
+
export default function StickyIconTabs<Item extends StickyIconTabsItem>({ items, activeId, isLoading, label, onSelect, onAdd, onClose, canClose, renderLabel, disabled, }: StickyIconTabsProps<Item>): import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
type DurationTagProps = {
|
|
2
|
+
value: number | null | undefined;
|
|
3
|
+
start: {
|
|
4
|
+
value: number;
|
|
5
|
+
color: string;
|
|
6
|
+
};
|
|
7
|
+
end: {
|
|
8
|
+
value: number;
|
|
9
|
+
color: string;
|
|
10
|
+
};
|
|
11
|
+
label?: string | null;
|
|
12
|
+
emptyLabel?: string;
|
|
13
|
+
onClick?: () => void;
|
|
14
|
+
};
|
|
15
|
+
export default function DurationTag({ value, start, end, label, emptyLabel, onClick, }: DurationTagProps): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { CacheTraceQuery, CacheTraceType } from '../types/types.cacheLog.js';
|
|
2
|
+
type CacheTraceFeedFilters = CacheTraceQuery & {
|
|
3
|
+
cursor?: string;
|
|
4
|
+
pageSize?: number;
|
|
5
|
+
};
|
|
6
|
+
export type UseCacheTraceOptions = CacheTraceFeedFilters & {
|
|
7
|
+
cacheKey: string;
|
|
8
|
+
};
|
|
9
|
+
type UseCacheTraceResult = {
|
|
10
|
+
traces: CacheTraceType[];
|
|
11
|
+
data: any;
|
|
12
|
+
isLoading: boolean;
|
|
13
|
+
isFetching: boolean;
|
|
14
|
+
error: unknown;
|
|
15
|
+
refetch: () => Promise<unknown>;
|
|
16
|
+
fetchNextPage: () => Promise<unknown>;
|
|
17
|
+
hasNextPage?: boolean;
|
|
18
|
+
isFetchingNextPage?: boolean;
|
|
19
|
+
};
|
|
20
|
+
export declare function useCacheTrace(options: UseCacheTraceOptions | null): UseCacheTraceResult;
|
|
21
|
+
export {};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export type LogLevel = string;
|
|
2
|
+
export type CssColor = string;
|
|
3
|
+
export type SetColorMode = 'set' | 'override';
|
|
4
|
+
export declare const DEFAULT_LEVEL_COLORS: {
|
|
5
|
+
readonly info: "#42a5f5";
|
|
6
|
+
readonly warning: "#ffa726";
|
|
7
|
+
readonly error: "#ef5350";
|
|
8
|
+
readonly debug: "#ab47bc";
|
|
9
|
+
readonly trace: "#26a69a";
|
|
10
|
+
};
|
|
11
|
+
/** Non-react snapshot getters (use hooks below if you need reactivity). */
|
|
12
|
+
export declare const getSeenLevels: () => string[];
|
|
13
|
+
export declare const getLevelColor: (level: LogLevel, fallback?: CssColor) => string;
|
|
14
|
+
export declare const getLevelColorMap: () => Readonly<Record<string, CssColor>>;
|
|
15
|
+
/**
|
|
16
|
+
* Tracks levels discovered from the API and persists them.
|
|
17
|
+
* Levels are normalized to lower-case.
|
|
18
|
+
*/
|
|
19
|
+
export declare const trackSeenLevels: (levels: Iterable<string>) => void;
|
|
20
|
+
/**
|
|
21
|
+
* Sets (or overrides) the color for a level.
|
|
22
|
+
* - mode="set": only sets if no color exists yet
|
|
23
|
+
* - mode="override": always replaces existing value
|
|
24
|
+
*/
|
|
25
|
+
export declare const setLevelColor: (level: LogLevel, color: CssColor, mode?: SetColorMode) => boolean;
|
|
26
|
+
export declare const useSeenLogLevels: () => string[];
|
|
27
|
+
export declare const useLogLevelColor: (level: LogLevel, fallback?: CssColor) => CssColor;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import type { PlaygroundKeyValueRow } from './playgroundStore.js';
|
|
3
|
+
type PlaygroundSettingsContextValue = {
|
|
4
|
+
defaultHeaders: PlaygroundKeyValueRow[];
|
|
5
|
+
setDefaultHeaders: (rows: PlaygroundKeyValueRow[]) => void;
|
|
6
|
+
resetDefaultHeaders: () => void;
|
|
7
|
+
};
|
|
8
|
+
export declare function PlaygroundSettingsProvider({ children, }: {
|
|
9
|
+
children: ReactNode;
|
|
10
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export declare function usePlaygroundSettings(): PlaygroundSettingsContextValue;
|
|
12
|
+
export {};
|
|
@@ -1,13 +1,8 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import type { MethodType } from '../types/types.base';
|
|
3
|
-
import type { SerializableSchema } from '../types/types.endpoint';
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
value: string;
|
|
7
|
-
enabled: boolean;
|
|
8
|
-
typeHint?: string;
|
|
9
|
-
description?: string;
|
|
10
|
-
};
|
|
3
|
+
import type { EndpointType, SerializableSchema } from '../types/types.endpoint';
|
|
4
|
+
import type { KeyValueRow } from '../types/types.kvRow.js';
|
|
5
|
+
export type PlaygroundKeyValueRow = KeyValueRow;
|
|
11
6
|
export type PlaygroundRunRecord = {
|
|
12
7
|
id: string;
|
|
13
8
|
method: MethodType;
|
|
@@ -35,6 +30,7 @@ export type PlaygroundRouteMeta = {
|
|
|
35
30
|
path: string;
|
|
36
31
|
summary?: string;
|
|
37
32
|
contract?: PlaygroundRouteContract;
|
|
33
|
+
stability?: EndpointType['stability'];
|
|
38
34
|
};
|
|
39
35
|
export type PlaygroundTab = {
|
|
40
36
|
id: string;
|
package/dist/web/v2/theme.d.ts
CHANGED
|
@@ -18,4 +18,25 @@ declare module '@mui/material/styles' {
|
|
|
18
18
|
status?: Palette['status'];
|
|
19
19
|
}
|
|
20
20
|
}
|
|
21
|
+
export type DocsUiSeeds = {
|
|
22
|
+
bg: string;
|
|
23
|
+
surface: string;
|
|
24
|
+
primary: string;
|
|
25
|
+
secondary: string;
|
|
26
|
+
success: string;
|
|
27
|
+
warning: string;
|
|
28
|
+
error: string;
|
|
29
|
+
textPrimary: string;
|
|
30
|
+
};
|
|
31
|
+
export declare const defaultUi: {
|
|
32
|
+
readonly bg: "#0B0D10";
|
|
33
|
+
readonly surface: "#141922";
|
|
34
|
+
readonly primary: "#FF9F66";
|
|
35
|
+
readonly secondary: "#5A9BFF";
|
|
36
|
+
readonly success: "#22C58A";
|
|
37
|
+
readonly warning: "#FFC24D";
|
|
38
|
+
readonly error: "#FF4D5E";
|
|
39
|
+
readonly textPrimary: "#F7FAFF";
|
|
40
|
+
};
|
|
41
|
+
export declare function createDocsTheme(overrides?: Partial<DocsUiSeeds>): import("@mui/material").Theme;
|
|
21
42
|
export declare const docsTheme: import("@mui/material").Theme;
|