@copilotkitnext/web-inspector 0.0.13
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/.turbo/turbo-build.log +29 -0
- package/LICENSE +11 -0
- package/dist/index.d.mts +108 -0
- package/dist/index.d.ts +108 -0
- package/dist/index.js +1232 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +1205 -0
- package/dist/index.mjs.map +1 -0
- package/eslint.config.mjs +3 -0
- package/package.json +46 -0
- package/src/assets/logo-mark.svg +8 -0
- package/src/components.d.ts +24 -0
- package/src/index.ts +1300 -0
- package/src/lib/context-helpers.ts +125 -0
- package/src/lib/persistence.ts +88 -0
- package/src/lib/types.ts +17 -0
- package/src/styles/generated.css +2 -0
- package/src/styles/tailwind.css +23 -0
- package/src/types/css.d.ts +4 -0
- package/src/types/svg.d.ts +4 -0
- package/tsconfig.json +14 -0
- package/tsup.config.ts +15 -0
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
|
|
2
|
+
> @copilotkitnext/web-inspector@0.0.13-alpha.1 build /Users/mme/Projects/CopilotKit2/main/packages/web-inspector
|
|
3
|
+
> pnpm run build:css && tsup
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
> @copilotkitnext/web-inspector@0.0.13-alpha.1 build:css /Users/mme/Projects/CopilotKit2/main/packages/web-inspector
|
|
7
|
+
> npx @tailwindcss/cli -i ./src/styles/tailwind.css -o ./src/styles/generated.css -m
|
|
8
|
+
|
|
9
|
+
≈ tailwindcss v4.1.11
|
|
10
|
+
|
|
11
|
+
Done in 34ms
|
|
12
|
+
CLI Building entry: src/index.ts
|
|
13
|
+
CLI Using tsconfig: tsconfig.json
|
|
14
|
+
CLI tsup v8.5.0
|
|
15
|
+
CLI Using tsup config: /Users/mme/Projects/CopilotKit2/main/packages/web-inspector/tsup.config.ts
|
|
16
|
+
CLI Target: es2022
|
|
17
|
+
CLI Cleaning output folder
|
|
18
|
+
CJS Build start
|
|
19
|
+
ESM Build start
|
|
20
|
+
CJS dist/index.js 64.49 KB
|
|
21
|
+
CJS dist/index.js.map 93.21 KB
|
|
22
|
+
CJS ⚡️ Build success in 20ms
|
|
23
|
+
ESM dist/index.mjs 63.11 KB
|
|
24
|
+
ESM dist/index.mjs.map 93.19 KB
|
|
25
|
+
ESM ⚡️ Build success in 20ms
|
|
26
|
+
DTS Build start
|
|
27
|
+
DTS ⚡️ Build success in 1508ms
|
|
28
|
+
DTS dist/index.d.ts 3.21 KB
|
|
29
|
+
DTS dist/index.d.mts 3.21 KB
|
package/LICENSE
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
Note: This license does not apply to the whole project. Individual packages may contain their own licenses.
|
|
2
|
+
|
|
3
|
+
MIT License
|
|
4
|
+
|
|
5
|
+
Copyright 2025 Tawkit Inc.
|
|
6
|
+
|
|
7
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
8
|
+
|
|
9
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
10
|
+
|
|
11
|
+
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import * as lit from 'lit';
|
|
2
|
+
import { LitElement } from 'lit';
|
|
3
|
+
import { CopilotKitCore } from '@copilotkitnext/core';
|
|
4
|
+
|
|
5
|
+
declare const WEB_INSPECTOR_TAG: "web-inspector";
|
|
6
|
+
declare class WebInspectorElement extends LitElement {
|
|
7
|
+
static properties: {
|
|
8
|
+
readonly core: {
|
|
9
|
+
readonly attribute: false;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
private _core;
|
|
13
|
+
private coreSubscriber;
|
|
14
|
+
private coreUnsubscribe;
|
|
15
|
+
private agentSubscriptions;
|
|
16
|
+
private agentEvents;
|
|
17
|
+
private flattenedEvents;
|
|
18
|
+
private eventCounter;
|
|
19
|
+
private pointerId;
|
|
20
|
+
private dragStart;
|
|
21
|
+
private dragOffset;
|
|
22
|
+
private isDragging;
|
|
23
|
+
private pointerContext;
|
|
24
|
+
private isOpen;
|
|
25
|
+
private draggedDuringInteraction;
|
|
26
|
+
private ignoreNextButtonClick;
|
|
27
|
+
private selectedMenu;
|
|
28
|
+
private contextMenuOpen;
|
|
29
|
+
get core(): CopilotKitCore | null;
|
|
30
|
+
set core(value: CopilotKitCore | null);
|
|
31
|
+
private readonly contextState;
|
|
32
|
+
private hasCustomPosition;
|
|
33
|
+
private resizePointerId;
|
|
34
|
+
private resizeStart;
|
|
35
|
+
private resizeInitialSize;
|
|
36
|
+
private isResizing;
|
|
37
|
+
private readonly menuItems;
|
|
38
|
+
private attachToCore;
|
|
39
|
+
private detachFromCore;
|
|
40
|
+
private teardownAgentSubscriptions;
|
|
41
|
+
private processAgentsChanged;
|
|
42
|
+
private subscribeToAgent;
|
|
43
|
+
private unsubscribeFromAgent;
|
|
44
|
+
private recordAgentEvent;
|
|
45
|
+
private updateContextOptions;
|
|
46
|
+
private getEventsForSelectedContext;
|
|
47
|
+
private getEventBadgeClasses;
|
|
48
|
+
private stringifyPayload;
|
|
49
|
+
static styles: lit.CSSResult[];
|
|
50
|
+
connectedCallback(): void;
|
|
51
|
+
disconnectedCallback(): void;
|
|
52
|
+
firstUpdated(): void;
|
|
53
|
+
render(): lit.TemplateResult<1>;
|
|
54
|
+
private renderButton;
|
|
55
|
+
private renderWindow;
|
|
56
|
+
private hydrateStateFromCookie;
|
|
57
|
+
private get activeContext();
|
|
58
|
+
private handlePointerDown;
|
|
59
|
+
private handlePointerMove;
|
|
60
|
+
private handlePointerUp;
|
|
61
|
+
private handlePointerCancel;
|
|
62
|
+
private handleButtonClick;
|
|
63
|
+
private handleClosePointerDown;
|
|
64
|
+
private handleCloseClick;
|
|
65
|
+
private handleResizePointerDown;
|
|
66
|
+
private handleResizePointerMove;
|
|
67
|
+
private handleResizePointerUp;
|
|
68
|
+
private handleResizePointerCancel;
|
|
69
|
+
private handleResize;
|
|
70
|
+
private measureContext;
|
|
71
|
+
private centerContext;
|
|
72
|
+
private ensureWindowPlacement;
|
|
73
|
+
private constrainToViewport;
|
|
74
|
+
private keepPositionWithinViewport;
|
|
75
|
+
private getViewportSize;
|
|
76
|
+
private persistState;
|
|
77
|
+
private clampWindowSize;
|
|
78
|
+
private updateHostTransform;
|
|
79
|
+
private setDragging;
|
|
80
|
+
private updateAnchorFromPosition;
|
|
81
|
+
private applyAnchorPosition;
|
|
82
|
+
private resetResizeTracking;
|
|
83
|
+
private resetPointerTracking;
|
|
84
|
+
private openInspector;
|
|
85
|
+
private closeInspector;
|
|
86
|
+
private renderIcon;
|
|
87
|
+
private serializeAttributes;
|
|
88
|
+
private contextOptions;
|
|
89
|
+
private selectedContext;
|
|
90
|
+
private expandedRows;
|
|
91
|
+
private getSelectedMenu;
|
|
92
|
+
private renderMainContent;
|
|
93
|
+
private renderEventsTable;
|
|
94
|
+
private renderContextDropdown;
|
|
95
|
+
private handleMenuSelect;
|
|
96
|
+
private handleContextDropdownToggle;
|
|
97
|
+
private handleContextOptionSelect;
|
|
98
|
+
private handleGlobalPointerDown;
|
|
99
|
+
private toggleRowExpansion;
|
|
100
|
+
}
|
|
101
|
+
declare function defineWebInspector(): void;
|
|
102
|
+
declare global {
|
|
103
|
+
interface HTMLElementTagNameMap {
|
|
104
|
+
"web-inspector": WebInspectorElement;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
export { WEB_INSPECTOR_TAG, WebInspectorElement, defineWebInspector };
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import * as lit from 'lit';
|
|
2
|
+
import { LitElement } from 'lit';
|
|
3
|
+
import { CopilotKitCore } from '@copilotkitnext/core';
|
|
4
|
+
|
|
5
|
+
declare const WEB_INSPECTOR_TAG: "web-inspector";
|
|
6
|
+
declare class WebInspectorElement extends LitElement {
|
|
7
|
+
static properties: {
|
|
8
|
+
readonly core: {
|
|
9
|
+
readonly attribute: false;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
private _core;
|
|
13
|
+
private coreSubscriber;
|
|
14
|
+
private coreUnsubscribe;
|
|
15
|
+
private agentSubscriptions;
|
|
16
|
+
private agentEvents;
|
|
17
|
+
private flattenedEvents;
|
|
18
|
+
private eventCounter;
|
|
19
|
+
private pointerId;
|
|
20
|
+
private dragStart;
|
|
21
|
+
private dragOffset;
|
|
22
|
+
private isDragging;
|
|
23
|
+
private pointerContext;
|
|
24
|
+
private isOpen;
|
|
25
|
+
private draggedDuringInteraction;
|
|
26
|
+
private ignoreNextButtonClick;
|
|
27
|
+
private selectedMenu;
|
|
28
|
+
private contextMenuOpen;
|
|
29
|
+
get core(): CopilotKitCore | null;
|
|
30
|
+
set core(value: CopilotKitCore | null);
|
|
31
|
+
private readonly contextState;
|
|
32
|
+
private hasCustomPosition;
|
|
33
|
+
private resizePointerId;
|
|
34
|
+
private resizeStart;
|
|
35
|
+
private resizeInitialSize;
|
|
36
|
+
private isResizing;
|
|
37
|
+
private readonly menuItems;
|
|
38
|
+
private attachToCore;
|
|
39
|
+
private detachFromCore;
|
|
40
|
+
private teardownAgentSubscriptions;
|
|
41
|
+
private processAgentsChanged;
|
|
42
|
+
private subscribeToAgent;
|
|
43
|
+
private unsubscribeFromAgent;
|
|
44
|
+
private recordAgentEvent;
|
|
45
|
+
private updateContextOptions;
|
|
46
|
+
private getEventsForSelectedContext;
|
|
47
|
+
private getEventBadgeClasses;
|
|
48
|
+
private stringifyPayload;
|
|
49
|
+
static styles: lit.CSSResult[];
|
|
50
|
+
connectedCallback(): void;
|
|
51
|
+
disconnectedCallback(): void;
|
|
52
|
+
firstUpdated(): void;
|
|
53
|
+
render(): lit.TemplateResult<1>;
|
|
54
|
+
private renderButton;
|
|
55
|
+
private renderWindow;
|
|
56
|
+
private hydrateStateFromCookie;
|
|
57
|
+
private get activeContext();
|
|
58
|
+
private handlePointerDown;
|
|
59
|
+
private handlePointerMove;
|
|
60
|
+
private handlePointerUp;
|
|
61
|
+
private handlePointerCancel;
|
|
62
|
+
private handleButtonClick;
|
|
63
|
+
private handleClosePointerDown;
|
|
64
|
+
private handleCloseClick;
|
|
65
|
+
private handleResizePointerDown;
|
|
66
|
+
private handleResizePointerMove;
|
|
67
|
+
private handleResizePointerUp;
|
|
68
|
+
private handleResizePointerCancel;
|
|
69
|
+
private handleResize;
|
|
70
|
+
private measureContext;
|
|
71
|
+
private centerContext;
|
|
72
|
+
private ensureWindowPlacement;
|
|
73
|
+
private constrainToViewport;
|
|
74
|
+
private keepPositionWithinViewport;
|
|
75
|
+
private getViewportSize;
|
|
76
|
+
private persistState;
|
|
77
|
+
private clampWindowSize;
|
|
78
|
+
private updateHostTransform;
|
|
79
|
+
private setDragging;
|
|
80
|
+
private updateAnchorFromPosition;
|
|
81
|
+
private applyAnchorPosition;
|
|
82
|
+
private resetResizeTracking;
|
|
83
|
+
private resetPointerTracking;
|
|
84
|
+
private openInspector;
|
|
85
|
+
private closeInspector;
|
|
86
|
+
private renderIcon;
|
|
87
|
+
private serializeAttributes;
|
|
88
|
+
private contextOptions;
|
|
89
|
+
private selectedContext;
|
|
90
|
+
private expandedRows;
|
|
91
|
+
private getSelectedMenu;
|
|
92
|
+
private renderMainContent;
|
|
93
|
+
private renderEventsTable;
|
|
94
|
+
private renderContextDropdown;
|
|
95
|
+
private handleMenuSelect;
|
|
96
|
+
private handleContextDropdownToggle;
|
|
97
|
+
private handleContextOptionSelect;
|
|
98
|
+
private handleGlobalPointerDown;
|
|
99
|
+
private toggleRowExpansion;
|
|
100
|
+
}
|
|
101
|
+
declare function defineWebInspector(): void;
|
|
102
|
+
declare global {
|
|
103
|
+
interface HTMLElementTagNameMap {
|
|
104
|
+
"web-inspector": WebInspectorElement;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
export { WEB_INSPECTOR_TAG, WebInspectorElement, defineWebInspector };
|