@dxos/react-ui-stack 0.7.5-main.ff8607b → 0.7.5-staging.2ff1350
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 +97 -126
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/node/index.cjs +143 -172
- package/dist/lib/node/index.cjs.map +4 -4
- package/dist/lib/node/meta.json +1 -1
- package/dist/lib/node-esm/index.mjs +97 -126
- package/dist/lib/node-esm/index.mjs.map +4 -4
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/types/src/components/MenuSignifier.d.ts +2 -3
- package/dist/types/src/components/MenuSignifier.d.ts.map +1 -1
- package/dist/types/src/components/Stack.d.ts +3 -1
- package/dist/types/src/components/Stack.d.ts.map +1 -1
- package/dist/types/src/components/Stack.stories.d.ts +1 -2
- package/dist/types/src/components/Stack.stories.d.ts.map +1 -1
- package/dist/types/src/components/StackContext.d.ts +2 -1
- package/dist/types/src/components/StackContext.d.ts.map +1 -1
- package/dist/types/src/components/StackItem.d.ts +3 -3
- package/dist/types/src/components/StackItem.d.ts.map +1 -1
- package/dist/types/src/components/StackItemContent.d.ts.map +1 -1
- package/dist/types/src/components/StackItemDragHandle.d.ts +2 -2
- package/dist/types/src/components/StackItemDragHandle.d.ts.map +1 -1
- package/dist/types/src/components/StackItemHeading.d.ts +1 -1
- package/dist/types/src/components/StackItemHeading.d.ts.map +1 -1
- package/dist/types/src/components/StackItemResizeHandle.d.ts +1 -2
- package/dist/types/src/components/StackItemResizeHandle.d.ts.map +1 -1
- package/dist/types/src/hooks/index.d.ts +2 -0
- package/dist/types/src/hooks/index.d.ts.map +1 -0
- package/dist/types/src/hooks/useStackDropForElements.d.ts +15 -0
- package/dist/types/src/hooks/useStackDropForElements.d.ts.map +1 -0
- package/package.json +21 -20
- package/src/components/Stack.stories.tsx +1 -1
- package/src/components/Stack.tsx +33 -61
- package/src/components/StackContext.tsx +3 -1
- package/src/components/StackItem.tsx +3 -4
- package/src/components/StackItemContent.tsx +2 -0
- package/src/components/StackItemResizeHandle.tsx +10 -107
- package/src/hooks/index.ts +5 -0
- package/src/hooks/useStackDropForElements.ts +73 -0
- package/dist/types/src/playwright/playwright.config.d.ts +0 -3
- package/dist/types/src/playwright/playwright.config.d.ts.map +0 -1
- /package/src/playwright/{playwright.config.ts → playwright.config.cts} +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../../src/components/Stack.tsx", "../../../src/components/StackContext.tsx", "../../../src/components/StackItem.tsx", "../../../src/components/StackItemContent.tsx", "../../../src/components/StackItemDragHandle.tsx", "../../../src/components/StackItemHeading.tsx", "../../../src/components/StackItemResizeHandle.tsx", "../../../src/components/StackItemSigil.tsx", "../../../src/components/MenuSignifier.tsx", "../../../src/translations.ts", "../../../src/components/LayoutControls.tsx"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2024 DXOS.org\n//\nimport { 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 { useArrowNavigationGroup } from '@fluentui/react-tabster';\nimport { composeRefs } from '@radix-ui/react-compose-refs';\nimport React, {\n Children,\n type CSSProperties,\n type ComponentPropsWithRef,\n forwardRef,\n useLayoutEffect,\n useState,\n} from 'react';\n\nimport { type ThemedClassName, ListItem } from '@dxos/react-ui';\nimport { mx } from '@dxos/react-ui-theme';\n\nimport { type StackContextValue, StackContext, type StackItemData } from './StackContext';\n\nexport type Orientation = 'horizontal' | 'vertical';\nexport type Size = 'intrinsic' | 'contain';\n\nexport type StackProps = Omit<ThemedClassName<ComponentPropsWithRef<'div'>>, 'aria-orientation'> &\n Partial<StackContextValue> & { itemsCount?: number };\n\nexport const railGridHorizontal = 'grid-rows-[[rail-start]_var(--rail-size)_[content-start]_1fr_[content-end]]';\n\nexport const railGridVertical = 'grid-cols-[[rail-start]_var(--rail-size)_[content-start]_1fr_[content-end]]';\n\nexport const autoScrollRootAttributes = { 'data-drag-autoscroll': 'idle' };\n\nexport const Stack = forwardRef<HTMLDivElement, StackProps>(\n (\n {\n children,\n classNames,\n style,\n orientation = 'vertical',\n rail = true,\n size = 'intrinsic',\n onRearrange,\n itemsCount = Children.count(children),\n ...props\n },\n forwardedRef,\n ) => {\n const [stackElement, stackRef] = useState<HTMLDivElement | null>(null);\n const composedItemRef = composeRefs<HTMLDivElement>(stackRef, forwardedRef);\n const [dropping, setDropping] = useState(false);\n\n const arrowNavigationGroup = useArrowNavigationGroup({ axis: orientation });\n\n const styles: CSSProperties = {\n [orientation === 'horizontal' ? 'gridTemplateColumns' : 'gridTemplateRows']: `repeat(${itemsCount}, min-content)`,\n ...style,\n };\n\n const selfDroppable = !!(itemsCount < 1 && onRearrange && props.id);\n\n useLayoutEffect(() => {\n if (!stackElement || !selfDroppable) {\n return;\n }\n const acceptSourceType = orientation === 'horizontal' ? 'column' : 'card';\n return combine(\n dropTargetForElements({\n element: stackElement,\n getData: ({ input, element }) => {\n return attachClosestEdge(\n { id: props.id, type: orientation === 'horizontal' ? 'card' : 'column' },\n { input, element, allowedEdges: [orientation === 'horizontal' ? 'left' : 'top'] },\n );\n },\n onDragEnter: ({ source }) => {\n if (source.data.type === acceptSourceType) {\n setDropping(true);\n }\n },\n onDrag: ({ source }) => {\n if (source.data.type === acceptSourceType) {\n setDropping(true);\n }\n },\n onDragLeave: () => setDropping(false),\n onDrop: ({ self, source }) => {\n setDropping(false);\n if (source.data.type === acceptSourceType && selfDroppable) {\n onRearrange(source.data as StackItemData, self.data as StackItemData, extractClosestEdge(self.data));\n }\n },\n }),\n autoScrollForElements({ element: stackElement, getAllowedAxis: () => orientation }),\n );\n }, [stackElement, selfDroppable, orientation]);\n\n return (\n <StackContext.Provider value={{ orientation, rail, size, onRearrange }}>\n <div\n {...props}\n {...arrowNavigationGroup}\n className={mx(\n 'grid relative',\n rail\n ? orientation === 'horizontal'\n ? railGridHorizontal\n : railGridVertical\n : orientation === 'horizontal'\n ? 'grid-rows-1 pli-1'\n : 'grid-cols-1 plb-1',\n size === 'contain' &&\n (orientation === 'horizontal'\n ? 'overflow-x-auto min-bs-0 bs-full max-bs-full'\n : 'overflow-y-auto min-is-0 is-full max-is-full'),\n classNames,\n )}\n data-rail={rail}\n aria-orientation={orientation}\n style={styles}\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 };\nexport type { StackContextValue };\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport type { Edge } from '@atlaskit/pragmatic-drag-and-drop-hitbox/closest-edge';\nimport { createContext, useContext } from 'react';\n\nimport { type Orientation, type Size } from './Stack';\n\nexport type StackItemSize = number | 'min-content';\n\nexport type StackItemData = { id: string; type: 'column' | 'card' };\n\nexport type StackItemRearrangeHandler = (\n source: StackItemData,\n target: StackItemData,\n closestEdge: Edge | null,\n) => void;\n\nexport type StackContextValue = {\n orientation: Orientation;\n rail: boolean;\n size: Size;\n onRearrange?: StackItemRearrangeHandler;\n};\n\nexport const StackContext = createContext<StackContextValue>({\n orientation: 'vertical',\n rail: true,\n size: 'intrinsic',\n});\n\nexport const useStack = () => useContext(StackContext);\n\nexport type StackItemContextValue = {\n selfDragHandleRef: (element: HTMLDivElement | null) => void;\n size: StackItemSize;\n setSize: (nextSize: StackItemSize, commit?: boolean) => void;\n};\n\nexport const StackItemContext = createContext<StackItemContextValue>({\n selfDragHandleRef: () => {},\n size: 'min-content',\n setSize: () => {},\n});\n\nexport const useStackItem = () => useContext(StackItemContext);\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport { combine } from '@atlaskit/pragmatic-drag-and-drop/combine';\nimport { draggable, dropTargetForElements } from '@atlaskit/pragmatic-drag-and-drop/element/adapter';\nimport { preserveOffsetOnSource } from '@atlaskit/pragmatic-drag-and-drop/element/preserve-offset-on-source';\nimport { scrollJustEnoughIntoView } from '@atlaskit/pragmatic-drag-and-drop/element/scroll-just-enough-into-view';\nimport {\n attachClosestEdge,\n extractClosestEdge,\n type Edge,\n} from '@atlaskit/pragmatic-drag-and-drop-hitbox/closest-edge';\nimport { useFocusableGroup } from '@fluentui/react-tabster';\nimport { composeRefs } from '@radix-ui/react-compose-refs';\nimport React, { forwardRef, useLayoutEffect, useState, type ComponentPropsWithRef, useCallback } from 'react';\n\nimport { type ThemedClassName, ListItem } from '@dxos/react-ui';\nimport { mx } from '@dxos/react-ui-theme';\n\nimport { useStack, StackItemContext, type StackItemSize, type StackItemData } from './StackContext';\nimport { StackItemContent, type StackItemContentProps } from './StackItemContent';\nimport { StackItemDragHandle, type StackItemDragHandleProps } from './StackItemDragHandle';\nimport {\n StackItemHeading,\n StackItemHeadingLabel,\n type StackItemHeadingProps,\n type StackItemHeadingLabelProps,\n} from './StackItemHeading';\nimport { StackItemResizeHandle, type StackItemResizeHandleProps } from './StackItemResizeHandle';\nimport {\n StackItemSigil,\n type StackItemSigilProps,\n type StackItemSigilAction,\n type StackItemSigilButtonProps,\n StackItemSigilButton,\n} from './StackItemSigil';\n\nexport const DEFAULT_HORIZONTAL_SIZE = 44 satisfies StackItemSize;\nexport const DEFAULT_VERTICAL_SIZE = 'min-content' satisfies StackItemSize;\nexport const DEFAULT_EXTRINSIC_SIZE = DEFAULT_HORIZONTAL_SIZE satisfies StackItemSize;\n\nexport type StackItemRootProps = ThemedClassName<ComponentPropsWithRef<'div'>> & {\n item: Omit<StackItemData, 'type'>;\n order?: number;\n size?: StackItemSize;\n onSizeChange?: (nextSize: StackItemSize) => void;\n role?: 'article' | 'section';\n disableRearrange?: boolean;\n focusIndicatorVariant?: 'over-all' | 'group';\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 style,\n disableRearrange,\n focusIndicatorVariant = 'over-all',\n ...props\n },\n forwardedRef,\n ) => {\n const [itemElement, itemRef] = useState<HTMLDivElement | null>(null);\n const [selfDragHandleElement, selfDragHandleRef] = useState<HTMLDivElement | null>(null);\n const [closestEdge, setEdge] = useState<Edge | null>(null);\n const { orientation, rail, onRearrange } = useStack();\n const [size = orientation === 'horizontal' ? DEFAULT_HORIZONTAL_SIZE : DEFAULT_VERTICAL_SIZE, setInternalSize] =\n useState(propsSize);\n\n const Root = role ?? 'div';\n\n const composedItemRef = composeRefs<HTMLDivElement>(itemRef, forwardedRef);\n\n const setSize = useCallback(\n (nextSize: StackItemSize, commit?: boolean) => {\n setInternalSize(nextSize);\n if (commit) {\n onSizeChange?.(nextSize);\n }\n },\n [onSizeChange],\n );\n\n const type = orientation === 'horizontal' ? 'column' : 'card';\n\n useLayoutEffect(() => {\n if (!itemElement || !onRearrange || disableRearrange) {\n return;\n }\n return combine(\n draggable({\n element: itemElement,\n ...(selfDragHandleElement && { dragHandle: selfDragHandleElement }),\n getInitialData: () => ({ id: item.id, type }),\n onGenerateDragPreview: ({ nativeSetDragImage, source, location }) => {\n document.body.setAttribute('data-drag-preview', 'true');\n scrollJustEnoughIntoView({ element: source.element });\n const { x, y } = preserveOffsetOnSource({ element: source.element, input: location.current.input })({\n container: (source.element.offsetParent ?? document.body) as HTMLElement,\n });\n nativeSetDragImage?.(source.element, x, y);\n },\n onDragStart: () => {\n document.body.removeAttribute('data-drag-preview');\n itemElement?.closest('[data-drag-autoscroll]')?.setAttribute('data-drag-autoscroll', 'active');\n },\n onDrop: () => {\n itemElement?.closest('[data-drag-autoscroll]')?.setAttribute('data-drag-autoscroll', '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 }\n },\n onDrag: ({ self, source }) => {\n if (source.data.type === self.data.type) {\n setEdge(extractClosestEdge(self.data));\n }\n },\n onDragLeave: () => setEdge(null),\n onDrop: ({ self, source }) => {\n setEdge(null);\n if (source.data.type === self.data.type) {\n onRearrange(source.data as StackItemData, self.data as StackItemData, extractClosestEdge(self.data));\n }\n },\n }),\n );\n }, [orientation, item, onRearrange, selfDragHandleElement, itemElement]);\n\n const focusGroupAttrs = useFocusableGroup({ tabBehavior: 'limited' });\n\n return (\n <StackItemContext.Provider value={{ selfDragHandleRef, size, setSize }}>\n <Root\n {...props}\n tabIndex={0}\n {...focusGroupAttrs}\n className={mx(\n 'group/stack-item grid relative',\n focusIndicatorVariant === 'over-all'\n ? 'dx-focus-ring-inset-over-all'\n : orientation === 'horizontal'\n ? 'dx-focus-ring-group-x'\n : 'dx-focus-ring-group-y',\n size === 'min-content' && (orientation === 'horizontal' ? 'is-min' : 'bs-min'),\n orientation === 'horizontal' ? 'grid-rows-subgrid' : 'grid-cols-subgrid',\n rail && (orientation === 'horizontal' ? 'row-span-2' : 'col-span-2'),\n classNames,\n )}\n data-dx-stack-item\n style={{\n ...(size !== 'min-content' && {\n [orientation === 'horizontal' ? 'inlineSize' : 'blockSize']: `${size}rem`,\n }),\n ...(Number.isFinite(order) && {\n [orientation === 'horizontal' ? 'gridColumn' : 'gridRow']: `${order}`,\n }),\n ...style,\n }}\n ref={composedItemRef}\n >\n {children}\n {closestEdge && <ListItem.DropIndicator lineInset={8} terminalInset={-8} edge={closestEdge} />}\n </Root>\n </StackItemContext.Provider>\n );\n },\n);\n\nexport const StackItem = {\n Root: StackItemRoot,\n Content: StackItemContent,\n Heading: StackItemHeading,\n HeadingLabel: StackItemHeadingLabel,\n ResizeHandle: StackItemResizeHandle,\n DragHandle: StackItemDragHandle,\n Sigil: StackItemSigil,\n SigilButton: StackItemSigilButton,\n};\n\nexport type {\n StackItemContentProps,\n StackItemHeadingProps,\n StackItemHeadingLabelProps,\n StackItemResizeHandleProps,\n StackItemDragHandleProps,\n StackItemSigilProps,\n StackItemSigilButtonProps,\n StackItemSigilAction,\n};\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport React, { type ComponentPropsWithoutRef, forwardRef } from 'react';\n\nimport { type ThemedClassName } from '@dxos/react-ui';\nimport { mx } from '@dxos/react-ui-theme';\n\nimport { useStack } from './StackContext';\n\nexport type StackItemContentProps = ThemedClassName<ComponentPropsWithoutRef<'div'>> & {\n /**\n * This flag is required in order to clarify a developer experience that seemed like it needed extra boilerplate\n * (`row-span-2`) or was buggy. See the description of the StackItem.Content component itself for more information.\n */\n toolbar: boolean;\n /**\n * Whether to provide for the layout of a statusbar after the content.\n */\n statusbar?: boolean;\n /**\n * Whether to set a certain aspect ratio on the content, including the toolbar and statusbar. This is provided for\n * convenience and consistency; it can instead be specified by the `classNames` or `style` props as needed.\n */\n size?: 'intrinsic' | 'video' | 'square';\n};\n\n/**\n * This component should be used by plugins for rendering content within a stack item, a.k.a. a “plank” or “section”.\n * The `toolbar` flag must be provided since this component provides for the layout of content with the toolbar.\n */\nexport const StackItemContent = forwardRef<HTMLDivElement, StackItemContentProps>(\n ({ children, toolbar, statusbar, classNames, size = 'intrinsic', ...props }, forwardedRef) => {\n const { size: stackItemSize } = useStack();\n\n return (\n <div\n role='none'\n {...props}\n className={mx(\n 'group grid grid-cols-[100%]',\n stackItemSize === 'contain' && 'min-bs-0 overflow-hidden',\n size === 'video' ? 'aspect-video' : size === 'square' && 'aspect-square',\n classNames,\n )}\n style={{\n gridTemplateRows: [\n ...(toolbar ? ['var(--rail-action)'] : []),\n '1fr',\n ...(statusbar ? ['var(--statusbar-size)'] : []),\n ].join(' '),\n }}\n ref={forwardedRef}\n >\n {children}\n </div>\n );\n },\n);\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport { Slot } from '@radix-ui/react-slot';\nimport React, { type ComponentPropsWithoutRef } from 'react';\n\nimport { useStackItem } from './StackContext';\n\nexport type StackItemDragHandleProps = ComponentPropsWithoutRef<'button'> & { asChild: boolean };\n\nexport const StackItemDragHandle = ({ asChild, children }: StackItemDragHandleProps) => {\n const { selfDragHandleRef } = useStackItem();\n\n const Root = asChild ? Slot : 'div';\n\n return (\n <Root ref={selfDragHandleRef} role='button'>\n {children}\n </Root>\n );\n};\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport { useFocusableGroup } from '@fluentui/react-tabster';\nimport React, { type ComponentPropsWithoutRef, type ComponentPropsWithRef, forwardRef } from 'react';\n\nimport { type ThemedClassName } from '@dxos/react-ui';\nimport { useAttention, type AttendableId, type Related } from '@dxos/react-ui-attention';\nimport { mx } from '@dxos/react-ui-theme';\n\nimport { useStack } from './StackContext';\n\nexport type StackItemHeadingProps = ThemedClassName<ComponentPropsWithoutRef<'div'>>;\n\nexport const StackItemHeading = ({ children, classNames, ...props }: StackItemHeadingProps) => {\n const { orientation } = useStack();\n const focusableGroupAttrs = useFocusableGroup({ tabBehavior: 'limited' });\n return (\n <div\n role='heading'\n {...props}\n tabIndex={0}\n {...focusableGroupAttrs}\n className={mx(\n 'flex items-center dx-focus-ring-inset-over-all relative !border-is-0',\n orientation === 'horizontal' ? 'bs-[--rail-size]' : 'is-[--rail-size] flex-col',\n classNames,\n )}\n >\n {children}\n </div>\n );\n};\n\nexport type StackItemHeadingLabelProps = ThemedClassName<ComponentPropsWithRef<'h1'>> & AttendableId & Related;\n\nexport const StackItemHeadingLabel = forwardRef<HTMLHeadingElement, StackItemHeadingLabelProps>(\n ({ attendableId, related, classNames, ...props }, forwardedRef) => {\n const { hasAttention, isAncestor, isRelated } = useAttention(attendableId);\n return (\n <h1\n {...props}\n data-attention={((related && isRelated) || hasAttention || isAncestor).toString()}\n className={mx(\n 'pli-1 min-is-0 is-0 grow truncate font-medium text-baseText data-[attention=true]:text-accentText self-center',\n classNames,\n )}\n ref={forwardedRef}\n />\n );\n },\n);\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport { draggable } from '@atlaskit/pragmatic-drag-and-drop/element/adapter';\nimport { disableNativeDragPreview } from '@atlaskit/pragmatic-drag-and-drop/element/disable-native-drag-preview';\nimport { preventUnhandled } from '@atlaskit/pragmatic-drag-and-drop/prevent-unhandled';\nimport { type DragLocationHistory } from '@atlaskit/pragmatic-drag-and-drop/types';\nimport React, { useLayoutEffect, useRef } from 'react';\n\nimport { mx } from '@dxos/react-ui-theme';\n\nimport { useStack, useStackItem, type StackItemSize } from './StackContext';\nimport { DEFAULT_EXTRINSIC_SIZE } from './StackItem';\n\nconst REM = parseFloat(getComputedStyle(document.documentElement).fontSize);\n\nconst MIN_WIDTH = 20;\nconst MIN_HEIGHT = 3;\n\nconst measureStackItem = (element: HTMLButtonElement): { width: number; height: number } => {\n const stackItemElement = element.closest('[data-dx-stack-item]');\n return stackItemElement?.getBoundingClientRect() ?? { width: DEFAULT_EXTRINSIC_SIZE, height: DEFAULT_EXTRINSIC_SIZE };\n};\n\nconst getNextSize = (startSize: number, location: DragLocationHistory, client: 'clientX' | 'clientY') => {\n return Math.max(\n client === 'clientX' ? MIN_WIDTH : MIN_HEIGHT,\n startSize + (location.current.input[client] - location.initial.input[client]) / REM,\n );\n};\n\nexport type StackItemResizeHandleProps = {};\n\nexport const StackItemResizeHandle = () => {\n const { orientation } = useStack();\n const { setSize, size } = useStackItem();\n const buttonRef = useRef<HTMLButtonElement>(null);\n const dragStartSize = useRef<StackItemSize>(size);\n const client = orientation === 'horizontal' ? 'clientX' : 'clientY';\n\n useLayoutEffect(\n () => {\n if (!buttonRef.current || buttonRef.current.hasAttribute('draggable')) {\n return;\n }\n // TODO(thure): This should handle StackItem state vs local state better.\n draggable({\n element: buttonRef.current,\n onGenerateDragPreview: ({ nativeSetDragImage }) => {\n // We will be moving the line to indicate a drag; we can disable the native drag preview.\n disableNativeDragPreview({ nativeSetDragImage });\n // We don't want any native drop animation for when the user does not drop on a drop target.\n // We want the drag to finish immediately.\n preventUnhandled.start();\n },\n onDragStart: () => {\n dragStartSize.current =\n dragStartSize.current === 'min-content'\n ? measureStackItem(buttonRef.current!)[orientation === 'horizontal' ? 'width' : 'height'] / REM\n : dragStartSize.current;\n },\n onDrag: ({ location }) => {\n if (typeof dragStartSize.current !== 'number') {\n return;\n }\n setSize(getNextSize(dragStartSize.current, location, client));\n },\n onDrop: ({ location }) => {\n if (typeof dragStartSize.current !== 'number') {\n return;\n }\n const nextSize = getNextSize(dragStartSize.current, location, client);\n setSize(nextSize, true);\n dragStartSize.current = nextSize;\n },\n });\n },\n [\n // Note that `size` should not be a dependency here since dragging this adjusts the size.\n ],\n );\n\n return (\n <button\n ref={buttonRef}\n className={mx(\n 'group absolute',\n orientation === 'horizontal'\n ? 'cursor-col-resize is-3 bs-full inline-end-[-1px] !border-lb-0 before:inset-block-0 before:inline-end-0 before:is-1'\n : 'cursor-row-resize bs-3 is-full block-end-[-1px] !border-li-0 before:inset-inline-0 before:block-end-0 before:bs-1',\n 'before:transition-opacity before:duration-100 before:ease-in-out before:opacity-0 hover:before:opacity-100 focus-visible:before:opacity-100 active:before:opacity-100',\n 'before:absolute before:block before:bg-accentFocusIndicator',\n )}\n >\n <div\n role='none'\n className={mx(\n 'absolute flex items-center group-hover:opacity-0 group-focus-visible:opacity-0 group-active:opacity-0',\n orientation === 'horizontal'\n ? 'block-start-0 inline-end-px bs-[--rail-size]'\n : 'inline-start-0 block-end-px is-[--rail-size] flex justify-center',\n )}\n >\n <DragHandleSignifier orientation={orientation} />\n </div>\n </button>\n );\n};\n\nconst DragHandleSignifier = ({ orientation }: { orientation: 'horizontal' | 'vertical' }) => {\n return (\n <svg\n xmlns='http://www.w3.org/2000/svg'\n viewBox='0 0 256 256'\n fill='currentColor'\n className={mx('shrink-0 bs-[1em] is-[1em] text-unAccent', orientation === 'vertical' && 'rotate-90')}\n >\n {/* two pips: <path d='M256,120c-8.8,0-16-7.2-16-16v-56c0-8.8,7.2-16,16-16v88Z' />\n <path d='M256,232c-8.8,0-16-7.2-16-16v-56c0-8.8,7.2-16,16-16v88Z' /> */}\n <path d='M256,64c-8.8,0-16-7.2-16-16s7.2-16,16-16v32Z' />\n <path d='M256,120c-8.8,0-16-7.2-16-16s7.2-16,16-16v32Z' />\n <path d='M256,176c-8.8,0-16-7.2-16-16s7.2-16,16-16v32Z' />\n <path d='M256,232c-8.8,0-16-7.2-16-16s7.2-16,16-16v32Z' />\n </svg>\n );\n};\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport React, { Fragment, type PropsWithChildren, forwardRef, useRef, useState } from 'react';\n\nimport { type ActionLike } from '@dxos/app-graph';\nimport { keySymbols } from '@dxos/keyboard';\nimport { Button, type ButtonProps, DropdownMenu, Icon, toLocalizedString, useTranslation } from '@dxos/react-ui';\nimport { type AttendableId, type Related, useAttention } from '@dxos/react-ui-attention';\nimport { descriptionText, mx } from '@dxos/react-ui-theme';\nimport { getHostPlatform } from '@dxos/util';\n\nimport { MenuSignifierHorizontal } from './MenuSignifier';\nimport { translationKey } from '../translations';\n\nexport type KeyBinding = {\n windows?: string;\n macos?: string;\n ios?: string;\n linux?: string;\n unknown?: string;\n};\n\nexport type StackItemSigilAction = Pick<ActionLike, 'id' | 'properties' | 'data'>;\n\nexport type StackItemSigilButtonProps = Omit<ButtonProps, 'variant'> & AttendableId & Related;\n\nexport const StackItemSigilButton = forwardRef<HTMLButtonElement, StackItemSigilButtonProps>(\n ({ attendableId, classNames, related, children, ...props }, forwardedRef) => {\n const { hasAttention, isAncestor, isRelated } = useAttention(attendableId);\n const variant = (related && isRelated) || hasAttention || isAncestor ? 'primary' : 'ghost';\n return (\n <Button\n {...props}\n variant={variant}\n classNames={['shrink-0 pli-0 min-bs-0 is-[--rail-action] bs-[--rail-action] relative app-no-drag', classNames]}\n ref={forwardedRef}\n >\n <MenuSignifierHorizontal />\n {children}\n </Button>\n );\n },\n);\n\nexport type StackItemSigilProps = PropsWithChildren<\n {\n attendableId?: string;\n triggerLabel: string;\n actions?: StackItemSigilAction[][];\n icon: string;\n onAction?: (action: StackItemSigilAction) => void;\n } & Related\n>;\n\nexport const StackItemSigil = forwardRef<HTMLButtonElement, StackItemSigilProps>(\n ({ actions: actionGroups, onAction, triggerLabel, attendableId, icon, related, children }, forwardedRef) => {\n const { t } = useTranslation(translationKey);\n const suppressNextTooltip = useRef(false);\n\n const [optionsMenuOpen, setOptionsMenuOpen] = useState(false);\n\n const hasActions = actionGroups && actionGroups.length > 0;\n\n const button = (\n <StackItemSigilButton\n attendableId={attendableId}\n related={related}\n // TODO(wittjosiah): Better disabling of interactive styles when no action are available.\n // Remove underscore icon when no actions are available?\n classNames={!hasActions && 'cursor-default'}\n >\n <span className='sr-only'>{triggerLabel}</span>\n <Icon icon={icon} size={5} />\n </StackItemSigilButton>\n );\n\n if (!hasActions) {\n return button;\n }\n\n return (\n <DropdownMenu.Root\n {...{\n open: optionsMenuOpen,\n onOpenChange: (nextOpen: boolean) => {\n if (!nextOpen) {\n suppressNextTooltip.current = true;\n }\n return setOptionsMenuOpen(nextOpen);\n },\n }}\n >\n <DropdownMenu.Trigger asChild ref={forwardedRef}>\n {button}\n </DropdownMenu.Trigger>\n <DropdownMenu.Portal>\n <DropdownMenu.Content classNames='z-[31]'>\n <DropdownMenu.Viewport>\n {actionGroups?.map((actions, index) => {\n const separator = index > 0 ? <DropdownMenu.Separator /> : null;\n return (\n <Fragment key={index}>\n {separator}\n {actions.map((action) => {\n const shortcut =\n typeof action.properties.keyBinding === 'string'\n ? action.properties.keyBinding\n : action.properties.keyBinding?.[getHostPlatform()];\n\n const menuItemType = action.properties.menuItemType;\n const Root = menuItemType === 'toggle' ? DropdownMenu.CheckboxItem : DropdownMenu.Item;\n\n return (\n <Root\n key={action.id}\n onClick={(event) => {\n if (action.properties.disabled) {\n return;\n }\n event.stopPropagation();\n // TODO(thure): Why does Dialog’s modal-ness cause issues if we don’t explicitly close the menu here?\n suppressNextTooltip.current = true;\n setOptionsMenuOpen(false);\n onAction?.(action);\n }}\n classNames='gap-2'\n disabled={action.properties.disabled}\n checked={menuItemType === 'toggle' ? action.properties.isChecked : undefined}\n {...(action.properties?.testId && { 'data-testid': action.properties.testId })}\n >\n <Icon icon={action.properties.icon ?? 'ph--placeholder--regular'} size={4} />\n <span className='grow truncate'>{toLocalizedString(action.properties.label ?? '', t)}</span>\n {menuItemType === 'toggle' && (\n <DropdownMenu.ItemIndicator asChild>\n <Icon icon='ph--check--regular' size={4} />\n </DropdownMenu.ItemIndicator>\n )}\n {shortcut && (\n <span className={mx('shrink-0', descriptionText)}>{keySymbols(shortcut).join('')}</span>\n )}\n </Root>\n );\n })}\n </Fragment>\n );\n })}\n {children}\n </DropdownMenu.Viewport>\n <DropdownMenu.Arrow />\n </DropdownMenu.Content>\n </DropdownMenu.Portal>\n </DropdownMenu.Root>\n );\n },\n);\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport React from 'react';\n\nexport const MenuSignifierHorizontal = () => (\n <svg\n className='absolute block-end-[7px]'\n width={20}\n height={2}\n viewBox='0 0 20 2'\n stroke='currentColor'\n opacity={0.5}\n >\n <line\n x1={0.5}\n y1={0.75}\n x2={19}\n y2={0.75}\n strokeWidth={1.25}\n strokeLinecap='round'\n strokeDasharray='6 20'\n strokeDashoffset='-6.5'\n />\n </svg>\n);\n\nexport const MenuSignifierVertical = () => (\n <svg className='absolute inline-start-1' width={2} height={18} viewBox='0 0 2 18' stroke='currentColor'>\n <line x1={1} y1={3} x2={1} y2={18} strokeWidth={1.5} strokeLinecap='round' strokeDasharray='0 6' />\n </svg>\n);\n", "//\n// Copyright 2023 DXOS.org\n//\n\nexport const translationKey = 'stack';\n\nexport default [\n {\n 'en-US': {\n [translationKey]: {\n 'resize label': 'Drag to resize',\n 'pin start label': 'Pin to the left sidebar',\n 'pin end label': 'Pin to the right sidebar',\n 'increment start label': 'Move to the left',\n 'increment end label': 'Move to the right',\n 'close label': 'Close',\n 'minify label': 'Minify',\n },\n },\n },\n];\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport React, { forwardRef } from 'react';\n\nimport {\n Button,\n ButtonGroup,\n type ButtonGroupProps,\n type ButtonProps,\n Icon,\n Tooltip,\n useTranslation,\n} from '@dxos/react-ui';\n\nimport { translationKey } from '../translations';\n\nexport type LayoutControlEvent = 'solo' | 'close' | `${'pin' | 'increment'}-${'start' | 'end'}`;\nexport type LayoutControlHandler = (event: LayoutControlEvent) => void;\n\nexport type LayoutCapabilities = {\n incrementStart?: boolean;\n incrementEnd?: boolean;\n solo?: boolean;\n};\n\nexport type LayoutControlsProps = Omit<ButtonGroupProps, 'onClick'> & {\n onClick?: LayoutControlHandler;\n variant?: 'hide-disabled' | 'default';\n close?: boolean | 'minify-start' | 'minify-end';\n capabilities: LayoutCapabilities;\n isSolo?: boolean;\n pin?: 'start' | 'end' | 'both';\n};\n\nconst LayoutControl = ({ icon, label, ...props }: Omit<ButtonProps, 'children'> & { label: string; icon: string }) => {\n return (\n <Tooltip.Root>\n <Tooltip.Trigger asChild>\n <Button variant='ghost' {...props}>\n <span className='sr-only'>{label}</span>\n <Icon icon={icon} />\n </Button>\n </Tooltip.Trigger>\n <Tooltip.Portal>\n <Tooltip.Content side='bottom'>{label}</Tooltip.Content>\n </Tooltip.Portal>\n </Tooltip.Root>\n );\n};\n\nexport const LayoutControls = forwardRef<HTMLDivElement, LayoutControlsProps>(\n (\n { onClick, variant = 'default', capabilities: can, isSolo, pin, close = false, children, ...props },\n forwardedRef,\n ) => {\n const { t } = useTranslation(translationKey);\n const buttonClassNames = variant === 'hide-disabled' ? 'disabled:hidden !p-1' : '!p-1';\n\n return (\n <ButtonGroup {...props} ref={forwardedRef}>\n {pin && !isSolo && ['both', 'start'].includes(pin) && (\n <LayoutControl\n label={t('pin start label')}\n variant='ghost'\n classNames={buttonClassNames}\n onClick={() => onClick?.('pin-start')}\n icon='ph--caret-line-left--regular'\n />\n )}\n\n {can.solo && (\n <LayoutControl\n label={t('solo layout label')}\n classNames={buttonClassNames}\n onClick={() => onClick?.('solo')}\n icon={isSolo ? 'ph--arrows-in--regular' : 'ph--arrows-out--regular'}\n />\n )}\n\n {!isSolo && can.solo && (\n <>\n <LayoutControl\n label={t('increment start label')}\n disabled={!can.incrementStart}\n classNames={buttonClassNames}\n onClick={() => onClick?.('increment-start')}\n icon='ph--caret-left--regular'\n />\n <LayoutControl\n label={t('increment end label')}\n disabled={!can.incrementEnd}\n classNames={buttonClassNames}\n onClick={() => onClick?.('increment-end')}\n icon='ph--caret-right--regular'\n />\n </>\n )}\n\n {pin && !isSolo && ['both', 'end'].includes(pin) && (\n <LayoutControl\n label={t('pin end label')}\n classNames={buttonClassNames}\n onClick={() => onClick?.('pin-end')}\n icon='ph--caret-line-right--regular'\n />\n )}\n\n {close && !isSolo && (\n <LayoutControl\n label={t(`${typeof close === 'string' ? 'minify' : 'close'} label`)}\n classNames={buttonClassNames}\n onClick={() => onClick?.('close')}\n data-testid='layoutHeading.close'\n icon={\n close === 'minify-start'\n ? 'ph--caret-line-left--regular'\n : close === 'minify-end'\n ? 'ph--caret-line-right--regular'\n : 'ph--x--regular'\n }\n />\n )}\n {children}\n </ButtonGroup>\n );\n },\n);\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA,qBAAwB;AACxB,qBAAsC;AACtC,qBAAsC;AACtC,0BAAsD;AACtD,2BAAwC;AACxC,gCAA4B;AAC5B,mBAOO;AAEP,sBAA+C;AAC/C,4BAAmB;ACdnB,IAAAA,gBAA0C;ACD1C,IAAAC,kBAAwB;AACxB,IAAAC,kBAAiD;AACjD,uCAAuC;AACvC,0CAAyC;AACzC,IAAAC,uBAIO;AACP,IAAAC,wBAAkC;AAClC,IAAAC,6BAA4B;AAC5B,IAAAL,gB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AAAA,QAAA,cAAC+L,eAAAA;IACC5C,OAAOxC,EAAE,mBAAA;IACTpJ,YAAYiP;IACZ9D,SAAS,MAAMA,UAAU,MAAA;IACzBhC,MAAM2F,SAAS,2BAA2B;MAI7C,CAACA,UAAUD,IAAIO,QACd3M,+BAAAA,QAAA,cAAAA,eAAAA,QAAA,UAAA,MACEA,+BAAAA,QAAA,cAAC+L,eAAAA;IACC5C,OAAOxC,EAAE,uBAAA;IACTiC,UAAU,CAACwD,IAAIQ;IACfrP,YAAYiP;IACZ9D,SAAS,MAAMA,UAAU,iBAAA;IACzBhC,MAAK;MAEP1G,+BAAAA,QAAA,cAAC+L,eAAAA;IACC5C,OAAOxC,EAAE,qBAAA;IACTiC,UAAU,CAACwD,IAAIS;IACftP,YAAYiP;IACZ9D,SAAS,MAAMA,UAAU,eAAA;IACzBhC,MAAK;OAKV4F,OAAO,CAACD,UAAU;IAAC;IAAQ;IAAOK,SAASJ,GAAAA,KAC1CtM,+BAAAA,QAAA,cAAC+L,eAAAA;IACC5C,OAAOxC,EAAE,eAAA;IACTpJ,YAAYiP;IACZ9D,SAAS,MAAMA,UAAU,SAAA;IACzBhC,MAAK;MAIR6F,SAAS,CAACF,UACTrM,+BAAAA,QAAA,cAAC+L,eAAAA;IACC5C,OAAOxC,EAAE,GAAG,OAAO4F,UAAU,WAAW,WAAW,OAAA,QAAe;IAClEhP,YAAYiP;IACZ9D,SAAS,MAAMA,UAAU,OAAA;IACzBoE,eAAY;IACZpG,MACE6F,UAAU,iBACN,iCACAA,UAAU,eACR,kCACA;MAIXjP,QAAAA;AAGP,CAAA;",
|
|
6
|
-
"names": ["import_react", "import_combine", "import_adapter", "import_closest_edge", "import_react_tabster", "import_react_compose_refs", "import_react_ui", "import_react_ui_theme", "import_react_ui_attention", "StackContext", "createContext", "orientation", "rail", "size", "useStack", "useContext", "StackItemContext", "selfDragHandleRef", "setSize", "useStackItem", "
|
|
3
|
+
"sources": ["../../../src/components/Stack.tsx", "../../../src/components/StackContext.tsx", "../../../src/hooks/useStackDropForElements.ts", "../../../src/components/StackItem.tsx", "../../../src/components/StackItemContent.tsx", "../../../src/components/StackItemDragHandle.tsx", "../../../src/components/StackItemHeading.tsx", "../../../src/components/StackItemResizeHandle.tsx", "../../../src/components/StackItemSigil.tsx", "../../../src/components/MenuSignifier.tsx", "../../../src/translations.ts", "../../../src/components/LayoutControls.tsx"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { useArrowNavigationGroup } from '@fluentui/react-tabster';\nimport { composeRefs } from '@radix-ui/react-compose-refs';\nimport React, { Children, type CSSProperties, type ComponentPropsWithRef, forwardRef, useState, useMemo } from 'react';\n\nimport { type ThemedClassName, ListItem } from '@dxos/react-ui';\nimport { mx } from '@dxos/react-ui-theme';\n\nimport { type StackContextValue, StackContext } from './StackContext';\nimport { useStackDropForElements } from '../hooks';\n\nexport type Orientation = 'horizontal' | 'vertical';\nexport type Size = 'intrinsic' | 'contain' | 'contain-fit-content';\n\nexport type StackProps = Omit<ThemedClassName<ComponentPropsWithRef<'div'>>, 'aria-orientation'> &\n Partial<StackContextValue> & { itemsCount?: number };\n\nexport const railGridHorizontal = 'grid-rows-[[rail-start]_var(--rail-size)_[content-start]_1fr_[content-end]]';\nexport const railGridVertical = 'grid-cols-[[rail-start]_var(--rail-size)_[content-start]_1fr_[content-end]]';\n\n// TODO(ZaymonFC): Magic 2px to stop overflow (tabster dummies... ask @thure).\nexport const railGridHorizontalContainFitContent =\n 'grid-rows-[[rail-start]_var(--rail-size)_[content-start]_fit-content(calc(100%-var(--rail-size)*2+2px))_[content-end]]';\nexport const railGridVerticalContainFitContent =\n 'grid-cols-[[rail-start]_var(--rail-size)_[content-start]_fit-content(calc(100%-var(--rail-size)*2+2px))_[content-end]]';\n\nexport const autoScrollRootAttributes = { 'data-drag-autoscroll': 'idle' };\n\nexport const Stack = forwardRef<HTMLDivElement, StackProps>(\n (\n {\n children,\n classNames,\n style,\n orientation = 'vertical',\n rail = true,\n size = 'intrinsic',\n onRearrange,\n itemsCount = Children.count(children),\n ...props\n },\n forwardedRef,\n ) => {\n const [stackElement, stackRef] = useState<HTMLDivElement | null>(null);\n const composedItemRef = composeRefs<HTMLDivElement>(stackRef, forwardedRef);\n const arrowNavigationGroup = useArrowNavigationGroup({ axis: orientation });\n\n const styles: CSSProperties = {\n [orientation === 'horizontal' ? 'gridTemplateColumns' : 'gridTemplateRows']:\n `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: stackElement,\n selfDroppable,\n orientation,\n onRearrange,\n });\n\n const gridClasses = useMemo(() => {\n if (!rail) {\n return orientation === 'horizontal' ? 'grid-rows-1 pli-1' : 'grid-cols-1 plb-1';\n }\n if (orientation === 'horizontal') {\n return size === 'contain-fit-content' ? railGridHorizontalContainFitContent : railGridHorizontal;\n } else {\n return size === 'contain-fit-content' ? railGridVerticalContainFitContent : railGridVertical;\n }\n }, [rail, orientation, size]);\n\n return (\n <StackContext.Provider value={{ orientation, rail, size, onRearrange }}>\n <div\n {...props}\n {...arrowNavigationGroup}\n className={mx(\n 'grid relative',\n gridClasses,\n (size === 'contain' || size === 'contain-fit-content') &&\n (orientation === 'horizontal'\n ? 'overflow-x-auto min-bs-0 bs-full max-bs-full'\n : 'overflow-y-auto min-is-0 is-full max-is-full'),\n classNames,\n )}\n data-rail={rail}\n aria-orientation={orientation}\n style={styles}\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 };\nexport type { StackContextValue };\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport type { Edge } from '@atlaskit/pragmatic-drag-and-drop-hitbox/closest-edge';\nimport { createContext, useContext } from 'react';\n\nimport { type Size as DndSize } from '@dxos/react-ui-dnd';\n\nimport { type Orientation, type Size } from './Stack';\n\nexport type StackItemSize = DndSize;\n\nexport type StackItemData = { id: string; type: 'column' | 'card' };\n\nexport type StackItemRearrangeHandler = (\n source: StackItemData,\n target: StackItemData,\n closestEdge: Edge | null,\n) => void;\n\nexport type StackContextValue = {\n orientation: Orientation;\n rail: boolean;\n size: Size;\n onRearrange?: StackItemRearrangeHandler;\n};\n\nexport const StackContext = createContext<StackContextValue>({\n orientation: 'vertical',\n rail: true,\n size: 'intrinsic',\n});\n\nexport const useStack = () => useContext(StackContext);\n\nexport type StackItemContextValue = {\n selfDragHandleRef: (element: HTMLDivElement | null) => void;\n size: StackItemSize;\n setSize: (nextSize: StackItemSize, commit?: boolean) => void;\n};\n\nexport const StackItemContext = createContext<StackItemContextValue>({\n selfDragHandleRef: () => {},\n size: 'min-content',\n setSize: () => {},\n});\n\nexport const useStackItem = () => useContext(StackItemContext);\n", "//\n// Copyright 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 } from '../components/Stack';\nimport { type StackItemRearrangeHandler, type StackItemData } from '../components/StackContext';\n\n/**\n * Hook to handle drag and drop functionality for Stack components.\n */\nexport const useStackDropForElements = ({\n element,\n selfDroppable,\n orientation,\n id,\n onRearrange,\n}: {\n element: HTMLDivElement | null;\n selfDroppable: boolean;\n orientation: Orientation;\n id?: string;\n onRearrange?: StackItemRearrangeHandler;\n}) => {\n const [dropping, setDropping] = useState(false);\n\n useLayoutEffect(() => {\n if (!element || !selfDroppable) {\n return;\n }\n\n const acceptSourceType = orientation === 'horizontal' ? 'column' : 'card';\n\n return combine(\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 autoScrollForElements({ element, getAllowedAxis: () => orientation }),\n );\n }, [element, selfDroppable, orientation, id, onRearrange]);\n\n return { dropping };\n};\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport { combine } from '@atlaskit/pragmatic-drag-and-drop/combine';\nimport { draggable, dropTargetForElements } from '@atlaskit/pragmatic-drag-and-drop/element/adapter';\nimport { preserveOffsetOnSource } from '@atlaskit/pragmatic-drag-and-drop/element/preserve-offset-on-source';\nimport { scrollJustEnoughIntoView } from '@atlaskit/pragmatic-drag-and-drop/element/scroll-just-enough-into-view';\nimport {\n attachClosestEdge,\n extractClosestEdge,\n type Edge,\n} from '@atlaskit/pragmatic-drag-and-drop-hitbox/closest-edge';\nimport { useFocusableGroup } from '@fluentui/react-tabster';\nimport { composeRefs } from '@radix-ui/react-compose-refs';\nimport React, { forwardRef, useLayoutEffect, useState, type ComponentPropsWithRef, useCallback } from 'react';\n\nimport { type ThemedClassName, ListItem } from '@dxos/react-ui';\nimport { resizeAttributes, sizeStyle } from '@dxos/react-ui-dnd';\nimport { mx } from '@dxos/react-ui-theme';\n\nimport { useStack, StackItemContext, type StackItemSize, type StackItemData } from './StackContext';\nimport { StackItemContent, type StackItemContentProps } from './StackItemContent';\nimport { StackItemDragHandle, type StackItemDragHandleProps } from './StackItemDragHandle';\nimport {\n StackItemHeading,\n StackItemHeadingLabel,\n type StackItemHeadingProps,\n type StackItemHeadingLabelProps,\n} from './StackItemHeading';\nimport { StackItemResizeHandle, type StackItemResizeHandleProps } from './StackItemResizeHandle';\nimport {\n StackItemSigil,\n type StackItemSigilProps,\n type StackItemSigilAction,\n type StackItemSigilButtonProps,\n StackItemSigilButton,\n} from './StackItemSigil';\n\nexport const DEFAULT_HORIZONTAL_SIZE = 44 satisfies StackItemSize;\nexport const DEFAULT_VERTICAL_SIZE = 'min-content' satisfies StackItemSize;\nexport const DEFAULT_EXTRINSIC_SIZE = DEFAULT_HORIZONTAL_SIZE satisfies StackItemSize;\n\nexport type StackItemRootProps = ThemedClassName<ComponentPropsWithRef<'div'>> & {\n item: Omit<StackItemData, 'type'>;\n order?: number;\n size?: StackItemSize;\n onSizeChange?: (nextSize: StackItemSize) => void;\n role?: 'article' | 'section';\n disableRearrange?: boolean;\n focusIndicatorVariant?: 'over-all' | 'group';\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 style,\n disableRearrange,\n focusIndicatorVariant = 'over-all',\n ...props\n },\n forwardedRef,\n ) => {\n const [itemElement, itemRef] = useState<HTMLDivElement | null>(null);\n const [selfDragHandleElement, selfDragHandleRef] = useState<HTMLDivElement | null>(null);\n const [closestEdge, setEdge] = useState<Edge | null>(null);\n const { orientation, rail, onRearrange } = useStack();\n const [size = orientation === 'horizontal' ? DEFAULT_HORIZONTAL_SIZE : DEFAULT_VERTICAL_SIZE, setInternalSize] =\n useState(propsSize);\n\n const Root = role ?? 'div';\n\n const composedItemRef = composeRefs<HTMLDivElement>(itemRef, forwardedRef);\n\n const setSize = useCallback(\n (nextSize: StackItemSize, commit?: boolean) => {\n setInternalSize(nextSize);\n if (commit) {\n onSizeChange?.(nextSize);\n }\n },\n [onSizeChange],\n );\n\n const type = orientation === 'horizontal' ? 'column' : 'card';\n\n useLayoutEffect(() => {\n if (!itemElement || !onRearrange || disableRearrange) {\n return;\n }\n return combine(\n draggable({\n element: itemElement,\n ...(selfDragHandleElement && { dragHandle: selfDragHandleElement }),\n getInitialData: () => ({ id: item.id, type }),\n onGenerateDragPreview: ({ nativeSetDragImage, source, location }) => {\n document.body.setAttribute('data-drag-preview', 'true');\n scrollJustEnoughIntoView({ element: source.element });\n const { x, y } = preserveOffsetOnSource({ element: source.element, input: location.current.input })({\n container: (source.element.offsetParent ?? document.body) as HTMLElement,\n });\n nativeSetDragImage?.(source.element, x, y);\n },\n onDragStart: () => {\n document.body.removeAttribute('data-drag-preview');\n itemElement?.closest('[data-drag-autoscroll]')?.setAttribute('data-drag-autoscroll', 'active');\n },\n onDrop: () => {\n itemElement?.closest('[data-drag-autoscroll]')?.setAttribute('data-drag-autoscroll', '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 }\n },\n onDrag: ({ self, source }) => {\n if (source.data.type === self.data.type) {\n setEdge(extractClosestEdge(self.data));\n }\n },\n onDragLeave: () => setEdge(null),\n onDrop: ({ self, source }) => {\n setEdge(null);\n if (source.data.type === self.data.type) {\n onRearrange(source.data as StackItemData, self.data as StackItemData, extractClosestEdge(self.data));\n }\n },\n }),\n );\n }, [orientation, item, onRearrange, selfDragHandleElement, itemElement]);\n\n const focusGroupAttrs = useFocusableGroup({ tabBehavior: 'limited' });\n\n return (\n <StackItemContext.Provider value={{ selfDragHandleRef, size, setSize }}>\n <Root\n {...props}\n tabIndex={0}\n {...focusGroupAttrs}\n className={mx(\n 'group/stack-item grid relative',\n focusIndicatorVariant === 'over-all'\n ? 'dx-focus-ring-inset-over-all'\n : orientation === 'horizontal'\n ? 'dx-focus-ring-group-x'\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 classNames,\n )}\n data-dx-stack-item\n {...resizeAttributes}\n style={{\n ...sizeStyle(size, orientation),\n ...(Number.isFinite(order) && {\n [orientation === 'horizontal' ? 'gridColumn' : 'gridRow']: `${order}`,\n }),\n ...style,\n }}\n ref={composedItemRef}\n >\n {children}\n {closestEdge && <ListItem.DropIndicator lineInset={8} terminalInset={-8} edge={closestEdge} />}\n </Root>\n </StackItemContext.Provider>\n );\n },\n);\n\nexport const StackItem = {\n Root: StackItemRoot,\n Content: StackItemContent,\n Heading: StackItemHeading,\n HeadingLabel: StackItemHeadingLabel,\n ResizeHandle: StackItemResizeHandle,\n DragHandle: StackItemDragHandle,\n Sigil: StackItemSigil,\n SigilButton: StackItemSigilButton,\n};\n\nexport type {\n StackItemContentProps,\n StackItemHeadingProps,\n StackItemHeadingLabelProps,\n StackItemResizeHandleProps,\n StackItemDragHandleProps,\n StackItemSigilProps,\n StackItemSigilButtonProps,\n StackItemSigilAction,\n};\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport React, { type ComponentPropsWithoutRef, forwardRef } from 'react';\n\nimport { type ThemedClassName } from '@dxos/react-ui';\nimport { mx } from '@dxos/react-ui-theme';\n\nimport { useStack } from './StackContext';\n\nexport type StackItemContentProps = ThemedClassName<ComponentPropsWithoutRef<'div'>> & {\n /**\n * This flag is required in order to clarify a developer experience that seemed like it needed extra boilerplate\n * (`row-span-2`) or was buggy. See the description of the StackItem.Content component itself for more information.\n */\n toolbar: boolean;\n\n /**\n * Whether to provide for the layout of a statusbar after the content.\n */\n statusbar?: boolean;\n\n /**\n * Whether to set a certain aspect ratio on the content, including the toolbar and statusbar. This is provided for\n * convenience and consistency; it can instead be specified by the `classNames` or `style` props as needed.\n */\n size?: 'intrinsic' | 'video' | 'square';\n};\n\n/**\n * This component should be used by plugins for rendering content within a stack item, a.k.a. a “plank” or “section”.\n * The `toolbar` flag must be provided since this component provides for the layout of content with the toolbar.\n */\nexport const StackItemContent = forwardRef<HTMLDivElement, StackItemContentProps>(\n ({ children, toolbar, statusbar, classNames, size = 'intrinsic', ...props }, forwardedRef) => {\n const { size: stackItemSize } = useStack();\n\n return (\n <div\n role='none'\n {...props}\n className={mx(\n 'group grid grid-cols-[100%]',\n stackItemSize === 'contain' && 'min-bs-0 overflow-hidden',\n size === 'video' ? 'aspect-video' : size === 'square' && 'aspect-square',\n classNames,\n )}\n style={{\n gridTemplateRows: [\n ...(toolbar ? ['var(--rail-action)'] : []),\n '1fr',\n ...(statusbar ? ['var(--statusbar-size)'] : []),\n ].join(' '),\n }}\n ref={forwardedRef}\n >\n {children}\n </div>\n );\n },\n);\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport { Slot } from '@radix-ui/react-slot';\nimport React, { type ComponentPropsWithoutRef } from 'react';\n\nimport { useStackItem } from './StackContext';\n\nexport type StackItemDragHandleProps = ComponentPropsWithoutRef<'button'> & { asChild: boolean };\n\nexport const StackItemDragHandle = ({ asChild, children }: StackItemDragHandleProps) => {\n const { selfDragHandleRef } = useStackItem();\n\n const Root = asChild ? Slot : 'div';\n\n return (\n <Root ref={selfDragHandleRef} role='button'>\n {children}\n </Root>\n );\n};\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport { useFocusableGroup } from '@fluentui/react-tabster';\nimport React, { type ComponentPropsWithoutRef, type ComponentPropsWithRef, forwardRef } from 'react';\n\nimport { type ThemedClassName } from '@dxos/react-ui';\nimport { useAttention, type AttendableId, type Related } from '@dxos/react-ui-attention';\nimport { mx } from '@dxos/react-ui-theme';\n\nimport { useStack } from './StackContext';\n\nexport type StackItemHeadingProps = ThemedClassName<ComponentPropsWithoutRef<'div'>>;\n\nexport const StackItemHeading = ({ children, classNames, ...props }: StackItemHeadingProps) => {\n const { orientation } = useStack();\n const focusableGroupAttrs = useFocusableGroup({ tabBehavior: 'limited' });\n return (\n <div\n role='heading'\n {...props}\n tabIndex={0}\n {...focusableGroupAttrs}\n className={mx(\n 'flex items-center dx-focus-ring-inset-over-all relative !border-is-0',\n orientation === 'horizontal' ? 'bs-[--rail-size]' : 'is-[--rail-size] flex-col',\n classNames,\n )}\n >\n {children}\n </div>\n );\n};\n\nexport type StackItemHeadingLabelProps = ThemedClassName<ComponentPropsWithRef<'h1'>> & AttendableId & Related;\n\nexport const StackItemHeadingLabel = forwardRef<HTMLHeadingElement, StackItemHeadingLabelProps>(\n ({ attendableId, related, classNames, ...props }, forwardedRef) => {\n const { hasAttention, isAncestor, isRelated } = useAttention(attendableId);\n return (\n <h1\n {...props}\n data-attention={((related && isRelated) || hasAttention || isAncestor).toString()}\n className={mx(\n 'pli-1 min-is-0 is-0 grow truncate font-medium text-baseText data-[attention=true]:text-accentText self-center',\n classNames,\n )}\n ref={forwardedRef}\n />\n );\n },\n);\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport 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 = () => {\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, useRef, useState } from 'react';\n\nimport { type ActionLike } from '@dxos/app-graph';\nimport { keySymbols } from '@dxos/keyboard';\nimport { Button, type ButtonProps, DropdownMenu, Icon, toLocalizedString, useTranslation } from '@dxos/react-ui';\nimport { type AttendableId, type Related, useAttention } from '@dxos/react-ui-attention';\nimport { descriptionText, mx } from '@dxos/react-ui-theme';\nimport { getHostPlatform } from '@dxos/util';\n\nimport { MenuSignifierHorizontal } from './MenuSignifier';\nimport { translationKey } from '../translations';\n\nexport type KeyBinding = {\n windows?: string;\n macos?: string;\n ios?: string;\n linux?: string;\n unknown?: string;\n};\n\nexport type StackItemSigilAction = Pick<ActionLike, 'id' | 'properties' | 'data'>;\n\nexport type StackItemSigilButtonProps = Omit<ButtonProps, 'variant'> & AttendableId & Related;\n\nexport const StackItemSigilButton = forwardRef<HTMLButtonElement, StackItemSigilButtonProps>(\n ({ attendableId, classNames, related, children, ...props }, forwardedRef) => {\n const { hasAttention, isAncestor, isRelated } = useAttention(attendableId);\n const variant = (related && isRelated) || hasAttention || isAncestor ? 'primary' : 'ghost';\n return (\n <Button\n {...props}\n variant={variant}\n classNames={['shrink-0 pli-0 min-bs-0 is-[--rail-action] bs-[--rail-action] relative app-no-drag', classNames]}\n ref={forwardedRef}\n >\n <MenuSignifierHorizontal />\n {children}\n </Button>\n );\n },\n);\n\nexport type StackItemSigilProps = PropsWithChildren<\n {\n attendableId?: string;\n triggerLabel: string;\n actions?: StackItemSigilAction[][];\n icon: string;\n onAction?: (action: StackItemSigilAction) => void;\n } & Related\n>;\n\nexport const StackItemSigil = forwardRef<HTMLButtonElement, StackItemSigilProps>(\n ({ actions: actionGroups, onAction, triggerLabel, attendableId, icon, related, children }, forwardedRef) => {\n const { t } = useTranslation(translationKey);\n const suppressNextTooltip = useRef(false);\n\n const [optionsMenuOpen, setOptionsMenuOpen] = useState(false);\n\n const hasActions = actionGroups && actionGroups.length > 0;\n\n const button = (\n <StackItemSigilButton\n attendableId={attendableId}\n related={related}\n // TODO(wittjosiah): Better disabling of interactive styles when no action are available.\n // Remove underscore icon when no actions are available?\n classNames={!hasActions && 'cursor-default'}\n >\n <span className='sr-only'>{triggerLabel}</span>\n <Icon icon={icon} size={5} />\n </StackItemSigilButton>\n );\n\n if (!hasActions) {\n return button;\n }\n\n return (\n <DropdownMenu.Root\n {...{\n open: optionsMenuOpen,\n onOpenChange: (nextOpen: boolean) => {\n if (!nextOpen) {\n suppressNextTooltip.current = true;\n }\n return setOptionsMenuOpen(nextOpen);\n },\n }}\n >\n <DropdownMenu.Trigger asChild ref={forwardedRef}>\n {button}\n </DropdownMenu.Trigger>\n <DropdownMenu.Portal>\n <DropdownMenu.Content classNames='z-[31]'>\n <DropdownMenu.Viewport>\n {actionGroups?.map((actions, index) => {\n const separator = index > 0 ? <DropdownMenu.Separator /> : null;\n return (\n <Fragment key={index}>\n {separator}\n {actions.map((action) => {\n const shortcut =\n typeof action.properties.keyBinding === 'string'\n ? action.properties.keyBinding\n : action.properties.keyBinding?.[getHostPlatform()];\n\n const menuItemType = action.properties.menuItemType;\n const Root = menuItemType === 'toggle' ? DropdownMenu.CheckboxItem : DropdownMenu.Item;\n\n return (\n <Root\n key={action.id}\n onClick={(event) => {\n if (action.properties.disabled) {\n return;\n }\n event.stopPropagation();\n // TODO(thure): Why does Dialog’s modal-ness cause issues if we don’t explicitly close the menu here?\n suppressNextTooltip.current = true;\n setOptionsMenuOpen(false);\n onAction?.(action);\n }}\n classNames='gap-2'\n disabled={action.properties.disabled}\n checked={menuItemType === 'toggle' ? action.properties.isChecked : undefined}\n {...(action.properties?.testId && { 'data-testid': action.properties.testId })}\n >\n <Icon icon={action.properties.icon ?? 'ph--placeholder--regular'} size={4} />\n <span className='grow truncate'>{toLocalizedString(action.properties.label ?? '', t)}</span>\n {menuItemType === 'toggle' && (\n <DropdownMenu.ItemIndicator asChild>\n <Icon icon='ph--check--regular' size={4} />\n </DropdownMenu.ItemIndicator>\n )}\n {shortcut && (\n <span className={mx('shrink-0', descriptionText)}>{keySymbols(shortcut).join('')}</span>\n )}\n </Root>\n );\n })}\n </Fragment>\n );\n })}\n {children}\n </DropdownMenu.Viewport>\n <DropdownMenu.Arrow />\n </DropdownMenu.Content>\n </DropdownMenu.Portal>\n </DropdownMenu.Root>\n );\n },\n);\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport React from 'react';\n\nexport const MenuSignifierHorizontal = () => (\n <svg\n className='absolute block-end-[7px]'\n width={20}\n height={2}\n viewBox='0 0 20 2'\n stroke='currentColor'\n opacity={0.5}\n >\n <line\n x1={0.5}\n y1={0.75}\n x2={19}\n y2={0.75}\n strokeWidth={1.25}\n strokeLinecap='round'\n strokeDasharray='6 20'\n strokeDashoffset='-6.5'\n />\n </svg>\n);\n\nexport const MenuSignifierVertical = () => (\n <svg className='absolute inline-start-1' width={2} height={18} viewBox='0 0 2 18' stroke='currentColor'>\n <line x1={1} y1={3} x2={1} y2={18} strokeWidth={1.5} strokeLinecap='round' strokeDasharray='0 6' />\n </svg>\n);\n", "//\n// Copyright 2023 DXOS.org\n//\n\nexport const translationKey = 'stack';\n\nexport default [\n {\n 'en-US': {\n [translationKey]: {\n 'resize label': 'Drag to resize',\n 'pin start label': 'Pin to the left sidebar',\n 'pin end label': 'Pin to the right sidebar',\n 'increment start label': 'Move to the left',\n 'increment end label': 'Move to the right',\n 'close label': 'Close',\n 'minify label': 'Minify',\n },\n },\n },\n];\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport React, { forwardRef } from 'react';\n\nimport {\n Button,\n ButtonGroup,\n type ButtonGroupProps,\n type ButtonProps,\n Icon,\n Tooltip,\n useTranslation,\n} from '@dxos/react-ui';\n\nimport { translationKey } from '../translations';\n\nexport type LayoutControlEvent = 'solo' | 'close' | `${'pin' | 'increment'}-${'start' | 'end'}`;\nexport type LayoutControlHandler = (event: LayoutControlEvent) => void;\n\nexport type LayoutCapabilities = {\n incrementStart?: boolean;\n incrementEnd?: boolean;\n solo?: boolean;\n};\n\nexport type LayoutControlsProps = Omit<ButtonGroupProps, 'onClick'> & {\n onClick?: LayoutControlHandler;\n variant?: 'hide-disabled' | 'default';\n close?: boolean | 'minify-start' | 'minify-end';\n capabilities: LayoutCapabilities;\n isSolo?: boolean;\n pin?: 'start' | 'end' | 'both';\n};\n\nconst LayoutControl = ({ icon, label, ...props }: Omit<ButtonProps, 'children'> & { label: string; icon: string }) => {\n return (\n <Tooltip.Root>\n <Tooltip.Trigger asChild>\n <Button variant='ghost' {...props}>\n <span className='sr-only'>{label}</span>\n <Icon icon={icon} />\n </Button>\n </Tooltip.Trigger>\n <Tooltip.Portal>\n <Tooltip.Content side='bottom'>{label}</Tooltip.Content>\n </Tooltip.Portal>\n </Tooltip.Root>\n );\n};\n\nexport const LayoutControls = forwardRef<HTMLDivElement, LayoutControlsProps>(\n (\n { onClick, variant = 'default', capabilities: can, isSolo, pin, close = false, children, ...props },\n forwardedRef,\n ) => {\n const { t } = useTranslation(translationKey);\n const buttonClassNames = variant === 'hide-disabled' ? 'disabled:hidden !p-1' : '!p-1';\n\n return (\n <ButtonGroup {...props} ref={forwardedRef}>\n {pin && !isSolo && ['both', 'start'].includes(pin) && (\n <LayoutControl\n label={t('pin start label')}\n variant='ghost'\n classNames={buttonClassNames}\n onClick={() => onClick?.('pin-start')}\n icon='ph--caret-line-left--regular'\n />\n )}\n\n {can.solo && (\n <LayoutControl\n label={t('solo layout label')}\n classNames={buttonClassNames}\n onClick={() => onClick?.('solo')}\n icon={isSolo ? 'ph--arrows-in--regular' : 'ph--arrows-out--regular'}\n />\n )}\n\n {!isSolo && can.solo && (\n <>\n <LayoutControl\n label={t('increment start label')}\n disabled={!can.incrementStart}\n classNames={buttonClassNames}\n onClick={() => onClick?.('increment-start')}\n icon='ph--caret-left--regular'\n />\n <LayoutControl\n label={t('increment end label')}\n disabled={!can.incrementEnd}\n classNames={buttonClassNames}\n onClick={() => onClick?.('increment-end')}\n icon='ph--caret-right--regular'\n />\n </>\n )}\n\n {pin && !isSolo && ['both', 'end'].includes(pin) && (\n <LayoutControl\n label={t('pin end label')}\n classNames={buttonClassNames}\n onClick={() => onClick?.('pin-end')}\n icon='ph--caret-line-right--regular'\n />\n )}\n\n {close && !isSolo && (\n <LayoutControl\n label={t(`${typeof close === 'string' ? 'minify' : 'close'} label`)}\n classNames={buttonClassNames}\n onClick={() => onClick?.('close')}\n data-testid='layoutHeading.close'\n icon={\n close === 'minify-start'\n ? 'ph--caret-line-left--regular'\n : close === 'minify-end'\n ? 'ph--caret-line-right--regular'\n : 'ph--x--regular'\n }\n />\n )}\n {children}\n </ButtonGroup>\n );\n },\n);\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,2BAAwC;AACxC,gCAA4B;AAC5B,mBAA+G;AAE/G,sBAA+C;AAC/C,4BAAmB;ACJnB,IAAAA,gBAA0C;ACD1C,qBAAwB;AACxB,qBAAsC;AACtC,qBAAsC;AACtC,0BAAsD;AACtD,IAAAA,gBAA0C;ACJ1C,IAAAC,kBAAwB;AACxB,IAAAC,kBAAiD;AACjD,uCAAuC;AACvC,0CAAyC;AACzC,IAAAC,uBAIO;AACP,IAAAC,wBAAkC;AAClC,IAAAC,6BAA4B;AAC5B,IAAAL,gBAAsG;AAEtG,IAAAM,mBAA+C;AAC/C,0BAA4C;AAC5C,IAAAC,yBAAmB;ACfnB,IAAAP,gBAAiE;AAGjE,IAAAO,yBAAmB;ACHnB,wBAAqB;AACrB,IAAAP,gBAAqD;ACDrD,IAAAI,wBAAkC;AAClC,IAAAJ,gBAA6F;AAG7F,gCAA8D;AAC9D,IAAAO,yBAAmB;ACLnB,IAAAP,gBAAkB;AAElB,IAAAQ,uBAA6B;ACF7B,IAAAR,gBAAsF;AAGtF,sBAA2B;AAC3B,IAAAM,mBAAgG;AAChG,IAAAG,6BAA8D;AAC9D,IAAAF,yBAAoC;AACpC,kBAAgC;ACPhC,IAAAP,iBAAkB;AEAlB,IAAAA,iBAAkC;AAElC,IAAAM,mBAQO;AVcA,IAAMI,eAAeC,iDAAiC;EAC3DC,aAAa;EACbC,MAAM;EACNC,MAAM;AACR,CAAA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AClEnM,YAAYoM;IACZrE,SAAS,MAAMA,UAAU,OAAA;IACzB2E,eAAY;IACZ9G,MACEuG,UAAU,iBACN,iCACAA,UAAU,eACR,kCACA;MAIXpM,QAAAA;AAGP,CAAA;",
|
|
6
|
+
"names": ["import_react", "import_combine", "import_adapter", "import_closest_edge", "import_react_tabster", "import_react_compose_refs", "import_react_ui", "import_react_ui_theme", "import_react_ui_dnd", "import_react_ui_attention", "StackContext", "createContext", "orientation", "rail", "size", "useStack", "useContext", "StackItemContext", "selfDragHandleRef", "setSize", "useStackItem", "useStackDropForElements", "element", "selfDroppable", "id", "onRearrange", "dropping", "setDropping", "useState", "useLayoutEffect", "acceptSourceType", "combine", "dropTargetForElements", "getData", "input", "attachClosestEdge", "type", "allowedEdges", "onDragEnter", "source", "data", "onDrag", "onDragLeave", "onDrop", "self", "extractClosestEdge", "autoScrollForElements", "getAllowedAxis", "railGridHorizontal", "railGridVertical", "railGridHorizontalContainFitContent", "railGridVerticalContainFitContent", "autoScrollRootAttributes", "Stack", "forwardRef", "children", "classNames", "style", "itemsCount", "Children", "count", "props", "forwardedRef", "stackElement", "stackRef", "composedItemRef", "composeRefs", "arrowNavigationGroup", "useArrowNavigationGroup", "axis", "styles", "gridClasses", "useMemo", "React", "Provider", "value", "div", "className", "mx", "data-rail", "aria-orientation", "ref", "ListItem", "DropIndicator", "lineInset", "terminalInset", "gap", "edge", "StackItemContent", "toolbar", "statusbar", "stackItemSize", "role", "gridTemplateRows", "join", "StackItemDragHandle", "asChild", "Root", "Slot", "StackItemHeading", "focusableGroupAttrs", "useFocusableGroup", "tabBehavior", "tabIndex", "StackItemHeadingLabel", "attendableId", "related", "hasAttention", "isAncestor", "isRelated", "useAttention", "h1", "data-attention", "toString", "MIN_WIDTH", "MIN_HEIGHT", "StackItemResizeHandle", "ResizeHandle", "side", "fallbackSize", "DEFAULT_EXTRINSIC_SIZE", "minSize", "onSizeChange", "MenuSignifierHorizontal", "svg", "width", "height", "viewBox", "stroke", "opacity", "line", "x1", "y1", "x2", "y2", "strokeWidth", "strokeLinecap", "strokeDasharray", "strokeDashoffset", "translationKey", "StackItemSigilButton", "variant", "Button", "StackItemSigil", "actions", "actionGroups", "onAction", "triggerLabel", "icon", "t", "useTranslation", "suppressNextTooltip", "useRef", "optionsMenuOpen", "setOptionsMenuOpen", "hasActions", "length", "button", "span", "Icon", "DropdownMenu", "open", "onOpenChange", "nextOpen", "current", "Trigger", "Portal", "Content", "Viewport", "map", "index", "separator", "Separator", "Fragment", "key", "action", "shortcut", "properties", "keyBinding", "getHostPlatform", "menuItemType", "CheckboxItem", "Item", "onClick", "event", "disabled", "stopPropagation", "checked", "isChecked", "undefined", "testId", "toLocalizedString", "label", "ItemIndicator", "descriptionText", "keySymbols", "Arrow", "DEFAULT_HORIZONTAL_SIZE", "DEFAULT_VERTICAL_SIZE", "StackItemRoot", "item", "propsSize", "order", "disableRearrange", "focusIndicatorVariant", "itemElement", "itemRef", "selfDragHandleElement", "closestEdge", "setEdge", "setInternalSize", "useCallback", "nextSize", "commit", "draggable", "dragHandle", "getInitialData", "onGenerateDragPreview", "nativeSetDragImage", "location", "document", "body", "setAttribute", "scrollJustEnoughIntoView", "x", "y", "preserveOffsetOnSource", "container", "offsetParent", "onDragStart", "removeAttribute", "closest", "focusGroupAttrs", "data-dx-stack-item", "resizeAttributes", "sizeStyle", "Number", "isFinite", "StackItem", "Heading", "HeadingLabel", "DragHandle", "Sigil", "SigilButton", "LayoutControl", "Tooltip", "LayoutControls", "capabilities", "can", "isSolo", "pin", "close", "buttonClassNames", "ButtonGroup", "includes", "solo", "incrementStart", "incrementEnd", "data-testid"]
|
|
7
7
|
}
|
package/dist/lib/node/meta.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"inputs":{"packages/ui/react-ui-stack/src/components/StackContext.tsx":{"bytes":3091,"imports":[{"path":"react","kind":"import-statement","external":true}],"format":"esm"},"packages/ui/react-ui-stack/src/components/Stack.tsx":{"bytes":15800,"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":"@fluentui/react-tabster","kind":"import-statement","external":true},{"path":"@radix-ui/react-compose-refs","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"packages/ui/react-ui-stack/src/components/StackContext.tsx","kind":"import-statement","original":"./StackContext"}],"format":"esm"},"packages/ui/react-ui-stack/src/components/StackItemContent.tsx":{"bytes":5524,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"packages/ui/react-ui-stack/src/components/StackContext.tsx","kind":"import-statement","original":"./StackContext"}],"format":"esm"},"packages/ui/react-ui-stack/src/components/StackItemDragHandle.tsx":{"bytes":2101,"imports":[{"path":"@radix-ui/react-slot","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"packages/ui/react-ui-stack/src/components/StackContext.tsx","kind":"import-statement","original":"./StackContext"}],"format":"esm"},"packages/ui/react-ui-stack/src/components/StackItemHeading.tsx":{"bytes":5758,"imports":[{"path":"@fluentui/react-tabster","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui-attention","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"packages/ui/react-ui-stack/src/components/StackContext.tsx","kind":"import-statement","original":"./StackContext"}],"format":"esm"},"packages/ui/react-ui-stack/src/components/StackItemResizeHandle.tsx":{"bytes":16102,"imports":[{"path":"@atlaskit/pragmatic-drag-and-drop/element/adapter","kind":"import-statement","external":true},{"path":"@atlaskit/pragmatic-drag-and-drop/element/disable-native-drag-preview","kind":"import-statement","external":true},{"path":"@atlaskit/pragmatic-drag-and-drop/prevent-unhandled","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"packages/ui/react-ui-stack/src/components/StackContext.tsx","kind":"import-statement","original":"./StackContext"},{"path":"packages/ui/react-ui-stack/src/components/StackItem.tsx","kind":"import-statement","original":"./StackItem"}],"format":"esm"},"packages/ui/react-ui-stack/src/components/MenuSignifier.tsx":{"bytes":3282,"imports":[{"path":"react","kind":"import-statement","external":true}],"format":"esm"},"packages/ui/react-ui-stack/src/translations.ts":{"bytes":1870,"imports":[],"format":"esm"},"packages/ui/react-ui-stack/src/components/StackItemSigil.tsx":{"bytes":18750,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/keyboard","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-attention","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"packages/ui/react-ui-stack/src/components/MenuSignifier.tsx","kind":"import-statement","original":"./MenuSignifier"},{"path":"packages/ui/react-ui-stack/src/translations.ts","kind":"import-statement","original":"../translations"}],"format":"esm"},"packages/ui/react-ui-stack/src/components/StackItem.tsx":{"bytes":24832,"imports":[{"path":"@atlaskit/pragmatic-drag-and-drop/combine","kind":"import-statement","external":true},{"path":"@atlaskit/pragmatic-drag-and-drop/element/adapter","kind":"import-statement","external":true},{"path":"@atlaskit/pragmatic-drag-and-drop/element/preserve-offset-on-source","kind":"import-statement","external":true},{"path":"@atlaskit/pragmatic-drag-and-drop/element/scroll-just-enough-into-view","kind":"import-statement","external":true},{"path":"@atlaskit/pragmatic-drag-and-drop-hitbox/closest-edge","kind":"import-statement","external":true},{"path":"@fluentui/react-tabster","kind":"import-statement","external":true},{"path":"@radix-ui/react-compose-refs","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"packages/ui/react-ui-stack/src/components/StackContext.tsx","kind":"import-statement","original":"./StackContext"},{"path":"packages/ui/react-ui-stack/src/components/StackItemContent.tsx","kind":"import-statement","original":"./StackItemContent"},{"path":"packages/ui/react-ui-stack/src/components/StackItemDragHandle.tsx","kind":"import-statement","original":"./StackItemDragHandle"},{"path":"packages/ui/react-ui-stack/src/components/StackItemHeading.tsx","kind":"import-statement","original":"./StackItemHeading"},{"path":"packages/ui/react-ui-stack/src/components/StackItemResizeHandle.tsx","kind":"import-statement","original":"./StackItemResizeHandle"},{"path":"packages/ui/react-ui-stack/src/components/StackItemSigil.tsx","kind":"import-statement","original":"./StackItemSigil"}],"format":"esm"},"packages/ui/react-ui-stack/src/components/LayoutControls.tsx":{"bytes":11653,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"packages/ui/react-ui-stack/src/translations.ts","kind":"import-statement","original":"../translations"}],"format":"esm"},"packages/ui/react-ui-stack/src/components/index.ts":{"bytes":801,"imports":[{"path":"packages/ui/react-ui-stack/src/components/Stack.tsx","kind":"import-statement","original":"./Stack"},{"path":"packages/ui/react-ui-stack/src/components/StackItem.tsx","kind":"import-statement","original":"./StackItem"},{"path":"packages/ui/react-ui-stack/src/components/LayoutControls.tsx","kind":"import-statement","original":"./LayoutControls"},{"path":"packages/ui/react-ui-stack/src/components/StackContext.tsx","kind":"import-statement","original":"./StackContext"}],"format":"esm"},"packages/ui/react-ui-stack/src/index.ts":{"bytes":718,"imports":[{"path":"packages/ui/react-ui-stack/src/components/index.ts","kind":"import-statement","original":"./components"},{"path":"packages/ui/react-ui-stack/src/translations.ts","kind":"import-statement","original":"./translations"}],"format":"esm"},"packages/ui/react-ui-stack/src/testing/stack-manager.ts":{"bytes":7183,"imports":[],"format":"esm"},"packages/ui/react-ui-stack/src/testing/index.ts":{"bytes":519,"imports":[{"path":"packages/ui/react-ui-stack/src/testing/stack-manager.ts","kind":"import-statement","original":"./stack-manager"}],"format":"esm"}},"outputs":{"packages/ui/react-ui-stack/dist/lib/node/index.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":56885},"packages/ui/react-ui-stack/dist/lib/node/index.cjs":{"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":"@fluentui/react-tabster","kind":"import-statement","external":true},{"path":"@radix-ui/react-compose-refs","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@atlaskit/pragmatic-drag-and-drop/combine","kind":"import-statement","external":true},{"path":"@atlaskit/pragmatic-drag-and-drop/element/adapter","kind":"import-statement","external":true},{"path":"@atlaskit/pragmatic-drag-and-drop/element/preserve-offset-on-source","kind":"import-statement","external":true},{"path":"@atlaskit/pragmatic-drag-and-drop/element/scroll-just-enough-into-view","kind":"import-statement","external":true},{"path":"@atlaskit/pragmatic-drag-and-drop-hitbox/closest-edge","kind":"import-statement","external":true},{"path":"@fluentui/react-tabster","kind":"import-statement","external":true},{"path":"@radix-ui/react-compose-refs","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"@radix-ui/react-slot","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@fluentui/react-tabster","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui-attention","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"@atlaskit/pragmatic-drag-and-drop/element/adapter","kind":"import-statement","external":true},{"path":"@atlaskit/pragmatic-drag-and-drop/element/disable-native-drag-preview","kind":"import-statement","external":true},{"path":"@atlaskit/pragmatic-drag-and-drop/prevent-unhandled","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/keyboard","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-attention","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true}],"exports":["DEFAULT_EXTRINSIC_SIZE","DEFAULT_HORIZONTAL_SIZE","DEFAULT_VERTICAL_SIZE","LayoutControls","Stack","StackContext","StackItem","StackItemContext","autoScrollRootAttributes","railGridHorizontal","railGridVertical","translations","useStack","useStackItem"],"entryPoint":"packages/ui/react-ui-stack/src/index.ts","inputs":{"packages/ui/react-ui-stack/src/components/Stack.tsx":{"bytesInOutput":3846},"packages/ui/react-ui-stack/src/components/StackContext.tsx":{"bytesInOutput":408},"packages/ui/react-ui-stack/src/components/index.ts":{"bytesInOutput":0},"packages/ui/react-ui-stack/src/components/StackItem.tsx":{"bytesInOutput":5857},"packages/ui/react-ui-stack/src/components/StackItemContent.tsx":{"bytesInOutput":850},"packages/ui/react-ui-stack/src/components/StackItemDragHandle.tsx":{"bytesInOutput":335},"packages/ui/react-ui-stack/src/components/StackItemHeading.tsx":{"bytesInOutput":1286},"packages/ui/react-ui-stack/src/components/StackItemResizeHandle.tsx":{"bytesInOutput":4101},"packages/ui/react-ui-stack/src/components/StackItemSigil.tsx":{"bytesInOutput":4540},"packages/ui/react-ui-stack/src/components/MenuSignifier.tsx":{"bytesInOutput":442},"packages/ui/react-ui-stack/src/translations.ts":{"bytesInOutput":444},"packages/ui/react-ui-stack/src/components/LayoutControls.tsx":{"bytesInOutput":3014},"packages/ui/react-ui-stack/src/index.ts":{"bytesInOutput":0}},"bytes":26341},"packages/ui/react-ui-stack/dist/lib/node/testing/index.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":3597},"packages/ui/react-ui-stack/dist/lib/node/testing/index.cjs":{"imports":[],"exports":["SectionManager","StackManager"],"entryPoint":"packages/ui/react-ui-stack/src/testing/index.ts","inputs":{"packages/ui/react-ui-stack/src/testing/stack-manager.ts":{"bytesInOutput":1516},"packages/ui/react-ui-stack/src/testing/index.ts":{"bytesInOutput":0}},"bytes":1655}}}
|
|
1
|
+
{"inputs":{"packages/ui/react-ui-stack/src/components/StackContext.tsx":{"bytes":3155,"imports":[{"path":"react","kind":"import-statement","external":true}],"format":"esm"},"packages/ui/react-ui-stack/src/hooks/useStackDropForElements.ts":{"bytes":8124,"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"},"packages/ui/react-ui-stack/src/hooks/index.ts":{"bytes":653,"imports":[{"path":"packages/ui/react-ui-stack/src/hooks/useStackDropForElements.ts","kind":"import-statement","original":"./useStackDropForElements"}],"format":"esm"},"packages/ui/react-ui-stack/src/components/Stack.tsx":{"bytes":12588,"imports":[{"path":"@fluentui/react-tabster","kind":"import-statement","external":true},{"path":"@radix-ui/react-compose-refs","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"packages/ui/react-ui-stack/src/components/StackContext.tsx","kind":"import-statement","original":"./StackContext"},{"path":"packages/ui/react-ui-stack/src/hooks/index.ts","kind":"import-statement","original":"../hooks"}],"format":"esm"},"packages/ui/react-ui-stack/src/components/StackItemContent.tsx":{"bytes":5528,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"packages/ui/react-ui-stack/src/components/StackContext.tsx","kind":"import-statement","original":"./StackContext"}],"format":"esm"},"packages/ui/react-ui-stack/src/components/StackItemDragHandle.tsx":{"bytes":2101,"imports":[{"path":"@radix-ui/react-slot","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"packages/ui/react-ui-stack/src/components/StackContext.tsx","kind":"import-statement","original":"./StackContext"}],"format":"esm"},"packages/ui/react-ui-stack/src/components/StackItemHeading.tsx":{"bytes":5758,"imports":[{"path":"@fluentui/react-tabster","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui-attention","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"packages/ui/react-ui-stack/src/components/StackContext.tsx","kind":"import-statement","original":"./StackContext"}],"format":"esm"},"packages/ui/react-ui-stack/src/components/StackItemResizeHandle.tsx":{"bytes":2885,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui-dnd","kind":"import-statement","external":true},{"path":"packages/ui/react-ui-stack/src/components/StackContext.tsx","kind":"import-statement","original":"./StackContext"},{"path":"packages/ui/react-ui-stack/src/components/StackItem.tsx","kind":"import-statement","original":"./StackItem"}],"format":"esm"},"packages/ui/react-ui-stack/src/components/MenuSignifier.tsx":{"bytes":3282,"imports":[{"path":"react","kind":"import-statement","external":true}],"format":"esm"},"packages/ui/react-ui-stack/src/translations.ts":{"bytes":1870,"imports":[],"format":"esm"},"packages/ui/react-ui-stack/src/components/StackItemSigil.tsx":{"bytes":18750,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/keyboard","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-attention","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"packages/ui/react-ui-stack/src/components/MenuSignifier.tsx","kind":"import-statement","original":"./MenuSignifier"},{"path":"packages/ui/react-ui-stack/src/translations.ts","kind":"import-statement","original":"../translations"}],"format":"esm"},"packages/ui/react-ui-stack/src/components/StackItem.tsx":{"bytes":24576,"imports":[{"path":"@atlaskit/pragmatic-drag-and-drop/combine","kind":"import-statement","external":true},{"path":"@atlaskit/pragmatic-drag-and-drop/element/adapter","kind":"import-statement","external":true},{"path":"@atlaskit/pragmatic-drag-and-drop/element/preserve-offset-on-source","kind":"import-statement","external":true},{"path":"@atlaskit/pragmatic-drag-and-drop/element/scroll-just-enough-into-view","kind":"import-statement","external":true},{"path":"@atlaskit/pragmatic-drag-and-drop-hitbox/closest-edge","kind":"import-statement","external":true},{"path":"@fluentui/react-tabster","kind":"import-statement","external":true},{"path":"@radix-ui/react-compose-refs","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-dnd","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"packages/ui/react-ui-stack/src/components/StackContext.tsx","kind":"import-statement","original":"./StackContext"},{"path":"packages/ui/react-ui-stack/src/components/StackItemContent.tsx","kind":"import-statement","original":"./StackItemContent"},{"path":"packages/ui/react-ui-stack/src/components/StackItemDragHandle.tsx","kind":"import-statement","original":"./StackItemDragHandle"},{"path":"packages/ui/react-ui-stack/src/components/StackItemHeading.tsx","kind":"import-statement","original":"./StackItemHeading"},{"path":"packages/ui/react-ui-stack/src/components/StackItemResizeHandle.tsx","kind":"import-statement","original":"./StackItemResizeHandle"},{"path":"packages/ui/react-ui-stack/src/components/StackItemSigil.tsx","kind":"import-statement","original":"./StackItemSigil"}],"format":"esm"},"packages/ui/react-ui-stack/src/components/LayoutControls.tsx":{"bytes":11653,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"packages/ui/react-ui-stack/src/translations.ts","kind":"import-statement","original":"../translations"}],"format":"esm"},"packages/ui/react-ui-stack/src/components/index.ts":{"bytes":801,"imports":[{"path":"packages/ui/react-ui-stack/src/components/Stack.tsx","kind":"import-statement","original":"./Stack"},{"path":"packages/ui/react-ui-stack/src/components/StackItem.tsx","kind":"import-statement","original":"./StackItem"},{"path":"packages/ui/react-ui-stack/src/components/LayoutControls.tsx","kind":"import-statement","original":"./LayoutControls"},{"path":"packages/ui/react-ui-stack/src/components/StackContext.tsx","kind":"import-statement","original":"./StackContext"}],"format":"esm"},"packages/ui/react-ui-stack/src/index.ts":{"bytes":718,"imports":[{"path":"packages/ui/react-ui-stack/src/components/index.ts","kind":"import-statement","original":"./components"},{"path":"packages/ui/react-ui-stack/src/translations.ts","kind":"import-statement","original":"./translations"}],"format":"esm"},"packages/ui/react-ui-stack/src/testing/stack-manager.ts":{"bytes":7183,"imports":[],"format":"esm"},"packages/ui/react-ui-stack/src/testing/index.ts":{"bytes":519,"imports":[{"path":"packages/ui/react-ui-stack/src/testing/stack-manager.ts","kind":"import-statement","original":"./stack-manager"}],"format":"esm"}},"outputs":{"packages/ui/react-ui-stack/dist/lib/node/index.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":52273},"packages/ui/react-ui-stack/dist/lib/node/index.cjs":{"imports":[{"path":"@fluentui/react-tabster","kind":"import-statement","external":true},{"path":"@radix-ui/react-compose-refs","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@atlaskit/pragmatic-drag-and-drop/combine","kind":"import-statement","external":true},{"path":"@atlaskit/pragmatic-drag-and-drop/element/adapter","kind":"import-statement","external":true},{"path":"@atlaskit/pragmatic-drag-and-drop-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":"@atlaskit/pragmatic-drag-and-drop/combine","kind":"import-statement","external":true},{"path":"@atlaskit/pragmatic-drag-and-drop/element/adapter","kind":"import-statement","external":true},{"path":"@atlaskit/pragmatic-drag-and-drop/element/preserve-offset-on-source","kind":"import-statement","external":true},{"path":"@atlaskit/pragmatic-drag-and-drop/element/scroll-just-enough-into-view","kind":"import-statement","external":true},{"path":"@atlaskit/pragmatic-drag-and-drop-hitbox/closest-edge","kind":"import-statement","external":true},{"path":"@fluentui/react-tabster","kind":"import-statement","external":true},{"path":"@radix-ui/react-compose-refs","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-dnd","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"@radix-ui/react-slot","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@fluentui/react-tabster","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui-attention","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"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/react-ui-theme","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true}],"exports":["DEFAULT_EXTRINSIC_SIZE","DEFAULT_HORIZONTAL_SIZE","DEFAULT_VERTICAL_SIZE","LayoutControls","Stack","StackContext","StackItem","StackItemContext","autoScrollRootAttributes","railGridHorizontal","railGridHorizontalContainFitContent","railGridVertical","railGridVerticalContainFitContent","translations","useStack","useStackItem"],"entryPoint":"packages/ui/react-ui-stack/src/index.ts","inputs":{"packages/ui/react-ui-stack/src/components/Stack.tsx":{"bytesInOutput":2995},"packages/ui/react-ui-stack/src/components/StackContext.tsx":{"bytesInOutput":408},"packages/ui/react-ui-stack/src/hooks/useStackDropForElements.ts":{"bytesInOutput":1927},"packages/ui/react-ui-stack/src/hooks/index.ts":{"bytesInOutput":0},"packages/ui/react-ui-stack/src/components/index.ts":{"bytesInOutput":0},"packages/ui/react-ui-stack/src/components/StackItem.tsx":{"bytesInOutput":5764},"packages/ui/react-ui-stack/src/components/StackItemContent.tsx":{"bytesInOutput":850},"packages/ui/react-ui-stack/src/components/StackItemDragHandle.tsx":{"bytesInOutput":335},"packages/ui/react-ui-stack/src/components/StackItemHeading.tsx":{"bytesInOutput":1286},"packages/ui/react-ui-stack/src/components/StackItemResizeHandle.tsx":{"bytesInOutput":523},"packages/ui/react-ui-stack/src/components/StackItemSigil.tsx":{"bytesInOutput":4528},"packages/ui/react-ui-stack/src/components/MenuSignifier.tsx":{"bytesInOutput":442},"packages/ui/react-ui-stack/src/translations.ts":{"bytesInOutput":444},"packages/ui/react-ui-stack/src/components/LayoutControls.tsx":{"bytesInOutput":3014},"packages/ui/react-ui-stack/src/index.ts":{"bytesInOutput":0}},"bytes":23878},"packages/ui/react-ui-stack/dist/lib/node/testing/index.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":3597},"packages/ui/react-ui-stack/dist/lib/node/testing/index.cjs":{"imports":[],"exports":["SectionManager","StackManager"],"entryPoint":"packages/ui/react-ui-stack/src/testing/index.ts","inputs":{"packages/ui/react-ui-stack/src/testing/stack-manager.ts":{"bytesInOutput":1516},"packages/ui/react-ui-stack/src/testing/index.ts":{"bytesInOutput":0}},"bytes":1655}}}
|