@dxos/plugin-client 0.8.3 → 0.8.4-main.1da679c
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-CBRN2DMK.mjs → app-graph-builder-MCGM4PFO.mjs} +20 -20
- package/dist/lib/browser/app-graph-builder-MCGM4PFO.mjs.map +7 -0
- package/dist/lib/browser/{chunk-PSSNS4C6.mjs → chunk-3F2Q2RKC.mjs} +3 -3
- package/dist/lib/browser/chunk-3F2Q2RKC.mjs.map +7 -0
- package/dist/lib/browser/{chunk-UCVFWBKT.mjs → chunk-CAF2COXW.mjs} +3 -3
- package/dist/lib/browser/{chunk-5MC5HCIM.mjs → chunk-FOCQEA72.mjs} +34 -41
- package/dist/lib/browser/chunk-FOCQEA72.mjs.map +7 -0
- package/dist/lib/browser/{chunk-MCEXD5XH.mjs → chunk-GS3LDHYD.mjs} +2 -2
- package/dist/lib/browser/{chunk-IA3AVM4I.mjs → chunk-HLWIF3AW.mjs} +14 -15
- package/dist/lib/browser/chunk-HLWIF3AW.mjs.map +7 -0
- package/dist/lib/browser/{client-NMS3MSFP.mjs → client-H2RZI6UX.mjs} +15 -9
- package/dist/lib/browser/client-H2RZI6UX.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +18 -18
- package/dist/lib/browser/index.mjs.map +3 -3
- package/dist/lib/browser/{intent-resolver-SLQZMO6I.mjs → intent-resolver-IE7KHWIY.mjs} +18 -18
- package/dist/lib/browser/intent-resolver-IE7KHWIY.mjs.map +7 -0
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/{migrations-QRQV6ZAM.mjs → migrations-CJY2LQHD.mjs} +6 -6
- package/dist/lib/{node-esm/migrations-AK43ZE6G.mjs.map → browser/migrations-CJY2LQHD.mjs.map} +2 -2
- package/dist/lib/browser/{react-context-IE2O2OYK.mjs → react-context-TSUCH5YS.mjs} +6 -6
- package/dist/lib/browser/{react-context-IE2O2OYK.mjs.map → react-context-TSUCH5YS.mjs.map} +2 -2
- package/dist/lib/browser/{react-surface-QFC2G27R.mjs → react-surface-WQD43JR7.mjs} +8 -8
- package/dist/lib/browser/{react-surface-QFC2G27R.mjs.map → react-surface-WQD43JR7.mjs.map} +3 -3
- package/dist/lib/browser/{schema-defs-DNRDVQQJ.mjs → schema-defs-TLXADNLY.mjs} +6 -6
- package/dist/lib/browser/schema-defs-TLXADNLY.mjs.map +7 -0
- package/dist/lib/browser/types/index.mjs +10 -0
- package/dist/lib/node-esm/{app-graph-builder-OZEAAKNT.mjs → app-graph-builder-BJPS5RD7.mjs} +20 -20
- package/dist/lib/node-esm/app-graph-builder-BJPS5RD7.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-37E3EI46.mjs → chunk-IOGTQFLM.mjs} +3 -3
- package/dist/lib/node-esm/chunk-IOGTQFLM.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-STGGUFV2.mjs → chunk-JG6AFSFU.mjs} +14 -15
- package/dist/lib/node-esm/chunk-JG6AFSFU.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-WHKQMAO5.mjs → chunk-MUWDSQ65.mjs} +34 -41
- package/dist/lib/node-esm/chunk-MUWDSQ65.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-HM7VB4ZV.mjs → chunk-SZLX4BVJ.mjs} +2 -2
- package/dist/lib/node-esm/{chunk-FJYSQRBO.mjs → chunk-UMO3ETDV.mjs} +3 -3
- package/dist/lib/node-esm/{client-EBFQZRSF.mjs → client-AWF6PE6V.mjs} +15 -9
- package/dist/lib/node-esm/client-AWF6PE6V.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +18 -18
- package/dist/lib/node-esm/index.mjs.map +3 -3
- package/dist/lib/node-esm/{intent-resolver-MV55C5ED.mjs → intent-resolver-ZJ4E3NNT.mjs} +18 -18
- package/dist/lib/node-esm/intent-resolver-ZJ4E3NNT.mjs.map +7 -0
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/{migrations-AK43ZE6G.mjs → migrations-X6RLWYR2.mjs} +6 -6
- package/dist/lib/{browser/migrations-QRQV6ZAM.mjs.map → node-esm/migrations-X6RLWYR2.mjs.map} +2 -2
- package/dist/lib/node-esm/{react-context-6N7NMUJE.mjs → react-context-M6G62KT3.mjs} +6 -6
- package/dist/lib/node-esm/{react-context-6N7NMUJE.mjs.map → react-context-M6G62KT3.mjs.map} +2 -2
- package/dist/lib/node-esm/{react-surface-JUYTGBEM.mjs → react-surface-TXSWRGX7.mjs} +8 -8
- package/dist/lib/node-esm/{react-surface-JUYTGBEM.mjs.map → react-surface-TXSWRGX7.mjs.map} +3 -3
- package/dist/lib/node-esm/{schema-defs-O2KQQXJH.mjs → schema-defs-4PGAJ4RQ.mjs} +6 -6
- package/dist/lib/node-esm/schema-defs-4PGAJ4RQ.mjs.map +7 -0
- package/dist/lib/node-esm/{types.mjs → types/index.mjs} +3 -3
- package/dist/types/src/capabilities/app-graph-builder.d.ts +1 -1
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
- package/dist/types/src/capabilities/capabilities.d.ts +2 -3
- package/dist/types/src/capabilities/capabilities.d.ts.map +1 -1
- package/dist/types/src/capabilities/client.d.ts +1 -1
- package/dist/types/src/capabilities/client.d.ts.map +1 -1
- package/dist/types/src/capabilities/index.d.ts +8 -8
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/intent-resolver.d.ts +1 -1
- package/dist/types/src/capabilities/intent-resolver.d.ts.map +1 -1
- package/dist/types/src/capabilities/migrations.d.ts +1 -1
- package/dist/types/src/capabilities/migrations.d.ts.map +1 -1
- package/dist/types/src/capabilities/react-context.d.ts +2 -2
- package/dist/types/src/capabilities/react-context.d.ts.map +1 -1
- package/dist/types/src/capabilities/react-surface.d.ts +1 -1
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
- package/dist/types/src/capabilities/schema-defs.d.ts +1 -1
- package/dist/types/src/capabilities/schema-defs.d.ts.map +1 -1
- package/dist/types/src/components/DevicesContainer.d.ts.map +1 -1
- package/dist/types/src/components/DevicesContainer.stories.d.ts +225 -4
- package/dist/types/src/components/DevicesContainer.stories.d.ts.map +1 -1
- package/dist/types/src/components/ProfileContainer.d.ts.map +1 -1
- package/dist/types/src/components/ProfileContainer.stories.d.ts +57 -4
- package/dist/types/src/components/ProfileContainer.stories.d.ts.map +1 -1
- package/dist/types/src/components/RecoveryCodeDialog.stories.d.ts +59 -4
- package/dist/types/src/components/RecoveryCodeDialog.stories.d.ts.map +1 -1
- package/dist/types/src/components/RecoveryCredentialsContainer.d.ts.map +1 -1
- package/dist/types/src/components/RecoveryCredentialsContainer.stories.d.ts +58 -4
- package/dist/types/src/components/RecoveryCredentialsContainer.stories.d.ts.map +1 -1
- package/dist/types/src/components/ResetDialog.stories.d.ts +59 -3
- package/dist/types/src/components/ResetDialog.stories.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts +46 -46
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/index.d.ts +2 -0
- package/dist/types/src/types/index.d.ts.map +1 -0
- package/dist/types/src/{types.d.ts → types/schema.d.ts} +30 -24
- package/dist/types/src/types/schema.d.ts.map +1 -0
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +35 -36
- package/src/ClientPlugin.ts +3 -3
- package/src/capabilities/app-graph-builder.ts +16 -15
- package/src/capabilities/capabilities.ts +4 -3
- package/src/capabilities/client.ts +6 -4
- package/src/capabilities/intent-resolver.ts +5 -4
- package/src/capabilities/migrations.ts +1 -1
- package/src/capabilities/react-context.tsx +2 -1
- package/src/capabilities/react-surface.tsx +3 -3
- package/src/capabilities/schema-defs.ts +3 -3
- package/src/components/DevicesContainer.stories.tsx +11 -10
- package/src/components/DevicesContainer.tsx +59 -68
- package/src/components/JoinDialog.tsx +1 -1
- package/src/components/ProfileContainer.stories.tsx +7 -6
- package/src/components/ProfileContainer.tsx +20 -23
- package/src/components/RecoveryCodeDialog.stories.tsx +9 -8
- package/src/components/RecoveryCredentialsContainer.stories.tsx +9 -8
- package/src/components/RecoveryCredentialsContainer.tsx +44 -47
- package/src/components/ResetDialog.stories.tsx +7 -6
- package/src/components/ResetDialog.tsx +1 -1
- package/src/translations.ts +6 -4
- package/src/types/index.ts +5 -0
- package/src/{types.ts → types/schema.ts} +14 -15
- package/dist/lib/browser/app-graph-builder-CBRN2DMK.mjs.map +0 -7
- package/dist/lib/browser/chunk-5MC5HCIM.mjs.map +0 -7
- package/dist/lib/browser/chunk-IA3AVM4I.mjs.map +0 -7
- package/dist/lib/browser/chunk-PSSNS4C6.mjs.map +0 -7
- package/dist/lib/browser/client-NMS3MSFP.mjs.map +0 -7
- package/dist/lib/browser/intent-resolver-SLQZMO6I.mjs.map +0 -7
- package/dist/lib/browser/schema-defs-DNRDVQQJ.mjs.map +0 -7
- package/dist/lib/browser/types.mjs +0 -10
- package/dist/lib/node/app-graph-builder-BEEYM3A5.cjs +0 -134
- package/dist/lib/node/app-graph-builder-BEEYM3A5.cjs.map +0 -7
- package/dist/lib/node/chunk-BEJWU2NE.cjs +0 -718
- package/dist/lib/node/chunk-BEJWU2NE.cjs.map +0 -7
- package/dist/lib/node/chunk-BL6EBWOS.cjs +0 -131
- package/dist/lib/node/chunk-BL6EBWOS.cjs.map +0 -7
- package/dist/lib/node/chunk-CIYUKY3J.cjs +0 -37
- package/dist/lib/node/chunk-CIYUKY3J.cjs.map +0 -7
- package/dist/lib/node/chunk-DJKWB5L6.cjs +0 -35
- package/dist/lib/node/chunk-DJKWB5L6.cjs.map +0 -7
- package/dist/lib/node/chunk-DNKJCPU7.cjs +0 -38
- package/dist/lib/node/chunk-DNKJCPU7.cjs.map +0 -7
- package/dist/lib/node/client-Q3EQS4HA.cjs +0 -51
- package/dist/lib/node/client-Q3EQS4HA.cjs.map +0 -7
- package/dist/lib/node/index.cjs +0 -175
- package/dist/lib/node/index.cjs.map +0 -7
- package/dist/lib/node/intent-resolver-QURURONO.cjs +0 -312
- package/dist/lib/node/intent-resolver-QURURONO.cjs.map +0 -7
- package/dist/lib/node/meta.json +0 -1
- package/dist/lib/node/migrations-6FEWMF7U.cjs +0 -39
- package/dist/lib/node/migrations-6FEWMF7U.cjs.map +0 -7
- package/dist/lib/node/react-context-JS7Y5ZOK.cjs +0 -48
- package/dist/lib/node/react-context-JS7Y5ZOK.cjs.map +0 -7
- package/dist/lib/node/react-surface-RGRHOPVK.cjs +0 -82
- package/dist/lib/node/react-surface-RGRHOPVK.cjs.map +0 -7
- package/dist/lib/node/schema-defs-TA52ARBO.cjs +0 -41
- package/dist/lib/node/schema-defs-TA52ARBO.cjs.map +0 -7
- package/dist/lib/node/types.cjs +0 -32
- package/dist/lib/node/types.cjs.map +0 -7
- package/dist/lib/node-esm/app-graph-builder-OZEAAKNT.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-37E3EI46.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-STGGUFV2.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-WHKQMAO5.mjs.map +0 -7
- package/dist/lib/node-esm/client-EBFQZRSF.mjs.map +0 -7
- package/dist/lib/node-esm/intent-resolver-MV55C5ED.mjs.map +0 -7
- package/dist/lib/node-esm/schema-defs-O2KQQXJH.mjs.map +0 -7
- package/dist/types/src/types.d.ts.map +0 -1
- /package/dist/lib/browser/{chunk-UCVFWBKT.mjs.map → chunk-CAF2COXW.mjs.map} +0 -0
- /package/dist/lib/browser/{chunk-MCEXD5XH.mjs.map → chunk-GS3LDHYD.mjs.map} +0 -0
- /package/dist/lib/browser/{types.mjs.map → types/index.mjs.map} +0 -0
- /package/dist/lib/node-esm/{chunk-HM7VB4ZV.mjs.map → chunk-SZLX4BVJ.mjs.map} +0 -0
- /package/dist/lib/node-esm/{chunk-FJYSQRBO.mjs.map → chunk-UMO3ETDV.mjs.map} +0 -0
- /package/dist/lib/node-esm/{types.mjs.map → types/index.mjs.map} +0 -0
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/types.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2024 DXOS.org\n//\n\nimport { Schema } from 'effect';\n\nimport { type PluginContext } from '@dxos/app-framework';\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 = Schema.Struct({\n identityKey: Schema.instanceOf(PublicKey),\n spaceKey: Schema.optional(Schema.instanceOf(PublicKey)),\n profile: Schema.optional(\n Schema.Struct({\n displayName: Schema.optional(Schema.String),\n avatarCid: Schema.optional(Schema.String),\n data: Schema.optional(Schema.Record({ key: Schema.String, value: Schema.Any })),\n }),\n ),\n});\n\nconst CLIENT_ACTION = `${CLIENT_PLUGIN}/action`;\nexport namespace ClientAction {\n const ProfileSchema = Schema.Struct({\n displayName: Schema.optional(Schema.String),\n avatarCid: Schema.optional(Schema.String),\n data: Schema.optional(Schema.Record({ key: Schema.String, value: Schema.Any })),\n });\n\n export class CreateIdentity extends Schema.TaggedClass<CreateIdentity>()(`${CLIENT_ACTION}/create-identity`, {\n input: ProfileSchema,\n output: IdentitySchema,\n }) {}\n\n export class JoinIdentity extends Schema.TaggedClass<JoinIdentity>()(`${CLIENT_ACTION}/join-identity`, {\n input: Schema.Struct({\n invitationCode: Schema.optional(Schema.String),\n }),\n output: Schema.Void,\n }) {}\n\n export class ShareIdentity extends Schema.TaggedClass<ShareIdentity>()(`${CLIENT_ACTION}/share-identity`, {\n input: Schema.Void,\n output: Schema.Void,\n }) {}\n\n export class RecoverIdentity extends Schema.TaggedClass<RecoverIdentity>()(`${CLIENT_ACTION}/recover-identity`, {\n input: Schema.Void,\n output: Schema.Void,\n }) {}\n\n export class ResetStorage extends Schema.TaggedClass<ResetStorage>()(`${CLIENT_ACTION}/reset-storage`, {\n input: Schema.Struct({\n mode: Schema.optional(Schema.String),\n }),\n output: Schema.Void,\n }) {}\n\n export class CreateAgent extends Schema.TaggedClass<CreateAgent>()(`${CLIENT_ACTION}/create-agent`, {\n input: Schema.Void,\n output: Schema.Void,\n }) {}\n\n export class CreateRecoveryCode extends Schema.TaggedClass<CreateRecoveryCode>()(\n `${CLIENT_ACTION}/create-recovery-code`,\n {\n input: Schema.Void,\n output: Schema.Void,\n },\n ) {}\n\n export class CreatePasskey extends Schema.TaggedClass<CreatePasskey>()(`${CLIENT_ACTION}/create-passkey`, {\n input: Schema.Void,\n output: Schema.Void,\n }) {}\n\n export class RedeemPasskey extends Schema.TaggedClass<RedeemPasskey>()(`${CLIENT_ACTION}/redeem-passkey`, {\n input: Schema.Void,\n output: Schema.Void,\n }) {}\n\n export class RedeemToken extends Schema.TaggedClass<RedeemToken>()(`${CLIENT_ACTION}/redeem-token`, {\n input: Schema.Struct({\n token: Schema.String,\n }),\n output: Schema.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: PluginContext, client: Client) => MaybePromise<void>;\n\n /**\n * Called when spaces are ready.\n */\n onSpacesReady?: (context: PluginContext, 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": ";;;;;AAIA,SAASA,cAAc;AAGvB,SAAsBC,iBAAqC;AAM3D,IAAMC,iBAA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UAAU,GAAGF,GAAAA;WACbG,UAAU,GAAGH,GAAAA;WACbI,WAAW,GAAGJ,GAAAA;AAC7B,GAViBD,YAAAA,UAAAA,CAAAA,EAAAA;;;",
|
|
6
|
-
"names": ["Schema", "PublicKey", "IdentitySchema", "Schema", "Struct", "identityKey", "instanceOf", "PublicKey", "spaceKey", "optional", "profile", "displayName", "String", "avatarCid", "data", "Record", "key", "value", "Any", "CLIENT_ACTION", "CLIENT_PLUGIN", "ClientAction", "ProfileSchema", "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/capabilities/capabilities.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { defineCapability } from '@dxos/app-framework';\nimport { type Client } from '@dxos/client';\nimport { type ObjectMigration } from '@dxos/client/echo';\nimport { type TypedObject } from '@dxos/echo-schema';\n\nimport { CLIENT_PLUGIN } from '../meta';\n\nexport namespace ClientCapabilities {\n export const Client = defineCapability<Client>(`${CLIENT_PLUGIN}/capability/client`);\n export const Schema = defineCapability<TypedObject[]>(`${CLIENT_PLUGIN}/capability/schema`);\n export const SchemaWhiteList = defineCapability<TypedObject[]>(`${CLIENT_PLUGIN}/capability/schema-whitelist`);\n export const Migration = defineCapability<ObjectMigration[]>(`${CLIENT_PLUGIN}/capability/migration`);\n}\n"],
|
|
5
|
-
"mappings": ";;;;;AAIA,SAASA,wBAAwB;UAOhBC,qBAAAA;sBACFC,SAASC,iBAAyB,GAAGC,aAAAA,oBAAiC;sBACtEC,SAASF,iBAAgC,GAAGC,aAAAA,oBAAiC;sBAC7EE,kBAAkBH,iBAAgC,GAAGC,aAAAA,8BAA2C;sBAChGG,YAAYJ,iBAAoC,GAAGC,aAAAA,uBAAoC;AACtG,GALiBH,uBAAAA,qBAAAA,CAAAA,EAAAA;;",
|
|
6
|
-
"names": ["defineCapability", "ClientCapabilities", "Client", "defineCapability", "CLIENT_PLUGIN", "Schema", "SchemaWhiteList", "Migration"]
|
|
7
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/capabilities/client.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { contributes, type PluginContext } from '@dxos/app-framework';\nimport { Client } from '@dxos/react-client';\n\nimport { ClientCapabilities } from './capabilities';\nimport { ClientEvents } from '../events';\nimport { type ClientPluginOptions } from '../types';\n\ntype ClientCapabilityOptions = Omit<ClientPluginOptions, 'appKey' | 'invitationUrl' | 'invitationParam' | 'onReset'> & {\n context: PluginContext;\n};\n\nexport default async ({ context, onClientInitialized, onSpacesReady, ...options }: ClientCapabilityOptions) => {\n const client = new Client(options);\n await client.initialize();\n await onClientInitialized?.(context, client);\n\n // TODO(wittjosiah): Remove. This is a hack to get the app to boot with the new identity after a reset.\n client.reloaded.on(() => {\n client.halo.identity.subscribe(async (identity) => {\n if (identity) {\n window.location.href = window.location.origin;\n }\n });\n });\n\n const subscription = client.spaces.isReady.subscribe(async (ready) => {\n if (ready) {\n await context.activatePromise(ClientEvents.SpacesReady);\n await onSpacesReady?.(context, client);\n }\n });\n\n return contributes(ClientCapabilities.Client, client, async () => {\n subscription.unsubscribe();\n await client.destroy();\n });\n};\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;AAIA,SAASA,mBAAuC;AAChD,SAASC,cAAc;AAUvB,IAAA,iBAAe,OAAO,EAAEC,SAASC,qBAAqBC,eAAe,GAAGC,QAAAA,MAAkC;AACxG,QAAMC,SAAS,IAAIC,OAAOF,OAAAA;AAC1B,QAAMC,OAAOE,WAAU;AACvB,QAAML,sBAAsBD,SAASI,MAAAA;AAGrCA,SAAOG,SAASC,GAAG,MAAA;AACjBJ,WAAOK,KAAKC,SAASC,UAAU,OAAOD,aAAAA;AACpC,UAAIA,UAAU;AACZE,eAAOC,SAASC,OAAOF,OAAOC,SAASE;MACzC;IACF,CAAA;EACF,CAAA;AAEA,QAAMC,eAAeZ,OAAOa,OAAOC,QAAQP,UAAU,OAAOQ,UAAAA;AAC1D,QAAIA,OAAO;AACT,YAAMnB,QAAQoB,gBAAgBC,aAAaC,WAAW;AACtD,YAAMpB,gBAAgBF,SAASI,MAAAA;IACjC;EACF,CAAA;AAEA,SAAOmB,YAAYC,mBAAmBnB,QAAQD,QAAQ,YAAA;AACpDY,iBAAaS,YAAW;AACxB,UAAMrB,OAAOsB,QAAO;EACtB,CAAA;AACF;",
|
|
6
|
-
"names": ["contributes", "Client", "context", "onClientInitialized", "onSpacesReady", "options", "client", "Client", "initialize", "reloaded", "on", "halo", "identity", "subscribe", "window", "location", "href", "origin", "subscription", "spaces", "isReady", "ready", "activatePromise", "ClientEvents", "SpacesReady", "contributes", "ClientCapabilities", "unsubscribe", "destroy"]
|
|
7
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/capabilities/intent-resolver.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { pipe } from 'effect';\n\nimport {\n Capabilities,\n chain,\n contributes,\n createIntent,\n createResolver,\n LayoutAction,\n type PluginContext,\n} from '@dxos/app-framework';\nimport { invariant } from '@dxos/invariant';\nimport { ObservabilityAction } from '@dxos/plugin-observability/types';\nimport { PublicKey } from '@dxos/react-client';\nimport { type JoinPanelProps } from '@dxos/shell/react';\n\nimport { ClientCapabilities } from './capabilities';\nimport { JOIN_DIALOG, RECOVERY_CODE_DIALOG, RESET_DIALOG } from '../components';\nimport { ClientEvents } from '../events';\nimport { Account, ClientAction } from '../types';\n\ntype IntentResolverOptions = {\n context: PluginContext;\n appName?: string;\n};\n\nconst RECOVER_IDENTITY_RPC_TIMEOUT = 20_000;\n\nexport default ({ context, appName = 'Composer' }: IntentResolverOptions) =>\n contributes(Capabilities.IntentResolver, [\n createResolver({\n intent: ClientAction.CreateIdentity,\n resolve: async (profile) => {\n const manager = context.getCapability(Capabilities.PluginManager);\n const client = context.getCapability(ClientCapabilities.Client);\n const data = await client.halo.createIdentity(profile);\n await manager.activate(ClientEvents.IdentityCreated);\n return {\n data,\n intents: [\n createIntent(ObservabilityAction.SendEvent, {\n name: 'identity.create',\n }),\n ],\n };\n },\n }),\n createResolver({\n intent: ClientAction.JoinIdentity,\n resolve: async (data) => {\n return {\n intents: [\n createIntent(LayoutAction.UpdateDialog, {\n part: 'dialog',\n subject: JOIN_DIALOG,\n options: {\n blockAlign: 'start',\n props: {\n initialInvitationCode: data.invitationCode,\n initialDisposition: 'accept-halo-invitation',\n },\n },\n }),\n ],\n };\n },\n }),\n createResolver({\n intent: ClientAction.ShareIdentity,\n resolve: async () => {\n return {\n intents: [\n pipe(\n createIntent(LayoutAction.SwitchWorkspace, {\n part: 'workspace',\n subject: Account.id,\n }),\n chain(LayoutAction.Open, {\n part: 'main',\n subject: [Account.Profile],\n }),\n ),\n createIntent(ObservabilityAction.SendEvent, {\n name: 'identity.share',\n }),\n ],\n };\n },\n }),\n createResolver({\n intent: ClientAction.RecoverIdentity,\n resolve: async () => {\n return {\n intents: [\n createIntent(LayoutAction.UpdateDialog, {\n part: 'dialog',\n subject: JOIN_DIALOG,\n options: {\n blockAlign: 'start',\n props: {\n initialDisposition: 'recover-identity',\n } satisfies Partial<JoinPanelProps>,\n },\n }),\n ],\n };\n },\n }),\n createResolver({\n intent: ClientAction.ResetStorage,\n resolve: async (data) => {\n return {\n intents: [\n createIntent(LayoutAction.UpdateDialog, {\n part: 'dialog',\n subject: RESET_DIALOG,\n options: {\n blockAlign: 'start',\n props: {\n mode: data.mode ?? 'reset storage',\n },\n },\n }),\n ],\n };\n },\n }),\n createResolver({\n intent: ClientAction.CreateAgent,\n resolve: async () => {\n const client = context.getCapability(ClientCapabilities.Client);\n invariant(client.services.services.EdgeAgentService, 'Missing EdgeAgentService');\n await client.services.services.EdgeAgentService.createAgent(null as any, { timeout: 10_000 });\n },\n }),\n createResolver({\n intent: ClientAction.CreateRecoveryCode,\n resolve: async () => {\n const client = context.getCapability(ClientCapabilities.Client);\n invariant(client.services.services.IdentityService, 'IdentityService not available');\n // TODO(wittjosiah): This needs a proper api.\n const { recoveryCode } = await client.services.services.IdentityService.createRecoveryCredential({});\n return {\n intents: [\n createIntent(LayoutAction.UpdateDialog, {\n part: 'dialog',\n subject: RECOVERY_CODE_DIALOG,\n options: {\n blockAlign: 'start',\n type: 'alert',\n props: { code: recoveryCode },\n },\n }),\n ],\n };\n },\n }),\n createResolver({\n intent: ClientAction.CreatePasskey,\n resolve: async () => {\n const client = context.getCapability(ClientCapabilities.Client);\n const identity = client.halo.identity.get();\n invariant(identity, 'Identity not available');\n\n // TODO(wittjosiah): Consider factoring out passkey creation to the halo api.\n const lookupKey = PublicKey.random();\n const credential = await navigator.credentials.create({\n publicKey: {\n challenge: new Uint8Array(),\n rp: { id: location.hostname, name: appName },\n user: {\n id: lookupKey.asUint8Array(),\n name: identity.did,\n displayName: identity.profile?.displayName ?? '',\n },\n pubKeyCredParams: [\n { type: 'public-key', alg: -8 }, // Ed25519 (not yet supported across all browsers)\n { type: 'public-key', alg: -7 }, // ES256\n ],\n // https://web.dev/articles/webauthn-discoverable-credentials#resident-key\n authenticatorSelection: {\n residentKey: 'required',\n requireResidentKey: true,\n },\n },\n });\n\n invariant(credential, 'Credential not available');\n const recoveryKey = PublicKey.from(new Uint8Array((credential as any).response.getPublicKey()));\n const algorithm = (credential as any).response.getPublicKeyAlgorithm() === -7 ? 'ES256' : 'ED25519';\n\n // TODO(wittjosiah): This needs a proper api.\n invariant(client.services.services.IdentityService, 'IdentityService not available');\n await client.services.services.IdentityService.createRecoveryCredential({\n data: {\n recoveryKey,\n algorithm,\n lookupKey,\n },\n });\n },\n }),\n createResolver({\n intent: ClientAction.RedeemPasskey,\n resolve: async () => {\n const client = context.getCapability(ClientCapabilities.Client);\n // TODO(wittjosiah): This needs a proper api.\n invariant(client.services.services.IdentityService, 'IdentityService not available');\n const { deviceKey, controlFeedKey, challenge } =\n await client.services.services.IdentityService.requestRecoveryChallenge();\n const credential = await navigator.credentials.get({\n publicKey: {\n challenge: Buffer.from(challenge, 'base64'),\n rpId: location.hostname,\n userVerification: 'required',\n },\n });\n const lookupKey = PublicKey.from(new Uint8Array((credential as any).response.userHandle));\n await client.services.services.IdentityService.recoverIdentity(\n {\n external: {\n lookupKey,\n deviceKey,\n controlFeedKey,\n signature: Buffer.from((credential as any).response.signature),\n clientDataJson: Buffer.from((credential as any).response.clientDataJSON),\n authenticatorData: Buffer.from((credential as any).response.authenticatorData),\n },\n },\n { timeout: RECOVER_IDENTITY_RPC_TIMEOUT },\n );\n },\n }),\n createResolver({\n intent: ClientAction.RedeemToken,\n resolve: async (data) => {\n const client = context.getCapability(ClientCapabilities.Client);\n // TODO(wittjosiah): This needs a proper api.\n invariant(client.services.services.IdentityService, 'IdentityService not available');\n await client.services.services.IdentityService.recoverIdentity(\n { token: data.token },\n { timeout: RECOVER_IDENTITY_RPC_TIMEOUT },\n );\n },\n }),\n ]);\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;AAIA,SAASA,YAAY;AAErB,SACEC,cACAC,OACAC,aACAC,cACAC,gBACAC,oBAEK;AACP,SAASC,iBAAiB;AAC1B,SAASC,2BAA2B;AACpC,SAASC,iBAAiB;;AAa1B,IAAMC,+BAA+B;AAErC,IAAA,0BAAe,CAAC,EAAEC,SAASC,UAAU,WAAU,MAC7CC,YAAYC,aAAaC,gBAAgB;EACvCC,eAAe;IACbC,QAAQC,aAAaC;IACrBC,SAAS,OAAOC,YAAAA;AACd,YAAMC,UAAUX,Q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AWN,OAAOT,KAAMpB,WAAmBqB,SAASc,SAAS;UAC7DC,gBAAgBP,OAAOT,KAAMpB,WAAmBqB,SAASgB,cAAc;UACvEC,mBAAmBT,OAAOT,KAAMpB,WAAmBqB,SAASiB,iBAAiB;QAC/E;MACF,GACA;QAAEpD,SAAS1D;MAA6B,CAAA;IAE5C;EACF,CAAA;EACAM,eAAe;IACbC,QAAQC,aAAauG;IACrBrG,SAAS,OAAOQ,SAAAA;AACd,YAAMH,SAASd,QAAQY,cAAcG,mBAAmBC,MAAM;AAE9DqC,gBAAUvC,OAAOwC,SAASA,SAASK,iBAAiB,iCAAA;;;;;;;;;AACpD,YAAM7C,OAAOwC,SAASA,SAASK,gBAAgB6C,gBAC7C;QAAEO,OAAO9F,KAAK8F;MAAM,GACpB;QAAEtD,SAAS1D;MAA6B,CAAA;IAE5C;EACF,CAAA;CACD;",
|
|
6
|
-
"names": ["pipe", "Capabilities", "chain", "contributes", "createIntent", "createResolver", "LayoutAction", "invariant", "ObservabilityAction", "PublicKey", "RECOVER_IDENTITY_RPC_TIMEOUT", "context", "appName", "contributes", "Capabilities", "IntentResolver", "createResolver", "intent", "ClientAction", "CreateIdentity", "resolve", "profile", "manager", "getCapability", "PluginManager", "client", "ClientCapabilities", "Client", "data", "halo", "createIdentity", "activate", "ClientEvents", "IdentityCreated", "intents", "createIntent", "ObservabilityAction", "SendEvent", "name", "JoinIdentity", "LayoutAction", "UpdateDialog", "part", "subject", "JOIN_DIALOG", "options", "blockAlign", "props", "initialInvitationCode", "invitationCode", "initialDisposition", "ShareIdentity", "pipe", "SwitchWorkspace", "Account", "id", "chain", "Open", "Profile", "RecoverIdentity", "ResetStorage", "RESET_DIALOG", "mode", "CreateAgent", "invariant", "services", "EdgeAgentService", "createAgent", "timeout", "CreateRecoveryCode", "IdentityService", "recoveryCode", "createRecoveryCredential", "RECOVERY_CODE_DIALOG", "type", "code", "CreatePasskey", "identity", "get", "lookupKey", "PublicKey", "random", "credential", "navigator", "credentials", "create", "publicKey", "challenge", "Uint8Array", "rp", "location", "hostname", "user", "asUint8Array", "did", "displayName", "pubKeyCredParams", "alg", "authenticatorSelection", "residentKey", "requireResidentKey", "recoveryKey", "from", "response", "getPublicKey", "algorithm", "getPublicKeyAlgorithm", "RedeemPasskey", "deviceKey", "controlFeedKey", "requestRecoveryChallenge", "Buffer", "rpId", "userVerification", "userHandle", "recoverIdentity", "external", "signature", "clientDataJson", "clientDataJSON", "authenticatorData", "RedeemToken", "token"]
|
|
7
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/capabilities/schema-defs.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { Capabilities, contributes, type PluginContext } from '@dxos/app-framework';\nimport { type TypedObject } from '@dxos/echo-schema';\n\nimport { ClientCapabilities } from './capabilities';\n\nexport default (context: PluginContext) => {\n const registry = context.getCapability(Capabilities.RxRegistry);\n const client = context.getCapability(ClientCapabilities.Client);\n\n // TODO(wittjosiah): Unregister schemas when they are disabled.\n let previous: TypedObject[] = [];\n const cancel = registry.subscribe(\n context.capabilities(ClientCapabilities.Schema),\n (_schemas) => {\n const schemas = Array.from(new Set(_schemas.flat()));\n // TODO(wittjosiah): Filter out schemas which the client has already registered.\n const newSchemas = schemas.filter((schema) => !previous.includes(schema));\n previous = schemas;\n client.addTypes(newSchemas);\n },\n { immediate: true },\n );\n\n return contributes(Capabilities.Null, null, () => cancel());\n};\n"],
|
|
5
|
-
"mappings": ";;;;;;AAIA,SAASA,cAAcC,mBAAuC;AAK9D,IAAA,sBAAe,CAACC,YAAAA;AACd,QAAMC,WAAWD,QAAQE,cAAcC,aAAaC,UAAU;AAC9D,QAAMC,SAASL,QAAQE,cAAcI,mBAAmBC,MAAM;AAG9D,MAAIC,WAA0B,CAAA;AAC9B,QAAMC,SAASR,SAASS,UACtBV,QAAQW,aAAaL,mBAAmBM,MAAM,GAC9C,CAACC,aAAAA;AACC,UAAMC,UAAUC,MAAMC,KAAK,IAAIC,IAAIJ,SAASK,KAAI,CAAA,CAAA;AAEhD,UAAMC,aAAaL,QAAQM,OAAO,CAACC,WAAW,CAACb,SAASc,SAASD,MAAAA,CAAAA;AACjEb,eAAWM;AACXT,WAAOkB,SAASJ,UAAAA;EAClB,GACA;IAAEK,WAAW;EAAK,CAAA;AAGpB,SAAOC,YAAYtB,aAAauB,MAAM,MAAM,MAAMjB,OAAAA,CAAAA;AACpD;",
|
|
6
|
-
"names": ["Capabilities", "contributes", "context", "registry", "getCapability", "Capabilities", "RxRegistry", "client", "ClientCapabilities", "Client", "previous", "cancel", "subscribe", "capabilities", "Schema", "_schemas", "schemas", "Array", "from", "Set", "flat", "newSchemas", "filter", "schema", "includes", "addTypes", "immediate", "contributes", "Null"]
|
|
7
|
-
}
|
|
@@ -1,134 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
var app_graph_builder_BEEYM3A5_exports = {};
|
|
20
|
-
__export(app_graph_builder_BEEYM3A5_exports, {
|
|
21
|
-
default: () => app_graph_builder_default
|
|
22
|
-
});
|
|
23
|
-
module.exports = __toCommonJS(app_graph_builder_BEEYM3A5_exports);
|
|
24
|
-
var import_chunk_CIYUKY3J = require("./chunk-CIYUKY3J.cjs");
|
|
25
|
-
var import_chunk_BL6EBWOS = require("./chunk-BL6EBWOS.cjs");
|
|
26
|
-
var import_chunk_DJKWB5L6 = require("./chunk-DJKWB5L6.cjs");
|
|
27
|
-
var import_rx_react = require("@effect-rx/rx-react");
|
|
28
|
-
var import_effect = require("effect");
|
|
29
|
-
var import_app_framework = require("@dxos/app-framework");
|
|
30
|
-
var import_app_framework2 = require("@dxos/app-framework");
|
|
31
|
-
var import_plugin_graph = require("@dxos/plugin-graph");
|
|
32
|
-
var import_mesh = require("@dxos/react-client/mesh");
|
|
33
|
-
var app_graph_builder_default = (context) => (0, import_app_framework2.contributes)(import_app_framework2.Capabilities.AppGraphBuilder, (0, import_plugin_graph.createExtension)({
|
|
34
|
-
id: import_chunk_DJKWB5L6.CLIENT_PLUGIN,
|
|
35
|
-
actions: (node) => import_rx_react.Rx.make((get) => (0, import_effect.pipe)(get(node), import_effect.Option.flatMap((node2) => node2.id === import_plugin_graph.ROOT_ID ? import_effect.Option.some(node2) : import_effect.Option.none()), import_effect.Option.map(() => {
|
|
36
|
-
return [
|
|
37
|
-
{
|
|
38
|
-
id: `${import_chunk_DJKWB5L6.CLIENT_PLUGIN}/open-user-account`,
|
|
39
|
-
data: async () => {
|
|
40
|
-
const { dispatchPromise: dispatch } = context.getCapability(import_app_framework2.Capabilities.IntentDispatcher);
|
|
41
|
-
await dispatch((0, import_app_framework.createIntent)(import_chunk_BL6EBWOS.ClientAction.ShareIdentity));
|
|
42
|
-
},
|
|
43
|
-
properties: {
|
|
44
|
-
label: [
|
|
45
|
-
"open user account label",
|
|
46
|
-
{
|
|
47
|
-
ns: import_chunk_DJKWB5L6.CLIENT_PLUGIN
|
|
48
|
-
}
|
|
49
|
-
],
|
|
50
|
-
icon: "ph--user--regular",
|
|
51
|
-
disposition: "menu",
|
|
52
|
-
keyBinding: {
|
|
53
|
-
macos: "meta+shift+.",
|
|
54
|
-
// TODO(wittjosiah): Test on windows to see if it behaves the same as linux.
|
|
55
|
-
windows: "alt+shift+.",
|
|
56
|
-
linux: "alt+shift+>"
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
];
|
|
61
|
-
}), import_effect.Option.getOrElse(() => []))),
|
|
62
|
-
connector: (node) => import_rx_react.Rx.make((get) => (0, import_effect.pipe)(get(node), import_effect.Option.flatMap((node2) => node2.id === import_plugin_graph.ROOT_ID ? import_effect.Option.some(node2) : import_effect.Option.none()), import_effect.Option.map(() => {
|
|
63
|
-
const client = context.getCapability(import_chunk_CIYUKY3J.ClientCapabilities.Client);
|
|
64
|
-
const identity = get((0, import_plugin_graph.rxFromObservable)(client.halo.identity));
|
|
65
|
-
const status = get((0, import_plugin_graph.rxFromObservable)(client.mesh.networkStatus));
|
|
66
|
-
return [
|
|
67
|
-
{
|
|
68
|
-
id: import_chunk_BL6EBWOS.Account.id,
|
|
69
|
-
type: import_chunk_DJKWB5L6.CLIENT_PLUGIN,
|
|
70
|
-
properties: {
|
|
71
|
-
label: [
|
|
72
|
-
"account label",
|
|
73
|
-
{
|
|
74
|
-
ns: import_chunk_DJKWB5L6.CLIENT_PLUGIN
|
|
75
|
-
}
|
|
76
|
-
],
|
|
77
|
-
icon: "ph--user--regular",
|
|
78
|
-
disposition: "user-account",
|
|
79
|
-
// NOTE: This currently needs to be the identity key because the fallback is generated from hex.
|
|
80
|
-
userId: identity?.identityKey.toHex(),
|
|
81
|
-
hue: identity?.profile?.data?.hue,
|
|
82
|
-
emoji: identity?.profile?.data?.emoji,
|
|
83
|
-
status: status.swarm === import_mesh.ConnectionState.OFFLINE ? "error" : "active"
|
|
84
|
-
},
|
|
85
|
-
nodes: [
|
|
86
|
-
{
|
|
87
|
-
id: import_chunk_BL6EBWOS.Account.Profile,
|
|
88
|
-
data: import_chunk_BL6EBWOS.Account.Profile,
|
|
89
|
-
type: import_chunk_DJKWB5L6.CLIENT_PLUGIN,
|
|
90
|
-
properties: {
|
|
91
|
-
label: [
|
|
92
|
-
"profile label",
|
|
93
|
-
{
|
|
94
|
-
ns: import_chunk_DJKWB5L6.CLIENT_PLUGIN
|
|
95
|
-
}
|
|
96
|
-
],
|
|
97
|
-
icon: "ph--user--regular"
|
|
98
|
-
}
|
|
99
|
-
},
|
|
100
|
-
{
|
|
101
|
-
id: import_chunk_BL6EBWOS.Account.Devices,
|
|
102
|
-
data: import_chunk_BL6EBWOS.Account.Devices,
|
|
103
|
-
type: import_chunk_DJKWB5L6.CLIENT_PLUGIN,
|
|
104
|
-
properties: {
|
|
105
|
-
label: [
|
|
106
|
-
"devices label",
|
|
107
|
-
{
|
|
108
|
-
ns: import_chunk_DJKWB5L6.CLIENT_PLUGIN
|
|
109
|
-
}
|
|
110
|
-
],
|
|
111
|
-
icon: "ph--devices--regular",
|
|
112
|
-
testId: "clientPlugin.devices"
|
|
113
|
-
}
|
|
114
|
-
},
|
|
115
|
-
{
|
|
116
|
-
id: import_chunk_BL6EBWOS.Account.Security,
|
|
117
|
-
data: import_chunk_BL6EBWOS.Account.Security,
|
|
118
|
-
type: import_chunk_DJKWB5L6.CLIENT_PLUGIN,
|
|
119
|
-
properties: {
|
|
120
|
-
label: [
|
|
121
|
-
"security label",
|
|
122
|
-
{
|
|
123
|
-
ns: import_chunk_DJKWB5L6.CLIENT_PLUGIN
|
|
124
|
-
}
|
|
125
|
-
],
|
|
126
|
-
icon: "ph--key--regular"
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
]
|
|
130
|
-
}
|
|
131
|
-
];
|
|
132
|
-
}), import_effect.Option.getOrElse(() => [])))
|
|
133
|
-
}));
|
|
134
|
-
//# sourceMappingURL=app-graph-builder-BEEYM3A5.cjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/capabilities/app-graph-builder.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { Rx } from '@effect-rx/rx-react';\nimport { Option, pipe } from 'effect';\n\nimport { createIntent } from '@dxos/app-framework';\nimport { Capabilities, contributes, type PluginContext } from '@dxos/app-framework';\nimport { createExtension, rxFromObservable, ROOT_ID } from '@dxos/plugin-graph';\nimport { ConnectionState } from '@dxos/react-client/mesh';\n\nimport { ClientCapabilities } from './capabilities';\nimport { CLIENT_PLUGIN } from '../meta';\nimport { Account, ClientAction } from '../types';\n\nexport default (context: PluginContext) =>\n contributes(\n Capabilities.AppGraphBuilder,\n createExtension({\n id: CLIENT_PLUGIN,\n actions: (node) =>\n Rx.make((get) =>\n pipe(\n get(node),\n Option.flatMap((node) => (node.id === ROOT_ID ? Option.some(node) : Option.none())),\n Option.map(() => {\n return [\n {\n id: `${CLIENT_PLUGIN}/open-user-account`,\n data: async () => {\n const { dispatchPromise: dispatch } = context.getCapability(Capabilities.IntentDispatcher);\n await dispatch(createIntent(ClientAction.ShareIdentity));\n },\n properties: {\n label: ['open user account label', { ns: CLIENT_PLUGIN }],\n icon: 'ph--user--regular',\n disposition: 'menu',\n keyBinding: {\n macos: 'meta+shift+.',\n // TODO(wittjosiah): Test on windows to see if it behaves the same as linux.\n windows: 'alt+shift+.',\n linux: 'alt+shift+>',\n },\n },\n },\n ];\n }),\n Option.getOrElse(() => []),\n ),\n ),\n connector: (node) =>\n Rx.make((get) =>\n pipe(\n get(node),\n Option.flatMap((node) => (node.id === ROOT_ID ? Option.some(node) : Option.none())),\n Option.map(() => {\n const client = context.getCapability(ClientCapabilities.Client);\n const identity = get(rxFromObservable(client.halo.identity));\n const status = get(rxFromObservable(client.mesh.networkStatus));\n\n return [\n {\n id: Account.id,\n type: CLIENT_PLUGIN,\n properties: {\n label: ['account label', { ns: CLIENT_PLUGIN }],\n icon: 'ph--user--regular',\n disposition: 'user-account',\n // NOTE: This currently needs to be the identity key because the fallback is generated from hex.\n userId: identity?.identityKey.toHex(),\n hue: identity?.profile?.data?.hue,\n emoji: identity?.profile?.data?.emoji,\n status: status.swarm === ConnectionState.OFFLINE ? 'error' : 'active',\n },\n nodes: [\n {\n id: Account.Profile,\n data: Account.Profile,\n type: CLIENT_PLUGIN,\n properties: {\n label: ['profile label', { ns: CLIENT_PLUGIN }],\n icon: 'ph--user--regular',\n },\n },\n {\n id: Account.Devices,\n data: Account.Devices,\n type: CLIENT_PLUGIN,\n properties: {\n label: ['devices label', { ns: CLIENT_PLUGIN }],\n icon: 'ph--devices--regular',\n testId: 'clientPlugin.devices',\n },\n },\n {\n id: Account.Security,\n data: Account.Security,\n type: CLIENT_PLUGIN,\n properties: {\n label: ['security label', { ns: CLIENT_PLUGIN }],\n icon: 'ph--key--regular',\n },\n },\n ],\n },\n ];\n }),\n Option.getOrElse(() => []),\n ),\n ),\n }),\n );\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,sBAAmB;AACnB,oBAA6B;AAE7B,2BAA6B;AAC7B,IAAAA,wBAA8D;AAC9D,0BAA2D;AAC3D,kBAAgC;AAMhC,IAAA,4BAAe,CAACC,gBACdC,mCACEC,mCAAaC,qBACbC,qCAAgB;EACdC,IAAIC;EACJC,SAAS,CAACC,SACRC,mBAAGC,KAAK,CAACC,YACPC,oBACED,IAAIH,IAAAA,GACJK,qBAAOC,QAAQ,CAACN,UAAUA,MAAKH,OAAOU,8BAAUF,qBAAOG,KAAKR,KAAAA,IAAQK,qBAAOI,KAAI,CAAA,GAC/EJ,qBAAOK,IAAI,MAAA;AACT,WAAO;MACL;QACEb,IAAI,GAAGC,mCAAAA;QACPa,MAAM,YAAA;AACJ,gBAAM,EAAEC,iBAAiBC,SAAQ,IAAKrB,QAAQsB,cAAcpB,mCAAaqB,gBAAgB;AACzF,gBAAMF,aAASG,mCAAaC,mCAA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BAAC;gBAAiB;kBAAEC,IAAIvB;gBAAc;;cAC7CwB,MAAM;cACN+B,QAAQ;YACV;UACF;UACA;YACExD,IAAI0C,8BAAQe;YACZ3C,MAAM4B,8BAAQe;YACdd,MAAM1C;YACNqB,YAAY;cACVC,OAAO;gBAAC;gBAAkB;kBAAEC,IAAIvB;gBAAc;;cAC9CwB,MAAM;YACR;UACF;;MAEJ;;EAEJ,CAAA,GACAjB,qBAAOuB,UAAU,MAAM,CAAA,CAAE,CAAA,CAAA;AAGjC,CAAA,CAAA;",
|
|
6
|
-
"names": ["import_app_framework", "context", "contributes", "Capabilities", "AppGraphBuilder", "createExtension", "id", "CLIENT_PLUGIN", "actions", "node", "Rx", "make", "get", "pipe", "Option", "flatMap", "ROOT_ID", "some", "none", "map", "data", "dispatchPromise", "dispatch", "getCapability", "IntentDispatcher", "createIntent", "ClientAction", "ShareIdentity", "properties", "label", "ns", "icon", "disposition", "keyBinding", "macos", "windows", "linux", "getOrElse", "connector", "client", "ClientCapabilities", "Client", "identity", "rxFromObservable", "halo", "status", "mesh", "networkStatus", "Account", "type", "userId", "identityKey", "toHex", "hue", "profile", "emoji", "swarm", "ConnectionState", "OFFLINE", "nodes", "Profile", "Devices", "testId", "Security"]
|
|
7
|
-
}
|