Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
16 commits
Select commit Hold shift + click to select a range
f6d1d04
feat(composer): v0.9 theater data, JSON Pretty tab, drop v0.8 support
GeneralJerel Apr 10, 2026
01c8cd6
fix(composer): rename sidebar nav entry and set v0.9 primary color
GeneralJerel Apr 10, 2026
d1ad6dd
fix(renderer): prevent card right-edge clipping in v0.9 React renderer
GeneralJerel Apr 10, 2026
bd8e46b
feat(renderer): implement weight property and improve card layout
GeneralJerel Apr 10, 2026
84bb2f8
fix(renderer): replace <caption> with <span> for Text caption variant
GeneralJerel Apr 10, 2026
fcc14fb
fix(renderer): convert camelCase icon names to snake_case and add mar…
GeneralJerel Apr 10, 2026
12f0cb8
feat(composer): replace favicon with CopilotKit logo mark
GeneralJerel Apr 10, 2026
40b89ec
fix(gallery): simplify financial data grid and reduce recipe card height
GeneralJerel Apr 10, 2026
994b65e
fix(gallery): prevent card content overflow in gallery previews
GeneralJerel Apr 10, 2026
682d257
fix(renderer): add overflow hidden to Card component
GeneralJerel Apr 10, 2026
4e12a1d
fix(renderer,composer): address PR #1144 code review findings
GeneralJerel Apr 11, 2026
8e64c42
fix(gallery): improve invitation builder layout and add heading styles
GeneralJerel Apr 11, 2026
9fcb685
fix(renderer): address ditman review — ICON_MAP, CHANGELOG, restore d…
GeneralJerel Apr 11, 2026
3bd5c98
refactor(renderer): move weight handling from adapter into basic cata…
GeneralJerel Apr 11, 2026
d7e989f
fix(gallery): scope CSS layout fixes to financial-data-grid and invit…
GeneralJerel Apr 15, 2026
a0cad0b
refactor(composer): rename Basic Components to Basic Catalog
GeneralJerel Apr 15, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions renderers/react/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@

- **BREAKING CHANGE**: Renamed `createReactComponent` to `createComponentImplementation`.
- **BREAKING CHANGE**: Renamed `createBinderlessComponent` to `createBinderlessComponentImplementation`.
- **Fix**: Icon camelCase-to-snake_case conversion no longer prepends underscore to capitalized names. Added `ICON_MAP` for icons that don't follow standard naming (e.g. `play` → `play_arrow`).
- **Fix**: Markdown list parser no longer drops continuation lines within list items.
- **Fix**: Heading variants (`h1`–`h5`) now set explicit `fontSize`/`fontWeight` to work under CSS resets.
- **Fix**: Tabs uses container margin (not leaf) and `overflow: hidden`; tab buttons flex-distribute evenly with text truncation.
- **Fix**: Card adds `overflow: hidden` to contain child content.
- **Fix**: Column adds `minWidth: 0` so flex children can shrink below content size.
- **Fix**: Weight wrapper adds `minHeight: 0` for vertical flex layouts.
- **Refactor**: Moved `weight` flex wrapper from shared adapter into individual basic catalog components.

## 0.8.1

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,21 @@
import React from 'react';
import {createComponentImplementation} from '../../../adapter';
import {AudioPlayerApi} from '@a2ui/web_core/v0_9/basic_catalog';
import {getBaseLeafStyle} from '../utils';
import {getBaseLeafStyle, withWeight} from '../utils';

export const AudioPlayer = createComponentImplementation(AudioPlayerApi, ({props}) => {
const style: React.CSSProperties = {
...getBaseLeafStyle(),
width: '100%',
};

return (
return withWeight(
<div style={{display: 'flex', flexDirection: 'column', gap: '4px', width: '100%'}}>
{props.description && (
<span style={{fontSize: '12px', color: '#666'}}>{props.description}</span>
)}
<audio src={props.url} controls style={style} />
</div>
</div>,
props.weight,
);
});
8 changes: 5 additions & 3 deletions renderers/react/src/v0_9/catalog/basic/components/Button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
import React from 'react';
import {createComponentImplementation} from '../../../adapter';
import {ButtonApi} from '@a2ui/web_core/v0_9/basic_catalog';
import {LEAF_MARGIN} from '../utils';
import {LEAF_MARGIN, withWeight} from '../utils';

export const Button = createComponentImplementation(ButtonApi, ({props, buildChild}) => {
const style: React.CSSProperties = {
Expand All @@ -36,12 +36,14 @@ export const Button = createComponentImplementation(ButtonApi, ({props, buildChi
display: 'inline-flex',
alignItems: 'center',
justifyContent: 'center',
alignSelf: 'flex-start',
boxSizing: 'border-box',
};

return (
return withWeight(
<button style={style} onClick={props.action} disabled={props.isValid === false}>
{props.child ? buildChild(props.child) : null}
</button>
</button>,
props.weight,
);
});
9 changes: 6 additions & 3 deletions renderers/react/src/v0_9/catalog/basic/components/Card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,18 @@
import React from 'react';
import {createComponentImplementation} from '../../../adapter';
import {CardApi} from '@a2ui/web_core/v0_9/basic_catalog';
import {getBaseContainerStyle} from '../utils';
import {getBaseContainerStyle, withWeight} from '../utils';

export const Card = createComponentImplementation(CardApi, ({props, buildChild}) => {
const style: React.CSSProperties = {
...getBaseContainerStyle(),
backgroundColor: '#fff',
boxShadow: '0 2px 4px rgba(0,0,0,0.1)',
width: '100%',
overflow: 'hidden',
};

return <div style={style}>{props.child ? buildChild(props.child) : null}</div>;
return withWeight(
<div style={style}>{props.child ? buildChild(props.child) : null}</div>,
props.weight,
);
});
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
import React from 'react';
import {createComponentImplementation} from '../../../adapter';
import {CheckBoxApi} from '@a2ui/web_core/v0_9/basic_catalog';
import {LEAF_MARGIN} from '../utils';
import {LEAF_MARGIN, withWeight} from '../utils';

export const CheckBox = createComponentImplementation(CheckBoxApi, ({props}) => {
const onChange = (e: React.ChangeEvent<HTMLInputElement>) => {
Expand All @@ -28,7 +28,7 @@ export const CheckBox = createComponentImplementation(CheckBoxApi, ({props}) =>

const hasError = props.validationErrors && props.validationErrors.length > 0;

return (
return withWeight(
<div style={{display: 'flex', flexDirection: 'column', margin: LEAF_MARGIN}}>
<div style={{display: 'flex', alignItems: 'center', gap: '8px'}}>
<input
Expand All @@ -52,6 +52,7 @@ export const CheckBox = createComponentImplementation(CheckBoxApi, ({props}) =>
{props.validationErrors?.[0]}
</span>
)}
</div>
</div>,
props.weight,
);
});
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
import React, {useState} from 'react';
import {createComponentImplementation} from '../../../adapter';
import {ChoicePickerApi} from '@a2ui/web_core/v0_9/basic_catalog';
import {LEAF_MARGIN, STANDARD_BORDER, STANDARD_RADIUS} from '../utils';
import {LEAF_MARGIN, STANDARD_BORDER, STANDARD_RADIUS, withWeight} from '../utils';

// The type of an option is deeply nested into the ChoicePickerApi schema, and
// it seems z.infer is not inferring it correctly (?). We use `any` for now.
Expand Down Expand Up @@ -63,7 +63,7 @@ export const ChoicePicker = createComponentImplementation(ChoicePickerApi, ({pro
gap: '8px',
};

return (
return withWeight(
<div style={containerStyle}>
{props.label && <strong style={{fontSize: '14px'}}>{props.label}</strong>}
{props.filterable && (
Expand Down Expand Up @@ -115,6 +115,7 @@ export const ChoicePicker = createComponentImplementation(ChoicePickerApi, ({pro
);
})}
</div>
</div>
</div>,
props.weight,
);
});
9 changes: 6 additions & 3 deletions renderers/react/src/v0_9/catalog/basic/components/Column.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,22 +17,25 @@
import {createComponentImplementation} from '../../../adapter';
import {ColumnApi} from '@a2ui/web_core/v0_9/basic_catalog';
import {ChildList} from './ChildList';
import {mapJustify, mapAlign} from '../utils';
import {mapJustify, mapAlign, withWeight} from '../utils';

export const Column = createComponentImplementation(ColumnApi, ({props, buildChild, context}) => {
return (
return withWeight(
<div
style={{
display: 'flex',
flexDirection: 'column',
justifyContent: mapJustify(props.justify),
alignItems: mapAlign(props.align),
width: '100%',
// Override flex default min-width:auto so children can shrink below content size.
minWidth: 0,
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't this the default?

margin: 0,
padding: 0,
}}
>
<ChildList childList={props.children} buildChild={buildChild} context={context} />
</div>
</div>,
props.weight,
);
});
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
import React from 'react';
import {createComponentImplementation} from '../../../adapter';
import {DateTimeInputApi} from '@a2ui/web_core/v0_9/basic_catalog';
import {LEAF_MARGIN, STANDARD_BORDER, STANDARD_RADIUS} from '../utils';
import {LEAF_MARGIN, STANDARD_BORDER, STANDARD_RADIUS, withWeight} from '../utils';

export const DateTimeInput = createComponentImplementation(DateTimeInputApi, ({props}) => {
const onChange = (e: React.ChangeEvent<HTMLInputElement>) => {
Expand All @@ -39,7 +39,7 @@ export const DateTimeInput = createComponentImplementation(DateTimeInputApi, ({p
boxSizing: 'border-box',
};

return (
return withWeight(
<div
style={{
display: 'flex',
Expand All @@ -63,6 +63,7 @@ export const DateTimeInput = createComponentImplementation(DateTimeInputApi, ({p
min={typeof props.min === 'string' ? props.min : undefined}
max={typeof props.max === 'string' ? props.max : undefined}
/>
</div>
</div>,
props.weight,
);
});
4 changes: 2 additions & 2 deletions renderers/react/src/v0_9/catalog/basic/components/Divider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
import React from 'react';
import {createComponentImplementation} from '../../../adapter';
import {DividerApi} from '@a2ui/web_core/v0_9/basic_catalog';
import {LEAF_MARGIN} from '../utils';
import {LEAF_MARGIN, withWeight} from '../utils';

export const Divider = createComponentImplementation(DividerApi, ({props}) => {
const isVertical = props.axis === 'vertical';
Expand All @@ -35,5 +35,5 @@ export const Divider = createComponentImplementation(DividerApi, ({props}) => {
style.height = '1px';
}

return <div style={style} />;
return withWeight(<div style={style} />, props.weight);
});
19 changes: 15 additions & 4 deletions renderers/react/src/v0_9/catalog/basic/components/Icon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,21 @@
import React from 'react';
import {createComponentImplementation} from '../../../adapter';
import {IconApi} from '@a2ui/web_core/v0_9/basic_catalog';
import {getBaseLeafStyle} from '../utils';
import {getBaseLeafStyle, withWeight} from '../utils';

/** Explicit map for icon names that don't follow camelCase → snake_case. */
const ICON_MAP: Record<string, string> = {
favoriteOff: 'favorite_border',
play: 'play_arrow',
rewind: 'fast_rewind',
starOff: 'star_border',
};

export const Icon = createComponentImplementation(IconApi, ({props}) => {
const iconName =
const rawName =
typeof props.name === 'string' ? props.name : (props.name as {path?: string})?.path;
const iconName =
ICON_MAP[rawName ?? ''] ?? rawName?.replace(/([a-z])([A-Z])/g, '$1_$2').toLowerCase();
const style: React.CSSProperties = {
...getBaseLeafStyle(),
fontSize: '24px',
Expand All @@ -32,9 +42,10 @@ export const Icon = createComponentImplementation(IconApi, ({props}) => {
justifyContent: 'center',
};

return (
return withWeight(
<span className="material-symbols-outlined" style={style}>
{iconName}
</span>
</span>,
props.weight,
);
});
9 changes: 6 additions & 3 deletions renderers/react/src/v0_9/catalog/basic/components/Image.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
import React from 'react';
import {createComponentImplementation} from '../../../adapter';
import {ImageApi} from '@a2ui/web_core/v0_9/basic_catalog';
import {getBaseLeafStyle} from '../utils';
import {getBaseLeafStyle, withWeight} from '../utils';

export const Image = createComponentImplementation(ImageApi, ({props}) => {
const mapFit = (fit?: string): React.CSSProperties['objectFit'] => {
Expand All @@ -28,7 +28,9 @@ export const Image = createComponentImplementation(ImageApi, ({props}) => {
const style: React.CSSProperties = {
...getBaseLeafStyle(),
objectFit: mapFit(props.fit),
width: '100%',
// Subtract left + right LEAF_MARGIN (8px each) so the image doesn't overflow its parent.
width: `calc(100% - ${2 * 8}px)`,
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What are these 8px? Is this to offset the margin from the base leaf style?

minWidth: 0,
height: 'auto',
display: 'block',
};
Expand All @@ -47,7 +49,8 @@ export const Image = createComponentImplementation(ImageApi, ({props}) => {
} else if (props.variant === 'header') {
style.height = '200px';
style.objectFit = 'cover';
style.borderRadius = '8px';
}

return <img src={props.url} alt={props.description || ''} style={style} />;
return withWeight(<img src={props.url} alt={props.description || ''} style={style} />, props.weight);
});
7 changes: 4 additions & 3 deletions renderers/react/src/v0_9/catalog/basic/components/List.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import React from 'react';
import {createComponentImplementation} from '../../../adapter';
import {ListApi} from '@a2ui/web_core/v0_9/basic_catalog';
import {ChildList} from './ChildList';
import {mapAlign} from '../utils';
import {mapAlign, withWeight} from '../utils';

export const List = createComponentImplementation(ListApi, ({props, buildChild, context}) => {
const isHorizontal = props.direction === 'horizontal';
Expand All @@ -33,9 +33,10 @@ export const List = createComponentImplementation(ListApi, ({props, buildChild,
padding: 0,
};

return (
return withWeight(
<div style={style}>
<ChildList childList={props.children} buildChild={buildChild} context={context} />
</div>
</div>,
props.weight,
);
});
6 changes: 4 additions & 2 deletions renderers/react/src/v0_9/catalog/basic/components/Modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,12 @@
import {useState} from 'react';
import {createComponentImplementation} from '../../../adapter';
import {ModalApi} from '@a2ui/web_core/v0_9/basic_catalog';
import {withWeight} from '../utils';

export const Modal = createComponentImplementation(ModalApi, ({props, buildChild}) => {
const [isOpen, setIsOpen] = useState(false);

return (
return withWeight(
<>
<div onClick={() => setIsOpen(true)} style={{display: 'inline-block'}}>
{props.trigger ? buildChild(props.trigger) : null}
Expand Down Expand Up @@ -73,6 +74,7 @@ export const Modal = createComponentImplementation(ModalApi, ({props, buildChild
</div>
</div>
)}
</>
</>,
props.weight,
);
});
7 changes: 4 additions & 3 deletions renderers/react/src/v0_9/catalog/basic/components/Row.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@
import {createComponentImplementation} from '../../../adapter';
import {RowApi} from '@a2ui/web_core/v0_9/basic_catalog';
import {ChildList} from './ChildList';
import {mapJustify, mapAlign} from '../utils';
import {mapJustify, mapAlign, withWeight} from '../utils';

export const Row = createComponentImplementation(RowApi, ({props, buildChild, context}) => {
return (
return withWeight(
<div
style={{
display: 'flex',
Expand All @@ -33,6 +33,7 @@ export const Row = createComponentImplementation(RowApi, ({props, buildChild, co
}}
>
<ChildList childList={props.children} buildChild={buildChild} context={context} />
</div>
</div>,
props.weight,
);
});
7 changes: 4 additions & 3 deletions renderers/react/src/v0_9/catalog/basic/components/Slider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
import React from 'react';
import {createComponentImplementation} from '../../../adapter';
import {SliderApi} from '@a2ui/web_core/v0_9/basic_catalog';
import {LEAF_MARGIN} from '../utils';
import {LEAF_MARGIN, withWeight} from '../utils';

export const Slider = createComponentImplementation(SliderApi, ({props}) => {
const onChange = (e: React.ChangeEvent<HTMLInputElement>) => {
Expand All @@ -26,7 +26,7 @@ export const Slider = createComponentImplementation(SliderApi, ({props}) => {

const uniqueId = React.useId();

return (
return withWeight(
<div
style={{
display: 'flex',
Expand All @@ -53,6 +53,7 @@ export const Slider = createComponentImplementation(SliderApi, ({props}) => {
onChange={onChange}
style={{width: '100%', cursor: 'pointer'}}
/>
</div>
</div>,
props.weight,
);
});
Loading