@hanzo/browser-extension 1.9.49 → 1.9.53
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/LICENSE +12 -0
- package/images/icon128.png +0 -0
- package/images/icon16.png +0 -0
- package/images/icon48.png +0 -0
- package/manifest.json +7 -57
- package/package.json +49 -33
- package/src/ai-worker.js +571 -0
- package/src/answer/AnswerEngine.tsx +385 -0
- package/src/answer/Composer.tsx +147 -0
- package/src/answer/Mark.tsx +14 -0
- package/src/answer/Models.tsx +118 -0
- package/src/answer/Rail.tsx +95 -0
- package/src/answer/Source.tsx +26 -0
- package/src/answer/Stories.tsx +27 -0
- package/src/answer/WidgetView.tsx +136 -0
- package/src/callback.html +17 -0
- package/src/icon128.png +0 -0
- package/src/icon16.png +0 -0
- package/src/icon32.png +0 -0
- package/src/icon48.png +0 -0
- package/src/manifest-firefox.json +85 -0
- package/src/manifest.json +84 -0
- package/src/newtab.css +997 -0
- package/src/newtab.html +13 -0
- package/src/onboarding.css +78 -0
- package/src/onboarding.html +45 -0
- package/src/package.json +41 -0
- package/src/popup.css +761 -0
- package/src/popup.html +405 -0
- package/src/sidebar.css +1752 -0
- package/src/sidebar.html +449 -0
- package/src/webgpu.d.ts +131 -0
- package/README.md +0 -43
- package/cli.js +0 -233
- package/content-script.js +0 -550
package/src/newtab.html
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8" />
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
|
+
<title>Hanzo</title>
|
|
7
|
+
<link rel="stylesheet" href="newtab.css" />
|
|
8
|
+
</head>
|
|
9
|
+
<body>
|
|
10
|
+
<div id="root"></div>
|
|
11
|
+
<script src="newtab.js"></script>
|
|
12
|
+
</body>
|
|
13
|
+
</html>
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
:root {
|
|
2
|
+
--bg: #0b0b0c;
|
|
3
|
+
--card: #131315;
|
|
4
|
+
--line: #26262a;
|
|
5
|
+
--text: #f4f4f5;
|
|
6
|
+
--muted: #9a9aa2;
|
|
7
|
+
--accent: #f4f4f5;
|
|
8
|
+
}
|
|
9
|
+
* { box-sizing: border-box; }
|
|
10
|
+
html, body {
|
|
11
|
+
margin: 0;
|
|
12
|
+
height: 100%;
|
|
13
|
+
background: var(--bg);
|
|
14
|
+
color: var(--text);
|
|
15
|
+
font: 14px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
|
|
16
|
+
}
|
|
17
|
+
body { display: grid; place-items: center; padding: 32px; }
|
|
18
|
+
.card {
|
|
19
|
+
width: 100%;
|
|
20
|
+
max-width: 520px;
|
|
21
|
+
background: var(--card);
|
|
22
|
+
border: 1px solid var(--line);
|
|
23
|
+
border-radius: 16px;
|
|
24
|
+
padding: 32px;
|
|
25
|
+
}
|
|
26
|
+
.brand { font-weight: 700; letter-spacing: 0.02em; opacity: 0.7; margin-bottom: 20px; }
|
|
27
|
+
h1 { font-size: 24px; margin: 0 0 8px; }
|
|
28
|
+
.lede { color: var(--muted); margin: 0 0 24px; }
|
|
29
|
+
.row {
|
|
30
|
+
display: flex;
|
|
31
|
+
align-items: flex-start;
|
|
32
|
+
gap: 12px;
|
|
33
|
+
padding: 14px 0;
|
|
34
|
+
border-top: 1px solid var(--line);
|
|
35
|
+
cursor: pointer;
|
|
36
|
+
}
|
|
37
|
+
.row input { position: absolute; opacity: 0; width: 0; height: 0; }
|
|
38
|
+
.switch {
|
|
39
|
+
flex: 0 0 auto;
|
|
40
|
+
width: 38px;
|
|
41
|
+
height: 22px;
|
|
42
|
+
border-radius: 999px;
|
|
43
|
+
background: #3a3a40;
|
|
44
|
+
position: relative;
|
|
45
|
+
transition: background 0.15s;
|
|
46
|
+
margin-top: 2px;
|
|
47
|
+
}
|
|
48
|
+
.switch::after {
|
|
49
|
+
content: "";
|
|
50
|
+
position: absolute;
|
|
51
|
+
top: 2px;
|
|
52
|
+
left: 2px;
|
|
53
|
+
width: 18px;
|
|
54
|
+
height: 18px;
|
|
55
|
+
border-radius: 50%;
|
|
56
|
+
background: #fff;
|
|
57
|
+
transition: transform 0.15s;
|
|
58
|
+
}
|
|
59
|
+
.row input:checked + .switch { background: var(--accent); }
|
|
60
|
+
.row input:checked + .switch::after { transform: translateX(16px); background: #0b0b0c; }
|
|
61
|
+
.text { display: flex; flex-direction: column; gap: 2px; }
|
|
62
|
+
.text strong { font-weight: 600; }
|
|
63
|
+
.text small { color: var(--muted); }
|
|
64
|
+
.cta {
|
|
65
|
+
width: 100%;
|
|
66
|
+
margin-top: 24px;
|
|
67
|
+
padding: 12px;
|
|
68
|
+
border: 0;
|
|
69
|
+
border-radius: 10px;
|
|
70
|
+
background: var(--accent);
|
|
71
|
+
color: #0b0b0c;
|
|
72
|
+
font-weight: 600;
|
|
73
|
+
font-size: 15px;
|
|
74
|
+
cursor: pointer;
|
|
75
|
+
}
|
|
76
|
+
.cta:active { transform: translateY(1px); }
|
|
77
|
+
.fine { color: var(--muted); font-size: 12px; text-align: center; margin: 16px 0 0; }
|
|
78
|
+
.fine a { color: var(--text); }
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8" />
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
6
|
+
<title>Welcome to Hanzo</title>
|
|
7
|
+
<link rel="stylesheet" href="onboarding.css" />
|
|
8
|
+
</head>
|
|
9
|
+
<body>
|
|
10
|
+
<main class="card">
|
|
11
|
+
<div class="brand">Hanzo</div>
|
|
12
|
+
<h1>Welcome to Hanzo AI</h1>
|
|
13
|
+
<p class="lede">
|
|
14
|
+
Search, research and browse with Hanzo's own models. Before you start,
|
|
15
|
+
choose what you'd like to share — you can change this anytime in settings
|
|
16
|
+
or on your Hanzo account.
|
|
17
|
+
</p>
|
|
18
|
+
|
|
19
|
+
<label class="row">
|
|
20
|
+
<input type="checkbox" id="ob-insights" checked />
|
|
21
|
+
<span class="switch"></span>
|
|
22
|
+
<span class="text">
|
|
23
|
+
<strong>Anonymous usage insights</strong>
|
|
24
|
+
<small>Helps us improve Hanzo. No search text, no personal data — just a random per-install id.</small>
|
|
25
|
+
</span>
|
|
26
|
+
</label>
|
|
27
|
+
|
|
28
|
+
<label class="row">
|
|
29
|
+
<input type="checkbox" id="ob-training" />
|
|
30
|
+
<span class="switch"></span>
|
|
31
|
+
<span class="text">
|
|
32
|
+
<strong>Contribute to training Hanzo's open models</strong>
|
|
33
|
+
<small>Share your own searches & answers so Hanzo's open models get better. Opt in — off unless you turn it on.</small>
|
|
34
|
+
</span>
|
|
35
|
+
</label>
|
|
36
|
+
|
|
37
|
+
<button id="ob-continue" class="cta">Get started</button>
|
|
38
|
+
<p class="fine">
|
|
39
|
+
Signed in? These choices save to your Hanzo account and stay in sync
|
|
40
|
+
everywhere. <a href="https://hanzo.ai/privacy" target="_blank" rel="noopener">Privacy</a>
|
|
41
|
+
</p>
|
|
42
|
+
</main>
|
|
43
|
+
<script src="onboarding.js"></script>
|
|
44
|
+
</body>
|
|
45
|
+
</html>
|
package/src/package.json
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@hanzo/browser-extension",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Browser extension for click-to-code navigation with MCP integration",
|
|
5
|
+
"main": "cli.js",
|
|
6
|
+
"bin": {
|
|
7
|
+
"hanzo-browser-server": "./cli.js"
|
|
8
|
+
},
|
|
9
|
+
"scripts": {
|
|
10
|
+
"start": "node cli.js"
|
|
11
|
+
},
|
|
12
|
+
"files": [
|
|
13
|
+
"cli.js",
|
|
14
|
+
"browser-extension-server.js",
|
|
15
|
+
"content-script.js",
|
|
16
|
+
"manifest.json",
|
|
17
|
+
"README.md"
|
|
18
|
+
],
|
|
19
|
+
"keywords": [
|
|
20
|
+
"mcp",
|
|
21
|
+
"browser",
|
|
22
|
+
"devtools",
|
|
23
|
+
"source-maps",
|
|
24
|
+
"react",
|
|
25
|
+
"vue",
|
|
26
|
+
"developer-tools"
|
|
27
|
+
],
|
|
28
|
+
"dependencies": {
|
|
29
|
+
"ws": "^8.18.0",
|
|
30
|
+
"commander": "^11.0.0",
|
|
31
|
+
"chalk": "^5.3.0"
|
|
32
|
+
},
|
|
33
|
+
"devDependencies": {
|
|
34
|
+
"@types/ws": "^8.5.0",
|
|
35
|
+
"typescript": "^5.0.0",
|
|
36
|
+
"esbuild": "^0.25.0"
|
|
37
|
+
},
|
|
38
|
+
"peerDependencies": {
|
|
39
|
+
"@modelcontextprotocol/sdk": "^1.0.0"
|
|
40
|
+
}
|
|
41
|
+
}
|