@xnetjs/react 0.0.3 → 0.1.0
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.
|
@@ -3291,12 +3291,8 @@ function DemoBanner({ evictionHours, onDismiss }) {
|
|
|
3291
3291
|
}
|
|
3292
3292
|
|
|
3293
3293
|
// src/components/DemoQuotaIndicator.tsx
|
|
3294
|
+
import { formatBytes } from "@xnetjs/core";
|
|
3294
3295
|
import { jsx as jsx4, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
3295
|
-
function formatBytes(bytes) {
|
|
3296
|
-
if (bytes < 1024) return `${bytes} B`;
|
|
3297
|
-
if (bytes < 1024 * 1024) return `${(bytes / 1024).toFixed(1)} KB`;
|
|
3298
|
-
return `${(bytes / (1024 * 1024)).toFixed(1)} MB`;
|
|
3299
|
-
}
|
|
3300
3296
|
function DemoQuotaIndicator({ usedBytes, limitBytes }) {
|
|
3301
3297
|
const percentage = Math.round(usedBytes / limitBytes * 100);
|
|
3302
3298
|
const isWarning = percentage >= 80;
|
|
@@ -3381,9 +3377,18 @@ var TRANSITIONS = {
|
|
|
3381
3377
|
welcome: {
|
|
3382
3378
|
AUTHENTICATE: "authenticating",
|
|
3383
3379
|
CREATE_NEW: "authenticating",
|
|
3380
|
+
CREATE_RECOVERABLE: "creating-recoverable",
|
|
3384
3381
|
IMPORT_EXISTING: "import-identity",
|
|
3385
3382
|
BROWSER_UNSUPPORTED: "unsupported-browser"
|
|
3386
3383
|
},
|
|
3384
|
+
"creating-recoverable": {
|
|
3385
|
+
RECOVERABLE_CREATED: "show-recovery-phrase",
|
|
3386
|
+
PASSKEY_FAILED: "auth-error",
|
|
3387
|
+
BACK_TO_WELCOME: "welcome"
|
|
3388
|
+
},
|
|
3389
|
+
"show-recovery-phrase": {
|
|
3390
|
+
PHRASE_SAVED: "connecting-hub"
|
|
3391
|
+
},
|
|
3387
3392
|
authenticating: {
|
|
3388
3393
|
PASSKEY_SUCCESS: "connecting-hub",
|
|
3389
3394
|
PASSKEY_FAILED: "auth-error"
|
|
@@ -3395,6 +3400,13 @@ var TRANSITIONS = {
|
|
|
3395
3400
|
"import-identity": {
|
|
3396
3401
|
SCAN_QR: "qr-scan",
|
|
3397
3402
|
ENTER_PHRASE: "recovery-phrase",
|
|
3403
|
+
ENTER_GUARDIAN_SHARES: "guardian-recovery",
|
|
3404
|
+
USE_SYNCED_PASSKEY: "authenticating",
|
|
3405
|
+
BACK_TO_WELCOME: "welcome"
|
|
3406
|
+
},
|
|
3407
|
+
"guardian-recovery": {
|
|
3408
|
+
IDENTITY_IMPORTED: "connecting-hub",
|
|
3409
|
+
IMPORT_FAILED: "guardian-recovery",
|
|
3398
3410
|
BACK_TO_WELCOME: "welcome"
|
|
3399
3411
|
},
|
|
3400
3412
|
"qr-scan": {
|
|
@@ -3403,6 +3415,7 @@ var TRANSITIONS = {
|
|
|
3403
3415
|
},
|
|
3404
3416
|
"recovery-phrase": {
|
|
3405
3417
|
IDENTITY_IMPORTED: "connecting-hub",
|
|
3418
|
+
IMPORT_FAILED: "recovery-phrase",
|
|
3406
3419
|
BACK_TO_WELCOME: "welcome"
|
|
3407
3420
|
},
|
|
3408
3421
|
"connecting-hub": {
|
|
@@ -3436,6 +3449,18 @@ function onboardingReducer(current, event) {
|
|
|
3436
3449
|
nextContext.keyBundle = event.keyBundle;
|
|
3437
3450
|
nextContext.error = null;
|
|
3438
3451
|
break;
|
|
3452
|
+
case "RECOVERABLE_CREATED":
|
|
3453
|
+
nextContext.identity = event.identity;
|
|
3454
|
+
nextContext.keyBundle = event.keyBundle;
|
|
3455
|
+
nextContext.recoveryPhrase = event.phrase;
|
|
3456
|
+
nextContext.error = null;
|
|
3457
|
+
break;
|
|
3458
|
+
case "IMPORT_FAILED":
|
|
3459
|
+
nextContext.error = event.error;
|
|
3460
|
+
break;
|
|
3461
|
+
case "CREATE_RECOVERABLE":
|
|
3462
|
+
nextContext.error = null;
|
|
3463
|
+
break;
|
|
3439
3464
|
case "HUB_FAILED":
|
|
3440
3465
|
nextContext.error = event.error;
|
|
3441
3466
|
break;
|
|
@@ -3458,13 +3483,19 @@ function createInitialState(hubUrl) {
|
|
|
3458
3483
|
keyBundle: null,
|
|
3459
3484
|
hubUrl: hubUrl ?? null,
|
|
3460
3485
|
error: null,
|
|
3461
|
-
isDemo: false
|
|
3486
|
+
isDemo: false,
|
|
3487
|
+
recoveryPhrase: null
|
|
3462
3488
|
}
|
|
3463
3489
|
};
|
|
3464
3490
|
}
|
|
3465
3491
|
|
|
3466
3492
|
// src/onboarding/OnboardingProvider.tsx
|
|
3467
|
-
import {
|
|
3493
|
+
import {
|
|
3494
|
+
detectPasskeySupport,
|
|
3495
|
+
createIdentityManager,
|
|
3496
|
+
isTestBypassEnabled,
|
|
3497
|
+
parseShare
|
|
3498
|
+
} from "@xnetjs/identity";
|
|
3468
3499
|
import {
|
|
3469
3500
|
createContext,
|
|
3470
3501
|
useContext as useContext7,
|
|
@@ -3529,6 +3560,81 @@ function OnboardingProvider({
|
|
|
3529
3560
|
authInFlight.current = false;
|
|
3530
3561
|
});
|
|
3531
3562
|
}
|
|
3563
|
+
if (event.type === "CREATE_RECOVERABLE" && state === "welcome") {
|
|
3564
|
+
if (authInFlight.current) return;
|
|
3565
|
+
authInFlight.current = true;
|
|
3566
|
+
manager.createRecoverable().then(({ keyBundle, phrase }) => {
|
|
3567
|
+
dispatch({
|
|
3568
|
+
type: "RECOVERABLE_CREATED",
|
|
3569
|
+
identity: keyBundle.identity,
|
|
3570
|
+
keyBundle,
|
|
3571
|
+
phrase
|
|
3572
|
+
});
|
|
3573
|
+
}).catch((err) => {
|
|
3574
|
+
dispatch({
|
|
3575
|
+
type: "PASSKEY_FAILED",
|
|
3576
|
+
error: err instanceof Error ? err : new Error(String(err))
|
|
3577
|
+
});
|
|
3578
|
+
}).finally(() => {
|
|
3579
|
+
authInFlight.current = false;
|
|
3580
|
+
});
|
|
3581
|
+
}
|
|
3582
|
+
if (event.type === "USE_SYNCED_PASSKEY" && state === "import-identity") {
|
|
3583
|
+
if (authInFlight.current) return;
|
|
3584
|
+
authInFlight.current = true;
|
|
3585
|
+
manager.recoverViaSyncedPasskey().then((keyBundle) => {
|
|
3586
|
+
if (keyBundle) {
|
|
3587
|
+
dispatch({ type: "PASSKEY_SUCCESS", identity: keyBundle.identity, keyBundle });
|
|
3588
|
+
} else {
|
|
3589
|
+
dispatch({
|
|
3590
|
+
type: "PASSKEY_FAILED",
|
|
3591
|
+
error: new Error("No synced passkey found on this device")
|
|
3592
|
+
});
|
|
3593
|
+
}
|
|
3594
|
+
}).catch((err) => {
|
|
3595
|
+
dispatch({
|
|
3596
|
+
type: "PASSKEY_FAILED",
|
|
3597
|
+
error: err instanceof Error ? err : new Error(String(err))
|
|
3598
|
+
});
|
|
3599
|
+
}).finally(() => {
|
|
3600
|
+
authInFlight.current = false;
|
|
3601
|
+
});
|
|
3602
|
+
}
|
|
3603
|
+
if (event.type === "SUBMIT_GUARDIAN_SHARES" && state === "guardian-recovery") {
|
|
3604
|
+
if (authInFlight.current) return;
|
|
3605
|
+
authInFlight.current = true;
|
|
3606
|
+
Promise.resolve().then(() => {
|
|
3607
|
+
const shares = event.codes.map((code) => parseShare(code));
|
|
3608
|
+
return manager.recoverFromGuardianShares(shares);
|
|
3609
|
+
}).then(({ keyBundle }) => {
|
|
3610
|
+
dispatch({ type: "IDENTITY_IMPORTED", identity: keyBundle.identity, keyBundle });
|
|
3611
|
+
}).catch((err) => {
|
|
3612
|
+
dispatch({
|
|
3613
|
+
type: "IMPORT_FAILED",
|
|
3614
|
+
error: err instanceof Error ? err : new Error(String(err))
|
|
3615
|
+
});
|
|
3616
|
+
}).finally(() => {
|
|
3617
|
+
authInFlight.current = false;
|
|
3618
|
+
});
|
|
3619
|
+
}
|
|
3620
|
+
if (event.type === "SUBMIT_PHRASE" && state === "recovery-phrase") {
|
|
3621
|
+
if (authInFlight.current) return;
|
|
3622
|
+
authInFlight.current = true;
|
|
3623
|
+
manager.importRecoveryPhrase(event.phrase).then(({ keyBundle }) => {
|
|
3624
|
+
dispatch({
|
|
3625
|
+
type: "IDENTITY_IMPORTED",
|
|
3626
|
+
identity: keyBundle.identity,
|
|
3627
|
+
keyBundle
|
|
3628
|
+
});
|
|
3629
|
+
}).catch((err) => {
|
|
3630
|
+
dispatch({
|
|
3631
|
+
type: "IMPORT_FAILED",
|
|
3632
|
+
error: err instanceof Error ? err : new Error(String(err))
|
|
3633
|
+
});
|
|
3634
|
+
}).finally(() => {
|
|
3635
|
+
authInFlight.current = false;
|
|
3636
|
+
});
|
|
3637
|
+
}
|
|
3532
3638
|
dispatch(event);
|
|
3533
3639
|
},
|
|
3534
3640
|
[state, manager]
|
|
@@ -3664,6 +3770,14 @@ function ImportIdentityScreen() {
|
|
|
3664
3770
|
"button",
|
|
3665
3771
|
{
|
|
3666
3772
|
className: "px-6 py-3 bg-primary text-primary-foreground rounded-lg font-medium hover:bg-primary/90 transition-colors mb-3 w-64",
|
|
3773
|
+
onClick: () => send({ type: "USE_SYNCED_PASSKEY" }),
|
|
3774
|
+
children: "Use a synced passkey"
|
|
3775
|
+
}
|
|
3776
|
+
),
|
|
3777
|
+
/* @__PURE__ */ jsx10(
|
|
3778
|
+
"button",
|
|
3779
|
+
{
|
|
3780
|
+
className: "text-sm text-muted-foreground hover:text-foreground transition-colors mb-2",
|
|
3667
3781
|
onClick: () => send({ type: "SCAN_QR" }),
|
|
3668
3782
|
children: "Scan from another device"
|
|
3669
3783
|
}
|
|
@@ -3671,11 +3785,19 @@ function ImportIdentityScreen() {
|
|
|
3671
3785
|
/* @__PURE__ */ jsx10(
|
|
3672
3786
|
"button",
|
|
3673
3787
|
{
|
|
3674
|
-
className: "text-sm text-muted-foreground hover:text-foreground transition-colors mb-
|
|
3788
|
+
className: "text-sm text-muted-foreground hover:text-foreground transition-colors mb-2",
|
|
3675
3789
|
onClick: () => send({ type: "ENTER_PHRASE" }),
|
|
3676
3790
|
children: "Enter recovery phrase"
|
|
3677
3791
|
}
|
|
3678
3792
|
),
|
|
3793
|
+
/* @__PURE__ */ jsx10(
|
|
3794
|
+
"button",
|
|
3795
|
+
{
|
|
3796
|
+
className: "text-sm text-muted-foreground hover:text-foreground transition-colors mb-6",
|
|
3797
|
+
onClick: () => send({ type: "ENTER_GUARDIAN_SHARES" }),
|
|
3798
|
+
children: "Recover with guardian shares"
|
|
3799
|
+
}
|
|
3800
|
+
),
|
|
3679
3801
|
/* @__PURE__ */ jsx10(
|
|
3680
3802
|
"button",
|
|
3681
3803
|
{
|
|
@@ -3818,7 +3940,15 @@ function WelcomeScreen() {
|
|
|
3818
3940
|
] })
|
|
3819
3941
|
}
|
|
3820
3942
|
),
|
|
3821
|
-
/* @__PURE__ */ jsx13("p", { className: "text-xs text-muted-foreground/70 text-center max-w-xs mt-2 mb-
|
|
3943
|
+
/* @__PURE__ */ jsx13("p", { className: "text-xs text-muted-foreground/70 text-center max-w-xs mt-2 mb-6", children: "Creates a secure passkey on your device. No passwords needed." }),
|
|
3944
|
+
/* @__PURE__ */ jsx13(
|
|
3945
|
+
"button",
|
|
3946
|
+
{
|
|
3947
|
+
className: "text-sm text-muted-foreground hover:text-foreground transition-colors underline-offset-4 hover:underline mb-2",
|
|
3948
|
+
onClick: () => send({ type: "CREATE_RECOVERABLE" }),
|
|
3949
|
+
children: "Set up a recovery phrase too"
|
|
3950
|
+
}
|
|
3951
|
+
),
|
|
3822
3952
|
/* @__PURE__ */ jsx13(
|
|
3823
3953
|
"button",
|
|
3824
3954
|
{
|
|
@@ -3830,50 +3960,240 @@ function WelcomeScreen() {
|
|
|
3830
3960
|
] });
|
|
3831
3961
|
}
|
|
3832
3962
|
|
|
3963
|
+
// src/onboarding/screens/GuardianRecoveryScreen.tsx
|
|
3964
|
+
import { parseShare as parseShare2 } from "@xnetjs/identity";
|
|
3965
|
+
import { useMemo as useMemo15, useState as useState24 } from "react";
|
|
3966
|
+
import { jsx as jsx14, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
3967
|
+
function GuardianRecoveryScreen() {
|
|
3968
|
+
const { send, context } = useOnboarding();
|
|
3969
|
+
const [text, setText] = useState24("");
|
|
3970
|
+
const { validCodes, invalidCount, threshold } = useMemo15(() => {
|
|
3971
|
+
const lines = text.split(/\r?\n/).map((line) => line.trim()).filter((line) => line.length > 0);
|
|
3972
|
+
const valid = [];
|
|
3973
|
+
let invalid = 0;
|
|
3974
|
+
let need = null;
|
|
3975
|
+
for (const line of lines) {
|
|
3976
|
+
try {
|
|
3977
|
+
const share = parseShare2(line);
|
|
3978
|
+
valid.push(line);
|
|
3979
|
+
need ??= share.threshold;
|
|
3980
|
+
} catch {
|
|
3981
|
+
invalid += 1;
|
|
3982
|
+
}
|
|
3983
|
+
}
|
|
3984
|
+
return { validCodes: valid, invalidCount: invalid, threshold: need };
|
|
3985
|
+
}, [text]);
|
|
3986
|
+
const canRecover = threshold !== null && validCodes.length >= threshold;
|
|
3987
|
+
const hint = (() => {
|
|
3988
|
+
if (context.error) return context.error.message;
|
|
3989
|
+
if (text.trim().length === 0) return "Paste one share code per line";
|
|
3990
|
+
if (invalidCount > 0)
|
|
3991
|
+
return `${invalidCount} code${invalidCount === 1 ? "" : "s"} not recognized`;
|
|
3992
|
+
if (threshold !== null) return `${validCodes.length} of ${threshold} needed`;
|
|
3993
|
+
return `${validCodes.length} share${validCodes.length === 1 ? "" : "s"} pasted`;
|
|
3994
|
+
})();
|
|
3995
|
+
return /* @__PURE__ */ jsxs12("div", { className: "flex min-h-screen flex-col items-center justify-center bg-background p-6 text-foreground", children: [
|
|
3996
|
+
/* @__PURE__ */ jsx14("h1", { className: "mb-2 text-2xl font-semibold", children: "Recover with your guardians" }),
|
|
3997
|
+
/* @__PURE__ */ jsx14("p", { className: "mb-6 max-w-md text-center text-muted-foreground", children: "Paste the share codes your guardians gave you \u2014 one per line. You need enough of them to restore your identity; we\u2019ll tell you when you have enough." }),
|
|
3998
|
+
/* @__PURE__ */ jsx14(
|
|
3999
|
+
"textarea",
|
|
4000
|
+
{
|
|
4001
|
+
autoFocus: true,
|
|
4002
|
+
spellCheck: false,
|
|
4003
|
+
autoCapitalize: "none",
|
|
4004
|
+
autoCorrect: "off",
|
|
4005
|
+
value: text,
|
|
4006
|
+
onChange: (e) => setText(e.target.value),
|
|
4007
|
+
placeholder: "xnet-share:\u2026\nxnet-share:\u2026",
|
|
4008
|
+
rows: 5,
|
|
4009
|
+
className: "mb-2 w-80 max-w-full resize-none rounded-lg border border-border bg-muted/30 p-3 font-mono text-xs outline-none focus:border-primary"
|
|
4010
|
+
}
|
|
4011
|
+
),
|
|
4012
|
+
/* @__PURE__ */ jsx14("div", { className: "mb-4 h-5 text-xs", children: /* @__PURE__ */ jsx14(
|
|
4013
|
+
"span",
|
|
4014
|
+
{
|
|
4015
|
+
className: context.error || invalidCount > 0 ? "text-destructive" : "text-muted-foreground",
|
|
4016
|
+
children: hint
|
|
4017
|
+
}
|
|
4018
|
+
) }),
|
|
4019
|
+
/* @__PURE__ */ jsx14(
|
|
4020
|
+
"button",
|
|
4021
|
+
{
|
|
4022
|
+
disabled: !canRecover,
|
|
4023
|
+
className: "mb-3 w-64 rounded-lg bg-primary px-6 py-3 font-medium text-primary-foreground transition-colors hover:bg-primary/90 disabled:cursor-not-allowed disabled:opacity-50",
|
|
4024
|
+
onClick: () => canRecover && send({ type: "SUBMIT_GUARDIAN_SHARES", codes: validCodes }),
|
|
4025
|
+
children: "Recover my identity"
|
|
4026
|
+
}
|
|
4027
|
+
),
|
|
4028
|
+
/* @__PURE__ */ jsx14(
|
|
4029
|
+
"button",
|
|
4030
|
+
{
|
|
4031
|
+
className: "text-sm text-muted-foreground transition-colors hover:text-foreground",
|
|
4032
|
+
onClick: () => send({ type: "BACK_TO_WELCOME" }),
|
|
4033
|
+
children: "Back"
|
|
4034
|
+
}
|
|
4035
|
+
)
|
|
4036
|
+
] });
|
|
4037
|
+
}
|
|
4038
|
+
|
|
4039
|
+
// src/onboarding/screens/RecoveryPhraseScreen.tsx
|
|
4040
|
+
import { validateRecoveryPhrase } from "@xnetjs/identity";
|
|
4041
|
+
import { useMemo as useMemo16, useState as useState25 } from "react";
|
|
4042
|
+
import { jsx as jsx15, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
4043
|
+
function RecoveryPhraseScreen() {
|
|
4044
|
+
const { send, context } = useOnboarding();
|
|
4045
|
+
const [phrase, setPhrase] = useState25("");
|
|
4046
|
+
const validation = useMemo16(() => validateRecoveryPhrase(phrase), [phrase]);
|
|
4047
|
+
const empty = phrase.trim().length === 0;
|
|
4048
|
+
const hint = (() => {
|
|
4049
|
+
if (empty || validation.ok) return null;
|
|
4050
|
+
if (validation.reason === "too-short") {
|
|
4051
|
+
return `Enter your full phrase (at least 12 words) \u2014 ${validation.wordCount} so far.`;
|
|
4052
|
+
}
|
|
4053
|
+
return `Not in the wordlist: ${validation.unknownWords.join(", ")}`;
|
|
4054
|
+
})();
|
|
4055
|
+
return /* @__PURE__ */ jsxs13("div", { className: "flex min-h-screen flex-col items-center justify-center bg-background p-6 text-foreground", children: [
|
|
4056
|
+
/* @__PURE__ */ jsx15("h1", { className: "mb-2 text-2xl font-semibold", children: "Enter your recovery phrase" }),
|
|
4057
|
+
/* @__PURE__ */ jsx15("p", { className: "mb-6 max-w-md text-center text-muted-foreground", children: "Type the recovery phrase you saved. It restores the same identity and your encrypted data on this device." }),
|
|
4058
|
+
/* @__PURE__ */ jsx15(
|
|
4059
|
+
"textarea",
|
|
4060
|
+
{
|
|
4061
|
+
autoFocus: true,
|
|
4062
|
+
spellCheck: false,
|
|
4063
|
+
autoCapitalize: "none",
|
|
4064
|
+
autoCorrect: "off",
|
|
4065
|
+
value: phrase,
|
|
4066
|
+
onChange: (e) => setPhrase(e.target.value),
|
|
4067
|
+
placeholder: "amber anchor apple \u2026",
|
|
4068
|
+
rows: 3,
|
|
4069
|
+
className: "mb-2 w-80 max-w-full resize-none rounded-lg border border-border bg-muted/30 p-3 font-mono text-sm outline-none focus:border-primary"
|
|
4070
|
+
}
|
|
4071
|
+
),
|
|
4072
|
+
/* @__PURE__ */ jsxs13("div", { className: "mb-4 h-5 text-xs", children: [
|
|
4073
|
+
hint && /* @__PURE__ */ jsx15("span", { className: "text-destructive", children: hint }),
|
|
4074
|
+
context.error && !hint && /* @__PURE__ */ jsx15("span", { className: "text-destructive", children: context.error.message })
|
|
4075
|
+
] }),
|
|
4076
|
+
/* @__PURE__ */ jsx15(
|
|
4077
|
+
"button",
|
|
4078
|
+
{
|
|
4079
|
+
disabled: !validation.ok,
|
|
4080
|
+
className: "mb-3 w-64 rounded-lg bg-primary px-6 py-3 font-medium text-primary-foreground transition-colors hover:bg-primary/90 disabled:cursor-not-allowed disabled:opacity-50",
|
|
4081
|
+
onClick: () => validation.ok && send({ type: "SUBMIT_PHRASE", phrase }),
|
|
4082
|
+
children: "Recover my identity"
|
|
4083
|
+
}
|
|
4084
|
+
),
|
|
4085
|
+
/* @__PURE__ */ jsx15(
|
|
4086
|
+
"button",
|
|
4087
|
+
{
|
|
4088
|
+
className: "text-sm text-muted-foreground transition-colors hover:text-foreground",
|
|
4089
|
+
onClick: () => send({ type: "BACK_TO_WELCOME" }),
|
|
4090
|
+
children: "Back"
|
|
4091
|
+
}
|
|
4092
|
+
)
|
|
4093
|
+
] });
|
|
4094
|
+
}
|
|
4095
|
+
|
|
4096
|
+
// src/onboarding/screens/ShowRecoveryPhraseScreen.tsx
|
|
4097
|
+
import { useState as useState26 } from "react";
|
|
4098
|
+
import { jsx as jsx16, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
4099
|
+
function ShowRecoveryPhraseScreen() {
|
|
4100
|
+
const { send, context } = useOnboarding();
|
|
4101
|
+
const [saved, setSaved] = useState26(false);
|
|
4102
|
+
const [copied, setCopied] = useState26(false);
|
|
4103
|
+
const phrase = context.recoveryPhrase ?? "";
|
|
4104
|
+
const words = phrase.split(" ").filter(Boolean);
|
|
4105
|
+
const copy = () => {
|
|
4106
|
+
void navigator.clipboard?.writeText(phrase).then(
|
|
4107
|
+
() => setCopied(true),
|
|
4108
|
+
() => setCopied(false)
|
|
4109
|
+
);
|
|
4110
|
+
};
|
|
4111
|
+
return /* @__PURE__ */ jsxs14("div", { className: "flex min-h-screen flex-col items-center justify-center bg-background p-6 text-foreground", children: [
|
|
4112
|
+
/* @__PURE__ */ jsx16("h1", { className: "mb-2 text-2xl font-semibold", children: "Save your recovery phrase" }),
|
|
4113
|
+
/* @__PURE__ */ jsx16("p", { className: "mb-6 max-w-md text-center text-muted-foreground", children: "Write these words down and keep them somewhere safe. They are the only way to recover your workspace if you lose your passkey \u2014 we can\u2019t recover them for you." }),
|
|
4114
|
+
/* @__PURE__ */ jsx16("ol", { className: "mb-3 grid w-80 max-w-full grid-cols-2 gap-x-6 gap-y-1 rounded-lg border border-border bg-muted/30 p-4 font-mono text-sm", children: words.map((word, i) => /* @__PURE__ */ jsxs14("li", { className: "flex gap-2", children: [
|
|
4115
|
+
/* @__PURE__ */ jsx16("span", { className: "w-5 select-none text-right text-muted-foreground", children: i + 1 }),
|
|
4116
|
+
/* @__PURE__ */ jsx16("span", { children: word })
|
|
4117
|
+
] }, `${i}-${word}`)) }),
|
|
4118
|
+
/* @__PURE__ */ jsx16(
|
|
4119
|
+
"button",
|
|
4120
|
+
{
|
|
4121
|
+
className: "mb-5 text-xs text-muted-foreground transition-colors hover:text-foreground",
|
|
4122
|
+
onClick: copy,
|
|
4123
|
+
children: copied ? "Copied \u2713" : "Copy to clipboard"
|
|
4124
|
+
}
|
|
4125
|
+
),
|
|
4126
|
+
/* @__PURE__ */ jsxs14("label", { className: "mb-4 flex max-w-xs cursor-pointer items-start gap-2 text-sm text-muted-foreground", children: [
|
|
4127
|
+
/* @__PURE__ */ jsx16(
|
|
4128
|
+
"input",
|
|
4129
|
+
{
|
|
4130
|
+
type: "checkbox",
|
|
4131
|
+
checked: saved,
|
|
4132
|
+
onChange: (e) => setSaved(e.target.checked),
|
|
4133
|
+
className: "mt-0.5"
|
|
4134
|
+
}
|
|
4135
|
+
),
|
|
4136
|
+
"I\u2019ve saved my recovery phrase somewhere safe."
|
|
4137
|
+
] }),
|
|
4138
|
+
/* @__PURE__ */ jsx16(
|
|
4139
|
+
"button",
|
|
4140
|
+
{
|
|
4141
|
+
disabled: !saved,
|
|
4142
|
+
className: "w-64 rounded-lg bg-primary px-6 py-3 font-medium text-primary-foreground transition-colors hover:bg-primary/90 disabled:cursor-not-allowed disabled:opacity-50",
|
|
4143
|
+
onClick: () => send({ type: "PHRASE_SAVED" }),
|
|
4144
|
+
children: "Continue"
|
|
4145
|
+
}
|
|
4146
|
+
)
|
|
4147
|
+
] });
|
|
4148
|
+
}
|
|
4149
|
+
|
|
3833
4150
|
// src/onboarding/OnboardingFlow.tsx
|
|
3834
|
-
import { Fragment, jsx as
|
|
4151
|
+
import { Fragment, jsx as jsx17, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
3835
4152
|
function OnboardingFlow({ connectToHub, children }) {
|
|
3836
4153
|
const { state } = useOnboarding();
|
|
3837
4154
|
switch (state) {
|
|
3838
4155
|
case "welcome":
|
|
3839
|
-
return /* @__PURE__ */
|
|
4156
|
+
return /* @__PURE__ */ jsx17(WelcomeScreen, {});
|
|
3840
4157
|
case "authenticating":
|
|
3841
|
-
return /* @__PURE__ */
|
|
4158
|
+
return /* @__PURE__ */ jsx17(AuthenticatingScreen, {});
|
|
3842
4159
|
case "auth-error":
|
|
3843
|
-
return /* @__PURE__ */
|
|
4160
|
+
return /* @__PURE__ */ jsx17(AuthErrorScreen, {});
|
|
3844
4161
|
case "unsupported-browser":
|
|
3845
|
-
return /* @__PURE__ */
|
|
4162
|
+
return /* @__PURE__ */ jsx17(UnsupportedBrowserScreen, {});
|
|
3846
4163
|
case "import-identity":
|
|
3847
|
-
return /* @__PURE__ */
|
|
4164
|
+
return /* @__PURE__ */ jsx17(ImportIdentityScreen, {});
|
|
3848
4165
|
case "qr-scan":
|
|
3849
|
-
return /* @__PURE__ */
|
|
3850
|
-
/* @__PURE__ */
|
|
3851
|
-
/* @__PURE__ */
|
|
4166
|
+
return /* @__PURE__ */ jsxs15("div", { className: "flex flex-col items-center justify-center min-h-screen bg-background text-foreground p-6", children: [
|
|
4167
|
+
/* @__PURE__ */ jsx17("h1", { className: "text-2xl font-semibold mb-2", children: "QR Scan" }),
|
|
4168
|
+
/* @__PURE__ */ jsx17("p", { className: "text-muted-foreground", children: "Coming soon \u2014 scan a QR code from another device." })
|
|
3852
4169
|
] });
|
|
3853
4170
|
case "recovery-phrase":
|
|
3854
|
-
return /* @__PURE__ */
|
|
3855
|
-
|
|
3856
|
-
|
|
3857
|
-
|
|
4171
|
+
return /* @__PURE__ */ jsx17(RecoveryPhraseScreen, {});
|
|
4172
|
+
case "guardian-recovery":
|
|
4173
|
+
return /* @__PURE__ */ jsx17(GuardianRecoveryScreen, {});
|
|
4174
|
+
case "creating-recoverable":
|
|
4175
|
+
return /* @__PURE__ */ jsx17(AuthenticatingScreen, {});
|
|
4176
|
+
case "show-recovery-phrase":
|
|
4177
|
+
return /* @__PURE__ */ jsx17(ShowRecoveryPhraseScreen, {});
|
|
3858
4178
|
case "connecting-hub":
|
|
3859
|
-
return /* @__PURE__ */
|
|
4179
|
+
return /* @__PURE__ */ jsx17(HubConnectScreen, { connectToHub });
|
|
3860
4180
|
case "ready":
|
|
3861
|
-
return /* @__PURE__ */
|
|
4181
|
+
return /* @__PURE__ */ jsx17(ReadyScreen, {});
|
|
3862
4182
|
case "complete":
|
|
3863
|
-
return /* @__PURE__ */
|
|
4183
|
+
return /* @__PURE__ */ jsx17(Fragment, { children });
|
|
3864
4184
|
default:
|
|
3865
|
-
return /* @__PURE__ */
|
|
4185
|
+
return /* @__PURE__ */ jsx17(WelcomeScreen, {});
|
|
3866
4186
|
}
|
|
3867
4187
|
}
|
|
3868
4188
|
|
|
3869
4189
|
// src/onboarding/screens/SmartWelcome.tsx
|
|
3870
4190
|
import { discoverExistingPasskey } from "@xnetjs/identity";
|
|
3871
|
-
import { useEffect as useEffect20, useState as
|
|
3872
|
-
import { jsx as
|
|
4191
|
+
import { useEffect as useEffect20, useState as useState27 } from "react";
|
|
4192
|
+
import { jsx as jsx18, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
3873
4193
|
function SmartWelcome() {
|
|
3874
4194
|
const { send } = useOnboarding();
|
|
3875
|
-
const [checking, setChecking] =
|
|
3876
|
-
const [hasExisting, setHasExisting] =
|
|
4195
|
+
const [checking, setChecking] = useState27(true);
|
|
4196
|
+
const [hasExisting, setHasExisting] = useState27(false);
|
|
3877
4197
|
useEffect20(() => {
|
|
3878
4198
|
let cancelled = false;
|
|
3879
4199
|
discoverExistingPasskey().then((passkey) => {
|
|
@@ -3891,35 +4211,31 @@ function SmartWelcome() {
|
|
|
3891
4211
|
};
|
|
3892
4212
|
}, []);
|
|
3893
4213
|
if (checking) {
|
|
3894
|
-
return /* @__PURE__ */
|
|
4214
|
+
return /* @__PURE__ */ jsx18("div", { className: "onboarding-screen", children: /* @__PURE__ */ jsx18("p", { className: "spinner-text", children: "Checking for existing identity..." }) });
|
|
3895
4215
|
}
|
|
3896
4216
|
if (hasExisting) {
|
|
3897
4217
|
const authName = getPlatformAuthName();
|
|
3898
|
-
return /* @__PURE__ */
|
|
3899
|
-
/* @__PURE__ */
|
|
3900
|
-
/* @__PURE__ */
|
|
4218
|
+
return /* @__PURE__ */ jsxs16("div", { className: "onboarding-screen welcome-back", children: [
|
|
4219
|
+
/* @__PURE__ */ jsx18("h1", { children: "Welcome back!" }),
|
|
4220
|
+
/* @__PURE__ */ jsxs16("p", { className: "subtitle", children: [
|
|
3901
4221
|
"We found your xNet identity. Use ",
|
|
3902
4222
|
authName,
|
|
3903
4223
|
" to sign in."
|
|
3904
4224
|
] }),
|
|
3905
|
-
/* @__PURE__ */
|
|
4225
|
+
/* @__PURE__ */ jsxs16("button", { className: "primary-button", onClick: () => send({ type: "AUTHENTICATE" }), children: [
|
|
3906
4226
|
"Sign in with ",
|
|
3907
4227
|
authName
|
|
3908
4228
|
] }),
|
|
3909
|
-
/* @__PURE__ */
|
|
4229
|
+
/* @__PURE__ */ jsx18("button", { className: "text-button", onClick: () => send({ type: "CREATE_NEW" }), children: "Create a new identity instead" })
|
|
3910
4230
|
] });
|
|
3911
4231
|
}
|
|
3912
|
-
return /* @__PURE__ */
|
|
4232
|
+
return /* @__PURE__ */ jsx18(WelcomeScreen, {});
|
|
3913
4233
|
}
|
|
3914
4234
|
|
|
3915
4235
|
// src/onboarding/screens/SyncProgressOverlay.tsx
|
|
4236
|
+
import { formatBytes as formatBytes2 } from "@xnetjs/core";
|
|
3916
4237
|
import { useEffect as useEffect21 } from "react";
|
|
3917
|
-
import { Fragment as Fragment2, jsx as
|
|
3918
|
-
function formatBytes2(bytes) {
|
|
3919
|
-
if (bytes < 1024) return `${bytes} B`;
|
|
3920
|
-
if (bytes < 1024 * 1024) return `${(bytes / 1024).toFixed(1)} KB`;
|
|
3921
|
-
return `${(bytes / (1024 * 1024)).toFixed(1)} MB`;
|
|
3922
|
-
}
|
|
4238
|
+
import { Fragment as Fragment2, jsx as jsx19, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
3923
4239
|
function SyncProgressOverlay({
|
|
3924
4240
|
progress,
|
|
3925
4241
|
onComplete
|
|
@@ -3930,14 +4246,14 @@ function SyncProgressOverlay({
|
|
|
3930
4246
|
return () => clearTimeout(timer);
|
|
3931
4247
|
}
|
|
3932
4248
|
}, [progress.phase, onComplete]);
|
|
3933
|
-
return /* @__PURE__ */
|
|
3934
|
-
progress.phase === "connecting" && /* @__PURE__ */
|
|
3935
|
-
/* @__PURE__ */
|
|
3936
|
-
/* @__PURE__ */
|
|
4249
|
+
return /* @__PURE__ */ jsx19("div", { className: "sync-progress-overlay", children: /* @__PURE__ */ jsxs17("div", { className: "sync-card", children: [
|
|
4250
|
+
progress.phase === "connecting" && /* @__PURE__ */ jsxs17(Fragment2, { children: [
|
|
4251
|
+
/* @__PURE__ */ jsx19("h2", { children: "Connecting to server..." }),
|
|
4252
|
+
/* @__PURE__ */ jsx19("p", { className: "spinner-text", children: "Please wait" })
|
|
3937
4253
|
] }),
|
|
3938
|
-
progress.phase === "syncing" && /* @__PURE__ */
|
|
3939
|
-
/* @__PURE__ */
|
|
3940
|
-
/* @__PURE__ */
|
|
4254
|
+
progress.phase === "syncing" && /* @__PURE__ */ jsxs17(Fragment2, { children: [
|
|
4255
|
+
/* @__PURE__ */ jsx19("h2", { children: "Syncing your data" }),
|
|
4256
|
+
/* @__PURE__ */ jsx19("div", { className: "progress-bar", children: /* @__PURE__ */ jsx19(
|
|
3941
4257
|
"div",
|
|
3942
4258
|
{
|
|
3943
4259
|
className: "progress-fill",
|
|
@@ -3946,29 +4262,29 @@ function SyncProgressOverlay({
|
|
|
3946
4262
|
}
|
|
3947
4263
|
}
|
|
3948
4264
|
) }),
|
|
3949
|
-
/* @__PURE__ */
|
|
4265
|
+
/* @__PURE__ */ jsxs17("p", { className: "progress-text", children: [
|
|
3950
4266
|
progress.roomsSynced,
|
|
3951
4267
|
" of ",
|
|
3952
4268
|
progress.roomsTotal,
|
|
3953
4269
|
" items"
|
|
3954
4270
|
] }),
|
|
3955
|
-
/* @__PURE__ */
|
|
4271
|
+
/* @__PURE__ */ jsxs17("p", { className: "bytes-text", children: [
|
|
3956
4272
|
formatBytes2(progress.bytesReceived),
|
|
3957
4273
|
" received"
|
|
3958
4274
|
] })
|
|
3959
4275
|
] }),
|
|
3960
|
-
progress.phase === "complete" && /* @__PURE__ */
|
|
3961
|
-
/* @__PURE__ */
|
|
3962
|
-
/* @__PURE__ */
|
|
4276
|
+
progress.phase === "complete" && /* @__PURE__ */ jsxs17(Fragment2, { children: [
|
|
4277
|
+
/* @__PURE__ */ jsx19("h2", { children: "All synced!" }),
|
|
4278
|
+
/* @__PURE__ */ jsxs17("p", { children: [
|
|
3963
4279
|
progress.roomsTotal,
|
|
3964
4280
|
" items synchronized"
|
|
3965
4281
|
] })
|
|
3966
4282
|
] }),
|
|
3967
|
-
progress.phase === "error" && /* @__PURE__ */
|
|
3968
|
-
/* @__PURE__ */
|
|
3969
|
-
/* @__PURE__ */
|
|
3970
|
-
progress.error && /* @__PURE__ */
|
|
3971
|
-
/* @__PURE__ */
|
|
4283
|
+
progress.phase === "error" && /* @__PURE__ */ jsxs17(Fragment2, { children: [
|
|
4284
|
+
/* @__PURE__ */ jsx19("h2", { children: "Sync issue" }),
|
|
4285
|
+
/* @__PURE__ */ jsx19("p", { children: "Some data may not be up to date." }),
|
|
4286
|
+
progress.error && /* @__PURE__ */ jsx19("p", { className: "error-detail", children: progress.error.message }),
|
|
4287
|
+
/* @__PURE__ */ jsx19("button", { className: "primary-button", onClick: onComplete, children: "Continue anyway" })
|
|
3972
4288
|
] })
|
|
3973
4289
|
] }) });
|
|
3974
4290
|
}
|
|
@@ -4033,60 +4349,60 @@ function isTaskOverdue(timestamp, completed) {
|
|
|
4033
4349
|
|
|
4034
4350
|
// src/components/PageTasksPanel.tsx
|
|
4035
4351
|
import { Calendar, CheckSquare2, ChevronDown, ChevronRight, Square, Users } from "lucide-react";
|
|
4036
|
-
import { useMemo as
|
|
4037
|
-
import { jsx as
|
|
4352
|
+
import { useMemo as useMemo17, useState as useState28 } from "react";
|
|
4353
|
+
import { jsx as jsx20, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
4038
4354
|
function PageTasksPanel({ pageId }) {
|
|
4039
|
-
const [expanded, setExpanded] =
|
|
4355
|
+
const [expanded, setExpanded] = useState28(true);
|
|
4040
4356
|
const { tree, loading } = useTasks({ pageId });
|
|
4041
|
-
const rows =
|
|
4042
|
-
return /* @__PURE__ */
|
|
4043
|
-
/* @__PURE__ */
|
|
4357
|
+
const rows = useMemo17(() => flattenTaskTree(tree), [tree]);
|
|
4358
|
+
return /* @__PURE__ */ jsxs18("div", { className: "mt-8 overflow-hidden rounded-lg border border-border", children: [
|
|
4359
|
+
/* @__PURE__ */ jsx20(
|
|
4044
4360
|
"button",
|
|
4045
4361
|
{
|
|
4046
4362
|
className: "w-full cursor-pointer border-none bg-secondary p-3 px-4 text-left",
|
|
4047
4363
|
onClick: () => setExpanded((value) => !value),
|
|
4048
4364
|
type: "button",
|
|
4049
|
-
children: /* @__PURE__ */
|
|
4050
|
-
/* @__PURE__ */
|
|
4365
|
+
children: /* @__PURE__ */ jsxs18("h3", { className: "m-0 flex items-center justify-between text-sm font-semibold text-foreground", children: [
|
|
4366
|
+
/* @__PURE__ */ jsxs18("span", { children: [
|
|
4051
4367
|
"Tasks on this page (",
|
|
4052
4368
|
rows.length,
|
|
4053
4369
|
")"
|
|
4054
4370
|
] }),
|
|
4055
|
-
expanded ? /* @__PURE__ */
|
|
4371
|
+
expanded ? /* @__PURE__ */ jsx20(ChevronDown, { size: 16, className: "text-muted-foreground" }) : /* @__PURE__ */ jsx20(ChevronRight, { size: 16, className: "text-muted-foreground" })
|
|
4056
4372
|
] })
|
|
4057
4373
|
}
|
|
4058
4374
|
),
|
|
4059
|
-
expanded && /* @__PURE__ */
|
|
4375
|
+
expanded && /* @__PURE__ */ jsx20("div", { className: "p-3", children: loading ? /* @__PURE__ */ jsx20("p", { className: "m-0 text-sm text-muted-foreground", children: "Loading tasks..." }) : rows.length === 0 ? /* @__PURE__ */ jsx20("p", { className: "m-0 text-sm text-muted-foreground", children: "Checklist items on this page will appear here." }) : /* @__PURE__ */ jsx20("ul", { className: "m-0 list-none space-y-1 p-0", children: rows.map((task) => {
|
|
4060
4376
|
const dueDateLabel = formatTaskDueDate(task.dueDate);
|
|
4061
4377
|
const overdue = isTaskOverdue(task.dueDate, task.completed);
|
|
4062
|
-
return /* @__PURE__ */
|
|
4378
|
+
return /* @__PURE__ */ jsx20("li", { children: /* @__PURE__ */ jsxs18(
|
|
4063
4379
|
"div",
|
|
4064
4380
|
{
|
|
4065
4381
|
className: "flex items-start gap-2 rounded-md px-2 py-2 transition-colors hover:bg-accent/40",
|
|
4066
4382
|
style: { paddingLeft: `${task.depth * 18 + 8}px` },
|
|
4067
4383
|
children: [
|
|
4068
|
-
task.completed ? /* @__PURE__ */
|
|
4069
|
-
/* @__PURE__ */
|
|
4070
|
-
/* @__PURE__ */
|
|
4384
|
+
task.completed ? /* @__PURE__ */ jsx20(CheckSquare2, { size: 15, className: "mt-0.5 flex-shrink-0 text-primary" }) : /* @__PURE__ */ jsx20(Square, { size: 15, className: "mt-0.5 flex-shrink-0 text-muted-foreground" }),
|
|
4385
|
+
/* @__PURE__ */ jsxs18("div", { className: "min-w-0 flex-1", children: [
|
|
4386
|
+
/* @__PURE__ */ jsx20(
|
|
4071
4387
|
"div",
|
|
4072
4388
|
{
|
|
4073
4389
|
className: `text-sm ${task.completed ? "line-through text-muted-foreground" : "text-foreground"}`,
|
|
4074
4390
|
children: task.title
|
|
4075
4391
|
}
|
|
4076
4392
|
),
|
|
4077
|
-
/* @__PURE__ */
|
|
4078
|
-
dueDateLabel ? /* @__PURE__ */
|
|
4393
|
+
/* @__PURE__ */ jsxs18("div", { className: "mt-1 flex flex-wrap items-center gap-2 text-[11px] text-muted-foreground", children: [
|
|
4394
|
+
dueDateLabel ? /* @__PURE__ */ jsxs18(
|
|
4079
4395
|
"span",
|
|
4080
4396
|
{
|
|
4081
4397
|
className: `inline-flex items-center gap-1 ${overdue ? "text-red-500" : "text-muted-foreground"}`,
|
|
4082
4398
|
children: [
|
|
4083
|
-
/* @__PURE__ */
|
|
4399
|
+
/* @__PURE__ */ jsx20(Calendar, { size: 11 }),
|
|
4084
4400
|
dueDateLabel
|
|
4085
4401
|
]
|
|
4086
4402
|
}
|
|
4087
4403
|
) : null,
|
|
4088
|
-
task.assigneeCount > 0 ? /* @__PURE__ */
|
|
4089
|
-
/* @__PURE__ */
|
|
4404
|
+
task.assigneeCount > 0 ? /* @__PURE__ */ jsxs18("span", { className: "inline-flex items-center gap-1", children: [
|
|
4405
|
+
/* @__PURE__ */ jsx20(Users, { size: 11 }),
|
|
4090
4406
|
task.assigneeCount
|
|
4091
4407
|
] }) : null
|
|
4092
4408
|
] })
|
|
@@ -4099,8 +4415,8 @@ function PageTasksPanel({ pageId }) {
|
|
|
4099
4415
|
}
|
|
4100
4416
|
|
|
4101
4417
|
// src/components/TaskCollectionEmbed.tsx
|
|
4102
|
-
import { useMemo as
|
|
4103
|
-
import { jsx as
|
|
4418
|
+
import { useMemo as useMemo18 } from "react";
|
|
4419
|
+
import { jsx as jsx21, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
4104
4420
|
function TaskCollectionEmbed({
|
|
4105
4421
|
currentPageId,
|
|
4106
4422
|
currentDid,
|
|
@@ -4122,7 +4438,7 @@ function TaskCollectionEmbed({
|
|
|
4122
4438
|
statuses: statuses ? [...statuses] : void 0,
|
|
4123
4439
|
dueDateFilter: dueDate
|
|
4124
4440
|
});
|
|
4125
|
-
const rows =
|
|
4441
|
+
const rows = useMemo18(() => {
|
|
4126
4442
|
if (showHierarchy) return flattenTaskTree(tree);
|
|
4127
4443
|
return data.map((task) => ({
|
|
4128
4444
|
id: task.id,
|
|
@@ -4133,33 +4449,33 @@ function TaskCollectionEmbed({
|
|
|
4133
4449
|
}));
|
|
4134
4450
|
}, [data, showHierarchy, tree]);
|
|
4135
4451
|
if (missingPageContext) {
|
|
4136
|
-
return /* @__PURE__ */
|
|
4452
|
+
return /* @__PURE__ */ jsx21("div", { className: "p-4 text-sm text-muted-foreground", children: "This view needs a page context." });
|
|
4137
4453
|
}
|
|
4138
4454
|
if (loading) {
|
|
4139
|
-
return /* @__PURE__ */
|
|
4455
|
+
return /* @__PURE__ */ jsx21("div", { className: "p-4 text-sm text-muted-foreground", children: "Loading tasks..." });
|
|
4140
4456
|
}
|
|
4141
4457
|
if (rows.length === 0) {
|
|
4142
|
-
return /* @__PURE__ */
|
|
4458
|
+
return /* @__PURE__ */ jsx21("div", { className: "p-4 text-sm text-muted-foreground", children: "No tasks match the saved filters for this view." });
|
|
4143
4459
|
}
|
|
4144
|
-
return /* @__PURE__ */
|
|
4460
|
+
return /* @__PURE__ */ jsx21("div", { className: "p-3", children: /* @__PURE__ */ jsx21("ul", { className: "m-0 list-none space-y-1 p-0", children: rows.map((task) => {
|
|
4145
4461
|
const dueDateLabel = formatTaskDueDate(task.dueDate);
|
|
4146
4462
|
const overdue = isTaskOverdue(task.dueDate, task.completed);
|
|
4147
|
-
return /* @__PURE__ */
|
|
4463
|
+
return /* @__PURE__ */ jsx21("li", { children: /* @__PURE__ */ jsxs19(
|
|
4148
4464
|
"div",
|
|
4149
4465
|
{
|
|
4150
4466
|
className: "flex items-start gap-2 rounded-lg px-2 py-2 hover:bg-accent/40",
|
|
4151
4467
|
style: { paddingLeft: `${task.depth * 18 + 8}px` },
|
|
4152
4468
|
children: [
|
|
4153
|
-
/* @__PURE__ */
|
|
4154
|
-
/* @__PURE__ */
|
|
4155
|
-
/* @__PURE__ */
|
|
4469
|
+
/* @__PURE__ */ jsx21("span", { className: task.completed ? "text-primary" : "text-muted-foreground", children: task.completed ? "\u2611" : "\u2610" }),
|
|
4470
|
+
/* @__PURE__ */ jsxs19("div", { className: "min-w-0 flex-1", children: [
|
|
4471
|
+
/* @__PURE__ */ jsx21(
|
|
4156
4472
|
"div",
|
|
4157
4473
|
{
|
|
4158
4474
|
className: task.completed ? "truncate text-sm text-muted-foreground line-through" : "truncate text-sm text-foreground",
|
|
4159
4475
|
children: task.title
|
|
4160
4476
|
}
|
|
4161
4477
|
),
|
|
4162
|
-
dueDateLabel ? /* @__PURE__ */
|
|
4478
|
+
dueDateLabel ? /* @__PURE__ */ jsx21(
|
|
4163
4479
|
"div",
|
|
4164
4480
|
{
|
|
4165
4481
|
className: overdue ? "mt-1 text-[11px] text-red-500" : "mt-1 text-[11px] text-muted-foreground",
|
|
@@ -4179,16 +4495,16 @@ import {
|
|
|
4179
4495
|
hybridVerify
|
|
4180
4496
|
} from "@xnetjs/crypto";
|
|
4181
4497
|
import { parseDID } from "@xnetjs/identity";
|
|
4182
|
-
import { useCallback as useCallback19, useMemo as
|
|
4498
|
+
import { useCallback as useCallback19, useMemo as useMemo19 } from "react";
|
|
4183
4499
|
function useSecurity(options = {}) {
|
|
4184
4500
|
const context = useSecurityContext();
|
|
4185
4501
|
const effectiveLevel = options.level ?? context.level;
|
|
4186
|
-
const hasPQKeys =
|
|
4502
|
+
const hasPQKeys = useMemo19(
|
|
4187
4503
|
() => context.keyBundle?.pqSigningKey !== void 0,
|
|
4188
4504
|
[context.keyBundle]
|
|
4189
4505
|
);
|
|
4190
|
-
const hasKeyBundle =
|
|
4191
|
-
const maxLevel =
|
|
4506
|
+
const hasKeyBundle = useMemo19(() => context.keyBundle !== void 0, [context.keyBundle]);
|
|
4507
|
+
const maxLevel = useMemo19(() => hasPQKeys ? 2 : 0, [hasPQKeys]);
|
|
4192
4508
|
const canSignAt = useCallback19(
|
|
4193
4509
|
(level) => {
|
|
4194
4510
|
if (!context.keyBundle) return false;
|
|
@@ -1100,7 +1100,7 @@ declare function useSyncManager(): SyncManager | null;
|
|
|
1100
1100
|
* welcome → import-identity → qr-scan/recovery-phrase → connecting-hub
|
|
1101
1101
|
*/
|
|
1102
1102
|
|
|
1103
|
-
type OnboardingState = 'welcome' | 'authenticating' | 'auth-error' | 'unsupported-browser' | 'import-identity' | 'qr-scan' | 'recovery-phrase' | 'connecting-hub' | 'ready' | 'complete';
|
|
1103
|
+
type OnboardingState = 'welcome' | 'authenticating' | 'auth-error' | 'unsupported-browser' | 'import-identity' | 'qr-scan' | 'recovery-phrase' | 'guardian-recovery' | 'creating-recoverable' | 'show-recovery-phrase' | 'connecting-hub' | 'ready' | 'complete';
|
|
1104
1104
|
type OnboardingEvent = {
|
|
1105
1105
|
type: 'AUTHENTICATE';
|
|
1106
1106
|
} | {
|
|
@@ -1135,6 +1135,28 @@ type OnboardingEvent = {
|
|
|
1135
1135
|
error: Error;
|
|
1136
1136
|
} | {
|
|
1137
1137
|
type: 'CREATE_FIRST_PAGE';
|
|
1138
|
+
} | {
|
|
1139
|
+
type: 'CREATE_RECOVERABLE';
|
|
1140
|
+
} | {
|
|
1141
|
+
type: 'USE_SYNCED_PASSKEY';
|
|
1142
|
+
} | {
|
|
1143
|
+
type: 'ENTER_GUARDIAN_SHARES';
|
|
1144
|
+
} | {
|
|
1145
|
+
type: 'SUBMIT_GUARDIAN_SHARES';
|
|
1146
|
+
codes: string[];
|
|
1147
|
+
} | {
|
|
1148
|
+
type: 'SUBMIT_PHRASE';
|
|
1149
|
+
phrase: string;
|
|
1150
|
+
} | {
|
|
1151
|
+
type: 'IMPORT_FAILED';
|
|
1152
|
+
error: Error;
|
|
1153
|
+
} | {
|
|
1154
|
+
type: 'RECOVERABLE_CREATED';
|
|
1155
|
+
identity: Identity;
|
|
1156
|
+
keyBundle: KeyBundle;
|
|
1157
|
+
phrase: string;
|
|
1158
|
+
} | {
|
|
1159
|
+
type: 'PHRASE_SAVED';
|
|
1138
1160
|
};
|
|
1139
1161
|
type OnboardingMachineContext = {
|
|
1140
1162
|
identity: Identity | null;
|
|
@@ -1142,6 +1164,8 @@ type OnboardingMachineContext = {
|
|
|
1142
1164
|
hubUrl: string | null;
|
|
1143
1165
|
error: Error | null;
|
|
1144
1166
|
isDemo: boolean;
|
|
1167
|
+
/** The recovery phrase to show once, after creating a recoverable identity (0243). */
|
|
1168
|
+
recoveryPhrase: string | null;
|
|
1145
1169
|
};
|
|
1146
1170
|
type OnboardingReducerState = {
|
|
1147
1171
|
state: OnboardingState;
|
package/dist/experimental.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { A as AddCommentOptions, a0 as AddReactionOptions, bm as AuthErrorScreen, aP as AuthTraceSummary, bl as AuthenticatingScreen, r as CommentNode, C as CommentThread, F as CommentVisibility, ad as CreateMessageRequestOptions, b7 as DemoBanner, b8 as DemoBannerProps, bb as DemoDataExpiredScreen, be as DemoLimits, bd as DemoModeState, b9 as DemoQuotaIndicator, ba as DemoQuotaIndicatorProps, bf as DemoUsage, b2 as DiscoveredPeer, aU as FileRef, ae as FirstContactAdmission, af as FirstContactDecision, ag as FirstContactDecisionInput, G as FirstContactMode, ah as FirstContactVisibility, aK as GrantConsentSummary, aL as GrantInput, bp as HubConnectScreen, aX as HubSearchOptions, aY as HubSearchResult, aZ as HubSearchState, b3 as HubStatusIndicator, bo as ImportIdentityScreen, I as InteractionPermission, ai as MessageRequestNode, aj as MessageRequestProperties, ak as MessageRequestStatus, M as ModeratedCommentNode, H as ModeratedCommentThread, J as ModerationFilterOptions, K as ModerationLabelSummary, bA as OnboardingContextValue, bD as OnboardingEvent, bj as OnboardingFlow, bB as OnboardingFlowProps, bE as OnboardingMachineContext, bh as OnboardingProvider, bz as OnboardingProviderProps, bF as OnboardingReducerState, bC as OnboardingState, P as PageTaskInput, e as PageTaskReferenceInput, bI as PageTasksPanel, bJ as PageTasksPanelProps, bW as PluginRegistryContext, L as PublicInteractionMode, N as PublicInteractionPolicySnapshot, O as PublicInteractionSurface, Q as PublicModerationMode, bv as QUICK_START_TEMPLATES, bG as QuickStartTemplate, a1 as ReactionCounterSnapshot, a2 as ReactionNode, a3 as ReactionType, bq as ReadyScreen, a$ as RemoteSchemaDefinition, b0 as RemoteSchemaState, R as ReplyContext, bQ as SecurityContextActions, bP as SecurityContextState, bR as SecurityContextValue, bM as SecurityProvider, bS as SecurityProviderProps, b4 as Skeleton, b6 as SkeletonProps, br as SmartWelcome, bs as SyncProgressOverlay, bH as SyncProgressOverlayProps, bK as TaskCollectionEmbed, bL as TaskCollectionEmbedProps, a as TaskTreeItem, bn as UnsupportedBrowserScreen, aw as UseAuditOptions, av as UseAuditResult, aQ as UseAuthTraceResult, aS as UseBackupReturn, aA as UseBlameResult, aH as UseCanEditResult, aF as UseCanResult, p as UseCommentsOptions, q as UseCommentsResult, ay as UseDiffResult, aV as UseFileUploadReturn, b as UseFindOptions, c as UseFindResult, aM as UseGrantsResult, aq as UseHistoryResult, al as UseMessageRequestsOptions, am as UseMessageRequestsResult, S as UseModeratedThreadOptions, f as UsePageTaskSyncOptions, g as UsePageTaskSyncResult, a4 as UsePolicyFilteredReactionCountersOptions, a5 as UsePolicyFilteredReactionCountersResult, bU as UseSecurityOptions, bV as UseSecurityResult, m as UseTasksOptions, n as UseTasksResult, at as UseUndoOptions, as as UseUndoResult, aC as UseVerificationResult, V as UseVisibleCommentsOptions, W as UseVisibleCommentsResult, bk as WelcomeScreen, by as copyToClipboard, a7 as createConversationKey, bu as createInitialState, a8 as createMessageRequestProperties, v as createModerationLabelIndex, Y as createReactionCounterSnapshot, Z as dedupeReactions, aI as describeGrantConsent, w as evaluateCommentModeration, a9 as evaluateFirstContactDecision, x as evaluateInteractionPermission, aa as findLatestMessageRequest, bw as getPlatformAuthName, ab as hasAcceptedContact, b5 as injectSkeletonStyles, _ as isReactionVisible, y as moderateThread, bt as onboardingReducer, z as selectActiveInteractionPolicy, B as selectPublicInteractionMode, aN as summarizeAuthTrace, ac as summarizeMessageRequest, D as summarizeModerationLabel, E as summarizePublicInteractionPolicy, $ as summarizeReactionNode, bx as truncateDid, au as useAudit, aO as useAuthTrace, aR as useBackup, az as useBlame, aE as useCan, aG as useCanEdit, c7 as useCommand, c0 as useCommands, an as useCommentCount, ao as useCommentCounts, o as useComments, b_ as useContributions, bc as useDemoMode, ax as useDiff, c4 as useEditorExtensions, c5 as useEditorExtensionsSafe, aT as useFileUpload, u as useFind, aJ as useGrants, ap as useHistory, aW as useHubSearch, aD as useHubStatus, a6 as useMessageRequests, t as useModeratedThread, bi as useOnboarding, d as usePageTaskSync, b1 as usePeerDiscovery, bX as usePluginRegistry, bY as usePluginRegistryOptional, bZ as usePlugins, X as usePolicyFilteredReactionCounters, a_ as useRemoteSchema, bT as useSecurity, bN as useSecurityContext, bO as useSecurityContextOptional, c2 as useSidebarItems, c1 as useSlashCommands, bg as useSyncManager, l as useTasks, ar as useUndo, aB as useVerification, c6 as useView, b$ as useViews, s as useVisibleComments } from './experimental-
|
|
1
|
+
export { A as AddCommentOptions, a0 as AddReactionOptions, bm as AuthErrorScreen, aP as AuthTraceSummary, bl as AuthenticatingScreen, r as CommentNode, C as CommentThread, F as CommentVisibility, ad as CreateMessageRequestOptions, b7 as DemoBanner, b8 as DemoBannerProps, bb as DemoDataExpiredScreen, be as DemoLimits, bd as DemoModeState, b9 as DemoQuotaIndicator, ba as DemoQuotaIndicatorProps, bf as DemoUsage, b2 as DiscoveredPeer, aU as FileRef, ae as FirstContactAdmission, af as FirstContactDecision, ag as FirstContactDecisionInput, G as FirstContactMode, ah as FirstContactVisibility, aK as GrantConsentSummary, aL as GrantInput, bp as HubConnectScreen, aX as HubSearchOptions, aY as HubSearchResult, aZ as HubSearchState, b3 as HubStatusIndicator, bo as ImportIdentityScreen, I as InteractionPermission, ai as MessageRequestNode, aj as MessageRequestProperties, ak as MessageRequestStatus, M as ModeratedCommentNode, H as ModeratedCommentThread, J as ModerationFilterOptions, K as ModerationLabelSummary, bA as OnboardingContextValue, bD as OnboardingEvent, bj as OnboardingFlow, bB as OnboardingFlowProps, bE as OnboardingMachineContext, bh as OnboardingProvider, bz as OnboardingProviderProps, bF as OnboardingReducerState, bC as OnboardingState, P as PageTaskInput, e as PageTaskReferenceInput, bI as PageTasksPanel, bJ as PageTasksPanelProps, bW as PluginRegistryContext, L as PublicInteractionMode, N as PublicInteractionPolicySnapshot, O as PublicInteractionSurface, Q as PublicModerationMode, bv as QUICK_START_TEMPLATES, bG as QuickStartTemplate, a1 as ReactionCounterSnapshot, a2 as ReactionNode, a3 as ReactionType, bq as ReadyScreen, a$ as RemoteSchemaDefinition, b0 as RemoteSchemaState, R as ReplyContext, bQ as SecurityContextActions, bP as SecurityContextState, bR as SecurityContextValue, bM as SecurityProvider, bS as SecurityProviderProps, b4 as Skeleton, b6 as SkeletonProps, br as SmartWelcome, bs as SyncProgressOverlay, bH as SyncProgressOverlayProps, bK as TaskCollectionEmbed, bL as TaskCollectionEmbedProps, a as TaskTreeItem, bn as UnsupportedBrowserScreen, aw as UseAuditOptions, av as UseAuditResult, aQ as UseAuthTraceResult, aS as UseBackupReturn, aA as UseBlameResult, aH as UseCanEditResult, aF as UseCanResult, p as UseCommentsOptions, q as UseCommentsResult, ay as UseDiffResult, aV as UseFileUploadReturn, b as UseFindOptions, c as UseFindResult, aM as UseGrantsResult, aq as UseHistoryResult, al as UseMessageRequestsOptions, am as UseMessageRequestsResult, S as UseModeratedThreadOptions, f as UsePageTaskSyncOptions, g as UsePageTaskSyncResult, a4 as UsePolicyFilteredReactionCountersOptions, a5 as UsePolicyFilteredReactionCountersResult, bU as UseSecurityOptions, bV as UseSecurityResult, m as UseTasksOptions, n as UseTasksResult, at as UseUndoOptions, as as UseUndoResult, aC as UseVerificationResult, V as UseVisibleCommentsOptions, W as UseVisibleCommentsResult, bk as WelcomeScreen, by as copyToClipboard, a7 as createConversationKey, bu as createInitialState, a8 as createMessageRequestProperties, v as createModerationLabelIndex, Y as createReactionCounterSnapshot, Z as dedupeReactions, aI as describeGrantConsent, w as evaluateCommentModeration, a9 as evaluateFirstContactDecision, x as evaluateInteractionPermission, aa as findLatestMessageRequest, bw as getPlatformAuthName, ab as hasAcceptedContact, b5 as injectSkeletonStyles, _ as isReactionVisible, y as moderateThread, bt as onboardingReducer, z as selectActiveInteractionPolicy, B as selectPublicInteractionMode, aN as summarizeAuthTrace, ac as summarizeMessageRequest, D as summarizeModerationLabel, E as summarizePublicInteractionPolicy, $ as summarizeReactionNode, bx as truncateDid, au as useAudit, aO as useAuthTrace, aR as useBackup, az as useBlame, aE as useCan, aG as useCanEdit, c7 as useCommand, c0 as useCommands, an as useCommentCount, ao as useCommentCounts, o as useComments, b_ as useContributions, bc as useDemoMode, ax as useDiff, c4 as useEditorExtensions, c5 as useEditorExtensionsSafe, aT as useFileUpload, u as useFind, aJ as useGrants, ap as useHistory, aW as useHubSearch, aD as useHubStatus, a6 as useMessageRequests, t as useModeratedThread, bi as useOnboarding, d as usePageTaskSync, b1 as usePeerDiscovery, bX as usePluginRegistry, bY as usePluginRegistryOptional, bZ as usePlugins, X as usePolicyFilteredReactionCounters, a_ as useRemoteSchema, bT as useSecurity, bN as useSecurityContext, bO as useSecurityContextOptional, c2 as useSidebarItems, c1 as useSlashCommands, bg as useSyncManager, l as useTasks, ar as useUndo, aB as useVerification, c6 as useView, b$ as useViews, s as useVisibleComments } from './experimental-B2FrBnkV.js';
|
|
2
2
|
export { i as FlattenNodeOptions, f as flattenNode, e as flattenNodes, h as flattenNodesWithSchemaCheck, g as flattenUnknownSchemaNode } from './useQuery-D7ajycrc.js';
|
|
3
3
|
export { BlobStoreForSync, ConnectionManager, ConnectionManagerConfig, ConnectionStatus, InitialSyncManager, InitialSyncMessage, METABRIDGE_ORIGIN, METABRIDGE_SEED_ORIGIN, MetaBridge, NodePool, NodePoolConfig, NodeStoreSyncProvider, NodeSyncResponse, OfflineQueue, OfflineQueueConfig, PoolEntryState, ProgressListener, QueueEntry, Registry, RegistryConfig, RegistryStorage, SerializedNodeChange, SyncLifecyclePhase, SyncLifecycleState, SyncManager, SyncManagerConfig, SyncStatus as SyncManagerStatus, SyncPhase, SyncProgress, TrackedNode, WebSocketSyncProvider, WebSocketSyncProviderOptions, createConnectionManager, createInitialSyncManager, createMetaBridge, createNodePool, createOfflineQueue, createRegistry, createSyncManager } from '@xnetjs/runtime';
|
|
4
4
|
export { I as InstrumentationContext, a as InstrumentationContextValue, Q as QueryTrackerLike, Y as YDocRegistryLike, u as useInstrumentation } from './instrumentation-CpIuG2y5.js';
|
package/dist/experimental.js
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Q as QueryFilter, a as QueryStatus, F as FlatNode, b as QueryPlanSummary } from './useQuery-D7ajycrc.js';
|
|
2
2
|
export { i as FlattenNodeOptions, M as MigrationWarning, c as QueryListResult, d as QuerySingleResult, S as SortDirection, f as flattenNode, e as flattenNodes, h as flattenNodesWithSchemaCheck, g as flattenUnknownSchemaNode, u as useQuery } from './useQuery-D7ajycrc.js';
|
|
3
3
|
export { ErrorBoundary, ErrorBoundaryProps, InfiniteQueryFilter, InfiniteQueryPage, InfiniteQueryResult, MutateCreate, MutateDelete, MutateOp, MutateRestore, MutateUpdate, OfflineIndicator, OfflineIndicatorProps, PresenceUser, SyncStatus, UseIdentityResult, UseMutateResult, UseNodeOptions, UseNodeResult, useIdentity, useInfiniteQuery, useIsOffline, useMutate, useNode } from './core.js';
|
|
4
|
-
import { U as UseTaskProjectionSyncResult, T as TaskProjectionInput, a as TaskTreeItem } from './experimental-
|
|
5
|
-
export { A as AddCommentOptions, a0 as AddReactionOptions, bm as AuthErrorScreen, aP as AuthTraceSummary, bl as AuthenticatingScreen, r as CommentNode, C as CommentThread, F as CommentVisibility, ad as CreateMessageRequestOptions, b7 as DemoBanner, b8 as DemoBannerProps, bb as DemoDataExpiredScreen, be as DemoLimits, bd as DemoModeState, b9 as DemoQuotaIndicator, ba as DemoQuotaIndicatorProps, bf as DemoUsage, b2 as DiscoveredPeer, aU as FileRef, ae as FirstContactAdmission, af as FirstContactDecision, ag as FirstContactDecisionInput, G as FirstContactMode, ah as FirstContactVisibility, aK as GrantConsentSummary, aL as GrantInput, bp as HubConnectScreen, aX as HubSearchOptions, aY as HubSearchResult, aZ as HubSearchState, b3 as HubStatusIndicator, bo as ImportIdentityScreen, I as InteractionPermission, ai as MessageRequestNode, aj as MessageRequestProperties, ak as MessageRequestStatus, M as ModeratedCommentNode, H as ModeratedCommentThread, J as ModerationFilterOptions, K as ModerationLabelSummary, bA as OnboardingContextValue, bD as OnboardingEvent, bj as OnboardingFlow, bB as OnboardingFlowProps, bE as OnboardingMachineContext, bh as OnboardingProvider, bz as OnboardingProviderProps, bF as OnboardingReducerState, bC as OnboardingState, P as PageTaskInput, e as PageTaskReferenceInput, bI as PageTasksPanel, bJ as PageTasksPanelProps, bW as PluginRegistryContext, L as PublicInteractionMode, N as PublicInteractionPolicySnapshot, O as PublicInteractionSurface, Q as PublicModerationMode, bv as QUICK_START_TEMPLATES, bG as QuickStartTemplate, a1 as ReactionCounterSnapshot, a2 as ReactionNode, a3 as ReactionType, bq as ReadyScreen, a$ as RemoteSchemaDefinition, b0 as RemoteSchemaState, R as ReplyContext, bQ as SecurityContextActions, bP as SecurityContextState, bR as SecurityContextValue, bM as SecurityProvider, bS as SecurityProviderProps, b4 as Skeleton, b6 as SkeletonProps, br as SmartWelcome, bs as SyncProgressOverlay, bH as SyncProgressOverlayProps, bK as TaskCollectionEmbed, bL as TaskCollectionEmbedProps, j as TaskProjectionHost, i as TaskProjectionReferenceInput, bn as UnsupportedBrowserScreen, aw as UseAuditOptions, av as UseAuditResult, aQ as UseAuthTraceResult, aS as UseBackupReturn, aA as UseBlameResult, aH as UseCanEditResult, aF as UseCanResult, p as UseCommentsOptions, q as UseCommentsResult, ay as UseDiffResult, aV as UseFileUploadReturn, b as UseFindOptions, c as UseFindResult, aM as UseGrantsResult, aq as UseHistoryResult, al as UseMessageRequestsOptions, am as UseMessageRequestsResult, S as UseModeratedThreadOptions, f as UsePageTaskSyncOptions, g as UsePageTaskSyncResult, a4 as UsePolicyFilteredReactionCountersOptions, a5 as UsePolicyFilteredReactionCountersResult, bU as UseSecurityOptions, bV as UseSecurityResult, k as UseTaskProjectionSyncOptions, m as UseTasksOptions, n as UseTasksResult, at as UseUndoOptions, as as UseUndoResult, aC as UseVerificationResult, V as UseVisibleCommentsOptions, W as UseVisibleCommentsResult, bk as WelcomeScreen, by as copyToClipboard, a7 as createConversationKey, bu as createInitialState, a8 as createMessageRequestProperties, v as createModerationLabelIndex, Y as createReactionCounterSnapshot, Z as dedupeReactions, aI as describeGrantConsent, w as evaluateCommentModeration, a9 as evaluateFirstContactDecision, x as evaluateInteractionPermission, aa as findLatestMessageRequest, bw as getPlatformAuthName, ab as hasAcceptedContact, b5 as injectSkeletonStyles, _ as isReactionVisible, y as moderateThread, bt as onboardingReducer, z as selectActiveInteractionPolicy, B as selectPublicInteractionMode, aN as summarizeAuthTrace, ac as summarizeMessageRequest, D as summarizeModerationLabel, E as summarizePublicInteractionPolicy, $ as summarizeReactionNode, bx as truncateDid, au as useAudit, aO as useAuthTrace, aR as useBackup, az as useBlame, aE as useCan, aG as useCanEdit, c7 as useCommand, c0 as useCommands, an as useCommentCount, ao as useCommentCounts, o as useComments, b_ as useContributions, bc as useDemoMode, ax as useDiff, c4 as useEditorExtensions, c5 as useEditorExtensionsSafe, aT as useFileUpload, u as useFind, aJ as useGrants, ap as useHistory, aW as useHubSearch, aD as useHubStatus, c3 as useImporters, a6 as useMessageRequests, t as useModeratedThread, bi as useOnboarding, d as usePageTaskSync, b1 as usePeerDiscovery, bX as usePluginRegistry, bY as usePluginRegistryOptional, bZ as usePlugins, X as usePolicyFilteredReactionCounters, a_ as useRemoteSchema, bT as useSecurity, bN as useSecurityContext, bO as useSecurityContextOptional, c2 as useSidebarItems, c1 as useSlashCommands, bg as useSyncManager, h as useTaskProjectionSync, l as useTasks, ar as useUndo, aB as useVerification, c6 as useView, b$ as useViews, s as useVisibleComments } from './experimental-
|
|
4
|
+
import { U as UseTaskProjectionSyncResult, T as TaskProjectionInput, a as TaskTreeItem } from './experimental-B2FrBnkV.js';
|
|
5
|
+
export { A as AddCommentOptions, a0 as AddReactionOptions, bm as AuthErrorScreen, aP as AuthTraceSummary, bl as AuthenticatingScreen, r as CommentNode, C as CommentThread, F as CommentVisibility, ad as CreateMessageRequestOptions, b7 as DemoBanner, b8 as DemoBannerProps, bb as DemoDataExpiredScreen, be as DemoLimits, bd as DemoModeState, b9 as DemoQuotaIndicator, ba as DemoQuotaIndicatorProps, bf as DemoUsage, b2 as DiscoveredPeer, aU as FileRef, ae as FirstContactAdmission, af as FirstContactDecision, ag as FirstContactDecisionInput, G as FirstContactMode, ah as FirstContactVisibility, aK as GrantConsentSummary, aL as GrantInput, bp as HubConnectScreen, aX as HubSearchOptions, aY as HubSearchResult, aZ as HubSearchState, b3 as HubStatusIndicator, bo as ImportIdentityScreen, I as InteractionPermission, ai as MessageRequestNode, aj as MessageRequestProperties, ak as MessageRequestStatus, M as ModeratedCommentNode, H as ModeratedCommentThread, J as ModerationFilterOptions, K as ModerationLabelSummary, bA as OnboardingContextValue, bD as OnboardingEvent, bj as OnboardingFlow, bB as OnboardingFlowProps, bE as OnboardingMachineContext, bh as OnboardingProvider, bz as OnboardingProviderProps, bF as OnboardingReducerState, bC as OnboardingState, P as PageTaskInput, e as PageTaskReferenceInput, bI as PageTasksPanel, bJ as PageTasksPanelProps, bW as PluginRegistryContext, L as PublicInteractionMode, N as PublicInteractionPolicySnapshot, O as PublicInteractionSurface, Q as PublicModerationMode, bv as QUICK_START_TEMPLATES, bG as QuickStartTemplate, a1 as ReactionCounterSnapshot, a2 as ReactionNode, a3 as ReactionType, bq as ReadyScreen, a$ as RemoteSchemaDefinition, b0 as RemoteSchemaState, R as ReplyContext, bQ as SecurityContextActions, bP as SecurityContextState, bR as SecurityContextValue, bM as SecurityProvider, bS as SecurityProviderProps, b4 as Skeleton, b6 as SkeletonProps, br as SmartWelcome, bs as SyncProgressOverlay, bH as SyncProgressOverlayProps, bK as TaskCollectionEmbed, bL as TaskCollectionEmbedProps, j as TaskProjectionHost, i as TaskProjectionReferenceInput, bn as UnsupportedBrowserScreen, aw as UseAuditOptions, av as UseAuditResult, aQ as UseAuthTraceResult, aS as UseBackupReturn, aA as UseBlameResult, aH as UseCanEditResult, aF as UseCanResult, p as UseCommentsOptions, q as UseCommentsResult, ay as UseDiffResult, aV as UseFileUploadReturn, b as UseFindOptions, c as UseFindResult, aM as UseGrantsResult, aq as UseHistoryResult, al as UseMessageRequestsOptions, am as UseMessageRequestsResult, S as UseModeratedThreadOptions, f as UsePageTaskSyncOptions, g as UsePageTaskSyncResult, a4 as UsePolicyFilteredReactionCountersOptions, a5 as UsePolicyFilteredReactionCountersResult, bU as UseSecurityOptions, bV as UseSecurityResult, k as UseTaskProjectionSyncOptions, m as UseTasksOptions, n as UseTasksResult, at as UseUndoOptions, as as UseUndoResult, aC as UseVerificationResult, V as UseVisibleCommentsOptions, W as UseVisibleCommentsResult, bk as WelcomeScreen, by as copyToClipboard, a7 as createConversationKey, bu as createInitialState, a8 as createMessageRequestProperties, v as createModerationLabelIndex, Y as createReactionCounterSnapshot, Z as dedupeReactions, aI as describeGrantConsent, w as evaluateCommentModeration, a9 as evaluateFirstContactDecision, x as evaluateInteractionPermission, aa as findLatestMessageRequest, bw as getPlatformAuthName, ab as hasAcceptedContact, b5 as injectSkeletonStyles, _ as isReactionVisible, y as moderateThread, bt as onboardingReducer, z as selectActiveInteractionPolicy, B as selectPublicInteractionMode, aN as summarizeAuthTrace, ac as summarizeMessageRequest, D as summarizeModerationLabel, E as summarizePublicInteractionPolicy, $ as summarizeReactionNode, bx as truncateDid, au as useAudit, aO as useAuthTrace, aR as useBackup, az as useBlame, aE as useCan, aG as useCanEdit, c7 as useCommand, c0 as useCommands, an as useCommentCount, ao as useCommentCounts, o as useComments, b_ as useContributions, bc as useDemoMode, ax as useDiff, c4 as useEditorExtensions, c5 as useEditorExtensionsSafe, aT as useFileUpload, u as useFind, aJ as useGrants, ap as useHistory, aW as useHubSearch, aD as useHubStatus, c3 as useImporters, a6 as useMessageRequests, t as useModeratedThread, bi as useOnboarding, d as usePageTaskSync, b1 as usePeerDiscovery, bX as usePluginRegistry, bY as usePluginRegistryOptional, bZ as usePlugins, X as usePolicyFilteredReactionCounters, a_ as useRemoteSchema, bT as useSecurity, bN as useSecurityContext, bO as useSecurityContextOptional, c2 as useSidebarItems, c1 as useSlashCommands, bg as useSyncManager, h as useTaskProjectionSync, l as useTasks, ar as useUndo, aB as useVerification, c6 as useView, b$ as useViews, s as useVisibleComments } from './experimental-B2FrBnkV.js';
|
|
6
6
|
import { SchemaIRI, Schema, SavedViewDescriptor, DefinedSchema, PropertyBuilder, QueryASTOrderBy, QueryASTPage, QueryASTValidationResult, QueryASTPlannerGate, QueryASTAggregateExecution, ExternalReferenceProvider, SavedViewFeedLayout, SavedViewFeedDensity, FieldType, FieldConfig, ViewType, FilterGroup, SortConfig, RowHeight, SummaryFunction, CellValue } from '@xnetjs/data';
|
|
7
7
|
export { ColumnConfig, ColumnDefinition, ColumnType, SavedViewFeedDensity, SavedViewFeedLayout, ViewConfig, ViewType } from '@xnetjs/data';
|
|
8
8
|
import { QueryExecutionMode, QuerySourcePreference, QuerySearchFilter, QueryPageInfo, QueryMetadata } from '@xnetjs/data-bridge';
|
|
@@ -12,7 +12,7 @@ export { DatabaseRow, DatabaseRowData, ReverseRelation, UseCellOptions, UseCellR
|
|
|
12
12
|
export { u as useNodeStore } from './useNodeStore-DTCSBF51.js';
|
|
13
13
|
export { BlobStoreForSync, ConnectionManager, ConnectionManagerConfig, ConnectionStatus, InitialSyncManager, InitialSyncMessage, METABRIDGE_ORIGIN, METABRIDGE_SEED_ORIGIN, MetaBridge, MultiHubConnectionManagerConfig, NodePool, NodePoolConfig, NodeStoreSyncProvider, NodeSyncResponse, OfflineQueue, OfflineQueueConfig, PoolEntryState, ProgressListener, QueueEntry, Registry, RegistryConfig, RegistryStorage, SerializedNodeChange, SyncManager, SyncManagerConfig, SyncStatus as SyncManagerStatus, SyncPhase, SyncProgress, SyncReconciliationOptions, SyncReconciliationReport, TrackedNode, WebSocketSyncProvider, WebSocketSyncProviderOptions, createConnectionManager, createInitialSyncManager, createMetaBridge, createMultiHubConnectionManager, createNodePool, createOfflineQueue, createRegistry, createSyncManager } from '@xnetjs/runtime';
|
|
14
14
|
import { Subscription, Customer, Invoice, Payment } from '@xnetjs/billing';
|
|
15
|
-
export { n as TRACE_STAGES, s as TracingAttributes, T as TracingContext, p as TracingHandle, o as TracingReporter, r as TracingRootKind, q as TracingSpanInput, f as XNetConfig, X as XNetContextValue, e as XNetProvider, g as XNetProviderProps, h as XNetRuntimeConfig, i as XNetRuntimeFallback, j as XNetRuntimeMode, k as XNetRuntimePhase, d as XNetRuntimeStatus, l as XNetRuntimeWorkerConfig, m as useTracingReporter, a as useXNet } from './context-CFu9i136.js';
|
|
15
|
+
export { n as TRACE_STAGES, s as TracingAttributes, T as TracingContext, p as TracingHandle, o as TracingReporter, r as TracingRootKind, q as TracingSpanInput, f as XNetConfig, X as XNetContextValue, e as XNetProvider, g as XNetProviderProps, h as XNetRuntimeConfig, i as XNetRuntimeFallback, j as XNetRuntimeMode, k as XNetRuntimePhase, d as XNetRuntimeStatus, l as XNetRuntimeWorkerConfig, u as useDataBridge, m as useTracingReporter, a as useXNet } from './context-CFu9i136.js';
|
|
16
16
|
export { I as InstrumentationContext, a as InstrumentationContextValue, Q as QueryTrackerLike, Y as YDocRegistryLike, u as useInstrumentation } from './instrumentation-CpIuG2y5.js';
|
|
17
17
|
export { a as TelemetryContext, T as TelemetryReporter, u as useTelemetryReporter } from './telemetry-context-B7r6H1KW.js';
|
|
18
18
|
import '@xnetjs/core';
|
package/dist/index.js
CHANGED
|
@@ -94,7 +94,7 @@ import {
|
|
|
94
94
|
useUndo,
|
|
95
95
|
useVerification,
|
|
96
96
|
useVisibleComments
|
|
97
|
-
} from "./chunk-
|
|
97
|
+
} from "./chunk-7OQXRHEQ.js";
|
|
98
98
|
import {
|
|
99
99
|
EMPTY_PAGE_INFO,
|
|
100
100
|
computeFallbackPageInfo,
|
|
@@ -5094,6 +5094,7 @@ export {
|
|
|
5094
5094
|
useCommentCounts,
|
|
5095
5095
|
useComments,
|
|
5096
5096
|
useContributions,
|
|
5097
|
+
useDataBridge,
|
|
5097
5098
|
useDatabase,
|
|
5098
5099
|
useDatabaseDoc,
|
|
5099
5100
|
useDatabaseRow,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xnetjs/react",
|
|
3
|
-
"version": "0.0
|
|
3
|
+
"version": "0.1.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -46,15 +46,15 @@
|
|
|
46
46
|
"y-protocols": "^1.0.6",
|
|
47
47
|
"yjs": "^13.6.24",
|
|
48
48
|
"@xnetjs/billing": "0.0.2",
|
|
49
|
-
"@xnetjs/core": "0.0
|
|
50
|
-
"@xnetjs/crypto": "0.0
|
|
51
|
-
"@xnetjs/data": "0.0
|
|
52
|
-
"@xnetjs/data-bridge": "0.0
|
|
53
|
-
"@xnetjs/history": "0.0
|
|
54
|
-
"@xnetjs/identity": "0.0
|
|
55
|
-
"@xnetjs/plugins": "0.0
|
|
56
|
-
"@xnetjs/runtime": "0.0
|
|
57
|
-
"@xnetjs/sync": "0.0
|
|
49
|
+
"@xnetjs/core": "0.1.0",
|
|
50
|
+
"@xnetjs/crypto": "0.1.0",
|
|
51
|
+
"@xnetjs/data": "0.1.0",
|
|
52
|
+
"@xnetjs/data-bridge": "0.1.0",
|
|
53
|
+
"@xnetjs/history": "0.1.0",
|
|
54
|
+
"@xnetjs/identity": "0.1.0",
|
|
55
|
+
"@xnetjs/plugins": "0.1.0",
|
|
56
|
+
"@xnetjs/runtime": "0.1.0",
|
|
57
|
+
"@xnetjs/sync": "0.1.0"
|
|
58
58
|
},
|
|
59
59
|
"peerDependencies": {
|
|
60
60
|
"react": "^18.0.0 || ^19.0.0"
|