@hanzo/browser-extension 1.9.46 → 1.9.49
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/README.md +43 -0
- package/cli.js +233 -0
- package/content-script.js +550 -0
- package/manifest.json +57 -7
- package/package.json +33 -49
- package/dist/safari/Hanzo AI/Hanzo AI.xcodeproj/project.pbxproj +0 -1059
- package/dist/safari/Hanzo AI/Hanzo AI.xcodeproj/project.xcworkspace/contents.xcworkspacedata +0 -7
- package/dist/safari/Hanzo AI/Shared (App)/Assets.xcassets/AccentColor.colorset/Contents.json +0 -11
- package/dist/safari/Hanzo AI/Shared (App)/Assets.xcassets/AppIcon.appiconset/Contents.json +0 -98
- package/dist/safari/Hanzo AI/Shared (App)/Assets.xcassets/AppIcon.appiconset/mac-icon-128@1x.png +0 -0
- package/dist/safari/Hanzo AI/Shared (App)/Assets.xcassets/AppIcon.appiconset/mac-icon-128@2x.png +0 -0
- package/dist/safari/Hanzo AI/Shared (App)/Assets.xcassets/AppIcon.appiconset/mac-icon-16@1x.png +0 -0
- package/dist/safari/Hanzo AI/Shared (App)/Assets.xcassets/AppIcon.appiconset/mac-icon-16@2x.png +0 -0
- package/dist/safari/Hanzo AI/Shared (App)/Assets.xcassets/AppIcon.appiconset/mac-icon-256@1x.png +0 -0
- package/dist/safari/Hanzo AI/Shared (App)/Assets.xcassets/AppIcon.appiconset/mac-icon-256@2x.png +0 -0
- package/dist/safari/Hanzo AI/Shared (App)/Assets.xcassets/AppIcon.appiconset/mac-icon-32@1x.png +0 -0
- package/dist/safari/Hanzo AI/Shared (App)/Assets.xcassets/AppIcon.appiconset/mac-icon-32@2x.png +0 -0
- package/dist/safari/Hanzo AI/Shared (App)/Assets.xcassets/AppIcon.appiconset/mac-icon-512@1x.png +0 -0
- package/dist/safari/Hanzo AI/Shared (App)/Assets.xcassets/AppIcon.appiconset/mac-icon-512@2x.png +0 -0
- package/dist/safari/Hanzo AI/Shared (App)/Assets.xcassets/AppIcon.appiconset/universal-icon-1024@1x.png +0 -0
- package/dist/safari/Hanzo AI/Shared (App)/Assets.xcassets/Contents.json +0 -6
- package/dist/safari/Hanzo AI/Shared (App)/Assets.xcassets/LargeIcon.imageset/Contents.json +0 -21
- package/dist/safari/Hanzo AI/Shared (App)/Assets.xcassets/LargeIcon.imageset/icon128.png +0 -0
- package/dist/safari/Hanzo AI/Shared (App)/Resources/Base.lproj/Main.html +0 -20
- package/dist/safari/Hanzo AI/Shared (App)/Resources/Icon.png +0 -0
- package/dist/safari/Hanzo AI/Shared (App)/Resources/Script.js +0 -24
- package/dist/safari/Hanzo AI/Shared (App)/Resources/Style.css +0 -61
- package/dist/safari/Hanzo AI/Shared (App)/ViewController.swift +0 -81
- package/dist/safari/Hanzo AI/Shared (Extension)/SafariWebExtensionHandler.swift +0 -42
- package/dist/safari/Hanzo AI/iOS (App)/AppDelegate.swift +0 -24
- package/dist/safari/Hanzo AI/iOS (App)/Base.lproj/LaunchScreen.storyboard +0 -36
- package/dist/safari/Hanzo AI/iOS (App)/Base.lproj/Main.storyboard +0 -38
- package/dist/safari/Hanzo AI/iOS (App)/Info.plist +0 -27
- package/dist/safari/Hanzo AI/iOS (App)/SceneDelegate.swift +0 -18
- package/dist/safari/Hanzo AI/iOS (Extension)/Info.plist +0 -13
- package/dist/safari/Hanzo AI/macOS (App)/AppDelegate.swift +0 -21
- package/dist/safari/Hanzo AI/macOS (App)/Base.lproj/Main.storyboard +0 -124
- package/dist/safari/Hanzo AI/macOS (App)/Info.plist +0 -8
- package/dist/safari/Hanzo AI/macOS (Extension)/Info.plist +0 -13
- package/images/icon128.png +0 -0
- package/images/icon16.png +0 -0
- package/images/icon48.png +0 -0
- package/src/ai-worker.js +0 -571
- package/src/answer/AnswerEngine.tsx +0 -385
- package/src/answer/Composer.tsx +0 -147
- package/src/answer/Mark.tsx +0 -14
- package/src/answer/Models.tsx +0 -118
- package/src/answer/Rail.tsx +0 -69
- package/src/answer/Source.tsx +0 -26
- package/src/answer/Stories.tsx +0 -27
- package/src/answer/WidgetView.tsx +0 -136
- package/src/callback.html +0 -17
- 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 +0 -85
- package/src/manifest.json +0 -84
- package/src/newtab.css +0 -429
- package/src/newtab.html +0 -13
- package/src/onboarding.css +0 -78
- package/src/onboarding.html +0 -45
- package/src/package.json +0 -41
- package/src/popup.css +0 -761
- package/src/popup.html +0 -409
- package/src/popup.js +0 -196
- package/src/sidebar.css +0 -1752
- package/src/sidebar.html +0 -457
- package/src/sidebar.js +0 -885
- package/src/webgpu.d.ts +0 -131
package/src/newtab.css
DELETED
|
@@ -1,429 +0,0 @@
|
|
|
1
|
-
/* Hanzo Answer Engine — strict monochrome (brand primaryColor #FFFFFF).
|
|
2
|
-
Shared tokens mirror popup.css / sidebar.css. */
|
|
3
|
-
:root {
|
|
4
|
-
/* hanzo.chat dark palette — the exact gray scale from chat/client/src/style.css
|
|
5
|
-
(.dark). One brand, one set of tokens; the extension is no longer its own look. */
|
|
6
|
-
--bg: #000000; /* surface-primary / gray-975 */
|
|
7
|
-
--surface: #050505; /* surface-secondary / gray-950 — source & hero cards */
|
|
8
|
-
--surface-2: #0d0d0d; /* surface-primary-contrast / gray-900 — hover fills */
|
|
9
|
-
--surface-3: #171717; /* surface-tertiary / gray-850 — number pills, selected mode */
|
|
10
|
-
--surface-active: #2f2f2f;/* surface-active / gray-700 — selected chip (NOT a white lozenge) */
|
|
11
|
-
--text: #ececec; /* text-primary / gray-100 */
|
|
12
|
-
--text-2: #cdcdcd; /* text-secondary / gray-300 */
|
|
13
|
-
--text-3: #999696; /* text-secondary-alt / gray-400 */
|
|
14
|
-
--border: #171717; /* border-light / gray-850 */
|
|
15
|
-
--border-2: #212121; /* border-medium / gray-800 */
|
|
16
|
-
--glass: rgba(255, 255, 255, 0.03);
|
|
17
|
-
--glass-2: rgba(255, 255, 255, 0.06);
|
|
18
|
-
--radius: 12px;
|
|
19
|
-
--radius-sm: 8px;
|
|
20
|
-
--radius-xs: 6px;
|
|
21
|
-
--sidebar-w: 232px;
|
|
22
|
-
/* The icon-rail width is @hanzo/ui primitives/sidebar's SIDEBAR_WIDTH_ICON
|
|
23
|
-
(3rem). Kept as that value, not a local guess, so the rail here and the
|
|
24
|
-
shared primitive collapse to the same size on every surface. */
|
|
25
|
-
--rail-w: 3rem;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
* { box-sizing: border-box; }
|
|
29
|
-
|
|
30
|
-
html, body {
|
|
31
|
-
margin: 0;
|
|
32
|
-
height: 100%;
|
|
33
|
-
background: var(--bg);
|
|
34
|
-
color: var(--text);
|
|
35
|
-
font-family: 'Geist Sans', -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', sans-serif;
|
|
36
|
-
-webkit-font-smoothing: antialiased;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
a { color: inherit; text-decoration: none; }
|
|
40
|
-
|
|
41
|
-
.ae-root {
|
|
42
|
-
display: grid;
|
|
43
|
-
grid-template-columns: var(--sidebar-w) 1fr;
|
|
44
|
-
height: 100vh;
|
|
45
|
-
transition: grid-template-columns 0.18s ease;
|
|
46
|
-
}
|
|
47
|
-
/* COLLAPSED IS AN ICON RAIL, NEVER NOTHING.
|
|
48
|
-
`grid-template-columns: 0` + `display:none` erased the sidebar outright, so the
|
|
49
|
-
surface had no brand, no way back, and read as a blank page. This is the
|
|
50
|
-
`collapsible="icon"` behaviour of @hanzo/ui primitives/sidebar, and the width is
|
|
51
|
-
ITS token (SIDEBAR_WIDTH_ICON = 3rem) rather than a number picked here — so
|
|
52
|
-
swapping this rail for the shared primitive is a substitution, not a redesign. */
|
|
53
|
-
.ae-root.collapsed { grid-template-columns: var(--rail-w) 1fr; }
|
|
54
|
-
|
|
55
|
-
/* Hovering THE RAIL opens it — matched with :has() on the sidebar, never on
|
|
56
|
-
.ae-root. .ae-root is the full-viewport grid container, so `.ae-root:hover`
|
|
57
|
-
is true anywhere on the page: the sidebar would spring open while the pointer
|
|
58
|
-
sat in the answer column. Measured, not guessed.
|
|
59
|
-
Pointer-only, so a touch device is not stuck half-open; :focus-within is the
|
|
60
|
-
keyboard equivalent. */
|
|
61
|
-
@media (hover: hover) and (pointer: fine) {
|
|
62
|
-
.ae-root.collapsed:has(.ae-sidebar:hover),
|
|
63
|
-
.ae-root.collapsed:has(.ae-sidebar:focus-within) {
|
|
64
|
-
grid-template-columns: var(--sidebar-w) 1fr;
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
/* Labels follow the SIDEBAR's own state, for the same reason. */
|
|
68
|
-
.ae-root.collapsed .ae-sidebar:not(:hover):not(:focus-within) .ae-brand span,
|
|
69
|
-
.ae-root.collapsed .ae-sidebar:not(:hover):not(:focus-within) .ae-new span,
|
|
70
|
-
.ae-root.collapsed .ae-sidebar:not(:hover):not(:focus-within) .ae-nav,
|
|
71
|
-
.ae-root.collapsed .ae-sidebar:not(:hover):not(:focus-within) .ae-signin-label { display: none; }
|
|
72
|
-
|
|
73
|
-
/* ── Sidebar ─────────────────────────────────────────────── */
|
|
74
|
-
.ae-sidebar {
|
|
75
|
-
display: flex;
|
|
76
|
-
flex-direction: column;
|
|
77
|
-
gap: 6px;
|
|
78
|
-
padding: 14px 12px;
|
|
79
|
-
border-right: 1px solid var(--border);
|
|
80
|
-
background: var(--surface);
|
|
81
|
-
min-width: 0;
|
|
82
|
-
}
|
|
83
|
-
.ae-side-top { display: flex; align-items: center; justify-content: space-between; }
|
|
84
|
-
.ae-brand {
|
|
85
|
-
display: flex; align-items: center; gap: 9px;
|
|
86
|
-
background: none; border: none; color: var(--text);
|
|
87
|
-
font-size: 15px; font-weight: 600; letter-spacing: -0.01em;
|
|
88
|
-
cursor: pointer; padding: 4px; min-width: 0;
|
|
89
|
-
}
|
|
90
|
-
.ae-brand span { white-space: nowrap; overflow: hidden; }
|
|
91
|
-
.ae-collapse, .ae-new, .ae-signin {
|
|
92
|
-
cursor: pointer; font-family: inherit;
|
|
93
|
-
}
|
|
94
|
-
.ae-collapse {
|
|
95
|
-
background: none; border: none; color: var(--text-3);
|
|
96
|
-
padding: 4px; border-radius: var(--radius-xs); display: flex;
|
|
97
|
-
}
|
|
98
|
-
.ae-collapse:hover { color: var(--text); background: var(--glass); }
|
|
99
|
-
.ae-new {
|
|
100
|
-
display: flex; align-items: center; gap: 8px;
|
|
101
|
-
margin-top: 8px; padding: 9px 12px;
|
|
102
|
-
background: var(--surface-3); color: var(--text); border: 1px solid var(--border-2);
|
|
103
|
-
border-radius: var(--radius-sm); font-size: 13px; font-weight: 500;
|
|
104
|
-
white-space: nowrap; overflow: hidden;
|
|
105
|
-
}
|
|
106
|
-
.ae-new:hover { background: var(--surface-hover, #212121); border-color: var(--border-2); }
|
|
107
|
-
.ae-nav { display: flex; flex-direction: column; margin-top: 12px; gap: 1px; }
|
|
108
|
-
.ae-nav a {
|
|
109
|
-
padding: 8px 10px; border-radius: var(--radius-xs);
|
|
110
|
-
color: var(--text-2); font-size: 13px; white-space: nowrap;
|
|
111
|
-
}
|
|
112
|
-
.ae-nav a:hover { background: var(--glass); color: var(--text); }
|
|
113
|
-
.ae-side-bottom { margin-top: auto; }
|
|
114
|
-
.ae-signin {
|
|
115
|
-
width: 100%; padding: 9px 12px;
|
|
116
|
-
background: var(--glass-2); border: 1px solid var(--border);
|
|
117
|
-
color: var(--text); border-radius: var(--radius-sm);
|
|
118
|
-
font-size: 12.5px; font-weight: 500; white-space: nowrap; overflow: hidden;
|
|
119
|
-
}
|
|
120
|
-
.ae-signin:hover { border-color: var(--border-2); background: var(--surface-2); }
|
|
121
|
-
.ae-signin.big { width: auto; padding: 10px 18px; font-size: 14px; }
|
|
122
|
-
/* Icon-rail geometry. Centre the glyphs and drop the label gaps so a 3rem rail
|
|
123
|
-
holds them without clipping; the :not(:hover) rules above own visibility. */
|
|
124
|
-
.ae-root.collapsed .ae-sidebar:not(:hover):not(:focus-within) { padding: 14px 6px; align-items: center; overflow: hidden; }
|
|
125
|
-
.ae-root.collapsed .ae-sidebar:not(:hover):not(:focus-within) .ae-side-top { justify-content: center; }
|
|
126
|
-
.ae-root.collapsed .ae-sidebar:not(:hover):not(:focus-within) .ae-collapse { display: none; }
|
|
127
|
-
.ae-root.collapsed .ae-sidebar:not(:hover):not(:focus-within) .ae-brand,
|
|
128
|
-
.ae-root.collapsed .ae-sidebar:not(:hover):not(:focus-within) .ae-new,
|
|
129
|
-
.ae-root.collapsed .ae-sidebar:not(:hover):not(:focus-within) .ae-signin {
|
|
130
|
-
gap: 0; padding: 8px; justify-content: center; width: auto;
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
/* ── Main ────────────────────────────────────────────────── */
|
|
134
|
-
.ae-main { min-width: 0; overflow: hidden; display: flex; flex-direction: column; }
|
|
135
|
-
|
|
136
|
-
/* Hero (empty state) */
|
|
137
|
-
.ae-hero {
|
|
138
|
-
flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
|
|
139
|
-
gap: 26px; padding: 24px; overflow-y: auto;
|
|
140
|
-
}
|
|
141
|
-
.ae-hero-card { width: 100%; max-width: 720px; }
|
|
142
|
-
.ae-news { width: 100%; max-width: 720px; }
|
|
143
|
-
.ae-news-head, .ae-followups-head, .ae-model-group-label {
|
|
144
|
-
font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em;
|
|
145
|
-
color: var(--text-3); margin-bottom: 10px;
|
|
146
|
-
}
|
|
147
|
-
.ae-news-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
|
|
148
|
-
.ae-news-item {
|
|
149
|
-
display: flex; flex-direction: column; gap: 4px;
|
|
150
|
-
padding: 11px 13px; border: 1px solid var(--border);
|
|
151
|
-
border-radius: var(--radius-sm); background: var(--surface);
|
|
152
|
-
}
|
|
153
|
-
.ae-news-item:hover { border-color: var(--border-2); background: var(--surface-2); }
|
|
154
|
-
.ae-news-title { font-size: 13px; color: var(--text); line-height: 1.35; }
|
|
155
|
-
.ae-news-meta { font-size: 11px; color: var(--text-3); }
|
|
156
|
-
|
|
157
|
-
/* ── Input card ──────────────────────────────────────────── */
|
|
158
|
-
.ae-card {
|
|
159
|
-
background: var(--surface-2);
|
|
160
|
-
border: 1px solid var(--border-2);
|
|
161
|
-
border-radius: var(--radius);
|
|
162
|
-
box-shadow: 0 8px 40px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.02);
|
|
163
|
-
/* NOT overflow:hidden. The model picker menu is position:absolute inside this
|
|
164
|
-
card and opens UPWARD, so a clip here truncates it to the card's box: the
|
|
165
|
-
"Search models…" filter, the Auto row and the whole Enso group get cut off
|
|
166
|
-
and only the last row plus the plan banner survive — which reads as "the
|
|
167
|
-
picker is broken / Enso is missing" rather than as a clipping bug. Nothing
|
|
168
|
-
here needs clipping: .ae-input is transparent, .ae-card-row has no
|
|
169
|
-
background, and the chips/modes/send button carry their own radii and sit
|
|
170
|
-
inside the padding, so none of them paint into the rounded corners. */
|
|
171
|
-
overflow: visible;
|
|
172
|
-
}
|
|
173
|
-
.ae-input {
|
|
174
|
-
display: block; width: 100%; resize: none;
|
|
175
|
-
padding: 16px 18px 6px; min-height: 30px; max-height: 200px;
|
|
176
|
-
background: transparent; border: none; outline: none;
|
|
177
|
-
color: var(--text); font-family: inherit; font-size: 15px; line-height: 1.5;
|
|
178
|
-
}
|
|
179
|
-
.ae-input::placeholder { color: var(--text-3); }
|
|
180
|
-
/* The composer field is @hanzo/ui's Textarea (data-slot is the design system's
|
|
181
|
-
own marker). It auto-grows by line count, so the browser's manual resize
|
|
182
|
-
grip is noise inside the card. */
|
|
183
|
-
.ae-card textarea[data-slot="textarea"] { resize: none; }
|
|
184
|
-
.ae-card-row {
|
|
185
|
-
display: flex; align-items: center; justify-content: space-between;
|
|
186
|
-
gap: 8px; padding: 8px 10px 10px; flex-wrap: wrap;
|
|
187
|
-
}
|
|
188
|
-
.ae-chips { display: flex; gap: 4px; flex-wrap: wrap; }
|
|
189
|
-
.ae-chip {
|
|
190
|
-
padding: 4px 9px; border-radius: 999px; cursor: pointer;
|
|
191
|
-
background: var(--glass); border: 1px solid var(--border);
|
|
192
|
-
color: var(--text-3); font-size: 11px; font-family: inherit;
|
|
193
|
-
}
|
|
194
|
-
.ae-chip:hover { color: var(--text-2); background: var(--surface-2); }
|
|
195
|
-
/* Selected is a step UP the surface ladder, not a white lozenge (chat ModeChips). */
|
|
196
|
-
.ae-chip.on { background: var(--surface-active); color: var(--text); border-color: transparent; font-weight: 500; }
|
|
197
|
-
.ae-card-right { display: flex; align-items: center; gap: 6px; }
|
|
198
|
-
.ae-modes { display: flex; gap: 2px; background: var(--glass); border-radius: var(--radius-xs); padding: 2px; }
|
|
199
|
-
.ae-mode {
|
|
200
|
-
padding: 4px 9px; border: none; background: none; cursor: pointer;
|
|
201
|
-
color: var(--text-3); font-size: 11.5px; font-family: inherit; border-radius: 5px;
|
|
202
|
-
}
|
|
203
|
-
.ae-mode:hover { color: var(--text-2); }
|
|
204
|
-
.ae-mode.on { background: var(--surface-active); color: var(--text); font-weight: 500; }
|
|
205
|
-
.ae-send {
|
|
206
|
-
width: 34px; height: 34px; flex-shrink: 0; cursor: pointer;
|
|
207
|
-
display: flex; align-items: center; justify-content: center;
|
|
208
|
-
background: var(--text); color: #000; border: none; border-radius: 50%;
|
|
209
|
-
}
|
|
210
|
-
.ae-send:disabled { opacity: 0.4; cursor: default; }
|
|
211
|
-
|
|
212
|
-
/* ── Model picker ────────────────────────────────────────── */
|
|
213
|
-
.ae-picker { position: relative; }
|
|
214
|
-
.ae-picker-btn {
|
|
215
|
-
display: flex; align-items: center; gap: 6px; cursor: pointer;
|
|
216
|
-
padding: 6px 10px; background: var(--glass); border: 1px solid var(--border);
|
|
217
|
-
border-radius: var(--radius-xs); color: var(--text-2); font-size: 12px; font-family: inherit;
|
|
218
|
-
}
|
|
219
|
-
.ae-picker-btn:hover { color: var(--text); border-color: var(--border-2); }
|
|
220
|
-
.ae-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--text-2); }
|
|
221
|
-
.ae-picker-menu {
|
|
222
|
-
position: absolute; bottom: calc(100% + 6px); right: 0; z-index: 40;
|
|
223
|
-
width: 320px; max-height: 420px; display: flex; flex-direction: column;
|
|
224
|
-
background: var(--surface-2); border: 1px solid var(--border-2);
|
|
225
|
-
border-radius: var(--radius-sm); box-shadow: 0 12px 48px rgba(0, 0, 0, 0.6); overflow: hidden;
|
|
226
|
-
}
|
|
227
|
-
.ae-picker-filter {
|
|
228
|
-
margin: 8px; padding: 8px 10px; background: var(--bg);
|
|
229
|
-
border: 1px solid var(--border); border-radius: var(--radius-xs);
|
|
230
|
-
color: var(--text); font-family: inherit; font-size: 13px; outline: none;
|
|
231
|
-
}
|
|
232
|
-
.ae-picker-list { overflow-y: auto; padding: 0 6px 6px; }
|
|
233
|
-
.ae-model-group-label { padding: 8px 8px 4px; margin: 0; }
|
|
234
|
-
.ae-model-row {
|
|
235
|
-
display: flex; flex-direction: column; gap: 2px; width: 100%; text-align: left;
|
|
236
|
-
padding: 8px 10px; background: none; border: none; cursor: pointer;
|
|
237
|
-
border-radius: var(--radius-xs); color: var(--text); font-family: inherit;
|
|
238
|
-
}
|
|
239
|
-
.ae-model-row:hover { background: var(--glass); }
|
|
240
|
-
.ae-model-row.active { background: var(--glass-2); }
|
|
241
|
-
.ae-model-name { font-size: 13px; display: flex; align-items: center; gap: 7px; }
|
|
242
|
-
.ae-model-desc { font-size: 11px; color: var(--text-3); line-height: 1.3; }
|
|
243
|
-
.ae-badge {
|
|
244
|
-
font-size: 9px; text-transform: uppercase; letter-spacing: 0.04em;
|
|
245
|
-
padding: 1px 5px; border-radius: 4px; background: var(--glass-2); color: var(--text-2);
|
|
246
|
-
}
|
|
247
|
-
.ae-plan-banner {
|
|
248
|
-
display: flex; align-items: center; justify-content: space-between; gap: 8px;
|
|
249
|
-
padding: 10px 12px; border-top: 1px solid var(--border);
|
|
250
|
-
font-size: 11.5px; color: var(--text-2); background: var(--surface);
|
|
251
|
-
}
|
|
252
|
-
.ae-plan-tiers { display: flex; gap: 8px; }
|
|
253
|
-
.ae-plan-tier b { color: var(--text); }
|
|
254
|
-
|
|
255
|
-
/* ── Answer view ─────────────────────────────────────────── */
|
|
256
|
-
.ae-answer-wrap { flex: 1; display: flex; flex-direction: column; min-height: 0; }
|
|
257
|
-
.ae-answer-scroll { flex: 1; overflow-y: auto; padding: 32px 28px 20px; }
|
|
258
|
-
.ae-answer-scroll > * { max-width: 760px; margin-left: auto; margin-right: auto; }
|
|
259
|
-
.ae-question { font-size: 26px; font-weight: 600; letter-spacing: -0.02em; margin: 0 0 20px; }
|
|
260
|
-
.ae-sources { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 16px; margin-bottom: 8px; }
|
|
261
|
-
/* Source card — chat AnswerView: 160px, number pill first, favicon, host, 3-line title. */
|
|
262
|
-
.ae-source {
|
|
263
|
-
flex: 0 0 168px; display: flex; flex-direction: column; gap: 6px;
|
|
264
|
-
padding: 10px; border: 1px solid var(--border); border-radius: var(--radius);
|
|
265
|
-
background: var(--surface); transition: background 0.12s ease;
|
|
266
|
-
}
|
|
267
|
-
.ae-source:hover { background: var(--surface-2); }
|
|
268
|
-
.ae-source-head { display: flex; align-items: center; gap: 6px; }
|
|
269
|
-
.ae-source-head img { border-radius: 3px; flex-shrink: 0; }
|
|
270
|
-
.ae-source-host { font-size: 11px; color: var(--text-2); flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
271
|
-
.ae-source-idx {
|
|
272
|
-
flex: 0 0 auto; width: 16px; height: 16px; padding: 0; border: none;
|
|
273
|
-
display: inline-flex; align-items: center; justify-content: center;
|
|
274
|
-
font-size: 10px; font-weight: 500; color: var(--text-2);
|
|
275
|
-
background: var(--surface-3); border-radius: 50%;
|
|
276
|
-
}
|
|
277
|
-
.ae-source-title { font-size: 12px; line-height: 1.35; color: var(--text); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
|
|
278
|
-
|
|
279
|
-
.ae-status { display: flex; align-items: center; gap: 10px; color: var(--text-2); font-size: 14px; padding: 8px 0; }
|
|
280
|
-
|
|
281
|
-
.ae-answer.markdown { font-size: 15px; line-height: 1.65; color: var(--text); }
|
|
282
|
-
.markdown h2 { font-size: 20px; margin: 22px 0 10px; font-weight: 600; }
|
|
283
|
-
.markdown h3 { font-size: 17px; margin: 18px 0 8px; font-weight: 600; }
|
|
284
|
-
.markdown h4, .markdown h5 { font-size: 15px; margin: 14px 0 6px; font-weight: 600; }
|
|
285
|
-
.markdown p { margin: 0 0 12px; }
|
|
286
|
-
.markdown ul, .markdown ol { margin: 0 0 12px; padding-left: 22px; }
|
|
287
|
-
.markdown li { margin: 4px 0; }
|
|
288
|
-
.markdown a { color: var(--text); text-decoration: underline; text-decoration-color: var(--text-3); text-underline-offset: 2px; }
|
|
289
|
-
.markdown a:hover { text-decoration-color: var(--text); }
|
|
290
|
-
.markdown code { background: var(--surface-2); padding: 1px 5px; border-radius: 4px; font-size: 0.9em; font-family: 'Geist Mono', ui-monospace, monospace; }
|
|
291
|
-
|
|
292
|
-
.ae-followups { margin-top: 26px; border-top: 1px solid var(--border); padding-top: 16px; }
|
|
293
|
-
.ae-followup {
|
|
294
|
-
display: flex; align-items: center; justify-content: space-between; width: 100%;
|
|
295
|
-
padding: 12px 4px; background: none; border: none; border-bottom: 1px solid var(--border);
|
|
296
|
-
color: var(--text); font-family: inherit; font-size: 14px; text-align: left; cursor: pointer;
|
|
297
|
-
}
|
|
298
|
-
.ae-followup:hover { color: var(--text); }
|
|
299
|
-
.ae-followup:hover .ae-followup-arrow { color: var(--text); transform: translateX(2px); }
|
|
300
|
-
.ae-followup-arrow { color: var(--text-3); transition: transform 0.12s ease; }
|
|
301
|
-
|
|
302
|
-
.ae-error { color: var(--text-2); padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); }
|
|
303
|
-
.ae-auth { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; padding: 8px 0; }
|
|
304
|
-
.ae-auth p { margin: 0; color: var(--text-2); font-size: 15px; }
|
|
305
|
-
|
|
306
|
-
.ae-answer-composer { padding: 12px 28px 20px; border-top: 1px solid var(--border); background: var(--bg); }
|
|
307
|
-
.ae-answer-composer > .ae-card { max-width: 760px; margin: 0 auto; }
|
|
308
|
-
|
|
309
|
-
/* ── Spinner ─────────────────────────────────────────────── */
|
|
310
|
-
.ae-spinner {
|
|
311
|
-
width: 14px; height: 14px; border-radius: 50%; display: inline-block;
|
|
312
|
-
border: 2px solid var(--border-2); border-top-color: var(--text);
|
|
313
|
-
animation: ae-spin 0.7s linear infinite;
|
|
314
|
-
}
|
|
315
|
-
@keyframes ae-spin { to { transform: rotate(360deg); } }
|
|
316
|
-
|
|
317
|
-
@media (max-width: 720px) {
|
|
318
|
-
/* The rail SURVIVES on mobile as icons. `display:none` here used to be safe only
|
|
319
|
-
because a fixed reveal button floated above it; that button is gone (the rail
|
|
320
|
-
carries its own control now), so hiding the sidebar would leave a phone with no
|
|
321
|
-
brand, no new-thread and no sign-in at all. 3rem is 48px — it costs almost
|
|
322
|
-
nothing and keeps one layout from phone to desktop.
|
|
323
|
-
Hover-open does not apply here: the rule above is gated on (hover: hover), so a
|
|
324
|
-
touch device toggles with the button rather than sticking half-open. */
|
|
325
|
-
.ae-root, .ae-root.collapsed { grid-template-columns: var(--rail-w) 1fr; }
|
|
326
|
-
/* Hover must NOT widen the rail here. 232px out of a 390px viewport leaves the
|
|
327
|
-
answer column unreadable, and a desktop browser at a small window still
|
|
328
|
-
reports a fine pointer — so the (hover: hover) guard alone does not cover it.
|
|
329
|
-
This block is later in the file at equal specificity, so it wins. */
|
|
330
|
-
.ae-root.collapsed:has(.ae-sidebar:hover),
|
|
331
|
-
.ae-root.collapsed:has(.ae-sidebar:focus-within) {
|
|
332
|
-
grid-template-columns: var(--rail-w) 1fr;
|
|
333
|
-
}
|
|
334
|
-
/* Explicitly opened, the sidebar OVERLAYS rather than pushing: the grid keeps
|
|
335
|
-
the rail's width so the content column never shrinks. */
|
|
336
|
-
.ae-root:not(.collapsed) { grid-template-columns: var(--rail-w) 1fr; }
|
|
337
|
-
.ae-root:not(.collapsed) .ae-sidebar {
|
|
338
|
-
position: fixed; top: 0; bottom: 0; left: 0; width: var(--sidebar-w);
|
|
339
|
-
z-index: 60; box-shadow: 0 0 40px rgba(0, 0, 0, 0.6);
|
|
340
|
-
}
|
|
341
|
-
.ae-news-grid { grid-template-columns: 1fr; }
|
|
342
|
-
.ae-hero { gap: 20px; padding: 20px 16px; justify-content: flex-start; padding-top: 48px; }
|
|
343
|
-
.ae-answer-scroll { padding: 20px 16px 16px; }
|
|
344
|
-
.ae-answer-composer { padding: 10px 16px 16px; }
|
|
345
|
-
.ae-question { font-size: 21px; }
|
|
346
|
-
/* Input card: let the control row wrap so the model picker + send stay
|
|
347
|
-
reachable at narrow widths (mobile-first). */
|
|
348
|
-
.ae-card-row { flex-direction: column; align-items: stretch; gap: 10px; }
|
|
349
|
-
.ae-card-right { justify-content: space-between; }
|
|
350
|
-
.ae-modes { flex: 1; justify-content: space-between; }
|
|
351
|
-
.ae-source { flex-basis: 150px; }
|
|
352
|
-
}
|
|
353
|
-
|
|
354
|
-
/* The fallback escape hatch on the expired-session card. Quiet: it is the
|
|
355
|
-
second choice, offered so the surface is never a dead end. */
|
|
356
|
-
.ae-fallback-link {
|
|
357
|
-
display: inline-block; margin-top: 12px;
|
|
358
|
-
color: var(--text-3); font-size: 13px; text-decoration: underline;
|
|
359
|
-
text-underline-offset: 3px;
|
|
360
|
-
}
|
|
361
|
-
.ae-fallback-link:hover { color: var(--text); }
|
|
362
|
-
|
|
363
|
-
/* ── Generative result widgets ───────────────────────────── */
|
|
364
|
-
/* margin-left/right stay AUTO: .ae-answer-scroll > * centres its children at
|
|
365
|
-
760px, and a `margin: 4px 0 18px` shorthand here silently resets those to 0 —
|
|
366
|
-
the widgets then hugged the left edge while the prose beside them stayed
|
|
367
|
-
centred. Set only the block margins. */
|
|
368
|
-
.ae-widgets {
|
|
369
|
-
display: flex; flex-direction: column; gap: 14px;
|
|
370
|
-
margin-top: 4px; margin-bottom: 18px;
|
|
371
|
-
}
|
|
372
|
-
.ae-widget {
|
|
373
|
-
border: 1px solid var(--border); border-radius: var(--radius);
|
|
374
|
-
background: var(--surface); padding: 16px 18px;
|
|
375
|
-
}
|
|
376
|
-
.ae-widget-title {
|
|
377
|
-
margin: 0 0 10px; font-size: 14px; font-weight: 600;
|
|
378
|
-
color: var(--text); letter-spacing: -0.01em;
|
|
379
|
-
}
|
|
380
|
-
.ae-widget-subtitle { margin: -6px 0 12px; font-size: 13px; color: var(--text-3); }
|
|
381
|
-
|
|
382
|
-
/* A wide table scrolls INSIDE its own box; the page never scrolls sideways. */
|
|
383
|
-
.ae-widget-scroll { overflow-x: auto; }
|
|
384
|
-
.ae-widget-table { border-collapse: collapse; width: 100%; font-size: 13px; }
|
|
385
|
-
.ae-widget-table th, .ae-widget-table td {
|
|
386
|
-
text-align: left; padding: 8px 12px; border-bottom: 1px solid var(--border);
|
|
387
|
-
vertical-align: top;
|
|
388
|
-
}
|
|
389
|
-
.ae-widget-table thead th { color: var(--text-3); font-weight: 500; white-space: nowrap; }
|
|
390
|
-
.ae-widget-table tbody th { color: var(--text); font-weight: 500; }
|
|
391
|
-
.ae-widget-table td { color: var(--text-2); }
|
|
392
|
-
.ae-widget-table tr:last-child th, .ae-widget-table tr:last-child td { border-bottom: none; }
|
|
393
|
-
|
|
394
|
-
.ae-widget-steplist { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; }
|
|
395
|
-
.ae-widget-steplist li { font-size: 13.5px; line-height: 1.5; color: var(--text-2); }
|
|
396
|
-
.ae-widget-steplist li::marker { color: var(--text-3); }
|
|
397
|
-
|
|
398
|
-
.ae-widget-statgrid {
|
|
399
|
-
display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 12px;
|
|
400
|
-
}
|
|
401
|
-
.ae-widget-stat { display: flex; flex-direction: column; gap: 2px; }
|
|
402
|
-
.ae-widget-statvalue {
|
|
403
|
-
font-size: 20px; font-weight: 600; color: var(--text);
|
|
404
|
-
font-variant-numeric: tabular-nums; letter-spacing: -0.02em;
|
|
405
|
-
}
|
|
406
|
-
.ae-widget-statlabel { font-size: 12px; color: var(--text-3); }
|
|
407
|
-
|
|
408
|
-
.ae-widget-events { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
|
|
409
|
-
.ae-widget-events li { display: grid; grid-template-columns: minmax(72px, auto) 1fr; gap: 14px; }
|
|
410
|
-
.ae-widget-when { font-size: 12.5px; color: var(--text-3); font-variant-numeric: tabular-nums; }
|
|
411
|
-
.ae-widget-what { font-size: 13.5px; color: var(--text-2); line-height: 1.5; }
|
|
412
|
-
|
|
413
|
-
.ae-widget-facts { margin: 0; display: grid; grid-template-columns: minmax(96px, auto) 1fr; gap: 8px 16px; }
|
|
414
|
-
.ae-widget-facts dt { font-size: 12.5px; color: var(--text-3); }
|
|
415
|
-
.ae-widget-facts dd { margin: 0; font-size: 13.5px; color: var(--text-2); }
|
|
416
|
-
|
|
417
|
-
.ae-widget-meaning { margin: 0; font-size: 14px; line-height: 1.55; color: var(--text-2); }
|
|
418
|
-
.ae-widget-example {
|
|
419
|
-
margin: 12px 0 0; padding: 10px 12px; overflow-x: auto;
|
|
420
|
-
background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm);
|
|
421
|
-
font-size: 12.5px; color: var(--text-2); white-space: pre-wrap;
|
|
422
|
-
}
|
|
423
|
-
|
|
424
|
-
@media (max-width: 720px) {
|
|
425
|
-
.ae-widget { padding: 14px; }
|
|
426
|
-
.ae-widget-events li { grid-template-columns: 1fr; gap: 2px; }
|
|
427
|
-
.ae-widget-facts { grid-template-columns: 1fr; gap: 2px 0; }
|
|
428
|
-
.ae-widget-facts dd { margin-bottom: 8px; }
|
|
429
|
-
}
|
package/src/newtab.html
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
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>
|
package/src/onboarding.css
DELETED
|
@@ -1,78 +0,0 @@
|
|
|
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); }
|
package/src/onboarding.html
DELETED
|
@@ -1,45 +0,0 @@
|
|
|
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
DELETED
|
@@ -1,41 +0,0 @@
|
|
|
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
|
-
}
|