@ethlete/query-devtools 1.0.0-next.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.
- package/CHANGELOG.md +12 -0
- package/README.md +42 -0
- package/fesm2022/ethlete-query-devtools-lazy.mjs +95 -0
- package/fesm2022/ethlete-query-devtools-lazy.mjs.map +1 -0
- package/fesm2022/ethlete-query-devtools-toggle.mjs +79 -0
- package/fesm2022/ethlete-query-devtools-toggle.mjs.map +1 -0
- package/fesm2022/ethlete-query-devtools.mjs +6680 -0
- package/fesm2022/ethlete-query-devtools.mjs.map +1 -0
- package/package.json +45 -0
- package/types/ethlete-query-devtools-lazy.d.ts +39 -0
- package/types/ethlete-query-devtools-toggle.d.ts +37 -0
- package/types/ethlete-query-devtools.d.ts +1777 -0
package/package.json
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@ethlete/query-devtools",
|
|
3
|
+
"version": "1.0.0-next.0",
|
|
4
|
+
"license": "MIT",
|
|
5
|
+
"sideEffects": false,
|
|
6
|
+
"peerDependencies": {
|
|
7
|
+
"@analogjs/vitest-angular": "2.6.3",
|
|
8
|
+
"@angular/common": "22.0.7",
|
|
9
|
+
"@angular/compiler": "22.0.7",
|
|
10
|
+
"@angular/core": "22.0.7",
|
|
11
|
+
"@ethlete/components": "^1.0.0-next.42",
|
|
12
|
+
"@ethlete/core": "^5.0.0-beta.11",
|
|
13
|
+
"@ethlete/query": "^6.0.0-beta.8",
|
|
14
|
+
"@ethlete/types": "^2.0.0-beta.4",
|
|
15
|
+
"rxjs": "7.8.2"
|
|
16
|
+
},
|
|
17
|
+
"peerDependenciesMeta": {
|
|
18
|
+
"@analogjs/vitest-angular": {
|
|
19
|
+
"optional": true
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
"module": "fesm2022/ethlete-query-devtools.mjs",
|
|
23
|
+
"typings": "types/ethlete-query-devtools.d.ts",
|
|
24
|
+
"exports": {
|
|
25
|
+
"./package.json": {
|
|
26
|
+
"default": "./package.json"
|
|
27
|
+
},
|
|
28
|
+
".": {
|
|
29
|
+
"types": "./types/ethlete-query-devtools.d.ts",
|
|
30
|
+
"default": "./fesm2022/ethlete-query-devtools.mjs"
|
|
31
|
+
},
|
|
32
|
+
"./lazy": {
|
|
33
|
+
"types": "./types/ethlete-query-devtools-lazy.d.ts",
|
|
34
|
+
"default": "./fesm2022/ethlete-query-devtools-lazy.mjs"
|
|
35
|
+
},
|
|
36
|
+
"./toggle": {
|
|
37
|
+
"types": "./types/ethlete-query-devtools-toggle.d.ts",
|
|
38
|
+
"default": "./fesm2022/ethlete-query-devtools-toggle.mjs"
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
"type": "module",
|
|
42
|
+
"dependencies": {
|
|
43
|
+
"tslib": "^2.3.0"
|
|
44
|
+
}
|
|
45
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import * as _angular_core from '@angular/core';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* The query devtools behind a deferred load: renders only the floating toggle button until the panel is
|
|
5
|
+
* first asked for, then downloads `<et-query-devtools>` as its own chunk and hands over. Use it instead
|
|
6
|
+
* of `<et-query-devtools>` to keep the panel out of the bundle an application ships to its users.
|
|
7
|
+
*
|
|
8
|
+
* Everything else is identical - the same toggle, the same `Ctrl/Cmd + Alt + Q` shortcut, and a panel
|
|
9
|
+
* that was open when the tab last stored its state comes back open without a click.
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```html
|
|
13
|
+
* <et-query-devtools-lazy />
|
|
14
|
+
* ```
|
|
15
|
+
*/
|
|
16
|
+
declare class QueryDevtoolsLazyComponent {
|
|
17
|
+
private document;
|
|
18
|
+
/**
|
|
19
|
+
* Whether the panel was already open in this tab. It has to be answered before the panel exists, which
|
|
20
|
+
* is why the stored view state is read here rather than asked of the panel.
|
|
21
|
+
*/
|
|
22
|
+
private restoredOpen;
|
|
23
|
+
protected load: _angular_core.WritableSignal<boolean>;
|
|
24
|
+
/** A restored panel opens because it was open; one that was clicked open has to be told to. */
|
|
25
|
+
protected openOnLoad: _angular_core.WritableSignal<boolean>;
|
|
26
|
+
/**
|
|
27
|
+
* Whether anything armed is changing what the app does, for the dot on the closed toggle. The panel's
|
|
28
|
+
* own badge is per-query and finer-grained; this covers what can already be armed before the panel has
|
|
29
|
+
* ever been loaded - overrides and mocks restored from a previous page load, and anything an app or a
|
|
30
|
+
* test armed through the API.
|
|
31
|
+
*/
|
|
32
|
+
protected tampered: _angular_core.Signal<boolean>;
|
|
33
|
+
constructor();
|
|
34
|
+
protected open(): void;
|
|
35
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<QueryDevtoolsLazyComponent, never>;
|
|
36
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<QueryDevtoolsLazyComponent, "et-query-devtools-lazy", never, {}, {}, never, never, true, never>;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export { QueryDevtoolsLazyComponent };
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import * as _angular_core from '@angular/core';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* The global devtools toggle shortcut, rendered for the current platform (`⌘⌥Q` on Apple, where the
|
|
5
|
+
* symbols are the convention, `Ctrl+Alt+Q` everywhere else). Shown on both the floating toggle and
|
|
6
|
+
* the panel's close button so the shortcut is discoverable without reading the docs.
|
|
7
|
+
*/
|
|
8
|
+
declare const queryDevtoolsShortcutLabel: () => "⌘⌥Q" | "Ctrl+Alt+Q";
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* The floating toggle button for the query devtools. Rendered with `ShadowDom` encapsulation so the
|
|
12
|
+
* host application's global CSS (Tailwind resets, button styles, …) can never touch it and its own
|
|
13
|
+
* styles can never leak out. Uses px (not rem) internally so it doesn't depend on the host's root
|
|
14
|
+
* font-size; theme accent colour is read from an inherited custom property with a fallback.
|
|
15
|
+
*/
|
|
16
|
+
declare class QueryDevtoolsToggleComponent {
|
|
17
|
+
tampered: _angular_core.InputSignal<boolean>;
|
|
18
|
+
openChange: _angular_core.OutputEmitterRef<void>;
|
|
19
|
+
protected shortcut: string;
|
|
20
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<QueryDevtoolsToggleComponent, never>;
|
|
21
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<QueryDevtoolsToggleComponent, "et-query-devtools-toggle", never, { "tampered": { "alias": "tampered"; "required": false; "isSignal": true; }; }, { "openChange": "openChange"; }, never, never, true, never>;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Where the panel's own view state lives - open/closed, dock, sizes, selection, filters. Bumped
|
|
26
|
+
* whenever a shape change would make an older stored state restore into something wrong.
|
|
27
|
+
* @internal
|
|
28
|
+
*/
|
|
29
|
+
declare const QUERY_DEVTOOLS_VIEW_STATE_KEY = "ethlete:query:devtools:v4";
|
|
30
|
+
/**
|
|
31
|
+
* Whether the panel was open when this tab last stored its view state. Read by
|
|
32
|
+
* `<et-query-devtools-lazy>`, which has to load the panel before it can ask the panel anything.
|
|
33
|
+
* @internal
|
|
34
|
+
*/
|
|
35
|
+
declare const wasQueryDevtoolsOpen: () => boolean;
|
|
36
|
+
|
|
37
|
+
export { QUERY_DEVTOOLS_VIEW_STATE_KEY, QueryDevtoolsToggleComponent, queryDevtoolsShortcutLabel, wasQueryDevtoolsOpen };
|