@dxos/react-ui-mosaic 0.8.4-main.bc674ce → 0.8.4-main.bcb3aa67d6
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/chunk-UTD5AWW5.mjs +1009 -0
- package/dist/lib/browser/chunk-UTD5AWW5.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +604 -71
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/playwright/index.mjs +148 -0
- package/dist/lib/browser/playwright/index.mjs.map +7 -0
- package/dist/lib/browser/testing/index.mjs +69 -236
- package/dist/lib/browser/testing/index.mjs.map +4 -4
- package/dist/lib/node-esm/chunk-5K56GSJL.mjs +1011 -0
- package/dist/lib/node-esm/chunk-5K56GSJL.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +604 -71
- package/dist/lib/node-esm/index.mjs.map +4 -4
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/playwright/index.mjs +150 -0
- package/dist/lib/node-esm/playwright/index.mjs.map +7 -0
- package/dist/lib/node-esm/testing/index.mjs +69 -236
- package/dist/lib/node-esm/testing/index.mjs.map +4 -4
- package/dist/types/src/components/Board/Board.d.ts +88 -0
- package/dist/types/src/components/Board/Board.d.ts.map +1 -0
- package/dist/types/src/components/Board/Board.stories.d.ts +41 -0
- package/dist/types/src/components/Board/Board.stories.d.ts.map +1 -0
- package/dist/types/src/components/Board/Column.d.ts +48 -0
- package/dist/types/src/components/Board/Column.d.ts.map +1 -0
- package/dist/types/src/components/Board/Item.d.ts +12 -0
- package/dist/types/src/components/Board/Item.d.ts.map +1 -0
- package/dist/types/src/components/Board/index.d.ts +2 -0
- package/dist/types/src/components/Board/index.d.ts.map +1 -0
- package/dist/types/src/components/Focus/Focus.d.ts +1 -24
- package/dist/types/src/components/Focus/Focus.d.ts.map +1 -1
- package/dist/types/src/components/Focus/index.d.ts +0 -1
- package/dist/types/src/components/Focus/index.d.ts.map +1 -1
- package/dist/types/src/components/Mosaic/Container.d.ts +49 -0
- package/dist/types/src/components/Mosaic/Container.d.ts.map +1 -0
- package/dist/types/src/components/Mosaic/Mosaic.d.ts +36 -126
- package/dist/types/src/components/Mosaic/Mosaic.d.ts.map +1 -1
- package/dist/types/src/components/Mosaic/Placeholder.d.ts +21 -0
- package/dist/types/src/components/Mosaic/Placeholder.d.ts.map +1 -0
- package/dist/types/src/components/Mosaic/Root.d.ts +36 -0
- package/dist/types/src/components/Mosaic/Root.d.ts.map +1 -0
- package/dist/types/src/components/Mosaic/Stack.d.ts +23 -0
- package/dist/types/src/components/Mosaic/Stack.d.ts.map +1 -0
- package/dist/types/src/components/Mosaic/Stack.stories.d.ts +20 -0
- package/dist/types/src/components/Mosaic/Stack.stories.d.ts.map +1 -0
- package/dist/types/src/components/Mosaic/Tile.d.ts +57 -0
- package/dist/types/src/components/Mosaic/Tile.d.ts.map +1 -0
- package/dist/types/src/components/Mosaic/styles.d.ts.map +1 -1
- package/dist/types/src/components/Mosaic/types.d.ts +9 -2
- package/dist/types/src/components/Mosaic/types.d.ts.map +1 -1
- package/dist/types/src/components/index.d.ts +1 -4
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/hooks/index.d.ts +1 -0
- package/dist/types/src/hooks/index.d.ts.map +1 -1
- package/dist/types/src/hooks/useDefaultColumnEventHandler.d.ts +15 -0
- package/dist/types/src/hooks/useDefaultColumnEventHandler.d.ts.map +1 -0
- package/dist/types/src/hooks/useEventHandlerAdapter.d.ts +1 -1
- package/dist/types/src/hooks/useEventHandlerAdapter.d.ts.map +1 -1
- package/dist/types/src/hooks/useVisibleItems.d.ts +2 -2
- package/dist/types/src/hooks/useVisibleItems.d.ts.map +1 -1
- package/dist/types/src/playwright/board-manager.d.ts +45 -0
- package/dist/types/src/playwright/board-manager.d.ts.map +1 -0
- package/dist/types/src/playwright/index.d.ts +9 -0
- package/dist/types/src/playwright/index.d.ts.map +1 -0
- package/dist/types/src/playwright/playwright.config.d.ts +3 -0
- package/dist/types/src/playwright/playwright.config.d.ts.map +1 -0
- package/dist/types/src/playwright/smoke.spec.d.ts +2 -0
- package/dist/types/src/playwright/smoke.spec.d.ts.map +1 -0
- package/dist/types/src/testing/CardContainer.d.ts +5 -4
- package/dist/types/src/testing/CardContainer.d.ts.map +1 -1
- package/dist/types/src/testing/DefaultStackTile.d.ts +2 -2
- package/dist/types/src/testing/DefaultStackTile.d.ts.map +1 -1
- package/dist/types/src/testing/index.d.ts +1 -1
- package/dist/types/src/testing/index.d.ts.map +1 -1
- package/dist/types/src/testing/types.d.ts +21 -0
- package/dist/types/src/testing/types.d.ts.map +1 -0
- package/dist/types/src/translations.d.ts +5 -1
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +43 -28
- package/src/AUDIT.md +106 -0
- package/src/components/Board/Board.stories.tsx +273 -0
- package/src/components/Board/Board.tsx +191 -0
- package/src/components/Board/Column.tsx +302 -0
- package/src/components/Board/Item.tsx +116 -0
- package/src/components/{Layout → Board}/index.ts +1 -1
- package/src/components/Focus/Focus.tsx +2 -93
- package/src/components/Focus/index.ts +0 -2
- package/src/components/Mosaic/Container.tsx +318 -0
- package/src/components/Mosaic/Mosaic.tsx +35 -913
- package/src/components/Mosaic/Placeholder.tsx +133 -0
- package/src/components/Mosaic/Root.tsx +292 -0
- package/src/components/Mosaic/Stack.stories.tsx +176 -0
- package/src/components/Mosaic/Stack.tsx +321 -0
- package/src/components/Mosaic/Tile.tsx +247 -0
- package/src/components/Mosaic/extension.ts +1 -1
- package/src/components/Mosaic/styles.ts +9 -8
- package/src/components/Mosaic/types.ts +15 -3
- package/src/components/index.ts +1 -4
- package/src/hooks/index.ts +1 -0
- package/src/hooks/useContainerDebug.tsx +5 -3
- package/src/hooks/useDefaultColumnEventHandler.ts +35 -0
- package/src/hooks/useEventHandlerAdapter.ts +15 -6
- package/src/hooks/useVisibleItems.ts +7 -2
- package/src/playwright/board-manager.ts +159 -0
- package/src/playwright/index.ts +13 -0
- package/src/playwright/playwright.config.ts +17 -0
- package/src/playwright/smoke.spec.ts +143 -0
- package/src/testing/CardContainer.tsx +31 -19
- package/src/testing/DefaultStackTile.tsx +36 -22
- package/src/testing/index.ts +1 -1
- package/src/testing/types.ts +38 -0
- package/src/translations.ts +5 -1
- package/dist/lib/browser/chunk-UMBPEG4F.mjs +0 -1637
- package/dist/lib/browser/chunk-UMBPEG4F.mjs.map +0 -7
- package/dist/lib/browser/index.css +0 -13
- package/dist/lib/browser/index.css.map +0 -7
- package/dist/lib/browser/testing/index.css +0 -13
- package/dist/lib/browser/testing/index.css.map +0 -7
- package/dist/lib/node-esm/chunk-X6GV7SMK.mjs +0 -1639
- package/dist/lib/node-esm/chunk-X6GV7SMK.mjs.map +0 -7
- package/dist/lib/node-esm/index.css +0 -13
- package/dist/lib/node-esm/index.css.map +0 -7
- package/dist/lib/node-esm/testing/index.css +0 -13
- package/dist/lib/node-esm/testing/index.css.map +0 -7
- package/dist/types/src/components/Card/Card.d.ts +0 -121
- package/dist/types/src/components/Card/Card.d.ts.map +0 -1
- package/dist/types/src/components/Card/Card.stories.d.ts +0 -21
- package/dist/types/src/components/Card/Card.stories.d.ts.map +0 -1
- package/dist/types/src/components/Card/CardDragPreview.d.ts +0 -6
- package/dist/types/src/components/Card/CardDragPreview.d.ts.map +0 -1
- package/dist/types/src/components/Card/index.d.ts +0 -4
- package/dist/types/src/components/Card/index.d.ts.map +0 -1
- package/dist/types/src/components/Card/styles.d.ts +0 -13
- package/dist/types/src/components/Card/styles.d.ts.map +0 -1
- package/dist/types/src/components/Focus/styles.d.ts +0 -6
- package/dist/types/src/components/Focus/styles.d.ts.map +0 -1
- package/dist/types/src/components/Image/Image.d.ts +0 -14
- package/dist/types/src/components/Image/Image.d.ts.map +0 -1
- package/dist/types/src/components/Image/Image.stories.d.ts +0 -33
- package/dist/types/src/components/Image/Image.stories.d.ts.map +0 -1
- package/dist/types/src/components/Image/index.d.ts +0 -2
- package/dist/types/src/components/Image/index.d.ts.map +0 -1
- package/dist/types/src/components/Layout/Layout.d.ts +0 -33
- package/dist/types/src/components/Layout/Layout.d.ts.map +0 -1
- package/dist/types/src/components/Layout/Layout.stories.d.ts +0 -10
- package/dist/types/src/components/Layout/Layout.stories.d.ts.map +0 -1
- package/dist/types/src/components/Layout/index.d.ts +0 -2
- package/dist/types/src/components/Layout/index.d.ts.map +0 -1
- package/dist/types/src/components/Mosaic/Mosaic.stories.d.ts +0 -27
- package/dist/types/src/components/Mosaic/Mosaic.stories.d.ts.map +0 -1
- package/dist/types/src/components/Scrollable/Scrollable.d.ts +0 -24
- package/dist/types/src/components/Scrollable/Scrollable.d.ts.map +0 -1
- package/dist/types/src/components/Scrollable/Scrollable.stories.d.ts +0 -10
- package/dist/types/src/components/Scrollable/Scrollable.stories.d.ts.map +0 -1
- package/dist/types/src/components/Scrollable/index.d.ts +0 -2
- package/dist/types/src/components/Scrollable/index.d.ts.map +0 -1
- package/dist/types/src/components/Stack/Stack.d.ts +0 -22
- package/dist/types/src/components/Stack/Stack.d.ts.map +0 -1
- package/dist/types/src/components/Stack/Stack.stories.d.ts +0 -9
- package/dist/types/src/components/Stack/Stack.stories.d.ts.map +0 -1
- package/dist/types/src/components/Stack/index.d.ts +0 -2
- package/dist/types/src/components/Stack/index.d.ts.map +0 -1
- package/dist/types/src/testing/Board.d.ts +0 -45
- package/dist/types/src/testing/Board.d.ts.map +0 -1
- package/dist/types/src/testing/Slot.stories.d.ts +0 -14
- package/dist/types/src/testing/Slot.stories.d.ts.map +0 -1
- package/dist/types/src/testing/Virtualizer.stories.d.ts +0 -12
- package/dist/types/src/testing/Virtualizer.stories.d.ts.map +0 -1
- package/src/components/Card/Card.stories.tsx +0 -148
- package/src/components/Card/Card.tsx +0 -458
- package/src/components/Card/CardDragPreview.tsx +0 -23
- package/src/components/Card/index.ts +0 -8
- package/src/components/Card/styles.ts +0 -23
- package/src/components/Focus/styles.ts +0 -24
- package/src/components/Image/Image.stories.tsx +0 -86
- package/src/components/Image/Image.tsx +0 -223
- package/src/components/Image/index.ts +0 -5
- package/src/components/Layout/Layout.stories.tsx +0 -59
- package/src/components/Layout/Layout.tsx +0 -108
- package/src/components/Mosaic/Mosaic.stories.tsx +0 -113
- package/src/components/Scrollable/Scrollable.stories.tsx +0 -59
- package/src/components/Scrollable/Scrollable.tsx +0 -88
- package/src/components/Scrollable/index.ts +0 -5
- package/src/components/Scrollable/scrollable.css +0 -20
- package/src/components/Stack/Stack.stories.tsx +0 -115
- package/src/components/Stack/Stack.tsx +0 -210
- package/src/components/Stack/index.ts +0 -5
- package/src/testing/Board.tsx +0 -278
- package/src/testing/Slot.stories.tsx +0 -101
- package/src/testing/Virtualizer.stories.tsx +0 -133
|
@@ -0,0 +1,321 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2026 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { type ReactVirtualizerOptions, useVirtualizer } from '@tanstack/react-virtual';
|
|
6
|
+
import { useComposedRefs } from '@radix-ui/react-compose-refs';
|
|
7
|
+
import React, {
|
|
8
|
+
type FC,
|
|
9
|
+
forwardRef,
|
|
10
|
+
Fragment,
|
|
11
|
+
type ReactElement,
|
|
12
|
+
type Ref,
|
|
13
|
+
useCallback,
|
|
14
|
+
useEffect,
|
|
15
|
+
useRef,
|
|
16
|
+
} from 'react';
|
|
17
|
+
|
|
18
|
+
import { invariant } from '@dxos/invariant';
|
|
19
|
+
import { type Axis, type ThemedClassName } from '@dxos/react-ui';
|
|
20
|
+
import { composable, composableProps, mx } from '@dxos/ui-theme';
|
|
21
|
+
|
|
22
|
+
import { useVisibleItems } from '../../hooks';
|
|
23
|
+
|
|
24
|
+
import { useMosaicContainerContext } from './Container';
|
|
25
|
+
import { MosaicPlaceholder, type MosaicPlaceholderProps } from './Placeholder';
|
|
26
|
+
import { styles } from './styles';
|
|
27
|
+
import { type MosaicTileProps } from './Tile';
|
|
28
|
+
import { type GetId } from './types';
|
|
29
|
+
|
|
30
|
+
//
|
|
31
|
+
// Mosaic Drag-and-drop
|
|
32
|
+
//
|
|
33
|
+
// Drop targets:
|
|
34
|
+
// - Placeholders exist to allow gaps but prevent deadspace when dragging within a container.
|
|
35
|
+
// - When dragging over a Tile, the placeholder next to the closest edge is activated.
|
|
36
|
+
// - Placeholders expand when active; event handlers are disabled while the container is scrolling.
|
|
37
|
+
//
|
|
38
|
+
// [Container]
|
|
39
|
+
// - [Placeholder 0.5]
|
|
40
|
+
// - [Tile 1 ]
|
|
41
|
+
// - [Placeholder 1.5]
|
|
42
|
+
// - [Tile 2 ]
|
|
43
|
+
// - [Placeholder 2.5]
|
|
44
|
+
// - [Tile 3 ]
|
|
45
|
+
// - [Placeholder 3.5]
|
|
46
|
+
//
|
|
47
|
+
// Implementation Notes
|
|
48
|
+
// - We use [Radix composition](https://www.radix-ui.com/primitives/docs/guides/composition) to factor out composible aspects (e.g., Focus, Mosaic, etc.)
|
|
49
|
+
// - NOTE: Use Slottable only if needed to disambiguate; otherwise a suspected Radix bug causes compositional problems.
|
|
50
|
+
|
|
51
|
+
const MOSAIC_STACK_NAME = 'MosaicStack';
|
|
52
|
+
|
|
53
|
+
type MosaicStackTileComponent<TData = any> = FC<MosaicTileProps<TData>>;
|
|
54
|
+
|
|
55
|
+
type MosaicStackProps<TData = any> = ThemedClassName<
|
|
56
|
+
{
|
|
57
|
+
role?: string;
|
|
58
|
+
getId: GetId<TData>;
|
|
59
|
+
orientation?: Axis;
|
|
60
|
+
items?: readonly TData[];
|
|
61
|
+
Tile: MosaicStackTileComponent<TData>;
|
|
62
|
+
} & Pick<MosaicTileProps<TData>, 'draggable' | 'debug'>
|
|
63
|
+
>;
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* Linear layout of Mosaic tiles.
|
|
67
|
+
* NOTE: This is a low-level component and should be wrapped by a scrollable container.
|
|
68
|
+
*/
|
|
69
|
+
const MosaicStackInner = composable<HTMLDivElement, MosaicStackProps>(
|
|
70
|
+
(
|
|
71
|
+
{ getId, orientation: orientationProp = 'vertical', items, Tile, draggable = true, debug, ...props },
|
|
72
|
+
forwardedRef,
|
|
73
|
+
) => {
|
|
74
|
+
invariant(Tile);
|
|
75
|
+
const {
|
|
76
|
+
id,
|
|
77
|
+
orientation = orientationProp,
|
|
78
|
+
dragging,
|
|
79
|
+
currentId,
|
|
80
|
+
registerScrollTo,
|
|
81
|
+
} = useMosaicContainerContext(MOSAIC_STACK_NAME);
|
|
82
|
+
const visibleItems = useVisibleItems({ id, items, dragging: dragging?.source.data, getId });
|
|
83
|
+
invariant(orientation === 'vertical' || orientation === 'horizontal', `Invalid orientation: ${orientation}`);
|
|
84
|
+
|
|
85
|
+
const rootRef = useRef<HTMLDivElement>(null);
|
|
86
|
+
const scrollToId = useCallback((targetId: string) => {
|
|
87
|
+
const el = rootRef.current?.querySelector<HTMLElement>(`[data-mosaic-tile-id="${CSS.escape(targetId)}"]`);
|
|
88
|
+
el?.scrollIntoView({ block: 'nearest', behavior: 'smooth' });
|
|
89
|
+
}, []);
|
|
90
|
+
|
|
91
|
+
useEffect(() => {
|
|
92
|
+
registerScrollTo(scrollToId);
|
|
93
|
+
return () => registerScrollTo(undefined);
|
|
94
|
+
}, [registerScrollTo, scrollToId]);
|
|
95
|
+
|
|
96
|
+
const composedRef = useComposedRefs(rootRef, forwardedRef);
|
|
97
|
+
return (
|
|
98
|
+
<div
|
|
99
|
+
{...composableProps(props, {
|
|
100
|
+
role: 'list',
|
|
101
|
+
classNames: [
|
|
102
|
+
'flex',
|
|
103
|
+
orientation === 'horizontal' && 'h-full [&>*]:shrink-0',
|
|
104
|
+
orientation === 'vertical' && 'flex-col',
|
|
105
|
+
],
|
|
106
|
+
})}
|
|
107
|
+
ref={composedRef}
|
|
108
|
+
>
|
|
109
|
+
{draggable && <InternalPlaceholder orientation={orientation} location={0.5} />}
|
|
110
|
+
{visibleItems?.map((item, index) => (
|
|
111
|
+
<Fragment key={getId(item)}>
|
|
112
|
+
<Tile
|
|
113
|
+
id={getId(item)}
|
|
114
|
+
data={item}
|
|
115
|
+
location={index + 1}
|
|
116
|
+
draggable={draggable}
|
|
117
|
+
current={getId(item) === currentId}
|
|
118
|
+
debug={debug}
|
|
119
|
+
/>
|
|
120
|
+
{draggable && <InternalPlaceholder orientation={orientation} location={index + 1.5} />}
|
|
121
|
+
</Fragment>
|
|
122
|
+
))}
|
|
123
|
+
</div>
|
|
124
|
+
);
|
|
125
|
+
},
|
|
126
|
+
);
|
|
127
|
+
|
|
128
|
+
MosaicStackInner.displayName = MOSAIC_STACK_NAME;
|
|
129
|
+
|
|
130
|
+
const MosaicStack = MosaicStackInner as <TData = any>(
|
|
131
|
+
props: MosaicStackProps<TData> & { ref?: Ref<HTMLDivElement> },
|
|
132
|
+
) => ReactElement;
|
|
133
|
+
|
|
134
|
+
//
|
|
135
|
+
// VirtualStack
|
|
136
|
+
//
|
|
137
|
+
|
|
138
|
+
const MOSAIC_VIRTUAL_STACK_NAME = 'MosaicVirtualStack';
|
|
139
|
+
|
|
140
|
+
type MosaicVirtualStackProps<TData = any> = MosaicStackProps<TData> &
|
|
141
|
+
Pick<
|
|
142
|
+
ReactVirtualizerOptions<HTMLElement, HTMLDivElement>,
|
|
143
|
+
'estimateSize' | 'gap' | 'getScrollElement' | 'overscan' | 'onChange'
|
|
144
|
+
>;
|
|
145
|
+
|
|
146
|
+
const MosaicVirtualStackInner = forwardRef<HTMLDivElement, MosaicVirtualStackProps>(
|
|
147
|
+
(
|
|
148
|
+
{
|
|
149
|
+
orientation = 'vertical',
|
|
150
|
+
items,
|
|
151
|
+
getId,
|
|
152
|
+
Tile,
|
|
153
|
+
estimateSize,
|
|
154
|
+
getScrollElement,
|
|
155
|
+
overscan = 8,
|
|
156
|
+
gap,
|
|
157
|
+
onChange,
|
|
158
|
+
draggable = true,
|
|
159
|
+
debug,
|
|
160
|
+
...props
|
|
161
|
+
},
|
|
162
|
+
forwardedRef,
|
|
163
|
+
) => {
|
|
164
|
+
invariant(Tile);
|
|
165
|
+
const { id, dragging, currentId, registerScrollTo } = useMosaicContainerContext(MOSAIC_VIRTUAL_STACK_NAME);
|
|
166
|
+
const visibleItems = useVisibleItems({ id, items, dragging: dragging?.source.data, getId });
|
|
167
|
+
// In draggable mode virtual indices alternate: even=placeholder, odd=tile.
|
|
168
|
+
// Wrap estimateSize so placeholders get 0 (their actual negligible height) and
|
|
169
|
+
// tile slots receive the caller's estimate at the correct tile index.
|
|
170
|
+
// This keeps getTotalSize() stable as items are measured → no scrollbar drift.
|
|
171
|
+
const wrappedEstimateSize = draggable
|
|
172
|
+
? (index: number) => (index % 2 === 0 ? 0 : estimateSize(Math.floor(index / 2)))
|
|
173
|
+
: estimateSize;
|
|
174
|
+
|
|
175
|
+
const virtualizer = useVirtualizer({
|
|
176
|
+
// NOTE: When draggable we double the number of items to allow for placeholders.
|
|
177
|
+
count: draggable ? visibleItems.length * 2 + 1 : visibleItems.length,
|
|
178
|
+
estimateSize: wrappedEstimateSize,
|
|
179
|
+
gap,
|
|
180
|
+
// Key measurements by stable item ID so the size cache survives scrolling;
|
|
181
|
+
// without this, measurements are indexed by position and are lost when items reorder.
|
|
182
|
+
getItemKey: draggable
|
|
183
|
+
? (index) => (index % 2 === 0 ? `ph-${index}` : getId(visibleItems![Math.floor(index / 2)]))
|
|
184
|
+
: (index) => getId(visibleItems![index]),
|
|
185
|
+
getScrollElement,
|
|
186
|
+
overscan,
|
|
187
|
+
onChange,
|
|
188
|
+
});
|
|
189
|
+
|
|
190
|
+
// Register scroll-to-item via virtualizer index lookup.
|
|
191
|
+
const scrollToId = useCallback(
|
|
192
|
+
(targetId: string) => {
|
|
193
|
+
const itemIndex = visibleItems.findIndex((item) => getId(item) === targetId);
|
|
194
|
+
if (itemIndex >= 0) {
|
|
195
|
+
const virtualIndex = draggable ? itemIndex * 2 + 1 : itemIndex;
|
|
196
|
+
virtualizer.scrollToIndex(virtualIndex, { align: 'start', behavior: 'smooth' });
|
|
197
|
+
}
|
|
198
|
+
},
|
|
199
|
+
[visibleItems, getId, draggable, virtualizer],
|
|
200
|
+
);
|
|
201
|
+
|
|
202
|
+
useEffect(() => {
|
|
203
|
+
registerScrollTo(scrollToId);
|
|
204
|
+
return () => registerScrollTo(undefined);
|
|
205
|
+
}, [registerScrollTo, scrollToId]);
|
|
206
|
+
|
|
207
|
+
const virtualItems = virtualizer.getVirtualItems();
|
|
208
|
+
const getData = (index: number): { data?: any; location: number } => {
|
|
209
|
+
if (draggable) {
|
|
210
|
+
if (index % 2 === 0) {
|
|
211
|
+
return { location: Math.floor(index / 2) + 0.5 };
|
|
212
|
+
} else {
|
|
213
|
+
return { data: visibleItems![Math.floor(index / 2)], location: Math.floor(index / 2) + 1 };
|
|
214
|
+
}
|
|
215
|
+
} else {
|
|
216
|
+
return { data: visibleItems![index], location: index + 1 };
|
|
217
|
+
}
|
|
218
|
+
};
|
|
219
|
+
|
|
220
|
+
return (
|
|
221
|
+
<div
|
|
222
|
+
{...composableProps(props, {
|
|
223
|
+
role: 'list',
|
|
224
|
+
classNames: [
|
|
225
|
+
// shrink-0 is required: this div sets an explicit height via inline style (getTotalSize).
|
|
226
|
+
// Without it, a parent flex container (e.g. ScrollArea.Viewport) would shrink this div
|
|
227
|
+
// to the viewport height, collapsing the scroll content and causing scrollbar drift.
|
|
228
|
+
'flex shrink-0',
|
|
229
|
+
orientation === 'horizontal' && 'h-full [&>*]:shrink-0',
|
|
230
|
+
orientation === 'vertical' && 'flex-col',
|
|
231
|
+
],
|
|
232
|
+
})}
|
|
233
|
+
style={{
|
|
234
|
+
position: 'relative',
|
|
235
|
+
...(orientation === 'vertical'
|
|
236
|
+
? {
|
|
237
|
+
width: '100%',
|
|
238
|
+
height: virtualizer.getTotalSize(),
|
|
239
|
+
}
|
|
240
|
+
: {
|
|
241
|
+
width: virtualizer.getTotalSize(),
|
|
242
|
+
height: '100%',
|
|
243
|
+
}),
|
|
244
|
+
}}
|
|
245
|
+
ref={forwardedRef}
|
|
246
|
+
>
|
|
247
|
+
{virtualItems.map(({ key, index, start }) => {
|
|
248
|
+
const { data, location } = getData(index);
|
|
249
|
+
return (
|
|
250
|
+
<div
|
|
251
|
+
key={key}
|
|
252
|
+
data-index={index}
|
|
253
|
+
style={{
|
|
254
|
+
position: 'absolute',
|
|
255
|
+
top: 0,
|
|
256
|
+
left: 0,
|
|
257
|
+
...(orientation === 'vertical'
|
|
258
|
+
? {
|
|
259
|
+
width: '100%',
|
|
260
|
+
transform: `translateY(${start}px)`,
|
|
261
|
+
}
|
|
262
|
+
: {
|
|
263
|
+
height: '100%',
|
|
264
|
+
transform: `translateX(${start}px)`,
|
|
265
|
+
}),
|
|
266
|
+
}}
|
|
267
|
+
ref={virtualizer.measureElement}
|
|
268
|
+
>
|
|
269
|
+
{data ? (
|
|
270
|
+
<Tile
|
|
271
|
+
id={getId(data)}
|
|
272
|
+
data={data}
|
|
273
|
+
location={location}
|
|
274
|
+
draggable={draggable}
|
|
275
|
+
current={getId(data) === currentId}
|
|
276
|
+
debug={debug}
|
|
277
|
+
/>
|
|
278
|
+
) : (
|
|
279
|
+
<InternalPlaceholder orientation={orientation} location={location} />
|
|
280
|
+
)}
|
|
281
|
+
</div>
|
|
282
|
+
);
|
|
283
|
+
})}
|
|
284
|
+
</div>
|
|
285
|
+
);
|
|
286
|
+
},
|
|
287
|
+
);
|
|
288
|
+
|
|
289
|
+
MosaicVirtualStackInner.displayName = MOSAIC_VIRTUAL_STACK_NAME;
|
|
290
|
+
|
|
291
|
+
const MosaicVirtualStack = MosaicVirtualStackInner as <TData = any>(
|
|
292
|
+
props: MosaicVirtualStackProps<TData> & { ref?: Ref<HTMLDivElement> },
|
|
293
|
+
) => ReactElement;
|
|
294
|
+
(MosaicVirtualStack as any)[Symbol.for('dxos.composable')] = true;
|
|
295
|
+
|
|
296
|
+
//
|
|
297
|
+
// InternalPlaceholder
|
|
298
|
+
//
|
|
299
|
+
|
|
300
|
+
const InternalPlaceholder = (props: MosaicPlaceholderProps<number>) => {
|
|
301
|
+
return (
|
|
302
|
+
<MosaicPlaceholder {...props} classNames={styles.placeholder.root}>
|
|
303
|
+
<div
|
|
304
|
+
className={mx(
|
|
305
|
+
'flex h-full bg-base-surface border border-dashed border-separator rounded-xs',
|
|
306
|
+
styles.placeholder.content,
|
|
307
|
+
)}
|
|
308
|
+
/>
|
|
309
|
+
</MosaicPlaceholder>
|
|
310
|
+
);
|
|
311
|
+
};
|
|
312
|
+
|
|
313
|
+
InternalPlaceholder.displayName = 'InternalPlaceholder';
|
|
314
|
+
|
|
315
|
+
//
|
|
316
|
+
// Exports
|
|
317
|
+
//
|
|
318
|
+
|
|
319
|
+
export { MosaicStack, MosaicVirtualStack };
|
|
320
|
+
|
|
321
|
+
export type { MosaicStackTileComponent, MosaicStackProps, MosaicVirtualStackProps };
|
|
@@ -0,0 +1,247 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { combine } from '@atlaskit/pragmatic-drag-and-drop/combine';
|
|
6
|
+
import {
|
|
7
|
+
type ElementDragPayload,
|
|
8
|
+
draggable,
|
|
9
|
+
dropTargetForElements,
|
|
10
|
+
} from '@atlaskit/pragmatic-drag-and-drop/element/adapter';
|
|
11
|
+
import { preserveOffsetOnSource } from '@atlaskit/pragmatic-drag-and-drop/element/preserve-offset-on-source';
|
|
12
|
+
import { setCustomNativeDragPreview } from '@atlaskit/pragmatic-drag-and-drop/element/set-custom-native-drag-preview';
|
|
13
|
+
import { type DropTargetRecord } from '@atlaskit/pragmatic-drag-and-drop/types';
|
|
14
|
+
import {
|
|
15
|
+
type Edge,
|
|
16
|
+
attachClosestEdge,
|
|
17
|
+
extractClosestEdge,
|
|
18
|
+
} from '@atlaskit/pragmatic-drag-and-drop-hitbox/closest-edge';
|
|
19
|
+
import { composeRefs } from '@radix-ui/react-compose-refs';
|
|
20
|
+
import { createContext } from '@radix-ui/react-context';
|
|
21
|
+
import { Primitive } from '@radix-ui/react-primitive';
|
|
22
|
+
import { Slot } from '@radix-ui/react-slot';
|
|
23
|
+
import React, { type PropsWithChildren, useLayoutEffect, useMemo, useRef, useState } from 'react';
|
|
24
|
+
import { createPortal } from 'react-dom';
|
|
25
|
+
|
|
26
|
+
import { type ThemedClassName } from '@dxos/react-ui';
|
|
27
|
+
import { composableProps, slottable } from '@dxos/ui-theme';
|
|
28
|
+
|
|
29
|
+
import { useMosaicContainerContext } from './Container';
|
|
30
|
+
import { type LocationType, type MosaicTileData, getSourceData } from './types';
|
|
31
|
+
|
|
32
|
+
//
|
|
33
|
+
// Tile
|
|
34
|
+
//
|
|
35
|
+
|
|
36
|
+
const MOSAIC_TILE_NAME = 'Mosaic.Tile';
|
|
37
|
+
|
|
38
|
+
type MosaicTileState =
|
|
39
|
+
| { type: 'idle' }
|
|
40
|
+
| { type: 'preview'; container: HTMLElement; rect: DOMRect }
|
|
41
|
+
| { type: 'dragging' }
|
|
42
|
+
| { type: 'target'; closestEdge: Edge | null };
|
|
43
|
+
|
|
44
|
+
type MosaicTileContextValue = {
|
|
45
|
+
state: MosaicTileState;
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
const [MosaicTileContextProvider, useMosaicTileContext] = createContext<MosaicTileContextValue>('MosaicTile');
|
|
49
|
+
|
|
50
|
+
// State attribute: data-[mosaic-tile-state=dragging]
|
|
51
|
+
const MOSAIC_TILE_STATE_ATTR = 'mosaic-tile-state';
|
|
52
|
+
|
|
53
|
+
type MosaicTileProps<TData = any, TLocation = LocationType> = ThemedClassName<
|
|
54
|
+
PropsWithChildren<{
|
|
55
|
+
className?: string;
|
|
56
|
+
dragHandle?: HTMLElement | null;
|
|
57
|
+
allowedEdges?: Edge[];
|
|
58
|
+
id: string;
|
|
59
|
+
data: TData;
|
|
60
|
+
location: TLocation;
|
|
61
|
+
draggable?: boolean;
|
|
62
|
+
/** Whether this tile is the current (aria-current) item. */
|
|
63
|
+
current?: boolean;
|
|
64
|
+
debug?: boolean;
|
|
65
|
+
}>
|
|
66
|
+
>;
|
|
67
|
+
|
|
68
|
+
const MosaicTile = slottable<HTMLDivElement, MosaicTileProps>(
|
|
69
|
+
(
|
|
70
|
+
{
|
|
71
|
+
children,
|
|
72
|
+
asChild,
|
|
73
|
+
dragHandle,
|
|
74
|
+
allowedEdges: allowedEdgesProp,
|
|
75
|
+
location,
|
|
76
|
+
id,
|
|
77
|
+
data: dataProp,
|
|
78
|
+
draggable: draggableProp,
|
|
79
|
+
current: _current,
|
|
80
|
+
debug: _,
|
|
81
|
+
...props
|
|
82
|
+
},
|
|
83
|
+
forwardedRef,
|
|
84
|
+
) => {
|
|
85
|
+
const Comp = asChild ? Slot : Primitive.div;
|
|
86
|
+
const rootRef = useRef<HTMLDivElement>(null);
|
|
87
|
+
const composedRef = composeRefs<HTMLDivElement>(rootRef, forwardedRef);
|
|
88
|
+
|
|
89
|
+
// State.
|
|
90
|
+
const {
|
|
91
|
+
id: containerId,
|
|
92
|
+
eventHandler,
|
|
93
|
+
orientation,
|
|
94
|
+
scrolling,
|
|
95
|
+
setActiveLocation,
|
|
96
|
+
} = useMosaicContainerContext(MOSAIC_TILE_NAME);
|
|
97
|
+
const [state, setState] = useState<MosaicTileState>({ type: 'idle' });
|
|
98
|
+
|
|
99
|
+
const allowedEdges = useMemo<Edge[]>(
|
|
100
|
+
() => allowedEdgesProp || (orientation === 'vertical' ? ['top', 'bottom'] : ['left', 'right']),
|
|
101
|
+
[allowedEdgesProp, orientation],
|
|
102
|
+
);
|
|
103
|
+
|
|
104
|
+
const data = useMemo<MosaicTileData>(
|
|
105
|
+
() =>
|
|
106
|
+
({
|
|
107
|
+
type: 'tile',
|
|
108
|
+
id,
|
|
109
|
+
containerId,
|
|
110
|
+
data: dataProp,
|
|
111
|
+
location,
|
|
112
|
+
}) satisfies MosaicTileData,
|
|
113
|
+
[containerId, location, dataProp],
|
|
114
|
+
);
|
|
115
|
+
|
|
116
|
+
useLayoutEffect(() => {
|
|
117
|
+
const root = rootRef.current;
|
|
118
|
+
if (!draggableProp || !root || !containerId || scrolling) {
|
|
119
|
+
return;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
const handleChange = ({ self, source }: { self: DropTargetRecord; source: ElementDragPayload }) => {
|
|
123
|
+
if (source.data.id !== dataProp.id) {
|
|
124
|
+
const closestEdge = extractClosestEdge(self.data);
|
|
125
|
+
const location = data.location + (closestEdge === 'top' || closestEdge === 'left' ? -0.5 : 0.5);
|
|
126
|
+
setActiveLocation(location);
|
|
127
|
+
setState({ type: 'target', closestEdge });
|
|
128
|
+
}
|
|
129
|
+
};
|
|
130
|
+
|
|
131
|
+
return combine(
|
|
132
|
+
// Source.
|
|
133
|
+
draggable({
|
|
134
|
+
element: root,
|
|
135
|
+
dragHandle: dragHandle && state.type !== 'preview' ? dragHandle : undefined,
|
|
136
|
+
canDrag: () => true,
|
|
137
|
+
getInitialData: () => data,
|
|
138
|
+
onGenerateDragPreview: ({ location, nativeSetDragImage }) => {
|
|
139
|
+
setCustomNativeDragPreview({
|
|
140
|
+
nativeSetDragImage,
|
|
141
|
+
getOffset: preserveOffsetOnSource({
|
|
142
|
+
element: root,
|
|
143
|
+
input: location.current.input,
|
|
144
|
+
}),
|
|
145
|
+
render: ({ container }) => {
|
|
146
|
+
data.bounds = root.getBoundingClientRect();
|
|
147
|
+
setState({
|
|
148
|
+
type: 'preview',
|
|
149
|
+
container,
|
|
150
|
+
rect: root.getBoundingClientRect(),
|
|
151
|
+
});
|
|
152
|
+
return () => setState({ type: 'dragging' });
|
|
153
|
+
},
|
|
154
|
+
});
|
|
155
|
+
},
|
|
156
|
+
|
|
157
|
+
onDragStart: () => {
|
|
158
|
+
setState({ type: 'dragging' });
|
|
159
|
+
},
|
|
160
|
+
onDrop: () => {
|
|
161
|
+
setState({ type: 'idle' });
|
|
162
|
+
},
|
|
163
|
+
}),
|
|
164
|
+
|
|
165
|
+
// Target.
|
|
166
|
+
dropTargetForElements({
|
|
167
|
+
element: root,
|
|
168
|
+
getData: ({ input, element }) => attachClosestEdge(data, { input, element, allowedEdges }),
|
|
169
|
+
canDrop: ({ source }) => {
|
|
170
|
+
const data = getSourceData(source);
|
|
171
|
+
return (data && eventHandler.canDrop?.({ source: data })) || false;
|
|
172
|
+
},
|
|
173
|
+
onDragEnter: ({ self, source }) => {
|
|
174
|
+
handleChange({ self, source });
|
|
175
|
+
},
|
|
176
|
+
onDragLeave: () => {
|
|
177
|
+
setState({ type: 'idle' });
|
|
178
|
+
setActiveLocation(undefined);
|
|
179
|
+
},
|
|
180
|
+
onDrag: ({ self, source }) => {
|
|
181
|
+
handleChange({ self, source });
|
|
182
|
+
},
|
|
183
|
+
onDrop: () => {
|
|
184
|
+
setState({ type: 'idle' });
|
|
185
|
+
setActiveLocation(undefined);
|
|
186
|
+
},
|
|
187
|
+
}),
|
|
188
|
+
);
|
|
189
|
+
}, [
|
|
190
|
+
rootRef,
|
|
191
|
+
forwardedRef,
|
|
192
|
+
containerId,
|
|
193
|
+
dragHandle,
|
|
194
|
+
eventHandler,
|
|
195
|
+
data,
|
|
196
|
+
scrolling,
|
|
197
|
+
allowedEdges,
|
|
198
|
+
setActiveLocation,
|
|
199
|
+
]);
|
|
200
|
+
|
|
201
|
+
const { className, ...rest } = composableProps(props, { classNames: 'relative outline-none' });
|
|
202
|
+
|
|
203
|
+
// NOTE: Ensure no gaps between cells (prevent drop indicators flickering).
|
|
204
|
+
// NOTE: Ensure padding doesn't change position of cursor when dragging (no margins).
|
|
205
|
+
return (
|
|
206
|
+
<MosaicTileContextProvider state={state}>
|
|
207
|
+
<Comp
|
|
208
|
+
{...rest}
|
|
209
|
+
{...{
|
|
210
|
+
'data-mosaic-tile-id': id,
|
|
211
|
+
[`data-${MOSAIC_TILE_STATE_ATTR}`]: state.type,
|
|
212
|
+
}}
|
|
213
|
+
role='listitem'
|
|
214
|
+
className={className}
|
|
215
|
+
ref={composedRef}
|
|
216
|
+
>
|
|
217
|
+
{children}
|
|
218
|
+
</Comp>
|
|
219
|
+
|
|
220
|
+
{/* Dragging preview. */}
|
|
221
|
+
{state.type === 'preview' &&
|
|
222
|
+
createPortal(
|
|
223
|
+
<Comp
|
|
224
|
+
{...{
|
|
225
|
+
// NOTE: Use to control appearance while dragging.
|
|
226
|
+
[`data-${MOSAIC_TILE_STATE_ATTR}`]: state.type,
|
|
227
|
+
}}
|
|
228
|
+
className={className}
|
|
229
|
+
style={{
|
|
230
|
+
width: `${state.rect.width}px`,
|
|
231
|
+
height: `${state.rect.height}px`,
|
|
232
|
+
}}
|
|
233
|
+
>
|
|
234
|
+
{children}
|
|
235
|
+
</Comp>,
|
|
236
|
+
state.container,
|
|
237
|
+
)}
|
|
238
|
+
</MosaicTileContextProvider>
|
|
239
|
+
);
|
|
240
|
+
},
|
|
241
|
+
);
|
|
242
|
+
|
|
243
|
+
MosaicTile.displayName = MOSAIC_TILE_NAME;
|
|
244
|
+
|
|
245
|
+
export { MosaicTile, useMosaicTileContext };
|
|
246
|
+
|
|
247
|
+
export type { MosaicTileProps, MosaicTileState };
|
|
@@ -123,7 +123,7 @@ const dropField = StateField.define<DecorationSet>({
|
|
|
123
123
|
toDOM() {
|
|
124
124
|
const dom = document.createElement('span');
|
|
125
125
|
dom.className = 'cm-drop-cursor';
|
|
126
|
-
dom.style.borderLeft = '2px solid var(--
|
|
126
|
+
dom.style.borderLeft = '2px solid var(--color-accent-surface)';
|
|
127
127
|
dom.style.display = 'inline-block';
|
|
128
128
|
dom.style.height = '1em';
|
|
129
129
|
dom.style.verticalAlign = 'middle';
|
|
@@ -11,10 +11,11 @@ export const styles = {
|
|
|
11
11
|
'group-data-[mosaic-debug="true"]:opacity-100',
|
|
12
12
|
'group-data-[mosaic-debug="true"]:bg-orange-500',
|
|
13
13
|
'data-[mosaic-placeholder-state=active]:opacity-100',
|
|
14
|
-
'data-[mosaic-placeholder-
|
|
15
|
-
'data-[mosaic-placeholder-
|
|
16
|
-
'data-[mosaic-placeholder-
|
|
17
|
-
'data-[mosaic-placeholder-
|
|
14
|
+
'data-[mosaic-placeholder-orientation=vertical]:snap-start', // TODO(burdon): Option.
|
|
15
|
+
'data-[mosaic-placeholder-orientation=vertical]:py-1',
|
|
16
|
+
'data-[mosaic-placeholder-orientation=vertical]:data-[mosaic-placeholder-state=active]:py-2.5',
|
|
17
|
+
'data-[mosaic-placeholder-orientation=horizontal]:px-1',
|
|
18
|
+
'data-[mosaic-placeholder-orientation=horizontal]:data-[mosaic-placeholder-state=active]:px-2.5',
|
|
18
19
|
],
|
|
19
20
|
content: [
|
|
20
21
|
'transition-all duration-0',
|
|
@@ -22,10 +23,10 @@ export const styles = {
|
|
|
22
23
|
// TODO(burdon): Flickers when start to drag since source is removed and then the placeholder shows up.
|
|
23
24
|
// - Use absolute positioning?
|
|
24
25
|
// 'group-data-[mosaic-placeholder-state=active]:duration-200',
|
|
25
|
-
'group-data-[mosaic-placeholder-
|
|
26
|
-
'group-data-[mosaic-placeholder-
|
|
27
|
-
'group-data-[mosaic-placeholder-
|
|
28
|
-
'group-data-[mosaic-placeholder-
|
|
26
|
+
'group-data-[mosaic-placeholder-orientation=vertical]:h-0',
|
|
27
|
+
'group-data-[mosaic-placeholder-orientation=vertical]:group-data-[mosaic-placeholder-state=active]:h-[var(--mosaic-placeholder-height)]',
|
|
28
|
+
'group-data-[mosaic-placeholder-orientation=horizontal]:w-0',
|
|
29
|
+
'group-data-[mosaic-placeholder-orientation=horizontal]:group-data-[mosaic-placeholder-state=active]:w-[var(--mosaic-placeholder-width)]',
|
|
29
30
|
],
|
|
30
31
|
},
|
|
31
32
|
} satisfies Record<string, Record<string, ClassNameValue>>;
|
|
@@ -2,12 +2,24 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
export type Axis = 'vertical' | 'horizontal';
|
|
7
|
-
export type AllowedAxis = Axis | 'all';
|
|
5
|
+
import { type ElementDragPayload } from '@atlaskit/pragmatic-drag-and-drop/element/adapter';
|
|
8
6
|
|
|
9
7
|
export type GetId<TData = any> = (data: TData) => string;
|
|
10
8
|
|
|
9
|
+
/**
|
|
10
|
+
* NOTE: Must implement value equivalence.
|
|
11
|
+
*/
|
|
12
|
+
export type LocationType = string | number;
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Get the source data from the drag payload.
|
|
16
|
+
*/
|
|
17
|
+
export const getSourceData = <TData = any, TLocation = any>(
|
|
18
|
+
source: ElementDragPayload,
|
|
19
|
+
): MosaicTileData<TData, TLocation> | null => {
|
|
20
|
+
return source.data.type === 'tile' ? (source.data as MosaicTileData<TData, TLocation>) : null;
|
|
21
|
+
};
|
|
22
|
+
|
|
11
23
|
/**
|
|
12
24
|
* Draggable item.
|
|
13
25
|
* Tiles may contain arbitrary data (which may not be an ECHO object; e.g., search result).
|
package/src/components/index.ts
CHANGED
package/src/hooks/index.ts
CHANGED
|
@@ -31,11 +31,13 @@ export const useContainerDebug = (debug?: boolean): UseContainerDebug => {
|
|
|
31
31
|
}, [debug, debugRef]);
|
|
32
32
|
};
|
|
33
33
|
|
|
34
|
+
const CONTAINER_INFO_NAME = 'ContainerInfo';
|
|
35
|
+
|
|
34
36
|
const ContainerInfo = forwardRef<HTMLDivElement, ThemedClassName>(({ classNames }, forwardedRef) => {
|
|
35
|
-
const { id, state, activeLocation, scrolling } = useMosaicContainer(
|
|
37
|
+
const { id, state, activeLocation, scrolling } = useMosaicContainer(CONTAINER_INFO_NAME);
|
|
36
38
|
const counter = useRef(0);
|
|
37
39
|
return (
|
|
38
|
-
<Json
|
|
40
|
+
<Json.Data
|
|
39
41
|
data={{ id, activeLocation, scrolling, state, count: counter.current++ }}
|
|
40
42
|
classNames={mx('text-xs', classNames)}
|
|
41
43
|
ref={forwardedRef}
|
|
@@ -43,4 +45,4 @@ const ContainerInfo = forwardRef<HTMLDivElement, ThemedClassName>(({ classNames
|
|
|
43
45
|
);
|
|
44
46
|
});
|
|
45
47
|
|
|
46
|
-
ContainerInfo.displayName =
|
|
48
|
+
ContainerInfo.displayName = CONTAINER_INFO_NAME;
|