Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
16 changes: 8 additions & 8 deletions apps/registry/registry/default/ai-artifact/ai-artifact.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,7 @@ export const AIArtifactCopyButton = forwardRef<
ToolbarButtonProps
>(({ className, onClick, ...rest }, ref) => {
const { copied, copy, labels } = useAIArtifact();
const handleClick = useCallback(
const handleCopyArtifact = useCallback(
(event: React.MouseEvent<HTMLButtonElement>) => {
onClick?.(event);
if (event.defaultPrevented) return;
Expand All @@ -482,7 +482,7 @@ export const AIArtifactCopyButton = forwardRef<
<Button
aria-label={copied ? labels.copied : labels.copy}
className={cn("size-8", className)}
onClick={handleClick}
onClick={handleCopyArtifact}
ref={ref}
size="icon"
type="button"
Expand Down Expand Up @@ -510,7 +510,7 @@ export const AIArtifactEditButton = forwardRef<
ToolbarButtonProps
>(({ className, onClick, ...rest }, ref) => {
const { hasOnEdit, labels, onEdit } = useAIArtifact();
const handleClick = useCallback(
const handleEditArtifact = useCallback(
(event: React.MouseEvent<HTMLButtonElement>) => {
onClick?.(event);
if (event.defaultPrevented) return;
Expand All @@ -523,7 +523,7 @@ export const AIArtifactEditButton = forwardRef<
<Button
aria-label={labels.edit}
className={cn("size-8", className)}
onClick={handleClick}
onClick={handleEditArtifact}
ref={ref}
size="icon"
type="button"
Expand All @@ -547,7 +547,7 @@ export const AIArtifactDownloadButton = forwardRef<
ToolbarButtonProps
>(({ className, onClick, ...rest }, ref) => {
const { download, labels } = useAIArtifact();
const handleClick = useCallback(
const handleDownloadArtifact = useCallback(
(event: React.MouseEvent<HTMLButtonElement>) => {
onClick?.(event);
if (event.defaultPrevented) return;
Expand All @@ -559,7 +559,7 @@ export const AIArtifactDownloadButton = forwardRef<
<Button
aria-label={labels.download}
className={cn("size-8", className)}
onClick={handleClick}
onClick={handleDownloadArtifact}
ref={ref}
size="icon"
type="button"
Expand All @@ -584,7 +584,7 @@ export const AIArtifactFullscreenButton = forwardRef<
ToolbarButtonProps
>(({ className, onClick, ...rest }, ref) => {
const { fullscreen, labels, toggleFullscreen } = useAIArtifact();
const handleClick = useCallback(
const handleToggleArtifactFullscreen = useCallback(
(event: React.MouseEvent<HTMLButtonElement>) => {
onClick?.(event);
if (event.defaultPrevented) return;
Expand All @@ -597,7 +597,7 @@ export const AIArtifactFullscreenButton = forwardRef<
aria-label={fullscreen ? labels.exitFullscreen : labels.enterFullscreen}
aria-pressed={fullscreen}
className={cn("size-8", className)}
onClick={handleClick}
onClick={handleToggleArtifactFullscreen}
ref={ref}
size="icon"
type="button"
Expand Down
8 changes: 4 additions & 4 deletions apps/registry/registry/default/ai-sidebar/ai-sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ export const AISidebarClose = forwardRef<
Omit<ComponentPropsWithoutRef<"button">, "type">
>(({ className, onClick, ...rest }, ref) => {
const { close, labels } = useAISidebar();
const handleClick = useCallback(
const handleCloseSidebar = useCallback(
(event: React.MouseEvent<HTMLButtonElement>) => {
onClick?.(event);
if (event.defaultPrevented) return;
Expand All @@ -340,7 +340,7 @@ export const AISidebarClose = forwardRef<
<Button
aria-label={labels.close}
className={cn("size-8", className)}
onClick={handleClick}
onClick={handleCloseSidebar}
ref={ref}
size="icon"
type="button"
Expand Down Expand Up @@ -413,7 +413,7 @@ export const AISidebarTrigger = forwardRef<
AISidebarTriggerProps
>(({ children, className, onClick, ...rest }, ref) => {
const { labels, openState, toggle } = useAISidebar();
const handleClick = useCallback(
const handleToggleSidebar = useCallback(
(event: React.MouseEvent<HTMLButtonElement>) => {
onClick?.(event);
if (event.defaultPrevented) return;
Expand All @@ -427,7 +427,7 @@ export const AISidebarTrigger = forwardRef<
aria-label={children ? undefined : labels.open}
className={cn(className)}
data-state={openState ? "open" : "closed"}
onClick={handleClick}
onClick={handleToggleSidebar}
ref={ref}
size={children ? "sm" : "icon"}
type="button"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,15 +98,15 @@ const Chip = (props: { event: ActivityEvent }): React.ReactElement => {
const { event } = props;
const tone = event.tone ?? "neutral";
if (event.onActivate) {
const handleClick = (): void => {
const handleActivateEvent = (): void => {
event.onActivate?.();
};
return (
<button
className="flex items-center rounded-full border border-border bg-background px-2 py-1 text-[11px] transition-colors hover:bg-muted/40 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
data-strip-event={event.id}
data-strip-event-tone={tone}
onClick={handleClick}
onClick={handleActivateEvent}
type="button"
>
<ChipBody event={event} />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ export const ChronoEvent = forwardRef<HTMLElement, ChronoEventProps>(
[eventId, forwardedRef, registerEvent],
);

const handleFocus = useCallback(() => {
const handleFocusEvent = useCallback(() => {
setActiveId(eventId);
}, [eventId, setActiveId]);

Expand All @@ -328,7 +328,7 @@ export const ChronoEvent = forwardRef<HTMLElement, ChronoEventProps>(
data-event-id={eventId}
data-featured={featured ? "true" : undefined}
id={eventId}
onFocus={handleFocus}
onFocus={handleFocusEvent}
ref={refCallback}
{...rest}
>
Expand Down
4 changes: 2 additions & 2 deletions apps/registry/registry/default/comment-pin/comment-pin.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ export const CommentPin = forwardRef<HTMLDivElement, CommentPinProps>(
const ariaLabel = showBadge
? `${resolvedLabels.region}, ${unread} ${resolvedLabels.unreadSuffix}`
: resolvedLabels.region;
const handleClick = (): void => {
const handleActivateComment = (): void => {
onActivate?.();
};
const body = (
Expand Down Expand Up @@ -173,7 +173,7 @@ export const CommentPin = forwardRef<HTMLDivElement, CommentPinProps>(
aria-label={ariaLabel}
className="relative inline-flex rounded-full focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
data-comment-pin-trigger
onClick={handleClick}
onClick={handleActivateComment}
type="button"
>
{body}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ export const FloatingToolbar = forwardRef<HTMLDivElement, FloatingToolbarProps>(
>
{actions.map((action) => {
const variant = action.variant ?? "ghost";
const handleClick = (): void => {
const handleActivateToolbarAction = (): void => {
action.onActivate();
};
return (
Expand All @@ -125,7 +125,7 @@ export const FloatingToolbar = forwardRef<HTMLDivElement, FloatingToolbarProps>(
data-variant={variant}
disabled={action.disabled}
key={action.id}
onClick={handleClick}
onClick={handleActivateToolbarAction}
type="button"
>
{action.glyph ? (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,7 @@ function EventNode({
const titleText = typeof event.title === "string" ? event.title : "Event";
const tooltipId = `${event.id}-tooltip`;

const handleClick = (
const handleSelectTimelineEvent = (
mouseEvent: ReactMouseEvent<HTMLButtonElement>,
): void => {
mouseEvent.stopPropagation();
Expand All @@ -433,7 +433,7 @@ function EventNode({
data-event-id={event.id}
data-event-track={event.track ?? ""}
data-selected={active ? "true" : undefined}
onClick={handleClick}
onClick={handleSelectTimelineEvent}
style={{
left: `${(left * 100).toString()}%`,
width: isDuration ? `${(width * 100).toString()}%` : undefined,
Expand Down
4 changes: 2 additions & 2 deletions apps/registry/registry/default/jarvis-dock/jarvis-dock.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,15 +78,15 @@ const ActionButton = (props: {
}): React.ReactElement => {
const { action } = props;
const tone = action.tone ?? "neutral";
const handleClick = (): void => {
const handleActivateAction = (): void => {
action.onActivate();
};
return (
<button
className="group relative flex size-12 flex-col items-center justify-center gap-0.5 rounded-md border border-transparent text-[10px] uppercase tracking-wide text-muted-foreground transition-colors hover:border-border hover:bg-muted/40 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
data-jarvis-action={action.id}
data-jarvis-tone={tone}
onClick={handleClick}
onClick={handleActivateAction}
type="button"
>
<span
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -493,13 +493,13 @@ function FillBlankField({
onChange,
value,
}: FillBlankFieldProps): ReactNode {
const handleChange = useCallback(
const handleBlankValueChange = useCallback(
(event: ChangeEvent<HTMLInputElement>) => {
onChange(event.target.value);
},
[onChange],
);
return <Input id={inputId} onChange={handleChange} value={value} />;
return <Input id={inputId} onChange={handleBlankValueChange} value={value} />;
}

type QuestionFieldProps = {
Expand Down
8 changes: 4 additions & 4 deletions apps/registry/registry/default/map-timeline/map-timeline.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ export const MapTimelineSlider = forwardRef<
>(({ className, ...rest }, ref) => {
const { endYear, labels, setYear, startYear, year } = useTimelineContext();
const sliderId = useId();
const handleChange = (event: ChangeEvent<HTMLInputElement>): void => {
const handleYearChange = (event: ChangeEvent<HTMLInputElement>): void => {
setYear(Number.parseInt(event.target.value, 10));
};
return (
Expand All @@ -383,7 +383,7 @@ export const MapTimelineSlider = forwardRef<
id={sliderId}
max={endYear}
min={startYear}
onChange={handleChange}
onChange={handleYearChange}
ref={ref}
type="range"
value={year}
Expand Down Expand Up @@ -411,7 +411,7 @@ export const MapTimelinePlayButton = forwardRef<
Omit<ComponentPropsWithoutRef<"button">, "aria-pressed" | "onClick" | "type">
>(({ className, ...rest }, ref) => {
const { isPlaying, labels, setIsPlaying } = useTimelineContext();
const handleClick = (): void => {
const handleTogglePlayback = (): void => {
setIsPlaying(!isPlaying);
};
return (
Expand All @@ -423,7 +423,7 @@ export const MapTimelinePlayButton = forwardRef<
className,
)}
data-playing={isPlaying ? "true" : undefined}
onClick={handleClick}
onClick={handleTogglePlayback}
ref={ref}
type="button"
{...rest}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,15 +107,15 @@ const RowBody = (props: { policy: PolicyEntry }): React.ReactElement => {
const Row = (props: { policy: PolicyEntry }): React.ReactElement => {
const { policy } = props;
if (policy.onToggle) {
const handleClick = (): void => {
const handleTogglePolicy = (): void => {
policy.onToggle?.();
};
return (
<button
className="flex w-full items-center gap-2 rounded-md border border-transparent px-2 py-1.5 text-left transition-colors hover:border-border hover:bg-muted/40 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
data-policy-row={policy.id}
data-policy-status={policy.status}
onClick={handleClick}
onClick={handleTogglePolicy}
type="button"
>
<RowBody policy={policy} />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,7 @@ function VariableField({
onValueChange,
value,
}: VariableFieldProps): ReactNode {
const handleChange = useCallback(
const handleVariableValueChange = useCallback(
(event: ChangeEvent<HTMLInputElement>) => {
onValueChange(name, event.target.value);
},
Expand All @@ -417,7 +417,7 @@ function VariableField({
</label>
<Input
id={fieldId}
onChange={handleChange}
onChange={handleVariableValueChange}
placeholder={`Value for ${name}`}
value={value}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,15 +102,15 @@ const RowBody = (props: { edge: RelationshipEdge }): React.ReactElement => {
const Row = (props: { edge: RelationshipEdge }): React.ReactElement => {
const { edge } = props;
if (edge.onActivate) {
const handleClick = (): void => {
const handleActivateRelationship = (): void => {
edge.onActivate?.();
};
return (
<button
className="flex w-full items-center gap-2 rounded-md border border-transparent px-2 py-1.5 text-left transition-colors hover:border-border hover:bg-muted/40 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
data-relationship-direction={edge.direction}
data-relationship-row
onClick={handleClick}
onClick={handleActivateRelationship}
type="button"
>
<RowBody edge={edge} />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,15 +127,15 @@ const RowBody = (props: {
const Row = (props: { assignment: RoutingAssignment }): React.ReactElement => {
const { assignment } = props;
if (assignment.onActivate) {
const handleClick = (): void => {
const handleActivateAssignment = (): void => {
assignment.onActivate?.();
};
return (
<button
className="flex w-full items-center gap-2 rounded-md border border-transparent px-2 py-1.5 text-left transition-colors hover:border-border hover:bg-muted/40 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
data-routing-assignment={assignment.id}
data-routing-role={assignment.role}
onClick={handleClick}
onClick={handleActivateAssignment}
type="button"
>
<RowBody assignment={assignment} />
Expand Down
4 changes: 2 additions & 2 deletions apps/registry/registry/default/run-timeline/run-timeline.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ const PhaseBar = (props: {
};
const ariaLabel = `${STATE_LABEL[state]} ${phase.start} → ${phase.end}`;
if (phase.onActivate) {
const handleClick = (): void => {
const handleActivatePhase = (): void => {
phase.onActivate?.();
};
return (
Expand All @@ -179,7 +179,7 @@ const PhaseBar = (props: {
)}
data-run-phase={phase.id}
data-run-phase-state={state}
onClick={handleClick}
onClick={handleActivatePhase}
style={sharedStyle}
type="button"
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,9 @@ export const TimelineScrubber = forwardRef<
const span = safeEnd - start;
const clamped = clamp(value, start, safeEnd);
const ratio = clamp((clamped - start) / span, 0, 1);
const handleChange = (event: ChangeEvent<HTMLInputElement>): void => {
const handleScrubberValueChange = (
event: ChangeEvent<HTMLInputElement>,
): void => {
onValueChange(clamp(Number(event.target.value), start, safeEnd));
};
return (
Expand All @@ -274,7 +276,7 @@ export const TimelineScrubber = forwardRef<
inputId={inputId}
max={safeEnd}
min={start}
onChange={handleChange}
onChange={handleScrubberValueChange}
ratio={ratio}
scrubberId={inputId}
span={span}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ const Row = (props: {
onSelect?: (id: string) => void;
}): React.ReactElement => {
const { active, bookmark, onSelect } = props;
const handleClick = (): void => {
const handleSelectBookmark = (): void => {
onSelect?.(bookmark.id);
};
const rowClass =
Expand All @@ -84,7 +84,7 @@ const Row = (props: {
)}
data-viewport-bookmark={bookmark.id}
data-viewport-bookmark-active={active}
onClick={handleClick}
onClick={handleSelectBookmark}
type="button"
>
<RowBody bookmark={bookmark} />
Expand Down
Loading
Loading