/* * Copyright 2026 Hypergiant Galactic Systems Inc. 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 https://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. */ import { DropItem, TextDropItem } from "@react-types/shared"; //#region src/hooks/use-tree/state/utils.d.ts /** * Filters and processes an array of drop items into parsed tree node data. * * Filters to text items only, then processes each using supported drag types. * * @param items - Drop items from a drag-and-drop event. * @param acceptedDragTypes - MIME types to accept when reading item payloads. * @returns Array of parsed node objects from the dropped items. */ declare function processDroppedItems(items: DropItem[], acceptedDragTypes: string[]): Promise; /** * Processes a single text drop item into parsed tree node data. * * @param item - A text drop item from a drag-and-drop event. * @param acceptedDragTypes - MIME types to attempt reading from the item. * @returns Parsed node object from the first matching drag type payload. * @throws {Error} When no payload matching any accepted drag type is found. */ declare function processDroppedItem(item: TextDropItem, acceptedDragTypes: string[]): Promise; /** * Reads the text payload from a drop item for the first matching drag type. * * Uses `Promise.any` — returns the payload from whichever accepted drag type * resolves first. * * @param item - A text drop item from a drag-and-drop event. * @param acceptedDragTypes - MIME types to attempt reading in order. * @returns The raw text payload string for the first matching drag type. * @throws {AggregateError} When no accepted drag type has a payload. */ declare function getDroppedItemPayload(item: TextDropItem, acceptedDragTypes: string[]): Promise; //#endregion export { getDroppedItemPayload, processDroppedItem, processDroppedItems }; //# sourceMappingURL=utils.d.ts.map