@dxos/react-ui-stack 0.7.5-main.9d2a38b → 0.7.5-main.e9bb01b

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.
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/components/Stack.tsx", "../../../src/components/StackContext.tsx", "../../../src/components/StackItem.tsx", "../../../src/components/StackItemContent.tsx", "../../../src/components/StackItemDragHandle.tsx", "../../../src/components/StackItemHeading.tsx", "../../../src/components/StackItemResizeHandle.tsx", "../../../src/components/StackItemSigil.tsx", "../../../src/components/MenuSignifier.tsx", "../../../src/translations.ts", "../../../src/components/LayoutControls.tsx"],
4
- "sourcesContent": ["//\n// Copyright 2024 DXOS.org\n//\nimport { dropTargetForElements } from '@atlaskit/pragmatic-drag-and-drop/element/adapter';\nimport { attachClosestEdge, extractClosestEdge } from '@atlaskit/pragmatic-drag-and-drop-hitbox/closest-edge';\nimport { useArrowNavigationGroup } from '@fluentui/react-tabster';\nimport { composeRefs } from '@radix-ui/react-compose-refs';\nimport React, {\n Children,\n type CSSProperties,\n type ComponentPropsWithRef,\n forwardRef,\n useLayoutEffect,\n useState,\n} from 'react';\n\nimport { type ThemedClassName, ListItem } from '@dxos/react-ui';\nimport { mx } from '@dxos/react-ui-theme';\n\nimport { type StackContextValue, StackContext, type StackItemData } from './StackContext';\n\nexport type Orientation = 'horizontal' | 'vertical';\nexport type Size = 'intrinsic' | 'contain';\n\nexport type StackProps = Omit<ThemedClassName<ComponentPropsWithRef<'div'>>, 'aria-orientation'> &\n Partial<StackContextValue> & { itemsCount?: number };\n\nexport const railGridHorizontal = 'grid-rows-[[rail-start]_var(--rail-size)_[content-start]_1fr_[content-end]]';\n\nexport const railGridVertical = 'grid-cols-[[rail-start]_var(--rail-size)_[content-start]_1fr_[content-end]]';\n\nexport const Stack = forwardRef<HTMLDivElement, StackProps>(\n (\n {\n children,\n classNames,\n style,\n orientation = 'vertical',\n rail = true,\n size = 'intrinsic',\n onRearrange,\n itemsCount = Children.count(children),\n ...props\n },\n forwardedRef,\n ) => {\n const [stackElement, stackRef] = useState<HTMLDivElement | null>(null);\n const composedItemRef = composeRefs<HTMLDivElement>(stackRef, forwardedRef);\n const [dropping, setDropping] = useState(false);\n\n const arrowNavigationGroup = useArrowNavigationGroup({ axis: orientation });\n\n const styles: CSSProperties = {\n [orientation === 'horizontal' ? 'gridTemplateColumns' : 'gridTemplateRows']: `repeat(${itemsCount}, min-content)`,\n ...style,\n };\n\n const selfDroppable = !!(itemsCount < 1 && onRearrange && props.id);\n\n useLayoutEffect(() => {\n if (!stackElement || !selfDroppable) {\n return;\n }\n const acceptSourceType = orientation === 'horizontal' ? 'column' : 'card';\n return dropTargetForElements({\n element: stackElement,\n getData: ({ input, element }) => {\n return attachClosestEdge(\n { id: props.id, type: orientation === 'horizontal' ? 'card' : 'column' },\n { input, element, allowedEdges: [orientation === 'horizontal' ? 'left' : 'top'] },\n );\n },\n onDragEnter: ({ source }) => {\n if (source.data.type === acceptSourceType) {\n setDropping(true);\n }\n },\n onDrag: ({ source }) => {\n if (source.data.type === acceptSourceType) {\n setDropping(true);\n }\n },\n onDragLeave: () => setDropping(false),\n onDrop: ({ self, source }) => {\n setDropping(false);\n if (source.data.type === acceptSourceType && selfDroppable) {\n onRearrange(source.data as StackItemData, self.data as StackItemData, extractClosestEdge(self.data));\n }\n },\n });\n }, [stackElement, selfDroppable]);\n\n return (\n <StackContext.Provider value={{ orientation, rail, size, onRearrange }}>\n <div\n {...props}\n {...arrowNavigationGroup}\n className={mx(\n 'grid relative',\n rail\n ? orientation === 'horizontal'\n ? railGridHorizontal\n : railGridVertical\n : orientation === 'horizontal'\n ? 'grid-rows-1'\n : 'grid-cols-1',\n size === 'contain' &&\n (orientation === 'horizontal'\n ? 'overflow-x-auto min-bs-0 bs-full max-bs-full'\n : 'overflow-y-auto min-is-0 is-full max-is-full'),\n classNames,\n )}\n aria-orientation={orientation}\n style={styles}\n ref={composedItemRef}\n >\n {children}\n {selfDroppable && dropping && <ListItem.DropIndicator edge={orientation === 'horizontal' ? 'left' : 'top'} />}\n </div>\n </StackContext.Provider>\n );\n },\n);\n\nexport { StackContext };\nexport type { StackContextValue };\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport type { Edge } from '@atlaskit/pragmatic-drag-and-drop-hitbox/closest-edge';\nimport { createContext, useContext } from 'react';\n\nimport { type Orientation, type Size } from './Stack';\n\nexport type StackItemSize = number | 'min-content';\n\nexport type StackItemData = { id: string; type: 'column' | 'card' };\n\nexport type StackItemRearrangeHandler = (\n source: StackItemData,\n target: StackItemData,\n closestEdge: Edge | null,\n) => void;\n\nexport type StackContextValue = {\n orientation: Orientation;\n rail: boolean;\n size: Size;\n onRearrange?: StackItemRearrangeHandler;\n};\n\nexport const StackContext = createContext<StackContextValue>({\n orientation: 'vertical',\n rail: true,\n size: 'intrinsic',\n});\n\nexport const useStack = () => useContext(StackContext);\n\nexport type StackItemContextValue = {\n selfDragHandleRef: (element: HTMLDivElement | null) => void;\n size: StackItemSize;\n setSize: (nextSize: StackItemSize, commit?: boolean) => void;\n};\n\nexport const StackItemContext = createContext<StackItemContextValue>({\n selfDragHandleRef: () => {},\n size: 'min-content',\n setSize: () => {},\n});\n\nexport const useStackItem = () => useContext(StackItemContext);\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 { disableNativeDragPreview } from '@atlaskit/pragmatic-drag-and-drop/element/disable-native-drag-preview';\nimport { preventUnhandled } from '@atlaskit/pragmatic-drag-and-drop/prevent-unhandled';\nimport {\n attachClosestEdge,\n extractClosestEdge,\n type Edge,\n} from '@atlaskit/pragmatic-drag-and-drop-hitbox/closest-edge';\nimport { useFocusableGroup } from '@fluentui/react-tabster';\nimport { composeRefs } from '@radix-ui/react-compose-refs';\nimport React, { forwardRef, useLayoutEffect, useState, type ComponentPropsWithRef, useCallback } from 'react';\n\nimport { type ThemedClassName, ListItem } from '@dxos/react-ui';\nimport { mx } from '@dxos/react-ui-theme';\n\nimport { useStack, StackItemContext, type StackItemSize, type StackItemData } from './StackContext';\nimport { StackItemContent, type StackItemContentProps } from './StackItemContent';\nimport { StackItemDragHandle, type StackItemDragHandleProps } from './StackItemDragHandle';\nimport {\n StackItemHeading,\n StackItemHeadingLabel,\n type StackItemHeadingProps,\n type StackItemHeadingLabelProps,\n} from './StackItemHeading';\nimport { StackItemResizeHandle, type StackItemResizeHandleProps } from './StackItemResizeHandle';\nimport {\n StackItemSigil,\n type StackItemSigilProps,\n type StackItemSigilAction,\n type StackItemSigilButtonProps,\n StackItemSigilButton,\n} from './StackItemSigil';\n\nexport const DEFAULT_HORIZONTAL_SIZE = 44 satisfies StackItemSize;\nexport const DEFAULT_VERTICAL_SIZE = 'min-content' satisfies StackItemSize;\nexport const DEFAULT_EXTRINSIC_SIZE = DEFAULT_HORIZONTAL_SIZE satisfies StackItemSize;\n\nexport type StackItemRootProps = ThemedClassName<ComponentPropsWithRef<'div'>> & {\n item: Omit<StackItemData, 'type'>;\n order?: number;\n size?: StackItemSize;\n onSizeChange?: (nextSize: StackItemSize) => void;\n role?: 'article' | 'section';\n};\n\nconst StackItemRoot = forwardRef<HTMLDivElement, StackItemRootProps>(\n ({ item, children, classNames, size: propsSize, onSizeChange, role, order, style, ...props }, forwardedRef) => {\n const [itemElement, itemRef] = useState<HTMLDivElement | null>(null);\n const [selfDragHandleElement, selfDragHandleRef] = useState<HTMLDivElement | null>(null);\n const [closestEdge, setEdge] = useState<Edge | null>(null);\n const { orientation, rail, onRearrange } = useStack();\n const [size = orientation === 'horizontal' ? DEFAULT_HORIZONTAL_SIZE : DEFAULT_VERTICAL_SIZE, setInternalSize] =\n useState(propsSize);\n\n const Root = role ?? 'div';\n\n const composedItemRef = composeRefs<HTMLDivElement>(itemRef, forwardedRef);\n\n const setSize = useCallback(\n (nextSize: StackItemSize, commit?: boolean) => {\n setInternalSize(nextSize);\n if (commit) {\n onSizeChange?.(nextSize);\n }\n },\n [onSizeChange],\n );\n\n const type = orientation === 'horizontal' ? 'column' : 'card';\n\n useLayoutEffect(() => {\n if (!itemElement || !onRearrange) {\n return;\n }\n return combine(\n draggable({\n element: itemElement,\n ...(selfDragHandleElement && { dragHandle: selfDragHandleElement }),\n getInitialData: () => ({ id: item.id, type }),\n // TODO(thure): tabster focus honeypots are causing the preview to render with the wrong dimensions; what do?\n onGenerateDragPreview: ({ nativeSetDragImage }) => {\n disableNativeDragPreview({ nativeSetDragImage });\n preventUnhandled.start();\n },\n }),\n dropTargetForElements({\n element: itemElement,\n getData: ({ input, element }) => {\n return attachClosestEdge(\n { id: item.id, type },\n { input, element, allowedEdges: orientation === 'horizontal' ? ['left', 'right'] : ['top', 'bottom'] },\n );\n },\n onDragEnter: ({ self, source }) => {\n if (source.data.type === self.data.type) {\n setEdge(extractClosestEdge(self.data));\n }\n },\n onDrag: ({ self, source }) => {\n if (source.data.type === self.data.type) {\n setEdge(extractClosestEdge(self.data));\n }\n },\n onDragLeave: () => setEdge(null),\n onDrop: ({ self, source }) => {\n setEdge(null);\n if (source.data.type === self.data.type) {\n onRearrange(source.data as StackItemData, self.data as StackItemData, extractClosestEdge(self.data));\n }\n },\n }),\n );\n }, [orientation, item, onRearrange, selfDragHandleElement, itemElement]);\n\n const focusGroupAttrs = useFocusableGroup({ tabBehavior: 'limited' });\n\n return (\n <StackItemContext.Provider value={{ selfDragHandleRef, size, setSize }}>\n <Root\n {...props}\n tabIndex={0}\n {...focusGroupAttrs}\n className={mx(\n 'group/stack-item grid relative ch-focus-ring-inset-over-all',\n size === 'min-content' && (orientation === 'horizontal' ? 'is-min' : 'bs-min'),\n orientation === 'horizontal' ? 'grid-rows-subgrid' : 'grid-cols-subgrid',\n rail && (orientation === 'horizontal' ? 'row-span-2' : 'col-span-2'),\n classNames,\n )}\n data-dx-stack-item\n style={{\n ...(size !== 'min-content' && {\n [orientation === 'horizontal' ? 'inlineSize' : 'blockSize']: `${size}rem`,\n }),\n ...(Number.isFinite(order) && {\n [orientation === 'horizontal' ? 'gridColumn' : 'gridRow']: `${order}`,\n }),\n ...style,\n }}\n ref={composedItemRef}\n >\n {children}\n {closestEdge && <ListItem.DropIndicator edge={closestEdge} />}\n </Root>\n </StackItemContext.Provider>\n );\n },\n);\n\nexport const StackItem = {\n Root: StackItemRoot,\n Content: StackItemContent,\n Heading: StackItemHeading,\n HeadingLabel: StackItemHeadingLabel,\n ResizeHandle: StackItemResizeHandle,\n DragHandle: StackItemDragHandle,\n Sigil: StackItemSigil,\n SigilButton: StackItemSigilButton,\n};\n\nexport type {\n StackItemContentProps,\n StackItemHeadingProps,\n StackItemHeadingLabelProps,\n StackItemResizeHandleProps,\n StackItemDragHandleProps,\n StackItemSigilProps,\n StackItemSigilButtonProps,\n StackItemSigilAction,\n};\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport React, { type ComponentPropsWithoutRef, forwardRef } from 'react';\n\nimport { type ThemedClassName } from '@dxos/react-ui';\nimport { mx } from '@dxos/react-ui-theme';\n\nimport { useStack } from './StackContext';\n\nexport type StackItemContentProps = ThemedClassName<ComponentPropsWithoutRef<'div'>> & {\n /**\n * This flag is required in order to clarify a developer experience that seemed like it needed extra boilerplate\n * (`row-span-2`) or was buggy. See the description of the StackItem.Content component itself for more information.\n */\n toolbar: boolean;\n /**\n * Whether to provide for the layout of a statusbar after the content.\n */\n statusbar?: boolean;\n /**\n * Whether to set a certain aspect ratio on the content, including the toolbar and statusbar. This is provided for\n * convenience and consistency; it can instead be specified by the `classNames` or `style` props as needed.\n */\n size?: 'intrinsic' | 'video' | 'square';\n};\n\n/**\n * This component should be used by plugins for rendering content within a stack item, a.k.a. a “plank” or “section”.\n * The `toolbar` flag must be provided since this component provides for the layout of content with the toolbar.\n */\nexport const StackItemContent = forwardRef<HTMLDivElement, StackItemContentProps>(\n ({ children, toolbar, statusbar, classNames, size = 'intrinsic', ...props }, forwardedRef) => {\n const { size: stackItemSize } = useStack();\n\n return (\n <div\n role='none'\n {...props}\n className={mx(\n 'group grid grid-cols-[100%]',\n stackItemSize === 'contain' && 'min-bs-0 overflow-hidden',\n size === 'video' ? 'aspect-video' : size === 'square' && 'aspect-square',\n classNames,\n )}\n style={{\n gridTemplateRows: [\n ...(toolbar ? ['var(--rail-action)'] : []),\n '1fr',\n ...(statusbar ? ['var(--statusbar-size)'] : []),\n ].join(' '),\n }}\n ref={forwardedRef}\n >\n {children}\n </div>\n );\n },\n);\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport { Slot } from '@radix-ui/react-slot';\nimport React, { type ComponentPropsWithoutRef } from 'react';\n\nimport { useStackItem } from './StackContext';\n\nexport type StackItemDragHandleProps = ComponentPropsWithoutRef<'button'> & { asChild: boolean };\n\nexport const StackItemDragHandle = ({ asChild, children }: StackItemDragHandleProps) => {\n const { selfDragHandleRef } = useStackItem();\n\n const Root = asChild ? Slot : 'div';\n\n return (\n <Root ref={selfDragHandleRef} role='button'>\n {children}\n </Root>\n );\n};\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport { useFocusableGroup } from '@fluentui/react-tabster';\nimport React, { type ComponentPropsWithoutRef, type ComponentPropsWithRef, forwardRef } from 'react';\n\nimport { type ThemedClassName } from '@dxos/react-ui';\nimport { useAttention, type AttendableId, type Related } from '@dxos/react-ui-attention';\nimport { mx } from '@dxos/react-ui-theme';\n\nimport { useStack } from './StackContext';\n\nexport type StackItemHeadingProps = ThemedClassName<ComponentPropsWithoutRef<'div'>>;\n\nexport const StackItemHeading = ({ children, classNames, ...props }: StackItemHeadingProps) => {\n const { orientation } = useStack();\n const focusableGroupAttrs = useFocusableGroup({ tabBehavior: 'limited' });\n return (\n <div\n role='heading'\n {...props}\n tabIndex={0}\n {...focusableGroupAttrs}\n className={mx(\n 'flex items-center ch-focus-ring-inset-over-all relative !border-is-0',\n orientation === 'horizontal' ? 'bs-[--rail-size]' : 'is-[--rail-size] flex-col',\n classNames,\n )}\n >\n {children}\n </div>\n );\n};\n\nexport type StackItemHeadingLabelProps = ThemedClassName<ComponentPropsWithRef<'h1'>> & AttendableId & Related;\n\nexport const StackItemHeadingLabel = forwardRef<HTMLHeadingElement, StackItemHeadingLabelProps>(\n ({ attendableId, related, classNames, ...props }, forwardedRef) => {\n const { hasAttention, isAncestor, isRelated } = useAttention(attendableId);\n return (\n <h1\n {...props}\n data-attention={((related && isRelated) || hasAttention || isAncestor).toString()}\n className={mx(\n 'pli-1 min-is-0 is-0 grow truncate font-medium text-baseText data-[attention=true]:text-accentText self-center',\n classNames,\n )}\n ref={forwardedRef}\n />\n );\n },\n);\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport { draggable } from '@atlaskit/pragmatic-drag-and-drop/element/adapter';\nimport { disableNativeDragPreview } from '@atlaskit/pragmatic-drag-and-drop/element/disable-native-drag-preview';\nimport { preventUnhandled } from '@atlaskit/pragmatic-drag-and-drop/prevent-unhandled';\nimport { type DragLocationHistory } from '@atlaskit/pragmatic-drag-and-drop/types';\nimport React, { useLayoutEffect, useRef } from 'react';\n\nimport { mx } from '@dxos/react-ui-theme';\n\nimport { useStack, useStackItem, type StackItemSize } from './StackContext';\nimport { DEFAULT_EXTRINSIC_SIZE } from './StackItem';\n\nconst REM = parseFloat(getComputedStyle(document.documentElement).fontSize);\n\nconst MIN_SIZE = 20;\n\nconst measureStackItem = (element: HTMLButtonElement): { width: number; height: number } => {\n const stackItemElement = element.closest('[data-dx-stack-item]');\n return stackItemElement?.getBoundingClientRect() ?? { width: DEFAULT_EXTRINSIC_SIZE, height: DEFAULT_EXTRINSIC_SIZE };\n};\n\nconst getNextSize = (startSize: number, location: DragLocationHistory, client: 'clientX' | 'clientY') => {\n return Math.max(MIN_SIZE, startSize + (location.current.input[client] - location.initial.input[client]) / REM);\n};\n\nexport type StackItemResizeHandleProps = {};\n\nexport const StackItemResizeHandle = () => {\n const { orientation } = useStack();\n const { setSize, size } = useStackItem();\n const buttonRef = useRef<HTMLButtonElement>(null);\n const dragStartSize = useRef<StackItemSize>(size);\n const client = orientation === 'horizontal' ? 'clientX' : 'clientY';\n\n useLayoutEffect(\n () => {\n if (!buttonRef.current || buttonRef.current.hasAttribute('draggable')) {\n return;\n }\n // TODO(thure): This should handle StackItem state vs local state better.\n draggable({\n element: buttonRef.current,\n onGenerateDragPreview: ({ nativeSetDragImage }) => {\n // We will be moving the line to indicate a drag; we can disable the native drag preview.\n disableNativeDragPreview({ nativeSetDragImage });\n // We don't want any native drop animation for when the user does not drop on a drop target.\n // We want the drag to finish immediately.\n preventUnhandled.start();\n },\n onDragStart: () => {\n dragStartSize.current =\n dragStartSize.current === 'min-content'\n ? measureStackItem(buttonRef.current!)[orientation === 'horizontal' ? 'width' : 'height'] / REM\n : dragStartSize.current;\n },\n onDrag: ({ location }) => {\n if (typeof dragStartSize.current !== 'number') {\n return;\n }\n setSize(getNextSize(dragStartSize.current, location, client));\n },\n onDrop: ({ location }) => {\n if (typeof dragStartSize.current !== 'number') {\n return;\n }\n const nextSize = getNextSize(dragStartSize.current, location, client);\n setSize(nextSize, true);\n dragStartSize.current = nextSize;\n },\n });\n },\n [\n // Note that `size` should not be a dependency here since dragging this adjusts the size.\n ],\n );\n\n return (\n <button\n ref={buttonRef}\n className={mx(\n orientation === 'horizontal' ? 'cursor-col-resize' : 'cursor-row-resize',\n 'group absolute is-3 bs-full inline-end-[-1px] !border-lb-0',\n 'before:transition-opacity before:duration-100 before:ease-in-out before:opacity-0 hover:before:opacity-100 focus-visible:before:opacity-100 active:before:opacity-100',\n 'before:absolute before:block before:inset-block-0 before:inline-end-0 before:is-1 before:bg-accentFocusIndicator',\n )}\n >\n <div\n role='none'\n className='absolute block-start-0 inline-end-[1px] bs-[--rail-size] flex items-center group-hover:opacity-0 group-focus-visible:opacity-0 group-active:opacity-0'\n >\n <DragHandleSignifier />\n </div>\n </button>\n );\n};\n\nconst DragHandleSignifier = () => {\n return (\n <svg\n xmlns='http://www.w3.org/2000/svg'\n viewBox='0 0 256 256'\n fill='currentColor'\n className='shrink-0 bs-[1em] is-[1em] text-unAccent'\n >\n {/* two pips: <path d='M256,120c-8.8,0-16-7.2-16-16v-56c0-8.8,7.2-16,16-16v88Z' />\n <path d='M256,232c-8.8,0-16-7.2-16-16v-56c0-8.8,7.2-16,16-16v88Z' /> */}\n <path d='M256,64c-8.8,0-16-7.2-16-16s7.2-16,16-16v32Z' />\n <path d='M256,120c-8.8,0-16-7.2-16-16s7.2-16,16-16v32Z' />\n <path d='M256,176c-8.8,0-16-7.2-16-16s7.2-16,16-16v32Z' />\n <path d='M256,232c-8.8,0-16-7.2-16-16s7.2-16,16-16v32Z' />\n </svg>\n );\n};\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport React, { Fragment, type PropsWithChildren, forwardRef, useRef, useState } from 'react';\n\nimport { type ActionLike } from '@dxos/app-graph';\nimport { keySymbols } from '@dxos/keyboard';\nimport {\n Button,\n type ButtonProps,\n DropdownMenu,\n Icon,\n toLocalizedString,\n Tooltip,\n useTranslation,\n} from '@dxos/react-ui';\nimport { type AttendableId, type Related, useAttention } from '@dxos/react-ui-attention';\nimport { descriptionText, mx } from '@dxos/react-ui-theme';\nimport { getHostPlatform } from '@dxos/util';\n\nimport { MenuSignifierHorizontal } from './MenuSignifier';\nimport { translationKey } from '../translations';\n\nexport type KeyBinding = {\n windows?: string;\n macos?: string;\n ios?: string;\n linux?: string;\n unknown?: string;\n};\n\nexport type StackItemSigilAction = Pick<ActionLike, 'id' | 'properties' | 'data'>;\n\nexport type StackItemSigilButtonProps = Omit<ButtonProps, 'variant'> & AttendableId & Related;\n\nexport const StackItemSigilButton = forwardRef<HTMLButtonElement, StackItemSigilButtonProps>(\n ({ attendableId, classNames, related, children, ...props }, forwardedRef) => {\n const { hasAttention, isAncestor, isRelated } = useAttention(attendableId);\n const variant = (related && isRelated) || hasAttention || isAncestor ? 'primary' : 'ghost';\n return (\n <Button\n {...props}\n variant={variant}\n classNames={['shrink-0 pli-0 min-bs-0 is-[--rail-action] bs-[--rail-action] relative', classNames]}\n ref={forwardedRef}\n >\n <MenuSignifierHorizontal />\n {children}\n </Button>\n );\n },\n);\n\nexport type StackItemSigilProps = PropsWithChildren<\n {\n attendableId?: string;\n triggerLabel: string;\n actions?: StackItemSigilAction[][];\n icon: string;\n onAction?: (action: StackItemSigilAction) => void;\n } & Related\n>;\n\nexport const StackItemSigil = forwardRef<HTMLButtonElement, StackItemSigilProps>(\n ({ actions: actionGroups, onAction, triggerLabel, attendableId, icon, related, children }, forwardedRef) => {\n const { t } = useTranslation(translationKey);\n const suppressNextTooltip = useRef(false);\n\n const [optionsMenuOpen, setOptionsMenuOpen] = useState(false);\n const [triggerTooltipOpen, setTriggerTooltipOpen] = useState(false);\n\n return (\n <Tooltip.Root\n open={triggerTooltipOpen}\n onOpenChange={(nextOpen) => {\n if (suppressNextTooltip.current) {\n setTriggerTooltipOpen(false);\n suppressNextTooltip.current = false;\n } else {\n setTriggerTooltipOpen(nextOpen);\n }\n }}\n >\n <DropdownMenu.Root\n {...{\n open: optionsMenuOpen,\n onOpenChange: (nextOpen: boolean) => {\n if (!nextOpen) {\n suppressNextTooltip.current = true;\n }\n return setOptionsMenuOpen(nextOpen);\n },\n }}\n >\n <Tooltip.Trigger asChild>\n <DropdownMenu.Trigger asChild ref={forwardedRef}>\n <StackItemSigilButton attendableId={attendableId} related={related}>\n <span className='sr-only'>{triggerLabel}</span>\n <Icon icon={icon} size={5} />\n </StackItemSigilButton>\n </DropdownMenu.Trigger>\n </Tooltip.Trigger>\n <DropdownMenu.Portal>\n <DropdownMenu.Content classNames='z-[31]'>\n <DropdownMenu.Viewport>\n {actionGroups?.map((actions, index) => {\n const separator = index > 0 ? <DropdownMenu.Separator /> : null;\n return (\n <Fragment key={index}>\n {separator}\n {actions.map((action) => {\n const shortcut =\n typeof action.properties.keyBinding === 'string'\n ? action.properties.keyBinding\n : action.properties.keyBinding?.[getHostPlatform()];\n\n const menuItemType = action.properties.menuItemType;\n const Root = menuItemType === 'toggle' ? DropdownMenu.CheckboxItem : DropdownMenu.Item;\n\n return (\n <Root\n key={action.id}\n onClick={(event) => {\n if (action.properties.disabled) {\n return;\n }\n event.stopPropagation();\n // TODO(thure): Why does Dialog’s modal-ness cause issues if we don’t explicitly close the menu here?\n suppressNextTooltip.current = true;\n setOptionsMenuOpen(false);\n onAction?.(action);\n }}\n classNames='gap-2'\n disabled={action.properties.disabled}\n checked={menuItemType === 'toggle' ? action.properties.isChecked : undefined}\n {...(action.properties?.testId && { 'data-testid': action.properties.testId })}\n >\n <Icon icon={action.properties.icon ?? 'ph--placeholder--regular'} size={4} />\n <span className='grow truncate'>{toLocalizedString(action.properties.label ?? '', t)}</span>\n {menuItemType === 'toggle' && (\n <DropdownMenu.ItemIndicator asChild>\n <Icon icon='ph--check--regular' size={4} />\n </DropdownMenu.ItemIndicator>\n )}\n {shortcut && (\n <span className={mx('shrink-0', descriptionText)}>{keySymbols(shortcut).join('')}</span>\n )}\n </Root>\n );\n })}\n </Fragment>\n );\n })}\n {children}\n </DropdownMenu.Viewport>\n <DropdownMenu.Arrow />\n </DropdownMenu.Content>\n </DropdownMenu.Portal>\n </DropdownMenu.Root>\n <Tooltip.Portal>\n <Tooltip.Content side='bottom'>\n {triggerLabel}\n <Tooltip.Arrow />\n </Tooltip.Content>\n </Tooltip.Portal>\n </Tooltip.Root>\n );\n },\n);\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport React from 'react';\n\nexport const MenuSignifierHorizontal = () => (\n <svg\n className='absolute block-end-[7px]'\n width={20}\n height={2}\n viewBox='0 0 20 2'\n stroke='currentColor'\n opacity={0.5}\n >\n <line\n x1={0.5}\n y1={0.75}\n x2={19}\n y2={0.75}\n strokeWidth={1.25}\n strokeLinecap='round'\n strokeDasharray='6 20'\n strokeDashoffset='-6.5'\n />\n </svg>\n);\n\nexport const MenuSignifierVertical = () => (\n <svg className='absolute inline-start-1' width={2} height={18} viewBox='0 0 2 18' stroke='currentColor'>\n <line x1={1} y1={3} x2={1} y2={18} strokeWidth={1.5} strokeLinecap='round' strokeDasharray='0 6' />\n </svg>\n);\n", "//\n// Copyright 2023 DXOS.org\n//\n\nexport const translationKey = 'stack';\n\nexport default [\n {\n 'en-US': {\n [translationKey]: {\n 'resize label': 'Drag to resize',\n 'pin start label': 'Pin to the left sidebar',\n 'pin end label': 'Pin to the right sidebar',\n 'increment start label': 'Move to the left',\n 'increment end label': 'Move to the right',\n 'close label': 'Close',\n 'minify label': 'Minify',\n },\n },\n },\n];\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport React, { forwardRef } from 'react';\n\nimport {\n Button,\n ButtonGroup,\n type ButtonGroupProps,\n type ButtonProps,\n Icon,\n Tooltip,\n useTranslation,\n} from '@dxos/react-ui';\n\nimport { translationKey } from '../translations';\n\nexport type LayoutControlEvent = 'solo' | 'close' | `${'pin' | 'increment'}-${'start' | 'end'}`;\nexport type LayoutControlHandler = (event: LayoutControlEvent) => void;\n\nexport type LayoutCapabilities = {\n incrementStart?: boolean;\n incrementEnd?: boolean;\n solo?: boolean;\n};\n\nexport type LayoutControlsProps = Omit<ButtonGroupProps, 'onClick'> & {\n onClick?: LayoutControlHandler;\n variant?: 'hide-disabled' | 'default';\n close?: boolean | 'minify-start' | 'minify-end';\n capabilities: LayoutCapabilities;\n isSolo?: boolean;\n pin?: 'start' | 'end' | 'both';\n};\n\nconst LayoutControl = ({ icon, label, ...props }: Omit<ButtonProps, 'children'> & { label: string; icon: string }) => {\n return (\n <Tooltip.Root>\n <Tooltip.Trigger asChild>\n <Button variant='ghost' {...props}>\n <span className='sr-only'>{label}</span>\n <Icon icon={icon} />\n </Button>\n </Tooltip.Trigger>\n <Tooltip.Portal>\n <Tooltip.Content side='bottom'>{label}</Tooltip.Content>\n </Tooltip.Portal>\n </Tooltip.Root>\n );\n};\n\nexport const LayoutControls = forwardRef<HTMLDivElement, LayoutControlsProps>(\n (\n { onClick, variant = 'default', capabilities: can, isSolo, pin, close = false, children, ...props },\n forwardedRef,\n ) => {\n const { t } = useTranslation(translationKey);\n const buttonClassNames = variant === 'hide-disabled' ? 'disabled:hidden !p-1' : '!p-1';\n\n return (\n <ButtonGroup {...props} ref={forwardedRef}>\n {pin && !isSolo && ['both', 'start'].includes(pin) && (\n <LayoutControl\n label={t('pin start label')}\n variant='ghost'\n classNames={buttonClassNames}\n onClick={() => onClick?.('pin-start')}\n icon='ph--caret-line-left--regular'\n />\n )}\n\n {can.solo && (\n <LayoutControl\n label={t('solo layout label')}\n classNames={buttonClassNames}\n onClick={() => onClick?.('solo')}\n icon={isSolo ? 'ph--arrows-in--regular' : 'ph--arrows-out--regular'}\n />\n )}\n\n {!isSolo && can.solo && (\n <>\n <LayoutControl\n label={t('increment start label')}\n disabled={!can.incrementStart}\n classNames={buttonClassNames}\n onClick={() => onClick?.('increment-start')}\n icon='ph--caret-left--regular'\n />\n <LayoutControl\n label={t('increment end label')}\n disabled={!can.incrementEnd}\n classNames={buttonClassNames}\n onClick={() => onClick?.('increment-end')}\n icon='ph--caret-right--regular'\n />\n </>\n )}\n\n {pin && !isSolo && ['both', 'end'].includes(pin) && (\n <LayoutControl\n label={t('pin end label')}\n classNames={buttonClassNames}\n onClick={() => onClick?.('pin-end')}\n icon='ph--caret-line-right--regular'\n />\n )}\n\n {close && !isSolo && (\n <LayoutControl\n label={t(`${typeof close === 'string' ? 'minify' : 'close'} label`)}\n classNames={buttonClassNames}\n onClick={() => onClick?.('close')}\n data-testid='layoutHeading.close'\n icon={\n close === 'minify-start'\n ? 'ph--caret-line-left--regular'\n : close === 'minify-end'\n ? 'ph--caret-line-right--regular'\n : 'ph--x--regular'\n }\n />\n )}\n {children}\n </ButtonGroup>\n );\n },\n);\n"],
5
- "mappings": ";;;AAGA,SAASA,6BAA6B;AACtC,SAASC,mBAAmBC,0BAA0B;AACtD,SAASC,+BAA+B;AACxC,SAASC,mBAAmB;AAC5B,OAAOC,SACLC,UAGAC,YACAC,iBACAC,gBACK;AA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OAKVsB,OAAO,CAACD,UAAU;IAAC;IAAQ;IAAOW,SAASV,GAAAA,KAC1C,gBAAAnB,OAAA,cAACJ,eAAAA;IACCE,OAAOyB,EAAE,eAAA;IACTO,YAAYJ;IACZX,SAAS,MAAMA,UAAU,SAAA;IACzBlB,MAAK;MAIRuB,SAAS,CAACF,UACT,gBAAAlB,OAAA,cAACJ,eAAAA;IACCE,OAAOyB,EAAE,GAAG,OAAOH,UAAU,WAAW,WAAW,OAAA,QAAe;IAClEU,YAAYJ;IACZX,SAAS,MAAMA,UAAU,OAAA;IACzBoB,eAAY;IACZtC,MACEuB,UAAU,iBACN,iCACAA,UAAU,eACR,kCACA;MAIXC,QAAAA;AAGP,CAAA;",
6
- "names": ["dropTargetForElements", "attachClosestEdge", "extractClosestEdge", "useArrowNavigationGroup", "composeRefs", "React", "Children", "forwardRef", "useLayoutEffect", "useState", "ListItem", "mx", "createContext", "useContext", "StackContext", "createContext", "orientation", "rail", "size", "useStack", "useContext", "StackItemContext", "selfDragHandleRef", "setSize", "useStackItem", "railGridHorizontal", "railGridVertical", "Stack", "forwardRef", "children", "classNames", "style", "orientation", "rail", "size", "onRearrange", "itemsCount", "Children", "count", "props", "forwardedRef", "stackElement", "stackRef", "useState", "composedItemRef", "composeRefs", "dropping", "setDropping", "arrowNavigationGroup", "useArrowNavigationGroup", "axis", "styles", "selfDroppable", "id", "useLayoutEffect", "acceptSourceType", "dropTargetForElements", "element", "getData", "input", "attachClosestEdge", "type", "allowedEdges", "onDragEnter", "source", "data", "onDrag", "onDragLeave", "onDrop", "self", "extractClosestEdge", "StackContext", "Provider", "value", "div", "className", "mx", "aria-orientation", "ref", "ListItem", "DropIndicator", "edge", "combine", "draggable", "dropTargetForElements", "disableNativeDragPreview", "preventUnhandled", "attachClosestEdge", "extractClosestEdge", "useFocusableGroup", "composeRefs", "React", "forwardRef", "useLayoutEffect", "useState", "useCallback", "ListItem", "mx", "React", "forwardRef", "mx", "StackItemContent", "forwardRef", "children", "toolbar", "statusbar", "classNames", "size", "props", "forwardedRef", "stackItemSize", "useStack", "React", "div", "role", "className", "mx", "style", "gridTemplateRows", "join", "ref", "Slot", "React", "StackItemDragHandle", "asChild", "children", "selfDragHandleRef", "useStackItem", "Root", "Slot", "React", "ref", "role", "useFocusableGroup", "React", "forwardRef", "useAttention", "mx", "StackItemHeading", "children", "classNames", "props", "orientation", "useStack", "focusableGroupAttrs", "useFocusableGroup", "tabBehavior", "React", "div", "role", "tabIndex", "className", "mx", "StackItemHeadingLabel", "forwardRef", "attendableId", "related", "forwardedRef", "hasAttention", "isAncestor", "isRelated", "useAttention", "h1", "data-attention", "toString", "ref", "draggable", "disableNativeDragPreview", "preventUnhandled", "React", "useLayoutEffect", "useRef", "mx", "REM", "parseFloat", "getComputedStyle", "document", "documentElement", "fontSize", "MIN_SIZE", "measureStackItem", "element", "stackItemElement", "closest", "getBoundingClientRect", "width", "DEFAULT_EXTRINSIC_SIZE", "height", "getNextSize", "startSize", "location", "client", "Math", "max", "current", "input", "initial", "StackItemResizeHandle", "orientation", "useStack", "setSize", "size", "useStackItem", "buttonRef", "useRef", "dragStartSize", "useLayoutEffect", "hasAttribute", "draggable", "onGenerateDragPreview", "nativeSetDragImage", "disableNativeDragPreview", "preventUnhandled", "start", "onDragStart", "onDrag", "onDrop", "nextSize", "React", "button", "ref", "className", "mx", "div", "role", "DragHandleSignifier", "svg", "xmlns", "viewBox", "fill", "path", "d", "React", "Fragment", "forwardRef", "useRef", "useState", "keySymbols", "Button", "DropdownMenu", "Icon", "toLocalizedString", "Tooltip", "useTranslation", "useAttention", "descriptionText", "mx", "getHostPlatform", "React", "MenuSignifierHorizontal", "React", "svg", "className", "width", "height", "viewBox", "stroke", "opacity", "line", "x1", "y1", "x2", "y2", "strokeWidth", "strokeLinecap", "strokeDasharray", "strokeDashoffset", "translationKey", "StackItemSigilButton", "forwardRef", "attendableId", "classNames", "related", "children", "props", "forwardedRef", "hasAttention", "isAncestor", "isRelated", "useAttention", "variant", "React", "Button", "ref", "MenuSignifierHorizontal", "StackItemSigil", "actions", "actionGroups", "onAction", "triggerLabel", "icon", "t", "useTranslation", "translationKey", "suppressNextTooltip", "useRef", "optionsMenuOpen", "setOptionsMenuOpen", "useState", "triggerTooltipOpen", "setTriggerTooltipOpen", "Tooltip", "Root", "open", "onOpenChange", "nextOpen", "current", "DropdownMenu", "Trigger", "asChild", "span", "className", "Icon", "size", "Portal", "Content", "Viewport", "map", "index", "separator", "Separator", "Fragment", "key", "action", "shortcut", "properties", "keyBinding", "getHostPlatform", "menuItemType", "CheckboxItem", "Item", "id", "onClick", "event", "disabled", "stopPropagation", "checked", "isChecked", "undefined", "testId", "toLocalizedString", "label", "ItemIndicator", "mx", "descriptionText", "keySymbols", "join", "Arrow", "side", "DEFAULT_HORIZONTAL_SIZE", "DEFAULT_VERTICAL_SIZE", "DEFAULT_EXTRINSIC_SIZE", "StackItemRoot", "forwardRef", "item", "children", "classNames", "size", "propsSize", "onSizeChange", "role", "order", "style", "props", "forwardedRef", "itemElement", "itemRef", "useState", "selfDragHandleElement", "selfDragHandleRef", "closestEdge", "setEdge", "orientation", "rail", "onRearrange", "useStack", "setInternalSize", "Root", "composedItemRef", "composeRefs", "setSize", "useCallback", "nextSize", "commit", "type", "useLayoutEffect", "combine", "draggable", "element", "dragHandle", "getInitialData", "id", "onGenerateDragPreview", "nativeSetDragImage", "disableNativeDragPreview", "preventUnhandled", "start", "dropTargetForElements", "getData", "input", "attachClosestEdge", "allowedEdges", "onDragEnter", "self", "source", "data", "extractClosestEdge", "onDrag", "onDragLeave", "onDrop", "focusGroupAttrs", "useFocusableGroup", "tabBehavior", "React", "StackItemContext", "Provider", "value", "tabIndex", "className", "mx", "data-dx-stack-item", "Number", "isFinite", "ref", "ListItem", "DropIndicator", "edge", "StackItem", "Content", "StackItemContent", "Heading", "StackItemHeading", "HeadingLabel", "StackItemHeadingLabel", "ResizeHandle", "StackItemResizeHandle", "DragHandle", "StackItemDragHandle", "Sigil", "StackItemSigil", "SigilButton", "StackItemSigilButton", "React", "forwardRef", "Button", "ButtonGroup", "Icon", "Tooltip", "useTranslation", "LayoutControl", "icon", "label", "props", "React", "Tooltip", "Root", "Trigger", "asChild", "Button", "variant", "span", "className", "Icon", "Portal", "Content", "side", "LayoutControls", "forwardRef", "onClick", "capabilities", "can", "isSolo", "pin", "close", "children", "forwardedRef", "t", "useTranslation", "translationKey", "buttonClassNames", "ButtonGroup", "ref", "includes", "classNames", "solo", "disabled", "incrementStart", "incrementEnd", "data-testid"]
4
+ "sourcesContent": ["//\n// Copyright 2024 DXOS.org\n//\nimport { dropTargetForElements } from '@atlaskit/pragmatic-drag-and-drop/element/adapter';\nimport { attachClosestEdge, extractClosestEdge } from '@atlaskit/pragmatic-drag-and-drop-hitbox/closest-edge';\nimport { useArrowNavigationGroup } from '@fluentui/react-tabster';\nimport { composeRefs } from '@radix-ui/react-compose-refs';\nimport React, {\n Children,\n type CSSProperties,\n type ComponentPropsWithRef,\n forwardRef,\n useLayoutEffect,\n useState,\n} from 'react';\n\nimport { type ThemedClassName, ListItem } from '@dxos/react-ui';\nimport { mx } from '@dxos/react-ui-theme';\n\nimport { type StackContextValue, StackContext, type StackItemData } from './StackContext';\n\nexport type Orientation = 'horizontal' | 'vertical';\nexport type Size = 'intrinsic' | 'contain';\n\nexport type StackProps = Omit<ThemedClassName<ComponentPropsWithRef<'div'>>, 'aria-orientation'> &\n Partial<StackContextValue> & { itemsCount?: number };\n\nexport const railGridHorizontal = 'grid-rows-[[rail-start]_var(--rail-size)_[content-start]_1fr_[content-end]]';\n\nexport const railGridVertical = 'grid-cols-[[rail-start]_var(--rail-size)_[content-start]_1fr_[content-end]]';\n\nexport const Stack = forwardRef<HTMLDivElement, StackProps>(\n (\n {\n children,\n classNames,\n style,\n orientation = 'vertical',\n rail = true,\n size = 'intrinsic',\n onRearrange,\n itemsCount = Children.count(children),\n ...props\n },\n forwardedRef,\n ) => {\n const [stackElement, stackRef] = useState<HTMLDivElement | null>(null);\n const composedItemRef = composeRefs<HTMLDivElement>(stackRef, forwardedRef);\n const [dropping, setDropping] = useState(false);\n\n const arrowNavigationGroup = useArrowNavigationGroup({ axis: orientation });\n\n const styles: CSSProperties = {\n [orientation === 'horizontal' ? 'gridTemplateColumns' : 'gridTemplateRows']: `repeat(${itemsCount}, min-content)`,\n ...style,\n };\n\n const selfDroppable = !!(itemsCount < 1 && onRearrange && props.id);\n\n useLayoutEffect(() => {\n if (!stackElement || !selfDroppable) {\n return;\n }\n const acceptSourceType = orientation === 'horizontal' ? 'column' : 'card';\n return dropTargetForElements({\n element: stackElement,\n getData: ({ input, element }) => {\n return attachClosestEdge(\n { id: props.id, type: orientation === 'horizontal' ? 'card' : 'column' },\n { input, element, allowedEdges: [orientation === 'horizontal' ? 'left' : 'top'] },\n );\n },\n onDragEnter: ({ source }) => {\n if (source.data.type === acceptSourceType) {\n setDropping(true);\n }\n },\n onDrag: ({ source }) => {\n if (source.data.type === acceptSourceType) {\n setDropping(true);\n }\n },\n onDragLeave: () => setDropping(false),\n onDrop: ({ self, source }) => {\n setDropping(false);\n if (source.data.type === acceptSourceType && selfDroppable) {\n onRearrange(source.data as StackItemData, self.data as StackItemData, extractClosestEdge(self.data));\n }\n },\n });\n }, [stackElement, selfDroppable]);\n\n return (\n <StackContext.Provider value={{ orientation, rail, size, onRearrange }}>\n <div\n {...props}\n {...arrowNavigationGroup}\n className={mx(\n 'grid relative',\n rail\n ? orientation === 'horizontal'\n ? railGridHorizontal\n : railGridVertical\n : orientation === 'horizontal'\n ? 'grid-rows-1'\n : 'grid-cols-1',\n size === 'contain' &&\n (orientation === 'horizontal'\n ? 'overflow-x-auto min-bs-0 bs-full max-bs-full'\n : 'overflow-y-auto min-is-0 is-full max-is-full'),\n classNames,\n )}\n aria-orientation={orientation}\n style={styles}\n ref={composedItemRef}\n >\n {children}\n {selfDroppable && dropping && <ListItem.DropIndicator edge={orientation === 'horizontal' ? 'left' : 'top'} />}\n </div>\n </StackContext.Provider>\n );\n },\n);\n\nexport { StackContext };\nexport type { StackContextValue };\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport type { Edge } from '@atlaskit/pragmatic-drag-and-drop-hitbox/closest-edge';\nimport { createContext, useContext } from 'react';\n\nimport { type Orientation, type Size } from './Stack';\n\nexport type StackItemSize = number | 'min-content';\n\nexport type StackItemData = { id: string; type: 'column' | 'card' };\n\nexport type StackItemRearrangeHandler = (\n source: StackItemData,\n target: StackItemData,\n closestEdge: Edge | null,\n) => void;\n\nexport type StackContextValue = {\n orientation: Orientation;\n rail: boolean;\n size: Size;\n onRearrange?: StackItemRearrangeHandler;\n};\n\nexport const StackContext = createContext<StackContextValue>({\n orientation: 'vertical',\n rail: true,\n size: 'intrinsic',\n});\n\nexport const useStack = () => useContext(StackContext);\n\nexport type StackItemContextValue = {\n selfDragHandleRef: (element: HTMLDivElement | null) => void;\n size: StackItemSize;\n setSize: (nextSize: StackItemSize, commit?: boolean) => void;\n};\n\nexport const StackItemContext = createContext<StackItemContextValue>({\n selfDragHandleRef: () => {},\n size: 'min-content',\n setSize: () => {},\n});\n\nexport const useStackItem = () => useContext(StackItemContext);\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 { preserveOffsetOnSource } from '@atlaskit/pragmatic-drag-and-drop/element/preserve-offset-on-source';\nimport { scrollJustEnoughIntoView } from '@atlaskit/pragmatic-drag-and-drop/element/scroll-just-enough-into-view';\nimport {\n attachClosestEdge,\n extractClosestEdge,\n type Edge,\n} from '@atlaskit/pragmatic-drag-and-drop-hitbox/closest-edge';\nimport { useFocusableGroup } from '@fluentui/react-tabster';\nimport { composeRefs } from '@radix-ui/react-compose-refs';\nimport React, { forwardRef, useLayoutEffect, useState, type ComponentPropsWithRef, useCallback } from 'react';\n\nimport { type ThemedClassName, ListItem } from '@dxos/react-ui';\nimport { mx } from '@dxos/react-ui-theme';\n\nimport { useStack, StackItemContext, type StackItemSize, type StackItemData } from './StackContext';\nimport { StackItemContent, type StackItemContentProps } from './StackItemContent';\nimport { StackItemDragHandle, type StackItemDragHandleProps } from './StackItemDragHandle';\nimport {\n StackItemHeading,\n StackItemHeadingLabel,\n type StackItemHeadingProps,\n type StackItemHeadingLabelProps,\n} from './StackItemHeading';\nimport { StackItemResizeHandle, type StackItemResizeHandleProps } from './StackItemResizeHandle';\nimport {\n StackItemSigil,\n type StackItemSigilProps,\n type StackItemSigilAction,\n type StackItemSigilButtonProps,\n StackItemSigilButton,\n} from './StackItemSigil';\n\nexport const DEFAULT_HORIZONTAL_SIZE = 44 satisfies StackItemSize;\nexport const DEFAULT_VERTICAL_SIZE = 'min-content' satisfies StackItemSize;\nexport const DEFAULT_EXTRINSIC_SIZE = DEFAULT_HORIZONTAL_SIZE satisfies StackItemSize;\n\nexport type StackItemRootProps = ThemedClassName<ComponentPropsWithRef<'div'>> & {\n item: Omit<StackItemData, 'type'>;\n order?: number;\n size?: StackItemSize;\n onSizeChange?: (nextSize: StackItemSize) => void;\n role?: 'article' | 'section';\n disableRearrange?: boolean;\n};\n\nconst StackItemRoot = forwardRef<HTMLDivElement, StackItemRootProps>(\n (\n { item, children, classNames, size: propsSize, onSizeChange, role, order, style, disableRearrange, ...props },\n forwardedRef,\n ) => {\n const [itemElement, itemRef] = useState<HTMLDivElement | null>(null);\n const [selfDragHandleElement, selfDragHandleRef] = useState<HTMLDivElement | null>(null);\n const [closestEdge, setEdge] = useState<Edge | null>(null);\n const { orientation, rail, onRearrange } = useStack();\n const [size = orientation === 'horizontal' ? DEFAULT_HORIZONTAL_SIZE : DEFAULT_VERTICAL_SIZE, setInternalSize] =\n useState(propsSize);\n\n const Root = role ?? 'div';\n\n const composedItemRef = composeRefs<HTMLDivElement>(itemRef, forwardedRef);\n\n const setSize = useCallback(\n (nextSize: StackItemSize, commit?: boolean) => {\n setInternalSize(nextSize);\n if (commit) {\n onSizeChange?.(nextSize);\n }\n },\n [onSizeChange],\n );\n\n const type = orientation === 'horizontal' ? 'column' : 'card';\n\n useLayoutEffect(() => {\n if (!itemElement || !onRearrange || disableRearrange) {\n return;\n }\n return combine(\n draggable({\n element: itemElement,\n ...(selfDragHandleElement && { dragHandle: selfDragHandleElement }),\n getInitialData: () => ({ id: item.id, type }),\n onGenerateDragPreview: ({ nativeSetDragImage, source, location }) => {\n document.body.setAttribute('data-drag-preview', 'true');\n scrollJustEnoughIntoView({ element: source.element });\n const { x, y } = preserveOffsetOnSource({ element: source.element, input: location.current.input })({\n container: (source.element.offsetParent ?? document.body) as HTMLElement,\n });\n nativeSetDragImage?.(source.element, x, y);\n },\n onDragStart: () => {\n document.body.removeAttribute('data-drag-preview');\n },\n }),\n dropTargetForElements({\n element: itemElement,\n getData: ({ input, element }) => {\n return attachClosestEdge(\n { id: item.id, type },\n { input, element, allowedEdges: orientation === 'horizontal' ? ['left', 'right'] : ['top', 'bottom'] },\n );\n },\n onDragEnter: ({ self, source }) => {\n if (source.data.type === self.data.type) {\n setEdge(extractClosestEdge(self.data));\n }\n },\n onDrag: ({ self, source }) => {\n if (source.data.type === self.data.type) {\n setEdge(extractClosestEdge(self.data));\n }\n },\n onDragLeave: () => setEdge(null),\n onDrop: ({ self, source }) => {\n setEdge(null);\n if (source.data.type === self.data.type) {\n onRearrange(source.data as StackItemData, self.data as StackItemData, extractClosestEdge(self.data));\n }\n },\n }),\n );\n }, [orientation, item, onRearrange, selfDragHandleElement, itemElement]);\n\n const focusGroupAttrs = useFocusableGroup({ tabBehavior: 'limited' });\n\n return (\n <StackItemContext.Provider value={{ selfDragHandleRef, size, setSize }}>\n <Root\n {...props}\n tabIndex={0}\n {...focusGroupAttrs}\n className={mx(\n 'group/stack-item grid relative dx-focus-ring-inset-over-all',\n size === 'min-content' && (orientation === 'horizontal' ? 'is-min' : 'bs-min'),\n orientation === 'horizontal' ? 'grid-rows-subgrid' : 'grid-cols-subgrid',\n rail && (orientation === 'horizontal' ? 'row-span-2' : 'col-span-2'),\n classNames,\n )}\n data-dx-stack-item\n style={{\n ...(size !== 'min-content' && {\n [orientation === 'horizontal' ? 'inlineSize' : 'blockSize']: `${size}rem`,\n }),\n ...(Number.isFinite(order) && {\n [orientation === 'horizontal' ? 'gridColumn' : 'gridRow']: `${order}`,\n }),\n ...style,\n }}\n ref={composedItemRef}\n >\n {children}\n {closestEdge && <ListItem.DropIndicator edge={closestEdge} />}\n </Root>\n </StackItemContext.Provider>\n );\n },\n);\n\nexport const StackItem = {\n Root: StackItemRoot,\n Content: StackItemContent,\n Heading: StackItemHeading,\n HeadingLabel: StackItemHeadingLabel,\n ResizeHandle: StackItemResizeHandle,\n DragHandle: StackItemDragHandle,\n Sigil: StackItemSigil,\n SigilButton: StackItemSigilButton,\n};\n\nexport type {\n StackItemContentProps,\n StackItemHeadingProps,\n StackItemHeadingLabelProps,\n StackItemResizeHandleProps,\n StackItemDragHandleProps,\n StackItemSigilProps,\n StackItemSigilButtonProps,\n StackItemSigilAction,\n};\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport React, { type ComponentPropsWithoutRef, forwardRef } from 'react';\n\nimport { type ThemedClassName } from '@dxos/react-ui';\nimport { mx } from '@dxos/react-ui-theme';\n\nimport { useStack } from './StackContext';\n\nexport type StackItemContentProps = ThemedClassName<ComponentPropsWithoutRef<'div'>> & {\n /**\n * This flag is required in order to clarify a developer experience that seemed like it needed extra boilerplate\n * (`row-span-2`) or was buggy. See the description of the StackItem.Content component itself for more information.\n */\n toolbar: boolean;\n /**\n * Whether to provide for the layout of a statusbar after the content.\n */\n statusbar?: boolean;\n /**\n * Whether to set a certain aspect ratio on the content, including the toolbar and statusbar. This is provided for\n * convenience and consistency; it can instead be specified by the `classNames` or `style` props as needed.\n */\n size?: 'intrinsic' | 'video' | 'square';\n};\n\n/**\n * This component should be used by plugins for rendering content within a stack item, a.k.a. a “plank” or “section”.\n * The `toolbar` flag must be provided since this component provides for the layout of content with the toolbar.\n */\nexport const StackItemContent = forwardRef<HTMLDivElement, StackItemContentProps>(\n ({ children, toolbar, statusbar, classNames, size = 'intrinsic', ...props }, forwardedRef) => {\n const { size: stackItemSize } = useStack();\n\n return (\n <div\n role='none'\n {...props}\n className={mx(\n 'group grid grid-cols-[100%]',\n stackItemSize === 'contain' && 'min-bs-0 overflow-hidden',\n size === 'video' ? 'aspect-video' : size === 'square' && 'aspect-square',\n classNames,\n )}\n style={{\n gridTemplateRows: [\n ...(toolbar ? ['var(--rail-action)'] : []),\n '1fr',\n ...(statusbar ? ['var(--statusbar-size)'] : []),\n ].join(' '),\n }}\n ref={forwardedRef}\n >\n {children}\n </div>\n );\n },\n);\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport { Slot } from '@radix-ui/react-slot';\nimport React, { type ComponentPropsWithoutRef } from 'react';\n\nimport { useStackItem } from './StackContext';\n\nexport type StackItemDragHandleProps = ComponentPropsWithoutRef<'button'> & { asChild: boolean };\n\nexport const StackItemDragHandle = ({ asChild, children }: StackItemDragHandleProps) => {\n const { selfDragHandleRef } = useStackItem();\n\n const Root = asChild ? Slot : 'div';\n\n return (\n <Root ref={selfDragHandleRef} role='button'>\n {children}\n </Root>\n );\n};\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport { useFocusableGroup } from '@fluentui/react-tabster';\nimport React, { type ComponentPropsWithoutRef, type ComponentPropsWithRef, forwardRef } from 'react';\n\nimport { type ThemedClassName } from '@dxos/react-ui';\nimport { useAttention, type AttendableId, type Related } from '@dxos/react-ui-attention';\nimport { mx } from '@dxos/react-ui-theme';\n\nimport { useStack } from './StackContext';\n\nexport type StackItemHeadingProps = ThemedClassName<ComponentPropsWithoutRef<'div'>>;\n\nexport const StackItemHeading = ({ children, classNames, ...props }: StackItemHeadingProps) => {\n const { orientation } = useStack();\n const focusableGroupAttrs = useFocusableGroup({ tabBehavior: 'limited' });\n return (\n <div\n role='heading'\n {...props}\n tabIndex={0}\n {...focusableGroupAttrs}\n className={mx(\n 'flex items-center dx-focus-ring-inset-over-all relative !border-is-0',\n orientation === 'horizontal' ? 'bs-[--rail-size]' : 'is-[--rail-size] flex-col',\n classNames,\n )}\n >\n {children}\n </div>\n );\n};\n\nexport type StackItemHeadingLabelProps = ThemedClassName<ComponentPropsWithRef<'h1'>> & AttendableId & Related;\n\nexport const StackItemHeadingLabel = forwardRef<HTMLHeadingElement, StackItemHeadingLabelProps>(\n ({ attendableId, related, classNames, ...props }, forwardedRef) => {\n const { hasAttention, isAncestor, isRelated } = useAttention(attendableId);\n return (\n <h1\n {...props}\n data-attention={((related && isRelated) || hasAttention || isAncestor).toString()}\n className={mx(\n 'pli-1 min-is-0 is-0 grow truncate font-medium text-baseText data-[attention=true]:text-accentText self-center',\n classNames,\n )}\n ref={forwardedRef}\n />\n );\n },\n);\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport { draggable } from '@atlaskit/pragmatic-drag-and-drop/element/adapter';\nimport { disableNativeDragPreview } from '@atlaskit/pragmatic-drag-and-drop/element/disable-native-drag-preview';\nimport { preventUnhandled } from '@atlaskit/pragmatic-drag-and-drop/prevent-unhandled';\nimport { type DragLocationHistory } from '@atlaskit/pragmatic-drag-and-drop/types';\nimport React, { useLayoutEffect, useRef } from 'react';\n\nimport { mx } from '@dxos/react-ui-theme';\n\nimport { useStack, useStackItem, type StackItemSize } from './StackContext';\nimport { DEFAULT_EXTRINSIC_SIZE } from './StackItem';\n\nconst REM = parseFloat(getComputedStyle(document.documentElement).fontSize);\n\nconst MIN_WIDTH = 20;\nconst MIN_HEIGHT = 3;\n\nconst measureStackItem = (element: HTMLButtonElement): { width: number; height: number } => {\n const stackItemElement = element.closest('[data-dx-stack-item]');\n return stackItemElement?.getBoundingClientRect() ?? { width: DEFAULT_EXTRINSIC_SIZE, height: DEFAULT_EXTRINSIC_SIZE };\n};\n\nconst getNextSize = (startSize: number, location: DragLocationHistory, client: 'clientX' | 'clientY') => {\n return Math.max(\n client === 'clientX' ? MIN_WIDTH : MIN_HEIGHT,\n startSize + (location.current.input[client] - location.initial.input[client]) / REM,\n );\n};\n\nexport type StackItemResizeHandleProps = {};\n\nexport const StackItemResizeHandle = () => {\n const { orientation } = useStack();\n const { setSize, size } = useStackItem();\n const buttonRef = useRef<HTMLButtonElement>(null);\n const dragStartSize = useRef<StackItemSize>(size);\n const client = orientation === 'horizontal' ? 'clientX' : 'clientY';\n\n useLayoutEffect(\n () => {\n if (!buttonRef.current || buttonRef.current.hasAttribute('draggable')) {\n return;\n }\n // TODO(thure): This should handle StackItem state vs local state better.\n draggable({\n element: buttonRef.current,\n onGenerateDragPreview: ({ nativeSetDragImage }) => {\n // We will be moving the line to indicate a drag; we can disable the native drag preview.\n disableNativeDragPreview({ nativeSetDragImage });\n // We don't want any native drop animation for when the user does not drop on a drop target.\n // We want the drag to finish immediately.\n preventUnhandled.start();\n },\n onDragStart: () => {\n dragStartSize.current =\n dragStartSize.current === 'min-content'\n ? measureStackItem(buttonRef.current!)[orientation === 'horizontal' ? 'width' : 'height'] / REM\n : dragStartSize.current;\n },\n onDrag: ({ location }) => {\n if (typeof dragStartSize.current !== 'number') {\n return;\n }\n setSize(getNextSize(dragStartSize.current, location, client));\n },\n onDrop: ({ location }) => {\n if (typeof dragStartSize.current !== 'number') {\n return;\n }\n const nextSize = getNextSize(dragStartSize.current, location, client);\n setSize(nextSize, true);\n dragStartSize.current = nextSize;\n },\n });\n },\n [\n // Note that `size` should not be a dependency here since dragging this adjusts the size.\n ],\n );\n\n return (\n <button\n ref={buttonRef}\n className={mx(\n 'group absolute',\n orientation === 'horizontal'\n ? 'cursor-col-resize is-3 bs-full inline-end-[-1px] !border-lb-0 before:inset-block-0 before:inline-end-0 before:is-1'\n : 'cursor-row-resize bs-3 is-full block-end-[-1px] !border-li-0 before:inset-inline-0 before:block-end-0 before:bs-1',\n 'before:transition-opacity before:duration-100 before:ease-in-out before:opacity-0 hover:before:opacity-100 focus-visible:before:opacity-100 active:before:opacity-100',\n 'before:absolute before:block before:bg-accentFocusIndicator',\n )}\n >\n <div\n role='none'\n className={mx(\n 'absolute flex items-center group-hover:opacity-0 group-focus-visible:opacity-0 group-active:opacity-0',\n orientation === 'horizontal'\n ? 'block-start-0 inline-end-px bs-[--rail-size]'\n : 'inline-start-0 block-end-px is-[--rail-size] flex justify-center',\n )}\n >\n <DragHandleSignifier orientation={orientation} />\n </div>\n </button>\n );\n};\n\nconst DragHandleSignifier = ({ orientation }: { orientation: 'horizontal' | 'vertical' }) => {\n return (\n <svg\n xmlns='http://www.w3.org/2000/svg'\n viewBox='0 0 256 256'\n fill='currentColor'\n className={mx('shrink-0 bs-[1em] is-[1em] text-unAccent', orientation === 'vertical' && 'rotate-90')}\n >\n {/* two pips: <path d='M256,120c-8.8,0-16-7.2-16-16v-56c0-8.8,7.2-16,16-16v88Z' />\n <path d='M256,232c-8.8,0-16-7.2-16-16v-56c0-8.8,7.2-16,16-16v88Z' /> */}\n <path d='M256,64c-8.8,0-16-7.2-16-16s7.2-16,16-16v32Z' />\n <path d='M256,120c-8.8,0-16-7.2-16-16s7.2-16,16-16v32Z' />\n <path d='M256,176c-8.8,0-16-7.2-16-16s7.2-16,16-16v32Z' />\n <path d='M256,232c-8.8,0-16-7.2-16-16s7.2-16,16-16v32Z' />\n </svg>\n );\n};\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport React, { Fragment, type PropsWithChildren, forwardRef, useRef, useState } from 'react';\n\nimport { type ActionLike } from '@dxos/app-graph';\nimport { keySymbols } from '@dxos/keyboard';\nimport { Button, type ButtonProps, DropdownMenu, Icon, toLocalizedString, useTranslation } from '@dxos/react-ui';\nimport { type AttendableId, type Related, useAttention } from '@dxos/react-ui-attention';\nimport { descriptionText, mx } from '@dxos/react-ui-theme';\nimport { getHostPlatform } from '@dxos/util';\n\nimport { MenuSignifierHorizontal } from './MenuSignifier';\nimport { translationKey } from '../translations';\n\nexport type KeyBinding = {\n windows?: string;\n macos?: string;\n ios?: string;\n linux?: string;\n unknown?: string;\n};\n\nexport type StackItemSigilAction = Pick<ActionLike, 'id' | 'properties' | 'data'>;\n\nexport type StackItemSigilButtonProps = Omit<ButtonProps, 'variant'> & AttendableId & Related;\n\nexport const StackItemSigilButton = forwardRef<HTMLButtonElement, StackItemSigilButtonProps>(\n ({ attendableId, classNames, related, children, ...props }, forwardedRef) => {\n const { hasAttention, isAncestor, isRelated } = useAttention(attendableId);\n const variant = (related && isRelated) || hasAttention || isAncestor ? 'primary' : 'ghost';\n return (\n <Button\n {...props}\n variant={variant}\n classNames={['shrink-0 pli-0 min-bs-0 is-[--rail-action] bs-[--rail-action] relative app-no-drag', classNames]}\n ref={forwardedRef}\n >\n <MenuSignifierHorizontal />\n {children}\n </Button>\n );\n },\n);\n\nexport type StackItemSigilProps = PropsWithChildren<\n {\n attendableId?: string;\n triggerLabel: string;\n actions?: StackItemSigilAction[][];\n icon: string;\n onAction?: (action: StackItemSigilAction) => void;\n } & Related\n>;\n\nexport const StackItemSigil = forwardRef<HTMLButtonElement, StackItemSigilProps>(\n ({ actions: actionGroups, onAction, triggerLabel, attendableId, icon, related, children }, forwardedRef) => {\n const { t } = useTranslation(translationKey);\n const suppressNextTooltip = useRef(false);\n\n const [optionsMenuOpen, setOptionsMenuOpen] = useState(false);\n\n const hasActions = actionGroups && actionGroups.length > 0;\n\n const button = (\n <StackItemSigilButton\n attendableId={attendableId}\n related={related}\n // TODO(wittjosiah): Better disabling of interactive styles when no action are available.\n // Remove underscore icon when no actions are available?\n classNames={!hasActions && 'cursor-default'}\n >\n <span className='sr-only'>{triggerLabel}</span>\n <Icon icon={icon} size={5} />\n </StackItemSigilButton>\n );\n\n if (!hasActions) {\n return button;\n }\n\n return (\n <DropdownMenu.Root\n {...{\n open: optionsMenuOpen,\n onOpenChange: (nextOpen: boolean) => {\n if (!nextOpen) {\n suppressNextTooltip.current = true;\n }\n return setOptionsMenuOpen(nextOpen);\n },\n }}\n >\n <DropdownMenu.Trigger asChild ref={forwardedRef}>\n {button}\n </DropdownMenu.Trigger>\n <DropdownMenu.Portal>\n <DropdownMenu.Content classNames='z-[31]'>\n <DropdownMenu.Viewport>\n {actionGroups?.map((actions, index) => {\n const separator = index > 0 ? <DropdownMenu.Separator /> : null;\n return (\n <Fragment key={index}>\n {separator}\n {actions.map((action) => {\n const shortcut =\n typeof action.properties.keyBinding === 'string'\n ? action.properties.keyBinding\n : action.properties.keyBinding?.[getHostPlatform()];\n\n const menuItemType = action.properties.menuItemType;\n const Root = menuItemType === 'toggle' ? DropdownMenu.CheckboxItem : DropdownMenu.Item;\n\n return (\n <Root\n key={action.id}\n onClick={(event) => {\n if (action.properties.disabled) {\n return;\n }\n event.stopPropagation();\n // TODO(thure): Why does Dialog’s modal-ness cause issues if we don’t explicitly close the menu here?\n suppressNextTooltip.current = true;\n setOptionsMenuOpen(false);\n onAction?.(action);\n }}\n classNames='gap-2'\n disabled={action.properties.disabled}\n checked={menuItemType === 'toggle' ? action.properties.isChecked : undefined}\n {...(action.properties?.testId && { 'data-testid': action.properties.testId })}\n >\n <Icon icon={action.properties.icon ?? 'ph--placeholder--regular'} size={4} />\n <span className='grow truncate'>{toLocalizedString(action.properties.label ?? '', t)}</span>\n {menuItemType === 'toggle' && (\n <DropdownMenu.ItemIndicator asChild>\n <Icon icon='ph--check--regular' size={4} />\n </DropdownMenu.ItemIndicator>\n )}\n {shortcut && (\n <span className={mx('shrink-0', descriptionText)}>{keySymbols(shortcut).join('')}</span>\n )}\n </Root>\n );\n })}\n </Fragment>\n );\n })}\n {children}\n </DropdownMenu.Viewport>\n <DropdownMenu.Arrow />\n </DropdownMenu.Content>\n </DropdownMenu.Portal>\n </DropdownMenu.Root>\n );\n },\n);\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport React from 'react';\n\nexport const MenuSignifierHorizontal = () => (\n <svg\n className='absolute block-end-[7px]'\n width={20}\n height={2}\n viewBox='0 0 20 2'\n stroke='currentColor'\n opacity={0.5}\n >\n <line\n x1={0.5}\n y1={0.75}\n x2={19}\n y2={0.75}\n strokeWidth={1.25}\n strokeLinecap='round'\n strokeDasharray='6 20'\n strokeDashoffset='-6.5'\n />\n </svg>\n);\n\nexport const MenuSignifierVertical = () => (\n <svg className='absolute inline-start-1' width={2} height={18} viewBox='0 0 2 18' stroke='currentColor'>\n <line x1={1} y1={3} x2={1} y2={18} strokeWidth={1.5} strokeLinecap='round' strokeDasharray='0 6' />\n </svg>\n);\n", "//\n// Copyright 2023 DXOS.org\n//\n\nexport const translationKey = 'stack';\n\nexport default [\n {\n 'en-US': {\n [translationKey]: {\n 'resize label': 'Drag to resize',\n 'pin start label': 'Pin to the left sidebar',\n 'pin end label': 'Pin to the right sidebar',\n 'increment start label': 'Move to the left',\n 'increment end label': 'Move to the right',\n 'close label': 'Close',\n 'minify label': 'Minify',\n },\n },\n },\n];\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport React, { forwardRef } from 'react';\n\nimport {\n Button,\n ButtonGroup,\n type ButtonGroupProps,\n type ButtonProps,\n Icon,\n Tooltip,\n useTranslation,\n} from '@dxos/react-ui';\n\nimport { translationKey } from '../translations';\n\nexport type LayoutControlEvent = 'solo' | 'close' | `${'pin' | 'increment'}-${'start' | 'end'}`;\nexport type LayoutControlHandler = (event: LayoutControlEvent) => void;\n\nexport type LayoutCapabilities = {\n incrementStart?: boolean;\n incrementEnd?: boolean;\n solo?: boolean;\n};\n\nexport type LayoutControlsProps = Omit<ButtonGroupProps, 'onClick'> & {\n onClick?: LayoutControlHandler;\n variant?: 'hide-disabled' | 'default';\n close?: boolean | 'minify-start' | 'minify-end';\n capabilities: LayoutCapabilities;\n isSolo?: boolean;\n pin?: 'start' | 'end' | 'both';\n};\n\nconst LayoutControl = ({ icon, label, ...props }: Omit<ButtonProps, 'children'> & { label: string; icon: string }) => {\n return (\n <Tooltip.Root>\n <Tooltip.Trigger asChild>\n <Button variant='ghost' {...props}>\n <span className='sr-only'>{label}</span>\n <Icon icon={icon} />\n </Button>\n </Tooltip.Trigger>\n <Tooltip.Portal>\n <Tooltip.Content side='bottom'>{label}</Tooltip.Content>\n </Tooltip.Portal>\n </Tooltip.Root>\n );\n};\n\nexport const LayoutControls = forwardRef<HTMLDivElement, LayoutControlsProps>(\n (\n { onClick, variant = 'default', capabilities: can, isSolo, pin, close = false, children, ...props },\n forwardedRef,\n ) => {\n const { t } = useTranslation(translationKey);\n const buttonClassNames = variant === 'hide-disabled' ? 'disabled:hidden !p-1' : '!p-1';\n\n return (\n <ButtonGroup {...props} ref={forwardedRef}>\n {pin && !isSolo && ['both', 'start'].includes(pin) && (\n <LayoutControl\n label={t('pin start label')}\n variant='ghost'\n classNames={buttonClassNames}\n onClick={() => onClick?.('pin-start')}\n icon='ph--caret-line-left--regular'\n />\n )}\n\n {can.solo && (\n <LayoutControl\n label={t('solo layout label')}\n classNames={buttonClassNames}\n onClick={() => onClick?.('solo')}\n icon={isSolo ? 'ph--arrows-in--regular' : 'ph--arrows-out--regular'}\n />\n )}\n\n {!isSolo && can.solo && (\n <>\n <LayoutControl\n label={t('increment start label')}\n disabled={!can.incrementStart}\n classNames={buttonClassNames}\n onClick={() => onClick?.('increment-start')}\n icon='ph--caret-left--regular'\n />\n <LayoutControl\n label={t('increment end label')}\n disabled={!can.incrementEnd}\n classNames={buttonClassNames}\n onClick={() => onClick?.('increment-end')}\n icon='ph--caret-right--regular'\n />\n </>\n )}\n\n {pin && !isSolo && ['both', 'end'].includes(pin) && (\n <LayoutControl\n label={t('pin end label')}\n classNames={buttonClassNames}\n onClick={() => onClick?.('pin-end')}\n icon='ph--caret-line-right--regular'\n />\n )}\n\n {close && !isSolo && (\n <LayoutControl\n label={t(`${typeof close === 'string' ? 'minify' : 'close'} label`)}\n classNames={buttonClassNames}\n onClick={() => onClick?.('close')}\n data-testid='layoutHeading.close'\n icon={\n close === 'minify-start'\n ? 'ph--caret-line-left--regular'\n : close === 'minify-end'\n ? 'ph--caret-line-right--regular'\n : 'ph--x--regular'\n }\n />\n )}\n {children}\n </ButtonGroup>\n );\n },\n);\n"],
5
+ "mappings": ";;;AAGA,SAASA,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U,CAACf,IAAIgB;IACfH,YAAYJ;IACZX,SAAS,MAAMA,UAAU,iBAAA;IACzBlB,MAAK;MAEP,gBAAAG,OAAA,cAACJ,eAAAA;IACCE,OAAOyB,EAAE,qBAAA;IACTS,UAAU,CAACf,IAAIiB;IACfJ,YAAYJ;IACZX,SAAS,MAAMA,UAAU,eAAA;IACzBlB,MAAK;OAKVsB,OAAO,CAACD,UAAU;IAAC;IAAQ;IAAOW,SAASV,GAAAA,KAC1C,gBAAAnB,OAAA,cAACJ,eAAAA;IACCE,OAAOyB,EAAE,eAAA;IACTO,YAAYJ;IACZX,SAAS,MAAMA,UAAU,SAAA;IACzBlB,MAAK;MAIRuB,SAAS,CAACF,UACT,gBAAAlB,OAAA,cAACJ,eAAAA;IACCE,OAAOyB,EAAE,GAAG,OAAOH,UAAU,WAAW,WAAW,OAAA,QAAe;IAClEU,YAAYJ;IACZX,SAAS,MAAMA,UAAU,OAAA;IACzBoB,eAAY;IACZtC,MACEuB,UAAU,iBACN,iCACAA,UAAU,eACR,kCACA;MAIXC,QAAAA;AAGP,CAAA;",
6
+ "names": ["dropTargetForElements", "attachClosestEdge", "extractClosestEdge", "useArrowNavigationGroup", "composeRefs", "React", "Children", "forwardRef", "useLayoutEffect", "useState", "ListItem", "mx", "createContext", "useContext", "StackContext", "createContext", "orientation", "rail", "size", "useStack", "useContext", "StackItemContext", "selfDragHandleRef", "setSize", "useStackItem", "railGridHorizontal", "railGridVertical", "Stack", "forwardRef", "children", "classNames", "style", "orientation", "rail", "size", "onRearrange", "itemsCount", "Children", "count", "props", "forwardedRef", "stackElement", "stackRef", "useState", "composedItemRef", "composeRefs", "dropping", "setDropping", "arrowNavigationGroup", "useArrowNavigationGroup", "axis", "styles", "selfDroppable", "id", "useLayoutEffect", "acceptSourceType", "dropTargetForElements", "element", "getData", "input", "attachClosestEdge", "type", "allowedEdges", "onDragEnter", "source", "data", "onDrag", "onDragLeave", "onDrop", "self", "extractClosestEdge", "StackContext", "Provider", "value", "div", "className", "mx", "aria-orientation", "ref", "ListItem", "DropIndicator", "edge", "combine", "draggable", "dropTargetForElements", "preserveOffsetOnSource", "scrollJustEnoughIntoView", "attachClosestEdge", "extractClosestEdge", "useFocusableGroup", "composeRefs", "React", "forwardRef", "useLayoutEffect", "useState", "useCallback", "ListItem", "mx", "React", "forwardRef", "mx", "StackItemContent", "forwardRef", "children", "toolbar", "statusbar", "classNames", "size", "props", "forwardedRef", "stackItemSize", "useStack", "React", "div", "role", "className", "mx", "style", "gridTemplateRows", "join", "ref", "Slot", "React", "StackItemDragHandle", "asChild", "children", "selfDragHandleRef", "useStackItem", "Root", "Slot", "React", "ref", "role", "useFocusableGroup", "React", "forwardRef", "useAttention", "mx", "StackItemHeading", "children", "classNames", "props", "orientation", "useStack", "focusableGroupAttrs", "useFocusableGroup", "tabBehavior", "React", "div", "role", "tabIndex", "className", "mx", "StackItemHeadingLabel", "forwardRef", "attendableId", "related", "forwardedRef", "hasAttention", "isAncestor", "isRelated", "useAttention", "h1", "data-attention", "toString", "ref", "draggable", "disableNativeDragPreview", "preventUnhandled", "React", "useLayoutEffect", "useRef", "mx", "REM", "parseFloat", "getComputedStyle", "document", "documentElement", "fontSize", "MIN_WIDTH", "MIN_HEIGHT", "measureStackItem", "element", "stackItemElement", "closest", "getBoundingClientRect", "width", "DEFAULT_EXTRINSIC_SIZE", "height", "getNextSize", "startSize", "location", "client", "Math", "max", "current", "input", "initial", "StackItemResizeHandle", "orientation", "useStack", "setSize", "size", "useStackItem", "buttonRef", "useRef", "dragStartSize", "useLayoutEffect", "hasAttribute", "draggable", "onGenerateDragPreview", "nativeSetDragImage", "disableNativeDragPreview", "preventUnhandled", "start", "onDragStart", "onDrag", "onDrop", "nextSize", "React", "button", "ref", "className", "mx", "div", "role", "DragHandleSignifier", "svg", "xmlns", "viewBox", "fill", "path", "d", "React", "Fragment", "forwardRef", "useRef", "useState", "keySymbols", "Button", "DropdownMenu", "Icon", "toLocalizedString", "useTranslation", "useAttention", "descriptionText", "mx", "getHostPlatform", "React", "MenuSignifierHorizontal", "React", "svg", "className", "width", "height", "viewBox", "stroke", "opacity", "line", "x1", "y1", "x2", "y2", "strokeWidth", "strokeLinecap", "strokeDasharray", "strokeDashoffset", "translationKey", "StackItemSigilButton", "forwardRef", "attendableId", "classNames", "related", "children", "props", "forwardedRef", "hasAttention", "isAncestor", "isRelated", "useAttention", "variant", "React", "Button", "ref", "MenuSignifierHorizontal", "StackItemSigil", "actions", "actionGroups", "onAction", "triggerLabel", "icon", "t", "useTranslation", "translationKey", "suppressNextTooltip", "useRef", "optionsMenuOpen", "setOptionsMenuOpen", "useState", "hasActions", "length", "button", "span", "className", "Icon", "size", "DropdownMenu", "Root", "open", "onOpenChange", "nextOpen", "current", "Trigger", "asChild", "Portal", "Content", "Viewport", "map", "index", "separator", "Separator", "Fragment", "key", "action", "shortcut", "properties", "keyBinding", "getHostPlatform", "menuItemType", "CheckboxItem", "Item", "id", "onClick", "event", "disabled", "stopPropagation", "checked", "isChecked", "undefined", "testId", "toLocalizedString", "label", "ItemIndicator", "mx", "descriptionText", "keySymbols", "join", "Arrow", "DEFAULT_HORIZONTAL_SIZE", "DEFAULT_VERTICAL_SIZE", "DEFAULT_EXTRINSIC_SIZE", "StackItemRoot", "forwardRef", "item", "children", "classNames", "size", "propsSize", "onSizeChange", "role", "order", "style", "disableRearrange", "props", "forwardedRef", "itemElement", "itemRef", "useState", "selfDragHandleElement", "selfDragHandleRef", "closestEdge", "setEdge", "orientation", "rail", "onRearrange", "useStack", "setInternalSize", "Root", "composedItemRef", "composeRefs", "setSize", "useCallback", "nextSize", "commit", "type", "useLayoutEffect", "combine", "draggable", "element", "dragHandle", "getInitialData", "id", "onGenerateDragPreview", "nativeSetDragImage", "source", "location", "document", "body", "setAttribute", "scrollJustEnoughIntoView", "x", "y", "preserveOffsetOnSource", "input", "current", "container", "offsetParent", "onDragStart", "removeAttribute", "dropTargetForElements", "getData", "attachClosestEdge", "allowedEdges", "onDragEnter", "self", "data", "extractClosestEdge", "onDrag", "onDragLeave", "onDrop", "focusGroupAttrs", "useFocusableGroup", "tabBehavior", "React", "StackItemContext", "Provider", "value", "tabIndex", "className", "mx", "data-dx-stack-item", "Number", "isFinite", "ref", "ListItem", "DropIndicator", "edge", "StackItem", "Content", "StackItemContent", "Heading", "StackItemHeading", "HeadingLabel", "StackItemHeadingLabel", "ResizeHandle", "StackItemResizeHandle", "DragHandle", "StackItemDragHandle", "Sigil", "StackItemSigil", "SigilButton", "StackItemSigilButton", "React", "forwardRef", "Button", "ButtonGroup", "Icon", "Tooltip", "useTranslation", "LayoutControl", "icon", "label", "props", "React", "Tooltip", "Root", "Trigger", "asChild", "Button", "variant", "span", "className", "Icon", "Portal", "Content", "side", "LayoutControls", "forwardRef", "onClick", "capabilities", "can", "isSolo", "pin", "close", "children", "forwardedRef", "t", "useTranslation", "translationKey", "buttonClassNames", "ButtonGroup", "ref", "includes", "classNames", "solo", "disabled", "incrementStart", "incrementEnd", "data-testid"]
7
7
  }
@@ -1 +1 @@
1
- {"inputs":{"packages/ui/react-ui-stack/src/components/StackContext.tsx":{"bytes":3091,"imports":[{"path":"react","kind":"import-statement","external":true}],"format":"esm"},"packages/ui/react-ui-stack/src/components/Stack.tsx":{"bytes":13994,"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":"@fluentui/react-tabster","kind":"import-statement","external":true},{"path":"@radix-ui/react-compose-refs","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-stack/src/components/StackContext.tsx","kind":"import-statement","original":"./StackContext"}],"format":"esm"},"packages/ui/react-ui-stack/src/components/StackItemContent.tsx":{"bytes":5524,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"packages/ui/react-ui-stack/src/components/StackContext.tsx","kind":"import-statement","original":"./StackContext"}],"format":"esm"},"packages/ui/react-ui-stack/src/components/StackItemDragHandle.tsx":{"bytes":2101,"imports":[{"path":"@radix-ui/react-slot","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"packages/ui/react-ui-stack/src/components/StackContext.tsx","kind":"import-statement","original":"./StackContext"}],"format":"esm"},"packages/ui/react-ui-stack/src/components/StackItemHeading.tsx":{"bytes":5758,"imports":[{"path":"@fluentui/react-tabster","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui-attention","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"packages/ui/react-ui-stack/src/components/StackContext.tsx","kind":"import-statement","original":"./StackContext"}],"format":"esm"},"packages/ui/react-ui-stack/src/components/StackItemResizeHandle.tsx":{"bytes":14876,"imports":[{"path":"@atlaskit/pragmatic-drag-and-drop/element/adapter","kind":"import-statement","external":true},{"path":"@atlaskit/pragmatic-drag-and-drop/element/disable-native-drag-preview","kind":"import-statement","external":true},{"path":"@atlaskit/pragmatic-drag-and-drop/prevent-unhandled","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"packages/ui/react-ui-stack/src/components/StackContext.tsx","kind":"import-statement","original":"./StackContext"},{"path":"packages/ui/react-ui-stack/src/components/StackItem.tsx","kind":"import-statement","original":"./StackItem"}],"format":"esm"},"packages/ui/react-ui-stack/src/components/MenuSignifier.tsx":{"bytes":3282,"imports":[{"path":"react","kind":"import-statement","external":true}],"format":"esm"},"packages/ui/react-ui-stack/src/translations.ts":{"bytes":1870,"imports":[],"format":"esm"},"packages/ui/react-ui-stack/src/components/StackItemSigil.tsx":{"bytes":20057,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/keyboard","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-attention","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"packages/ui/react-ui-stack/src/components/MenuSignifier.tsx","kind":"import-statement","original":"./MenuSignifier"},{"path":"packages/ui/react-ui-stack/src/translations.ts","kind":"import-statement","original":"../translations"}],"format":"esm"},"packages/ui/react-ui-stack/src/components/StackItem.tsx":{"bytes":21446,"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/disable-native-drag-preview","kind":"import-statement","external":true},{"path":"@atlaskit/pragmatic-drag-and-drop/prevent-unhandled","kind":"import-statement","external":true},{"path":"@atlaskit/pragmatic-drag-and-drop-hitbox/closest-edge","kind":"import-statement","external":true},{"path":"@fluentui/react-tabster","kind":"import-statement","external":true},{"path":"@radix-ui/react-compose-refs","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-stack/src/components/StackContext.tsx","kind":"import-statement","original":"./StackContext"},{"path":"packages/ui/react-ui-stack/src/components/StackItemContent.tsx","kind":"import-statement","original":"./StackItemContent"},{"path":"packages/ui/react-ui-stack/src/components/StackItemDragHandle.tsx","kind":"import-statement","original":"./StackItemDragHandle"},{"path":"packages/ui/react-ui-stack/src/components/StackItemHeading.tsx","kind":"import-statement","original":"./StackItemHeading"},{"path":"packages/ui/react-ui-stack/src/components/StackItemResizeHandle.tsx","kind":"import-statement","original":"./StackItemResizeHandle"},{"path":"packages/ui/react-ui-stack/src/components/StackItemSigil.tsx","kind":"import-statement","original":"./StackItemSigil"}],"format":"esm"},"packages/ui/react-ui-stack/src/components/LayoutControls.tsx":{"bytes":11653,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"packages/ui/react-ui-stack/src/translations.ts","kind":"import-statement","original":"../translations"}],"format":"esm"},"packages/ui/react-ui-stack/src/components/index.ts":{"bytes":801,"imports":[{"path":"packages/ui/react-ui-stack/src/components/Stack.tsx","kind":"import-statement","original":"./Stack"},{"path":"packages/ui/react-ui-stack/src/components/StackItem.tsx","kind":"import-statement","original":"./StackItem"},{"path":"packages/ui/react-ui-stack/src/components/LayoutControls.tsx","kind":"import-statement","original":"./LayoutControls"},{"path":"packages/ui/react-ui-stack/src/components/StackContext.tsx","kind":"import-statement","original":"./StackContext"}],"format":"esm"},"packages/ui/react-ui-stack/src/index.ts":{"bytes":718,"imports":[{"path":"packages/ui/react-ui-stack/src/components/index.ts","kind":"import-statement","original":"./components"},{"path":"packages/ui/react-ui-stack/src/translations.ts","kind":"import-statement","original":"./translations"}],"format":"esm"},"packages/ui/react-ui-stack/src/testing/stack-manager.ts":{"bytes":7183,"imports":[],"format":"esm"},"packages/ui/react-ui-stack/src/testing/index.ts":{"bytes":519,"imports":[{"path":"packages/ui/react-ui-stack/src/testing/stack-manager.ts","kind":"import-statement","original":"./stack-manager"}],"format":"esm"}},"outputs":{"packages/ui/react-ui-stack/dist/lib/node-esm/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":54281},"packages/ui/react-ui-stack/dist/lib/node-esm/index.mjs":{"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":"@fluentui/react-tabster","kind":"import-statement","external":true},{"path":"@radix-ui/react-compose-refs","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":"react","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/disable-native-drag-preview","kind":"import-statement","external":true},{"path":"@atlaskit/pragmatic-drag-and-drop/prevent-unhandled","kind":"import-statement","external":true},{"path":"@atlaskit/pragmatic-drag-and-drop-hitbox/closest-edge","kind":"import-statement","external":true},{"path":"@fluentui/react-tabster","kind":"import-statement","external":true},{"path":"@radix-ui/react-compose-refs","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":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"@radix-ui/react-slot","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@fluentui/react-tabster","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui-attention","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/element/disable-native-drag-preview","kind":"import-statement","external":true},{"path":"@atlaskit/pragmatic-drag-and-drop/prevent-unhandled","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/keyboard","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-attention","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"@dxos/util","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}],"exports":["DEFAULT_EXTRINSIC_SIZE","DEFAULT_HORIZONTAL_SIZE","DEFAULT_VERTICAL_SIZE","LayoutControls","Stack","StackContext","StackItem","StackItemContext","railGridHorizontal","railGridVertical","translations","useStack","useStackItem"],"entryPoint":"packages/ui/react-ui-stack/src/index.ts","inputs":{"packages/ui/react-ui-stack/src/components/Stack.tsx":{"bytesInOutput":3397},"packages/ui/react-ui-stack/src/components/StackContext.tsx":{"bytesInOutput":408},"packages/ui/react-ui-stack/src/components/index.ts":{"bytesInOutput":0},"packages/ui/react-ui-stack/src/components/StackItem.tsx":{"bytesInOutput":5094},"packages/ui/react-ui-stack/src/components/StackItemContent.tsx":{"bytesInOutput":850},"packages/ui/react-ui-stack/src/components/StackItemDragHandle.tsx":{"bytesInOutput":335},"packages/ui/react-ui-stack/src/components/StackItemHeading.tsx":{"bytesInOutput":1286},"packages/ui/react-ui-stack/src/components/StackItemResizeHandle.tsx":{"bytesInOutput":3762},"packages/ui/react-ui-stack/src/components/StackItemSigil.tsx":{"bytesInOutput":4883},"packages/ui/react-ui-stack/src/components/MenuSignifier.tsx":{"bytesInOutput":442},"packages/ui/react-ui-stack/src/translations.ts":{"bytesInOutput":444},"packages/ui/react-ui-stack/src/components/LayoutControls.tsx":{"bytesInOutput":3030},"packages/ui/react-ui-stack/src/index.ts":{"bytesInOutput":0}},"bytes":25214},"packages/ui/react-ui-stack/dist/lib/node-esm/testing/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":3599},"packages/ui/react-ui-stack/dist/lib/node-esm/testing/index.mjs":{"imports":[],"exports":["SectionManager","StackManager"],"entryPoint":"packages/ui/react-ui-stack/src/testing/index.ts","inputs":{"packages/ui/react-ui-stack/src/testing/stack-manager.ts":{"bytesInOutput":1516},"packages/ui/react-ui-stack/src/testing/index.ts":{"bytesInOutput":0}},"bytes":1748}}}
1
+ {"inputs":{"packages/ui/react-ui-stack/src/components/StackContext.tsx":{"bytes":3091,"imports":[{"path":"react","kind":"import-statement","external":true}],"format":"esm"},"packages/ui/react-ui-stack/src/components/Stack.tsx":{"bytes":13994,"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":"@fluentui/react-tabster","kind":"import-statement","external":true},{"path":"@radix-ui/react-compose-refs","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-stack/src/components/StackContext.tsx","kind":"import-statement","original":"./StackContext"}],"format":"esm"},"packages/ui/react-ui-stack/src/components/StackItemContent.tsx":{"bytes":5524,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"packages/ui/react-ui-stack/src/components/StackContext.tsx","kind":"import-statement","original":"./StackContext"}],"format":"esm"},"packages/ui/react-ui-stack/src/components/StackItemDragHandle.tsx":{"bytes":2101,"imports":[{"path":"@radix-ui/react-slot","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"packages/ui/react-ui-stack/src/components/StackContext.tsx","kind":"import-statement","original":"./StackContext"}],"format":"esm"},"packages/ui/react-ui-stack/src/components/StackItemHeading.tsx":{"bytes":5758,"imports":[{"path":"@fluentui/react-tabster","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui-attention","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"packages/ui/react-ui-stack/src/components/StackContext.tsx","kind":"import-statement","original":"./StackContext"}],"format":"esm"},"packages/ui/react-ui-stack/src/components/StackItemResizeHandle.tsx":{"bytes":16102,"imports":[{"path":"@atlaskit/pragmatic-drag-and-drop/element/adapter","kind":"import-statement","external":true},{"path":"@atlaskit/pragmatic-drag-and-drop/element/disable-native-drag-preview","kind":"import-statement","external":true},{"path":"@atlaskit/pragmatic-drag-and-drop/prevent-unhandled","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"packages/ui/react-ui-stack/src/components/StackContext.tsx","kind":"import-statement","original":"./StackContext"},{"path":"packages/ui/react-ui-stack/src/components/StackItem.tsx","kind":"import-statement","original":"./StackItem"}],"format":"esm"},"packages/ui/react-ui-stack/src/components/MenuSignifier.tsx":{"bytes":3282,"imports":[{"path":"react","kind":"import-statement","external":true}],"format":"esm"},"packages/ui/react-ui-stack/src/translations.ts":{"bytes":1870,"imports":[],"format":"esm"},"packages/ui/react-ui-stack/src/components/StackItemSigil.tsx":{"bytes":18750,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/keyboard","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-attention","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"packages/ui/react-ui-stack/src/components/MenuSignifier.tsx","kind":"import-statement","original":"./MenuSignifier"},{"path":"packages/ui/react-ui-stack/src/translations.ts","kind":"import-statement","original":"../translations"}],"format":"esm"},"packages/ui/react-ui-stack/src/components/StackItem.tsx":{"bytes":23131,"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/preserve-offset-on-source","kind":"import-statement","external":true},{"path":"@atlaskit/pragmatic-drag-and-drop/element/scroll-just-enough-into-view","kind":"import-statement","external":true},{"path":"@atlaskit/pragmatic-drag-and-drop-hitbox/closest-edge","kind":"import-statement","external":true},{"path":"@fluentui/react-tabster","kind":"import-statement","external":true},{"path":"@radix-ui/react-compose-refs","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-stack/src/components/StackContext.tsx","kind":"import-statement","original":"./StackContext"},{"path":"packages/ui/react-ui-stack/src/components/StackItemContent.tsx","kind":"import-statement","original":"./StackItemContent"},{"path":"packages/ui/react-ui-stack/src/components/StackItemDragHandle.tsx","kind":"import-statement","original":"./StackItemDragHandle"},{"path":"packages/ui/react-ui-stack/src/components/StackItemHeading.tsx","kind":"import-statement","original":"./StackItemHeading"},{"path":"packages/ui/react-ui-stack/src/components/StackItemResizeHandle.tsx","kind":"import-statement","original":"./StackItemResizeHandle"},{"path":"packages/ui/react-ui-stack/src/components/StackItemSigil.tsx","kind":"import-statement","original":"./StackItemSigil"}],"format":"esm"},"packages/ui/react-ui-stack/src/components/LayoutControls.tsx":{"bytes":11653,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"packages/ui/react-ui-stack/src/translations.ts","kind":"import-statement","original":"../translations"}],"format":"esm"},"packages/ui/react-ui-stack/src/components/index.ts":{"bytes":801,"imports":[{"path":"packages/ui/react-ui-stack/src/components/Stack.tsx","kind":"import-statement","original":"./Stack"},{"path":"packages/ui/react-ui-stack/src/components/StackItem.tsx","kind":"import-statement","original":"./StackItem"},{"path":"packages/ui/react-ui-stack/src/components/LayoutControls.tsx","kind":"import-statement","original":"./LayoutControls"},{"path":"packages/ui/react-ui-stack/src/components/StackContext.tsx","kind":"import-statement","original":"./StackContext"}],"format":"esm"},"packages/ui/react-ui-stack/src/index.ts":{"bytes":718,"imports":[{"path":"packages/ui/react-ui-stack/src/components/index.ts","kind":"import-statement","original":"./components"},{"path":"packages/ui/react-ui-stack/src/translations.ts","kind":"import-statement","original":"./translations"}],"format":"esm"},"packages/ui/react-ui-stack/src/testing/stack-manager.ts":{"bytes":7183,"imports":[],"format":"esm"},"packages/ui/react-ui-stack/src/testing/index.ts":{"bytes":519,"imports":[{"path":"packages/ui/react-ui-stack/src/testing/stack-manager.ts","kind":"import-statement","original":"./stack-manager"}],"format":"esm"}},"outputs":{"packages/ui/react-ui-stack/dist/lib/node-esm/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":54974},"packages/ui/react-ui-stack/dist/lib/node-esm/index.mjs":{"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":"@fluentui/react-tabster","kind":"import-statement","external":true},{"path":"@radix-ui/react-compose-refs","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":"react","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/preserve-offset-on-source","kind":"import-statement","external":true},{"path":"@atlaskit/pragmatic-drag-and-drop/element/scroll-just-enough-into-view","kind":"import-statement","external":true},{"path":"@atlaskit/pragmatic-drag-and-drop-hitbox/closest-edge","kind":"import-statement","external":true},{"path":"@fluentui/react-tabster","kind":"import-statement","external":true},{"path":"@radix-ui/react-compose-refs","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":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"@radix-ui/react-slot","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@fluentui/react-tabster","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui-attention","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/element/disable-native-drag-preview","kind":"import-statement","external":true},{"path":"@atlaskit/pragmatic-drag-and-drop/prevent-unhandled","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/keyboard","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-attention","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"@dxos/util","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}],"exports":["DEFAULT_EXTRINSIC_SIZE","DEFAULT_HORIZONTAL_SIZE","DEFAULT_VERTICAL_SIZE","LayoutControls","Stack","StackContext","StackItem","StackItemContext","railGridHorizontal","railGridVertical","translations","useStack","useStackItem"],"entryPoint":"packages/ui/react-ui-stack/src/index.ts","inputs":{"packages/ui/react-ui-stack/src/components/Stack.tsx":{"bytesInOutput":3397},"packages/ui/react-ui-stack/src/components/StackContext.tsx":{"bytesInOutput":408},"packages/ui/react-ui-stack/src/components/index.ts":{"bytesInOutput":0},"packages/ui/react-ui-stack/src/components/StackItem.tsx":{"bytesInOutput":5405},"packages/ui/react-ui-stack/src/components/StackItemContent.tsx":{"bytesInOutput":850},"packages/ui/react-ui-stack/src/components/StackItemDragHandle.tsx":{"bytesInOutput":335},"packages/ui/react-ui-stack/src/components/StackItemHeading.tsx":{"bytesInOutput":1286},"packages/ui/react-ui-stack/src/components/StackItemResizeHandle.tsx":{"bytesInOutput":4101},"packages/ui/react-ui-stack/src/components/StackItemSigil.tsx":{"bytesInOutput":4540},"packages/ui/react-ui-stack/src/components/MenuSignifier.tsx":{"bytesInOutput":442},"packages/ui/react-ui-stack/src/translations.ts":{"bytesInOutput":444},"packages/ui/react-ui-stack/src/components/LayoutControls.tsx":{"bytesInOutput":3014},"packages/ui/react-ui-stack/src/index.ts":{"bytesInOutput":0}},"bytes":25505},"packages/ui/react-ui-stack/dist/lib/node-esm/testing/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":3599},"packages/ui/react-ui-stack/dist/lib/node-esm/testing/index.mjs":{"imports":[],"exports":["SectionManager","StackManager"],"entryPoint":"packages/ui/react-ui-stack/src/testing/index.ts","inputs":{"packages/ui/react-ui-stack/src/testing/stack-manager.ts":{"bytesInOutput":1516},"packages/ui/react-ui-stack/src/testing/index.ts":{"bytesInOutput":0}},"bytes":1748}}}
@@ -15,6 +15,7 @@ export type StackItemRootProps = ThemedClassName<ComponentPropsWithRef<'div'>> &
15
15
  size?: StackItemSize;
16
16
  onSizeChange?: (nextSize: StackItemSize) => void;
17
17
  role?: 'article' | 'section';
18
+ disableRearrange?: boolean;
18
19
  };
19
20
  export declare const StackItem: {
20
21
  Root: React.ForwardRefExoticComponent<Omit<StackItemRootProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
@@ -1 +1 @@
1
- {"version":3,"file":"StackItem.d.ts","sourceRoot":"","sources":["../../../../src/components/StackItem.tsx"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,EAAyC,KAAK,qBAAqB,EAAe,MAAM,OAAO,CAAC;AAE9G,OAAO,EAAE,KAAK,eAAe,EAAY,MAAM,gBAAgB,CAAC;AAGhE,OAAO,EAA8B,KAAK,aAAa,EAAE,KAAK,aAAa,EAAE,MAAM,gBAAgB,CAAC;AACpG,OAAO,EAAoB,KAAK,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAClF,OAAO,EAAuB,KAAK,wBAAwB,EAAE,MAAM,uBAAuB,CAAC;AAC3F,OAAO,EAGL,KAAK,qBAAqB,EAC1B,KAAK,0BAA0B,EAChC,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAyB,KAAK,0BAA0B,EAAE,MAAM,yBAAyB,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,0BAA0B,EAChC,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAyB,KAAK,0BAA0B,EAAE,MAAM,yBAAyB,CAAC;AACjG,OAAO,EAEL,KAAK,mBAAmB,EACxB,KAAK,oBAAoB,EACzB,KAAK,yBAAyB,EAE/B,MAAM,kBAAkB,CAAC;AAE1B,eAAO,MAAM,uBAAuB,KAA6B,CAAC;AAClE,eAAO,MAAM,qBAAqB,gBAAwC,CAAC;AAC3E,eAAO,MAAM,sBAAsB,KAAkD,CAAC;AAEtF,MAAM,MAAM,kBAAkB,GAAG,eAAe,CAAC,qBAAqB,CAAC,KAAK,CAAC,CAAC,GAAG;IAC/E,IAAI,EAAE,IAAI,CAAC,aAAa,EAAE,MAAM,CAAC,CAAC;IAClC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,aAAa,CAAC;IACrB,YAAY,CAAC,EAAE,CAAC,QAAQ,EAAE,aAAa,KAAK,IAAI,CAAC;IACjD,IAAI,CAAC,EAAE,SAAS,GAAG,SAAS,CAAC;IAC7B,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B,CAAC;AAmHF,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;CASrB,CAAC;AAEF,YAAY,EACV,qBAAqB,EACrB,qBAAqB,EACrB,0BAA0B,EAC1B,0BAA0B,EAC1B,wBAAwB,EACxB,mBAAmB,EACnB,yBAAyB,EACzB,oBAAoB,GACrB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"StackItemResizeHandle.d.ts","sourceRoot":"","sources":["../../../../src/components/StackItemResizeHandle.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAkC,MAAM,OAAO,CAAC;AAoBvD,MAAM,MAAM,0BAA0B,GAAG,EAAE,CAAC;AAE5C,eAAO,MAAM,qBAAqB,yBAmEjC,CAAC"}
1
+ {"version":3,"file":"StackItemResizeHandle.d.ts","sourceRoot":"","sources":["../../../../src/components/StackItemResizeHandle.tsx"],"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AAI,CAAC;CACnD,GAAG,OAAO,CACZ,CAAC;AAEF,eAAO,MAAM,cAAc;mBARR,MAAM;kBACP,MAAM;cACV,oBAAoB,EAAE,EAAE;UAC5B,MAAM;eACD,CAAC,MAAM,EAAE,oBAAoB,KAAK,IAAI;;;2CAwGpD,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dxos/react-ui-stack",
3
- "version": "0.7.5-main.9d2a38b",
3
+ "version": "0.7.5-main.e9bb01b",
4
4
  "description": "A stack component.",
5
5
  "homepage": "https://dxos.org",
6
6
  "bugs": "https://github.com/dxos/dxos/issues",
@@ -38,20 +38,20 @@
38
38
  "@atlaskit/pragmatic-drag-and-drop": "^1.4.0",
39
39
  "@atlaskit/pragmatic-drag-and-drop-hitbox": "^1.0.3",
40
40
  "@effect/schema": "^0.75.5",
41
- "@fluentui/react-tabster": "^9.19.0",
42
- "@radix-ui/primitive": "^1.0.0",
43
- "@radix-ui/react-compose-refs": "^1.0.0",
44
- "@radix-ui/react-context": "^1.0.0",
45
- "@radix-ui/react-menu": "^2.0.6",
46
- "@radix-ui/react-slot": "^1.0.1",
47
- "@radix-ui/react-use-controllable-state": "^1.0.0",
41
+ "@fluentui/react-tabster": "9.23.3",
42
+ "@radix-ui/primitive": "1.1.1",
43
+ "@radix-ui/react-compose-refs": "1.1.1",
44
+ "@radix-ui/react-context": "1.1.1",
45
+ "@radix-ui/react-menu": "2.1.6",
46
+ "@radix-ui/react-slot": "1.1.2",
47
+ "@radix-ui/react-use-controllable-state": "1.1.0",
48
48
  "react-resize-detector": "^11.0.1",
49
- "@dxos/echo-schema": "0.7.5-main.9d2a38b",
50
- "@dxos/keyboard": "0.7.5-main.9d2a38b",
51
- "@dxos/live-object": "0.7.5-main.9d2a38b",
52
- "@dxos/react-ui-attention": "0.7.5-main.9d2a38b",
53
- "@dxos/react-ui-mosaic": "0.7.5-main.9d2a38b",
54
- "@dxos/util": "0.7.5-main.9d2a38b"
49
+ "@dxos/echo-schema": "0.7.5-main.e9bb01b",
50
+ "@dxos/keyboard": "0.7.5-main.e9bb01b",
51
+ "@dxos/react-ui-attention": "0.7.5-main.e9bb01b",
52
+ "@dxos/live-object": "0.7.5-main.e9bb01b",
53
+ "@dxos/util": "0.7.5-main.e9bb01b",
54
+ "@dxos/react-ui-mosaic": "0.7.5-main.e9bb01b"
55
55
  },
56
56
  "devDependencies": {
57
57
  "@phosphor-icons/react": "^2.1.5",
@@ -60,24 +60,24 @@
60
60
  "react": "~18.2.0",
61
61
  "react-dom": "~18.2.0",
62
62
  "vite": "5.4.7",
63
- "@dxos/app-graph": "0.7.5-main.9d2a38b",
64
- "@dxos/random": "0.7.5-main.9d2a38b",
65
- "@dxos/echo-schema": "0.7.5-main.9d2a38b",
66
- "@dxos/client": "0.7.5-main.9d2a38b",
67
- "@dxos/react-ui": "0.7.5-main.9d2a38b",
68
- "@dxos/react-ui-theme": "0.7.5-main.9d2a38b",
69
- "@dxos/react-ui-editor": "0.7.5-main.9d2a38b",
70
- "@dxos/storybook-utils": "0.7.5-main.9d2a38b",
71
- "@dxos/test-utils": "0.7.5-main.9d2a38b"
63
+ "@dxos/app-graph": "0.7.5-main.e9bb01b",
64
+ "@dxos/client": "0.7.5-main.e9bb01b",
65
+ "@dxos/echo-schema": "0.7.5-main.e9bb01b",
66
+ "@dxos/random": "0.7.5-main.e9bb01b",
67
+ "@dxos/react-ui-editor": "0.7.5-main.e9bb01b",
68
+ "@dxos/react-ui": "0.7.5-main.e9bb01b",
69
+ "@dxos/react-ui-theme": "0.7.5-main.e9bb01b",
70
+ "@dxos/storybook-utils": "0.7.5-main.e9bb01b",
71
+ "@dxos/test-utils": "0.7.5-main.e9bb01b"
72
72
  },
73
73
  "peerDependencies": {
74
74
  "@phosphor-icons/react": "^2.1.5",
75
75
  "react": "~18.2.0",
76
76
  "react-dom": "~18.2.0",
77
- "@dxos/client": "0.7.5-main.9d2a38b",
78
- "@dxos/random": "0.7.5-main.9d2a38b",
79
- "@dxos/react-ui": "0.7.5-main.9d2a38b",
80
- "@dxos/react-ui-theme": "0.7.5-main.9d2a38b"
77
+ "@dxos/client": "0.7.5-main.e9bb01b",
78
+ "@dxos/react-ui": "0.7.5-main.e9bb01b",
79
+ "@dxos/random": "0.7.5-main.e9bb01b",
80
+ "@dxos/react-ui-theme": "0.7.5-main.e9bb01b"
81
81
  },
82
82
  "publishConfig": {
83
83
  "access": "public"
@@ -4,8 +4,8 @@
4
4
 
5
5
  import { combine } from '@atlaskit/pragmatic-drag-and-drop/combine';
6
6
  import { draggable, dropTargetForElements } from '@atlaskit/pragmatic-drag-and-drop/element/adapter';
7
- import { disableNativeDragPreview } from '@atlaskit/pragmatic-drag-and-drop/element/disable-native-drag-preview';
8
- import { preventUnhandled } from '@atlaskit/pragmatic-drag-and-drop/prevent-unhandled';
7
+ import { preserveOffsetOnSource } from '@atlaskit/pragmatic-drag-and-drop/element/preserve-offset-on-source';
8
+ import { scrollJustEnoughIntoView } from '@atlaskit/pragmatic-drag-and-drop/element/scroll-just-enough-into-view';
9
9
  import {
10
10
  attachClosestEdge,
11
11
  extractClosestEdge,
@@ -46,10 +46,14 @@ export type StackItemRootProps = ThemedClassName<ComponentPropsWithRef<'div'>> &
46
46
  size?: StackItemSize;
47
47
  onSizeChange?: (nextSize: StackItemSize) => void;
48
48
  role?: 'article' | 'section';
49
+ disableRearrange?: boolean;
49
50
  };
50
51
 
51
52
  const StackItemRoot = forwardRef<HTMLDivElement, StackItemRootProps>(
52
- ({ item, children, classNames, size: propsSize, onSizeChange, role, order, style, ...props }, forwardedRef) => {
53
+ (
54
+ { item, children, classNames, size: propsSize, onSizeChange, role, order, style, disableRearrange, ...props },
55
+ forwardedRef,
56
+ ) => {
53
57
  const [itemElement, itemRef] = useState<HTMLDivElement | null>(null);
54
58
  const [selfDragHandleElement, selfDragHandleRef] = useState<HTMLDivElement | null>(null);
55
59
  const [closestEdge, setEdge] = useState<Edge | null>(null);
@@ -74,7 +78,7 @@ const StackItemRoot = forwardRef<HTMLDivElement, StackItemRootProps>(
74
78
  const type = orientation === 'horizontal' ? 'column' : 'card';
75
79
 
76
80
  useLayoutEffect(() => {
77
- if (!itemElement || !onRearrange) {
81
+ if (!itemElement || !onRearrange || disableRearrange) {
78
82
  return;
79
83
  }
80
84
  return combine(
@@ -82,10 +86,16 @@ const StackItemRoot = forwardRef<HTMLDivElement, StackItemRootProps>(
82
86
  element: itemElement,
83
87
  ...(selfDragHandleElement && { dragHandle: selfDragHandleElement }),
84
88
  getInitialData: () => ({ id: item.id, type }),
85
- // TODO(thure): tabster focus honeypots are causing the preview to render with the wrong dimensions; what do?
86
- onGenerateDragPreview: ({ nativeSetDragImage }) => {
87
- disableNativeDragPreview({ nativeSetDragImage });
88
- preventUnhandled.start();
89
+ onGenerateDragPreview: ({ nativeSetDragImage, source, location }) => {
90
+ document.body.setAttribute('data-drag-preview', 'true');
91
+ scrollJustEnoughIntoView({ element: source.element });
92
+ const { x, y } = preserveOffsetOnSource({ element: source.element, input: location.current.input })({
93
+ container: (source.element.offsetParent ?? document.body) as HTMLElement,
94
+ });
95
+ nativeSetDragImage?.(source.element, x, y);
96
+ },
97
+ onDragStart: () => {
98
+ document.body.removeAttribute('data-drag-preview');
89
99
  },
90
100
  }),
91
101
  dropTargetForElements({
@@ -126,7 +136,7 @@ const StackItemRoot = forwardRef<HTMLDivElement, StackItemRootProps>(
126
136
  tabIndex={0}
127
137
  {...focusGroupAttrs}
128
138
  className={mx(
129
- 'group/stack-item grid relative ch-focus-ring-inset-over-all',
139
+ 'group/stack-item grid relative dx-focus-ring-inset-over-all',
130
140
  size === 'min-content' && (orientation === 'horizontal' ? 'is-min' : 'bs-min'),
131
141
  orientation === 'horizontal' ? 'grid-rows-subgrid' : 'grid-cols-subgrid',
132
142
  rail && (orientation === 'horizontal' ? 'row-span-2' : 'col-span-2'),
@@ -23,7 +23,7 @@ export const StackItemHeading = ({ children, classNames, ...props }: StackItemHe
23
23
  tabIndex={0}
24
24
  {...focusableGroupAttrs}
25
25
  className={mx(
26
- 'flex items-center ch-focus-ring-inset-over-all relative !border-is-0',
26
+ 'flex items-center dx-focus-ring-inset-over-all relative !border-is-0',
27
27
  orientation === 'horizontal' ? 'bs-[--rail-size]' : 'is-[--rail-size] flex-col',
28
28
  classNames,
29
29
  )}