Files
zeekayandHanzo Dev 5b4732b85b browser(newtab): the answer composer renders through REAL @hanzo/ui
The extension's one React surface (the answer engine) now draws its composer
with the canonical @hanzo/ui components on @hanzo/gui — Textarea (line-driven
auto-grow replaces the DOM-measured resize effect) and the send Button
(isLoading replaces the hand-rolled spinner) — mounted under GuiProvider with
the shipped gui-config, the same substrate web/desktop/mobile share.

Build gains the gui runtime's web resolution (.web.* first, react-native ->
react-native-web, defined process.env); vitest mirrors it with the same
stub/inline recipe @hanzo/ui's own render suites use. newtab budget raised
200 -> 500 deliberately (485.9 measured; the gui runtime is the weight, paid
for one component system across every Hanzo surface). Sign-in copy is
sentence case everywhere, ending the popup-vs-sidebar spec disagreement.

e2e: 29 passed (newtab/popup/sidebar/popup-tools, real Chromium, built
bundle); unit: 272 passed; budgets green. 1.9.42

Co-authored-by: Hanzo Dev <[email protected]>
2026-07-30 10:03:51 -07:00

34 lines
1.2 KiB
TypeScript

/**
* react-native-svg ships CommonJS that re-`require`s ESM, which Node refuses
* under vitest. The suites here assert markup and behaviour, never icon
* geometry, so every SVG element resolves to a plain host element. Same stub
* the @hanzo/ui repo uses for its own render suites.
*/
import { createElement, type ReactNode } from 'react';
const host =
(tag: string) =>
({ children, ...props }: { children?: ReactNode }) =>
createElement(tag, props, children);
export const Svg = host('svg');
export const Circle = host('circle');
export const Ellipse = host('ellipse');
export const G = host('g');
export const Line = host('line');
export const Path = host('path');
export const Polygon = host('polygon');
export const Polyline = host('polyline');
export const Rect = host('rect');
export const Text = host('text');
export const Defs = host('defs');
export const LinearGradient = host('linearGradient');
export const RadialGradient = host('radialGradient');
export const Stop = host('stop');
export const ClipPath = host('clipPath');
export const Mask = host('mask');
export const Use = host('use');
export const Symbol = host('symbol');
export const SvgXml = host('svg');
export default Svg;