@dxos/react-ui-stack 0.8.2-staging.7ac8446 → 0.8.3-main.672df60

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 (114) hide show
  1. package/dist/lib/browser/index.mjs +960 -419
  2. package/dist/lib/browser/index.mjs.map +4 -4
  3. package/dist/lib/browser/meta.json +1 -1
  4. package/dist/lib/browser/testing/index.mjs.map +3 -3
  5. package/dist/lib/node/index.cjs +949 -408
  6. package/dist/lib/node/index.cjs.map +4 -4
  7. package/dist/lib/node/meta.json +1 -1
  8. package/dist/lib/node/testing/index.cjs.map +3 -3
  9. package/dist/lib/node-esm/index.mjs +960 -419
  10. package/dist/lib/node-esm/index.mjs.map +4 -4
  11. package/dist/lib/node-esm/meta.json +1 -1
  12. package/dist/lib/node-esm/testing/index.mjs.map +3 -3
  13. package/dist/types/src/components/{Stack.d.ts → Stack/Stack.d.ts} +4 -1
  14. package/dist/types/src/components/Stack/Stack.d.ts.map +1 -0
  15. package/dist/types/src/components/Stack/Stack.stories.d.ts +9 -0
  16. package/dist/types/src/components/Stack/Stack.stories.d.ts.map +1 -0
  17. package/dist/types/src/components/Stack/index.d.ts +2 -0
  18. package/dist/types/src/components/Stack/index.d.ts.map +1 -0
  19. package/dist/types/src/components/StackContext.d.ts +14 -10
  20. package/dist/types/src/components/StackContext.d.ts.map +1 -1
  21. package/dist/types/src/components/StackItem/MenuSignifier.d.ts.map +1 -0
  22. package/dist/types/src/components/{StackItem.d.ts → StackItem/StackItem.d.ts} +15 -6
  23. package/dist/types/src/components/StackItem/StackItem.d.ts.map +1 -0
  24. package/dist/types/src/components/StackItem/StackItem.stories.d.ts +8 -0
  25. package/dist/types/src/components/StackItem/StackItem.stories.d.ts.map +1 -0
  26. package/dist/types/src/components/StackItem/StackItemContent.d.ts.map +1 -0
  27. package/dist/types/src/components/{StackItemDragHandle.d.ts → StackItem/StackItemDragHandle.d.ts} +1 -1
  28. package/dist/types/src/components/StackItem/StackItemDragHandle.d.ts.map +1 -0
  29. package/dist/types/src/components/{StackItemHeading.d.ts → StackItem/StackItemHeading.d.ts} +4 -2
  30. package/dist/types/src/components/StackItem/StackItemHeading.d.ts.map +1 -0
  31. package/dist/types/src/components/StackItem/StackItemResizeHandle.d.ts.map +1 -0
  32. package/dist/types/src/components/StackItem/StackItemSigil.d.ts.map +1 -0
  33. package/dist/types/src/components/StackItem/index.d.ts +2 -0
  34. package/dist/types/src/components/StackItem/index.d.ts.map +1 -0
  35. package/dist/types/src/components/defs.d.ts +18 -0
  36. package/dist/types/src/components/defs.d.ts.map +1 -0
  37. package/dist/types/src/components/deprecated/LayoutControls.d.ts.map +1 -0
  38. package/dist/types/src/components/index.d.ts +1 -2
  39. package/dist/types/src/components/index.d.ts.map +1 -1
  40. package/dist/types/src/exemplars/Card/Card.d.ts +58 -0
  41. package/dist/types/src/exemplars/Card/Card.d.ts.map +1 -0
  42. package/dist/types/src/exemplars/Card/Card.stories-todo.d.ts +1 -0
  43. package/dist/types/src/exemplars/Card/Card.stories-todo.d.ts.map +1 -0
  44. package/dist/types/src/exemplars/Card/CardDragPreview.d.ts +6 -0
  45. package/dist/types/src/exemplars/Card/CardDragPreview.d.ts.map +1 -0
  46. package/dist/types/src/exemplars/Card/fragments.d.ts +6 -0
  47. package/dist/types/src/exemplars/Card/fragments.d.ts.map +1 -0
  48. package/dist/types/src/exemplars/Card/index.d.ts +3 -0
  49. package/dist/types/src/exemplars/Card/index.d.ts.map +1 -0
  50. package/dist/types/src/exemplars/CardStack/CardStack.d.ts +34 -0
  51. package/dist/types/src/exemplars/CardStack/CardStack.d.ts.map +1 -0
  52. package/dist/types/src/exemplars/CardStack/CardStack.stories-todo.d.ts +1 -0
  53. package/dist/types/src/exemplars/CardStack/CardStack.stories-todo.d.ts.map +1 -0
  54. package/dist/types/src/exemplars/CardStack/CardStackDragPreview.d.ts +9 -0
  55. package/dist/types/src/exemplars/CardStack/CardStackDragPreview.d.ts.map +1 -0
  56. package/dist/types/src/exemplars/CardStack/index.d.ts +3 -0
  57. package/dist/types/src/exemplars/CardStack/index.d.ts.map +1 -0
  58. package/dist/types/src/exemplars/index.d.ts +3 -0
  59. package/dist/types/src/exemplars/index.d.ts.map +1 -0
  60. package/dist/types/src/hooks/useStackDropForElements.d.ts +4 -4
  61. package/dist/types/src/hooks/useStackDropForElements.d.ts.map +1 -1
  62. package/dist/types/src/index.d.ts +1 -0
  63. package/dist/types/src/index.d.ts.map +1 -1
  64. package/dist/types/src/testing/stack-manager.d.ts.map +1 -1
  65. package/dist/types/src/translations.d.ts +1 -0
  66. package/dist/types/src/translations.d.ts.map +1 -1
  67. package/dist/types/tsconfig.tsbuildinfo +1 -1
  68. package/package.json +22 -20
  69. package/src/components/{Stack.stories.tsx → Stack/Stack.stories.tsx} +29 -17
  70. package/src/components/{Stack.tsx → Stack/Stack.tsx} +55 -5
  71. package/src/components/Stack/index.ts +5 -0
  72. package/src/components/StackContext.tsx +21 -13
  73. package/src/components/StackItem/StackItem.stories.tsx +49 -0
  74. package/src/components/{StackItem.tsx → StackItem/StackItem.tsx} +90 -11
  75. package/src/components/{StackItemContent.tsx → StackItem/StackItemContent.tsx} +2 -1
  76. package/src/components/{StackItemDragHandle.tsx → StackItem/StackItemDragHandle.tsx} +2 -2
  77. package/src/components/{StackItemHeading.tsx → StackItem/StackItemHeading.tsx} +10 -6
  78. package/src/components/{StackItemResizeHandle.tsx → StackItem/StackItemResizeHandle.tsx} +1 -1
  79. package/src/components/{StackItemSigil.tsx → StackItem/StackItemSigil.tsx} +3 -15
  80. package/src/components/StackItem/index.ts +5 -0
  81. package/src/components/defs.ts +26 -0
  82. package/src/components/{LayoutControls.tsx → deprecated/LayoutControls.tsx} +3 -23
  83. package/src/components/index.ts +2 -2
  84. package/src/exemplars/Card/Card.stories-todo.tsx +135 -0
  85. package/src/exemplars/Card/Card.tsx +178 -0
  86. package/src/exemplars/Card/CardDragPreview.tsx +22 -0
  87. package/src/exemplars/Card/fragments.ts +14 -0
  88. package/src/exemplars/Card/index.ts +6 -0
  89. package/src/exemplars/CardStack/CardStack.stories-todo.tsx +80 -0
  90. package/src/exemplars/CardStack/CardStack.tsx +118 -0
  91. package/src/exemplars/CardStack/CardStackDragPreview.tsx +61 -0
  92. package/src/exemplars/CardStack/index.ts +6 -0
  93. package/src/exemplars/index.ts +6 -0
  94. package/src/hooks/useStackDropForElements.ts +7 -6
  95. package/src/index.ts +4 -0
  96. package/src/testing/stack-manager.ts +6 -6
  97. package/src/translations.ts +1 -0
  98. package/dist/types/src/components/LayoutControls.d.ts.map +0 -1
  99. package/dist/types/src/components/MenuSignifier.d.ts.map +0 -1
  100. package/dist/types/src/components/Stack.d.ts.map +0 -1
  101. package/dist/types/src/components/Stack.stories.d.ts +0 -8
  102. package/dist/types/src/components/Stack.stories.d.ts.map +0 -1
  103. package/dist/types/src/components/StackItem.d.ts.map +0 -1
  104. package/dist/types/src/components/StackItemContent.d.ts.map +0 -1
  105. package/dist/types/src/components/StackItemDragHandle.d.ts.map +0 -1
  106. package/dist/types/src/components/StackItemHeading.d.ts.map +0 -1
  107. package/dist/types/src/components/StackItemResizeHandle.d.ts.map +0 -1
  108. package/dist/types/src/components/StackItemSigil.d.ts.map +0 -1
  109. /package/dist/types/src/components/{MenuSignifier.d.ts → StackItem/MenuSignifier.d.ts} +0 -0
  110. /package/dist/types/src/components/{StackItemContent.d.ts → StackItem/StackItemContent.d.ts} +0 -0
  111. /package/dist/types/src/components/{StackItemResizeHandle.d.ts → StackItem/StackItemResizeHandle.d.ts} +0 -0
  112. /package/dist/types/src/components/{StackItemSigil.d.ts → StackItem/StackItemSigil.d.ts} +0 -0
  113. /package/dist/types/src/components/{LayoutControls.d.ts → deprecated/LayoutControls.d.ts} +0 -0
  114. /package/src/components/{MenuSignifier.tsx → StackItem/MenuSignifier.tsx} +0 -0
@@ -1,14 +1,5 @@
1
- import type { Edge } from '@atlaskit/pragmatic-drag-and-drop-hitbox/closest-edge';
2
- import { type Size as DndSize } from '@dxos/react-ui-dnd';
3
1
  import { type Orientation, type Size } from './Stack';
4
- export type StackItemSize = DndSize;
5
- export type StackItemData = {
6
- id: string;
7
- type: 'column' | 'card';
8
- };
9
- export type StackItemRearrangeHandler<Data extends {
10
- id: string;
11
- } = StackItemData> = (source: Data, target: Data, closestEdge: Edge | null) => void;
2
+ import { type StackItemSize, type StackItemRearrangeHandler } from './defs';
12
3
  export type StackContextValue = {
13
4
  orientation: Orientation;
14
5
  rail: boolean;
@@ -17,10 +8,23 @@ export type StackContextValue = {
17
8
  };
18
9
  export declare const StackContext: import("react").Context<StackContextValue>;
19
10
  export declare const useStack: () => StackContextValue;
11
+ export type ItemDragState = {
12
+ type: 'idle';
13
+ } | {
14
+ type: 'preview';
15
+ container: HTMLElement;
16
+ item: any;
17
+ } | {
18
+ type: 'is-dragging';
19
+ item: any;
20
+ };
21
+ export declare const idle: ItemDragState;
20
22
  export type StackItemContextValue = {
21
23
  selfDragHandleRef: (element: HTMLDivElement | null) => void;
22
24
  size: StackItemSize;
23
25
  setSize: (nextSize: StackItemSize, commit?: boolean) => void;
26
+ state: ItemDragState;
27
+ setState: (state: ItemDragState) => void;
24
28
  };
25
29
  export declare const StackItemContext: import("react").Context<StackItemContextValue>;
26
30
  export declare const useStackItem: () => StackItemContextValue;
@@ -1 +1 @@
1
- {"version":3,"file":"StackContext.d.ts","sourceRoot":"","sources":["../../../../src/components/StackContext.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,uDAAuD,CAAC;AAGlF,OAAO,EAAE,KAAK,IAAI,IAAI,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAE1D,OAAO,EAAE,KAAK,WAAW,EAAE,KAAK,IAAI,EAAE,MAAM,SAAS,CAAC;AAEtD,MAAM,MAAM,aAAa,GAAG,OAAO,CAAC;AAEpC,MAAM,MAAM,aAAa,GAAG;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,QAAQ,GAAG,MAA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CAAC;AAEH,eAAO,MAAM,QAAQ,yBAAiC,CAAC;AAEvD,MAAM,MAAM,aAAa,GACrB;IACE,IAAI,EAAE,MAAM,CAAC;CACd,GACD;IACE,IAAI,EAAE,SAAS,CAAC;IAChB,SAAS,EAAE,WAAW,CAAC;IACvB,IAAI,EAAE,GAAG,CAAC;CACX,GACD;IACE,IAAI,EAAE,aAAa,CAAC;IACpB,IAAI,EAAE,GAAG,CAAC;CACX,CAAC;AAEN,eAAO,MAAM,IAAI,EAAE,aAAgC,CAAC;AAEpD,MAAM,MAAM,qBAAqB,GAAG;IAClC,iBAAiB,EAAE,CAAC,OAAO,EAAE,cAAc,GAAG,IAAI,KAAK,IAAI,CAAC;IAC5D,IAAI,EAAE,aAAa,CAAC;IACpB,OAAO,EAAE,CAAC,QAAQ,EAAE,aAAa,EAAE,MAAM,CAAC,EAAE,OAAO,KAAK,IAAI,CAAC;IAC7D,KAAK,EAAE,aAAa,CAAC;IACrB,QAAQ,EAAE,CAAC,KAAK,EAAE,aAAa,KAAK,IAAI,CAAC;CAC1C,CAAC;AAEF,eAAO,MAAM,gBAAgB,gDAM3B,CAAC;AAEH,eAAO,MAAM,YAAY,6BAAqC,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MenuSignifier.d.ts","sourceRoot":"","sources":["../../../../../src/components/StackItem/MenuSignifier.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,eAAO,MAAM,uBAAuB,yBAoBnC,CAAC;AAEF,eAAO,MAAM,qBAAqB,yBAIjC,CAAC"}
@@ -1,23 +1,31 @@
1
- import React, { type ComponentPropsWithRef } from 'react';
1
+ import React, { type ComponentPropsWithRef, type ReactNode } from 'react';
2
2
  import { type ThemedClassName } from '@dxos/react-ui';
3
- import { type StackItemSize, type StackItemData } from './StackContext';
4
3
  import { type StackItemContentProps } from './StackItemContent';
5
4
  import { type StackItemDragHandleProps } from './StackItemDragHandle';
6
5
  import { type StackItemHeadingProps, type StackItemHeadingLabelProps } from './StackItemHeading';
7
6
  import { type StackItemResizeHandleProps } from './StackItemResizeHandle';
8
7
  import { type StackItemSigilProps, type StackItemSigilAction, type StackItemSigilButtonProps } from './StackItemSigil';
8
+ import { type StackItemSize, type StackItemData } from '../defs';
9
9
  export declare const DEFAULT_HORIZONTAL_SIZE = 48;
10
10
  export declare const DEFAULT_VERTICAL_SIZE = "min-content";
11
11
  export declare const DEFAULT_EXTRINSIC_SIZE = 48;
12
- export type StackItemRootProps = ThemedClassName<ComponentPropsWithRef<'div'>> & {
12
+ type StackItemRootProps = ThemedClassName<ComponentPropsWithRef<'div'>> & {
13
13
  item: Omit<StackItemData, 'type'>;
14
14
  order?: number;
15
+ prevSiblingId?: string;
16
+ nextSiblingId?: string;
15
17
  size?: StackItemSize;
16
18
  onSizeChange?: (nextSize: StackItemSize) => void;
17
19
  role?: 'article' | 'section';
18
20
  disableRearrange?: boolean;
19
21
  focusIndicatorVariant?: 'over-all' | 'group';
20
22
  };
23
+ type StackItemDragPreviewProps = {
24
+ children: ({ item }: {
25
+ item: any;
26
+ }) => ReactNode;
27
+ };
28
+ export declare const StackItemDragPreview: ({ children }: StackItemDragPreviewProps) => React.ReactPortal | null;
21
29
  export declare const StackItem: {
22
30
  Root: React.ForwardRefExoticComponent<Omit<StackItemRootProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
23
31
  Content: React.ForwardRefExoticComponent<Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, "className"> & {
@@ -27,7 +35,7 @@ export declare const StackItem: {
27
35
  statusbar?: boolean;
28
36
  size?: "intrinsic" | "video" | "square";
29
37
  } & React.RefAttributes<HTMLDivElement>>;
30
- Heading: ({ children, classNames, ...props }: StackItemHeadingProps) => React.JSX.Element;
38
+ Heading: ({ children, classNames, asChild, ...props }: StackItemHeadingProps) => React.JSX.Element;
31
39
  HeadingLabel: React.ForwardRefExoticComponent<Omit<StackItemHeadingLabelProps, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
32
40
  ResizeHandle: () => React.JSX.Element;
33
41
  DragHandle: ({ asChild, children }: StackItemDragHandleProps) => React.JSX.Element;
@@ -38,9 +46,10 @@ export declare const StackItem: {
38
46
  icon: string;
39
47
  onAction?: (action: StackItemSigilAction) => void;
40
48
  } & import("@dxos/react-ui-attention").Related & {
41
- children?: React.ReactNode | undefined;
49
+ children?: ReactNode | undefined;
42
50
  } & React.RefAttributes<HTMLButtonElement>>;
43
51
  SigilButton: React.ForwardRefExoticComponent<Omit<StackItemSigilButtonProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
52
+ DragPreview: ({ children }: StackItemDragPreviewProps) => React.ReactPortal | null;
44
53
  };
45
- export type { StackItemContentProps, StackItemHeadingProps, StackItemHeadingLabelProps, StackItemResizeHandleProps, StackItemDragHandleProps, StackItemSigilProps, StackItemSigilButtonProps, StackItemSigilAction, };
54
+ export type { StackItemRootProps, StackItemContentProps, StackItemHeadingProps, StackItemHeadingLabelProps, StackItemResizeHandleProps, StackItemDragHandleProps, StackItemSigilProps, StackItemSigilButtonProps, StackItemSigilAction, StackItemDragPreviewProps, };
46
55
  //# sourceMappingURL=StackItem.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"StackItem.d.ts","sourceRoot":"","sources":["../../../../../src/components/StackItem/StackItem.tsx"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,EAIZ,KAAK,qBAAqB,EAE1B,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAGf,OAAO,EAAE,KAAK,eAAe,EAAY,MAAM,gBAAgB,CAAC;AAIhE,OAAO,EAAoB,KAAK,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAClF,OAAO,EAAuB,KAAK,wBAAwB,EAAE,MAAM,uBAAuB,CAAC;AAC3F,OAAO,EAGL,KAAK,qBAAqB,EAC1B,KAAK,0BAA0B,EAChC,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAyB,KA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AAmB,EACnB,yBAAyB,EACzB,oBAAoB,EACpB,yBAAyB,GAC1B,CAAC"}
@@ -0,0 +1,8 @@
1
+ import '@dxos-theme';
2
+ import { type Meta, type StoryObj } from '@storybook/react';
3
+ import { StackItem } from './StackItem';
4
+ declare const meta: Meta<typeof StackItem.Root>;
5
+ export default meta;
6
+ type Story = StoryObj<typeof StackItem.Root>;
7
+ export declare const Default: Story;
8
+ //# sourceMappingURL=StackItem.stories.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"StackItem.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/StackItem/StackItem.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,aAAa,CAAC;AAErB,OAAO,EAAE,KAAK,IAAI,EAAE,KAAK,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAM5D,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,SAAS,CAAC,IAAI,CAwBrC,CAAC;AAEF,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,SAAS,CAAC,IAAI,CAAC,CAAC;AAE7C,eAAO,MAAM,OAAO,EAAE,KAIrB,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"StackItemContent.d.ts","sourceRoot":"","sources":["../../../../../src/components/StackItem/StackItemContent.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,EAAE,KAAK,wBAAwB,EAAc,MAAM,OAAO,CAAC;AAEzE,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAKtD,MAAM,MAAM,qBAAqB,GAAG,eAAe,CAAC,wBAAwB,CAAC,KAAK,CAAC,CAAC,GAAG;IACrF;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB;;;OAGG;IACH,IAAI,CAAC,EAAE,WAAW,GAAG,OAAO,GAAG,QAAQ,CAAC;CACzC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,gBAAgB;;;IAtB3B;;;OAGG;cACO,OAAO;IAEjB;;OAEG;gBACS,OAAO;IAEnB;;;OAGG;WACI,WAAW,GAAG,OAAO,GAAG,QAAQ;wCAmCxC,CAAC"}
@@ -1,6 +1,6 @@
1
1
  import React, { type ComponentPropsWithoutRef } from 'react';
2
2
  export type StackItemDragHandleProps = ComponentPropsWithoutRef<'button'> & {
3
- asChild: boolean;
3
+ asChild?: boolean;
4
4
  };
5
5
  export declare const StackItemDragHandle: ({ asChild, children }: StackItemDragHandleProps) => React.JSX.Element;
6
6
  //# sourceMappingURL=StackItemDragHandle.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"StackItemDragHandle.d.ts","sourceRoot":"","sources":["../../../../../src/components/StackItem/StackItemDragHandle.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,EAAE,KAAK,wBAAwB,EAAE,MAAM,OAAO,CAAC;AAI7D,MAAM,MAAM,wBAAwB,GAAG,wBAAwB,CAAC,QAAQ,CAAC,GAAG;IAAE,OAAO,CAAC,EAAE,OAAO,CAAA;CAAE,CAAC;AAElG,eAAO,MAAM,mBAAmB,GAAI,uBAAuB,wBAAwB,sBAUlF,CAAC"}
@@ -1,8 +1,10 @@
1
1
  import React, { type ComponentPropsWithoutRef, type ComponentPropsWithRef } from 'react';
2
2
  import { type ThemedClassName } from '@dxos/react-ui';
3
3
  import { type AttendableId, type Related } from '@dxos/react-ui-attention';
4
- export type StackItemHeadingProps = ThemedClassName<ComponentPropsWithoutRef<'div'>>;
5
- export declare const StackItemHeading: ({ children, classNames, ...props }: StackItemHeadingProps) => React.JSX.Element;
4
+ export type StackItemHeadingProps = ThemedClassName<ComponentPropsWithoutRef<'div'>> & {
5
+ asChild?: boolean;
6
+ };
7
+ export declare const StackItemHeading: ({ children, classNames, asChild, ...props }: StackItemHeadingProps) => React.JSX.Element;
6
8
  export type StackItemHeadingLabelProps = ThemedClassName<ComponentPropsWithRef<'h1'>> & AttendableId & Related;
7
9
  export declare const StackItemHeadingLabel: React.ForwardRefExoticComponent<Omit<StackItemHeadingLabelProps, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
8
10
  //# sourceMappingURL=StackItemHeading.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"StackItemHeading.d.ts","sourceRoot":"","sources":["../../../../../src/components/StackItem/StackItemHeading.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,EAAE,KAAK,wBAAwB,EAAE,KAAK,qBAAqB,EAAc,MAAM,OAAO,CAAC;AAErG,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACtD,OAAO,EAAgB,KAAK,YAAY,EAAE,KAAK,OAAO,EAAE,MAAM,0BAA0B,CAAC;AAKzF,MAAM,MAAM,qBAAqB,GAAG,eAAe,CAAC,wBAAwB,CAAC,KAAK,CAAC,CAAC,GAAG;IAAE,OAAO,CAAC,EAAE,OAAO,CAAA;CAAE,CAAC;AAE7G,eAAO,MAAM,gBAAgB,GAAI,6CAA6C,qBAAqB,sBAsBlG,CAAC;AAEF,MAAM,MAAM,0BAA0B,GAAG,eAAe,CAAC,qBAAqB,CAAC,IAAI,CAAC,CAAC,GAAG,YAAY,GAAG,OAAO,CAAC;AAE/G,eAAO,MAAM,qBAAqB,oHAgBjC,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"StackItemResizeHandle.d.ts","sourceRoot":"","sources":["../../../../../src/components/StackItem/StackItemResizeHandle.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAC;AAU1B,MAAM,MAAM,0BAA0B,GAAG,EAAE,CAAC;AAE5C,eAAO,MAAM,qBAAqB,yBAajC,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"StackItemSigil.d.ts","sourceRoot":"","sources":["../../../../../src/components/StackItem/StackItemSigil.tsx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,0 +1,2 @@
1
+ export * from './StackItem';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/StackItem/index.ts"],"names":[],"mappings":"AAIA,cAAc,aAAa,CAAC"}
@@ -0,0 +1,18 @@
1
+ import type { Edge } from '@atlaskit/pragmatic-drag-and-drop-hitbox/closest-edge';
2
+ import { type Size as DndSize } from '@dxos/react-ui-dnd';
3
+ import { type Orientation, type Size } from './Stack';
4
+ export type StackItemSize = DndSize;
5
+ export type StackItemData = {
6
+ id: string;
7
+ type: 'column' | 'card';
8
+ };
9
+ export type StackItemRearrangeHandler<Data extends {
10
+ id: string;
11
+ } = StackItemData> = (source: Data, target: Data, closestEdge: Edge | null) => void;
12
+ export type StackContextValue = {
13
+ orientation: Orientation;
14
+ rail: boolean;
15
+ size: Size;
16
+ onRearrange?: StackItemRearrangeHandler;
17
+ };
18
+ //# sourceMappingURL=defs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"defs.d.ts","sourceRoot":"","sources":["../../../../src/components/defs.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,uDAAuD,CAAC;AAElF,OAAO,EAAE,KAAK,IAAI,IAAI,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAE1D,OAAO,EAAE,KAAK,WAAW,EAAE,KAAK,IAAI,EAAE,MAAM,SAAS,CAAC;AAEtD,MAAM,MAAM,aAAa,GAAG,OAAO,CAAC;AAEpC,MAAM,MAAM,aAAa,GAAG;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,QAAQ,GAAG,MAAM,CAAA;CAAE,CAAC;AAEpE,MAAM,MAAM,yBAAyB,CAAC,IAAI,SAAS;IAAE,EAAE,EAAE,MAAM,CAAA;CAAE,GAAG,aAAa,IAAI,CACnF,MAAM,EAAE,IAAI,EACZ,MAAM,EAAE,IAAI,EACZ,WAAW,EAAE,IAAI,GAAG,IAAI,KACrB,IAAI,CAAC;AAEV,MAAM,MAAM,iBAAiB,GAAG;IAC9B,WAAW,EAAE,WAAW,CAAC;IACzB,IAAI,EAAE,OAAO,CAAC;IACd,IAAI,EAAE,IAAI,CAAC;IACX,WAAW,CAAC,EAAE,yBAAyB,CAAC;CACzC,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LayoutControls.d.ts","sourceRoot":"","sources":["../../../../../src/components/deprecated/LayoutControls.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAE1C,OAAO,EAAe,KAAK,gBAAgB,EAAgD,MAAM,gBAAgB,CAAC;AAIlH,MAAM,MAAM,kBAAkB,GAAG,MAAM,GAAG,OAAO,GAAG,GAAG,KAAK,GAAG,WAAW,IAAI,OAAO,GAAG,KAAK,EAAE,CAAC;AAChG,MAAM,MAAM,oBAAoB,GAAG,CAAC,KAAK,EAAE,kBAAkB,KAAK,IAAI,CAAC;AAEvE,MAAM,MAAM,kBAAkB,GAAG;IAC/B,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG,IAAI,CAAC,gBAAgB,EAAE,SAAS,CAAC,GAAG;IACpE,OAAO,CAAC,EAAE,oBAAoB,CAAC;IAC/B,OAAO,CAAC,EAAE,eAAe,GAAG,SAAS,CAAC;IACtC,KAAK,CAAC,EAAE,OAAO,GAAG,cAAc,GAAG,YAAY,CAAC;IAChD,YAAY,EAAE,kBAAkB,CAAC;IACjC,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,GAAG,CAAC,EAAE,OAAO,GAAG,KAAK,GAAG,MAAM,CAAC;CAChC,CAAC;AAMF,eAAO,MAAM,cAAc,yGA4E1B,CAAC"}
@@ -1,5 +1,4 @@
1
+ export * from './defs';
1
2
  export * from './Stack';
2
3
  export * from './StackItem';
3
- export * from './LayoutControls';
4
- export * from './StackContext';
5
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,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC;AAC5B,cAAc,kBAAkB,CAAC;AACjC,cAAc,gBAAgB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/index.ts"],"names":[],"mappings":"AAIA,cAAc,QAAQ,CAAC;AAEvB,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC"}
@@ -0,0 +1,58 @@
1
+ import React, { type PropsWithChildren } from 'react';
2
+ import { cardChrome, cardContent, cardHeading, cardRoot, cardText } from './fragments';
3
+ type CardPosterProps = {
4
+ alt: string;
5
+ aspect?: 'video' | 'auto';
6
+ } & Partial<{
7
+ image: string;
8
+ icon: string;
9
+ }>;
10
+ export declare const Card: {
11
+ Root: React.ForwardRefExoticComponent<Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, "className"> & {
12
+ classNames?: import("@dxos/react-ui-types").ClassNameValue;
13
+ } & {
14
+ asChild?: boolean;
15
+ } & React.RefAttributes<HTMLDivElement>>;
16
+ Content: React.ForwardRefExoticComponent<Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, "className"> & {
17
+ classNames?: import("@dxos/react-ui-types").ClassNameValue;
18
+ } & {
19
+ asChild?: boolean;
20
+ } & React.RefAttributes<HTMLDivElement>>;
21
+ Container: ({ role, children }: PropsWithChildren<{
22
+ role?: string;
23
+ }>) => React.JSX.Element;
24
+ Heading: React.ForwardRefExoticComponent<Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, "className"> & {
25
+ classNames?: import("@dxos/react-ui-types").ClassNameValue;
26
+ } & {
27
+ asChild?: boolean;
28
+ } & React.RefAttributes<HTMLDivElement>>;
29
+ Toolbar: React.ForwardRefExoticComponent<Omit<import("@radix-ui/react-toolbar").ToolbarProps, "className"> & {
30
+ classNames?: import("@dxos/react-ui-types").ClassNameValue;
31
+ } & React.RefAttributes<HTMLDivElement>>;
32
+ ToolbarIconButton: React.ForwardRefExoticComponent<Omit<import("@dxos/react-ui").IconButtonProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
33
+ ToolbarSeparator: React.ForwardRefExoticComponent<Omit<import("@radix-ui/react-separator").SeparatorProps, "className"> & {
34
+ classNames?: import("@dxos/react-ui-types").ClassNameValue;
35
+ } & {
36
+ variant?: "gap" | "line";
37
+ } & React.RefAttributes<HTMLDivElement>>;
38
+ DragHandle: React.ForwardRefExoticComponent<{
39
+ toolbarItem?: boolean;
40
+ } & React.RefAttributes<HTMLButtonElement>>;
41
+ DragPreview: ({ children }: import("../..").StackItemDragPreviewProps) => React.ReactPortal | null;
42
+ Menu: React.FC<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
43
+ ref?: ((instance: HTMLDivElement | null) => void | React.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof React.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | React.RefObject<HTMLDivElement> | null | undefined;
44
+ }>;
45
+ Poster: (props: CardPosterProps) => React.JSX.Element | undefined;
46
+ Chrome: React.ForwardRefExoticComponent<Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, "className"> & {
47
+ classNames?: import("@dxos/react-ui-types").ClassNameValue;
48
+ } & {
49
+ asChild?: boolean;
50
+ } & React.RefAttributes<HTMLDivElement>>;
51
+ Text: React.ForwardRefExoticComponent<Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, "className"> & {
52
+ classNames?: import("@dxos/react-ui-types").ClassNameValue;
53
+ } & {
54
+ asChild?: boolean;
55
+ } & React.RefAttributes<HTMLParagraphElement>>;
56
+ };
57
+ export { cardRoot, cardContent, cardHeading, cardText, cardChrome };
58
+ //# sourceMappingURL=Card.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Card.d.ts","sourceRoot":"","sources":["../../../../../src/exemplars/Card/Card.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,EAKZ,KAAK,iBAAiB,EACvB,MAAM,OAAO,CAAC;AAKf,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,WAAW,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AA6FvF,KAAK,eAAe,GAAG;IACrB,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;CAC3B,GAAG,OAAO,CAAC;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC,CAAC;AAgD7C,eAAO,MAAM,IAAI;;;;kBA5IqE,OAAO;;;;;kBAAP,OAAO;;oCAiCzC,iBAAiB,CAAC;QAAE,IAAI,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;;;;kBAjCF,OAAO;;;;;;;;;;;;sBAsExB,OAAO;;;;;;oBAwBjD,eAAe;;;;kBA9F4C,OAAO;;;;;kBAAP,OAAO;;CA0J5F,CAAC;AAEF,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,WAAW,EAAE,QAAQ,EAAE,UAAU,EAAE,CAAC"}
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=Card.stories-todo.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Card.stories-todo.d.ts","sourceRoot":"","sources":["../../../../../src/exemplars/Card/Card.stories-todo.tsx"],"names":[],"mappings":""}
@@ -0,0 +1,6 @@
1
+ import React, { type PropsWithChildren } from 'react';
2
+ export declare const CardDragPreview: {
3
+ Root: ({ children }: PropsWithChildren<{}>) => React.JSX.Element;
4
+ Content: ({ children }: PropsWithChildren<{}>) => React.JSX.Element;
5
+ };
6
+ //# sourceMappingURL=CardDragPreview.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CardDragPreview.d.ts","sourceRoot":"","sources":["../../../../../src/exemplars/Card/CardDragPreview.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,EAAE,KAAK,iBAAiB,EAAE,MAAM,OAAO,CAAC;AActD,eAAO,MAAM,eAAe;yBARe,iBAAiB,CAAC,EAAE,CAAC;4BAIlB,iBAAiB,CAAC,EAAE,CAAC;CAOlE,CAAC"}
@@ -0,0 +1,6 @@
1
+ export declare const cardRoot = "contain-layout pli-2 plb-1 first-of-type:pbs-0 last-of-type:pbe-0";
2
+ export declare const cardContent = "rounded overflow-hidden bg-cardSurface border border-separator dark:border-subduedSeparator dx-focus-ring-group-y-indicator relative min-bs-[--rail-item] group/card";
3
+ export declare const cardText = "pli-3 mlb-3";
4
+ export declare const cardHeading = "text-lg font-medium line-clamp-2";
5
+ export declare const cardChrome = "pli-1.5 mlb-1.5 [&_.dx-button]:pli-1.5 [&_.dx-button]:text-start [&_.dx-button]:is-full";
6
+ //# sourceMappingURL=fragments.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fragments.d.ts","sourceRoot":"","sources":["../../../../../src/exemplars/Card/fragments.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,QAAQ,sEAAsE,CAAC;AAE5F,eAAO,MAAM,WAAW,yKACgJ,CAAC;AAEzK,eAAO,MAAM,QAAQ,gBAAgB,CAAC;AAEtC,eAAO,MAAM,WAAW,qCAAqC,CAAC;AAE9D,eAAO,MAAM,UAAU,4FAA4F,CAAC"}
@@ -0,0 +1,3 @@
1
+ export * from './Card';
2
+ export * from './CardDragPreview';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/exemplars/Card/index.ts"],"names":[],"mappings":"AAIA,cAAc,QAAQ,CAAC;AACvB,cAAc,mBAAmB,CAAC"}
@@ -0,0 +1,34 @@
1
+ import React from 'react';
2
+ import { type StackProps } from '../../components';
3
+ declare const cardStackHeading = "mli-2 order-first bg-transparent rounded-bs-md flex items-center";
4
+ declare const cardStackFooter = "plb-2 mli-2 border-bs border-transparent [[data-scroll-separator-end=\"true\"]_&]:border-subduedSeparator";
5
+ declare const cardStackContent: string[];
6
+ declare const cardStackRoot = "flex flex-col pli-2 plb-2";
7
+ export declare const CardStack: {
8
+ Root: React.ForwardRefExoticComponent<Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, "className"> & {
9
+ classNames?: import("@dxos/react-ui-types").ClassNameValue;
10
+ } & {
11
+ asChild?: boolean;
12
+ } & React.RefAttributes<HTMLDivElement>>;
13
+ Content: React.ForwardRefExoticComponent<Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, "className"> & {
14
+ classNames?: import("@dxos/react-ui-types").ClassNameValue;
15
+ } & {
16
+ asChild?: boolean;
17
+ } & React.RefAttributes<HTMLDivElement>>;
18
+ Stack: React.ForwardRefExoticComponent<Omit<Omit<StackProps, "orientation" | "rail" | "size" | "separatorOnScroll">, "ref"> & React.RefAttributes<HTMLDivElement>>;
19
+ Heading: React.ForwardRefExoticComponent<Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, "className"> & {
20
+ classNames?: import("@dxos/react-ui-types").ClassNameValue;
21
+ } & {
22
+ asChild?: boolean;
23
+ } & React.RefAttributes<HTMLDivElement>>;
24
+ Footer: React.ForwardRefExoticComponent<Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, "className"> & {
25
+ classNames?: import("@dxos/react-ui-types").ClassNameValue;
26
+ } & {
27
+ asChild?: boolean;
28
+ } & React.RefAttributes<HTMLDivElement>>;
29
+ DragHandle: React.ForwardRefExoticComponent<{
30
+ toolbarItem?: boolean;
31
+ } & React.RefAttributes<HTMLButtonElement>>;
32
+ };
33
+ export { cardStackRoot, cardStackFooter, cardStackHeading, cardStackContent };
34
+ //# sourceMappingURL=CardStack.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CardStack.d.ts","sourceRoot":"","sources":["../../../../../src/exemplars/CardStack/CardStack.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAoD,MAAM,OAAO,CAAC;AAKzE,OAAO,EAA8C,KAAK,UAAU,EAAE,MAAM,kBAAkB,CAAC;AA8B/F,QAAA,MAAM,gBAAgB,qEAAqE,CAAC;AAgB5F,QAAA,MAAM,eAAe,8GACsF,CAAC;AAgB5G,QAAA,MAAM,gBAAgB,UAGrB,CAAC;AAgBF,QAAA,MAAM,aAAa,8BAA8B,CAAC;AAgBlD,eAAO,MAAM,SAAS;;;;kBA/FqE,OAAO;;;;;kBAAP,OAAO;;;;;;kBAAP,OAAO;;;;;kBAAP,OAAO;;;;;CAsGjG,CAAC;AAEF,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,CAAC"}
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=CardStack.stories-todo.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CardStack.stories-todo.d.ts","sourceRoot":"","sources":["../../../../../src/exemplars/CardStack/CardStack.stories-todo.tsx"],"names":[],"mappings":""}
@@ -0,0 +1,9 @@
1
+ import React, { type PropsWithChildren } from 'react';
2
+ import { type StackProps } from '../../components';
3
+ export declare const CardStackDragPreview: {
4
+ Root: ({ children }: PropsWithChildren<{}>) => React.JSX.Element;
5
+ Heading: ({ children }: PropsWithChildren<{}>) => React.JSX.Element;
6
+ Content: ({ children, itemsCount, }: PropsWithChildren<Pick<StackProps, "itemsCount">>) => React.JSX.Element;
7
+ Footer: ({ children }: PropsWithChildren<{}>) => React.JSX.Element;
8
+ };
9
+ //# sourceMappingURL=CardStackDragPreview.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CardStackDragPreview.d.ts","sourceRoot":"","sources":["../../../../../src/exemplars/CardStack/CardStackDragPreview.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,EAAE,KAAK,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAKtD,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,kBAAkB,CAAC;AA8CnD,eAAO,MAAM,oBAAoB;yBA3Ce,iBAAiB,CAAC,EAAE,CAAC;4BAUlB,iBAAiB,CAAC,EAAE,CAAC;yCAmBrE,iBAAiB,CAAC,IAAI,CAAC,UAAU,EAAE,YAAY,CAAC,CAAC;2BAUF,iBAAiB,CAAC,EAAE,CAAC;CAStE,CAAC"}
@@ -0,0 +1,3 @@
1
+ export * from './CardStack';
2
+ export * from './CardStackDragPreview';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/exemplars/CardStack/index.ts"],"names":[],"mappings":"AAIA,cAAc,aAAa,CAAC;AAC5B,cAAc,wBAAwB,CAAC"}
@@ -0,0 +1,3 @@
1
+ export * from './Card';
2
+ export * from './CardStack';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/exemplars/index.ts"],"names":[],"mappings":"AAIA,cAAc,QAAQ,CAAC;AACvB,cAAc,aAAa,CAAC"}
@@ -1,13 +1,13 @@
1
- import { type Orientation } from '../components/Stack';
2
- import { type StackItemRearrangeHandler } from '../components/StackContext';
1
+ import { type StackItemRearrangeHandler, type Orientation } from '../components';
3
2
  /**
4
3
  * Hook to handle drag and drop functionality for Stack components.
5
4
  */
6
- export declare const useStackDropForElements: ({ element, selfDroppable, orientation, id, onRearrange, }: {
5
+ export declare const useStackDropForElements: ({ id, element, scrollElement, selfDroppable, orientation, onRearrange, }: {
6
+ id?: string;
7
7
  element: HTMLDivElement | null;
8
+ scrollElement?: HTMLDivElement | null;
8
9
  selfDroppable: boolean;
9
10
  orientation: Orientation;
10
- id?: string;
11
11
  onRearrange?: StackItemRearrangeHandler;
12
12
  }) => {
13
13
  dropping: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"useStackDropForElements.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useStackDropForElements.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,KAAK,yBAAyB,EAAsB,MAAM,4BAA4B,CAAC;AAEhG;;GAEG;AACH,eAAO,MAAM,uBAAuB,8DAMjC;IACD,OAAO,EAAE,cAAc,GAAG,IAAI,CAAC;IAC/B,aAAa,EAAE,OAAO,CAAC;IACvB,WAAW,EAAE,WAAW,CAAC;IACzB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,WAAW,CAAC,EAAE,yBAAyB,CAAC;CACzC;;CA4CA,CAAC"}
1
+ {"version":3,"file":"useStackDropForElements.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useStackDropForElements.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,KAAK,yBAAyB,EAAsB,KAAK,WAAW,EAAE,MAAM,eAAe,CAAC;AAErG;;GAEG;AACH,eAAO,MAAM,uBAAuB,GAAI,0EAOrC;IACD,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,OAAO,EAAE,cAAc,GAAG,IAAI,CAAC;IAC/B,aAAa,CAAC,EAAE,cAAc,GAAG,IAAI,CAAC;IACtC,aAAa,EAAE,OAAO,CAAC;IACvB,WAAW,EAAE,WAAW,CAAC;IACzB,WAAW,CAAC,EAAE,yBAAyB,CAAC;CACzC;;CA4CA,CAAC"}
@@ -1,3 +1,4 @@
1
1
  export * from './components';
2
+ export * from './exemplars';
2
3
  export { default as translations } from './translations';
3
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAIA,cAAc,cAAc,CAAC;AAC7B,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,gBAAgB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAIA,cAAc,cAAc,CAAC;AAG7B,cAAc,aAAa,CAAC;AAE5B,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,gBAAgB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"stack-manager.d.ts","sourceRoot":"","sources":["../../../../src/testing/stack-manager.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,OAAO,EAAQ,MAAM,kBAAkB,CAAC;AAEtD,qBAAa,YAAY;IAGX,QAAQ,CAAC,OAAO,EAAE,OAAO;IAFrC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAO;gBAER,OAAO,EAAE,OAAO;IAIrC,QAAQ;IAIR,KAAK;IAIL,OAAO,CAAC,KAAK,EAAE,MAAM;CAGtB;AAED,qBAAa,cAAc;IAGb,QAAQ,CAAC,OAAO,EAAE,OAAO;IAFrC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAO;gBAER,OAAO,EAAE,OAAO;IAI/B,EAAE;IAIF,MAAM;IAKN,UAAU;IAKV,MAAM,CAAC,MAAM,EAAE,OAAO,EAAE,MAAM,GAAE;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAmB;CAehF"}
1
+ {"version":3,"file":"stack-manager.d.ts","sourceRoot":"","sources":["../../../../src/testing/stack-manager.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,OAAO,EAAQ,MAAM,kBAAkB,CAAC;AAEtD,qBAAa,YAAY;IAGX,QAAQ,CAAC,OAAO,EAAE,OAAO;IAFrC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAO;gBAER,OAAO,EAAE,OAAO;IAIrC,QAAQ,IAAI,OAAO;IAInB,KAAK;IAIL,OAAO,CAAC,KAAK,EAAE,MAAM,GAAG,cAAc;CAGvC;AAED,qBAAa,cAAc;IAGb,QAAQ,CAAC,OAAO,EAAE,OAAO;IAFrC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAO;gBAER,OAAO,EAAE,OAAO;IAI/B,EAAE,IAAI,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;IAI5B,MAAM,IAAI,OAAO,CAAC,IAAI,CAAC;IAKvB,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;IAK3B,MAAM,CAAC,MAAM,EAAE,OAAO,EAAE,MAAM,GAAE;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAmB,GAAG,OAAO,CAAC,IAAI,CAAC;CAehG"}
@@ -3,6 +3,7 @@ declare const _default: {
3
3
  'en-US': {
4
4
  stack: {
5
5
  'resize label': string;
6
+ 'drag handle label': string;
6
7
  'pin start label': string;
7
8
  'pin end label': string;
8
9
  'increment start label': string;
@@ -1 +1 @@
1
- {"version":3,"file":"translations.d.ts","sourceRoot":"","sources":["../../../src/translations.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,cAAc,UAAU,CAAC;;;;;;;;;;;;;;AAEtC,wBAcE"}
1
+ {"version":3,"file":"translations.d.ts","sourceRoot":"","sources":["../../../src/translations.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,cAAc,UAAU,CAAC;;;;;;;;;;;;;;;AAEtC,wBAeE"}
@@ -1 +1 @@
1
- {"version":"5.7.3"}
1
+ {"version":"5.8.3"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dxos/react-ui-stack",
3
- "version": "0.8.2-staging.7ac8446",
3
+ "version": "0.8.3-main.672df60",
4
4
  "description": "A stack component.",
5
5
  "homepage": "https://dxos.org",
6
6
  "bugs": "https://github.com/dxos/dxos/issues",
@@ -40,19 +40,21 @@
40
40
  "@atlaskit/pragmatic-drag-and-drop-auto-scroll": "^2.1.0",
41
41
  "@atlaskit/pragmatic-drag-and-drop-hitbox": "^1.0.3",
42
42
  "@fluentui/react-tabster": "^9.24.2",
43
+ "@preact-signals/safe-react": "^0.9.0",
43
44
  "@radix-ui/primitive": "1.1.1",
44
45
  "@radix-ui/react-compose-refs": "1.1.1",
45
46
  "@radix-ui/react-context": "1.1.1",
46
47
  "@radix-ui/react-menu": "2.1.6",
48
+ "@radix-ui/react-primitive": "2.0.2",
47
49
  "@radix-ui/react-slot": "1.1.2",
48
50
  "@radix-ui/react-use-controllable-state": "1.1.0",
49
51
  "react-resize-detector": "^11.0.1",
50
- "@dxos/echo-schema": "0.8.2-staging.7ac8446",
51
- "@dxos/keyboard": "0.8.2-staging.7ac8446",
52
- "@dxos/live-object": "0.8.2-staging.7ac8446",
53
- "@dxos/react-ui-attention": "0.8.2-staging.7ac8446",
54
- "@dxos/react-ui-dnd": "0.8.2-staging.7ac8446",
55
- "@dxos/util": "0.8.2-staging.7ac8446"
52
+ "@dxos/echo-schema": "0.8.3-main.672df60",
53
+ "@dxos/keyboard": "0.8.3-main.672df60",
54
+ "@dxos/live-object": "0.8.3-main.672df60",
55
+ "@dxos/react-ui-attention": "0.8.3-main.672df60",
56
+ "@dxos/react-ui-dnd": "0.8.3-main.672df60",
57
+ "@dxos/util": "0.8.3-main.672df60"
56
58
  },
57
59
  "devDependencies": {
58
60
  "@phosphor-icons/react": "^2.1.5",
@@ -61,24 +63,24 @@
61
63
  "react": "~18.2.0",
62
64
  "react-dom": "~18.2.0",
63
65
  "vite": "5.4.7",
64
- "@dxos/client": "0.8.2-staging.7ac8446",
65
- "@dxos/app-graph": "0.8.2-staging.7ac8446",
66
- "@dxos/echo-schema": "0.8.2-staging.7ac8446",
67
- "@dxos/random": "0.8.2-staging.7ac8446",
68
- "@dxos/react-ui": "0.8.2-staging.7ac8446",
69
- "@dxos/react-ui-editor": "0.8.2-staging.7ac8446",
70
- "@dxos/react-ui-theme": "0.8.2-staging.7ac8446",
71
- "@dxos/test-utils": "0.8.2-staging.7ac8446",
72
- "@dxos/storybook-utils": "0.8.2-staging.7ac8446"
66
+ "@dxos/app-graph": "0.8.3-main.672df60",
67
+ "@dxos/client": "0.8.3-main.672df60",
68
+ "@dxos/random": "0.8.3-main.672df60",
69
+ "@dxos/echo-schema": "0.8.3-main.672df60",
70
+ "@dxos/react-ui": "0.8.3-main.672df60",
71
+ "@dxos/react-ui-theme": "0.8.3-main.672df60",
72
+ "@dxos/storybook-utils": "0.8.3-main.672df60",
73
+ "@dxos/react-ui-editor": "0.8.3-main.672df60",
74
+ "@dxos/test-utils": "0.8.3-main.672df60"
73
75
  },
74
76
  "peerDependencies": {
75
77
  "@phosphor-icons/react": "^2.1.5",
76
78
  "react": "~18.2.0",
77
79
  "react-dom": "~18.2.0",
78
- "@dxos/client": "0.8.2-staging.7ac8446",
79
- "@dxos/random": "0.8.2-staging.7ac8446",
80
- "@dxos/react-ui": "0.8.2-staging.7ac8446",
81
- "@dxos/react-ui-theme": "0.8.2-staging.7ac8446"
80
+ "@dxos/client": "0.8.3-main.672df60",
81
+ "@dxos/random": "0.8.3-main.672df60",
82
+ "@dxos/react-ui": "0.8.3-main.672df60",
83
+ "@dxos/react-ui-theme": "0.8.3-main.672df60"
82
84
  },
83
85
  "publishConfig": {
84
86
  "access": "public"