@chrome-agent-bridge/shared 0.1.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/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -0
- package/dist/types.d.ts +67 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +3 -0
- package/dist/types.js.map +1 -0
- package/package.json +26 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,WAAW,EACX,mBAAmB,EACnB,sBAAsB,EACtB,UAAU,EACV,cAAc,EACd,eAAe,EACf,oBAAoB,EACpB,YAAY,GACb,MAAM,SAAS,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":""}
|
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
export interface CSSRuleInfo {
|
|
2
|
+
selector: string;
|
|
3
|
+
properties: Record<string, string>;
|
|
4
|
+
mediaQuery: string | null;
|
|
5
|
+
source: string;
|
|
6
|
+
}
|
|
7
|
+
export interface CapturedElementData {
|
|
8
|
+
id: string;
|
|
9
|
+
timestamp: number;
|
|
10
|
+
url: string;
|
|
11
|
+
title: string;
|
|
12
|
+
element: {
|
|
13
|
+
tagName: string;
|
|
14
|
+
html: string;
|
|
15
|
+
text: string;
|
|
16
|
+
classes: string[];
|
|
17
|
+
id: string | null;
|
|
18
|
+
attributes: Record<string, string>;
|
|
19
|
+
domPath: string;
|
|
20
|
+
};
|
|
21
|
+
styles: {
|
|
22
|
+
computed: Record<string, string>;
|
|
23
|
+
matched: CSSRuleInfo[];
|
|
24
|
+
};
|
|
25
|
+
screenshot: string | null;
|
|
26
|
+
}
|
|
27
|
+
export interface CapturedElementSummary {
|
|
28
|
+
id: string;
|
|
29
|
+
timestamp: number;
|
|
30
|
+
url: string;
|
|
31
|
+
tagName: string;
|
|
32
|
+
classes: string[];
|
|
33
|
+
text: string;
|
|
34
|
+
}
|
|
35
|
+
export type ExtMessage = {
|
|
36
|
+
type: 'ACTIVATE_SELECTOR';
|
|
37
|
+
} | {
|
|
38
|
+
type: 'DEACTIVATE_SELECTOR';
|
|
39
|
+
} | {
|
|
40
|
+
type: 'ELEMENT_CAPTURED';
|
|
41
|
+
payload: CapturedElementData;
|
|
42
|
+
} | {
|
|
43
|
+
type: 'SEND_RESULT';
|
|
44
|
+
payload: {
|
|
45
|
+
success: boolean;
|
|
46
|
+
id?: string;
|
|
47
|
+
error?: string;
|
|
48
|
+
};
|
|
49
|
+
} | {
|
|
50
|
+
type: 'STATUS_REQUEST';
|
|
51
|
+
} | {
|
|
52
|
+
type: 'TOGGLE_PANEL';
|
|
53
|
+
};
|
|
54
|
+
export type CaptureRequest = CapturedElementData;
|
|
55
|
+
export interface CaptureResponse {
|
|
56
|
+
success: true;
|
|
57
|
+
id: string;
|
|
58
|
+
}
|
|
59
|
+
export interface CaptureErrorResponse {
|
|
60
|
+
success: false;
|
|
61
|
+
error: string;
|
|
62
|
+
}
|
|
63
|
+
export interface PingResponse {
|
|
64
|
+
status: 'ok';
|
|
65
|
+
timestamp: number;
|
|
66
|
+
}
|
|
67
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AACA,MAAM,WAAW,WAAW;IAC1B,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACnC,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,MAAM,EAAE,MAAM,CAAC;CAChB;AAGD,MAAM,WAAW,mB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AAE,cAAc,CAAA;CAAE,CAAC;AAG7B,MAAM,MAAM,cAAc,GAAG,mBAAmB,CAAC;AAGjD,MAAM,WAAW,eAAe;IAC9B,OAAO,EAAE,IAAI,CAAC;IACd,EAAE,EAAE,MAAM,CAAC;CACZ;AAGD,MAAM,WAAW,oBAAoB;IACnC,OAAO,EAAE,KAAK,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;CACf;AAGD,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,IAAI,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;CACnB"}
|
package/dist/types.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":""}
|
package/package.json
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@chrome-agent-bridge/shared",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"private": false,
|
|
5
|
+
"description": "Shared TypeScript type definitions for Chrome-Agent Bridge",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"main": "dist/index.js",
|
|
8
|
+
"types": "dist/index.d.ts",
|
|
9
|
+
"files": [
|
|
10
|
+
"dist"
|
|
11
|
+
],
|
|
12
|
+
"repository": {
|
|
13
|
+
"type": "git",
|
|
14
|
+
"url": "https://github.com/user/chrome-agent-bridge",
|
|
15
|
+
"directory": "packages/shared"
|
|
16
|
+
},
|
|
17
|
+
"keywords": [
|
|
18
|
+
"chrome-agent-bridge",
|
|
19
|
+
"mcp",
|
|
20
|
+
"types"
|
|
21
|
+
],
|
|
22
|
+
"scripts": {
|
|
23
|
+
"build": "tsc",
|
|
24
|
+
"test": "vitest --run"
|
|
25
|
+
}
|
|
26
|
+
}
|