@dxos/react-ui-stack 0.8.4-main.b97322e → 0.8.4-main.bc674ce
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/browser/index.mjs +923 -50
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/playwright/index.mjs +4 -0
- package/dist/lib/browser/playwright/index.mjs.map +2 -2
- package/dist/lib/node-esm/index.mjs +924 -50
- package/dist/lib/node-esm/index.mjs.map +4 -4
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/playwright/index.mjs +4 -0
- package/dist/lib/node-esm/playwright/index.mjs.map +2 -2
- package/dist/types/src/{exemplars → components}/CardStack/CardStack.d.ts +20 -13
- package/dist/types/src/components/CardStack/CardStack.d.ts.map +1 -0
- package/dist/types/src/components/CardStack/CardStack.stories.d.ts +15 -0
- package/dist/types/src/components/CardStack/CardStack.stories.d.ts.map +1 -0
- package/dist/types/src/{exemplars → components}/CardStack/CardStackDragPreview.d.ts +1 -1
- package/dist/types/src/components/CardStack/CardStackDragPreview.d.ts.map +1 -0
- package/dist/types/src/components/CardStack/index.d.ts.map +1 -0
- package/dist/types/src/components/Stack/Stack.d.ts +15 -7
- package/dist/types/src/components/Stack/Stack.d.ts.map +1 -1
- package/dist/types/src/components/Stack/Stack.stories.d.ts +12 -3
- package/dist/types/src/components/Stack/Stack.stories.d.ts.map +1 -1
- package/dist/types/src/components/StackContext.d.ts +2 -1
- package/dist/types/src/components/StackContext.d.ts.map +1 -1
- package/dist/types/src/components/StackItem/StackItem.d.ts +9 -12
- package/dist/types/src/components/StackItem/StackItem.d.ts.map +1 -1
- package/dist/types/src/components/StackItem/StackItem.stories.d.ts +13 -5
- package/dist/types/src/components/StackItem/StackItem.stories.d.ts.map +1 -1
- package/dist/types/src/components/StackItem/StackItemContent.d.ts +4 -37
- package/dist/types/src/components/StackItem/StackItemContent.d.ts.map +1 -1
- package/dist/types/src/components/StackItem/StackItemHeading.d.ts +1 -1
- package/dist/types/src/components/StackItem/StackItemHeading.d.ts.map +1 -1
- package/dist/types/src/components/StackItem/StackItemResizeHandle.d.ts.map +1 -1
- package/dist/types/src/components/StackItem/StackItemSigil.d.ts +2 -2
- package/dist/types/src/components/StackItem/StackItemSigil.d.ts.map +1 -1
- package/dist/types/src/components/deprecated/LayoutControls.d.ts +3 -0
- package/dist/types/src/components/deprecated/LayoutControls.d.ts.map +1 -1
- package/dist/types/src/components/index.d.ts +2 -1
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/components/{defs.d.ts → types.d.ts} +1 -1
- package/dist/types/src/components/types.d.ts.map +1 -0
- package/dist/types/src/hooks/useStackDropForElements.d.ts +9 -7
- package/dist/types/src/hooks/useStackDropForElements.d.ts.map +1 -1
- package/dist/types/src/index.d.ts +0 -1
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts +2 -2
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +41 -38
- package/src/{exemplars → components}/CardStack/CardStack.stories.tsx +19 -18
- package/src/{exemplars → components}/CardStack/CardStack.tsx +114 -54
- package/src/{exemplars → components}/CardStack/CardStackDragPreview.tsx +3 -3
- package/src/components/Stack/Stack.stories.tsx +8 -9
- package/src/components/Stack/Stack.tsx +225 -26
- package/src/components/StackContext.tsx +2 -1
- package/src/components/StackItem/StackItem.stories.tsx +19 -15
- package/src/components/StackItem/StackItem.tsx +49 -29
- package/src/components/StackItem/StackItemContent.tsx +18 -39
- package/src/components/StackItem/StackItemHeading.tsx +5 -9
- package/src/components/StackItem/StackItemResizeHandle.tsx +2 -1
- package/src/components/StackItem/StackItemSigil.tsx +5 -4
- package/src/components/deprecated/LayoutControls.tsx +3 -0
- package/src/components/index.ts +2 -1
- package/src/hooks/useStackDropForElements.ts +59 -45
- package/src/index.ts +0 -3
- package/src/playwright/playwright.config.ts +1 -1
- package/src/translations.ts +1 -1
- package/dist/lib/browser/chunk-P3TQV4BA.mjs +0 -1198
- package/dist/lib/browser/chunk-P3TQV4BA.mjs.map +0 -7
- package/dist/lib/browser/testing/index.mjs +0 -31
- package/dist/lib/browser/testing/index.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-3WVEPAJ4.mjs +0 -1200
- package/dist/lib/node-esm/chunk-3WVEPAJ4.mjs.map +0 -7
- package/dist/lib/node-esm/testing/index.mjs +0 -32
- package/dist/lib/node-esm/testing/index.mjs.map +0 -7
- package/dist/types/src/components/defs.d.ts.map +0 -1
- package/dist/types/src/exemplars/Card/Card.d.ts +0 -58
- package/dist/types/src/exemplars/Card/Card.d.ts.map +0 -1
- package/dist/types/src/exemplars/Card/Card.stories.d.ts +0 -13
- package/dist/types/src/exemplars/Card/Card.stories.d.ts.map +0 -1
- package/dist/types/src/exemplars/Card/CardDragPreview.d.ts +0 -6
- package/dist/types/src/exemplars/Card/CardDragPreview.d.ts.map +0 -1
- package/dist/types/src/exemplars/Card/fragments.d.ts +0 -12
- package/dist/types/src/exemplars/Card/fragments.d.ts.map +0 -1
- package/dist/types/src/exemplars/Card/index.d.ts +0 -4
- package/dist/types/src/exemplars/Card/index.d.ts.map +0 -1
- package/dist/types/src/exemplars/CardStack/CardStack.d.ts.map +0 -1
- package/dist/types/src/exemplars/CardStack/CardStack.stories.d.ts +0 -9
- package/dist/types/src/exemplars/CardStack/CardStack.stories.d.ts.map +0 -1
- package/dist/types/src/exemplars/CardStack/CardStackDragPreview.d.ts.map +0 -1
- package/dist/types/src/exemplars/CardStack/index.d.ts.map +0 -1
- package/dist/types/src/exemplars/index.d.ts +0 -3
- package/dist/types/src/exemplars/index.d.ts.map +0 -1
- package/dist/types/src/testing/CardContainer.d.ts +0 -6
- package/dist/types/src/testing/CardContainer.d.ts.map +0 -1
- package/dist/types/src/testing/index.d.ts +0 -2
- package/dist/types/src/testing/index.d.ts.map +0 -1
- package/src/exemplars/Card/Card.stories.tsx +0 -78
- package/src/exemplars/Card/Card.tsx +0 -186
- package/src/exemplars/Card/CardDragPreview.tsx +0 -22
- package/src/exemplars/Card/fragments.ts +0 -23
- package/src/exemplars/Card/index.ts +0 -7
- package/src/exemplars/index.ts +0 -6
- package/src/testing/CardContainer.tsx +0 -34
- package/src/testing/index.ts +0 -5
- /package/dist/types/src/{exemplars → components}/CardStack/index.d.ts +0 -0
- /package/src/{exemplars → components}/CardStack/index.ts +0 -0
- /package/src/components/{defs.ts → types.ts} +0 -0
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { type Orientation, type Size } from './Stack';
|
|
2
|
-
import { type
|
|
2
|
+
import { type StackItemRearrangeHandler, type StackItemSize } from './types';
|
|
3
3
|
export type StackContextValue = {
|
|
4
4
|
orientation: Orientation;
|
|
5
5
|
rail: boolean;
|
|
6
6
|
size: Size;
|
|
7
7
|
onRearrange?: StackItemRearrangeHandler;
|
|
8
|
+
stackId?: string;
|
|
8
9
|
};
|
|
9
10
|
export declare const StackContext: import("react").Context<StackContextValue>;
|
|
10
11
|
export declare const useStack: () => StackContextValue;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StackContext.d.ts","sourceRoot":"","sources":["../../../../src/components/StackContext.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,KAAK,WAAW,EAAE,KAAK,IAAI,EAAE,MAAM,SAAS,CAAC;AACtD,OAAO,EAAE,KAAK,
|
|
1
|
+
{"version":3,"file":"StackContext.d.ts","sourceRoot":"","sources":["../../../../src/components/StackContext.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,KAAK,WAAW,EAAE,KAAK,IAAI,EAAE,MAAM,SAAS,CAAC;AACtD,OAAO,EAAE,KAAK,yBAAyB,EAAE,KAAK,aAAa,EAAE,MAAM,SAAS,CAAC;AAE7E,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;IACxC,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,eAAO,MAAM,YAAY,4CAIvB,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;IACzC,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,eAAO,MAAM,gBAAgB,gDAM3B,CAAC;AAEH,eAAO,MAAM,YAAY,6BAAqC,CAAC"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import React, { type ComponentPropsWithRef, type ReactNode } from 'react';
|
|
2
2
|
import { type ThemedClassName } from '@dxos/react-ui';
|
|
3
|
+
import { type StackItemData, type StackItemSize } from '../types';
|
|
3
4
|
import { type StackItemContentProps } from './StackItemContent';
|
|
4
5
|
import { type StackItemDragHandleProps } from './StackItemDragHandle';
|
|
5
|
-
import { type
|
|
6
|
+
import { type StackItemHeadingLabelProps, type StackItemHeadingProps } from './StackItemHeading';
|
|
6
7
|
import { type StackItemResizeHandleProps } from './StackItemResizeHandle';
|
|
7
|
-
import { type
|
|
8
|
-
import { type StackItemSize, type StackItemData } from '../defs';
|
|
8
|
+
import { type StackItemSigilAction, type StackItemSigilButtonProps, type StackItemSigilProps } from './StackItemSigil';
|
|
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;
|
|
@@ -18,29 +18,27 @@ type StackItemRootProps = ThemedClassName<ComponentPropsWithRef<'div'>> & {
|
|
|
18
18
|
onSizeChange?: (nextSize: StackItemSize) => void;
|
|
19
19
|
role?: 'article' | 'section';
|
|
20
20
|
disableRearrange?: boolean;
|
|
21
|
-
focusIndicatorVariant?: 'over-all' | 'group';
|
|
21
|
+
focusIndicatorVariant?: 'over-all' | 'group' | 'over-all-always' | 'group-always';
|
|
22
22
|
};
|
|
23
23
|
type StackItemDragPreviewProps = {
|
|
24
24
|
children: ({ item }: {
|
|
25
25
|
item: any;
|
|
26
26
|
}) => ReactNode;
|
|
27
27
|
};
|
|
28
|
-
export declare const StackItemDragPreview: ({ children }: StackItemDragPreviewProps) => React.ReactPortal | null;
|
|
29
28
|
export declare const StackItem: {
|
|
30
29
|
Root: React.ForwardRefExoticComponent<Omit<StackItemRootProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
31
|
-
Content: React.ForwardRefExoticComponent<Omit<Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, "role">, "className"> & {
|
|
32
|
-
classNames?: import("@dxos/
|
|
30
|
+
Content: React.ForwardRefExoticComponent<Omit<Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, "role" | "scrollable">, "className"> & {
|
|
31
|
+
classNames?: import("@dxos/ui-types").ClassNameValue;
|
|
33
32
|
} & {
|
|
34
33
|
toolbar?: boolean;
|
|
35
34
|
statusbar?: boolean;
|
|
36
|
-
layoutManaged?: boolean;
|
|
37
|
-
size?: "intrinsic" | "video" | "square";
|
|
38
35
|
} & React.RefAttributes<HTMLDivElement>>;
|
|
36
|
+
DragHandle: ({ asChild, children }: StackItemDragHandleProps) => React.JSX.Element;
|
|
37
|
+
DragPreview: ({ children }: StackItemDragPreviewProps) => React.ReactPortal | null;
|
|
39
38
|
Heading: ({ children, classNames, asChild, separateOnScroll, ...props }: StackItemHeadingProps) => React.JSX.Element;
|
|
40
39
|
HeadingLabel: React.ForwardRefExoticComponent<Omit<StackItemHeadingLabelProps, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
|
|
41
40
|
HeadingStickyContent: ({ children }: React.PropsWithChildren<{}>) => React.JSX.Element;
|
|
42
41
|
ResizeHandle: () => React.JSX.Element;
|
|
43
|
-
DragHandle: ({ asChild, children }: StackItemDragHandleProps) => React.JSX.Element;
|
|
44
42
|
Sigil: React.ForwardRefExoticComponent<{
|
|
45
43
|
attendableId?: string;
|
|
46
44
|
triggerLabel: string;
|
|
@@ -51,7 +49,6 @@ export declare const StackItem: {
|
|
|
51
49
|
children?: ReactNode | undefined;
|
|
52
50
|
} & React.RefAttributes<HTMLButtonElement>>;
|
|
53
51
|
SigilButton: React.ForwardRefExoticComponent<Omit<StackItemSigilButtonProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
54
|
-
DragPreview: ({ children }: StackItemDragPreviewProps) => React.ReactPortal | null;
|
|
55
52
|
};
|
|
56
|
-
export type { StackItemRootProps, StackItemContentProps, StackItemHeadingProps, StackItemHeadingLabelProps, StackItemResizeHandleProps,
|
|
53
|
+
export type { StackItemRootProps, StackItemContentProps, StackItemDragHandleProps, StackItemDragPreviewProps, StackItemHeadingProps, StackItemHeadingLabelProps, StackItemResizeHandleProps, StackItemSigilProps, StackItemSigilButtonProps, StackItemSigilAction, };
|
|
57
54
|
//# sourceMappingURL=StackItem.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StackItem.d.ts","sourceRoot":"","sources":["../../../../../src/components/StackItem/StackItem.tsx"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"StackItem.d.ts","sourceRoot":"","sources":["../../../../../src/components/StackItem/StackItem.tsx"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,EACZ,KAAK,qBAAqB,EAC1B,KAAK,SAAS,EAMf,MAAM,OAAO,CAAC;AAGf,OAAO,EAAY,KAAK,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAKhE,OAAO,EAAE,KAAK,aAAa,EAAE,KAAK,aAAa,EAAE,MAAM,UAAU,CAAC;AAElE,OAAO,EAAoB,KAAK,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAClF,OAAO,EAAuB,KAAK,wBAAwB,EAAE,MAAM,uBAAuB,CAAC;AAC3F,OAAO,EAGL,KAAK,0BAA0B,EAC/B,KAAK,qBAAqB,EAE3B,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAyB,KAAK,0BAA0B,EAAE,MAAM,yBAAyB,CAAC;AACjG,OAAO,EAEL,KAAK,oBAAoB,EAEzB,KAAK,yBAAyB,EAC9B,KAAK,mBAAmB,EACzB,MAAM,kBAAkB,CAAC;AAG1B,eAAO,MAAM,uBAAuB,KAA6B,CAAC;AAClE,eAAO,MAAM,qBAAqB,gBAAwC,CAAC;AAC3E,eAAO,MAAM,sBAAsB,KAAkD,CAAC;AAMtF,KAAK,kBAAkB,GAAG,eAAe,CAAC,qBAAqB,CAAC,KAAK,CAAC,CAAC,GAAG;IACxE,IAAI,EAAE,IAAI,CAAC,aAAa,EAAE,MAAM,CAAC,CAAC;IAClC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,IAAI,CAAC,EAAE,aAAa,CAAC;IACrB,YAAY,CAAC,EAAE,CAAC,QAAQ,EAAE,aAAa,KAAK,IAAI,CAAC;IACjD,IAAI,CAAC,EAAE,SAAS,GAAG,SAAS,CAAC;IAC7B,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,qBAAqB,CAAC,EAAE,UAAU,GAAG,OAAO,GAAG,iBAAiB,GAAG,cAAc,CAAC;CACnF,CAAC;AAgNF,KAAK,yBAAyB,GAAG;IAC/B,QAAQ,EAAE,CAAC,EAAE,IAAI,EAAE,EAAE;QAAE,IAAI,EAAE,GAAG,CAAA;KAAE,KAAK,SAAS,CAAC;CAClD,CAAC;AAWF,eAAO,MAAM,SAAS;;;;;;;;;gCATsB,yBAAyB;;;;;;;;;;;;;;;CAoBpE,CAAC;AAEF,YAAY,EACV,kBAAkB,EAClB,qBAAqB,EACrB,wBAAwB,EACxB,yBAAyB,EACzB,qBAAqB,EACrB,0BAA0B,EAC1B,0BAA0B,EAC1B,mBAAmB,EACnB,yBAAyB,EACzB,oBAAoB,GACrB,CAAC"}
|
|
@@ -1,8 +1,16 @@
|
|
|
1
|
-
import '@
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
declare const meta:
|
|
1
|
+
import { type StoryObj } from '@storybook/react-vite';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { type StackItemRootProps } from './StackItem';
|
|
4
|
+
declare const meta: {
|
|
5
|
+
title: string;
|
|
6
|
+
component: any;
|
|
7
|
+
render: (props: StackItemRootProps) => React.JSX.Element;
|
|
8
|
+
decorators: import("@storybook/react").Decorator[];
|
|
9
|
+
parameters: {
|
|
10
|
+
layout: string;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
5
13
|
export default meta;
|
|
6
|
-
type Story = StoryObj<typeof
|
|
14
|
+
type Story = StoryObj<typeof meta>;
|
|
7
15
|
export declare const Default: Story;
|
|
8
16
|
//# sourceMappingURL=StackItem.stories.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StackItem.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/StackItem/StackItem.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,
|
|
1
|
+
{"version":3,"file":"StackItem.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/StackItem/StackItem.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,OAAO,EAAa,KAAK,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAwBjE,QAAA,MAAM,IAAI;;eAEqB,GAAG;oBAxBL,kBAAkB;;;;;CA8BV,CAAC;AAEtC,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAIrB,CAAC"}
|
|
@@ -1,49 +1,16 @@
|
|
|
1
1
|
import React, { type ComponentPropsWithoutRef } from 'react';
|
|
2
2
|
import { type ThemedClassName } from '@dxos/react-ui';
|
|
3
|
-
export type StackItemContentProps = ThemedClassName<Omit<ComponentPropsWithoutRef<'div'>, 'role'>> & {
|
|
4
|
-
/**
|
|
5
|
-
* This flag is required in order to clarify a developer experience that seemed like it needed extra boilerplate
|
|
6
|
-
* (`row-span-2`) or was buggy. See the description of the StackItem.Content component itself for more information.
|
|
7
|
-
*/
|
|
3
|
+
export type StackItemContentProps = ThemedClassName<Omit<ComponentPropsWithoutRef<'div'>, 'role' | 'scrollable'>> & {
|
|
8
4
|
toolbar?: boolean;
|
|
9
|
-
/**
|
|
10
|
-
* Whether to provide for the layout of a statusbar after the content.
|
|
11
|
-
*/
|
|
12
5
|
statusbar?: boolean;
|
|
13
|
-
/**
|
|
14
|
-
* Whether the consumer intends to do something custom and typical affordances should not apply
|
|
15
|
-
*/
|
|
16
|
-
layoutManaged?: boolean;
|
|
17
|
-
/**
|
|
18
|
-
* Whether to set a certain aspect ratio on the content, including the toolbar and statusbar. This is provided for
|
|
19
|
-
* convenience and consistency; it can instead be specified by the `classNames` or `style` props as needed.
|
|
20
|
-
*/
|
|
21
|
-
size?: 'intrinsic' | 'video' | 'square';
|
|
22
6
|
};
|
|
23
7
|
/**
|
|
24
|
-
* This component should be used by plugins for rendering content within a stack item
|
|
25
|
-
* The `toolbar` flag must be provided since this component provides for the layout of content with the toolbar.
|
|
8
|
+
* This component should be used by plugins for rendering content within a stack item (i.e., a “plank” or “section”).
|
|
26
9
|
*/
|
|
27
|
-
export declare const StackItemContent: React.ForwardRefExoticComponent<Omit<Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, "role">, "className"> & {
|
|
28
|
-
classNames?: import("@dxos/
|
|
10
|
+
export declare const StackItemContent: React.ForwardRefExoticComponent<Omit<Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, "role" | "scrollable">, "className"> & {
|
|
11
|
+
classNames?: import("@dxos/ui-types").ClassNameValue;
|
|
29
12
|
} & {
|
|
30
|
-
/**
|
|
31
|
-
* This flag is required in order to clarify a developer experience that seemed like it needed extra boilerplate
|
|
32
|
-
* (`row-span-2`) or was buggy. See the description of the StackItem.Content component itself for more information.
|
|
33
|
-
*/
|
|
34
13
|
toolbar?: boolean;
|
|
35
|
-
/**
|
|
36
|
-
* Whether to provide for the layout of a statusbar after the content.
|
|
37
|
-
*/
|
|
38
14
|
statusbar?: boolean;
|
|
39
|
-
/**
|
|
40
|
-
* Whether the consumer intends to do something custom and typical affordances should not apply
|
|
41
|
-
*/
|
|
42
|
-
layoutManaged?: boolean;
|
|
43
|
-
/**
|
|
44
|
-
* Whether to set a certain aspect ratio on the content, including the toolbar and statusbar. This is provided for
|
|
45
|
-
* convenience and consistency; it can instead be specified by the `classNames` or `style` props as needed.
|
|
46
|
-
*/
|
|
47
|
-
size?: "intrinsic" | "video" | "square";
|
|
48
15
|
} & React.RefAttributes<HTMLDivElement>>;
|
|
49
16
|
//# sourceMappingURL=StackItemContent.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StackItemContent.d.ts","sourceRoot":"","sources":["../../../../../src/components/StackItem/StackItemContent.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,EAAE,KAAK,wBAAwB,EAAuB,MAAM,OAAO,CAAC;AAElF,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAKtD,MAAM,MAAM,qBAAqB,GAAG,eAAe,CAAC,IAAI,CAAC,wBAAwB,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC,CAAC,GAAG;
|
|
1
|
+
{"version":3,"file":"StackItemContent.d.ts","sourceRoot":"","sources":["../../../../../src/components/StackItem/StackItemContent.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,EAAE,KAAK,wBAAwB,EAAuB,MAAM,OAAO,CAAC;AAElF,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAKtD,MAAM,MAAM,qBAAqB,GAAG,eAAe,CAAC,IAAI,CAAC,wBAAwB,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,YAAY,CAAC,CAAC,GAAG;IAClH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,gBAAgB;;;cAPjB,OAAO;gBACL,OAAO;wCA0CpB,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { type
|
|
1
|
+
import React, { type ComponentPropsWithRef, type ComponentPropsWithoutRef, type PropsWithChildren } from 'react';
|
|
2
2
|
import { type ThemedClassName } from '@dxos/react-ui';
|
|
3
3
|
import { type AttendableId, type Related } from '@dxos/react-ui-attention';
|
|
4
4
|
export type StackItemHeadingProps = ThemedClassName<ComponentPropsWithoutRef<'div'>> & {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StackItemHeading.d.ts","sourceRoot":"","sources":["../../../../../src/components/StackItem/StackItemHeading.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"StackItemHeading.d.ts","sourceRoot":"","sources":["../../../../../src/components/StackItem/StackItemHeading.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,EACZ,KAAK,qBAAqB,EAC1B,KAAK,wBAAwB,EAC7B,KAAK,iBAAiB,EAEvB,MAAM,OAAO,CAAC;AAEf,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACtD,OAAO,EAAE,KAAK,YAAY,EAAE,KAAK,OAAO,EAAgB,MAAM,0BAA0B,CAAC;AAKzF,MAAM,MAAM,qBAAqB,GAAG,eAAe,CAAC,wBAAwB,CAAC,KAAK,CAAC,CAAC,GAAG;IACrF,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B,CAAC;AAEF,eAAO,MAAM,gBAAgB,GAAI,+DAM9B,qBAAqB,sBAsBvB,CAAC;AAEF,eAAO,MAAM,6BAA6B,GAAI,cAAc,iBAAiB,CAAC,EAAE,CAAC,sBAMhF,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"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StackItemResizeHandle.d.ts","sourceRoot":"","sources":["../../../../../src/components/StackItem/StackItemResizeHandle.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"StackItemResizeHandle.d.ts","sourceRoot":"","sources":["../../../../../src/components/StackItem/StackItemResizeHandle.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAC;AAW1B,MAAM,MAAM,0BAA0B,GAAG,EAAE,CAAC;AAE5C,eAAO,MAAM,qBAAqB,yBAajC,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { type PropsWithChildren } from 'react';
|
|
2
|
-
import { type
|
|
2
|
+
import { type Node } from '@dxos/app-graph';
|
|
3
3
|
import { type ButtonProps } from '@dxos/react-ui';
|
|
4
4
|
import { type AttendableId, type Related } from '@dxos/react-ui-attention';
|
|
5
5
|
export type KeyBinding = {
|
|
@@ -9,7 +9,7 @@ export type KeyBinding = {
|
|
|
9
9
|
linux?: string;
|
|
10
10
|
unknown?: string;
|
|
11
11
|
};
|
|
12
|
-
export type StackItemSigilAction = Pick<ActionLike, 'id' | 'properties' | 'data'>;
|
|
12
|
+
export type StackItemSigilAction = Pick<Node.ActionLike, 'id' | 'properties' | 'data'>;
|
|
13
13
|
export type StackItemSigilButtonProps = Omit<ButtonProps, 'variant'> & AttendableId & Related & {
|
|
14
14
|
isMenu?: boolean;
|
|
15
15
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StackItemSigil.d.ts","sourceRoot":"","sources":["../../../../../src/components/StackItem/StackItemSigil.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,EAAY,KAAK,iBAAiB,EAAwB,MAAM,OAAO,CAAC;AAEtF,OAAO,EAAE,KAAK,
|
|
1
|
+
{"version":3,"file":"StackItemSigil.d.ts","sourceRoot":"","sources":["../../../../../src/components/StackItem/StackItemSigil.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,EAAY,KAAK,iBAAiB,EAAwB,MAAM,OAAO,CAAC;AAEtF,OAAO,EAAE,KAAK,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAE5C,OAAO,EAAU,KAAK,WAAW,EAAyD,MAAM,gBAAgB,CAAC;AACjH,OAAO,EAAE,KAAK,YAAY,EAAE,KAAK,OAAO,EAAgB,MAAM,0BAA0B,CAAC;AAQzF,MAAM,MAAM,UAAU,GAAG;IACvB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,IAAI,GAAG,YAAY,GAAG,MAAM,CAAC,CAAC;AAEvF,MAAM,MAAM,yBAAyB,GAAG,IAAI,CAAC,WAAW,EAAE,SAAS,CAAC,GAClE,YAAY,GACZ,OAAO,GAAG;IACR,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB,CAAC;AAEJ,eAAO,MAAM,oBAAoB,kHAiBhC,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG,iBAAiB,CACjD;IACE,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,YAAY,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,oBAAoB,EAAE,EAAE,CAAC;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,oBAAoB,KAAK,IAAI,CAAC;CACnD,GAAG,OAAO,CACZ,CAAC;AAEF,eAAO,MAAM,cAAc;mBARR,MAAM;kBACP,MAAM;cACV,oBAAoB,EAAE,EAAE;UAC5B,MAAM;eACD,CAAC,MAAM,EAAE,oBAAoB,KAAK,IAAI;;;2CA6FpD,CAAC"}
|
|
@@ -15,5 +15,8 @@ export type LayoutControlsProps = Omit<ButtonGroupProps, 'onClick'> & {
|
|
|
15
15
|
isSolo?: boolean;
|
|
16
16
|
pin?: 'start' | 'end' | 'both';
|
|
17
17
|
};
|
|
18
|
+
/**
|
|
19
|
+
* @deprecated
|
|
20
|
+
*/
|
|
18
21
|
export declare const LayoutControls: React.ForwardRefExoticComponent<Omit<LayoutControlsProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
19
22
|
//# sourceMappingURL=LayoutControls.d.ts.map
|
|
@@ -1 +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
|
+
{"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;;GAEG;AACH,eAAO,MAAM,cAAc,yGA4E1B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/index.ts"],"names":[],"mappings":"AAIA,mBAAmB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/index.ts"],"names":[],"mappings":"AAIA,mBAAmB,SAAS,CAAC;AAE7B,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/types.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"}
|
|
@@ -1,15 +1,17 @@
|
|
|
1
|
-
import { type
|
|
2
|
-
|
|
3
|
-
* Hook to handle drag and drop functionality for Stack components.
|
|
4
|
-
*/
|
|
5
|
-
export declare const useStackDropForElements: ({ id, element, scrollElement, selfDroppable, orientation, onRearrange, }: {
|
|
1
|
+
import { type Orientation, type StackItemRearrangeHandler } from '../components';
|
|
2
|
+
export type UseStackDropForElementsProps = {
|
|
6
3
|
id?: string;
|
|
7
4
|
element: HTMLDivElement | null;
|
|
8
5
|
scrollElement?: HTMLDivElement | null;
|
|
9
|
-
selfDroppable: boolean;
|
|
10
6
|
orientation: Orientation;
|
|
7
|
+
selfDroppable: boolean;
|
|
11
8
|
onRearrange?: StackItemRearrangeHandler;
|
|
12
|
-
}
|
|
9
|
+
};
|
|
10
|
+
export type UseStackDropForElements = {
|
|
13
11
|
dropping: boolean;
|
|
14
12
|
};
|
|
13
|
+
/**
|
|
14
|
+
* Hook to handle drag-and-drop functionality for Stack components.
|
|
15
|
+
*/
|
|
16
|
+
export declare const useStackDropForElements: ({ id, element, scrollElement, orientation, selfDroppable, onRearrange, }: UseStackDropForElementsProps) => UseStackDropForElements;
|
|
15
17
|
//# sourceMappingURL=useStackDropForElements.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useStackDropForElements.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useStackDropForElements.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,KAAK,
|
|
1
|
+
{"version":3,"file":"useStackDropForElements.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useStackDropForElements.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,KAAK,WAAW,EAAsB,KAAK,yBAAyB,EAAE,MAAM,eAAe,CAAC;AAIrG,MAAM,MAAM,4BAA4B,GAAG;IACzC,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,OAAO,EAAE,cAAc,GAAG,IAAI,CAAC;IAC/B,aAAa,CAAC,EAAE,cAAc,GAAG,IAAI,CAAC;IACtC,WAAW,EAAE,WAAW,CAAC;IACzB,aAAa,EAAE,OAAO,CAAC;IACvB,WAAW,CAAC,EAAE,yBAAyB,CAAC;CACzC,CAAC;AAEF,MAAM,MAAM,uBAAuB,GAAG;IACpC,QAAQ,EAAE,OAAO,CAAC;CACnB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,uBAAuB,GAAI,0EAOrC,4BAA4B,KAAG,uBAqDjC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAIA,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export declare const translationKey = "react-ui-stack";
|
|
1
|
+
export declare const translationKey = "@dxos/react-ui-stack";
|
|
2
2
|
export declare const translations: [{
|
|
3
3
|
readonly 'en-US': {
|
|
4
|
-
readonly "react-ui-stack": {
|
|
4
|
+
readonly "@dxos/react-ui-stack": {
|
|
5
5
|
readonly 'resize label': "Drag to resize";
|
|
6
6
|
readonly 'drag handle label': "Drag to rearrange";
|
|
7
7
|
readonly 'pin start label': "Pin to the left sidebar";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"translations.d.ts","sourceRoot":"","sources":["../../../src/translations.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,cAAc,
|
|
1
|
+
{"version":3,"file":"translations.d.ts","sourceRoot":"","sources":["../../../src/translations.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,cAAc,yBAAyB,CAAC;AAErD,eAAO,MAAM,YAAY;;;;;;;;;;;;;EAeM,CAAC"}
|