@ethlete/query-devtools 1.0.0-next.0 → 1.0.0-next.2
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/package.json
CHANGED
|
@@ -167,6 +167,30 @@ type QueryDevtoolsDiff = {
|
|
|
167
167
|
truncated: boolean;
|
|
168
168
|
};
|
|
169
169
|
|
|
170
|
+
/** Which SDK feature a lock name belongs to, or `other` for one the panel did not put there. */
|
|
171
|
+
type DevtoolsLockKind = 'auth' | 'poll' | 'other';
|
|
172
|
+
/** Where the tab the panel is open in stands on one lock. */
|
|
173
|
+
type DevtoolsLockStanding = 'holder' | 'queued' | 'absent' | 'unknown';
|
|
174
|
+
/** One lock name, with every client that holds or waits for it folded into a single row. */
|
|
175
|
+
type DevtoolsLockRow = {
|
|
176
|
+
/** The raw name, so a lock the panel cannot decode is still greppable from the row. */
|
|
177
|
+
name: string;
|
|
178
|
+
/** What the name means: the provider for an auth lock, the cache key for a poll lock. */
|
|
179
|
+
label: string;
|
|
180
|
+
kind: DevtoolsLockKind;
|
|
181
|
+
/** The sync channel a poll lock belongs to, or `null` for a name that carries no such part. */
|
|
182
|
+
channel: string | null;
|
|
183
|
+
/**
|
|
184
|
+
* Held plus queued on this name. Every participant requests the same lock and exactly one gets it, so
|
|
185
|
+
* this is the number of tabs, workers and service workers taking part - the same arithmetic the auth
|
|
186
|
+
* provider's own `instanceCount` does.
|
|
187
|
+
*/
|
|
188
|
+
tabs: number;
|
|
189
|
+
standing: DevtoolsLockStanding;
|
|
190
|
+
/** This tab's 1-based place in the queue, or `null` unless {@link standing} is `queued`. */
|
|
191
|
+
queuePlace: number | null;
|
|
192
|
+
};
|
|
193
|
+
|
|
170
194
|
type AnyQuery = Query<any>;
|
|
171
195
|
/** The query a detail pane is showing, together with the registry entry it was registered as. */
|
|
172
196
|
type QueryDevtoolsSelection = {
|
|
@@ -178,7 +202,7 @@ type QueryDevtoolsSelection = {
|
|
|
178
202
|
* to count, so the badge/overflow logic would push it behind **More** - it is reached from the header's
|
|
179
203
|
* gear instead.
|
|
180
204
|
*/
|
|
181
|
-
type DevtoolsTab = 'queries' | 'stacks' | 'sequences' | 'forms' | 'auth' | 'ws' | 'cache' | 'timeline' | 'events' | 'faults' | 'mocks' | 'about' | 'settings';
|
|
205
|
+
type DevtoolsTab = 'queries' | 'stacks' | 'sequences' | 'forms' | 'auth' | 'ws' | 'cache' | 'locks' | 'timeline' | 'events' | 'faults' | 'mocks' | 'about' | 'settings';
|
|
182
206
|
/**
|
|
183
207
|
* The sections of the query detail drawer. The head and its actions stay pinned above them - the detail
|
|
184
208
|
* holds more than fits a column, and everything below the actions is reading material.
|
|
@@ -208,11 +232,11 @@ type RouteSegment = {
|
|
|
208
232
|
name?: string;
|
|
209
233
|
};
|
|
210
234
|
/**
|
|
211
|
-
*
|
|
212
|
-
* the caveats the label has no room for
|
|
213
|
-
* tab count is.
|
|
235
|
+
* A one-line verdict the panel renders as a chip - which tab refreshes an auth provider's tokens, where
|
|
236
|
+
* this tab stands on a lock. `title` carries the caveats the label has no room for: why every tab reads
|
|
237
|
+
* as the leader, or how approximate a tab count is.
|
|
214
238
|
*/
|
|
215
|
-
type
|
|
239
|
+
type QueryDevtoolsChip = {
|
|
216
240
|
label: string;
|
|
217
241
|
tone: 'success' | 'muted';
|
|
218
242
|
title: string;
|
|
@@ -391,6 +415,14 @@ type QueryDevtoolsHost = {
|
|
|
391
415
|
clearPersistedQueries(client: QueryClient): void;
|
|
392
416
|
/** The features of the client behind a cache tab card, or `null` for a client without any. */
|
|
393
417
|
clientFeatures(client: QueryClient | null | undefined): QueryDevtoolsFeature[] | null;
|
|
418
|
+
/**
|
|
419
|
+
* Every Web Lock held or queued across this origin, decoded, or `null` in a browser without the Web
|
|
420
|
+
* Locks API. Empty while the Locks tab has not read its first snapshot - it polls, because Web Locks
|
|
421
|
+
* has no change event to listen to.
|
|
422
|
+
*/
|
|
423
|
+
lockRows: Signal<DevtoolsLockRow[] | null>;
|
|
424
|
+
/** Where this tab stands on one lock, as a chip: whether it holds it, waits for it, or is not in it. */
|
|
425
|
+
lockStanding(row: DevtoolsLockRow): QueryDevtoolsChip;
|
|
394
426
|
/** Unique client names present across queries and auth providers, for the Queries/Timeline pickers. */
|
|
395
427
|
clientNames: Signal<string[]>;
|
|
396
428
|
/** What each tab holds - also drives the tab bar's own badges, so it lives here rather than per-tab. */
|
|
@@ -426,7 +458,7 @@ type QueryDevtoolsHost = {
|
|
|
426
458
|
/** The access-token expiry the app acts on, plus the lifetime the panel has armed over it. */
|
|
427
459
|
authTokenLifetime(entry: QueryDevtoolsEntry): QueryDevtoolsTokenLifetime;
|
|
428
460
|
/** The multi-tab leadership chip, or `null` for a provider without `withBearerAuthMultiTabSync`. */
|
|
429
|
-
authLeadership(auth: AnyBearerAuthProvider):
|
|
461
|
+
authLeadership(auth: AnyBearerAuthProvider): QueryDevtoolsChip | null;
|
|
430
462
|
queryStatus(query: AnyQuery): 'idle' | 'loading' | 'success' | 'error';
|
|
431
463
|
isStale(query: AnyQuery): boolean;
|
|
432
464
|
/** Whether an entry is showing an armed response override or a devtools-faulted outcome. */
|
|
@@ -753,6 +785,7 @@ type PersistedState = {
|
|
|
753
785
|
listHeight?: number | null;
|
|
754
786
|
drawerHeight?: number | null;
|
|
755
787
|
dock?: DevtoolsDock;
|
|
788
|
+
reservesSpace?: boolean;
|
|
756
789
|
floatRect?: FloatRect;
|
|
757
790
|
floatParked?: boolean;
|
|
758
791
|
activeTab?: DevtoolsTab;
|
|
@@ -821,6 +854,7 @@ declare class QueryDevtoolsComponent implements OnInit {
|
|
|
821
854
|
private destroyRef;
|
|
822
855
|
private document;
|
|
823
856
|
private viewport;
|
|
857
|
+
private isDocumentVisible;
|
|
824
858
|
/**
|
|
825
859
|
* Opens the panel as soon as it is created, whatever the stored view state says. Set by
|
|
826
860
|
* `<et-query-devtools-lazy>`, which downloads the panel on the click that was meant to open it.
|
|
@@ -854,6 +888,9 @@ declare class QueryDevtoolsComponent implements OnInit {
|
|
|
854
888
|
} | {
|
|
855
889
|
id: "cache";
|
|
856
890
|
label: string;
|
|
891
|
+
} | {
|
|
892
|
+
id: "locks";
|
|
893
|
+
label: string;
|
|
857
894
|
} | {
|
|
858
895
|
id: "timeline";
|
|
859
896
|
label: string;
|
|
@@ -956,6 +993,11 @@ declare class QueryDevtoolsComponent implements OnInit {
|
|
|
956
993
|
readonly label: "Pop out";
|
|
957
994
|
readonly hint: "Move the panel into a window of its own - the same live panel, on your other screen";
|
|
958
995
|
}>;
|
|
996
|
+
/**
|
|
997
|
+
* Whether a docked panel takes its size out of the page instead of covering it - so the last rows of a
|
|
998
|
+
* long page can still be scrolled to. Only docks can: a float sits wherever it was dragged.
|
|
999
|
+
*/
|
|
1000
|
+
protected reservesSpace: WritableSignal<boolean>;
|
|
959
1001
|
/** Where the floating panel sits and how big it is. Kept while docked, so a return to float restores it. */
|
|
960
1002
|
private floatRect;
|
|
961
1003
|
/** The rect a resize gesture started from, or `null` outside one. */
|
|
@@ -993,6 +1035,13 @@ declare class QueryDevtoolsComponent implements OnInit {
|
|
|
993
1035
|
/** The floating panel's offset from the viewport's top-left, or `null` while it is docked. */
|
|
994
1036
|
protected panelInsetBlock: _angular_core.Signal<number | null>;
|
|
995
1037
|
protected panelInsetInline: _angular_core.Signal<number | null>;
|
|
1038
|
+
/**
|
|
1039
|
+
* The panel's rendered size, not its dragged one - the stylesheet clamps a dock (`min-block-size`,
|
|
1040
|
+
* `max-block-size: 90vh`) and it is the clamped size the page has to give up.
|
|
1041
|
+
*/
|
|
1042
|
+
private panelSize;
|
|
1043
|
+
/** Which padding a docked panel asks of the page and how much, or `null` when it asks for none. */
|
|
1044
|
+
private pageReservation;
|
|
996
1045
|
/** Which section of the query detail is showing. Shared by the Queries tab and both drawers. */
|
|
997
1046
|
detailTab: WritableSignal<DetailTab>;
|
|
998
1047
|
selectedClientName: WritableSignal<string | null>;
|
|
@@ -1088,6 +1137,15 @@ declare class QueryDevtoolsComponent implements OnInit {
|
|
|
1088
1137
|
private copiedReset$;
|
|
1089
1138
|
/** 1-second tick driving the cache freshness countdowns. */
|
|
1090
1139
|
private clock;
|
|
1140
|
+
/**
|
|
1141
|
+
* The probe lock behind every Locks row's "this tab" answer, and the last snapshot read through it.
|
|
1142
|
+
* Both only exist while the Locks tab is on screen - see the polling stream in the constructor.
|
|
1143
|
+
*/
|
|
1144
|
+
private probeLocks;
|
|
1145
|
+
private probeId;
|
|
1146
|
+
private probeHold;
|
|
1147
|
+
private lockSnapshot;
|
|
1148
|
+
lockRows: _angular_core.Signal<DevtoolsLockRow[] | null>;
|
|
1091
1149
|
/** "Inspect" mode: hover the live UI to find the query that a component created. */
|
|
1092
1150
|
protected inspectActive: WritableSignal<boolean>;
|
|
1093
1151
|
protected inspectHover: WritableSignal<{
|
|
@@ -1179,6 +1237,9 @@ declare class QueryDevtoolsComponent implements OnInit {
|
|
|
1179
1237
|
} | {
|
|
1180
1238
|
id: "cache";
|
|
1181
1239
|
label: string;
|
|
1240
|
+
} | {
|
|
1241
|
+
id: "locks";
|
|
1242
|
+
label: string;
|
|
1182
1243
|
} | {
|
|
1183
1244
|
id: "timeline";
|
|
1184
1245
|
label: string;
|
|
@@ -1217,6 +1278,9 @@ declare class QueryDevtoolsComponent implements OnInit {
|
|
|
1217
1278
|
} | {
|
|
1218
1279
|
id: "cache";
|
|
1219
1280
|
label: string;
|
|
1281
|
+
} | {
|
|
1282
|
+
id: "locks";
|
|
1283
|
+
label: string;
|
|
1220
1284
|
} | {
|
|
1221
1285
|
id: "timeline";
|
|
1222
1286
|
label: string;
|
|
@@ -1591,11 +1655,13 @@ declare class QueryDevtoolsComponent implements OnInit {
|
|
|
1591
1655
|
authTokenPayload(auth: AnyBearerAuthProvider): Record<string, unknown> | null;
|
|
1592
1656
|
queriesForStack(stack: AnyQueryStack | AnyPagedQueryStack): QueryLink[];
|
|
1593
1657
|
authQueryKeys(auth: AnyBearerAuthProvider): string[];
|
|
1658
|
+
/** Where this tab stands on one lock, as a chip. @see lockRows */
|
|
1659
|
+
lockStanding(row: DevtoolsLockRow): QueryDevtoolsChip;
|
|
1594
1660
|
/**
|
|
1595
1661
|
* Which tab refreshes this provider's tokens, as a chip: whether it is this one, how many tabs are
|
|
1596
1662
|
* in the election, and - when there is no election - why every tab reads as the leader.
|
|
1597
1663
|
*/
|
|
1598
|
-
authLeadership(auth: AnyBearerAuthProvider):
|
|
1664
|
+
authLeadership(auth: AnyBearerAuthProvider): QueryDevtoolsChip | null;
|
|
1599
1665
|
/**
|
|
1600
1666
|
* The access token's expiry as the app sees it, plus whatever the panel is doing to it: an armed
|
|
1601
1667
|
* lifetime replaces the countdown, and the token's own is reported next to it so the card never claims
|
|
@@ -1634,6 +1700,12 @@ declare class QueryDevtoolsComponent implements OnInit {
|
|
|
1634
1700
|
content: string;
|
|
1635
1701
|
type: string;
|
|
1636
1702
|
}): void;
|
|
1703
|
+
/**
|
|
1704
|
+
* Takes - or gives back - the lock whose name only this tab can have produced. Its `clientId` in the
|
|
1705
|
+
* snapshot is what tells this tab's rows from another tab's: `LockInfo` carries no tab identity, and
|
|
1706
|
+
* the platform offers no way to ask for one's own client id.
|
|
1707
|
+
*/
|
|
1708
|
+
private holdProbeLock;
|
|
1637
1709
|
/**
|
|
1638
1710
|
* The two runs the diff compares, oldest first - normalised by run index, so picking a pair in either
|
|
1639
1711
|
* order reads the same way round as the `#before → #after` header prints it.
|
|
@@ -1771,7 +1843,7 @@ declare class QueryDevtoolsComponent implements OnInit {
|
|
|
1771
1843
|
declare const QUERY_DEVTOOLS_IMPORTS: readonly [typeof QueryDevtoolsComponent];
|
|
1772
1844
|
|
|
1773
1845
|
/** The version of `@ethlete/query-devtools` this build was cut from. */
|
|
1774
|
-
declare const QUERY_DEVTOOLS_VERSION = "1.0.0-next.
|
|
1846
|
+
declare const QUERY_DEVTOOLS_VERSION = "1.0.0-next.2";
|
|
1775
1847
|
|
|
1776
1848
|
export { QUERY_DEVTOOLS_IMPORTS, QUERY_DEVTOOLS_VERSION, QueryDevtoolsAboutComponent, QueryDevtoolsComponent, QueryDevtoolsJsonComponent, QueryDevtoolsJsonStylesComponent, QueryDevtoolsSettingsComponent, QueryDevtoolsTimelineStylesComponent, clampFloatToPeek, kindOf, resizedFloatRect, settledFloatRect };
|
|
1777
1849
|
export type { JsonKind };
|