@dxos/react-ui-stack 0.6.14-staging.934c9de → 0.6.14-staging.9b873ce
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 +494 -335
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/testing/index.mjs +3 -6
- package/dist/lib/browser/testing/index.mjs.map +3 -3
- package/dist/lib/node/index.cjs +478 -326
- package/dist/lib/node/index.cjs.map +4 -4
- package/dist/lib/node/meta.json +1 -1
- package/dist/lib/node/testing/index.cjs +3 -6
- package/dist/lib/node/testing/index.cjs.map +3 -3
- package/dist/lib/node-esm/index.mjs +494 -335
- package/dist/lib/node-esm/index.mjs.map +4 -4
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/testing/index.mjs +3 -6
- package/dist/lib/node-esm/testing/index.mjs.map +3 -3
- package/dist/types/src/components/LayoutControls.d.ts +19 -0
- package/dist/types/src/components/LayoutControls.d.ts.map +1 -0
- package/dist/types/src/components/MenuSignifier.d.ts +4 -0
- package/dist/types/src/components/MenuSignifier.d.ts.map +1 -0
- package/dist/types/src/components/Stack.d.ts +12 -12
- package/dist/types/src/components/Stack.d.ts.map +1 -1
- package/dist/types/src/components/Stack.stories.d.ts +6 -83
- package/dist/types/src/components/Stack.stories.d.ts.map +1 -1
- package/dist/types/src/components/StackContext.d.ts +19 -0
- package/dist/types/src/components/StackContext.d.ts.map +1 -0
- package/dist/types/src/components/StackItem.d.ts +41 -0
- package/dist/types/src/components/StackItem.d.ts.map +1 -0
- package/dist/types/src/components/StackItemContent.d.ts +9 -0
- package/dist/types/src/components/StackItemContent.d.ts.map +1 -0
- package/dist/types/src/components/StackItemHeading.d.ts +8 -0
- package/dist/types/src/components/StackItemHeading.d.ts.map +1 -0
- package/dist/types/src/components/StackItemResizeHandle.d.ts +3 -0
- package/dist/types/src/components/StackItemResizeHandle.d.ts.map +1 -0
- package/dist/types/src/components/StackItemSigil.d.ts +31 -0
- package/dist/types/src/components/StackItemSigil.d.ts.map +1 -0
- package/dist/types/src/components/index.d.ts +2 -1
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/testing/EditorContent.d.ts +2 -2
- package/dist/types/src/testing/EditorContent.d.ts.map +1 -1
- package/dist/types/src/testing/stack-manager.d.ts +0 -1
- package/dist/types/src/testing/stack-manager.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts +8 -8
- package/package.json +19 -20
- package/src/components/LayoutControls.tsx +131 -0
- package/src/components/MenuSignifier.tsx +33 -0
- package/src/components/Stack.stories.tsx +109 -182
- package/src/components/Stack.tsx +61 -156
- package/src/components/StackContext.tsx +38 -0
- package/src/components/StackItem.tsx +173 -0
- package/src/components/StackItemContent.tsx +49 -0
- package/src/components/StackItemHeading.tsx +55 -0
- package/src/components/StackItemResizeHandle.tsx +115 -0
- package/src/components/StackItemSigil.tsx +170 -0
- package/src/components/index.ts +3 -2
- package/src/playwright/smoke.spec.ts +3 -3
- package/src/testing/EditorContent.tsx +4 -4
- package/src/testing/stack-manager.ts +3 -7
- package/src/translations.ts +8 -8
- package/dist/types/src/components/CaretDownUp.d.ts +0 -4
- package/dist/types/src/components/CaretDownUp.d.ts.map +0 -1
- package/dist/types/src/components/ContentTypes.stories.d.ts +0 -96
- package/dist/types/src/components/ContentTypes.stories.d.ts.map +0 -1
- package/dist/types/src/components/Deck.stories.d.ts +0 -19
- package/dist/types/src/components/Deck.stories.d.ts.map +0 -1
- package/dist/types/src/components/Section.d.ts +0 -53
- package/dist/types/src/components/Section.d.ts.map +0 -1
- package/dist/types/src/components/Section.stories.d.ts +0 -36
- package/dist/types/src/components/Section.stories.d.ts.map +0 -1
- package/dist/types/src/components/style-fragments.d.ts +0 -2
- package/dist/types/src/components/style-fragments.d.ts.map +0 -1
- package/dist/types/src/next/Stack.d.ts +0 -9
- package/dist/types/src/next/Stack.d.ts.map +0 -1
- package/dist/types/src/next/Stack.stories.d.ts +0 -8
- package/dist/types/src/next/Stack.stories.d.ts.map +0 -1
- package/dist/types/src/next/StackItem.d.ts +0 -14
- package/dist/types/src/next/StackItem.d.ts.map +0 -1
- package/dist/types/src/next/index.d.ts +0 -2
- package/dist/types/src/next/index.d.ts.map +0 -1
- package/dist/types/src/testing/TableContent.d.ts +0 -20
- package/dist/types/src/testing/TableContent.d.ts.map +0 -1
- package/src/components/CaretDownUp.tsx +0 -31
- package/src/components/ContentTypes.stories.tsx +0 -104
- package/src/components/Deck.stories.tsx +0 -362
- package/src/components/Section.stories.tsx +0 -50
- package/src/components/Section.tsx +0 -378
- package/src/components/style-fragments.ts +0 -5
- package/src/next/Stack.stories.tsx +0 -148
- package/src/next/Stack.tsx +0 -30
- package/src/next/StackItem.tsx +0 -78
- package/src/next/index.ts +0 -5
- package/src/testing/TableContent.tsx +0 -119
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../../src/components/Stack.tsx", "../../../src/components/
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { useArrowNavigationGroup, useFocusableGroup } from '@fluentui/react-tabster';\nimport React, { type ReactNode, forwardRef, useCallback } from 'react';\nimport { useResizeDetector } from 'react-resize-detector';\n\nimport { List, useTranslation } from '@dxos/react-ui';\nimport {\n type MosaicContainerProps,\n type MosaicTileComponent,\n Mosaic,\n Path,\n useContainer,\n useItemsWithPreview,\n useMosaic,\n} from '@dxos/react-ui-mosaic';\nimport { dropRingInner } from '@dxos/react-ui-theme';\n\nimport {\n type CollapsedSections,\n type AddSectionPosition,\n SectionTile,\n type StackContextValue,\n type StackItem,\n type StackSectionContent,\n type StackSectionItem,\n} from './Section';\nimport { stackColumns } from './style-fragments';\nimport { translationKey } from '../translations';\n\nexport type Direction = 'horizontal' | 'vertical';\n\nexport type { CollapsedSections, AddSectionPosition };\n\nexport const DEFAULT_TYPE = 'stack-section';\n\nexport type StackProps<TData extends StackSectionContent = StackSectionContent> = Omit<\n MosaicContainerProps<TData, number>,\n 'debug' | 'Component'\n> &\n Omit<StackContextValue<TData>, 'setCollapsedSections'> & {\n items?: StackSectionItem[];\n separation?: boolean; // TODO(burdon): Style.\n onCollapseSection?: (id: string, collapsed: boolean) => void;\n emptyComponent?: ReactNode;\n };\n\nexport const Stack = ({\n id,\n type = DEFAULT_TYPE,\n SectionContent,\n items = [],\n separation = true,\n transform,\n onOver,\n onDrop,\n onAddSection,\n onDeleteSection,\n onNavigateToSection,\n onCollapseSection,\n ...props\n}: StackProps) => {\n const { ref: containerRef, width = 0 } = useResizeDetector<HTMLDivElement>({ refreshRate: 200 });\n const { operation, overItem } = useMosaic();\n const itemsWithPreview = useItemsWithPreview({ path: id, items });\n\n const getOverlayStyle = useCallback(() => ({ width }), [width]);\n const getOverlayProps = useCallback(\n () => ({ itemContext: { transform, SectionContent } }),\n [transform, SectionContent],\n );\n\n // TODO(thure): The root cause of the discrepancy between `activeNodeRect.top` and `overlayNodeRect.top` in Composer\n // in particular is not yet known, so this solution may may backfire in unforeseeable cases.\n const stackModifier = useCallback<Exclude<MosaicContainerProps['modifier'], undefined>>(\n (_activeItem, { transform, activeNodeRect, overlayNodeRect }) => {\n if (activeNodeRect && overlayNodeRect) {\n transform.y += activeNodeRect?.top - overlayNodeRect?.top;\n }\n return transform;\n },\n [],\n );\n\n return (\n <Mosaic.Container\n {...{\n id,\n type,\n Component: SectionTile as MosaicTileComponent<StackSectionItem, HTMLDivElement>,\n getOverlayStyle,\n getOverlayProps,\n onOver,\n onDrop,\n modifier: stackModifier,\n }}\n >\n <Mosaic.DroppableTile\n path={id}\n type={type}\n item={{ id, items: itemsWithPreview }}\n // TODO(wittjosiah): Should this actually be a context?\n itemContext={{\n separation,\n transform,\n onDeleteSection,\n onNavigateToSection,\n onAddSection,\n onCollapseSection,\n SectionContent,\n }}\n isOver={\n overItem &&\n !!overItem.path &&\n Path.hasRoot(overItem.path, id) &&\n (operation === 'copy' || operation === 'transfer')\n }\n Component={StackTile}\n {...props}\n ref={containerRef}\n />\n </Mosaic.Container>\n );\n};\n\nconst StackTile: MosaicTileComponent<StackItem, HTMLOListElement, Pick<StackProps, 'emptyComponent'>> = forwardRef(\n ({ classNames, path, isOver, item: { items }, itemContext, type: _type, emptyComponent, ...props }, forwardedRef) => {\n const { t } = useTranslation(translationKey);\n const { Component, type } = useContainer();\n const domAttributes = useArrowNavigationGroup({ axis: 'grid' });\n const { activeItem } = useMosaic();\n\n // NOTE(thure): Ensure “groupper” is available, but no need to use it here.\n const _group = useFocusableGroup();\n\n // NOTE: Keep outer padding the same as MarkdownMain.\n return (\n <List\n ref={forwardedRef}\n classNames={['grid relative', stackColumns, isOver && dropRingInner, classNames]}\n {...(!activeItem && domAttributes)}\n {...props}\n >\n {items.length > 0 ? (\n <Mosaic.SortableContext items={items} direction='vertical'>\n {items.map((item, index) => (\n <Mosaic.SortableTile\n key={item.id}\n item={item}\n itemContext={itemContext}\n path={path}\n type={type}\n position={index}\n Component={Component}\n />\n ))}\n </Mosaic.SortableContext>\n ) : emptyComponent !== undefined ? (\n <>{emptyComponent}</>\n ) : (\n <p\n className='grid col-span-2 text-center p-4 border border-dashed border-neutral-500/50 rounded'\n data-testid='stack.empty'\n >\n {t('empty stack message')}\n </p>\n )}\n </List>\n );\n },\n);\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { useFocusableGroup, useTabsterAttributes } from '@fluentui/react-tabster';\nimport { ArrowLineDown, ArrowLineUp, ArrowSquareOut, CaretUpDown, Trash } from '@phosphor-icons/react';\nimport * as CollapsiblePrimitive from '@radix-ui/react-collapsible';\nimport React, {\n forwardRef,\n useState,\n type ForwardRefExoticComponent,\n type RefAttributes,\n type FC,\n type PropsWithChildren,\n type ComponentPropsWithRef,\n} from 'react';\n\nimport {\n Button,\n DropdownMenu,\n Icon,\n type Label,\n List,\n ListItem,\n ScrollArea,\n type ThemedClassName,\n Toolbar,\n toLocalizedString,\n useTranslation,\n} from '@dxos/react-ui';\nimport { useAttendableAttributes } from '@dxos/react-ui-attention';\nimport { DropDownMenuDragHandleTrigger, resizeHandle, resizeHandleHorizontal } from '@dxos/react-ui-deck';\nimport {\n type MosaicActiveType,\n type MosaicDataItem,\n type MosaicTileComponent,\n type MosaicTileProps,\n useMosaic,\n} from '@dxos/react-ui-mosaic';\nimport {\n focusRing,\n getSize,\n hoverableControlItem,\n hoverableControls,\n hoverableFocusedWithinControls,\n mx,\n} from '@dxos/react-ui-theme';\n\nimport { CaretDownUp } from './CaretDownUp';\nimport { stackColumns } from './style-fragments';\nimport { translationKey } from '../translations';\n\nconst sectionActionDimensions = 'p-1 shrink-0 min-bs-0 is-[--rail-action] bs-min';\n\nexport type StackSectionContent = MosaicDataItem;\n\nexport type CollapsedSections = Record<string, boolean>;\n\nexport type AddSectionPosition = 'before' | 'after' | 'beforeAll' | 'afterAll';\n\nexport type StackContextValue<TData extends StackSectionContent = StackSectionContent> = {\n SectionContent: FC<{ data: TData }>;\n separation?: boolean;\n isResizable?: boolean;\n transform?: (item: MosaicDataItem, type?: string) => StackSectionItem;\n onDeleteSection?: (path: string) => void;\n onAddSection?: (path: string, position: AddSectionPosition) => void;\n onNavigateToSection?: (object: MosaicDataItem) => void;\n onCollapseSection?: (id: string, collapsed: boolean) => void;\n};\n\nexport type StackItem = MosaicDataItem & {\n items: StackSectionItem[];\n};\n\nexport type StackSectionItem = MosaicDataItem & {\n object: StackSectionContent;\n // TODO(wittjosiah): Use effect schema? Share schema with echo.\n view?: {\n title?: string;\n size?: SectionSize;\n height?: number;\n collapsed?: boolean;\n custom?: Record<string, any>;\n };\n // TODO(wittjosiah): Common type? Factor out?\n metadata?: {\n icon?: string;\n placeholder?: Label;\n viewActions?: (item: StackSectionItem) => StackAction;\n };\n};\n\nexport type StackAction = {\n icon: string;\n label: Label;\n onClick: () => void;\n};\n\nexport type SectionSize = 'intrinsic' | 'extrinsic';\n\nexport type SectionProps = PropsWithChildren<\n {\n // Data props.\n id: string;\n title: string;\n\n // Tile props.\n active?: MosaicActiveType;\n } & Pick<\n MosaicTileProps,\n 'draggableProps' | 'draggableStyle' | 'onDelete' | 'onNavigate' | 'onAddAfter' | 'onAddBefore'\n > &\n Pick<StackContextValue, 'separation' | 'isResizable' | 'onCollapseSection'> &\n Pick<Required<StackSectionItem>['view'], 'collapsed' | 'size'> &\n Pick<Required<StackSectionItem>['metadata'], 'icon'>\n>;\n\nconst resizeHandleStyles = mx(resizeHandle, resizeHandleHorizontal, 'is-full bs-[--rail-action] col-start-2');\n\nexport const Section: ForwardRefExoticComponent<SectionProps & RefAttributes<HTMLLIElement>> = forwardRef<\n HTMLLIElement,\n SectionProps\n>(\n (\n {\n id,\n title,\n icon = 'ph--placeholder--regular',\n size = 'intrinsic',\n collapsed,\n active,\n isResizable,\n draggableProps,\n draggableStyle,\n onDelete,\n onNavigate,\n onAddBefore,\n onAddAfter,\n onCollapseSection,\n children,\n },\n forwardedRef,\n ) => {\n const { t } = useTranslation(translationKey);\n const [optionsMenuOpen, setOptionsMenuOpen] = useState(false);\n const sectionActionsToolbar = useTabsterAttributes({\n groupper: {},\n focusable: {},\n mover: { cyclic: true, direction: 1, memorizeCurrent: false },\n });\n const sectionContentGroup = useFocusableGroup({});\n const attendableAttrs = useAttendableAttributes(id);\n\n return (\n <CollapsiblePrimitive.Root\n asChild\n open={!collapsed}\n onOpenChange={(nextOpen) => onCollapseSection?.(id, !nextOpen)}\n >\n <ListItem.Root\n ref={forwardedRef}\n id={id}\n {...attendableAttrs}\n classNames={[\n 'grid col-span-2 group/section',\n active === 'overlay' ? stackColumns : 'grid-cols-subgrid snap-start',\n ]}\n style={draggableStyle}\n >\n <div\n role='none'\n className={mx(\n 'grid col-span-2 grid-cols-subgrid',\n 'bg-base attention-surface',\n hoverableControls,\n hoverableFocusedWithinControls,\n (active === 'origin' || active === 'rearrange' || active === 'destination') && 'opacity-0',\n )}\n >\n <div\n role='toolbar'\n aria-orientation='vertical'\n aria-label={t('section controls label')}\n {...(!active && { tabIndex: 0 })}\n {...(!active && sectionActionsToolbar)}\n className={mx(\n 'grid grid-cols-subgrid ch-focus-ring rounded-sm grid-rows-[min-content_min-content_1fr] m-1',\n 'group-has-[[role=toolbar][aria-orientation=horizontal]]/section:pbs-[--rail-action]',\n )}\n >\n <div role='none' className='sticky -block-start-px bg-[--sticky-bg]'>\n <DropdownMenu.Root\n {...{\n open: optionsMenuOpen,\n onOpenChange: setOptionsMenuOpen,\n }}\n >\n <DropDownMenuDragHandleTrigger active={!!active} variant='ghost' classNames='m-0' {...draggableProps}>\n <Icon icon={icon} size={5} classNames='transition-opacity' />\n </DropDownMenuDragHandleTrigger>\n <DropdownMenu.Portal>\n <DropdownMenu.Content>\n <DropdownMenu.Viewport>\n {collapsed ? (\n <DropdownMenu.Item onClick={onNavigate} data-testid='section.navigate-to'>\n <ArrowSquareOut className={mx(getSize(5), 'mr-2')} />\n <span className='grow'>{t('navigate to section label')}</span>\n </DropdownMenu.Item>\n ) : (\n <CollapsiblePrimitive.Trigger asChild>\n <DropdownMenu.Item>\n <CaretDownUp className={mx(getSize(5), 'mr-2')} />\n <span className='grow'>{t('collapse label')}</span>\n </DropdownMenu.Item>\n </CollapsiblePrimitive.Trigger>\n )}\n <DropdownMenu.Item onClick={onAddBefore} data-testid='section.add-before'>\n <ArrowLineUp className={mx(getSize(5), 'mr-2')} />\n <span className='grow'>{t('add section before label')}</span>\n </DropdownMenu.Item>\n <DropdownMenu.Item onClick={onAddAfter} data-testid='section.add-after'>\n <ArrowLineDown className={mx(getSize(5), 'mr-2')} />\n <span className='grow'>{t('add section after label')}</span>\n </DropdownMenu.Item>\n <DropdownMenu.Item onClick={() => onDelete?.()} data-testid='section.remove'>\n <Trash className={mx(getSize(5), 'mr-2')} />\n <span className='grow'>{t('remove section label')}</span>\n </DropdownMenu.Item>\n </DropdownMenu.Viewport>\n <DropdownMenu.Arrow />\n </DropdownMenu.Content>\n </DropdownMenu.Portal>\n </DropdownMenu.Root>\n {collapsed ? (\n <CollapsiblePrimitive.Trigger asChild>\n <Button variant='ghost' classNames={sectionActionDimensions}>\n <span className='sr-only'>{t('expand label')}</span>\n <CaretUpDown className={getSize(4)} />\n </Button>\n </CollapsiblePrimitive.Trigger>\n ) : (\n <Button\n variant='ghost'\n classNames={sectionActionDimensions}\n onClick={onNavigate}\n data-testid='section.navigate-to'\n >\n <ArrowSquareOut className={mx(getSize(4))} />\n <span className='sr-only'>{t('navigate to section label')}</span>\n </Button>\n )}\n </div>\n </div>\n\n {/* Main content */}\n\n <ListItem.Heading\n classNames={collapsed ? ['grid grid-rows-subgrid grid-cols-subgrid items-center', focusRing] : 'sr-only'}\n {...(collapsed && { ...sectionContentGroup, tabIndex: 0 })}\n >\n {/*\n TODO(thure): This needs to be made extensible; Markdown document titles especially are difficult.\n Using `Surface` in a UI package like this would be unprecedented and needs motivation.\n Refactoring to use subcomponents is complicated by sections being a sortable Mosaic Tile.\n Reevaluate when work on collections (Folders, Stacks, etc) settles.\n */}\n <span className='truncate'>{title}</span>\n </ListItem.Heading>\n {size === 'intrinsic' ? (\n <CollapsiblePrimitive.Content\n {...(!collapsed && {\n ...sectionContentGroup,\n tabIndex: 0,\n })}\n // TODO(burdon): Add margin to fragment?\n className={mx(focusRing, 'm-[2px]')}\n >\n {children}\n </CollapsiblePrimitive.Content>\n ) : (\n <CollapsiblePrimitive.Content asChild>\n <ScrollArea.Root\n type='always'\n {...(!collapsed && { ...sectionContentGroup, tabIndex: 0 })}\n classNames={mx(focusRing, 'is-full has-[[data-radix-scroll-area-viewport]]:pbe-4')}\n >\n <ScrollArea.Viewport>{children}</ScrollArea.Viewport>\n <ScrollArea.Scrollbar\n orientation='horizontal'\n variant='coarse'\n classNames='hidden has-[div]:flex !inline-end-[max(.25rem,var(--radix-scroll-area-corner-width))]'\n >\n <ScrollArea.Thumb />\n </ScrollArea.Scrollbar>\n <ScrollArea.Scrollbar orientation='vertical' variant='coarse' classNames='hidden has-[div]:flex'>\n <ScrollArea.Thumb />\n </ScrollArea.Scrollbar>\n <ScrollArea.Corner />\n </ScrollArea.Root>\n </CollapsiblePrimitive.Content>\n )}\n </div>\n {isResizable && !collapsed && (\n <button className={resizeHandleStyles}>\n <span className='sr-only'>{t('resize section label')}</span>\n </button>\n )}\n </ListItem.Root>\n </CollapsiblePrimitive.Root>\n );\n },\n);\n\nexport type SectionToolbarProps = ThemedClassName<ComponentPropsWithRef<'div'>>;\n\n// TODO(burdon): block-start\nexport const sectionToolbarLayout =\n 'bs-[--rail-action] bg-[--sticky-bg] sticky block-start-0 __-block-start-px transition-opacity';\n\nexport const SectionToolbar = ({ children, classNames }: SectionToolbarProps) => {\n return (\n <Toolbar.Root orientation='horizontal' classNames={[sectionToolbarLayout, hoverableControlItem, classNames]}>\n {children}\n </Toolbar.Root>\n );\n};\n\nexport const SectionTile: MosaicTileComponent<\n StackSectionItem,\n HTMLLIElement\n // TODO(wittjosiah): If props is specified there is a type error with Mosaic.Container.\n // { itemContext: StackContextValue }\n> = forwardRef(({ path, type, active, draggableStyle, draggableProps, item, itemContext }, forwardedRef) => {\n const { t } = useTranslation(translationKey);\n const { activeItem } = useMosaic();\n\n const separation = !!itemContext?.separation;\n const isResizable = !!itemContext?.isResizable;\n const { transform, onDeleteSection, onNavigateToSection, onAddSection, onCollapseSection, SectionContent } =\n itemContext as StackContextValue;\n\n const transformedItem = transform\n ? transform(\n item,\n // TODO(wittjosiah): `active` doesn't always seem to be accurate here.\n activeItem?.item.id === item.id ? activeItem?.type : type,\n )\n : item;\n\n const placeholder = transformedItem.metadata?.placeholder ?? ['untitled section title', { ns: translationKey }];\n const title = transformedItem.view?.title ?? toLocalizedString(placeholder, t);\n\n const section = (\n <Section\n ref={forwardedRef}\n title={title}\n id={transformedItem.id}\n size={transformedItem.view?.size}\n icon={transformedItem.metadata?.icon}\n collapsed={transformedItem.view?.collapsed}\n separation={separation}\n active={active}\n draggableProps={draggableProps}\n draggableStyle={draggableStyle}\n onCollapseSection={onCollapseSection}\n isResizable={isResizable}\n onDelete={() => onDeleteSection?.(path)}\n onNavigate={() => onNavigateToSection?.(transformedItem)}\n onAddAfter={() => onAddSection?.(path, 'after')}\n onAddBefore={() => onAddSection?.(path, 'before')}\n >\n {SectionContent && <SectionContent data={transformedItem.object} />}\n </Section>\n );\n\n return active === 'overlay' ? <List>{section}</List> : section;\n});\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport { type IconProps } from '@phosphor-icons/react';\nimport React from 'react';\n\nexport const CaretDownUp = ({ children, weight, ...props }: IconProps) => {\n return (\n <svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256' {...props}>\n <rect width='256' height='256' fill='none' />\n <polyline\n points='80 224 128 176 176 224'\n fill='none'\n stroke='currentColor'\n strokeLinecap='round'\n strokeLinejoin='round'\n strokeWidth='16'\n />\n <polyline\n points='80 32 128 80 176 32'\n fill='none'\n stroke='currentColor'\n strokeLinecap='round'\n strokeLinejoin='round'\n strokeWidth='16'\n />\n {children}\n </svg>\n );\n};\n", "//\n// Copyright 2024 DXOS.org\n//\n\nexport const stackColumns = 'grid-cols-[var(--rail-size)_calc(100%-var(--rail-size))]';\n", "//\n// Copyright 2023 DXOS.org\n//\n\nexport const translationKey = 'stack';\n\nexport default [\n {\n 'en-US': {\n [translationKey]: {\n 'empty stack message': 'Drag items into the stack.',\n 'remove section label': 'Delete',\n 'navigate to section label': 'Navigate to item',\n 'untitled section title': 'Untitled section',\n 'add section before label': 'Add before',\n 'add section after label': 'Add after',\n 'expand label': 'Expand',\n 'collapse label': 'Collapse',\n },\n },\n },\n];\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,2BAA2D;AAC3D,mBAA+D;AAC/D,mCAAkC;AAElC,sBAAqC;AACrC,6BAQO;AACP,4BAA8B;ACd9B,IAAAA,wBAAwD;AACxD,IAAAC,gBAA+E;AAC/E,2BAAsC;AACtC,IAAAA,gBAQO;AAEP,IAAAC,mBAYO;A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AEuI,WAAWvD,KAAI,QAAKgE,qCAAAA;AAC5B,QAAMC,oBAAgBC,8CAAwB;IAAEC,MAAM;EAAO,CAAA;AAC7D,QAAM,EAAErD,WAAU,QAAKC,uBAAAA,WAAAA;AAGvB,QAAMqD,aAAS/G,qBAAAA,mBAAAA;AAGf,SACEpD,6BAAAA,QAAA,cAAC8H,gBAAAA,MAAAA;IACCjE,KAAKxB;IACLyB,YAAY;MAAC;MAAiBhD;MAAc2I,UAAUW;MAAetG;;IACpE,GAAI,CAAC+C,cAAcmD;IACnB,GAAGjK;KAEHkI,MAAMoC,SAAS,IACdrK,6BAAAA,QAAA,cAACoJ,8BAAOkB,iBAAe;IAACrC;IAAchF,WAAU;KAC7CgF,MAAMsC,IAAI,CAAC5D,MAAM6D,UAChBxK,6BAAAA,QAAA,cAACoJ,8BAAOqB,cAAY;IAClBC,KAAK/D,KAAKpF;IACVoF;IACAC;IACAF;IACAX;IACA4E,UAAUH;IACVlB;SAIJQ,mBAAmBc,SACrB5K,6BAAAA,QAAA,cAAAA,aAAAA,QAAA,UAAA,MAAG8J,cAAAA,IAEH9J,6BAAAA,QAAA,cAAC6K,KAAAA;IACC3G,WAAU;IACVe,eAAY;KAEX3C,EAAE,qBAAA,CAAA,CAAA;AAKb,CAAA;",
|
|
6
|
-
"names": ["import_react_tabster", "
|
|
3
|
+
"sources": ["../../../src/components/Stack.tsx", "../../../src/components/StackContext.tsx", "../../../src/components/StackItem.tsx", "../../../src/components/StackItemContent.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//\n\nimport { useArrowNavigationGroup } from '@fluentui/react-tabster';\nimport React, { Children, type CSSProperties, type ComponentPropsWithRef, forwardRef } from 'react';\n\nimport { type ThemedClassName } from '@dxos/react-ui';\nimport { mx } from '@dxos/react-ui-theme';\n\nimport { type StackContextValue, StackContext } from './StackContext';\n\nexport type Orientation = 'horizontal' | 'vertical';\nexport type Size = 'intrinsic' | 'contain';\n\nexport type StackProps = Omit<ThemedClassName<ComponentPropsWithRef<'div'>>, 'aria-orientation'> &\n Partial<StackContextValue> & { itemsCount?: number };\n\nexport const railGridHorizontal = 'grid-rows-[[rail-start]_var(--rail-size)_[content-start]_1fr_[content-end]]';\n\nexport const railGridVertical = 'grid-cols-[[rail-start]_var(--rail-size)_[content-start]_1fr_[content-end]]';\n\nexport const Stack = forwardRef<HTMLDivElement, StackProps>(\n (\n {\n children,\n classNames,\n style,\n orientation = 'vertical',\n rail = true,\n separators = true,\n size = 'intrinsic',\n itemsCount = Children.count(children),\n ...props\n },\n forwardedRef,\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 return (\n <StackContext.Provider value={{ orientation, rail, size, separators }}>\n <div\n {...props}\n {...arrowNavigationGroup}\n className={mx(\n 'grid relative',\n rail\n ? orientation === 'horizontal'\n ? railGridHorizontal\n : railGridVertical\n : orientation === 'horizontal'\n ? 'grid-rows-1'\n : 'grid-cols-1',\n size === 'contain' &&\n (orientation === 'horizontal'\n ? 'overflow-x-auto min-bs-0 bs-full max-bs-full'\n : 'overflow-y-auto min-is-0 is-full max-is-full'),\n separators && (orientation === 'horizontal' ? 'divide-separator divide-x' : 'divide-separator divide-y'),\n classNames,\n )}\n aria-orientation={orientation}\n style={styles}\n ref={forwardedRef}\n >\n {children}\n </div>\n </StackContext.Provider>\n );\n },\n);\n\nexport { StackContext };\nexport type { StackContextValue };\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport { createContext, useContext } from 'react';\n\nimport { type Orientation, type Size } from './Stack';\nimport { type StackItemSize } from './StackItem';\n\nexport type StackContextValue = {\n orientation: Orientation;\n separators: boolean;\n rail: boolean;\n size: Size;\n};\n\nexport const StackContext = createContext<StackContextValue>({\n orientation: 'vertical',\n rail: true,\n size: 'intrinsic',\n separators: true,\n});\n\nexport const useStack = () => useContext(StackContext);\n\ntype 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 {\n attachClosestEdge,\n type Edge,\n extractClosestEdge,\n} from '@atlaskit/pragmatic-drag-and-drop-hitbox/closest-edge';\nimport { DropIndicator } from '@atlaskit/pragmatic-drag-and-drop-react-drop-indicator/box';\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 } from '@dxos/react-ui';\nimport { mx } from '@dxos/react-ui-theme';\n\nimport { useStack, StackItemContext } from './StackContext';\nimport { StackItemContent, type StackItemContentProps } from './StackItemContent';\nimport {\n StackItemHeading,\n StackItemHeadingLabel,\n type StackItemHeadingProps,\n type StackItemHeadingLabelProps,\n} from './StackItemHeading';\nimport { StackItemResizeHandle } from './StackItemResizeHandle';\nimport {\n StackItemSigil,\n type StackItemSigilProps,\n type StackItemSigilAction,\n type StackItemSigilButtonProps,\n StackItemSigilButton,\n} from './StackItemSigil';\n\nexport type StackItemSize = number | 'min-content';\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 StackItemData = { id: string; type: 'column' | 'card' };\n\nexport type StackItemRootProps = ThemedClassName<ComponentPropsWithRef<'div'>> & {\n item: Omit<StackItemData, 'type'>;\n order?: number;\n onRearrange?: (source: StackItemData, target: StackItemData, closestEdge: Edge | null) => void;\n size?: StackItemSize;\n onSizeChange?: (nextSize: StackItemSize) => void;\n role?: 'article' | 'section';\n};\n\nconst StackItemRoot = forwardRef<HTMLDivElement, StackItemRootProps>(\n (\n { item, children, classNames, onRearrange, size: propsSize, onSizeChange, role, order, style, ...props },\n forwardedRef,\n ) => {\n const [itemElement, itemRef] = useState<HTMLDivElement | null>(null);\n const [selfDragHandleElement, selfDragHandleRef] = useState<HTMLDivElement | null>(null);\n const [closestEdge, setEdge] = useState<Edge | null>(null);\n const { orientation, rail, separators } = useStack();\n const [size = orientation === 'horizontal' ? DEFAULT_HORIZONTAL_SIZE : DEFAULT_VERTICAL_SIZE, setInternalSize] =\n useState(propsSize);\n\n const Root = role ?? 'div';\n\n const composedItemRef = composeRefs<HTMLDivElement>(itemRef, forwardedRef);\n\n const setSize = useCallback(\n (nextSize: StackItemSize, commit?: boolean) => {\n setInternalSize(nextSize);\n if (commit) {\n onSizeChange?.(nextSize);\n }\n },\n [onSizeChange],\n );\n\n const type = orientation === 'horizontal' ? 'column' : 'card';\n\n useLayoutEffect(() => {\n if (!itemElement || !onRearrange) {\n return;\n }\n return combine(\n draggable({\n element: itemElement,\n ...(selfDragHandleElement && { dragHandle: selfDragHandleElement }),\n getInitialData: () => ({ id: item.id, type }),\n }),\n dropTargetForElements({\n element: itemElement,\n getData: ({ input, element }) => {\n return attachClosestEdge(\n { id: item.id, type },\n { input, element, allowedEdges: orientation === 'horizontal' ? ['left', 'right'] : ['top', 'bottom'] },\n );\n },\n onDragEnter: ({ self, source }) => {\n if (source.data.type === self.data.type) {\n setEdge(extractClosestEdge(self.data));\n }\n },\n onDrag: ({ self, source }) => {\n if (source.data.type === self.data.type) {\n setEdge(extractClosestEdge(self.data));\n }\n },\n onDragLeave: () => setEdge(null),\n onDrop: ({ self, source }) => {\n setEdge(null);\n if (source.data.type === self.data.type) {\n onRearrange(source.data as StackItemData, self.data as StackItemData, extractClosestEdge(self.data));\n }\n },\n }),\n );\n }, [orientation, item, onRearrange, selfDragHandleElement, itemElement]);\n\n const focusGroupAttrs = useFocusableGroup({ tabBehavior: 'limited' });\n\n return (\n <StackItemContext.Provider value={{ selfDragHandleRef, size, setSize }}>\n <Root\n {...props}\n tabIndex={0}\n {...focusGroupAttrs}\n className={mx(\n 'group/stack-item grid relative ch-focus-ring-inset-over-all',\n size === 'min-content' && (orientation === 'horizontal' ? 'is-min' : 'bs-min'),\n orientation === 'horizontal' ? 'grid-rows-subgrid' : 'grid-cols-subgrid',\n rail && (orientation === 'horizontal' ? 'row-span-2' : 'col-span-2'),\n separators && (orientation === 'horizontal' ? 'divide-separator divide-y' : 'divide-separator divide-x'),\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 && <DropIndicator edge={closestEdge} />}\n </Root>\n </StackItemContext.Provider>\n );\n },\n);\n\nexport const StackItem = {\n Root: StackItemRoot,\n Content: StackItemContent,\n Heading: StackItemHeading,\n HeadingLabel: StackItemHeadingLabel,\n ResizeHandle: StackItemResizeHandle,\n Sigil: StackItemSigil,\n SigilButton: StackItemSigilButton,\n};\n\nexport type {\n StackItemContentProps,\n StackItemHeadingProps,\n StackItemHeadingLabelProps,\n StackItemSigilProps,\n StackItemSigilButtonProps,\n StackItemSigilAction,\n};\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport React, { type ComponentPropsWithoutRef } 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 toolbar?: boolean;\n statusbar?: boolean;\n contentSize?: 'cover' | 'intrinsic';\n};\n\nexport const StackItemContent = ({\n children,\n toolbar = true,\n statusbar,\n contentSize = 'cover',\n classNames,\n ...props\n}: StackItemContentProps) => {\n const { size, separators } = useStack();\n\n return (\n <div\n role='none'\n {...props}\n className={mx(\n 'group grid grid-cols-[100%]',\n size === 'contain' && 'min-bs-0 overflow-hidden',\n separators && 'divide-separator divide-y',\n classNames,\n )}\n style={{\n gridTemplateRows: [\n ...(toolbar ? ['var(--rail-action)'] : []),\n '1fr',\n ...(statusbar ? ['var(--statusbar-size)'] : []),\n ].join(' '),\n }}\n >\n {children}\n </div>\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, useStackItem } from './StackContext';\n\nexport type StackItemHeadingProps = ThemedClassName<ComponentPropsWithoutRef<'div'>>;\n\nexport const StackItemHeading = ({ children, classNames, ...props }: StackItemHeadingProps) => {\n const { orientation } = useStack();\n const { selfDragHandleRef } = useStackItem();\n const focusableGroupAttrs = useFocusableGroup({ tabBehavior: 'limited' });\n return (\n <div\n role='heading'\n {...props}\n tabIndex={0}\n {...focusableGroupAttrs}\n className={mx(\n 'flex items-center ch-focus-ring-inset-over-all relative !border-is-0',\n orientation === 'horizontal' ? 'bs-[--rail-size]' : 'is-[--rail-size] flex-col',\n classNames,\n )}\n ref={selfDragHandleRef}\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',\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 } from './StackContext';\nimport { DEFAULT_EXTRINSIC_SIZE, type StackItemSize } from './StackItem';\n\nconst REM = parseFloat(getComputedStyle(document.documentElement).fontSize);\n\nconst MIN_SIZE = 20;\n\nconst measureStackItem = (element: HTMLButtonElement): { width: number; height: number } => {\n const stackItemElement = element.closest('[data-dx-stack-item]');\n return stackItemElement?.getBoundingClientRect() ?? { width: DEFAULT_EXTRINSIC_SIZE, height: DEFAULT_EXTRINSIC_SIZE };\n};\n\nconst getNextSize = (startSize: number, location: DragLocationHistory, client: 'clientX' | 'clientY') => {\n return Math.max(MIN_SIZE, startSize + (location.current.input[client] - location.initial.input[client]) / REM);\n};\n\nexport 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\n // we can disable the native drag preview\n disableNativeDragPreview({ nativeSetDragImage });\n // we don't want any native drop animation for when the user\n // does not drop on a drop target. we want the drag to finish immediately\n preventUnhandled.start();\n },\n onDragStart: () => {\n dragStartSize.current =\n dragStartSize.current === 'min-content'\n ? measureStackItem(buttonRef.current!)[orientation === 'horizontal' ? 'width' : 'height'] / REM\n : dragStartSize.current;\n },\n onDrag: ({ location }) => {\n if (typeof dragStartSize.current !== 'number') {\n return;\n }\n setSize(getNextSize(dragStartSize.current, location, client));\n },\n onDrop: ({ location }) => {\n if (typeof dragStartSize.current !== 'number') {\n return;\n }\n const nextSize = getNextSize(dragStartSize.current, location, client);\n setSize(nextSize, true);\n dragStartSize.current = nextSize;\n },\n });\n },\n [\n // Note that `size` should not be a dependency here since dragging this adjusts the size.\n ],\n );\n\n return (\n <button\n ref={buttonRef}\n className={mx(\n orientation === 'horizontal' ? 'cursor-col-resize' : 'cursor-row-resize',\n 'group absolute is-3 bs-full inline-end-[-1px] !border-lb-0',\n 'before:transition-opacity before:duration-100 before:ease-in-out before:opacity-0 hover:before:opacity-100 focus-visible:before:opacity-100 active:before:opacity-100',\n 'before:absolute before:block before:inset-block-0 before:inline-end-0 before:is-1 before:bg-accentFocusIndicator',\n )}\n >\n <div\n role='none'\n className='absolute block-start-0 inline-end-[1px] bs-[--rail-size] flex items-center group-hover:opacity-0 group-focus-visible:opacity-0 group-active:opacity-0'\n >\n <DragHandleSignifier />\n </div>\n </button>\n );\n};\n\nconst DragHandleSignifier = () => {\n return (\n <svg\n xmlns='http://www.w3.org/2000/svg'\n viewBox='0 0 256 256'\n fill='currentColor'\n className='shrink-0 bs-[1em] is-[1em] text-unAccent'\n >\n {/* two pips: <path d='M256,120c-8.8,0-16-7.2-16-16v-56c0-8.8,7.2-16,16-16v88Z' />\n <path d='M256,232c-8.8,0-16-7.2-16-16v-56c0-8.8,7.2-16,16-16v88Z' /> */}\n <path d='M256,64c-8.8,0-16-7.2-16-16s7.2-16,16-16v32Z' />\n <path d='M256,120c-8.8,0-16-7.2-16-16s7.2-16,16-16v32Z' />\n <path d='M256,176c-8.8,0-16-7.2-16-16s7.2-16,16-16v32Z' />\n <path d='M256,232c-8.8,0-16-7.2-16-16s7.2-16,16-16v32Z' />\n </svg>\n );\n};\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport React, { Fragment, type PropsWithChildren, forwardRef, useRef, useState } from 'react';\n\nimport { type ActionLike } from '@dxos/app-graph';\nimport { keySymbols } from '@dxos/keyboard';\nimport {\n Button,\n type ButtonProps,\n DropdownMenu,\n Icon,\n toLocalizedString,\n Tooltip,\n useTranslation,\n} from '@dxos/react-ui';\nimport { type AttendableId, type Related, useAttention } from '@dxos/react-ui-attention';\nimport { descriptionText, mx } from '@dxos/react-ui-theme';\nimport { getHostPlatform } from '@dxos/util';\n\nimport { MenuSignifierHorizontal } from './MenuSignifier';\nimport { translationKey } from '../translations';\n\nexport type KeyBinding = {\n windows?: string;\n macos?: string;\n ios?: string;\n linux?: string;\n unknown?: string;\n};\n\nexport type StackItemSigilAction = Pick<ActionLike, 'id' | 'properties' | 'data'>;\n\nexport type StackItemSigilButtonProps = Omit<ButtonProps, 'variant'> & AttendableId & Related;\n\nexport const StackItemSigilButton = forwardRef<HTMLButtonElement, StackItemSigilButtonProps>(\n ({ attendableId, classNames, related, children, ...props }, forwardedRef) => {\n const { hasAttention, isAncestor, isRelated } = useAttention(attendableId);\n const variant = (related && isRelated) || hasAttention || isAncestor ? 'primary' : 'ghost';\n return (\n <Button\n {...props}\n variant={variant}\n classNames={['m-1 shrink-0 pli-0 min-bs-0 is-[--rail-action] bs-[--rail-action] relative', classNames]}\n ref={forwardedRef}\n >\n <MenuSignifierHorizontal />\n {children}\n </Button>\n );\n },\n);\n\nexport type StackItemSigilProps = PropsWithChildren<\n {\n attendableId?: string;\n triggerLabel: string;\n actions?: StackItemSigilAction[][];\n icon: string;\n onAction?: (action: StackItemSigilAction) => void;\n } & Related\n>;\n\nexport const StackItemSigil = forwardRef<HTMLButtonElement, StackItemSigilProps>(\n ({ actions: actionGroups, onAction, triggerLabel, attendableId, icon, related, children }, forwardedRef) => {\n const { t } = useTranslation(translationKey);\n const suppressNextTooltip = useRef(false);\n\n const [optionsMenuOpen, setOptionsMenuOpen] = useState(false);\n const [triggerTooltipOpen, setTriggerTooltipOpen] = useState(false);\n\n return (\n <Tooltip.Root\n open={triggerTooltipOpen}\n onOpenChange={(nextOpen) => {\n if (suppressNextTooltip.current) {\n setTriggerTooltipOpen(false);\n suppressNextTooltip.current = false;\n } else {\n setTriggerTooltipOpen(nextOpen);\n }\n }}\n >\n <DropdownMenu.Root\n {...{\n open: optionsMenuOpen,\n onOpenChange: (nextOpen: boolean) => {\n if (!nextOpen) {\n suppressNextTooltip.current = true;\n }\n return setOptionsMenuOpen(nextOpen);\n },\n }}\n >\n <Tooltip.Trigger asChild>\n <DropdownMenu.Trigger asChild ref={forwardedRef}>\n <StackItemSigilButton attendableId={attendableId} related={related}>\n <span className='sr-only'>{triggerLabel}</span>\n <Icon icon={icon} size={5} />\n </StackItemSigilButton>\n </DropdownMenu.Trigger>\n </Tooltip.Trigger>\n <DropdownMenu.Portal>\n <DropdownMenu.Content classNames='z-[31]'>\n <DropdownMenu.Viewport>\n {actionGroups?.map((actions, index) => {\n const separator = index > 0 ? <DropdownMenu.Separator /> : null;\n return (\n <Fragment key={index}>\n {separator}\n {actions.map((action) => {\n const shortcut =\n typeof action.properties.keyBinding === 'string'\n ? action.properties.keyBinding\n : action.properties.keyBinding?.[getHostPlatform()];\n\n const menuItemType = action.properties.menuItemType;\n const Root = menuItemType === 'toggle' ? DropdownMenu.CheckboxItem : DropdownMenu.Item;\n\n return (\n <Root\n key={action.id}\n onClick={(event) => {\n if (action.properties.disabled) {\n return;\n }\n event.stopPropagation();\n // TODO(thure): Why does Dialog’s modal-ness cause issues if we don’t explicitly close the menu here?\n suppressNextTooltip.current = true;\n setOptionsMenuOpen(false);\n onAction?.(action);\n }}\n classNames='gap-2'\n disabled={action.properties.disabled}\n checked={menuItemType === 'toggle' ? action.properties.isChecked : undefined}\n {...(action.properties?.testId && { 'data-testid': action.properties.testId })}\n >\n <Icon icon={action.properties.icon ?? 'ph--placeholder--regular'} size={4} />\n <span className='grow truncate'>{toLocalizedString(action.properties.label ?? '', t)}</span>\n {menuItemType === 'toggle' && (\n <DropdownMenu.ItemIndicator asChild>\n <Icon icon='ph--check--regular' size={4} />\n </DropdownMenu.ItemIndicator>\n )}\n {shortcut && (\n <span className={mx('shrink-0', descriptionText)}>{keySymbols(shortcut).join('')}</span>\n )}\n </Root>\n );\n })}\n </Fragment>\n );\n })}\n {children}\n </DropdownMenu.Viewport>\n <DropdownMenu.Arrow />\n </DropdownMenu.Content>\n </DropdownMenu.Portal>\n </DropdownMenu.Root>\n <Tooltip.Portal>\n <Tooltip.Content style={{ zIndex: 70 }} side='bottom'>\n {triggerLabel}\n <Tooltip.Arrow />\n </Tooltip.Content>\n </Tooltip.Portal>\n </Tooltip.Root>\n );\n },\n);\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport React from 'react';\n\nexport const MenuSignifierHorizontal = () => (\n <svg\n className='absolute block-end-[7px]'\n width={20}\n height={2}\n viewBox='0 0 20 2'\n stroke='currentColor'\n opacity={0.5}\n >\n <line\n x1={0.5}\n y1={0.75}\n x2={19}\n y2={0.75}\n strokeWidth={1.25}\n strokeLinecap='round'\n strokeDasharray='6 20'\n strokeDashoffset='-6.5'\n />\n </svg>\n);\n\nexport const MenuSignifierVertical = () => (\n <svg className='absolute inline-start-1' width={2} height={18} viewBox='0 0 2 18' stroke='currentColor'>\n <line x1={1} y1={3} x2={1} y2={18} strokeWidth={1.5} strokeLinecap='round' strokeDasharray='0 6' />\n </svg>\n);\n", "//\n// Copyright 2023 DXOS.org\n//\n\nexport const translationKey = 'stack';\n\nexport default [\n {\n 'en-US': {\n [translationKey]: {\n 'resize label': 'Drag to resize',\n 'pin start label': 'Pin to the left sidebar',\n 'pin end label': 'Pin to the right sidebar',\n 'increment start label': 'Move to the left',\n 'increment end label': 'Move to the right',\n 'solo plank label': 'Toggle solo mode',\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' classNames='z-[70]'>\n {label}\n </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--minus--regular'\n }\n />\n )}\n {children}\n </ButtonGroup>\n );\n },\n);\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,2BAAwC;AACxC,mBAA4F;AAG5F,4BAAmB;ACJnB,IAAAA,gBAA0C;ACA1C,qBAAwB;AACxB,q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,GAAG,OAAOsG,UAAU,WAAW,WAAW,OAAA,QAAe;IAClErN,YAAYsN;IACZnE,SAAS,MAAMA,UAAU,OAAA;IACzByE,eAAY;IACZ9G,MACEuG,UAAU,iBACN,iCACAA,UAAU,eACR,kCACA;MAIXtN,QAAAA;AAGP,CAAA;",
|
|
6
|
+
"names": ["import_react", "import_react_tabster", "import_react_ui_theme", "import_adapter", "import_react_ui_attention", "import_react_ui", "StackContext", "createContext", "orientation", "rail", "size", "separators", "useStack", "useContext", "StackItemContext", "selfDragHandleRef", "setSize", "useStackItem", "railGridHorizontal", "railGridVertical", "Stack", "forwardRef", "children", "classNames", "style", "itemsCount", "Children", "count", "props", "forwardedRef", "arrowNavigationGroup", "useArrowNavigationGroup", "axis", "styles", "React", "Provider", "value", "div", "className", "mx", "aria-orientation", "ref", "StackItemContent", "toolbar", "statusbar", "contentSize", "role", "gridTemplateRows", "join", "StackItemHeading", "focusableGroupAttrs", "useFocusableGroup", "tabBehavior", "tabIndex", "StackItemHeadingLabel", "attendableId", "related", "hasAttention", "isAncestor", "isRelated", "useAttention", "h1", "data-attention", "toString", "REM", "parseFloat", "getComputedStyle", "document", "documentElement", "fontSize", "MIN_SIZE", "measureStackItem", "element", "stackItemElement", "closest", "getBoundingClientRect", "width", "DEFAULT_EXTRINSIC_SIZE", "height", "getNextSize", "startSize", "location", "client", "Math", "max", "current", "input", "initial", "StackItemResizeHandle", "buttonRef", "useRef", "dragStartSize", "useLayoutEffect", "hasAttribute", "draggable", "onGenerateDragPreview", "nativeSetDragImage", "disableNativeDragPreview", "preventUnhandled", "start", "onDragStart", "onDrag", "onDrop", "nextSize", "button", "DragHandleSignifier", "svg", "xmlns", "viewBox", "fill", "path", "d", "MenuSignifierHorizontal", "stroke", "opacity", "line", "x1", "y1", "x2", "y2", "strokeWidth", "strokeLinecap", "strokeDasharray", "strokeDashoffset", "translationKey", "StackItemSigilButton", "variant", "Button", "StackItemSigil", "actions", "actionGroups", "onAction", "triggerLabel", "icon", "t", "useTranslation", "suppressNextTooltip", "optionsMenuOpen", "setOptionsMenuOpen", "useState", "triggerTooltipOpen", "setTriggerTooltipOpen", "Tooltip", "Root", "open", "onOpenChange", "nextOpen", "DropdownMenu", "Trigger", "asChild", "span", "Icon", "Portal", "Content", "Viewport", "map", "index", "separator", "Separator", "Fragment", "key", "action", "shortcut", "properties", "keyBinding", "getHostPlatform", "menuItemType", "CheckboxItem", "Item", "id", "onClick", "event", "disabled", "stopPropagation", "checked", "isChecked", "undefined", "testId", "toLocalizedString", "label", "ItemIndicator", "descriptionText", "keySymbols", "Arrow", "zIndex", "side", "DEFAULT_HORIZONTAL_SIZE", "DEFAULT_VERTICAL_SIZE", "StackItemRoot", "item", "onRearrange", "propsSize", "onSizeChange", "order", "itemElement", "itemRef", "selfDragHandleElement", "closestEdge", "setEdge", "setInternalSize", "composedItemRef", "composeRefs", "useCallback", "commit", "type", "combine", "dragHandle", "getInitialData", "dropTargetForElements", "getData", "attachClosestEdge", "allowedEdges", "onDragEnter", "self", "source", "data", "extractClosestEdge", "onDragLeave", "focusGroupAttrs", "data-dx-stack-item", "Number", "isFinite", "DropIndicator", "edge", "StackItem", "Heading", "HeadingLabel", "ResizeHandle", "Sigil", "SigilButton", "LayoutControl", "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/CaretDownUp.tsx":{"bytes":3080,"imports":[{"path":"react","kind":"import-statement","external":true}],"format":"esm"},"packages/ui/react-ui-stack/src/components/style-fragments.ts":{"bytes":707,"imports":[],"format":"esm"},"packages/ui/react-ui-stack/src/translations.ts":{"bytes":2050,"imports":[],"format":"esm"},"packages/ui/react-ui-stack/src/components/Section.tsx":{"bytes":39706,"imports":[{"path":"@fluentui/react-tabster","kind":"import-statement","external":true},{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"@radix-ui/react-collapsible","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-attention","kind":"import-statement","external":true},{"path":"@dxos/react-ui-deck","kind":"import-statement","external":true},{"path":"@dxos/react-ui-mosaic","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"packages/ui/react-ui-stack/src/components/CaretDownUp.tsx","kind":"import-statement","original":"./CaretDownUp"},{"path":"packages/ui/react-ui-stack/src/components/style-fragments.ts","kind":"import-statement","original":"./style-fragments"},{"path":"packages/ui/react-ui-stack/src/translations.ts","kind":"import-statement","original":"../translations"}],"format":"esm"},"packages/ui/react-ui-stack/src/components/Stack.tsx":{"bytes":16642,"imports":[{"path":"@fluentui/react-tabster","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"react-resize-detector","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-mosaic","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"packages/ui/react-ui-stack/src/components/Section.tsx","kind":"import-statement","original":"./Section"},{"path":"packages/ui/react-ui-stack/src/components/style-fragments.ts","kind":"import-statement","original":"./style-fragments"},{"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":832,"imports":[{"path":"packages/ui/react-ui-stack/src/components/Stack.tsx","kind":"import-statement","original":"./Stack"},{"path":"packages/ui/react-ui-stack/src/components/Section.tsx","kind":"import-statement","original":"./Section"}],"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":7412,"imports":[],"format":"esm"},"packages/ui/react-ui-stack/src/testing/index.ts":{"bytes":711,"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":33628},"packages/ui/react-ui-stack/dist/lib/node/index.cjs":{"imports":[{"path":"@fluentui/react-tabster","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"react-resize-detector","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-mosaic","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"@fluentui/react-tabster","kind":"import-statement","external":true},{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"@radix-ui/react-collapsible","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-attention","kind":"import-statement","external":true},{"path":"@dxos/react-ui-deck","kind":"import-statement","external":true},{"path":"@dxos/react-ui-mosaic","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true}],"exports":["DEFAULT_TYPE","SectionToolbar","Stack","sectionToolbarLayout","translations"],"entryPoint":"packages/ui/react-ui-stack/src/index.ts","inputs":{"packages/ui/react-ui-stack/src/components/Stack.tsx":{"bytesInOutput":3542},"packages/ui/react-ui-stack/src/components/Section.tsx":{"bytesInOutput":10044},"packages/ui/react-ui-stack/src/components/CaretDownUp.tsx":{"bytesInOutput":779},"packages/ui/react-ui-stack/src/components/style-fragments.ts":{"bytesInOutput":79},"packages/ui/react-ui-stack/src/translations.ts":{"bytesInOutput":508},"packages/ui/react-ui-stack/src/components/index.ts":{"bytesInOutput":0},"packages/ui/react-ui-stack/src/index.ts":{"bytesInOutput":0}},"bytes":15510},"packages/ui/react-ui-stack/dist/lib/node/testing/index.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":3713},"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":1569},"packages/ui/react-ui-stack/src/testing/index.ts":{"bytesInOutput":0}},"bytes":1708}}}
|
|
1
|
+
{"inputs":{"packages/ui/react-ui-stack/src/components/StackContext.tsx":{"bytes":2741,"imports":[{"path":"react","kind":"import-statement","external":true}],"format":"esm"},"packages/ui/react-ui-stack/src/components/Stack.tsx":{"bytes":7327,"imports":[{"path":"@fluentui/react-tabster","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"}],"format":"esm"},"packages/ui/react-ui-stack/src/components/StackItemContent.tsx":{"bytes":3733,"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/StackItemHeading.tsx":{"bytes":6082,"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":14860,"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":2010,"imports":[],"format":"esm"},"packages/ui/react-ui-stack/src/components/StackItemSigil.tsx":{"bytes":20212,"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":20108,"imports":[{"path":"@atlaskit/pragmatic-drag-and-drop/combine","kind":"import-statement","external":true},{"path":"@atlaskit/pragmatic-drag-and-drop/element/adapter","kind":"import-statement","external":true},{"path":"@atlaskit/pragmatic-drag-and-drop-hitbox/closest-edge","kind":"import-statement","external":true},{"path":"@atlaskit/pragmatic-drag-and-drop-react-drop-indicator/box","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-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/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":11771,"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":701,"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"}],"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":711,"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":48064},"packages/ui/react-ui-stack/dist/lib/node/index.cjs":{"imports":[{"path":"@fluentui/react-tabster","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":"@atlaskit/pragmatic-drag-and-drop/combine","kind":"import-statement","external":true},{"path":"@atlaskit/pragmatic-drag-and-drop/element/adapter","kind":"import-statement","external":true},{"path":"@atlaskit/pragmatic-drag-and-drop-hitbox/closest-edge","kind":"import-statement","external":true},{"path":"@atlaskit/pragmatic-drag-and-drop-react-drop-indicator/box","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-theme","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","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","railGridHorizontal","railGridVertical","translations"],"entryPoint":"packages/ui/react-ui-stack/src/index.ts","inputs":{"packages/ui/react-ui-stack/src/components/Stack.tsx":{"bytesInOutput":1616},"packages/ui/react-ui-stack/src/components/StackContext.tsx":{"bytesInOutput":428},"packages/ui/react-ui-stack/src/components/index.ts":{"bytesInOutput":0},"packages/ui/react-ui-stack/src/components/StackItem.tsx":{"bytesInOutput":4562},"packages/ui/react-ui-stack/src/components/StackItemContent.tsx":{"bytesInOutput":720},"packages/ui/react-ui-stack/src/components/StackItemHeading.tsx":{"bytesInOutput":1350},"packages/ui/react-ui-stack/src/components/StackItemResizeHandle.tsx":{"bytesInOutput":3741},"packages/ui/react-ui-stack/src/components/StackItemSigil.tsx":{"bytesInOutput":4909},"packages/ui/react-ui-stack/src/components/MenuSignifier.tsx":{"bytesInOutput":442},"packages/ui/react-ui-stack/src/translations.ts":{"bytesInOutput":492},"packages/ui/react-ui-stack/src/components/LayoutControls.tsx":{"bytesInOutput":3060},"packages/ui/react-ui-stack/src/index.ts":{"bytesInOutput":0}},"bytes":22392},"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}}}
|
|
@@ -27,17 +27,14 @@ var StackManager = class {
|
|
|
27
27
|
this.locator = locator;
|
|
28
28
|
this._page = locator.page();
|
|
29
29
|
}
|
|
30
|
-
empty() {
|
|
31
|
-
return this.locator.getByTestId("stack.empty");
|
|
32
|
-
}
|
|
33
30
|
sections() {
|
|
34
|
-
return this.locator.locator("
|
|
31
|
+
return this.locator.locator("section");
|
|
35
32
|
}
|
|
36
33
|
order() {
|
|
37
|
-
return this.locator.locator("
|
|
34
|
+
return this.locator.locator("section").evaluateAll((els) => els.map((el) => el.getAttribute("id")));
|
|
38
35
|
}
|
|
39
36
|
section(index) {
|
|
40
|
-
return new SectionManager(this.locator.locator("
|
|
37
|
+
return new SectionManager(this.locator.locator("section").nth(index));
|
|
41
38
|
}
|
|
42
39
|
};
|
|
43
40
|
var SectionManager = class {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/testing/stack-manager.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport type { Locator, Page } from '@playwright/test';\n\nexport class StackManager {\n private readonly _page: Page;\n\n constructor(readonly locator: Locator) {\n this._page = locator.page();\n }\n\n
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAMO,IAAMA,eAAN,MAAMA;EAGXC,YAAqBC,SAAkB;SAAlBA,UAAAA;AACnB,SAAKC,QAAQD,QAAQE,KAAI;EAC3B;EAEAC,
|
|
6
|
-
"names": ["StackManager", "constructor", "locator", "_page", "page", "
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport type { Locator, Page } from '@playwright/test';\n\nexport class StackManager {\n private readonly _page: Page;\n\n constructor(readonly locator: Locator) {\n this._page = locator.page();\n }\n\n sections() {\n return this.locator.locator('section');\n }\n\n order() {\n return this.locator.locator('section').evaluateAll((els) => els.map((el) => el.getAttribute('id')));\n }\n\n section(index: number) {\n return new SectionManager(this.locator.locator('section').nth(index));\n }\n}\n\nexport class SectionManager {\n private readonly _page: Page;\n\n constructor(readonly locator: Locator) {\n this._page = locator.page();\n }\n\n async id() {\n return this.locator.getAttribute('id');\n }\n\n async remove() {\n await this.locator.getByTestId('section.drag-handle-menu-trigger').click();\n await this._page.getByTestId('section.remove').click();\n }\n\n async navigateTo() {\n await this.locator.getByTestId('section.drag-handle-menu-trigger').click();\n await this._page.getByTestId('section.navigate-to').click();\n }\n\n async dragTo(target: Locator, offset: { x: number; y: number } = { x: 0, y: 0 }) {\n const active = this.locator.getByTestId('section.drag-handle-menu-trigger');\n const box = await target.boundingBox();\n if (box) {\n await active.hover();\n await this._page.mouse.down();\n // Timeouts are for input discretization in WebKit\n await this._page.waitForTimeout(100);\n await this._page.pause();\n await this._page.mouse.move(offset.x + box.x + box.width / 2, offset.y + box.y + box.height / 2, { steps: 4 });\n await this._page.pause();\n await this._page.waitForTimeout(100);\n await this._page.mouse.up();\n }\n }\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAMO,IAAMA,eAAN,MAAMA;EAGXC,YAAqBC,SAAkB;SAAlBA,UAAAA;AACnB,SAAKC,QAAQD,QAAQE,KAAI;EAC3B;EAEAC,WAAW;AACT,WAAO,KAAKH,QAAQA,QAAQ,SAAA;EAC9B;EAEAI,QAAQ;AACN,WAAO,KAAKJ,QAAQA,QAAQ,SAAA,EAAWK,YAAY,CAACC,QAAQA,IAAIC,IAAI,CAACC,OAAOA,GAAGC,aAAa,IAAA,CAAA,CAAA;EAC9F;EAEAC,QAAQC,OAAe;AACrB,WAAO,IAAIC,eAAe,KAAKZ,QAAQA,QAAQ,SAAA,EAAWa,IAAIF,KAAAA,CAAAA;EAChE;AACF;AAEO,IAAMC,iBAAN,MAAMA;EAGXb,YAAqBC,SAAkB;SAAlBA,UAAAA;AACnB,SAAKC,QAAQD,QAAQE,KAAI;EAC3B;EAEA,MAAMY,KAAK;AACT,WAAO,KAAKd,QAAQS,aAAa,IAAA;EACnC;EAEA,MAAMM,SAAS;AACb,UAAM,KAAKf,QAAQgB,YAAY,kCAAA,EAAoCC,MAAK;AACxE,UAAM,KAAKhB,MAAMe,YAAY,gBAAA,EAAkBC,MAAK;EACtD;EAEA,MAAMC,aAAa;AACjB,UAAM,KAAKlB,QAAQgB,YAAY,kCAAA,EAAoCC,MAAK;AACxE,UAAM,KAAKhB,MAAMe,YAAY,qBAAA,EAAuBC,MAAK;EAC3D;EAEA,MAAME,OAAOC,QAAiBC,SAAmC;IAAEC,GAAG;IAAGC,GAAG;EAAE,GAAG;AAC/E,UAAMC,SAAS,KAAKxB,QAAQgB,YAAY,kCAAA;AACxC,UAAMS,MAAM,MAAML,OAAOM,YAAW;AACpC,QAAID,KAAK;AACP,YAAMD,OAAOG,MAAK;AAClB,YAAM,KAAK1B,MAAM2B,MAAMC,KAAI;AAE3B,YAAM,KAAK5B,MAAM6B,eAAe,GAAA;AAChC,YAAM,KAAK7B,MAAM8B,MAAK;AACtB,YAAM,KAAK9B,MAAM2B,MAAMI,KAAKX,OAAOC,IAAIG,IAAIH,IAAIG,IAAIQ,QAAQ,GAAGZ,OAAOE,IAAIE,IAAIF,IAAIE,IAAIS,SAAS,GAAG;QAAEC,OAAO;MAAE,CAAA;AAC5G,YAAM,KAAKlC,MAAM8B,MAAK;AACtB,YAAM,KAAK9B,MAAM6B,eAAe,GAAA;AAChC,YAAM,KAAK7B,MAAM2B,MAAMQ,GAAE;IAC3B;EACF;AACF;",
|
|
6
|
+
"names": ["StackManager", "constructor", "locator", "_page", "page", "sections", "order", "evaluateAll", "els", "map", "el", "getAttribute", "section", "index", "SectionManager", "nth", "id", "remove", "getByTestId", "click", "navigateTo", "dragTo", "target", "offset", "x", "y", "active", "box", "boundingBox", "hover", "mouse", "down", "waitForTimeout", "pause", "move", "width", "height", "steps", "up"]
|
|
7
7
|
}
|