@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.
Files changed (190) hide show
  1. package/dist/lib/browser/chunk-UTD5AWW5.mjs +1009 -0
  2. package/dist/lib/browser/chunk-UTD5AWW5.mjs.map +7 -0
  3. package/dist/lib/browser/index.mjs +604 -71
  4. package/dist/lib/browser/index.mjs.map +4 -4
  5. package/dist/lib/browser/meta.json +1 -1
  6. package/dist/lib/browser/playwright/index.mjs +148 -0
  7. package/dist/lib/browser/playwright/index.mjs.map +7 -0
  8. package/dist/lib/browser/testing/index.mjs +69 -236
  9. package/dist/lib/browser/testing/index.mjs.map +4 -4
  10. package/dist/lib/node-esm/chunk-5K56GSJL.mjs +1011 -0
  11. package/dist/lib/node-esm/chunk-5K56GSJL.mjs.map +7 -0
  12. package/dist/lib/node-esm/index.mjs +604 -71
  13. package/dist/lib/node-esm/index.mjs.map +4 -4
  14. package/dist/lib/node-esm/meta.json +1 -1
  15. package/dist/lib/node-esm/playwright/index.mjs +150 -0
  16. package/dist/lib/node-esm/playwright/index.mjs.map +7 -0
  17. package/dist/lib/node-esm/testing/index.mjs +69 -236
  18. package/dist/lib/node-esm/testing/index.mjs.map +4 -4
  19. package/dist/types/src/components/Board/Board.d.ts +88 -0
  20. package/dist/types/src/components/Board/Board.d.ts.map +1 -0
  21. package/dist/types/src/components/Board/Board.stories.d.ts +41 -0
  22. package/dist/types/src/components/Board/Board.stories.d.ts.map +1 -0
  23. package/dist/types/src/components/Board/Column.d.ts +48 -0
  24. package/dist/types/src/components/Board/Column.d.ts.map +1 -0
  25. package/dist/types/src/components/Board/Item.d.ts +12 -0
  26. package/dist/types/src/components/Board/Item.d.ts.map +1 -0
  27. package/dist/types/src/components/Board/index.d.ts +2 -0
  28. package/dist/types/src/components/Board/index.d.ts.map +1 -0
  29. package/dist/types/src/components/Focus/Focus.d.ts +1 -24
  30. package/dist/types/src/components/Focus/Focus.d.ts.map +1 -1
  31. package/dist/types/src/components/Focus/index.d.ts +0 -1
  32. package/dist/types/src/components/Focus/index.d.ts.map +1 -1
  33. package/dist/types/src/components/Mosaic/Container.d.ts +49 -0
  34. package/dist/types/src/components/Mosaic/Container.d.ts.map +1 -0
  35. package/dist/types/src/components/Mosaic/Mosaic.d.ts +36 -126
  36. package/dist/types/src/components/Mosaic/Mosaic.d.ts.map +1 -1
  37. package/dist/types/src/components/Mosaic/Placeholder.d.ts +21 -0
  38. package/dist/types/src/components/Mosaic/Placeholder.d.ts.map +1 -0
  39. package/dist/types/src/components/Mosaic/Root.d.ts +36 -0
  40. package/dist/types/src/components/Mosaic/Root.d.ts.map +1 -0
  41. package/dist/types/src/components/Mosaic/Stack.d.ts +23 -0
  42. package/dist/types/src/components/Mosaic/Stack.d.ts.map +1 -0
  43. package/dist/types/src/components/Mosaic/Stack.stories.d.ts +20 -0
  44. package/dist/types/src/components/Mosaic/Stack.stories.d.ts.map +1 -0
  45. package/dist/types/src/components/Mosaic/Tile.d.ts +57 -0
  46. package/dist/types/src/components/Mosaic/Tile.d.ts.map +1 -0
  47. package/dist/types/src/components/Mosaic/styles.d.ts.map +1 -1
  48. package/dist/types/src/components/Mosaic/types.d.ts +9 -2
  49. package/dist/types/src/components/Mosaic/types.d.ts.map +1 -1
  50. package/dist/types/src/components/index.d.ts +1 -4
  51. package/dist/types/src/components/index.d.ts.map +1 -1
  52. package/dist/types/src/hooks/index.d.ts +1 -0
  53. package/dist/types/src/hooks/index.d.ts.map +1 -1
  54. package/dist/types/src/hooks/useDefaultColumnEventHandler.d.ts +15 -0
  55. package/dist/types/src/hooks/useDefaultColumnEventHandler.d.ts.map +1 -0
  56. package/dist/types/src/hooks/useEventHandlerAdapter.d.ts +1 -1
  57. package/dist/types/src/hooks/useEventHandlerAdapter.d.ts.map +1 -1
  58. package/dist/types/src/hooks/useVisibleItems.d.ts +2 -2
  59. package/dist/types/src/hooks/useVisibleItems.d.ts.map +1 -1
  60. package/dist/types/src/playwright/board-manager.d.ts +45 -0
  61. package/dist/types/src/playwright/board-manager.d.ts.map +1 -0
  62. package/dist/types/src/playwright/index.d.ts +9 -0
  63. package/dist/types/src/playwright/index.d.ts.map +1 -0
  64. package/dist/types/src/playwright/playwright.config.d.ts +3 -0
  65. package/dist/types/src/playwright/playwright.config.d.ts.map +1 -0
  66. package/dist/types/src/playwright/smoke.spec.d.ts +2 -0
  67. package/dist/types/src/playwright/smoke.spec.d.ts.map +1 -0
  68. package/dist/types/src/testing/CardContainer.d.ts +5 -4
  69. package/dist/types/src/testing/CardContainer.d.ts.map +1 -1
  70. package/dist/types/src/testing/DefaultStackTile.d.ts +2 -2
  71. package/dist/types/src/testing/DefaultStackTile.d.ts.map +1 -1
  72. package/dist/types/src/testing/index.d.ts +1 -1
  73. package/dist/types/src/testing/index.d.ts.map +1 -1
  74. package/dist/types/src/testing/types.d.ts +21 -0
  75. package/dist/types/src/testing/types.d.ts.map +1 -0
  76. package/dist/types/src/translations.d.ts +5 -1
  77. package/dist/types/src/translations.d.ts.map +1 -1
  78. package/dist/types/tsconfig.tsbuildinfo +1 -1
  79. package/package.json +43 -28
  80. package/src/AUDIT.md +106 -0
  81. package/src/components/Board/Board.stories.tsx +273 -0
  82. package/src/components/Board/Board.tsx +191 -0
  83. package/src/components/Board/Column.tsx +302 -0
  84. package/src/components/Board/Item.tsx +116 -0
  85. package/src/components/{Layout → Board}/index.ts +1 -1
  86. package/src/components/Focus/Focus.tsx +2 -93
  87. package/src/components/Focus/index.ts +0 -2
  88. package/src/components/Mosaic/Container.tsx +318 -0
  89. package/src/components/Mosaic/Mosaic.tsx +35 -913
  90. package/src/components/Mosaic/Placeholder.tsx +133 -0
  91. package/src/components/Mosaic/Root.tsx +292 -0
  92. package/src/components/Mosaic/Stack.stories.tsx +176 -0
  93. package/src/components/Mosaic/Stack.tsx +321 -0
  94. package/src/components/Mosaic/Tile.tsx +247 -0
  95. package/src/components/Mosaic/extension.ts +1 -1
  96. package/src/components/Mosaic/styles.ts +9 -8
  97. package/src/components/Mosaic/types.ts +15 -3
  98. package/src/components/index.ts +1 -4
  99. package/src/hooks/index.ts +1 -0
  100. package/src/hooks/useContainerDebug.tsx +5 -3
  101. package/src/hooks/useDefaultColumnEventHandler.ts +35 -0
  102. package/src/hooks/useEventHandlerAdapter.ts +15 -6
  103. package/src/hooks/useVisibleItems.ts +7 -2
  104. package/src/playwright/board-manager.ts +159 -0
  105. package/src/playwright/index.ts +13 -0
  106. package/src/playwright/playwright.config.ts +17 -0
  107. package/src/playwright/smoke.spec.ts +143 -0
  108. package/src/testing/CardContainer.tsx +31 -19
  109. package/src/testing/DefaultStackTile.tsx +36 -22
  110. package/src/testing/index.ts +1 -1
  111. package/src/testing/types.ts +38 -0
  112. package/src/translations.ts +5 -1
  113. package/dist/lib/browser/chunk-UMBPEG4F.mjs +0 -1637
  114. package/dist/lib/browser/chunk-UMBPEG4F.mjs.map +0 -7
  115. package/dist/lib/browser/index.css +0 -13
  116. package/dist/lib/browser/index.css.map +0 -7
  117. package/dist/lib/browser/testing/index.css +0 -13
  118. package/dist/lib/browser/testing/index.css.map +0 -7
  119. package/dist/lib/node-esm/chunk-X6GV7SMK.mjs +0 -1639
  120. package/dist/lib/node-esm/chunk-X6GV7SMK.mjs.map +0 -7
  121. package/dist/lib/node-esm/index.css +0 -13
  122. package/dist/lib/node-esm/index.css.map +0 -7
  123. package/dist/lib/node-esm/testing/index.css +0 -13
  124. package/dist/lib/node-esm/testing/index.css.map +0 -7
  125. package/dist/types/src/components/Card/Card.d.ts +0 -121
  126. package/dist/types/src/components/Card/Card.d.ts.map +0 -1
  127. package/dist/types/src/components/Card/Card.stories.d.ts +0 -21
  128. package/dist/types/src/components/Card/Card.stories.d.ts.map +0 -1
  129. package/dist/types/src/components/Card/CardDragPreview.d.ts +0 -6
  130. package/dist/types/src/components/Card/CardDragPreview.d.ts.map +0 -1
  131. package/dist/types/src/components/Card/index.d.ts +0 -4
  132. package/dist/types/src/components/Card/index.d.ts.map +0 -1
  133. package/dist/types/src/components/Card/styles.d.ts +0 -13
  134. package/dist/types/src/components/Card/styles.d.ts.map +0 -1
  135. package/dist/types/src/components/Focus/styles.d.ts +0 -6
  136. package/dist/types/src/components/Focus/styles.d.ts.map +0 -1
  137. package/dist/types/src/components/Image/Image.d.ts +0 -14
  138. package/dist/types/src/components/Image/Image.d.ts.map +0 -1
  139. package/dist/types/src/components/Image/Image.stories.d.ts +0 -33
  140. package/dist/types/src/components/Image/Image.stories.d.ts.map +0 -1
  141. package/dist/types/src/components/Image/index.d.ts +0 -2
  142. package/dist/types/src/components/Image/index.d.ts.map +0 -1
  143. package/dist/types/src/components/Layout/Layout.d.ts +0 -33
  144. package/dist/types/src/components/Layout/Layout.d.ts.map +0 -1
  145. package/dist/types/src/components/Layout/Layout.stories.d.ts +0 -10
  146. package/dist/types/src/components/Layout/Layout.stories.d.ts.map +0 -1
  147. package/dist/types/src/components/Layout/index.d.ts +0 -2
  148. package/dist/types/src/components/Layout/index.d.ts.map +0 -1
  149. package/dist/types/src/components/Mosaic/Mosaic.stories.d.ts +0 -27
  150. package/dist/types/src/components/Mosaic/Mosaic.stories.d.ts.map +0 -1
  151. package/dist/types/src/components/Scrollable/Scrollable.d.ts +0 -24
  152. package/dist/types/src/components/Scrollable/Scrollable.d.ts.map +0 -1
  153. package/dist/types/src/components/Scrollable/Scrollable.stories.d.ts +0 -10
  154. package/dist/types/src/components/Scrollable/Scrollable.stories.d.ts.map +0 -1
  155. package/dist/types/src/components/Scrollable/index.d.ts +0 -2
  156. package/dist/types/src/components/Scrollable/index.d.ts.map +0 -1
  157. package/dist/types/src/components/Stack/Stack.d.ts +0 -22
  158. package/dist/types/src/components/Stack/Stack.d.ts.map +0 -1
  159. package/dist/types/src/components/Stack/Stack.stories.d.ts +0 -9
  160. package/dist/types/src/components/Stack/Stack.stories.d.ts.map +0 -1
  161. package/dist/types/src/components/Stack/index.d.ts +0 -2
  162. package/dist/types/src/components/Stack/index.d.ts.map +0 -1
  163. package/dist/types/src/testing/Board.d.ts +0 -45
  164. package/dist/types/src/testing/Board.d.ts.map +0 -1
  165. package/dist/types/src/testing/Slot.stories.d.ts +0 -14
  166. package/dist/types/src/testing/Slot.stories.d.ts.map +0 -1
  167. package/dist/types/src/testing/Virtualizer.stories.d.ts +0 -12
  168. package/dist/types/src/testing/Virtualizer.stories.d.ts.map +0 -1
  169. package/src/components/Card/Card.stories.tsx +0 -148
  170. package/src/components/Card/Card.tsx +0 -458
  171. package/src/components/Card/CardDragPreview.tsx +0 -23
  172. package/src/components/Card/index.ts +0 -8
  173. package/src/components/Card/styles.ts +0 -23
  174. package/src/components/Focus/styles.ts +0 -24
  175. package/src/components/Image/Image.stories.tsx +0 -86
  176. package/src/components/Image/Image.tsx +0 -223
  177. package/src/components/Image/index.ts +0 -5
  178. package/src/components/Layout/Layout.stories.tsx +0 -59
  179. package/src/components/Layout/Layout.tsx +0 -108
  180. package/src/components/Mosaic/Mosaic.stories.tsx +0 -113
  181. package/src/components/Scrollable/Scrollable.stories.tsx +0 -59
  182. package/src/components/Scrollable/Scrollable.tsx +0 -88
  183. package/src/components/Scrollable/index.ts +0 -5
  184. package/src/components/Scrollable/scrollable.css +0 -20
  185. package/src/components/Stack/Stack.stories.tsx +0 -115
  186. package/src/components/Stack/Stack.tsx +0 -210
  187. package/src/components/Stack/index.ts +0 -5
  188. package/src/testing/Board.tsx +0 -278
  189. package/src/testing/Slot.stories.tsx +0 -101
  190. package/src/testing/Virtualizer.stories.tsx +0 -133
@@ -0,0 +1,48 @@
1
+ import React, { type PropsWithChildren, type ReactElement, type Ref as ReactRef, type RefObject } from 'react';
2
+ import { Obj } from '@dxos/echo';
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
+ type BoardColumnProps<TColumn = any> = Pick<MosaicTileProps<TColumn>, 'classNames' | 'location' | 'data' | 'debug'>;
10
+ type BoardColumnRootProps<TColumn = any> = PropsWithChildren<BoardColumnProps<TColumn>> & {
11
+ dragHandleRef?: RefObject<HTMLButtonElement | null>;
12
+ };
13
+ type BoardColumnHeaderProps = {
14
+ label: string;
15
+ dragHandleRef: ReactRef<HTMLButtonElement>;
16
+ };
17
+ type BoardColumnBodyProps = Pick<BoardColumnProps, 'data'> & Pick<MosaicContainerProps, 'eventHandler' | 'debug'> & {
18
+ Tile?: MosaicStackProps<Obj.Unknown>['Tile'];
19
+ };
20
+ declare const DefaultBoardColumn: React.ForwardRefExoticComponent<BoardColumnProps<any> & Pick<BoardColumnBodyProps, "Tile"> & React.RefAttributes<HTMLDivElement>>;
21
+ export declare const BoardColumn: {
22
+ Root: <TColumn = unknown>(props: BoardColumnRootProps<TColumn> & {
23
+ ref?: ReactRef<HTMLDivElement>;
24
+ }) => ReactElement;
25
+ Header: React.ForwardRefExoticComponent<Omit<BoardColumnHeaderProps, "className"> & {
26
+ classNames?: import("@dxos/ui-types").ClassNameValue;
27
+ } & {
28
+ className?: string;
29
+ children?: React.ReactNode;
30
+ role?: string;
31
+ } & React.RefAttributes<HTMLDivElement>>;
32
+ Body: React.ForwardRefExoticComponent<Omit<BoardColumnBodyProps, "className"> & {
33
+ classNames?: import("@dxos/ui-types").ClassNameValue;
34
+ } & {
35
+ className?: string;
36
+ children?: React.ReactNode;
37
+ role?: string;
38
+ } & React.RefAttributes<HTMLDivElement>>;
39
+ Footer: React.ForwardRefExoticComponent<Omit<{}, "className"> & {
40
+ classNames?: import("@dxos/ui-types").ClassNameValue;
41
+ } & {
42
+ data?: any;
43
+ onAdd?: () => void;
44
+ } & React.RefAttributes<HTMLDivElement>>;
45
+ };
46
+ export { DefaultBoardColumn };
47
+ export { type BoardColumnProps };
48
+ //# sourceMappingURL=Column.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CAAC,CAAC;CAC9C,CAAC;AA6EJ,QAAA,MAAM,kBAAkB,mIA2CvB,CAAC;AAQF,eAAO,MAAM,WAAW;WA9LyB,OAAO,mBAC/C,oBAAoB,CAAC,OAAO,CAAC,GAAG;QAAE,GAAG,CAAC,EAAE,QAAQ,CAAC,cAAc,CAAC,CAAA;KAAE,KACtE,YAAY;;;;;;;;;;;;;;;;;;eAkGR,GAAG;gBACF,MAAM,IAAI;;CA8FnB,CAAC;AAEF,OAAO,EAAE,kBAAkB,EAAE,CAAC;AAE9B,OAAO,EAAE,KAAK,gBAAgB,EAAE,CAAC"}
@@ -0,0 +1,12 @@
1
+ import { type ReactElement, type Ref as ReactRef } from 'react';
2
+ import { Obj } from '@dxos/echo';
3
+ import { type MosaicTileProps } from '../Mosaic';
4
+ type BoardItemProps<TItem extends Obj.Unknown = any> = Pick<MosaicTileProps<TItem>, 'classNames' | 'location' | 'data' | 'debug'>;
5
+ /**
6
+ * Default board tile.
7
+ */
8
+ declare const BoardItem: <TItem extends Obj.Unknown = any>(props: BoardItemProps<TItem> & {
9
+ ref?: ReactRef<HTMLDivElement>;
10
+ }) => ReactElement;
11
+ export { BoardItem, type BoardItemProps };
12
+ //# sourceMappingURL=Item.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Item.d.ts","sourceRoot":"","sources":["../../../../../src/components/Board/Item.tsx"],"names":[],"mappings":"AAKA,OAAc,EAAE,KAAK,YAAY,EAAE,KAAK,GAAG,IAAI,QAAQ,EAA+B,MAAM,OAAO,CAAC;AAEpG,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AAOjC,OAAO,EAAU,KAAK,eAAe,EAAE,MAAM,WAAW,CAAC;AAOzD,KAAK,cAAc,CAAC,KAAK,SAAS,GAAG,CAAC,OAAO,GAAG,GAAG,IAAI,IAAI,CACzD,eAAe,CAAC,KAAK,CAAC,EACtB,YAAY,GAAG,UAAU,GAAG,MAAM,GAAG,OAAO,CAC7C,CAAC;AAoFF;;GAEG;AACH,QAAA,MAAM,SAAS,EAAqB,CAAC,KAAK,SAAS,GAAG,CAAC,OAAO,GAAG,GAAG,EAClE,KAAK,EAAE,cAAc,CAAC,KAAK,CAAC,GAAG;IAAE,GAAG,CAAC,EAAE,QAAQ,CAAC,cAAc,CAAC,CAAA;CAAE,KAC9D,YAAY,CAAC;AAElB,OAAO,EAAE,SAAS,EAAE,KAAK,cAAc,EAAE,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from './Board';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/Board/index.ts"],"names":[],"mappings":"AAIA,cAAc,SAAS,CAAC"}
@@ -1,25 +1,2 @@
1
- import { type UseArrowNavigationGroupOptions } from '@fluentui/react-tabster';
2
- import React, { type PropsWithChildren } from 'react';
3
- import { type ThemedClassName } from '@dxos/react-ui';
4
- type FocusState = 'active' | 'error';
5
- type ContextValue = {
6
- setFocus?: (state: FocusState | undefined) => void;
7
- };
8
- declare const useFocus: () => ContextValue;
9
- type GroupProps = ThemedClassName<PropsWithChildren<{
10
- asChild?: boolean;
11
- } & Pick<UseArrowNavigationGroupOptions, 'axis'>>> & {
12
- className?: string;
13
- };
14
- export declare const Focus: {
15
- Group: React.ForwardRefExoticComponent<Omit<React.PropsWithChildren<{
16
- asChild?: boolean;
17
- } & Pick<UseArrowNavigationGroupOptions, "axis">>, "className"> & {
18
- classNames?: import("@dxos/ui-types").ClassNameValue;
19
- } & {
20
- className?: string;
21
- } & React.RefAttributes<HTMLDivElement>>;
22
- };
23
- export type { GroupProps as FocusGroupProps };
24
- export { useFocus };
1
+ export { Focus, useFocus, type FocusGroupProps, type FocusItemProps } from '@dxos/react-ui';
25
2
  //# sourceMappingURL=Focus.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Focus.d.ts","sourceRoot":"","sources":["../../../../../src/components/Focus/Focus.tsx"],"names":[],"mappings":"AAIA,OAAO,EACL,KAAK,8BAA8B,EAIpC,MAAM,yBAAyB,CAAC;AAIjC,OAAO,KAAK,EAAE,EAAE,KAAK,iBAAiB,EAA2D,MAAM,OAAO,CAAC;AAE/G,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAStD,KAAK,UAAU,GAAG,QAAQ,GAAG,OAAO,CAAC;AAIrC,KAAK,YAAY,GAAG;IAClB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,UAAU,GAAG,SAAS,KAAK,IAAI,CAAC;CACpD,CAAC;AAIF,QAAA,MAAM,QAAQ,oBAAiC,CAAC;AAMhD,KAAK,UAAU,GAAG,eAAe,CAC/B,iBAAiB,CACf;IACE,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,GAAG,IAAI,CAAC,8BAA8B,EAAE,MAAM,CAAC,CACjD,CACF,GAAG;IAAE,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AA4C3B,eAAO,MAAM,KAAK;;kBA/CF,OAAO;;;;oBAGL,MAAM;;CA8CvB,CAAC;AAEF,YAAY,EAAE,UAAU,IAAI,eAAe,EAAE,CAAC;AAE9C,OAAO,EAAE,QAAQ,EAAE,CAAC"}
1
+ {"version":3,"file":"Focus.d.ts","sourceRoot":"","sources":["../../../../../src/components/Focus/Focus.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,eAAe,EAAE,KAAK,cAAc,EAAE,MAAM,gBAAgB,CAAC"}
@@ -1,3 +1,2 @@
1
- export { styles as focusStyles } from './styles';
2
1
  export * from './Focus';
3
2
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/Focus/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,MAAM,IAAI,WAAW,EAAE,MAAM,UAAU,CAAC;AAEjD,cAAc,SAAS,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/Focus/index.ts"],"names":[],"mappings":"AAIA,cAAc,SAAS,CAAC"}
@@ -0,0 +1,49 @@
1
+ import React, { type PropsWithChildren, type ReactNode } from 'react';
2
+ import { type AllowedAxis } from '@dxos/react-ui';
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
+ /** Register a scroll-to-item callback (provided by Stack/VirtualStack). */
26
+ registerScrollTo: (fn: ((id: string) => void) | undefined) => void;
27
+ };
28
+ declare const useMosaicContainerContext: (consumerName: string) => MosaicContainerContextValue<any, LocationType>;
29
+ type MosaicContainerProps = PropsWithChildren<Partial<Pick<MosaicContainerContextValue, 'eventHandler' | 'orientation'>> & {
30
+ asChild?: boolean;
31
+ /** Support autoscrolling container when dragging. */
32
+ autoScroll?: HTMLElement | null;
33
+ withFocus?: boolean;
34
+ /** Controlled current-item ID. */
35
+ currentId?: string;
36
+ /** Called when a tile requests to become current. */
37
+ onCurrentChange?: (id: string | undefined) => void;
38
+ debug?: () => ReactNode;
39
+ }>;
40
+ declare const MosaicContainer: React.ForwardRefExoticComponent<Omit<MosaicContainerProps, "className"> & {
41
+ classNames?: import("@dxos/ui-types").ClassNameValue;
42
+ } & {
43
+ className?: string;
44
+ children?: ReactNode;
45
+ role?: string;
46
+ } & React.RefAttributes<HTMLDivElement>>;
47
+ export { MosaicContainer, useMosaicContainerContext };
48
+ export type { MosaicContainerProps, MosaicContainerState };
49
+ //# sourceMappingURL=Container.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Container.d.ts","sourceRoot":"","sources":["../../../../../src/components/Mosaic/Container.tsx"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,EAEZ,KAAK,iBAAiB,EACtB,KAAK,SAAS,EAMf,MAAM,OAAO,CAAC;AAEf,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAMlD,OAAO,EAAE,KAAK,mBAAmB,EAAwB,MAAM,QAAQ,CAAC;AACxE,OAAO,EACL,KAAK,YAAY,EAEjB,KAAK,kBAAkB,EAGxB,MAAM,SAAS,CAAC;AAQjB,KAAK,oBAAoB,GAAG;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,GAAG;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,MAAM,CAAC,EAAE,OAAO,CAAA;CAAE,CAAC;AAEpF,KAAK,2BAA2B,CAAC,KAAK,GAAG,GAAG,EAAE,QAAQ,GAAG,YAAY,IAAI;IACvE,EAAE,EAAE,MAAM,CAAC;IACX,YAAY,EAAE,kBAAkB,CAAC,KAAK,CAAC,CAAC;IACxC,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,QAAQ,CAAC,EAAE,mBAAmB,CAAC;IAC/B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,KAAK,EAAE,oBAAoB,CAAC;IAE5B,4BAA4B;IAC5B,cAAc,CAAC,EAAE,QAAQ,CAAC;IAC1B,iBAAiB,EAAE,CAAC,QAAQ,EAAE,QAAQ,GAAG,SAAS,KAAK,IAAI,CAAC;IAE5D,6CAA6C;IAC7C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,kCAAkC;IAClC,YAAY,EAAE,CAAC,EAAE,EAAE,MAAM,GAAG,SAAS,KAAK,IAAI,CAAC;IAE/C,2EAA2E;IAC3E,gBAAgB,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC,GAAG,SAAS,KAAK,IAAI,CAAC;CACpE,CAAC;AAEF,QAAA,MAAuC,yBAAyB,0EACD,CAAC;AAWhE,KAAK,oBAAoB,GAAG,iBAAiB,CAC3C,OAAO,CAAC,IAAI,CAAC,2BAA2B,EAAE,cAAc,GAAG,aAAa,CAAC,CAAC,GAAG;IAC3E,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,qDAAqD;IACrD,UAAU,CAAC,EAAE,WAAW,GAAG,IAAI,CAAC;IAChC,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,kCAAkC;IAClC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,qDAAqD;IACrD,eAAe,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,GAAG,SAAS,KAAK,IAAI,CAAC;IACnD,KAAK,CAAC,EAAE,MAAM,SAAS,CAAC;CACzB,CACF,CAAC;AAGF,QAAA,MAAM,eAAe;;;;;;wCAyNpB,CAAC;AAIF,OAAO,EAAE,eAAe,EAAE,yBAAyB,EAAE,CAAC;AAEtD,YAAY,EAAE,oBAAoB,EAAE,oBAAoB,EAAE,CAAC"}
@@ -1,148 +1,58 @@
1
- import { type Edge } from '@atlaskit/pragmatic-drag-and-drop-hitbox/closest-edge';
2
- import { type DropIndicatorProps as NativeDropIndicatorProps } from '@atlaskit/pragmatic-drag-and-drop-react-drop-indicator/box';
3
- import React, { type PropsWithChildren, type ReactNode } from 'react';
4
- import { type SlottableClassName, type ThemedClassName } from '@dxos/react-ui';
5
- import { type ScrollableProps } from '../Scrollable';
6
- import { type StackProps } from '../Stack';
7
- import { type AllowedAxis, type Axis, type MosaicData, type MosaicEventHandler, type MosaicTileData } from './types';
8
- type DraggingSource = {
9
- data: MosaicTileData;
10
- handler?: MosaicEventHandler;
11
- container?: Element;
12
- };
13
- type DraggingTarget = {
14
- data: MosaicData;
15
- handler?: MosaicEventHandler;
16
- };
17
- type DraggingState = {
18
- source: DraggingSource;
19
- target?: DraggingTarget;
20
- };
21
- type RootContextValue = {
22
- containers: Record<string, MosaicEventHandler>;
23
- addContainer: (container: MosaicEventHandler) => void;
24
- removeContainer: (id: string) => void;
25
- dragging?: DraggingState;
26
- };
27
- declare const useRootContext: (consumerName: string) => RootContextValue;
28
- type RootProps = ThemedClassName<PropsWithChildren<{
29
- asChild?: boolean;
30
- debug?: boolean;
31
- }>>;
32
- type ContainerState = {
33
- type: 'idle';
34
- } | {
35
- type: 'active';
36
- bounds?: DOMRect;
37
- };
38
- type ContainerContextValue<TData = any, Location = LocationType> = {
39
- id: string;
40
- eventHandler: MosaicEventHandler<TData>;
41
- axis?: AllowedAxis;
42
- dragging?: DraggingState;
43
- scrolling?: boolean;
44
- state: ContainerState;
45
- /** Active drop location. */
46
- activeLocation?: Location;
47
- setActiveLocation: (location: Location | undefined) => void;
48
- };
49
- declare const useContainerContext: (consumerName: string) => ContainerContextValue<any, LocationType>;
50
- type ContainerProps = SlottableClassName<PropsWithChildren<Partial<Pick<ContainerContextValue, 'eventHandler' | 'axis'>> & {
51
- asChild?: boolean;
52
- autoScroll?: HTMLElement | null;
53
- withFocus?: boolean;
54
- debug?: () => ReactNode;
55
- }>>;
56
- /** Must implement value equivalence. */
57
- type LocationType = string | number;
58
- type TileState = {
59
- type: 'idle';
60
- } | {
61
- type: 'preview';
62
- container: HTMLElement;
63
- rect: DOMRect;
64
- } | {
65
- type: 'dragging';
66
- } | {
67
- type: 'target';
68
- closestEdge: Edge | null;
69
- };
70
- type TileContextValue = {
71
- state: TileState;
72
- };
73
- declare const useTileContext: (consumerName: string) => TileContextValue;
74
- type TileProps<TData = any, TLocation = LocationType> = SlottableClassName<PropsWithChildren<{
75
- asChild?: boolean;
76
- dragHandle?: HTMLElement | null;
77
- allowedEdges?: Edge[];
78
- id: string;
79
- data: TData;
80
- location: TLocation;
81
- draggable?: boolean;
82
- debug?: boolean;
83
- }>>;
84
- type PlaceholderProps<Location = LocationType> = ThemedClassName<PropsWithChildren<{
85
- asChild?: boolean;
86
- axis?: Axis;
87
- location: Location;
88
- }>>;
89
- type DropIndicatorProps = Omit<NativeDropIndicatorProps, 'edge'>;
1
+ import { type MosaicContainerProps, type MosaicContainerState, useMosaicContainerContext } from './Container';
2
+ import { type MosaicDropIndicatorProps, type MosaicPlaceholderProps } from './Placeholder';
3
+ import { type MosaicRootProps, useMosaicRootContext } from './Root';
4
+ import { type MosaicStackProps, type MosaicStackTileComponent } from './Stack';
5
+ import { type MosaicTileProps, type MosaicTileState, useMosaicTileContext } from './Tile';
90
6
  export declare const Mosaic: {
91
- Root: React.ForwardRefExoticComponent<Omit<React.PropsWithChildren<{
7
+ Root: import("react").ForwardRefExoticComponent<Omit<import("react").PropsWithChildren<{
92
8
  asChild?: boolean;
93
9
  debug?: boolean;
94
10
  }>, "className"> & {
95
11
  classNames?: import("@dxos/ui-types").ClassNameValue;
96
- } & React.RefAttributes<HTMLDivElement>>;
97
- Container: React.ForwardRefExoticComponent<Partial<Pick<ContainerContextValue<any, LocationType>, "axis" | "eventHandler">> & {
98
- asChild?: boolean;
99
- autoScroll?: HTMLElement | null;
100
- withFocus?: boolean;
101
- debug?: () => ReactNode;
102
- } & {
103
- children?: ReactNode | undefined;
12
+ } & import("react").RefAttributes<HTMLDivElement>>;
13
+ Container: import("react").ForwardRefExoticComponent<Omit<MosaicContainerProps, "className"> & {
14
+ classNames?: import("@dxos/ui-types").ClassNameValue;
104
15
  } & {
105
16
  className?: string;
106
- classNames?: import("@dxos/ui-types").ClassNameValue;
107
- } & React.RefAttributes<HTMLDivElement>>;
108
- Tile: React.ForwardRefExoticComponent<{
109
- asChild?: boolean;
17
+ children?: import("react").ReactNode;
18
+ role?: string;
19
+ } & import("react").RefAttributes<HTMLDivElement>>;
20
+ Tile: import("react").ForwardRefExoticComponent<Omit<Omit<import("react").PropsWithChildren<{
21
+ className?: string;
110
22
  dragHandle?: HTMLElement | null;
111
- allowedEdges?: Edge[];
23
+ allowedEdges?: import("@atlaskit/pragmatic-drag-and-drop-hitbox/dist/types/closest-edge").Edge[];
112
24
  id: string;
113
25
  data: any;
114
- location: LocationType;
26
+ location: import("./types").LocationType;
115
27
  draggable?: boolean;
28
+ current?: boolean;
116
29
  debug?: boolean;
30
+ }>, "className"> & {
31
+ classNames?: import("@dxos/ui-types").ClassNameValue;
117
32
  } & {
118
- children?: ReactNode | undefined;
33
+ asChild?: boolean;
34
+ }, "className"> & {
35
+ classNames?: import("@dxos/ui-types").ClassNameValue;
119
36
  } & {
120
37
  className?: string;
121
- classNames?: import("@dxos/ui-types").ClassNameValue;
122
- } & React.RefAttributes<HTMLDivElement>>;
38
+ children?: import("react").ReactNode;
39
+ role?: string;
40
+ } & import("react").RefAttributes<HTMLDivElement>>;
123
41
  Placeholder: {
124
- <Location extends LocationType = LocationType>({ classNames, children, asChild, axis, location, }: PlaceholderProps<Location>): React.JSX.Element;
42
+ <Location extends import("./types").LocationType = import("./types").LocationType>({ classNames, children, asChild, orientation, location, }: MosaicPlaceholderProps<Location>): import("react").JSX.Element;
125
43
  displayName: string;
126
44
  };
127
45
  DropIndicator: {
128
- (props: DropIndicatorProps): React.JSX.Element | null;
46
+ (props: MosaicDropIndicatorProps): import("react").JSX.Element | null;
129
47
  displayName: string;
130
48
  };
131
- Viewport: React.ForwardRefExoticComponent<Omit<Omit<import("overlayscrollbars-react").OverlayScrollbarsComponentProps, "ref">, "className"> & {
132
- classNames?: import("@dxos/ui-types").ClassNameValue;
133
- } & {
134
- axis?: Axis;
135
- padding?: boolean;
136
- onScroll?: (event: Event) => void;
137
- viewportRef?: React.RefCallback<HTMLElement | null>;
138
- } & React.RefAttributes<HTMLDivElement>>;
139
- Stack: <TData = any>(props: StackProps<TData> & {
140
- ref?: React.Ref<HTMLDivElement>;
141
- }) => React.ReactElement;
142
- VirtualStack: <TData = any>(props: import("..").VirtualStackProps<TData> & {
143
- ref?: React.Ref<HTMLDivElement>;
144
- }) => React.ReactElement;
145
- };
146
- export type { RootProps as MosaicRootProps, ContainerProps as MosaicContainerProps, TileProps as MosaicTileProps, PlaceholderProps as MosiacPlaceholderProps, DropIndicatorProps as MosaicDropIndicatorProps, ScrollableProps as MosaicViewportProps, StackProps as MosaicStackProps, };
147
- export { useRootContext as useMosaic, useContainerContext as useMosaicContainer, useTileContext as useMosaicTile };
49
+ Stack: <TData = any>(props: MosaicStackProps<TData> & {
50
+ ref?: import("react").Ref<HTMLDivElement>;
51
+ }) => import("react").ReactElement;
52
+ VirtualStack: <TData = any>(props: import("./Stack").MosaicVirtualStackProps<TData> & {
53
+ ref?: import("react").Ref<HTMLDivElement>;
54
+ }) => import("react").ReactElement;
55
+ };
56
+ export type { MosaicRootProps, MosaicContainerProps, MosaicContainerState, MosaicTileProps, MosaicTileState, MosaicPlaceholderProps, MosaicDropIndicatorProps, MosaicStackProps, MosaicStackTileComponent, };
57
+ export { useMosaicRootContext as useMosaic, useMosaicContainerContext as useMosaicContainer, useMosaicTileContext as useMosaicTile, };
148
58
  //# sourceMappingURL=Mosaic.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Mosaic.d.ts","sourceRoot":"","sources":["../../../../../src/components/Mosaic/Mosaic.tsx"],"names":[],"mappings":"AAeA,OAAO,EACL,KAAK,IAAI,EAGV,MAAM,uDAAuD,CAAC;AAC/D,OAAO,EAEL,KAAK,kBAAkB,IAAI,wBAAwB,EACpD,MAAM,4DAA4D,CAAC;AAMpE,OAAO,KAAK,EAAE,EAEZ,KAAK,iBAAiB,EACtB,KAAK,SAAS,EAQf,MAAM,OAAO,CAAC;AAIf,OAAO,EAAE,KAAK,kBAAkB,EAAE,KAAK,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAK/E,OAAO,EAAc,KAAK,eAAe,EAAE,MAAM,eAAe,CAAC;AACjE,OAAO,EAAS,KAAK,UAAU,EAAgB,MAAM,UAAU,CAAC;AAEhE,OAAO,EACL,KAAK,WAAW,EAChB,KAAK,IAAI,EA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"}
1
+ {"version":3,"file":"Mosaic.d.ts","sourceRoot":"","sources":["../../../../../src/components/Mosaic/Mosaic.tsx"],"names":[],"mappings":"AAIA,OAAO,EAEL,KAAK,oBAAoB,EACzB,KAAK,oBAAoB,EACzB,yBAAyB,EAC1B,MAAM,aAAa,CAAC;AACrB,OAAO,EAEL,KAAK,wBAAwB,EAE7B,KAAK,sBAAsB,EAC5B,MAAM,eAAe,CAAC;AACvB,OAAO,EAAc,KAAK,eAAe,EAAE,oBAAoB,EAAE,MAAM,QAAQ,CAAC;AAChF,OAAO,EAAe,KAAK,gBAAgB,EAAE,KAAK,wBAAwB,EAAsB,MAAM,SAAS,CAAC;AAChH,OAAO,EAAc,KAAK,eAAe,EAAE,KAAK,eAAe,EAAE,oBAAoB,EAAE,MAAM,QAAQ,CAAC;AAMtG,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;WA2Bo+F,CAAC;;;WAA64K,CAAC;;CAnBr4Q,CAAC;AAEF,YAAY,EACV,eAAe,EACf,oBAAoB,EACpB,oBAAoB,EACpB,eAAe,EACf,eAAe,EACf,sBAAsB,EACtB,wBAAwB,EACxB,gBAAgB,EAChB,wBAAwB,GACzB,CAAC;AAEF,OAAO,EACL,oBAAoB,IAAI,SAAS,EACjC,yBAAyB,IAAI,kBAAkB,EAC/C,oBAAoB,IAAI,aAAa,GACtC,CAAC"}
@@ -0,0 +1,21 @@
1
+ import { type DropIndicatorProps as NaturalDropIndicatorProps } from '@atlaskit/pragmatic-drag-and-drop-react-drop-indicator/box';
2
+ import React, { type PropsWithChildren } from 'react';
3
+ import { type Axis, type ThemedClassName } from '@dxos/react-ui';
4
+ import { type LocationType } from './types';
5
+ type MosaicPlaceholderProps<Location = LocationType> = ThemedClassName<PropsWithChildren<{
6
+ asChild?: boolean;
7
+ orientation?: Axis;
8
+ location: Location;
9
+ }>>;
10
+ declare const MosaicPlaceholder: {
11
+ <Location extends LocationType = LocationType>({ classNames, children, asChild, orientation, location, }: MosaicPlaceholderProps<Location>): React.JSX.Element;
12
+ displayName: string;
13
+ };
14
+ type MosaicDropIndicatorProps = Omit<NaturalDropIndicatorProps, 'edge'>;
15
+ declare const MosaicDropIndicator: {
16
+ (props: MosaicDropIndicatorProps): React.JSX.Element | null;
17
+ displayName: string;
18
+ };
19
+ export { MosaicPlaceholder, MosaicDropIndicator };
20
+ export type { MosaicPlaceholderProps, MosaicDropIndicatorProps };
21
+ //# sourceMappingURL=Placeholder.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Placeholder.d.ts","sourceRoot":"","sources":["../../../../../src/components/Mosaic/Placeholder.tsx"],"names":[],"mappings":"AAKA,OAAO,EAEL,KAAK,kBAAkB,IAAI,yBAAyB,EACrD,MAAM,4DAA4D,CAAC;AAGpE,OAAO,KAAK,EAAE,EAAE,KAAK,iBAAiB,EAAoC,MAAM,OAAO,CAAC;AAExF,OAAO,EAAE,KAAK,IAAI,EAAE,KAAK,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAKjE,OAAO,EAAE,KAAK,YAAY,EAA6C,MAAM,SAAS,CAAC;AAcvF,KAAK,sBAAsB,CAAC,QAAQ,GAAG,YAAY,IAAI,eAAe,CACpE,iBAAiB,CAAC;IAChB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,WAAW,CAAC,EAAE,IAAI,CAAC;IACnB,QAAQ,EAAE,QAAQ,CAAC;CACpB,CAAC,CACH,CAAC;AAEF,QAAA,MAAM,iBAAiB;KAAI,QAAQ,SAAS,YAAY,4EAMrD,sBAAsB,CAAC,QAAQ,CAAC;;CA0DlC,CAAC;AAWF,KAAK,wBAAwB,GAAG,IAAI,CAAC,yBAAyB,EAAE,MAAM,CAAC,CAAC;AAExE,QAAA,MAAM,mBAAmB;YAAW,wBAAwB;;CAK3D,CAAC;AAQF,OAAO,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,CAAC;AAElD,YAAY,EAAE,sBAAsB,EAAE,wBAAwB,EAAE,CAAC"}
@@ -0,0 +1,36 @@
1
+ import React, { type PropsWithChildren } from 'react';
2
+ import { type ThemedClassName } from '@dxos/react-ui';
3
+ import { type MosaicData, type MosaicEventHandler, type MosaicTileData } from './types';
4
+ type MosaicDraggingSource = {
5
+ data: MosaicTileData;
6
+ handler?: MosaicEventHandler;
7
+ container?: Element;
8
+ };
9
+ type MosaicDraggingTarget = {
10
+ data: MosaicData;
11
+ handler?: MosaicEventHandler;
12
+ };
13
+ type MosaicDraggingState = {
14
+ source: MosaicDraggingSource;
15
+ target?: MosaicDraggingTarget;
16
+ };
17
+ type MosaicRootContextValue = {
18
+ containers: Record<string, MosaicEventHandler>;
19
+ addContainer: (container: MosaicEventHandler) => void;
20
+ removeContainer: (id: string) => void;
21
+ dragging?: MosaicDraggingState;
22
+ };
23
+ declare const useMosaicRootContext: (consumerName: string) => MosaicRootContextValue;
24
+ type MosaicRootProps = ThemedClassName<PropsWithChildren<{
25
+ asChild?: boolean;
26
+ debug?: boolean;
27
+ }>>;
28
+ declare const MosaicRoot: React.ForwardRefExoticComponent<Omit<React.PropsWithChildren<{
29
+ asChild?: boolean;
30
+ debug?: boolean;
31
+ }>, "className"> & {
32
+ classNames?: import("@dxos/ui-types").ClassNameValue;
33
+ } & React.RefAttributes<HTMLDivElement>>;
34
+ export { MosaicRoot, useMosaicRootContext };
35
+ export type { MosaicRootProps, MosaicDraggingState };
36
+ //# sourceMappingURL=Root.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Root.d.ts","sourceRoot":"","sources":["../../../../../src/components/Mosaic/Root.tsx"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,EAAE,KAAK,iBAAiB,EAAwD,MAAM,OAAO,CAAC;AAG5G,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAGtD,OAAO,EAAE,KAAK,UAAU,EAAE,KAAK,kBAAkB,EAAE,KAAK,cAAc,EAAE,MAAM,SAAS,CAAC;AAMxF,KAAK,oBAAoB,GAAG;IAC1B,IAAI,EAAE,cAAc,CAAC;IACrB,OAAO,CAAC,EAAE,kBAAkB,CAAC;IAC7B,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB,CAAC;AAEF,KAAK,oBAAoB,GAAG;IAC1B,IAAI,EAAE,UAAU,CAAC;IACjB,OAAO,CAAC,EAAE,kBAAkB,CAAC;CAC9B,CAAC;AAEF,KAAK,mBAAmB,GAAG;IACzB,MAAM,EAAE,oBAAoB,CAAC;IAC7B,MAAM,CAAC,EAAE,oBAAoB,CAAC;CAC/B,CAAC;AAEF,KAAK,sBAAsB,GAAG;IAC5B,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,kBAAkB,CAAC,CAAC;IAC/C,YAAY,EAAE,CAAC,SAAS,EAAE,kBAAkB,KAAK,IAAI,CAAC;IACtD,eAAe,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IACtC,QAAQ,CAAC,EAAE,mBAAmB,CAAC;CAChC,CAAC;AAEF,QAAA,MAAkC,oBAAoB,kDAAuD,CAAC;AAW9G,KAAK,eAAe,GAAG,eAAe,CACpC,iBAAiB,CAAC;IAChB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB,CAAC,CACH,CAAC;AAEF,QAAA,MAAM,UAAU;cALF,OAAO;YACT,OAAO;;;wCAiOlB,CAAC;AAIF,OAAO,EAAE,UAAU,EAAE,oBAAoB,EAAE,CAAC;AAE5C,YAAY,EAAE,eAAe,EAAE,mBAAmB,EAAE,CAAC"}
@@ -0,0 +1,23 @@
1
+ import { type ReactVirtualizerOptions } from '@tanstack/react-virtual';
2
+ import { type FC, type ReactElement, type Ref } from 'react';
3
+ import { type Axis, type ThemedClassName } from '@dxos/react-ui';
4
+ import { type MosaicTileProps } from './Tile';
5
+ import { type GetId } from './types';
6
+ type MosaicStackTileComponent<TData = any> = FC<MosaicTileProps<TData>>;
7
+ type MosaicStackProps<TData = any> = ThemedClassName<{
8
+ role?: string;
9
+ getId: GetId<TData>;
10
+ orientation?: Axis;
11
+ items?: readonly TData[];
12
+ Tile: MosaicStackTileComponent<TData>;
13
+ } & Pick<MosaicTileProps<TData>, 'draggable' | 'debug'>>;
14
+ declare const MosaicStack: <TData = any>(props: MosaicStackProps<TData> & {
15
+ ref?: Ref<HTMLDivElement>;
16
+ }) => ReactElement;
17
+ type MosaicVirtualStackProps<TData = any> = MosaicStackProps<TData> & Pick<ReactVirtualizerOptions<HTMLElement, HTMLDivElement>, 'estimateSize' | 'gap' | 'getScrollElement' | 'overscan' | 'onChange'>;
18
+ declare const MosaicVirtualStack: <TData = any>(props: MosaicVirtualStackProps<TData> & {
19
+ ref?: Ref<HTMLDivElement>;
20
+ }) => ReactElement;
21
+ export { MosaicStack, MosaicVirtualStack };
22
+ export type { MosaicStackTileComponent, MosaicStackProps, MosaicVirtualStackProps };
23
+ //# sourceMappingURL=Stack.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Stack.d.ts","sourceRoot":"","sources":["../../../../../src/components/Mosaic/Stack.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,uBAAuB,EAAkB,MAAM,yBAAyB,CAAC;AAEvF,OAAc,EACZ,KAAK,EAAE,EAGP,KAAK,YAAY,EACjB,KAAK,GAAG,EAIT,MAAM,OAAO,CAAC;AAGf,OAAO,EAAE,KAAK,IAAI,EAAE,KAAK,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAQjE,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,QAAQ,CAAC;AAC9C,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,SAAS,CAAC;AAyBrC,KAAK,wBAAwB,CAAC,KAAK,GAAG,GAAG,IAAI,EAAE,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC,CAAC;AAExE,KAAK,gBAAgB,CAAC,KAAK,GAAG,GAAG,IAAI,eAAe,CAClD;IACE,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC;IACpB,WAAW,CAAC,EAAE,IAAI,CAAC;IACnB,KAAK,CAAC,EAAE,SAAS,KAAK,EAAE,CAAC;IACzB,IAAI,EAAE,wBAAwB,CAAC,KAAK,CAAC,CAAC;CACvC,GAAG,IAAI,CAAC,eAAe,CAAC,KAAK,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,CACxD,CAAC;AAmEF,QAAA,MAAM,WAAW,EAAuB,CAAC,KAAK,GAAG,GAAG,EAClD,KAAK,EAAE,gBAAgB,CAAC,KAAK,CAAC,GAAG;IAAE,GAAG,CAAC,EAAE,GAAG,CAAC,cAAc,CAAC,CAAA;CAAE,KAC3D,YAAY,CAAC;AAQlB,KAAK,uBAAuB,CAAC,KAAK,GAAG,GAAG,IAAI,gBAAgB,CAAC,KAAK,CAAC,GACjE,IAAI,CACF,uBAAuB,CAAC,WAAW,EAAE,cAAc,CAAC,EACpD,cAAc,GAAG,KAAK,GAAG,kBAAkB,GAAG,UAAU,GAAG,UAAU,CACtE,CAAC;AAmJJ,QAAA,MAAM,kBAAkB,EAA8B,CAAC,KAAK,GAAG,GAAG,EAChE,KAAK,EAAE,uBAAuB,CAAC,KAAK,CAAC,GAAG;IAAE,GAAG,CAAC,EAAE,GAAG,CAAC,cAAc,CAAC,CAAA;CAAE,KAClE,YAAY,CAAC;AA0BlB,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,CAAC;AAE3C,YAAY,EAAE,wBAAwB,EAAE,gBAAgB,EAAE,uBAAuB,EAAE,CAAC"}
@@ -0,0 +1,20 @@
1
+ import { type Meta, type StoryObj } from '@storybook/react-vite';
2
+ import React from 'react';
3
+ import { Obj } from '@dxos/echo';
4
+ import { MosaicStackProps } from './Mosaic';
5
+ import { MosaicStack } from './Stack';
6
+ declare const meta: Meta<typeof MosaicStack<Obj.Any>>;
7
+ export default meta;
8
+ type Story = StoryObj<typeof meta>;
9
+ export declare const Default: Story;
10
+ export declare const DefaultDraggable: Story;
11
+ export declare const DefaultDebug: Story;
12
+ export declare const Virtual: Story;
13
+ export declare const VirtualDraggable: Story;
14
+ export declare const VirtualDebug: {
15
+ render: (props: MosaicStackProps<Obj.Any>) => React.JSX.Element;
16
+ args: {
17
+ debug: boolean;
18
+ };
19
+ };
20
+ //# sourceMappingURL=Stack.stories.d.ts.map
@@ -0,0 +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;AAQjC,OAAO,EAAU,gBAAgB,EAAE,MAAM,UAAU,CAAC;AACpD,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAuGtC,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,WAAW,CAAC,GAAG,CAAC,GAAG,CAAC,CAc3C,CAAC;AAEF,eAAe,IAAI,CAAC;AAEpB,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;oBAjGS,gBAAgB,CAAC,GAAG,CAAC,GAAG,CAAC;;;;CAsG1D,CAAC"}
@@ -0,0 +1,57 @@
1
+ import { type Edge } from '@atlaskit/pragmatic-drag-and-drop-hitbox/closest-edge';
2
+ import React, { type PropsWithChildren } from 'react';
3
+ import { type ThemedClassName } from '@dxos/react-ui';
4
+ import { type LocationType } from './types';
5
+ type MosaicTileState = {
6
+ type: 'idle';
7
+ } | {
8
+ type: 'preview';
9
+ container: HTMLElement;
10
+ rect: DOMRect;
11
+ } | {
12
+ type: 'dragging';
13
+ } | {
14
+ type: 'target';
15
+ closestEdge: Edge | null;
16
+ };
17
+ type MosaicTileContextValue = {
18
+ state: MosaicTileState;
19
+ };
20
+ declare const useMosaicTileContext: (consumerName: string) => MosaicTileContextValue;
21
+ type MosaicTileProps<TData = any, TLocation = LocationType> = ThemedClassName<PropsWithChildren<{
22
+ className?: string;
23
+ dragHandle?: HTMLElement | null;
24
+ allowedEdges?: Edge[];
25
+ id: string;
26
+ data: TData;
27
+ location: TLocation;
28
+ draggable?: boolean;
29
+ /** Whether this tile is the current (aria-current) item. */
30
+ current?: boolean;
31
+ debug?: boolean;
32
+ }>>;
33
+ declare const MosaicTile: React.ForwardRefExoticComponent<Omit<Omit<React.PropsWithChildren<{
34
+ className?: string;
35
+ dragHandle?: HTMLElement | null;
36
+ allowedEdges?: Edge[];
37
+ id: string;
38
+ data: any;
39
+ location: LocationType;
40
+ draggable?: boolean;
41
+ /** Whether this tile is the current (aria-current) item. */
42
+ current?: boolean;
43
+ debug?: boolean;
44
+ }>, "className"> & {
45
+ classNames?: import("@dxos/ui-types").ClassNameValue;
46
+ } & {
47
+ asChild?: boolean;
48
+ }, "className"> & {
49
+ classNames?: import("@dxos/ui-types").ClassNameValue;
50
+ } & {
51
+ className?: string;
52
+ children?: React.ReactNode;
53
+ role?: string;
54
+ } & React.RefAttributes<HTMLDivElement>>;
55
+ export { MosaicTile, useMosaicTileContext };
56
+ export type { MosaicTileProps, MosaicTileState };
57
+ //# sourceMappingURL=Tile.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Tile.d.ts","sourceRoot":"","sources":["../../../../../src/components/Mosaic/Tile.tsx"],"names":[],"mappings":"AAaA,OAAO,EACL,KAAK,IAAI,EAGV,MAAM,uDAAuD,CAAC;AAK/D,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OAAO,EAAE,UAAU,EAAE,oBAAoB,EAAE,CAAC;AAE5C,YAAY,EAAE,eAAe,EAAE,eAAe,EAAE,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../../src/components/Mosaic/styles.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,MAAM;;;;;CAwBuC,CAAC"}
1
+ {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../../src/components/Mosaic/styles.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,MAAM;;;;;CAyBuC,CAAC"}
@@ -1,6 +1,13 @@
1
- export type Axis = 'vertical' | 'horizontal';
2
- export type AllowedAxis = Axis | 'all';
1
+ import { type ElementDragPayload } from '@atlaskit/pragmatic-drag-and-drop/element/adapter';
3
2
  export type GetId<TData = any> = (data: TData) => string;
3
+ /**
4
+ * NOTE: Must implement value equivalence.
5
+ */
6
+ export type LocationType = string | number;
7
+ /**
8
+ * Get the source data from the drag payload.
9
+ */
10
+ export declare const getSourceData: <TData = any, TLocation = any>(source: ElementDragPayload) => MosaicTileData<TData, TLocation> | null;
4
11
  /**
5
12
  * Draggable item.
6
13
  * Tiles may contain arbitrary data (which may not be an ECHO object; e.g., search result).
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/components/Mosaic/types.ts"],"names":[],"mappings":"AAKA,MAAM,MAAM,IAAI,GAAG,UAAU,GAAG,YAAY,CAAC;AAC7C,MAAM,MAAM,WAAW,GAAG,IAAI,GAAG,KAAK,CAAC;AAEvC,MAAM,MAAM,KAAK,CAAC,KAAK,GAAG,GAAG,IAAI,CAAC,IAAI,EAAE,KAAK,KAAK,MAAM,CAAC;AAEzD;;;GAGG;AACH,MAAM,MAAM,cAAc,CAAC,KAAK,GAAG,GAAG,EAAE,SAAS,GAAG,GAAG,IAAI;IACzD,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,EAAE,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ClB,EAAE,EAAE,MAAM,CAAC;CACZ,CAAC;AAEF,MAAM,MAAM,UAAU,GAAG,cAAc,GAAG,qBAAqB,GAAG,mBAAmB,CAAC;AAEtF,MAAM,MAAM,gBAAgB,GAAG,cAAc,GAAG,qBAAqB,CAAC;AAEtE;;GAEG;AACH,MAAM,WAAW,kBAAkB,CAAC,KAAK,GAAG,GAAG,EAAE,OAAO,GAAG,GAAG;IAC5D;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;;OAGG;IACH,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE;QAAE,MAAM,EAAE,cAAc,CAAC,KAAK,CAAC,CAAA;KAAE,KAAK,OAAO,CAAC;IAEhE;;OAEG;IACH,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE;QAAE,MAAM,EAAE,cAAc,CAAC,KAAK,CAAC,CAAC;QAAC,QAAQ,EAAE;YAAE,CAAC,EAAE,MAAM,CAAC;YAAC,CAAC,EAAE,MAAM,CAAA;SAAE,CAAA;KAAE,KAAK,IAAI,CAAC;IAEhG;;OAEG;IACH,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE;QAAE,MAAM,EAAE,cAAc,CAAC,KAAK,CAAC,CAAC;QAAC,MAAM,CAAC,EAAE,UAAU,CAAA;KAAE,KAAK,IAAI,CAAC;IAEjF;;;;;OAKG;IACH,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE;QAAE,MAAM,EAAE,cAAc,CAAC,KAAK,CAAC,CAAA;KAAE,EAAE,EAAE,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,OAAO,CAAC,OAAO,CAAC,KAAK,IAAI,CAAC;IAEvG;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;CACvB"}
@@ -1,7 +1,4 @@
1
- export * from './Card';
1
+ export * from './Board';
2
2
  export * from './Focus';
3
- export * from './Image';
4
- export * from './Layout';
5
3
  export * from './Mosaic';
6
- export * from './Stack';
7
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/index.ts"],"names":[],"mappings":"AAIA,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/index.ts"],"names":[],"mappings":"AAIA,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC"}
@@ -1,4 +1,5 @@
1
1
  export * from './useContainerDebug';
2
+ export * from './useDefaultColumnEventHandler';
2
3
  export * from './useEventHandlerAdapter';
3
4
  export * from './useVisibleItems';
4
5
  //# sourceMappingURL=index.d.ts.map