@hanzo/app 0.3.72 → 0.3.73
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/assets/memoji/art.svg +4 -4
- package/assets/memoji/cyber.svg +2 -2
- package/assets/memoji/des.svg +4 -4
- package/assets/memoji/doc.svg +2 -2
- package/assets/memoji/edu.svg +2 -2
- package/assets/memoji/huma.svg +2 -2
- package/assets/memoji/lang.svg +2 -2
- package/assets/memoji/mana.svg +2 -2
- package/assets/memoji/mu.svg +2 -2
- package/assets/memoji/opera.svg +2 -2
- package/assets/memoji/vi.svg +2 -2
- package/assets/memoji/vid.svg +2 -2
- package/dist/App.js +17 -25
- package/dist/Chat.js +89 -93
- package/dist/Rail.d.ts +2 -3
- package/dist/Rail.js +5 -6
- package/dist/Recents.js +5 -3
- package/dist/Shell.js +14 -16
- package/dist/Sidebar.js +9 -9
- package/dist/ToBottom.d.ts +3 -0
- package/dist/ToBottom.js +61 -0
- package/dist/ground.d.ts +7 -3
- package/dist/ground.js +7 -3
- package/package.json +1 -1
package/assets/memoji/art.svg
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256" width="256" height="256" role="img" aria-label="art">
|
|
2
2
|
<defs>
|
|
3
|
-
<linearGradient id="g-art" x1="0" y1="0" x2="1" y2="1"><stop offset="0" stop-color="#
|
|
3
|
+
<linearGradient id="g-art" x1="0" y1="0" x2="1" y2="1"><stop offset="0" stop-color="#d9d9d9"/><stop offset="1" stop-color="#787878"/></linearGradient>
|
|
4
4
|
<radialGradient id="f-art" cx=".36" cy=".3" r=".8"><stop offset="0" stop-color="#e0a27d"/><stop offset="1" stop-color="#b2744f"/></radialGradient>
|
|
5
5
|
<clipPath id="c-art"><circle cx="128" cy="128" r="128"/></clipPath>
|
|
6
6
|
</defs>
|
|
7
7
|
<g clip-path="url(#c-art)">
|
|
8
8
|
<rect width="256" height="256" fill="url(#g-art)"/>
|
|
9
9
|
<circle cx="84" cy="64" r="70" fill="#fff" opacity=".13"/>
|
|
10
|
-
<path d="M62 118 C54 190 62 214 84 222 L172 222 C194 214 202 190 194 118 Z" fill="#
|
|
10
|
+
<path d="M62 118 C54 190 62 214 84 222 L172 222 C194 214 202 190 194 118 Z" fill="#818181"/><path d="M26 256 C30 214 66 196 128 196 C190 196 226 214 230 256 Z" fill="#787878"/><path d="M26 256 C30 214 66 196 128 196 C100 214 96 240 98 256 Z" fill="#8a8a8a" opacity=".5"/><path d="M104 196 L128 226 L152 196 Z" fill="#f3f3f3"/><circle cx="182" cy="226" r="16" fill="#f8fafc"/><g transform="translate(172 216) scale(.83)" fill="none" stroke="#646464" stroke-width="2.4" stroke-linecap="round" stroke-linejoin="round"><path d="M12 3a9 9 0 100 18c1.5 0 2-1 1.5-2-.6-1.2.2-2.5 1.6-2.5H17a4 4 0 004-4c0-5-4-9.5-9-9.5z"/><circle cx="8" cy="11" r="1"/><circle cx="11" cy="7.5" r="1"/><circle cx="16" cy="8.5" r="1"/></g>
|
|
11
11
|
<rect x="110" y="168" width="36" height="36" rx="14" fill="#ad6f4a"/>
|
|
12
12
|
<ellipse cx="68" cy="128" rx="9" ry="13" fill="#bc7e59"/><ellipse cx="188" cy="128" rx="9" ry="13" fill="#bc7e59"/>
|
|
13
13
|
<ellipse cx="128" cy="120" rx="58" ry="62" fill="url(#f-art)"/>
|
|
14
|
-
<path d="M68 118 C64 66 96 46 128 46 C162 46 194 66 188 118 C182 96 164 80 140 76 C124 90 96 98 68 118 Z" fill="#
|
|
15
|
-
<g stroke="#
|
|
14
|
+
<path d="M68 118 C64 66 96 46 128 46 C162 46 194 66 188 118 C182 96 164 80 140 76 C124 90 96 98 68 118 Z" fill="#818181"/>
|
|
15
|
+
<g stroke="#898989" stroke-width="5" stroke-linecap="round" fill="none"><path d="M90 106 Q104 98 118 104"/><path d="M138 104 Q152 98 166 106"/></g>
|
|
16
16
|
<path d="M92 126 Q104 114 116 126" stroke="#1f2937" stroke-width="5" fill="none" stroke-linecap="round"/><path d="M140 126 Q152 114 164 126" stroke="#1f2937" stroke-width="5" fill="none" stroke-linecap="round"/>
|
|
17
17
|
<ellipse cx="88" cy="146" rx="11" ry="7" fill="#f87171" opacity=".28"/><ellipse cx="168" cy="146" rx="11" ry="7" fill="#f87171" opacity=".28"/>
|
|
18
18
|
<path d="M126 134 Q132 140 126 144" stroke="#935530" stroke-width="3.5" fill="none" stroke-linecap="round" opacity=".7"/>
|
package/assets/memoji/cyber.svg
CHANGED
|
@@ -11,8 +11,8 @@
|
|
|
11
11
|
<rect x="110" y="168" width="36" height="36" rx="14" fill="#ad6f4a"/>
|
|
12
12
|
<ellipse cx="68" cy="128" rx="9" ry="13" fill="#bc7e59"/><ellipse cx="188" cy="128" rx="9" ry="13" fill="#bc7e59"/>
|
|
13
13
|
<ellipse cx="128" cy="120" rx="58" ry="62" fill="url(#f-cyber)"/>
|
|
14
|
-
<path d="M68 118 C62 66 98 42 138 44 C176 46 196 72 186 118 C184 98 170 86 152 84 C126 70 92 84 68 118 Z" fill="#
|
|
15
|
-
<g stroke="#
|
|
14
|
+
<path d="M68 118 C62 66 98 42 138 44 C176 46 196 72 186 118 C184 98 170 86 152 84 C126 70 92 84 68 118 Z" fill="#808080"/><path d="M92 62 C120 44 160 48 180 74" stroke="#949494" stroke-width="5" stroke-linecap="round" fill="none"/>
|
|
15
|
+
<g stroke="#888888" stroke-width="5" stroke-linecap="round" fill="none"><path d="M90 106 Q104 98 118 104"/><path d="M138 104 Q152 98 166 106"/></g>
|
|
16
16
|
<g fill="#1f2937"><ellipse cx="104" cy="126" rx="7.5" ry="9"/><ellipse cx="152" cy="126" rx="7.5" ry="9"/></g><g fill="#fff"><circle cx="107" cy="122" r="2.8"/><circle cx="155" cy="122" r="2.8"/></g>
|
|
17
17
|
<ellipse cx="88" cy="146" rx="11" ry="7" fill="#f87171" opacity=".28"/><ellipse cx="168" cy="146" rx="11" ry="7" fill="#f87171" opacity=".28"/>
|
|
18
18
|
<path d="M126 134 Q132 140 126 144" stroke="#935530" stroke-width="3.5" fill="none" stroke-linecap="round" opacity=".7"/>
|
package/assets/memoji/des.svg
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256" width="256" height="256" role="img" aria-label="des">
|
|
2
2
|
<defs>
|
|
3
|
-
<linearGradient id="g-des" x1="0" y1="0" x2="1" y2="1"><stop offset="0" stop-color="#
|
|
3
|
+
<linearGradient id="g-des" x1="0" y1="0" x2="1" y2="1"><stop offset="0" stop-color="#d9d9d9"/><stop offset="1" stop-color="#787878"/></linearGradient>
|
|
4
4
|
<radialGradient id="f-des" cx=".36" cy=".3" r=".8"><stop offset="0" stop-color="#ffe3bf"/><stop offset="1" stop-color="#ddb591"/></radialGradient>
|
|
5
5
|
<clipPath id="c-des"><circle cx="128" cy="128" r="128"/></clipPath>
|
|
6
6
|
</defs>
|
|
7
7
|
<g clip-path="url(#c-des)">
|
|
8
8
|
<rect width="256" height="256" fill="url(#g-des)"/>
|
|
9
9
|
<circle cx="84" cy="64" r="70" fill="#fff" opacity=".13"/>
|
|
10
|
-
<circle cx="128" cy="38" r="22" fill="#
|
|
10
|
+
<circle cx="128" cy="38" r="22" fill="#3d3d3d"/><path d="M26 256 C30 214 66 196 128 196 C190 196 226 214 230 256 Z" fill="#787878"/><path d="M26 256 C30 214 66 196 128 196 C100 214 96 240 98 256 Z" fill="#8a8a8a" opacity=".5"/><path d="M104 196 L128 226 L152 196 Z" fill="#f3f3f3"/><circle cx="182" cy="226" r="16" fill="#f8fafc"/><g transform="translate(172 216) scale(.83)" fill="none" stroke="#646464" stroke-width="2.4" stroke-linecap="round" stroke-linejoin="round"><path d="M4 20l1-5L16 4l4 4L9 19z"/><path d="M14 6l4 4"/></g>
|
|
11
11
|
<rect x="110" y="168" width="36" height="36" rx="14" fill="#d8b08c"/>
|
|
12
12
|
<ellipse cx="68" cy="128" rx="9" ry="13" fill="#e7bf9b"/><ellipse cx="188" cy="128" rx="9" ry="13" fill="#e7bf9b"/>
|
|
13
13
|
<ellipse cx="128" cy="120" rx="58" ry="62" fill="url(#f-des)"/>
|
|
14
|
-
<path d="M70 114 C66 66 98 50 128 50 C158 50 190 66 186 114 C176 94 156 84 128 86 C100 84 80 94 70 114 Z" fill="#
|
|
15
|
-
<g stroke="#
|
|
14
|
+
<path d="M70 114 C66 66 98 50 128 50 C158 50 190 66 186 114 C176 94 156 84 128 86 C100 84 80 94 70 114 Z" fill="#3d3d3d"/>
|
|
15
|
+
<g stroke="#454545" stroke-width="5" stroke-linecap="round" fill="none"><path d="M90 106 Q104 98 118 104"/><path d="M138 104 Q152 98 166 106"/></g>
|
|
16
16
|
<g fill="#1f2937"><ellipse cx="104" cy="126" rx="7.5" ry="9"/><ellipse cx="152" cy="126" rx="7.5" ry="9"/></g><g fill="#fff"><circle cx="107" cy="122" r="2.8"/><circle cx="155" cy="122" r="2.8"/></g>
|
|
17
17
|
<ellipse cx="88" cy="146" rx="11" ry="7" fill="#f87171" opacity=".28"/><ellipse cx="168" cy="146" rx="11" ry="7" fill="#f87171" opacity=".28"/>
|
|
18
18
|
<path d="M126 134 Q132 140 126 144" stroke="#be9672" stroke-width="3.5" fill="none" stroke-linecap="round" opacity=".7"/>
|
package/assets/memoji/doc.svg
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256" width="256" height="256" role="img" aria-label="doc">
|
|
2
2
|
<defs>
|
|
3
|
-
<linearGradient id="g-doc" x1="0" y1="0" x2="1" y2="1"><stop offset="0" stop-color="#
|
|
3
|
+
<linearGradient id="g-doc" x1="0" y1="0" x2="1" y2="1"><stop offset="0" stop-color="#d9d9d9"/><stop offset="1" stop-color="#787878"/></linearGradient>
|
|
4
4
|
<radialGradient id="f-doc" cx=".36" cy=".3" r=".8"><stop offset="0" stop-color="#fac6a0"/><stop offset="1" stop-color="#cc9872"/></radialGradient>
|
|
5
5
|
<clipPath id="c-doc"><circle cx="128" cy="128" r="128"/></clipPath>
|
|
6
6
|
</defs>
|
|
7
7
|
<g clip-path="url(#c-doc)">
|
|
8
8
|
<rect width="256" height="256" fill="url(#g-doc)"/>
|
|
9
9
|
<circle cx="84" cy="64" r="70" fill="#fff" opacity=".13"/>
|
|
10
|
-
<path d="M60 150 C52 70 96 40 128 40 C162 40 204 70 196 150 L188 164 L68 164 Z" fill="#5a3a22"/><path d="M26 256 C30 214 66 196 128 196 C190 196 226 214 230 256 Z" fill="#
|
|
10
|
+
<path d="M60 150 C52 70 96 40 128 40 C162 40 204 70 196 150 L188 164 L68 164 Z" fill="#5a3a22"/><path d="M26 256 C30 214 66 196 128 196 C190 196 226 214 230 256 Z" fill="#787878"/><path d="M26 256 C30 214 66 196 128 196 C100 214 96 240 98 256 Z" fill="#8a8a8a" opacity=".5"/><path d="M104 196 L128 226 L152 196 Z" fill="#f3f3f3"/><circle cx="182" cy="226" r="16" fill="#f8fafc"/><g transform="translate(172 216) scale(.83)" fill="none" stroke="#646464" stroke-width="2.4" stroke-linecap="round" stroke-linejoin="round"><path d="M6 3h8l5 5v13H6z"/><path d="M14 3v5h5M9 13h7M9 17h7"/></g>
|
|
11
11
|
<rect x="110" y="168" width="36" height="36" rx="14" fill="#c7936d"/>
|
|
12
12
|
<ellipse cx="68" cy="128" rx="9" ry="13" fill="#d6a27c"/><ellipse cx="188" cy="128" rx="9" ry="13" fill="#d6a27c"/>
|
|
13
13
|
<ellipse cx="128" cy="120" rx="58" ry="62" fill="url(#f-doc)"/>
|
package/assets/memoji/edu.svg
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256" width="256" height="256" role="img" aria-label="edu">
|
|
2
2
|
<defs>
|
|
3
|
-
<linearGradient id="g-edu" x1="0" y1="0" x2="1" y2="1"><stop offset="0" stop-color="#
|
|
3
|
+
<linearGradient id="g-edu" x1="0" y1="0" x2="1" y2="1"><stop offset="0" stop-color="#d9d9d9"/><stop offset="1" stop-color="#787878"/></linearGradient>
|
|
4
4
|
<radialGradient id="f-edu" cx=".36" cy=".3" r=".8"><stop offset="0" stop-color="#ffedcd"/><stop offset="1" stop-color="#e2bf9f"/></radialGradient>
|
|
5
5
|
<clipPath id="c-edu"><circle cx="128" cy="128" r="128"/></clipPath>
|
|
6
6
|
</defs>
|
|
7
7
|
<g clip-path="url(#c-edu)">
|
|
8
8
|
<rect width="256" height="256" fill="url(#g-edu)"/>
|
|
9
9
|
<circle cx="84" cy="64" r="70" fill="#fff" opacity=".13"/>
|
|
10
|
-
<path d="M26 256 C30 214 66 196 128 196 C190 196 226 214 230 256 Z" fill="#
|
|
10
|
+
<path d="M26 256 C30 214 66 196 128 196 C190 196 226 214 230 256 Z" fill="#787878"/><path d="M26 256 C30 214 66 196 128 196 C100 214 96 240 98 256 Z" fill="#8a8a8a" opacity=".5"/><path d="M104 196 L128 226 L152 196 Z" fill="#f3f3f3"/><circle cx="182" cy="226" r="16" fill="#f8fafc"/><g transform="translate(172 216) scale(.83)" fill="none" stroke="#646464" stroke-width="2.4" stroke-linecap="round" stroke-linejoin="round"><path d="M2 9l10-5 10 5-10 5z"/><path d="M6 11.5V16c0 1.5 3 3 6 3s6-1.5 6-3v-4.5M22 9v6"/></g>
|
|
11
11
|
<rect x="110" y="168" width="36" height="36" rx="14" fill="#ddba9a"/>
|
|
12
12
|
<ellipse cx="68" cy="128" rx="9" ry="13" fill="#ecc9a9"/><ellipse cx="188" cy="128" rx="9" ry="13" fill="#ecc9a9"/>
|
|
13
13
|
<ellipse cx="128" cy="120" rx="58" ry="62" fill="url(#f-edu)"/>
|
package/assets/memoji/huma.svg
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256" width="256" height="256" role="img" aria-label="huma">
|
|
2
2
|
<defs>
|
|
3
|
-
<linearGradient id="g-huma" x1="0" y1="0" x2="1" y2="1"><stop offset="0" stop-color="#
|
|
3
|
+
<linearGradient id="g-huma" x1="0" y1="0" x2="1" y2="1"><stop offset="0" stop-color="#d0d0d0"/><stop offset="1" stop-color="#818181"/></linearGradient>
|
|
4
4
|
<radialGradient id="f-huma" cx=".36" cy=".3" r=".8"><stop offset="0" stop-color="#a77455"/><stop offset="1" stop-color="#794627"/></radialGradient>
|
|
5
5
|
<clipPath id="c-huma"><circle cx="128" cy="128" r="128"/></clipPath>
|
|
6
6
|
</defs>
|
|
7
7
|
<g clip-path="url(#c-huma)">
|
|
8
8
|
<rect width="256" height="256" fill="url(#g-huma)"/>
|
|
9
9
|
<circle cx="84" cy="64" r="70" fill="#fff" opacity=".13"/>
|
|
10
|
-
<circle cx="128" cy="38" r="22" fill="#2b2118"/><path d="M26 256 C30 214 66 196 128 196 C190 196 226 214 230 256 Z" fill="#
|
|
10
|
+
<circle cx="128" cy="38" r="22" fill="#2b2118"/><path d="M26 256 C30 214 66 196 128 196 C190 196 226 214 230 256 Z" fill="#818181"/><path d="M26 256 C30 214 66 196 128 196 C100 214 96 240 98 256 Z" fill="#939393" opacity=".5"/><path d="M104 196 L128 226 L152 196 Z" fill="#f0f0f0"/><circle cx="182" cy="226" r="16" fill="#f8fafc"/><g transform="translate(172 216) scale(.83)" fill="none" stroke="#6a6a6a" stroke-width="2.4" stroke-linecap="round" stroke-linejoin="round"><circle cx="9" cy="8" r="3"/><path d="M3 20c0-4 3-6 6-6s6 2 6 6"/><circle cx="17" cy="9" r="2.5"/><path d="M16 14c3 0 5 2 5 5"/></g>
|
|
11
11
|
<rect x="110" y="168" width="36" height="36" rx="14" fill="#744122"/>
|
|
12
12
|
<ellipse cx="68" cy="128" rx="9" ry="13" fill="#835031"/><ellipse cx="188" cy="128" rx="9" ry="13" fill="#835031"/>
|
|
13
13
|
<ellipse cx="128" cy="120" rx="58" ry="62" fill="url(#f-huma)"/>
|
package/assets/memoji/lang.svg
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256" width="256" height="256" role="img" aria-label="lang">
|
|
2
2
|
<defs>
|
|
3
|
-
<linearGradient id="g-lang" x1="0" y1="0" x2="1" y2="1"><stop offset="0" stop-color="#
|
|
3
|
+
<linearGradient id="g-lang" x1="0" y1="0" x2="1" y2="1"><stop offset="0" stop-color="#d9d9d9"/><stop offset="1" stop-color="#787878"/></linearGradient>
|
|
4
4
|
<radialGradient id="f-lang" cx=".36" cy=".3" r=".8"><stop offset="0" stop-color="#fac6a0"/><stop offset="1" stop-color="#cc9872"/></radialGradient>
|
|
5
5
|
<clipPath id="c-lang"><circle cx="128" cy="128" r="128"/></clipPath>
|
|
6
6
|
</defs>
|
|
7
7
|
<g clip-path="url(#c-lang)">
|
|
8
8
|
<rect width="256" height="256" fill="url(#g-lang)"/>
|
|
9
9
|
<circle cx="84" cy="64" r="70" fill="#fff" opacity=".13"/>
|
|
10
|
-
<path d="M170 72 C220 62 232 132 192 176 C210 130 196 100 160 94 Z" fill="#9a3412"/><circle cx="172" cy="84" r="7" fill="#c86240"/><path d="M26 256 C30 214 66 196 128 196 C190 196 226 214 230 256 Z" fill="#
|
|
10
|
+
<path d="M170 72 C220 62 232 132 192 176 C210 130 196 100 160 94 Z" fill="#9a3412"/><circle cx="172" cy="84" r="7" fill="#c86240"/><path d="M26 256 C30 214 66 196 128 196 C190 196 226 214 230 256 Z" fill="#787878"/><path d="M26 256 C30 214 66 196 128 196 C100 214 96 240 98 256 Z" fill="#8a8a8a" opacity=".5"/><path d="M104 196 L128 226 L152 196 Z" fill="#f3f3f3"/><circle cx="182" cy="226" r="16" fill="#f8fafc"/><g transform="translate(172 216) scale(.83)" fill="none" stroke="#646464" stroke-width="2.4" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="9"/><path d="M3 12h18M12 3c3 3 3 15 0 18M12 3c-3 3-3 15 0 18"/></g>
|
|
11
11
|
<rect x="110" y="168" width="36" height="36" rx="14" fill="#c7936d"/>
|
|
12
12
|
<ellipse cx="68" cy="128" rx="9" ry="13" fill="#d6a27c"/><ellipse cx="188" cy="128" rx="9" ry="13" fill="#d6a27c"/>
|
|
13
13
|
<ellipse cx="128" cy="120" rx="58" ry="62" fill="url(#f-lang)"/>
|
package/assets/memoji/mana.svg
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256" width="256" height="256" role="img" aria-label="mana">
|
|
2
2
|
<defs>
|
|
3
|
-
<linearGradient id="g-mana" x1="0" y1="0" x2="1" y2="1"><stop offset="0" stop-color="#
|
|
3
|
+
<linearGradient id="g-mana" x1="0" y1="0" x2="1" y2="1"><stop offset="0" stop-color="#d0d0d0"/><stop offset="1" stop-color="#818181"/></linearGradient>
|
|
4
4
|
<radialGradient id="f-mana" cx=".36" cy=".3" r=".8"><stop offset="0" stop-color="#ffe3bf"/><stop offset="1" stop-color="#ddb591"/></radialGradient>
|
|
5
5
|
<clipPath id="c-mana"><circle cx="128" cy="128" r="128"/></clipPath>
|
|
6
6
|
</defs>
|
|
7
7
|
<g clip-path="url(#c-mana)">
|
|
8
8
|
<rect width="256" height="256" fill="url(#g-mana)"/>
|
|
9
9
|
<circle cx="84" cy="64" r="70" fill="#fff" opacity=".13"/>
|
|
10
|
-
<path d="M60 150 C52 70 96 40 128 40 C162 40 204 70 196 150 L188 164 L68 164 Z" fill="#9a3412"/><path d="M26 256 C30 214 66 196 128 196 C190 196 226 214 230 256 Z" fill="#
|
|
10
|
+
<path d="M60 150 C52 70 96 40 128 40 C162 40 204 70 196 150 L188 164 L68 164 Z" fill="#9a3412"/><path d="M26 256 C30 214 66 196 128 196 C190 196 226 214 230 256 Z" fill="#818181"/><path d="M26 256 C30 214 66 196 128 196 C100 214 96 240 98 256 Z" fill="#939393" opacity=".5"/><path d="M104 196 L128 226 L152 196 Z" fill="#f0f0f0"/><circle cx="182" cy="226" r="16" fill="#f8fafc"/><g transform="translate(172 216) scale(.83)" fill="none" stroke="#6a6a6a" stroke-width="2.4" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="4" width="5" height="16" rx="1"/><rect x="10" y="4" width="5" height="10" rx="1"/><rect x="17" y="4" width="4" height="13" rx="1"/></g>
|
|
11
11
|
<rect x="110" y="168" width="36" height="36" rx="14" fill="#d8b08c"/>
|
|
12
12
|
<ellipse cx="68" cy="128" rx="9" ry="13" fill="#e7bf9b"/><ellipse cx="188" cy="128" rx="9" ry="13" fill="#e7bf9b"/>
|
|
13
13
|
<ellipse cx="128" cy="120" rx="58" ry="62" fill="url(#f-mana)"/>
|
package/assets/memoji/mu.svg
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256" width="256" height="256" role="img" aria-label="mu">
|
|
2
2
|
<defs>
|
|
3
|
-
<linearGradient id="g-mu" x1="0" y1="0" x2="1" y2="1"><stop offset="0" stop-color="#
|
|
3
|
+
<linearGradient id="g-mu" x1="0" y1="0" x2="1" y2="1"><stop offset="0" stop-color="#d9d9d9"/><stop offset="1" stop-color="#787878"/></linearGradient>
|
|
4
4
|
<radialGradient id="f-mu" cx=".36" cy=".3" r=".8"><stop offset="0" stop-color="#a77455"/><stop offset="1" stop-color="#794627"/></radialGradient>
|
|
5
5
|
<clipPath id="c-mu"><circle cx="128" cy="128" r="128"/></clipPath>
|
|
6
6
|
</defs>
|
|
7
7
|
<g clip-path="url(#c-mu)">
|
|
8
8
|
<rect width="256" height="256" fill="url(#g-mu)"/>
|
|
9
9
|
<circle cx="84" cy="64" r="70" fill="#fff" opacity=".13"/>
|
|
10
|
-
<path d="M72 130 C62 170 70 196 82 214" stroke="#111827" stroke-width="16" stroke-linecap="round" fill="none"/><path d="M184 130 C194 170 186 196 174 214" stroke="#111827" stroke-width="16" stroke-linecap="round" fill="none"/><path d="M66 118 C62 56 194 56 190 118" stroke="#111827" stroke-width="9" fill="none" stroke-linecap="round"/><rect x="56" y="108" width="18" height="34" rx="9" fill="#111827"/><rect x="182" y="108" width="18" height="34" rx="9" fill="#111827"/><path d="M26 256 C30 214 66 196 128 196 C190 196 226 214 230 256 Z" fill="#
|
|
10
|
+
<path d="M72 130 C62 170 70 196 82 214" stroke="#111827" stroke-width="16" stroke-linecap="round" fill="none"/><path d="M184 130 C194 170 186 196 174 214" stroke="#111827" stroke-width="16" stroke-linecap="round" fill="none"/><path d="M66 118 C62 56 194 56 190 118" stroke="#111827" stroke-width="9" fill="none" stroke-linecap="round"/><rect x="56" y="108" width="18" height="34" rx="9" fill="#111827"/><rect x="182" y="108" width="18" height="34" rx="9" fill="#111827"/><path d="M26 256 C30 214 66 196 128 196 C190 196 226 214 230 256 Z" fill="#787878"/><path d="M26 256 C30 214 66 196 128 196 C100 214 96 240 98 256 Z" fill="#8a8a8a" opacity=".5"/><path d="M104 196 L128 226 L152 196 Z" fill="#f3f3f3"/><circle cx="182" cy="226" r="16" fill="#f8fafc"/><g transform="translate(172 216) scale(.83)" fill="none" stroke="#646464" stroke-width="2.4" stroke-linecap="round" stroke-linejoin="round"><path d="M9 18V5l11-2v13"/><circle cx="6.5" cy="18" r="2.5"/><circle cx="17.5" cy="16" r="2.5"/></g>
|
|
11
11
|
<rect x="110" y="168" width="36" height="36" rx="14" fill="#744122"/>
|
|
12
12
|
<ellipse cx="68" cy="128" rx="9" ry="13" fill="#835031"/><ellipse cx="188" cy="128" rx="9" ry="13" fill="#835031"/>
|
|
13
13
|
<ellipse cx="128" cy="120" rx="58" ry="62" fill="url(#f-mu)"/>
|
package/assets/memoji/opera.svg
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256" width="256" height="256" role="img" aria-label="opera">
|
|
2
2
|
<defs>
|
|
3
|
-
<linearGradient id="g-opera" x1="0" y1="0" x2="1" y2="1"><stop offset="0" stop-color="#
|
|
3
|
+
<linearGradient id="g-opera" x1="0" y1="0" x2="1" y2="1"><stop offset="0" stop-color="#d0d0d0"/><stop offset="1" stop-color="#818181"/></linearGradient>
|
|
4
4
|
<radialGradient id="f-opera" cx=".36" cy=".3" r=".8"><stop offset="0" stop-color="#c38b65"/><stop offset="1" stop-color="#955d37"/></radialGradient>
|
|
5
5
|
<clipPath id="c-opera"><circle cx="128" cy="128" r="128"/></clipPath>
|
|
6
6
|
</defs>
|
|
7
7
|
<g clip-path="url(#c-opera)">
|
|
8
8
|
<rect width="256" height="256" fill="url(#g-opera)"/>
|
|
9
9
|
<circle cx="84" cy="64" r="70" fill="#fff" opacity=".13"/>
|
|
10
|
-
<path d="M72 130 C62 170 70 196 82 214" stroke="#111827" stroke-width="16" stroke-linecap="round" fill="none"/><path d="M184 130 C194 170 186 196 174 214" stroke="#111827" stroke-width="16" stroke-linecap="round" fill="none"/><path d="M26 256 C30 214 66 196 128 196 C190 196 226 214 230 256 Z" fill="#
|
|
10
|
+
<path d="M72 130 C62 170 70 196 82 214" stroke="#111827" stroke-width="16" stroke-linecap="round" fill="none"/><path d="M184 130 C194 170 186 196 174 214" stroke="#111827" stroke-width="16" stroke-linecap="round" fill="none"/><path d="M26 256 C30 214 66 196 128 196 C190 196 226 214 230 256 Z" fill="#818181"/><path d="M26 256 C30 214 66 196 128 196 C100 214 96 240 98 256 Z" fill="#939393" opacity=".5"/><path d="M104 196 L128 226 L152 196 Z" fill="#f0f0f0"/><circle cx="182" cy="226" r="16" fill="#f8fafc"/><g transform="translate(172 216) scale(.83)" fill="none" stroke="#6a6a6a" stroke-width="2.4" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="3.2"/><path d="M12 3v3M12 18v3M3 12h3M18 12h3M5.6 5.6l2.1 2.1M16.3 16.3l2.1 2.1M18.4 5.6l-2.1 2.1M7.7 16.3l-2.1 2.1"/></g>
|
|
11
11
|
<rect x="110" y="168" width="36" height="36" rx="14" fill="#905832"/>
|
|
12
12
|
<ellipse cx="68" cy="128" rx="9" ry="13" fill="#9f6741"/><ellipse cx="188" cy="128" rx="9" ry="13" fill="#9f6741"/>
|
|
13
13
|
<ellipse cx="128" cy="120" rx="58" ry="62" fill="url(#f-opera)"/>
|
package/assets/memoji/vi.svg
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256" width="256" height="256" role="img" aria-label="vi">
|
|
2
2
|
<defs>
|
|
3
|
-
<linearGradient id="g-vi" x1="0" y1="0" x2="1" y2="1"><stop offset="0" stop-color="#
|
|
3
|
+
<linearGradient id="g-vi" x1="0" y1="0" x2="1" y2="1"><stop offset="0" stop-color="#d0d0d0"/><stop offset="1" stop-color="#818181"/></linearGradient>
|
|
4
4
|
<radialGradient id="f-vi" cx=".36" cy=".3" r=".8"><stop offset="0" stop-color="#e0a27d"/><stop offset="1" stop-color="#b2744f"/></radialGradient>
|
|
5
5
|
<clipPath id="c-vi"><circle cx="128" cy="128" r="128"/></clipPath>
|
|
6
6
|
</defs>
|
|
7
7
|
<g clip-path="url(#c-vi)">
|
|
8
8
|
<rect width="256" height="256" fill="url(#g-vi)"/>
|
|
9
9
|
<circle cx="84" cy="64" r="70" fill="#fff" opacity=".13"/>
|
|
10
|
-
<path d="M26 256 C30 214 66 196 128 196 C190 196 226 214 230 256 Z" fill="#
|
|
10
|
+
<path d="M26 256 C30 214 66 196 128 196 C190 196 226 214 230 256 Z" fill="#818181"/><path d="M26 256 C30 214 66 196 128 196 C100 214 96 240 98 256 Z" fill="#939393" opacity=".5"/><path d="M104 196 L128 226 L152 196 Z" fill="#f0f0f0"/><path d="M120 214 L136 214 L142 252 L128 262 L114 252 Z" fill="#ef4444"/><path d="M120 206 L136 206 L132 216 L124 216 Z" fill="#dc2626"/><circle cx="182" cy="226" r="16" fill="#f8fafc"/><g transform="translate(172 216) scale(.83)" fill="none" stroke="#6a6a6a" stroke-width="2.4" stroke-linecap="round" stroke-linejoin="round"><path d="M12 3l2 7 7 2-7 2-2 7-2-7-7-2 7-2z"/></g>
|
|
11
11
|
<rect x="110" y="168" width="36" height="36" rx="14" fill="#ad6f4a"/>
|
|
12
12
|
<ellipse cx="68" cy="128" rx="9" ry="13" fill="#bc7e59"/><ellipse cx="188" cy="128" rx="9" ry="13" fill="#bc7e59"/>
|
|
13
13
|
<ellipse cx="128" cy="120" rx="58" ry="62" fill="url(#f-vi)"/>
|
package/assets/memoji/vid.svg
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256" width="256" height="256" role="img" aria-label="vid">
|
|
2
2
|
<defs>
|
|
3
|
-
<linearGradient id="g-vid" x1="0" y1="0" x2="1" y2="1"><stop offset="0" stop-color="#
|
|
3
|
+
<linearGradient id="g-vid" x1="0" y1="0" x2="1" y2="1"><stop offset="0" stop-color="#d9d9d9"/><stop offset="1" stop-color="#787878"/></linearGradient>
|
|
4
4
|
<radialGradient id="f-vid" cx=".36" cy=".3" r=".8"><stop offset="0" stop-color="#c38b65"/><stop offset="1" stop-color="#955d37"/></radialGradient>
|
|
5
5
|
<clipPath id="c-vid"><circle cx="128" cy="128" r="128"/></clipPath>
|
|
6
6
|
</defs>
|
|
7
7
|
<g clip-path="url(#c-vid)">
|
|
8
8
|
<rect width="256" height="256" fill="url(#g-vid)"/>
|
|
9
9
|
<circle cx="84" cy="64" r="70" fill="#fff" opacity=".13"/>
|
|
10
|
-
<path d="M66 118 C62 56 194 56 190 118" stroke="#111827" stroke-width="9" fill="none" stroke-linecap="round"/><rect x="56" y="108" width="18" height="34" rx="9" fill="#111827"/><rect x="182" y="108" width="18" height="34" rx="9" fill="#111827"/><path d="M26 256 C30 214 66 196 128 196 C190 196 226 214 230 256 Z" fill="#
|
|
10
|
+
<path d="M66 118 C62 56 194 56 190 118" stroke="#111827" stroke-width="9" fill="none" stroke-linecap="round"/><rect x="56" y="108" width="18" height="34" rx="9" fill="#111827"/><rect x="182" y="108" width="18" height="34" rx="9" fill="#111827"/><path d="M26 256 C30 214 66 196 128 196 C190 196 226 214 230 256 Z" fill="#787878"/><path d="M26 256 C30 214 66 196 128 196 C100 214 96 240 98 256 Z" fill="#8a8a8a" opacity=".5"/><path d="M104 196 L128 226 L152 196 Z" fill="#f3f3f3"/><circle cx="182" cy="226" r="16" fill="#f8fafc"/><g transform="translate(172 216) scale(.83)" fill="none" stroke="#646464" stroke-width="2.4" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="6" width="13" height="12" rx="2"/><path d="M16 10l5-3v10l-5-3z"/></g>
|
|
11
11
|
<rect x="110" y="168" width="36" height="36" rx="14" fill="#905832"/>
|
|
12
12
|
<ellipse cx="68" cy="128" rx="9" ry="13" fill="#9f6741"/><ellipse cx="188" cy="128" rx="9" ry="13" fill="#9f6741"/>
|
|
13
13
|
<ellipse cx="128" cy="120" rx="58" ry="62" fill="url(#f-vid)"/>
|
package/dist/App.js
CHANGED
|
@@ -77,13 +77,13 @@ import { isPlans, leave, useDevHost } from './dev.js';
|
|
|
77
77
|
import { Gate } from './Gate.js';
|
|
78
78
|
import { useHost } from './host.js';
|
|
79
79
|
import { useKept } from './kept.js';
|
|
80
|
-
import { Mark,
|
|
80
|
+
import { Mark, raised, Rail, Toggle } from './Rail.js';
|
|
81
81
|
import { Layer, Lift, useDrawer } from './Drawer.js';
|
|
82
82
|
import { empty, openThread, showSettings, useOpen } from './open.js';
|
|
83
83
|
import { Split } from './Shell.js';
|
|
84
84
|
import { Search } from './Search.js';
|
|
85
85
|
import { summons } from './seek.js';
|
|
86
|
-
import { floor, pane, SIDE } from './ground.js';
|
|
86
|
+
import { BAR, floor, pane, RAIL, SIDE } from './ground.js';
|
|
87
87
|
import { org as currentOrg, pick } from './lib/session.js';
|
|
88
88
|
import { payUrl } from './lib/pay.js';
|
|
89
89
|
import { useFree } from './Upgrade.js';
|
|
@@ -112,8 +112,6 @@ const Hosted = lazy(() => import('./Hosted.js').then((m) => ({ default: m.Hosted
|
|
|
112
112
|
const Betas = lazy(() => import('./Betas.js').then((m) => ({ default: m.BetasPane })));
|
|
113
113
|
/** `/` is Chat on a new conversation. */
|
|
114
114
|
const HOME = { mode: 'chat', thread: null };
|
|
115
|
-
/** The bar's height, px: a thin top bar on the ground. */
|
|
116
|
-
const BAR = 38;
|
|
117
115
|
/** Where each mode was last, so the rail goes back to it. */
|
|
118
116
|
const last = { chat: '', dev: '', studio: '', design: '', flow: '', tabs: '' };
|
|
119
117
|
/** Whether a key press is the reader typing, where the app's keys are the field's. */
|
|
@@ -332,9 +330,9 @@ function Window({ bar, betas }) {
|
|
|
332
330
|
shut();
|
|
333
331
|
setFinding(true);
|
|
334
332
|
};
|
|
335
|
-
return (_jsx(AiProvider, { client: client ?? undefined, children: _jsx(HostProvider, { host: host, children: _jsx(PrefsProvider, { children: _jsx(UsageProvider, { children: _jsxs(YStack, { ref: windowRef, "data-slot": "window", ...floor, flex: 1, minW: 0, height: bar ? '100%' : '100dvh', overflow: "hidden", rounded: bar ? '$3' : undefined, "$max-md": { position: 'fixed', t: TOP, l: 0, r: 0, height: HEIGHT, ...{ overflow: 'clip' } }, children: [_jsxs(XStack, { "data-slot": "title-bar", height: BAR, shrink: 0, items: "center", "$max-md": bar ? undefined : { display: 'none' }, onMouseDown: bar ? dragWindow : undefined, onDoubleClick: bar ? toggleWindowMaximize : undefined, ...(bar?.drag ?? null), children: [_jsxs(XStack, { "data-slot": "title-bar-start", height: "100%", items: "center", gap: 2, pl: bar?.inset
|
|
333
|
+
return (_jsx(AiProvider, { client: client ?? undefined, children: _jsx(HostProvider, { host: host, children: _jsx(PrefsProvider, { children: _jsx(UsageProvider, { children: _jsxs(YStack, { ref: windowRef, "data-slot": "window", ...floor, flex: 1, minW: 0, height: bar ? '100%' : '100dvh', overflow: "hidden", rounded: bar ? '$3' : undefined, "$max-md": { position: 'fixed', t: TOP, l: 0, r: 0, height: HEIGHT, ...{ overflow: 'clip' } }, children: [_jsxs(XStack, { "data-slot": "title-bar", height: BAR, shrink: 0, items: "center", "$max-md": bar ? undefined : { display: 'none' }, onMouseDown: bar ? dragWindow : undefined, onDoubleClick: bar ? toggleWindowMaximize : undefined, ...(bar?.drag ?? null), children: [_jsxs(XStack, { "data-slot": "title-bar-start", height: "100%", items: "center", gap: 2, pl: (bar?.inset ?? 0) + 8, pr: 8, shrink: 0, width: closed ? RAIL : `calc(${RAIL}px + var(--app-sidebar-span, ${SIDE}px))`, ...(bar?.drag ?? null), children: [_jsx(XStack, { $md: { display: 'none' }, children: _jsx(Toggle, { open: drawer.state === 'open', onPress: drawer.open, label: t('Open sidebar') }) }), _jsx(Mark, { label: t('Back'), "data-slot": "back", onPress: () => router.back(), children: _jsx(ArrowLeft, { size: 15, "aria-hidden": true, "data-i18n-mirror": true }) }), _jsx(Mark, { label: t('Forward'), "data-slot": "forward", onPress: () => router.forward(), children: _jsx(ArrowRight, { size: 15, "aria-hidden": true, "data-i18n-mirror": true }) }), _jsx(XStack, { "$max-md": { display: 'none' }, children: _jsx(Toggle, { open: !closed, onPress: flip }) })] }), _jsxs(XStack, { id: "hanzo-titlebar-slot", "data-slot": "title-bar-main", flex: 1, minW: 0, self: "stretch", items: "center", justify: "space-between", pl: 14, pr: 10, gap: 6, ...(bar?.drag ?? null), children: [_jsx(XStack, { "data-slot": "titlebar-fallback", flex: 1, minW: 0, items: "center", justify: "space-between", gap: 8, children: _jsx(Text, { fontSize: 13, lineHeight: 18, fontWeight: "500", color: "$ink", numberOfLines: 1, children: mode === 'chat' ? '' : mode === 'dev' ? 'Dev' : mode === 'studio' ? 'Studio' : mode === 'design' ? 'Design' : mode === 'flow' ? 'Flow' : mode === 'tabs' ? 'Tabs' : '' }) }), bar ? (bar.controls !== undefined ? (bar.controls) : !bar.inset ? (_jsx(WindowControls, {})) : null) : null] })] }), _jsxs(XStack, { ref: drawer.pane, "data-app": mode, "data-slot": "frame", bg: "transparent", ...drawer.slide, flex: 1, minW: 0, minH: 0, paddingInlineEnd: "var(--pane-gap)", pb: "var(--pane-gap)",
|
|
336
334
|
// The gap above the pane is the gap at its end and foot; a window's own bar above it is that gap.
|
|
337
|
-
pt: bar ? 0 : 'var(--pane-gap)',
|
|
335
|
+
pt: bar ? 0 : 'var(--pane-gap)', "$max-md": { p: 0 }, children: [drawer.slide ? _jsx(Lift, {}) : null, _jsxs(YStack, { height: "100%", position: "relative", "$max-md": { display: 'none' }, children: [_jsx(Rail, { host: host, mode: mode, at: where, inside: inside, open: !closed, onChat: toChat, onDev: toDev, onDesign: toDesign, onStudio: toStudio, onTabs: toTabs, go: move, onOrg: org }), closed ? (_jsx(YStack, { "data-slot": "sidebar-reopen-edge", position: "absolute", t: 0, b: 0, r: -4, width: 8, z: 20, cursor: "ew-resize", onDoubleClick: () => setClosed(false), onMouseDown: (down) => {
|
|
338
336
|
const e = down;
|
|
339
337
|
const startX = e.clientX ?? 0;
|
|
340
338
|
const onMove = (mv) => {
|
|
@@ -350,25 +348,19 @@ function Window({ bar, betas }) {
|
|
|
350
348
|
};
|
|
351
349
|
window.addEventListener('mousemove', onMove);
|
|
352
350
|
window.addEventListener('mouseup', onUp);
|
|
353
|
-
} })) : null] }),
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
flex: 1, minW: 0, minH: 0, "$max-md": { pb: `max(var(--pane-gap), ${FOOT})` }, children: [bar ? null : _jsx(Bar, { host: host, mode: mode, places: sidebar, open: drawer.state !== 'shut', go: move, onMenu: drawer.open }), _jsx(XStack, { "data-slot": "panes", flex: 1, display: "grid", gridTemplateAreas: '"pane side"', gridTemplateColumns: "minmax(0, 1fr) auto", gridTemplateRows: "minmax(0, 1fr)", minW: 0, minH: 0, children: anonSettings && host.person === null ? (_jsx(YStack, { render: "main", "data-slot": "pane", ...pane(), overflow: "hidden", flex: 1, minW: 0, minH: 0, $md: { rounded: 0 }, children: _jsx(AnonSettingsPane, { host: host, onClose: () => {
|
|
367
|
-
setAnonSettings(false);
|
|
368
|
-
if (typeof window !== 'undefined') {
|
|
369
|
-
window.dispatchEvent(new CustomEvent('hanzo:anon-settings', { detail: { open: false } }));
|
|
370
|
-
}
|
|
371
|
-
} }) })) : mode === 'chat' ? (_jsx(Split, { framed: true, children: _jsx(Chat, {}) })) : mode === 'tabs' ? (_jsx(YStack, { render: "main", "data-slot": "pane", ...pane(), overflow: "hidden", flex: 1, minW: 0, minH: 0, $md: { rounded: 0 }, children: _jsx(Suspense, { fallback: null, children: _jsx(Terminals, {}) }) })) : mode === 'design' ? (_jsx(YStack, { render: "main", "data-slot": "pane", ...pane(), overflow: "hidden", flex: 1, minW: 0, minH: 0, $md: { rounded: 0 }, children: _jsx(YStack, { flex: 1, minH: 0, height: "100%", children: _jsx(Suspense, { fallback: null, children: _jsx(Studio, { host: maker, rail: false }) }) }) })) : mode === 'flow' ? (_jsx(YStack, { render: "main", "data-slot": "pane", ...pane(), overflow: "hidden", flex: 1, minW: 0, minH: 0, $md: { rounded: 0 }, children: blockedBeta ? (_jsx(YStack, { "data-slot": "hosted-request", flex: 1, minH: 0, items: "center", justify: "center", p: "$6", children: _jsxs(YStack, { width: "100%", maxW: 440, gap: "$4", children: [_jsxs(XStack, { items: "center", gap: "$3", children: [_jsx(XStack, { width: 44, height: 44, rounded: "$4", bg: "$hover", items: "center", justify: "center", shrink: 0, children: _jsx(Workflow, { size: 22, "aria-hidden": true }) }), _jsxs(YStack, { gap: 2, minW: 0, children: [_jsxs(XStack, { items: "center", gap: "$2", children: [_jsx(Text, { fontSize: "$6", fontWeight: "600", color: "$ink", children: "Flow" }), _jsx(Text, { fontSize: "$1", color: "$quiet", px: "$2", py: 2, rounded: "$2", bg: "$hover", children: t('Beta') })] }), _jsx(Text, { fontSize: "$3", color: "$quiet", children: BETAS.find((b) => b.id === 'flow')?.line ?? 'Visual workflows and multi-agent pipelines.' })] })] }), _jsxs(XStack, { items: "center", gap: "$2", pt: "$1", children: [_jsx(Ask, { beta: BETAS.find((b) => b.id === 'flow'), go: move }), _jsx(Button, { variant: "ghost", size: "sm", onPress: () => move('/beta'), children: t('All betas') })] })] }) })) : (_jsx(YStack, { flex: 1, minH: 0, height: "100%", children: _jsx(Suspense, { fallback: null, children: _jsx(FlowStudio, { host: maker }) }) })) })) : mode === 'studio' ? (_jsx(YStack, { render: "main", "data-slot": "pane", ...pane(), overflow: "hidden", flex: 1, minW: 0, minH: 0, $md: { rounded: 0 }, children: blockedBeta ? (_jsx(YStack, { "data-slot": "hosted-request", flex: 1, minH: 0, items: "center", justify: "center", p: "$6", children: _jsxs(YStack, { width: "100%", maxW: 440, gap: "$4", children: [_jsxs(XStack, { items: "center", gap: "$3", children: [_jsx(XStack, { width: 44, height: 44, rounded: "$4", bg: "$hover", items: "center", justify: "center", shrink: 0, children: _jsx(Clapperboard, { size: 22, "aria-hidden": true }) }), _jsxs(YStack, { gap: 2, minW: 0, children: [_jsxs(XStack, { items: "center", gap: "$2", children: [_jsx(Text, { fontSize: "$6", fontWeight: "600", color: "$ink", children: "Studio" }), _jsx(Text, { fontSize: "$1", color: "$quiet", px: "$2", py: 2, rounded: "$2", bg: "$hover", children: t('Beta') })] }), _jsx(Text, { fontSize: "$3", color: "$quiet", children: BETAS.find((b) => b.id === 'studio')?.line ?? 'Director Studio for AI film, video, and creative production.' })] })] }), _jsxs(XStack, { items: "center", gap: "$2", pt: "$1", children: [_jsx(Ask, { beta: BETAS.find((b) => b.id === 'studio'), go: move }), _jsx(Button, { variant: "ghost", size: "sm", onPress: () => move('/beta'), children: t('All betas') })] })] }) })) : (_jsx(YStack, { flex: 1, minH: 0, height: "100%", children: _jsx(Suspense, { fallback: null, children: _jsx(DirectorStudio, { host: maker }) }) })) })) : at.mode === 'hosted' ? (_jsx(YStack, { render: "main", "data-slot": "pane", ...pane(), overflow: "hidden", flex: 1, minW: 0, minH: 0, $md: { rounded: 0 }, children: _jsx(Suspense, { fallback: null, children: _jsx(Hosted, { id: at.id, go: move }) }) })) : mode === 'beta' ? (_jsx(YStack, { render: "main", "data-slot": "pane", ...pane(), overflowY: "auto", overflowX: "hidden", flex: 1, minW: 0, minH: 0, p: "$4", $md: { p: '$6', rounded: 0 }, children: betas ?? (_jsx(Suspense, { fallback: null, children: _jsx(Betas, { go: move }) })) })) : (_jsxs(YStack, { render: "main", "data-slot": "pane", ...(run ? null : { ...pane(), overflow: 'hidden', $md: { rounded: 0 } }), position: "relative", flex: 1, minW: 0, minH: 0, children: [!plans && !run && !inPlace && closed && free && host.person !== null ? (_jsx(XStack, { position: "absolute", t: 8, r: 12, z: 5, items: "center", "$max-md": { display: 'none' }, children: _jsxs(XStack, { render: "button", "data-slot": "header-upgrade", "aria-label": t('Upgrade plan'), items: "center", gap: "$1.5", px: "$2", py: "$1", rounded: "$3", bg: "transparent", cursor: "pointer", hoverStyle: { bg: '$hover' }, onPress: () => window.location.assign(payUrl('/cart', { org: currentOrg(), returnUrl: window.location.href })), children: [_jsx(Sparkles, { size: 14, color: "var(--muted-foreground)", "aria-hidden": true }), _jsx(Text, { fontSize: 15, lineHeight: 20, fontWeight: "500", color: "$soft", numberOfLines: 1, children: t('Upgrade plan') })] }) })) : null, plans ? null : _jsx(Builder, { host: host, rail: false })] })) })] })] })] }), drawer.state === 'shut' ? null : (_jsx(Layer, { drawer: drawer, top: bar ? BAR : 0, children: _jsxs(XStack, { flex: 1, minH: 0, children: [_jsx(YStack, { "data-slot": "drawer-rail", shrink: 0, pt: "calc(var(--pane-gap) + 4px)", $touchable: { pt: 'calc(var(--pane-gap) + 4px)' }, children: _jsx(Rail, { host: host, mode: mode, at: where, inside: inside, open: true, onChat: toChat, onDev: toDev, onDesign: toDesign, onStudio: toStudio, onTabs: toTabs, go: move, onOrg: org }) }), _jsx(YStack, { flex: 1, minW: 0, children: _jsx(Sidebar, { host: host, mode: mode, thread: thread, go: move, onShut: shut, onSeek: seek, onBack: back, drawer: true, places: sidebar }) })] }) })), finding ? _jsx(Search, { go: move, onClose: found, mode: mode, host: host }) : null, learning ? _jsx(Learning, { open: true, onClose: () => setLearning(false) }) : null, _jsx(AppContextMenu, { host: host, mode: mode, closed: closed, onToggleSidebar: flip, onSeek: seek, onNewChat: () => {
|
|
351
|
+
} })) : null] }), closed || alone ? null : (_jsx(YStack, { "$max-md": { display: 'none' }, children: _jsx(Sidebar, { host: host, mode: mode, thread: thread, go: move, onShut: () => setClosed(true), onSeek: seek, onBack: back, places: sidebar }) })), _jsxs(YStack, { "data-slot": "stage",
|
|
352
|
+
// A column: the phone's bar, then the panes taking the rest. Not a grid of `auto` and
|
|
353
|
+
// `1fr` rows: from md the bar is display none, which leaves the grid, so the panes were
|
|
354
|
+
// placed in the `auto` row and stood their content's height, and Dev's pane, which
|
|
355
|
+
// scrolls inside, collapsed to its border (Projects drew blank). The rest of the row
|
|
356
|
+
// beside the rail and the sidebar, never width 100%: a View does not shrink, so at the
|
|
357
|
+
// row's full width again the pane stood past the window's edge.
|
|
358
|
+
flex: 1, minW: 0, minH: 0, marginInlineStart: closed || alone ? 0 : 'var(--pane-gap)', "$max-md": { marginInlineStart: 0, pb: `max(var(--pane-gap), ${FOOT})` }, children: [bar ? null : _jsx(Bar, { host: host, mode: mode, places: sidebar, open: drawer.state !== 'shut', go: move, onMenu: drawer.open }), _jsx(XStack, { "data-slot": "panes", flex: 1, display: "grid", gridTemplateAreas: '"pane side"', gridTemplateColumns: "minmax(0, 1fr) auto", gridTemplateRows: "minmax(0, 1fr)", minW: 0, minH: 0, children: anonSettings && host.person === null ? (_jsx(YStack, { render: "main", "data-slot": "pane", ...pane(), overflow: "hidden", flex: 1, minW: 0, minH: 0, children: _jsx(AnonSettingsPane, { host: host, onClose: () => {
|
|
359
|
+
setAnonSettings(false);
|
|
360
|
+
if (typeof window !== 'undefined') {
|
|
361
|
+
window.dispatchEvent(new CustomEvent('hanzo:anon-settings', { detail: { open: false } }));
|
|
362
|
+
}
|
|
363
|
+
} }) })) : mode === 'chat' ? (_jsx(Split, { framed: true, children: _jsx(Chat, {}) })) : mode === 'tabs' ? (_jsx(YStack, { render: "main", "data-slot": "pane", ...pane(), overflow: "hidden", flex: 1, minW: 0, minH: 0, children: _jsx(Suspense, { fallback: null, children: _jsx(Terminals, {}) }) })) : mode === 'design' ? (_jsx(YStack, { render: "main", "data-slot": "pane", ...pane(), overflow: "hidden", flex: 1, minW: 0, minH: 0, children: _jsx(YStack, { flex: 1, minH: 0, height: "100%", children: _jsx(Suspense, { fallback: null, children: _jsx(Studio, { host: maker, rail: false }) }) }) })) : mode === 'flow' ? (_jsx(YStack, { render: "main", "data-slot": "pane", ...pane(), overflow: "hidden", flex: 1, minW: 0, minH: 0, children: blockedBeta ? (_jsx(YStack, { "data-slot": "hosted-request", flex: 1, minH: 0, items: "center", justify: "center", p: "$6", children: _jsxs(YStack, { width: "100%", maxW: 440, gap: "$4", children: [_jsxs(XStack, { items: "center", gap: "$3", children: [_jsx(XStack, { width: 44, height: 44, rounded: "$4", bg: "$hover", items: "center", justify: "center", shrink: 0, children: _jsx(Workflow, { size: 22, "aria-hidden": true }) }), _jsxs(YStack, { gap: 2, minW: 0, children: [_jsxs(XStack, { items: "center", gap: "$2", children: [_jsx(Text, { fontSize: "$6", fontWeight: "600", color: "$ink", children: "Flow" }), _jsx(Text, { fontSize: "$1", color: "$quiet", px: "$2", py: 2, rounded: "$2", bg: "$hover", children: t('Beta') })] }), _jsx(Text, { fontSize: "$3", color: "$quiet", children: BETAS.find((b) => b.id === 'flow')?.line ?? 'Visual workflows and multi-agent pipelines.' })] })] }), _jsxs(XStack, { items: "center", gap: "$2", pt: "$1", children: [_jsx(Ask, { beta: BETAS.find((b) => b.id === 'flow'), go: move }), _jsx(Button, { variant: "ghost", size: "sm", onPress: () => move('/beta'), children: t('All betas') })] })] }) })) : (_jsx(YStack, { flex: 1, minH: 0, height: "100%", children: _jsx(Suspense, { fallback: null, children: _jsx(FlowStudio, { host: maker }) }) })) })) : mode === 'studio' ? (_jsx(YStack, { render: "main", "data-slot": "pane", ...pane(), overflow: "hidden", flex: 1, minW: 0, minH: 0, children: blockedBeta ? (_jsx(YStack, { "data-slot": "hosted-request", flex: 1, minH: 0, items: "center", justify: "center", p: "$6", children: _jsxs(YStack, { width: "100%", maxW: 440, gap: "$4", children: [_jsxs(XStack, { items: "center", gap: "$3", children: [_jsx(XStack, { width: 44, height: 44, rounded: "$4", bg: "$hover", items: "center", justify: "center", shrink: 0, children: _jsx(Clapperboard, { size: 22, "aria-hidden": true }) }), _jsxs(YStack, { gap: 2, minW: 0, children: [_jsxs(XStack, { items: "center", gap: "$2", children: [_jsx(Text, { fontSize: "$6", fontWeight: "600", color: "$ink", children: "Studio" }), _jsx(Text, { fontSize: "$1", color: "$quiet", px: "$2", py: 2, rounded: "$2", bg: "$hover", children: t('Beta') })] }), _jsx(Text, { fontSize: "$3", color: "$quiet", children: BETAS.find((b) => b.id === 'studio')?.line ?? 'Director Studio for AI film, video, and creative production.' })] })] }), _jsxs(XStack, { items: "center", gap: "$2", pt: "$1", children: [_jsx(Ask, { beta: BETAS.find((b) => b.id === 'studio'), go: move }), _jsx(Button, { variant: "ghost", size: "sm", onPress: () => move('/beta'), children: t('All betas') })] })] }) })) : (_jsx(YStack, { flex: 1, minH: 0, height: "100%", children: _jsx(Suspense, { fallback: null, children: _jsx(DirectorStudio, { host: maker }) }) })) })) : at.mode === 'hosted' ? (_jsx(YStack, { render: "main", "data-slot": "pane", ...pane(), overflow: "hidden", flex: 1, minW: 0, minH: 0, children: _jsx(Suspense, { fallback: null, children: _jsx(Hosted, { id: at.id, go: move }) }) })) : mode === 'beta' ? (_jsx(YStack, { render: "main", "data-slot": "pane", ...pane(), overflowY: "auto", overflowX: "hidden", flex: 1, minW: 0, minH: 0, p: "$4", $md: { p: '$6' }, children: betas ?? (_jsx(Suspense, { fallback: null, children: _jsx(Betas, { go: move }) })) })) : (_jsxs(YStack, { render: "main", "data-slot": "pane", ...(run ? null : { ...pane(), overflow: 'hidden' }), position: "relative", flex: 1, minW: 0, minH: 0, children: [!plans && !run && !inPlace && closed && free && host.person !== null ? (_jsx(XStack, { position: "absolute", t: 8, r: 12, z: 5, items: "center", "$max-md": { display: 'none' }, children: _jsxs(XStack, { render: "button", "data-slot": "header-upgrade", "aria-label": t('Upgrade plan'), items: "center", gap: "$1.5", px: "$2", py: "$1", rounded: "$3", bg: "transparent", cursor: "pointer", hoverStyle: { bg: '$hover' }, onPress: () => window.location.assign(payUrl('/cart', { org: currentOrg(), returnUrl: window.location.href })), children: [_jsx(Sparkles, { size: 14, color: "var(--muted-foreground)", "aria-hidden": true }), _jsx(Text, { fontSize: 15, lineHeight: 20, fontWeight: "500", color: "$soft", numberOfLines: 1, children: t('Upgrade plan') })] }) })) : null, plans ? null : _jsx(Builder, { host: host, rail: false })] })) })] })] }), drawer.state === 'shut' ? null : (_jsx(Layer, { drawer: drawer, top: bar ? BAR : 0, children: _jsxs(XStack, { flex: 1, minH: 0, children: [_jsx(YStack, { "data-slot": "drawer-rail", shrink: 0, pt: "calc(var(--pane-gap) + 8px)", $touchable: { pt: 'calc(var(--pane-gap) + 4px)' }, children: _jsx(Rail, { host: host, mode: mode, at: where, inside: inside, open: true, onChat: toChat, onDev: toDev, onDesign: toDesign, onStudio: toStudio, onTabs: toTabs, go: move, onOrg: org }) }), _jsx(YStack, { flex: 1, minW: 0, children: _jsx(Sidebar, { host: host, mode: mode, thread: thread, go: move, onShut: shut, onSeek: seek, onBack: back, drawer: true, places: sidebar }) })] }) })), finding ? _jsx(Search, { go: move, onClose: found, mode: mode, host: host }) : null, learning ? _jsx(Learning, { open: true, onClose: () => setLearning(false) }) : null, _jsx(AppContextMenu, { host: host, mode: mode, closed: closed, onToggleSidebar: flip, onSeek: seek, onNewChat: () => {
|
|
372
364
|
empty();
|
|
373
365
|
move(talk());
|
|
374
366
|
}, go: move })] }) }) }) }) }));
|
package/dist/Chat.js
CHANGED
|
@@ -79,6 +79,8 @@ import { brand } from './where.js';
|
|
|
79
79
|
import { BAND, HEAD, inPane, INSET, TOUCH_HEAD } from './ground.js';
|
|
80
80
|
import { shared, useChatPreferences } from './lib/chatPreferences.js';
|
|
81
81
|
import { handleHint } from './hint.js';
|
|
82
|
+
import { ProviderMark } from './ProviderMark.js';
|
|
83
|
+
import { ToBottom } from './ToBottom.js';
|
|
82
84
|
// NO REASONING PANEL HERE. Every assistant turn opened a "Thinking" disclosure
|
|
83
85
|
// listing seven steps — "Planning CSS extraction for chat styles", "Designing
|
|
84
86
|
// responsive top bar grid layout" — typed into this file as a literal array.
|
|
@@ -106,22 +108,8 @@ import { handleHint } from './hint.js';
|
|
|
106
108
|
* since.
|
|
107
109
|
*/
|
|
108
110
|
const MAX_ANON_TURNS = 3;
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
const lower = q.toLowerCase();
|
|
112
|
-
if (lower.includes("beta") || lower.includes("join") || lower.includes("access") || lower.includes("waitlist")) {
|
|
113
|
-
return `You can join and explore **Hanzo Beta** right now:\n\n1. **Sign in or create a free account** at [hanzo.ai/signup](/signup) for instant access to open betas.\n2. **Open the Betas portal** at [hanzo.ai/beta](/beta) (or from the left rail once signed in) to apply for early access to **Hanzo Studio**, **Design**, **Flow**, and **Operative** computer-use agents.\n3. **Upgrade anytime** to **Go**, **Pro**, **Dev**, **Max**, or **Ultra** for priority beta access.`;
|
|
114
|
-
}
|
|
115
|
-
if (lower.includes("majorana") || lower.includes("quantum") || lower.includes("qubit") || lower.includes("decoherence")) {
|
|
116
|
-
return `**Majorana zero modes (MZMs)** protect quantum information topologically rather than locally:\n\n1. **Non-Local Fermionic Parity**: Two spatially separated Majorana quasiparticles $\\gamma_1$ and $\\gamma_2$ form a single Dirac fermion operator $c = (\\gamma_1 + i\\gamma_2)/2$. Because the occupation state $|0\\rangle$ or $|1\\rangle$ is delocalized across the wire ends, local electromagnetic noise cannot flip the parity.\n2. **Non-Abelian Braiding**: Quantum gates are executed by braiding vortices in 2D $p+ip$ superconductors, producing unitary matrices determined by knot topology.\n3. **Exponential Suppression**: Residual energy splitting scales as $\\exp(-L/\\xi)$, where $L$ is wire separation and $\\xi$ is superconducting coherence length.`;
|
|
117
|
-
}
|
|
118
|
-
if (lower.includes("code") || lower.includes("build") || lower.includes("middleware") || lower.includes("jwt") || lower.includes("typescript") || lower.includes("python")) {
|
|
119
|
-
return `Here is a production TypeScript middleware:\n\n\`\`\`ts\nexport async function guard(req: Request): Promise<Response | null> {\n const token = req.headers.get('authorization')?.replace(/^Bearer\\s+/i, '')\n if (!token) return Response.json({ error: 'unauthorized' }, { status: 401 })\n const claims = await verifyJwt(token)\n const allowed = await rateLimit(\`org:\${claims.org}\`, { rpm: 600 })\n if (!allowed) return Response.json({ error: 'rate_limited' }, { status: 429 })\n return null\n}\n\`\`\`\n\nRun \`hanzo dev\` in your repository or sign in to execute and deploy this in a cloud sandbox.`;
|
|
120
|
-
}
|
|
121
|
-
return q.length <= 8 || /^(hi|hello|hey|yo|sup|test|asdf|qwerty|ping)\b/i.test(q)
|
|
122
|
-
? `Hey! How can I help you today? Feel free to ask a question, write or debug code, analyze a system architecture, or explore a topic.`
|
|
123
|
-
: `Here are the key points on **${q.slice(0, 96)}**:\n\n1. **Core Mechanism & Architecture**: Break the problem into clear, composable layers with well-defined interfaces, explicit state transitions, and deterministic validation.\n2. **Implementation Strategy**: Start with a minimal, testable baseline and benchmark latency, throughput, and correctness under realistic workloads.\n3. **Next Steps**: Tell me if you want to dive into the implementation code, mathematical formulation, or system architecture and I will write it out in full.`;
|
|
124
|
-
}
|
|
111
|
+
/** What an anonymous send says when the API gave no answer. */
|
|
112
|
+
const NO_ANSWER = phrase("No answer came back. Sign in to keep going.");
|
|
125
113
|
function readOpeningQuery() {
|
|
126
114
|
if (typeof window === "undefined")
|
|
127
115
|
return { text: "", thread: null };
|
|
@@ -588,7 +576,7 @@ function Thread({ placeholder = message(), initial, anonymous = false, settled =
|
|
|
588
576
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
589
577
|
}, [chatPrefs.approvalMode, anonymous]);
|
|
590
578
|
const agentShelf = useAgentShelf();
|
|
591
|
-
// The opening greets the person by the first word of their display name, capitalised ("What’s
|
|
579
|
+
// The opening greets the person by the first word of their display name, capitalised ("Good to see you, Z. What’s next?").
|
|
592
580
|
// A username is a handle, not a name: without a display name the greeting has none.
|
|
593
581
|
const firstName = useMemo(() => (anonymous ? "" : given(named()?.display ?? "")), [anonymous]);
|
|
594
582
|
// Private / forgetful mode: an ephemeral conversation kept in memory only, never saved to server history.
|
|
@@ -610,6 +598,8 @@ function Thread({ placeholder = message(), initial, anonymous = false, settled =
|
|
|
610
598
|
// kept per conversation with its tabs, so a chat opens as it was left and
|
|
611
599
|
// never as the last chat was. The header's Panel button and ⌘. move it.
|
|
612
600
|
const media = useMedia();
|
|
601
|
+
const [talkBox, setTalkBox] = useState(null);
|
|
602
|
+
const talkRef = useCallback((el) => setTalkBox(el instanceof HTMLElement ? el : null), []);
|
|
613
603
|
const wide = media.lg;
|
|
614
604
|
const [panel, setPanel] = usePanel(`chat:${at}`, false, wide);
|
|
615
605
|
const deck = useDeck(`chat:${at}`, SEED);
|
|
@@ -1078,7 +1068,11 @@ function Thread({ placeholder = message(), initial, anonymous = false, settled =
|
|
|
1078
1068
|
}
|
|
1079
1069
|
catch { }
|
|
1080
1070
|
if (!replyText) {
|
|
1081
|
-
|
|
1071
|
+
// No answer came back: say so and ask for a sign-in, never a made-up reply.
|
|
1072
|
+
apply.current((held) => held.map((m) => (m.id === aId ? { ...m, content: NO_ANSWER } : m)));
|
|
1073
|
+
setAnonBusy(false);
|
|
1074
|
+
setAnonGateOpen(true);
|
|
1075
|
+
return;
|
|
1082
1076
|
}
|
|
1083
1077
|
const wordsList = replyText.split(" ");
|
|
1084
1078
|
let idx = 0;
|
|
@@ -2020,81 +2014,83 @@ function Thread({ placeholder = message(), initial, anonymous = false, settled =
|
|
|
2020
2014
|
}, children: t("Sign up for free") }) }), _jsx(XStack, { display: "flex", $sm: { display: "none" }, children: _jsx(Button, { size: "xs", rounded: 9999, px: "$3", "data-slot": "header-signup-compact", onPress: () => {
|
|
2021
2015
|
if (typeof window !== "undefined")
|
|
2022
2016
|
window.location.assign("/signup?next=%2Fchat");
|
|
2023
|
-
}, children: t("Sign up") }) })] })) : free && (sidebarClosed || !media.md) ? (_jsxs(XStack, { render: "button", "data-slot": "header-upgrade", "aria-label": t("Upgrade plan"), items: "center", gap: "$1.5", px: "$2", py: "$1", rounded: "$3", bg: "transparent", cursor: "pointer", hoverStyle: { bg: "$hover" }, onPress: () => window.location.assign(payUrl('/cart', { org: org(), returnUrl: window.location.href })), children: [_jsx(Sparkles, { size: 14, color: "var(--muted-foreground)", "aria-hidden": true }), _jsx(Text, { fontSize: 15, lineHeight: 20, fontWeight: "500", color: "$soft", numberOfLines: 1, children: t("Upgrade plan") })] })) : null, said.length > 0 ? (_jsx(ConversationMenu, { threads: currentThreadMap, active: open || currentThread.id, onSchedule: anonymous || forgetful ? undefined : () => setPlan(lastAsked()), children: _jsx(XStack, {}) })) : (_jsxs(Tooltip, { children: [_jsx(TooltipTrigger, { asChild: true, children: _jsx(XStack, { render: "button", "data-slot": "header-private-chat", "aria-label": t("Private chat"), "aria-pressed": forgetful, width: 32, height: 32, items: "center", justify: "center", rounded: "$3", bg: "transparent", cursor: "pointer", hoverStyle: { bg: "$hover" }, focusVisibleStyle: { outlineWidth: 2, outlineStyle: "solid", outlineColor: "var(--ring)" }, onPress: () => setForgetful(!forgetful), children: _jsx(Ghost, { size: 16, strokeWidth: 1.75, color: forgetful ? "var(--foreground)" : "var(--muted-foreground)", fill: forgetful ? "currentColor" : "none", "aria-hidden": true }) }) }), _jsx(TooltipContent, { children: forgetful ? t("Private chat is on: this conversation is not saved") : t("Private chat") })] })), open ? _jsx(Share, { thread: open }) : null, _jsx(XStack, { "$max-md": { display: 'none' }, children: _jsx(Summary, { sections: sections, onOpen: () => setPanel(true), label: t("Summary") }) }), inTopChrome ? null : (_jsx(XStack, { "$max-md": { display: 'none' }, children: _jsx(PanelToggle, { open: panel, onToggle: () => setPanel(!panel) }) }))] })] })), wide && aside !== null ? (_jsx(Side, { children: _jsx(Panel, { side: deck, kinds: NONE, onHide: () => setPanel(false), label: t("Tabs"), ...browsing }) })) : null, !wide && panel ? _jsx(Panel, { side: deck, kinds: NONE, sheet: true, onHide: () => setPanel(false), label: t("Tabs"), ...browsing }) : null, _jsx(XStack, { flex: 1, minH: 0, minW: 0, children:
|
|
2024
|
-
|
|
2025
|
-
|
|
2026
|
-
|
|
2027
|
-
|
|
2028
|
-
|
|
2029
|
-
|
|
2030
|
-
|
|
2031
|
-
|
|
2032
|
-
|
|
2033
|
-
|
|
2034
|
-
|
|
2035
|
-
|
|
2036
|
-
|
|
2037
|
-
|
|
2038
|
-
|
|
2039
|
-
|
|
2040
|
-
|
|
2041
|
-
|
|
2042
|
-
|
|
2043
|
-
|
|
2044
|
-
|
|
2045
|
-
|
|
2046
|
-
|
|
2047
|
-
|
|
2048
|
-
|
|
2049
|
-
|
|
2050
|
-
|
|
2051
|
-
|
|
2052
|
-
|
|
2053
|
-
|
|
2054
|
-
|
|
2055
|
-
|
|
2056
|
-
|
|
2057
|
-
|
|
2058
|
-
|
|
2059
|
-
|
|
2060
|
-
|
|
2061
|
-
|
|
2062
|
-
|
|
2063
|
-
|
|
2064
|
-
|
|
2065
|
-
|
|
2066
|
-
|
|
2067
|
-
|
|
2068
|
-
|
|
2069
|
-
|
|
2070
|
-
|
|
2071
|
-
|
|
2072
|
-
|
|
2073
|
-
|
|
2074
|
-
|
|
2075
|
-
|
|
2076
|
-
|
|
2077
|
-
|
|
2078
|
-
|
|
2079
|
-
|
|
2080
|
-
|
|
2081
|
-
|
|
2082
|
-
|
|
2083
|
-
|
|
2084
|
-
|
|
2085
|
-
|
|
2086
|
-
|
|
2087
|
-
|
|
2088
|
-
|
|
2089
|
-
|
|
2090
|
-
|
|
2091
|
-
|
|
2092
|
-
|
|
2093
|
-
|
|
2094
|
-
|
|
2095
|
-
|
|
2096
|
-
|
|
2097
|
-
|
|
2017
|
+
}, children: t("Sign up") }) })] })) : free && (sidebarClosed || !media.md) ? (_jsxs(XStack, { render: "button", "data-slot": "header-upgrade", "aria-label": t("Upgrade plan"), items: "center", gap: "$1.5", px: "$2", py: "$1", rounded: "$3", bg: "transparent", cursor: "pointer", hoverStyle: { bg: "$hover" }, onPress: () => window.location.assign(payUrl('/cart', { org: org(), returnUrl: window.location.href })), children: [_jsx(Sparkles, { size: 14, color: "var(--muted-foreground)", "aria-hidden": true }), _jsx(Text, { fontSize: 15, lineHeight: 20, fontWeight: "500", color: "$soft", numberOfLines: 1, children: t("Upgrade plan") })] })) : null, said.length > 0 ? (_jsx(ConversationMenu, { threads: currentThreadMap, active: open || currentThread.id, onSchedule: anonymous || forgetful ? undefined : () => setPlan(lastAsked()), children: _jsx(XStack, {}) })) : (_jsxs(Tooltip, { children: [_jsx(TooltipTrigger, { asChild: true, children: _jsx(XStack, { render: "button", "data-slot": "header-private-chat", "aria-label": t("Private chat"), "aria-pressed": forgetful, width: 32, height: 32, items: "center", justify: "center", rounded: "$3", bg: "transparent", cursor: "pointer", hoverStyle: { bg: "$hover" }, focusVisibleStyle: { outlineWidth: 2, outlineStyle: "solid", outlineColor: "var(--ring)" }, onPress: () => setForgetful(!forgetful), children: _jsx(Ghost, { size: 16, strokeWidth: 1.75, color: forgetful ? "var(--foreground)" : "var(--muted-foreground)", fill: forgetful ? "currentColor" : "none", "aria-hidden": true }) }) }), _jsx(TooltipContent, { children: forgetful ? t("Private chat is on: this conversation is not saved") : t("Private chat") })] })), open ? _jsx(Share, { thread: open }) : null, _jsx(XStack, { "$max-md": { display: 'none' }, children: _jsx(Summary, { sections: sections, onOpen: () => setPanel(true), label: t("Summary") }) }), inTopChrome ? null : (_jsx(XStack, { "$max-md": { display: 'none' }, children: _jsx(PanelToggle, { open: panel, onToggle: () => setPanel(!panel) }) }))] })] })), wide && aside !== null ? (_jsx(Side, { children: _jsx(Panel, { side: deck, kinds: NONE, onHide: () => setPanel(false), label: t("Tabs"), ...browsing }) })) : null, !wide && panel ? _jsx(Panel, { side: deck, kinds: NONE, sheet: true, onHide: () => setPanel(false), label: t("Tabs"), ...browsing }) : null, _jsx(XStack, { flex: 1, minH: 0, minW: 0, children: _jsxs(YStack, { ref: talkRef, "data-slot": "talk", flex: 1, minH: 0, minW: 0, position: "relative", children: [_jsx(ChatSurface, { ...chat, messages: shown, send: guarded,
|
|
2018
|
+
// WHILE NOTHING HAS BEEN SAID, from a tablet up, the opening and the
|
|
2019
|
+
// composer are one pair centred in the pane (`center`: rows `1fr auto auto
|
|
2020
|
+
// 1fr`), so the heading reads close above the field and nothing stands at
|
|
2021
|
+
// the window's foot (owner, 2026-10-30). A phone keeps the composer at the
|
|
2022
|
+
// foot, over the keyboard, from the first moment; once a turn exists every
|
|
2023
|
+
// width does, and the transcript scrolls under it.
|
|
2024
|
+
center: media.md,
|
|
2025
|
+
// AS IT WAS WRITTEN. The package renders a turn's words plainly and
|
|
2026
|
+
// says so — it ships no markdown pipeline because the plugin set is the
|
|
2027
|
+
// surface's to choose — so an answer arrived here reading "```ts" with
|
|
2028
|
+
// the backticks on screen. `Prose` is the site's one renderer, reading
|
|
2029
|
+
// with the same `marked` the legal pages parse with and drawing every
|
|
2030
|
+
// token in gui elements, and the shared view draws through it too.
|
|
2031
|
+
body: (turn) => {
|
|
2032
|
+
if (String(turn.id).startsWith(`${FAILED}:`)) {
|
|
2033
|
+
const question = shown.find((one) => one.id === String(turn.id).slice(FAILED.length + 1));
|
|
2034
|
+
return question ? failure(question) : null;
|
|
2035
|
+
}
|
|
2036
|
+
// A QUESTION THAT CARRIED PICTURES draws them beside its words.
|
|
2037
|
+
if (turn.role === "user" && Array.isArray(turn.content)) {
|
|
2038
|
+
const parts = partsOf(turn.content);
|
|
2039
|
+
return (_jsx(YStack, { gap: "$1", children: _jsx(Parts, { parts: parts, prose: (text) => _jsx(Prose, { text: text }) }) }));
|
|
2040
|
+
}
|
|
2041
|
+
const said = typeof turn.content === "string" ? turn.content : "";
|
|
2042
|
+
// A QUESTION THAT CARRIED FILES draws its words and the files' chips;
|
|
2043
|
+
// the passages it handed the model are the model's to read, not ours.
|
|
2044
|
+
if (turn.role === "user" && said) {
|
|
2045
|
+
const read = told(said);
|
|
2046
|
+
if (read.carried)
|
|
2047
|
+
return (_jsx(YStack, { gap: "$1", children: _jsx(Carried, { text: read.text, attached: read.carried.attached, reused: read.carried.reused, onOpen: openFile, onSave: anonymous ? undefined : (url, id, f) => keepOne(url, id, f.name, f.type) }) }));
|
|
2048
|
+
}
|
|
2049
|
+
// WHILE THE ANSWER HAS NO WORDS YET: who is answering (the agents the
|
|
2050
|
+
// question addresses, or the whole cast when it names nobody), and the
|
|
2051
|
+
// model's reasoning as it streams (`reasoning` on the turn), dimmed and
|
|
2052
|
+
// cut to its last lines.
|
|
2053
|
+
const thought = turn.role === "assistant" && !said && chat.streaming ? (turn.reasoning ?? "").trim() : "";
|
|
2054
|
+
if (turn.role === "assistant" && !said && chat.streaming && (cast.length || thought)) {
|
|
2055
|
+
const q = [...shown].reverse().find((one) => one.role === "user");
|
|
2056
|
+
const whom = cast.length ? addressed(words(q?.content), cast) : [];
|
|
2057
|
+
return (_jsxs(YStack, { gap: "$1", "data-slot": "thinking", children: [_jsx(Text, { fontSize: "$2", color: "$soft", children: whom.length
|
|
2058
|
+
? whom.length > 1
|
|
2059
|
+
? thought
|
|
2060
|
+
? t("{names} are thinking…", { names: join(whom, t) })
|
|
2061
|
+
: t("{names} are answering…", { names: join(whom, t) })
|
|
2062
|
+
: thought
|
|
2063
|
+
? t("{names} is thinking…", { names: join(whom, t) })
|
|
2064
|
+
: t("{names} is answering…", { names: join(whom, t) })
|
|
2065
|
+
: t("Thinking…") }), thought ? (_jsx(Text, { fontSize: "$2", color: "$soft", opacity: 0.72, "data-slot": "thought", children: thought.length > THOUGHT ? `…${thought.slice(-THOUGHT).replace(/^\S*\s/, "")}` : thought })) : null] }));
|
|
2066
|
+
}
|
|
2067
|
+
// A CAST'S ANSWER IS SEVERAL PEOPLE'S. Each opens a line with their
|
|
2068
|
+
// name, as the brief asks, so each is drawn under their own face and
|
|
2069
|
+
// read in their own voice. A reply that names nobody is drawn whole.
|
|
2070
|
+
const parts = turn.role === "assistant" ? speakers(said, known) : null;
|
|
2071
|
+
if (parts && parts.some((part) => part.who)) {
|
|
2072
|
+
// Asked and silent: an agent the question addressed who has no part
|
|
2073
|
+
// in this reply.
|
|
2074
|
+
const at = shown.findIndex((one) => one.id === turn.id);
|
|
2075
|
+
const q = shown.slice(0, at).reverse().find((one) => one.role === "user");
|
|
2076
|
+
const silent = cast.length > 1 && !(chat.streaming && at === shown.length - 1)
|
|
2077
|
+
? addressed(words(q?.content), cast).filter((name) => !parts.some((part) => part.who?.toLowerCase() === name.toLowerCase()))
|
|
2078
|
+
: [];
|
|
2079
|
+
return (_jsxs(YStack, { gap: "$3", "data-turn-id": String(turn.id), "data-turn-role": turn.role, children: [parts.map((part, i) => (_jsxs(YStack, { gap: "$1", children: [part.who ? (_jsxs(XStack, { items: "center", gap: "$2", children: [_jsx(Face, { src: faces[part.who]?.avatar, emoji: faces[part.who]?.emoji, name: part.who, size: 20 }), _jsx(Text, { fontSize: "$2", fontWeight: "600", color: "$ink", children: part.who })] })) : null, _jsx(Prose, { text: part.text }), part.text ? (_jsx(Reply, { text: part.text, title: shownTitle, listen: listen(part.who ?? withWhom ?? undefined), onOpen: opener(part.text), onRedo: (act) => redoTurn(turn.id, act), onBranch: () => branchTurn(turn.id) })) : null] }, i))), silent.length ? (_jsx(Text, { fontSize: "$2", color: "$soft", children: t("No answer from {names} in this reply.", { names: join(silent, t) }) })) : null, byline(turn.id)] }));
|
|
2080
|
+
}
|
|
2081
|
+
const ms = turn.durationMs;
|
|
2082
|
+
const worked = turn.role === "assistant" && typeof ms === "number" && ms >= 1000 ? ms : 0;
|
|
2083
|
+
return (_jsxs(YStack, { gap: "$1.5", "data-turn-id": String(turn.id), "data-turn-role": turn.role, children: [worked ? (_jsx(Text, { "data-slot": "worked-for", fontSize: "$2", color: "$soft", children: t("Worked for {n}s", { n: Math.round(worked / 1000) }) })) : null, _jsx(Prose, { text: said }), turn.role === "assistant" && said ? (_jsx(Reply, { text: said, title: shownTitle, listen: listen(withWhom ?? undefined), onOpen: opener(said), onRedo: (act) => redoTurn(turn.id, act), onBranch: () => branchTurn(turn.id) })) : null, turn.role === "assistant" && said ? byline(turn.id) : null] }));
|
|
2084
|
+
},
|
|
2085
|
+
// The page's ONE heading, and it belongs to the empty transcript rather
|
|
2086
|
+
// than to a signed-out branch — the branch is gone, and the heading went
|
|
2087
|
+
// with it when it did. `Ask` passes its own, because the page embedding
|
|
2088
|
+
// it already has an `<h1>` and a second is the defect that took the
|
|
2089
|
+
// landings off /chat and /dev.
|
|
2090
|
+
empty: heading === null ? undefined : (_jsxs(YStack, { "data-slot": "opening", items: "center", justify: "flex-end", width: "100%", height: "100%", pt: "$6", pb: "$2", children: [cast.length > 1 ? (_jsx(XStack, { items: "center", justify: "center", mb: "$4", children: cast.map((name, i) => (_jsx(Box, { marginInlineStart: i ? -16 : 0, rounded: 40, borderWidth: 2, borderColor: "$background", z: cast.length - i, children: _jsx(Face, { src: faces[name]?.avatar, emoji: faces[name]?.emoji, name: name, size: 72 }) }, name))) })) : portrait ? (_jsx(Box, { width: 160, height: 160, rounded: 24, overflow: "hidden", borderWidth: 2, borderColor: "var(--white-15)", boxShadow: "0 10px 24px color-mix(in srgb, var(--pure-black) 70%, transparent)", mb: "$4", bg: "var(--neutral-900)", children: _jsx(View, { render: _jsx("img", { src: portrait, alt: withWhom }), width: "100%", height: "100%", objectFit: "cover" }) })) : null, cast.length === 1 && !portrait ? (_jsx(Box, { mb: "$3", children: _jsx(Face, { emoji: mate?.emoji ?? persona?.emoji, name: withWhom, size: 72 }) })) : null, cast.length === 0 && !portrait ? (_jsx(Box, { mb: "$3", "data-slot": "opening-mark", children: _jsx(ProviderMark, { org: "hanzo", size: 44, ink: true }) })) : null, _jsx(Text, { render: "h1", fontSize: "$7", lineHeight: "$7", fontWeight: "700", color: "$ink", text: "center", mb: "$1", children: join(cast, t) || heading || (firstName ? t("Good to see you, {name}. What’s next?", { name: firstName }) : t("What’s next?")) }), cast.length === 1 && (mate?.description ?? persona?.description) ? (_jsx(Text, { fontSize: "$3", color: "$soft", text: "center", maxW: 500, mb: "$4", lineHeight: "$4", children: mate?.description ?? persona?.description })) : null] })),
|
|
2091
|
+
// The transcript reads at the same measure. `Thread` defaults to 768
|
|
2092
|
+
// itself; handing it the column here is what lets Width reach it.
|
|
2093
|
+
column: { maxW: "var(--chat-column-measure, 640px)" }, composer: composer }), _jsx(ToBottom, { within: talkBox })] }) }), _jsx(AgentMaker, {}), carry.dialog, _jsx(Dialog, { open: anonPluginsOpen, onOpenChange: setAnonPluginsOpen, children: _jsxs(DialogContent, { maxW: 480, width: "100%", gap: "$3", "data-slot": "anon-plugins-dialog", children: [_jsx(DialogTitle, { children: t("Plugins & Skills") }), _jsx(Text, { fontSize: "$2", color: "$soft", children: t("Enable plugins and skills for this conversation, or type / and @ in the composer.") }), _jsxs(YStack, { maxH: 320, overflow: "scroll", gap: "$1.5", children: [carry.plugins.rows.map((p) => (_jsxs(XStack, { render: "button", onPress: () => carry.plugins.pick(p.id), items: "center", justify: "space-between", p: "$2.5", rounded: "$3", borderWidth: 1, borderColor: p.on ? "$ink" : "$borderColor", bg: p.on ? "$hover" : "transparent", hoverStyle: { bg: "$hover" }, cursor: "pointer", children: [_jsxs(XStack, { items: "center", gap: "$2.5", minW: 0, flex: 1, children: [p.icon, _jsxs(YStack, { minW: 0, flex: 1, children: [_jsx(Text, { fontSize: "$2", fontWeight: "600", color: "$ink", numberOfLines: 1, children: p.label }), p.note ? (_jsx(Text, { fontSize: "$1", color: "$soft", numberOfLines: 1, children: p.note })) : null] })] }), _jsx(Text, { fontSize: "$1", fontWeight: "600", color: p.on ? "$ink" : "$soft", children: p.on ? t("On") : t("Plugin") })] }, `plugin:${p.id}`))), carry.skills.rows.slice(0, 24).map((s) => (_jsxs(XStack, { render: "button", onPress: () => carry.skills.pick(s.id), items: "center", justify: "space-between", p: "$2", rounded: "$3", borderWidth: 1, borderColor: s.on ? "$ink" : "$borderColor", bg: s.on ? "$hover" : "transparent", hoverStyle: { bg: "$hover" }, cursor: "pointer", children: [_jsxs(XStack, { items: "center", gap: "$2", minW: 0, flex: 1, children: [s.icon, _jsxs(Text, { fontSize: "$2", color: "$ink", numberOfLines: 1, children: ["/", s.label] })] }), _jsx(Text, { fontSize: "$1", fontWeight: "600", color: s.on ? "$ink" : "$soft", children: s.on ? t("On") : t("Skill") })] }, `skill:${s.id}`)))] })] }) }), _jsx(Dialog, { open: anonGateOpen, onOpenChange: setAnonGateOpen, children: _jsxs(DialogContent, { maxW: 480, rounded: "$6", gap: "$3.5", children: [_jsx(DialogTitle, { children: t("Sign in to continue chatting") }), _jsx(Text, { fontSize: "$3", color: "$soft", lineHeight: "$4", children: t("Sign in or create a free Hanzo account to save this conversation and continue chatting.") }), _jsxs(YStack, { gap: "$2", pt: "$1", children: [_jsx(Button, { variant: "primary", size: "lg", width: "100%", onPress: () => window.location.assign("/signup?next=%2Fchat"), children: t("Create Free Account") }), _jsx(Button, { variant: "outline", size: "default", width: "100%", onPress: () => enter(LOGIN), children: t("Sign In") })] }), _jsxs(YStack, { gap: "$2", pt: "$2.5", borderTopWidth: 1, borderColor: "$borderColor", children: [_jsx(Text, { fontSize: "$1", fontFamily: "$mono", color: "$soft", children: t("NEED MORE CAPACITY? UPGRADE ANYTIME") }), _jsx(XStack, { gap: "$2", flexWrap: "wrap", children: [
|
|
2098
2094
|
["Go", "Pro"],
|
|
2099
2095
|
["Dev", "Max"],
|
|
2100
2096
|
].flat().map((label) => (_jsx(XStack, { render: "button", onPress: () => {
|
package/dist/Rail.d.ts
CHANGED
|
@@ -2,9 +2,8 @@ import { type ReactNode } from 'react';
|
|
|
2
2
|
import { type Host } from '@hanzo/build';
|
|
3
3
|
import { type Place } from './lib/host.js';
|
|
4
4
|
/** The rail's width, px. */
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
export declare const MARK = 34;
|
|
5
|
+
/** A mark, px: a 40px rounded square on the rail's 56px. */
|
|
6
|
+
export declare const MARK = 40;
|
|
8
7
|
/** The places the rail holds beside the products, by the builder address each opens. */
|
|
9
8
|
export declare const RAISED: {
|
|
10
9
|
readonly library: '-/artifacts';
|
package/dist/Rail.js
CHANGED
|
@@ -47,12 +47,11 @@ import { out } from './help.js';
|
|
|
47
47
|
import { BETAS } from './lib/betas.js';
|
|
48
48
|
import { HOSTED_APPS } from './lib/hosted.js';
|
|
49
49
|
import { Account } from './Account.js';
|
|
50
|
-
import { HEAD,
|
|
50
|
+
import { HEAD, RAIL, TOUCH_HEAD } from './ground.js';
|
|
51
51
|
import { app, hosted, WORKSPACE } from './lib/host.js';
|
|
52
52
|
/** The rail's width, px. */
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
export const MARK = 34;
|
|
53
|
+
/** A mark, px: a 40px rounded square on the rail's 56px. */
|
|
54
|
+
export const MARK = 40;
|
|
56
55
|
/** A mark on a touch screen, px: a thumb's 44. */
|
|
57
56
|
const TOUCH = 44;
|
|
58
57
|
/** The places the rail holds beside the products, by the builder address each opens. */
|
|
@@ -72,7 +71,7 @@ export function raised(at) {
|
|
|
72
71
|
}
|
|
73
72
|
/** One mark: an icon button named for where it goes (`label`, already in the reader's language), its name its tooltip, lit where the reader is. */
|
|
74
73
|
export function Mark({ label, on = false, onPress, children, ...rest }) {
|
|
75
|
-
return (_jsx(XStack, { render: "button", "aria-label": label, ...{ title: label }, "aria-current": on ? 'page' : undefined, onPress: onPress, width: MARK, height: MARK, rounded:
|
|
74
|
+
return (_jsx(XStack, { render: "button", "aria-label": label, ...{ title: label }, "aria-current": on ? 'page' : undefined, onPress: onPress, width: MARK, height: MARK, rounded: 12, items: "center", justify: "center", shrink: 0, cursor: "pointer", opacity: on ? 1 : 0.7, bg: on ? '$edge' : 'transparent', hoverStyle: { bg: on ? '$edge' : '$hover', opacity: 1 }, pressStyle: { bg: '$raised' }, focusVisibleStyle: { outlineWidth: 2, outlineStyle: 'solid', outlineColor: '$outlineColor' },
|
|
76
75
|
// A thumb's 44px on a touch screen.
|
|
77
76
|
$touchable: { width: TOUCH, height: TOUCH }, ...rest, children: children }));
|
|
78
77
|
}
|
|
@@ -131,7 +130,7 @@ export function Rail({ host, mode, at, open, toggle, inside = null, rows = false
|
|
|
131
130
|
minH: 0,
|
|
132
131
|
// The first mark stands at the pane's top edge, one head row high (HEAD), and the last at its foot by the
|
|
133
132
|
// same inset, so the account mirrors the sidebar's toggle across the rail.
|
|
134
|
-
pt: (HEAD - MARK) / 2 +
|
|
133
|
+
pt: (HEAD - MARK) / 2 + 2, pb: 10, gap: 3, shrink: 0, items: "center", $touchable: { pt: (TOUCH_HEAD - TOUCH) / 2, pb: (TOUCH_HEAD - TOUCH) / 2 }, children: [toggle ? (_jsx(YStack, { children: _jsx(Toggle, { open: open, onPress: toggle }) })) : null, _jsxs(YStack, { flex: 1, minH: 0, overflowY: "auto", overflowX: "hidden", items: "center", gap: 4, width: "100%", "$platform-web": { scrollbarWidth: 'none' }, children: [_jsx(Mark, { label: t('Chat'), on: mode === 'chat', onPress: onChat, "data-slot": "rail-chat", children: _jsx(MARKS.chat.icon, { size: 18, "aria-hidden": true }) }), _jsx(Mark, { label: "Dev", on: mode === 'dev' && !here, onPress: onDev, "data-slot": "rail-dev", children: _jsx(MARKS.dev.icon, { size: 18, "aria-hidden": true }) }), anon ? null : (_jsx(Mark, { label: "Design", on: mode === 'design', onPress: onDesign, "data-slot": "rail-design", children: _jsx(MARKS.design.icon, { size: 18, "aria-hidden": true }) })), !anon && opened('studio') ? (_jsx(Mark, { label: "Studio", on: mode === 'studio', onPress: onStudio, "data-slot": "rail-studio", children: _jsx(MARKS.studio.icon, { size: 18, "aria-hidden": true }) })) : null, anon ? null : (_jsx(Mark, { label: "Tabs", on: mode === 'tabs', onPress: onTabs, "data-slot": "rail-tabs", children: _jsx(MARKS.tabs.icon, { size: 18, "aria-hidden": true }) })), apps.map((a) => (_jsx(Mark, { label: a.name, on: inside === a.id, onPress: () => go(hosted(a.id)), "data-slot": `rail-app-${a.id}`, children: _jsx(a.icon, { size: 18, "aria-hidden": true }) }, a.id))), _jsx(Mark, { label: t('Library'), on: here === 'library', onPress: to(RAISED.library), "data-slot": "rail-library", children: _jsx(MARKS.library.icon, { size: 18, "aria-hidden": true }) }), anon ? null : (_jsx(Mark, { label: t('Scheduled tasks'), on: here === 'scheduled', onPress: to(RAISED.scheduled), "data-slot": "rail-scheduled", children: _jsx(MARKS.scheduled.icon, { size: 18, "aria-hidden": true }) })), anon ? null : (_jsx(Mark, { label: t('Customize'), on: here === 'customize', onPress: to(RAISED.customize), "data-slot": "rail-customize", children: _jsx(MARKS.customize.icon, { size: 18, "aria-hidden": true }) })), anon ? null : (_jsx(Mark, { label: t('Betas'), on: mode === 'beta', onPress: () => go('/beta'), "data-slot": "rail-betas", children: _jsx(FlaskConical, { size: 18, "aria-hidden": true }) })), betasDialog, !anon && rest.length ? (_jsx(DropdownMenu
|
|
135
134
|
// Toward the content: right of the rail, left of it right to left.
|
|
136
135
|
, {
|
|
137
136
|
// Toward the content: right of the rail, left of it right to left.
|
package/dist/Recents.js
CHANGED
|
@@ -17,7 +17,7 @@ import { SidebarItem, StatusDot } from '@hanzo/ui/chat';
|
|
|
17
17
|
import { useKept } from './kept.js';
|
|
18
18
|
import { app } from './lib/host.js';
|
|
19
19
|
import { site } from './where.js';
|
|
20
|
-
import { arrange, chats, MENUS, PINNED, PLAIN, runs, SINCE, UNFILED, UNTITLED, UNTITLED_RUN, viewOf } from './recent.js';
|
|
20
|
+
import { ago, arrange, chats, MENUS, PINNED, PLAIN, runs, SINCE, UNFILED, UNTITLED, UNTITLED_RUN, viewOf } from './recent.js';
|
|
21
21
|
import { hasUnreadUpdate, ProjectsTree, useChatProjects } from './ProjectsTree.js';
|
|
22
22
|
import { ConversationMenu, ThreadRow, useThreadList } from './thread.js';
|
|
23
23
|
/** The menu's items: each section a heading and its options (recent.ts's phrases, drawn through `t`), the one in force checked. */
|
|
@@ -202,8 +202,10 @@ function List({ mode, rows, view, keep, open, reading, error, onOpen, threads, h
|
|
|
202
202
|
const row = (r) => {
|
|
203
203
|
const one = threads?.get(r.id);
|
|
204
204
|
const isUnread = Boolean(r.kind === 'chat' && !open(r) && unreadIds?.has(r.id));
|
|
205
|
-
const
|
|
206
|
-
const
|
|
205
|
+
const age = ago(r.at, new Date(), t);
|
|
206
|
+
const when = age ? (_jsx(SizableText, { "data-slot": "row-age", fontSize: 12, lineHeight: 16, color: "var(--muted-foreground)", children: age })) : null;
|
|
207
|
+
const rowAside = r.kind === 'dev' ? (_jsxs(XStack, { items: "center", gap: "$1.5", children: [when, r.pr ? _jsx(GitPullRequest, { size: 13, color: "var(--state-success)", "aria-hidden": true }) : null, _jsx(StatusDot, { status: DOTS[r.status] ?? 'idle' })] })) : isUnread || when ? (_jsxs(XStack, { items: "center", gap: "$1.5", children: [when, isUnread ? (_jsx(XStack, { "data-slot": "thread-unread-dot", width: 6, height: 6, rounded: 999, bg: "var(--foreground)", "aria-hidden": true })) : null] })) : undefined;
|
|
208
|
+
const item = (_jsx(SidebarItem, { "data-kind": r.kind, active: open(r), rounded: 8, minH: 29, paddingInlineStart: "$2", paddingInlineEnd: one || rowAside ? 52 : '$2',
|
|
207
209
|
// A thumb's 44 on a touch screen; a conversation's ⋯ is a thumb wide there and always there: the title stops short of it.
|
|
208
210
|
$touchable: one ? { minH: 44, paddingInlineEnd: 52 } : { minH: 44 }, onKeyDown: (e) => {
|
|
209
211
|
if (e.key !== 'Enter' && e.key !== ' ')
|
package/dist/Shell.js
CHANGED
|
@@ -54,7 +54,7 @@ import { parseModels } from "@hanzo/ui/models/catalog";
|
|
|
54
54
|
import { mark } from "./lib/mark.js";
|
|
55
55
|
import { useOpen } from "./open.js";
|
|
56
56
|
import { useSpan } from "./span.js";
|
|
57
|
-
import { pane } from "./ground.js";
|
|
57
|
+
import { BAR, pane, RAIL } from "./ground.js";
|
|
58
58
|
import { useFree } from "./Upgrade.js";
|
|
59
59
|
import { payUrl } from "./lib/pay.js";
|
|
60
60
|
/** The new-agent row's fields: an outlined box in the shell's own ink. */
|
|
@@ -1018,7 +1018,7 @@ export function Split({ children, swap, framed = false, bare = false, }) {
|
|
|
1018
1018
|
return (_jsxs(_Fragment, { children: [_jsxs(YStack, { render: "main", "data-slot": "pane", gridArea: "pane", position: "relative", ...(framed
|
|
1019
1019
|
? bare
|
|
1020
1020
|
? null
|
|
1021
|
-
: { ...pane(), overflow: "hidden"
|
|
1021
|
+
: { ...pane(), overflow: "hidden" }
|
|
1022
1022
|
: {
|
|
1023
1023
|
...sheet(0),
|
|
1024
1024
|
// The edge the pane shares with the column before it: the left, or the right in a right-to-left language.
|
|
@@ -1052,14 +1052,9 @@ export function Split({ children, swap, framed = false, bare = false, }) {
|
|
|
1052
1052
|
target.addEventListener("pointermove", onMove);
|
|
1053
1053
|
target.addEventListener("pointerup", cleanup);
|
|
1054
1054
|
target.addEventListener("pointercancel", cleanup);
|
|
1055
|
-
} })) : null] }), aside ? (_jsxs(YStack, { render: "aside", "data-slot": "side", gridArea: "side", ...pane(framed ?
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
borderInlineStartWidth: 1,
|
|
1059
|
-
borderInlineStartStyle: "solid",
|
|
1060
|
-
borderColor: "var(--pane-edge, var(--edge, var(--white-06)))",
|
|
1061
|
-
}
|
|
1062
|
-
: null), marginInlineStart: 0, ref: split.aside, position: "relative", shrink: 0, minH: 0, display: "none", $lg: { display: "flex" }, children: [split.grip ? (_jsx(Gutter, { ...split.grip, label: t("Resize side panel"), gap: split.side.hidden ? 0 : undefined, inset: split.side.hidden ? -4 : 1 })) : null, _jsx(YStack, { flex: 1, minH: 0, overflowY: "auto", overflowX: "hidden", rounded: framed ? 0 : "var(--pane-round)", ref: (el) => setSlot(el instanceof HTMLElement ? el : null) })] })) : null] }));
|
|
1055
|
+
} })) : null] }), aside ? (_jsxs(YStack, { render: "aside", "data-slot": "side", gridArea: "side", ...pane(framed ? undefined : sheet(1).backgroundColor),
|
|
1056
|
+
// In the frame the gutter stands between the pane and this column.
|
|
1057
|
+
marginInlineStart: framed ? "var(--pane-gap)" : undefined, ref: split.aside, position: "relative", shrink: 0, minH: 0, display: "none", $lg: { display: "flex" }, children: [split.grip ? (_jsx(Gutter, { ...split.grip, label: t("Resize side panel"), gap: split.side.hidden ? 0 : undefined, inset: split.side.hidden ? -4 : 1 })) : null, _jsx(YStack, { flex: 1, minH: 0, overflowY: "auto", overflowX: "hidden", rounded: "var(--pane-round)", ref: (el) => setSlot(el instanceof HTMLElement ? el : null) })] })) : null] }));
|
|
1063
1058
|
}
|
|
1064
1059
|
/**
|
|
1065
1060
|
* THE RAIL: where you can go, as marks with their names under them. It is the
|
|
@@ -1104,8 +1099,8 @@ function Rail({ mode, places, team, open, navigate, onSettings, onMore, }) {
|
|
|
1104
1099
|
overflow: "hidden",
|
|
1105
1100
|
}, children: [places.map((place, i) => {
|
|
1106
1101
|
const here = place.id === mode;
|
|
1107
|
-
return (_jsxs(Box, { render: "button", onClick: () => navigate?.(place.route), "aria-label": t(place.label), "aria-current": here ? "page" : undefined, title: place.name ?? (place.title ? t(place.title) : t(place.label)), display: "flex", "$max-md": { display: i < 4 ? "flex" : "none", width: "auto", minW: 0 }, flexDirection: "column", width:
|
|
1108
|
-
}), team ? (_jsx(XStack, { "$max-md": { display: places.length < 4 ? "flex" : "none", width: "auto", minW: 0 }, children: _jsx(Text, { render: _jsx("a", { href: team, "aria-label": t("Workspace"), title: "Hanzo Team" }), display: "flex", width:
|
|
1102
|
+
return (_jsxs(Box, { render: "button", onClick: () => navigate?.(place.route), "aria-label": t(place.label), "aria-current": here ? "page" : undefined, title: place.name ?? (place.title ? t(place.title) : t(place.label)), display: "flex", "$max-md": { display: i < 4 ? "flex" : "none", width: "auto", minW: 0 }, flexDirection: "column", width: 40, minH: 44, py: "$1", rounded: "$2", items: "center", justify: "center", gap: 2, bg: here ? "$edge" : undefined, hoverStyle: { bg: here ? "$edge" : "$hover" }, children: [_jsx(place.icon, { size: 18, "aria-hidden": true }), _jsx(Text, { fontSize: 12, lineHeight: 14, color: here ? "$ink" : "$quiet", numberOfLines: 1, children: t(place.label) })] }, place.id));
|
|
1103
|
+
}), team ? (_jsx(XStack, { "$max-md": { display: places.length < 4 ? "flex" : "none", width: "auto", minW: 0 }, children: _jsx(Text, { render: _jsx("a", { href: team, "aria-label": t("Workspace"), title: "Hanzo Team" }), display: "flex", width: RAIL, color: "inherit", children: _jsxs(Box, { display: "flex", flex: 1, flexDirection: "column", minH: 44, py: "$1", rounded: "$2", items: "center", justify: "center", gap: 2, hoverStyle: { bg: "$hover" }, children: [_jsx(LayoutGrid, { size: 18, "aria-hidden": true }), _jsx(Text, { fontSize: 12, lineHeight: 14, color: "$quiet", numberOfLines: 1, children: t("Workspace") })] }) }) })) : null, _jsxs(Box, { "data-slot": "more", render: "button", onClick: onMore, "aria-label": t("More places"), title: t("More"), display: "none", "$max-md": { display: "flex", width: "auto", minW: 0 }, flexDirection: "column", width: RAIL, minH: 44, py: "$1", rounded: "$2", items: "center", justify: "center", gap: 2, hoverStyle: { bg: "$hover" }, children: [_jsx(SearchIcon, { size: 18, "aria-hidden": true }), _jsx(Text, { fontSize: 12, lineHeight: 14, color: "$quiet", children: t("More") })] })] }), _jsx(YStack, { items: "center", pb: "$2", $md: open ? { display: "none" } : undefined, children: _jsxs(Box, { render: "button", onClick: onSettings, "aria-label": t("Settings"), title: t("Settings"), display: "flex", flexDirection: "column", width: RAIL, minH: 44, py: "$1", rounded: "$2", items: "center", justify: "center", gap: 2, hoverStyle: { bg: "$hover" }, children: [_jsx(Settings2, { size: 18, "aria-hidden": true }), _jsx(Text, { fontSize: 12, lineHeight: 14, color: "$quiet", children: t("Settings") })] }) })] }));
|
|
1109
1104
|
}
|
|
1110
1105
|
/**
|
|
1111
1106
|
* Chat's column: start a chat, the projects, then every conversation. The app
|
|
@@ -1378,7 +1373,10 @@ function Frame({ mode, children, navigate, back, forward, }) {
|
|
|
1378
1373
|
},
|
|
1379
1374
|
signOut: () => void logout(),
|
|
1380
1375
|
};
|
|
1381
|
-
const list = (_jsxs(Sidebar, { ref: side.ref, ...side.props, $md: { width: "var(--span)" }, "$max-md": { width: "100%", maxW: 280 }, ...sheet(0),
|
|
1376
|
+
const list = (_jsxs(Sidebar, { ref: side.ref, ...side.props, $md: { width: "var(--span)" }, "$max-md": { width: "100%", maxW: 280 }, ...sheet(0),
|
|
1377
|
+
// The kit draws the sidebar's edge on its right, a physical side, so the edge is
|
|
1378
|
+
// traded here: the left in a right-to-left language, where the sidebar stands at the right.
|
|
1379
|
+
bg: "var(--side-fill, var(--sheet-2))", rounded: "var(--pane-round)", borderWidth: 1, borderColor: "var(--pane-edge, var(--edge, var(--white-06)))", position: "relative", children: [_jsx(Gutter
|
|
1382
1380
|
// The edge the sidebar is pinned to (Grip's, physical): its free edge is the other one.
|
|
1383
1381
|
, {
|
|
1384
1382
|
// The edge the sidebar is pinned to (Grip's, physical): its free edge is the other one.
|
|
@@ -1404,9 +1402,9 @@ function Frame({ mode, children, navigate, back, forward, }) {
|
|
|
1404
1402
|
navigate?.(site("/referral"));
|
|
1405
1403
|
dismiss();
|
|
1406
1404
|
}, children: t("Share Hanzo") }), _jsx(XStack, { items: "center", justify: "flex-end", gap: "$1", px: "$1.5", py: "$1", borderTopWidth: 1, borderColor: "$borderColor", children: _jsx(Box, { render: "button", onClick: toggle, "aria-label": t("Collapse sidebar"), p: "$2", rounded: "$2", hoverStyle: { bg: "$hover" }, cursor: "pointer", children: _jsx(PanelLeftClose, { size: 16, "aria-hidden": true, "data-i18n-mirror": "" }) }) })] })) : null) : null] }));
|
|
1407
|
-
return (_jsxs(YStack, { "data-slot": "workspace", "data-hydrated": settled ? "true" : undefined, "data-sidebar": asked ? "open" : "shut", display: "grid", gridTemplateColumns:
|
|
1405
|
+
return (_jsxs(YStack, { "data-slot": "workspace", "data-hydrated": settled ? "true" : undefined, "data-sidebar": asked ? "open" : "shut", display: "grid", gridTemplateColumns: `${RAIL}px auto minmax(0, 1fr) auto`, gridTemplateRows: `${BAR}px minmax(0, 1fr)`, gridTemplateAreas: '"bar bar bar bar" "rail list pane side"', "$max-md": {
|
|
1408
1406
|
gridTemplateColumns: "minmax(0, 1fr)",
|
|
1409
|
-
gridTemplateRows:
|
|
1407
|
+
gridTemplateRows: `${BAR}px minmax(0, 1fr) ${TABS_HEIGHT}`,
|
|
1410
1408
|
gridTemplateAreas: '"bar" "pane" "rail"',
|
|
1411
1409
|
}, position: "relative", width: "100%", height: "100dvh", overflow: "hidden", bg: "$background", backgroundImage: "var(--pane-ground)", children: [_jsx(Rail, { mode: mode, places: places, open: asked, team: onApex ? (signedIn ? ENTRY : WORKSPACE) : undefined, navigate: navigate, onSettings: () => showSettings(FIRST), onMore: () => setFinding(true) }), _jsx(Box, { gridArea: "bar", "data-slot": "bar", "data-tauri-drag-region": "deep", onMouseDown: dragWindow, onDoubleClick: toggleWindowMaximize, shrink: 0, children: _jsx(BusinessHeader, { appId: onApex ? (mode === "dev" ? "dev" : "chat") : "team", appTitle: onApex ? (mode === "dev" ? "Hanzo Dev" : "Hanzo Chat") : "Hanzo Team", apps: BUSINESS_APPS, brandMark: _jsx(HanzoMark, { size: 18 }), onSelectApp: (item) => {
|
|
1412
1410
|
if (typeof window === "undefined")
|
|
@@ -1471,7 +1469,7 @@ function Frame({ mode, children, navigate, back, forward, }) {
|
|
|
1471
1469
|
void switchToAccount(found);
|
|
1472
1470
|
else
|
|
1473
1471
|
void addAccount();
|
|
1474
|
-
}, onAddAccount: () => void addAccount(), onSettings: () => showSettings(FIRST), onSignOut: () => void logout(), leftSlot: _jsxs(XStack, { items: "center", gap: "$1", shrink: 0, children: [_jsx(SidebarIconButton, { ...TAP, label: t(shown ? "Close sidebar" : "Open sidebar"), onPress: toggle, onMouseEnter: () => setPeeking(true), children: _jsx(PanelLeft, { size: 16, "aria-hidden": true, "data-i18n-mirror": "" }) }), back || forward ? (_jsxs(XStack, { display: "none", $md: { display: "flex" }, items: "center", gap: "$1", shrink: 0, children: [_jsx(SidebarIconButton, { ...TAP, label: t("Back"), onPress: () => back?.(), children: _jsx(ArrowLeft, { size: 16, "aria-hidden": true, "data-i18n-mirror": "" }) }), _jsx(SidebarIconButton, { ...TAP, label: t("Forward"), onPress: () => forward?.(), children: _jsx(ArrowRight, { size: 16, "aria-hidden": true, "data-i18n-mirror": "" }) })] })) : null] }), rightSlot: _jsxs(XStack, { shrink: 0, minW: 0, justify: "flex-end", items: "center", gap: "$2", children: [settled && !signedIn ? (_jsx(Box, { ...TAP, render: "button", onClick: () => enter(LOGIN), display: "flex", items: "center", justify: "center", cursor: "pointer", children: _jsx(XStack, { items: "center", justify: "center", height: CONTROL, px: "$2.5", rounded: "$2", borderWidth: 1, borderColor: "$borderColor", hoverStyle: { bg: "$hover" }, children: _jsx(Text, { fontSize: "$1", fontWeight: "600", color: "$ink", children: t("Sign in") }) }) })) : null, settled && signedIn && free ? (_jsx(Box, { ...TAP, render: "button", onClick: () => window.location.assign(payUrl("/cart", { returnUrl: window.location.href })), display: "flex", items: "center", justify: "center", cursor: "pointer", "aria-label": t("Upgrade"), "data-slot": "bar-upgrade", children: _jsxs(XStack, { items: "center", justify: "center", height: CONTROL, px: "$2.5", rounded: "$2", borderWidth: 1, borderColor: "$borderColor", gap: "$1.5", hoverStyle: { bg: "$hover" }, children: [_jsx(Sparkles, { size: 13, "aria-hidden": true, color: "var(--primary)" }), _jsx(Text, { fontSize: "$1", fontWeight: "600", color: "$ink", children: t("Upgrade") })] }) })) : null, _jsxs(XStack, { display: "none", $lg: { display: "flex" }, items: "center", gap: "$1", children: [_jsx(SidebarIconButton, { ...TAP, label: t(aside === "roster" ? "Hide directory & roster" : "Show directory & roster"), onPress: () => showAside(aside === "roster" ? null : "roster"), children: _jsx(Users, { size: 16, "aria-hidden": true }) }), _jsx(SidebarIconButton, { ...TAP, label: t(aside === "tasks" ? "Close side panel" : "Open side panel"), onPress: () => showAside(aside === "tasks" ? null : "tasks"), children: _jsx(PanelRight, { size: 16, "aria-hidden": true, "data-i18n-mirror": "" }) })] }), _jsx(WindowControls, {})] }), children: _jsx(YStack, { width: 420, maxW: "100%", position: "relative", children: _jsxs(Box, { render: "button", onClick: () => setFinding(true), display: "flex", flexDirection: "row", "data-slot": "find", items: "center", "$max-md": { justify: "center" }, gap: "$2", width: "100%", height: CONTROL, px: "$2.5", rounded: "$2", borderWidth: 1, borderColor: "$borderColor", hoverStyle: { bg: "$hover" }, children: [_jsx(SearchIcon, { size: 13, "aria-hidden": true, color: "var(--soft, var(--muted-foreground))" }), _jsx(Text, { fontSize: "$1", color: "$soft", "$max-md": { display: "none" }, children: t("Search {workspace}", { workspace }) }), _jsx(Shortcut, { keys: ["Mod", "K"], marginInlineStart: "auto", "data-i18n-ltr": "", "$max-md": { display: "none" } })] }) }) }) }), shown ? (_jsx(Box, { render: "button", "aria-label": t("Close sidebar"), onClick: dismiss, ...scrim, "data-slot": "scrim", position: "absolute", t:
|
|
1472
|
+
}, onAddAccount: () => void addAccount(), onSettings: () => showSettings(FIRST), onSignOut: () => void logout(), leftSlot: _jsxs(XStack, { items: "center", gap: "$1", shrink: 0, children: [_jsx(SidebarIconButton, { ...TAP, label: t(shown ? "Close sidebar" : "Open sidebar"), onPress: toggle, onMouseEnter: () => setPeeking(true), children: _jsx(PanelLeft, { size: 16, "aria-hidden": true, "data-i18n-mirror": "" }) }), back || forward ? (_jsxs(XStack, { display: "none", $md: { display: "flex" }, items: "center", gap: "$1", shrink: 0, children: [_jsx(SidebarIconButton, { ...TAP, label: t("Back"), onPress: () => back?.(), children: _jsx(ArrowLeft, { size: 16, "aria-hidden": true, "data-i18n-mirror": "" }) }), _jsx(SidebarIconButton, { ...TAP, label: t("Forward"), onPress: () => forward?.(), children: _jsx(ArrowRight, { size: 16, "aria-hidden": true, "data-i18n-mirror": "" }) })] })) : null] }), rightSlot: _jsxs(XStack, { shrink: 0, minW: 0, justify: "flex-end", items: "center", gap: "$2", children: [settled && !signedIn ? (_jsx(Box, { ...TAP, render: "button", onClick: () => enter(LOGIN), display: "flex", items: "center", justify: "center", cursor: "pointer", children: _jsx(XStack, { items: "center", justify: "center", height: CONTROL, px: "$2.5", rounded: "$2", borderWidth: 1, borderColor: "$borderColor", hoverStyle: { bg: "$hover" }, children: _jsx(Text, { fontSize: "$1", fontWeight: "600", color: "$ink", children: t("Sign in") }) }) })) : null, settled && signedIn && free ? (_jsx(Box, { ...TAP, render: "button", onClick: () => window.location.assign(payUrl("/cart", { returnUrl: window.location.href })), display: "flex", items: "center", justify: "center", cursor: "pointer", "aria-label": t("Upgrade"), "data-slot": "bar-upgrade", children: _jsxs(XStack, { items: "center", justify: "center", height: CONTROL, px: "$2.5", rounded: "$2", borderWidth: 1, borderColor: "$borderColor", gap: "$1.5", hoverStyle: { bg: "$hover" }, children: [_jsx(Sparkles, { size: 13, "aria-hidden": true, color: "var(--primary)" }), _jsx(Text, { fontSize: "$1", fontWeight: "600", color: "$ink", children: t("Upgrade") })] }) })) : null, _jsxs(XStack, { display: "none", $lg: { display: "flex" }, items: "center", gap: "$1", children: [_jsx(SidebarIconButton, { ...TAP, label: t(aside === "roster" ? "Hide directory & roster" : "Show directory & roster"), onPress: () => showAside(aside === "roster" ? null : "roster"), children: _jsx(Users, { size: 16, "aria-hidden": true }) }), _jsx(SidebarIconButton, { ...TAP, label: t(aside === "tasks" ? "Close side panel" : "Open side panel"), onPress: () => showAside(aside === "tasks" ? null : "tasks"), children: _jsx(PanelRight, { size: 16, "aria-hidden": true, "data-i18n-mirror": "" }) })] }), _jsx(WindowControls, {})] }), children: _jsx(YStack, { width: 420, maxW: "100%", position: "relative", children: _jsxs(Box, { render: "button", onClick: () => setFinding(true), display: "flex", flexDirection: "row", "data-slot": "find", items: "center", "$max-md": { justify: "center" }, gap: "$2", width: "100%", height: CONTROL, px: "$2.5", rounded: "$2", borderWidth: 1, borderColor: "$borderColor", hoverStyle: { bg: "$hover" }, children: [_jsx(SearchIcon, { size: 13, "aria-hidden": true, color: "var(--soft, var(--muted-foreground))" }), _jsx(Text, { fontSize: "$1", color: "$soft", "$max-md": { display: "none" }, children: t("Search {workspace}", { workspace }) }), _jsx(Shortcut, { keys: ["Mod", "K"], marginInlineStart: "auto", "data-i18n-ltr": "", "$max-md": { display: "none" } })] }) }) }) }), shown ? (_jsx(Box, { render: "button", "aria-label": t("Close sidebar"), onClick: dismiss, ...scrim, "data-slot": "scrim", position: "absolute", t: BAR, r: 0, b: TABS_HEIGHT, l: 0, z: "var(--z-scrim)", $md: { display: "none" } })) : null, shown ? (_jsx(XStack, { "data-slot": "list", gridArea: "list", position: asked ? "relative" : "absolute", ...(asked ? {} : { top: BAR, bottom: 0, insetInlineStart: RAIL }), "$max-md": { position: "fixed", t: BAR, r: 0, b: TABS_HEIGHT, l: 0, width: "100%" }, z: "var(--z-drawer)", bg: "$background", onMouseEnter: () => setPeeking(true), onMouseLeave: () => {
|
|
1475
1473
|
if (!asked)
|
|
1476
1474
|
setPeeking(false);
|
|
1477
1475
|
}, children: list })) : null, _jsx(Split, { swap: settingsPane ? _jsx(Suspense, { fallback: null, children: _jsx(SettingsPane, { id: settingsPane }) }) : undefined, children: children }), finding ? (_jsx(Search, { actions: doors, onClose: found,
|
package/dist/Sidebar.js
CHANGED
|
@@ -29,7 +29,7 @@ import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-run
|
|
|
29
29
|
import { locales, phrase } from '@hanzo/i18n';
|
|
30
30
|
import { useI18n } from '@hanzo/i18n/react';
|
|
31
31
|
import { Text, XStack, YStack } from '@hanzo/gui';
|
|
32
|
-
import { ArrowLeft, ArrowRight, Bell, ChevronDown, ChevronUp, Cloud, Globe, Image as ImageMark, Monitor, Puzzle, Search, Sparkles } from 'lucide-react';
|
|
32
|
+
import { ArrowLeft, ArrowRight, Bell, ChevronDown, ChevronUp, Cloud, Globe, Image as ImageMark, Monitor, Puzzle, Search, Settings, Sparkles } from 'lucide-react';
|
|
33
33
|
import { DOTS, Gutter, library, MARKS, NEW, own, tabs, useLanguage, useScheduled, useSessions } from '@hanzo/build';
|
|
34
34
|
import { tidy } from './lib/title.js';
|
|
35
35
|
import { Button, DropdownMenu, Switch } from '@hanzo/ui';
|
|
@@ -38,10 +38,10 @@ import { useEffect, useId, useMemo, useState } from 'react';
|
|
|
38
38
|
import { Made } from './Account.js';
|
|
39
39
|
import { useBetas } from './Betas.js';
|
|
40
40
|
import { Recents } from './Recents.js';
|
|
41
|
-
import { raised } from './Rail.js';
|
|
41
|
+
import { MARK, raised } from './Rail.js';
|
|
42
42
|
import { Setup } from './Setup.js';
|
|
43
43
|
import { ago, UNTITLED_RUN } from './recent.js';
|
|
44
|
-
import { empty } from './open.js';
|
|
44
|
+
import { empty, showSettings } from './open.js';
|
|
45
45
|
import { useSpan } from './span.js';
|
|
46
46
|
import { useFree } from './Upgrade.js';
|
|
47
47
|
import { hosted, talk } from './lib/host.js';
|
|
@@ -68,8 +68,8 @@ const keys = (press) => ({
|
|
|
68
68
|
press();
|
|
69
69
|
},
|
|
70
70
|
});
|
|
71
|
-
/** A row of the sidebar: a full-width
|
|
72
|
-
const ROW = { rounded:
|
|
71
|
+
/** A row of the sidebar: a full-width 40px pill, 44px on a touch screen, lit where the reader is. */
|
|
72
|
+
const ROW = { rounded: 12, minH: 40, py: 0, px: '$3', width: '100%', $touchable: { minH: 44 } };
|
|
73
73
|
/** A sidebar link row spans the column width so hover and active pills align with Recents. */
|
|
74
74
|
const COMPACT_ROW = ROW;
|
|
75
75
|
/** The run activity behind the bell: the runs that moved last, newest first. */
|
|
@@ -350,13 +350,13 @@ export function Sidebar({ host, mode, thread, go, onShut, onSeek, onBack, drawer
|
|
|
350
350
|
empty();
|
|
351
351
|
go(talk());
|
|
352
352
|
};
|
|
353
|
-
return (_jsxs(YStack, { "data-slot": "app-column", ref: drawer ? undefined : span.ref, ...(drawer ? null : { '$platform-web': { '--span': `${span.span}px`, ...(anon ? { overflow: 'visible' } : null) } }), position: "relative",
|
|
353
|
+
return (_jsxs(YStack, { "data-slot": "app-column", ref: drawer ? undefined : span.ref, ...(drawer ? null : { '$platform-web': { '--span': `${span.span}px`, ...(anon ? { overflow: 'visible' } : null) } }), position: "relative", flex: drawer ? 1 : undefined, shrink: drawer ? 1 : 0, minW: 0, height: "100%", width: drawer ? undefined : `var(--span, ${WIDTH}px)`, maxW: drawer ? undefined : `var(--span, ${WIDTH}px)`, bg: drawer ? undefined : "var(--side-fill, var(--sheet-2))", rounded: drawer ? undefined : "var(--pane-round)", borderWidth: drawer ? 0 : 1, borderColor: "var(--pane-edge, var(--edge, var(--white-06)))", children: [_jsxs(Base, { "data-slot": "app-rail", role: "navigation", "aria-label": brand(), bg: "transparent", borderWidth: 0, ...FILL, px: 8, pt: drawer ? 'var(--pane-gap)' : 4,
|
|
354
354
|
// In the drawer the menu's own foot padding is the gap; its foot row stands on it.
|
|
355
|
-
pb: drawer ? 0 :
|
|
355
|
+
pb: drawer ? 0 : '$2', gap: "$0", "$platform-web": anon && !drawer ? { overflow: 'visible' } : undefined, children: [at ? (_jsxs(XStack, { "data-slot": "app-head", items: "center", gap: "$1", paddingInlineStart: 2, paddingInlineEnd: 2,
|
|
356
356
|
// The phone's drawer lines up with its bar (BAND); beside the rail, with the rail's first mark (ground.ts HEAD).
|
|
357
357
|
height: drawer ? BAND : LINE, $touchable: drawer ? undefined : { height: TOUCH_HEAD }, shrink: 0, minW: 0, "data-tauri-drag-region": "deep", onMouseDown: dragWindow, onDoubleClick: toggleWindowMaximize, children: [_jsx(SidebarIconButton, { label: t('Back'), "data-slot": "place-back", "data-tauri-drag-region": "false", onPress: onBack, ...HEAD, children: _jsx(ArrowLeft, { size: 16, "aria-hidden": true, "data-i18n-mirror": true }) }), _jsx(Text, { flex: 1, minW: 0, fontSize: 15, lineHeight: 20, fontWeight: "600", color: "$ink", numberOfLines: 1, "data-slot": "place-name", children: t(TITLE[at]) })] })) : (_jsxs(XStack, { "data-slot": "app-head", items: "center", gap: 2, paddingInlineStart: 8, paddingInlineEnd: 2,
|
|
358
358
|
// The phone's drawer lines up with its bar (BAND); beside the rail, with the rail's first mark (ground.ts HEAD).
|
|
359
|
-
height: drawer ? BAND : LINE, $touchable: drawer ? undefined : { height: TOUCH_HEAD }, shrink: 0, minW: 0, "data-tauri-drag-region": "deep", onMouseDown: dragWindow, onDoubleClick: toggleWindowMaximize, children: [_jsx(XStack, { flex: 1, minW: 0, items: "center", gap: 4, children: _jsx(Text, { fontSize:
|
|
359
|
+
height: drawer ? BAND : LINE, $touchable: drawer ? undefined : { height: TOUCH_HEAD }, shrink: 0, minW: 0, "data-tauri-drag-region": "deep", onMouseDown: dragWindow, onDoubleClick: toggleWindowMaximize, children: [_jsx(XStack, { flex: 1, minW: 0, items: "center", gap: 4, children: _jsx(Text, { fontSize: 17, lineHeight: 24, fontWeight: "600", color: "$ink", numberOfLines: 1, children: wordmark(mode) }) }), drawer || anon ? null : _jsx(Activity, { host: host }), anon ? null : (_jsx(SidebarIconButton, { label: t('Search'), "data-tauri-drag-region": "false", onPress: onSeek, "aria-haspopup": "dialog", ...(drawer
|
|
360
360
|
? {
|
|
361
361
|
width: 40,
|
|
362
362
|
height: 40,
|
|
@@ -391,7 +391,7 @@ export function Sidebar({ host, mode, thread, go, onShut, onSeek, onBack, drawer
|
|
|
391
391
|
}, children: t('Log in') }), _jsx(Button, { size: "sm", flex: 1, rounded: 9999, "data-slot": "column-signup", onPress: () => {
|
|
392
392
|
if (typeof window !== 'undefined')
|
|
393
393
|
window.location.assign('/signup?next=%2Fchat');
|
|
394
|
-
}, children: t('Sign up') })] })] }) })) : at || mode === 'beta' || mode === 'hosted' ? null : (_jsxs(YStack, { gap: "$2", pt: "$2", shrink: 0, minW: 0, maxW: "100%", children: [_jsx(Made, {}), _jsx(Setup, { go: go })] })), !anon && free && (drawer || (mode !== 'beta' && mode !== 'hosted')) ? (_jsx(YStack, { role: "list", gap: 2, shrink: 0, pt: "$2", children: _jsx(YStack, { role: "listitem", minH:
|
|
394
|
+
}, children: t('Sign up') })] })] }) })) : at || mode === 'beta' || mode === 'hosted' ? null : (_jsxs(YStack, { gap: "$2", pt: "$2", shrink: 0, minW: 0, maxW: "100%", children: [_jsx(Made, {}), _jsx(Setup, { go: go })] })), !anon && free && (drawer || (mode !== 'beta' && mode !== 'hosted')) ? (_jsx(YStack, { role: "list", gap: 2, shrink: 0, pt: "$2", children: _jsx(YStack, { role: "listitem", minH: MARK, justify: "center", children: _jsx(SidebarItem, { ...ROW, "data-slot": "column-upgrade", icon: _jsx(XStack, { width: 20, height: 20, items: "center", justify: "center", shrink: 0, children: _jsx(Sparkles, { size: 16, "aria-hidden": true, color: "var(--primary)" }) }), onPress: () => window.location.assign(payUrl('/cart', { returnUrl: window.location.href })), ...keys(() => window.location.assign(payUrl('/cart', { returnUrl: window.location.href }))), children: _jsx(Text, { fontSize: "$3", color: "$ink", children: t('Upgrade plan') }) }) }) })) : null, !anon && !drawer && !at && mode !== 'beta' && mode !== 'hosted' ? (_jsx(YStack, { role: "list", gap: 2, shrink: 0, pt: "$1", children: _jsx(YStack, { role: "listitem", children: _jsx(SidebarItem, { ...ROW, "data-slot": "column-settings", bg: "transparent", hoverStyle: { bg: '$hover' }, icon: _jsx(XStack, { width: 18, height: 18, items: "center", justify: "center", shrink: 0, children: _jsx(Settings, { size: 15, "aria-hidden": true }) }), onPress: () => showSettings('general'), ...keys(() => showSettings('general')), children: _jsx(Text, { fontSize: 14, lineHeight: 20, color: "$ink", children: t('Settings') }) }) }) })) : null, _jsx(UpdatePill, {}), foot] }), drawer ? null : (_jsx(Gutter, { side: dir === 'rtl' ? 'right' : 'left', span: span.span, floor: FLOOR, ceil: CEIL, reset: WIDTH, onSpan: span.move, onKeep: span.keep, onShut: onShut, label: t('Resize sidebar') }))] }));
|
|
395
395
|
}
|
|
396
396
|
function UpdatePill() {
|
|
397
397
|
const { t } = useI18n();
|
package/dist/ToBottom.js
ADDED
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
// A round button that floats above the composer while the thread is not at its
|
|
4
|
+
// end, and takes the reader there. The thread's scroller is @hanzo/ui/chat's
|
|
5
|
+
// (`data-slot="thread"`), so this watches that element rather than owning one:
|
|
6
|
+
// it listens to its scroll and to its content growing, and measures the composer
|
|
7
|
+
// to stand just above it.
|
|
8
|
+
import { useEffect, useState } from 'react';
|
|
9
|
+
import { ArrowDown } from 'lucide-react';
|
|
10
|
+
import { XStack } from '@hanzo/gui';
|
|
11
|
+
import { useI18n } from '@hanzo/i18n/react';
|
|
12
|
+
/** How far from the end still counts as the end, px. */
|
|
13
|
+
const NEAR = 120;
|
|
14
|
+
export function ToBottom({ within }) {
|
|
15
|
+
const { t } = useI18n();
|
|
16
|
+
const [lift, setLift] = useState(null);
|
|
17
|
+
useEffect(() => {
|
|
18
|
+
const box = within;
|
|
19
|
+
if (!box)
|
|
20
|
+
return;
|
|
21
|
+
let thread = null;
|
|
22
|
+
const measure = () => {
|
|
23
|
+
thread = box.querySelector('[data-slot="thread"]');
|
|
24
|
+
if (!thread)
|
|
25
|
+
return setLift(null);
|
|
26
|
+
const far = thread.scrollHeight - thread.clientHeight - thread.scrollTop > NEAR;
|
|
27
|
+
const composer = box.querySelector('[data-slot="composer"]');
|
|
28
|
+
const room = box.getBoundingClientRect();
|
|
29
|
+
const foot = composer ? room.bottom - composer.getBoundingClientRect().top + 12 : 16;
|
|
30
|
+
setLift(far ? foot : null);
|
|
31
|
+
};
|
|
32
|
+
// One measure a frame, however many scrolls, token commits or resizes ask for it.
|
|
33
|
+
let frame = 0;
|
|
34
|
+
const soon = () => {
|
|
35
|
+
if (!frame)
|
|
36
|
+
frame = requestAnimationFrame(() => ((frame = 0), measure()));
|
|
37
|
+
};
|
|
38
|
+
const seen = new MutationObserver(soon);
|
|
39
|
+
seen.observe(box, { childList: true, subtree: true });
|
|
40
|
+
const sized = new ResizeObserver(soon);
|
|
41
|
+
sized.observe(box);
|
|
42
|
+
box.querySelectorAll('[data-slot="thread"], [data-slot="composer"]').forEach((el) => sized.observe(el));
|
|
43
|
+
box.addEventListener('scroll', soon, { capture: true, passive: true });
|
|
44
|
+
window.addEventListener('resize', soon);
|
|
45
|
+
measure();
|
|
46
|
+
return () => {
|
|
47
|
+
cancelAnimationFrame(frame);
|
|
48
|
+
seen.disconnect();
|
|
49
|
+
sized.disconnect();
|
|
50
|
+
box.removeEventListener('scroll', soon, { capture: true });
|
|
51
|
+
window.removeEventListener('resize', soon);
|
|
52
|
+
setLift(null);
|
|
53
|
+
};
|
|
54
|
+
}, [within]);
|
|
55
|
+
if (lift === null)
|
|
56
|
+
return null;
|
|
57
|
+
return (_jsx(XStack, { render: "button", "aria-label": t('Scroll to bottom'), "data-slot": "to-bottom", onPress: () => {
|
|
58
|
+
const thread = within?.querySelector('[data-slot="thread"]');
|
|
59
|
+
thread?.scrollTo({ top: thread.scrollHeight, behavior: window.matchMedia('(prefers-reduced-motion: reduce)').matches ? 'auto' : 'smooth' });
|
|
60
|
+
}, position: "absolute", b: lift, l: "50%", ml: -18, width: 36, height: 36, rounded: 999, items: "center", justify: "center", cursor: "pointer", focusVisibleStyle: { outlineWidth: 2, outlineStyle: 'solid', outlineColor: '$outlineColor' }, bg: "$raised", borderWidth: 1, borderColor: "$borderColor", z: 5, children: _jsx(ArrowDown, { size: 16, "aria-hidden": true }) }));
|
|
61
|
+
}
|
package/dist/ground.d.ts
CHANGED
|
@@ -29,7 +29,7 @@ export declare const BAND = 52;
|
|
|
29
29
|
* top, left, right"). A thumb's mark is 44 on a touch screen, and the rows grow
|
|
30
30
|
* with it (`TOUCH_HEAD`).
|
|
31
31
|
*/
|
|
32
|
-
export declare const HEAD =
|
|
32
|
+
export declare const HEAD = 40;
|
|
33
33
|
export declare const TOUCH_HEAD = 44;
|
|
34
34
|
/**
|
|
35
35
|
* A corner mark's centre from its edge, px: the rail's first mark from the
|
|
@@ -37,9 +37,13 @@ export declare const TOUCH_HEAD = 44;
|
|
|
37
37
|
* mark from the pane's end edge, so the two top corners mirror each other
|
|
38
38
|
* (owner, 2026-10-30: "top left / top right").
|
|
39
39
|
*/
|
|
40
|
-
export declare const INSET =
|
|
40
|
+
export declare const INSET = 28;
|
|
41
|
+
/** The rail's width, px: two insets. */
|
|
42
|
+
export declare const RAIL: number;
|
|
43
|
+
/** The top bar's height, px, on every shell. */
|
|
44
|
+
export declare const BAR = 44;
|
|
41
45
|
/** The sidebar's width before the reader pulls its edge, px. */
|
|
42
|
-
export declare const SIDE =
|
|
46
|
+
export declare const SIDE = 280;
|
|
43
47
|
/**
|
|
44
48
|
* A row INSIDE a pane shares the height of the row it lines up with.
|
|
45
49
|
*/
|
package/dist/ground.js
CHANGED
|
@@ -29,7 +29,7 @@ export const BAND = 52;
|
|
|
29
29
|
* top, left, right"). A thumb's mark is 44 on a touch screen, and the rows grow
|
|
30
30
|
* with it (`TOUCH_HEAD`).
|
|
31
31
|
*/
|
|
32
|
-
export const HEAD =
|
|
32
|
+
export const HEAD = 40;
|
|
33
33
|
export const TOUCH_HEAD = 44;
|
|
34
34
|
/**
|
|
35
35
|
* A corner mark's centre from its edge, px: the rail's first mark from the
|
|
@@ -37,9 +37,13 @@ export const TOUCH_HEAD = 44;
|
|
|
37
37
|
* mark from the pane's end edge, so the two top corners mirror each other
|
|
38
38
|
* (owner, 2026-10-30: "top left / top right").
|
|
39
39
|
*/
|
|
40
|
-
export const INSET =
|
|
40
|
+
export const INSET = 28;
|
|
41
|
+
/** The rail's width, px: two insets. */
|
|
42
|
+
export const RAIL = 2 * INSET;
|
|
43
|
+
/** The top bar's height, px, on every shell. */
|
|
44
|
+
export const BAR = 44;
|
|
41
45
|
/** The sidebar's width before the reader pulls its edge, px. */
|
|
42
|
-
export const SIDE =
|
|
46
|
+
export const SIDE = 280;
|
|
43
47
|
/**
|
|
44
48
|
* A row INSIDE a pane shares the height of the row it lines up with.
|
|
45
49
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hanzo/app",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.73",
|
|
4
4
|
"description": "Hanzo's app: the shell and its apps (Home, Chat, Inbox, Contacts, Meet, Calendar, Drive, Board, Work, Bots), once, for every Hanzo surface.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|