@dxos/plugin-client 0.8.2-main.5885341 → 0.8.2-main.5ca3450
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/{app-graph-builder-WAS4YZNA.mjs → app-graph-builder-2MEWX6SJ.mjs} +2 -2
- package/dist/lib/browser/chunk-KBYCZ4HW.mjs +105 -0
- package/dist/lib/browser/chunk-KBYCZ4HW.mjs.map +7 -0
- package/dist/lib/browser/{chunk-XNV35HZK.mjs → chunk-LOUI7XSH.mjs} +8 -8
- package/dist/lib/browser/{chunk-XNV35HZK.mjs.map → chunk-LOUI7XSH.mjs.map} +3 -3
- package/dist/lib/browser/index.mjs +5 -5
- package/dist/lib/browser/index.mjs.map +3 -3
- package/dist/lib/browser/{intent-resolver-Y5GTS7CW.mjs → intent-resolver-UME7DARZ.mjs} +3 -3
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/{react-surface-AUZGNKC5.mjs → react-surface-A2R3JYXX.mjs} +3 -3
- package/dist/lib/browser/{schema-JQAT6Q7S.mjs → schema-defs-VAAQHAM7.mjs} +4 -4
- package/dist/lib/browser/{schema-JQAT6Q7S.mjs.map → schema-defs-VAAQHAM7.mjs.map} +2 -2
- package/dist/lib/browser/types.mjs +1 -1
- package/dist/lib/node/{app-graph-builder-PXOJZJO5.cjs → app-graph-builder-JBJ243GL.cjs} +13 -13
- package/dist/lib/node/{chunk-FROKBEVH.cjs → chunk-7MPFFPR7.cjs} +47 -47
- package/dist/lib/node/chunk-7MPFFPR7.cjs.map +7 -0
- package/dist/lib/node/{chunk-QNZIRU35.cjs → chunk-HEC6UXQX.cjs} +11 -11
- package/dist/lib/node/{chunk-QNZIRU35.cjs.map → chunk-HEC6UXQX.cjs.map} +3 -3
- package/dist/lib/node/index.cjs +5 -5
- package/dist/lib/node/index.cjs.map +3 -3
- package/dist/lib/node/{intent-resolver-ZFYETGJI.cjs → intent-resolver-33S7BRJP.cjs} +22 -22
- package/dist/lib/node/meta.json +1 -1
- package/dist/lib/node/{react-surface-GBPBVXLE.cjs → react-surface-FYWDPVXT.cjs} +24 -24
- package/dist/lib/node/{schema-INQ72F54.cjs → schema-defs-XMQEOUXA.cjs} +6 -6
- package/dist/lib/node/{schema-INQ72F54.cjs.map → schema-defs-XMQEOUXA.cjs.map} +2 -2
- package/dist/lib/node/types.cjs +3 -3
- package/dist/lib/node/types.cjs.map +1 -1
- package/dist/lib/node-esm/{app-graph-builder-KIN6NWFI.mjs → app-graph-builder-7NA7GGEF.mjs} +2 -2
- package/dist/lib/node-esm/{chunk-6G43BNMU.mjs → chunk-37CRJHYH.mjs} +8 -8
- package/dist/lib/node-esm/{chunk-6G43BNMU.mjs.map → chunk-37CRJHYH.mjs.map} +3 -3
- package/dist/lib/node-esm/chunk-ALO6XJEZ.mjs +106 -0
- package/dist/lib/node-esm/chunk-ALO6XJEZ.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +5 -5
- package/dist/lib/node-esm/index.mjs.map +3 -3
- package/dist/lib/node-esm/{intent-resolver-OVG4QCHK.mjs → intent-resolver-4ULBB4ZA.mjs} +3 -3
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/{react-surface-SMPVSOTA.mjs → react-surface-VXMRB7IY.mjs} +3 -3
- package/dist/lib/node-esm/{schema-OK7HY3JJ.mjs → schema-defs-YQULJ6B6.mjs} +4 -4
- package/dist/lib/node-esm/{schema-OK7HY3JJ.mjs.map → schema-defs-YQULJ6B6.mjs.map} +2 -2
- package/dist/lib/node-esm/types.mjs +1 -1
- package/dist/types/src/ClientPlugin.d.ts.map +1 -1
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
- package/dist/types/src/capabilities/client.d.ts.map +1 -1
- package/dist/types/src/capabilities/index.d.ts +1 -1
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/intent-resolver.d.ts.map +1 -1
- package/dist/types/src/capabilities/migrations.d.ts.map +1 -1
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
- package/dist/types/src/capabilities/{schema.d.ts → schema-defs.d.ts} +1 -1
- package/dist/types/src/capabilities/schema-defs.d.ts.map +1 -0
- package/dist/types/src/components/DevicesContainer.d.ts.map +1 -1
- package/dist/types/src/components/JoinDialog.d.ts.map +1 -1
- package/dist/types/src/components/RecoveryCodeDialog.d.ts.map +1 -1
- package/dist/types/src/components/ResetDialog.d.ts.map +1 -1
- package/dist/types/src/types.d.ts +51 -51
- package/dist/types/src/types.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +25 -24
- package/src/ClientPlugin.ts +2 -2
- package/src/capabilities/index.ts +1 -1
- package/src/components/ProfileContainer.tsx +7 -7
- package/src/types.ts +48 -44
- package/dist/lib/browser/chunk-AN7FJKIJ.mjs +0 -105
- package/dist/lib/browser/chunk-AN7FJKIJ.mjs.map +0 -7
- package/dist/lib/node/chunk-FROKBEVH.cjs.map +0 -7
- package/dist/lib/node-esm/chunk-AD5W5QCQ.mjs +0 -106
- package/dist/lib/node-esm/chunk-AD5W5QCQ.mjs.map +0 -7
- package/dist/types/src/capabilities/schema.d.ts.map +0 -1
- /package/dist/lib/browser/{app-graph-builder-WAS4YZNA.mjs.map → app-graph-builder-2MEWX6SJ.mjs.map} +0 -0
- /package/dist/lib/browser/{intent-resolver-Y5GTS7CW.mjs.map → intent-resolver-UME7DARZ.mjs.map} +0 -0
- /package/dist/lib/browser/{react-surface-AUZGNKC5.mjs.map → react-surface-A2R3JYXX.mjs.map} +0 -0
- /package/dist/lib/node/{app-graph-builder-PXOJZJO5.cjs.map → app-graph-builder-JBJ243GL.cjs.map} +0 -0
- /package/dist/lib/node/{intent-resolver-ZFYETGJI.cjs.map → intent-resolver-33S7BRJP.cjs.map} +0 -0
- /package/dist/lib/node/{react-surface-GBPBVXLE.cjs.map → react-surface-FYWDPVXT.cjs.map} +0 -0
- /package/dist/lib/node-esm/{app-graph-builder-KIN6NWFI.mjs.map → app-graph-builder-7NA7GGEF.mjs.map} +0 -0
- /package/dist/lib/node-esm/{intent-resolver-OVG4QCHK.mjs.map → intent-resolver-4ULBB4ZA.mjs.map} +0 -0
- /package/dist/lib/node-esm/{react-surface-SMPVSOTA.mjs.map → react-surface-VXMRB7IY.mjs.map} +0 -0
- /package/src/capabilities/{schema.ts → schema-defs.ts} +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dxos/plugin-client",
|
|
3
|
-
"version": "0.8.2-main.
|
|
3
|
+
"version": "0.8.2-main.5ca3450",
|
|
4
4
|
"description": "DXOS Surface plugin for DXOS Client",
|
|
5
5
|
"homepage": "https://dxos.org",
|
|
6
6
|
"bugs": "https://github.com/dxos/dxos/issues",
|
|
@@ -34,23 +34,24 @@
|
|
|
34
34
|
],
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"@preact/signals-core": "^1.6.0",
|
|
37
|
+
"effect": "3.14.21",
|
|
37
38
|
"react-qr-rounded": "^1.0.0",
|
|
38
|
-
"@dxos/app-framework": "0.8.2-main.
|
|
39
|
-
"@dxos/
|
|
40
|
-
"@dxos/
|
|
41
|
-
"@dxos/
|
|
42
|
-
"@dxos/
|
|
43
|
-
"@dxos/
|
|
44
|
-
"@dxos/echo-signals": "0.8.2-main.
|
|
45
|
-
"@dxos/
|
|
46
|
-
"@dxos/
|
|
47
|
-
"@dxos/plugin-observability": "0.8.2-main.
|
|
48
|
-
"@dxos/
|
|
49
|
-
"@dxos/react-ui-form": "0.8.2-main.
|
|
50
|
-
"@dxos/react-ui-pickers": "0.8.2-main.
|
|
51
|
-
"@dxos/
|
|
52
|
-
"@dxos/
|
|
53
|
-
"@dxos/
|
|
39
|
+
"@dxos/app-framework": "0.8.2-main.5ca3450",
|
|
40
|
+
"@dxos/config": "0.8.2-main.5ca3450",
|
|
41
|
+
"@dxos/async": "0.8.2-main.5ca3450",
|
|
42
|
+
"@dxos/echo-schema": "0.8.2-main.5ca3450",
|
|
43
|
+
"@dxos/invariant": "0.8.2-main.5ca3450",
|
|
44
|
+
"@dxos/log": "0.8.2-main.5ca3450",
|
|
45
|
+
"@dxos/echo-signals": "0.8.2-main.5ca3450",
|
|
46
|
+
"@dxos/local-storage": "0.8.2-main.5ca3450",
|
|
47
|
+
"@dxos/plugin-graph": "0.8.2-main.5ca3450",
|
|
48
|
+
"@dxos/plugin-observability": "0.8.2-main.5ca3450",
|
|
49
|
+
"@dxos/react-client": "0.8.2-main.5ca3450",
|
|
50
|
+
"@dxos/react-ui-form": "0.8.2-main.5ca3450",
|
|
51
|
+
"@dxos/react-ui-pickers": "0.8.2-main.5ca3450",
|
|
52
|
+
"@dxos/react-ui-stack": "0.8.2-main.5ca3450",
|
|
53
|
+
"@dxos/shell": "0.8.2-main.5ca3450",
|
|
54
|
+
"@dxos/util": "0.8.2-main.5ca3450"
|
|
54
55
|
},
|
|
55
56
|
"devDependencies": {
|
|
56
57
|
"@phosphor-icons/react": "^2.1.5",
|
|
@@ -60,18 +61,18 @@
|
|
|
60
61
|
"react": "~18.2.0",
|
|
61
62
|
"react-dom": "~18.2.0",
|
|
62
63
|
"vite": "5.4.7",
|
|
63
|
-
"@dxos/
|
|
64
|
-
"@dxos/
|
|
65
|
-
"@dxos/react-ui-theme": "0.8.2-main.
|
|
66
|
-
"@dxos/storybook-utils": "0.8.2-main.
|
|
64
|
+
"@dxos/live-object": "0.8.2-main.5ca3450",
|
|
65
|
+
"@dxos/react-ui": "0.8.2-main.5ca3450",
|
|
66
|
+
"@dxos/react-ui-theme": "0.8.2-main.5ca3450",
|
|
67
|
+
"@dxos/storybook-utils": "0.8.2-main.5ca3450"
|
|
67
68
|
},
|
|
68
69
|
"peerDependencies": {
|
|
69
70
|
"@phosphor-icons/react": "^2.1.5",
|
|
70
|
-
"effect": "3.13.3",
|
|
71
|
+
"effect": "^3.13.3",
|
|
71
72
|
"react": "~18.2.0",
|
|
72
73
|
"react-dom": "~18.2.0",
|
|
73
|
-
"@dxos/react-ui
|
|
74
|
-
"@dxos/react-ui": "0.8.2-main.
|
|
74
|
+
"@dxos/react-ui": "0.8.2-main.5ca3450",
|
|
75
|
+
"@dxos/react-ui-theme": "0.8.2-main.5ca3450"
|
|
75
76
|
},
|
|
76
77
|
"publishConfig": {
|
|
77
78
|
"access": "public"
|
package/src/ClientPlugin.ts
CHANGED
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
Migrations,
|
|
12
12
|
ReactContext,
|
|
13
13
|
ReactSurface,
|
|
14
|
-
|
|
14
|
+
SchemaDefs,
|
|
15
15
|
} from './capabilities';
|
|
16
16
|
import { ClientEvents } from './events';
|
|
17
17
|
import { meta } from './meta';
|
|
@@ -41,7 +41,7 @@ export const ClientPlugin = ({
|
|
|
41
41
|
id: `${meta.id}/module/schema`,
|
|
42
42
|
activatesOn: ClientEvents.ClientReady,
|
|
43
43
|
activatesBefore: [ClientEvents.SetupSchema],
|
|
44
|
-
activate:
|
|
44
|
+
activate: SchemaDefs,
|
|
45
45
|
}),
|
|
46
46
|
defineModule({
|
|
47
47
|
id: `${meta.id}/module/migration`,
|
|
@@ -10,6 +10,6 @@ export const IntentResolver = lazy(async () => import('./intent-resolver'));
|
|
|
10
10
|
export const Migrations = lazy(async () => import('./migrations'));
|
|
11
11
|
export const ReactContext = lazy(async () => import('./react-context'));
|
|
12
12
|
export const ReactSurface = lazy(async () => import('./react-surface'));
|
|
13
|
-
export const
|
|
13
|
+
export const SchemaDefs = lazy(async () => import('./schema-defs'));
|
|
14
14
|
|
|
15
15
|
export * from './capabilities';
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import { Schema
|
|
5
|
+
import { Schema } from 'effect';
|
|
6
6
|
import React, { type ChangeEvent, useCallback, useMemo, useState } from 'react';
|
|
7
7
|
|
|
8
8
|
import { debounce } from '@dxos/async';
|
|
@@ -163,10 +163,10 @@ export const ProfileContainer = () => {
|
|
|
163
163
|
};
|
|
164
164
|
|
|
165
165
|
// TODO(wittjosiah): Integrate annotations with translations.
|
|
166
|
-
const ProfileSchema =
|
|
167
|
-
displayName:
|
|
168
|
-
emoji:
|
|
169
|
-
hue:
|
|
170
|
-
did:
|
|
166
|
+
const ProfileSchema = Schema.Struct({
|
|
167
|
+
displayName: Schema.String.annotations({ title: 'Display name' }),
|
|
168
|
+
emoji: Schema.String.annotations({ title: 'Avatar' }),
|
|
169
|
+
hue: Schema.String.annotations({ title: 'Color' }),
|
|
170
|
+
did: Schema.String.annotations({ title: 'DID' }),
|
|
171
171
|
});
|
|
172
|
-
type Profile =
|
|
172
|
+
type Profile = Schema.Schema.Type<typeof ProfileSchema>;
|
package/src/types.ts
CHANGED
|
@@ -2,84 +2,88 @@
|
|
|
2
2
|
// Copyright 2024 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
+
import { Schema } from 'effect';
|
|
6
|
+
|
|
5
7
|
import { type PluginsContext } from '@dxos/app-framework';
|
|
6
|
-
import { S } from '@dxos/echo-schema';
|
|
7
8
|
import { type Client, PublicKey, type ClientOptions } from '@dxos/react-client';
|
|
8
9
|
import { type MaybePromise } from '@dxos/util';
|
|
9
10
|
|
|
10
11
|
import { CLIENT_PLUGIN } from './meta';
|
|
11
12
|
|
|
12
13
|
// TODO(wittjosiah): Factor out. Generate?
|
|
13
|
-
const IdentitySchema =
|
|
14
|
-
identityKey:
|
|
15
|
-
spaceKey:
|
|
16
|
-
profile:
|
|
17
|
-
|
|
18
|
-
displayName:
|
|
19
|
-
avatarCid:
|
|
20
|
-
data:
|
|
14
|
+
const IdentitySchema = Schema.Struct({
|
|
15
|
+
identityKey: Schema.instanceOf(PublicKey),
|
|
16
|
+
spaceKey: Schema.optional(Schema.instanceOf(PublicKey)),
|
|
17
|
+
profile: Schema.optional(
|
|
18
|
+
Schema.Struct({
|
|
19
|
+
displayName: Schema.optional(Schema.String),
|
|
20
|
+
avatarCid: Schema.optional(Schema.String),
|
|
21
|
+
data: Schema.optional(Schema.Record({ key: Schema.String, value: Schema.Any })),
|
|
21
22
|
}),
|
|
22
23
|
),
|
|
23
24
|
});
|
|
24
25
|
|
|
25
26
|
const CLIENT_ACTION = `${CLIENT_PLUGIN}/action`;
|
|
26
27
|
export namespace ClientAction {
|
|
27
|
-
export class CreateIdentity extends
|
|
28
|
-
input:
|
|
29
|
-
displayName:
|
|
28
|
+
export class CreateIdentity extends Schema.TaggedClass<CreateIdentity>()(`${CLIENT_ACTION}/create-identity`, {
|
|
29
|
+
input: Schema.Struct({
|
|
30
|
+
displayName: Schema.optional(Schema.String),
|
|
30
31
|
}),
|
|
31
32
|
output: IdentitySchema,
|
|
32
33
|
}) {}
|
|
33
34
|
|
|
34
|
-
export class JoinIdentity extends
|
|
35
|
-
input:
|
|
36
|
-
invitationCode:
|
|
35
|
+
export class JoinIdentity extends Schema.TaggedClass<JoinIdentity>()(`${CLIENT_ACTION}/join-identity`, {
|
|
36
|
+
input: Schema.Struct({
|
|
37
|
+
invitationCode: Schema.optional(Schema.String),
|
|
37
38
|
}),
|
|
38
|
-
output:
|
|
39
|
+
output: Schema.Void,
|
|
39
40
|
}) {}
|
|
40
41
|
|
|
41
|
-
export class ShareIdentity extends
|
|
42
|
-
input:
|
|
43
|
-
output:
|
|
42
|
+
export class ShareIdentity extends Schema.TaggedClass<ShareIdentity>()(`${CLIENT_ACTION}/share-identity`, {
|
|
43
|
+
input: Schema.Void,
|
|
44
|
+
output: Schema.Void,
|
|
44
45
|
}) {}
|
|
45
46
|
|
|
46
|
-
export class RecoverIdentity extends
|
|
47
|
-
input:
|
|
48
|
-
output:
|
|
47
|
+
export class RecoverIdentity extends Schema.TaggedClass<RecoverIdentity>()(`${CLIENT_ACTION}/recover-identity`, {
|
|
48
|
+
input: Schema.Void,
|
|
49
|
+
output: Schema.Void,
|
|
49
50
|
}) {}
|
|
50
51
|
|
|
51
|
-
export class ResetStorage extends
|
|
52
|
-
input:
|
|
53
|
-
mode:
|
|
52
|
+
export class ResetStorage extends Schema.TaggedClass<ResetStorage>()(`${CLIENT_ACTION}/reset-storage`, {
|
|
53
|
+
input: Schema.Struct({
|
|
54
|
+
mode: Schema.optional(Schema.String),
|
|
54
55
|
}),
|
|
55
|
-
output:
|
|
56
|
-
}) {}
|
|
57
|
-
|
|
58
|
-
export class CreateAgent extends S.TaggedClass<CreateAgent>()(`${CLIENT_ACTION}/create-agent`, {
|
|
59
|
-
input: S.Void,
|
|
60
|
-
output: S.Void,
|
|
56
|
+
output: Schema.Void,
|
|
61
57
|
}) {}
|
|
62
58
|
|
|
63
|
-
export class
|
|
64
|
-
input:
|
|
65
|
-
output:
|
|
59
|
+
export class CreateAgent extends Schema.TaggedClass<CreateAgent>()(`${CLIENT_ACTION}/create-agent`, {
|
|
60
|
+
input: Schema.Void,
|
|
61
|
+
output: Schema.Void,
|
|
66
62
|
}) {}
|
|
67
63
|
|
|
68
|
-
export class
|
|
69
|
-
|
|
70
|
-
|
|
64
|
+
export class CreateRecoveryCode extends Schema.TaggedClass<CreateRecoveryCode>()(
|
|
65
|
+
`${CLIENT_ACTION}/create-recovery-code`,
|
|
66
|
+
{
|
|
67
|
+
input: Schema.Void,
|
|
68
|
+
output: Schema.Void,
|
|
69
|
+
},
|
|
70
|
+
) {}
|
|
71
|
+
|
|
72
|
+
export class CreatePasskey extends Schema.TaggedClass<CreatePasskey>()(`${CLIENT_ACTION}/create-passkey`, {
|
|
73
|
+
input: Schema.Void,
|
|
74
|
+
output: Schema.Void,
|
|
71
75
|
}) {}
|
|
72
76
|
|
|
73
|
-
export class RedeemPasskey extends
|
|
74
|
-
input:
|
|
75
|
-
output:
|
|
77
|
+
export class RedeemPasskey extends Schema.TaggedClass<RedeemPasskey>()(`${CLIENT_ACTION}/redeem-passkey`, {
|
|
78
|
+
input: Schema.Void,
|
|
79
|
+
output: Schema.Void,
|
|
76
80
|
}) {}
|
|
77
81
|
|
|
78
|
-
export class RedeemToken extends
|
|
79
|
-
input:
|
|
80
|
-
token:
|
|
82
|
+
export class RedeemToken extends Schema.TaggedClass<RedeemToken>()(`${CLIENT_ACTION}/redeem-token`, {
|
|
83
|
+
input: Schema.Struct({
|
|
84
|
+
token: Schema.String,
|
|
81
85
|
}),
|
|
82
|
-
output:
|
|
86
|
+
output: Schema.Void,
|
|
83
87
|
}) {}
|
|
84
88
|
}
|
|
85
89
|
|
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
CLIENT_PLUGIN
|
|
3
|
-
} from "./chunk-MCEXD5XH.mjs";
|
|
4
|
-
|
|
5
|
-
// packages/plugins/plugin-client/src/types.ts
|
|
6
|
-
import { S } from "@dxos/echo-schema";
|
|
7
|
-
import { PublicKey } from "@dxos/react-client";
|
|
8
|
-
var IdentitySchema = S.Struct({
|
|
9
|
-
identityKey: S.instanceOf(PublicKey),
|
|
10
|
-
spaceKey: S.optional(S.instanceOf(PublicKey)),
|
|
11
|
-
profile: S.optional(S.Struct({
|
|
12
|
-
displayName: S.optional(S.String),
|
|
13
|
-
avatarCid: S.optional(S.String),
|
|
14
|
-
data: S.optional(S.Record({
|
|
15
|
-
key: S.String,
|
|
16
|
-
value: S.Any
|
|
17
|
-
}))
|
|
18
|
-
}))
|
|
19
|
-
});
|
|
20
|
-
var CLIENT_ACTION = `${CLIENT_PLUGIN}/action`;
|
|
21
|
-
var ClientAction;
|
|
22
|
-
(function(ClientAction2) {
|
|
23
|
-
class CreateIdentity extends S.TaggedClass()(`${CLIENT_ACTION}/create-identity`, {
|
|
24
|
-
input: S.Struct({
|
|
25
|
-
displayName: S.optional(S.String)
|
|
26
|
-
}),
|
|
27
|
-
output: IdentitySchema
|
|
28
|
-
}) {
|
|
29
|
-
}
|
|
30
|
-
ClientAction2.CreateIdentity = CreateIdentity;
|
|
31
|
-
class JoinIdentity extends S.TaggedClass()(`${CLIENT_ACTION}/join-identity`, {
|
|
32
|
-
input: S.Struct({
|
|
33
|
-
invitationCode: S.optional(S.String)
|
|
34
|
-
}),
|
|
35
|
-
output: S.Void
|
|
36
|
-
}) {
|
|
37
|
-
}
|
|
38
|
-
ClientAction2.JoinIdentity = JoinIdentity;
|
|
39
|
-
class ShareIdentity extends S.TaggedClass()(`${CLIENT_ACTION}/share-identity`, {
|
|
40
|
-
input: S.Void,
|
|
41
|
-
output: S.Void
|
|
42
|
-
}) {
|
|
43
|
-
}
|
|
44
|
-
ClientAction2.ShareIdentity = ShareIdentity;
|
|
45
|
-
class RecoverIdentity extends S.TaggedClass()(`${CLIENT_ACTION}/recover-identity`, {
|
|
46
|
-
input: S.Void,
|
|
47
|
-
output: S.Void
|
|
48
|
-
}) {
|
|
49
|
-
}
|
|
50
|
-
ClientAction2.RecoverIdentity = RecoverIdentity;
|
|
51
|
-
class ResetStorage extends S.TaggedClass()(`${CLIENT_ACTION}/reset-storage`, {
|
|
52
|
-
input: S.Struct({
|
|
53
|
-
mode: S.optional(S.String)
|
|
54
|
-
}),
|
|
55
|
-
output: S.Void
|
|
56
|
-
}) {
|
|
57
|
-
}
|
|
58
|
-
ClientAction2.ResetStorage = ResetStorage;
|
|
59
|
-
class CreateAgent extends S.TaggedClass()(`${CLIENT_ACTION}/create-agent`, {
|
|
60
|
-
input: S.Void,
|
|
61
|
-
output: S.Void
|
|
62
|
-
}) {
|
|
63
|
-
}
|
|
64
|
-
ClientAction2.CreateAgent = CreateAgent;
|
|
65
|
-
class CreateRecoveryCode extends S.TaggedClass()(`${CLIENT_ACTION}/create-recovery-code`, {
|
|
66
|
-
input: S.Void,
|
|
67
|
-
output: S.Void
|
|
68
|
-
}) {
|
|
69
|
-
}
|
|
70
|
-
ClientAction2.CreateRecoveryCode = CreateRecoveryCode;
|
|
71
|
-
class CreatePasskey extends S.TaggedClass()(`${CLIENT_ACTION}/create-passkey`, {
|
|
72
|
-
input: S.Void,
|
|
73
|
-
output: S.Void
|
|
74
|
-
}) {
|
|
75
|
-
}
|
|
76
|
-
ClientAction2.CreatePasskey = CreatePasskey;
|
|
77
|
-
class RedeemPasskey extends S.TaggedClass()(`${CLIENT_ACTION}/redeem-passkey`, {
|
|
78
|
-
input: S.Void,
|
|
79
|
-
output: S.Void
|
|
80
|
-
}) {
|
|
81
|
-
}
|
|
82
|
-
ClientAction2.RedeemPasskey = RedeemPasskey;
|
|
83
|
-
class RedeemToken extends S.TaggedClass()(`${CLIENT_ACTION}/redeem-token`, {
|
|
84
|
-
input: S.Struct({
|
|
85
|
-
token: S.String
|
|
86
|
-
}),
|
|
87
|
-
output: S.Void
|
|
88
|
-
}) {
|
|
89
|
-
}
|
|
90
|
-
ClientAction2.RedeemToken = RedeemToken;
|
|
91
|
-
})(ClientAction || (ClientAction = {}));
|
|
92
|
-
var Account;
|
|
93
|
-
(function(Account2) {
|
|
94
|
-
const _id = "dxos.org.plugin.client.account";
|
|
95
|
-
Account2.id = `!${_id}`;
|
|
96
|
-
Account2.Profile = `${_id}.profile`;
|
|
97
|
-
Account2.Devices = `${_id}.devices`;
|
|
98
|
-
Account2.Security = `${_id}.security`;
|
|
99
|
-
})(Account || (Account = {}));
|
|
100
|
-
|
|
101
|
-
export {
|
|
102
|
-
ClientAction,
|
|
103
|
-
Account
|
|
104
|
-
};
|
|
105
|
-
//# sourceMappingURL=chunk-AN7FJKIJ.mjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/types.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2024 DXOS.org\n//\n\nimport { type PluginsContext } from '@dxos/app-framework';\nimport { S } from '@dxos/echo-schema';\nimport { type Client, PublicKey, type ClientOptions } from '@dxos/react-client';\nimport { type MaybePromise } from '@dxos/util';\n\nimport { CLIENT_PLUGIN } from './meta';\n\n// TODO(wittjosiah): Factor out. Generate?\nconst IdentitySchema = S.Struct({\n identityKey: S.instanceOf(PublicKey),\n spaceKey: S.optional(S.instanceOf(PublicKey)),\n profile: S.optional(\n S.Struct({\n displayName: S.optional(S.String),\n avatarCid: S.optional(S.String),\n data: S.optional(S.Record({ key: S.String, value: S.Any })),\n }),\n ),\n});\n\nconst CLIENT_ACTION = `${CLIENT_PLUGIN}/action`;\nexport namespace ClientAction {\n export class CreateIdentity extends S.TaggedClass<CreateIdentity>()(`${CLIENT_ACTION}/create-identity`, {\n input: S.Struct({\n displayName: S.optional(S.String),\n }),\n output: IdentitySchema,\n }) {}\n\n export class JoinIdentity extends S.TaggedClass<JoinIdentity>()(`${CLIENT_ACTION}/join-identity`, {\n input: S.Struct({\n invitationCode: S.optional(S.String),\n }),\n output: S.Void,\n }) {}\n\n export class ShareIdentity extends S.TaggedClass<ShareIdentity>()(`${CLIENT_ACTION}/share-identity`, {\n input: S.Void,\n output: S.Void,\n }) {}\n\n export class RecoverIdentity extends S.TaggedClass<RecoverIdentity>()(`${CLIENT_ACTION}/recover-identity`, {\n input: S.Void,\n output: S.Void,\n }) {}\n\n export class ResetStorage extends S.TaggedClass<ResetStorage>()(`${CLIENT_ACTION}/reset-storage`, {\n input: S.Struct({\n mode: S.optional(S.String),\n }),\n output: S.Void,\n }) {}\n\n export class CreateAgent extends S.TaggedClass<CreateAgent>()(`${CLIENT_ACTION}/create-agent`, {\n input: S.Void,\n output: S.Void,\n }) {}\n\n export class CreateRecoveryCode extends S.TaggedClass<CreateRecoveryCode>()(`${CLIENT_ACTION}/create-recovery-code`, {\n input: S.Void,\n output: S.Void,\n }) {}\n\n export class CreatePasskey extends S.TaggedClass<CreatePasskey>()(`${CLIENT_ACTION}/create-passkey`, {\n input: S.Void,\n output: S.Void,\n }) {}\n\n export class RedeemPasskey extends S.TaggedClass<RedeemPasskey>()(`${CLIENT_ACTION}/redeem-passkey`, {\n input: S.Void,\n output: S.Void,\n }) {}\n\n export class RedeemToken extends S.TaggedClass<RedeemToken>()(`${CLIENT_ACTION}/redeem-token`, {\n input: S.Struct({\n token: S.String,\n }),\n output: S.Void,\n }) {}\n}\n\nexport type ClientPluginOptions = ClientOptions & {\n /**\n * Base URL for the invitation link.\n */\n invitationUrl?: string;\n\n /**\n * Query parameter for the invitation code.\n */\n invitationParam?: string;\n\n /**\n * Run after the client has been initialized.\n */\n onClientInitialized?: (context: PluginsContext, client: Client) => MaybePromise<void>;\n\n /**\n * Called when the client is reset.\n */\n onReset?: (params: { target?: string }) => MaybePromise<void>;\n};\n\nexport namespace Account {\n // TODO(wittjosiah): Cannot use slashes in ids until we have a router which decouples ids from url paths.\n const _id = 'dxos.org.plugin.client.account';\n // TODO(wittjosiah): This is a hack to prevent the previous deck from being set for pinned items.\n // Ideally this should be worked into the data model in a generic way.\n export const id = `!${_id}`;\n\n export const Profile = `${_id}.profile`;\n export const Devices = `${_id}.devices`;\n export const Security = `${_id}.security`;\n}\n"],
|
|
5
|
-
"mappings": ";;;;;AAKA,SAASA,SAAS;AAClB,SAAsBC,iBAAqC;AAM3D,IAAMC,iBAAiBC,EAAEC,OAAO;EAC9BC,aAAaF,EAAEG,WAAWC,SAAAA;EAC1BC,UAAUL,EAAEM,SAASN,EAAEG,WAAWC,SAAAA,CAAAA;EAClCG,SAASP,EAAEM,SACTN,EAAEC,OAAO;IACPO,aAAaR,EAAEM,SAASN,EAAES,MAAM;IAChCC,WAAWV,EAAEM,SAASN,EAAES,MAAM;IAC9BE,MAAMX,EAAEM,SAASN,EAAEY,OAAO;MAAEC,KAAKb,EAAES;MAAQK,OAAOd,EAAEe;IAAI,CAAA,CAAA;EAC1D,CAAA,CAAA;AAEJ,CAAA;AAEA,IAAMC,gBAAgB,GAAGC,aAAAA;;UACRC,eAAAA;EACR,MAAMC,uBAAuBnB,EAAEoB,YAAW,EAAmB,GAAGJ,aAAAA,oBAAiC;IACtGK,OAAOrB,EAAEC,OAAO;MACdO,aAAaR,EAAEM,SAASN,EAAES,MAAM;IAClC,CAAA;IACAa,QAAQvB;EACV,CAAA,EAAA;EAAI;gBALSoB,iBAAAA;EAON,MAAMI,qBAAqBvB,EAAEoB,YAAW,EAAiB,GAAGJ,aAA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OAAOrB,EAAEyB;IACTH,QAAQtB,EAAEyB;EACZ,CAAA,EAAA;EAAI;gBAHSQ,gBAAAA;EAKN,MAAMC,oBAAoBlC,EAAEoB,YAAW,EAAgB,GAAGJ,aAAAA,iBAA8B;IAC7FK,OAAOrB,EAAEC,OAAO;MACdkC,OAAOnC,EAAES;IACX,CAAA;IACAa,QAAQtB,EAAEyB;EACZ,CAAA,EAAA;EAAI;gBALSS,cAAAA;AAMf,GA1DiBhB,iBAAAA,eAAAA,CAAAA,EAAAA;;UAkFAkB,UAAAA;AAEf,QAAMC,MAAM;WAGCC,KAAK,IAAID,GAAAA;WAETE,UAAU,GAAGF,GAAAA;WACbG,UAAU,GAAGH,GAAAA;WACbI,WAAW,GAAGJ,GAAAA;AAC7B,GAViBD,YAAAA,UAAAA,CAAAA,EAAAA;",
|
|
6
|
-
"names": ["S", "PublicKey", "IdentitySchema", "S", "Struct", "identityKey", "instanceOf", "PublicKey", "spaceKey", "optional", "profile", "displayName", "String", "avatarCid", "data", "Record", "key", "value", "Any", "CLIENT_ACTION", "CLIENT_PLUGIN", "ClientAction", "CreateIdentity", "TaggedClass", "input", "output", "JoinIdentity", "invitationCode", "Void", "ShareIdentity", "RecoverIdentity", "ResetStorage", "mode", "CreateAgent", "CreateRecoveryCode", "CreatePasskey", "RedeemPasskey", "RedeemToken", "token", "Account", "_id", "id", "Profile", "Devices", "Security"]
|
|
7
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/types.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2024 DXOS.org\n//\n\nimport { type PluginsContext } from '@dxos/app-framework';\nimport { S } from '@dxos/echo-schema';\nimport { type Client, PublicKey, type ClientOptions } from '@dxos/react-client';\nimport { type MaybePromise } from '@dxos/util';\n\nimport { CLIENT_PLUGIN } from './meta';\n\n// TODO(wittjosiah): Factor out. Generate?\nconst IdentitySchema = S.Struct({\n identityKey: S.instanceOf(PublicKey),\n spaceKey: S.optional(S.instanceOf(PublicKey)),\n profile: S.optional(\n S.Struct({\n displayName: S.optional(S.String),\n avatarCid: S.optional(S.String),\n data: S.optional(S.Record({ key: S.String, value: S.Any })),\n }),\n ),\n});\n\nconst CLIENT_ACTION = `${CLIENT_PLUGIN}/action`;\nexport namespace ClientAction {\n export class CreateIdentity extends S.TaggedClass<CreateIdentity>()(`${CLIENT_ACTION}/create-identity`, {\n input: S.Struct({\n displayName: S.optional(S.String),\n }),\n output: IdentitySchema,\n }) {}\n\n export class JoinIdentity extends S.TaggedClass<JoinIdentity>()(`${CLIENT_ACTION}/join-identity`, {\n input: S.Struct({\n invitationCode: S.optional(S.String),\n }),\n output: S.Void,\n }) {}\n\n export class ShareIdentity extends S.TaggedClass<ShareIdentity>()(`${CLIENT_ACTION}/share-identity`, {\n input: S.Void,\n output: S.Void,\n }) {}\n\n export class RecoverIdentity extends S.TaggedClass<RecoverIdentity>()(`${CLIENT_ACTION}/recover-identity`, {\n input: S.Void,\n output: S.Void,\n }) {}\n\n export class ResetStorage extends S.TaggedClass<ResetStorage>()(`${CLIENT_ACTION}/reset-storage`, {\n input: S.Struct({\n mode: S.optional(S.String),\n }),\n output: S.Void,\n }) {}\n\n export class CreateAgent extends S.TaggedClass<CreateAgent>()(`${CLIENT_ACTION}/create-agent`, {\n input: S.Void,\n output: S.Void,\n }) {}\n\n export class CreateRecoveryCode extends S.TaggedClass<CreateRecoveryCode>()(`${CLIENT_ACTION}/create-recovery-code`, {\n input: S.Void,\n output: S.Void,\n }) {}\n\n export class CreatePasskey extends S.TaggedClass<CreatePasskey>()(`${CLIENT_ACTION}/create-passkey`, {\n input: S.Void,\n output: S.Void,\n }) {}\n\n export class RedeemPasskey extends S.TaggedClass<RedeemPasskey>()(`${CLIENT_ACTION}/redeem-passkey`, {\n input: S.Void,\n output: S.Void,\n }) {}\n\n export class RedeemToken extends S.TaggedClass<RedeemToken>()(`${CLIENT_ACTION}/redeem-token`, {\n input: S.Struct({\n token: S.String,\n }),\n output: S.Void,\n }) {}\n}\n\nexport type ClientPluginOptions = ClientOptions & {\n /**\n * Base URL for the invitation link.\n */\n invitationUrl?: string;\n\n /**\n * Query parameter for the invitation code.\n */\n invitationParam?: string;\n\n /**\n * Run after the client has been initialized.\n */\n onClientInitialized?: (context: PluginsContext, client: Client) => MaybePromise<void>;\n\n /**\n * Called when the client is reset.\n */\n onReset?: (params: { target?: string }) => MaybePromise<void>;\n};\n\nexport namespace Account {\n // TODO(wittjosiah): Cannot use slashes in ids until we have a router which decouples ids from url paths.\n const _id = 'dxos.org.plugin.client.account';\n // TODO(wittjosiah): This is a hack to prevent the previous deck from being set for pinned items.\n // Ideally this should be worked into the data model in a generic way.\n export const id = `!${_id}`;\n\n export const Profile = `${_id}.profile`;\n export const Devices = `${_id}.devices`;\n export const Security = `${_id}.security`;\n}\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;AAKA,yBAAkB;AAClB,0BAA2D;AAM3D,IAAMA,iBAAiBC,qBAAEC,OAAO;EAC9BC,aAAaF,qBAAEG,WAAWC,6BAAAA;EAC1BC,UAAUL,qBAAEM,SAASN,qBAAEG,WAAWC,6BAAAA,CAAAA;EAClCG,SAASP,qBAAEM,SACTN,qBAAEC,OAAO;IACPO,aAAaR,qBAAEM,SAASN,qBAAES,MAAM;IAChCC,WAAWV,qBAAEM,SAASN,qBAAES,MAAM;IAC9BE,MAAMX,qBAAEM,SAASN,qBAAEY,OAAO;MAAEC,KAAKb,qBAAES;MAAQK,OAAOd,qBAAEe;IAAI,CAAA,CAAA;EAC1D,CAAA,CAAA;AAEJ,CAAA;AAEA,IAAMC,gBAAgB,GAAGC,mCAAAA;;UACRC,eAAAA;EACR,MAAMC,uBAAuBnB,qBAAEoB,YAAW,EAAmB,GAAGJ,aAAAA,oBAAiC;IACtGK,OAAOrB,qBAAEC,OAAO;MACdO,aAAaR,qBAAEM,SAASN,qBAAES,MAAM;IAClC,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EyB;IACTH,QAAQtB,qBAAEyB;EACZ,CAAA,EAAA;EAAI;gBAHSO,gBAAAA;EAKN,MAAMC,sBAAsBjC,qBAAEoB,YAAW,EAAkB,GAAGJ,aAAAA,mBAAgC;IACnGK,OAAOrB,qBAAEyB;IACTH,QAAQtB,qBAAEyB;EACZ,CAAA,EAAA;EAAI;gBAHSQ,gBAAAA;EAKN,MAAMC,oBAAoBlC,qBAAEoB,YAAW,EAAgB,GAAGJ,aAAAA,iBAA8B;IAC7FK,OAAOrB,qBAAEC,OAAO;MACdkC,OAAOnC,qBAAES;IACX,CAAA;IACAa,QAAQtB,qBAAEyB;EACZ,CAAA,EAAA;EAAI;gBALSS,cAAAA;AAMf,GA1DiBhB,iBAAAA,eAAAA,CAAAA,EAAAA;;UAkFAkB,UAAAA;AAEf,QAAMC,MAAM;WAGCC,KAAK,IAAID,GAAAA;WAETE,UAAU,GAAGF,GAAAA;WACbG,UAAU,GAAGH,GAAAA;WACbI,WAAW,GAAGJ,GAAAA;AAC7B,GAViBD,YAAAA,UAAAA,CAAAA,EAAAA;",
|
|
6
|
-
"names": ["IdentitySchema", "S", "Struct", "identityKey", "instanceOf", "PublicKey", "spaceKey", "optional", "profile", "displayName", "String", "avatarCid", "data", "Record", "key", "value", "Any", "CLIENT_ACTION", "CLIENT_PLUGIN", "ClientAction", "CreateIdentity", "TaggedClass", "input", "output", "JoinIdentity", "invitationCode", "Void", "ShareIdentity", "RecoverIdentity", "ResetStorage", "mode", "CreateAgent", "CreateRecoveryCode", "CreatePasskey", "RedeemPasskey", "RedeemToken", "token", "Account", "_id", "id", "Profile", "Devices", "Security"]
|
|
7
|
-
}
|
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
|
|
2
|
-
import {
|
|
3
|
-
CLIENT_PLUGIN
|
|
4
|
-
} from "./chunk-HM7VB4ZV.mjs";
|
|
5
|
-
|
|
6
|
-
// packages/plugins/plugin-client/src/types.ts
|
|
7
|
-
import { S } from "@dxos/echo-schema";
|
|
8
|
-
import { PublicKey } from "@dxos/react-client";
|
|
9
|
-
var IdentitySchema = S.Struct({
|
|
10
|
-
identityKey: S.instanceOf(PublicKey),
|
|
11
|
-
spaceKey: S.optional(S.instanceOf(PublicKey)),
|
|
12
|
-
profile: S.optional(S.Struct({
|
|
13
|
-
displayName: S.optional(S.String),
|
|
14
|
-
avatarCid: S.optional(S.String),
|
|
15
|
-
data: S.optional(S.Record({
|
|
16
|
-
key: S.String,
|
|
17
|
-
value: S.Any
|
|
18
|
-
}))
|
|
19
|
-
}))
|
|
20
|
-
});
|
|
21
|
-
var CLIENT_ACTION = `${CLIENT_PLUGIN}/action`;
|
|
22
|
-
var ClientAction;
|
|
23
|
-
(function(ClientAction2) {
|
|
24
|
-
class CreateIdentity extends S.TaggedClass()(`${CLIENT_ACTION}/create-identity`, {
|
|
25
|
-
input: S.Struct({
|
|
26
|
-
displayName: S.optional(S.String)
|
|
27
|
-
}),
|
|
28
|
-
output: IdentitySchema
|
|
29
|
-
}) {
|
|
30
|
-
}
|
|
31
|
-
ClientAction2.CreateIdentity = CreateIdentity;
|
|
32
|
-
class JoinIdentity extends S.TaggedClass()(`${CLIENT_ACTION}/join-identity`, {
|
|
33
|
-
input: S.Struct({
|
|
34
|
-
invitationCode: S.optional(S.String)
|
|
35
|
-
}),
|
|
36
|
-
output: S.Void
|
|
37
|
-
}) {
|
|
38
|
-
}
|
|
39
|
-
ClientAction2.JoinIdentity = JoinIdentity;
|
|
40
|
-
class ShareIdentity extends S.TaggedClass()(`${CLIENT_ACTION}/share-identity`, {
|
|
41
|
-
input: S.Void,
|
|
42
|
-
output: S.Void
|
|
43
|
-
}) {
|
|
44
|
-
}
|
|
45
|
-
ClientAction2.ShareIdentity = ShareIdentity;
|
|
46
|
-
class RecoverIdentity extends S.TaggedClass()(`${CLIENT_ACTION}/recover-identity`, {
|
|
47
|
-
input: S.Void,
|
|
48
|
-
output: S.Void
|
|
49
|
-
}) {
|
|
50
|
-
}
|
|
51
|
-
ClientAction2.RecoverIdentity = RecoverIdentity;
|
|
52
|
-
class ResetStorage extends S.TaggedClass()(`${CLIENT_ACTION}/reset-storage`, {
|
|
53
|
-
input: S.Struct({
|
|
54
|
-
mode: S.optional(S.String)
|
|
55
|
-
}),
|
|
56
|
-
output: S.Void
|
|
57
|
-
}) {
|
|
58
|
-
}
|
|
59
|
-
ClientAction2.ResetStorage = ResetStorage;
|
|
60
|
-
class CreateAgent extends S.TaggedClass()(`${CLIENT_ACTION}/create-agent`, {
|
|
61
|
-
input: S.Void,
|
|
62
|
-
output: S.Void
|
|
63
|
-
}) {
|
|
64
|
-
}
|
|
65
|
-
ClientAction2.CreateAgent = CreateAgent;
|
|
66
|
-
class CreateRecoveryCode extends S.TaggedClass()(`${CLIENT_ACTION}/create-recovery-code`, {
|
|
67
|
-
input: S.Void,
|
|
68
|
-
output: S.Void
|
|
69
|
-
}) {
|
|
70
|
-
}
|
|
71
|
-
ClientAction2.CreateRecoveryCode = CreateRecoveryCode;
|
|
72
|
-
class CreatePasskey extends S.TaggedClass()(`${CLIENT_ACTION}/create-passkey`, {
|
|
73
|
-
input: S.Void,
|
|
74
|
-
output: S.Void
|
|
75
|
-
}) {
|
|
76
|
-
}
|
|
77
|
-
ClientAction2.CreatePasskey = CreatePasskey;
|
|
78
|
-
class RedeemPasskey extends S.TaggedClass()(`${CLIENT_ACTION}/redeem-passkey`, {
|
|
79
|
-
input: S.Void,
|
|
80
|
-
output: S.Void
|
|
81
|
-
}) {
|
|
82
|
-
}
|
|
83
|
-
ClientAction2.RedeemPasskey = RedeemPasskey;
|
|
84
|
-
class RedeemToken extends S.TaggedClass()(`${CLIENT_ACTION}/redeem-token`, {
|
|
85
|
-
input: S.Struct({
|
|
86
|
-
token: S.String
|
|
87
|
-
}),
|
|
88
|
-
output: S.Void
|
|
89
|
-
}) {
|
|
90
|
-
}
|
|
91
|
-
ClientAction2.RedeemToken = RedeemToken;
|
|
92
|
-
})(ClientAction || (ClientAction = {}));
|
|
93
|
-
var Account;
|
|
94
|
-
(function(Account2) {
|
|
95
|
-
const _id = "dxos.org.plugin.client.account";
|
|
96
|
-
Account2.id = `!${_id}`;
|
|
97
|
-
Account2.Profile = `${_id}.profile`;
|
|
98
|
-
Account2.Devices = `${_id}.devices`;
|
|
99
|
-
Account2.Security = `${_id}.security`;
|
|
100
|
-
})(Account || (Account = {}));
|
|
101
|
-
|
|
102
|
-
export {
|
|
103
|
-
ClientAction,
|
|
104
|
-
Account
|
|
105
|
-
};
|
|
106
|
-
//# sourceMappingURL=chunk-AD5W5QCQ.mjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/types.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2024 DXOS.org\n//\n\nimport { type PluginsContext } from '@dxos/app-framework';\nimport { S } from '@dxos/echo-schema';\nimport { type Client, PublicKey, type ClientOptions } from '@dxos/react-client';\nimport { type MaybePromise } from '@dxos/util';\n\nimport { CLIENT_PLUGIN } from './meta';\n\n// TODO(wittjosiah): Factor out. Generate?\nconst IdentitySchema = S.Struct({\n identityKey: S.instanceOf(PublicKey),\n spaceKey: S.optional(S.instanceOf(PublicKey)),\n profile: S.optional(\n S.Struct({\n displayName: S.optional(S.String),\n avatarCid: S.optional(S.String),\n data: S.optional(S.Record({ key: S.String, value: S.Any })),\n }),\n ),\n});\n\nconst CLIENT_ACTION = `${CLIENT_PLUGIN}/action`;\nexport namespace ClientAction {\n export class CreateIdentity extends S.TaggedClass<CreateIdentity>()(`${CLIENT_ACTION}/create-identity`, {\n input: S.Struct({\n displayName: S.optional(S.String),\n }),\n output: IdentitySchema,\n }) {}\n\n export class JoinIdentity extends S.TaggedClass<JoinIdentity>()(`${CLIENT_ACTION}/join-identity`, {\n input: S.Struct({\n invitationCode: S.optional(S.String),\n }),\n output: S.Void,\n }) {}\n\n export class ShareIdentity extends S.TaggedClass<ShareIdentity>()(`${CLIENT_ACTION}/share-identity`, {\n input: S.Void,\n output: S.Void,\n }) {}\n\n export class RecoverIdentity extends S.TaggedClass<RecoverIdentity>()(`${CLIENT_ACTION}/recover-identity`, {\n input: S.Void,\n output: S.Void,\n }) {}\n\n export class ResetStorage extends S.TaggedClass<ResetStorage>()(`${CLIENT_ACTION}/reset-storage`, {\n input: S.Struct({\n mode: S.optional(S.String),\n }),\n output: S.Void,\n }) {}\n\n export class CreateAgent extends S.TaggedClass<CreateAgent>()(`${CLIENT_ACTION}/create-agent`, {\n input: S.Void,\n output: S.Void,\n }) {}\n\n export class CreateRecoveryCode extends S.TaggedClass<CreateRecoveryCode>()(`${CLIENT_ACTION}/create-recovery-code`, {\n input: S.Void,\n output: S.Void,\n }) {}\n\n export class CreatePasskey extends S.TaggedClass<CreatePasskey>()(`${CLIENT_ACTION}/create-passkey`, {\n input: S.Void,\n output: S.Void,\n }) {}\n\n export class RedeemPasskey extends S.TaggedClass<RedeemPasskey>()(`${CLIENT_ACTION}/redeem-passkey`, {\n input: S.Void,\n output: S.Void,\n }) {}\n\n export class RedeemToken extends S.TaggedClass<RedeemToken>()(`${CLIENT_ACTION}/redeem-token`, {\n input: S.Struct({\n token: S.String,\n }),\n output: S.Void,\n }) {}\n}\n\nexport type ClientPluginOptions = ClientOptions & {\n /**\n * Base URL for the invitation link.\n */\n invitationUrl?: string;\n\n /**\n * Query parameter for the invitation code.\n */\n invitationParam?: string;\n\n /**\n * Run after the client has been initialized.\n */\n onClientInitialized?: (context: PluginsContext, client: Client) => MaybePromise<void>;\n\n /**\n * Called when the client is reset.\n */\n onReset?: (params: { target?: string }) => MaybePromise<void>;\n};\n\nexport namespace Account {\n // TODO(wittjosiah): Cannot use slashes in ids until we have a router which decouples ids from url paths.\n const _id = 'dxos.org.plugin.client.account';\n // TODO(wittjosiah): This is a hack to prevent the previous deck from being set for pinned items.\n // Ideally this should be worked into the data model in a generic way.\n export const id = `!${_id}`;\n\n export const Profile = `${_id}.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bG,UAAU,GAAGH,GAAAA;WACbI,WAAW,GAAGJ,GAAAA;AAC7B,GAViBD,YAAAA,UAAAA,CAAAA,EAAAA;",
|
|
6
|
-
"names": ["S", "PublicKey", "IdentitySchema", "S", "Struct", "identityKey", "instanceOf", "PublicKey", "spaceKey", "optional", "profile", "displayName", "String", "avatarCid", "data", "Record", "key", "value", "Any", "CLIENT_ACTION", "CLIENT_PLUGIN", "ClientAction", "CreateIdentity", "TaggedClass", "input", "output", "JoinIdentity", "invitationCode", "Void", "ShareIdentity", "RecoverIdentity", "ResetStorage", "mode", "CreateAgent", "CreateRecoveryCode", "CreatePasskey", "RedeemPasskey", "RedeemToken", "token", "Account", "_id", "id", "Profile", "Devices", "Security"]
|
|
7
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/schema.ts"],"names":[],"mappings":"AAMA,OAAO,EAA6B,KAAK,cAAc,EAAE,MAAM,qBAAqB,CAAC;kCAK5D,cAAc;AAAvC,wBAcE"}
|
/package/dist/lib/browser/{app-graph-builder-WAS4YZNA.mjs.map → app-graph-builder-2MEWX6SJ.mjs.map}
RENAMED
|
File without changes
|
/package/dist/lib/browser/{intent-resolver-Y5GTS7CW.mjs.map → intent-resolver-UME7DARZ.mjs.map}
RENAMED
|
File without changes
|
|
File without changes
|
/package/dist/lib/node/{app-graph-builder-PXOJZJO5.cjs.map → app-graph-builder-JBJ243GL.cjs.map}
RENAMED
|
File without changes
|
/package/dist/lib/node/{intent-resolver-ZFYETGJI.cjs.map → intent-resolver-33S7BRJP.cjs.map}
RENAMED
|
File without changes
|
|
File without changes
|
/package/dist/lib/node-esm/{app-graph-builder-KIN6NWFI.mjs.map → app-graph-builder-7NA7GGEF.mjs.map}
RENAMED
|
File without changes
|
/package/dist/lib/node-esm/{intent-resolver-OVG4QCHK.mjs.map → intent-resolver-4ULBB4ZA.mjs.map}
RENAMED
|
File without changes
|
/package/dist/lib/node-esm/{react-surface-SMPVSOTA.mjs.map → react-surface-VXMRB7IY.mjs.map}
RENAMED
|
File without changes
|
|
File without changes
|