@dxos/shell 0.4.10-main.b112538 → 0.4.10-main.c32f430
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/bundle/shell.mjs +4088 -4083
- package/dist/bundle/shell.mjs.map +1 -1
- package/dist/bundle/shell.umd.js +40 -40
- package/dist/bundle/shell.umd.js.map +1 -1
- package/dist/bundle/style.css +1 -1
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/react.mjs +22 -14
- package/dist/lib/browser/react.mjs.map +3 -3
- package/dist/types/src/composites/Shell/Shell.d.ts.map +1 -1
- package/dist/types/src/composites/Shell/Shell.js +1 -1
- package/dist/types/src/composites/Shell/Shell.js.map +1 -1
- package/dist/types/src/panels/IdentityPanel/steps/SignOutChooser.js +2 -2
- package/dist/types/src/panels/IdentityPanel/steps/SignOutChooser.js.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/JoinPanel.js +5 -4
- package/dist/types/src/panels/JoinPanel/JoinPanel.js.map +1 -1
- package/dist/types/src/panels/JoinPanel/JoinPanel.stories.d.ts +1 -1
- package/dist/types/src/panels/JoinPanel/JoinPanelProps.d.ts +2 -0
- package/dist/types/src/panels/JoinPanel/JoinPanelProps.d.ts.map +1 -1
- package/dist/types/src/panels/JoinPanel/steps/ResetIdentity.d.ts +4 -2
- package/dist/types/src/panels/JoinPanel/steps/ResetIdentity.d.ts.map +1 -1
- package/dist/types/src/panels/JoinPanel/steps/ResetIdentity.js +5 -4
- package/dist/types/src/panels/JoinPanel/steps/ResetIdentity.js.map +1 -1
- package/package.json +19 -19
- package/src/composites/Shell/Shell.tsx +1 -0
- package/src/panels/IdentityPanel/steps/SignOutChooser.tsx +2 -9
- package/src/panels/JoinPanel/JoinPanel.tsx +4 -0
- package/src/panels/JoinPanel/JoinPanelProps.ts +2 -0
- package/src/panels/JoinPanel/steps/ResetIdentity.tsx +15 -3
|
@@ -1375,15 +1375,13 @@ var SignOutChooserImpl = ({ disabled, onResetDevice, onJoinNewIdentity, onBack }
|
|
|
1375
1375
|
disabled,
|
|
1376
1376
|
onClick: onBack
|
|
1377
1377
|
}, t("back label")), /* @__PURE__ */ React27.createElement(Action, {
|
|
1378
|
-
variant: "
|
|
1378
|
+
variant: "destructive",
|
|
1379
1379
|
"data-testid": "sign-out.join-new-identity",
|
|
1380
|
-
classNames: "!bg-error-500 hover:!bg-error-550",
|
|
1381
1380
|
disabled,
|
|
1382
1381
|
onClick: onJoinNewIdentity
|
|
1383
1382
|
}, t("join new identity label")), /* @__PURE__ */ React27.createElement(Action, {
|
|
1384
|
-
variant: "
|
|
1383
|
+
variant: "destructive",
|
|
1385
1384
|
"data-testid": "sign-out.reset-device",
|
|
1386
|
-
classNames: "!bg-error-500 hover:!bg-error-550",
|
|
1387
1385
|
disabled,
|
|
1388
1386
|
onClick: onResetDevice
|
|
1389
1387
|
}, t("reset device label"))));
|
|
@@ -2828,7 +2826,7 @@ import { log as log9 } from "@dxos/log";
|
|
|
2828
2826
|
import { useClient as useClient5 } from "@dxos/react-client";
|
|
2829
2827
|
import { useTranslation as useTranslation24 } from "@dxos/react-ui";
|
|
2830
2828
|
var __dxlog_file9 = "/home/runner/work/dxos/dxos/packages/sdk/shell/src/panels/JoinPanel/steps/ResetIdentity.tsx";
|
|
2831
|
-
var ResetIdentity = ({ send, active }) => {
|
|
2829
|
+
var ResetIdentity = ({ send, active, onCancelResetIdentity }) => {
|
|
2832
2830
|
const client = useClient5();
|
|
2833
2831
|
const { t } = useTranslation24("os");
|
|
2834
2832
|
const [validationMessage, setValidationMessage] = useState9("");
|
|
@@ -2840,7 +2838,7 @@ var ResetIdentity = ({ send, active }) => {
|
|
|
2840
2838
|
}), (error) => {
|
|
2841
2839
|
log9.catch(error, void 0, {
|
|
2842
2840
|
F: __dxlog_file9,
|
|
2843
|
-
L:
|
|
2841
|
+
L: 37,
|
|
2844
2842
|
S: void 0,
|
|
2845
2843
|
C: (f, a) => f(...a)
|
|
2846
2844
|
});
|
|
@@ -2852,10 +2850,11 @@ var ResetIdentity = ({ send, active }) => {
|
|
|
2852
2850
|
disabled: !active,
|
|
2853
2851
|
pending,
|
|
2854
2852
|
validationMessage,
|
|
2855
|
-
onConfirm: () => resetIdentity()
|
|
2853
|
+
onConfirm: () => resetIdentity(),
|
|
2854
|
+
onCancelResetIdentity
|
|
2856
2855
|
});
|
|
2857
2856
|
};
|
|
2858
|
-
var ResetIdentityImpl = ({ disabled, pending, validationMessage, onConfirm }) => {
|
|
2857
|
+
var ResetIdentityImpl = ({ disabled, pending, validationMessage, onConfirm, onCancelResetIdentity }) => {
|
|
2859
2858
|
const { t } = useTranslation24("os");
|
|
2860
2859
|
const confirmationValue = t("confirmation value");
|
|
2861
2860
|
const [inputValue, setInputValue] = useState9("");
|
|
@@ -2872,8 +2871,12 @@ var ResetIdentityImpl = ({ disabled, pending, validationMessage, onConfirm }) =>
|
|
|
2872
2871
|
placeholder: confirmationValue,
|
|
2873
2872
|
onChange: ({ target: { value } }) => setInputValue(value)
|
|
2874
2873
|
})), /* @__PURE__ */ React38.createElement(Actions, null, /* @__PURE__ */ React38.createElement(Action, {
|
|
2874
|
+
disabled,
|
|
2875
|
+
onClick: () => onCancelResetIdentity?.(),
|
|
2876
|
+
"data-testid": "reset-identity-input-cancel"
|
|
2877
|
+
}, t("cancel label")), /* @__PURE__ */ React38.createElement(Action, {
|
|
2875
2878
|
// TODO(wittjosiah): Probably make this red?
|
|
2876
|
-
variant: "
|
|
2879
|
+
variant: "destructive",
|
|
2877
2880
|
disabled: disabled || pending || inputValue !== confirmationValue,
|
|
2878
2881
|
onClick: () => onConfirm?.(),
|
|
2879
2882
|
"data-testid": "reset-identity-input-confirm"
|
|
@@ -2907,7 +2910,7 @@ var resolvedTextColor = (status) => status === Invitation7.State.ERROR ? errorTe
|
|
|
2907
2910
|
// packages/sdk/shell/src/panels/JoinPanel/JoinPanel.tsx
|
|
2908
2911
|
var __dxlog_file10 = "/home/runner/work/dxos/dxos/packages/sdk/shell/src/panels/JoinPanel/JoinPanel.tsx";
|
|
2909
2912
|
var JoinPanelImpl = (props) => {
|
|
2910
|
-
const { titleId, send, activeView, failed, mode, unredeemedCodes, invitationStates, succeededKeys, failReasons, onExit, onHaloDone, onSpaceDone, exitActionParent, doneActionParent, onHaloInvitationCancel, onSpaceInvitationCancel, onHaloInvitationAuthenticate, onSpaceInvitationAuthenticate, IdentityInput: IdentityInputComponent = IdentityInput, ResetIdentity: ResetIdentityComponent = ResetIdentity } = props;
|
|
2913
|
+
const { titleId, send, activeView, failed, mode, unredeemedCodes, invitationStates, succeededKeys, failReasons, onExit, onHaloDone, onSpaceDone, exitActionParent, doneActionParent, onHaloInvitationCancel, onSpaceInvitationCancel, onHaloInvitationAuthenticate, onSpaceInvitationAuthenticate, onCancelResetIdentity, IdentityInput: IdentityInputComponent = IdentityInput, ResetIdentity: ResetIdentityComponent = ResetIdentity } = props;
|
|
2911
2914
|
return /* @__PURE__ */ React39.createElement(DensityProvider3, {
|
|
2912
2915
|
density: "fine"
|
|
2913
2916
|
}, mode !== "halo-only" && /* @__PURE__ */ React39.createElement(JoinHeading, {
|
|
@@ -2930,7 +2933,8 @@ var JoinPanelImpl = (props) => {
|
|
|
2930
2933
|
}, /* @__PURE__ */ React39.createElement(ResetIdentityComponent, {
|
|
2931
2934
|
send,
|
|
2932
2935
|
method: "reset identity",
|
|
2933
|
-
active: activeView === "reset identity confirmation"
|
|
2936
|
+
active: activeView === "reset identity confirmation",
|
|
2937
|
+
onCancelResetIdentity
|
|
2934
2938
|
})), /* @__PURE__ */ React39.createElement(Viewport.View, {
|
|
2935
2939
|
classNames: stepStyles,
|
|
2936
2940
|
id: "create identity input"
|
|
@@ -3046,7 +3050,7 @@ var JoinPanelImpl = (props) => {
|
|
|
3046
3050
|
onDone: onSpaceDone
|
|
3047
3051
|
})))));
|
|
3048
3052
|
};
|
|
3049
|
-
var JoinPanel = ({ titleId: propsTitleId, mode = "default", initialInvitationCode, exitActionParent, onExit, doneActionParent, onDone: propsOnDone }) => {
|
|
3053
|
+
var JoinPanel = ({ titleId: propsTitleId, mode = "default", initialInvitationCode, exitActionParent, onExit, doneActionParent, onDone: propsOnDone, onCancelResetIdentity }) => {
|
|
3050
3054
|
const client = useClient6();
|
|
3051
3055
|
const identity = useIdentity2();
|
|
3052
3056
|
const { hasIosKeyboard } = useThemeContext4();
|
|
@@ -3066,7 +3070,7 @@ var JoinPanel = ({ titleId: propsTitleId, mode = "default", initialInvitationCod
|
|
|
3066
3070
|
const subscription = joinService.subscribe((state) => {
|
|
3067
3071
|
log10("[state]", state, {
|
|
3068
3072
|
F: __dxlog_file10,
|
|
3069
|
-
L:
|
|
3073
|
+
L: 201,
|
|
3070
3074
|
S: void 0,
|
|
3071
3075
|
C: (f, a) => f(...a)
|
|
3072
3076
|
});
|
|
@@ -3311,7 +3315,8 @@ var JoinPanel = ({ titleId: propsTitleId, mode = "default", initialInvitationCod
|
|
|
3311
3315
|
type: "authenticateSpaceVerificationCode"
|
|
3312
3316
|
});
|
|
3313
3317
|
return joinState.context.space.invitationObservable?.authenticate(authCode);
|
|
3314
|
-
}
|
|
3318
|
+
},
|
|
3319
|
+
onCancelResetIdentity
|
|
3315
3320
|
});
|
|
3316
3321
|
};
|
|
3317
3322
|
|
|
@@ -3737,6 +3742,9 @@ var Shell = ({ runtime, origin }) => {
|
|
|
3737
3742
|
return /* @__PURE__ */ React45.createElement(JoinDialog, {
|
|
3738
3743
|
mode: "halo-only",
|
|
3739
3744
|
initialInvitationCode: invitationCode,
|
|
3745
|
+
onCancelResetIdentity: () => runtime.setLayout({
|
|
3746
|
+
layout: ShellLayout.IDENTITY
|
|
3747
|
+
}),
|
|
3740
3748
|
onDone: () => {
|
|
3741
3749
|
void runtime.setAppContext({
|
|
3742
3750
|
display: ShellDisplay.NONE
|