Skip to content
Merged
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
15 changes: 2 additions & 13 deletions packages/@react-types/shared/src/collections.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@
* governing permissions and limitations under the License.
*/

import {Key} from '@react-types/shared';
import {Key} from './key';
import {LinkDOMProps} from './dom';
import {ReactElement, ReactNode} from 'react';
import {Rect, Size} from './layout';

export interface ItemProps<T> extends LinkDOMProps {
/** Rendered contents of the item or child items. */
Expand Down Expand Up @@ -132,18 +133,6 @@ export interface KeyboardDelegate {
getKeyForSearch?(search: string, fromKey?: Key | null): Key | null;
}

export interface Rect {
x: number;
y: number;
width: number;
height: number;
}

export interface Size {
width: number;
height: number;
}

/** A LayoutDelegate provides layout information for collection items. */
export interface LayoutDelegate {
/** Returns a rectangle for the item with the given key. */
Expand Down
1 change: 1 addition & 0 deletions packages/@react-types/shared/src/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,4 @@ export * from './labelable';
export * from './orientation';
export * from './locale';
export * from './key';
export * from './layout';
28 changes: 28 additions & 0 deletions packages/@react-types/shared/src/layout.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/*
* Copyright 2026 Adobe. All rights reserved.
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. You may obtain a copy
* of the License at http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
* OF ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/

export interface Point {
x: number;
y: number;
}

export interface Rect {
x: number;
y: number;
width: number;
height: number;
}

export interface Size {
width: number;
height: number;
}
Loading