@dxos/react-ui-mosaic 0.10.0 → 0.11.1
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/chunk-Mosaic.mjs +1024 -0
- package/dist/lib/chunk-Mosaic.mjs.map +1 -0
- package/dist/lib/index.mjs +653 -0
- package/dist/lib/index.mjs.map +1 -0
- package/dist/lib/playwright.mjs +200 -0
- package/dist/lib/playwright.mjs.map +1 -0
- package/dist/lib/testing.mjs +127 -0
- package/dist/lib/testing.mjs.map +1 -0
- package/dist/lib/translations.mjs +11 -0
- package/dist/lib/translations.mjs.map +1 -0
- package/dist/types/src/components/Board/Board.d.ts +7 -27
- package/dist/types/src/components/Board/Board.d.ts.map +1 -1
- package/dist/types/src/components/Board/Board.stories.d.ts.map +1 -1
- package/dist/types/src/components/Board/BoardColumnContext.d.ts +10 -0
- package/dist/types/src/components/Board/BoardColumnContext.d.ts.map +1 -0
- package/dist/types/src/components/Board/BoardContext.d.ts +26 -0
- package/dist/types/src/components/Board/BoardContext.d.ts.map +1 -0
- package/dist/types/src/components/Board/Column.d.ts +2 -7
- package/dist/types/src/components/Board/Column.d.ts.map +1 -1
- package/dist/types/src/components/Board/index.d.ts +2 -0
- package/dist/types/src/components/Board/index.d.ts.map +1 -1
- package/dist/types/src/components/Focus/Focus.d.ts.map +1 -1
- package/dist/types/src/components/Mosaic/Container.d.ts +6 -34
- package/dist/types/src/components/Mosaic/Container.d.ts.map +1 -1
- package/dist/types/src/components/Mosaic/Mosaic.d.ts +10 -15
- package/dist/types/src/components/Mosaic/Mosaic.d.ts.map +1 -1
- package/dist/types/src/components/Mosaic/MosaicContainerContext.d.ts +34 -0
- package/dist/types/src/components/Mosaic/MosaicContainerContext.d.ts.map +1 -0
- package/dist/types/src/components/Mosaic/MosaicTileContext.d.ts +31 -0
- package/dist/types/src/components/Mosaic/MosaicTileContext.d.ts.map +1 -0
- package/dist/types/src/components/Mosaic/Placeholder.d.ts +3 -3
- package/dist/types/src/components/Mosaic/Placeholder.d.ts.map +1 -1
- package/dist/types/src/components/Mosaic/Stack.d.ts +8 -2
- package/dist/types/src/components/Mosaic/Stack.d.ts.map +1 -1
- package/dist/types/src/components/Mosaic/Stack.stories.d.ts.map +1 -1
- package/dist/types/src/components/Mosaic/Tile.d.ts +6 -32
- package/dist/types/src/components/Mosaic/Tile.d.ts.map +1 -1
- package/dist/types/src/components/Mosaic/VirtualStackPagination.stories.d.ts +13 -0
- package/dist/types/src/components/Mosaic/VirtualStackPagination.stories.d.ts.map +1 -0
- package/dist/types/src/components/Mosaic/index.d.ts +0 -1
- package/dist/types/src/components/Mosaic/index.d.ts.map +1 -1
- package/dist/types/src/components/SearchStack/SearchStack.d.ts +1 -1
- package/dist/types/src/components/SearchStack/SearchStack.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 +2 -2
- package/dist/types/src/hooks/useDefaultColumnEventHandler.d.ts.map +1 -1
- package/dist/types/src/hooks/useEventHandlerAdapter.d.ts +3 -3
- package/dist/types/src/hooks/useEventHandlerAdapter.d.ts.map +1 -1
- package/dist/types/src/hooks/useVirtualizerPagination.d.ts +60 -0
- package/dist/types/src/hooks/useVirtualizerPagination.d.ts.map +1 -0
- package/dist/types/src/hooks/useVirtualizerPagination.test.d.ts +2 -0
- package/dist/types/src/hooks/useVirtualizerPagination.test.d.ts.map +1 -0
- package/dist/types/src/hooks/useVisibleItems.d.ts +2 -2
- package/dist/types/src/hooks/useVisibleItems.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +35 -37
- package/src/components/Board/Board.stories.tsx +7 -6
- package/src/components/Board/Board.tsx +9 -54
- package/src/components/Board/BoardColumnContext.ts +25 -0
- package/src/components/Board/BoardContext.ts +43 -0
- package/src/components/Board/Column.tsx +13 -27
- package/src/components/Board/Item.tsx +2 -2
- package/src/components/Board/index.ts +3 -0
- package/src/components/Mosaic/Container.tsx +31 -53
- package/src/components/Mosaic/DragHandle.tsx +1 -1
- package/src/components/Mosaic/{Mosaic.tsx → Mosaic.ts} +5 -16
- package/src/components/Mosaic/MosaicContainerContext.ts +44 -0
- package/src/components/Mosaic/MosaicTileContext.ts +34 -0
- package/src/components/Mosaic/Placeholder.tsx +7 -8
- package/src/components/Mosaic/ResizeHandle.stories.tsx +4 -4
- package/src/components/Mosaic/ResizeHandle.tsx +2 -2
- package/src/components/Mosaic/Stack.stories.tsx +49 -13
- package/src/components/Mosaic/Stack.tsx +30 -9
- package/src/components/Mosaic/Tile.tsx +33 -33
- package/src/components/Mosaic/VirtualStackPagination.stories.tsx +423 -0
- package/src/components/Mosaic/index.ts +0 -1
- package/src/hooks/index.ts +1 -0
- package/src/hooks/useDefaultColumnEventHandler.ts +2 -2
- package/src/hooks/useEventHandlerAdapter.ts +4 -5
- package/src/hooks/useVirtualizerPagination.test.tsx +105 -0
- package/src/hooks/useVirtualizerPagination.ts +473 -0
- package/src/hooks/useVisibleItems.ts +2 -2
- package/src/playwright/smoke.spec.ts +4 -1
- package/src/testing/DefaultStackTile.tsx +1 -1
- package/src/testing/decorator.tsx +3 -3
- package/dist/lib/browser/chunk-OBVIYZLR.mjs +0 -1119
- package/dist/lib/browser/chunk-OBVIYZLR.mjs.map +0 -7
- package/dist/lib/browser/index.mjs +0 -701
- package/dist/lib/browser/index.mjs.map +0 -7
- package/dist/lib/browser/meta.json +0 -1
- package/dist/lib/browser/playwright/index.mjs +0 -256
- package/dist/lib/browser/playwright/index.mjs.map +0 -7
- package/dist/lib/browser/testing/index.mjs +0 -136
- package/dist/lib/browser/testing/index.mjs.map +0 -7
- package/dist/lib/browser/translations.mjs +0 -18
- package/dist/lib/browser/translations.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-4IEMCMIV.mjs +0 -1121
- package/dist/lib/node-esm/chunk-4IEMCMIV.mjs.map +0 -7
- package/dist/lib/node-esm/index.mjs +0 -702
- package/dist/lib/node-esm/index.mjs.map +0 -7
- package/dist/lib/node-esm/meta.json +0 -1
- package/dist/lib/node-esm/playwright/index.mjs +0 -258
- package/dist/lib/node-esm/playwright/index.mjs.map +0 -7
- package/dist/lib/node-esm/testing/index.mjs +0 -137
- package/dist/lib/node-esm/testing/index.mjs.map +0 -7
- package/dist/lib/node-esm/translations.mjs +0 -20
- package/dist/lib/node-esm/translations.mjs.map +0 -7
- package/dist/types/src/components/Mosaic/Root.d.ts +0 -35
- package/dist/types/src/components/Mosaic/Root.d.ts.map +0 -1
- package/dist/types/src/components/Mosaic/types.d.ts +0 -86
- package/dist/types/src/components/Mosaic/types.d.ts.map +0 -1
- package/src/components/Mosaic/Root.tsx +0 -288
- package/src/components/Mosaic/types.ts +0 -94
- /package/src/components/Focus/{Focus.tsx → Focus.ts} +0 -0
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { type Atom } from '@effect-atom/atom-react';
|
|
2
|
+
import { type GetId } from '@dxos/react-ui-dnd';
|
|
3
|
+
export interface BoardModel<TColumn = any, TItem = any> {
|
|
4
|
+
getColumnId: GetId<TColumn>;
|
|
5
|
+
getItemId: GetId<TItem>;
|
|
6
|
+
isColumn: (obj: unknown) => obj is TColumn;
|
|
7
|
+
isItem: (obj: unknown) => obj is TItem;
|
|
8
|
+
columns: Atom.Atom<readonly TColumn[] | TColumn[]>;
|
|
9
|
+
items: (column: TColumn) => Atom.Atom<TItem[]>;
|
|
10
|
+
getColumns: () => TColumn[];
|
|
11
|
+
getItems: (column: TColumn) => TItem[];
|
|
12
|
+
onColumnCreate?: () => Promise<TColumn>;
|
|
13
|
+
onColumnDelete?: (column: TColumn) => void;
|
|
14
|
+
onItemCreate?: (column: TColumn) => Promise<TItem>;
|
|
15
|
+
onItemDelete?: (column: TColumn, item: TItem) => void;
|
|
16
|
+
}
|
|
17
|
+
export declare const BOARD_NAME = "Board";
|
|
18
|
+
export type BoardContextValue<TColumn = any, TItem = any> = {
|
|
19
|
+
model: BoardModel<TColumn, TItem>;
|
|
20
|
+
};
|
|
21
|
+
export declare const BoardContextProvider: import("react").FC<BoardContextValue<any, any> & {
|
|
22
|
+
children: React.ReactNode;
|
|
23
|
+
}>, useBoardContext: (consumerName: string) => BoardContextValue<any, any>;
|
|
24
|
+
/** Hook to read the board model from context (e.g. in custom column tiles). Pass TColumn and TItem for typed model. */
|
|
25
|
+
export declare function useBoard<TColumn = any, TItem = any>(displayName?: string): BoardContextValue<TColumn, TItem>;
|
|
26
|
+
//# sourceMappingURL=BoardContext.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BoardContext.d.ts","sourceRoot":"","sources":["../../../../../src/components/Board/BoardContext.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAGpD,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAKhD,MAAM,WAAW,UAAU,CAAC,OAAO,GAAG,GAAG,EAAE,KAAK,GAAG,GAAG;IACpD,WAAW,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC;IAC5B,SAAS,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC;IACxB,QAAQ,EAAE,CAAC,GAAG,EAAE,OAAO,KAAK,GAAG,IAAI,OAAO,CAAC;IAC3C,MAAM,EAAE,CAAC,GAAG,EAAE,OAAO,KAAK,GAAG,IAAI,KAAK,CAAC;IACvC,OAAO,EAAE,IAAI,CAAC,IAAI,CAAC,SAAS,OAAO,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACnD,KAAK,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC,CAAC;IAC/C,UAAU,EAAE,MAAM,OAAO,EAAE,CAAC;IAC5B,QAAQ,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,KAAK,EAAE,CAAC;IACvC,cAAc,CAAC,EAAE,MAAM,OAAO,CAAC,OAAO,CAAC,CAAC;IACxC,cAAc,CAAC,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,IAAI,CAAC;IAC3C,YAAY,CAAC,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,OAAO,CAAC,KAAK,CAAC,CAAC;IACnD,YAAY,CAAC,EAAE,CAAC,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,KAAK,KAAK,IAAI,CAAC;CACvD;AAMD,eAAO,MAAM,UAAU,UAAU,CAAC;AAElC,MAAM,MAAM,iBAAiB,CAAC,OAAO,GAAG,GAAG,EAAE,KAAK,GAAG,GAAG,IAAI;IAC1D,KAAK,EAAE,UAAU,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;CACnC,CAAC;AAEF,eAAO,MAAO,oBAAoB;;IAAE,eAAe,uDAAgD,CAAC;AAEpG,uHAAuH;AACvH,wBAAgB,QAAQ,CAAC,OAAO,GAAG,GAAG,EAAE,KAAK,GAAG,GAAG,EAAE,WAAW,CAAC,EAAE,MAAM,GAAG,iBAAiB,CAAC,OAAO,EAAE,KAAK,CAAC,CAE5G"}
|
|
@@ -1,11 +1,6 @@
|
|
|
1
1
|
import React, { type PropsWithChildren, type ReactElement, type Ref as ReactRef } from 'react';
|
|
2
2
|
import { Obj } from '@dxos/echo';
|
|
3
3
|
import { type MosaicContainerProps, type MosaicStackProps, type MosaicTileProps } from '../Mosaic';
|
|
4
|
-
export type BoardColumnContextValue<TColumn = unknown> = {
|
|
5
|
-
column: TColumn;
|
|
6
|
-
};
|
|
7
|
-
/** Returns the current column when rendered inside a board column (e.g., in column header or item tile). */
|
|
8
|
-
export declare function useBoardColumn<TColumn = unknown>(): TColumn | undefined;
|
|
9
4
|
type BoardColumnProps<TColumn = any> = Pick<MosaicTileProps<TColumn>, 'classNames' | 'location' | 'data' | 'debug' | 'draggable'>;
|
|
10
5
|
type BoardColumnRootProps<TColumn = any> = PropsWithChildren<BoardColumnProps<TColumn>> & {
|
|
11
6
|
dragHandle?: HTMLButtonElement | null;
|
|
@@ -24,10 +19,10 @@ export declare const BoardColumn: {
|
|
|
24
19
|
}) => ReactElement;
|
|
25
20
|
Header: React.ForwardRefExoticComponent<Omit<BoardColumnHeaderProps, "className"> & {
|
|
26
21
|
classNames?: import("@dxos/ui-types").ClassNameValue;
|
|
27
|
-
} & Pick<React.HTMLAttributes<Element>, "children" | "
|
|
22
|
+
} & Pick<React.HTMLAttributes<Element>, "children" | "role" | "style"> & React.RefAttributes<HTMLDivElement>>;
|
|
28
23
|
Body: React.ForwardRefExoticComponent<Omit<BoardColumnBodyProps, "className"> & {
|
|
29
24
|
classNames?: import("@dxos/ui-types").ClassNameValue;
|
|
30
|
-
} & Pick<React.HTMLAttributes<Element>, "children" | "
|
|
25
|
+
} & Pick<React.HTMLAttributes<Element>, "children" | "role" | "style"> & React.RefAttributes<HTMLDivElement>>;
|
|
31
26
|
Footer: React.ForwardRefExoticComponent<Omit<{}, "className"> & {
|
|
32
27
|
classNames?: import("@dxos/ui-types").ClassNameValue;
|
|
33
28
|
} & {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Column.d.ts","sourceRoot":"","sources":["../../../../../src/components/Board/Column.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Column.d.ts","sourceRoot":"","sources":["../../../../../src/components/Board/Column.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,EACZ,KAAK,iBAAiB,EACtB,KAAK,YAAY,EACjB,KAAK,GAAG,IAAI,QAAQ,EAIrB,MAAM,OAAO,CAAC;AAEf,OAAO,EAAE,GAAG,EAAO,MAAM,YAAY,CAAC;AAWtC,OAAO,EAAU,KAAK,oBAAoB,EAAE,KAAK,gBAAgB,EAAE,KAAK,eAAe,EAAE,MAAM,WAAW,CAAC;AAK3G,KAAK,gBAAgB,CAAC,OAAO,GAAG,GAAG,IAAI,IAAI,CACzC,eAAe,CAAC,OAAO,CAAC,EACxB,YAAY,GAAG,UAAU,GAAG,MAAM,GAAG,OAAO,GAAG,WAAW,CAC3D,CAAC;AAQF,KAAK,oBAAoB,CAAC,OAAO,GAAG,GAAG,IAAI,iBAAiB,CAAC,gBAAgB,CAAC,OAAO,CAAC,CAAC,GAAG;IAIxF,UAAU,CAAC,EAAE,iBAAiB,GAAG,IAAI,CAAC;CACvC,CAAC;AA+CF,KAAK,sBAAsB,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,aAAa,EAAE,QAAQ,CAAC,iBAAiB,CAAC,CAAA;CAAE,CAAC;AAwD5F,KAAK,oBAAoB,GAAG,IAAI,CAAC,gBAAgB,EAAE,MAAM,CAAC,GACxD,IAAI,CAAC,oBAAoB,EAAE,cAAc,GAAG,OAAO,CAAC,GAAG;IACrD,IAAI,CAAC,EAAE,gBAAgB,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,CAAC;CAC9C,CAAC;AA6EJ,QAAA,MAAM,kBAAkB,mIA4CvB,CAAC;AAQF,eAAO,MAAM,WAAW;IACtB,IAAI,GAvM2C,OAAO,mBAC/C,oBAAoB,CAAC,OAAO,CAAC,GAAG;QAAE,GAAG,CAAC,EAAE,QAAQ,CAAC,cAAc,CAAC,CAAA;KAAE,KACtE,YAAY;IAsMf,MAAM;;;IACN,IAAI;;;IACJ,MAAM;;;eA/FC,GAAG;gBACF,MAAM,IAAI;;CA+FnB,CAAC;AAEF,OAAO,EAAE,kBAAkB,EAAE,CAAC;AAE9B,OAAO,EAAE,KAAK,gBAAgB,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/Board/index.ts"],"names":[],"mappings":"AAIA,cAAc,SAAS,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/Board/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,uBAAuB,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACpF,OAAO,EAAE,KAAK,UAAU,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAE3D,cAAc,SAAS,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Focus.d.ts","sourceRoot":"","sources":["../../../../../src/components/Focus/Focus.
|
|
1
|
+
{"version":3,"file":"Focus.d.ts","sourceRoot":"","sources":["../../../../../src/components/Focus/Focus.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,EAAE,KAAK,eAAe,EAAE,KAAK,cAAc,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC"}
|
|
@@ -1,35 +1,5 @@
|
|
|
1
1
|
import React, { type PropsWithChildren, type ReactNode, type Ref } from 'react';
|
|
2
|
-
import { type
|
|
3
|
-
import { type MosaicDraggingState } from './Root';
|
|
4
|
-
import { type LocationType, type MosaicEventHandler } from './types';
|
|
5
|
-
type MosaicContainerState = {
|
|
6
|
-
type: 'idle';
|
|
7
|
-
} | {
|
|
8
|
-
type: 'active';
|
|
9
|
-
bounds?: DOMRect;
|
|
10
|
-
};
|
|
11
|
-
type MosaicContainerContextValue<TData = any, Location = LocationType> = {
|
|
12
|
-
id: string;
|
|
13
|
-
eventHandler: MosaicEventHandler<TData>;
|
|
14
|
-
orientation?: AllowedAxis;
|
|
15
|
-
dragging?: MosaicDraggingState;
|
|
16
|
-
scrolling?: boolean;
|
|
17
|
-
state: MosaicContainerState;
|
|
18
|
-
/** Active drop location. */
|
|
19
|
-
activeLocation?: Location;
|
|
20
|
-
setActiveLocation: (location: Location | undefined) => void;
|
|
21
|
-
/** ID of the current (aria-current) item. */
|
|
22
|
-
currentId?: string;
|
|
23
|
-
/** Set the current item by ID. */
|
|
24
|
-
setCurrentId: (id: string | undefined) => void;
|
|
25
|
-
/** IDs of selected (aria-selected) items. */
|
|
26
|
-
selectedIds?: ReadonlySet<string>;
|
|
27
|
-
/** Request to set or unset selection on an item by ID. */
|
|
28
|
-
setSelected: (id: string, selected: boolean) => void;
|
|
29
|
-
/** Register a scroll-to-item callback (provided by Stack/VirtualStack). */
|
|
30
|
-
registerScrollTo: (fn: ((id: string) => void) | undefined) => void;
|
|
31
|
-
};
|
|
32
|
-
declare const useMosaicContainerContext: (consumerName: string) => MosaicContainerContextValue<any, LocationType>;
|
|
2
|
+
import { type MosaicContainerContextValue } from './MosaicContainerContext';
|
|
33
3
|
/** Imperative handle for scrolling a stack to an item without changing the current/selected item. */
|
|
34
4
|
export type MosaicScrollController = {
|
|
35
5
|
scrollToItem: (id: string) => void;
|
|
@@ -50,13 +20,15 @@ type MosaicContainerProps = PropsWithChildren<Partial<Pick<MosaicContainerContex
|
|
|
50
20
|
/** Called when a tile requests to toggle selection. */
|
|
51
21
|
onSelectionChange?: (id: string, selected: boolean) => void;
|
|
52
22
|
debug?: () => ReactNode;
|
|
23
|
+
/** Toggles the `group` target that Placeholder's debug-highlight selectors read (see styles.ts). */
|
|
24
|
+
placeholderDebug?: boolean;
|
|
53
25
|
}>;
|
|
54
26
|
/**
|
|
55
27
|
* Container for a Mosaic layout.
|
|
56
28
|
*/
|
|
57
29
|
declare const MosaicContainer: React.ForwardRefExoticComponent<Omit<MosaicContainerProps, "className"> & {
|
|
58
30
|
classNames?: import("@dxos/ui-types").ClassNameValue;
|
|
59
|
-
} & Pick<React.HTMLAttributes<Element>, "children" | "
|
|
60
|
-
export { MosaicContainer
|
|
61
|
-
export type { MosaicContainerProps
|
|
31
|
+
} & Pick<React.HTMLAttributes<Element>, "children" | "role" | "style"> & React.RefAttributes<HTMLDivElement>>;
|
|
32
|
+
export { MosaicContainer };
|
|
33
|
+
export type { MosaicContainerProps };
|
|
62
34
|
//# sourceMappingURL=Container.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Container.d.ts","sourceRoot":"","sources":["../../../../../src/components/Mosaic/Container.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Container.d.ts","sourceRoot":"","sources":["../../../../../src/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@@
|
|
|
1
|
-
import { type MosaicContainerProps, type
|
|
1
|
+
import { type MosaicContainerProps, type MosaicScrollController } from './Container';
|
|
2
2
|
import { type MosaicDragHandleProps } from './DragHandle';
|
|
3
|
+
import { type MosaicContainerState, useMosaicContainerContext } from './MosaicContainerContext';
|
|
4
|
+
import { type MosaicTileState, useMosaicTileContext } from './MosaicTileContext';
|
|
3
5
|
import { type MosaicDropIndicatorProps, type MosaicPlaceholderProps } from './Placeholder';
|
|
4
6
|
import { type MosaicResizeHandleProps } from './ResizeHandle';
|
|
5
|
-
import { type MosaicRootProps, useMosaicRootContext } from './Root';
|
|
6
7
|
import { type MosaicStackProps, type MosaicStackTileComponent } from './Stack';
|
|
7
|
-
import { type MosaicTileProps
|
|
8
|
+
import { type MosaicTileProps } from './Tile';
|
|
8
9
|
export declare const Mosaic: {
|
|
9
|
-
Root: import("react").ForwardRefExoticComponent<{
|
|
10
|
-
asChild?: boolean;
|
|
11
|
-
debug?: boolean;
|
|
12
|
-
} & {
|
|
13
|
-
children?: import("react").ReactNode | undefined;
|
|
14
|
-
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
15
10
|
Container: import("react").ForwardRefExoticComponent<Omit<MosaicContainerProps, "className"> & {
|
|
16
11
|
classNames?: import("@dxos/ui-types").ClassNameValue;
|
|
17
|
-
} & Pick<import("react").HTMLAttributes<Element>, "children" | "
|
|
12
|
+
} & Pick<import("react").HTMLAttributes<Element>, "children" | "role" | "style"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
18
13
|
Tile: import("react").ForwardRefExoticComponent<Omit<Omit<import("react").PropsWithChildren<{
|
|
19
14
|
className?: string;
|
|
20
15
|
dragHandle?: HTMLElement | null;
|
|
21
16
|
allowedEdges?: import("@atlaskit/pragmatic-drag-and-drop-hitbox/dist/types/closest-edge").Edge[];
|
|
22
17
|
id: string;
|
|
23
18
|
data: any;
|
|
24
|
-
location: import("
|
|
19
|
+
location: import("@dxos/react-ui-dnd").DndLocation;
|
|
25
20
|
draggable?: boolean;
|
|
26
21
|
current?: boolean;
|
|
27
22
|
selected?: boolean;
|
|
@@ -36,7 +31,7 @@ export declare const Mosaic: {
|
|
|
36
31
|
asChild?: boolean;
|
|
37
32
|
}, "className"> & {
|
|
38
33
|
classNames?: import("@dxos/ui-types").ClassNameValue;
|
|
39
|
-
} & Pick<import("react").HTMLAttributes<Element>, "children" | "
|
|
34
|
+
} & Pick<import("react").HTMLAttributes<Element>, "children" | "role" | "style"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
40
35
|
DragHandle: import("react").ForwardRefExoticComponent<Omit<Partial<Pick<import("@dxos/react-ui").IconButtonProps, "icon" | "label" | "variant">> & {
|
|
41
36
|
testId?: string;
|
|
42
37
|
children?: import("react").ReactNode;
|
|
@@ -48,7 +43,7 @@ export declare const Mosaic: {
|
|
|
48
43
|
displayName: string;
|
|
49
44
|
};
|
|
50
45
|
Placeholder: {
|
|
51
|
-
<Location extends import("
|
|
46
|
+
<Location extends import("@dxos/react-ui-dnd").DndLocation = import("@dxos/react-ui-dnd").DndLocation>({ classNames, children, asChild, orientation, location, }: MosaicPlaceholderProps<Location>): import("react").JSX.Element;
|
|
52
47
|
displayName: string;
|
|
53
48
|
};
|
|
54
49
|
DropIndicator: {
|
|
@@ -62,6 +57,6 @@ export declare const Mosaic: {
|
|
|
62
57
|
ref?: import("react").Ref<HTMLDivElement>;
|
|
63
58
|
}) => import("react").ReactElement;
|
|
64
59
|
};
|
|
65
|
-
export type { MosaicContainerProps, MosaicContainerState, MosaicDragHandleProps, MosaicDropIndicatorProps, MosaicPlaceholderProps, MosaicResizeHandleProps,
|
|
66
|
-
export {
|
|
60
|
+
export type { MosaicContainerProps, MosaicContainerState, MosaicDragHandleProps, MosaicDropIndicatorProps, MosaicPlaceholderProps, MosaicResizeHandleProps, MosaicScrollController, MosaicStackProps, MosaicStackTileComponent, MosaicTileProps, MosaicTileState, };
|
|
61
|
+
export { useMosaicContainerContext as useMosaicContainer, useMosaicTileContext as useMosaicTile };
|
|
67
62
|
//# sourceMappingURL=Mosaic.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Mosaic.d.ts","sourceRoot":"","sources":["../../../../../src/components/Mosaic/Mosaic.
|
|
1
|
+
{"version":3,"file":"Mosaic.d.ts","sourceRoot":"","sources":["../../../../../src/components/Mosaic/Mosaic.ts"],"names":[],"mappings":"AAIA,OAAO,EAAmB,KAAK,oBAAoB,EAAE,KAAK,sBAAsB,EAAE,MAAM,aAAa,CAAC;AACtG,OAAO,EAAoB,KAAK,qBAAqB,EAAE,MAAM,cAAc,CAAC;AAC5E,OAAO,EAAE,KAAK,oBAAoB,EAAE,yBAAyB,EAAE,MAAM,0BAA0B,CAAC;AAChG,OAAO,EAAE,KAAK,eAAe,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AACjF,OAAO,EAEL,KAAK,wBAAwB,EAE7B,KAAK,sBAAsB,EAC5B,MAAM,eAAe,CAAC;AACvB,OAAO,EAAsB,KAAK,uBAAuB,EAAE,MAAM,gBAAgB,CAAC;AAClF,OAAO,EAAe,KAAK,gBAAgB,EAAE,KAAK,wBAAwB,EAAsB,MAAM,SAAS,CAAC;AAChH,OAAO,EAAc,KAAK,eAAe,EAAE,MAAM,QAAQ,CAAC;AAM1D,eAAO,MAAM,MAAM;IACjB,SAAS;;;IACT,IAAI;;;;;;;;;;;;;;;;;;;;;;IACJ,UAAU;;;;;;IACV,YAAY;;;;IACZ,WAAW;;;;IACX,aAAa;;;;IACb,KAAK;;;IACL,YAAY;;;CACb,CAAC;AAEF,YAAY,EACV,oBAAoB,EACpB,oBAAoB,EACpB,qBAAqB,EACrB,wBAAwB,EACxB,sBAAsB,EACtB,uBAAuB,EACvB,sBAAsB,EACtB,gBAAgB,EAChB,wBAAwB,EACxB,eAAe,EACf,eAAe,GAChB,CAAC;AAEF,OAAO,EAAE,yBAAyB,IAAI,kBAAkB,EAAE,oBAAoB,IAAI,aAAa,EAAE,CAAC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { type AllowedAxis } from '@dxos/react-ui';
|
|
2
|
+
import { type DndContainerHandler, type DndDraggingState, type DndLocation } from '@dxos/react-ui-dnd';
|
|
3
|
+
export declare const MOSAIC_CONTAINER_NAME = "Mosaic.Container";
|
|
4
|
+
export type MosaicContainerState = {
|
|
5
|
+
type: 'idle';
|
|
6
|
+
} | {
|
|
7
|
+
type: 'active';
|
|
8
|
+
bounds?: DOMRect;
|
|
9
|
+
};
|
|
10
|
+
export type MosaicContainerContextValue<TData = any, Location = DndLocation> = {
|
|
11
|
+
id: string;
|
|
12
|
+
eventHandler: DndContainerHandler<TData>;
|
|
13
|
+
orientation?: AllowedAxis;
|
|
14
|
+
dragging?: DndDraggingState;
|
|
15
|
+
scrolling?: boolean;
|
|
16
|
+
state: MosaicContainerState;
|
|
17
|
+
/** Active drop location. */
|
|
18
|
+
activeLocation?: Location;
|
|
19
|
+
setActiveLocation: (location: Location | undefined) => void;
|
|
20
|
+
/** ID of the current (aria-current) item. */
|
|
21
|
+
currentId?: string;
|
|
22
|
+
/** Set the current item by ID. */
|
|
23
|
+
setCurrentId: (id: string | undefined) => void;
|
|
24
|
+
/** IDs of selected (aria-selected) items. */
|
|
25
|
+
selectedIds?: ReadonlySet<string>;
|
|
26
|
+
/** Request to set or unset selection on an item by ID. */
|
|
27
|
+
setSelected: (id: string, selected: boolean) => void;
|
|
28
|
+
/** Register a scroll-to-item callback (provided by Stack/VirtualStack). */
|
|
29
|
+
registerScrollTo: (fn: ((id: string) => void) | undefined) => void;
|
|
30
|
+
};
|
|
31
|
+
export declare const MosaicContainerContextProvider: import("react").FC<MosaicContainerContextValue<any, DndLocation> & {
|
|
32
|
+
children: React.ReactNode;
|
|
33
|
+
}>, useMosaicContainerContext: (consumerName: string) => MosaicContainerContextValue<any, DndLocation>;
|
|
34
|
+
//# sourceMappingURL=MosaicContainerContext.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":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AC,EAAE,EAAE,CAAC,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC,GAAG,SAAS,KAAK,IAAI,CAAC;CACpE,CAAC;AAEF,eAAO,MAAO,8BAA8B;;IAAE,yBAAyB,yEACR,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { type Edge } from '@atlaskit/pragmatic-drag-and-drop-hitbox/closest-edge';
|
|
2
|
+
import { type Size } from '@dxos/react-ui-dnd';
|
|
3
|
+
export declare const MOSAIC_TILE_NAME = "Mosaic.Tile";
|
|
4
|
+
export type MosaicTileState = {
|
|
5
|
+
type: 'idle';
|
|
6
|
+
} | {
|
|
7
|
+
type: 'preview';
|
|
8
|
+
container: HTMLElement;
|
|
9
|
+
rect: DOMRect;
|
|
10
|
+
} | {
|
|
11
|
+
type: 'dragging';
|
|
12
|
+
} | {
|
|
13
|
+
type: 'target';
|
|
14
|
+
closestEdge: Edge | null;
|
|
15
|
+
};
|
|
16
|
+
export type MosaicTileContextValue = {
|
|
17
|
+
state: MosaicTileState;
|
|
18
|
+
/** Register the element that initiates dragging; set by a child `Mosaic.DragHandle`. */
|
|
19
|
+
setDragHandle: (element: HTMLElement | null) => void;
|
|
20
|
+
/** Current extent (rem) during/after resize; undefined when the tile is not sized. */
|
|
21
|
+
size?: Size;
|
|
22
|
+
/** Update the tile extent. A `commit` (drop) propagates to the consumer's `onSizeChange`. */
|
|
23
|
+
setSize: (size: Size, commit?: boolean) => void;
|
|
24
|
+
/** Resize bounds (rem) declared by the tile; consumed by `Mosaic.ResizeHandle`. */
|
|
25
|
+
minSize?: number;
|
|
26
|
+
maxSize?: number;
|
|
27
|
+
};
|
|
28
|
+
export declare const MosaicTileContextProvider: import("react").FC<MosaicTileContextValue & {
|
|
29
|
+
children: React.ReactNode;
|
|
30
|
+
}>, useMosaicTileContext: (consumerName: string) => MosaicTileContextValue;
|
|
31
|
+
//# sourceMappingURL=MosaicTileContext.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MosaicTileContext.d.ts","sourceRoot":"","sources":["../../../../../src/components/Mosaic/MosaicTileContext.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,IAAI,EAAE,MAAM,uDAAuD,CAAC;AAGlF,OAAO,EAAE,KAAK,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAK/C,eAAO,MAAM,gBAAgB,gBAAgB,CAAC;AAE9C,MAAM,MAAM,eAAe,GACvB;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,GAChB;IAAE,IAAI,EAAE,SAAS,CAAC;IAAC,SAAS,EAAE,WAAW,CAAC;IAAC,IAAI,EAAE,OAAO,CAAA;CAAE,GAC1D;IAAE,IAAI,EAAE,UAAU,CAAA;CAAE,GACpB;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,WAAW,EAAE,IAAI,GAAG,IAAI,CAAA;CAAE,CAAC;AAEjD,MAAM,MAAM,sBAAsB,GAAG;IACnC,KAAK,EAAE,eAAe,CAAC;IACvB,wFAAwF;IACxF,aAAa,EAAE,CAAC,OAAO,EAAE,WAAW,GAAG,IAAI,KAAK,IAAI,CAAC;IACrD,sFAAsF;IACtF,IAAI,CAAC,EAAE,IAAI,CAAC;IACZ,6FAA6F;IAC7F,OAAO,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,CAAC,EAAE,OAAO,KAAK,IAAI,CAAC;IAChD,mFAAmF;IACnF,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,eAAO,MAAO,yBAAyB;;IAAE,oBAAoB,kDAAuD,CAAC"}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { type DropIndicatorProps as NaturalDropIndicatorProps } from '@atlaskit/pragmatic-drag-and-drop-react-drop-indicator/box';
|
|
2
2
|
import React, { type PropsWithChildren } from 'react';
|
|
3
3
|
import { type Axis, type ThemedClassName } from '@dxos/react-ui';
|
|
4
|
-
import { type
|
|
5
|
-
type MosaicPlaceholderProps<Location =
|
|
4
|
+
import { type DndLocation } from '@dxos/react-ui-dnd';
|
|
5
|
+
type MosaicPlaceholderProps<Location = DndLocation> = ThemedClassName<PropsWithChildren<{
|
|
6
6
|
asChild?: boolean;
|
|
7
7
|
orientation?: Axis;
|
|
8
8
|
location: Location;
|
|
9
9
|
}>>;
|
|
10
|
-
declare function MosaicPlaceholder<Location extends
|
|
10
|
+
declare function MosaicPlaceholder<Location extends DndLocation = DndLocation>({ classNames, children, asChild, orientation, location }: MosaicPlaceholderProps<Location>): React.JSX.Element;
|
|
11
11
|
declare namespace MosaicPlaceholder {
|
|
12
12
|
var displayName: string;
|
|
13
13
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Placeholder.d.ts","sourceRoot":"","sources":["../../../../../src/components/Mosaic/Placeholder.tsx"],"names":[],"mappings":"AAIA,OAAO,EAEL,KAAK,kBAAkB,IAAI,yBAAyB,EACrD,MAAM,4DAA4D,CAAC;AAIpE,OAAO,KAAK,EAAE,EAAE,KAAK,iBAAiB,EAAoC,MAAM,OAAO,CAAC;AAExF,OAAO,EAAE,KAAK,IAAI,EAAE,KAAK,eAAe,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"Placeholder.d.ts","sourceRoot":"","sources":["../../../../../src/components/Mosaic/Placeholder.tsx"],"names":[],"mappings":"AAIA,OAAO,EAEL,KAAK,kBAAkB,IAAI,yBAAyB,EACrD,MAAM,4DAA4D,CAAC;AAIpE,OAAO,KAAK,EAAE,EAAE,KAAK,iBAAiB,EAAoC,MAAM,OAAO,CAAC;AAExF,OAAO,EAAE,KAAK,IAAI,EAAE,KAAK,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACjE,OAAO,EAAE,KAAK,WAAW,EAA0C,MAAM,oBAAoB,CAAC;AAuB9F,KAAK,sBAAsB,CAAC,QAAQ,GAAG,WAAW,IAAI,eAAe,CACnE,iBAAiB,CAAC;IAChB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,WAAW,CAAC,EAAE,IAAI,CAAC;IACnB,QAAQ,EAAE,QAAQ,CAAC;CACpB,CAAC,CACH,CAAC;mCAEyB,QAAQ,SAAS,WAAW,GAAG,WAAW,EAAE,EACrE,UAAU,EACV,QAAQ,EACR,OAAO,EACP,WAAwB,EACxB,QAAQ,EACT,EAAE,sBAAsB,CAAC,QAAQ,CAAC;;;;AAuEnC,KAAK,wBAAwB,GAAG,IAAI,CAAC,yBAAyB,EAAE,MAAM,CAAC,CAAC;qCAE3C,KAAK,EAAE,wBAAwB;;;;AAa5D,OAAO,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,CAAC;AAElD,YAAY,EAAE,wBAAwB,EAAE,sBAAsB,EAAE,CAAC"}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { type ReactVirtualizerOptions } from '@tanstack/react-virtual';
|
|
2
2
|
import React, { type FC, type ReactElement, type Ref } from 'react';
|
|
3
3
|
import { type Axis, type ThemedClassName } from '@dxos/react-ui';
|
|
4
|
+
import { type GetId } from '@dxos/react-ui-dnd';
|
|
5
|
+
import { type VirtualizerPaginationController } from '../../hooks';
|
|
4
6
|
import { type MosaicPlaceholderProps } from './Placeholder';
|
|
5
7
|
import { type MosaicTileProps } from './Tile';
|
|
6
|
-
import { type GetId } from './types';
|
|
7
8
|
type MosaicStackTileComponent<TData = any> = FC<MosaicTileProps<TData>>;
|
|
8
9
|
type MosaicStackProps<TData = any> = ThemedClassName<{
|
|
9
10
|
role?: string;
|
|
@@ -16,7 +17,12 @@ type MosaicStackProps<TData = any> = ThemedClassName<{
|
|
|
16
17
|
declare const MosaicStack: <TData = any>(props: MosaicStackProps<TData> & {
|
|
17
18
|
ref?: Ref<HTMLDivElement>;
|
|
18
19
|
}) => ReactElement;
|
|
19
|
-
type MosaicVirtualStackProps<TData = any> = MosaicStackProps<TData> & Pick<ReactVirtualizerOptions<HTMLElement, HTMLDivElement>, 'estimateSize' | 'gap' | 'getScrollElement' | 'overscan' | 'onChange'
|
|
20
|
+
type MosaicVirtualStackProps<TData = any> = MosaicStackProps<TData> & Pick<ReactVirtualizerOptions<HTMLElement, HTMLDivElement>, 'estimateSize' | 'gap' | 'getScrollElement' | 'overscan' | 'onChange'> & {
|
|
21
|
+
/** Enables paginated loading; see `useVirtualizerPagination`. Requires `draggable={false}`. */
|
|
22
|
+
pagination?: VirtualizerPaginationController;
|
|
23
|
+
/** Rows from either loaded edge at which the adjacent page is requested. @default 12. */
|
|
24
|
+
paginationThreshold?: number;
|
|
25
|
+
};
|
|
20
26
|
declare const MosaicVirtualStack: <TData = any>(props: MosaicVirtualStackProps<TData> & {
|
|
21
27
|
ref?: Ref<HTMLDivElement>;
|
|
22
28
|
}) => ReactElement;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Stack.d.ts","sourceRoot":"","sources":["../../../../../src/components/Mosaic/Stack.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,uBAAuB,
|
|
1
|
+
{"version":3,"file":"Stack.d.ts","sourceRoot":"","sources":["../../../../../src/components/Mosaic/Stack.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,uBAAuB,EAAoC,MAAM,yBAAyB,CAAC;AACzG,OAAO,KAAK,EAAE,EACZ,KAAK,EAAE,EAEP,KAAK,YAAY,EACjB,KAAK,GAAG,EAOT,MAAM,OAAO,CAAC;AAGf,OAAO,EAAE,KAAK,IAAI,EAAE,KAAK,eAAe,EAA+B,MAAM,gBAAgB,CAAC;AAC9F,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAGhD,OAAO,EAAE,KAAK,+BAA+B,EAA6C,MAAM,aAAa,CAAC;AAE9G,OAAO,EAAqB,KAAK,sBAAsB,EAAE,MAAM,eAAe,CAAC;AAE/E,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,QAAQ,CAAC;AAyB9C,KAAK,wBAAwB,CAAC,KA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BlE,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,CAAC;AAE3C,YAAY,EAAE,gBAAgB,EAAE,wBAAwB,EAAE,uBAAuB,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Stack.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/Mosaic/Stack.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,IAAI,EAAE,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,KAAmB,MAAM,OAAO,CAAC;AAGxC,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"Stack.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/Mosaic/Stack.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,IAAI,EAAE,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,KAAmB,MAAM,OAAO,CAAC;AAGxC,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AAUjC,OAAO,EAAU,gBAAgB,EAAE,MAAM,UAAU,CAAC;AACpD,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAwItC,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,WAAW,CAAC,GAAG,CAAC,GAAG,CAAC,CAc3C,CAAC;eAEa,IAAI;AAEnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAErB,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,KAK9B,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,KAM1B,CAAC;AAEF,eAAO,MAAM,OAAO,EAAE,KAErB,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,KAK9B,CAAC;AAEF,eAAO,MAAM,YAAY;IACvB,MAAM,UAlG0B,gBAAgB,CAAC,GAAG,CAAC,GAAG,CAAC;IAmGzD,IAAI;QACF,KAAK;;CAER,CAAC"}
|
|
@@ -1,34 +1,8 @@
|
|
|
1
1
|
import { type Edge } from '@atlaskit/pragmatic-drag-and-drop-hitbox/closest-edge';
|
|
2
2
|
import React, { type PropsWithChildren } from 'react';
|
|
3
3
|
import { type ThemedClassName } from '@dxos/react-ui';
|
|
4
|
-
import { type Size } from '@dxos/react-ui-dnd';
|
|
5
|
-
|
|
6
|
-
type MosaicTileState = {
|
|
7
|
-
type: 'idle';
|
|
8
|
-
} | {
|
|
9
|
-
type: 'preview';
|
|
10
|
-
container: HTMLElement;
|
|
11
|
-
rect: DOMRect;
|
|
12
|
-
} | {
|
|
13
|
-
type: 'dragging';
|
|
14
|
-
} | {
|
|
15
|
-
type: 'target';
|
|
16
|
-
closestEdge: Edge | null;
|
|
17
|
-
};
|
|
18
|
-
type MosaicTileContextValue = {
|
|
19
|
-
state: MosaicTileState;
|
|
20
|
-
/** Register the element that initiates dragging; set by a child `Mosaic.DragHandle`. */
|
|
21
|
-
setDragHandle: (element: HTMLElement | null) => void;
|
|
22
|
-
/** Current extent (rem) during/after resize; undefined when the tile is not sized. */
|
|
23
|
-
size?: Size;
|
|
24
|
-
/** Update the tile extent. A `commit` (drop) propagates to the consumer's `onSizeChange`. */
|
|
25
|
-
setSize: (size: Size, commit?: boolean) => void;
|
|
26
|
-
/** Resize bounds (rem) declared by the tile; consumed by `Mosaic.ResizeHandle`. */
|
|
27
|
-
minSize?: number;
|
|
28
|
-
maxSize?: number;
|
|
29
|
-
};
|
|
30
|
-
declare const useMosaicTileContext: (consumerName: string) => MosaicTileContextValue;
|
|
31
|
-
type MosaicTileProps<TData = any, TLocation = LocationType> = ThemedClassName<PropsWithChildren<{
|
|
4
|
+
import { type DndLocation, type Size } from '@dxos/react-ui-dnd';
|
|
5
|
+
type MosaicTileProps<TData = any, TLocation = DndLocation> = ThemedClassName<PropsWithChildren<{
|
|
32
6
|
className?: string;
|
|
33
7
|
dragHandle?: HTMLElement | null;
|
|
34
8
|
allowedEdges?: Edge[];
|
|
@@ -60,7 +34,7 @@ declare const MosaicTile: React.ForwardRefExoticComponent<Omit<Omit<PropsWithChi
|
|
|
60
34
|
allowedEdges?: Edge[];
|
|
61
35
|
id: string;
|
|
62
36
|
data: any;
|
|
63
|
-
location:
|
|
37
|
+
location: DndLocation;
|
|
64
38
|
draggable?: boolean;
|
|
65
39
|
/** Whether this tile is the current (aria-current) item. */
|
|
66
40
|
current?: boolean;
|
|
@@ -85,7 +59,7 @@ declare const MosaicTile: React.ForwardRefExoticComponent<Omit<Omit<PropsWithChi
|
|
|
85
59
|
asChild?: boolean;
|
|
86
60
|
}, "className"> & {
|
|
87
61
|
classNames?: import("@dxos/ui-types").ClassNameValue;
|
|
88
|
-
} & Pick<React.HTMLAttributes<Element>, "children" | "
|
|
89
|
-
export { MosaicTile
|
|
90
|
-
export type { MosaicTileProps
|
|
62
|
+
} & Pick<React.HTMLAttributes<Element>, "children" | "role" | "style"> & React.RefAttributes<HTMLDivElement>>;
|
|
63
|
+
export { MosaicTile };
|
|
64
|
+
export type { MosaicTileProps };
|
|
91
65
|
//# sourceMappingURL=Tile.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tile.d.ts","sourceRoot":"","sources":["../../../../../src/components/Mosaic/Tile.tsx"],"names":[],"mappings":"AAIA,OAAO,EACL,KAAK,IAAI,EAGV,MAAM,uDAAuD,CAAC;
|
|
1
|
+
{"version":3,"file":"Tile.d.ts","sourceRoot":"","sources":["../../../../../src/components/Mosaic/Tile.tsx"],"names":[],"mappings":"AAIA,OAAO,EACL,KAAK,IAAI,EAGV,MAAM,uDAAuD,CAAC;AAa/D,OAAO,KAAK,EAAE,EACZ,KAAK,iBAAiB,EAOvB,MAAM,OAAO,CAAC;AAGf,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAEtD,OAAO,EACL,KAAK,WAAW,EAEhB,KAAK,IAAI,EAIV,M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j } from '@storybook/react-vite';
|
|
2
|
+
declare const meta: Meta;
|
|
3
|
+
export default meta;
|
|
4
|
+
type Story = StoryObj;
|
|
5
|
+
/**
|
|
6
|
+
* `Mosaic.VirtualStack`'s `pagination` prop over a plain in-memory array -- no ECHO query or
|
|
7
|
+
* `usePagination` involved. Scroll down to grow the window, then keep scrolling past
|
|
8
|
+
* `MAX_WINDOW_SIZE` to see it slide (evicting the newest items); scroll back up to slide it back
|
|
9
|
+
* toward the head without a visible jump.
|
|
10
|
+
*/
|
|
11
|
+
export declare const Default: Story;
|
|
12
|
+
export declare const FeedBacked: Story;
|
|
13
|
+
//# sourceMappingURL=VirtualStackPagination.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"VirtualStackPagination.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/Mosaic/VirtualStackPagination.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,IAAI,EAAE,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAgXjE,QAAA,MAAM,IAAI,EAAE,IAMX,CAAC;eAEa,IAAI;AAEnB,KAAK,KAAK,GAAG,QAAQ,CAAC;AAEtB;;;;;GAKG;AACH,eAAO,MAAM,OAAO,EAAE,KAErB,CAAC;AAaF,eAAO,MAAM,UAAU,EAAE,KAiBxB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/Mosaic/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,MAAM,IAAI,YAAY,EAAE,MAAM,UAAU,CAAC;AAElD,cAAc,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/Mosaic/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,MAAM,IAAI,YAAY,EAAE,MAAM,UAAU,CAAC;AAElD,cAAc,aAAa,CAAC;AAE5B,cAAc,UAAU,CAAC"}
|
|
@@ -16,5 +16,5 @@ export type SearchStackProps = {
|
|
|
16
16
|
*/
|
|
17
17
|
export declare const SearchStack: React.ForwardRefExoticComponent<Omit<SearchStackProps, "className"> & {
|
|
18
18
|
classNames?: import("@dxos/ui-types").ClassNameValue;
|
|
19
|
-
} & Pick<React.HTMLAttributes<Element>, "children" | "
|
|
19
|
+
} & Pick<React.HTMLAttributes<Element>, "children" | "role" | "style"> & React.RefAttributes<HTMLDivElement>>;
|
|
20
20
|
//# sourceMappingURL=SearchStack.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SearchStack.d.ts","sourceRoot":"","sources":["../../../../../src/components/SearchStack/SearchStack.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAyE,MAAM,OAAO,CAAC;AAI9F,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAI1D,MAAM,MAAM,iBAAiB,GAAG;IAC9B,IAAI,EAAE,QAAQ,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,wBAAwB,GAAG,CAAC,MAAM,EAAE,iBAAiB,KAAK,IAAI,CAAC;AAM3E,MAAM,MAAM,gBAAgB,GAAG;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,CAAC,EAAE,YAAY,EAAE,CAAC;IACzB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,wBAAwB,CAAC;CACrC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,WAAW;;
|
|
1
|
+
{"version":3,"file":"SearchStack.d.ts","sourceRoot":"","sources":["../../../../../src/components/SearchStack/SearchStack.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAyE,MAAM,OAAO,CAAC;AAI9F,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAI1D,MAAM,MAAM,iBAAiB,GAAG;IAC9B,IAAI,EAAE,QAAQ,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,wBAAwB,GAAG,CAAC,MAAM,EAAE,iBAAiB,KAAK,IAAI,CAAC;AAM3E,MAAM,MAAM,gBAAgB,GAAG;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,CAAC,EAAE,YAAY,EAAE,CAAC;IACzB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,wBAAwB,CAAC;CACrC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,WAAW;;6GA0CvB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/hooks/index.ts"],"names":[],"mappings":"AAIA,cAAc,qBAAqB,CAAC;AACpC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,0BAA0B,CAAC;AACzC,cAAc,mBAAmB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/hooks/index.ts"],"names":[],"mappings":"AAIA,cAAc,qBAAqB,CAAC;AACpC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,0BAA0B,CAAC;AACzC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,mBAAmB,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type Obj } from '@dxos/echo';
|
|
2
|
-
import { type
|
|
2
|
+
import { type DndContainerHandler, type GetId } from '@dxos/react-ui-dnd';
|
|
3
3
|
/**
|
|
4
4
|
* Minimal model shape needed to build the default column handler.
|
|
5
5
|
*/
|
|
@@ -11,5 +11,5 @@ export type DefaultColumnEventHandlerModel<TColumn = unknown> = {
|
|
|
11
11
|
* Returns the default column drag/drop handler (no persistence).
|
|
12
12
|
* Use this when no custom eventHandler is passed to Board.Content.
|
|
13
13
|
*/
|
|
14
|
-
export declare const useDefaultColumnEventHandler: <TColumn extends Obj.Unknown = Obj.Unknown>(id: string, model: DefaultColumnEventHandlerModel<TColumn>, items: TColumn[]) =>
|
|
14
|
+
export declare const useDefaultColumnEventHandler: <TColumn extends Obj.Unknown = Obj.Unknown>(id: string, model: DefaultColumnEventHandlerModel<TColumn>, items: TColumn[]) => DndContainerHandler<TColumn>;
|
|
15
15
|
//# sourceMappingURL=useDefaultColumnEventHandler.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useDefaultColumnEventHandler.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useDefaultColumnEventHandler.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,GAAG,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"useDefaultColumnEventHandler.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useDefaultColumnEventHandler.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,GAAG,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,KAAK,mBAAmB,EAAE,KAAK,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAI1E;;GAEG;AACH,MAAM,MAAM,8BAA8B,CAAC,OAAO,GAAG,OAAO,IAAI;IAC9D,WAAW,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC;IAC5B,QAAQ,EAAE,CAAC,GAAG,EAAE,OAAO,KAAK,GAAG,IAAI,OAAO,CAAC;CAC5C,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,4BAA4B,GAAI,OAAO,SAAS,GAAG,CAAC,OAAO,GAAG,GAAG,CAAC,OAAO,MAChF,MAAM,SACH,8BAA8B,CAAC,OAAO,CAAC,SACvC,OAAO,EAAE,KACf,mBAAmB,CAAC,OAAO,CAQ1B,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type Obj } from '@dxos/echo';
|
|
2
|
-
import { type
|
|
3
|
-
export type UseEventHandlerProps<TItem = any, TObject extends Obj.Unknown = Obj.Unknown> = Pick<
|
|
2
|
+
import { type DndContainerHandler, type GetId } from '@dxos/react-ui-dnd';
|
|
3
|
+
export type UseEventHandlerProps<TItem = any, TObject extends Obj.Unknown = Obj.Unknown> = Pick<DndContainerHandler<TItem>, 'id' | 'canDrop'> & {
|
|
4
4
|
/**
|
|
5
5
|
* The items to manage.
|
|
6
6
|
*/
|
|
@@ -28,5 +28,5 @@ export type UseEventHandlerProps<TItem = any, TObject extends Obj.Unknown = Obj.
|
|
|
28
28
|
* Returns a handler for the given items.
|
|
29
29
|
* NOTE: This supports arrays of objects, or arrays of refs to objects.
|
|
30
30
|
*/
|
|
31
|
-
export declare const useEventHandlerAdapter: <TItem = any, TObject extends Obj.Unknown = Obj.Unknown>({ items, getId, get, make, onChange, ...props }: UseEventHandlerProps<TItem, TObject>) =>
|
|
31
|
+
export declare const useEventHandlerAdapter: <TItem = any, TObject extends Obj.Unknown = Obj.Unknown>({ items, getId, get, make, onChange, ...props }: UseEventHandlerProps<TItem, TObject>) => DndContainerHandler<TItem>;
|
|
32
32
|
//# sourceMappingURL=useEventHandlerAdapter.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useEventHandlerAdapter.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useEventHandlerAdapter.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,KAAK,GAAG,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"useEventHandlerAdapter.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useEventHandlerAdapter.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,KAAK,GAAG,EAAE,MAAM,YAAY,CAAC;AAEtC,OAAO,EAAE,KAAK,mBAAmB,EAAE,KAAK,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAG1E,MAAM,MAAM,oBAAoB,CAAC,KAAK,GAAG,GAAG,EAAE,OAAO,SAAS,GAAG,CAAC,OAAO,GAAG,GAAG,CAAC,OAAO,IAAI,IAAI,CAC7F,mBAAmB,CAAC,KAAK,CAAC,EAC1B,IAAI,GAAG,SAAS,CACjB,GAAG;IACF;;OAEG;IACH,KAAK,EAAE,KAAK,EAAE,CAAC;IAEf;;OAEG;IACH,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC;IAEpB;;OAEG;IACH,GAAG,EAAE,CAAC,IAAI,EAAE,KAAK,KAAK,OAAO,CAAC;IAE9B;;OAEG;IACH,IAAI,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,KAAK,CAAC;IAEjC;;;;OAIG;IACH,QAAQ,CAAC,EAAE,CAAC,OAAO,EAAE,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,IAAI,KAAK,IAAI,CAAC;CACxD,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,sBAAsB,GAAI,KAAK,GAAG,GAAG,EAAE,OAAO,SAAS,GAAG,CAAC,OAAO,GAAG,GAAG,CAAC,OAAO,mDAO1F,oBAAoB,CAAC,KAAK,EAAE,OAAO,CAAC,KAAG,mBAAmB,CAAC,KAAK,CAoDlE,CAAC"}
|