@dxos/plugin-client 0.8.2-staging.7ac8446 → 0.8.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/browser/{app-graph-builder-WAS4YZNA.mjs → app-graph-builder-CBRN2DMK.mjs} +36 -32
- package/dist/lib/browser/app-graph-builder-CBRN2DMK.mjs.map +7 -0
- package/dist/lib/browser/chunk-DCUIJY75.mjs +694 -0
- package/dist/lib/browser/chunk-DCUIJY75.mjs.map +7 -0
- package/dist/lib/browser/chunk-IA3AVM4I.mjs +111 -0
- package/dist/lib/browser/chunk-IA3AVM4I.mjs.map +7 -0
- package/dist/lib/browser/{chunk-BGY6BSUC.mjs → chunk-PSSNS4C6.mjs} +2 -2
- package/dist/lib/{node-esm/chunk-K3KGGSJZ.mjs.map → browser/chunk-PSSNS4C6.mjs.map} +1 -1
- package/dist/lib/browser/{chunk-4PLF3BEB.mjs → chunk-UCVFWBKT.mjs} +2 -2
- package/dist/lib/{node-esm/chunk-BP56BGZR.mjs.map → browser/chunk-UCVFWBKT.mjs.map} +1 -1
- package/dist/lib/browser/{client-LV67Q3R7.mjs → client-NMS3MSFP.mjs} +5 -4
- package/dist/lib/browser/client-NMS3MSFP.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +12 -12
- package/dist/lib/browser/index.mjs.map +3 -3
- package/dist/lib/browser/{intent-resolver-NCISOZW4.mjs → intent-resolver-KGM6A3BF.mjs} +14 -14
- package/dist/lib/browser/intent-resolver-KGM6A3BF.mjs.map +7 -0
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/migrations-QRQV6ZAM.mjs +23 -0
- package/dist/lib/browser/migrations-QRQV6ZAM.mjs.map +7 -0
- package/dist/lib/browser/{react-context-WEH7SL4I.mjs → react-context-IE2O2OYK.mjs} +2 -2
- package/dist/lib/browser/{react-surface-J7SZR2J6.mjs → react-surface-CKZHHWY3.mjs} +3 -3
- package/dist/lib/browser/schema-defs-DNRDVQQJ.mjs +25 -0
- package/dist/lib/browser/schema-defs-DNRDVQQJ.mjs.map +7 -0
- package/dist/lib/browser/types.mjs +1 -1
- package/dist/lib/node/{app-graph-builder-PXOJZJO5.cjs → app-graph-builder-BEEYM3A5.cjs} +45 -41
- package/dist/lib/node/app-graph-builder-BEEYM3A5.cjs.map +7 -0
- package/dist/lib/node/chunk-73HHNJMV.cjs +719 -0
- package/dist/lib/node/chunk-73HHNJMV.cjs.map +7 -0
- package/dist/lib/node/chunk-BL6EBWOS.cjs +131 -0
- package/dist/lib/node/chunk-BL6EBWOS.cjs.map +7 -0
- package/dist/lib/node/{chunk-ZVQIICEN.cjs → chunk-CIYUKY3J.cjs} +5 -5
- package/dist/lib/node/{chunk-ZVQIICEN.cjs.map → chunk-CIYUKY3J.cjs.map} +1 -1
- package/dist/lib/node/{chunk-W64EOF2B.cjs → chunk-DNKJCPU7.cjs} +5 -5
- package/dist/lib/node/{chunk-W64EOF2B.cjs.map → chunk-DNKJCPU7.cjs.map} +1 -1
- package/dist/lib/node/{client-BKTGRBYM.cjs → client-Q3EQS4HA.cjs} +10 -9
- package/dist/lib/node/client-Q3EQS4HA.cjs.map +7 -0
- package/dist/lib/node/index.cjs +19 -19
- package/dist/lib/node/index.cjs.map +3 -3
- package/dist/lib/node/{intent-resolver-U2576ALY.cjs → intent-resolver-Q4QBA5B2.cjs} +34 -34
- package/dist/lib/node/intent-resolver-Q4QBA5B2.cjs.map +7 -0
- package/dist/lib/node/meta.json +1 -1
- package/dist/lib/node/{migrations-TGNI4FVL.cjs → migrations-6FEWMF7U.cjs} +12 -10
- package/dist/lib/node/migrations-6FEWMF7U.cjs.map +7 -0
- package/dist/lib/node/{react-context-SF3M3YLR.cjs → react-context-JS7Y5ZOK.cjs} +6 -6
- package/dist/lib/node/{react-surface-BSTIXMER.cjs → react-surface-GHKLUOKW.cjs} +24 -24
- package/dist/lib/node/{schema-INQ72F54.cjs → schema-defs-TA52ARBO.cjs} +14 -12
- package/dist/lib/node/schema-defs-TA52ARBO.cjs.map +7 -0
- package/dist/lib/node/types.cjs +3 -3
- package/dist/lib/node/types.cjs.map +1 -1
- package/dist/lib/node-esm/{app-graph-builder-KIN6NWFI.mjs → app-graph-builder-OZEAAKNT.mjs} +36 -32
- package/dist/lib/node-esm/app-graph-builder-OZEAAKNT.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-K3KGGSJZ.mjs → chunk-37E3EI46.mjs} +2 -2
- package/dist/lib/{browser/chunk-BGY6BSUC.mjs.map → node-esm/chunk-37E3EI46.mjs.map} +1 -1
- package/dist/lib/node-esm/{chunk-BP56BGZR.mjs → chunk-FJYSQRBO.mjs} +2 -2
- package/dist/lib/{browser/chunk-4PLF3BEB.mjs.map → node-esm/chunk-FJYSQRBO.mjs.map} +1 -1
- package/dist/lib/node-esm/chunk-STGGUFV2.mjs +112 -0
- package/dist/lib/node-esm/chunk-STGGUFV2.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-ULXZABZ4.mjs +695 -0
- package/dist/lib/node-esm/chunk-ULXZABZ4.mjs.map +7 -0
- package/dist/lib/node-esm/{client-QQD6WFOB.mjs → client-EBFQZRSF.mjs} +5 -4
- package/dist/lib/node-esm/client-EBFQZRSF.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +12 -12
- package/dist/lib/node-esm/index.mjs.map +3 -3
- package/dist/lib/node-esm/{intent-resolver-G25U4UGI.mjs → intent-resolver-2GCG4LCE.mjs} +14 -14
- package/dist/lib/node-esm/intent-resolver-2GCG4LCE.mjs.map +7 -0
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/{migrations-IVGATGZR.mjs → migrations-AK43ZE6G.mjs} +9 -7
- package/dist/lib/node-esm/migrations-AK43ZE6G.mjs.map +7 -0
- package/dist/lib/node-esm/{react-context-EAKKTE5A.mjs → react-context-6N7NMUJE.mjs} +2 -2
- package/dist/lib/node-esm/{react-surface-ZPI7T4EM.mjs → react-surface-UCUL26AF.mjs} +3 -3
- package/dist/lib/node-esm/schema-defs-O2KQQXJH.mjs +26 -0
- package/dist/lib/node-esm/schema-defs-O2KQQXJH.mjs.map +7 -0
- package/dist/lib/node-esm/types.mjs +1 -1
- package/dist/types/src/ClientPlugin.d.ts.map +1 -1
- package/dist/types/src/capabilities/app-graph-builder.d.ts +2 -179
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
- package/dist/types/src/capabilities/client.d.ts +3 -3
- package/dist/types/src/capabilities/client.d.ts.map +1 -1
- package/dist/types/src/capabilities/index.d.ts +5 -181
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/intent-resolver.d.ts +2 -2
- package/dist/types/src/capabilities/intent-resolver.d.ts.map +1 -1
- package/dist/types/src/capabilities/migrations.d.ts +2 -2
- package/dist/types/src/capabilities/migrations.d.ts.map +1 -1
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
- package/dist/types/src/capabilities/schema-defs.d.ts +4 -0
- package/dist/types/src/capabilities/schema-defs.d.ts.map +1 -0
- package/dist/types/src/components/DevicesContainer.d.ts +4 -3
- package/dist/types/src/components/DevicesContainer.d.ts.map +1 -1
- package/dist/types/src/components/DevicesContainer.stories.d.ts.map +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/RecoveryCodeDialog.d.ts.map +1 -1
- package/dist/types/src/components/RecoveryCredentialsContainer.d.ts.map +1 -1
- package/dist/types/src/components/ResetDialog.d.ts.map +1 -1
- package/dist/types/src/components/ResetDialog.stories.d.ts.map +1 -1
- package/dist/types/src/types.d.ts +59 -53
- package/dist/types/src/types.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +33 -26
- package/src/ClientPlugin.ts +2 -2
- package/src/capabilities/app-graph-builder.ts +94 -76
- package/src/capabilities/client.ts +4 -3
- package/src/capabilities/index.ts +1 -1
- package/src/capabilities/intent-resolver.ts +11 -11
- package/src/capabilities/migrations.ts +14 -11
- package/src/capabilities/schema-defs.ts +29 -0
- package/src/components/DevicesContainer.stories.tsx +7 -3
- package/src/components/DevicesContainer.tsx +85 -61
- package/src/components/ProfileContainer.stories.tsx +1 -1
- package/src/components/ProfileContainer.tsx +30 -21
- package/src/components/RecoveryCodeDialog.stories.tsx +1 -1
- package/src/components/RecoveryCredentialsContainer.stories.tsx +2 -2
- package/src/components/RecoveryCredentialsContainer.tsx +48 -46
- package/src/components/ResetDialog.stories.tsx +7 -1
- package/src/translations.ts +2 -2
- package/src/types.ts +60 -47
- package/dist/lib/browser/app-graph-builder-WAS4YZNA.mjs.map +0 -7
- package/dist/lib/browser/chunk-AN7FJKIJ.mjs +0 -105
- package/dist/lib/browser/chunk-AN7FJKIJ.mjs.map +0 -7
- package/dist/lib/browser/chunk-XZ4TQC56.mjs +0 -619
- package/dist/lib/browser/chunk-XZ4TQC56.mjs.map +0 -7
- package/dist/lib/browser/client-LV67Q3R7.mjs.map +0 -7
- package/dist/lib/browser/intent-resolver-NCISOZW4.mjs.map +0 -7
- package/dist/lib/browser/migrations-3DWFOL5Q.mjs +0 -21
- package/dist/lib/browser/migrations-3DWFOL5Q.mjs.map +0 -7
- package/dist/lib/browser/schema-JQAT6Q7S.mjs +0 -23
- package/dist/lib/browser/schema-JQAT6Q7S.mjs.map +0 -7
- package/dist/lib/node/app-graph-builder-PXOJZJO5.cjs.map +0 -7
- package/dist/lib/node/chunk-3JE5BFCT.cjs +0 -644
- package/dist/lib/node/chunk-3JE5BFCT.cjs.map +0 -7
- package/dist/lib/node/chunk-FROKBEVH.cjs +0 -125
- package/dist/lib/node/chunk-FROKBEVH.cjs.map +0 -7
- package/dist/lib/node/client-BKTGRBYM.cjs.map +0 -7
- package/dist/lib/node/intent-resolver-U2576ALY.cjs.map +0 -7
- package/dist/lib/node/migrations-TGNI4FVL.cjs.map +0 -7
- package/dist/lib/node/schema-INQ72F54.cjs.map +0 -7
- package/dist/lib/node-esm/app-graph-builder-KIN6NWFI.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-AD5W5QCQ.mjs +0 -106
- package/dist/lib/node-esm/chunk-AD5W5QCQ.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-LZN2UNN7.mjs +0 -620
- package/dist/lib/node-esm/chunk-LZN2UNN7.mjs.map +0 -7
- package/dist/lib/node-esm/client-QQD6WFOB.mjs.map +0 -7
- package/dist/lib/node-esm/intent-resolver-G25U4UGI.mjs.map +0 -7
- package/dist/lib/node-esm/migrations-IVGATGZR.mjs.map +0 -7
- package/dist/lib/node-esm/schema-OK7HY3JJ.mjs +0 -24
- package/dist/lib/node-esm/schema-OK7HY3JJ.mjs.map +0 -7
- package/dist/types/src/capabilities/schema.d.ts +0 -4
- package/dist/types/src/capabilities/schema.d.ts.map +0 -1
- package/src/capabilities/schema.ts +0 -26
- /package/dist/lib/browser/{react-context-WEH7SL4I.mjs.map → react-context-IE2O2OYK.mjs.map} +0 -0
- /package/dist/lib/browser/{react-surface-J7SZR2J6.mjs.map → react-surface-CKZHHWY3.mjs.map} +0 -0
- /package/dist/lib/node/{react-context-SF3M3YLR.cjs.map → react-context-JS7Y5ZOK.cjs.map} +0 -0
- /package/dist/lib/node/{react-surface-BSTIXMER.cjs.map → react-surface-GHKLUOKW.cjs.map} +0 -0
- /package/dist/lib/node-esm/{react-context-EAKKTE5A.mjs.map → react-context-6N7NMUJE.mjs.map} +0 -0
- /package/dist/lib/node-esm/{react-surface-ZPI7T4EM.mjs.map → react-surface-UCUL26AF.mjs.map} +0 -0
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/components/DevicesContainer.tsx", "../../../src/components/JoinDialog.tsx", "../../../src/components/ProfileContainer.tsx", "../../../src/components/RecoveryCodeDialog.tsx", "../../../src/components/RecoveryCredentialsContainer.tsx", "../../../src/components/ResetDialog.tsx"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { Check, X } from '@phosphor-icons/react';\nimport React, { useCallback, useEffect, useState } from 'react';\nimport { QR } from 'react-qr-rounded';\n\nimport { createIntent, useIntentDispatcher } from '@dxos/app-framework';\nimport { log } from '@dxos/log';\nimport { useClient, useMulticastObservable } from '@dxos/react-client';\nimport { type Device, useDevices } from '@dxos/react-client/halo';\nimport { type CancellableInvitationObservable, Invitation, InvitationEncoder } from '@dxos/react-client/invitations';\nimport { useNetworkStatus } from '@dxos/react-client/mesh';\nimport { Button, Clipboard, IconButton, List, useId, useTranslation } from '@dxos/react-ui';\nimport {\n ControlFrame,\n ControlFrameItem,\n ControlGroup,\n ControlItem,\n ControlPage,\n ControlSection,\n} from '@dxos/react-ui-form';\nimport { StackItem } from '@dxos/react-ui-stack';\nimport { getSize, mx } from '@dxos/react-ui-theme';\nimport { AuthCode, Centered, DeviceListItem, Emoji, Viewport } from '@dxos/shell/react';\nimport { hexToEmoji } from '@dxos/util';\n\nimport { CLIENT_PLUGIN } from '../meta';\nimport { ClientAction } from '../types';\n\nexport type DevicesContainerProps = {\n createInvitationUrl?: (invitationCode: string) => string;\n};\n\nexport const DevicesContainer = ({ createInvitationUrl }: DevicesContainerProps) => {\n const { t } = useTranslation('os');\n const { dispatchPromise: dispatch } = useIntentDispatcher();\n const devices = useDevices();\n const { swarm: connectionState } = useNetworkStatus();\n\n const handleResetStorage = useCallback(() => dispatch(createIntent(ClientAction.ResetStorage)), [dispatch]);\n\n const handleRecover = useCallback(\n () => dispatch(createIntent(ClientAction.ResetStorage, { mode: 'recover' })),\n [dispatch],\n );\n\n const handleJoinNewIdentity = useCallback(\n () => dispatch(createIntent(ClientAction.ResetStorage, { mode: 'join new identity' })),\n [dispatch],\n );\n\n return (\n <Clipboard.Provider>\n <StackItem.Content classNames='block overflow-y-auto'>\n <ControlPage>\n <ControlSection\n title={t('devices verbose label', { ns: CLIENT_PLUGIN })}\n description={t('devices description', { ns: CLIENT_PLUGIN })}\n >\n <ControlFrame>\n <ControlFrameItem title={t('devices label', { ns: CLIENT_PLUGIN })}>\n <List>\n {devices.map((device: Device) => {\n return (\n <DeviceListItem\n key={device.deviceKey.toHex()}\n device={device}\n connectionState={connectionState}\n />\n );\n })}\n </List>\n </ControlFrameItem>\n {createInvitationUrl && (\n <ControlFrameItem title='Add device'>\n <DeviceInvitation createInvitationUrl={createInvitationUrl} />\n </ControlFrameItem>\n )}\n </ControlFrame>\n </ControlSection>\n <ControlSection\n title={t('danger zone title', { ns: CLIENT_PLUGIN })}\n description={t('danger zone description', { ns: CLIENT_PLUGIN })}\n >\n <ControlGroup>\n <ControlItem\n title={t('reset device label')}\n description={t('reset device description', { ns: CLIENT_PLUGIN })}\n >\n <Button variant='destructive' onClick={handleResetStorage} data-testid='devicesContainer.reset'>\n {t('reset device label')}\n </Button>\n </ControlItem>\n <ControlItem\n title={t('recover identity label')}\n description={t('recover identity description', { ns: CLIENT_PLUGIN })}\n >\n <Button variant='destructive' onClick={handleRecover} data-testid='devicesContainer.recover'>\n {t('recover identity label')}\n </Button>\n </ControlItem>\n <ControlItem\n title={t('join new identity label')}\n description={t('join new identity description', { ns: CLIENT_PLUGIN })}\n >\n <Button\n variant='destructive'\n onClick={handleJoinNewIdentity}\n data-testid='devicesContainer.joinExisting'\n >\n {t('join new identity label')}\n </Button>\n </ControlItem>\n </ControlGroup>\n </ControlSection>\n </ControlPage>\n </StackItem.Content>\n </Clipboard.Provider>\n );\n};\n\ntype DeviceInvitationProps = {\n invitation?: CancellableInvitationObservable;\n createInvitationUrl: (invitationCode: string) => string;\n onInvitationDone: () => void;\n onInvitationCreate: () => void;\n};\n\nconst DeviceInvitation = (props: Pick<DeviceInvitationProps, 'createInvitationUrl'>) => {\n const client = useClient();\n const [invitation, setInvitation] = useState<CancellableInvitationObservable>();\n\n const onInvitationCreate = useCallback(() => {\n const invitation = client.halo.share();\n if (client.config.values.runtime?.app?.env?.DX_ENVIRONMENT !== 'production') {\n const subscription = invitation.subscribe((invitation: Invitation) => {\n const invitationCode = InvitationEncoder.encode(invitation);\n if (invitation.state === Invitation.State.CONNECTING) {\n log.info(JSON.stringify({ invitationCode, authCode: invitation.authCode }));\n subscription.unsubscribe();\n }\n });\n }\n setInvitation(invitation);\n }, [client]);\n\n const onInvitationDone = useCallback(() => {\n setInvitation(undefined);\n }, []);\n\n if (invitation) {\n return <DeviceInvitationImpl {...props} {...{ invitation, onInvitationCreate, onInvitationDone }} />;\n } else {\n return <InvitationSection {...props} {...{ onInvitationCreate, onInvitationDone }} />;\n }\n};\n\nconst DeviceInvitationImpl = ({\n invitation: invitationObservable,\n createInvitationUrl,\n onInvitationDone,\n onInvitationCreate,\n}: DeviceInvitationProps) => {\n const invitation = useMulticastObservable(invitationObservable!);\n const url = createInvitationUrl(InvitationEncoder.encode(invitation));\n\n useEffect(() => {\n if (invitation.state >= Invitation.State.SUCCESS) {\n onInvitationDone();\n }\n }, [invitation.state]);\n\n return <InvitationSection {...invitation} {...{ url, onInvitationDone, onInvitationCreate }} />;\n};\n\ntype InvitationComponentProps = Partial<\n Pick<Invitation, 'authCode' | 'invitationId'> &\n Pick<DeviceInvitationProps, 'onInvitationDone' | 'onInvitationCreate'> & {\n state: number;\n url: string;\n }\n>;\n\nconst InvitationSection = ({\n state = -1,\n authCode,\n invitationId = 'never',\n url = 'never',\n onInvitationDone = () => {},\n onInvitationCreate = () => {},\n}: InvitationComponentProps) => {\n const { t } = useTranslation(CLIENT_PLUGIN);\n const activeView =\n state < 0\n ? 'init'\n : state >= Invitation.State.CANCELLED\n ? 'complete'\n : state >= Invitation.State.READY_FOR_AUTHENTICATION && authCode\n ? 'auth-code'\n : 'qr-code';\n return activeView === 'init' ? (\n <>\n <p className='text-description mbe-2'>{t('add device description')}</p>\n <IconButton\n icon='ph--plus--regular'\n label={t('create device invitation label')}\n disabled={state >= 0}\n classNames='is-full'\n data-testid='devicesContainer.createInvitation'\n onClick={onInvitationCreate}\n />\n </>\n ) : (\n <Viewport.Root activeView={activeView}>\n <Viewport.Views>\n <Viewport.View id='init'>\n {/* This view intentionally left blank while conditionally rendering the viewport. */}\n </Viewport.View>\n <Viewport.View id='complete'>\n <InvitationComplete statusValue={state} />\n </Viewport.View>\n <Viewport.View id='auth-code'>\n <InvitationAuthCode id={invitationId} code={authCode ?? 'never'} onCancel={onInvitationDone} />\n </Viewport.View>\n <Viewport.View id='qr-code'>\n <InvitationQR id={invitationId} url={url} onCancel={onInvitationDone} />\n </Viewport.View>\n </Viewport.Views>\n </Viewport.Root>\n );\n};\n\nconst InvitationQR = ({ id, url, onCancel }: { id: string; url: string; onCancel: () => void }) => {\n const { t } = useTranslation('os');\n const qrLabel = useId('devices-container__qr-code');\n const emoji = hexToEmoji(id);\n return (\n <>\n <p className='text-description'>{t('qr code description', { ns: CLIENT_PLUGIN })}</p>\n <div role='group' className='grid grid-cols-[1fr_min-content] mlb-2 gap-2'>\n <div role='none' className='is-full aspect-square relative text-description'>\n <QR\n rounding={100}\n backgroundColor='transparent'\n color='currentColor'\n aria-labelledby={qrLabel}\n errorCorrectionLevel='Q'\n cutout={true}\n >\n {url ?? 'never'}\n </QR>\n <Centered>\n <Emoji text={emoji} />\n </Centered>\n </div>\n <span id={qrLabel} className='sr-only'>\n {t('qr label')}\n </span>\n </div>\n {/* TODO(burdon): Factor out button bar */}\n <div className='flex justify-center'>\n <div className='flex gap-2'>\n <Clipboard.Button value={url ?? 'never'} />\n <Button variant='ghost' onClick={onCancel}>\n {t('cancel label')}\n </Button>\n </div>\n </div>\n </>\n );\n};\n\nconst InvitationAuthCode = ({ id, code, onCancel }: { id: string; code: string; onCancel: () => void }) => {\n const { t } = useTranslation('os');\n const emoji = hexToEmoji(id);\n\n return (\n <>\n <p className='text-description'>{t('auth other device emoji message')}</p>\n {emoji && <Emoji text={emoji} className='mli-auto mlb-2 text-center' />}\n <p className='text-description'>{t('auth code message')}</p>\n <AuthCode code={code} large classNames='mli-auto mlb-2 text-center grow' />\n <Button variant='ghost' onClick={onCancel}>\n {t('cancel label')}\n </Button>\n </>\n );\n};\n\nconst InvitationComplete = ({ statusValue }: { statusValue: number }) => {\n return statusValue > 0 ? <Check className={mx('m-1.5', getSize(6))} /> : <X className={mx('m-1.5', getSize(6))} />;\n};\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport React, { useCallback } from 'react';\n\nimport { createIntent, LayoutAction, useIntentDispatcher } from '@dxos/app-framework';\nimport { ObservabilityAction } from '@dxos/plugin-observability/types';\nimport { type InvitationResult } from '@dxos/react-client/invitations';\nimport { Dialog, useTranslation } from '@dxos/react-ui';\nimport { JoinPanel, type JoinPanelProps } from '@dxos/shell/react';\n\nimport { CLIENT_PLUGIN } from '../meta';\nimport { ClientAction } from '../types';\n\nexport const JOIN_DIALOG = `${CLIENT_PLUGIN}/JoinDialog`;\n\nexport const JoinDialog = (props: JoinPanelProps) => {\n const { dispatchPromise: dispatch } = useIntentDispatcher();\n const { t } = useTranslation(CLIENT_PLUGIN);\n\n const handleCancelResetStorage = useCallback(() => dispatch(createIntent(ClientAction.ShareIdentity)), [dispatch]);\n\n const handleDone = useCallback(\n async (result: InvitationResult | null) => {\n if (result?.identityKey) {\n await Promise.all([\n dispatch(createIntent(LayoutAction.UpdateDialog, { part: 'dialog', options: { state: false } })),\n dispatch(\n createIntent(ObservabilityAction.SendEvent, {\n name: props.initialDisposition === 'recover-identity' ? 'identity.recover' : 'identity.join',\n }),\n ),\n ]);\n }\n },\n [dispatch],\n );\n\n return (\n <Dialog.Content>\n <Dialog.Title classNames='sr-only'>{t('join space label', { ns: 'os' })}</Dialog.Title>\n <JoinPanel\n mode='halo-only'\n {...props}\n exitActionParent={<Dialog.Close asChild />}\n doneActionParent={<Dialog.Close asChild />}\n onCancelResetStorage={handleCancelResetStorage}\n onDone={handleDone}\n />\n </Dialog.Content>\n );\n};\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { Schema } from 'effect';\nimport React, { type ChangeEvent, useCallback, useMemo, useState } from 'react';\n\nimport { debounce } from '@dxos/async';\nimport { useClient } from '@dxos/react-client';\nimport { type Identity, useIdentity } from '@dxos/react-client/halo';\nimport { ButtonGroup, Clipboard, Input, useTranslation } from '@dxos/react-ui';\nimport {\n Form,\n type InputComponent,\n ControlItem,\n ControlItemInput,\n ControlSection,\n ControlPage,\n} from '@dxos/react-ui-form';\nimport { EmojiPickerBlock, HuePicker } from '@dxos/react-ui-pickers';\nimport { StackItem } from '@dxos/react-ui-stack';\nimport { hexToHue, hexToEmoji } from '@dxos/util';\n\nimport { CLIENT_PLUGIN } from '../meta';\n\n// TODO(thure): Factor out?\nconst getDefaultHueValue = (identity: Identity | null) => hexToHue(identity?.identityKey.toHex() ?? '0');\nconst getDefaultEmojiValue = (identity: Identity | null) => hexToEmoji(identity?.identityKey.toHex() ?? '0');\nconst getHueValue = (identity: Identity | null) => identity?.profile?.data?.hue || getDefaultHueValue(identity);\nconst getEmojiValue = (identity: Identity | null) => identity?.profile?.data?.emoji || getDefaultEmojiValue(identity);\n\nexport const ProfileContainer = () => {\n const { t } = useTranslation(CLIENT_PLUGIN);\n const client = useClient();\n const identity = useIdentity();\n const [displayName, setDisplayNameDirectly] = useState(identity?.profile?.displayName ?? '');\n const [emoji, setEmojiDirectly] = useState<string>(getEmojiValue(identity));\n const [hue, setHueDirectly] = useState<string>(getHueValue(identity));\n\n const updateProfile = useMemo(\n () =>\n debounce(\n (profile: Partial<Profile>) =>\n client.halo.updateProfile({\n displayName: profile.displayName,\n data: {\n emoji: profile.emoji,\n hue: profile.hue,\n },\n }),\n 2_000,\n ),\n [],\n );\n\n const handleSave = useCallback(\n (profile: Profile) => {\n setDisplayNameDirectly(profile.displayName);\n setEmojiDirectly(profile.emoji);\n setHueDirectly(profile.hue);\n updateProfile(profile);\n },\n [identity],\n );\n\n const values = useMemo(\n () => ({\n displayName,\n emoji,\n hue,\n did: identity?.did,\n }),\n [identity, displayName, emoji, hue],\n );\n\n // TODO(wittjosiah): Integrate descriptions with the form schema.\n const customElements: Partial<Record<string, InputComponent>> = useMemo(\n () => ({\n displayName: ({ type, label, getValue, onValueChange }) => {\n const handleChange = useCallback(\n ({ target: { value } }: ChangeEvent<HTMLInputElement>) => onValueChange(type, value),\n [onValueChange, type],\n );\n return (\n <ControlItemInput title={label} description={t('display name description')}>\n <Input.TextInput\n value={getValue()}\n onChange={handleChange}\n placeholder={t('display name input placeholder')}\n classNames='min-is-64'\n />\n </ControlItemInput>\n );\n },\n emoji: ({ type, label, getValue, onValueChange }) => {\n const handleChange = useCallback((nextEmoji: string) => onValueChange(type, nextEmoji), [onValueChange, type]);\n const handleEmojiReset = useCallback(\n () => onValueChange(type, getDefaultEmojiValue(identity)),\n [onValueChange, type],\n );\n return (\n <ControlItem title={label} description={t('icon description')}>\n <EmojiPickerBlock\n triggerVariant='default'\n emoji={getValue()}\n onChangeEmoji={handleChange}\n onClickClear={handleEmojiReset}\n classNames='justify-self-end'\n />\n </ControlItem>\n );\n },\n hue: ({ type, label, getValue, onValueChange }) => {\n const handleChange = useCallback((nextHue: string) => onValueChange(type, nextHue), [onValueChange, type]);\n const handleHueReset = useCallback(\n () => onValueChange(type, getDefaultHueValue(identity)),\n [onValueChange, type],\n );\n return (\n <ControlItem title={label} description={t('hue description')}>\n <HuePicker\n value={getValue()}\n onChange={handleChange}\n onReset={handleHueReset}\n classNames='[--hue-preview-size:1.5rem] justify-self-end'\n />\n </ControlItem>\n );\n },\n // TODO(wittjosiah): We need text input annotations for disabled and copyable.\n did: ({ label, getValue }) => {\n return (\n <ControlItemInput title={label} description={t('did description')}>\n <ButtonGroup>\n <Input.TextInput value={getValue()} disabled classNames='min-is-64' />\n <Clipboard.IconButton value={getValue() ?? ''} />\n </ButtonGroup>\n </ControlItemInput>\n );\n },\n }),\n [t],\n );\n\n return (\n <StackItem.Content classNames='block overflow-y-auto'>\n <ControlPage>\n <Clipboard.Provider>\n <ControlSection title={t('profile label')} description={t('profile description')}>\n <Form\n schema={ProfileSchema}\n values={values}\n autoSave\n onSave={handleSave}\n Custom={customElements}\n classNames='p-0 container-max-width [&_[role=\"form\"]]:grid [&_[role=\"form\"]]:grid-cols-1 md:[&_[role=\"form\"]]:grid-cols-[1fr_min-content] [&_[role=\"form\"]]:gap-4'\n />\n </ControlSection>\n </Clipboard.Provider>\n </ControlPage>\n </StackItem.Content>\n );\n};\n\n// TODO(wittjosiah): Integrate annotations with translations.\nconst ProfileSchema = Schema.Struct({\n displayName: Schema.String.annotations({ title: 'Display name' }),\n emoji: Schema.String.annotations({ title: 'Avatar' }),\n hue: Schema.String.annotations({ title: 'Color' }),\n did: Schema.String.annotations({ title: 'DID' }),\n});\ntype Profile = Schema.Schema.Type<typeof ProfileSchema>;\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport React, { useCallback, useState } from 'react';\n\nimport { AlertDialog, Button, Clipboard, Input, useTranslation } from '@dxos/react-ui';\n\nimport { CLIENT_PLUGIN } from '../meta';\n\nexport const RECOVERY_CODE_DIALOG = `${CLIENT_PLUGIN}/RecoveryCodeDialog`;\n\nexport type RecoveryCodeDialogProps = {\n code: string;\n};\n\nexport const RecoveryCodeDialog = ({ code }: RecoveryCodeDialogProps) => {\n const { t } = useTranslation(CLIENT_PLUGIN);\n const [confirmation, setConfirmation] = useState(false);\n\n const handleConfirmation = useCallback((checked: boolean) => setConfirmation(checked), []);\n\n return (\n <AlertDialog.Content classNames='bs-content min-bs-[15rem] max-bs-full md:max-is-[40rem] overflow-hidden'>\n <AlertDialog.Title>{t('recovery code dialog title')}</AlertDialog.Title>\n <p className='py-4'>{t('recovery code dialog description')}</p>\n <Clipboard.Provider>\n <Code code={code} />\n </Clipboard.Provider>\n <div className='flex flex-col py-4 gap-2'>\n <p>{t('recovery code dialog warning 1')}</p>\n <p>{t('recovery code dialog warning 2')}</p>\n </div>\n <div className='flex items-center gap-2 pbe-4'>\n <Input.Root>\n <Input.Checkbox\n data-testid='recoveryCode.confirm'\n checked={confirmation}\n onCheckedChange={handleConfirmation}\n />\n <Input.Label>{t('recovery code confirmation label')}</Input.Label>\n </Input.Root>\n </div>\n <div className='flex justify-end'>\n <AlertDialog.Action asChild>\n <Button data-testid='recoveryCode.continue' variant='primary' disabled={!confirmation}>\n {t('continue label')}\n </Button>\n </AlertDialog.Action>\n </div>\n </AlertDialog.Content>\n );\n};\n\nconst Code = ({ code }: { code: string }) => {\n const words = code.split(' ');\n return (\n <div className='relative p-2 border border-separator rounded group'>\n <Clipboard.IconButton value={code} classNames='absolute top-2 right-2 invisible group-hover:visible' />\n <div className='grid grid-cols-4'>\n {words.map((word, i) => (\n <div key={i} className='flex items-center p-2 gap-2'>\n <div className='w-4 text-xs text-center text-subdued'>{i + 1}</div>\n <div className='text-sm'>{word}</div>\n </div>\n ))}\n </div>\n </div>\n );\n};\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport React from 'react';\n\nimport { createIntent, useIntentDispatcher } from '@dxos/app-framework';\nimport { useCredentials } from '@dxos/react-client/halo';\nimport { Icon, IconButton, List, ListItem, useTranslation, Message } from '@dxos/react-ui';\nimport { ControlGroup, ControlItem, ControlPage, ControlSection } from '@dxos/react-ui-form';\nimport { StackItem } from '@dxos/react-ui-stack';\n\nimport { CLIENT_PLUGIN } from '../meta';\nimport { ClientAction } from '../types';\n\nexport const MANAGE_CREDENTIALS_DIALOG = `${CLIENT_PLUGIN}/ManageCredentialsDialog`;\n\nexport const RecoveryCredentialsContainer = () => {\n const { t } = useTranslation(CLIENT_PLUGIN);\n const { dispatchPromise: dispatch } = useIntentDispatcher();\n const credentials = useCredentials();\n const recoveryCredentials = credentials.filter(\n (credential) => credential.subject.assertion['@type'] === 'dxos.halo.credentials.IdentityRecovery',\n );\n\n return (\n <StackItem.Content classNames='block overflow-y-auto'>\n <ControlPage>\n <ControlSection title={t('recovery setup dialog title')} description={t('recovery setup dialog description')}>\n <ControlGroup>\n <ControlItem title={t('create passkey label')} description={t('create passkey description')}>\n <IconButton\n label={t('create passkey label')}\n icon='ph--key--duotone'\n variant='primary'\n size={5}\n onClick={() => dispatch(createIntent(ClientAction.CreatePasskey))}\n />\n </ControlItem>\n <ControlItem title={t('create recovery code label')} description={t('create recovery code description')}>\n <IconButton\n label={t('create recovery code label')}\n icon='ph--receipt--duotone'\n variant='default'\n size={5}\n onClick={() => dispatch(createIntent(ClientAction.CreateRecoveryCode))}\n />\n </ControlItem>\n </ControlGroup>\n </ControlSection>\n <ControlSection title={t('credentials list label')}>\n {recoveryCredentials.length < 1 ? (\n <Message.Root valence='error' className='container-max-width'>\n <Message.Title>\n <Icon icon='ph--shield-warning--duotone' size={5} classNames='inline-block align-top mbs-px mie-1' />\n {t('no credentials title')}\n </Message.Title>\n <Message.Body>{t('no credentials message')}</Message.Body>\n </Message.Root>\n ) : (\n <List classNames='container-max-width pli-2'>\n {recoveryCredentials.map((credential) => (\n <ListItem.Root key={credential.id?.toHex()}>\n <ListItem.Endcap>\n <Icon icon='ph--key--regular' size={5} />\n </ListItem.Endcap>\n <ListItem.Heading>{credential.issuanceDate.toLocaleString()}</ListItem.Heading>\n </ListItem.Root>\n ))}\n </List>\n )}\n </ControlSection>\n </ControlPage>\n </StackItem.Content>\n );\n};\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport React, { useCallback } from 'react';\n\nimport { createIntent, LayoutAction, useIntentDispatcher } from '@dxos/app-framework';\nimport { useClient } from '@dxos/react-client';\nimport { Dialog, useTranslation } from '@dxos/react-ui';\nimport { ConfirmReset, type ConfirmResetProps } from '@dxos/shell/react';\n\nimport { CLIENT_PLUGIN } from '../meta';\nimport { type ClientPluginOptions } from '../types';\n\nexport const RESET_DIALOG = `${CLIENT_PLUGIN}/ResetDialog`;\n\nexport type ResetDialogProps = Pick<ConfirmResetProps, 'mode'> & Pick<ClientPluginOptions, 'onReset'>;\n\nexport const ResetDialog = ({ mode, onReset }: ResetDialogProps) => {\n const { t } = useTranslation(CLIENT_PLUGIN);\n const { dispatchPromise: dispatch } = useIntentDispatcher();\n const client = useClient();\n\n const handleReset = useCallback(async () => {\n await client.reset();\n const target =\n mode === 'join new identity' ? 'deviceInvitation' : mode === 'recover' ? 'recoverIdentity' : undefined;\n await onReset?.({ target });\n }, [dispatch, client, mode, onReset]);\n\n const handleCancel = useCallback(() => {\n void dispatch(\n createIntent(LayoutAction.UpdateDialog, {\n part: 'dialog',\n options: { state: false },\n }),\n );\n }, [dispatch]);\n\n // TODO(wittjosiah): Add the sr-only translations.\n // TODO(wittjosiah): Add missing descriptions to other dialogs.\n return (\n <Dialog.Content classNames='bs-content min-bs-[15rem] max-bs-full md:max-is-[40rem] overflow-hidden'>\n <Dialog.Title classNames='sr-only'>{t('reset dialog title')}</Dialog.Title>\n <Dialog.Description classNames='sr-only'>{t('reset dialog description')}</Dialog.Description>\n <ConfirmReset active mode={mode} onConfirm={handleReset} onCancel={handleCancel} />\n </Dialog.Content>\n );\n};\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,mBAAyB;AACzB,IAAAA,gBAAwD;AACxD,8BAAmB;AAEnB,2BAAkD;AAClD,iBAAoB;AACpB,0BAAkD;AAClD,kBAAwC;AACxC,yBAAoF;AACpF,kBAAiC;AACjC,sBAA2E;AAC3E,2BAOO;AACP,4BAA0B;AAC1B,4BAA4B;AAC5B,IAAAA,gBAAoE;AACpE,kBAA2B;;ACtB3B,IAAAA,gBAAmC;AAEnC,IAAAC,wBAAgE;AAChE,mBAAoC;AAEpC,IAAAC,mBAAuC;AACvC,IAAAF,gBAA+C;;ACN/C,oBAAuB;AACvB,IAAAA,gBAAwE;AAExE,mBAAyB;AACzB,IAAAG,uBAA0B;AAC1B,IAAAC,eAA2C;AAC3C,IAAAF,mBAA8D;AAC9D,IAAAG,wBAOO;AACP,8BAA4C;AAC5C,IAAAC,yBAA0B;AAC1B,IAAAC,eAAqC;;ACjBrC,IAAAP,gBAA6C;AAE7C,IAAAE,mBAAsE;;ACFtE,IAAAF,gBAAkB;AAElB,IAAAC,wBAAkD;AAClD,IAAAG,eAA+B;AAC/B,IAAAF,mB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B6D;AAC/F,YAAMuH,UAAU;QAAEf;MAAO,CAAA;IAC3B,GAAG;MAAClL;MAAU4C;MAAQ/B;MAAMoL;KAAQ;AAEpC,UAAMsD,mBAAe/O,cAAAA,aAAY,MAAA;AAC/B,WAAKR,aACHS,sBAAAA,cAAa+H,sBAAAA,aAAaC,cAAc;QACtCC,MAAM;QACNC,SAAS;UAAE5E,OAAO;QAAM;MAC1B,CAAA,CAAA;IAEJ,GAAG;MAAC/D;KAAS;AAIb,WACEe,8BAAAA,QAAA,cAACiI,iBAAAA,OAAO7H,SAAO;MAACC,YAAW;OACzBL,8BAAAA,QAAA,cAACiI,iBAAAA,OAAOC,OAAK;MAAC7H,YAAW;OAAWvB,EAAE,oBAAA,CAAA,GACtCkB,8BAAAA,QAAA,cAACiI,iBAAAA,OAAOwG,aAAW;MAACpO,YAAW;OAAWvB,EAAE,0BAAA,CAAA,GAC5CkB,8BAAAA,QAAA,cAAC0O,6BAAAA;MAAaC,QAAAA;MAAO7O;MAAY8O,WAAWN;MAAahJ,UAAUkJ;;;;;AAGzE;",
|
|
6
|
+
"names": ["import_react", "import_app_framework", "import_react_ui", "import_react_client", "import_halo", "import_react_ui_form", "import_react_ui_stack", "import_util", "DevicesContainer", "createInvitationUrl", "t", "useTranslation", "dispatchPromise", "dispatch", "useIntentDispatcher", "devices", "useDevices", "swarm", "connectionState", "useNetworkStatus", "handleResetStorage", "useCallback", "createIntent", "ClientAction", "ResetStorage", "handleRecover", "mode", "handleJoinNewIdentity", "React", "Clipboard", "Provider", "StackItem", "Content", "classNames", "ControlPage", "ControlSection", "title", "ns", "CLIENT_PLUGIN", "description", "ControlFrame", "ControlFrameItem", "List", "map", "device", "DeviceListItem", "key", "deviceKey", "toHex", "DeviceInvitation", "ControlGroup", "ControlItem", "Button", "variant", "onClick", "data-testid", "props", "client", "useClient", "invitation", "setInvitation", "useState", "onInvitationCreate", "halo", "share", "config", "values", "runtime", "app", "env", "DX_ENVIRONMENT", "subscription", "subscribe", "invitationCode", "InvitationEncoder", "encode", "state", "Invitation", "State", "CONNECTING", "log", "info", "JSON", "stringify", "authCode", "unsubscribe", "onInvitationDone", "undefined", "DeviceInvitationImpl", "InvitationSection", "invitationObservable", "useMulticastObservable", "url", "useEffect", "SUCCESS", "invitationId", "activeView", "CANCELLED", "READY_FOR_AUTHENTICATION", "p", "className", "IconButton", "icon", "label", "disabled", "Viewport", "Root", "Views", "View", "id", "InvitationComplete", "statusValue", "InvitationAuthCode", "code", "onCancel", "InvitationQR", "qrLabel", "useId", "emoji", "hexToEmoji", "div", "role", "QR", "rounding", "backgroundColor", "color", "aria-labelledby", "errorCorrectionLevel", "cutout", "Centered", "Emoji", "text", "span", "value", "AuthCode", "large", "Check", "mx", "getSize", "X", "JOIN_DIALOG", "JoinDialog", "handleCancelResetStorage", "ShareIdentity", "handleDone", "result", "identityKey", "Promise", "all", "LayoutAction", "UpdateDialog", "part", "options", "ObservabilityAction", "SendEvent", "name", "initialDisposition", "Dialog", "Title", "JoinPanel", "exitActionParent", "Close", "asChild", "doneActionParent", "onCancelResetStorage", "onDone", "getDefaultHueValue", "identity", "hexToHue", "getDefaultEmojiValue", "getHueValue", "profile", "data", "hue", "getEmojiValue", "ProfileContainer", "useIdentity", "displayName", "setDisplayNameDirectly", "setEmojiDirectly", "setHueDirectly", "updateProfile", "useMemo", "debounce", "handleSave", "did", "customElements", "type", "getValue", "onValueChange", "handleChange", "target", "ControlItemInput", "Input", "TextInput", "onChange", "placeholder", "nextEmoji", "handleEmojiReset", "EmojiPickerBlock", "triggerVariant", "onChangeEmoji", "onClickClear", "nextHue", "handleHueReset", "HuePicker", "onReset", "ButtonGroup", "Form", "schema", "ProfileSchema", "autoSave", "onSave", "Custom", "Schema", "Struct", "String", "annotations", "RECOVERY_CODE_DIALOG", "RecoveryCodeDialog", "confirmation", "setConfirmation", "handleConfirmation", "checked", "AlertDialog", "Code", "Checkbox", "onCheckedChange", "Label", "Action", "words", "split", "word", "i", "MANAGE_CREDENTIALS_DIALOG", "RecoveryCredentialsContainer", "credentials", "useCredentials", "recoveryCredentials", "filter", "credential", "subject", "assertion", "size", "CreatePasskey", "CreateRecoveryCode", "length", "Message", "valence", "Icon", "Body", "ListItem", "Endcap", "Heading", "issuanceDate", "toLocaleString", "RESET_DIALOG", "ResetDialog", "handleReset", "reset", "handleCancel", "Description", "ConfirmReset", "active", "onConfirm"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,131 @@
|
|
|
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 chunk_BL6EBWOS_exports = {};
|
|
20
|
+
__export(chunk_BL6EBWOS_exports, {
|
|
21
|
+
Account: () => Account,
|
|
22
|
+
ClientAction: () => ClientAction
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(chunk_BL6EBWOS_exports);
|
|
25
|
+
var import_chunk_DJKWB5L6 = require("./chunk-DJKWB5L6.cjs");
|
|
26
|
+
var import_effect = require("effect");
|
|
27
|
+
var import_react_client = require("@dxos/react-client");
|
|
28
|
+
var IdentitySchema = import_effect.Schema.Struct({
|
|
29
|
+
identityKey: import_effect.Schema.instanceOf(import_react_client.PublicKey),
|
|
30
|
+
spaceKey: import_effect.Schema.optional(import_effect.Schema.instanceOf(import_react_client.PublicKey)),
|
|
31
|
+
profile: import_effect.Schema.optional(import_effect.Schema.Struct({
|
|
32
|
+
displayName: import_effect.Schema.optional(import_effect.Schema.String),
|
|
33
|
+
avatarCid: import_effect.Schema.optional(import_effect.Schema.String),
|
|
34
|
+
data: import_effect.Schema.optional(import_effect.Schema.Record({
|
|
35
|
+
key: import_effect.Schema.String,
|
|
36
|
+
value: import_effect.Schema.Any
|
|
37
|
+
}))
|
|
38
|
+
}))
|
|
39
|
+
});
|
|
40
|
+
var CLIENT_ACTION = `${import_chunk_DJKWB5L6.CLIENT_PLUGIN}/action`;
|
|
41
|
+
(function(ClientAction2) {
|
|
42
|
+
const ProfileSchema = import_effect.Schema.Struct({
|
|
43
|
+
displayName: import_effect.Schema.optional(import_effect.Schema.String),
|
|
44
|
+
avatarCid: import_effect.Schema.optional(import_effect.Schema.String),
|
|
45
|
+
data: import_effect.Schema.optional(import_effect.Schema.Record({
|
|
46
|
+
key: import_effect.Schema.String,
|
|
47
|
+
value: import_effect.Schema.Any
|
|
48
|
+
}))
|
|
49
|
+
});
|
|
50
|
+
class CreateIdentity extends import_effect.Schema.TaggedClass()(`${CLIENT_ACTION}/create-identity`, {
|
|
51
|
+
input: ProfileSchema,
|
|
52
|
+
output: IdentitySchema
|
|
53
|
+
}) {
|
|
54
|
+
}
|
|
55
|
+
ClientAction2.CreateIdentity = CreateIdentity;
|
|
56
|
+
class JoinIdentity extends import_effect.Schema.TaggedClass()(`${CLIENT_ACTION}/join-identity`, {
|
|
57
|
+
input: import_effect.Schema.Struct({
|
|
58
|
+
invitationCode: import_effect.Schema.optional(import_effect.Schema.String)
|
|
59
|
+
}),
|
|
60
|
+
output: import_effect.Schema.Void
|
|
61
|
+
}) {
|
|
62
|
+
}
|
|
63
|
+
ClientAction2.JoinIdentity = JoinIdentity;
|
|
64
|
+
class ShareIdentity extends import_effect.Schema.TaggedClass()(`${CLIENT_ACTION}/share-identity`, {
|
|
65
|
+
input: import_effect.Schema.Void,
|
|
66
|
+
output: import_effect.Schema.Void
|
|
67
|
+
}) {
|
|
68
|
+
}
|
|
69
|
+
ClientAction2.ShareIdentity = ShareIdentity;
|
|
70
|
+
class RecoverIdentity extends import_effect.Schema.TaggedClass()(`${CLIENT_ACTION}/recover-identity`, {
|
|
71
|
+
input: import_effect.Schema.Void,
|
|
72
|
+
output: import_effect.Schema.Void
|
|
73
|
+
}) {
|
|
74
|
+
}
|
|
75
|
+
ClientAction2.RecoverIdentity = RecoverIdentity;
|
|
76
|
+
class ResetStorage extends import_effect.Schema.TaggedClass()(`${CLIENT_ACTION}/reset-storage`, {
|
|
77
|
+
input: import_effect.Schema.Struct({
|
|
78
|
+
mode: import_effect.Schema.optional(import_effect.Schema.String)
|
|
79
|
+
}),
|
|
80
|
+
output: import_effect.Schema.Void
|
|
81
|
+
}) {
|
|
82
|
+
}
|
|
83
|
+
ClientAction2.ResetStorage = ResetStorage;
|
|
84
|
+
class CreateAgent extends import_effect.Schema.TaggedClass()(`${CLIENT_ACTION}/create-agent`, {
|
|
85
|
+
input: import_effect.Schema.Void,
|
|
86
|
+
output: import_effect.Schema.Void
|
|
87
|
+
}) {
|
|
88
|
+
}
|
|
89
|
+
ClientAction2.CreateAgent = CreateAgent;
|
|
90
|
+
class CreateRecoveryCode extends import_effect.Schema.TaggedClass()(`${CLIENT_ACTION}/create-recovery-code`, {
|
|
91
|
+
input: import_effect.Schema.Void,
|
|
92
|
+
output: import_effect.Schema.Void
|
|
93
|
+
}) {
|
|
94
|
+
}
|
|
95
|
+
ClientAction2.CreateRecoveryCode = CreateRecoveryCode;
|
|
96
|
+
class CreatePasskey extends import_effect.Schema.TaggedClass()(`${CLIENT_ACTION}/create-passkey`, {
|
|
97
|
+
input: import_effect.Schema.Void,
|
|
98
|
+
output: import_effect.Schema.Void
|
|
99
|
+
}) {
|
|
100
|
+
}
|
|
101
|
+
ClientAction2.CreatePasskey = CreatePasskey;
|
|
102
|
+
class RedeemPasskey extends import_effect.Schema.TaggedClass()(`${CLIENT_ACTION}/redeem-passkey`, {
|
|
103
|
+
input: import_effect.Schema.Void,
|
|
104
|
+
output: import_effect.Schema.Void
|
|
105
|
+
}) {
|
|
106
|
+
}
|
|
107
|
+
ClientAction2.RedeemPasskey = RedeemPasskey;
|
|
108
|
+
class RedeemToken extends import_effect.Schema.TaggedClass()(`${CLIENT_ACTION}/redeem-token`, {
|
|
109
|
+
input: import_effect.Schema.Struct({
|
|
110
|
+
token: import_effect.Schema.String
|
|
111
|
+
}),
|
|
112
|
+
output: import_effect.Schema.Void
|
|
113
|
+
}) {
|
|
114
|
+
}
|
|
115
|
+
ClientAction2.RedeemToken = RedeemToken;
|
|
116
|
+
})(ClientAction || (ClientAction = {}));
|
|
117
|
+
(function(Account2) {
|
|
118
|
+
const _id = "dxos.org.plugin.client.account";
|
|
119
|
+
Account2.id = `!${_id}`;
|
|
120
|
+
Account2.Profile = `${_id}.profile`;
|
|
121
|
+
Account2.Devices = `${_id}.devices`;
|
|
122
|
+
Account2.Security = `${_id}.security`;
|
|
123
|
+
})(Account || (Account = {}));
|
|
124
|
+
var ClientAction;
|
|
125
|
+
var Account;
|
|
126
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
127
|
+
0 && (module.exports = {
|
|
128
|
+
Account,
|
|
129
|
+
ClientAction
|
|
130
|
+
});
|
|
131
|
+
//# sourceMappingURL=chunk-BL6EBWOS.cjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
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,oBAAuB;AAGvB,0BAA2D;AAM3D,IAAMA,iBAAiBC,qBAAOC,OAAO;EACnCC,aAAaF,qBAAOG,WAAWC,6BAAAA;EAC/BC,UAAUL,qBAAOM,SAASN,qBAAOG,WAAWC,6BAAAA,CAAAA;EAC5CG,SAASP,qBAAOM,SACdN,qBAAOC,OAAO;IACZO,aAAaR,qBAAOM,SAASN,q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",
|
|
6
|
+
"names": ["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
|
+
}
|
|
@@ -16,22 +16,22 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
16
16
|
return to;
|
|
17
17
|
};
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
var
|
|
20
|
-
__export(
|
|
19
|
+
var chunk_CIYUKY3J_exports = {};
|
|
20
|
+
__export(chunk_CIYUKY3J_exports, {
|
|
21
21
|
ClientCapabilities: () => ClientCapabilities
|
|
22
22
|
});
|
|
23
|
-
module.exports = __toCommonJS(
|
|
23
|
+
module.exports = __toCommonJS(chunk_CIYUKY3J_exports);
|
|
24
24
|
var import_chunk_DJKWB5L6 = require("./chunk-DJKWB5L6.cjs");
|
|
25
25
|
var import_app_framework = require("@dxos/app-framework");
|
|
26
|
-
var ClientCapabilities;
|
|
27
26
|
(function(ClientCapabilities2) {
|
|
28
27
|
ClientCapabilities2.Client = (0, import_app_framework.defineCapability)(`${import_chunk_DJKWB5L6.CLIENT_PLUGIN}/capability/client`);
|
|
29
28
|
ClientCapabilities2.Schema = (0, import_app_framework.defineCapability)(`${import_chunk_DJKWB5L6.CLIENT_PLUGIN}/capability/schema`);
|
|
30
29
|
ClientCapabilities2.SchemaWhiteList = (0, import_app_framework.defineCapability)(`${import_chunk_DJKWB5L6.CLIENT_PLUGIN}/capability/schema-whitelist`);
|
|
31
30
|
ClientCapabilities2.Migration = (0, import_app_framework.defineCapability)(`${import_chunk_DJKWB5L6.CLIENT_PLUGIN}/capability/migration`);
|
|
32
31
|
})(ClientCapabilities || (ClientCapabilities = {}));
|
|
32
|
+
var ClientCapabilities;
|
|
33
33
|
// Annotate the CommonJS export names for ESM import in node:
|
|
34
34
|
0 && (module.exports = {
|
|
35
35
|
ClientCapabilities
|
|
36
36
|
});
|
|
37
|
-
//# sourceMappingURL=chunk-
|
|
37
|
+
//# sourceMappingURL=chunk-CIYUKY3J.cjs.map
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/capabilities/capabilities.ts"],
|
|
4
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,2BAAiC
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAIA,2BAAiC;UAOhBA,qBAAAA;sBACFC,aAASC,uCAAyB,GAAGC,mCAAAA,oBAAiC;sBACtEC,aAASF,uCAAgC,GAAGC,mCAAAA,oBAAiC;sBAC7EE,sBAAkBH,uCAAgC,GAAGC,mCAAAA,8BAA2C;sBAChGG,gBAAYJ,uCAAoC,GAAGC,mCAAAA,uBAAoC;AACtG,GALiBH,uBAAAA,qBAAAA,CAAAA,EAAAA;;",
|
|
6
6
|
"names": ["ClientCapabilities", "Client", "defineCapability", "CLIENT_PLUGIN", "Schema", "SchemaWhiteList", "Migration"]
|
|
7
7
|
}
|
|
@@ -16,14 +16,13 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
16
16
|
return to;
|
|
17
17
|
};
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
var
|
|
20
|
-
__export(
|
|
19
|
+
var chunk_DNKJCPU7_exports = {};
|
|
20
|
+
__export(chunk_DNKJCPU7_exports, {
|
|
21
21
|
ClientEvents: () => ClientEvents
|
|
22
22
|
});
|
|
23
|
-
module.exports = __toCommonJS(
|
|
23
|
+
module.exports = __toCommonJS(chunk_DNKJCPU7_exports);
|
|
24
24
|
var import_chunk_DJKWB5L6 = require("./chunk-DJKWB5L6.cjs");
|
|
25
25
|
var import_app_framework = require("@dxos/app-framework");
|
|
26
|
-
var ClientEvents;
|
|
27
26
|
(function(ClientEvents2) {
|
|
28
27
|
ClientEvents2.ClientReady = (0, import_app_framework.defineEvent)(`${import_chunk_DJKWB5L6.CLIENT_PLUGIN}/event/client-ready`);
|
|
29
28
|
ClientEvents2.SetupSchema = (0, import_app_framework.defineEvent)(`${import_chunk_DJKWB5L6.CLIENT_PLUGIN}/event/setup-schema`);
|
|
@@ -31,8 +30,9 @@ var ClientEvents;
|
|
|
31
30
|
ClientEvents2.IdentityCreated = (0, import_app_framework.defineEvent)(`${import_chunk_DJKWB5L6.CLIENT_PLUGIN}/event/identity-created`);
|
|
32
31
|
ClientEvents2.SpacesReady = (0, import_app_framework.defineEvent)(`${import_chunk_DJKWB5L6.CLIENT_PLUGIN}/event/spaces-ready`);
|
|
33
32
|
})(ClientEvents || (ClientEvents = {}));
|
|
33
|
+
var ClientEvents;
|
|
34
34
|
// Annotate the CommonJS export names for ESM import in node:
|
|
35
35
|
0 && (module.exports = {
|
|
36
36
|
ClientEvents
|
|
37
37
|
});
|
|
38
|
-
//# sourceMappingURL=chunk-
|
|
38
|
+
//# sourceMappingURL=chunk-DNKJCPU7.cjs.map
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/events.ts"],
|
|
4
4
|
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { defineEvent } from '@dxos/app-framework';\n\nimport { CLIENT_PLUGIN } from './meta';\n\nexport namespace ClientEvents {\n export const ClientReady = defineEvent(`${CLIENT_PLUGIN}/event/client-ready`);\n export const SetupSchema = defineEvent(`${CLIENT_PLUGIN}/event/setup-schema`);\n export const SetupMigration = defineEvent(`${CLIENT_PLUGIN}/event/setup-migration`);\n export const IdentityCreated = defineEvent(`${CLIENT_PLUGIN}/event/identity-created`);\n export const SpacesReady = defineEvent(`${CLIENT_PLUGIN}/event/spaces-ready`);\n}\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAIA,2BAA4B
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAIA,2BAA4B;UAIXA,eAAAA;gBACFC,kBAAcC,kCAAY,GAAGC,mCAAAA,qBAAkC;gBAC/DC,kBAAcF,kCAAY,GAAGC,mCAAAA,qBAAkC;gBAC/DE,qBAAiBH,kCAAY,GAAGC,mCAAAA,wBAAqC;gBACrEG,sBAAkBJ,kCAAY,GAAGC,mCAAAA,yBAAsC;gBACvEI,kBAAcL,kCAAY,GAAGC,mCAAAA,qBAAkC;AAC9E,GANiBH,iBAAAA,eAAAA,CAAAA,EAAAA;;",
|
|
6
6
|
"names": ["ClientEvents", "ClientReady", "defineEvent", "CLIENT_PLUGIN", "SetupSchema", "SetupMigration", "IdentityCreated", "SpacesReady"]
|
|
7
7
|
}
|
|
@@ -16,17 +16,17 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
16
16
|
return to;
|
|
17
17
|
};
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
var
|
|
20
|
-
__export(
|
|
19
|
+
var client_Q3EQS4HA_exports = {};
|
|
20
|
+
__export(client_Q3EQS4HA_exports, {
|
|
21
21
|
default: () => client_default
|
|
22
22
|
});
|
|
23
|
-
module.exports = __toCommonJS(
|
|
24
|
-
var
|
|
25
|
-
var
|
|
23
|
+
module.exports = __toCommonJS(client_Q3EQS4HA_exports);
|
|
24
|
+
var import_chunk_DNKJCPU7 = require("./chunk-DNKJCPU7.cjs");
|
|
25
|
+
var import_chunk_CIYUKY3J = require("./chunk-CIYUKY3J.cjs");
|
|
26
26
|
var import_chunk_DJKWB5L6 = require("./chunk-DJKWB5L6.cjs");
|
|
27
27
|
var import_app_framework = require("@dxos/app-framework");
|
|
28
28
|
var import_react_client = require("@dxos/react-client");
|
|
29
|
-
var client_default = async ({ context, onClientInitialized, ...options }) => {
|
|
29
|
+
var client_default = async ({ context, onClientInitialized, onSpacesReady, ...options }) => {
|
|
30
30
|
const client = new import_react_client.Client(options);
|
|
31
31
|
await client.initialize();
|
|
32
32
|
await onClientInitialized?.(context, client);
|
|
@@ -39,12 +39,13 @@ var client_default = async ({ context, onClientInitialized, ...options }) => {
|
|
|
39
39
|
});
|
|
40
40
|
const subscription = client.spaces.isReady.subscribe(async (ready) => {
|
|
41
41
|
if (ready) {
|
|
42
|
-
await context.activatePromise(
|
|
42
|
+
await context.activatePromise(import_chunk_DNKJCPU7.ClientEvents.SpacesReady);
|
|
43
|
+
await onSpacesReady?.(context, client);
|
|
43
44
|
}
|
|
44
45
|
});
|
|
45
|
-
return (0, import_app_framework.contributes)(
|
|
46
|
+
return (0, import_app_framework.contributes)(import_chunk_CIYUKY3J.ClientCapabilities.Client, client, async () => {
|
|
46
47
|
subscription.unsubscribe();
|
|
47
48
|
await client.destroy();
|
|
48
49
|
});
|
|
49
50
|
};
|
|
50
|
-
//# sourceMappingURL=client-
|
|
51
|
+
//# sourceMappingURL=client-Q3EQS4HA.cjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
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,2BAAgD;AAChD,0BAAuB;AAUvB,IAAA,iBAAe,OAAO,EAAEA,SAASC,qBAAqBC,eAAe,GAAGC,QAAAA,MAAkC;AACxG,QAAMC,SAAS,IAAIC,2BAAOF,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,mCAAaC,WAAW;AACtD,YAAMpB,gBAAgBF,SAASI,MAAAA;IACjC;EACF,CAAA;AAEA,aAAOmB,kCAAYC,yCAAmBnB,QAAQD,QAAQ,YAAA;AACpDY,iBAAaS,YAAW;AACxB,UAAMrB,OAAOsB,QAAO;EACtB,CAAA;AACF;",
|
|
6
|
+
"names": ["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
|
+
}
|
package/dist/lib/node/index.cjs
CHANGED
|
@@ -29,31 +29,31 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
29
29
|
var node_exports = {};
|
|
30
30
|
__export(node_exports, {
|
|
31
31
|
CLIENT_PLUGIN: () => import_chunk_DJKWB5L6.CLIENT_PLUGIN,
|
|
32
|
-
ClientCapabilities: () =>
|
|
33
|
-
ClientEvents: () =>
|
|
32
|
+
ClientCapabilities: () => import_chunk_CIYUKY3J.ClientCapabilities,
|
|
33
|
+
ClientEvents: () => import_chunk_DNKJCPU7.ClientEvents,
|
|
34
34
|
ClientPlugin: () => ClientPlugin,
|
|
35
35
|
meta: () => import_chunk_DJKWB5L6.meta
|
|
36
36
|
});
|
|
37
37
|
module.exports = __toCommonJS(node_exports);
|
|
38
|
-
var
|
|
39
|
-
var
|
|
38
|
+
var import_chunk_DNKJCPU7 = require("./chunk-DNKJCPU7.cjs");
|
|
39
|
+
var import_chunk_CIYUKY3J = require("./chunk-CIYUKY3J.cjs");
|
|
40
40
|
var import_chunk_DJKWB5L6 = require("./chunk-DJKWB5L6.cjs");
|
|
41
41
|
var import_app_framework = require("@dxos/app-framework");
|
|
42
42
|
var import_app_framework2 = require("@dxos/app-framework");
|
|
43
|
-
var AppGraphBuilder = (0, import_app_framework2.lazy)(async () => import("./app-graph-builder-
|
|
44
|
-
var Client = (0, import_app_framework2.lazy)(async () => import("./client-
|
|
45
|
-
var IntentResolver = (0, import_app_framework2.lazy)(async () => import("./intent-resolver-
|
|
46
|
-
var Migrations = (0, import_app_framework2.lazy)(async () => import("./migrations-
|
|
47
|
-
var ReactContext = (0, import_app_framework2.lazy)(async () => import("./react-context-
|
|
48
|
-
var ReactSurface = (0, import_app_framework2.lazy)(async () => import("./react-surface-
|
|
49
|
-
var
|
|
43
|
+
var AppGraphBuilder = (0, import_app_framework2.lazy)(async () => import("./app-graph-builder-BEEYM3A5.cjs"));
|
|
44
|
+
var Client = (0, import_app_framework2.lazy)(async () => import("./client-Q3EQS4HA.cjs"));
|
|
45
|
+
var IntentResolver = (0, import_app_framework2.lazy)(async () => import("./intent-resolver-Q4QBA5B2.cjs"));
|
|
46
|
+
var Migrations = (0, import_app_framework2.lazy)(async () => import("./migrations-6FEWMF7U.cjs"));
|
|
47
|
+
var ReactContext = (0, import_app_framework2.lazy)(async () => import("./react-context-JS7Y5ZOK.cjs"));
|
|
48
|
+
var ReactSurface = (0, import_app_framework2.lazy)(async () => import("./react-surface-GHKLUOKW.cjs"));
|
|
49
|
+
var SchemaDefs = (0, import_app_framework2.lazy)(async () => import("./schema-defs-TA52ARBO.cjs"));
|
|
50
50
|
var translations_default = [
|
|
51
51
|
{
|
|
52
52
|
"en-US": {
|
|
53
53
|
[import_chunk_DJKWB5L6.CLIENT_PLUGIN]: {
|
|
54
54
|
"account label": "User Account",
|
|
55
55
|
"profile label": "Profile",
|
|
56
|
-
"profile description": "You can adjust how
|
|
56
|
+
"profile description": "You can adjust how your user settings here.",
|
|
57
57
|
"devices label": "Devices",
|
|
58
58
|
"devices verbose label": "Manage devices",
|
|
59
59
|
"add device description": "Authenticating another device is a two-step process. To get started, create a code using the button below.",
|
|
@@ -78,7 +78,7 @@ var translations_default = [
|
|
|
78
78
|
"open user account label": "Open user account",
|
|
79
79
|
"manage credentials dialog title": "Manage Account Recovery",
|
|
80
80
|
"credentials list label": "Recovery credentials",
|
|
81
|
-
"no credentials title": "There
|
|
81
|
+
"no credentials title": "WARNING: There is currently no way to recover your account.",
|
|
82
82
|
"no credentials message": "Create a recovery credential above to secure your\xA0account.",
|
|
83
83
|
"recovery setup dialog title": "Account Security",
|
|
84
84
|
"recovery setup dialog description": "In order to maintain access to your account you need to register a recovery credential. Passkeys are the recommended way to do this, they can be stored in your browser or in a password\xA0manager.",
|
|
@@ -109,7 +109,7 @@ var ClientPlugin = ({ invitationUrl = window.location.origin, invitationParam =
|
|
|
109
109
|
id: `${import_chunk_DJKWB5L6.meta.id}/module/client`,
|
|
110
110
|
activatesOn: (0, import_app_framework.oneOf)(import_app_framework.Events.Startup, import_app_framework.Events.SetupAppGraph),
|
|
111
111
|
activatesAfter: [
|
|
112
|
-
|
|
112
|
+
import_chunk_DNKJCPU7.ClientEvents.ClientReady
|
|
113
113
|
],
|
|
114
114
|
activate: (context) => Client({
|
|
115
115
|
...options,
|
|
@@ -118,17 +118,17 @@ var ClientPlugin = ({ invitationUrl = window.location.origin, invitationParam =
|
|
|
118
118
|
}),
|
|
119
119
|
(0, import_app_framework.defineModule)({
|
|
120
120
|
id: `${import_chunk_DJKWB5L6.meta.id}/module/schema`,
|
|
121
|
-
activatesOn:
|
|
121
|
+
activatesOn: import_chunk_DNKJCPU7.ClientEvents.ClientReady,
|
|
122
122
|
activatesBefore: [
|
|
123
|
-
|
|
123
|
+
import_chunk_DNKJCPU7.ClientEvents.SetupSchema
|
|
124
124
|
],
|
|
125
|
-
activate:
|
|
125
|
+
activate: SchemaDefs
|
|
126
126
|
}),
|
|
127
127
|
(0, import_app_framework.defineModule)({
|
|
128
128
|
id: `${import_chunk_DJKWB5L6.meta.id}/module/migration`,
|
|
129
|
-
activatesOn:
|
|
129
|
+
activatesOn: import_chunk_DNKJCPU7.ClientEvents.ClientReady,
|
|
130
130
|
activatesBefore: [
|
|
131
|
-
|
|
131
|
+
import_chunk_DNKJCPU7.ClientEvents.SetupMigration
|
|
132
132
|
],
|
|
133
133
|
activate: Migrations
|
|
134
134
|
}),
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/ClientPlugin.ts", "../../../src/capabilities/index.ts", "../../../src/translations.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { Capabilities, contributes, defineModule, definePlugin, Events, oneOf } from '@dxos/app-framework';\n\nimport {\n Client,\n AppGraphBuilder,\n IntentResolver,\n Migrations,\n ReactContext,\n ReactSurface,\n
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,2BAAqF;ACArF,IAAAA,wBAAqB;AAEd,IAAMC,sBAAkBC,4BAAK,YAAY,OAAO,kCAAA,CAAA;AAChD,IAAMC,aAASD,4BAAK,YAAY,OAAO,uBAAA,CAAA;AACvC,IAAME,qBAAiBF,4BAAK,YAAY,OAAO,gCAAA,CAAA;AAC/C,IAAMG,iBAAaH,4BAAK,YAAY,OAAO,2BAAA,CAAA;AAC3C,IAAMI,mBAAeJ,4BAAK,YAAY,OAAO,8BAAA,CAAA;AAC7C,IAAMK,mBAAeL,4BAAK,YAAY,OAAO,8BAAA,CAAA;AAC7C,IAAMM,
|
|
6
|
-
"names": ["import_app_framework", "AppGraphBuilder", "lazy", "Client", "IntentResolver", "Migrations", "ReactContext", "ReactSurface", "
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { Capabilities, contributes, defineModule, definePlugin, Events, oneOf } from '@dxos/app-framework';\n\nimport {\n Client,\n AppGraphBuilder,\n IntentResolver,\n Migrations,\n ReactContext,\n ReactSurface,\n SchemaDefs,\n} from './capabilities';\nimport { ClientEvents } from './events';\nimport { meta } from './meta';\nimport translations from './translations';\nimport { type ClientPluginOptions } from './types';\n\nexport const ClientPlugin = ({\n invitationUrl = window.location.origin,\n invitationParam = 'deviceInvitationCode',\n onReset,\n ...options\n}: ClientPluginOptions) => {\n const createInvitationUrl = (invitationCode: string) => {\n const baseUrl = new URL(invitationUrl);\n baseUrl.searchParams.set(invitationParam, invitationCode);\n return baseUrl.toString();\n };\n\n return definePlugin(meta, [\n defineModule({\n id: `${meta.id}/module/client`,\n activatesOn: oneOf(Events.Startup, Events.SetupAppGraph),\n activatesAfter: [ClientEvents.ClientReady],\n activate: (context) => Client({ ...options, context }),\n }),\n defineModule({\n id: `${meta.id}/module/schema`,\n activatesOn: ClientEvents.ClientReady,\n activatesBefore: [ClientEvents.SetupSchema],\n activate: SchemaDefs,\n }),\n defineModule({\n id: `${meta.id}/module/migration`,\n activatesOn: ClientEvents.ClientReady,\n activatesBefore: [ClientEvents.SetupMigration],\n activate: Migrations,\n }),\n defineModule({\n id: `${meta.id}/module/react-context`,\n activatesOn: Events.Startup,\n activate: ReactContext,\n }),\n defineModule({\n id: `${meta.id}/module/react-surface`,\n activatesOn: Events.SetupReactSurface,\n activate: () => ReactSurface({ createInvitationUrl, onReset }),\n }),\n defineModule({\n id: `${meta.id}/module/app-graph-builder`,\n activatesOn: Events.SetupAppGraph,\n activate: AppGraphBuilder,\n }),\n defineModule({\n id: `${meta.id}/module/intent-resolver`,\n activatesOn: Events.SetupIntentResolver,\n activate: (context) => IntentResolver({ context }),\n }),\n defineModule({\n id: `${meta.id}/module/translations`,\n activatesOn: Events.SetupTranslations,\n activate: () => contributes(Capabilities.Translations, translations),\n }),\n ]);\n};\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { lazy } from '@dxos/app-framework';\n\nexport const AppGraphBuilder = lazy(async () => import('./app-graph-builder'));\nexport const Client = lazy(async () => import('./client'));\nexport const IntentResolver = lazy(async () => import('./intent-resolver'));\nexport const Migrations = lazy(async () => import('./migrations'));\nexport const ReactContext = lazy(async () => import('./react-context'));\nexport const ReactSurface = lazy(async () => import('./react-surface'));\nexport const SchemaDefs = lazy(async () => import('./schema-defs'));\n\nexport * from './capabilities';\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { CLIENT_PLUGIN } from './meta';\n\nexport default [\n {\n 'en-US': {\n [CLIENT_PLUGIN]: {\n 'account label': 'User Account',\n 'profile label': 'Profile',\n 'profile description': 'You can adjust how your user settings here.',\n 'devices label': 'Devices',\n 'devices verbose label': 'Manage devices',\n 'add device description':\n 'Authenticating another device is a two-step process. To get started, create a code using the button below.',\n 'devices description':\n 'You can add and remove devices, configure your agent in the cloud, reset this device, or log in as a different identity here.',\n 'create device invitation label': 'Create code',\n 'qr code description':\n 'Scan this QR code using the device you want to log in to, or copy the URL and share it with the new device.',\n 'security label': 'Security',\n 'reset device description': 'Log out from this device, erasing all the data on this device.',\n 'join new identity description':\n 'Log out from this device, erasing all the data currently on this device, and use a QR code or URL to log in.',\n 'recover identity description':\n 'Log out from this device, erasing all the data currently on this device, and use a passkey or recovery code to log in.',\n 'danger zone title': 'Log out',\n 'danger zone description':\n 'Because Composer is decentralized, logging out entails erasing all the data on this device. If you have any data on this device that you’d like to keep, you can log in on a separate device using a passkey or complete a peer-to-peer device invitation above.',\n 'display name label': 'Display name',\n 'display name description': 'Your name as it appears in the app.',\n 'display name input placeholder': 'Enter a name',\n 'icon label': 'Avatar',\n 'icon description': 'The emoji used to represent you in the app.',\n 'hue label': 'Color',\n 'hue description':\n 'The color used to represent you in the app, including as your avatar’s background, your cursor as it appears to others, and the messages you send in group threads.',\n 'did label': 'DID',\n 'did description': 'Your unique ID.',\n 'open user account label': 'Open user account',\n 'manage credentials dialog title': 'Manage Account Recovery',\n 'credentials list label': 'Recovery credentials',\n 'no credentials title': 'WARNING: There is currently no way to recover your account.',\n 'no credentials message': 'Create a recovery credential above to secure your account.',\n 'recovery setup dialog title': 'Account Security',\n 'recovery setup dialog description':\n 'In order to maintain access to your account you need to register a recovery credential. Passkeys are the recommended way to do this, they can be stored in your browser or in a password manager.',\n 'create passkey label': 'Create Passkey',\n // TODO(wittjosiah): At link to user-focused passkey information.\n // Something like https://www.tomsguide.com/news/what-are-passkeys.\n 'create passkey description':\n 'A passkey is a secure and easy to use credential that can be used to recover your account.',\n 'create recovery code label': 'Create Recovery Code',\n 'create recovery code description': 'A recovery code is 12 word phrase representing a private key.',\n 'recovery code dialog title': 'Recovery Code',\n 'recovery code dialog description':\n 'This is your identity recovery code, store it in a safe place. You can use it to recover your identity if you ever lose access to your devices.',\n 'recovery code dialog warning 1': 'NOTE: This code will not be displayed again.',\n 'recovery code dialog warning 2':\n 'It is your private key for recovering DXOS data. Anyone with this key will be able to gain access to your account.',\n 'recovery code confirmation label': 'Please confirm you have saved the code.',\n 'continue label': 'Continue',\n },\n },\n },\n];\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,2BAAqF;ACArF,IAAAA,wBAAqB;AAEd,IAAMC,sBAAkBC,4BAAK,YAAY,OAAO,kCAAA,CAAA;AAChD,IAAMC,aAASD,4BAAK,YAAY,OAAO,uBAAA,CAAA;AACvC,IAAME,qBAAiBF,4BAAK,YAAY,OAAO,gCAAA,CAAA;AAC/C,IAAMG,iBAAaH,4BAAK,YAAY,OAAO,2BAAA,CAAA;AAC3C,IAAMI,mBAAeJ,4BAAK,YAAY,OAAO,8BAAA,CAAA;AAC7C,IAAMK,mBAAeL,4BAAK,YAAY,OAAO,8BAAA,CAAA;AAC7C,IAAMM,iBAAaN,4BAAK,YAAY,OAAO,4BAAA,CAAA;ACNlD,IAAA,uBAAe;EACb;IACE,SAAS;MACP,CAACO,mCAAAA,GAAgB;QACf,iBAAiB;QACjB,iBAAiB;QACjB,uBAAuB;QACvB,iBAAiB;QACjB,yBAAyB;QACzB,0BACE;QACF,uBACE;QACF,kCAAkC;QAClC,uBACE;QACF,kBAAkB;QAClB,4BAA4B;QAC5B,iCACE;QACF,gCACE;QACF,qBAAqB;QACrB,2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/B;IACZ,CAAA;QACAqB,mCAAa;MACXC,IAAI,GAAGF,2BAAKE,EAAE;MACdC,aAAaE,4BAAOW;MACpBL,UAAU,MAAM9B,aAAa;QAAEW;QAAqBF;MAAQ,CAAA;IAC9D,CAAA;QACAW,mCAAa;MACXC,IAAI,GAAGF,2BAAKE,EAAE;MACdC,aAAaE,4BAAOE;MACpBI,UAAUpC;IACZ,CAAA;QACA0B,mCAAa;MACXC,IAAI,GAAGF,2BAAKE,EAAE;MACdC,aAAaE,4BAAOY;MACpBN,UAAU,CAACC,YAAYlC,eAAe;QAAEkC;MAAQ,CAAA;IAClD,CAAA;QACAX,mCAAa;MACXC,IAAI,GAAGF,2BAAKE,EAAE;MACdC,aAAaE,4BAAOa;MACpBP,UAAU,UAAMQ,kCAAYC,kCAAaC,cAAcC,oBAAAA;IACzD,CAAA;GACD;AACH;",
|
|
6
|
+
"names": ["import_app_framework", "AppGraphBuilder", "lazy", "Client", "IntentResolver", "Migrations", "ReactContext", "ReactSurface", "SchemaDefs", "CLIENT_PLUGIN", "ClientPlugin", "invitationUrl", "window", "location", "origin", "invitationParam", "onReset", "options", "createInvitationUrl", "invitationCode", "baseUrl", "URL", "searchParams", "set", "toString", "definePlugin", "meta", "defineModule", "id", "activatesOn", "oneOf", "Events", "Startup", "SetupAppGraph", "activatesAfter", "ClientEvents", "ClientReady", "activate", "context", "activatesBefore", "SetupSchema", "SetupMigration", "SetupReactSurface", "SetupIntentResolver", "SetupTranslations", "contributes", "Capabilities", "Translations", "translations"]
|
|
7
7
|
}
|