@dxos/plugin-client 0.8.4-main.5ea62a8 → 0.8.4-main.72ec0f3
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-ENKIVZWH.mjs → app-graph-builder-ARY4H3VC.mjs} +26 -25
- package/dist/lib/browser/app-graph-builder-ARY4H3VC.mjs.map +7 -0
- package/dist/lib/browser/{chunk-FOCQEA72.mjs → chunk-4G4YWIUQ.mjs} +38 -38
- package/dist/lib/browser/chunk-4G4YWIUQ.mjs.map +7 -0
- package/dist/lib/browser/chunk-4LRO3Y2O.mjs +19 -0
- package/dist/lib/browser/chunk-4LRO3Y2O.mjs.map +7 -0
- package/dist/lib/browser/chunk-N5UR2HOE.mjs +18 -0
- package/dist/lib/browser/chunk-N5UR2HOE.mjs.map +7 -0
- package/dist/lib/browser/{chunk-HLWIF3AW.mjs → chunk-RDIG75CA.mjs} +3 -3
- package/dist/lib/browser/chunk-RDIG75CA.mjs.map +7 -0
- package/dist/lib/browser/chunk-ZRVMXLDR.mjs +15 -0
- package/dist/lib/browser/chunk-ZRVMXLDR.mjs.map +7 -0
- package/dist/lib/browser/{client-F73MIXMT.mjs → client-O7U3MQ6J.mjs} +6 -6
- package/dist/lib/browser/{client-F73MIXMT.mjs.map → client-O7U3MQ6J.mjs.map} +1 -1
- package/dist/lib/browser/index.mjs +23 -19
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/{intent-resolver-LNPFUWU5.mjs → intent-resolver-KLK7PJZK.mjs} +10 -10
- package/dist/lib/browser/intent-resolver-KLK7PJZK.mjs.map +7 -0
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/{migrations-YJSO7JXY.mjs → migrations-RUAKBBTF.mjs} +6 -6
- package/dist/lib/browser/migrations-RUAKBBTF.mjs.map +7 -0
- package/dist/lib/browser/{react-context-QBXCHNH2.mjs → react-context-PCT5C3BN.mjs} +9 -8
- package/dist/lib/browser/react-context-PCT5C3BN.mjs.map +7 -0
- package/dist/lib/browser/{react-surface-3AH7INFU.mjs → react-surface-RCXEA65V.mjs} +6 -6
- package/dist/lib/browser/{react-surface-3AH7INFU.mjs.map → react-surface-RCXEA65V.mjs.map} +1 -1
- package/dist/lib/browser/{schema-defs-AMSX6T3B.mjs → schema-defs-UNNBAEFW.mjs} +6 -6
- package/dist/lib/browser/schema-defs-UNNBAEFW.mjs.map +7 -0
- package/dist/lib/browser/types/index.mjs +2 -2
- package/dist/lib/node-esm/{app-graph-builder-D4XJCLPN.mjs → app-graph-builder-LLM25DRR.mjs} +26 -25
- package/dist/lib/node-esm/app-graph-builder-LLM25DRR.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-6ANOJ7ZM.mjs +19 -0
- package/dist/lib/node-esm/chunk-6ANOJ7ZM.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-7M7VWQJW.mjs +20 -0
- package/dist/lib/node-esm/chunk-7M7VWQJW.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-MUWDSQ65.mjs → chunk-DJ6XKSE4.mjs} +38 -38
- package/dist/lib/node-esm/chunk-DJ6XKSE4.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-QT3EQXDU.mjs +17 -0
- package/dist/lib/node-esm/chunk-QT3EQXDU.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-JG6AFSFU.mjs → chunk-VENKFPBC.mjs} +3 -3
- package/dist/lib/node-esm/chunk-VENKFPBC.mjs.map +7 -0
- package/dist/lib/node-esm/{client-A7CNP37P.mjs → client-6MTNT7M6.mjs} +6 -6
- package/dist/lib/node-esm/{client-A7CNP37P.mjs.map → client-6MTNT7M6.mjs.map} +1 -1
- package/dist/lib/node-esm/index.mjs +23 -19
- package/dist/lib/node-esm/index.mjs.map +4 -4
- package/dist/lib/node-esm/{intent-resolver-C4INMPH7.mjs → intent-resolver-YR2C224X.mjs} +10 -10
- package/dist/lib/node-esm/intent-resolver-YR2C224X.mjs.map +7 -0
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/{migrations-UOEK7HB7.mjs → migrations-ASF2SAUR.mjs} +6 -6
- package/dist/lib/node-esm/migrations-ASF2SAUR.mjs.map +7 -0
- package/dist/lib/node-esm/{react-context-JIH7YBFI.mjs → react-context-F4QOBWSP.mjs} +9 -8
- package/dist/lib/node-esm/react-context-F4QOBWSP.mjs.map +7 -0
- package/dist/lib/node-esm/{react-surface-4TMUCPEW.mjs → react-surface-SQBRXVMZ.mjs} +6 -6
- package/dist/lib/node-esm/{react-surface-4TMUCPEW.mjs.map → react-surface-SQBRXVMZ.mjs.map} +1 -1
- package/dist/lib/node-esm/{schema-defs-4UTKKRTF.mjs → schema-defs-MSIT2KK2.mjs} +6 -6
- package/dist/lib/node-esm/schema-defs-MSIT2KK2.mjs.map +7 -0
- package/dist/lib/node-esm/types/index.mjs +2 -2
- package/dist/types/src/ClientPlugin.d.ts +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/capabilities.d.ts.map +1 -1
- package/dist/types/src/capabilities/index.d.ts +2 -2
- package/dist/types/src/capabilities/react-context.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 +1 -3
- package/dist/types/src/components/DevicesContainer.stories.d.ts.map +1 -1
- package/dist/types/src/components/JoinDialog.d.ts +1 -1
- package/dist/types/src/components/JoinDialog.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 +0 -1
- package/dist/types/src/components/ProfileContainer.stories.d.ts.map +1 -1
- package/dist/types/src/components/RecoveryCodeDialog.d.ts +1 -1
- package/dist/types/src/components/RecoveryCodeDialog.d.ts.map +1 -1
- package/dist/types/src/components/RecoveryCodeDialog.stories.d.ts +0 -1
- package/dist/types/src/components/RecoveryCodeDialog.stories.d.ts.map +1 -1
- package/dist/types/src/components/RecoveryCredentialsContainer.d.ts +1 -1
- package/dist/types/src/components/RecoveryCredentialsContainer.d.ts.map +1 -1
- package/dist/types/src/components/RecoveryCredentialsContainer.stories.d.ts +1 -3
- package/dist/types/src/components/RecoveryCredentialsContainer.stories.d.ts.map +1 -1
- package/dist/types/src/components/ResetDialog.d.ts +1 -1
- package/dist/types/src/components/ResetDialog.d.ts.map +1 -1
- package/dist/types/src/components/ResetDialog.stories.d.ts +0 -1
- package/dist/types/src/components/ResetDialog.stories.d.ts.map +1 -1
- package/dist/types/src/events.d.ts.map +1 -1
- package/dist/types/src/index.d.ts +3 -2
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/meta.d.ts +0 -1
- package/dist/types/src/meta.d.ts.map +1 -1
- package/dist/types/src/types/schema.d.ts +1 -1
- package/dist/types/src/types/schema.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +35 -36
- package/src/ClientPlugin.ts +55 -57
- package/src/capabilities/app-graph-builder.ts +22 -21
- package/src/capabilities/capabilities.ts +5 -5
- package/src/capabilities/intent-resolver.ts +2 -2
- package/src/capabilities/migrations.ts +1 -1
- package/src/capabilities/react-context.tsx +4 -3
- package/src/capabilities/schema-defs.ts +1 -1
- package/src/components/DevicesContainer.stories.tsx +2 -5
- package/src/components/DevicesContainer.tsx +13 -15
- package/src/components/JoinDialog.tsx +5 -4
- package/src/components/ProfileContainer.stories.tsx +2 -4
- package/src/components/ProfileContainer.tsx +4 -9
- package/src/components/RecoveryCodeDialog.stories.tsx +2 -4
- package/src/components/RecoveryCodeDialog.tsx +6 -6
- package/src/components/RecoveryCredentialsContainer.stories.tsx +2 -5
- package/src/components/RecoveryCredentialsContainer.tsx +6 -7
- package/src/components/ResetDialog.stories.tsx +4 -6
- package/src/components/ResetDialog.tsx +5 -4
- package/src/events.ts +6 -6
- package/src/index.ts +4 -3
- package/src/meta.ts +6 -3
- package/src/types/schema.ts +1 -1
- package/dist/lib/browser/app-graph-builder-ENKIVZWH.mjs.map +0 -7
- package/dist/lib/browser/chunk-3F2Q2RKC.mjs +0 -18
- package/dist/lib/browser/chunk-3F2Q2RKC.mjs.map +0 -7
- package/dist/lib/browser/chunk-CAF2COXW.mjs +0 -19
- package/dist/lib/browser/chunk-CAF2COXW.mjs.map +0 -7
- package/dist/lib/browser/chunk-FOCQEA72.mjs.map +0 -7
- package/dist/lib/browser/chunk-GS3LDHYD.mjs +0 -12
- package/dist/lib/browser/chunk-GS3LDHYD.mjs.map +0 -7
- package/dist/lib/browser/chunk-HLWIF3AW.mjs.map +0 -7
- package/dist/lib/browser/intent-resolver-LNPFUWU5.mjs.map +0 -7
- package/dist/lib/browser/migrations-YJSO7JXY.mjs.map +0 -7
- package/dist/lib/browser/react-context-QBXCHNH2.mjs.map +0 -7
- package/dist/lib/browser/schema-defs-AMSX6T3B.mjs.map +0 -7
- package/dist/lib/node-esm/app-graph-builder-D4XJCLPN.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-IOGTQFLM.mjs +0 -19
- package/dist/lib/node-esm/chunk-IOGTQFLM.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-JG6AFSFU.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-MUWDSQ65.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-SZLX4BVJ.mjs +0 -14
- package/dist/lib/node-esm/chunk-SZLX4BVJ.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-UMO3ETDV.mjs +0 -20
- package/dist/lib/node-esm/chunk-UMO3ETDV.mjs.map +0 -7
- package/dist/lib/node-esm/intent-resolver-C4INMPH7.mjs.map +0 -7
- package/dist/lib/node-esm/migrations-UOEK7HB7.mjs.map +0 -7
- package/dist/lib/node-esm/react-context-JIH7YBFI.mjs.map +0 -7
- package/dist/lib/node-esm/schema-defs-4UTKKRTF.mjs.map +0 -7
|
@@ -1,24 +1,25 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ClientCapabilities
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-N5UR2HOE.mjs";
|
|
4
4
|
import {
|
|
5
|
-
|
|
6
|
-
} from "./chunk-
|
|
5
|
+
meta
|
|
6
|
+
} from "./chunk-ZRVMXLDR.mjs";
|
|
7
7
|
|
|
8
8
|
// src/capabilities/react-context.tsx
|
|
9
9
|
import React from "react";
|
|
10
|
-
import { Capabilities, contributes
|
|
10
|
+
import { Capabilities, contributes } from "@dxos/app-framework";
|
|
11
|
+
import { useCapability } from "@dxos/app-framework/react";
|
|
11
12
|
import { ClientProvider } from "@dxos/react-client";
|
|
12
|
-
var react_context_default = () => contributes(Capabilities.ReactContext, {
|
|
13
|
-
id:
|
|
13
|
+
var react_context_default = (() => contributes(Capabilities.ReactContext, {
|
|
14
|
+
id: meta.id,
|
|
14
15
|
context: ({ children }) => {
|
|
15
16
|
const client = useCapability(ClientCapabilities.Client);
|
|
16
17
|
return /* @__PURE__ */ React.createElement(ClientProvider, {
|
|
17
18
|
client
|
|
18
19
|
}, children);
|
|
19
20
|
}
|
|
20
|
-
});
|
|
21
|
+
}));
|
|
21
22
|
export {
|
|
22
23
|
react_context_default as default
|
|
23
24
|
};
|
|
24
|
-
//# sourceMappingURL=react-context-
|
|
25
|
+
//# sourceMappingURL=react-context-PCT5C3BN.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/capabilities/react-context.tsx"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport React from 'react';\n\nimport { Capabilities, contributes } from '@dxos/app-framework';\nimport { useCapability } from '@dxos/app-framework/react';\nimport { ClientProvider } from '@dxos/react-client';\n\nimport { meta } from '../meta';\n\nimport { ClientCapabilities } from './capabilities';\n\nexport default () =>\n contributes(Capabilities.ReactContext, {\n id: meta.id,\n context: ({ children }) => {\n const client = useCapability(ClientCapabilities.Client);\n return <ClientProvider client={client}>{children}</ClientProvider>;\n },\n });\n"],
|
|
5
|
+
"mappings": ";;;;;;;;AAIA,OAAOA,WAAW;AAElB,SAASC,cAAcC,mBAAmB;AAC1C,SAASC,qBAAqB;AAC9B,SAASC,sBAAsB;AAM/B,IAAA,yBAAe,MACbC,YAAYC,aAAaC,cAAc;EACrCC,IAAIC,KAAKD;EACTE,SAAS,CAAC,EAAEC,SAAQ,MAAE;AACpB,UAAMC,SAASC,cAAcC,mBAAmBC,MAAM;AACtD,WAAO,sBAAA,cAACC,gBAAAA;MAAeJ;OAAiBD,QAAAA;EAC1C;AACF,CAAA;",
|
|
6
|
+
"names": ["React", "Capabilities", "contributes", "useCapability", "ClientProvider", "contributes", "Capabilities", "ReactContext", "id", "meta", "context", "children", "client", "useCapability", "ClientCapabilities", "Client", "ClientProvider"]
|
|
7
|
+
}
|
|
@@ -8,16 +8,16 @@ import {
|
|
|
8
8
|
RecoveryCodeDialog,
|
|
9
9
|
RecoveryCredentialsContainer,
|
|
10
10
|
ResetDialog
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-4G4YWIUQ.mjs";
|
|
12
12
|
import {
|
|
13
13
|
Account
|
|
14
|
-
} from "./chunk-
|
|
15
|
-
import "./chunk-
|
|
14
|
+
} from "./chunk-RDIG75CA.mjs";
|
|
15
|
+
import "./chunk-ZRVMXLDR.mjs";
|
|
16
16
|
|
|
17
17
|
// src/capabilities/react-surface.tsx
|
|
18
18
|
import React from "react";
|
|
19
19
|
import { Capabilities, contributes, createSurface } from "@dxos/app-framework";
|
|
20
|
-
var react_surface_default = ({ createInvitationUrl, onReset }) => contributes(Capabilities.ReactSurface, [
|
|
20
|
+
var react_surface_default = (({ createInvitationUrl, onReset }) => contributes(Capabilities.ReactSurface, [
|
|
21
21
|
createSurface({
|
|
22
22
|
id: Account.Profile,
|
|
23
23
|
role: "article",
|
|
@@ -59,8 +59,8 @@ var react_surface_default = ({ createInvitationUrl, onReset }) => contributes(Ca
|
|
|
59
59
|
onReset
|
|
60
60
|
})
|
|
61
61
|
})
|
|
62
|
-
]);
|
|
62
|
+
]));
|
|
63
63
|
export {
|
|
64
64
|
react_surface_default as default
|
|
65
65
|
};
|
|
66
|
-
//# sourceMappingURL=react-surface-
|
|
66
|
+
//# sourceMappingURL=react-surface-RCXEA65V.mjs.map
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/capabilities/react-surface.tsx"],
|
|
4
4
|
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport React from 'react';\n\nimport { Capabilities, contributes, createSurface } from '@dxos/app-framework';\nimport { type JoinPanelProps } from '@dxos/shell/react';\n\nimport {\n DevicesContainer,\n JOIN_DIALOG,\n JoinDialog,\n ProfileContainer,\n RECOVERY_CODE_DIALOG,\n RESET_DIALOG,\n RecoveryCodeDialog,\n type RecoveryCodeDialogProps,\n RecoveryCredentialsContainer,\n ResetDialog,\n type ResetDialogProps,\n} from '../components';\nimport { Account, type ClientPluginOptions } from '../types';\n\ntype ReactSurfaceOptions = Pick<ClientPluginOptions, 'onReset'> & {\n createInvitationUrl: (invitationCode: string) => string;\n};\n\nexport default ({ createInvitationUrl, onReset }: ReactSurfaceOptions) =>\n contributes(Capabilities.ReactSurface, [\n createSurface({\n id: Account.Profile,\n role: 'article',\n filter: (data): data is any => data.subject === Account.Profile,\n component: () => <ProfileContainer />,\n }),\n createSurface({\n id: Account.Devices,\n role: 'article',\n filter: (data): data is any => data.subject === Account.Devices,\n component: ({ data }) => <DevicesContainer createInvitationUrl={createInvitationUrl} />,\n }),\n createSurface({\n id: Account.Security,\n role: 'article',\n filter: (data): data is any => data.subject === Account.Security,\n component: () => <RecoveryCredentialsContainer />,\n }),\n createSurface({\n id: JOIN_DIALOG,\n role: 'dialog',\n filter: (data): data is { props: JoinPanelProps } => data.component === JOIN_DIALOG,\n component: ({ data }) => <JoinDialog {...data.props} />,\n }),\n createSurface({\n id: RECOVERY_CODE_DIALOG,\n role: 'dialog',\n filter: (data): data is { props: RecoveryCodeDialogProps } => data.component === RECOVERY_CODE_DIALOG,\n component: ({ data }) => <RecoveryCodeDialog {...data.props} />,\n }),\n createSurface({\n id: RESET_DIALOG,\n role: 'dialog',\n filter: (data): data is { props: ResetDialogProps } => data.component === RESET_DIALOG,\n component: ({ data }) => <ResetDialog {...data.props} onReset={onReset} />,\n }),\n ]);\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;AAIA,OAAOA,WAAW;AAElB,SAASC,cAAcC,aAAaC,qBAAqB;AAsBzD,IAAA,
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;AAIA,OAAOA,WAAW;AAElB,SAASC,cAAcC,aAAaC,qBAAqB;AAsBzD,IAAA,yBAAe,CAAC,EAAEC,qBAAqBC,QAAO,MAC5CC,YAAYC,aAAaC,cAAc;EACrCC,cAAc;IACZC,IAAIC,QAAQC;IACZC,MAAM;IACNC,QAAQ,CAACC,SAAsBA,KAAKC,YAAYL,QAAQC;IACxDK,WAAW,MAAM,sBAAA,cAACC,kBAAAA,IAAAA;EACpB,CAAA;EACAT,cAAc;IACZC,IAAIC,QAAQQ;IACZN,MAAM;IACNC,QAAQ,CAACC,SAAsBA,KAAKC,YAAYL,QAAQQ;IACxDF,WAAW,CAAC,EAAEF,KAAI,MAAO,sBAAA,cAACK,kBAAAA;MAAiBhB;;EAC7C,CAAA;EACAK,cAAc;IACZC,IAAIC,QAAQU;IACZR,MAAM;IACNC,QAAQ,CAACC,SAAsBA,KAAKC,YAAYL,QAAQU;IACxDJ,WAAW,MAAM,sBAAA,cAACK,8BAAAA,IAAAA;EACpB,CAAA;EACAb,cAAc;IACZC,IAAIa;IACJV,MAAM;IACNC,QAAQ,CAACC,SAA4CA,KAAKE,cAAcM;IACxEN,WAAW,CAAC,EAAEF,KAAI,MAAO,sBAAA,cAACS,YAAeT,KAAKU,KAAK;EACrD,CAAA;EACAhB,cAAc;IACZC,IAAIgB;IACJb,MAAM;IACNC,QAAQ,CAACC,SAAqDA,KAAKE,cAAcS;IACjFT,WAAW,CAAC,EAAEF,KAAI,MAAO,sBAAA,cAACY,oBAAuBZ,KAAKU,KAAK;EAC7D,CAAA;EACAhB,cAAc;IACZC,IAAIkB;IACJf,MAAM;IACNC,QAAQ,CAACC,SAA8CA,KAAKE,cAAcW;IAC1EX,WAAW,CAAC,EAAEF,KAAI,MAAO,sBAAA,cAACc,aAAAA;MAAa,GAAGd,KAAKU;MAAOpB;;EACxD,CAAA;CACD;",
|
|
6
6
|
"names": ["React", "Capabilities", "contributes", "createSurface", "createInvitationUrl", "onReset", "contributes", "Capabilities", "ReactSurface", "createSurface", "id", "Account", "Profile", "role", "filter", "data", "subject", "component", "ProfileContainer", "Devices", "DevicesContainer", "Security", "RecoveryCredentialsContainer", "JOIN_DIALOG", "JoinDialog", "props", "RECOVERY_CODE_DIALOG", "RecoveryCodeDialog", "RESET_DIALOG", "ResetDialog"]
|
|
7
7
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ClientCapabilities
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-N5UR2HOE.mjs";
|
|
4
|
+
import "./chunk-ZRVMXLDR.mjs";
|
|
5
5
|
|
|
6
6
|
// src/capabilities/schema-defs.ts
|
|
7
7
|
import { Capabilities, contributes } from "@dxos/app-framework";
|
|
8
|
-
var schema_defs_default = (context) => {
|
|
9
|
-
const registry = context.getCapability(Capabilities.
|
|
8
|
+
var schema_defs_default = ((context) => {
|
|
9
|
+
const registry = context.getCapability(Capabilities.AtomRegistry);
|
|
10
10
|
const client = context.getCapability(ClientCapabilities.Client);
|
|
11
11
|
let previous = [];
|
|
12
12
|
const cancel = registry.subscribe(context.capabilities(ClientCapabilities.Schema), (_schemas) => {
|
|
@@ -18,8 +18,8 @@ var schema_defs_default = (context) => {
|
|
|
18
18
|
immediate: true
|
|
19
19
|
});
|
|
20
20
|
return contributes(Capabilities.Null, null, () => cancel());
|
|
21
|
-
};
|
|
21
|
+
});
|
|
22
22
|
export {
|
|
23
23
|
schema_defs_default as default
|
|
24
24
|
};
|
|
25
|
-
//# sourceMappingURL=schema-defs-
|
|
25
|
+
//# sourceMappingURL=schema-defs-UNNBAEFW.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/capabilities/schema-defs.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { Capabilities, type PluginContext, contributes } from '@dxos/app-framework';\nimport { type Type } from '@dxos/echo';\n\nimport { ClientCapabilities } from './capabilities';\n\nexport default (context: PluginContext) => {\n const registry = context.getCapability(Capabilities.AtomRegistry);\n const client = context.getCapability(ClientCapabilities.Client);\n\n // TODO(wittjosiah): Unregister schemas when they are disabled.\n let previous: Type.Obj.Any[] = [];\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,cAAkCC,mBAAmB;AAK9D,IAAA,uBAAe,CAACC,YAAAA;AACd,QAAMC,WAAWD,QAAQE,cAAcC,aAAaC,YAAY;AAChE,QAAMC,SAASL,QAAQE,cAAcI,mBAAmBC,MAAM;AAG9D,MAAIC,WAA2B,CAAA;AAC/B,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", "AtomRegistry", "client", "ClientCapabilities", "Client", "previous", "cancel", "subscribe", "capabilities", "Schema", "_schemas", "schemas", "Array", "from", "Set", "flat", "newSchemas", "filter", "schema", "includes", "addTypes", "immediate", "contributes", "Null"]
|
|
7
|
+
}
|
|
@@ -1,28 +1,29 @@
|
|
|
1
1
|
import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
|
|
2
2
|
import {
|
|
3
3
|
ClientCapabilities
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-6ANOJ7ZM.mjs";
|
|
5
5
|
import {
|
|
6
6
|
Account,
|
|
7
7
|
ClientAction
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-VENKFPBC.mjs";
|
|
9
9
|
import {
|
|
10
|
-
|
|
11
|
-
} from "./chunk-
|
|
10
|
+
meta
|
|
11
|
+
} from "./chunk-QT3EQXDU.mjs";
|
|
12
12
|
|
|
13
13
|
// src/capabilities/app-graph-builder.ts
|
|
14
|
-
import {
|
|
15
|
-
import
|
|
14
|
+
import { Atom } from "@effect-atom/atom-react";
|
|
15
|
+
import * as Function from "effect/Function";
|
|
16
|
+
import * as Option from "effect/Option";
|
|
16
17
|
import { createIntent } from "@dxos/app-framework";
|
|
17
18
|
import { Capabilities, contributes } from "@dxos/app-framework";
|
|
18
|
-
import { ROOT_ID,
|
|
19
|
+
import { ROOT_ID, atomFromObservable, createExtension } from "@dxos/plugin-graph";
|
|
19
20
|
import { ConnectionState } from "@dxos/react-client/mesh";
|
|
20
|
-
var app_graph_builder_default = (context) => contributes(Capabilities.AppGraphBuilder, createExtension({
|
|
21
|
-
id:
|
|
22
|
-
actions: (node) =>
|
|
21
|
+
var app_graph_builder_default = ((context) => contributes(Capabilities.AppGraphBuilder, createExtension({
|
|
22
|
+
id: meta.id,
|
|
23
|
+
actions: (node) => Atom.make((get) => Function.pipe(get(node), Option.flatMap((node2) => node2.id === ROOT_ID ? Option.some(node2) : Option.none()), Option.map(() => {
|
|
23
24
|
return [
|
|
24
25
|
{
|
|
25
|
-
id: `${
|
|
26
|
+
id: `${meta.id}/open-user-account`,
|
|
26
27
|
data: async () => {
|
|
27
28
|
const { dispatchPromise: dispatch } = context.getCapability(Capabilities.IntentDispatcher);
|
|
28
29
|
await dispatch(createIntent(ClientAction.ShareIdentity));
|
|
@@ -31,7 +32,7 @@ var app_graph_builder_default = (context) => contributes(Capabilities.AppGraphBu
|
|
|
31
32
|
label: [
|
|
32
33
|
"open user account label",
|
|
33
34
|
{
|
|
34
|
-
ns:
|
|
35
|
+
ns: meta.id
|
|
35
36
|
}
|
|
36
37
|
],
|
|
37
38
|
icon: "ph--user--regular",
|
|
@@ -46,19 +47,19 @@ var app_graph_builder_default = (context) => contributes(Capabilities.AppGraphBu
|
|
|
46
47
|
}
|
|
47
48
|
];
|
|
48
49
|
}), Option.getOrElse(() => []))),
|
|
49
|
-
connector: (node) =>
|
|
50
|
+
connector: (node) => Atom.make((get) => Function.pipe(get(node), Option.flatMap((node2) => node2.id === ROOT_ID ? Option.some(node2) : Option.none()), Option.map(() => {
|
|
50
51
|
const client = context.getCapability(ClientCapabilities.Client);
|
|
51
|
-
const identity = get(
|
|
52
|
-
const status = get(
|
|
52
|
+
const identity = get(atomFromObservable(client.halo.identity));
|
|
53
|
+
const status = get(atomFromObservable(client.mesh.networkStatus));
|
|
53
54
|
return [
|
|
54
55
|
{
|
|
55
56
|
id: Account.id,
|
|
56
|
-
type:
|
|
57
|
+
type: meta.id,
|
|
57
58
|
properties: {
|
|
58
59
|
label: [
|
|
59
60
|
"account label",
|
|
60
61
|
{
|
|
61
|
-
ns:
|
|
62
|
+
ns: meta.id
|
|
62
63
|
}
|
|
63
64
|
],
|
|
64
65
|
icon: "ph--user--regular",
|
|
@@ -73,12 +74,12 @@ var app_graph_builder_default = (context) => contributes(Capabilities.AppGraphBu
|
|
|
73
74
|
{
|
|
74
75
|
id: Account.Profile,
|
|
75
76
|
data: Account.Profile,
|
|
76
|
-
type:
|
|
77
|
+
type: meta.id,
|
|
77
78
|
properties: {
|
|
78
79
|
label: [
|
|
79
80
|
"profile label",
|
|
80
81
|
{
|
|
81
|
-
ns:
|
|
82
|
+
ns: meta.id
|
|
82
83
|
}
|
|
83
84
|
],
|
|
84
85
|
icon: "ph--user--regular"
|
|
@@ -87,12 +88,12 @@ var app_graph_builder_default = (context) => contributes(Capabilities.AppGraphBu
|
|
|
87
88
|
{
|
|
88
89
|
id: Account.Devices,
|
|
89
90
|
data: Account.Devices,
|
|
90
|
-
type:
|
|
91
|
+
type: meta.id,
|
|
91
92
|
properties: {
|
|
92
93
|
label: [
|
|
93
94
|
"devices label",
|
|
94
95
|
{
|
|
95
|
-
ns:
|
|
96
|
+
ns: meta.id
|
|
96
97
|
}
|
|
97
98
|
],
|
|
98
99
|
icon: "ph--devices--regular",
|
|
@@ -102,12 +103,12 @@ var app_graph_builder_default = (context) => contributes(Capabilities.AppGraphBu
|
|
|
102
103
|
{
|
|
103
104
|
id: Account.Security,
|
|
104
105
|
data: Account.Security,
|
|
105
|
-
type:
|
|
106
|
+
type: meta.id,
|
|
106
107
|
properties: {
|
|
107
108
|
label: [
|
|
108
109
|
"security label",
|
|
109
110
|
{
|
|
110
|
-
ns:
|
|
111
|
+
ns: meta.id
|
|
111
112
|
}
|
|
112
113
|
],
|
|
113
114
|
icon: "ph--key--regular"
|
|
@@ -117,8 +118,8 @@ var app_graph_builder_default = (context) => contributes(Capabilities.AppGraphBu
|
|
|
117
118
|
}
|
|
118
119
|
];
|
|
119
120
|
}), Option.getOrElse(() => [])))
|
|
120
|
-
}));
|
|
121
|
+
})));
|
|
121
122
|
export {
|
|
122
123
|
app_graph_builder_default as default
|
|
123
124
|
};
|
|
124
|
-
//# sourceMappingURL=app-graph-builder-
|
|
125
|
+
//# sourceMappingURL=app-graph-builder-LLM25DRR.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/capabilities/app-graph-builder.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { Atom } from '@effect-atom/atom-react';\nimport * as Function from 'effect/Function';\nimport * as Option from 'effect/Option';\n\nimport { createIntent } from '@dxos/app-framework';\nimport { Capabilities, type PluginContext, contributes } from '@dxos/app-framework';\nimport { ROOT_ID, atomFromObservable, createExtension } from '@dxos/plugin-graph';\nimport { ConnectionState } from '@dxos/react-client/mesh';\n\nimport { meta } from '../meta';\nimport { Account, ClientAction } from '../types';\n\nimport { ClientCapabilities } from './capabilities';\n\nexport default (context: PluginContext) =>\n contributes(\n Capabilities.AppGraphBuilder,\n createExtension({\n id: meta.id,\n actions: (node) =>\n Atom.make((get) =>\n Function.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: `${meta.id}/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: meta.id }],\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 Atom.make((get) =>\n Function.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(atomFromObservable(client.halo.identity));\n const status = get(atomFromObservable(client.mesh.networkStatus));\n\n return [\n {\n id: Account.id,\n type: meta.id,\n properties: {\n label: ['account label', { ns: meta.id }],\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: meta.id,\n properties: {\n label: ['profile label', { ns: meta.id }],\n icon: 'ph--user--regular',\n },\n },\n {\n id: Account.Devices,\n data: Account.Devices,\n type: meta.id,\n properties: {\n label: ['devices label', { ns: meta.id }],\n icon: 'ph--devices--regular',\n testId: 'clientPlugin.devices',\n },\n },\n {\n id: Account.Security,\n data: Account.Security,\n type: meta.id,\n properties: {\n label: ['security label', { ns: meta.id }],\n icon: 'ph--key--regular',\n },\n },\n ],\n },\n ];\n }),\n Option.getOrElse(() => []),\n ),\n ),\n }),\n );\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;AAIA,SAASA,YAAY;AACrB,YAAYC,cAAc;AAC1B,YAAYC,YAAY;AAExB,SAASC,oBAAoB;AAC7B,SAASC,cAAkCC,mBAAmB;AAC9D,SAASC,SAASC,oBAAoBC,uBAAuB;AAC7D,SAASC,uBAAuB;AAOhC,IAAA,6BAAe,CAACC,YACdC,YACEC,aAAaC,iBACbC,gBAAgB;EACdC,IAAIC,KAAKD;EACTE,SAAS,CAACC,SACRC,KAAKC,KAAK,CAACC,QACAC,cACPD,IAAIH,IAAAA,GACGK,eAAQ,CAACL,UAAUA,MAAKH,OAAOS,UAAiBC,YAAKP,KAAAA,IAAeQ,YAAI,CAAA,GACxEC,WAAI,MAAA;AACT,WAAO;MACL;QACEZ,IAAI,GAAGC,KAAKD,EAAE;QACda,MAAM,YAAA;AACJ,gBAAM,EAAEC,iBAAiBC,SAAQ,IAAKpB,QAAQqB,cAAcnB,aAAaoB,gBAAgB;AACzF,gBAAMF,SAASG,aAAaC,aAAaC,aAAa,CAAA;QACxD;QACAC,YAAY;UACVC,OAAO;YAAC;YAA2B;cAAEC,IAAItB,KAAKD;YAAG;;UACjDwB,MAAM;UACNC,aAAa;UACbC,YAAY;YACVC,OAAO;;YAEPC,SAAS;YACTC,OAAO;UACT;QACF;MACF;;EAEJ,CAAA,GACOC,iBAAU,MAAM,CAAA,CAAE,CAAA,CAAA;EAG/BC,WAAW,CAAC5B,SACVC,KAAKC,KAAK,CAACC,QACAC,cACPD,IAAIH,IAAAA,GACGK,eAAQ,CAACL,UAAUA,MAAKH,OAAOS,UAAiBC,YAAKP,KAAAA,IAAeQ,YAAI,CAAA,GACxEC,WAAI,MAAA;AACT,UAAMoB,SAASrC,QAAQqB,cAAciB,mBAAmBC,MAAM;AAC9D,UAAMC,WAAW7B,IAAI8B,mBAAmBJ,OAAOK,KAAKF,QAAQ,CAAA;AAC5D,UAAMG,SAAShC,IAAI8B,mBAAmBJ,OAAOO,KAAKC,aAAa,CAAA;AAE/D,WAAO;MACL;QACExC,IAAIyC,QAAQzC;QACZ0C,MAAMzC,KAAKD;QACXqB,YAAY;UACVC,OAAO;YAAC;YAAiB;cAAEC,IAAItB,KAAKD;YAAG;;UACvCwB,MAAM;UACNC,aAAa;;UAEbkB,QAAQR,UAAUS,YAAYC,MAAAA;UAC9BC,KAAKX,UAAUY,SAASlC,MAAMiC;UAC9BE,OAAOb,UAAUY,SAASlC,MAAMmC;UAChCV,QAAQA,OAAOW,UAAUC,gBAAgBC,UAAU,UAAU;QAC/D;QACAC,OAAO;UACL;YACEpD,IAAIyC,QAAQY;YACZxC,MAAM4B,QAAQY;YACdX,MAAMzC,KAAKD;YACXqB,YAAY;cACVC,OAAO;gBAAC;gBAAiB;kBAAEC,IAAItB,KAAKD;gBAAG;;cACvCwB,MAAM;YACR;UACF;UACA;YACExB,IAAIyC,QAAQa;YACZzC,MAAM4B,QAAQa;YACdZ,MAAMzC,KAAKD;YACXqB,YAAY;cACVC,OAAO;gBAAC;gBAAiB;kBAAEC,IAAItB,KAAKD;gBAAG;;cACvCwB,MAAM;cACN+B,QAAQ;YACV;UACF;UACA;YACEvD,IAAIyC,QAAQe;YACZ3C,MAAM4B,QAAQe;YACdd,MAAMzC,KAAKD;YACXqB,YAAY;cACVC,OAAO;gBAAC;gBAAkB;kBAAEC,IAAItB,KAAKD;gBAAG;;cACxCwB,MAAM;YACR;UACF;;MAEJ;;EAEJ,CAAA,GACOM,iBAAU,MAAM,CAAA,CAAE,CAAA,CAAA;AAGjC,CAAA,CAAA;",
|
|
6
|
+
"names": ["Atom", "Function", "Option", "createIntent", "Capabilities", "contributes", "ROOT_ID", "atomFromObservable", "createExtension", "ConnectionState", "context", "contributes", "Capabilities", "AppGraphBuilder", "createExtension", "id", "meta", "actions", "node", "Atom", "make", "get", "pipe", "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", "atomFromObservable", "halo", "status", "mesh", "networkStatus", "Account", "type", "userId", "identityKey", "toHex", "hue", "profile", "emoji", "swarm", "ConnectionState", "OFFLINE", "nodes", "Profile", "Devices", "testId", "Security"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
|
|
2
|
+
import {
|
|
3
|
+
meta
|
|
4
|
+
} from "./chunk-QT3EQXDU.mjs";
|
|
5
|
+
|
|
6
|
+
// src/capabilities/capabilities.ts
|
|
7
|
+
import { defineCapability } from "@dxos/app-framework";
|
|
8
|
+
(function(ClientCapabilities2) {
|
|
9
|
+
ClientCapabilities2.Client = defineCapability(`${meta.id}/capability/client`);
|
|
10
|
+
ClientCapabilities2.Schema = defineCapability(`${meta.id}/capability/schema`);
|
|
11
|
+
ClientCapabilities2.SchemaWhiteList = defineCapability(`${meta.id}/capability/schema-whitelist`);
|
|
12
|
+
ClientCapabilities2.Migration = defineCapability(`${meta.id}/capability/migration`);
|
|
13
|
+
})(ClientCapabilities || (ClientCapabilities = {}));
|
|
14
|
+
var ClientCapabilities;
|
|
15
|
+
|
|
16
|
+
export {
|
|
17
|
+
ClientCapabilities
|
|
18
|
+
};
|
|
19
|
+
//# sourceMappingURL=chunk-6ANOJ7ZM.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
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 Type } from '@dxos/echo';\n\nimport { meta } from '../meta';\n\nexport namespace ClientCapabilities {\n export const Client = defineCapability<Client>(`${meta.id}/capability/client`);\n export const Schema = defineCapability<Type.Obj.Any[]>(`${meta.id}/capability/schema`);\n // TODO(wittjosiah): More descriptive name.\n export const SchemaWhiteList = defineCapability<Type.Obj.Any[]>(`${meta.id}/capability/schema-whitelist`);\n export const Migration = defineCapability<ObjectMigration[]>(`${meta.id}/capability/migration`);\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;AAIA,SAASA,wBAAwB;UAOhBC,qBAAAA;sBACFC,SAASC,iBAAyB,GAAGC,KAAKC,EAAE,oBAAoB;sBAChEC,SAASH,iBAAiC,GAAGC,KAAKC,EAAE,oBAAoB;sBAExEE,kBAAkBJ,iBAAiC,GAAGC,KAAKC,EAAE,8BAA8B;sBAC3FG,YAAYL,iBAAoC,GAAGC,KAAKC,EAAE,uBAAuB;AAChG,GANiBJ,uBAAAA,qBAAAA,CAAAA,EAAAA;;",
|
|
6
|
+
"names": ["defineCapability", "ClientCapabilities", "Client", "defineCapability", "meta", "id", "Schema", "SchemaWhiteList", "Migration"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
|
|
2
|
+
import {
|
|
3
|
+
meta
|
|
4
|
+
} from "./chunk-QT3EQXDU.mjs";
|
|
5
|
+
|
|
6
|
+
// src/events.ts
|
|
7
|
+
import { defineEvent } from "@dxos/app-framework";
|
|
8
|
+
(function(ClientEvents2) {
|
|
9
|
+
ClientEvents2.ClientReady = defineEvent(`${meta.id}/event/client-ready`);
|
|
10
|
+
ClientEvents2.SetupSchema = defineEvent(`${meta.id}/event/setup-schema`);
|
|
11
|
+
ClientEvents2.SetupMigration = defineEvent(`${meta.id}/event/setup-migration`);
|
|
12
|
+
ClientEvents2.IdentityCreated = defineEvent(`${meta.id}/event/identity-created`);
|
|
13
|
+
ClientEvents2.SpacesReady = defineEvent(`${meta.id}/event/spaces-ready`);
|
|
14
|
+
})(ClientEvents || (ClientEvents = {}));
|
|
15
|
+
var ClientEvents;
|
|
16
|
+
|
|
17
|
+
export {
|
|
18
|
+
ClientEvents
|
|
19
|
+
};
|
|
20
|
+
//# sourceMappingURL=chunk-7M7VWQJW.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/events.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { defineEvent } from '@dxos/app-framework';\n\nimport { meta } from './meta';\n\nexport namespace ClientEvents {\n export const ClientReady = defineEvent(`${meta.id}/event/client-ready`);\n export const SetupSchema = defineEvent(`${meta.id}/event/setup-schema`);\n export const SetupMigration = defineEvent(`${meta.id}/event/setup-migration`);\n export const IdentityCreated = defineEvent(`${meta.id}/event/identity-created`);\n export const SpacesReady = defineEvent(`${meta.id}/event/spaces-ready`);\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;AAIA,SAASA,mBAAmB;UAIXC,eAAAA;gBACFC,cAAcC,YAAY,GAAGC,KAAKC,EAAE,qBAAqB;gBACzDC,cAAcH,YAAY,GAAGC,KAAKC,EAAE,qBAAqB;gBACzDE,iBAAiBJ,YAAY,GAAGC,KAAKC,EAAE,wBAAwB;gBAC/DG,kBAAkBL,YAAY,GAAGC,KAAKC,EAAE,yBAAyB;gBACjEI,cAAcN,YAAY,GAAGC,KAAKC,EAAE,qBAAqB;AACxE,GANiBJ,iBAAAA,eAAAA,CAAAA,EAAAA;;",
|
|
6
|
+
"names": ["defineEvent", "ClientEvents", "ClientReady", "defineEvent", "meta", "id", "SetupSchema", "SetupMigration", "IdentityCreated", "SpacesReady"]
|
|
7
|
+
}
|
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
|
|
2
2
|
import {
|
|
3
3
|
ClientAction
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-VENKFPBC.mjs";
|
|
5
5
|
import {
|
|
6
|
-
|
|
7
|
-
} from "./chunk-
|
|
6
|
+
meta
|
|
7
|
+
} from "./chunk-QT3EQXDU.mjs";
|
|
8
8
|
|
|
9
9
|
// src/components/DevicesContainer.tsx
|
|
10
10
|
import { useSignals as _useSignals } from "@preact-signals/safe-react/tracking";
|
|
11
11
|
import React, { useCallback, useEffect, useState } from "react";
|
|
12
12
|
import { QR } from "react-qr-rounded";
|
|
13
|
-
import { createIntent
|
|
13
|
+
import { createIntent } from "@dxos/app-framework";
|
|
14
|
+
import { useIntentDispatcher } from "@dxos/app-framework/react";
|
|
14
15
|
import { log } from "@dxos/log";
|
|
15
16
|
import { useClient, useMulticastObservable } from "@dxos/react-client";
|
|
16
17
|
import { useDevices } from "@dxos/react-client/halo";
|
|
@@ -43,14 +44,14 @@ var DevicesContainer = ({ createInvitationUrl }) => {
|
|
|
43
44
|
]);
|
|
44
45
|
return /* @__PURE__ */ React.createElement(Clipboard.Provider, null, /* @__PURE__ */ React.createElement(ControlPage, null, /* @__PURE__ */ React.createElement(ControlSection, {
|
|
45
46
|
title: t("devices verbose label", {
|
|
46
|
-
ns:
|
|
47
|
+
ns: meta.id
|
|
47
48
|
}),
|
|
48
49
|
description: t("devices description", {
|
|
49
|
-
ns:
|
|
50
|
+
ns: meta.id
|
|
50
51
|
})
|
|
51
52
|
}, /* @__PURE__ */ React.createElement(ControlFrame, null, /* @__PURE__ */ React.createElement(ControlFrameItem, {
|
|
52
53
|
title: t("devices label", {
|
|
53
|
-
ns:
|
|
54
|
+
ns: meta.id
|
|
54
55
|
})
|
|
55
56
|
}, /* @__PURE__ */ React.createElement(List, null, devices.map((device) => {
|
|
56
57
|
return /* @__PURE__ */ React.createElement(DeviceListItem, {
|
|
@@ -64,15 +65,15 @@ var DevicesContainer = ({ createInvitationUrl }) => {
|
|
|
64
65
|
createInvitationUrl
|
|
65
66
|
})))), /* @__PURE__ */ React.createElement(ControlSection, {
|
|
66
67
|
title: t("danger zone title", {
|
|
67
|
-
ns:
|
|
68
|
+
ns: meta.id
|
|
68
69
|
}),
|
|
69
70
|
description: t("danger zone description", {
|
|
70
|
-
ns:
|
|
71
|
+
ns: meta.id
|
|
71
72
|
})
|
|
72
73
|
}, /* @__PURE__ */ React.createElement(ControlGroup, null, /* @__PURE__ */ React.createElement(ControlItem, {
|
|
73
74
|
title: t("reset device label"),
|
|
74
75
|
description: t("reset device description", {
|
|
75
|
-
ns:
|
|
76
|
+
ns: meta.id
|
|
76
77
|
})
|
|
77
78
|
}, /* @__PURE__ */ React.createElement(Button, {
|
|
78
79
|
variant: "destructive",
|
|
@@ -81,7 +82,7 @@ var DevicesContainer = ({ createInvitationUrl }) => {
|
|
|
81
82
|
}, t("reset device label"))), /* @__PURE__ */ React.createElement(ControlItem, {
|
|
82
83
|
title: t("recover identity label"),
|
|
83
84
|
description: t("recover identity description", {
|
|
84
|
-
ns:
|
|
85
|
+
ns: meta.id
|
|
85
86
|
})
|
|
86
87
|
}, /* @__PURE__ */ React.createElement(Button, {
|
|
87
88
|
variant: "destructive",
|
|
@@ -90,7 +91,7 @@ var DevicesContainer = ({ createInvitationUrl }) => {
|
|
|
90
91
|
}, t("recover identity label"))), /* @__PURE__ */ React.createElement(ControlItem, {
|
|
91
92
|
title: t("join new identity label"),
|
|
92
93
|
description: t("join new identity description", {
|
|
93
|
-
ns:
|
|
94
|
+
ns: meta.id
|
|
94
95
|
})
|
|
95
96
|
}, /* @__PURE__ */ React.createElement(Button, {
|
|
96
97
|
variant: "destructive",
|
|
@@ -117,7 +118,7 @@ var DeviceInvitation = (props) => {
|
|
|
117
118
|
authCode: invitation3.authCode
|
|
118
119
|
}), void 0, {
|
|
119
120
|
F: __dxlog_file,
|
|
120
|
-
L:
|
|
121
|
+
L: 126,
|
|
121
122
|
S: void 0,
|
|
122
123
|
C: (f, a) => f(...a)
|
|
123
124
|
});
|
|
@@ -177,7 +178,7 @@ var InvitationSection = ({ state = -1, authCode, invitationId = "never", url = "
|
|
|
177
178
|
} }) => {
|
|
178
179
|
var _effect = _useSignals();
|
|
179
180
|
try {
|
|
180
|
-
const { t } = useTranslation(
|
|
181
|
+
const { t } = useTranslation(meta.id);
|
|
181
182
|
const activeView = state < 0 ? "init" : state >= Invitation.State.CANCELLED ? "complete" : state >= Invitation.State.READY_FOR_AUTHENTICATION && authCode ? "auth-code" : "qr-code";
|
|
182
183
|
return activeView === "init" ? /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("p", {
|
|
183
184
|
className: "text-description mbe-2"
|
|
@@ -222,7 +223,7 @@ var InvitationQR = ({ id, url, onCancel }) => {
|
|
|
222
223
|
return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("p", {
|
|
223
224
|
className: "text-description"
|
|
224
225
|
}, t("qr code description", {
|
|
225
|
-
ns:
|
|
226
|
+
ns: meta.id
|
|
226
227
|
})), /* @__PURE__ */ React.createElement("div", {
|
|
227
228
|
role: "group",
|
|
228
229
|
className: "grid grid-cols-[1fr_min-content] mlb-2 gap-2"
|
|
@@ -299,16 +300,17 @@ var InvitationComplete = ({ statusValue }) => {
|
|
|
299
300
|
// src/components/JoinDialog.tsx
|
|
300
301
|
import { useSignals as _useSignals2 } from "@preact-signals/safe-react/tracking";
|
|
301
302
|
import React2, { useCallback as useCallback2 } from "react";
|
|
302
|
-
import { LayoutAction, createIntent as createIntent2
|
|
303
|
+
import { LayoutAction, createIntent as createIntent2 } from "@dxos/app-framework";
|
|
304
|
+
import { useIntentDispatcher as useIntentDispatcher2 } from "@dxos/app-framework/react";
|
|
303
305
|
import { ObservabilityAction } from "@dxos/plugin-observability/types";
|
|
304
306
|
import { Dialog, useTranslation as useTranslation2 } from "@dxos/react-ui";
|
|
305
307
|
import { JoinPanel } from "@dxos/shell/react";
|
|
306
|
-
var JOIN_DIALOG = `${
|
|
308
|
+
var JOIN_DIALOG = `${meta.id}/JoinDialog`;
|
|
307
309
|
var JoinDialog = (props) => {
|
|
308
310
|
var _effect = _useSignals2();
|
|
309
311
|
try {
|
|
310
312
|
const { dispatchPromise: dispatch } = useIntentDispatcher2();
|
|
311
|
-
const { t } = useTranslation2(
|
|
313
|
+
const { t } = useTranslation2(meta.id);
|
|
312
314
|
const handleCancelResetStorage = useCallback2(() => dispatch(createIntent2(ClientAction.ShareIdentity)), [
|
|
313
315
|
dispatch
|
|
314
316
|
]);
|
|
@@ -352,7 +354,7 @@ var JoinDialog = (props) => {
|
|
|
352
354
|
|
|
353
355
|
// src/components/ProfileContainer.tsx
|
|
354
356
|
import { useSignals as _useSignals3 } from "@preact-signals/safe-react/tracking";
|
|
355
|
-
import
|
|
357
|
+
import * as Schema from "effect/Schema";
|
|
356
358
|
import React3, { useCallback as useCallback3, useMemo, useState as useState2 } from "react";
|
|
357
359
|
import { debounce } from "@dxos/async";
|
|
358
360
|
import { useClient as useClient2 } from "@dxos/react-client";
|
|
@@ -368,7 +370,7 @@ var getEmojiValue = (identity) => identity?.profile?.data?.emoji || getDefaultEm
|
|
|
368
370
|
var ProfileContainer = () => {
|
|
369
371
|
var _effect = _useSignals3();
|
|
370
372
|
try {
|
|
371
|
-
const { t } = useTranslation3(
|
|
373
|
+
const { t } = useTranslation3(meta.id);
|
|
372
374
|
const client = useClient2();
|
|
373
375
|
const identity = useIdentity();
|
|
374
376
|
const [displayName, setDisplayNameDirectly] = useState2(identity?.profile?.displayName ?? "");
|
|
@@ -451,8 +453,7 @@ var ProfileContainer = () => {
|
|
|
451
453
|
}, /* @__PURE__ */ React3.createElement(HuePicker, {
|
|
452
454
|
value: getValue(),
|
|
453
455
|
onChange: handleChange,
|
|
454
|
-
onReset: handleHueReset
|
|
455
|
-
classNames: "[--hue-preview-size:1.5rem] justify-self-end"
|
|
456
|
+
onReset: handleHueReset
|
|
456
457
|
}));
|
|
457
458
|
},
|
|
458
459
|
// TODO(wittjosiah): We need text input annotations for disabled and copyable.
|
|
@@ -506,21 +507,21 @@ var ProfileSchema = Schema.Struct({
|
|
|
506
507
|
import { useSignals as _useSignals4 } from "@preact-signals/safe-react/tracking";
|
|
507
508
|
import React4, { useCallback as useCallback4, useState as useState3 } from "react";
|
|
508
509
|
import { AlertDialog, Button as Button2, Clipboard as Clipboard3, Input as Input2, useTranslation as useTranslation4 } from "@dxos/react-ui";
|
|
509
|
-
var RECOVERY_CODE_DIALOG = `${
|
|
510
|
+
var RECOVERY_CODE_DIALOG = `${meta.id}/RecoveryCodeDialog`;
|
|
510
511
|
var RecoveryCodeDialog = ({ code }) => {
|
|
511
512
|
var _effect = _useSignals4();
|
|
512
513
|
try {
|
|
513
|
-
const { t } = useTranslation4(
|
|
514
|
+
const { t } = useTranslation4(meta.id);
|
|
514
515
|
const [confirmation, setConfirmation] = useState3(false);
|
|
515
516
|
const handleConfirmation = useCallback4((checked) => setConfirmation(checked), []);
|
|
516
517
|
return /* @__PURE__ */ React4.createElement(AlertDialog.Content, {
|
|
517
518
|
classNames: "bs-content min-bs-[15rem] max-bs-full md:max-is-[40rem] overflow-hidden"
|
|
518
519
|
}, /* @__PURE__ */ React4.createElement(AlertDialog.Title, null, t("recovery code dialog title")), /* @__PURE__ */ React4.createElement("p", {
|
|
519
|
-
className: "
|
|
520
|
+
className: "plb-4"
|
|
520
521
|
}, t("recovery code dialog description")), /* @__PURE__ */ React4.createElement(Clipboard3.Provider, null, /* @__PURE__ */ React4.createElement(Code, {
|
|
521
522
|
code
|
|
522
523
|
})), /* @__PURE__ */ React4.createElement("div", {
|
|
523
|
-
className: "flex flex-col
|
|
524
|
+
className: "flex flex-col plb-4 gap-2"
|
|
524
525
|
}, /* @__PURE__ */ React4.createElement("p", null, t("recovery code dialog warning 1")), /* @__PURE__ */ React4.createElement("p", null, t("recovery code dialog warning 2"))), /* @__PURE__ */ React4.createElement("div", {
|
|
525
526
|
className: "flex items-center gap-2 pbe-4"
|
|
526
527
|
}, /* @__PURE__ */ React4.createElement(Input2.Root, null, /* @__PURE__ */ React4.createElement(Input2.Checkbox, {
|
|
@@ -555,7 +556,7 @@ var Code = ({ code }) => {
|
|
|
555
556
|
key: i,
|
|
556
557
|
className: "flex items-center p-2 gap-2"
|
|
557
558
|
}, /* @__PURE__ */ React4.createElement("div", {
|
|
558
|
-
className: "
|
|
559
|
+
className: "is-4 text-xs text-center text-subdued"
|
|
559
560
|
}, i + 1), /* @__PURE__ */ React4.createElement("div", {
|
|
560
561
|
className: "text-sm"
|
|
561
562
|
}, word)))));
|
|
@@ -567,15 +568,16 @@ var Code = ({ code }) => {
|
|
|
567
568
|
// src/components/RecoveryCredentialsContainer.tsx
|
|
568
569
|
import { useSignals as _useSignals5 } from "@preact-signals/safe-react/tracking";
|
|
569
570
|
import React5 from "react";
|
|
570
|
-
import { createIntent as createIntent3
|
|
571
|
+
import { createIntent as createIntent3 } from "@dxos/app-framework";
|
|
572
|
+
import { useIntentDispatcher as useIntentDispatcher3 } from "@dxos/app-framework/react";
|
|
571
573
|
import { useCredentials } from "@dxos/react-client/halo";
|
|
572
574
|
import { Icon as Icon2, IconButton as IconButton2, List as List2, ListItem, Message, useTranslation as useTranslation5 } from "@dxos/react-ui";
|
|
573
575
|
import { ControlGroup as ControlGroup2, ControlItem as ControlItem3, ControlPage as ControlPage3, ControlSection as ControlSection3 } from "@dxos/react-ui-form";
|
|
574
|
-
var MANAGE_CREDENTIALS_DIALOG = `${
|
|
576
|
+
var MANAGE_CREDENTIALS_DIALOG = `${meta.id}/ManageCredentialsDialog`;
|
|
575
577
|
var RecoveryCredentialsContainer = () => {
|
|
576
578
|
var _effect = _useSignals5();
|
|
577
579
|
try {
|
|
578
|
-
const { t } = useTranslation5(
|
|
580
|
+
const { t } = useTranslation5(meta.id);
|
|
579
581
|
const { dispatchPromise: dispatch } = useIntentDispatcher3();
|
|
580
582
|
const credentials = useCredentials();
|
|
581
583
|
const recoveryCredentials = credentials.filter((credential) => credential.subject.assertion["@type"] === "dxos.halo.credentials.IdentityRecovery");
|
|
@@ -589,7 +591,6 @@ var RecoveryCredentialsContainer = () => {
|
|
|
589
591
|
label: t("create passkey label"),
|
|
590
592
|
icon: "ph--key--duotone",
|
|
591
593
|
variant: "primary",
|
|
592
|
-
size: 5,
|
|
593
594
|
onClick: () => dispatch(createIntent3(ClientAction.CreatePasskey))
|
|
594
595
|
})), /* @__PURE__ */ React5.createElement(ControlItem3, {
|
|
595
596
|
title: t("create recovery code label"),
|
|
@@ -598,7 +599,6 @@ var RecoveryCredentialsContainer = () => {
|
|
|
598
599
|
label: t("create recovery code label"),
|
|
599
600
|
icon: "ph--receipt--duotone",
|
|
600
601
|
variant: "default",
|
|
601
|
-
size: 5,
|
|
602
602
|
onClick: () => dispatch(createIntent3(ClientAction.CreateRecoveryCode))
|
|
603
603
|
})))), /* @__PURE__ */ React5.createElement(ControlSection3, {
|
|
604
604
|
title: t("credentials list label")
|
|
@@ -612,8 +612,7 @@ var RecoveryCredentialsContainer = () => {
|
|
|
612
612
|
}, recoveryCredentials.map((credential) => /* @__PURE__ */ React5.createElement(ListItem.Root, {
|
|
613
613
|
key: credential.id?.toHex()
|
|
614
614
|
}, /* @__PURE__ */ React5.createElement(ListItem.Endcap, null, /* @__PURE__ */ React5.createElement(Icon2, {
|
|
615
|
-
icon: "ph--key--regular"
|
|
616
|
-
size: 5
|
|
615
|
+
icon: "ph--key--regular"
|
|
617
616
|
})), /* @__PURE__ */ React5.createElement(ListItem.Heading, null, credential.issuanceDate.toLocaleString()))))));
|
|
618
617
|
} finally {
|
|
619
618
|
_effect.f();
|
|
@@ -623,15 +622,16 @@ var RecoveryCredentialsContainer = () => {
|
|
|
623
622
|
// src/components/ResetDialog.tsx
|
|
624
623
|
import { useSignals as _useSignals6 } from "@preact-signals/safe-react/tracking";
|
|
625
624
|
import React6, { useCallback as useCallback5 } from "react";
|
|
626
|
-
import { LayoutAction as LayoutAction2, createIntent as createIntent4
|
|
625
|
+
import { LayoutAction as LayoutAction2, createIntent as createIntent4 } from "@dxos/app-framework";
|
|
626
|
+
import { useIntentDispatcher as useIntentDispatcher4 } from "@dxos/app-framework/react";
|
|
627
627
|
import { useClient as useClient3 } from "@dxos/react-client";
|
|
628
628
|
import { Dialog as Dialog2, useTranslation as useTranslation6 } from "@dxos/react-ui";
|
|
629
629
|
import { ConfirmReset } from "@dxos/shell/react";
|
|
630
|
-
var RESET_DIALOG = `${
|
|
630
|
+
var RESET_DIALOG = `${meta.id}/ResetDialog`;
|
|
631
631
|
var ResetDialog = ({ mode, onReset }) => {
|
|
632
632
|
var _effect = _useSignals6();
|
|
633
633
|
try {
|
|
634
|
-
const { t } = useTranslation6(
|
|
634
|
+
const { t } = useTranslation6(meta.id);
|
|
635
635
|
const { dispatchPromise: dispatch } = useIntentDispatcher4();
|
|
636
636
|
const client = useClient3();
|
|
637
637
|
const handleReset = useCallback5(async () => {
|
|
@@ -684,4 +684,4 @@ export {
|
|
|
684
684
|
RESET_DIALOG,
|
|
685
685
|
ResetDialog
|
|
686
686
|
};
|
|
687
|
-
//# sourceMappingURL=chunk-
|
|
687
|
+
//# sourceMappingURL=chunk-DJ6XKSE4.mjs.map
|