@dxos/react-ui-stack 0.8.4-main.d05673bc65 → 0.8.4-main.dfabb4ec29
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.
- package/dist/lib/browser/index.mjs +129 -174
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/translations.mjs +23 -0
- package/dist/lib/browser/translations.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +129 -174
- package/dist/lib/node-esm/index.mjs.map +4 -4
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/translations.mjs +25 -0
- package/dist/lib/node-esm/translations.mjs.map +7 -0
- package/dist/types/src/components/Stack/Stack.d.ts +2 -7
- package/dist/types/src/components/Stack/Stack.d.ts.map +1 -1
- package/dist/types/src/components/Stack/Stack.stories.d.ts.map +1 -1
- package/dist/types/src/components/StackContext.d.ts +1 -1
- package/dist/types/src/components/StackContext.d.ts.map +1 -1
- package/dist/types/src/components/StackItem/StackItem.d.ts +4 -4
- package/dist/types/src/components/StackItem/StackItem.d.ts.map +1 -1
- package/dist/types/src/components/StackItem/StackItem.stories.d.ts.map +1 -1
- package/dist/types/src/components/StackItem/StackItemContent.d.ts.map +1 -1
- package/dist/types/src/components/StackItem/StackItemDragHandle.d.ts.map +1 -1
- package/dist/types/src/components/StackItem/StackItemHeading.d.ts +1 -1
- package/dist/types/src/components/StackItem/StackItemHeading.d.ts.map +1 -1
- package/dist/types/src/components/StackItem/StackItemResizeHandle.d.ts.map +1 -1
- package/dist/types/src/hooks/useStackDropForElements.d.ts.map +1 -1
- package/dist/types/src/index.d.ts +0 -1
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/playwright/playwright.config.d.ts.map +1 -1
- package/dist/types/src/playwright/stack-manager.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts +8 -8
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +34 -35
- package/src/components/Stack/Stack.stories.tsx +7 -9
- package/src/components/Stack/Stack.tsx +193 -206
- package/src/components/StackContext.tsx +1 -1
- package/src/components/StackItem/StackItem.stories.tsx +2 -2
- package/src/components/StackItem/StackItem.tsx +13 -15
- package/src/components/StackItem/StackItemContent.tsx +0 -1
- package/src/components/StackItem/StackItemHeading.tsx +3 -7
- package/src/components/StackItem/StackItemResizeHandle.tsx +0 -1
- package/src/components/StackItem/StackItemSigil.tsx +2 -2
- package/src/hooks/useStackDropForElements.ts +2 -2
- package/src/index.ts +0 -1
- package/src/translations.ts +8 -8
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../../src/components/Stack/Stack.tsx", "../../../src/hooks/useStackDropForElements.ts", "../../../src/components/StackContext.tsx", "../../../src/components/StackItem/StackItem.tsx", "../../../src/components/StackItem/StackItemContent.tsx", "../../../src/components/StackItem/StackItemDragHandle.tsx", "../../../src/components/StackItem/StackItemHeading.tsx", "../../../src/components/StackItem/StackItemResizeHandle.tsx", "../../../src/components/StackItem/StackItemSigil.tsx", "../../../src/
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { composeRefs } from '@radix-ui/react-compose-refs';\nimport React, {\n type CSSProperties,\n Children,\n type ComponentPropsWithRef,\n type FocusEvent,\n type KeyboardEvent,\n forwardRef,\n useCallback,\n useEffect,\n useMemo,\n useState,\n} from 'react';\n\nimport { ListItem, type ThemedClassName, useId } from '@dxos/react-ui';\nimport { mx } from '@dxos/ui-theme';\n\nimport { useStackDropForElements } from '../../hooks';\nimport { StackContext } from '../StackContext';\nimport { type StackContextValue } from '../types';\n\nexport type Orientation = 'horizontal' | 'vertical';\n\n/**\n * Size is how Stack and its StackItems coordinate the dimensions of the items with the available space.\n * - `intrinsic` signals to Stack and its StackItems to occupy their intrinsic size\n * - Any other size will extrinsically fill the available space along the axis of its orientation and handle overflow:\n * - `contain` causes StackItems to occupy their intrinsic size\n * - `split` divides the Stack’s available space among the StackItems\n */\nexport type Size = 'intrinsic' | 'contain' | 'split';\n\nexport const railGridHorizontal = 'grid-rows-[[rail-start]_var(--dx-rail-size)_[content-start]_1fr_[content-end]]';\nexport const railGridVertical = 'grid-cols-[[rail-start]_var(--dx-rail-size)_[content-start]_1fr_[content-end]]';\n\n// TODO(ZaymonFC): Magic 2px to stop overflow.\nexport const railGridHorizontalContainFitContent =\n 'grid-rows-[[rail-start]_var(--dx-rail-size)_[content-start]_fit-content(calc(100%-var(--dx-rail-size)*2+2px))_[content-end]]';\nexport const railGridVerticalContainFitContent =\n 'grid-cols-[[rail-start]_var(--dx-rail-size)_[content-start]_fit-content(calc(100%-var(--dx-rail-size)*2+2px))_[content-end]]';\n\nexport const autoScrollRootAttributes = { 'data-drag-autoscroll': 'idle' };\n\nconst PERPENDICULAR_FOCUS_THRESHHOLD = 128;\n\nconst scrollIntoViewAndFocus = (el: HTMLElement, orientation: StackProps['orientation']) => {\n el.scrollIntoView({\n behavior: 'instant',\n [orientation === 'vertical' ? 'block' : 'inline']: 'center',\n });\n return el.focus();\n};\n\nexport type StackProps = Omit<ThemedClassName<ComponentPropsWithRef<'div'>>, 'aria-orientation'> &\n Partial<StackContextValue> & {\n itemsCount?: number;\n getDropElement?: (stackElement: HTMLDivElement) => HTMLDivElement;\n separatorOnScroll?: number;\n circularFocus?: boolean;\n };\n\nexport const Stack = forwardRef<HTMLDivElement, StackProps>(\n (\n {\n children,\n classNames,\n style,\n orientation = 'vertical',\n rail = true, // TODO(burdon): Change default to false.\n size = 'intrinsic',\n onRearrange,\n itemsCount = Children.count(children),\n getDropElement,\n separatorOnScroll,\n circularFocus,\n ...props\n },\n forwardedRef,\n ) => {\n const stackId = useId('stack', props.id);\n const [stackElement, stackRef] = useState<HTMLDivElement | null>(null);\n const [lastFocusedItem, setLastFocusedItem] = useState<string>();\n const composedItemRef = composeRefs<HTMLDivElement>(stackRef, forwardedRef);\n\n const styles: CSSProperties = {\n [orientation === 'horizontal' ? 'gridTemplateColumns' : 'gridTemplateRows']:\n size === 'split' ? `repeat(${itemsCount}, 1fr)` : `repeat(${itemsCount}, min-content) [tabster-dummies] 0`,\n ...style,\n };\n\n const selfDroppable = !!(itemsCount < 1 && onRearrange && props.id);\n\n const { dropping } = useStackDropForElements({\n id: props.id,\n element: getDropElement && stackElement ? getDropElement(stackElement) : stackElement,\n scrollElement: stackElement,\n selfDroppable,\n orientation,\n onRearrange,\n });\n\n const handleScroll = useCallback(() => {\n if (stackElement && Number.isFinite(separatorOnScroll)) {\n const scrollPosition = orientation === 'horizontal' ? stackElement.scrollLeft : stackElement.scrollTop;\n const scrollSize = orientation === 'horizontal' ? stackElement.scrollWidth : stackElement.scrollHeight;\n const clientSize = orientation === 'horizontal' ? stackElement.clientWidth : stackElement.clientHeight;\n const separatorHost = stackElement.closest('[data-scroll-separator]');\n if (separatorHost) {\n separatorHost.setAttribute('data-scroll-separator', String(scrollPosition > separatorOnScroll!));\n separatorHost.setAttribute(\n 'data-scroll-separator-end',\n String(scrollSize - (scrollPosition + clientSize) > separatorOnScroll!),\n );\n }\n }\n }, [stackElement, separatorOnScroll, orientation]);\n\n /**\n * Handles blur events to track the last focused item within this stack.\n */\n const handleBlur = useCallback(\n (event: FocusEvent<HTMLDivElement>) => {\n if (event.target) {\n const target = event.target as HTMLElement;\n const closestStackItem = target.closest(`[data-dx-item-id]`) as HTMLElement | null;\n if (closestStackItem?.closest(`[data-dx-stack=\"${stackId}\"]`)) {\n setLastFocusedItem(closestStackItem?.getAttribute('data-dx-item-id') ?? undefined);\n }\n }\n props.onBlur?.(event);\n },\n [stackId, props.onBlur],\n );\n\n /**\n * Handles moving focus using the arrow keys. Focus is only handled by the nearest stack;\n * if the arrow key matches the orientation, focus cycles between items, otherwise focus is passed to an adjacent stack item;\n * or, if there is no such stack item, focus is passed to the adjacent empty stack if one can be found.\n */\n const handleKeyDown = useCallback(\n (event: KeyboardEvent<HTMLDivElement>) => {\n const target = event.target as HTMLElement;\n if (\n event.key.startsWith('Arrow') &&\n !target.closest(\n `input, textarea, [role=\"textbox\"], [data-tabster*=\"mover\"], [data-arrow-keys=\"all\"], [data-arrow-keys~=\"${event.key.toLowerCase().slice(5)}\"]`,\n )\n ) {\n const closestOwnedItem = target.closest(`[data-dx-stack-item=\"${stackId}\"]`);\n const closestStack = target.closest('[data-dx-stack]') as HTMLElement | null;\n const closestStackItems = Array.from(\n closestStack?.querySelectorAll(`[data-dx-stack-item=\"${stackId}\"]`) ?? [],\n );\n const closestStackOrientation = closestStack?.getAttribute('aria-orientation') as Orientation;\n const ancestorStack = closestStack?.parentElement?.closest('[data-dx-stack]') as HTMLElement | null;\n if (closestOwnedItem && closestStack) {\n const ancestorOrientation = ancestorStack?.getAttribute('aria-orientation') as Orientation | undefined;\n const parallelDelta = (\n closestStackOrientation === 'vertical' ? event.key === 'ArrowUp' : event.key === 'ArrowLeft'\n )\n ? -1\n : (closestStackOrientation === 'vertical' ? event.key === 'ArrowDown' : event.key === 'ArrowRight')\n ? 1\n : 0;\n const perpendicularDelta = (\n closestStackOrientation === 'vertical' ? event.key === 'ArrowLeft' : event.key === 'ArrowUp'\n )\n ? -1\n : (closestStackOrientation === 'vertical' ? event.key === 'ArrowRight' : event.key === 'ArrowDown')\n ? 1\n : 0;\n if (parallelDelta !== 0) {\n const currentIndex = closestStackItems.indexOf(closestOwnedItem);\n const nextIndex = currentIndex + parallelDelta;\n let adjacentItem: HTMLElement | undefined;\n\n if (circularFocus) {\n // Circular navigation: wrap around using modulo.\n adjacentItem = closestStackItems[(nextIndex + closestStackItems.length) % closestStackItems.length] as\n | HTMLElement\n | undefined;\n } else {\n // Non-circular navigation: only move if within bounds.\n if (nextIndex >= 0 && nextIndex < closestStackItems.length) {\n adjacentItem = closestStackItems[nextIndex] as HTMLElement | undefined;\n }\n }\n\n if (adjacentItem) {\n event.preventDefault();\n scrollIntoViewAndFocus(adjacentItem, closestStackOrientation);\n }\n }\n\n if (perpendicularDelta !== 0) {\n if (ancestorStack && ancestorOrientation !== closestStackOrientation) {\n const siblingStacks = Array.from(\n ancestorStack.querySelectorAll(\n `[data-dx-stack-item=\"${ancestorStack.getAttribute('data-dx-stack')}\"] [data-dx-stack]`,\n ),\n ) as HTMLElement[];\n const currentStackIndex = siblingStacks.indexOf(closestStack);\n const nextStackIndex = currentStackIndex + perpendicularDelta;\n let adjacentStack: HTMLElement | undefined;\n\n if (ancestorStack.getAttribute('data-dx-stack-circular-focus') === 'true') {\n // Circular navigation: wrap around using modulo.\n adjacentStack = siblingStacks[(nextStackIndex + siblingStacks.length) % siblingStacks.length] as\n | HTMLElement\n | undefined;\n } else {\n // Non-circular navigation: only move if within bounds.\n if (nextStackIndex >= 0 && nextStackIndex < siblingStacks.length) {\n adjacentStack = siblingStacks[nextStackIndex] as HTMLElement | undefined;\n }\n }\n const adjacentStackSelfItem = adjacentStack?.closest(\n `[data-dx-stack-item=${ancestorStack.getAttribute('data-dx-stack')}]`,\n ) as HTMLElement | undefined;\n const adjacentStackItems = adjacentStack\n ? (Array.from(\n adjacentStack.querySelectorAll(\n `[data-dx-stack-item=\"${adjacentStack.getAttribute('data-dx-stack')}\"]`,\n ),\n ) as HTMLElement[])\n : [];\n if (adjacentStack && adjacentStackItems.length > 0) {\n // Check if the adjacent stack has a last focused item recorded, otherwise find the closest item by position.\n let closestItem = adjacentStackItems[0];\n // Try to find an item with matching data-dx-stack-item value.\n const lastFocusedItem = adjacentStack.querySelector(\n `[data-dx-item-id=\"${adjacentStack.getAttribute('data-dx-last-focused-item') ?? 'never'}\"]`,\n );\n if (lastFocusedItem) {\n closestItem = lastFocusedItem as HTMLElement;\n } else {\n // Fall back to positional calculation\n const ownedItemRect = closestOwnedItem.getBoundingClientRect();\n const targetPosition =\n closestStackOrientation === 'vertical' ? ownedItemRect.top : ownedItemRect.left;\n\n let closestDistance = Infinity;\n for (const item of adjacentStackItems) {\n const itemRect = item.getBoundingClientRect();\n const itemPosition = closestStackOrientation === 'vertical' ? itemRect.top : itemRect.left;\n const distance = Math.abs(itemPosition - targetPosition);\n if (distance < closestDistance) {\n closestDistance = distance;\n closestItem = item;\n }\n if (closestDistance <= PERPENDICULAR_FOCUS_THRESHHOLD) {\n break;\n }\n }\n }\n\n event.preventDefault();\n scrollIntoViewAndFocus(closestItem, closestStackOrientation);\n } else if (adjacentStackSelfItem) {\n event.preventDefault();\n scrollIntoViewAndFocus(adjacentStackSelfItem, ancestorOrientation);\n }\n } else if (closestOwnedItem) {\n const closestOwnedItemStack = closestOwnedItem.querySelector('[data-dx-stack]');\n const closestOwnedItemStackItems = closestOwnedItemStack\n ? (Array.from(\n closestOwnedItemStack.querySelectorAll(\n `[data-dx-stack-item=\"${closestOwnedItemStack.getAttribute('data-dx-stack')}\"]`,\n ),\n ) as HTMLElement[])\n : [];\n if (closestOwnedItemStackItems.length > 0) {\n event.preventDefault();\n scrollIntoViewAndFocus(\n closestOwnedItemStackItems[\n ['ArrowUp', 'ArrowLeft'].includes(event.key) ? closestOwnedItemStackItems.length - 1 : 0\n ],\n closestOwnedItemStack?.getAttribute('aria-orientation') as Orientation,\n );\n }\n }\n }\n }\n }\n props.onKeyDown?.(event);\n },\n [props.onKeyDown, stackId, circularFocus],\n );\n\n const gridClasses = useMemo(() => {\n if (!rail) {\n return orientation === 'horizontal' ? 'grid-rows-1 px-(--stack-gap)' : 'grid-cols-1 py-(--stack-gap)';\n }\n\n if (orientation === 'horizontal') {\n return railGridHorizontal;\n } else {\n return railGridVertical;\n }\n }, [rail, orientation, size]);\n\n useEffect(() => {\n if (!(stackElement && Number.isFinite(separatorOnScroll))) {\n return;\n }\n\n const observer = new MutationObserver(() => {\n handleScroll();\n });\n\n observer.observe(stackElement, { childList: true, subtree: true });\n\n return () => {\n observer.disconnect();\n };\n }, [stackElement, handleScroll]);\n\n return (\n <StackContext.Provider value={{ orientation, rail, size, onRearrange, stackId }}>\n <div\n {...props}\n className={mx(\n 'grid relative [--stack-gap:var(--spacing-trim-xs)]',\n gridClasses,\n size === 'contain' &&\n (orientation === 'horizontal'\n ? 'overflow-x-auto overscroll-x-contain min-h-0 max-h-full h-full'\n : 'overflow-y-auto min-w-0 max-w-full w-full'),\n classNames,\n )}\n onKeyDown={handleKeyDown}\n onBlur={handleBlur}\n data-dx-stack={stackId}\n data-dx-stack-circular-focus={circularFocus}\n data-dx-last-focused-item={lastFocusedItem}\n data-rail={rail}\n aria-orientation={orientation}\n style={styles}\n ref={composedItemRef}\n {...(Number.isFinite(separatorOnScroll) && { onScroll: handleScroll })}\n >\n {children}\n {selfDroppable && dropping && (\n <ListItem.DropIndicator\n lineInset={8}\n terminalInset={-8}\n gap={-8}\n edge={orientation === 'horizontal' ? 'left' : 'top'}\n />\n )}\n </div>\n </StackContext.Provider>\n );\n },\n);\n\nexport { StackContext };\n\nexport type { StackContextValue };\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { combine } from '@atlaskit/pragmatic-drag-and-drop/combine';\nimport { dropTargetForElements } from '@atlaskit/pragmatic-drag-and-drop/element/adapter';\nimport { autoScrollForElements } from '@atlaskit/pragmatic-drag-and-drop-auto-scroll/element';\nimport { attachClosestEdge, extractClosestEdge } from '@atlaskit/pragmatic-drag-and-drop-hitbox/closest-edge';\nimport { useLayoutEffect, useState } from 'react';\n\nimport { type Orientation, type StackItemData, type StackItemRearrangeHandler } from '../components';\n\nconst noop = () => {};\n\nexport type UseStackDropForElementsProps = {\n id?: string;\n element: HTMLDivElement | null;\n scrollElement?: HTMLDivElement | null;\n orientation: Orientation;\n selfDroppable: boolean;\n onRearrange?: StackItemRearrangeHandler;\n};\n\nexport type UseStackDropForElements = {\n dropping: boolean;\n};\n\n/**\n * Hook to handle drag-and-drop functionality for Stack components.\n */\nexport const useStackDropForElements = ({\n id,\n element,\n scrollElement = element,\n orientation,\n selfDroppable,\n onRearrange,\n}: UseStackDropForElementsProps): UseStackDropForElements => {\n const [dropping, setDropping] = useState(false);\n\n useLayoutEffect(() => {\n if (!element) {\n return;\n }\n\n const acceptSourceType = orientation === 'horizontal' ? 'column' : 'card';\n\n // TODO(burdon): Use monitor?\n return combine(\n selfDroppable\n ? dropTargetForElements({\n element,\n getData: ({ input, element }) => {\n return attachClosestEdge(\n { 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: () => {\n return setDropping(false);\n },\n onDrop: ({ self, source }) => {\n setDropping(false);\n if (source.data.type === acceptSourceType && selfDroppable && onRearrange) {\n onRearrange(source.data as StackItemData, self.data as StackItemData, extractClosestEdge(self.data));\n }\n },\n })\n : noop,\n\n scrollElement\n ? autoScrollForElements({\n element: scrollElement,\n getAllowedAxis: () => orientation,\n })\n : noop,\n );\n }, [id, element, scrollElement, selfDroppable, orientation, onRearrange]);\n\n return { dropping };\n};\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport { createContext, useContext } from 'react';\n\nimport { type Orientation, type Size } from './Stack';\nimport { type StackItemRearrangeHandler, type StackItemSize } from './types';\n\nexport type StackContextValue = {\n orientation: Orientation;\n rail: boolean;\n size: Size;\n onRearrange?: StackItemRearrangeHandler;\n stackId?: string;\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 ItemDragState =\n | {\n type: 'idle';\n }\n | {\n type: 'preview';\n container: HTMLElement;\n item: any;\n }\n | {\n type: 'w-dragging';\n item: any;\n };\n\nexport const idle: ItemDragState = { type: 'idle' };\n\nexport type StackItemContextValue = {\n selfDragHandleRef: (element: HTMLDivElement | null) => void;\n size: StackItemSize;\n setSize: (nextSize: StackItemSize, commit?: boolean) => void;\n state: ItemDragState;\n setState: (state: ItemDragState) => void;\n role?: string;\n};\n\nexport const StackItemContext = createContext<StackItemContextValue>({\n selfDragHandleRef: () => {},\n size: 'min-content',\n setSize: () => {},\n state: idle,\n setState: () => {},\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 { setCustomNativeDragPreview } from '@atlaskit/pragmatic-drag-and-drop/element/set-custom-native-drag-preview';\nimport {\n type Edge,\n attachClosestEdge,\n extractClosestEdge,\n} from '@atlaskit/pragmatic-drag-and-drop-hitbox/closest-edge';\nimport { useFocusableGroup } from '@fluentui/react-tabster';\nimport { composeRefs } from '@radix-ui/react-compose-refs';\nimport React, {\n type ComponentPropsWithRef,\n type ReactNode,\n forwardRef,\n useCallback,\n useLayoutEffect,\n useMemo,\n useState,\n} from 'react';\nimport { createPortal } from 'react-dom';\n\nimport { ListItem, type ThemedClassName } from '@dxos/react-ui';\nimport { resizeAttributes, sizeStyle } from '@dxos/react-ui-dnd';\nimport { mx } from '@dxos/ui-theme';\n\nimport { type ItemDragState, StackItemContext, idle, useStack, useStackItem } from '../StackContext';\nimport { type StackItemData, type StackItemSize } from '../types';\n\nimport { StackItemContent, type StackItemContentProps } from './StackItemContent';\nimport { StackItemDragHandle, type StackItemDragHandleProps } from './StackItemDragHandle';\nimport {\n StackItemHeading,\n StackItemHeadingLabel,\n type StackItemHeadingLabelProps,\n type StackItemHeadingProps,\n StackItemHeadingStickyContent,\n} from './StackItemHeading';\nimport { StackItemResizeHandle, type StackItemResizeHandleProps } from './StackItemResizeHandle';\nimport {\n StackItemSigil,\n type StackItemSigilAction,\n StackItemSigilButton,\n type StackItemSigilButtonProps,\n type StackItemSigilProps,\n} from './StackItemSigil';\n\n// NOTE: 48rem fills the screen on a MacbookPro with the sidebars closed.\nexport const DEFAULT_HORIZONTAL_SIZE = 48 satisfies StackItemSize;\nexport const DEFAULT_VERTICAL_SIZE = 'min-content' satisfies StackItemSize;\nexport const DEFAULT_EXTRINSIC_SIZE = DEFAULT_HORIZONTAL_SIZE satisfies StackItemSize;\n\n//\n// StackItemRoot\n//\n\ntype StackItemRootProps = ThemedClassName<ComponentPropsWithRef<'div'>> & {\n item: Omit<StackItemData, 'type'>;\n order?: number;\n prevSiblingId?: string;\n nextSiblingId?: string;\n size?: StackItemSize;\n onSizeChange?: (nextSize: StackItemSize) => void;\n role?: 'article' | 'section';\n disableRearrange?: boolean;\n focusIndicatorVariant?: 'over-all' | 'group' | 'over-all-always' | 'group-always';\n};\n\nconst StackItemRoot = forwardRef<HTMLDivElement, StackItemRootProps>(\n (\n {\n item,\n children,\n classNames,\n size: propsSize,\n onSizeChange,\n role,\n order,\n prevSiblingId,\n nextSiblingId,\n style,\n disableRearrange,\n focusIndicatorVariant = 'over-all',\n ...props\n },\n forwardedRef,\n ) => {\n const [itemElement, itemRef] = useState<HTMLDivElement | null>(null);\n const composedItemRef = composeRefs<HTMLDivElement>(itemRef, forwardedRef);\n const [selfDragHandleElement, selfDragHandleRef] = useState<HTMLDivElement | null>(null);\n const [closestEdge, setEdge] = useState<Edge | null>(null);\n const [sourceId, setSourceId] = useState<string | null>(null);\n const [dragState, setDragState] = useState<ItemDragState>(idle);\n const { orientation, rail, onRearrange, size: stackSize, stackId } = 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 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 // TODO(burdon): Factor out?\n useLayoutEffect(() => {\n if (!itemElement || !onRearrange || disableRearrange) {\n return;\n }\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 const offsetFn = preserveOffsetOnSource({ element: source.element, input: location.current.input });\n const rect = source.element.getBoundingClientRect();\n setCustomNativeDragPreview({\n nativeSetDragImage,\n getOffset: ({ container }) => {\n return offsetFn({ container });\n },\n render: ({ container }) => {\n container.style.width = rect.width + 'px';\n setDragState({ type: 'preview', container, item });\n return () => {};\n },\n });\n },\n onDragStart: () => {\n document.body.removeAttribute('data-drag-preview');\n itemElement?.closest('[data-drag-autoscroll]')?.setAttribute('data-drag-autoscroll', 'active');\n setDragState({ type: 'w-dragging', item });\n },\n onDrop: () => {\n itemElement?.closest('[data-drag-autoscroll]')?.setAttribute('data-drag-autoscroll', 'idle');\n setDragState(idle);\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 setSourceId(source.data.id as string);\n }\n },\n onDrag: ({ self, source }) => {\n if (source.data.type === self.data.type) {\n setEdge(extractClosestEdge(self.data));\n setSourceId(source.data.id as string);\n }\n },\n onDragLeave: () => {\n setEdge(null);\n setSourceId(null);\n },\n onDrop: ({ self, source }) => {\n setEdge(null);\n setSourceId(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 focusableGroupAttrs = useFocusableGroup({ tabBehavior: 'limited' });\n\n // Determine if the drop would result in any changes.\n const shouldShowDropIndicator = () => {\n if (!closestEdge || !sourceId) {\n return false;\n }\n\n // Don't show indicator when dragged item is over itself.\n if (sourceId === item.id) {\n return false;\n }\n\n // Don't show indicator when dragged item is over the trailing edge of its previous sibling.\n const isTrailingEdgeOfPrevSibling =\n prevSiblingId !== undefined &&\n sourceId === prevSiblingId &&\n ((orientation === 'horizontal' && closestEdge === 'left') ||\n (orientation === 'vertical' && closestEdge === 'top'));\n if (isTrailingEdgeOfPrevSibling) {\n return false;\n }\n\n // Don't show indicator when dragged item is over the leading edge of its next sibling\n const isLeadingEdgeOfNextSibling =\n nextSiblingId !== undefined &&\n sourceId === nextSiblingId &&\n ((orientation === 'horizontal' && closestEdge === 'right') ||\n (orientation === 'vertical' && closestEdge === 'bottom'));\n if (isLeadingEdgeOfNextSibling) {\n return false;\n }\n\n return true;\n };\n\n const stackItemContextValue = useMemo(\n () => ({ selfDragHandleRef, size, setSize, state: dragState, setState: setDragState, role }),\n [selfDragHandleRef, size, setSize, dragState, setDragState, role],\n );\n\n return (\n <StackItemContext.Provider value={stackItemContextValue}>\n <Root\n {...props}\n tabIndex={0}\n {...focusableGroupAttrs}\n className={mx(\n 'group/stack-item grid relative',\n focusIndicatorVariant === 'over-all'\n ? 'dx-focus-ring-inset-over-all'\n : focusIndicatorVariant === 'over-all-always'\n ? 'dx-focus-ring-inset-over-all-always'\n : orientation === 'horizontal'\n ? focusIndicatorVariant === 'group-always'\n ? 'dx-focus-ring-group-x-always'\n : 'dx-focus-ring-group-x'\n : focusIndicatorVariant === 'group-always'\n ? 'dx-focus-ring-group-y-always'\n : 'dx-focus-ring-group-y',\n orientation === 'horizontal' ? 'grid-rows-subgrid' : 'grid-cols-subgrid',\n rail && (orientation === 'horizontal' ? 'row-span-2' : 'col-span-2'),\n role === 'section' && orientation !== 'horizontal' && 'border-b border-subdued-separator',\n classNames,\n )}\n data-dx-stack-item={stackId}\n data-dx-item-id={item.id}\n {...resizeAttributes}\n style={{\n ...(stackSize !== 'split' && sizeStyle(size, orientation)),\n ...(Number.isFinite(order) && {\n [orientation === 'horizontal' ? 'gridColumn' : 'gridRow']: `${order}`,\n }),\n ...style,\n }}\n ref={composedItemRef}\n >\n {children}\n {shouldShowDropIndicator() && closestEdge && (\n <ListItem.DropIndicator lineInset={8} terminalInset={-8} edge={closestEdge} />\n )}\n </Root>\n </StackItemContext.Provider>\n );\n },\n);\n\n//\n// StackItemDragPreview\n//\n\ntype StackItemDragPreviewProps = {\n children: ({ item }: { item: any }) => ReactNode;\n};\n\nconst StackItemDragPreview = ({ children }: StackItemDragPreviewProps) => {\n const { state } = useStackItem();\n return state?.type === 'preview' ? createPortal(children({ item: state.item }), state.container) : null;\n};\n\n//\n// StackItem\n//\n\nexport const StackItem = {\n Root: StackItemRoot,\n Content: StackItemContent,\n DragHandle: StackItemDragHandle,\n DragPreview: StackItemDragPreview,\n Heading: StackItemHeading,\n HeadingLabel: StackItemHeadingLabel,\n HeadingStickyContent: StackItemHeadingStickyContent,\n ResizeHandle: StackItemResizeHandle,\n Sigil: StackItemSigil,\n SigilButton: StackItemSigilButton,\n};\n\nexport type {\n StackItemRootProps,\n StackItemContentProps,\n StackItemDragHandleProps,\n StackItemDragPreviewProps,\n StackItemHeadingProps,\n StackItemHeadingLabelProps,\n StackItemResizeHandleProps,\n StackItemSigilProps,\n StackItemSigilButtonProps,\n StackItemSigilAction,\n};\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport React, { type ComponentPropsWithoutRef, forwardRef, useMemo } from 'react';\n\nimport { type ThemedClassName } from '@dxos/react-ui';\nimport { mx } from '@dxos/ui-theme';\n\nimport { useStack, useStackItem } from '../StackContext';\n\nexport type StackItemContentProps = ThemedClassName<Omit<ComponentPropsWithoutRef<'div'>, 'role' | 'scrollable'>> & {\n toolbar?: boolean;\n statusbar?: boolean;\n};\n\n/**\n * This component should be used by plugins for rendering content within a stack item (i.e., a “plank” or “section”).\n */\nexport const StackItemContent = forwardRef<HTMLDivElement, StackItemContentProps>(\n ({ classNames, children, toolbar, statusbar, ...props }, forwardedRef) => {\n const { size: stackItemSize } = useStack();\n const { role } = useStackItem();\n const style = useMemo(\n () => ({\n gridTemplateRows: [\n toolbar && role === 'section' ? 'calc(var(--dx-toolbar-size) - 1px)' : 'var(--dx-toolbar-size)',\n '1fr',\n statusbar && 'var(--dx-statusbar-size)',\n ]\n .filter(Boolean)\n .join(' '),\n }),\n [toolbar, statusbar],\n );\n\n return (\n <div\n {...props}\n role='none'\n style={style}\n className={mx(\n 'group grid grid-cols-[100%] dx-density-coarse',\n stackItemSize === 'contain' && 'min-h-0 overflow-hidden',\n toolbar &&\n role === 'section' &&\n '[&_.dx-toolbar]:sticky [&_.dx-toolbar]:z-[1] [&_.dx-toolbar]:top-0 [&_.dx-toolbar]:-mb-px [&_.dx-toolbar]:min-w-0',\n toolbar && '[&>.dx-toolbar]:relative [&>.dx-toolbar]:border-b [&>.dx-toolbar]:border-subdued-separator',\n classNames,\n )}\n data-popover-collision-boundary={true}\n ref={forwardedRef}\n >\n {children}\n </div>\n );\n },\n);\n\nStackItemContent.displayName = 'StackItemContent';\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport { Primitive } from '@radix-ui/react-primitive';\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 Comp = asChild ? Slot : Primitive.div;\n\n return (\n <Comp ref={selfDragHandleRef} role='button'>\n {children}\n </Comp>\n );\n};\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport { Primitive } from '@radix-ui/react-primitive';\nimport { Slot } from '@radix-ui/react-slot';\nimport React, {\n type ComponentPropsWithRef,\n type ComponentPropsWithoutRef,\n type PropsWithChildren,\n forwardRef,\n} from 'react';\n\nimport { type ThemedClassName } from '@dxos/react-ui';\nimport { type AttendableId, type Related, useAttention } from '@dxos/react-ui-attention';\nimport { mx } from '@dxos/ui-theme';\n\nimport { useStack } from '../StackContext';\n\nexport type StackItemHeadingProps = ThemedClassName<ComponentPropsWithoutRef<'div'>> & {\n asChild?: boolean;\n separateOnScroll?: boolean;\n};\n\nexport const StackItemHeading = ({\n children,\n classNames,\n asChild,\n separateOnScroll,\n ...props\n}: StackItemHeadingProps) => {\n const { orientation } = useStack();\n\n const Comp = asChild ? Slot : Primitive.div;\n\n return (\n <Comp\n role='heading'\n {...props}\n className={mx(\n 'flex items-center border-x-0! bg-header-surface',\n separateOnScroll\n ? 'border-transparent [[data-scroll-separator=\"true\"]_&]:border-subdued-separator'\n : 'border-subdued-separator',\n orientation === 'horizontal' ? 'h-(--dx-rail-size)' : 'w-(--dx-rail-size) flex-col',\n orientation === 'horizontal' ? 'border-b' : 'border-e',\n classNames,\n )}\n >\n {children}\n </Comp>\n );\n};\n\nexport const StackItemHeadingStickyContent = ({ children }: PropsWithChildren<{}>) => {\n return (\n <div role='none' className='sticky top-0 bg-(--sticky-bg) p-1 w-full'>\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\n return (\n <h1\n {...props}\n data-attention={((related && isRelated) || hasAttention || isAncestor).toString()}\n className={mx(\n 'px-1 min-w-0 w-0 grow truncate font-medium text-base-surface-text data-[attention=true]:text-accent-text self-center',\n classNames,\n )}\n ref={forwardedRef}\n />\n );\n },\n);\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport React from 'react';\n\nimport { ResizeHandle } from '@dxos/react-ui-dnd';\n\nimport { useStack, useStackItem } from '../StackContext';\n\nimport { DEFAULT_EXTRINSIC_SIZE } from './StackItem';\n\nconst MIN_WIDTH = 20;\nconst MIN_HEIGHT = 3;\n\nexport type StackItemResizeHandleProps = {};\n\nexport const StackItemResizeHandle = (_: StackItemResizeHandleProps) => {\n const { orientation } = useStack();\n const { setSize, size } = useStackItem();\n\n return (\n <ResizeHandle\n side={orientation === 'horizontal' ? 'inline-end' : 'block-end'}\n fallbackSize={DEFAULT_EXTRINSIC_SIZE}\n minSize={orientation === 'horizontal' ? MIN_WIDTH : MIN_HEIGHT}\n size={size}\n onSizeChange={setSize}\n />\n );\n};\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport React, { Fragment, type PropsWithChildren, forwardRef, useState } from 'react';\n\nimport { type Node } 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 { mx } from '@dxos/ui-theme';\nimport { getHostPlatform } from '@dxos/util';\n\nimport { translationKey } from '../../translations';\n\nimport { MenuSignifierHorizontal } from './MenuSignifier';\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<Node.ActionLike, 'id' | 'properties' | 'data'>;\n\nexport type StackItemSigilButtonProps = Omit<ButtonProps, 'variant'> &\n AttendableId &\n Related & {\n isMenu?: boolean;\n };\n\nexport const StackItemSigilButton = forwardRef<HTMLButtonElement, StackItemSigilButtonProps>(\n ({ attendableId, classNames, related, isMenu = true, children, ...props }, forwardedRef) => {\n const { hasAttention, isAncestor, isRelated } = useAttention(attendableId);\n const variant = (related && isRelated) || hasAttention || isAncestor ? 'primary' : 'ghost';\n // TODO(wittjosiah): Disable hover styles when isMenu is false.\n return (\n <Button\n {...props}\n variant={variant}\n classNames={[\n 'shrink-0 px-0 min-h-0 w-(--dx-rail-action) h-(--dx-rail-action) relative dx-app-no-drag',\n classNames,\n ]}\n ref={forwardedRef}\n >\n {isMenu && <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\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 isMenu={hasActions}\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 open={optionsMenuOpen} onOpenChange={setOptionsMenuOpen}>\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 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', 'text-description')}>{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 2023 DXOS.org\n//\n\nimport { type Resource } from '@dxos/react-ui';\n\nexport const translationKey = '@dxos/react-ui-stack';\n\nexport const translations = [\n {\n 'en-US': {\n [translationKey]: {\n 'resize label': 'Drag to resize',\n 'drag handle label': 'Drag to rearrange',\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] as const satisfies Resource[];\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport React from 'react';\n\nexport const MenuSignifierHorizontal = () => (\n <svg className='absolute bottom-[7px]' width={20} height={2} viewBox='0 0 20 2' stroke='currentColor' opacity={0.5}>\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 left-1' width={2} height={18} viewBox='0 0 2 18' stroke='currentColor'>\n <line x1={1} y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ACxB,iCACA,yBACViB,gBAAgB,eAAe,sBAAsB,qBACrDC,SAASD,gBAAgB,eAAe,eAAe,eACvDvB,SAAS,aAAauB,gBAAgB,gBAAgB,qCACtD3B,UAAAA;IAEFiG,sBAAoBlE;IACpBmE,mBAAiBpG,KAAKgD;IACrB,GAAGqD;IACJ3F,OAAO;MACL,GAAIsB,cAAc,WAAWsE,UAAUnG,MAAM0B,WAAAA;MAC7C,GAAI0E,OAAOC,SAASjG,KAAAA,KAAU;QAC5B,CAACsB,gBAAgB,eAAe,eAAe,SAAA,GAAY,GAAGtB,KAAAA;MAChE;MACA,GAAGG;IACL;IACA+F,KAAKvF;KAEJjB,UACAmF,wBAAAA,KAA6B9D,eAC5B,gBAAAsE,OAAA,cAACc,UAASC,eAAa;IAACC,WAAW;IAAGC,eAAe;IAAIC,MAAMxF;;AAKzE,CAAA;AAWF,IAAMyF,uBAAuB,CAAC,EAAE9G,SAAQ,MAA6B;AACnE,QAAM,EAAEyF,MAAK,IAAKsB,aAAAA;AAClB,SAAOtB,OAAOjD,SAAS,YAAYwE,6BAAahH,SAAS;IAAED,MAAM0F,MAAM1F;EAAK,CAAA,GAAI0F,MAAM1B,SAAS,IAAI;AACrG;AAMO,IAAMkD,YAAY;EACvB9E,MAAMtC;EACNqH,SAASC;EACTC,YAAYC;EACZC,aAAaR;EACbS,SAASC;EACTC,cAAcC;EACdC,sBAAsBC;EACtBC,cAAcC;EACdC,OAAOC;EACPC,aAAaC;AACf;",
|
|
6
|
-
"names": ["composeRefs", "React", "Children", "forwardRef", "useCallback", "useEffect", "
|
|
3
|
+
"sources": ["../../../src/components/Stack/Stack.tsx", "../../../src/hooks/useStackDropForElements.ts", "../../../src/components/StackContext.tsx", "../../../src/components/StackItem/StackItem.tsx", "../../../src/components/StackItem/StackItemContent.tsx", "../../../src/components/StackItem/StackItemDragHandle.tsx", "../../../src/components/StackItem/StackItemHeading.tsx", "../../../src/components/StackItem/StackItemResizeHandle.tsx", "../../../src/components/StackItem/StackItemSigil.tsx", "../../../src/components/StackItem/MenuSignifier.tsx"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { composeRefs } from '@radix-ui/react-compose-refs';\nimport React, {\n Children,\n type ComponentPropsWithRef,\n type FocusEvent,\n type KeyboardEvent,\n forwardRef,\n useCallback,\n useEffect,\n useState,\n} from 'react';\n\nimport { ListItem, type ThemedClassName, useId } from '@dxos/react-ui';\nimport { mx } from '@dxos/ui-theme';\n\nimport { useStackDropForElements } from '../../hooks';\nimport { StackContext } from '../StackContext';\nimport { type StackContextValue } from '../types';\n\nexport type Orientation = 'horizontal' | 'vertical';\n\n/**\n * Size is how Stack and its StackItems coordinate the dimensions of the items with the available space.\n * - `intrinsic` signals to Stack and its StackItems to occupy their intrinsic size\n * - Any other size will extrinsically fill the available space along the axis of its orientation and handle overflow:\n * - `contain` causes StackItems to occupy their intrinsic size\n * - `split` divides the Stack’s available space among the StackItems\n */\nexport type Size = 'intrinsic' | 'contain' | 'split';\n\nexport const railGridHorizontal = 'grid-rows-[[rail-start]_var(--dx-rail-size)_[content-start]_1fr_[content-end]]';\nexport const railGridVertical = 'grid-cols-[[rail-start]_var(--dx-rail-size)_[content-start]_1fr_[content-end]]';\n\nconst PERPENDICULAR_FOCUS_THRESHHOLD = 128;\n\nconst scrollIntoViewAndFocus = (el: HTMLElement, orientation: StackProps['orientation']) => {\n el.scrollIntoView({\n behavior: 'instant',\n [orientation === 'vertical' ? 'block' : 'inline']: 'center',\n });\n return el.focus();\n};\n\nexport type StackProps = Omit<ThemedClassName<ComponentPropsWithRef<'div'>>, 'aria-orientation'> &\n Partial<StackContextValue> & {\n itemsCount?: number;\n circularFocus?: boolean;\n separatorOnScroll?: number;\n getDropElement?: (stackElement: HTMLDivElement) => HTMLDivElement;\n };\n\nexport const Stack = forwardRef<HTMLDivElement, StackProps>(\n (\n {\n children,\n classNames,\n id,\n style,\n orientation = 'vertical',\n rail = true,\n size = 'intrinsic',\n itemsCount = Children.count(children),\n circularFocus,\n separatorOnScroll,\n getDropElement,\n onBlur,\n onKeyDown,\n onRearrange,\n ...props\n },\n forwardedRef,\n ) => {\n const stackId = useId('stack', id);\n const [stackElement, stackRef] = useState<HTMLDivElement | null>(null);\n const [lastFocusedItem, setLastFocusedItem] = useState<string>();\n const composedItemRef = composeRefs<HTMLDivElement>(stackRef, forwardedRef);\n\n const selfDroppable = !!(itemsCount < 1 && onRearrange && id);\n const { dropping } = useStackDropForElements({\n id,\n element: getDropElement && stackElement ? getDropElement(stackElement) : stackElement,\n scrollElement: stackElement,\n selfDroppable,\n orientation,\n onRearrange,\n });\n\n /** Updates scroll separator data attributes based on current scroll position. */\n const handleScroll = useCallback(() => {\n if (stackElement && Number.isFinite(separatorOnScroll)) {\n const scrollPosition = orientation === 'horizontal' ? stackElement.scrollLeft : stackElement.scrollTop;\n const scrollSize = orientation === 'horizontal' ? stackElement.scrollWidth : stackElement.scrollHeight;\n const clientSize = orientation === 'horizontal' ? stackElement.clientWidth : stackElement.clientHeight;\n const separatorHost = stackElement.closest('[data-scroll-separator]');\n if (separatorHost) {\n separatorHost.setAttribute('data-scroll-separator', String(scrollPosition > separatorOnScroll!));\n separatorHost.setAttribute(\n 'data-scroll-separator-end',\n String(scrollSize - (scrollPosition + clientSize) > separatorOnScroll!),\n );\n }\n }\n }, [stackElement, separatorOnScroll, orientation]);\n\n /** Handles blur events to track the last focused item within this stack. */\n const handleBlur = useCallback(\n (event: FocusEvent<HTMLDivElement>) => {\n if (event.target) {\n const target = event.target as HTMLElement;\n const closestStackItem = target.closest(`[data-dx-item-id]`) as HTMLElement | null;\n if (closestStackItem?.closest(`[data-dx-stack=\"${stackId}\"]`)) {\n setLastFocusedItem(closestStackItem?.getAttribute('data-dx-item-id') ?? undefined);\n }\n }\n onBlur?.(event);\n },\n [stackId, onBlur],\n );\n\n /** Handles keyboard navigation within the stack. */\n const handleKeyDown = useKeyDown(stackId, circularFocus, onKeyDown);\n\n /** Observes DOM mutations to keep scroll separator state in sync. */\n useEffect(() => {\n if (!(stackElement && Number.isFinite(separatorOnScroll))) {\n return;\n }\n\n const observer = new MutationObserver(() => {\n handleScroll();\n });\n\n observer.observe(stackElement, { childList: true, subtree: true });\n return () => {\n observer.disconnect();\n };\n }, [stackElement, handleScroll]);\n\n return (\n <StackContext.Provider value={{ stackId, orientation, rail, size, onRearrange }}>\n <div\n {...props}\n {...(Number.isFinite(separatorOnScroll) && { onScroll: handleScroll })}\n className={mx(\n 'relative grid [--stack-gap:var(--spacing-trim-xs)]',\n size === 'contain' &&\n (orientation === 'horizontal'\n ? 'overflow-x-auto overscroll-x-contain min-h-0 max-h-full h-full'\n : 'overflow-y-auto min-w-0 max-w-full w-full'),\n rail\n ? orientation === 'horizontal'\n ? railGridHorizontal\n : railGridVertical\n : orientation === 'horizontal'\n ? 'grid-rows-1 px-(--stack-gap)'\n : 'grid-cols-1 py-(--stack-gap)',\n classNames,\n )}\n style={{\n [orientation === 'horizontal' ? 'gridTemplateColumns' : 'gridTemplateRows']:\n size === 'split'\n ? `repeat(${itemsCount}, 1fr)`\n : `repeat(${itemsCount}, min-content) [tabster-dummies] 0`,\n ...style,\n }}\n aria-orientation={orientation}\n data-dx-stack={stackId}\n data-dx-stack-circular-focus={circularFocus}\n data-dx-last-focused-item={lastFocusedItem}\n data-rail={rail}\n onBlur={handleBlur}\n onKeyDown={handleKeyDown}\n ref={composedItemRef}\n >\n {children}\n {selfDroppable && dropping && (\n <ListItem.DropIndicator\n lineInset={8}\n terminalInset={-8}\n gap={-8}\n edge={orientation === 'horizontal' ? 'left' : 'top'}\n />\n )}\n </div>\n </StackContext.Provider>\n );\n },\n);\n\nexport { StackContext };\n\nexport type { StackContextValue };\n\n/**\n * Handles moving focus using the arrow keys. Focus is only handled by the nearest stack.\n * If the arrow key matches the orientation, focus cycles between items, otherwise focus is passed to an adjacent stack item;\n * Or if there is no such stack item, focus is passed to the adjacent empty stack if one can be found.\n */\n// TODO(burdon): Replace with Mosaic.Stack which handles this automatically.\nconst useKeyDown = (stackId: string, circularFocus?: boolean, onKeyDown?: StackProps['onKeyDown']) =>\n useCallback(\n (event: KeyboardEvent<HTMLDivElement>) => {\n const target = event.target as HTMLElement;\n if (\n event.key.startsWith('Arrow') &&\n !target.closest(\n `input, textarea, [role=\"textbox\"], [data-tabster*=\"mover\"], [data-arrow-keys=\"all\"], [data-arrow-keys~=\"${event.key.toLowerCase().slice(5)}\"]`,\n )\n ) {\n const closestOwnedItem = target.closest(`[data-dx-stack-item=\"${stackId}\"]`);\n const closestStack = target.closest('[data-dx-stack]') as HTMLElement | null;\n const closestStackItems = Array.from(closestStack?.querySelectorAll(`[data-dx-stack-item=\"${stackId}\"]`) ?? []);\n const closestStackOrientation = closestStack?.getAttribute('aria-orientation') as Orientation;\n const ancestorStack = closestStack?.parentElement?.closest('[data-dx-stack]') as HTMLElement | null;\n if (closestOwnedItem && closestStack) {\n const ancestorOrientation = ancestorStack?.getAttribute('aria-orientation') as Orientation | undefined;\n const parallelDelta = (\n closestStackOrientation === 'vertical' ? event.key === 'ArrowUp' : event.key === 'ArrowLeft'\n )\n ? -1\n : (closestStackOrientation === 'vertical' ? event.key === 'ArrowDown' : event.key === 'ArrowRight')\n ? 1\n : 0;\n const perpendicularDelta = (\n closestStackOrientation === 'vertical' ? event.key === 'ArrowLeft' : event.key === 'ArrowUp'\n )\n ? -1\n : (closestStackOrientation === 'vertical' ? event.key === 'ArrowRight' : event.key === 'ArrowDown')\n ? 1\n : 0;\n if (parallelDelta !== 0) {\n const currentIndex = closestStackItems.indexOf(closestOwnedItem);\n const nextIndex = currentIndex + parallelDelta;\n let adjacentItem: HTMLElement | undefined;\n if (circularFocus) {\n // Circular navigation: wrap around using modulo.\n adjacentItem = closestStackItems[(nextIndex + closestStackItems.length) % closestStackItems.length] as\n | HTMLElement\n | undefined;\n } else {\n // Non-circular navigation: only move if within bounds.\n if (nextIndex >= 0 && nextIndex < closestStackItems.length) {\n adjacentItem = closestStackItems[nextIndex] as HTMLElement | undefined;\n }\n }\n\n if (adjacentItem) {\n event.preventDefault();\n scrollIntoViewAndFocus(adjacentItem, closestStackOrientation);\n }\n }\n\n if (perpendicularDelta !== 0) {\n if (ancestorStack && ancestorOrientation !== closestStackOrientation) {\n const siblingStacks = Array.from(\n ancestorStack.querySelectorAll(\n `[data-dx-stack-item=\"${ancestorStack.getAttribute('data-dx-stack')}\"] [data-dx-stack]`,\n ),\n ) as HTMLElement[];\n const currentStackIndex = siblingStacks.indexOf(closestStack);\n const nextStackIndex = currentStackIndex + perpendicularDelta;\n let adjacentStack: HTMLElement | undefined;\n\n if (ancestorStack.getAttribute('data-dx-stack-circular-focus') === 'true') {\n // Circular navigation: wrap around using modulo.\n adjacentStack = siblingStacks[(nextStackIndex + siblingStacks.length) % siblingStacks.length] as\n | HTMLElement\n | undefined;\n } else {\n // Non-circular navigation: only move if within bounds.\n if (nextStackIndex >= 0 && nextStackIndex < siblingStacks.length) {\n adjacentStack = siblingStacks[nextStackIndex] as HTMLElement | undefined;\n }\n }\n const adjacentStackSelfItem = adjacentStack?.closest(\n `[data-dx-stack-item=${ancestorStack.getAttribute('data-dx-stack')}]`,\n ) as HTMLElement | undefined;\n const adjacentStackItems = adjacentStack\n ? (Array.from(\n adjacentStack.querySelectorAll(\n `[data-dx-stack-item=\"${adjacentStack.getAttribute('data-dx-stack')}\"]`,\n ),\n ) as HTMLElement[])\n : [];\n if (adjacentStack && adjacentStackItems.length > 0) {\n // Check if the adjacent stack has a last focused item recorded, otherwise find the closest item by position.\n let closestItem = adjacentStackItems[0];\n // Try to find an item with matching data-dx-stack-item value.\n const lastFocusedItem = adjacentStack.querySelector(\n `[data-dx-item-id=\"${adjacentStack.getAttribute('data-dx-last-focused-item') ?? 'never'}\"]`,\n );\n if (lastFocusedItem) {\n closestItem = lastFocusedItem as HTMLElement;\n } else {\n // Fall back to positional calculation\n const ownedItemRect = closestOwnedItem.getBoundingClientRect();\n const targetPosition =\n closestStackOrientation === 'vertical' ? ownedItemRect.top : ownedItemRect.left;\n\n let closestDistance = Infinity;\n for (const item of adjacentStackItems) {\n const itemRect = item.getBoundingClientRect();\n const itemPosition = closestStackOrientation === 'vertical' ? itemRect.top : itemRect.left;\n const distance = Math.abs(itemPosition - targetPosition);\n if (distance < closestDistance) {\n closestDistance = distance;\n closestItem = item;\n }\n if (closestDistance <= PERPENDICULAR_FOCUS_THRESHHOLD) {\n break;\n }\n }\n }\n\n event.preventDefault();\n scrollIntoViewAndFocus(closestItem, closestStackOrientation);\n } else if (adjacentStackSelfItem) {\n event.preventDefault();\n scrollIntoViewAndFocus(adjacentStackSelfItem, ancestorOrientation);\n }\n } else if (closestOwnedItem) {\n const closestOwnedItemStack = closestOwnedItem.querySelector('[data-dx-stack]');\n const closestOwnedItemStackItems = closestOwnedItemStack\n ? (Array.from(\n closestOwnedItemStack.querySelectorAll(\n `[data-dx-stack-item=\"${closestOwnedItemStack.getAttribute('data-dx-stack')}\"]`,\n ),\n ) as HTMLElement[])\n : [];\n if (closestOwnedItemStackItems.length > 0) {\n event.preventDefault();\n scrollIntoViewAndFocus(\n closestOwnedItemStackItems[\n ['ArrowUp', 'ArrowLeft'].includes(event.key) ? closestOwnedItemStackItems.length - 1 : 0\n ],\n closestOwnedItemStack?.getAttribute('aria-orientation') as Orientation,\n );\n }\n }\n }\n }\n }\n onKeyDown?.(event);\n },\n [onKeyDown, stackId, circularFocus],\n );\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { autoScrollForElements } from '@atlaskit/pragmatic-drag-and-drop-auto-scroll/element';\nimport { attachClosestEdge, extractClosestEdge } from '@atlaskit/pragmatic-drag-and-drop-hitbox/closest-edge';\nimport { combine } from '@atlaskit/pragmatic-drag-and-drop/combine';\nimport { dropTargetForElements } from '@atlaskit/pragmatic-drag-and-drop/element/adapter';\nimport { useLayoutEffect, useState } from 'react';\n\nimport { type Orientation, type StackItemData, type StackItemRearrangeHandler } from '../components';\n\nconst noop = () => {};\n\nexport type UseStackDropForElementsProps = {\n id?: string;\n element: HTMLDivElement | null;\n scrollElement?: HTMLDivElement | null;\n orientation: Orientation;\n selfDroppable: boolean;\n onRearrange?: StackItemRearrangeHandler;\n};\n\nexport type UseStackDropForElements = {\n dropping: boolean;\n};\n\n/**\n * Hook to handle drag-and-drop functionality for Stack components.\n */\nexport const useStackDropForElements = ({\n id,\n element,\n scrollElement = element,\n orientation,\n selfDroppable,\n onRearrange,\n}: UseStackDropForElementsProps): UseStackDropForElements => {\n const [dropping, setDropping] = useState(false);\n\n useLayoutEffect(() => {\n if (!element) {\n return;\n }\n\n const acceptSourceType = orientation === 'horizontal' ? 'column' : 'card';\n\n // TODO(burdon): Use monitor?\n return combine(\n selfDroppable\n ? dropTargetForElements({\n element,\n getData: ({ input, element }) => {\n return attachClosestEdge(\n { 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: () => {\n return setDropping(false);\n },\n onDrop: ({ self, source }) => {\n setDropping(false);\n if (source.data.type === acceptSourceType && selfDroppable && onRearrange) {\n onRearrange(source.data as StackItemData, self.data as StackItemData, extractClosestEdge(self.data));\n }\n },\n })\n : noop,\n\n scrollElement\n ? autoScrollForElements({\n element: scrollElement,\n getAllowedAxis: () => orientation,\n })\n : noop,\n );\n }, [id, element, scrollElement, selfDroppable, orientation, onRearrange]);\n\n return { dropping };\n};\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport { createContext, useContext } from 'react';\n\nimport { type Orientation, type Size } from './Stack';\nimport { type StackItemRearrangeHandler, type StackItemSize } from './types';\n\nexport type StackContextValue = {\n orientation: Orientation;\n rail: boolean;\n size: Size;\n onRearrange?: StackItemRearrangeHandler;\n stackId?: string;\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 ItemDragState =\n | {\n type: 'idle';\n }\n | {\n type: 'preview';\n container: HTMLElement;\n item: any;\n }\n | {\n type: 'is-dragging';\n item: any;\n };\n\nexport const idle: ItemDragState = { type: 'idle' };\n\nexport type StackItemContextValue = {\n selfDragHandleRef: (element: HTMLDivElement | null) => void;\n size: StackItemSize;\n setSize: (nextSize: StackItemSize, commit?: boolean) => void;\n state: ItemDragState;\n setState: (state: ItemDragState) => void;\n role?: string;\n};\n\nexport const StackItemContext = createContext<StackItemContextValue>({\n selfDragHandleRef: () => {},\n size: 'min-content',\n setSize: () => {},\n state: idle,\n setState: () => {},\n});\n\nexport const useStackItem = () => useContext(StackItemContext);\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport {\n type Edge,\n attachClosestEdge,\n extractClosestEdge,\n} from '@atlaskit/pragmatic-drag-and-drop-hitbox/closest-edge';\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 { setCustomNativeDragPreview } from '@atlaskit/pragmatic-drag-and-drop/element/set-custom-native-drag-preview';\nimport { useFocusableGroup } from '@fluentui/react-tabster';\nimport { composeRefs } from '@radix-ui/react-compose-refs';\nimport React, {\n type ComponentPropsWithRef,\n type ReactNode,\n forwardRef,\n useCallback,\n useLayoutEffect,\n useMemo,\n useState,\n} from 'react';\nimport { createPortal } from 'react-dom';\n\nimport { ListItem, type ThemedClassName } from '@dxos/react-ui';\nimport { resizeAttributes, sizeStyle } from '@dxos/react-ui-dnd';\nimport { mx } from '@dxos/ui-theme';\n\nimport { type ItemDragState, StackItemContext, idle, useStack, useStackItem } from '../StackContext';\nimport { type StackItemData, type StackItemSize } from '../types';\nimport { StackItemContent, type StackItemContentProps } from './StackItemContent';\nimport { StackItemDragHandle, type StackItemDragHandleProps } from './StackItemDragHandle';\nimport {\n StackItemHeading,\n StackItemHeadingLabel,\n type StackItemHeadingLabelProps,\n type StackItemHeadingProps,\n StackItemHeadingStickyContent,\n} from './StackItemHeading';\nimport { StackItemResizeHandle, type StackItemResizeHandleProps } from './StackItemResizeHandle';\nimport {\n StackItemSigil,\n type StackItemSigilAction,\n StackItemSigilButton,\n type StackItemSigilButtonProps,\n type StackItemSigilProps,\n} from './StackItemSigil';\n\nexport const DEFAULT_VERTICAL_SIZE = 'min-content' satisfies StackItemSize;\nexport const DEFAULT_HORIZONTAL_SIZE = 50 satisfies StackItemSize;\nexport const DEFAULT_EXTRINSIC_SIZE = DEFAULT_HORIZONTAL_SIZE satisfies StackItemSize;\n\n//\n// StackItemRoot\n//\n\ntype StackItemRootProps = ThemedClassName<ComponentPropsWithRef<'div'>> & {\n role?: 'article' | 'section';\n item: Omit<StackItemData, 'type'>;\n order?: number;\n prevSiblingId?: string;\n nextSiblingId?: string;\n size?: StackItemSize;\n onSizeChange?: (nextSize: StackItemSize) => void;\n disableRearrange?: boolean;\n focusIndicatorVariant?: 'over-all' | 'group' | 'over-all-always' | 'group-always';\n};\n\nconst StackItemRoot = forwardRef<HTMLDivElement, StackItemRootProps>(\n (\n {\n classNames,\n children,\n style,\n role,\n item,\n order,\n prevSiblingId,\n nextSiblingId,\n size: sizeProp,\n onSizeChange,\n disableRearrange,\n focusIndicatorVariant = 'over-all',\n ...props\n },\n forwardedRef,\n ) => {\n const [itemElement, itemRef] = useState<HTMLDivElement | null>(null);\n const composedItemRef = composeRefs<HTMLDivElement>(itemRef, forwardedRef);\n const [selfDragHandleElement, selfDragHandleRef] = useState<HTMLDivElement | null>(null);\n const [closestEdge, setEdge] = useState<Edge | null>(null);\n const [sourceId, setSourceId] = useState<string | null>(null);\n const [dragState, setDragState] = useState<ItemDragState>(idle);\n const { orientation, rail, onRearrange, size: stackSize, stackId } = useStack();\n const [size = orientation === 'horizontal' ? DEFAULT_HORIZONTAL_SIZE : DEFAULT_VERTICAL_SIZE, setInternalSize] =\n useState(sizeProp);\n\n const Root = role ?? 'div';\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 // TODO(burdon): Factor out?\n useLayoutEffect(() => {\n if (!itemElement || !onRearrange || disableRearrange) {\n return;\n }\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 const offsetFn = preserveOffsetOnSource({ element: source.element, input: location.current.input });\n const rect = source.element.getBoundingClientRect();\n setCustomNativeDragPreview({\n nativeSetDragImage,\n getOffset: ({ container }) => {\n return offsetFn({ container });\n },\n render: ({ container }) => {\n container.style.width = rect.width + 'px';\n setDragState({ type: 'preview', container, item });\n return () => {};\n },\n });\n },\n onDragStart: () => {\n document.body.removeAttribute('data-drag-preview');\n itemElement?.closest('[data-drag-autoscroll]')?.setAttribute('data-drag-autoscroll', 'active');\n setDragState({ type: 'is-dragging', item });\n },\n onDrop: () => {\n itemElement?.closest('[data-drag-autoscroll]')?.setAttribute('data-drag-autoscroll', 'idle');\n setDragState(idle);\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 setSourceId(source.data.id as string);\n }\n },\n onDrag: ({ self, source }) => {\n if (source.data.type === self.data.type) {\n setEdge(extractClosestEdge(self.data));\n setSourceId(source.data.id as string);\n }\n },\n onDragLeave: () => {\n setEdge(null);\n setSourceId(null);\n },\n onDrop: ({ self, source }) => {\n setEdge(null);\n setSourceId(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 focusableGroupAttrs = useFocusableGroup({ tabBehavior: 'limited' });\n\n // Determine if the drop would result in any changes.\n const shouldShowDropIndicator = () => {\n if (!closestEdge || !sourceId) {\n return false;\n }\n\n // Don't show indicator when dragged item is over itself.\n if (sourceId === item.id) {\n return false;\n }\n\n // Don't show indicator when dragged item is over the trailing edge of its previous sibling.\n const isTrailingEdgeOfPrevSibling =\n prevSiblingId !== undefined &&\n sourceId === prevSiblingId &&\n ((orientation === 'horizontal' && closestEdge === 'left') ||\n (orientation === 'vertical' && closestEdge === 'top'));\n if (isTrailingEdgeOfPrevSibling) {\n return false;\n }\n\n // Don't show indicator when dragged item is over the leading edge of its next sibling\n const isLeadingEdgeOfNextSibling =\n nextSiblingId !== undefined &&\n sourceId === nextSiblingId &&\n ((orientation === 'horizontal' && closestEdge === 'right') ||\n (orientation === 'vertical' && closestEdge === 'bottom'));\n if (isLeadingEdgeOfNextSibling) {\n return false;\n }\n\n return true;\n };\n\n const stackItemContextValue = useMemo(\n () => ({ selfDragHandleRef, size, setSize, state: dragState, setState: setDragState, role }),\n [selfDragHandleRef, size, setSize, dragState, setDragState, role],\n );\n\n return (\n <StackItemContext.Provider value={stackItemContextValue}>\n <Root\n {...props}\n tabIndex={0}\n {...focusableGroupAttrs}\n className={mx(\n 'group/stack-item grid relative',\n focusIndicatorVariant === 'over-all'\n ? 'dx-focus-ring-inset-over-all'\n : focusIndicatorVariant === 'over-all-always'\n ? 'dx-focus-ring-inset-over-all-always'\n : orientation === 'horizontal'\n ? focusIndicatorVariant === 'group-always'\n ? 'dx-focus-ring-group-x-always'\n : 'dx-focus-ring-group-x'\n : focusIndicatorVariant === 'group-always'\n ? 'dx-focus-ring-group-y-always'\n : 'dx-focus-ring-group-y',\n orientation === 'horizontal' ? 'grid-rows-subgrid' : 'grid-cols-subgrid',\n rail && (orientation === 'horizontal' ? 'row-span-2' : 'col-span-2'),\n role === 'section' && orientation !== 'horizontal' && 'border-b border-subdued-separator',\n classNames,\n )}\n data-dx-stack-item={stackId}\n data-dx-item-id={item.id}\n {...resizeAttributes}\n style={{\n ...(stackSize !== 'split' && sizeStyle(size, orientation)),\n ...(Number.isFinite(order) && {\n [orientation === 'horizontal' ? 'gridColumn' : 'gridRow']: `${order}`,\n }),\n ...style,\n }}\n ref={composedItemRef}\n >\n {children}\n {shouldShowDropIndicator() && closestEdge && (\n <ListItem.DropIndicator lineInset={8} terminalInset={-8} edge={closestEdge} />\n )}\n </Root>\n </StackItemContext.Provider>\n );\n },\n);\n\n//\n// StackItemDragPreview\n//\n\ntype StackItemDragPreviewProps = {\n children: ({ item }: { item: any }) => ReactNode;\n};\n\nconst StackItemDragPreview = ({ children }: StackItemDragPreviewProps) => {\n const { state } = useStackItem();\n return state?.type === 'preview' ? createPortal(children({ item: state.item }), state.container) : null;\n};\n\n//\n// StackItem\n//\n\nexport const StackItem = {\n Root: StackItemRoot,\n Content: StackItemContent,\n DragHandle: StackItemDragHandle,\n DragPreview: StackItemDragPreview,\n Heading: StackItemHeading,\n HeadingLabel: StackItemHeadingLabel,\n HeadingStickyContent: StackItemHeadingStickyContent,\n ResizeHandle: StackItemResizeHandle,\n Sigil: StackItemSigil,\n SigilButton: StackItemSigilButton,\n};\n\nexport type {\n StackItemRootProps,\n StackItemContentProps,\n StackItemDragHandleProps,\n StackItemDragPreviewProps,\n StackItemHeadingProps,\n StackItemHeadingLabelProps,\n StackItemResizeHandleProps,\n StackItemSigilProps,\n StackItemSigilButtonProps,\n StackItemSigilAction,\n};\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport React, { type ComponentPropsWithoutRef, forwardRef, useMemo } from 'react';\n\nimport { type ThemedClassName } from '@dxos/react-ui';\nimport { mx } from '@dxos/ui-theme';\n\nimport { useStack, useStackItem } from '../StackContext';\n\nexport type StackItemContentProps = ThemedClassName<Omit<ComponentPropsWithoutRef<'div'>, 'role' | 'scrollable'>> & {\n toolbar?: boolean;\n statusbar?: boolean;\n};\n\n/**\n * This component should be used by plugins for rendering content within a stack item (i.e., a “plank” or “section”).\n */\nexport const StackItemContent = forwardRef<HTMLDivElement, StackItemContentProps>(\n ({ classNames, children, toolbar, statusbar, ...props }, forwardedRef) => {\n const { size: stackItemSize } = useStack();\n const { role } = useStackItem();\n const style = useMemo(\n () => ({\n gridTemplateRows: [\n toolbar && role === 'section' ? 'calc(var(--dx-toolbar-size) - 1px)' : 'var(--dx-toolbar-size)',\n '1fr',\n statusbar && 'var(--dx-statusbar-size)',\n ]\n .filter(Boolean)\n .join(' '),\n }),\n [toolbar, statusbar],\n );\n\n return (\n <div\n {...props}\n style={style}\n className={mx(\n 'group grid grid-cols-[100%] dx-density-coarse',\n stackItemSize === 'contain' && 'min-h-0 overflow-hidden',\n toolbar &&\n role === 'section' &&\n '[&_.dx-toolbar]:sticky [&_.dx-toolbar]:z-[1] [&_.dx-toolbar]:top-0 [&_.dx-toolbar]:-mb-px [&_.dx-toolbar]:min-w-0',\n toolbar && '[&>.dx-toolbar]:relative [&>.dx-toolbar]:border-b [&>.dx-toolbar]:border-subdued-separator',\n classNames,\n )}\n data-popover-collision-boundary={true}\n ref={forwardedRef}\n >\n {children}\n </div>\n );\n },\n);\n\nStackItemContent.displayName = 'StackItemContent';\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport { Primitive } from '@radix-ui/react-primitive';\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 Comp = asChild ? Slot : Primitive.div;\n\n return (\n <Comp ref={selfDragHandleRef} role='button'>\n {children}\n </Comp>\n );\n};\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport { Primitive } from '@radix-ui/react-primitive';\nimport { Slot } from '@radix-ui/react-slot';\nimport React, {\n type ComponentPropsWithRef,\n type ComponentPropsWithoutRef,\n type PropsWithChildren,\n forwardRef,\n} from 'react';\n\nimport { type ThemedClassName } from '@dxos/react-ui';\nimport { type AttendableId, type Related, useAttention } from '@dxos/react-ui-attention';\nimport { mx } from '@dxos/ui-theme';\n\nimport { useStack } from '../StackContext';\n\nexport type StackItemHeadingProps = ThemedClassName<ComponentPropsWithoutRef<'div'>> & {\n asChild?: boolean;\n separateOnScroll?: boolean;\n};\n\nexport const StackItemHeading = ({\n children,\n classNames,\n asChild,\n separateOnScroll,\n role,\n ...props\n}: StackItemHeadingProps) => {\n const { orientation } = useStack();\n const Comp = asChild ? Slot : Primitive.div;\n\n return (\n <Comp\n {...props}\n role={role ?? 'heading'}\n className={mx(\n 'flex items-center border-x-0! bg-header-surface',\n separateOnScroll\n ? 'border-transparent [[data-scroll-separator=\"true\"]_&]:border-subdued-separator'\n : 'border-subdued-separator',\n orientation === 'horizontal' ? 'h-(--dx-rail-size)' : 'w-(--dx-rail-size) flex-col',\n orientation === 'horizontal' ? 'border-b' : 'border-e',\n classNames,\n )}\n >\n {children}\n </Comp>\n );\n};\n\nexport const StackItemHeadingStickyContent = ({ children }: PropsWithChildren<{}>) => {\n return <div className='sticky top-0 bg-(--sticky-bg) p-1 w-full'>{children}</div>;\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\n return (\n <h1\n {...props}\n data-attention={((related && isRelated) || hasAttention || isAncestor).toString()}\n className={mx(\n 'px-1 min-w-0 w-0 grow truncate font-medium text-base-surface-text data-[attention=true]:text-accent-text self-center',\n classNames,\n )}\n ref={forwardedRef}\n />\n );\n },\n);\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport React from 'react';\n\nimport { ResizeHandle } from '@dxos/react-ui-dnd';\n\nimport { useStack, useStackItem } from '../StackContext';\nimport { DEFAULT_EXTRINSIC_SIZE } from './StackItem';\n\nconst MIN_WIDTH = 20;\nconst MIN_HEIGHT = 3;\n\nexport type StackItemResizeHandleProps = {};\n\nexport const StackItemResizeHandle = (_: StackItemResizeHandleProps) => {\n const { orientation } = useStack();\n const { setSize, size } = useStackItem();\n\n return (\n <ResizeHandle\n side={orientation === 'horizontal' ? 'inline-end' : 'block-end'}\n fallbackSize={DEFAULT_EXTRINSIC_SIZE}\n minSize={orientation === 'horizontal' ? MIN_WIDTH : MIN_HEIGHT}\n size={size}\n onSizeChange={setSize}\n />\n );\n};\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport React, { Fragment, type PropsWithChildren, forwardRef, useState } from 'react';\n\nimport { type Node } 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 { mx } from '@dxos/ui-theme';\nimport { getHostPlatform } from '@dxos/util';\n\nimport { translationKey } from '#translations';\n\nimport { MenuSignifierHorizontal } from './MenuSignifier';\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<Node.ActionLike, 'id' | 'properties' | 'data'>;\n\nexport type StackItemSigilButtonProps = Omit<ButtonProps, 'variant'> &\n AttendableId &\n Related & {\n isMenu?: boolean;\n };\n\nexport const StackItemSigilButton = forwardRef<HTMLButtonElement, StackItemSigilButtonProps>(\n ({ attendableId, classNames, related, isMenu = true, children, ...props }, forwardedRef) => {\n const { hasAttention, isAncestor, isRelated } = useAttention(attendableId);\n const variant = (related && isRelated) || hasAttention || isAncestor ? 'primary' : 'ghost';\n // TODO(wittjosiah): Disable hover styles when isMenu is false.\n return (\n <Button\n {...props}\n variant={variant}\n classNames={[\n 'shrink-0 px-0 min-h-0 w-(--dx-rail-action) h-(--dx-rail-action) relative dx-app-no-drag',\n classNames,\n ]}\n ref={forwardedRef}\n >\n {isMenu && <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\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 isMenu={hasActions}\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} />\n </StackItemSigilButton>\n );\n\n if (!hasActions) {\n return button;\n }\n\n return (\n <DropdownMenu.Root open={optionsMenuOpen} onOpenChange={setOptionsMenuOpen}>\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 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', 'text-description')}>{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 className='absolute bottom-[7px]' width={20} height={2} viewBox='0 0 20 2' stroke='currentColor' opacity={0.5}>\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 left-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'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M,EAAEyF,MAAK,IAAKsB,aAAAA;AAClB,SAAOtB,OAAOjD,SAAS,YAAYwE,6BAAahH,SAAS;IAAEG,MAAMsF,MAAMtF;EAAK,CAAA,GAAIsF,MAAM1B,SAAS,IAAI;AACrG;AAMO,IAAMkD,YAAY;EACvB9E,MAAMtC;EACNqH,SAASC;EACTC,YAAYC;EACZC,aAAaR;EACbS,SAASC;EACTC,cAAcC;EACdC,sBAAsBC;EACtBC,cAAcC;EACdC,OAAOC;EACPC,aAAaC;AACf;",
|
|
6
|
+
"names": ["composeRefs", "React", "Children", "forwardRef", "useCallback", "useEffect", "useState", "ListItem", "useId", "mx", "autoScrollForElements", "attachClosestEdge", "extractClosestEdge", "combine", "dropTargetForElements", "useLayoutEffect", "useState", "noop", "useStackDropForElements", "id", "element", "scrollElement", "orientation", "selfDroppable", "onRearrange", "dropping", "setDropping", "acceptSourceType", "getData", "input", "type", "allowedEdges", "onDragEnter", "source", "data", "onDrag", "onDragLeave", "onDrop", "self", "getAllowedAxis", "createContext", "useContext", "StackContext", "orientation", "rail", "size", "useStack", "idle", "type", "StackItemContext", "selfDragHandleRef", "setSize", "state", "setState", "useStackItem", "railGridHorizontal", "railGridVertical", "PERPENDICULAR_FOCUS_THRESHHOLD", "scrollIntoViewAndFocus", "el", "orientation", "scrollIntoView", "behavior", "focus", "Stack", "forwardRef", "children", "classNames", "id", "style", "rail", "size", "itemsCount", "Children", "count", "circularFocus", "separatorOnScroll", "getDropElement", "onBlur", "onKeyDown", "onRearrange", "props", "forwardedRef", "stackId", "useId", "stackElement", "stackRef", "useState", "lastFocusedItem", "setLastFocusedItem", "composedItemRef", "composeRefs", "selfDroppable", "dropping", "useStackDropForElements", "element", "scrollElement", "handleScroll", "useCallback", "Number", "isFinite", "scrollPosition", "scrollLeft", "scrollTop", "scrollSize", "scrollWidth", "scrollHeight", "clientSize", "clientWidth", "clientHeight", "separatorHost", "closest", "setAttribute", "String", "handleBlur", "event", "target", "closestStackItem", "getAttribute", "undefined", "handleKeyDown", "useKeyDown", "useEffect", "observer", "MutationObserver", "observe", "childList", "subtree", "disconnect", "StackContext", "Provider", "value", "div", "onScroll", "className", "mx", "aria-orientation", "data-dx-stack", "data-dx-stack-circular-focus", "data-dx-last-focused-item", "data-rail", "ref", "ListItem", "DropIndicator", "lineInset", "terminalInset", "gap", "edge", "useKeyDown", "stackId", "circularFocus", "onKeyDown", "useCallback", "event", "target", "key", "startsWith", "closest", "toLowerCase", "slice", "closestOwnedItem", "closestStack", "closestStackItems", "Array", "from", "querySelectorAll", "closestStackOrientation", "getAttribute", "ancestorStack", "parentElement", "ancestorOrientation", "parallelDelta", "perpendicularDelta", "currentIndex", "indexOf", "nextIndex", "adjacentItem", "length", "preventDefault", "scrollIntoViewAndFocus", "siblingStacks", "currentStackIndex", "nextStackIndex", "adjacentStack", "adjacentStackSelfItem", "adjacentStackItems", "closestItem", "lastFocusedItem", "querySelector", "ownedItemRect", "getBoundingClientRect", "targetPosition", "top", "left", "closestDistance", "Infinity", "item", "itemRect", "itemPosition", "distance", "Math", "abs", "PERPENDICULAR_FOCUS_THRESHHOLD", "closestOwnedItemStack", "closestOwnedItemStackItems", "includes", "attachClosestEdge", "extractClosestEdge", "combine", "draggable", "dropTargetForElements", "preserveOffsetOnSource", "setCustomNativeDragPreview", "useFocusableGroup", "composeRefs", "React", "forwardRef", "useCallback", "useLayoutEffect", "useMemo", "useState", "createPortal", "ListItem", "resizeAttributes", "sizeStyle", "mx", "React", "forwardRef", "useMemo", "mx", "StackItemContent", "forwardRef", "classNames", "children", "toolbar", "statusbar", "props", "forwardedRef", "size", "stackItemSize", "useStack", "role", "useStackItem", "style", "useMemo", "gridTemplateRows", "filter", "Boolean", "join", "React", "div", "className", "mx", "data-popover-collision-boundary", "ref", "displayName", "Primitive", "Slot", "React", "StackItemDragHandle", "asChild", "children", "selfDragHandleRef", "useStackItem", "Comp", "Slot", "Primitive", "div", "React", "ref", "role", "Primitive", "Slot", "React", "forwardRef", "useAttention", "mx", "StackItemHeading", "children", "classNames", "asChild", "separateOnScroll", "role", "props", "orientation", "useStack", "Comp", "Slot", "Primitive", "div", "React", "className", "mx", "StackItemHeadingStickyContent", "StackItemHeadingLabel", "forwardRef", "attendableId", "related", "forwardedRef", "hasAttention", "isAncestor", "isRelated", "useAttention", "h1", "data-attention", "toString", "ref", "React", "ResizeHandle", "MIN_WIDTH", "MIN_HEIGHT", "StackItemResizeHandle", "_", "orientation", "useStack", "setSize", "size", "useStackItem", "React", "ResizeHandle", "side", "fallbackSize", "DEFAULT_EXTRINSIC_SIZE", "minSize", "onSizeChange", "React", "Fragment", "forwardRef", "useState", "keySymbols", "Button", "DropdownMenu", "Icon", "toLocalizedString", "useTranslation", "useAttention", "mx", "getHostPlatform", "translationKey", "React", "MenuSignifierHorizontal", "svg", "className", "width", "height", "viewBox", "stroke", "opacity", "line", "x1", "y1", "x2", "y2", "strokeWidth", "strokeLinecap", "strokeDasharray", "strokeDashoffset", "StackItemSigilButton", "forwardRef", "attendableId", "classNames", "related", "isMenu", "children", "props", "forwardedRef", "hasAttention", "isAncestor", "isRelated", "useAttention", "variant", "React", "Button", "ref", "MenuSignifierHorizontal", "StackItemSigil", "actions", "actionGroups", "onAction", "triggerLabel", "icon", "t", "useTranslation", "translationKey", "optionsMenuOpen", "setOptionsMenuOpen", "useState", "hasActions", "length", "button", "span", "className", "Icon", "DropdownMenu", "Root", "open", "onOpenChange", "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", "size", "toLocalizedString", "label", "ItemIndicator", "mx", "keySymbols", "join", "Arrow", "DEFAULT_VERTICAL_SIZE", "DEFAULT_HORIZONTAL_SIZE", "DEFAULT_EXTRINSIC_SIZE", "StackItemRoot", "forwardRef", "classNames", "children", "style", "role", "item", "order", "prevSiblingId", "nextSiblingId", "size", "sizeProp", "onSizeChange", "disableRearrange", "focusIndicatorVariant", "props", "forwardedRef", "itemElement", "itemRef", "useState", "composedItemRef", "composeRefs", "selfDragHandleElement", "selfDragHandleRef", "closestEdge", "setEdge", "sourceId", "setSourceId", "dragState", "setDragState", "idle", "orientation", "rail", "onRearrange", "stackSize", "stackId", "useStack", "setInternalSize", "Root", "setSize", "useCallback", "nextSize", "commit", "type", "useLayoutEffect", "combine", "draggable", "element", "dragHandle", "getInitialData", "id", "onGenerateDragPreview", "nativeSetDragImage", "source", "location", "document", "body", "setAttribute", "offsetFn", "preserveOffsetOnSource", "input", "current", "rect", "getBoundingClientRect", "setCustomNativeDragPreview", "getOffset", "container", "render", "width", "onDragStart", "removeAttribute", "closest", "onDrop", "dropTargetForElements", "getData", "attachClosestEdge", "allowedEdges", "onDragEnter", "self", "data", "extractClosestEdge", "onDrag", "onDragLeave", "focusableGroupAttrs", "useFocusableGroup", "tabBehavior", "shouldShowDropIndicator", "isTrailingEdgeOfPrevSibling", "undefined", "isLeadingEdgeOfNextSibling", "stackItemContextValue", "useMemo", "state", "setState", "React", "StackItemContext", "Provider", "value", "tabIndex", "className", "mx", "data-dx-stack-item", "data-dx-item-id", "resizeAttributes", "sizeStyle", "Number", "isFinite", "ref", "ListItem", "DropIndicator", "lineInset", "terminalInset", "edge", "StackItemDragPreview", "useStackItem", "createPortal", "StackItem", "Content", "StackItemContent", "DragHandle", "StackItemDragHandle", "DragPreview", "Heading", "StackItemHeading", "HeadingLabel", "StackItemHeadingLabel", "HeadingStickyContent", "StackItemHeadingStickyContent", "ResizeHandle", "StackItemResizeHandle", "Sigil", "StackItemSigil", "SigilButton", "StackItemSigilButton"]
|
|
7
7
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"inputs":{"src/hooks/useStackDropForElements.ts":{"bytes":8945,"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-auto-scroll/element","kind":"import-statement","external":true},{"path":"@atlaskit/pragmatic-drag-and-drop-hitbox/closest-edge","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true}],"format":"esm"},"src/hooks/index.ts":{"bytes":608,"imports":[{"path":"src/hooks/useStackDropForElements.ts","kind":"import-statement","original":"./useStackDropForElements"}],"format":"esm"},"src/components/StackContext.tsx":{"bytes":3451,"imports":[{"path":"react","kind":"import-statement","external":true}],"format":"esm"},"src/components/Stack/Stack.tsx":{"bytes":46314,"imports":[{"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/ui-theme","kind":"import-statement","external":true},{"path":"src/hooks/index.ts","kind":"import-statement","original":"../../hooks"},{"path":"src/components/StackContext.tsx","kind":"import-statement","original":"../StackContext"}],"format":"esm"},"src/components/Stack/index.ts":{"bytes":463,"imports":[{"path":"src/components/Stack/Stack.tsx","kind":"import-statement","original":"./Stack"}],"format":"esm"},"src/components/StackItem/StackItemContent.tsx":{"bytes":5810,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/ui-theme","kind":"import-statement","external":true},{"path":"src/components/StackContext.tsx","kind":"import-statement","original":"../StackContext"}],"format":"esm"},"src/components/StackItem/StackItemDragHandle.tsx":{"bytes":2286,"imports":[{"path":"@radix-ui/react-primitive","kind":"import-statement","external":true},{"path":"@radix-ui/react-slot","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"src/components/StackContext.tsx","kind":"import-statement","original":"../StackContext"}],"format":"esm"},"src/components/StackItem/StackItemHeading.tsx":{"bytes":7022,"imports":[{"path":"@radix-ui/react-primitive","kind":"import-statement","external":true},{"path":"@radix-ui/react-slot","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui-attention","kind":"import-statement","external":true},{"path":"@dxos/ui-theme","kind":"import-statement","external":true},{"path":"src/components/StackContext.tsx","kind":"import-statement","original":"../StackContext"}],"format":"esm"},"src/components/StackItem/StackItemResizeHandle.tsx":{"bytes":2888,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui-dnd","kind":"import-statement","external":true},{"path":"src/components/StackContext.tsx","kind":"import-statement","original":"../StackContext"},{"path":"src/components/StackItem/StackItem.tsx","kind":"import-statement","original":"./StackItem"}],"format":"esm"},"src/translations.ts":{"bytes":2163,"imports":[],"format":"esm"},"src/components/StackItem/MenuSignifier.tsx":{"bytes":3140,"imports":[{"path":"react","kind":"import-statement","external":true}],"format":"esm"},"src/components/StackItem/StackItemSigil.tsx":{"bytes":17988,"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/ui-theme","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"src/translations.ts","kind":"import-statement","original":"../../translations"},{"path":"src/components/StackItem/MenuSignifier.tsx","kind":"import-statement","original":"./MenuSignifier"}],"format":"esm"},"src/components/StackItem/StackItem.tsx":{"bytes":35334,"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/set-custom-native-drag-preview","kind":"import-statement","external":true},{"path":"@atlaskit/pragmatic-drag-and-drop-hitbox/closest-edge","kind":"import-statement","external":true},{"path":"@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":"react-dom","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-dnd","kind":"import-statement","external":true},{"path":"@dxos/ui-theme","kind":"import-statement","external":true},{"path":"src/components/StackContext.tsx","kind":"import-statement","original":"../StackContext"},{"path":"src/components/StackItem/StackItemContent.tsx","kind":"import-statement","original":"./StackItemContent"},{"path":"src/components/StackItem/StackItemDragHandle.tsx","kind":"import-statement","original":"./StackItemDragHandle"},{"path":"src/components/StackItem/StackItemHeading.tsx","kind":"import-statement","original":"./StackItemHeading"},{"path":"src/components/StackItem/StackItemResizeHandle.tsx","kind":"import-statement","original":"./StackItemResizeHandle"},{"path":"src/components/StackItem/StackItemSigil.tsx","kind":"import-statement","original":"./StackItemSigil"}],"format":"esm"},"src/components/StackItem/index.ts":{"bytes":479,"imports":[{"path":"src/components/StackItem/StackItem.tsx","kind":"import-statement","original":"./StackItem"}],"format":"esm"},"src/components/index.ts":{"bytes":594,"imports":[{"path":"src/components/Stack/index.ts","kind":"import-statement","original":"./Stack"},{"path":"src/components/StackItem/index.ts","kind":"import-statement","original":"./StackItem"}],"format":"esm"},"src/index.ts":{"bytes":559,"imports":[{"path":"src/components/index.ts","kind":"import-statement","original":"./components"},{"path":"src/translations.ts","kind":"import-statement","original":"./translations"}],"format":"esm"},"src/playwright/stack-manager.ts":{"bytes":7185,"imports":[],"format":"esm"},"src/playwright/index.ts":{"bytes":481,"imports":[{"path":"src/playwright/stack-manager.ts","kind":"import-statement","original":"./stack-manager"}],"format":"esm"}},"outputs":{"dist/lib/node-esm/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":70385},"dist/lib/node-esm/index.mjs":{"imports":[{"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/ui-theme","kind":"import-statement","external":true},{"path":"@atlaskit/pragmatic-drag-and-drop/combine","kind":"import-statement","external":true},{"path":"@atlaskit/pragmatic-drag-and-drop/element/adapter","kind":"import-statement","external":true},{"path":"@atlaskit/pragmatic-drag-and-drop-auto-scroll/element","kind":"import-statement","external":true},{"path":"@atlaskit/pragmatic-drag-and-drop-hitbox/closest-edge","kind":"import-statement","external":true},{"path":"react","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/set-custom-native-drag-preview","kind":"import-statement","external":true},{"path":"@atlaskit/pragmatic-drag-and-drop-hitbox/closest-edge","kind":"import-statement","external":true},{"path":"@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":"react-dom","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-dnd","kind":"import-statement","external":true},{"path":"@dxos/ui-theme","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/ui-theme","kind":"import-statement","external":true},{"path":"@radix-ui/react-primitive","kind":"import-statement","external":true},{"path":"@radix-ui/react-slot","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@radix-ui/react-primitive","kind":"import-statement","external":true},{"path":"@radix-ui/react-slot","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui-attention","kind":"import-statement","external":true},{"path":"@dxos/ui-theme","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui-dnd","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/ui-theme","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true}],"exports":["DEFAULT_EXTRINSIC_SIZE","DEFAULT_HORIZONTAL_SIZE","DEFAULT_VERTICAL_SIZE","Stack","StackContext","StackItem","autoScrollRootAttributes","railGridHorizontal","railGridHorizontalContainFitContent","railGridVertical","railGridVerticalContainFitContent","translationKey","translations"],"entryPoint":"src/index.ts","inputs":{"src/components/Stack/Stack.tsx":{"bytesInOutput":10833},"src/hooks/useStackDropForElements.ts":{"bytesInOutput":2036},"src/hooks/index.ts":{"bytesInOutput":0},"src/components/StackContext.tsx":{"bytesInOutput":479},"src/components/StackItem/StackItem.tsx":{"bytesInOutput":8249},"src/components/StackItem/StackItemContent.tsx":{"bytesInOutput":1255},"src/components/StackItem/StackItemDragHandle.tsx":{"bytesInOutput":398},"src/components/StackItem/StackItemHeading.tsx":{"bytesInOutput":1671},"src/components/StackItem/StackItemResizeHandle.tsx":{"bytesInOutput":524},"src/components/StackItem/StackItemSigil.tsx":{"bytesInOutput":4342},"src/translations.ts":{"bytesInOutput":501},"src/components/StackItem/MenuSignifier.tsx":{"bytesInOutput":439},"src/index.ts":{"bytesInOutput":0}},"bytes":31769},"dist/lib/node-esm/playwright/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":3703},"dist/lib/node-esm/playwright/index.mjs":{"imports":[],"exports":["SectionManager","StackManager"],"entryPoint":"src/playwright/index.ts","inputs":{"src/playwright/stack-manager.ts":{"bytesInOutput":1556},"src/playwright/index.ts":{"bytesInOutput":0}},"bytes":1764}}}
|
|
1
|
+
{"inputs":{"src/hooks/useStackDropForElements.ts":{"bytes":8844,"imports":[{"path":"@atlaskit/pragmatic-drag-and-drop-auto-scroll/element","kind":"import-statement","external":true},{"path":"@atlaskit/pragmatic-drag-and-drop-hitbox/closest-edge","kind":"import-statement","external":true},{"path":"@atlaskit/pragmatic-drag-and-drop/combine","kind":"import-statement","external":true},{"path":"@atlaskit/pragmatic-drag-and-drop/element/adapter","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true}],"format":"esm"},"src/hooks/index.ts":{"bytes":525,"imports":[{"path":"src/hooks/useStackDropForElements.ts","kind":"import-statement","original":"./useStackDropForElements"}],"format":"esm"},"src/components/StackContext.tsx":{"bytes":3355,"imports":[{"path":"react","kind":"import-statement","external":true}],"format":"esm"},"src/components/Stack/Stack.tsx":{"bytes":44658,"imports":[{"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/ui-theme","kind":"import-statement","external":true},{"path":"src/hooks/index.ts","kind":"import-statement","original":"../../hooks"},{"path":"src/components/StackContext.tsx","kind":"import-statement","original":"../StackContext"}],"format":"esm"},"src/components/Stack/index.ts":{"bytes":369,"imports":[{"path":"src/components/Stack/Stack.tsx","kind":"import-statement","original":"./Stack"}],"format":"esm"},"src/components/StackItem/StackItemContent.tsx":{"bytes":5634,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/ui-theme","kind":"import-statement","external":true},{"path":"src/components/StackContext.tsx","kind":"import-statement","original":"../StackContext"}],"format":"esm"},"src/components/StackItem/StackItemDragHandle.tsx":{"bytes":2169,"imports":[{"path":"@radix-ui/react-primitive","kind":"import-statement","external":true},{"path":"@radix-ui/react-slot","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"src/components/StackContext.tsx","kind":"import-statement","original":"../StackContext"}],"format":"esm"},"src/components/StackItem/StackItemHeading.tsx":{"bytes":6884,"imports":[{"path":"@radix-ui/react-primitive","kind":"import-statement","external":true},{"path":"@radix-ui/react-slot","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui-attention","kind":"import-statement","external":true},{"path":"@dxos/ui-theme","kind":"import-statement","external":true},{"path":"src/components/StackContext.tsx","kind":"import-statement","original":"../StackContext"}],"format":"esm"},"src/components/StackItem/StackItemResizeHandle.tsx":{"bytes":2769,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui-dnd","kind":"import-statement","external":true},{"path":"src/components/StackContext.tsx","kind":"import-statement","original":"../StackContext"},{"path":"src/components/StackItem/StackItem.tsx","kind":"import-statement","original":"./StackItem"}],"format":"esm"},"src/components/StackItem/MenuSignifier.tsx":{"bytes":3029,"imports":[{"path":"react","kind":"import-statement","external":true}],"format":"esm"},"src/components/StackItem/StackItemSigil.tsx":{"bytes":17826,"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/ui-theme","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"#translations","kind":"import-statement","external":true},{"path":"src/components/StackItem/MenuSignifier.tsx","kind":"import-statement","original":"./MenuSignifier"}],"format":"esm"},"src/components/StackItem/StackItem.tsx":{"bytes":35032,"imports":[{"path":"@atlaskit/pragmatic-drag-and-drop-hitbox/closest-edge","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/set-custom-native-drag-preview","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":"react-dom","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-dnd","kind":"import-statement","external":true},{"path":"@dxos/ui-theme","kind":"import-statement","external":true},{"path":"src/components/StackContext.tsx","kind":"import-statement","original":"../StackContext"},{"path":"src/components/StackItem/StackItemContent.tsx","kind":"import-statement","original":"./StackItemContent"},{"path":"src/components/StackItem/StackItemDragHandle.tsx","kind":"import-statement","original":"./StackItemDragHandle"},{"path":"src/components/StackItem/StackItemHeading.tsx","kind":"import-statement","original":"./StackItemHeading"},{"path":"src/components/StackItem/StackItemResizeHandle.tsx","kind":"import-statement","original":"./StackItemResizeHandle"},{"path":"src/components/StackItem/StackItemSigil.tsx","kind":"import-statement","original":"./StackItemSigil"}],"format":"esm"},"src/components/StackItem/index.ts":{"bytes":377,"imports":[{"path":"src/components/StackItem/StackItem.tsx","kind":"import-statement","original":"./StackItem"}],"format":"esm"},"src/components/index.ts":{"bytes":506,"imports":[{"path":"src/components/Stack/index.ts","kind":"import-statement","original":"./Stack"},{"path":"src/components/StackItem/index.ts","kind":"import-statement","original":"./StackItem"}],"format":"esm"},"src/index.ts":{"bytes":382,"imports":[{"path":"src/components/index.ts","kind":"import-statement","original":"./components"}],"format":"esm"},"src/playwright/stack-manager.ts":{"bytes":7085,"imports":[],"format":"esm"},"src/playwright/index.ts":{"bytes":389,"imports":[{"path":"src/playwright/stack-manager.ts","kind":"import-statement","original":"./stack-manager"}],"format":"esm"},"src/translations.ts":{"bytes":2079,"imports":[],"format":"esm"}},"outputs":{"dist/lib/node-esm/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":68435},"dist/lib/node-esm/index.mjs":{"imports":[{"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/ui-theme","kind":"import-statement","external":true},{"path":"@atlaskit/pragmatic-drag-and-drop-auto-scroll/element","kind":"import-statement","external":true},{"path":"@atlaskit/pragmatic-drag-and-drop-hitbox/closest-edge","kind":"import-statement","external":true},{"path":"@atlaskit/pragmatic-drag-and-drop/combine","kind":"import-statement","external":true},{"path":"@atlaskit/pragmatic-drag-and-drop/element/adapter","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@atlaskit/pragmatic-drag-and-drop-hitbox/closest-edge","kind":"import-statement","external":true},{"path":"@atlaskit/pragmatic-drag-and-drop/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/set-custom-native-drag-preview","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":"react-dom","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-dnd","kind":"import-statement","external":true},{"path":"@dxos/ui-theme","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/ui-theme","kind":"import-statement","external":true},{"path":"@radix-ui/react-primitive","kind":"import-statement","external":true},{"path":"@radix-ui/react-slot","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@radix-ui/react-primitive","kind":"import-statement","external":true},{"path":"@radix-ui/react-slot","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui-attention","kind":"import-statement","external":true},{"path":"@dxos/ui-theme","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui-dnd","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/ui-theme","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"#translations","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true}],"exports":["DEFAULT_EXTRINSIC_SIZE","DEFAULT_HORIZONTAL_SIZE","DEFAULT_VERTICAL_SIZE","Stack","StackContext","StackItem","railGridHorizontal","railGridVertical"],"entryPoint":"src/index.ts","inputs":{"src/components/Stack/Stack.tsx":{"bytesInOutput":10114},"src/hooks/useStackDropForElements.ts":{"bytesInOutput":2036},"src/hooks/index.ts":{"bytesInOutput":0},"src/components/StackContext.tsx":{"bytesInOutput":479},"src/components/StackItem/StackItem.tsx":{"bytesInOutput":8248},"src/components/StackItem/StackItemContent.tsx":{"bytesInOutput":1224},"src/components/StackItem/StackItemDragHandle.tsx":{"bytesInOutput":398},"src/components/StackItem/StackItemHeading.tsx":{"bytesInOutput":1667},"src/components/StackItem/StackItemResizeHandle.tsx":{"bytesInOutput":524},"src/components/StackItem/StackItemSigil.tsx":{"bytesInOutput":4377},"src/components/StackItem/MenuSignifier.tsx":{"bytesInOutput":439},"src/index.ts":{"bytesInOutput":0}},"bytes":30386},"dist/lib/node-esm/playwright/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":3703},"dist/lib/node-esm/playwright/index.mjs":{"imports":[],"exports":["SectionManager","StackManager"],"entryPoint":"src/playwright/index.ts","inputs":{"src/playwright/stack-manager.ts":{"bytesInOutput":1556},"src/playwright/index.ts":{"bytesInOutput":0}},"bytes":1764},"dist/lib/node-esm/translations.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1013},"dist/lib/node-esm/translations.mjs":{"imports":[],"exports":["translationKey","translations"],"entryPoint":"src/translations.ts","inputs":{"src/translations.ts":{"bytesInOutput":501}},"bytes":704}}}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
|
|
2
|
+
|
|
3
|
+
// src/translations.ts
|
|
4
|
+
var translationKey = "@dxos/react-ui-stack";
|
|
5
|
+
var translations = [
|
|
6
|
+
{
|
|
7
|
+
"en-US": {
|
|
8
|
+
[translationKey]: {
|
|
9
|
+
"resize.label": "Drag to resize",
|
|
10
|
+
"drag-handle.label": "Drag to rearrange",
|
|
11
|
+
"pin-start.label": "Pin to the left sidebar",
|
|
12
|
+
"pin-end.label": "Pin to the right sidebar",
|
|
13
|
+
"increment-start.label": "Move to the left",
|
|
14
|
+
"increment-end.label": "Move to the right",
|
|
15
|
+
"close.label": "Close",
|
|
16
|
+
"minify.label": "Minify"
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
];
|
|
21
|
+
export {
|
|
22
|
+
translationKey,
|
|
23
|
+
translations
|
|
24
|
+
};
|
|
25
|
+
//# sourceMappingURL=translations.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/translations.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { type Resource } from '@dxos/react-ui';\n\nexport const translationKey = '@dxos/react-ui-stack';\n\nexport const translations = [\n {\n 'en-US': {\n [translationKey]: {\n 'resize.label': 'Drag to resize',\n 'drag-handle.label': 'Drag to rearrange',\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] as const satisfies Resource[];\n"],
|
|
5
|
+
"mappings": ";;;AAMO,IAAMA,iBAAiB;AAEvB,IAAMC,eAAe;EAC1B;IACE,SAAS;MACP,CAACD,cAAAA,GAAiB;QAChB,gBAAgB;QAChB,qBAAqB;QACrB,mBAAmB;QACnB,iBAAiB;QACjB,yBAAyB;QACzB,uBAAuB;QACvB,eAAe;QACf,gBAAgB;MAClB;IACF;EACF;;",
|
|
6
|
+
"names": ["translationKey", "translations"]
|
|
7
|
+
}
|
|
@@ -13,16 +13,11 @@ export type Orientation = 'horizontal' | 'vertical';
|
|
|
13
13
|
export type Size = 'intrinsic' | 'contain' | 'split';
|
|
14
14
|
export declare const railGridHorizontal = "grid-rows-[[rail-start]_var(--dx-rail-size)_[content-start]_1fr_[content-end]]";
|
|
15
15
|
export declare const railGridVertical = "grid-cols-[[rail-start]_var(--dx-rail-size)_[content-start]_1fr_[content-end]]";
|
|
16
|
-
export declare const railGridHorizontalContainFitContent = "grid-rows-[[rail-start]_var(--dx-rail-size)_[content-start]_fit-content(calc(100%-var(--dx-rail-size)*2+2px))_[content-end]]";
|
|
17
|
-
export declare const railGridVerticalContainFitContent = "grid-cols-[[rail-start]_var(--dx-rail-size)_[content-start]_fit-content(calc(100%-var(--dx-rail-size)*2+2px))_[content-end]]";
|
|
18
|
-
export declare const autoScrollRootAttributes: {
|
|
19
|
-
'data-drag-autoscroll': string;
|
|
20
|
-
};
|
|
21
16
|
export type StackProps = Omit<ThemedClassName<ComponentPropsWithRef<'div'>>, 'aria-orientation'> & Partial<StackContextValue> & {
|
|
22
17
|
itemsCount?: number;
|
|
23
|
-
getDropElement?: (stackElement: HTMLDivElement) => HTMLDivElement;
|
|
24
|
-
separatorOnScroll?: number;
|
|
25
18
|
circularFocus?: boolean;
|
|
19
|
+
separatorOnScroll?: number;
|
|
20
|
+
getDropElement?: (stackElement: HTMLDivElement) => HTMLDivElement;
|
|
26
21
|
};
|
|
27
22
|
export declare const Stack: React.ForwardRefExoticComponent<Omit<StackProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
28
23
|
export { StackContext };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Stack.d.ts","sourceRoot":"","sources":["../../../../../src/components/Stack/Stack.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"Stack.d.ts","sourceRoot":"","sources":["../../../../../src/components/Stack/Stack.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,EAEZ,KAAK,qBAAqB,EAO3B,MAAM,OAAO,CAAC;AAEf,OAAO,EAAY,KAAK,eAAe,EAAS,MAAM,gBAAgB,CAAC;AAIvE,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAElD,MAAM,MAAM,WAAW,GAAG,YAAY,GAAG,UAAU,CAAC;AAEpD;;;;;;GAMG;AACH,MAAM,MAAM,IAAI,GAAG,WAAW,GAAG,SAAS,GAAG,OAAO,CAAC;AAErD,eAAO,MAAM,kBAAkB,mFAAmF,CAAC;AACnH,eAAO,MAAM,gBAAgB,mFAAmF,CAAC;AAYjH,MAAM,MAAM,UAAU,GAAG,IAAI,CAAC,eAAe,CAAC,qBAAqB,CAAC,KAAK,CAAC,CAAC,EAAE,kBAAkB,CAAC,GAC9F,OAAO,CAAC,iBAAiB,CAAC,GAAG;IAC3B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,cAAc,CAAC,EAAE,CAAC,YAAY,EAAE,cAAc,KAAK,cAAc,CAAC;CACnE,CAAC;AAEJ,eAAO,MAAM,KAAK,gGAwIjB,CAAC;AAEF,OAAO,EAAE,YAAY,EAAE,CAAC;AAExB,YAAY,EAAE,iBAAiB,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Stack.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/Stack/Stack.stories.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,KAAgC,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"Stack.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/Stack/Stack.stories.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,KAAgC,MAAM,OAAO,CAAC;AAuBrD,QAAA,MAAM,YAAY,yBAiGjB,CAAC;AAEF,QAAA,MAAM,IAAI;;;;QAGI,WAAW;YAAI,OAAO;YAAW,OAAO;;;;CAEjB,CAAC;eAEvB,IAAI;AAEnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,YAAY,CAAC,CAAC;AAE3C,eAAO,MAAM,OAAO,EAAE,KAIrB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StackContext.d.ts","sourceRoot":"","sources":["../../../../src/components/StackContext.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,KAAK,WAAW,EAAE,KAAK,IAAI,EAAE,MAAM,SAAS,CAAC;AACtD,OAAO,EAAE,KAAK,yBAAyB,EAAE,KAAK,aAAa,EAAE,MAAM,SAAS,CAAC;AAE7E,MAAM,MAAM,iBAAiB,GAAG;IAC9B,WAAW,EAAE,WAAW,CAAC;IACzB,IAAI,EAAE,OAAO,CAAC;IACd,IAAI,EAAE,IAAI,CAAC;IACX,WAAW,CAAC,EAAE,yBAAyB,CAAC;IACxC,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,eAAO,MAAM,YAAY,4CAIvB,CAAC;AAEH,eAAO,MAAM,QAAQ,yBAAiC,CAAC;AAEvD,MAAM,MAAM,aAAa,GACrB;IACE,IAAI,EAAE,MAAM,CAAC;CACd,GACD;IACE,IAAI,EAAE,SAAS,CAAC;IAChB,SAAS,EAAE,WAAW,CAAC;IACvB,IAAI,EAAE,GAAG,CAAC;CACX,GACD;IACE,IAAI,EAAE,
|
|
1
|
+
{"version":3,"file":"StackContext.d.ts","sourceRoot":"","sources":["../../../../src/components/StackContext.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,KAAK,WAAW,EAAE,KAAK,IAAI,EAAE,MAAM,SAAS,CAAC;AACtD,OAAO,EAAE,KAAK,yBAAyB,EAAE,KAAK,aAAa,EAAE,MAAM,SAAS,CAAC;AAE7E,MAAM,MAAM,iBAAiB,GAAG;IAC9B,WAAW,EAAE,WAAW,CA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