@dxos/react-ui-list 0.8.2-main.36232bc → 0.8.2-main.5ca3450

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -374,8 +374,8 @@ var TreeProvider = TreeContext.Provider;
374
374
  import { combine as combine2 } from "@atlaskit/pragmatic-drag-and-drop/combine";
375
375
  import { draggable as draggable2, dropTargetForElements as dropTargetForElements2 } from "@atlaskit/pragmatic-drag-and-drop/element/adapter";
376
376
  import { attachInstruction, extractInstruction } from "@atlaskit/pragmatic-drag-and-drop-hitbox/tree-item";
377
+ import { Schema } from "effect";
377
378
  import React7, { memo as memo3, useCallback as useCallback3, useEffect as useEffect3, useMemo, useRef as useRef2, useState as useState3 } from "react";
378
- import { S } from "@dxos/echo-schema";
379
379
  import { invariant as invariant2 } from "@dxos/invariant";
380
380
  import { Treegrid, TreeItem as NaturalTreeItem } from "@dxos/react-ui";
381
381
  import { ghostHover, hoverableControls, hoverableFocusedKeyboardControls, hoverableFocusedWithinControls, mx as mx6 } from "@dxos/react-ui-theme";
@@ -458,12 +458,12 @@ var paddingIndentation = (level, indentation = DEFAULT_INDENTATION) => ({
458
458
  // packages/ui/react-ui-list/src/components/Tree/TreeItem.tsx
459
459
  var __dxlog_file2 = "/home/runner/work/dxos/dxos/packages/ui/react-ui-list/src/components/Tree/TreeItem.tsx";
460
460
  var hoverableDescriptionIcons = "[--icons-color:inherit] hover-hover:[--icons-color:var(--description-text)] hover-hover:hover:[--icons-color:inherit] focus-within:[--icons-color:inherit]";
461
- var TreeDataSchema = S.Struct({
462
- id: S.String,
463
- path: S.Array(S.String),
464
- item: S.Any
461
+ var TreeDataSchema = Schema.Struct({
462
+ id: Schema.String,
463
+ path: Schema.Array(Schema.String),
464
+ item: Schema.Any
465
465
  });
466
- var isTreeData = (data) => S.is(TreeDataSchema)(data);
466
+ var isTreeData = (data) => Schema.is(TreeDataSchema)(data);
467
467
  var RawTreeItem = ({ item, path: _path, last, draggable: _draggable, renderColumns: Columns, canDrop, onOpenChange, onSelect, levelOffset = 2 }) => {
468
468
  const { getItems, getProps, isOpen, isCurrent } = useTree();
469
469
  const items = getItems(item);
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/components/Accordion/AccordionItem.tsx", "../../../src/components/Accordion/AccordionRoot.tsx", "../../../src/components/Accordion/Accordion.tsx", "../../../src/components/List/ListItem.tsx", "../../../src/components/List/ListRoot.tsx", "../../../src/components/List/List.tsx", "../../../src/components/Tree/Tree.tsx", "../../../src/components/Tree/TreeContext.tsx", "../../../src/components/Tree/TreeItem.tsx", "../../../src/components/Tree/TreeItemHeading.tsx", "../../../src/components/Tree/TreeItemToggle.tsx", "../../../src/components/Tree/helpers.ts", "../../../src/util/path.ts"],
4
- "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as AccordionPrimitive from '@radix-ui/react-accordion';\nimport { createContext } from '@radix-ui/react-context';\nimport React, { type PropsWithChildren } from 'react';\n\nimport { Icon, type ThemedClassName } from '@dxos/react-ui';\nimport { mx } from '@dxos/react-ui-theme';\n\nimport { useAccordionContext } from './AccordionRoot';\nimport { type ListItemRecord } from '../List';\n\nconst ACCORDION_ITEM_NAME = 'AccordionItem';\n\ntype AccordionItemContext<T extends ListItemRecord> = {\n item: T;\n};\n\nexport const [AccordionItemProvider, useAccordionItemContext] =\n createContext<AccordionItemContext<any>>(ACCORDION_ITEM_NAME);\n\nexport type AccordionItemProps<T extends ListItemRecord> = ThemedClassName<PropsWithChildren<{ item: T }>>;\n\nexport const AccordionItem = <T extends ListItemRecord>({ children, classNames, item }: AccordionItemProps<T>) => {\n const { getId } = useAccordionContext(ACCORDION_ITEM_NAME);\n\n return (\n <AccordionItemProvider {...{ item }}>\n <AccordionPrimitive.Item value={getId(item)} className={mx('overflow-hidden', classNames)}>\n {children}\n </AccordionPrimitive.Item>\n </AccordionItemProvider>\n );\n};\n\nexport type AccordionItemHeaderProps = ThemedClassName<AccordionPrimitive.AccordionHeaderProps>;\n\nexport const AccordionItemHeader = ({ classNames, children, ...props }: AccordionItemHeaderProps) => {\n return (\n <AccordionPrimitive.Header {...props} className={mx(classNames)}>\n <AccordionPrimitive.Trigger className='group flex items-center p-2 dx-focus-ring-inset is-full text-start'>\n {children}\n <Icon\n icon='ph--caret-right--regular'\n size={4}\n classNames='transition-transform duration-200 group-data-[state=open]:rotate-90'\n />\n </AccordionPrimitive.Trigger>\n </AccordionPrimitive.Header>\n );\n};\n\nexport type AccordionItemBodyProps = ThemedClassName<PropsWithChildren>;\n\nexport const AccordionItemBody = ({ children, classNames }: AccordionItemBodyProps) => {\n return (\n <AccordionPrimitive.Content className='overflow-hidden data-[state=closed]:animate-slideUp data-[state=open]:animate-slideDown'>\n <div role='none' className={mx('p-2', classNames)}>\n {children}\n </div>\n </AccordionPrimitive.Content>\n );\n};\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport * as AccordionPrimitive from '@radix-ui/react-accordion';\nimport { createContext } from '@radix-ui/react-context';\nimport React, { type ReactNode } from 'react';\n\nimport { type ThemedClassName } from '@dxos/react-ui';\nimport { mx } from '@dxos/react-ui-theme';\n\nimport { type ListItemRecord } from '../List';\n\ntype AccordionContext<T extends ListItemRecord> = {\n getId: (item: T) => string;\n};\n\nconst ACCORDION_NAME = 'Accordion';\n\nexport const [AccordionProvider, useAccordionContext] = createContext<AccordionContext<any>>(ACCORDION_NAME);\n\nexport type AccordionRendererProps<T extends ListItemRecord> = {\n items: T[];\n};\n\nconst defaultGetId = <T extends ListItemRecord>(item: T) => (item as any)?.id;\n\nexport type AccordionRootProps<T extends ListItemRecord> = ThemedClassName<\n {\n children?: (props: AccordionRendererProps<T>) => ReactNode;\n items?: T[];\n } & Partial<Pick<AccordionContext<T>, 'getId'>>\n>;\n\nexport const AccordionRoot = <T extends ListItemRecord>({\n classNames,\n items,\n getId = defaultGetId,\n children,\n value,\n defaultValue,\n onValueChange,\n}: AccordionRootProps<T> &\n Pick<AccordionPrimitive.AccordionMultipleProps, 'value' | 'defaultValue' | 'onValueChange'>) => {\n return (\n <AccordionProvider {...{ getId }}>\n <AccordionPrimitive.Root\n type='multiple'\n value={value}\n defaultValue={defaultValue}\n onValueChange={onValueChange}\n className={mx(classNames)}\n >\n {children?.({ items: items ?? [] })}\n </AccordionPrimitive.Root>\n </AccordionProvider>\n );\n};\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { AccordionItem, AccordionItemHeader, AccordionItemBody } from './AccordionItem';\nimport { AccordionRoot } from './AccordionRoot';\n\n// TODO(burdon): Next iteration should be based on Radix UI Accordion:\n// https://www.radix-ui.com/primitives/docs/components/accordion\n// TODO(burdon): Support key navigation.\n\nexport const Accordion = {\n Root: AccordionRoot,\n Item: AccordionItem,\n ItemHeader: AccordionItemHeader,\n ItemBody: AccordionItemBody,\n};\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport { combine } from '@atlaskit/pragmatic-drag-and-drop/combine';\nimport { draggable, dropTargetForElements } from '@atlaskit/pragmatic-drag-and-drop/element/adapter';\nimport { setCustomNativeDragPreview } from '@atlaskit/pragmatic-drag-and-drop/element/set-custom-native-drag-preview';\nimport {\n type Edge,\n attachClosestEdge,\n extractClosestEdge,\n} from '@atlaskit/pragmatic-drag-and-drop-hitbox/closest-edge';\nimport { createContext } from '@radix-ui/react-context';\nimport React, {\n type ComponentProps,\n type HTMLAttributes,\n type MutableRefObject,\n type PropsWithChildren,\n type ReactNode,\n forwardRef,\n useEffect,\n useRef,\n useState,\n} from 'react';\nimport { createPortal } from 'react-dom';\n\nimport { invariant } from '@dxos/invariant';\nimport { Icon, type ThemedClassName, ListItem as NaturalListItem } from '@dxos/react-ui';\nimport { mx } from '@dxos/react-ui-theme';\n\nimport { useListContext } from './ListRoot';\n\nexport type ListItemRecord = {};\n\nexport type ItemDragState =\n | {\n type: 'idle';\n }\n | {\n type: 'preview';\n container: HTMLElement;\n }\n | {\n type: 'is-dragging';\n }\n | {\n type: 'is-dragging-over';\n closestEdge: Edge | null;\n };\n\nexport const idle: ItemDragState = { type: 'idle' };\n\nconst stateStyles: { [Key in ItemDragState['type']]?: HTMLAttributes<HTMLDivElement>['className'] } = {\n 'is-dragging': 'opacity-50',\n};\n\ntype ListItemContext<T extends ListItemRecord> = {\n item: T;\n dragHandleRef: MutableRefObject<HTMLElement | null>;\n};\n\n/**\n * Default context defined for ListItemDragPreview, which is defined outside of ListItem.\n */\nconst defaultContext: ListItemContext<any> = {} as any;\n\nconst LIST_ITEM_NAME = 'ListItem';\n\nexport const [ListItemProvider, useListItemContext] = createContext<ListItemContext<any>>(\n LIST_ITEM_NAME,\n defaultContext,\n);\n\nexport type ListItemProps<T extends ListItemRecord> = ThemedClassName<\n PropsWithChildren<{\n item: T;\n }> &\n HTMLAttributes<HTMLDivElement>\n>;\n\n/**\n * Draggable list item.\n */\nexport const ListItem = <T extends ListItemRecord>({ children, classNames, item, ...props }: ListItemProps<T>) => {\n const { isItem, dragPreview, setState: setRootState } = useListContext(LIST_ITEM_NAME);\n const ref = useRef<HTMLDivElement | null>(null);\n const dragHandleRef = useRef<HTMLElement | null>(null);\n const [state, setState] = useState<ItemDragState>(idle);\n useEffect(() => {\n const element = ref.current;\n invariant(element);\n return combine(\n //\n // https://atlassian.design/components/pragmatic-drag-and-drop/core-package/adapters/element/about#draggable\n //\n draggable({\n element,\n dragHandle: dragHandleRef.current!,\n getInitialData: () => item,\n onGenerateDragPreview: dragPreview\n ? ({ nativeSetDragImage, source }) => {\n const rect = source.element.getBoundingClientRect();\n setCustomNativeDragPreview({\n nativeSetDragImage,\n getOffset: ({ container }) => {\n const { height } = container.getBoundingClientRect();\n return {\n x: 20,\n y: height / 2,\n };\n },\n render: ({ container }) => {\n container.style.width = rect.width + 'px';\n setState({ type: 'preview', container });\n setRootState({ type: 'preview', container, item });\n return () => {}; // TODO(burdon): Cleanup.\n },\n });\n }\n : undefined,\n onDragStart: () => {\n setState({ type: 'is-dragging' });\n setRootState({ type: 'is-dragging', item });\n },\n onDrop: () => {\n setState(idle);\n setRootState(idle);\n },\n }),\n\n //\n // https://atlassian.design/components/pragmatic-drag-and-drop/core-package/adapters/element/about#drop-target-for-elements\n //\n dropTargetForElements({\n element,\n canDrop: ({ source }) => {\n return source.element !== element && isItem(source.data);\n },\n getData: ({ input }) => {\n return attachClosestEdge(item, { element, input, allowedEdges: ['top', 'bottom'] });\n },\n getIsSticky: () => true,\n onDragEnter: ({ self }) => {\n const closestEdge = extractClosestEdge(self.data);\n setState({ type: 'is-dragging-over', closestEdge });\n },\n onDrag: ({ self }) => {\n const closestEdge = extractClosestEdge(self.data);\n setState((current) => {\n if (current.type === 'is-dragging-over' && current.closestEdge === closestEdge) {\n return current;\n }\n return { type: 'is-dragging-over', closestEdge };\n });\n },\n onDragLeave: () => {\n setState(idle);\n },\n onDrop: () => {\n setState(idle);\n },\n }),\n );\n }, [item]);\n\n return (\n <ListItemProvider item={item} dragHandleRef={dragHandleRef}>\n <div role='none' className='relative'>\n <div\n ref={ref}\n role='listitem'\n className={mx('flex overflow-hidden', classNames, stateStyles[state.type])}\n {...props}\n >\n {children}\n </div>\n {state.type === 'is-dragging-over' && state.closestEdge && (\n <NaturalListItem.DropIndicator edge={state.closestEdge} />\n )}\n </div>\n </ListItemProvider>\n );\n};\n\n//\n// List item components\n//\n\nexport type IconButtonProps = ThemedClassName<ComponentProps<'button'>> & { icon: string };\n\nexport const IconButton = forwardRef<HTMLButtonElement, IconButtonProps>(\n ({ classNames, icon, ...props }, forwardedRef) => {\n return (\n <button ref={forwardedRef} className={mx('flex items-center justify-center', classNames)} {...props}>\n <Icon icon={icon} classNames='cursor-pointer' size={4} />\n </button>\n );\n },\n);\n\nexport const ListItemDeleteButton = ({\n autoHide = true,\n classNames,\n disabled,\n icon = 'ph--x--regular',\n ...props\n}: Partial<Pick<IconButtonProps, 'icon'>> & Omit<IconButtonProps, 'icon'> & { autoHide?: boolean }) => {\n const { state } = useListContext('DELETE_BUTTON');\n const isDisabled = state.type !== 'idle' || disabled;\n return (\n <IconButton\n icon={icon}\n disabled={isDisabled}\n classNames={[classNames, autoHide && disabled && 'hidden']}\n {...props}\n />\n );\n};\n\nexport const ListItemButton = ({\n autoHide = true,\n classNames,\n disabled,\n ...props\n}: IconButtonProps & { autoHide?: boolean }) => {\n const { state } = useListContext('ITEM_BUTTON');\n const isDisabled = state.type !== 'idle' || disabled;\n return <IconButton disabled={isDisabled} classNames={[classNames, autoHide && disabled && 'hidden']} {...props} />;\n};\n\nexport const ListItemDragHandle = () => {\n const { dragHandleRef } = useListItemContext('DRAG_HANDLE');\n return <IconButton ref={dragHandleRef as any} icon='ph--dots-six-vertical--regular' />;\n};\n\nexport const ListItemDragPreview = <T extends ListItemRecord>({\n children,\n}: {\n children: ({ item }: { item: T }) => ReactNode;\n}) => {\n const { state } = useListContext('DRAG_PREVIEW');\n return state?.type === 'preview' ? createPortal(children({ item: state.item }), state.container) : null;\n};\n\nexport const ListItemWrapper = ({ classNames, children }: ThemedClassName<PropsWithChildren>) => (\n <div className={mx('flex is-full gap-2', classNames)}>{children}</div>\n);\n\nexport const ListItemTitle = ({\n classNames,\n children,\n ...props\n}: ThemedClassName<PropsWithChildren<ComponentProps<'div'>>>) => (\n <div className={mx('flex grow items-center truncate', classNames)} {...props}>\n {children}\n </div>\n);\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport { monitorForElements } from '@atlaskit/pragmatic-drag-and-drop/element/adapter';\nimport { extractClosestEdge } from '@atlaskit/pragmatic-drag-and-drop-hitbox/closest-edge';\nimport { getReorderDestinationIndex } from '@atlaskit/pragmatic-drag-and-drop-hitbox/util/get-reorder-destination-index';\nimport { createContext } from '@radix-ui/react-context';\nimport React, { type ReactNode, useCallback, useEffect, useState } from 'react';\n\nimport { idle, type ItemDragState, type ListItemRecord } from './ListItem';\n\ntype ListContext<T extends ListItemRecord> = {\n // TODO(burdon): Rename drag state.\n state: ItemDragState & { item?: T };\n setState: (state: ItemDragState & { item?: T }) => void;\n dragPreview?: boolean;\n isItem: (item: any) => boolean;\n getId?: (item: T) => string; // TODO(burdon): Require if T doesn't conform to type.\n};\n\nconst LIST_NAME = 'List';\n\nexport const [ListProvider, useListContext] = createContext<ListContext<any>>(LIST_NAME);\n\nexport type ListRendererProps<T extends ListItemRecord> = {\n state: ListContext<T>['state'];\n items: T[];\n};\n\nconst defaultGetId = <T extends ListItemRecord>(item: T) => (item as any)?.id;\n\nexport type ListRootProps<T extends ListItemRecord> = {\n children?: (props: ListRendererProps<T>) => ReactNode;\n items?: T[];\n onMove?: (fromIndex: number, toIndex: number) => void;\n} & Pick<ListContext<T>, 'isItem' | 'getId' | 'dragPreview'>;\n\nexport const ListRoot = <T extends ListItemRecord>({\n children,\n items,\n isItem,\n getId = defaultGetId,\n onMove,\n ...props\n}: ListRootProps<T>) => {\n const isEqual = useCallback(\n (a: T, b: T) => {\n const idA = getId?.(a);\n const idB = getId?.(b);\n\n if (idA !== undefined && idB !== undefined) {\n return idA === idB;\n } else {\n // Fallback for primitive values or when getId fails.\n // NOTE(ZaymonFC): After drag and drop, pragmatic internally serializes drop targets which breaks reference equality.\n // You must provide an `getId` function that returns a stable identifier for your items.\n return a === b;\n }\n },\n [getId],\n );\n\n const [state, setState] = useState<ListContext<T>['state']>(idle);\n useEffect(() => {\n if (!items) {\n return;\n }\n\n return monitorForElements({\n canMonitor: ({ source }) => isItem(source.data),\n onDrop: ({ location, source }) => {\n const target = location.current.dropTargets[0];\n if (!target) {\n return;\n }\n\n const sourceData = source.data;\n const targetData = target.data;\n\n if (!isItem(sourceData) || !isItem(targetData)) {\n return;\n }\n\n const sourceIdx = items.findIndex((item) => isEqual(item, sourceData as T));\n const targetIdx = items.findIndex((item) => isEqual(item, targetData as T));\n if (targetIdx < 0 || sourceIdx < 0) {\n return;\n }\n const closestEdgeOfTarget = extractClosestEdge(targetData);\n const destinationIndex = getReorderDestinationIndex({\n closestEdgeOfTarget,\n startIndex: sourceIdx,\n indexOfTarget: targetIdx,\n axis: 'vertical',\n });\n\n onMove?.(sourceIdx, destinationIndex);\n },\n });\n }, [items, isEqual, onMove]);\n\n return (\n <ListProvider {...{ state, setState, isItem, ...props }}>{children?.({ state, items: items ?? [] })}</ListProvider>\n );\n};\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport {\n IconButton,\n type IconButtonProps,\n ListItem,\n ListItemDeleteButton,\n ListItemButton,\n ListItemDragHandle,\n ListItemDragPreview,\n type ListItemProps,\n type ListItemRecord,\n ListItemTitle,\n ListItemWrapper,\n} from './ListItem';\nimport { ListRoot, type ListRootProps } from './ListRoot';\n\n// TODO(burdon): Multi-select model.\n// TODO(burdon): Key nav.\n// TODO(burdon): Animation.\n// TODO(burdon): Constrain axis.\n// TODO(burdon): Tree view.\n// TODO(burdon): Fix autoscroll while dragging.\n\n/**\n * Draggable list.\n * Ref: https://github.com/atlassian/pragmatic-drag-and-drop\n * Ref: https://github.com/alexreardon/pdnd-react-tailwind/blob/main/src/task.tsx\n */\nexport const List = {\n Root: ListRoot,\n Item: ListItem,\n ItemDragPreview: ListItemDragPreview,\n ItemWrapper: ListItemWrapper,\n ItemDragHandle: ListItemDragHandle,\n ItemDeleteButton: ListItemDeleteButton,\n ItemButton: ListItemButton,\n ItemTitle: ListItemTitle,\n IconButton,\n};\n\ntype ListItem = ListItemRecord;\n\nexport type { ListRootProps, ListItemProps, IconButtonProps, ListItem, ListItemRecord };\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport React, { useMemo } from 'react';\n\nimport { Treegrid, type TreegridRootProps } from '@dxos/react-ui';\n\nimport { type TreeContextType, TreeProvider } from './TreeContext';\nimport { TreeItem, type TreeItemProps } from './TreeItem';\n\nexport type TreeProps<T = any> = { root?: T; path?: string[]; id: string } & TreeContextType &\n Partial<Pick<TreegridRootProps, 'gridTemplateColumns' | 'classNames'>> &\n Pick<TreeItemProps<T>, 'draggable' | 'renderColumns' | 'canDrop' | 'onOpenChange' | 'onSelect' | 'levelOffset'>;\n\nexport const Tree = <T = any,>({\n root,\n path,\n id,\n getItems,\n getProps,\n isOpen,\n isCurrent,\n draggable = false,\n gridTemplateColumns = '[tree-row-start] 1fr min-content [tree-row-end]',\n classNames,\n renderColumns,\n canDrop,\n onOpenChange,\n onSelect,\n levelOffset,\n}: TreeProps<T>) => {\n const context = useMemo(\n () => ({\n getItems,\n getProps,\n isOpen,\n isCurrent,\n }),\n [getItems, getProps, isOpen, isCurrent],\n );\n const items = getItems(root);\n const treePath = useMemo(() => (path ? [...path, id] : [id]), [id, path]);\n\n return (\n <Treegrid.Root gridTemplateColumns={gridTemplateColumns} classNames={classNames}>\n <TreeProvider value={context}>\n {items.map((item, index) => (\n <TreeItem\n key={item.id}\n item={item}\n last={index === items.length - 1}\n path={treePath}\n levelOffset={levelOffset}\n draggable={draggable}\n renderColumns={renderColumns}\n canDrop={canDrop}\n onOpenChange={onOpenChange}\n onSelect={onSelect}\n />\n ))}\n </TreeProvider>\n </Treegrid.Root>\n );\n};\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport { createContext, useContext } from 'react';\n\nimport { raise } from '@dxos/debug';\nimport { type Label } from '@dxos/react-ui';\n\nexport type PropsFromTreeItem = {\n id: string;\n label: Label;\n parentOf?: string[];\n icon?: string;\n disabled?: boolean;\n className?: string;\n headingClassName?: string;\n testId?: string;\n};\n\nexport type TreeContextType<T = any> = {\n getItems: (parent?: T) => T[];\n getProps: (item: T, parent: string[]) => PropsFromTreeItem;\n isOpen: (path: string[], item: T) => boolean;\n isCurrent: (path: string[], item: T) => boolean;\n};\n\nconst TreeContext = createContext<null | TreeContextType>(null);\n\nexport const useTree = () => useContext(TreeContext) ?? raise(new Error('TreeContext not found'));\n\nexport const TreeProvider = TreeContext.Provider;\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport { combine } from '@atlaskit/pragmatic-drag-and-drop/combine';\nimport { draggable, dropTargetForElements } from '@atlaskit/pragmatic-drag-and-drop/element/adapter';\nimport {\n attachInstruction,\n extractInstruction,\n type Instruction,\n type ItemMode,\n} from '@atlaskit/pragmatic-drag-and-drop-hitbox/tree-item';\nimport React, { memo, useCallback, useEffect, useMemo, useRef, useState, type FC, type KeyboardEvent } from 'react';\n\nimport { S } from '@dxos/echo-schema';\nimport { invariant } from '@dxos/invariant';\nimport { Treegrid, TreeItem as NaturalTreeItem } from '@dxos/react-ui';\nimport {\n ghostHover,\n hoverableControls,\n hoverableFocusedKeyboardControls,\n hoverableFocusedWithinControls,\n mx,\n} from '@dxos/react-ui-theme';\n\nimport { useTree } from './TreeContext';\nimport { TreeItemHeading } from './TreeItemHeading';\nimport { TreeItemToggle } from './TreeItemToggle';\nimport { DEFAULT_INDENTATION, paddingIndentation } from './helpers';\n\ntype TreeItemState = 'idle' | 'dragging' | 'preview' | 'parent-of-instruction';\n\nconst hoverableDescriptionIcons =\n '[--icons-color:inherit] hover-hover:[--icons-color:var(--description-text)] hover-hover:hover:[--icons-color:inherit] focus-within:[--icons-color:inherit]';\n\nexport const TreeDataSchema = S.Struct({\n id: S.String,\n path: S.Array(S.String),\n item: S.Any,\n});\n\nexport type TreeData = S.Schema.Type<typeof TreeDataSchema>;\n\nexport const isTreeData = (data: unknown): data is TreeData => S.is(TreeDataSchema)(data);\n\nexport type TreeItemProps<T = any> = {\n item: T;\n path: string[];\n levelOffset?: number;\n last: boolean;\n draggable?: boolean;\n renderColumns?: FC<{\n item: T;\n path: string[];\n open: boolean;\n menuOpen: boolean;\n setMenuOpen: (open: boolean) => void;\n }>;\n canDrop?: (source: TreeData, target: TreeData) => boolean;\n onOpenChange?: (params: { item: T; path: string[]; open: boolean }) => void;\n onSelect?: (params: { item: T; path: string[]; current: boolean; option: boolean }) => void;\n};\n\nexport const RawTreeItem = <T = any,>({\n item,\n path: _path,\n last,\n draggable: _draggable,\n renderColumns: Columns,\n canDrop,\n onOpenChange,\n onSelect,\n levelOffset = 2,\n}: TreeItemProps<T>) => {\n const { getItems, getProps, isOpen, isCurrent } = useTree();\n const items = getItems(item);\n const { id, label, parentOf, icon, disabled, className, headingClassName, testId } = getProps(item, _path);\n const path = useMemo(() => [..._path, id], [_path, id]);\n const open = isOpen(path, item);\n const current = isCurrent(path, item);\n const level = path.length - levelOffset;\n const isBranch = !!parentOf;\n const mode: ItemMode = last ? 'last-in-group' : open ? 'expanded' : 'standard';\n const data = useMemo(() => ({ id, path, item }) satisfies TreeData, [id, path, item]);\n\n const rowRef = useRef<HTMLDivElement | null>(null);\n const buttonRef = useRef<HTMLButtonElement | null>(null);\n const openRef = useRef(false);\n const cancelExpandRef = useRef<NodeJS.Timeout | null>(null);\n const [_state, setState] = useState<TreeItemState>('idle');\n const [instruction, setInstruction] = useState<Instruction | null>(null);\n const [menuOpen, setMenuOpen] = useState(false);\n\n const cancelExpand = useCallback(() => {\n if (cancelExpandRef.current) {\n clearTimeout(cancelExpandRef.current);\n cancelExpandRef.current = null;\n }\n }, []);\n\n useEffect(() => {\n if (!_draggable) {\n return;\n }\n\n invariant(buttonRef.current);\n\n // https://atlassian.design/components/pragmatic-drag-and-drop/core-package/adapters/element/about\n return combine(\n draggable({\n element: buttonRef.current,\n getInitialData: () => data,\n onDragStart: () => {\n setState('dragging');\n if (open) {\n openRef.current = true;\n onOpenChange?.({ item, path, open: false });\n }\n },\n onDrop: () => {\n setState('idle');\n if (openRef.current) {\n onOpenChange?.({ item, path, open: true });\n }\n },\n }),\n // https://github.com/atlassian/pragmatic-drag-and-drop/blob/main/packages/hitbox/constellation/index/about.mdx\n dropTargetForElements({\n element: buttonRef.current,\n getData: ({ input, element }) => {\n return attachInstruction(data, {\n input,\n element,\n indentPerLevel: DEFAULT_INDENTATION,\n currentLevel: level,\n mode,\n block: isBranch ? [] : ['make-child'],\n });\n },\n canDrop: ({ source }) => {\n const _canDrop = canDrop ?? (() => true);\n return source.element !== buttonRef.current && _canDrop(source.data as TreeData, data);\n },\n getIsSticky: () => true,\n onDrag: ({ self, source }) => {\n const instruction = extractInstruction(self.data);\n\n if (source.data.id !== id) {\n if (instruction?.type === 'make-child' && isBranch && !open && !cancelExpandRef.current) {\n cancelExpandRef.current = setTimeout(() => {\n onOpenChange?.({ item, path, open: true });\n }, 500);\n }\n\n if (instruction?.type !== 'make-child') {\n cancelExpand();\n }\n\n setInstruction(instruction);\n } else if (instruction?.type === 'reparent') {\n // TODO(wittjosiah): This is not occurring in the current implementation.\n setInstruction(instruction);\n } else {\n setInstruction(null);\n }\n },\n onDragLeave: () => {\n cancelExpand();\n setInstruction(null);\n },\n onDrop: () => {\n cancelExpand();\n setInstruction(null);\n },\n }),\n );\n }, [_draggable, item, id, mode, path, open, canDrop]);\n\n // Cancel expand on unmount.\n useEffect(() => () => cancelExpand(), [cancelExpand]);\n\n const handleOpenChange = useCallback(\n () => onOpenChange?.({ item, path, open: !open }),\n [onOpenChange, item, path, open],\n );\n\n const handleSelect = useCallback(\n (option = false) => {\n if (isBranch) {\n handleOpenChange();\n } else {\n rowRef.current?.focus();\n onSelect?.({ item, path, current: !current, option });\n }\n },\n [item, path, current, isBranch, handleOpenChange, onSelect],\n );\n\n const handleKeyDown = useCallback(\n (event: KeyboardEvent) => {\n switch (event.key) {\n case 'ArrowRight':\n isBranch && !open && handleOpenChange();\n break;\n case 'ArrowLeft':\n isBranch && open && handleOpenChange();\n break;\n case ' ':\n handleSelect(event.altKey);\n break;\n }\n },\n [isBranch, open, handleOpenChange, handleSelect],\n );\n\n return (\n <>\n <Treegrid.Row\n ref={rowRef}\n key={id}\n id={id}\n aria-labelledby={`${id}__label`}\n parentOf={parentOf?.join(Treegrid.PARENT_OF_SEPARATOR)}\n classNames={mx(\n 'grid grid-cols-subgrid col-[tree-row] mbs-0.5 aria-[current]:bg-groupSurface',\n hoverableControls,\n hoverableFocusedKeyboardControls,\n hoverableFocusedWithinControls,\n hoverableDescriptionIcons,\n ghostHover,\n className,\n )}\n data-itemid={id}\n data-testid={testId}\n // NOTE(thure): This is intentionally an empty string to for descendents to select by in the CSS\n // without alerting the user (except for in the correct link element). See also:\n // https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-current#description\n aria-current={current ? ('' as 'page') : undefined}\n onKeyDown={handleKeyDown}\n onContextMenu={(event) => {\n event.preventDefault();\n setMenuOpen(true);\n }}\n >\n <Treegrid.Cell\n indent\n classNames='relative grid grid-cols-subgrid col-[tree-row]'\n style={paddingIndentation(level)}\n >\n <div role='none' className='flex items-center'>\n <TreeItemToggle isBranch={isBranch} open={open} onToggle={handleOpenChange} />\n <TreeItemHeading\n ref={buttonRef}\n label={label}\n icon={icon}\n className={headingClassName}\n disabled={disabled}\n current={current}\n onSelect={handleSelect}\n />\n </div>\n {Columns && <Columns item={item} path={path} open={open} menuOpen={menuOpen} setMenuOpen={setMenuOpen} />}\n {instruction && <NaturalTreeItem.DropIndicator instruction={instruction} gap={2} />}\n </Treegrid.Cell>\n </Treegrid.Row>\n {open &&\n items.map((item, index) => (\n <TreeItem\n key={item.id}\n item={item}\n path={path}\n last={index === items.length - 1}\n draggable={_draggable}\n renderColumns={Columns}\n canDrop={canDrop}\n onOpenChange={onOpenChange}\n onSelect={onSelect}\n />\n ))}\n </>\n );\n};\n\nexport const TreeItem = memo(RawTreeItem) as FC<TreeItemProps>;\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport React, { type KeyboardEvent, type MouseEvent, forwardRef, memo, useCallback } from 'react';\n\nimport { Button, Icon, toLocalizedString, useTranslation, type Label } from '@dxos/react-ui';\nimport { TextTooltip } from '@dxos/react-ui-text-tooltip';\nimport { mx } from '@dxos/react-ui-theme';\n\n// TODO(wittjosiah): Consider whether there should be a separate disabled prop which was visually distinct\n// rather than just making the item unselectable.\nexport type NavTreeItemHeadingProps = {\n label: Label;\n icon?: string;\n className?: string;\n disabled?: boolean;\n current?: boolean;\n onSelect?: (option: boolean) => void;\n};\n\nexport const TreeItemHeading = memo(\n forwardRef<HTMLButtonElement, NavTreeItemHeadingProps>(\n ({ label, icon, className, disabled, current, onSelect }, forwardedRef) => {\n const { t } = useTranslation();\n\n const handleSelect = useCallback(\n (event: MouseEvent) => {\n onSelect?.(event.altKey);\n },\n [onSelect],\n );\n\n const handleButtonKeydown = useCallback(\n (event: KeyboardEvent) => {\n if (event.key === ' ' || event.key === 'Enter') {\n event.preventDefault();\n event.stopPropagation();\n onSelect?.(event.altKey);\n }\n },\n [onSelect],\n );\n\n return (\n <TextTooltip\n text={toLocalizedString(label, t)}\n side='bottom'\n truncateQuery='span[data-tooltip]'\n onlyWhenTruncating\n asChild\n ref={forwardedRef}\n >\n <Button\n data-testid='treeItem.heading'\n variant='ghost'\n density='fine'\n classNames={mx(\n 'grow gap-2 pis-0.5 hover:bg-transparent dark:hover:bg-transparent',\n 'disabled:cursor-default disabled:opacity-100',\n className,\n )}\n disabled={disabled}\n onClick={handleSelect}\n onKeyDown={handleButtonKeydown}\n {...(current && { 'aria-current': 'location' })}\n >\n {icon && <Icon icon={icon ?? 'ph--placeholder--regular'} size={5} classNames='mlb-1' />}\n <span className='flex-1 is-0 truncate text-start text-sm font-normal' data-tooltip>\n {toLocalizedString(label, t)}\n </span>\n </Button>\n </TextTooltip>\n );\n },\n ),\n);\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport React, { forwardRef, memo } from 'react';\n\nimport { Button, Icon } from '@dxos/react-ui';\nimport { mx } from '@dxos/react-ui-theme';\n\nexport type TreeItemToggleProps = {\n open?: boolean;\n isBranch?: boolean;\n onToggle?: () => void;\n hidden?: boolean;\n};\n\nexport const TreeItemToggle = memo(\n forwardRef<HTMLButtonElement, TreeItemToggleProps>(({ open, isBranch, hidden, onToggle }, forwardedRef) => {\n return (\n <Button\n ref={forwardedRef}\n data-testid='treeItem.toggle'\n aria-expanded={open}\n variant='ghost'\n density='fine'\n classNames={mx('is-6 pli-0 dx-focus-ring-inset', hidden ? 'hidden' : !isBranch && 'invisible')}\n onClick={onToggle}\n >\n <Icon icon='ph--caret-right--bold' size={3} classNames={mx('transition duration-200', open && 'rotate-90')} />\n </Button>\n );\n }),\n);\n", "//\n// Copyright 2024 DXOS.org\n//\n\nexport const DEFAULT_INDENTATION = 8;\n\nexport const paddingIndentation = (level: number, indentation = DEFAULT_INDENTATION) => ({\n paddingInlineStart: `${(level - 1) * indentation}px`,\n});\n", "//\n// Copyright 2023 DXOS.org\n//\n\nconst SEPARATOR = '+';\n\nexport const Path = {\n create: (...args: string[]) => args.join(SEPARATOR),\n\n parts: (path: string) => path.split(SEPARATOR),\n length: (path: string) => path.split(SEPARATOR).length,\n first: (path: string) => path.split(SEPARATOR)[0] ?? path,\n last: (path: string) => path.split(SEPARATOR).at(-1) ?? path,\n parent: (path: string) => path.split(SEPARATOR).slice(0, -1).join(SEPARATOR),\n\n hasRoot: (path: string, id: string) => Path.first(path) === id,\n hasChild: (path: string, compare: string) => Path.parent(compare) === path,\n hasDescendent: (path: string, compare: string) => compare !== path && compare.startsWith(path),\n siblings: (path: string, compare: string) => Path.parent(path) === Path.parent(compare),\n onPath: (path: string, id: string) => Path.parts(path).includes(id),\n};\n"],
5
- "mappings": ";AAIA,YAAYA,yBAAwB;AACpC,SAASC,iBAAAA,sBAAqB;AAC9B,OAAOC,YAAuC;AAE9C,SAASC,YAAkC;AAC3C,SAASC,MAAAA,WAAU;;;ACLnB,YAAYC,wBAAwB;AACpC,SAASC,qBAAqB;AAC9B,OAAOC,WAA+B;AAGtC,SAASC,UAAU;AAQnB,IAAMC,iBAAiB;AAEhB,IAAM,CAACC,mBAAmBC,mBAAAA,IAAuBC,cAAqCH,cAAAA;AAM7F,IAAMI,eAAe,CAA2BC,SAAaA,MAAcC;AASpE,IAAMC,gBAAgB,CAA2B,EACtDC,YACAC,OACAC,QAAQN,cACRO,UACAC,OACAC,cACAC,cAAa,MAE8E;AAC3F,SACE,sBAAA,cAACb,mBAAsB;IAAES;EAAM,GAC7B,sBAAA,cAAoBK,yBAAI;IACtBC,MAAK;IACLJ;IACAC;IACAC;IACAG,WAAWC,GAAGV,UAAAA;KAEbG,WAAW;IAAEF,OAAOA,SAAS,CAAA;EAAG,CAAA,CAAA,CAAA;AAIzC;;;AD3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AON,IAAAA,MAAUL,KAAKW,OAAOK,OAAAA;EAC/EI,QAAQ,CAACf,MAAcS,OAAed,KAAKI,MAAMC,IAAAA,EAAMgB,SAASP,EAAAA;AAClE;",
6
- "names": ["AccordionPrimitive", "createContext", "React", "Icon", "mx", "AccordionPrimitive", "createContext", "React", "mx", "ACCORDION_NAME", "AccordionProvider", "useAccordionContext", "createContext", "defaultGetId", "item", "id", "AccordionRoot", "classNames", "items", "getId", "children", "value", "defaultValue", "onValueChange", "Root", "type", "className", "mx", "ACCORDION_ITEM_NAME", "AccordionItemProvider", "useAccordionItemContext", "createContext", "AccordionItem", "children", "classNames", "item", "getId", "useAccordionContext", "React", "Item", "value", "className", "mx", "AccordionItemHeader", "props", "Header", "Trigger", "Icon", "icon", "size", "AccordionItemBody", "Content", "div", "role", "Accordion", "Root", "AccordionRoot", "Item", "AccordionItem", "ItemHeader", "AccordionItemHeader", "ItemBody", "AccordionItemBody", "combine", "draggable", "dropTargetForElements", "setCustomNativeDragPreview", "attachClosestEdge", "extractClosestEdge", "createContext", "React", "forwardRef", "useEffect", "useRef", "useState", "createPortal", "invariant", "Icon", "ListItem", "NaturalListItem", "mx", "monitorForElements", "extractClosestEdge", "getReorderDestinationIndex", "createContext", "React", "useCallback", "useEffect", "useState", "LIST_NAME", "ListProvider", "useListContext", "createContext", "defaultGetId", "item", "id", "ListRoot", "children", "items", "isItem", "getId", "onMove", "props", "isEqual", "useCallback", "a", "b", "idA", "idB", "undefined", "state", "setState", "useState", "idle", "useEffect", "monitorForElements", "canMonitor", "source", "data", "onDrop", "location", "target", "current", "dropTargets", "sourceData", "targetData", "sourceIdx", "findIndex", "targetIdx", "closestEdgeOfTarget", "extractClosestEdge", "destinationIndex", "getReorderDestinationIndex", "startIndex", "indexOfTarget", "axis", "React", "idle", "type", "stateStyles", "defaultContext", "LIST_ITEM_NAME", "ListItemProvider", "useListItemContext", "createContext", "ListItem", "children", "classNames", "item", "props", "isItem", "dragPreview", "setState", "setRootState", "useListContext", "ref", "useRef", "dragHandleRef", "state", "useState", "useEffect", "element", "current", "invariant", "combine", "draggable", "dragHandle", "getInitialData", "onGenerateDragPreview", "nativeSetDragImage", "source", "rect", "getBoundingClientRect", "setCustomNativeDragPreview", "getOffset", "container", "height", "x", "y", "render", "style", "width", "undefined", "onDragStart", "onDrop", "dropTargetForElements", "canDrop", "data", "getData", "input", "attachClosestEdge", "allowedEdges", "getIsSticky", "onDragEnter", "self", "closestEdge", "extractClosestEdge", "onDrag", "onDragLeave", "React", "div", "role", "className", "mx", "NaturalListItem", "DropIndicator", "edge", "IconButton", "forwardRef", "icon", "forwardedRef", "button", "Icon", "size", "ListItemDeleteButton", "autoHide", "disabled", "isDisabled", "ListItemButton", "ListItemDragHandle", "ListItemDragPreview", "createPortal", "ListItemWrapper", "ListItemTitle", "List", "Root", "ListRoot", "Item", "ListItem", "ItemDragPreview", "ListItemDragPreview", "ItemWrapper", "ListItemWrapper", "ItemDragHandle", "ListItemDragHandle", "ItemDeleteButton", "ListItemDeleteButton", "ItemButton", "ListItemButton", "ItemTitle", "ListItemTitle", "IconButton", "React", "useMemo", "Treegrid", "createContext", "useContext", "raise", "TreeContext", "createContext", "useTree", "useContext", "raise", "Error", "TreeProvider", "Provider", "combine", "draggable", "dropTargetForElements", "attachInstruction", "extractInstruction", "React", "memo", "useCallback", "useEffect", "useMemo", "useRef", "useState", "S", "invariant", "Treegrid", "TreeItem", "NaturalTreeItem", "ghostHover", "hoverableControls", "hoverableFocusedKeyboardControls", "hoverableFocusedWithinControls", "mx", "React", "forwardRef", "memo", "useCallback", "Button", "Icon", "toLocalizedString", "useTranslation", "TextTooltip", "mx", "TreeItemHeading", "memo", "forwardRef", "label", "icon", "className", "disabled", "current", "onSelect", "forwardedRef", "t", "useTranslation", "handleSelect", "useCallback", "event", "altKey", "handleButtonKeydown", "key", "preventDefault", "stopPropagation", "React", "TextTooltip", "text", "toLocalizedString", "side", "truncateQuery", "onlyWhenTruncating", "asChild", "ref", "Button", "data-testid", "variant", "density", "classNames", "mx", "onClick", "onKeyDown", "Icon", "size", "span", "data-tooltip", "React", "forwardRef", "memo", "Button", "Icon", "mx", "TreeItemToggle", "memo", "forwardRef", "open", "isBranch", "hidden", "onToggle", "forwardedRef", "React", "Button", "ref", "data-testid", "aria-expanded", "variant", "density", "classNames", "mx", "onClick", "Icon", "icon", "size", "DEFAULT_INDENTATION", "paddingIndentation", "level", "indentation", "paddingInlineStart", "hoverableDescriptionIcons", "TreeDataSchema", "S", "Struct", "id", "String", "path", "Array", "item", "Any", "isTreeData", "data", "is", "RawTreeItem", "_path", "last", "draggable", "_draggable", "renderColumns", "Columns", "canDrop", "onOpenChange", "onSelect", "levelOffset", "getItems", "getProps", "isOpen", "isCurrent", "useTree", "items", "label", "parentOf", "icon", "disabled", "className", "headingClassName", "testId", "useMemo", "open", "current", "level", "length", "isBranch", "mode", "rowRef", "useRef", "buttonRef", "openRef", "cancelExpandRef", "_state", "setState", "useState", "instruction", "setInstruction", "menuOpen", "setMenuOpen", "cancelExpand", "useCallback", "clearTimeout", "useEffect", "invariant", "combine", "element", "getInitialData", "onDragStart", "onDrop", "dropTargetForElements", "getData", "input", "attachInstruction", "indentPerLevel", "DEFAULT_INDENTATION", "currentLevel", "block", "source", "_canDrop", "getIsSticky", "onDrag", "self", "extractInstruction", "type", "setTimeout", "onDragLeave", "handleOpenChange", "handleSelect", "option", "focus", "handleKeyDown", "event", "key", "altKey", "React", "Treegrid", "Row", "ref", "aria-labelledby", "join", "PARENT_OF_SEPARATOR", "classNames", "mx", "hoverableControls", "hoverableFocusedKeyboardControls", "hoverableFocusedWithinControls", "ghostHover", "data-itemid", "data-testid", "aria-current", "undefined", "onKeyDown", "onContextMenu", "preventDefault", "Cell", "indent", "style", "paddingIndentation", "div", "role", "TreeItemToggle", "onToggle", "TreeItemHeading", "NaturalTreeItem", "DropIndicator", "gap", "map", "index", "TreeItem", "memo", "Tree", "root", "path", "id", "getItems", "getProps", "isOpen", "isCurrent", "draggable", "gridTemplateColumns", "classNames", "renderColumns", "canDrop", "onOpenChange", "onSelect", "levelOffset", "context", "useMemo", "items", "treePath", "React", "Treegrid", "Root", "TreeProvider", "value", "map", "item", "index", "TreeItem", "key", "last", "length", "SEPARATOR", "Path", "create", "args", "join", "parts", "path", "split", "length", "first", "last", "at", "parent", "slice", "hasRoot", "id", "hasChild", "compare", "hasDescendent", "startsWith", "siblings", "onPath", "includes"]
4
+ "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as AccordionPrimitive from '@radix-ui/react-accordion';\nimport { createContext } from '@radix-ui/react-context';\nimport React, { type PropsWithChildren } from 'react';\n\nimport { Icon, type ThemedClassName } from '@dxos/react-ui';\nimport { mx } from '@dxos/react-ui-theme';\n\nimport { useAccordionContext } from './AccordionRoot';\nimport { type ListItemRecord } from '../List';\n\nconst ACCORDION_ITEM_NAME = 'AccordionItem';\n\ntype AccordionItemContext<T extends ListItemRecord> = {\n item: T;\n};\n\nexport const [AccordionItemProvider, useAccordionItemContext] =\n createContext<AccordionItemContext<any>>(ACCORDION_ITEM_NAME);\n\nexport type AccordionItemProps<T extends ListItemRecord> = ThemedClassName<PropsWithChildren<{ item: T }>>;\n\nexport const AccordionItem = <T extends ListItemRecord>({ children, classNames, item }: AccordionItemProps<T>) => {\n const { getId } = useAccordionContext(ACCORDION_ITEM_NAME);\n\n return (\n <AccordionItemProvider {...{ item }}>\n <AccordionPrimitive.Item value={getId(item)} className={mx('overflow-hidden', classNames)}>\n {children}\n </AccordionPrimitive.Item>\n </AccordionItemProvider>\n );\n};\n\nexport type AccordionItemHeaderProps = ThemedClassName<AccordionPrimitive.AccordionHeaderProps>;\n\nexport const AccordionItemHeader = ({ classNames, children, ...props }: AccordionItemHeaderProps) => {\n return (\n <AccordionPrimitive.Header {...props} className={mx(classNames)}>\n <AccordionPrimitive.Trigger className='group flex items-center p-2 dx-focus-ring-inset is-full text-start'>\n {children}\n <Icon\n icon='ph--caret-right--regular'\n size={4}\n classNames='transition-transform duration-200 group-data-[state=open]:rotate-90'\n />\n </AccordionPrimitive.Trigger>\n </AccordionPrimitive.Header>\n );\n};\n\nexport type AccordionItemBodyProps = ThemedClassName<PropsWithChildren>;\n\nexport const AccordionItemBody = ({ children, classNames }: AccordionItemBodyProps) => {\n return (\n <AccordionPrimitive.Content className='overflow-hidden data-[state=closed]:animate-slideUp data-[state=open]:animate-slideDown'>\n <div role='none' className={mx('p-2', classNames)}>\n {children}\n </div>\n </AccordionPrimitive.Content>\n );\n};\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport * as AccordionPrimitive from '@radix-ui/react-accordion';\nimport { createContext } from '@radix-ui/react-context';\nimport React, { type ReactNode } from 'react';\n\nimport { type ThemedClassName } from '@dxos/react-ui';\nimport { mx } from '@dxos/react-ui-theme';\n\nimport { type ListItemRecord } from '../List';\n\ntype AccordionContext<T extends ListItemRecord> = {\n getId: (item: T) => string;\n};\n\nconst ACCORDION_NAME = 'Accordion';\n\nexport const [AccordionProvider, useAccordionContext] = createContext<AccordionContext<any>>(ACCORDION_NAME);\n\nexport type AccordionRendererProps<T extends ListItemRecord> = {\n items: T[];\n};\n\nconst defaultGetId = <T extends ListItemRecord>(item: T) => (item as any)?.id;\n\nexport type AccordionRootProps<T extends ListItemRecord> = ThemedClassName<\n {\n children?: (props: AccordionRendererProps<T>) => ReactNode;\n items?: T[];\n } & Partial<Pick<AccordionContext<T>, 'getId'>>\n>;\n\nexport const AccordionRoot = <T extends ListItemRecord>({\n classNames,\n items,\n getId = defaultGetId,\n children,\n value,\n defaultValue,\n onValueChange,\n}: AccordionRootProps<T> &\n Pick<AccordionPrimitive.AccordionMultipleProps, 'value' | 'defaultValue' | 'onValueChange'>) => {\n return (\n <AccordionProvider {...{ getId }}>\n <AccordionPrimitive.Root\n type='multiple'\n value={value}\n defaultValue={defaultValue}\n onValueChange={onValueChange}\n className={mx(classNames)}\n >\n {children?.({ items: items ?? [] })}\n </AccordionPrimitive.Root>\n </AccordionProvider>\n );\n};\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { AccordionItem, AccordionItemHeader, AccordionItemBody } from './AccordionItem';\nimport { AccordionRoot } from './AccordionRoot';\n\n// TODO(burdon): Next iteration should be based on Radix UI Accordion:\n// https://www.radix-ui.com/primitives/docs/components/accordion\n// TODO(burdon): Support key navigation.\n\nexport const Accordion = {\n Root: AccordionRoot,\n Item: AccordionItem,\n ItemHeader: AccordionItemHeader,\n ItemBody: AccordionItemBody,\n};\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport { combine } from '@atlaskit/pragmatic-drag-and-drop/combine';\nimport { draggable, dropTargetForElements } from '@atlaskit/pragmatic-drag-and-drop/element/adapter';\nimport { setCustomNativeDragPreview } from '@atlaskit/pragmatic-drag-and-drop/element/set-custom-native-drag-preview';\nimport {\n type Edge,\n attachClosestEdge,\n extractClosestEdge,\n} from '@atlaskit/pragmatic-drag-and-drop-hitbox/closest-edge';\nimport { createContext } from '@radix-ui/react-context';\nimport React, {\n type ComponentProps,\n type HTMLAttributes,\n type MutableRefObject,\n type PropsWithChildren,\n type ReactNode,\n forwardRef,\n useEffect,\n useRef,\n useState,\n} from 'react';\nimport { createPortal } from 'react-dom';\n\nimport { invariant } from '@dxos/invariant';\nimport { Icon, type ThemedClassName, ListItem as NaturalListItem } from '@dxos/react-ui';\nimport { mx } from '@dxos/react-ui-theme';\n\nimport { useListContext } from './ListRoot';\n\nexport type ListItemRecord = {};\n\nexport type ItemDragState =\n | {\n type: 'idle';\n }\n | {\n type: 'preview';\n container: HTMLElement;\n }\n | {\n type: 'is-dragging';\n }\n | {\n type: 'is-dragging-over';\n closestEdge: Edge | null;\n };\n\nexport const idle: ItemDragState = { type: 'idle' };\n\nconst stateStyles: { [Key in ItemDragState['type']]?: HTMLAttributes<HTMLDivElement>['className'] } = {\n 'is-dragging': 'opacity-50',\n};\n\ntype ListItemContext<T extends ListItemRecord> = {\n item: T;\n dragHandleRef: MutableRefObject<HTMLElement | null>;\n};\n\n/**\n * Default context defined for ListItemDragPreview, which is defined outside of ListItem.\n */\nconst defaultContext: ListItemContext<any> = {} as any;\n\nconst LIST_ITEM_NAME = 'ListItem';\n\nexport const [ListItemProvider, useListItemContext] = createContext<ListItemContext<any>>(\n LIST_ITEM_NAME,\n defaultContext,\n);\n\nexport type ListItemProps<T extends ListItemRecord> = ThemedClassName<\n PropsWithChildren<{\n item: T;\n }> &\n HTMLAttributes<HTMLDivElement>\n>;\n\n/**\n * Draggable list item.\n */\nexport const ListItem = <T extends ListItemRecord>({ children, classNames, item, ...props }: ListItemProps<T>) => {\n const { isItem, dragPreview, setState: setRootState } = useListContext(LIST_ITEM_NAME);\n const ref = useRef<HTMLDivElement | null>(null);\n const dragHandleRef = useRef<HTMLElement | null>(null);\n const [state, setState] = useState<ItemDragState>(idle);\n useEffect(() => {\n const element = ref.current;\n invariant(element);\n return combine(\n //\n // https://atlassian.design/components/pragmatic-drag-and-drop/core-package/adapters/element/about#draggable\n //\n draggable({\n element,\n dragHandle: dragHandleRef.current!,\n getInitialData: () => item,\n onGenerateDragPreview: dragPreview\n ? ({ nativeSetDragImage, source }) => {\n const rect = source.element.getBoundingClientRect();\n setCustomNativeDragPreview({\n nativeSetDragImage,\n getOffset: ({ container }) => {\n const { height } = container.getBoundingClientRect();\n return {\n x: 20,\n y: height / 2,\n };\n },\n render: ({ container }) => {\n container.style.width = rect.width + 'px';\n setState({ type: 'preview', container });\n setRootState({ type: 'preview', container, item });\n return () => {}; // TODO(burdon): Cleanup.\n },\n });\n }\n : undefined,\n onDragStart: () => {\n setState({ type: 'is-dragging' });\n setRootState({ type: 'is-dragging', item });\n },\n onDrop: () => {\n setState(idle);\n setRootState(idle);\n },\n }),\n\n //\n // https://atlassian.design/components/pragmatic-drag-and-drop/core-package/adapters/element/about#drop-target-for-elements\n //\n dropTargetForElements({\n element,\n canDrop: ({ source }) => {\n return source.element !== element && isItem(source.data);\n },\n getData: ({ input }) => {\n return attachClosestEdge(item, { element, input, allowedEdges: ['top', 'bottom'] });\n },\n getIsSticky: () => true,\n onDragEnter: ({ self }) => {\n const closestEdge = extractClosestEdge(self.data);\n setState({ type: 'is-dragging-over', closestEdge });\n },\n onDrag: ({ self }) => {\n const closestEdge = extractClosestEdge(self.data);\n setState((current) => {\n if (current.type === 'is-dragging-over' && current.closestEdge === closestEdge) {\n return current;\n }\n return { type: 'is-dragging-over', closestEdge };\n });\n },\n onDragLeave: () => {\n setState(idle);\n },\n onDrop: () => {\n setState(idle);\n },\n }),\n );\n }, [item]);\n\n return (\n <ListItemProvider item={item} dragHandleRef={dragHandleRef}>\n <div role='none' className='relative'>\n <div\n ref={ref}\n role='listitem'\n className={mx('flex overflow-hidden', classNames, stateStyles[state.type])}\n {...props}\n >\n {children}\n </div>\n {state.type === 'is-dragging-over' && state.closestEdge && (\n <NaturalListItem.DropIndicator edge={state.closestEdge} />\n )}\n </div>\n </ListItemProvider>\n );\n};\n\n//\n// List item components\n//\n\nexport type IconButtonProps = ThemedClassName<ComponentProps<'button'>> & { icon: string };\n\nexport const IconButton = forwardRef<HTMLButtonElement, IconButtonProps>(\n ({ classNames, icon, ...props }, forwardedRef) => {\n return (\n <button ref={forwardedRef} className={mx('flex items-center justify-center', classNames)} {...props}>\n <Icon icon={icon} classNames='cursor-pointer' size={4} />\n </button>\n );\n },\n);\n\nexport const ListItemDeleteButton = ({\n autoHide = true,\n classNames,\n disabled,\n icon = 'ph--x--regular',\n ...props\n}: Partial<Pick<IconButtonProps, 'icon'>> & Omit<IconButtonProps, 'icon'> & { autoHide?: boolean }) => {\n const { state } = useListContext('DELETE_BUTTON');\n const isDisabled = state.type !== 'idle' || disabled;\n return (\n <IconButton\n icon={icon}\n disabled={isDisabled}\n classNames={[classNames, autoHide && disabled && 'hidden']}\n {...props}\n />\n );\n};\n\nexport const ListItemButton = ({\n autoHide = true,\n classNames,\n disabled,\n ...props\n}: IconButtonProps & { autoHide?: boolean }) => {\n const { state } = useListContext('ITEM_BUTTON');\n const isDisabled = state.type !== 'idle' || disabled;\n return <IconButton disabled={isDisabled} classNames={[classNames, autoHide && disabled && 'hidden']} {...props} />;\n};\n\nexport const ListItemDragHandle = () => {\n const { dragHandleRef } = useListItemContext('DRAG_HANDLE');\n return <IconButton ref={dragHandleRef as any} icon='ph--dots-six-vertical--regular' />;\n};\n\nexport const ListItemDragPreview = <T extends ListItemRecord>({\n children,\n}: {\n children: ({ item }: { item: T }) => ReactNode;\n}) => {\n const { state } = useListContext('DRAG_PREVIEW');\n return state?.type === 'preview' ? createPortal(children({ item: state.item }), state.container) : null;\n};\n\nexport const ListItemWrapper = ({ classNames, children }: ThemedClassName<PropsWithChildren>) => (\n <div className={mx('flex is-full gap-2', classNames)}>{children}</div>\n);\n\nexport const ListItemTitle = ({\n classNames,\n children,\n ...props\n}: ThemedClassName<PropsWithChildren<ComponentProps<'div'>>>) => (\n <div className={mx('flex grow items-center truncate', classNames)} {...props}>\n {children}\n </div>\n);\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport { monitorForElements } from '@atlaskit/pragmatic-drag-and-drop/element/adapter';\nimport { extractClosestEdge } from '@atlaskit/pragmatic-drag-and-drop-hitbox/closest-edge';\nimport { getReorderDestinationIndex } from '@atlaskit/pragmatic-drag-and-drop-hitbox/util/get-reorder-destination-index';\nimport { createContext } from '@radix-ui/react-context';\nimport React, { type ReactNode, useCallback, useEffect, useState } from 'react';\n\nimport { idle, type ItemDragState, type ListItemRecord } from './ListItem';\n\ntype ListContext<T extends ListItemRecord> = {\n // TODO(burdon): Rename drag state.\n state: ItemDragState & { item?: T };\n setState: (state: ItemDragState & { item?: T }) => void;\n dragPreview?: boolean;\n isItem: (item: any) => boolean;\n getId?: (item: T) => string; // TODO(burdon): Require if T doesn't conform to type.\n};\n\nconst LIST_NAME = 'List';\n\nexport const [ListProvider, useListContext] = createContext<ListContext<any>>(LIST_NAME);\n\nexport type ListRendererProps<T extends ListItemRecord> = {\n state: ListContext<T>['state'];\n items: T[];\n};\n\nconst defaultGetId = <T extends ListItemRecord>(item: T) => (item as any)?.id;\n\nexport type ListRootProps<T extends ListItemRecord> = {\n children?: (props: ListRendererProps<T>) => ReactNode;\n items?: T[];\n onMove?: (fromIndex: number, toIndex: number) => void;\n} & Pick<ListContext<T>, 'isItem' | 'getId' | 'dragPreview'>;\n\nexport const ListRoot = <T extends ListItemRecord>({\n children,\n items,\n isItem,\n getId = defaultGetId,\n onMove,\n ...props\n}: ListRootProps<T>) => {\n const isEqual = useCallback(\n (a: T, b: T) => {\n const idA = getId?.(a);\n const idB = getId?.(b);\n\n if (idA !== undefined && idB !== undefined) {\n return idA === idB;\n } else {\n // Fallback for primitive values or when getId fails.\n // NOTE(ZaymonFC): After drag and drop, pragmatic internally serializes drop targets which breaks reference equality.\n // You must provide an `getId` function that returns a stable identifier for your items.\n return a === b;\n }\n },\n [getId],\n );\n\n const [state, setState] = useState<ListContext<T>['state']>(idle);\n useEffect(() => {\n if (!items) {\n return;\n }\n\n return monitorForElements({\n canMonitor: ({ source }) => isItem(source.data),\n onDrop: ({ location, source }) => {\n const target = location.current.dropTargets[0];\n if (!target) {\n return;\n }\n\n const sourceData = source.data;\n const targetData = target.data;\n\n if (!isItem(sourceData) || !isItem(targetData)) {\n return;\n }\n\n const sourceIdx = items.findIndex((item) => isEqual(item, sourceData as T));\n const targetIdx = items.findIndex((item) => isEqual(item, targetData as T));\n if (targetIdx < 0 || sourceIdx < 0) {\n return;\n }\n const closestEdgeOfTarget = extractClosestEdge(targetData);\n const destinationIndex = getReorderDestinationIndex({\n closestEdgeOfTarget,\n startIndex: sourceIdx,\n indexOfTarget: targetIdx,\n axis: 'vertical',\n });\n\n onMove?.(sourceIdx, destinationIndex);\n },\n });\n }, [items, isEqual, onMove]);\n\n return (\n <ListProvider {...{ state, setState, isItem, ...props }}>{children?.({ state, items: items ?? [] })}</ListProvider>\n );\n};\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport {\n IconButton,\n type IconButtonProps,\n ListItem,\n ListItemDeleteButton,\n ListItemButton,\n ListItemDragHandle,\n ListItemDragPreview,\n type ListItemProps,\n type ListItemRecord,\n ListItemTitle,\n ListItemWrapper,\n} from './ListItem';\nimport { ListRoot, type ListRootProps } from './ListRoot';\n\n// TODO(burdon): Multi-select model.\n// TODO(burdon): Key nav.\n// TODO(burdon): Animation.\n// TODO(burdon): Constrain axis.\n// TODO(burdon): Tree view.\n// TODO(burdon): Fix autoscroll while dragging.\n\n/**\n * Draggable list.\n * Ref: https://github.com/atlassian/pragmatic-drag-and-drop\n * Ref: https://github.com/alexreardon/pdnd-react-tailwind/blob/main/src/task.tsx\n */\nexport const List = {\n Root: ListRoot,\n Item: ListItem,\n ItemDragPreview: ListItemDragPreview,\n ItemWrapper: ListItemWrapper,\n ItemDragHandle: ListItemDragHandle,\n ItemDeleteButton: ListItemDeleteButton,\n ItemButton: ListItemButton,\n ItemTitle: ListItemTitle,\n IconButton,\n};\n\ntype ListItem = ListItemRecord;\n\nexport type { ListRootProps, ListItemProps, IconButtonProps, ListItem, ListItemRecord };\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport React, { useMemo } from 'react';\n\nimport { Treegrid, type TreegridRootProps } from '@dxos/react-ui';\n\nimport { type TreeContextType, TreeProvider } from './TreeContext';\nimport { TreeItem, type TreeItemProps } from './TreeItem';\n\nexport type TreeProps<T = any> = { root?: T; path?: string[]; id: string } & TreeContextType &\n Partial<Pick<TreegridRootProps, 'gridTemplateColumns' | 'classNames'>> &\n Pick<TreeItemProps<T>, 'draggable' | 'renderColumns' | 'canDrop' | 'onOpenChange' | 'onSelect' | 'levelOffset'>;\n\nexport const Tree = <T = any,>({\n root,\n path,\n id,\n getItems,\n getProps,\n isOpen,\n isCurrent,\n draggable = false,\n gridTemplateColumns = '[tree-row-start] 1fr min-content [tree-row-end]',\n classNames,\n renderColumns,\n canDrop,\n onOpenChange,\n onSelect,\n levelOffset,\n}: TreeProps<T>) => {\n const context = useMemo(\n () => ({\n getItems,\n getProps,\n isOpen,\n isCurrent,\n }),\n [getItems, getProps, isOpen, isCurrent],\n );\n const items = getItems(root);\n const treePath = useMemo(() => (path ? [...path, id] : [id]), [id, path]);\n\n return (\n <Treegrid.Root gridTemplateColumns={gridTemplateColumns} classNames={classNames}>\n <TreeProvider value={context}>\n {items.map((item, index) => (\n <TreeItem\n key={item.id}\n item={item}\n last={index === items.length - 1}\n path={treePath}\n levelOffset={levelOffset}\n draggable={draggable}\n renderColumns={renderColumns}\n canDrop={canDrop}\n onOpenChange={onOpenChange}\n onSelect={onSelect}\n />\n ))}\n </TreeProvider>\n </Treegrid.Root>\n );\n};\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport { createContext, useContext } from 'react';\n\nimport { raise } from '@dxos/debug';\nimport { type Label } from '@dxos/react-ui';\n\nexport type PropsFromTreeItem = {\n id: string;\n label: Label;\n parentOf?: string[];\n icon?: string;\n disabled?: boolean;\n className?: string;\n headingClassName?: string;\n testId?: string;\n};\n\nexport type TreeContextType<T = any> = {\n getItems: (parent?: T) => T[];\n getProps: (item: T, parent: string[]) => PropsFromTreeItem;\n isOpen: (path: string[], item: T) => boolean;\n isCurrent: (path: string[], item: T) => boolean;\n};\n\nconst TreeContext = createContext<null | TreeContextType>(null);\n\nexport const useTree = () => useContext(TreeContext) ?? raise(new Error('TreeContext not found'));\n\nexport const TreeProvider = TreeContext.Provider;\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport { combine } from '@atlaskit/pragmatic-drag-and-drop/combine';\nimport { draggable, dropTargetForElements } from '@atlaskit/pragmatic-drag-and-drop/element/adapter';\nimport {\n attachInstruction,\n extractInstruction,\n type Instruction,\n type ItemMode,\n} from '@atlaskit/pragmatic-drag-and-drop-hitbox/tree-item';\nimport { Schema } from 'effect';\nimport React, { memo, useCallback, useEffect, useMemo, useRef, useState, type FC, type KeyboardEvent } from 'react';\n\nimport { invariant } from '@dxos/invariant';\nimport { Treegrid, TreeItem as NaturalTreeItem } from '@dxos/react-ui';\nimport {\n ghostHover,\n hoverableControls,\n hoverableFocusedKeyboardControls,\n hoverableFocusedWithinControls,\n mx,\n} from '@dxos/react-ui-theme';\n\nimport { useTree } from './TreeContext';\nimport { TreeItemHeading } from './TreeItemHeading';\nimport { TreeItemToggle } from './TreeItemToggle';\nimport { DEFAULT_INDENTATION, paddingIndentation } from './helpers';\n\ntype TreeItemState = 'idle' | 'dragging' | 'preview' | 'parent-of-instruction';\n\nconst hoverableDescriptionIcons =\n '[--icons-color:inherit] hover-hover:[--icons-color:var(--description-text)] hover-hover:hover:[--icons-color:inherit] focus-within:[--icons-color:inherit]';\n\nexport const TreeDataSchema = Schema.Struct({\n id: Schema.String,\n path: Schema.Array(Schema.String),\n item: Schema.Any,\n});\n\nexport type TreeData = Schema.Schema.Type<typeof TreeDataSchema>;\n\nexport const isTreeData = (data: unknown): data is TreeData => Schema.is(TreeDataSchema)(data);\n\nexport type TreeItemProps<T = any> = {\n item: T;\n path: string[];\n levelOffset?: number;\n last: boolean;\n draggable?: boolean;\n renderColumns?: FC<{\n item: T;\n path: string[];\n open: boolean;\n menuOpen: boolean;\n setMenuOpen: (open: boolean) => void;\n }>;\n canDrop?: (source: TreeData, target: TreeData) => boolean;\n onOpenChange?: (params: { item: T; path: string[]; open: boolean }) => void;\n onSelect?: (params: { item: T; path: string[]; current: boolean; option: boolean }) => void;\n};\n\nexport const RawTreeItem = <T = any,>({\n item,\n path: _path,\n last,\n draggable: _draggable,\n renderColumns: Columns,\n canDrop,\n onOpenChange,\n onSelect,\n levelOffset = 2,\n}: TreeItemProps<T>) => {\n const { getItems, getProps, isOpen, isCurrent } = useTree();\n const items = getItems(item);\n const { id, label, parentOf, icon, disabled, className, headingClassName, testId } = getProps(item, _path);\n const path = useMemo(() => [..._path, id], [_path, id]);\n const open = isOpen(path, item);\n const current = isCurrent(path, item);\n const level = path.length - levelOffset;\n const isBranch = !!parentOf;\n const mode: ItemMode = last ? 'last-in-group' : open ? 'expanded' : 'standard';\n const data = useMemo(() => ({ id, path, item }) satisfies TreeData, [id, path, item]);\n\n const rowRef = useRef<HTMLDivElement | null>(null);\n const buttonRef = useRef<HTMLButtonElement | null>(null);\n const openRef = useRef(false);\n const cancelExpandRef = useRef<NodeJS.Timeout | null>(null);\n const [_state, setState] = useState<TreeItemState>('idle');\n const [instruction, setInstruction] = useState<Instruction | null>(null);\n const [menuOpen, setMenuOpen] = useState(false);\n\n const cancelExpand = useCallback(() => {\n if (cancelExpandRef.current) {\n clearTimeout(cancelExpandRef.current);\n cancelExpandRef.current = null;\n }\n }, []);\n\n useEffect(() => {\n if (!_draggable) {\n return;\n }\n\n invariant(buttonRef.current);\n\n // https://atlassian.design/components/pragmatic-drag-and-drop/core-package/adapters/element/about\n return combine(\n draggable({\n element: buttonRef.current,\n getInitialData: () => data,\n onDragStart: () => {\n setState('dragging');\n if (open) {\n openRef.current = true;\n onOpenChange?.({ item, path, open: false });\n }\n },\n onDrop: () => {\n setState('idle');\n if (openRef.current) {\n onOpenChange?.({ item, path, open: true });\n }\n },\n }),\n // https://github.com/atlassian/pragmatic-drag-and-drop/blob/main/packages/hitbox/constellation/index/about.mdx\n dropTargetForElements({\n element: buttonRef.current,\n getData: ({ input, element }) => {\n return attachInstruction(data, {\n input,\n element,\n indentPerLevel: DEFAULT_INDENTATION,\n currentLevel: level,\n mode,\n block: isBranch ? [] : ['make-child'],\n });\n },\n canDrop: ({ source }) => {\n const _canDrop = canDrop ?? (() => true);\n return source.element !== buttonRef.current && _canDrop(source.data as TreeData, data);\n },\n getIsSticky: () => true,\n onDrag: ({ self, source }) => {\n const instruction = extractInstruction(self.data);\n\n if (source.data.id !== id) {\n if (instruction?.type === 'make-child' && isBranch && !open && !cancelExpandRef.current) {\n cancelExpandRef.current = setTimeout(() => {\n onOpenChange?.({ item, path, open: true });\n }, 500);\n }\n\n if (instruction?.type !== 'make-child') {\n cancelExpand();\n }\n\n setInstruction(instruction);\n } else if (instruction?.type === 'reparent') {\n // TODO(wittjosiah): This is not occurring in the current implementation.\n setInstruction(instruction);\n } else {\n setInstruction(null);\n }\n },\n onDragLeave: () => {\n cancelExpand();\n setInstruction(null);\n },\n onDrop: () => {\n cancelExpand();\n setInstruction(null);\n },\n }),\n );\n }, [_draggable, item, id, mode, path, open, canDrop]);\n\n // Cancel expand on unmount.\n useEffect(() => () => cancelExpand(), [cancelExpand]);\n\n const handleOpenChange = useCallback(\n () => onOpenChange?.({ item, path, open: !open }),\n [onOpenChange, item, path, open],\n );\n\n const handleSelect = useCallback(\n (option = false) => {\n if (isBranch) {\n handleOpenChange();\n } else {\n rowRef.current?.focus();\n onSelect?.({ item, path, current: !current, option });\n }\n },\n [item, path, current, isBranch, handleOpenChange, onSelect],\n );\n\n const handleKeyDown = useCallback(\n (event: KeyboardEvent) => {\n switch (event.key) {\n case 'ArrowRight':\n isBranch && !open && handleOpenChange();\n break;\n case 'ArrowLeft':\n isBranch && open && handleOpenChange();\n break;\n case ' ':\n handleSelect(event.altKey);\n break;\n }\n },\n [isBranch, open, handleOpenChange, handleSelect],\n );\n\n return (\n <>\n <Treegrid.Row\n ref={rowRef}\n key={id}\n id={id}\n aria-labelledby={`${id}__label`}\n parentOf={parentOf?.join(Treegrid.PARENT_OF_SEPARATOR)}\n classNames={mx(\n 'grid grid-cols-subgrid col-[tree-row] mbs-0.5 aria-[current]:bg-groupSurface',\n hoverableControls,\n hoverableFocusedKeyboardControls,\n hoverableFocusedWithinControls,\n hoverableDescriptionIcons,\n ghostHover,\n className,\n )}\n data-itemid={id}\n data-testid={testId}\n // NOTE(thure): This is intentionally an empty string to for descendents to select by in the CSS\n // without alerting the user (except for in the correct link element). See also:\n // https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-current#description\n aria-current={current ? ('' as 'page') : undefined}\n onKeyDown={handleKeyDown}\n onContextMenu={(event) => {\n event.preventDefault();\n setMenuOpen(true);\n }}\n >\n <Treegrid.Cell\n indent\n classNames='relative grid grid-cols-subgrid col-[tree-row]'\n style={paddingIndentation(level)}\n >\n <div role='none' className='flex items-center'>\n <TreeItemToggle isBranch={isBranch} open={open} onToggle={handleOpenChange} />\n <TreeItemHeading\n ref={buttonRef}\n label={label}\n icon={icon}\n className={headingClassName}\n disabled={disabled}\n current={current}\n onSelect={handleSelect}\n />\n </div>\n {Columns && <Columns item={item} path={path} open={open} menuOpen={menuOpen} setMenuOpen={setMenuOpen} />}\n {instruction && <NaturalTreeItem.DropIndicator instruction={instruction} gap={2} />}\n </Treegrid.Cell>\n </Treegrid.Row>\n {open &&\n items.map((item, index) => (\n <TreeItem\n key={item.id}\n item={item}\n path={path}\n last={index === items.length - 1}\n draggable={_draggable}\n renderColumns={Columns}\n canDrop={canDrop}\n onOpenChange={onOpenChange}\n onSelect={onSelect}\n />\n ))}\n </>\n );\n};\n\nexport const TreeItem = memo(RawTreeItem) as FC<TreeItemProps>;\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport React, { type KeyboardEvent, type MouseEvent, forwardRef, memo, useCallback } from 'react';\n\nimport { Button, Icon, toLocalizedString, useTranslation, type Label } from '@dxos/react-ui';\nimport { TextTooltip } from '@dxos/react-ui-text-tooltip';\nimport { mx } from '@dxos/react-ui-theme';\n\n// TODO(wittjosiah): Consider whether there should be a separate disabled prop which was visually distinct\n// rather than just making the item unselectable.\nexport type NavTreeItemHeadingProps = {\n label: Label;\n icon?: string;\n className?: string;\n disabled?: boolean;\n current?: boolean;\n onSelect?: (option: boolean) => void;\n};\n\nexport const TreeItemHeading = memo(\n forwardRef<HTMLButtonElement, NavTreeItemHeadingProps>(\n ({ label, icon, className, disabled, current, onSelect }, forwardedRef) => {\n const { t } = useTranslation();\n\n const handleSelect = useCallback(\n (event: MouseEvent) => {\n onSelect?.(event.altKey);\n },\n [onSelect],\n );\n\n const handleButtonKeydown = useCallback(\n (event: KeyboardEvent) => {\n if (event.key === ' ' || event.key === 'Enter') {\n event.preventDefault();\n event.stopPropagation();\n onSelect?.(event.altKey);\n }\n },\n [onSelect],\n );\n\n return (\n <TextTooltip\n text={toLocalizedString(label, t)}\n side='bottom'\n truncateQuery='span[data-tooltip]'\n onlyWhenTruncating\n asChild\n ref={forwardedRef}\n >\n <Button\n data-testid='treeItem.heading'\n variant='ghost'\n density='fine'\n classNames={mx(\n 'grow gap-2 pis-0.5 hover:bg-transparent dark:hover:bg-transparent',\n 'disabled:cursor-default disabled:opacity-100',\n className,\n )}\n disabled={disabled}\n onClick={handleSelect}\n onKeyDown={handleButtonKeydown}\n {...(current && { 'aria-current': 'location' })}\n >\n {icon && <Icon icon={icon ?? 'ph--placeholder--regular'} size={5} classNames='mlb-1' />}\n <span className='flex-1 is-0 truncate text-start text-sm font-normal' data-tooltip>\n {toLocalizedString(label, t)}\n </span>\n </Button>\n </TextTooltip>\n );\n },\n ),\n);\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport React, { forwardRef, memo } from 'react';\n\nimport { Button, Icon } from '@dxos/react-ui';\nimport { mx } from '@dxos/react-ui-theme';\n\nexport type TreeItemToggleProps = {\n open?: boolean;\n isBranch?: boolean;\n onToggle?: () => void;\n hidden?: boolean;\n};\n\nexport const TreeItemToggle = memo(\n forwardRef<HTMLButtonElement, TreeItemToggleProps>(({ open, isBranch, hidden, onToggle }, forwardedRef) => {\n return (\n <Button\n ref={forwardedRef}\n data-testid='treeItem.toggle'\n aria-expanded={open}\n variant='ghost'\n density='fine'\n classNames={mx('is-6 pli-0 dx-focus-ring-inset', hidden ? 'hidden' : !isBranch && 'invisible')}\n onClick={onToggle}\n >\n <Icon icon='ph--caret-right--bold' size={3} classNames={mx('transition duration-200', open && 'rotate-90')} />\n </Button>\n );\n }),\n);\n", "//\n// Copyright 2024 DXOS.org\n//\n\nexport const DEFAULT_INDENTATION = 8;\n\nexport const paddingIndentation = (level: number, indentation = DEFAULT_INDENTATION) => ({\n paddingInlineStart: `${(level - 1) * indentation}px`,\n});\n", "//\n// Copyright 2023 DXOS.org\n//\n\nconst SEPARATOR = '+';\n\nexport const Path = {\n create: (...args: string[]) => args.join(SEPARATOR),\n\n parts: (path: string) => path.split(SEPARATOR),\n length: (path: string) => path.split(SEPARATOR).length,\n first: (path: string) => path.split(SEPARATOR)[0] ?? path,\n last: (path: string) => path.split(SEPARATOR).at(-1) ?? path,\n parent: (path: string) => path.split(SEPARATOR).slice(0, -1).join(SEPARATOR),\n\n hasRoot: (path: string, id: string) => Path.first(path) === id,\n hasChild: (path: string, compare: string) => Path.parent(compare) === path,\n hasDescendent: (path: string, compare: string) => compare !== path && compare.startsWith(path),\n siblings: (path: string, compare: string) => Path.parent(path) === Path.parent(compare),\n onPath: (path: string, id: string) => Path.parts(path).includes(id),\n};\n"],
5
+ "mappings": ";AAIA,YAAYA,yBAAwB;AACpC,SAASC,iBAAAA,sBAAqB;AAC9B,OAAOC,YAAuC;AAE9C,SAASC,YAAkC;AAC3C,SAASC,MAAAA,WAAU;;;ACLnB,YAAYC,wBAAwB;AACpC,SAASC,qBAAqB;AAC9B,OAAOC,WAA+B;AAGtC,SAASC,UAAU;AAQnB,IAAMC,iBAAiB;AAEhB,IAAM,CAACC,mBAAmBC,mBAAAA,IAAuBC,cAAqCH,cAAAA;AAM7F,IAAMI,eAAe,CAA2BC,SAAaA,MAAcC;AASpE,IAAMC,gBAAgB,CAA2B,EACtDC,YACAC,OACAC,QAAQN,cACRO,UACAC,OACAC,cACAC,cAAa,MAE8E;AAC3F,SACE,sBAAA,cAACb,mBAAsB;IAAES;EAAM,GAC7B,sBAAA,cAAoBK,yBAAI;IACtBC,MAAK;IACLJ;IACAC;IACAC;IACAG,WAAWC,GAAGV,UAAAA;KAEbG,WAAW;IAAEF,OAAOA,SAAS,CAAA;EAAG,CAAA,CAAA,CAAA;AAIzC;;;AD3CA,IAAMU,sBAAsB;AAMrB,IAAM,CAACC,uBAAuBC,uBAAAA,IACnCC,eAAyCH,mBAAAA;AAIpC,IAAMI,gBAAgB,CAA2B,EAAEC,UAAUC,YAAYC,KAAI,MAAyB;AAC3G,QAAM,EAAEC,MAAK,IAAKC,oBAAoBT,mBAAAA;AAEtC,SACE,gBAAAU,OAAA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AAK;AAExE,SACE,gBAAAkB,OAAA,cAACC,UAASC,MAAI;IAACb;IAA0CC;KACvD,gBAAAU,OAAA,cAACG,cAAAA;IAAaC,OAAOR;KAClBE,MAAMO,IAAI,CAACC,MAAMC,UAChB,gBAAAP,OAAA,cAACQ,UAAAA;IACCC,KAAKH,KAAKvB;IACVuB;IACAI,MAAMH,UAAUT,MAAMa,SAAS;IAC/B7B,MAAMiB;IACNJ;IACAP,WAAWA;IACXG;IACAC;IACAC;IACAC;;AAMZ;;;AM5DA,IAAMkB,YAAY;AAEX,IAAMC,OAAO;EAClBC,QAAQ,IAAIC,SAAmBA,KAAKC,KAAKJ,SAAAA;EAEzCK,OAAO,CAACC,SAAiBA,KAAKC,MAAMP,SAAAA;EACpCQ,QAAQ,CAACF,SAAiBA,KAAKC,MAAMP,SAAAA,EAAWQ;EAChDC,OAAO,CAACH,SAAiBA,KAAKC,MAAMP,SAAAA,EAAW,CAAA,KAAMM;EACrDI,MAAM,CAACJ,SAAiBA,KAAKC,MAAMP,SAAAA,EAAWW,GAAG,EAAC,KAAML;EACxDM,QAAQ,CAACN,SAAiBA,KAAKC,MAAMP,SAAAA,EAAWa,MAAM,GAAG,EAAC,EAAGT,KAAKJ,SAAAA;EAElEc,SAAS,CAACR,MAAcS,OAAed,KAAKQ,MAAMH,IAAAA,MAAUS;EAC5DC,UAAU,CAACV,MAAcW,YAAoBhB,KAAKW,OAAOK,OAAAA,MAAaX;EACtEY,eAAe,CAACZ,MAAcW,YAAoBA,YAAYX,QAAQW,QAAQE,WAAWb,IAAAA;EACzFc,UAAU,CAACd,MAAcW,YAAoBhB,KAAKW,OAAON,IAAAA,MAAUL,KAAKW,OAAOK,OAAAA;EAC/EI,QAAQ,CAACf,MAAcS,OAAed,KAAKI,MAAMC,IAAAA,EAAMgB,SAASP,EAAAA;AAClE;",
6
+ "names": ["AccordionPrimitive", "createContext", "React", "Icon", "mx", "AccordionPrimitive", "createContext", "React", "mx", "ACCORDION_NAME", "AccordionProvider", "useAccordionContext", "createContext", "defaultGetId", "item", "id", "AccordionRoot", "classNames", "items", "getId", "children", "value", "defaultValue", "onValueChange", "Root", "type", "className", "mx", "ACCORDION_ITEM_NAME", "AccordionItemProvider", "useAccordionItemContext", "createContext", "AccordionItem", "children", "classNames", "item", "getId", "useAccordionContext", "React", "Item", "value", "className", "mx", "AccordionItemHeader", "props", "Header", "Trigger", "Icon", "icon", "size", "AccordionItemBody", "Content", "div", "role", "Accordion", "Root", "AccordionRoot", "Item", "AccordionItem", "ItemHeader", "AccordionItemHeader", "ItemBody", "AccordionItemBody", "combine", "draggable", "dropTargetForElements", "setCustomNativeDragPreview", "attachClosestEdge", "extractClosestEdge", "createContext", "React", "forwardRef", "useEffect", "useRef", "useState", "createPortal", "invariant", "Icon", "ListItem", "NaturalListItem", "mx", "monitorForElements", "extractClosestEdge", "getReorderDestinationIndex", "createContext", "React", "useCallback", "useEffect", "useState", "LIST_NAME", "ListProvider", "useListContext", "createContext", "defaultGetId", "item", "id", "ListRoot", "children", "items", "isItem", "getId", "onMove", "props", "isEqual", "useCallback", "a", "b", "idA", "idB", "undefined", "state", "setState", "useState", "idle", "useEffect", "monitorForElements", "canMonitor", "source", "data", "onDrop", "location", "target", "current", "dropTargets", "sourceData", "targetData", "sourceIdx", "findIndex", "targetIdx", "closestEdgeOfTarget", "extractClosestEdge", "destinationIndex", "getReorderDestinationIndex", "startIndex", "indexOfTarget", "axis", "React", "idle", "type", "stateStyles", "defaultContext", "LIST_ITEM_NAME", "ListItemProvider", "useListItemContext", "createContext", "ListItem", "children", "classNames", "item", "props", "isItem", "dragPreview", "setState", "setRootState", "useListContext", "ref", "useRef", "dragHandleRef", "state", "useState", "useEffect", "element", "current", "invariant", "combine", "draggable", "dragHandle", "getInitialData", "onGenerateDragPreview", "nativeSetDragImage", "source", "rect", "getBoundingClientRect", "setCustomNativeDragPreview", "getOffset", "container", "height", "x", "y", "render", "style", "width", "undefined", "onDragStart", "onDrop", "dropTargetForElements", "canDrop", "data", "getData", "input", "attachClosestEdge", "allowedEdges", "getIsSticky", "onDragEnter", "self", "closestEdge", "extractClosestEdge", "onDrag", "onDragLeave", "React", "div", "role", "className", "mx", "NaturalListItem", "DropIndicator", "edge", "IconButton", "forwardRef", "icon", "forwardedRef", "button", "Icon", "size", "ListItemDeleteButton", "autoHide", "disabled", "isDisabled", "ListItemButton", "ListItemDragHandle", "ListItemDragPreview", "createPortal", "ListItemWrapper", "ListItemTitle", "List", "Root", "ListRoot", "Item", "ListItem", "ItemDragPreview", "ListItemDragPreview", "ItemWrapper", "ListItemWrapper", "ItemDragHandle", "ListItemDragHandle", "ItemDeleteButton", "ListItemDeleteButton", "ItemButton", "ListItemButton", "ItemTitle", "ListItemTitle", "IconButton", "React", "useMemo", "Treegrid", "createContext", "useContext", "raise", "TreeContext", "createContext", "useTree", "useContext", "raise", "Error", "TreeProvider", "Provider", "combine", "draggable", "dropTargetForElements", "attachInstruction", "extractInstruction", "Schema", "React", "memo", "useCallback", "useEffect", "useMemo", "useRef", "useState", "invariant", "Treegrid", "TreeItem", "NaturalTreeItem", "ghostHover", "hoverableControls", "hoverableFocusedKeyboardControls", "hoverableFocusedWithinControls", "mx", "React", "forwardRef", "memo", "useCallback", "Button", "Icon", "toLocalizedString", "useTranslation", "TextTooltip", "mx", "TreeItemHeading", "memo", "forwardRef", "label", "icon", "className", "disabled", "current", "onSelect", "forwardedRef", "t", "useTranslation", "handleSelect", "useCallback", "event", "altKey", "handleButtonKeydown", "key", "preventDefault", "stopPropagation", "React", "TextTooltip", "text", "toLocalizedString", "side", "truncateQuery", "onlyWhenTruncating", "asChild", "ref", "Button", "data-testid", "variant", "density", "classNames", "mx", "onClick", "onKeyDown", "Icon", "size", "span", "data-tooltip", "React", "forwardRef", "memo", "Button", "Icon", "mx", "TreeItemToggle", "memo", "forwardRef", "open", "isBranch", "hidden", "onToggle", "forwardedRef", "React", "Button", "ref", "data-testid", "aria-expanded", "variant", "density", "classNames", "mx", "onClick", "Icon", "icon", "size", "DEFAULT_INDENTATION", "paddingIndentation", "level", "indentation", "paddingInlineStart", "hoverableDescriptionIcons", "TreeDataSchema", "Schema", "Struct", "id", "String", "path", "Array", "item", "Any", "isTreeData", "data", "is", "RawTreeItem", "_path", "last", "draggable", "_draggable", "renderColumns", "Columns", "canDrop", "onOpenChange", "onSelect", "levelOffset", "getItems", "getProps", "isOpen", "isCurrent", "useTree", "items", "label", "parentOf", "icon", "disabled", "className", "headingClassName", "testId", "useMemo", "open", "current", "level", "length", "isBranch", "mode", "rowRef", "useRef", "buttonRef", "openRef", "cancelExpandRef", "_state", "setState", "useState", "instruction", "setInstruction", "menuOpen", "setMenuOpen", "cancelExpand", "useCallback", "clearTimeout", "useEffect", "invariant", "combine", "element", "getInitialData", "onDragStart", "onDrop", "dropTargetForElements", "getData", "input", "attachInstruction", "indentPerLevel", "DEFAULT_INDENTATION", "currentLevel", "block", "source", "_canDrop", "getIsSticky", "onDrag", "self", "extractInstruction", "type", "setTimeout", "onDragLeave", "handleOpenChange", "handleSelect", "option", "focus", "handleKeyDown", "event", "key", "altKey", "React", "Treegrid", "Row", "ref", "aria-labelledby", "join", "PARENT_OF_SEPARATOR", "classNames", "mx", "hoverableControls", "hoverableFocusedKeyboardControls", "hoverableFocusedWithinControls", "ghostHover", "data-itemid", "data-testid", "aria-current", "undefined", "onKeyDown", "onContextMenu", "preventDefault", "Cell", "indent", "style", "paddingIndentation", "div", "role", "TreeItemToggle", "onToggle", "TreeItemHeading", "NaturalTreeItem", "DropIndicator", "gap", "map", "index", "TreeItem", "memo", "Tree", "root", "path", "id", "getItems", "getProps", "isOpen", "isCurrent", "draggable", "gridTemplateColumns", "classNames", "renderColumns", "canDrop", "onOpenChange", "onSelect", "levelOffset", "context", "useMemo", "items", "treePath", "React", "Treegrid", "Root", "TreeProvider", "value", "map", "item", "index", "TreeItem", "key", "last", "length", "SEPARATOR", "Path", "create", "args", "join", "parts", "path", "split", "length", "first", "last", "at", "parent", "slice", "hasRoot", "id", "hasChild", "compare", "hasDescendent", "startsWith", "siblings", "onPath", "includes"]
7
7
  }
@@ -1 +1 @@
1
- {"inputs":{"packages/ui/react-ui-list/src/components/Accordion/AccordionRoot.tsx":{"bytes":4521,"imports":[{"path":"@radix-ui/react-accordion","kind":"import-statement","external":true},{"path":"@radix-ui/react-context","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true}],"format":"esm"},"packages/ui/react-ui-list/src/components/Accordion/AccordionItem.tsx":{"bytes":7016,"imports":[{"path":"@radix-ui/react-accordion","kind":"import-statement","external":true},{"path":"@radix-ui/react-context","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"packages/ui/react-ui-list/src/components/Accordion/AccordionRoot.tsx","kind":"import-statement","original":"./AccordionRoot"}],"format":"esm"},"packages/ui/react-ui-list/src/components/Accordion/Accordion.tsx":{"bytes":1988,"imports":[{"path":"packages/ui/react-ui-list/src/components/Accordion/AccordionItem.tsx","kind":"import-statement","original":"./AccordionItem"},{"path":"packages/ui/react-ui-list/src/components/Accordion/AccordionRoot.tsx","kind":"import-statement","original":"./AccordionRoot"}],"format":"esm"},"packages/ui/react-ui-list/src/components/Accordion/index.ts":{"bytes":519,"imports":[{"path":"packages/ui/react-ui-list/src/components/Accordion/Accordion.tsx","kind":"import-statement","original":"./Accordion"}],"format":"esm"},"packages/ui/react-ui-list/src/components/List/ListRoot.tsx":{"bytes":10800,"imports":[{"path":"@atlaskit/pragmatic-drag-and-drop/element/adapter","kind":"import-statement","external":true},{"path":"@atlaskit/pragmatic-drag-and-drop-hitbox/closest-edge","kind":"import-statement","external":true},{"path":"@atlaskit/pragmatic-drag-and-drop-hitbox/util/get-reorder-destination-index","kind":"import-statement","external":true},{"path":"@radix-ui/react-context","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"packages/ui/react-ui-list/src/components/List/ListItem.tsx","kind":"import-statement","original":"./ListItem"}],"format":"esm"},"packages/ui/react-ui-list/src/components/List/ListItem.tsx":{"bytes":26097,"imports":[{"path":"@atlaskit/pragmatic-drag-and-drop/combine","kind":"import-statement","external":true},{"path":"@atlaskit/pragmatic-drag-and-drop/element/adapter","kind":"import-statement","external":true},{"path":"@atlaskit/pragmatic-drag-and-drop/element/set-custom-native-drag-preview","kind":"import-statement","external":true},{"path":"@atlaskit/pragmatic-drag-and-drop-hitbox/closest-edge","kind":"import-statement","external":true},{"path":"@radix-ui/react-context","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"react-dom","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"packages/ui/react-ui-list/src/components/List/ListRoot.tsx","kind":"import-statement","original":"./ListRoot"}],"format":"esm"},"packages/ui/react-ui-list/src/components/List/List.tsx":{"bytes":3686,"imports":[{"path":"packages/ui/react-ui-list/src/components/List/ListItem.tsx","kind":"import-statement","original":"./ListItem"},{"path":"packages/ui/react-ui-list/src/components/List/ListRoot.tsx","kind":"import-statement","original":"./ListRoot"}],"format":"esm"},"packages/ui/react-ui-list/src/components/List/index.ts":{"bytes":505,"imports":[{"path":"packages/ui/react-ui-list/src/components/List/List.tsx","kind":"import-statement","original":"./List"}],"format":"esm"},"packages/ui/react-ui-list/src/components/Tree/TreeContext.tsx":{"bytes":2214,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/debug","kind":"import-statement","external":true}],"format":"esm"},"packages/ui/react-ui-list/src/components/Tree/TreeItemHeading.tsx":{"bytes":7611,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-text-tooltip","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true}],"format":"esm"},"packages/ui/react-ui-list/src/components/Tree/TreeItemToggle.tsx":{"bytes":3314,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true}],"format":"esm"},"packages/ui/react-ui-list/src/components/Tree/helpers.ts":{"bytes":1223,"imports":[],"format":"esm"},"packages/ui/react-ui-list/src/components/Tree/TreeItem.tsx":{"bytes":31836,"imports":[{"path":"@atlaskit/pragmatic-drag-and-drop/combine","kind":"import-statement","external":true},{"path":"@atlaskit/pragmatic-drag-and-drop/element/adapter","kind":"import-statement","external":true},{"path":"@atlaskit/pragmatic-drag-and-drop-hitbox/tree-item","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"packages/ui/react-ui-list/src/components/Tree/TreeContext.tsx","kind":"import-statement","original":"./TreeContext"},{"path":"packages/ui/react-ui-list/src/components/Tree/TreeItemHeading.tsx","kind":"import-statement","original":"./TreeItemHeading"},{"path":"packages/ui/react-ui-list/src/components/Tree/TreeItemToggle.tsx","kind":"import-statement","original":"./TreeItemToggle"},{"path":"packages/ui/react-ui-list/src/components/Tree/helpers.ts","kind":"import-statement","original":"./helpers"}],"format":"esm"},"packages/ui/react-ui-list/src/components/Tree/Tree.tsx":{"bytes":5887,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"packages/ui/react-ui-list/src/components/Tree/TreeContext.tsx","kind":"import-statement","original":"./TreeContext"},{"path":"packages/ui/react-ui-list/src/components/Tree/TreeItem.tsx","kind":"import-statement","original":"./TreeItem"}],"format":"esm"},"packages/ui/react-ui-list/src/components/Tree/index.ts":{"bytes":692,"imports":[{"path":"packages/ui/react-ui-list/src/components/Tree/Tree.tsx","kind":"import-statement","original":"./Tree"},{"path":"packages/ui/react-ui-list/src/components/Tree/TreeContext.tsx","kind":"import-statement","original":"./TreeContext"},{"path":"packages/ui/react-ui-list/src/components/Tree/TreeItem.tsx","kind":"import-statement","original":"./TreeItem"}],"format":"esm"},"packages/ui/react-ui-list/src/components/index.ts":{"bytes":669,"imports":[{"path":"packages/ui/react-ui-list/src/components/Accordion/index.ts","kind":"import-statement","original":"./Accordion"},{"path":"packages/ui/react-ui-list/src/components/List/index.ts","kind":"import-statement","original":"./List"},{"path":"packages/ui/react-ui-list/src/components/Tree/index.ts","kind":"import-statement","original":"./Tree"}],"format":"esm"},"packages/ui/react-ui-list/src/util/path.ts":{"bytes":3466,"imports":[],"format":"esm"},"packages/ui/react-ui-list/src/util/index.ts":{"bytes":494,"imports":[{"path":"packages/ui/react-ui-list/src/util/path.ts","kind":"import-statement","original":"./path"}],"format":"esm"},"packages/ui/react-ui-list/src/index.ts":{"bytes":583,"imports":[{"path":"packages/ui/react-ui-list/src/components/index.ts","kind":"import-statement","original":"./components"},{"path":"packages/ui/react-ui-list/src/util/index.ts","kind":"import-statement","original":"./util"}],"format":"esm"}},"outputs":{"packages/ui/react-ui-list/dist/lib/browser/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":56437},"packages/ui/react-ui-list/dist/lib/browser/index.mjs":{"imports":[{"path":"@radix-ui/react-accordion","kind":"import-statement","external":true},{"path":"@radix-ui/react-context","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"@radix-ui/react-accordion","kind":"import-statement","external":true},{"path":"@radix-ui/react-context","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"@atlaskit/pragmatic-drag-and-drop/combine","kind":"import-statement","external":true},{"path":"@atlaskit/pragmatic-drag-and-drop/element/adapter","kind":"import-statement","external":true},{"path":"@atlaskit/pragmatic-drag-and-drop/element/set-custom-native-drag-preview","kind":"import-statement","external":true},{"path":"@atlaskit/pragmatic-drag-and-drop-hitbox/closest-edge","kind":"import-statement","external":true},{"path":"@radix-ui/react-context","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"react-dom","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"@atlaskit/pragmatic-drag-and-drop/element/adapter","kind":"import-statement","external":true},{"path":"@atlaskit/pragmatic-drag-and-drop-hitbox/closest-edge","kind":"import-statement","external":true},{"path":"@atlaskit/pragmatic-drag-and-drop-hitbox/util/get-reorder-destination-index","kind":"import-statement","external":true},{"path":"@radix-ui/react-context","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/debug","kind":"import-statement","external":true},{"path":"@atlaskit/pragmatic-drag-and-drop/combine","kind":"import-statement","external":true},{"path":"@atlaskit/pragmatic-drag-and-drop/element/adapter","kind":"import-statement","external":true},{"path":"@atlaskit/pragmatic-drag-and-drop-hitbox/tree-item","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-text-tooltip","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true}],"exports":["Accordion","List","Path","RawTreeItem","Tree","TreeDataSchema","TreeItem","TreeProvider","isTreeData","useTree"],"entryPoint":"packages/ui/react-ui-list/src/index.ts","inputs":{"packages/ui/react-ui-list/src/components/Accordion/AccordionItem.tsx":{"bytesInOutput":1676},"packages/ui/react-ui-list/src/components/Accordion/AccordionRoot.tsx":{"bytesInOutput":756},"packages/ui/react-ui-list/src/components/Accordion/Accordion.tsx":{"bytesInOutput":132},"packages/ui/react-ui-list/src/components/Accordion/index.ts":{"bytesInOutput":0},"packages/ui/react-ui-list/src/components/index.ts":{"bytesInOutput":0},"packages/ui/react-ui-list/src/components/List/ListItem.tsx":{"bytesInOutput":6916},"packages/ui/react-ui-list/src/components/List/ListRoot.tsx":{"bytesInOutput":2186},"packages/ui/react-ui-list/src/components/List/List.tsx":{"bytesInOutput":275},"packages/ui/react-ui-list/src/components/List/index.ts":{"bytesInOutput":0},"packages/ui/react-ui-list/src/components/Tree/Tree.tsx":{"bytesInOutput":1127},"packages/ui/react-ui-list/src/components/Tree/TreeContext.tsx":{"bytesInOutput":293},"packages/ui/react-ui-list/src/components/Tree/TreeItem.tsx":{"bytesInOutput":8275},"packages/ui/react-ui-list/src/components/Tree/TreeItemHeading.tsx":{"bytesInOutput":1799},"packages/ui/react-ui-list/src/components/Tree/TreeItemToggle.tsx":{"bytesInOutput":810},"packages/ui/react-ui-list/src/components/Tree/helpers.ts":{"bytesInOutput":162},"packages/ui/react-ui-list/src/components/Tree/index.ts":{"bytesInOutput":0},"packages/ui/react-ui-list/src/index.ts":{"bytesInOutput":0},"packages/ui/react-ui-list/src/util/path.ts":{"bytesInOutput":678},"packages/ui/react-ui-list/src/util/index.ts":{"bytesInOutput":0}},"bytes":26346}}}
1
+ {"inputs":{"packages/ui/react-ui-list/src/components/Accordion/AccordionRoot.tsx":{"bytes":4521,"imports":[{"path":"@radix-ui/react-accordion","kind":"import-statement","external":true},{"path":"@radix-ui/react-context","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true}],"format":"esm"},"packages/ui/react-ui-list/src/components/Accordion/AccordionItem.tsx":{"bytes":7016,"imports":[{"path":"@radix-ui/react-accordion","kind":"import-statement","external":true},{"path":"@radix-ui/react-context","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"packages/ui/react-ui-list/src/components/Accordion/AccordionRoot.tsx","kind":"import-statement","original":"./AccordionRoot"}],"format":"esm"},"packages/ui/react-ui-list/src/components/Accordion/Accordion.tsx":{"bytes":1988,"imports":[{"path":"packages/ui/react-ui-list/src/components/Accordion/AccordionItem.tsx","kind":"import-statement","original":"./AccordionItem"},{"path":"packages/ui/react-ui-list/src/components/Accordion/AccordionRoot.tsx","kind":"import-statement","original":"./AccordionRoot"}],"format":"esm"},"packages/ui/react-ui-list/src/components/Accordion/index.ts":{"bytes":519,"imports":[{"path":"packages/ui/react-ui-list/src/components/Accordion/Accordion.tsx","kind":"import-statement","original":"./Accordion"}],"format":"esm"},"packages/ui/react-ui-list/src/components/List/ListRoot.tsx":{"bytes":10800,"imports":[{"path":"@atlaskit/pragmatic-drag-and-drop/element/adapter","kind":"import-statement","external":true},{"path":"@atlaskit/pragmatic-drag-and-drop-hitbox/closest-edge","kind":"import-statement","external":true},{"path":"@atlaskit/pragmatic-drag-and-drop-hitbox/util/get-reorder-destination-index","kind":"import-statement","external":true},{"path":"@radix-ui/react-context","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"packages/ui/react-ui-list/src/components/List/ListItem.tsx","kind":"import-statement","original":"./ListItem"}],"format":"esm"},"packages/ui/react-ui-list/src/components/List/ListItem.tsx":{"bytes":26097,"imports":[{"path":"@atlaskit/pragmatic-drag-and-drop/combine","kind":"import-statement","external":true},{"path":"@atlaskit/pragmatic-drag-and-drop/element/adapter","kind":"import-statement","external":true},{"path":"@atlaskit/pragmatic-drag-and-drop/element/set-custom-native-drag-preview","kind":"import-statement","external":true},{"path":"@atlaskit/pragmatic-drag-and-drop-hitbox/closest-edge","kind":"import-statement","external":true},{"path":"@radix-ui/react-context","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"react-dom","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"packages/ui/react-ui-list/src/components/List/ListRoot.tsx","kind":"import-statement","original":"./ListRoot"}],"format":"esm"},"packages/ui/react-ui-list/src/components/List/List.tsx":{"bytes":3686,"imports":[{"path":"packages/ui/react-ui-list/src/components/List/ListItem.tsx","kind":"import-statement","original":"./ListItem"},{"path":"packages/ui/react-ui-list/src/components/List/ListRoot.tsx","kind":"import-statement","original":"./ListRoot"}],"format":"esm"},"packages/ui/react-ui-list/src/components/List/index.ts":{"bytes":505,"imports":[{"path":"packages/ui/react-ui-list/src/components/List/List.tsx","kind":"import-statement","original":"./List"}],"format":"esm"},"packages/ui/react-ui-list/src/components/Tree/TreeContext.tsx":{"bytes":2214,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/debug","kind":"import-statement","external":true}],"format":"esm"},"packages/ui/react-ui-list/src/components/Tree/TreeItemHeading.tsx":{"bytes":7611,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-text-tooltip","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true}],"format":"esm"},"packages/ui/react-ui-list/src/components/Tree/TreeItemToggle.tsx":{"bytes":3314,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true}],"format":"esm"},"packages/ui/react-ui-list/src/components/Tree/helpers.ts":{"bytes":1223,"imports":[],"format":"esm"},"packages/ui/react-ui-list/src/components/Tree/TreeItem.tsx":{"bytes":31904,"imports":[{"path":"@atlaskit/pragmatic-drag-and-drop/combine","kind":"import-statement","external":true},{"path":"@atlaskit/pragmatic-drag-and-drop/element/adapter","kind":"import-statement","external":true},{"path":"@atlaskit/pragmatic-drag-and-drop-hitbox/tree-item","kind":"import-statement","external":true},{"path":"effect","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"packages/ui/react-ui-list/src/components/Tree/TreeContext.tsx","kind":"import-statement","original":"./TreeContext"},{"path":"packages/ui/react-ui-list/src/components/Tree/TreeItemHeading.tsx","kind":"import-statement","original":"./TreeItemHeading"},{"path":"packages/ui/react-ui-list/src/components/Tree/TreeItemToggle.tsx","kind":"import-statement","original":"./TreeItemToggle"},{"path":"packages/ui/react-ui-list/src/components/Tree/helpers.ts","kind":"import-statement","original":"./helpers"}],"format":"esm"},"packages/ui/react-ui-list/src/components/Tree/Tree.tsx":{"bytes":5887,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"packages/ui/react-ui-list/src/components/Tree/TreeContext.tsx","kind":"import-statement","original":"./TreeContext"},{"path":"packages/ui/react-ui-list/src/components/Tree/TreeItem.tsx","kind":"import-statement","original":"./TreeItem"}],"format":"esm"},"packages/ui/react-ui-list/src/components/Tree/index.ts":{"bytes":692,"imports":[{"path":"packages/ui/react-ui-list/src/components/Tree/Tree.tsx","kind":"import-statement","original":"./Tree"},{"path":"packages/ui/react-ui-list/src/components/Tree/TreeContext.tsx","kind":"import-statement","original":"./TreeContext"},{"path":"packages/ui/react-ui-list/src/components/Tree/TreeItem.tsx","kind":"import-statement","original":"./TreeItem"}],"format":"esm"},"packages/ui/react-ui-list/src/components/index.ts":{"bytes":669,"imports":[{"path":"packages/ui/react-ui-list/src/components/Accordion/index.ts","kind":"import-statement","original":"./Accordion"},{"path":"packages/ui/react-ui-list/src/components/List/index.ts","kind":"import-statement","original":"./List"},{"path":"packages/ui/react-ui-list/src/components/Tree/index.ts","kind":"import-statement","original":"./Tree"}],"format":"esm"},"packages/ui/react-ui-list/src/util/path.ts":{"bytes":3466,"imports":[],"format":"esm"},"packages/ui/react-ui-list/src/util/index.ts":{"bytes":494,"imports":[{"path":"packages/ui/react-ui-list/src/util/path.ts","kind":"import-statement","original":"./path"}],"format":"esm"},"packages/ui/react-ui-list/src/index.ts":{"bytes":583,"imports":[{"path":"packages/ui/react-ui-list/src/components/index.ts","kind":"import-statement","original":"./components"},{"path":"packages/ui/react-ui-list/src/util/index.ts","kind":"import-statement","original":"./util"}],"format":"esm"}},"outputs":{"packages/ui/react-ui-list/dist/lib/browser/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":56476},"packages/ui/react-ui-list/dist/lib/browser/index.mjs":{"imports":[{"path":"@radix-ui/react-accordion","kind":"import-statement","external":true},{"path":"@radix-ui/react-context","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"@radix-ui/react-accordion","kind":"import-statement","external":true},{"path":"@radix-ui/react-context","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"@atlaskit/pragmatic-drag-and-drop/combine","kind":"import-statement","external":true},{"path":"@atlaskit/pragmatic-drag-and-drop/element/adapter","kind":"import-statement","external":true},{"path":"@atlaskit/pragmatic-drag-and-drop/element/set-custom-native-drag-preview","kind":"import-statement","external":true},{"path":"@atlaskit/pragmatic-drag-and-drop-hitbox/closest-edge","kind":"import-statement","external":true},{"path":"@radix-ui/react-context","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"react-dom","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"@atlaskit/pragmatic-drag-and-drop/element/adapter","kind":"import-statement","external":true},{"path":"@atlaskit/pragmatic-drag-and-drop-hitbox/closest-edge","kind":"import-statement","external":true},{"path":"@atlaskit/pragmatic-drag-and-drop-hitbox/util/get-reorder-destination-index","kind":"import-statement","external":true},{"path":"@radix-ui/react-context","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/debug","kind":"import-statement","external":true},{"path":"@atlaskit/pragmatic-drag-and-drop/combine","kind":"import-statement","external":true},{"path":"@atlaskit/pragmatic-drag-and-drop/element/adapter","kind":"import-statement","external":true},{"path":"@atlaskit/pragmatic-drag-and-drop-hitbox/tree-item","kind":"import-statement","external":true},{"path":"effect","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-text-tooltip","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true}],"exports":["Accordion","List","Path","RawTreeItem","Tree","TreeDataSchema","TreeItem","TreeProvider","isTreeData","useTree"],"entryPoint":"packages/ui/react-ui-list/src/index.ts","inputs":{"packages/ui/react-ui-list/src/components/Accordion/AccordionItem.tsx":{"bytesInOutput":1676},"packages/ui/react-ui-list/src/components/Accordion/AccordionRoot.tsx":{"bytesInOutput":756},"packages/ui/react-ui-list/src/components/Accordion/Accordion.tsx":{"bytesInOutput":132},"packages/ui/react-ui-list/src/components/Accordion/index.ts":{"bytesInOutput":0},"packages/ui/react-ui-list/src/components/index.ts":{"bytesInOutput":0},"packages/ui/react-ui-list/src/components/List/ListItem.tsx":{"bytesInOutput":6916},"packages/ui/react-ui-list/src/components/List/ListRoot.tsx":{"bytesInOutput":2186},"packages/ui/react-ui-list/src/components/List/List.tsx":{"bytesInOutput":275},"packages/ui/react-ui-list/src/components/List/index.ts":{"bytesInOutput":0},"packages/ui/react-ui-list/src/components/Tree/Tree.tsx":{"bytesInOutput":1127},"packages/ui/react-ui-list/src/components/Tree/TreeContext.tsx":{"bytesInOutput":293},"packages/ui/react-ui-list/src/components/Tree/TreeItem.tsx":{"bytesInOutput":8299},"packages/ui/react-ui-list/src/components/Tree/TreeItemHeading.tsx":{"bytesInOutput":1799},"packages/ui/react-ui-list/src/components/Tree/TreeItemToggle.tsx":{"bytesInOutput":810},"packages/ui/react-ui-list/src/components/Tree/helpers.ts":{"bytesInOutput":162},"packages/ui/react-ui-list/src/components/Tree/index.ts":{"bytesInOutput":0},"packages/ui/react-ui-list/src/index.ts":{"bytesInOutput":0},"packages/ui/react-ui-list/src/util/path.ts":{"bytesInOutput":678},"packages/ui/react-ui-list/src/util/index.ts":{"bytesInOutput":0}},"bytes":26370}}}
@@ -71,8 +71,8 @@ var import_debug = require("@dxos/debug");
71
71
  var import_combine2 = require("@atlaskit/pragmatic-drag-and-drop/combine");
72
72
  var import_adapter3 = require("@atlaskit/pragmatic-drag-and-drop/element/adapter");
73
73
  var import_tree_item = require("@atlaskit/pragmatic-drag-and-drop-hitbox/tree-item");
74
+ var import_effect = require("effect");
74
75
  var import_react7 = __toESM(require("react"));
75
- var import_echo_schema = require("@dxos/echo-schema");
76
76
  var import_invariant2 = require("@dxos/invariant");
77
77
  var import_react_ui4 = require("@dxos/react-ui");
78
78
  var import_react_ui_theme4 = require("@dxos/react-ui-theme");
@@ -471,12 +471,12 @@ var paddingIndentation = (level, indentation = DEFAULT_INDENTATION) => ({
471
471
  });
472
472
  var __dxlog_file2 = "/home/runner/work/dxos/dxos/packages/ui/react-ui-list/src/components/Tree/TreeItem.tsx";
473
473
  var hoverableDescriptionIcons = "[--icons-color:inherit] hover-hover:[--icons-color:var(--description-text)] hover-hover:hover:[--icons-color:inherit] focus-within:[--icons-color:inherit]";
474
- var TreeDataSchema = import_echo_schema.S.Struct({
475
- id: import_echo_schema.S.String,
476
- path: import_echo_schema.S.Array(import_echo_schema.S.String),
477
- item: import_echo_schema.S.Any
474
+ var TreeDataSchema = import_effect.Schema.Struct({
475
+ id: import_effect.Schema.String,
476
+ path: import_effect.Schema.Array(import_effect.Schema.String),
477
+ item: import_effect.Schema.Any
478
478
  });
479
- var isTreeData = (data) => import_echo_schema.S.is(TreeDataSchema)(data);
479
+ var isTreeData = (data) => import_effect.Schema.is(TreeDataSchema)(data);
480
480
  var RawTreeItem = ({ item, path: _path, last, draggable: _draggable, renderColumns: Columns, canDrop, onOpenChange, onSelect, levelOffset = 2 }) => {
481
481
  const { getItems, getProps, isOpen, isCurrent } = useTree();
482
482
  const items = getItems(item);