@dxos/react-ui 0.1.24 → 0.1.25-next.3c6b542
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 +1092 -452
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/meta.json +1 -1
- package/dist/types/src/components/IdentityList/DeviceList.d.ts +7 -0
- package/dist/types/src/components/IdentityList/DeviceList.d.ts.map +1 -0
- package/dist/types/src/components/IdentityList/IdentityListItem.d.ts +2 -1
- package/dist/types/src/components/IdentityList/IdentityListItem.d.ts.map +1 -1
- package/dist/types/src/components/IdentityList/IdentityListItem.stories.d.ts +2 -1
- package/dist/types/src/components/IdentityList/IdentityListItem.stories.d.ts.map +1 -1
- package/dist/types/src/components/IdentityList/SpaceMemberList.d.ts +3 -2
- package/dist/types/src/components/IdentityList/SpaceMemberList.d.ts.map +1 -1
- package/dist/types/src/components/IdentityList/SpaceMemberListContainer.d.ts +3 -1
- package/dist/types/src/components/IdentityList/SpaceMemberListContainer.d.ts.map +1 -1
- package/dist/types/src/components/IdentityList/index.d.ts +1 -0
- package/dist/types/src/components/IdentityList/index.d.ts.map +1 -1
- package/dist/types/src/components/InvitationList/InvitationList.d.ts.map +1 -1
- package/dist/types/src/components/InvitationList/InvitationListItem.d.ts.map +1 -1
- package/dist/types/src/components/InvitationList/InvitationStatusAvatar.d.ts +6 -1
- package/dist/types/src/components/InvitationList/InvitationStatusAvatar.d.ts.map +1 -1
- package/dist/types/src/components/InvitationList/InvitationStatusAvatar.stories.d.ts +1 -1
- package/dist/types/src/components/SpaceList/SpaceListItem.d.ts +7 -0
- package/dist/types/src/components/SpaceList/SpaceListItem.d.ts.map +1 -0
- package/dist/types/src/components/SpaceList/index.d.ts +2 -0
- package/dist/types/src/components/SpaceList/index.d.ts.map +1 -0
- package/dist/types/src/components/index.d.ts +1 -0
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/composites/DevicesDialog/DevicesDialog.d.ts +6 -0
- package/dist/types/src/composites/DevicesDialog/DevicesDialog.d.ts.map +1 -0
- package/dist/types/src/composites/DevicesDialog/index.d.ts +2 -0
- package/dist/types/src/composites/DevicesDialog/index.d.ts.map +1 -0
- package/dist/types/src/composites/JoinDialog/JoinDialog.d.ts +1 -1
- package/dist/types/src/composites/JoinDialog/JoinDialog.d.ts.map +1 -1
- package/dist/types/src/composites/JoinDialog/JoinDialog.stories.d.ts +2 -2
- package/dist/types/src/composites/JoinDialog/JoinDialog.stories.d.ts.map +1 -1
- package/dist/types/src/composites/Shell/Shell.d.ts +6 -0
- package/dist/types/src/composites/Shell/Shell.d.ts.map +1 -0
- package/dist/types/src/composites/Shell/index.d.ts +2 -0
- package/dist/types/src/composites/Shell/index.d.ts.map +1 -0
- package/dist/types/src/composites/SpaceDialog/SpaceDialog.d.ts +6 -0
- package/dist/types/src/composites/SpaceDialog/SpaceDialog.d.ts.map +1 -0
- package/dist/types/src/composites/SpaceDialog/index.d.ts +2 -0
- package/dist/types/src/composites/SpaceDialog/index.d.ts.map +1 -0
- package/dist/types/src/composites/index.d.ts +2 -0
- package/dist/types/src/composites/index.d.ts.map +1 -1
- package/dist/types/src/layouts/PanelAlertDialog/PanelAlertDialog.d.ts.map +1 -1
- package/dist/types/src/layouts/PanelDialog/PanelDialog.d.ts +14 -0
- package/dist/types/src/layouts/PanelDialog/PanelDialog.d.ts.map +1 -0
- package/dist/types/src/layouts/PanelDialog/index.d.ts +2 -0
- package/dist/types/src/layouts/PanelDialog/index.d.ts.map +1 -0
- package/dist/types/src/layouts/index.d.ts +1 -0
- package/dist/types/src/layouts/index.d.ts.map +1 -1
- package/dist/types/src/panels/DevicesPanel/DevicesPanel.d.ts +10 -0
- package/dist/types/src/panels/DevicesPanel/DevicesPanel.d.ts.map +1 -0
- package/dist/types/src/panels/DevicesPanel/index.d.ts +2 -0
- package/dist/types/src/panels/DevicesPanel/index.d.ts.map +1 -0
- package/dist/types/src/panels/JoinPanel/JoinHeading.d.ts +3 -0
- package/dist/types/src/panels/JoinPanel/JoinHeading.d.ts.map +1 -1
- package/dist/types/src/panels/JoinPanel/JoinPanel.d.ts +1 -1
- package/dist/types/src/panels/JoinPanel/JoinPanel.d.ts.map +1 -1
- package/dist/types/src/panels/JoinPanel/JoinPanelProps.d.ts +4 -3
- package/dist/types/src/panels/JoinPanel/JoinPanelProps.d.ts.map +1 -1
- package/dist/types/src/panels/JoinPanel/view-states/AdditionMethodSelector.d.ts +1 -1
- package/dist/types/src/panels/JoinPanel/view-states/AdditionMethodSelector.d.ts.map +1 -1
- package/dist/types/src/panels/JoinPanel/view-states/IdentityAdded.d.ts +10 -2
- package/dist/types/src/panels/JoinPanel/view-states/IdentityAdded.d.ts.map +1 -1
- package/dist/types/src/panels/JoinPanel/view-states/IdentityInput.d.ts.map +1 -1
- package/dist/types/src/panels/JoinPanel/view-states/IdentitySelector.d.ts +1 -1
- package/dist/types/src/panels/JoinPanel/view-states/IdentitySelector.d.ts.map +1 -1
- package/dist/types/src/panels/JoinPanel/view-states/InvitationAccepted.d.ts.map +1 -1
- package/dist/types/src/panels/JoinPanel/view-states/InvitationAuthenticator.d.ts.map +1 -1
- package/dist/types/src/panels/JoinPanel/view-states/InvitationInput.d.ts.map +1 -1
- package/dist/types/src/panels/JoinPanel/view-states/InvitationRescuer.d.ts.map +1 -1
- package/dist/types/src/panels/SpacePanel/SpacePanel.d.ts +18 -0
- package/dist/types/src/panels/SpacePanel/SpacePanel.d.ts.map +1 -0
- package/dist/types/src/panels/SpacePanel/SpacePanel.stories.d.ts +9 -0
- package/dist/types/src/panels/SpacePanel/SpacePanel.stories.d.ts.map +1 -0
- package/dist/types/src/panels/SpacePanel/index.d.ts +2 -0
- package/dist/types/src/panels/SpacePanel/index.d.ts.map +1 -0
- package/dist/types/src/panels/index.d.ts +2 -0
- package/dist/types/src/panels/index.d.ts.map +1 -1
- package/dist/types/src/styles/dialogStyles.d.ts +3 -0
- package/dist/types/src/styles/dialogStyles.d.ts.map +1 -0
- package/dist/types/src/styles/index.d.ts +1 -0
- package/dist/types/src/styles/index.d.ts.map +1 -1
- package/dist/types/src/translations/locales/en-US.d.ts +12 -1
- package/dist/types/src/translations/locales/en-US.d.ts.map +1 -1
- package/package.json +12 -11
- package/src/components/IdentityList/DeviceList.tsx +31 -0
- package/src/components/IdentityList/IdentityListItem.tsx +15 -3
- package/src/components/IdentityList/SpaceMemberList.tsx +10 -8
- package/src/components/IdentityList/SpaceMemberListContainer.tsx +5 -4
- package/src/components/IdentityList/index.ts +1 -0
- package/src/components/InvitationList/InvitationList.tsx +6 -2
- package/src/components/InvitationList/InvitationListItem.tsx +36 -25
- package/src/components/InvitationList/InvitationStatusAvatar.tsx +10 -5
- package/src/components/SpaceList/SpaceListItem.tsx +32 -0
- package/src/components/SpaceList/index.ts +5 -0
- package/src/components/index.ts +1 -0
- package/src/composites/DevicesDialog/DevicesDialog.tsx +38 -0
- package/src/composites/DevicesDialog/index.ts +5 -0
- package/src/composites/JoinDialog/JoinDialog.stories.tsx +59 -58
- package/src/composites/JoinDialog/JoinDialog.tsx +3 -1
- package/src/composites/Shell/Shell.tsx +92 -0
- package/src/composites/Shell/index.ts +5 -0
- package/src/composites/SpaceDialog/SpaceDialog.tsx +38 -0
- package/src/composites/SpaceDialog/index.ts +5 -0
- package/src/composites/index.ts +3 -0
- package/src/layouts/PanelAlertDialog/PanelAlertDialog.tsx +4 -8
- package/src/layouts/PanelDialog/PanelDialog.tsx +39 -0
- package/src/layouts/PanelDialog/index.ts +5 -0
- package/src/layouts/PanelSidebar/PanelSidebar.tsx +1 -1
- package/src/layouts/index.ts +1 -0
- package/src/panels/DevicesPanel/DevicesPanel.tsx +98 -0
- package/src/panels/DevicesPanel/index.ts +5 -0
- package/src/panels/JoinPanel/JoinHeading.tsx +44 -16
- package/src/panels/JoinPanel/JoinPanel.tsx +32 -11
- package/src/panels/JoinPanel/JoinPanelProps.ts +4 -8
- package/src/panels/JoinPanel/view-states/AdditionMethodSelector.tsx +5 -1
- package/src/panels/JoinPanel/view-states/IdentityAdded.tsx +63 -24
- package/src/panels/JoinPanel/view-states/IdentityInput.tsx +8 -1
- package/src/panels/JoinPanel/view-states/IdentitySelector.tsx +4 -1
- package/src/panels/JoinPanel/view-states/InvitationAccepted.tsx +1 -0
- package/src/panels/JoinPanel/view-states/InvitationAuthenticator.tsx +4 -1
- package/src/panels/JoinPanel/view-states/InvitationInput.tsx +8 -1
- package/src/panels/JoinPanel/view-states/InvitationRescuer.tsx +4 -1
- package/src/panels/SpacePanel/SpacePanel.stories.tsx +53 -0
- package/src/panels/SpacePanel/SpacePanel.tsx +174 -0
- package/src/panels/SpacePanel/index.ts +5 -0
- package/src/panels/index.ts +2 -0
- package/src/styles/dialogStyles.ts +8 -0
- package/src/styles/index.ts +1 -0
- package/src/translations/locales/en-US.ts +14 -3
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as Dialog from '@radix-ui/react-dialog';
|
|
2
|
+
import { ComponentPropsWithoutRef, PropsWithChildren } from 'react';
|
|
3
|
+
export interface PanelDialogSlots {
|
|
4
|
+
root: ComponentPropsWithoutRef<typeof Dialog.Root>;
|
|
5
|
+
overlay: ComponentPropsWithoutRef<typeof Dialog.Overlay>;
|
|
6
|
+
content: ComponentPropsWithoutRef<typeof Dialog.Content>;
|
|
7
|
+
trigger: ComponentPropsWithoutRef<typeof Dialog.Trigger>;
|
|
8
|
+
}
|
|
9
|
+
export declare type PanelDialogProps = PropsWithChildren<{
|
|
10
|
+
titleId: string;
|
|
11
|
+
slots?: Partial<PanelDialogSlots>;
|
|
12
|
+
}>;
|
|
13
|
+
export declare const PanelDialog: ({ titleId, slots, children }: PanelDialogProps) => JSX.Element;
|
|
14
|
+
//# sourceMappingURL=PanelDialog.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PanelDialog.d.ts","sourceRoot":"","sources":["../../../../../src/layouts/PanelDialog/PanelDialog.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,MAAM,wBAAwB,CAAC;AACjD,OAAc,EAAE,wBAAwB,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAM3E,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,wBAAwB,CAAC,OAAO,MAAM,CAAC,IAAI,CAAC,CAAC;IACnD,OAAO,EAAE,wBAAwB,CAAC,OAAO,MAAM,CAAC,OAAO,CAAC,CAAC;IACzD,OAAO,EAAE,wBAAwB,CAAC,OAAO,MAAM,CAAC,OAAO,CAAC,CAAC;IACzD,OAAO,EAAE,wBAAwB,CAAC,OAAO,MAAM,CAAC,OAAO,CAAC,CAAC;CAC1D;AAED,oBAAY,gBAAgB,GAAG,iBAAiB,CAAC;IAC/C,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,OAAO,CAAC,gBAAgB,CAAC,CAAC;CACnC,CAAC,CAAC;AAEH,eAAO,MAAM,WAAW,iCAAuC,gBAAgB,gBAe9E,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/layouts/PanelDialog/index.ts"],"names":[],"mappings":"AAIA,cAAc,eAAe,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/layouts/index.ts"],"names":[],"mappings":"AAIA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,oBAAoB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/layouts/index.ts"],"names":[],"mappings":"AAIA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,oBAAoB,CAAC;AACnC,cAAc,eAAe,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { cloneElement } from 'react';
|
|
2
|
+
export declare type DevicesPanelProps = {
|
|
3
|
+
titleId?: string;
|
|
4
|
+
createInvitationUrl: (invitationCode: string) => string;
|
|
5
|
+
doneActionParent?: Parameters<typeof cloneElement>[0];
|
|
6
|
+
onDone?: () => void;
|
|
7
|
+
};
|
|
8
|
+
export declare type DevicesView = 'device list';
|
|
9
|
+
export declare const DevicesPanel: (props: DevicesPanelProps) => JSX.Element;
|
|
10
|
+
//# sourceMappingURL=DevicesPanel.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DevicesPanel.d.ts","sourceRoot":"","sources":["../../../../../src/panels/DevicesPanel/DevicesPanel.tsx"],"names":[],"mappings":"AAKA,OAAc,EAAE,YAAY,EAAc,MAAM,OAAO,CAAC;AAQxD,oBAAY,iBAAiB,GAAG;IAC9B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,mBAAmB,EAAE,CAAC,cAAc,EAAE,MAAM,KAAK,MAAM,CAAC;IACxD,gBAAgB,CAAC,EAAE,UAAU,CAAC,OAAO,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC;IACtD,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;CACrB,CAAC;AAEF,oBAAY,WAAW,GAAG,aAAa,CAAC;AA8DxC,eAAO,MAAM,YAAY,UAAW,iBAAiB,gBAepD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/panels/DevicesPanel/index.ts"],"names":[],"mappings":"AAIA,cAAc,gBAAgB,CAAC"}
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import React, { cloneElement } from 'react';
|
|
2
2
|
import { AuthenticatingInvitationObservable } from '@dxos/client';
|
|
3
|
+
import { JoinPanelMode } from './JoinPanelProps';
|
|
3
4
|
export interface JoinSpaceHeadingProps {
|
|
5
|
+
mode?: JoinPanelMode;
|
|
4
6
|
titleId: string;
|
|
5
7
|
invitation?: AuthenticatingInvitationObservable;
|
|
6
8
|
onExit?: () => void;
|
|
7
9
|
exitActionParent?: Parameters<typeof cloneElement>[0];
|
|
10
|
+
preventExit?: boolean;
|
|
8
11
|
}
|
|
9
12
|
export declare const JoinHeading: React.ForwardRefExoticComponent<JoinSpaceHeadingProps & React.RefAttributes<HTMLDivElement>>;
|
|
10
13
|
//# sourceMappingURL=JoinHeading.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"JoinHeading.d.ts","sourceRoot":"","sources":["../../../../../src/panels/JoinPanel/JoinHeading.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,EAAE,YAAY,EAA4B,MAAM,OAAO,CAAC;AAEtE,OAAO,EAAE,kCAAkC,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"JoinHeading.d.ts","sourceRoot":"","sources":["../../../../../src/panels/JoinPanel/JoinHeading.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,EAAE,YAAY,EAA4B,MAAM,OAAO,CAAC;AAEtE,OAAO,EAAE,kCAAkC,EAAE,MAAM,cAAc,CAAC;AAKlE,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEjD,MAAM,WAAW,qBAAqB;IACpC,IAAI,CAAC,EAAE,aAAa,CAAC;IACrB,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,kCAAkC,CAAC;IAChD,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,gBAAgB,CAAC,EAAE,UAAU,CAAC,OAAO,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC;IACtD,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAED,eAAO,MAAM,WAAW,8FA8DvB,CAAC"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { JoinPanelProps } from './JoinPanelProps';
|
|
2
|
-
export declare const JoinPanel: ({ initialInvitationCode, titleId: propsTitleId, exitActionParent, onExit, doneActionParent, onDone }: JoinPanelProps) => JSX.Element;
|
|
2
|
+
export declare const JoinPanel: ({ mode, initialInvitationCode, titleId: propsTitleId, exitActionParent, onExit, doneActionParent, onDone, preventExit }: JoinPanelProps) => JSX.Element;
|
|
3
3
|
//# sourceMappingURL=JoinPanel.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"JoinPanel.d.ts","sourceRoot":"","sources":["../../../../../src/panels/JoinPanel/JoinPanel.tsx"],"names":[],"mappings":"AAWA,OAAO,EAAc,cAAc,EAAa,MAAM,kBAAkB,CAAC;AAYzE,eAAO,MAAM,SAAS,
|
|
1
|
+
{"version":3,"file":"JoinPanel.d.ts","sourceRoot":"","sources":["../../../../../src/panels/JoinPanel/JoinPanel.tsx"],"names":[],"mappings":"AAWA,OAAO,EAAc,cAAc,EAAa,MAAM,kBAAkB,CAAC;AAYzE,eAAO,MAAM,SAAS,4HASnB,cAAc,gBAmShB,CAAC"}
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { cloneElement, Dispatch } from 'react';
|
|
2
|
-
import type { AuthenticatingInvitationObservable, Profile
|
|
2
|
+
import type { AuthenticatingInvitationObservable, Profile } from '@dxos/client';
|
|
3
3
|
import { InvitationResult } from '@dxos/react-client';
|
|
4
|
-
export declare type
|
|
5
|
-
export declare type Profile = Pick<NaturalProfile, 'displayName' | 'identityKey'>;
|
|
4
|
+
export declare type JoinPanelMode = 'default' | 'halo-only';
|
|
6
5
|
export interface JoinPanelProps {
|
|
6
|
+
mode?: JoinPanelMode;
|
|
7
7
|
initialInvitationCode?: string;
|
|
8
8
|
titleId?: string;
|
|
9
9
|
exitActionParent?: Parameters<typeof cloneElement>[0];
|
|
10
10
|
onExit?: () => void;
|
|
11
|
+
preventExit?: boolean;
|
|
11
12
|
doneActionParent?: Parameters<typeof cloneElement>[0];
|
|
12
13
|
onDone?: (result: InvitationResult | null) => void;
|
|
13
14
|
parseInvitationCodeInput?: (invitationCodeInput: string) => string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"JoinPanelProps.d.ts","sourceRoot":"","sources":["../../../../../src/panels/JoinPanel/JoinPanelProps.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAE/C,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"JoinPanelProps.d.ts","sourceRoot":"","sources":["../../../../../src/panels/JoinPanel/JoinPanelProps.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAE/C,OAAO,KAAK,EAAE,kCAAkC,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAChF,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAEtD,oBAAY,aAAa,GAAG,SAAS,GAAG,WAAW,CAAC;AAEpD,MAAM,WAAW,cAAc;IAC7B,IAAI,CAAC,EAAE,aAAa,CAAC;IACrB,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,gBAAgB,CAAC,EAAE,UAAU,CAAC,OAAO,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC;IACtD,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,gBAAgB,CAAC,EAAE,UAAU,CAAC,OAAO,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC;IACtD,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,gBAAgB,GAAG,IAAI,KAAK,IAAI,CAAC;IACnD,wBAAwB,CAAC,EAAE,CAAC,mBAAmB,EAAE,MAAM,KAAK,MAAM,CAAC;CACpE;AAED,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,iBAAiB,GAAG,gBAAgB,CAAC;IAC3C,QAAQ,EAAE,OAAO,CAAC;CACnB;AAED,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,mBAAmB,GAAG,iBAAiB,GAAG,cAAc,CAAC;CAChE;AAED,MAAM,WAAW,qBAAqB;IACpC,IAAI,EACA,2BAA2B,GAC3B,yBAAyB,GACzB,mBAAmB,GACnB,sBAAsB,GACtB,oBAAoB,GACpB,iBAAiB,GACjB,qBAAqB,GACrB,oBAAoB,GACpB,kBAAkB,CAAC;IACvB,IAAI,EAAE,OAAO,GAAG,MAAM,CAAC;CACxB;AAED,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,uBAAuB,CAAC;IAC9B,IAAI,EAAE,OAAO,GAAG,MAAM,CAAC;IACvB,UAAU,EAAE,kCAAkC,CAAC;CAChD;AAED,oBAAY,gBAAgB,GAAG,qBAAqB,GAAG,oBAAoB,CAAC;AAE5E,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,wBAAwB,CAAC;IAC/B,MAAM,EAAE,kBAAkB,GAAG,0BAA0B,GAAG,iBAAiB,CAAC;CAC7E;AAED,oBAAY,UAAU,GAAG,cAAc,GAAG,eAAe,GAAG,oBAAoB,GAAG,gBAAgB,CAAC;AAEpG,oBAAY,YAAY,GAAG,QAAQ,CAAC,UAAU,CAAC,CAAC;AAEhD,oBAAY,cAAc,GACtB,kBAAkB,GAClB,oBAAoB,GACpB,0BAA0B,GAC1B,qBAAqB,CAAC;AAE1B,oBAAY,QAAQ,GAChB,mBAAmB,GACnB,0BAA0B,GAC1B,gBAAgB,GAChB,gBAAgB,GAChB,2BAA2B,GAC3B,0BAA0B,CAAC;AAE/B,MAAM,WAAW,SAAS;IACxB,UAAU,EAAE,QAAQ,CAAC;IACrB,6BAA6B,CAAC,EAAE,MAAM,CAAC;IACvC,eAAe,CAAC,EAAE,kCAAkC,CAAC;IACrD,cAAc,EAAE,cAAc,CAAC;IAC/B,yBAAyB,CAAC,EAAE,gBAAgB,GAAG,uBAAuB,CAAC;IACvE,4BAA4B,CAAC,EAAE,MAAM,CAAC;IACtC,cAAc,CAAC,EAAE,kCAAkC,CAAC;IACpD,aAAa,EAAE,cAAc,CAAC;IAC9B,wBAAwB,CAAC,EAAE,gBAAgB,GAAG,uBAAuB,CAAC;IACtE,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,cAAc,CAAC,EAAE,oBAAoB,CAAC,QAAQ,CAAC,CAAC;CACjD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AdditionMethodSelector.d.ts","sourceRoot":"","sources":["../../../../../../src/panels/JoinPanel/view-states/AdditionMethodSelector.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"AdditionMethodSelector.d.ts","sourceRoot":"","sources":["../../../../../../src/panels/JoinPanel/view-states/AdditionMethodSelector.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAG5C,OAAO,EAA+B,cAAc,EAAE,MAAM,aAAa,CAAC;AAE1E,MAAM,WAAW,2BAA4B,SAAQ,cAAc;IACjE,mBAAmB,EAAE,OAAO,EAAE,CAAC;CAChC;AAED,eAAO,MAAM,sBAAsB,+CAAgD,2BAA2B,gBAwD7G,CAAC"}
|
|
@@ -1,7 +1,15 @@
|
|
|
1
|
+
import { cloneElement } from 'react';
|
|
1
2
|
import type { Profile } from '@dxos/client';
|
|
3
|
+
import { InvitationResult } from '@dxos/react-client';
|
|
4
|
+
import { JoinPanelMode } from '../JoinPanelProps';
|
|
2
5
|
import { ViewStateProps } from './ViewState';
|
|
3
|
-
export interface IdentityAddedProps extends ViewStateProps {
|
|
6
|
+
export interface IdentityAddedProps extends ViewStateProps, DoneProps {
|
|
7
|
+
mode?: JoinPanelMode;
|
|
4
8
|
addedIdentity?: Profile;
|
|
5
9
|
}
|
|
6
|
-
export
|
|
10
|
+
export interface DoneProps extends ViewStateProps {
|
|
11
|
+
doneActionParent?: Parameters<typeof cloneElement>[0];
|
|
12
|
+
onDone?: (result: InvitationResult | null) => void;
|
|
13
|
+
}
|
|
14
|
+
export declare const IdentityAdded: ({ mode, addedIdentity, onDone, doneActionParent, ...viewStateProps }: IdentityAddedProps) => JSX.Element;
|
|
7
15
|
//# sourceMappingURL=IdentityAdded.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IdentityAdded.d.ts","sourceRoot":"","sources":["../../../../../../src/panels/JoinPanel/view-states/IdentityAdded.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"IdentityAdded.d.ts","sourceRoot":"","sources":["../../../../../../src/panels/JoinPanel/view-states/IdentityAdded.tsx"],"names":[],"mappings":"AAKA,OAAc,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAE5C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAGtD,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAA+B,cAAc,EAAE,MAAM,aAAa,CAAC;AAE1E,MAAM,WAAW,kBAAmB,SAAQ,cAAc,EAAE,SAAS;IACnE,IAAI,CAAC,EAAE,aAAa,CAAC;IACrB,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB;AAED,MAAM,WAAW,SAAU,SAAQ,cAAc;IAC/C,gBAAgB,CAAC,EAAE,UAAU,CAAC,OAAO,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC;IACtD,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,gBAAgB,GAAG,IAAI,KAAK,IAAI,CAAC;CACpD;AAuBD,eAAO,MAAM,aAAa,yEAMvB,kBAAkB,gBA+CpB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IdentityInput.d.ts","sourceRoot":"","sources":["../../../../../../src/panels/JoinPanel/view-states/IdentityInput.tsx"],"names":[],"mappings":"AAUA,OAAO,EAA+B,cAAc,EAAE,MAAM,aAAa,CAAC;AAE1E,MAAM,WAAW,oBAAqB,SAAQ,cAAc;IAC1D,MAAM,EAAE,kBAAkB,GAAG,iBAAiB,CAAC;CAChD;AAED,eAAO,MAAM,aAAa,kCAAmC,oBAAoB,
|
|
1
|
+
{"version":3,"file":"IdentityInput.d.ts","sourceRoot":"","sources":["../../../../../../src/panels/JoinPanel/view-states/IdentityInput.tsx"],"names":[],"mappings":"AAUA,OAAO,EAA+B,cAAc,EAAE,MAAM,aAAa,CAAC;AAE1E,MAAM,WAAW,oBAAqB,SAAQ,cAAc;IAC1D,MAAM,EAAE,kBAAkB,GAAG,iBAAiB,CAAC;CAChD;AAED,eAAO,MAAM,aAAa,kCAAmC,oBAAoB,gBA8DhF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IdentitySelector.d.ts","sourceRoot":"","sources":["../../../../../../src/panels/JoinPanel/view-states/IdentitySelector.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"IdentitySelector.d.ts","sourceRoot":"","sources":["../../../../../../src/panels/JoinPanel/view-states/IdentitySelector.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAG5C,OAAO,EAA+B,cAAc,EAAE,MAAM,aAAa,CAAC;AAE1E,MAAM,WAAW,qBAAsB,SAAQ,cAAc;IAC3D,mBAAmB,EAAE,OAAO,EAAE,CAAC;CAChC;AAED,eAAO,MAAM,gBAAgB,+CAAgD,qBAAqB,gBAmFjG,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InvitationAccepted.d.ts","sourceRoot":"","sources":["../../../../../../src/panels/JoinPanel/view-states/InvitationAccepted.tsx"],"names":[],"mappings":"AAKA,OAAc,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAG5C,OAAO,EAAE,gBAAgB,EAAuB,MAAM,oBAAoB,CAAC;AAG3E,OAAO,EAAa,cAAc,EAAE,MAAM,aAAa,CAAC;AAExD,MAAM,WAAW,uBAAwB,SAAQ,cAAc;IAC7D,cAAc,EAAE,OAAO,GAAG,MAAM,CAAC;IACjC,gBAAgB,CAAC,EAAE,UAAU,CAAC,OAAO,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC;IACtD,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,gBAAgB,GAAG,IAAI,KAAK,IAAI,CAAC;CACpD;
|
|
1
|
+
{"version":3,"file":"InvitationAccepted.d.ts","sourceRoot":"","sources":["../../../../../../src/panels/JoinPanel/view-states/InvitationAccepted.tsx"],"names":[],"mappings":"AAKA,OAAc,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAG5C,OAAO,EAAE,gBAAgB,EAAuB,MAAM,oBAAoB,CAAC;AAG3E,OAAO,EAAa,cAAc,EAAE,MAAM,aAAa,CAAC;AAExD,MAAM,WAAW,uBAAwB,SAAQ,cAAc;IAC7D,cAAc,EAAE,OAAO,GAAG,MAAM,CAAC;IACjC,gBAAgB,CAAC,EAAE,UAAU,CAAC,OAAO,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC;IACtD,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,gBAAgB,GAAG,IAAI,KAAK,IAAI,CAAC;CACpD;AAkCD,eAAO,MAAM,kBAAkB,UAAW,uBAAuB,gBAkBhE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InvitationAuthenticator.d.ts","sourceRoot":"","sources":["../../../../../../src/panels/JoinPanel/view-states/InvitationAuthenticator.tsx"],"names":[],"mappings":"AAWA,OAAO,EAAa,cAAc,EAAE,MAAM,aAAa,CAAC;AAIxD,MAAM,WAAW,4BAA6B,SAAQ,cAAc;IAClE,cAAc,EAAE,OAAO,GAAG,MAAM,CAAC;IACjC,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;
|
|
1
|
+
{"version":3,"file":"InvitationAuthenticator.d.ts","sourceRoot":"","sources":["../../../../../../src/panels/JoinPanel/view-states/InvitationAuthenticator.tsx"],"names":[],"mappings":"AAWA,OAAO,EAAa,cAAc,EAAE,MAAM,aAAa,CAAC;AAIxD,MAAM,WAAW,4BAA6B,SAAQ,cAAc;IAClE,cAAc,EAAE,OAAO,GAAG,MAAM,CAAC;IACjC,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAuGD,eAAO,MAAM,uBAAuB,kDAIjC,4BAA4B,gBAgB9B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InvitationInput.d.ts","sourceRoot":"","sources":["../../../../../../src/panels/JoinPanel/view-states/InvitationInput.tsx"],"names":[],"mappings":"AAWA,OAAO,EAA+B,cAAc,EAAE,MAAM,aAAa,CAAC;AAE1E,MAAM,WAAW,oBAAqB,SAAQ,cAAc;IAC1D,cAAc,EAAE,OAAO,GAAG,MAAM,CAAC;CAClC;AAED,eAAO,MAAM,eAAe,0CAA2C,oBAAoB,
|
|
1
|
+
{"version":3,"file":"InvitationInput.d.ts","sourceRoot":"","sources":["../../../../../../src/panels/JoinPanel/view-states/InvitationInput.tsx"],"names":[],"mappings":"AAWA,OAAO,EAA+B,cAAc,EAAE,MAAM,aAAa,CAAC;AAE1E,MAAM,WAAW,oBAAqB,SAAQ,cAAc;IAC1D,cAAc,EAAE,OAAO,GAAG,MAAM,CAAC;CAClC;AAED,eAAO,MAAM,eAAe,0CAA2C,oBAAoB,gBAyD1F,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InvitationRescuer.d.ts","sourceRoot":"","sources":["../../../../../../src/panels/JoinPanel/view-states/InvitationRescuer.tsx"],"names":[],"mappings":"AAWA,OAAO,EAAa,cAAc,EAAE,MAAM,aAAa,CAAC;AAExD,MAAM,WAAW,wBAAyB,SAAQ,cAAc;IAC9D,cAAc,EAAE,OAAO,GAAG,MAAM,CAAC;CAClC;
|
|
1
|
+
{"version":3,"file":"InvitationRescuer.d.ts","sourceRoot":"","sources":["../../../../../../src/panels/JoinPanel/view-states/InvitationRescuer.tsx"],"names":[],"mappings":"AAWA,OAAO,EAAa,cAAc,EAAE,MAAM,aAAa,CAAC;AAExD,MAAM,WAAW,wBAAyB,SAAQ,cAAc;IAC9D,cAAc,EAAE,OAAO,GAAG,MAAM,CAAC;CAClC;AA4DD,eAAO,MAAM,iBAAiB,0CAA2C,wBAAwB,gBAsBhG,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { cloneElement } from 'react';
|
|
2
|
+
import { Space, SpaceMember } from '@dxos/client';
|
|
3
|
+
export declare type SpacePanelProps = {
|
|
4
|
+
titleId?: string;
|
|
5
|
+
space?: Space;
|
|
6
|
+
initialState?: SpaceView;
|
|
7
|
+
createInvitationUrl: (invitationCode: string) => string;
|
|
8
|
+
onClickJoinSpace?: () => void;
|
|
9
|
+
onClickMember?: (member: SpaceMember) => void;
|
|
10
|
+
doneActionParent?: Parameters<typeof cloneElement>[0];
|
|
11
|
+
onDone?: (result: Space | null) => void;
|
|
12
|
+
};
|
|
13
|
+
export declare type SpaceView = 'current space' | 'space list';
|
|
14
|
+
export declare type SpaceState = {
|
|
15
|
+
activeView: SpaceView;
|
|
16
|
+
};
|
|
17
|
+
export declare const SpacePanel: (props: SpacePanelProps) => JSX.Element;
|
|
18
|
+
//# sourceMappingURL=SpacePanel.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SpacePanel.d.ts","sourceRoot":"","sources":["../../../../../src/panels/SpacePanel/SpacePanel.tsx"],"names":[],"mappings":"AAKA,OAAc,EAAE,YAAY,EAAc,MAAM,OAAO,CAAC;AAExD,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAOlD,oBAAY,eAAe,GAAG;IAC5B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,KAAK,CAAC;IACd,YAAY,CAAC,EAAE,SAAS,CAAC;IACzB,mBAAmB,EAAE,CAAC,cAAc,EAAE,MAAM,KAAK,MAAM,CAAC;IACxD,gBAAgB,CAAC,EAAE,MAAM,IAAI,CAAC;IAC9B,aAAa,CAAC,EAAE,CAAC,MAAM,EAAE,WAAW,KAAK,IAAI,CAAC;IAC9C,gBAAgB,CAAC,EAAE,UAAU,CAAC,OAAO,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC;IACtD,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,KAAK,GAAG,IAAI,KAAK,IAAI,CAAC;CACzC,CAAC;AAEF,oBAAY,SAAS,GAAG,eAAe,GAAG,YAAY,CAAC;AAEvD,oBAAY,UAAU,GAAG;IACvB,UAAU,EAAE,SAAS,CAAC;CACvB,CAAC;AAoHF,eAAO,MAAM,UAAU,UAAW,eAAe,gBA4BhD,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { StoryContext, StoryFn } from '@storybook/react';
|
|
2
|
+
declare const _default: {
|
|
3
|
+
component: (props: import("./SpacePanel").SpacePanelProps) => JSX.Element;
|
|
4
|
+
};
|
|
5
|
+
export default _default;
|
|
6
|
+
export declare const Default: {
|
|
7
|
+
decorators: ((Story: StoryFn, { args }: StoryContext) => JSX.Element)[];
|
|
8
|
+
};
|
|
9
|
+
//# sourceMappingURL=SpacePanel.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SpacePanel.stories.d.ts","sourceRoot":"","sources":["../../../../../src/panels/SpacePanel/SpacePanel.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,YAAY,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;;;;AAUzD,wBAEE;AAkCF,eAAO,MAAM,OAAO;yBAhCW,OAAO,YAAY,YAAY;CAkC7D,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/panels/SpacePanel/index.ts"],"names":[],"mappings":"AAIA,cAAc,cAAc,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/panels/index.ts"],"names":[],"mappings":"AAIA,cAAc,iBAAiB,CAAC;AAChC,cAAc,aAAa,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/panels/index.ts"],"names":[],"mappings":"AAIA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export declare const defaultOverlay = "fixed inset-0 backdrop-blur z-50 overflow-auto grid place-items-center p-2 md:p-4 lg:p-8";
|
|
2
|
+
export declare const defaultDialogContent = "is-full min-is-[260px] max-is-[320px] rounded-md shadow-md backdrop-blur-md";
|
|
3
|
+
//# sourceMappingURL=dialogStyles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dialogStyles.d.ts","sourceRoot":"","sources":["../../../../src/styles/dialogStyles.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,cAAc,6FACiE,CAAC;AAE7F,eAAO,MAAM,oBAAoB,gFAAgF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/styles/index.ts"],"names":[],"mappings":"AAIA,cAAc,eAAe,CAAC;AAC9B,cAAc,0BAA0B,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/styles/index.ts"],"names":[],"mappings":"AAIA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,0BAA0B,CAAC"}
|
|
@@ -4,7 +4,9 @@ export declare const os: {
|
|
|
4
4
|
'sidebar label': string;
|
|
5
5
|
'copy invitation code label': string;
|
|
6
6
|
'open share panel label': string;
|
|
7
|
+
'joining heading': string;
|
|
7
8
|
'join space heading': string;
|
|
9
|
+
'halo heading': string;
|
|
8
10
|
'exit label': string;
|
|
9
11
|
'identity selector title': string;
|
|
10
12
|
'identity radio group title': string;
|
|
@@ -12,6 +14,7 @@ export declare const os: {
|
|
|
12
14
|
'continue label': string;
|
|
13
15
|
'back label': string;
|
|
14
16
|
'next label': string;
|
|
17
|
+
'close label': string;
|
|
15
18
|
'auth choices label': string;
|
|
16
19
|
'create identity label': string;
|
|
17
20
|
'create identity description': string;
|
|
@@ -41,7 +44,15 @@ export declare const os: {
|
|
|
41
44
|
'cancel label': string;
|
|
42
45
|
'done label': string;
|
|
43
46
|
'reset label': string;
|
|
44
|
-
'
|
|
47
|
+
'auth code input label': string;
|
|
45
48
|
'invitation input label': string;
|
|
49
|
+
'create space invitation label': string;
|
|
50
|
+
'qr label': string;
|
|
51
|
+
'empty invitations message': string;
|
|
52
|
+
'show all spaces label': string;
|
|
53
|
+
'all spaces label': string;
|
|
54
|
+
'create space label': string;
|
|
55
|
+
'join space label': string;
|
|
56
|
+
'show current space label': string;
|
|
46
57
|
};
|
|
47
58
|
//# sourceMappingURL=en-US.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"en-US.d.ts","sourceRoot":"","sources":["../../../../../src/translations/locales/en-US.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,EAAE
|
|
1
|
+
{"version":3,"file":"en-US.d.ts","sourceRoot":"","sources":["../../../../../src/translations/locales/en-US.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwDd,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dxos/react-ui",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.25-next.3c6b542",
|
|
4
4
|
"description": "A React component library for DXOS’s OS experiences",
|
|
5
5
|
"homepage": "https://dxos.org",
|
|
6
6
|
"bugs": "https://github.com/dxos/dxos/issues",
|
|
@@ -22,13 +22,14 @@
|
|
|
22
22
|
"debug": "^4.3.3",
|
|
23
23
|
"qrcode.react": "^3.1.0",
|
|
24
24
|
"url-join": "^5.0.0",
|
|
25
|
-
"@dxos/client": "0.1.
|
|
26
|
-
"@dxos/config": "0.1.
|
|
27
|
-
"@dxos/debug": "0.1.
|
|
28
|
-
"@dxos/keys": "0.1.
|
|
29
|
-
"@dxos/
|
|
30
|
-
"@dxos/react-
|
|
31
|
-
"@dxos/
|
|
25
|
+
"@dxos/client": "0.1.25-next.3c6b542",
|
|
26
|
+
"@dxos/config": "0.1.25-next.3c6b542",
|
|
27
|
+
"@dxos/debug": "0.1.25-next.3c6b542",
|
|
28
|
+
"@dxos/keys": "0.1.25-next.3c6b542",
|
|
29
|
+
"@dxos/protocols": "0.1.25-next.3c6b542",
|
|
30
|
+
"@dxos/react-client": "0.1.25-next.3c6b542",
|
|
31
|
+
"@dxos/react-components": "0.1.25-next.3c6b542",
|
|
32
|
+
"@dxos/util": "0.1.25-next.3c6b542"
|
|
32
33
|
},
|
|
33
34
|
"devDependencies": {
|
|
34
35
|
"@types/debug": "^4.1.7",
|
|
@@ -39,9 +40,9 @@
|
|
|
39
40
|
"react": "^18.2.0",
|
|
40
41
|
"react-dom": "^18.2.0",
|
|
41
42
|
"vite": "4.0.4",
|
|
42
|
-
"@dxos/async": "0.1.
|
|
43
|
-
"@dxos/log": "0.1.
|
|
44
|
-
"@dxos/react-async": "0.1.
|
|
43
|
+
"@dxos/async": "0.1.25-next.3c6b542",
|
|
44
|
+
"@dxos/log": "0.1.25-next.3c6b542",
|
|
45
|
+
"@dxos/react-async": "0.1.25-next.3c6b542"
|
|
45
46
|
},
|
|
46
47
|
"peerDependencies": {
|
|
47
48
|
"phosphor-react": "^1.4.1",
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2023 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import React from 'react';
|
|
6
|
+
|
|
7
|
+
import { DeviceInfo } from '@dxos/protocols/proto/dxos/halo/credentials/identity';
|
|
8
|
+
|
|
9
|
+
import { IdentityListItem } from './IdentityListItem';
|
|
10
|
+
|
|
11
|
+
export interface DeviceListProps {
|
|
12
|
+
devices: DeviceInfo[];
|
|
13
|
+
onSelect?: (device: DeviceInfo) => void;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export const DeviceList = ({ devices, onSelect }: DeviceListProps) => {
|
|
17
|
+
return (
|
|
18
|
+
<ul className='flex flex-col gap-2'>
|
|
19
|
+
{devices.map((device) => {
|
|
20
|
+
const identity = { identityKey: device.publicKey, displayName: device.displayName };
|
|
21
|
+
return (
|
|
22
|
+
<IdentityListItem
|
|
23
|
+
key={device.publicKey.toHex()}
|
|
24
|
+
identity={identity}
|
|
25
|
+
onClick={onSelect && (() => onSelect(device))}
|
|
26
|
+
/>
|
|
27
|
+
);
|
|
28
|
+
})}
|
|
29
|
+
</ul>
|
|
30
|
+
);
|
|
31
|
+
};
|
|
@@ -4,12 +4,24 @@
|
|
|
4
4
|
import React from 'react';
|
|
5
5
|
|
|
6
6
|
import { Profile, SpaceMember } from '@dxos/client';
|
|
7
|
-
import { Avatar, useTranslation } from '@dxos/react-components';
|
|
7
|
+
import { Avatar, mx, useTranslation } from '@dxos/react-components';
|
|
8
8
|
|
|
9
|
-
export const IdentityListItem = ({
|
|
9
|
+
export const IdentityListItem = ({
|
|
10
|
+
identity,
|
|
11
|
+
presence,
|
|
12
|
+
onClick
|
|
13
|
+
}: {
|
|
14
|
+
identity: Profile;
|
|
15
|
+
presence?: SpaceMember['presence'];
|
|
16
|
+
onClick?: () => void;
|
|
17
|
+
}) => {
|
|
10
18
|
const { t } = useTranslation('os');
|
|
11
19
|
return (
|
|
12
|
-
<li
|
|
20
|
+
<li
|
|
21
|
+
className={mx('flex gap-2 items-center', onClick && 'cursor-pointer')}
|
|
22
|
+
onClick={() => onClick?.()}
|
|
23
|
+
data-testid='identity-list-item'
|
|
24
|
+
>
|
|
13
25
|
<Avatar
|
|
14
26
|
{...{
|
|
15
27
|
variant: 'circle',
|
|
@@ -9,20 +9,22 @@ import type { SpaceMember } from '@dxos/client';
|
|
|
9
9
|
import { IdentityListItem } from './IdentityListItem';
|
|
10
10
|
|
|
11
11
|
export interface SpaceMemberListProps {
|
|
12
|
-
|
|
12
|
+
members: SpaceMember[];
|
|
13
|
+
onSelect?: (member: SpaceMember) => void;
|
|
13
14
|
}
|
|
14
15
|
|
|
15
|
-
export const SpaceMemberList = ({
|
|
16
|
+
export const SpaceMemberList = ({ members, onSelect }: SpaceMemberListProps) => {
|
|
16
17
|
return (
|
|
17
18
|
<ul className='flex flex-col gap-2'>
|
|
18
|
-
{
|
|
19
|
-
.filter((
|
|
20
|
-
.map((
|
|
19
|
+
{members
|
|
20
|
+
.filter((member) => member.profile)
|
|
21
|
+
.map((member) => {
|
|
21
22
|
return (
|
|
22
23
|
<IdentityListItem
|
|
23
|
-
key={
|
|
24
|
-
identity={
|
|
25
|
-
presence={
|
|
24
|
+
key={member.identityKey.toHex()}
|
|
25
|
+
identity={member.profile!}
|
|
26
|
+
presence={member.presence}
|
|
27
|
+
onClick={onSelect && (() => onSelect(member))}
|
|
26
28
|
/>
|
|
27
29
|
);
|
|
28
30
|
})}
|
|
@@ -4,24 +4,25 @@
|
|
|
4
4
|
import React, { useMemo } from 'react';
|
|
5
5
|
|
|
6
6
|
import { PublicKey } from '@dxos/keys';
|
|
7
|
-
import { useClient, useMembers } from '@dxos/react-client';
|
|
7
|
+
import { SpaceMember, useClient, useMembers } from '@dxos/react-client';
|
|
8
8
|
|
|
9
9
|
import { SpaceMemberList } from './SpaceMemberList';
|
|
10
10
|
|
|
11
11
|
export interface SpaceMemberListContainerProps {
|
|
12
12
|
spaceKey: PublicKey;
|
|
13
13
|
includeSelf?: boolean;
|
|
14
|
+
onSelect?: (member: SpaceMember) => void;
|
|
14
15
|
}
|
|
15
16
|
|
|
16
|
-
export const SpaceMemberListContainer = ({ spaceKey, includeSelf }: SpaceMemberListContainerProps) => {
|
|
17
|
+
export const SpaceMemberListContainer = ({ spaceKey, includeSelf, onSelect }: SpaceMemberListContainerProps) => {
|
|
17
18
|
const client = useClient();
|
|
18
19
|
const allUnsortedMembers = useMembers(spaceKey);
|
|
19
|
-
const
|
|
20
|
+
const members = useMemo(
|
|
20
21
|
() =>
|
|
21
22
|
includeSelf
|
|
22
23
|
? allUnsortedMembers.sort((a) => (a.identityKey.equals(client.halo.profile!.identityKey) ? -1 : 1))
|
|
23
24
|
: allUnsortedMembers.filter((member) => !member.identityKey.equals(client.halo.profile!.identityKey)),
|
|
24
25
|
[allUnsortedMembers]
|
|
25
26
|
);
|
|
26
|
-
return <SpaceMemberList
|
|
27
|
+
return <SpaceMemberList members={members} onSelect={onSelect} />;
|
|
27
28
|
};
|
|
@@ -5,6 +5,7 @@ import { Root as AccordionRoot } from '@radix-ui/react-accordion';
|
|
|
5
5
|
import React from 'react';
|
|
6
6
|
|
|
7
7
|
import type { CancellableInvitationObservable } from '@dxos/client';
|
|
8
|
+
import { defaultDescription, mx, useTranslation } from '@dxos/react-components';
|
|
8
9
|
|
|
9
10
|
import { InvitationListItem, InvitationListItemProps } from './InvitationListItem';
|
|
10
11
|
|
|
@@ -13,12 +14,15 @@ export interface InvitationListProps extends Omit<InvitationListItemProps, 'invi
|
|
|
13
14
|
}
|
|
14
15
|
|
|
15
16
|
export const InvitationList = ({ invitations, ...invitationProps }: InvitationListProps) => {
|
|
16
|
-
|
|
17
|
-
|
|
17
|
+
const { t } = useTranslation('os');
|
|
18
|
+
return invitations.length ? (
|
|
19
|
+
<AccordionRoot type='single' collapsible className='flex flex-col gap-1'>
|
|
18
20
|
{invitations.map((invitation, index) => {
|
|
19
21
|
const value = invitation.invitation?.invitationId ?? `inv_${index}`;
|
|
20
22
|
return <InvitationListItem key={value} value={value} invitation={invitation} {...invitationProps} />;
|
|
21
23
|
})}
|
|
22
24
|
</AccordionRoot>
|
|
25
|
+
) : (
|
|
26
|
+
<p className={mx(defaultDescription, 'text-center p-2')}>{t('empty invitations message')}</p>
|
|
23
27
|
);
|
|
24
28
|
};
|