@dxos/plugin-thread 0.8.4-staging.60fe92afc8 → 0.9.1-main.c7dcc2e112
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/neutral/ChannelArticle-CTYSCRTR.mjs +122 -0
- package/dist/lib/neutral/ChannelArticle-CTYSCRTR.mjs.map +7 -0
- package/dist/lib/neutral/ThreadPlugin.mjs +2 -2
- package/dist/lib/neutral/ThreadPlugin.mjs.map +4 -4
- package/dist/lib/neutral/{app-graph-builder-OLKN3VTB.mjs → app-graph-builder-U4ZDM6GK.mjs} +41 -5
- package/dist/lib/neutral/app-graph-builder-U4ZDM6GK.mjs.map +7 -0
- package/dist/lib/neutral/{append-channel-message-J6DXDPBH.mjs → append-channel-message-2OZYIIFL.mjs} +2 -2
- package/dist/lib/neutral/capabilities/index.mjs +5 -5
- package/dist/lib/neutral/{channel-backend-feed-FCXGAIEC.mjs → channel-backend-feed-ALIPAEPT.mjs} +3 -3
- package/dist/lib/neutral/{channel-backend-feed-FCXGAIEC.mjs.map → channel-backend-feed-ALIPAEPT.mjs.map} +2 -2
- package/dist/lib/neutral/chunk-A5JYVGL2.mjs +45 -0
- package/dist/lib/neutral/chunk-A5JYVGL2.mjs.map +7 -0
- package/dist/lib/neutral/{chunk-AWAQTEU6.mjs → chunk-DM2T6BH5.mjs} +3 -3
- package/dist/lib/neutral/chunk-DM2T6BH5.mjs.map +7 -0
- package/dist/lib/neutral/{chunk-P4RSGFS4.mjs → chunk-GQCMB5ZC.mjs} +2 -2
- package/dist/lib/neutral/{chunk-SZXFLBZL.mjs → chunk-KUO5HUCH.mjs} +2 -2
- package/dist/lib/neutral/{chunk-HJHK5O6F.mjs → chunk-UYINIL64.mjs} +4 -4
- package/dist/lib/neutral/{chunk-HJHK5O6F.mjs.map → chunk-UYINIL64.mjs.map} +3 -3
- package/dist/lib/neutral/components/index.mjs +7 -4
- package/dist/lib/neutral/components/index.mjs.map +3 -3
- package/dist/lib/neutral/containers/index.mjs +1 -1
- package/dist/lib/neutral/{create-channel-UW2LSL4G.mjs → create-channel-Y6D7YGVX.mjs} +2 -2
- package/dist/lib/neutral/{create-object-RLCOUVAW.mjs → create-object-LOZBRZAF.mjs} +3 -3
- package/dist/lib/neutral/hooks/index.mjs +2 -2
- package/dist/lib/neutral/index.mjs +7 -7
- package/dist/lib/neutral/meta.json +1 -1
- package/dist/lib/neutral/meta.mjs +1 -1
- package/dist/lib/neutral/{navigation-resolver-4X4HCQYX.mjs → navigation-resolver-VNFRIC7W.mjs} +3 -3
- package/dist/lib/neutral/navigation-resolver-VNFRIC7W.mjs.map +7 -0
- package/dist/lib/neutral/operations/index.mjs +1 -1
- package/dist/lib/neutral/plugin.mjs +2 -2
- package/dist/lib/neutral/{react-surface-G6KT7TSU.mjs → react-surface-H2EKIMSK.mjs} +3 -2
- package/dist/lib/neutral/{react-surface-G6KT7TSU.mjs.map → react-surface-H2EKIMSK.mjs.map} +3 -3
- package/dist/lib/neutral/translations.mjs +1 -1
- package/dist/lib/neutral/translations.mjs.map +3 -3
- package/dist/lib/neutral/types/index.mjs +1 -1
- package/dist/types/dx.config.d.ts +28 -0
- package/dist/types/dx.config.d.ts.map +1 -0
- package/dist/types/src/capabilities/app-graph-builder.d.ts +1 -1
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
- package/dist/types/src/capabilities/index.d.ts +5 -10
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/navigation-resolver.d.ts.map +1 -1
- package/dist/types/src/capabilities/react-surface.d.ts +2 -2
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
- package/dist/types/src/containers/ChannelArticle/ChannelArticle.d.ts +6 -6
- package/dist/types/src/containers/ChannelArticle/ChannelArticle.d.ts.map +1 -1
- package/dist/types/src/containers/ChannelArticle/ChannelArticle.stories.d.ts +1 -1
- package/dist/types/src/containers/ChannelArticle/ChannelArticle.stories.d.ts.map +1 -1
- package/dist/types/src/containers/ThreadArticle/ThreadArticle.stories.d.ts.map +1 -1
- package/dist/types/src/meta.d.ts +28 -2
- package/dist/types/src/meta.d.ts.map +1 -1
- package/dist/types/src/paths.d.ts.map +1 -1
- package/dist/types/src/types/ThreadCapabilities.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/dx.config.ts +33 -0
- package/package.json +32 -26
- package/src/ThreadPlugin.test.ts +1 -1
- package/src/ThreadPlugin.tsx +1 -1
- package/src/capabilities/app-graph-builder.ts +37 -3
- package/src/capabilities/channel-backend-feed.ts +1 -1
- package/src/capabilities/navigation-resolver.ts +2 -2
- package/src/capabilities/react-surface.tsx +1 -1
- package/src/components/Chat/Chat.tsx +4 -4
- package/src/containers/ChannelArticle/ChannelArticle.stories.tsx +5 -2
- package/src/containers/ChannelArticle/ChannelArticle.tsx +72 -20
- package/src/containers/ThreadArticle/ThreadArticle.stories.tsx +2 -1
- package/src/meta.ts +3 -27
- package/src/paths.ts +4 -2
- package/src/translations.ts +1 -1
- package/src/types/ThreadCapabilities.ts +1 -1
- package/src/types/ThreadOperation.ts +2 -2
- package/dist/lib/neutral/ChannelArticle-H633OM3U.mjs +0 -57
- package/dist/lib/neutral/ChannelArticle-H633OM3U.mjs.map +0 -7
- package/dist/lib/neutral/app-graph-builder-OLKN3VTB.mjs.map +0 -7
- package/dist/lib/neutral/chunk-AWAQTEU6.mjs.map +0 -7
- package/dist/lib/neutral/chunk-OOC6EQ7X.mjs +0 -36
- package/dist/lib/neutral/chunk-OOC6EQ7X.mjs.map +0 -7
- package/dist/lib/neutral/navigation-resolver-4X4HCQYX.mjs.map +0 -7
- /package/dist/lib/neutral/{append-channel-message-J6DXDPBH.mjs.map → append-channel-message-2OZYIIFL.mjs.map} +0 -0
- /package/dist/lib/neutral/{chunk-P4RSGFS4.mjs.map → chunk-GQCMB5ZC.mjs.map} +0 -0
- /package/dist/lib/neutral/{chunk-SZXFLBZL.mjs.map → chunk-KUO5HUCH.mjs.map} +0 -0
- /package/dist/lib/neutral/{create-channel-UW2LSL4G.mjs.map → create-channel-Y6D7YGVX.mjs.map} +0 -0
- /package/dist/lib/neutral/{create-object-RLCOUVAW.mjs.map → create-object-LOZBRZAF.mjs.map} +0 -0
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import "./chunk-J5LGTIGS.mjs";
|
|
2
|
+
|
|
3
|
+
// src/containers/ChannelArticle/ChannelArticle.tsx
|
|
4
|
+
import { Atom, useAtomValue } from "@effect-atom/atom-react";
|
|
5
|
+
import React, { useCallback } from "react";
|
|
6
|
+
import { Surface, useCapabilities, useOperationInvoker } from "@dxos/app-framework/ui";
|
|
7
|
+
import { AppSurface } from "@dxos/app-toolkit/ui";
|
|
8
|
+
import { Obj } from "@dxos/echo";
|
|
9
|
+
import { CallsCapabilities } from "@dxos/plugin-calls/types";
|
|
10
|
+
import { getSpace, useMembers } from "@dxos/react-client/echo";
|
|
11
|
+
import { useIdentity } from "@dxos/react-client/halo";
|
|
12
|
+
import { Panel } from "@dxos/react-ui";
|
|
13
|
+
import { Menu, MenuBuilder, useMenuBuilder } from "@dxos/react-ui-menu";
|
|
14
|
+
import { Chat } from "#components";
|
|
15
|
+
import { useMessages, useStatus } from "#hooks";
|
|
16
|
+
import { meta } from "#meta";
|
|
17
|
+
import { ThreadCapabilities, ThreadOperation, resolveProvider } from "#types";
|
|
18
|
+
var NOT_JOINED = Atom.make(false);
|
|
19
|
+
var NO_ROOM = Atom.make(void 0);
|
|
20
|
+
var ChannelArticle = ({ role, subject: channel, attendableId, chatOnly }) => {
|
|
21
|
+
const identity = useIdentity();
|
|
22
|
+
const space = channel ? getSpace(channel) : void 0;
|
|
23
|
+
const members = useMembers(space?.id);
|
|
24
|
+
const id = channel ? Obj.getURI(channel) : void 0;
|
|
25
|
+
const activity = useStatus(space, id);
|
|
26
|
+
const { invokePromise } = useOperationInvoker();
|
|
27
|
+
const providers = useCapabilities(ThreadCapabilities.ChannelBackend);
|
|
28
|
+
const provider = channel ? resolveProvider(providers, channel.backend.kind) : void 0;
|
|
29
|
+
const messages = useMessages(channel);
|
|
30
|
+
const readOnly = channel ? provider?.readOnly?.(channel) ?? Obj.getMeta(channel).keys.length > 0 : false;
|
|
31
|
+
const callProvider = useCapabilities(CallsCapabilities.CallTransportProvider)[0];
|
|
32
|
+
const callManager = useCapabilities(CallsCapabilities.Manager)[0];
|
|
33
|
+
const joined = useAtomValue(callManager?.joinedAtom ?? NOT_JOINED);
|
|
34
|
+
const currentRoomId = useAtomValue(callManager?.roomIdAtom ?? NO_ROOM);
|
|
35
|
+
const inThisCall = !!id && joined && currentRoomId === id;
|
|
36
|
+
const showCall = inThisCall && !chatOnly;
|
|
37
|
+
const canStartCall = !!callProvider && !inThisCall;
|
|
38
|
+
const handleStartCall = useCallback(async () => {
|
|
39
|
+
if (!callProvider || !id) {
|
|
40
|
+
return;
|
|
41
|
+
}
|
|
42
|
+
await callProvider.join(id);
|
|
43
|
+
}, [
|
|
44
|
+
callProvider,
|
|
45
|
+
id
|
|
46
|
+
]);
|
|
47
|
+
const menuActions = useMenuBuilder(() => {
|
|
48
|
+
const builder = MenuBuilder.make().root({
|
|
49
|
+
label: [
|
|
50
|
+
"channel-toolbar.title",
|
|
51
|
+
{
|
|
52
|
+
ns: meta.profile.key
|
|
53
|
+
}
|
|
54
|
+
]
|
|
55
|
+
});
|
|
56
|
+
if (canStartCall) {
|
|
57
|
+
builder.action("start-video-call", {
|
|
58
|
+
label: [
|
|
59
|
+
"start-video-call.menu",
|
|
60
|
+
{
|
|
61
|
+
ns: meta.profile.key
|
|
62
|
+
}
|
|
63
|
+
],
|
|
64
|
+
icon: "ph--video-camera--regular"
|
|
65
|
+
}, () => {
|
|
66
|
+
void handleStartCall();
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
return builder.build();
|
|
70
|
+
}, [
|
|
71
|
+
canStartCall,
|
|
72
|
+
handleStartCall
|
|
73
|
+
]);
|
|
74
|
+
const handleSend = (text) => {
|
|
75
|
+
if (!channel || !identity || readOnly) {
|
|
76
|
+
return false;
|
|
77
|
+
}
|
|
78
|
+
void invokePromise(ThreadOperation.AppendChannelMessage, {
|
|
79
|
+
channel,
|
|
80
|
+
sender: {
|
|
81
|
+
identityDid: identity.did
|
|
82
|
+
},
|
|
83
|
+
text
|
|
84
|
+
});
|
|
85
|
+
return true;
|
|
86
|
+
};
|
|
87
|
+
if (!space || !channel || !id) {
|
|
88
|
+
return null;
|
|
89
|
+
}
|
|
90
|
+
return /* @__PURE__ */ React.createElement(Panel.Root, {
|
|
91
|
+
role
|
|
92
|
+
}, canStartCall && /* @__PURE__ */ React.createElement(Menu.Root, {
|
|
93
|
+
...menuActions,
|
|
94
|
+
attendableId
|
|
95
|
+
}, /* @__PURE__ */ React.createElement(Panel.Toolbar, {
|
|
96
|
+
asChild: true
|
|
97
|
+
}, /* @__PURE__ */ React.createElement(Menu.Toolbar, null))), showCall ? /* @__PURE__ */ React.createElement(Panel.Content, null, /* @__PURE__ */ React.createElement(Surface.Surface, {
|
|
98
|
+
type: AppSurface.Article,
|
|
99
|
+
data: {
|
|
100
|
+
subject: {
|
|
101
|
+
roomId: id
|
|
102
|
+
},
|
|
103
|
+
attendableId
|
|
104
|
+
},
|
|
105
|
+
limit: 1
|
|
106
|
+
})) : /* @__PURE__ */ React.createElement(Panel.Content, {
|
|
107
|
+
asChild: true
|
|
108
|
+
}, /* @__PURE__ */ React.createElement(Chat, {
|
|
109
|
+
id,
|
|
110
|
+
classNames: "dx-document",
|
|
111
|
+
identity: identity ?? void 0,
|
|
112
|
+
members,
|
|
113
|
+
messages,
|
|
114
|
+
activity,
|
|
115
|
+
onSend: handleSend,
|
|
116
|
+
readOnly
|
|
117
|
+
})));
|
|
118
|
+
};
|
|
119
|
+
export {
|
|
120
|
+
ChannelArticle as default
|
|
121
|
+
};
|
|
122
|
+
//# sourceMappingURL=ChannelArticle-CTYSCRTR.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/containers/ChannelArticle/ChannelArticle.tsx"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { Atom, useAtomValue } from '@effect-atom/atom-react';\nimport React, { useCallback } from 'react';\n\nimport { Surface, useCapabilities, useOperationInvoker } from '@dxos/app-framework/ui';\nimport { AppSurface } from '@dxos/app-toolkit/ui';\nimport { Obj } from '@dxos/echo';\nimport { CallsCapabilities } from '@dxos/plugin-calls/types';\nimport { getSpace, useMembers } from '@dxos/react-client/echo';\nimport { useIdentity } from '@dxos/react-client/halo';\nimport { Panel } from '@dxos/react-ui';\nimport { Menu, MenuBuilder, useMenuBuilder } from '@dxos/react-ui-menu';\nimport { type Channel } from '@dxos/types';\n\nimport { Chat } from '#components';\nimport { useMessages, useStatus } from '#hooks';\nimport { meta } from '#meta';\nimport { ThreadCapabilities, ThreadOperation, resolveProvider } from '#types';\n\n// Stable fallbacks so `useAtomValue` always receives an atom when plugin-calls isn't present.\nconst NOT_JOINED = Atom.make(false);\nconst NO_ROOM = Atom.make<string | undefined>(undefined);\n\nexport type ChannelArticleProps = AppSurface.ObjectArticleProps<\n Channel.Channel | undefined,\n {\n roomId?: string;\n fullscreen?: boolean;\n /** Always render the chat, even while in this channel's call (used by the in-call chat companion). */\n chatOnly?: boolean;\n }\n>;\n\n/**\n * Channel article: renders the channel chat inside a document panel. Messages\n * are read and written through the channel's backend provider (resolved by\n * `channel.backend.kind`), so the container is agnostic to where messages are\n * stored. Read-only state defaults to the provider's policy, or to \"channel\n * carries foreign-key `Obj.Meta`\" when the provider has none. When plugin-calls is present, a\n * \"Start video call\" action switches the article to the call surface and the chat moves to a companion.\n */\nexport const ChannelArticle = ({ role, subject: channel, attendableId, chatOnly }: ChannelArticleProps) => {\n const identity = useIdentity();\n const space = channel ? getSpace(channel) : undefined;\n const members = useMembers(space?.id);\n const id = channel ? Obj.getURI(channel) : undefined;\n const activity = useStatus(space, id);\n const { invokePromise } = useOperationInvoker();\n\n const providers = useCapabilities(ThreadCapabilities.ChannelBackend);\n const provider = channel ? resolveProvider(providers, channel.backend.kind) : undefined;\n const messages = useMessages(channel);\n const readOnly = channel ? (provider?.readOnly?.(channel) ?? Obj.getMeta(channel).keys.length > 0) : false;\n\n const callProvider = useCapabilities(CallsCapabilities.CallTransportProvider)[0];\n const callManager = useCapabilities(CallsCapabilities.Manager)[0];\n const joined = useAtomValue(callManager?.joinedAtom ?? NOT_JOINED);\n const currentRoomId = useAtomValue(callManager?.roomIdAtom ?? NO_ROOM);\n // `chatOnly` (the in-call chat companion) keeps showing messages so the call lives only in the primary.\n const inThisCall = !!id && joined && currentRoomId === id;\n const showCall = inThisCall && !chatOnly;\n const canStartCall = !!callProvider && !inThisCall;\n\n const handleStartCall = useCallback(async () => {\n if (!callProvider || !id) {\n return;\n }\n await callProvider.join(id);\n }, [callProvider, id]);\n\n const menuActions = useMenuBuilder(() => {\n const builder = MenuBuilder.make().root({ label: ['channel-toolbar.title', { ns: meta.profile.key }] });\n if (canStartCall) {\n builder.action(\n 'start-video-call',\n { label: ['start-video-call.menu', { ns: meta.profile.key }], icon: 'ph--video-camera--regular' },\n () => {\n void handleStartCall();\n },\n );\n }\n return builder.build();\n }, [canStartCall, handleStartCall]);\n\n const handleSend = (text: string) => {\n if (!channel || !identity || readOnly) {\n return false;\n }\n\n void invokePromise(ThreadOperation.AppendChannelMessage, {\n channel,\n sender: { identityDid: identity.did },\n text,\n });\n\n return true;\n };\n\n if (!space || !channel || !id) {\n return null;\n }\n\n return (\n <Panel.Root role={role}>\n {canStartCall && (\n <Menu.Root {...menuActions} attendableId={attendableId}>\n <Panel.Toolbar asChild>\n <Menu.Toolbar />\n </Panel.Toolbar>\n </Menu.Root>\n )}\n {showCall ? (\n <Panel.Content>\n <Surface.Surface type={AppSurface.Article} data={{ subject: { roomId: id }, attendableId }} limit={1} />\n </Panel.Content>\n ) : (\n <Panel.Content asChild>\n <Chat\n id={id}\n classNames='dx-document'\n identity={identity ?? undefined}\n members={members}\n messages={messages}\n activity={activity}\n onSend={handleSend}\n readOnly={readOnly}\n />\n </Panel.Content>\n )}\n </Panel.Root>\n );\n};\n"],
|
|
5
|
+
"mappings": ";;;AAIA,SAASA,MAAMC,oBAAoB;AACnC,OAAOC,SAASC,mBAAmB;AAEnC,SAASC,SAASC,iBAAiBC,2BAA2B;AAC9D,SAASC,kBAAkB;AAC3B,SAASC,WAAW;AACpB,SAASC,yBAAyB;AAClC,SAASC,UAAUC,kBAAkB;AACrC,SAASC,mBAAmB;AAC5B,SAASC,aAAa;AACtB,SAASC,MAAMC,aAAaC,sBAAsB;AAGlD,SAASC,YAAY;AACrB,SAASC,aAAaC,iBAAiB;AACvC,SAASC,YAAY;AACrB,SAASC,oBAAoBC,iBAAiBC,uBAAuB;AAGrE,IAAMC,aAAaxB,KAAKyB,KAAK,KAAA;AAC7B,IAAMC,UAAU1B,KAAKyB,KAAyBE,MAAAA;AAoBvC,IAAMC,iBAAiB,CAAC,EAAEC,MAAMC,SAASC,SAASC,cAAcC,SAAQ,MAAuB;AACpG,QAAMC,WAAWtB,YAAAA;AACjB,QAAMuB,QAAQJ,UAAUrB,SAASqB,OAAAA,IAAWJ;AAC5C,QAAMS,UAAUzB,WAAWwB,OAAOE,EAAAA;AAClC,QAAMA,KAAKN,UAAUvB,IAAI8B,OAAOP,OAAAA,IAAWJ;AAC3C,QAAMY,WAAWpB,UAAUgB,OAAOE,EAAAA;AAClC,QAAM,EAAEG,cAAa,IAAKlC,oBAAAA;AAE1B,QAAMmC,YAAYpC,gBAAgBgB,mBAAmBqB,cAAc;AACnE,QAAMC,WAAWZ,UAAUR,gBAAgBkB,WAAWV,QAAQa,QAAQC,IAAI,IAAIlB;AAC9E,QAAMmB,WAAW5B,YAAYa,OAAAA;AAC7B,QAAMgB,WAAWhB,UAAWY,UAAUI,WAAWhB,OAAAA,KAAYvB,IAAIwC,QAAQjB,OAAAA,EAASkB,KAAKC,SAAS,IAAK;AAErG,QAAMC,eAAe9C,gBAAgBI,kBAAkB2C,qBAAqB,EAAE,CAAA;AAC9E,QAAMC,cAAchD,gBAAgBI,kBAAkB6C,OAAO,EAAE,CAAA;AAC/D,QAAMC,SAAStD,aAAaoD,aAAaG,cAAchC,UAAAA;AACvD,QAAMiC,gBAAgBxD,aAAaoD,aAAaK,cAAchC,OAAAA;AAE9D,QAAMiC,aAAa,CAAC,CAACtB,MAAMkB,UAAUE,kBAAkBpB;AACvD,QAAMuB,WAAWD,cAAc,CAAC1B;AAChC,QAAM4B,eAAe,CAAC,CAACV,gBAAgB,CAACQ;AAExC,QAAMG,kBAAkB3D,YAAY,YAAA;AAClC,QAAI,CAACgD,gBAAgB,CAACd,IAAI;AACxB;IACF;AACA,UAAMc,aAAaY,KAAK1B,EAAAA;EAC1B,GAAG;IAACc;IAAcd;GAAG;AAErB,QAAM2B,cAAchD,eAAe,MAAA;AACjC,UAAMiD,UAAUlD,YAAYU,KAAI,EAAGyC,KAAK;MAAEC,OAAO;QAAC;QAAyB;UAAEC,IAAIhD,KAAKiD,QAAQC;QAAI;;IAAG,CAAA;AACrG,QAAIT,cAAc;AAChBI,cAAQM,OACN,oBACA;QAAEJ,OAAO;UAAC;UAAyB;YAAEC,IAAIhD,KAAKiD,QAAQC;UAAI;;QAAIE,MAAM;MAA4B,GAChG,MAAA;AACE,aAAKV,gBAAAA;MACP,CAAA;IAEJ;AACA,WAAOG,QAAQQ,MAAK;EACtB,GAAG;IAACZ;IAAcC;GAAgB;AAElC,QAAMY,aAAa,CAACC,SAAAA;AAClB,QAAI,CAAC5C,WAAW,CAACG,YAAYa,UAAU;AACrC,aAAO;IACT;AAEA,SAAKP,cAAclB,gBAAgBsD,sBAAsB;MACvD7C;MACA8C,QAAQ;QAAEC,aAAa5C,SAAS6C;MAAI;MACpCJ;IACF,CAAA;AAEA,WAAO;EACT;AAEA,MAAI,CAACxC,SAAS,CAACJ,WAAW,CAACM,IAAI;AAC7B,WAAO;EACT;AAEA,SACE,sBAAA,cAACxB,MAAMmE,MAAI;IAACnD;KACTgC,gBACC,sBAAA,cAAC/C,KAAKkE,MAAI;IAAE,GAAGhB;IAAahC;KAC1B,sBAAA,cAACnB,MAAMoE,SAAO;IAACC,SAAAA;KACb,sBAAA,cAACpE,KAAKmE,SAAO,IAAA,CAAA,CAAA,GAIlBrB,WACC,sBAAA,cAAC/C,MAAMsE,SAAO,MACZ,sBAAA,cAAC/E,QAAQA,SAAO;IAACgF,MAAM7E,WAAW8E;IAASC,MAAM;MAAExD,SAAS;QAAEyD,QAAQlD;MAAG;MAAGL;IAAa;IAAGwD,OAAO;QAGrG,sBAAA,cAAC3E,MAAMsE,SAAO;IAACD,SAAAA;KACb,sBAAA,cAACjE,MAAAA;IACCoB;IACAoD,YAAW;IACXvD,UAAUA,YAAYP;IACtBS;IACAU;IACAP;IACAmD,QAAQhB;IACR3B;;AAMZ;",
|
|
6
|
+
"names": ["Atom", "useAtomValue", "React", "useCallback", "Surface", "useCapabilities", "useOperationInvoker", "AppSurface", "Obj", "CallsCapabilities", "getSpace", "useMembers", "useIdentity", "Panel", "Menu", "MenuBuilder", "useMenuBuilder", "Chat", "useMessages", "useStatus", "meta", "ThreadCapabilities", "ThreadOperation", "resolveProvider", "NOT_JOINED", "make", "NO_ROOM", "undefined", "ChannelArticle", "role", "subject", "channel", "attendableId", "chatOnly", "identity", "space", "members", "id", "getURI", "activity", "invokePromise", "providers", "ChannelBackend", "provider", "backend", "kind", "messages", "readOnly", "getMeta", "keys", "length", "callProvider", "CallTransportProvider", "callManager", "Manager", "joined", "joinedAtom", "currentRoomId", "roomIdAtom", "inThisCall", "showCall", "canStartCall", "handleStartCall", "join", "menuActions", "builder", "root", "label", "ns", "profile", "key", "action", "icon", "build", "handleSend", "text", "AppendChannelMessage", "sender", "identityDid", "did", "Root", "Toolbar", "asChild", "Content", "type", "Article", "data", "roomId", "limit", "classNames", "onSend"]
|
|
7
|
+
}
|
|
@@ -9,7 +9,7 @@ import { AppGraphBuilder, ChannelBackendFeed, CreateObject, NavigationResolver,
|
|
|
9
9
|
import { meta } from "#meta";
|
|
10
10
|
import { translations } from "#translations";
|
|
11
11
|
|
|
12
|
-
// raw-loader:/__w/dxos/dxos/packages/plugins/plugin-thread/PLUGIN.mdl
|
|
12
|
+
// raw-loader:/__w/dxos/dxos/packages/plugins/plugin-thread/PLUGIN.mdl
|
|
13
13
|
var PLUGIN_default = "---\nid: org.dxos.plugin.thread\nname: ThreadPlugin\nversion: 0.1.0\n---\n\nThreadPlugin provides chat: channels backed by an ECHO feed and free-standing message threads.\nIt renders the channel article + companion surfaces and a thread surface, and contributes the\noperations that create a channel and append messages. Shared message/thread UI comes from\n`@dxos/react-ui-thread`, and the `Channel`/`Message`/`Thread` schema comes from `@dxos/types`.\nDocument comments and the comment-thread AI agent live in `@dxos/plugin-comments`.\n\n## Extensions\n\nThe following extension dialects are used in this document.\n\n| Term | URI |\n|-------------|--------------------------------|\n| `type` | `org.dxos.mdl.type@1.0` |\n| `feat` | `org.dxos.mdl.feat@1.0` |\n| `op` | `org.dxos.mdl.op@1.0` |\n\n## Types\n\n```mdl\ntype Channel\n desc: |\n A chat channel. Defined in @dxos/types. Carries an optional `feed` Ref whose\n queue holds the channel's Message objects in order.\n```\n\n## Operations\n\n```mdl\nop OnCreateSpace\n key: org.dxos.plugin.thread.operation.onCreateSpace\n desc: On space creation, create a default \"General\" channel in the root collection.\n```\n\n```mdl\nop CreateChannel\n key: org.dxos.plugin.thread.operation.createChannel\n desc: Create a new Channel in the given space.\n in:\n spaceId: SpaceId\n name?: String\n out:\n object: Channel\n```\n\n```mdl\nop AppendChannelMessage\n key: org.dxos.plugin.thread.operation.appendChannelMessage\n desc: Append a Message authored by `sender` to the channel's feed.\n in:\n channel: Channel\n sender: Actor\n text: String\n```\n\n## Features\n\n```mdl\nfeat F-1: Channel chat\n req F-1.1: A Channel article MUST render its feed messages newest-last with a\n pinned composer; sending invokes AppendChannelMessage.\n req F-1.2: Externally-synced channels (those carrying foreign-key Obj.Meta) MUST\n render read-only \u2014 the composer is suppressed.\n```\n\n```mdl\nfeat F-2: Thread chat\n req F-2.1: A Thread article MUST render the thread's messages and append new\n messages by pushing onto `thread.messages`.\n```\n";
|
|
14
14
|
|
|
15
15
|
// src/ThreadPlugin.tsx
|
|
@@ -51,7 +51,7 @@ var ThreadPlugin = Plugin.define(meta).pipe(
|
|
|
51
51
|
}),
|
|
52
52
|
AppPlugin.addPluginAssetModule({
|
|
53
53
|
asset: {
|
|
54
|
-
pluginId: meta.
|
|
54
|
+
pluginId: meta.profile.key,
|
|
55
55
|
path: "PLUGIN.mdl",
|
|
56
56
|
content: PLUGIN_default,
|
|
57
57
|
mimeType: "application/x-mdl"
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../../src/ThreadPlugin.tsx", "raw-loader:/__w/dxos/dxos/packages/plugins/plugin-thread/PLUGIN.mdl
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { ActivationEvents, Plugin } from '@dxos/app-framework';\nimport { AppPlugin } from '@dxos/app-toolkit';\nimport { translations as threadTranslations } from '@dxos/react-ui-thread/translations';\nimport { Channel, Message, Thread } from '@dxos/types';\n\nimport {\n AppGraphBuilder,\n ChannelBackendFeed,\n CreateObject,\n NavigationResolver,\n OperationHandler,\n ReactSurface,\n} from '#capabilities';\nimport { meta } from '#meta';\nimport { translations } from '#translations';\n\n// eslint-disable-next-line import/no-relative-packages\nimport pluginSpec from '../PLUGIN.mdl?raw';\n\n// TODO(wittjosiah): Rename to ChatPlugin.\n\nexport const ThreadPlugin = Plugin.define(meta).pipe(\n AppPlugin.addAppGraphModule({ activate: AppGraphBuilder }),\n AppPlugin.addNavigationResolverModule({ activate: NavigationResolver }),\n AppPlugin.addCreateObjectModule({ activate: CreateObject }),\n AppPlugin.addOperationHandlerModule({ activate: OperationHandler }),\n AppPlugin.addSchemaModule({\n schema: [Channel.Channel, Message.Message, Thread.Thread],\n }),\n AppPlugin.addSurfaceModule({ activate: ReactSurface }),\n AppPlugin.addTranslationsModule({ translations: [...translations, ...threadTranslations] }),\n // Default local-feed channel backend. Other plugins contribute additional\n // `ChannelBackend` providers (e.g. ATProto) earlier in plugin order.\n Plugin.addModule({\n id: 'channel-backend-feed',\n activatesOn: ActivationEvents.Startup,\n activate: ChannelBackendFeed,\n }),\n AppPlugin.addPluginAssetModule({\n asset: { pluginId: meta.
|
|
5
|
-
"mappings": ";;;AAIA,SAASA,kBAAkBC,cAAc;AACzC,SAASC,iBAAiB;AAC1B,SAASC,gBAAgBC,0BAA0B;AACnD,SAASC,SAASC,SAASC,cAAc;AAEzC,SACEC,iBACAC,oBACAC,cACAC,oBACAC,kBACAC,oBACK;AACP,SAASC,YAAY;AACrB,SAASX,oBAAoB;;;AClB7B;;;ADyBO,IAAMY,eAAeC,OAAOC,OAAOC,IAAAA,EAAMC;EAC9CC,UAAUC,kBAAkB;IAAEC,UAAUC;EAAgB,CAAA;EACxDH,UAAUI,4BAA4B;IAAEF,UAAUG;EAAmB,CAAA;EACrEL,UAAUM,sBAAsB;IAAEJ,UAAUK;EAAa,CAAA;EACzDP,UAAUQ,0BAA0B;IAAEN,UAAUO;EAAiB,CAAA;EACjET,UAAUU,gBAAgB;IACxBC,QAAQ;MAACC,QAAQA;MAASC,QAAQA;MAASC,OAAOA;;EACpD,CAAA;EACAd,UAAUe,iBAAiB;IAAEb,UAAUc;EAAa,CAAA;EACpDhB,UAAUiB,sBAAsB;IAAEC,cAAc;SAAIA;SAAiBC;;EAAoB,CAAA;;;EAGzFvB,OAAOwB,UAAU;IACfC,IAAI;IACJC,aAAaC,iBAAiBC;IAC9BtB,UAAUuB;EACZ,CAAA;EACAzB,UAAU0B,qBAAqB;IAC7BC,OAAO;MAAEC,UAAU9B,
|
|
6
|
-
"names": ["ActivationEvents", "Plugin", "AppPlugin", "translations", "threadTranslations", "Channel", "Message", "Thread", "AppGraphBuilder", "ChannelBackendFeed", "CreateObject", "NavigationResolver", "OperationHandler", "ReactSurface", "meta", "ThreadPlugin", "Plugin", "define", "meta", "pipe", "AppPlugin", "addAppGraphModule", "activate", "AppGraphBuilder", "addNavigationResolverModule", "NavigationResolver", "addCreateObjectModule", "CreateObject", "addOperationHandlerModule", "OperationHandler", "addSchemaModule", "schema", "Channel", "Message", "Thread", "addSurfaceModule", "ReactSurface", "addTranslationsModule", "translations", "threadTranslations", "addModule", "id", "activatesOn", "ActivationEvents", "Startup", "ChannelBackendFeed", "addPluginAssetModule", "asset", "pluginId", "path", "content", "pluginSpec", "mimeType", "make"]
|
|
3
|
+
"sources": ["../../../src/ThreadPlugin.tsx", "raw-loader:/__w/dxos/dxos/packages/plugins/plugin-thread/PLUGIN.mdl"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { ActivationEvents, Plugin } from '@dxos/app-framework';\nimport { AppPlugin } from '@dxos/app-toolkit';\nimport { translations as threadTranslations } from '@dxos/react-ui-thread/translations';\nimport { Channel, Message, Thread } from '@dxos/types';\n\nimport {\n AppGraphBuilder,\n ChannelBackendFeed,\n CreateObject,\n NavigationResolver,\n OperationHandler,\n ReactSurface,\n} from '#capabilities';\nimport { meta } from '#meta';\nimport { translations } from '#translations';\n\n// eslint-disable-next-line import/no-relative-packages\nimport pluginSpec from '../PLUGIN.mdl?raw';\n\n// TODO(wittjosiah): Rename to ChatPlugin.\n\nexport const ThreadPlugin = Plugin.define(meta).pipe(\n AppPlugin.addAppGraphModule({ activate: AppGraphBuilder }),\n AppPlugin.addNavigationResolverModule({ activate: NavigationResolver }),\n AppPlugin.addCreateObjectModule({ activate: CreateObject }),\n AppPlugin.addOperationHandlerModule({ activate: OperationHandler }),\n AppPlugin.addSchemaModule({\n schema: [Channel.Channel, Message.Message, Thread.Thread],\n }),\n AppPlugin.addSurfaceModule({ activate: ReactSurface }),\n AppPlugin.addTranslationsModule({ translations: [...translations, ...threadTranslations] }),\n // Default local-feed channel backend. Other plugins contribute additional\n // `ChannelBackend` providers (e.g. ATProto) earlier in plugin order.\n Plugin.addModule({\n id: 'channel-backend-feed',\n activatesOn: ActivationEvents.Startup,\n activate: ChannelBackendFeed,\n }),\n AppPlugin.addPluginAssetModule({\n asset: { pluginId: meta.profile.key, path: 'PLUGIN.mdl', content: pluginSpec, mimeType: 'application/x-mdl' },\n }),\n Plugin.make,\n);\n\nexport default ThreadPlugin;\n", "---\nid: org.dxos.plugin.thread\nname: ThreadPlugin\nversion: 0.1.0\n---\n\nThreadPlugin provides chat: channels backed by an ECHO feed and free-standing message threads.\nIt renders the channel article + companion surfaces and a thread surface, and contributes the\noperations that create a channel and append messages. Shared message/thread UI comes from\n`@dxos/react-ui-thread`, and the `Channel`/`Message`/`Thread` schema comes from `@dxos/types`.\nDocument comments and the comment-thread AI agent live in `@dxos/plugin-comments`.\n\n## Extensions\n\nThe following extension dialects are used in this document.\n\n| Term | URI |\n|-------------|--------------------------------|\n| `type` | `org.dxos.mdl.type@1.0` |\n| `feat` | `org.dxos.mdl.feat@1.0` |\n| `op` | `org.dxos.mdl.op@1.0` |\n\n## Types\n\n```mdl\ntype Channel\n desc: |\n A chat channel. Defined in @dxos/types. Carries an optional `feed` Ref whose\n queue holds the channel's Message objects in order.\n```\n\n## Operations\n\n```mdl\nop OnCreateSpace\n key: org.dxos.plugin.thread.operation.onCreateSpace\n desc: On space creation, create a default \"General\" channel in the root collection.\n```\n\n```mdl\nop CreateChannel\n key: org.dxos.plugin.thread.operation.createChannel\n desc: Create a new Channel in the given space.\n in:\n spaceId: SpaceId\n name?: String\n out:\n object: Channel\n```\n\n```mdl\nop AppendChannelMessage\n key: org.dxos.plugin.thread.operation.appendChannelMessage\n desc: Append a Message authored by `sender` to the channel's feed.\n in:\n channel: Channel\n sender: Actor\n text: String\n```\n\n## Features\n\n```mdl\nfeat F-1: Channel chat\n req F-1.1: A Channel article MUST render its feed messages newest-last with a\n pinned composer; sending invokes AppendChannelMessage.\n req F-1.2: Externally-synced channels (those carrying foreign-key Obj.Meta) MUST\n render read-only \u2014 the composer is suppressed.\n```\n\n```mdl\nfeat F-2: Thread chat\n req F-2.1: A Thread article MUST render the thread's messages and append new\n messages by pushing onto `thread.messages`.\n```\n"],
|
|
5
|
+
"mappings": ";;;AAIA,SAASA,kBAAkBC,cAAc;AACzC,SAASC,iBAAiB;AAC1B,SAASC,gBAAgBC,0BAA0B;AACnD,SAASC,SAASC,SAASC,cAAc;AAEzC,SACEC,iBACAC,oBACAC,cACAC,oBACAC,kBACAC,oBACK;AACP,SAASC,YAAY;AACrB,SAASX,oBAAoB;;;AClB7B;;;ADyBO,IAAMY,eAAeC,OAAOC,OAAOC,IAAAA,EAAMC;EAC9CC,UAAUC,kBAAkB;IAAEC,UAAUC;EAAgB,CAAA;EACxDH,UAAUI,4BAA4B;IAAEF,UAAUG;EAAmB,CAAA;EACrEL,UAAUM,sBAAsB;IAAEJ,UAAUK;EAAa,CAAA;EACzDP,UAAUQ,0BAA0B;IAAEN,UAAUO;EAAiB,CAAA;EACjET,UAAUU,gBAAgB;IACxBC,QAAQ;MAACC,QAAQA;MAASC,QAAQA;MAASC,OAAOA;;EACpD,CAAA;EACAd,UAAUe,iBAAiB;IAAEb,UAAUc;EAAa,CAAA;EACpDhB,UAAUiB,sBAAsB;IAAEC,cAAc;SAAIA;SAAiBC;;EAAoB,CAAA;;;EAGzFvB,OAAOwB,UAAU;IACfC,IAAI;IACJC,aAAaC,iBAAiBC;IAC9BtB,UAAUuB;EACZ,CAAA;EACAzB,UAAU0B,qBAAqB;IAC7BC,OAAO;MAAEC,UAAU9B,KAAK+B,QAAQC;MAAKC,MAAM;MAAcC,SAASC;MAAYC,UAAU;IAAoB;EAC9G,CAAA;EACAtC,OAAOuC;AAAI;AAGb,IAAA,uBAAexC;",
|
|
6
|
+
"names": ["ActivationEvents", "Plugin", "AppPlugin", "translations", "threadTranslations", "Channel", "Message", "Thread", "AppGraphBuilder", "ChannelBackendFeed", "CreateObject", "NavigationResolver", "OperationHandler", "ReactSurface", "meta", "ThreadPlugin", "Plugin", "define", "meta", "pipe", "AppPlugin", "addAppGraphModule", "activate", "AppGraphBuilder", "addNavigationResolverModule", "NavigationResolver", "addCreateObjectModule", "CreateObject", "addOperationHandlerModule", "OperationHandler", "addSchemaModule", "schema", "Channel", "Message", "Thread", "addSurfaceModule", "ReactSurface", "addTranslationsModule", "translations", "threadTranslations", "addModule", "id", "activatesOn", "ActivationEvents", "Startup", "ChannelBackendFeed", "addPluginAssetModule", "asset", "pluginId", "profile", "key", "path", "content", "pluginSpec", "mimeType", "make"]
|
|
7
7
|
}
|
|
@@ -1,20 +1,55 @@
|
|
|
1
|
+
import {
|
|
2
|
+
getChannelsPath
|
|
3
|
+
} from "./chunk-DM2T6BH5.mjs";
|
|
1
4
|
import "./chunk-J5LGTIGS.mjs";
|
|
2
5
|
|
|
3
6
|
// src/capabilities/app-graph-builder.ts
|
|
4
7
|
import * as Effect from "effect/Effect";
|
|
5
8
|
import * as Option from "effect/Option";
|
|
6
9
|
import { Capability } from "@dxos/app-framework";
|
|
7
|
-
import { AppCapabilities,
|
|
10
|
+
import { AppCapabilities, AppNode, TypeSection } from "@dxos/app-toolkit";
|
|
8
11
|
import { isSpace } from "@dxos/client/echo";
|
|
9
12
|
import { Operation } from "@dxos/compute";
|
|
10
|
-
import { Type } from "@dxos/echo";
|
|
13
|
+
import { Obj, Type } from "@dxos/echo";
|
|
14
|
+
import { CallsCapabilities } from "@dxos/plugin-calls/types";
|
|
11
15
|
import { GraphBuilder, Node } from "@dxos/plugin-graph";
|
|
12
16
|
import { SpaceOperation } from "@dxos/plugin-space";
|
|
13
17
|
import { Channel } from "@dxos/types";
|
|
18
|
+
import { meta } from "#meta";
|
|
14
19
|
var channelTypename = Type.getTypename(Channel.Channel);
|
|
15
20
|
var app_graph_builder_default = Capability.makeModule(Effect.fnUntraced(function* () {
|
|
21
|
+
const capabilities = yield* Capability.Service;
|
|
16
22
|
const extensions = yield* Effect.all([
|
|
17
|
-
createTypeSectionExtension(Channel.Channel),
|
|
23
|
+
TypeSection.createTypeSectionExtension(Channel.Channel),
|
|
24
|
+
GraphBuilder.createTypeExtension({
|
|
25
|
+
id: "channelChatCompanion",
|
|
26
|
+
type: Channel.Channel,
|
|
27
|
+
connector: (channel, get) => {
|
|
28
|
+
const [callManager] = get(capabilities.atom(CallsCapabilities.Manager));
|
|
29
|
+
if (!callManager) {
|
|
30
|
+
return Effect.succeed([]);
|
|
31
|
+
}
|
|
32
|
+
const joined = get(callManager.joinedAtom);
|
|
33
|
+
const roomId = get(callManager.roomIdAtom);
|
|
34
|
+
if (!joined || roomId !== Obj.getURI(channel)) {
|
|
35
|
+
return Effect.succeed([]);
|
|
36
|
+
}
|
|
37
|
+
return Effect.succeed([
|
|
38
|
+
AppNode.makeCompanion({
|
|
39
|
+
id: "chat",
|
|
40
|
+
label: [
|
|
41
|
+
"channel-companion.label",
|
|
42
|
+
{
|
|
43
|
+
ns: meta.profile.key
|
|
44
|
+
}
|
|
45
|
+
],
|
|
46
|
+
icon: "ph--hash--regular",
|
|
47
|
+
data: "chat",
|
|
48
|
+
position: "first"
|
|
49
|
+
})
|
|
50
|
+
]);
|
|
51
|
+
}
|
|
52
|
+
}),
|
|
18
53
|
GraphBuilder.createExtension({
|
|
19
54
|
id: "channelsSectionActions",
|
|
20
55
|
match: (node) => {
|
|
@@ -26,7 +61,8 @@ var app_graph_builder_default = Capability.makeModule(Effect.fnUntraced(function
|
|
|
26
61
|
id: "create-channel",
|
|
27
62
|
data: () => Operation.invoke(SpaceOperation.OpenCreateObject, {
|
|
28
63
|
target: space.db,
|
|
29
|
-
typename: channelTypename
|
|
64
|
+
typename: channelTypename,
|
|
65
|
+
targetNodeId: getChannelsPath(space.db.spaceId)
|
|
30
66
|
}),
|
|
31
67
|
properties: {
|
|
32
68
|
label: [
|
|
@@ -47,4 +83,4 @@ var app_graph_builder_default = Capability.makeModule(Effect.fnUntraced(function
|
|
|
47
83
|
export {
|
|
48
84
|
app_graph_builder_default as default
|
|
49
85
|
};
|
|
50
|
-
//# sourceMappingURL=app-graph-builder-
|
|
86
|
+
//# sourceMappingURL=app-graph-builder-U4ZDM6GK.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 * as Effect from 'effect/Effect';\nimport * as Option from 'effect/Option';\n\nimport { Capability } from '@dxos/app-framework';\nimport { AppCapabilities, AppNode, TypeSection } from '@dxos/app-toolkit';\nimport { isSpace } from '@dxos/client/echo';\nimport { Operation } from '@dxos/compute';\nimport { Obj, Type } from '@dxos/echo';\nimport { CallsCapabilities } from '@dxos/plugin-calls/types';\nimport { GraphBuilder, Node } from '@dxos/plugin-graph';\nimport { SpaceOperation } from '@dxos/plugin-space';\nimport { Channel } from '@dxos/types';\n\nimport { meta } from '#meta';\n\nimport { getChannelsPath } from '../paths';\n\nconst channelTypename = Type.getTypename(Channel.Channel);\n\nexport default Capability.makeModule(\n Effect.fnUntraced(function* () {\n const capabilities = yield* Capability.Service;\n\n const extensions = yield* Effect.all([\n TypeSection.createTypeSectionExtension(Channel.Channel),\n\n GraphBuilder.createTypeExtension({\n id: 'channelChatCompanion',\n type: Channel.Channel,\n connector: (channel, get) => {\n const [callManager] = get(capabilities.atom(CallsCapabilities.Manager));\n if (!callManager) {\n return Effect.succeed([]);\n }\n const joined = get(callManager.joinedAtom);\n const roomId = get(callManager.roomIdAtom);\n if (!joined || roomId !== Obj.getURI(channel)) {\n return Effect.succeed([]);\n }\n\n return Effect.succeed([\n AppNode.makeCompanion({\n id: 'chat',\n label: ['channel-companion.label', { ns: meta.profile.key }],\n icon: 'ph--hash--regular',\n data: 'chat',\n position: 'first',\n }),\n ]);\n },\n }),\n\n GraphBuilder.createExtension({\n id: 'channelsSectionActions',\n match: (node) => {\n const space = isSpace(node.properties.space) ? node.properties.space : undefined;\n return node.type === channelTypename && space ? Option.some(space) : Option.none();\n },\n actions: (space) =>\n Effect.succeed([\n Node.makeAction({\n id: 'create-channel',\n data: () =>\n Operation.invoke(SpaceOperation.OpenCreateObject, {\n target: space.db,\n typename: channelTypename,\n targetNodeId: getChannelsPath(space.db.spaceId),\n }),\n properties: {\n label: ['add-object.label', { ns: channelTypename }],\n icon: 'ph--plus--regular',\n disposition: 'list-item-primary',\n },\n }),\n ]),\n }),\n ]);\n\n return Capability.contributes(AppCapabilities.AppGraphBuilder, extensions);\n }),\n);\n"],
|
|
5
|
+
"mappings": ";;;;;;AAIA,YAAYA,YAAY;AACxB,YAAYC,YAAY;AAExB,SAASC,kBAAkB;AAC3B,SAASC,iBAAiBC,SAASC,mBAAmB;AACtD,SAASC,eAAe;AACxB,SAASC,iBAAiB;AAC1B,SAASC,KAAKC,YAAY;AAC1B,SAASC,yBAAyB;AAClC,SAASC,cAAcC,YAAY;AACnC,SAASC,sBAAsB;AAC/B,SAASC,eAAe;AAExB,SAASC,YAAY;AAIrB,IAAMC,kBAAkBC,KAAKC,YAAYC,QAAQA,OAAO;AAExD,IAAA,4BAAeC,WAAWC,WACjBC,kBAAW,aAAA;AAChB,QAAMC,eAAe,OAAOH,WAAWI;AAEvC,QAAMC,aAAa,OAAcC,WAAI;IACnCC,YAAYC,2BAA2BT,QAAQA,OAAO;IAEtDU,aAAaC,oBAAoB;MAC/BC,IAAI;MACJC,MAAMb,QAAQA;MACdc,WAAW,CAACC,SAASC,QAAAA;AACnB,cAAM,CAACC,WAAAA,IAAeD,IAAIZ,aAAac,KAAKC,kBAAkBC,OAAO,CAAA;AACrE,YAAI,CAACH,aAAa;AAChB,iBAAcI,eAAQ,CAAA,CAAE;QAC1B;AACA,cAAMC,SAASN,IAAIC,YAAYM,UAAU;AACzC,cAAMC,SAASR,IAAIC,YAAYQ,UAAU;AACzC,YAAI,CAACH,UAAUE,WAAWE,IAAIC,OAAOZ,OAAAA,GAAU;AAC7C,iBAAcM,eAAQ,CAAA,CAAE;QAC1B;AAEA,eAAcA,eAAQ;UACpBO,QAAQC,cAAc;YACpBjB,IAAI;YACJkB,OAAO;cAAC;cAA2B;gBAAEC,IAAIC,KAAKC,QAAQC;cAAI;;YAC1DC,MAAM;YACNC,MAAM;YACNC,UAAU;UACZ,CAAA;SACD;MACH;IACF,CAAA;IAEA3B,aAAa4B,gBAAgB;MAC3B1B,IAAI;MACJ2B,OAAO,CAACC,SAAAA;AACN,cAAMC,QAAQC,QAAQF,KAAKG,WAAWF,KAAK,IAAID,KAAKG,WAAWF,QAAQG;AACvE,eAAOJ,KAAK3B,SAAShB,mBAAmB4C,QAAeI,YAAKJ,KAAAA,IAAgBK,YAAI;MAClF;MACAC,SAAS,CAACN,UACDpB,eAAQ;QACb2B,KAAKC,WAAW;UACdrC,IAAI;UACJwB,MAAM,MACJc,UAAUC,OAAOC,eAAeC,kBAAkB;YAChDC,QAAQb,MAAMc;YACdC,UAAU3D;YACV4D,cAAcC,gBAAgBjB,MAAMc,GAAGI,OAAO;UAChD,CAAA;UACFhB,YAAY;YACVb,OAAO;cAAC;cAAoB;gBAAEC,IAAIlC;cAAgB;;YAClDsC,MAAM;YACNyB,aAAa;UACf;QACF,CAAA;OACD;IACL,CAAA;GACD;AAED,SAAO3D,WAAW4D,YAAYC,gBAAgBC,iBAAiBzD,UAAAA;AACjE,CAAA,CAAA;",
|
|
6
|
+
"names": ["Effect", "Option", "Capability", "AppCapabilities", "AppNode", "TypeSection", "isSpace", "Operation", "Obj", "Type", "CallsCapabilities", "GraphBuilder", "Node", "SpaceOperation", "Channel", "meta", "channelTypename", "Type", "getTypename", "Channel", "Capability", "makeModule", "fnUntraced", "capabilities", "Service", "extensions", "all", "TypeSection", "createTypeSectionExtension", "GraphBuilder", "createTypeExtension", "id", "type", "connector", "channel", "get", "callManager", "atom", "CallsCapabilities", "Manager", "succeed", "joined", "joinedAtom", "roomId", "roomIdAtom", "Obj", "getURI", "AppNode", "makeCompanion", "label", "ns", "meta", "profile", "key", "icon", "data", "position", "createExtension", "match", "node", "space", "isSpace", "properties", "undefined", "some", "none", "actions", "Node", "makeAction", "Operation", "invoke", "SpaceOperation", "OpenCreateObject", "target", "db", "typename", "targetNodeId", "getChannelsPath", "spaceId", "disposition", "contributes", "AppCapabilities", "AppGraphBuilder"]
|
|
7
|
+
}
|
package/dist/lib/neutral/{append-channel-message-J6DXDPBH.mjs → append-channel-message-2OZYIIFL.mjs}
RENAMED
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
ThreadCapabilities_exports,
|
|
3
3
|
ThreadOperation_exports,
|
|
4
4
|
resolveProvider
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-UYINIL64.mjs";
|
|
6
6
|
import "./chunk-J5LGTIGS.mjs";
|
|
7
7
|
|
|
8
8
|
// src/operations/append-channel-message.ts
|
|
@@ -31,4 +31,4 @@ var append_channel_message_default = handler;
|
|
|
31
31
|
export {
|
|
32
32
|
append_channel_message_default as default
|
|
33
33
|
};
|
|
34
|
-
//# sourceMappingURL=append-channel-message-
|
|
34
|
+
//# sourceMappingURL=append-channel-message-2OZYIIFL.mjs.map
|
|
@@ -2,12 +2,12 @@ import "../chunk-J5LGTIGS.mjs";
|
|
|
2
2
|
|
|
3
3
|
// src/capabilities/index.ts
|
|
4
4
|
import { Capability } from "@dxos/app-framework";
|
|
5
|
-
var AppGraphBuilder = Capability.lazy("AppGraphBuilder", () => import("../app-graph-builder-
|
|
6
|
-
var NavigationResolver = Capability.lazy("NavigationResolver", () => import("../navigation-resolver-
|
|
7
|
-
var ChannelBackendFeed = Capability.lazy("ChannelBackendFeed", () => import("../channel-backend-feed-
|
|
8
|
-
var CreateObject = Capability.lazy("CreateObject", () => import("../create-object-
|
|
5
|
+
var AppGraphBuilder = Capability.lazy("AppGraphBuilder", () => import("../app-graph-builder-U4ZDM6GK.mjs"));
|
|
6
|
+
var NavigationResolver = Capability.lazy("NavigationResolver", () => import("../navigation-resolver-VNFRIC7W.mjs"));
|
|
7
|
+
var ChannelBackendFeed = Capability.lazy("ChannelBackendFeed", () => import("../channel-backend-feed-ALIPAEPT.mjs"));
|
|
8
|
+
var CreateObject = Capability.lazy("CreateObject", () => import("../create-object-LOZBRZAF.mjs"));
|
|
9
9
|
var OperationHandler = Capability.lazy("OperationHandler", () => import("../operation-handler-RU6K2S4L.mjs"));
|
|
10
|
-
var ReactSurface = Capability.lazy("ReactSurface", () => import("../react-surface-
|
|
10
|
+
var ReactSurface = Capability.lazy("ReactSurface", () => import("../react-surface-H2EKIMSK.mjs"));
|
|
11
11
|
export {
|
|
12
12
|
AppGraphBuilder,
|
|
13
13
|
ChannelBackendFeed,
|
package/dist/lib/neutral/{channel-backend-feed-FCXGAIEC.mjs → channel-backend-feed-ALIPAEPT.mjs}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ThreadCapabilities_exports
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-UYINIL64.mjs";
|
|
4
4
|
import "./chunk-J5LGTIGS.mjs";
|
|
5
5
|
|
|
6
6
|
// src/capabilities/channel-backend-feed.ts
|
|
@@ -42,7 +42,7 @@ var feedChannelBackend = {
|
|
|
42
42
|
invariant(feed, "Channel is not feed-backed", { "~LogMeta": "~LogMeta", F: __dxlog_file, L: 42, S: this, A: ["feed", "'Channel is not feed-backed'"] });
|
|
43
43
|
yield* Feed.append(feed, [
|
|
44
44
|
message
|
|
45
|
-
]).pipe(Effect.provide(createFeedServiceLayer(space.
|
|
45
|
+
]).pipe(Effect.provide(createFeedServiceLayer(space.db)));
|
|
46
46
|
}),
|
|
47
47
|
readOnly: (channel) => Obj.getMeta(channel).keys.length > 0
|
|
48
48
|
};
|
|
@@ -55,4 +55,4 @@ export {
|
|
|
55
55
|
channel_backend_feed_default as default,
|
|
56
56
|
feedChannelBackend
|
|
57
57
|
};
|
|
58
|
-
//# sourceMappingURL=channel-backend-feed-
|
|
58
|
+
//# sourceMappingURL=channel-backend-feed-ALIPAEPT.mjs.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/capabilities/channel-backend-feed.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2026 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\nimport * as Schema from 'effect/Schema';\n\nimport { Capability } from '@dxos/app-framework';\nimport { Feed, Filter, Obj, Query } from '@dxos/echo';\nimport { createFeedServiceLayer } from '@dxos/echo-client';\nimport { invariant } from '@dxos/invariant';\nimport { ClientCapabilities } from '@dxos/plugin-client';\nimport { Channel, Message } from '@dxos/types';\n\nimport { ThreadCapabilities } from '../types';\n\n/**\n * Default local ECHO-feed-backed channel provider. Stores messages in a `Feed`\n * (`makeConfig` → `Feed.make()`), reads them via a reactive database query, and\n * writes via `Feed.append`. This is the backend `Channel.make()` defaults to.\n */\nexport const feedChannelBackend: ThreadCapabilities.ChannelBackendProvider = {\n kind: Channel.FeedBackendKind,\n label: 'Feed',\n icon: 'ph--rows--regular',\n createFields: Schema.Struct({}),\n makeConfig: () => Feed.make(),\n subscribe: (channel, onMessages) => {\n const feed = Channel.getFeed(channel);\n const db = Obj.getDatabase(channel);\n if (!feed || !db) {\n onMessages([]);\n return () => {};\n }\n\n const result = db.query(Query.select(Filter.type(Message.Message)).from(feed));\n return result.subscribe(() => onMessages(result.results), { fire: true });\n },\n send: (channel, message) =>\n Effect.gen(function* () {\n const db = Obj.getDatabase(channel);\n invariant(db, 'Database not found');\n const client = yield* Capability.get(ClientCapabilities.Client);\n const space = client.spaces.get(db.spaceId);\n invariant(space, 'Space not found');\n const feed = Channel.getFeed(channel);\n invariant(feed, 'Channel is not feed-backed');\n yield* Feed.append(feed, [message]).pipe(Effect.provide(createFeedServiceLayer(space.
|
|
5
|
-
"mappings": ";;;;;;AAIA,YAAYA,YAAY;AACxB,YAAYC,YAAY;AAExB,SAASC,kBAAkB;AAC3B,SAASC,MAAMC,QAAQC,KAAKC,aAAa;AACzC,SAASC,8BAA8B;AACvC,SAASC,iBAAiB;AAC1B,SAASC,0BAA0B;AACnC,SAASC,SAASC,eAAe;AAIjC,IAAA,eAAA;AAOS,IAAA,qBAAA;EACPC,MAAM,QAAA;EACNC,OAAAA;EACAC,MAAAA;EACAC,cAAqBC,cAAAA,CAAAA,CAAAA;cACbC,MAAAA,KAAOC,KAAQC;aACfC,CAAAA,SAASC,eAAYC;AAC3B,UAAKL,OAAQ,QAAK,QAAA,OAAA;UAChBD,KAAAA,IAAW,YAAE,OAAA;QACb,CAAA,QAAO,CAAA,IAAO;AAChB,iBAAA,CAAA,CAAA;AAEA,aAAMO,MAASH;MAAAA;IACf;UAA4DI,SAAM,GAAA,MAAA,MAAA,OAAA,OAAA,KAAA,QAAA,OAAA,CAAA,EAAA,KAAA,IAAA,CAAA;AAAK,WAAA,OAAA,UAAA,MAAA,WAAA,OAAA,OAAA,GAAA;MACzE,MAAA;IACAC,CAAAA;;kBAGIC,YAAc,WAAA,aAAA;AACd,UAAMC,KAAAA,IAAS,YAAOC,OAAWC;AACjC,cAAMC,IAAQH,sBAAqBI,EAAAA,YAAO,YAAA,GAAA,cAAA,GAAA,IAAA,GAAA,MAAA,GAAA,CAAA,MAAA,sBAAA,EAAA,CAAA;AAC1CL,UAAAA,SAAUI,OAAO,WAAA,IAAA,mBAAA,MAAA;AACjB,UAAMb,QAAOC,OAAQC,OAAO,IAACG,GAAAA,OAAAA;AAC7BI,cAAUT,OAAM,mBAAA,EAAA,YAAA,YAAA,GAAA,cAAA,GAAA,IAAA,GAAA,MAAA,GAAA,CAAA,SAAA,mBAAA,EAAA,CAAA;AAChB,UAAA,OAAYe,QAAOf,QAAM,OAAA;cAACgB,MAAAA,8BAAAA,EAAAA,YAAAA,YAAAA,GAAAA,cAAAA,GAAAA,IAAAA,GAAAA,MAAAA,GAAAA,CAAAA,QAAAA,8BAAAA,EAAAA,CAAAA;WAAc,KAACC,OAAOC,MAAQC;MAC1D;IACFC,CAAAA,EAAWf,KAAYgB,eAAIC,uBAA4B,MAAG,
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2026 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\nimport * as Schema from 'effect/Schema';\n\nimport { Capability } from '@dxos/app-framework';\nimport { Feed, Filter, Obj, Query } from '@dxos/echo';\nimport { createFeedServiceLayer } from '@dxos/echo-client';\nimport { invariant } from '@dxos/invariant';\nimport { ClientCapabilities } from '@dxos/plugin-client';\nimport { Channel, Message } from '@dxos/types';\n\nimport { ThreadCapabilities } from '../types';\n\n/**\n * Default local ECHO-feed-backed channel provider. Stores messages in a `Feed`\n * (`makeConfig` → `Feed.make()`), reads them via a reactive database query, and\n * writes via `Feed.append`. This is the backend `Channel.make()` defaults to.\n */\nexport const feedChannelBackend: ThreadCapabilities.ChannelBackendProvider = {\n kind: Channel.FeedBackendKind,\n label: 'Feed',\n icon: 'ph--rows--regular',\n createFields: Schema.Struct({}),\n makeConfig: () => Feed.make(),\n subscribe: (channel, onMessages) => {\n const feed = Channel.getFeed(channel);\n const db = Obj.getDatabase(channel);\n if (!feed || !db) {\n onMessages([]);\n return () => {};\n }\n\n const result = db.query(Query.select(Filter.type(Message.Message)).from(feed));\n return result.subscribe(() => onMessages(result.results), { fire: true });\n },\n send: (channel, message) =>\n Effect.gen(function* () {\n const db = Obj.getDatabase(channel);\n invariant(db, 'Database not found');\n const client = yield* Capability.get(ClientCapabilities.Client);\n const space = client.spaces.get(db.spaceId);\n invariant(space, 'Space not found');\n const feed = Channel.getFeed(channel);\n invariant(feed, 'Channel is not feed-backed');\n yield* Feed.append(feed, [message]).pipe(Effect.provide(createFeedServiceLayer(space.db)));\n }),\n readOnly: (channel) => Obj.getMeta(channel).keys.length > 0,\n};\n\n/** Contributes the default feed-backed channel provider. */\nexport const ChannelBackendFeed = Capability.makeModule(\n Effect.fnUntraced(function* () {\n return Capability.contributes(ThreadCapabilities.ChannelBackend, feedChannelBackend);\n }),\n);\n\nexport default ChannelBackendFeed;\n"],
|
|
5
|
+
"mappings": ";;;;;;AAIA,YAAYA,YAAY;AACxB,YAAYC,YAAY;AAExB,SAASC,kBAAkB;AAC3B,SAASC,MAAMC,QAAQC,KAAKC,aAAa;AACzC,SAASC,8BAA8B;AACvC,SAASC,iBAAiB;AAC1B,SAASC,0BAA0B;AACnC,SAASC,SAASC,eAAe;AAIjC,IAAA,eAAA;AAOS,IAAA,qBAAA;EACPC,MAAM,QAAA;EACNC,OAAAA;EACAC,MAAAA;EACAC,cAAqBC,cAAAA,CAAAA,CAAAA;cACbC,MAAAA,KAAOC,KAAQC;aACfC,CAAAA,SAASC,eAAYC;AAC3B,UAAKL,OAAQ,QAAK,QAAA,OAAA;UAChBD,KAAAA,IAAW,YAAE,OAAA;QACb,CAAA,QAAO,CAAA,IAAO;AAChB,iBAAA,CAAA,CAAA;AAEA,aAAMO,MAASH;MAAAA;IACf;UAA4DI,SAAM,GAAA,MAAA,MAAA,OAAA,OAAA,KAAA,QAAA,OAAA,CAAA,EAAA,KAAA,IAAA,CAAA;AAAK,WAAA,OAAA,UAAA,MAAA,WAAA,OAAA,OAAA,GAAA;MACzE,MAAA;IACAC,CAAAA;;kBAGIC,YAAc,WAAA,aAAA;AACd,UAAMC,KAAAA,IAAS,YAAOC,OAAWC;AACjC,cAAMC,IAAQH,sBAAqBI,EAAAA,YAAO,YAAA,GAAA,cAAA,GAAA,IAAA,GAAA,MAAA,GAAA,CAAA,MAAA,sBAAA,EAAA,CAAA;AAC1CL,UAAAA,SAAUI,OAAO,WAAA,IAAA,mBAAA,MAAA;AACjB,UAAMb,QAAOC,OAAQC,OAAO,IAACG,GAAAA,OAAAA;AAC7BI,cAAUT,OAAM,mBAAA,EAAA,YAAA,YAAA,GAAA,cAAA,GAAA,IAAA,GAAA,MAAA,GAAA,CAAA,SAAA,mBAAA,EAAA,CAAA;AAChB,UAAA,OAAYe,QAAOf,QAAM,OAAA;cAACgB,MAAAA,8BAAAA,EAAAA,YAAAA,YAAAA,GAAAA,cAAAA,GAAAA,IAAAA,GAAAA,MAAAA,GAAAA,CAAAA,QAAAA,8BAAAA,EAAAA,CAAAA;WAAc,KAACC,OAAOC,MAAQC;MAC1D;IACFC,CAAAA,EAAWf,KAAYgB,eAAIC,uBAA4B,MAAG,EAAA,CAAA,CAAA;EAC1D,CAAA;EAEF,UAAA,CAAA,YAAA,IAAA,QAAA,OAAA,EAAA,KAAA,SAA0D;;AAKxD,IAAA,qBAAA,WAAA,WAAA,kBAAA,aAAA;AAEF,SAAA,WAAeC,YAAmB,2BAAA,gBAAA,kBAAA;;;",
|
|
6
6
|
"names": ["Effect", "Schema", "Capability", "Feed", "Filter", "Obj", "Query", "createFeedServiceLayer", "invariant", "ClientCapabilities", "Channel", "Message", "icon", "createFields", "makeConfig", "subscribe", "onMessages", "feed", "Channel", "getFeed", "db", "getDatabase", "channel", "result", "fire", "send", "invariant", "client", "Capability", "get", "space", "spaceId", "append", "message", "Effect", "provide", "createFeedServiceLayer", "readOnly", "Obj", "getMeta", "ChannelBackendFeed"]
|
|
7
7
|
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
// src/meta.ts
|
|
2
|
+
import { Plugin } from "@dxos/app-framework";
|
|
3
|
+
|
|
4
|
+
// dx.config.ts
|
|
5
|
+
import { Config2 } from "@dxos/app-framework/config";
|
|
6
|
+
import { trim } from "@dxos/util";
|
|
7
|
+
var dx_config_default = Config2.make({
|
|
8
|
+
plugin: {
|
|
9
|
+
key: "org.dxos.plugin.thread",
|
|
10
|
+
name: "Threads",
|
|
11
|
+
author: "DXOS",
|
|
12
|
+
description: trim`
|
|
13
|
+
ThreadPlugin provides chat: channels backed by an ECHO feed and free-standing
|
|
14
|
+
message threads. It renders the channel article and companion surfaces plus a
|
|
15
|
+
thread surface, and contributes the operations that create a default channel on
|
|
16
|
+
space creation, create new channels, and append messages.
|
|
17
|
+
|
|
18
|
+
Channel messages are stored in the channel's feed queue and rendered newest-last
|
|
19
|
+
with a pinned composer; externally-synced channels (carrying foreign-key
|
|
20
|
+
metadata, e.g. Slack/Discord-sourced rooms) render read-only because there is no
|
|
21
|
+
local-write path back to the source. Free-standing threads render their messages
|
|
22
|
+
and append by pushing onto the thread's message list.
|
|
23
|
+
|
|
24
|
+
The shared message and thread UI comes from @dxos/react-ui-thread; the Channel,
|
|
25
|
+
Message, and Thread schema come from @dxos/types. Document comments and the
|
|
26
|
+
comment-thread AI agent live in the @dxos/plugin-comments plugin.
|
|
27
|
+
`,
|
|
28
|
+
source: "https://github.com/dxos/dxos/tree/main/packages/plugins/plugin-thread",
|
|
29
|
+
icon: {
|
|
30
|
+
key: "ph--video-conference--regular",
|
|
31
|
+
hue: "rose"
|
|
32
|
+
},
|
|
33
|
+
spec: "PLUGIN.mdl"
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
// src/meta.ts
|
|
38
|
+
var meta = Plugin.getMetaFromConfig(dx_config_default);
|
|
39
|
+
var THREAD_ITEM = `${meta.profile.key}.item`;
|
|
40
|
+
|
|
41
|
+
export {
|
|
42
|
+
meta,
|
|
43
|
+
THREAD_ITEM
|
|
44
|
+
};
|
|
45
|
+
//# sourceMappingURL=chunk-A5JYVGL2.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/meta.ts", "../../../dx.config.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { Plugin } from '@dxos/app-framework';\n\nimport config from '../dx.config';\n\nexport const meta = Plugin.getMetaFromConfig(config);\n\nexport const THREAD_ITEM = `${meta.profile.key}.item`;\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { Config2 } from '@dxos/app-framework/config';\nimport { trim } from '@dxos/util';\n\nexport default Config2.make({\n plugin: {\n key: 'org.dxos.plugin.thread',\n name: 'Threads',\n author: 'DXOS',\n description: trim`\n ThreadPlugin provides chat: channels backed by an ECHO feed and free-standing\n message threads. It renders the channel article and companion surfaces plus a\n thread surface, and contributes the operations that create a default channel on\n space creation, create new channels, and append messages.\n\n Channel messages are stored in the channel's feed queue and rendered newest-last\n with a pinned composer; externally-synced channels (carrying foreign-key\n metadata, e.g. Slack/Discord-sourced rooms) render read-only because there is no\n local-write path back to the source. Free-standing threads render their messages\n and append by pushing onto the thread's message list.\n\n The shared message and thread UI comes from @dxos/react-ui-thread; the Channel,\n Message, and Thread schema come from @dxos/types. Document comments and the\n comment-thread AI agent live in the @dxos/plugin-comments plugin.\n `,\n source: 'https://github.com/dxos/dxos/tree/main/packages/plugins/plugin-thread',\n icon: { key: 'ph--video-conference--regular', hue: 'rose' },\n spec: 'PLUGIN.mdl',\n },\n});\n"],
|
|
5
|
+
"mappings": ";AAIA,SAASA,cAAc;;;ACAvB,SAASC,eAAe;AACxB,SAASC,YAAY;AAErB,IAAA,oBAAeD,QAAQE,KAAK;EAC1BC,QAAQ;IACNC,KAAK;IACLC,MAAM;IACNC,QAAQ;IACRC,aAAaN;;;;;;;;;;;;;;;;IAgBbO,QAAQ;IACRC,MAAM;MAAEL,KAAK;MAAiCM,KAAK;IAAO;IAC1DC,MAAM;EACR;AACF,CAAA;;;ADxBO,IAAMC,OAAOC,OAAOC,kBAAkBC,iBAAAA;AAEtC,IAAMC,cAAc,GAAGJ,KAAKK,QAAQC,GAAG;",
|
|
6
|
+
"names": ["Plugin", "Config2", "trim", "make", "plugin", "key", "name", "author", "description", "source", "icon", "hue", "spec", "meta", "Plugin", "getMetaFromConfig", "config", "THREAD_ITEM", "profile", "key"]
|
|
7
|
+
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
// src/paths.ts
|
|
2
|
-
import {
|
|
2
|
+
import { Paths } from "@dxos/app-toolkit";
|
|
3
3
|
import { Channel } from "@dxos/types";
|
|
4
|
-
var { getSectionPath: getChannelsPath, getObjectPath: getChannelPath } = createTypeSectionPaths(Channel.Channel);
|
|
4
|
+
var { getSectionPath: getChannelsPath, getObjectPath: getChannelPath } = Paths.createTypeSectionPaths(Channel.Channel);
|
|
5
5
|
|
|
6
6
|
export {
|
|
7
7
|
getChannelsPath,
|
|
8
8
|
getChannelPath
|
|
9
9
|
};
|
|
10
|
-
//# sourceMappingURL=chunk-
|
|
10
|
+
//# sourceMappingURL=chunk-DM2T6BH5.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/paths.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { Paths } from '@dxos/app-toolkit';\nimport { Channel } from '@dxos/types';\n\nconst { getSectionPath: getChannelsPath, getObjectPath: getChannelPath } = Paths.createTypeSectionPaths(\n Channel.Channel,\n);\n\nexport { getChannelsPath, getChannelPath };\n"],
|
|
5
|
+
"mappings": ";AAIA,SAASA,aAAa;AACtB,SAASC,eAAe;AAExB,IAAM,EAAEC,gBAAgBC,iBAAiBC,eAAeC,eAAc,IAAKL,MAAMM,uBAC/EL,QAAQA,OAAO;",
|
|
6
|
+
"names": ["Paths", "Channel", "getSectionPath", "getChannelsPath", "getObjectPath", "getChannelPath", "createTypeSectionPaths"]
|
|
7
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ThreadCapabilities_exports,
|
|
3
3
|
resolveProvider
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-UYINIL64.mjs";
|
|
5
5
|
|
|
6
6
|
// src/hooks/useMessages.ts
|
|
7
7
|
import { useCallback, useMemo, useRef, useSyncExternalStore } from "react";
|
|
@@ -66,4 +66,4 @@ export {
|
|
|
66
66
|
useMessages,
|
|
67
67
|
useStatus
|
|
68
68
|
};
|
|
69
|
-
//# sourceMappingURL=chunk-
|
|
69
|
+
//# sourceMappingURL=chunk-GQCMB5ZC.mjs.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
// src/operations/index.ts
|
|
2
2
|
import { OperationHandlerSet } from "@dxos/compute";
|
|
3
|
-
var ThreadOperationHandlerSet = OperationHandlerSet.lazy(() => import("./append-channel-message-
|
|
3
|
+
var ThreadOperationHandlerSet = OperationHandlerSet.lazy(() => import("./append-channel-message-2OZYIIFL.mjs"), () => import("./create-channel-Y6D7YGVX.mjs"));
|
|
4
4
|
|
|
5
5
|
export {
|
|
6
6
|
ThreadOperationHandlerSet
|
|
7
7
|
};
|
|
8
|
-
//# sourceMappingURL=chunk-
|
|
8
|
+
//# sourceMappingURL=chunk-KUO5HUCH.mjs.map
|
|
@@ -41,7 +41,7 @@ __export(ThreadCapabilities_exports, {
|
|
|
41
41
|
});
|
|
42
42
|
import { Capability } from "@dxos/app-framework";
|
|
43
43
|
import { meta } from "#meta";
|
|
44
|
-
var ChannelBackend = Capability.make(`${meta.
|
|
44
|
+
var ChannelBackend = Capability.make(`${meta.profile.key}.capability.channel-backend`);
|
|
45
45
|
|
|
46
46
|
// src/types/ThreadOperation.ts
|
|
47
47
|
var ThreadOperation_exports = {};
|
|
@@ -55,7 +55,7 @@ import { Operation } from "@dxos/compute";
|
|
|
55
55
|
import { Key, Type, DXN } from "@dxos/echo";
|
|
56
56
|
import { Actor, Channel } from "@dxos/types";
|
|
57
57
|
import { meta as meta2 } from "#meta";
|
|
58
|
-
var makeKey = (name) => DXN.make(`${meta2.
|
|
58
|
+
var makeKey = (name) => DXN.make(`${meta2.profile.key}.operation.${name}`);
|
|
59
59
|
var CreateChannel = Operation.make({
|
|
60
60
|
meta: {
|
|
61
61
|
key: makeKey("createChannel"),
|
|
@@ -86,7 +86,7 @@ var AppendChannelMessage = Operation.make({
|
|
|
86
86
|
name: "Append Channel Message",
|
|
87
87
|
icon: "ph--chat-text--regular"
|
|
88
88
|
},
|
|
89
|
-
// Note: Feed.FeedService is provided inside the handler from space.
|
|
89
|
+
// Note: Feed.FeedService is provided inside the handler from space.db, not at the
|
|
90
90
|
// operation level — the runtime can't fulfill it without a space context.
|
|
91
91
|
services: [
|
|
92
92
|
Capability2.Service
|
|
@@ -106,4 +106,4 @@ export {
|
|
|
106
106
|
ThreadCapabilities_exports,
|
|
107
107
|
ThreadOperation_exports
|
|
108
108
|
};
|
|
109
|
-
//# sourceMappingURL=chunk-
|
|
109
|
+
//# sourceMappingURL=chunk-UYINIL64.mjs.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/types/channel-backend.ts", "../../../src/types/ThreadCapabilities.ts", "../../../src/types/ThreadOperation.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2026 DXOS.org\n//\n\nimport * as Schema from 'effect/Schema';\nimport * as SchemaAST from 'effect/SchemaAST';\n\nimport * as ThreadCapabilities from './ThreadCapabilities';\n\n/** Finds the provider matching a `Channel.backend.kind`. */\nexport const resolveProvider = (\n providers: readonly ThreadCapabilities.ChannelBackendProvider[],\n kind: string,\n): ThreadCapabilities.ChannelBackendProvider | undefined => providers.find((provider) => provider.kind === kind);\n\n/** Throws if two providers share a `kind` (which would make resolution order-dependent). */\nexport const assertUniqueKinds = (providers: readonly ThreadCapabilities.ChannelBackendProvider[]): void => {\n const seen = new Set<string>();\n for (const provider of providers) {\n if (seen.has(provider.kind)) {\n throw new Error(`Duplicate channel backend kind: ${provider.kind}`);\n }\n seen.add(provider.kind);\n }\n};\n\n/**\n * Builds the create-channel form schema from the registered providers.\n *\n * With a single provider whose create-fields are empty the form is just a\n * `name` field (today's behaviour). With multiple providers (or extra fields)\n * it becomes `{ name?, backend: Union(<{ kind: Literal(p.kind) } & p.createFields>) }`,\n * which react-ui-form renders as a `kind` Select plus the selected branch's fields.\n */\nexport const buildChannelFormSchema = (\n providers: readonly ThreadCapabilities.ChannelBackendProvider[],\n): Schema.Schema.AnyNoContext => {\n assertUniqueKinds(providers);\n const needsSelector = providers.length > 1 || providers.some((provider) => fieldCount(provider.createFields) > 0);\n if (!needsSelector) {\n return Schema.Struct({ name: Schema.optional(Schema.String) });\n }\n\n const branches = providers.map((provider) =>\n Schema.extend(Schema.Struct({ kind: Schema.Literal(provider.kind) }), provider.createFields),\n );\n const backend = branches.length === 1 ? branches[0] : Schema.Union(...branches);\n return Schema.Struct({\n name: Schema.optional(Schema.String),\n backend,\n });\n};\n\nconst fieldCount = (schema: Schema.Schema.AnyNoContext): number => SchemaAST.getPropertySignatures(schema.ast).length;\n", "//\n// Copyright 2026 DXOS.org\n//\n\n// @import-as-namespace\n\nimport * as Effect from 'effect/Effect';\nimport type * as Schema from 'effect/Schema';\n\nimport { Capability } from '@dxos/app-framework';\nimport { type Obj } from '@dxos/echo';\nimport { type Channel, type Message } from '@dxos/types';\n\nimport { meta } from '#meta';\n\n/**\n * A pluggable message backend for a `Channel`. Providers are contributed by\n * plugins and resolved by `Channel.backend.kind`.\n */\nexport interface ChannelBackendProvider {\n /** Stable backend id; matches `Channel.backend.kind`. */\n kind: string;\n /** Human-readable label shown in the create-channel form. */\n label: string;\n /** Icon name (phosphor) for the create-channel form. */\n icon?: string;\n /**\n * Per-backend create-form inputs (a struct; excludes the `kind` discriminant\n * and the channel `name`, which the panel adds). Empty struct when the backend\n * needs no extra input (e.g. the local feed).\n */\n createFields: Schema.Schema.AnyNoContext;\n /** Builds the provider's config object from the collected create-form inputs. */\n makeConfig: (options: Record<string, unknown>) => Obj.Any;\n /**\n * Subscribes to the channel's messages. Invokes `onMessages` with the current\n * list immediately and on every change. Returns an unsubscribe function.\n */\n subscribe: (channel: Channel.Channel, onMessages: (messages: readonly Message.Message[]) => void) => () => void;\n /** Sends a message through the backend. */\n send: (channel: Channel.Channel, message: Message.Message) => Effect.Effect<void, Error, Capability.Service>;\n /** Whether the channel is read-only. Defaults to \"channel has foreign-key Obj.Meta\". */\n readOnly?: (channel: Channel.Channel) => boolean;\n}\n\n/** Registry of channel-message backends. Collect with `Capability.getAll`. */\nexport const ChannelBackend = Capability.make<ChannelBackendProvider>(`${meta.
|
|
5
|
-
"mappings": ";;;;;AAIA,YAAYA,YAAY;AACxB,YAAYC,eAAe;AAKpB,IAAMC,kBAAkB,CAC7BC,WACAC,SAC0DD,UAAUE,KAAK,CAACC,aAAaA,SAASF,SAASA,IAAAA;AAGpG,IAAMG,oBAAoB,CAACJ,cAAAA;AAChC,QAAMK,OAAO,oBAAIC,IAAAA;AACjB,aAAWH,YAAYH,WAAW;AAChC,QAAIK,KAAKE,IAAIJ,SAASF,IAAI,GAAG;AAC3B,YAAM,IAAIO,MAAM,mCAAmCL,SAASF,IAAI,EAAE;IACpE;AACAI,SAAKI,IAAIN,SAASF,IAAI;EACxB;AACF;AAUO,IAAMS,yBAAyB,CACpCV,cAAAA;AAEAI,oBAAkBJ,SAAAA;AAClB,QAAMW,gBAAgBX,UAAUY,SAAS,KAAKZ,UAAUa,KAAK,CAACV,aAAaW,WAAWX,SAASY,YAAY,IAAI,CAAA;AAC/G,MAAI,CAACJ,eAAe;AAClB,WAAcK,cAAO;MAAEC,MAAaC,gBAAgBC,aAAM;IAAE,CAAA;EAC9D;AAEA,QAAMC,WAAWpB,UAAUqB,IAAI,CAAClB,aACvBmB,cAAcN,cAAO;IAAEf,MAAasB,eAAQpB,SAASF,IAAI;EAAE,CAAA,GAAIE,SAASY,YAAY,CAAA;AAE7F,QAAMS,UAAUJ,SAASR,WAAW,IAAIQ,SAAS,CAAA,IAAYK,aAAK,GAAIL,QAAAA;AACtE,SAAcJ,cAAO;IACnBC,MAAaC,gBAAgBC,aAAM;IACnCK;EACF,CAAA;AACF;AAEA,IAAMV,aAAa,CAACY,WAAyDC,gCAAsBD,OAAOE,GAAG,EAAEhB;;;ACrD/G;;;;AASA,SAASiB,kBAAkB;AAI3B,SAASC,YAAY;AAiCd,IAAMC,iBAAiBF,WAAWG,KAA6B,GAAGF,KAAKG,
|
|
6
|
-
"names": ["Schema", "SchemaAST", "resolveProvider", "providers", "kind", "find", "provider", "assertUniqueKinds", "seen", "Set", "has", "Error", "add", "buildChannelFormSchema", "needsSelector", "length", "some", "fieldCount", "createFields", "Struct", "name", "optional", "String", "branches", "map", "extend", "Literal", "backend", "Union", "schema", "getPropertySignatures", "ast", "Capability", "meta", "ChannelBackend", "make", "
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2026 DXOS.org\n//\n\nimport * as Schema from 'effect/Schema';\nimport * as SchemaAST from 'effect/SchemaAST';\n\nimport * as ThreadCapabilities from './ThreadCapabilities';\n\n/** Finds the provider matching a `Channel.backend.kind`. */\nexport const resolveProvider = (\n providers: readonly ThreadCapabilities.ChannelBackendProvider[],\n kind: string,\n): ThreadCapabilities.ChannelBackendProvider | undefined => providers.find((provider) => provider.kind === kind);\n\n/** Throws if two providers share a `kind` (which would make resolution order-dependent). */\nexport const assertUniqueKinds = (providers: readonly ThreadCapabilities.ChannelBackendProvider[]): void => {\n const seen = new Set<string>();\n for (const provider of providers) {\n if (seen.has(provider.kind)) {\n throw new Error(`Duplicate channel backend kind: ${provider.kind}`);\n }\n seen.add(provider.kind);\n }\n};\n\n/**\n * Builds the create-channel form schema from the registered providers.\n *\n * With a single provider whose create-fields are empty the form is just a\n * `name` field (today's behaviour). With multiple providers (or extra fields)\n * it becomes `{ name?, backend: Union(<{ kind: Literal(p.kind) } & p.createFields>) }`,\n * which react-ui-form renders as a `kind` Select plus the selected branch's fields.\n */\nexport const buildChannelFormSchema = (\n providers: readonly ThreadCapabilities.ChannelBackendProvider[],\n): Schema.Schema.AnyNoContext => {\n assertUniqueKinds(providers);\n const needsSelector = providers.length > 1 || providers.some((provider) => fieldCount(provider.createFields) > 0);\n if (!needsSelector) {\n return Schema.Struct({ name: Schema.optional(Schema.String) });\n }\n\n const branches = providers.map((provider) =>\n Schema.extend(Schema.Struct({ kind: Schema.Literal(provider.kind) }), provider.createFields),\n );\n const backend = branches.length === 1 ? branches[0] : Schema.Union(...branches);\n return Schema.Struct({\n name: Schema.optional(Schema.String),\n backend,\n });\n};\n\nconst fieldCount = (schema: Schema.Schema.AnyNoContext): number => SchemaAST.getPropertySignatures(schema.ast).length;\n", "//\n// Copyright 2026 DXOS.org\n//\n\n// @import-as-namespace\n\nimport * as Effect from 'effect/Effect';\nimport type * as Schema from 'effect/Schema';\n\nimport { Capability } from '@dxos/app-framework';\nimport { type Obj } from '@dxos/echo';\nimport { type Channel, type Message } from '@dxos/types';\n\nimport { meta } from '#meta';\n\n/**\n * A pluggable message backend for a `Channel`. Providers are contributed by\n * plugins and resolved by `Channel.backend.kind`.\n */\nexport interface ChannelBackendProvider {\n /** Stable backend id; matches `Channel.backend.kind`. */\n kind: string;\n /** Human-readable label shown in the create-channel form. */\n label: string;\n /** Icon name (phosphor) for the create-channel form. */\n icon?: string;\n /**\n * Per-backend create-form inputs (a struct; excludes the `kind` discriminant\n * and the channel `name`, which the panel adds). Empty struct when the backend\n * needs no extra input (e.g. the local feed).\n */\n createFields: Schema.Schema.AnyNoContext;\n /** Builds the provider's config object from the collected create-form inputs. */\n makeConfig: (options: Record<string, unknown>) => Obj.Any;\n /**\n * Subscribes to the channel's messages. Invokes `onMessages` with the current\n * list immediately and on every change. Returns an unsubscribe function.\n */\n subscribe: (channel: Channel.Channel, onMessages: (messages: readonly Message.Message[]) => void) => () => void;\n /** Sends a message through the backend. */\n send: (channel: Channel.Channel, message: Message.Message) => Effect.Effect<void, Error, Capability.Service>;\n /** Whether the channel is read-only. Defaults to \"channel has foreign-key Obj.Meta\". */\n readOnly?: (channel: Channel.Channel) => boolean;\n}\n\n/** Registry of channel-message backends. Collect with `Capability.getAll`. */\nexport const ChannelBackend = Capability.make<ChannelBackendProvider>(`${meta.profile.key}.capability.channel-backend`);\n", "//\n// Copyright 2025 DXOS.org\n//\n\n// @import-as-namespace\n\nimport * as Schema from 'effect/Schema';\n\nimport { Capability } from '@dxos/app-framework';\nimport { Operation } from '@dxos/compute';\nimport { Key, Type, DXN } from '@dxos/echo';\nimport { Actor, Channel } from '@dxos/types';\n\nimport { meta } from '#meta';\n\nconst makeKey = (name: string) => DXN.make(`${meta.profile.key}.operation.${name}`);\n\nexport const CreateChannel = Operation.make({\n meta: { key: makeKey('createChannel'), name: 'Create Channel', icon: 'ph--hash--regular' },\n services: [Capability.Service],\n input: Schema.Struct({\n spaceId: Key.SpaceId,\n name: Schema.optional(Schema.String),\n /** Backend provider id; defaults to the local feed backend. */\n kind: Schema.optional(Schema.String),\n /** Per-backend create options passed to the provider's makeConfig. */\n options: Schema.optional(Schema.Record({ key: Schema.String, value: Schema.Any })),\n }),\n output: Schema.Struct({\n object: Type.getSchema(Channel.Channel),\n }),\n});\n\nexport const AppendChannelMessage = Operation.make({\n meta: {\n key: makeKey('appendChannelMessage'),\n name: 'Append Channel Message',\n icon: 'ph--chat-text--regular',\n },\n // Note: Feed.FeedService is provided inside the handler from space.db, not at the\n // operation level — the runtime can't fulfill it without a space context.\n services: [Capability.Service],\n input: Schema.Struct({\n channel: Type.getSchema(Channel.Channel),\n sender: Actor.Actor,\n text: Schema.String,\n }),\n output: Schema.Void,\n});\n"],
|
|
5
|
+
"mappings": ";;;;;AAIA,YAAYA,YAAY;AACxB,YAAYC,eAAe;AAKpB,IAAMC,kBAAkB,CAC7BC,WACAC,SAC0DD,UAAUE,KAAK,CAACC,aAAaA,SAASF,SAASA,IAAAA;AAGpG,IAAMG,oBAAoB,CAACJ,cAAAA;AAChC,QAAMK,OAAO,oBAAIC,IAAAA;AACjB,aAAWH,YAAYH,WAAW;AAChC,QAAIK,KAAKE,IAAIJ,SAASF,IAAI,GAAG;AAC3B,YAAM,IAAIO,MAAM,mCAAmCL,SAASF,IAAI,EAAE;IACpE;AACAI,SAAKI,IAAIN,SAASF,IAAI;EACxB;AACF;AAUO,IAAMS,yBAAyB,CACpCV,cAAAA;AAEAI,oBAAkBJ,SAAAA;AAClB,QAAMW,gBAAgBX,UAAUY,SAAS,KAAKZ,UAAUa,KAAK,CAACV,aAAaW,WAAWX,SAASY,YAAY,IAAI,CAAA;AAC/G,MAAI,CAACJ,eAAe;AAClB,WAAcK,cAAO;MAAEC,MAAaC,gBAAgBC,aAAM;IAAE,CAAA;EAC9D;AAEA,QAAMC,WAAWpB,UAAUqB,IAAI,CAAClB,aACvBmB,cAAcN,cAAO;IAAEf,MAAasB,eAAQpB,SAASF,IAAI;EAAE,CAAA,GAAIE,SAASY,YAAY,CAAA;AAE7F,QAAMS,UAAUJ,SAASR,WAAW,IAAIQ,SAAS,CAAA,IAAYK,aAAK,GAAIL,QAAAA;AACtE,SAAcJ,cAAO;IACnBC,MAAaC,gBAAgBC,aAAM;IACnCK;EACF,CAAA;AACF;AAEA,IAAMV,aAAa,CAACY,WAAyDC,gCAAsBD,OAAOE,GAAG,EAAEhB;;;ACrD/G;;;;AASA,SAASiB,kBAAkB;AAI3B,SAASC,YAAY;AAiCd,IAAMC,iBAAiBF,WAAWG,KAA6B,GAAGF,KAAKG,QAAQC,GAAG,6BAA6B;;;AC9CtH;;;;;AAMA,YAAYC,aAAY;AAExB,SAASC,cAAAA,mBAAkB;AAC3B,SAASC,iBAAiB;AAC1B,SAASC,KAAKC,MAAMC,WAAW;AAC/B,SAASC,OAAOC,eAAe;AAE/B,SAASC,QAAAA,aAAY;AAErB,IAAMC,UAAU,CAACC,SAAiBL,IAAIM,KAAK,GAAGH,MAAKI,QAAQC,GAAG,cAAcH,IAAAA,EAAM;AAE3E,IAAMI,gBAAgBZ,UAAUS,KAAK;EAC1CH,MAAM;IAAEK,KAAKJ,QAAQ,eAAA;IAAkBC,MAAM;IAAkBK,MAAM;EAAoB;EACzFC,UAAU;IAACf,YAAWgB;;EACtBC,OAAcC,eAAO;IACnBC,SAASjB,IAAIkB;IACbX,MAAaY,iBAAgBC,cAAM;;IAEnCC,MAAaF,iBAAgBC,cAAM;;IAEnCE,SAAgBH,iBAAgBI,eAAO;MAAEb,KAAYU;MAAQI,OAAcC;IAAI,CAAA,CAAA;EACjF,CAAA;EACAC,QAAeV,eAAO;IACpBW,QAAQ1B,KAAK2B,UAAUxB,QAAQA,OAAO;EACxC,CAAA;AACF,CAAA;AAEO,IAAMyB,uBAAuB9B,UAAUS,KAAK;EACjDH,MAAM;IACJK,KAAKJ,QAAQ,sBAAA;IACbC,MAAM;IACNK,MAAM;EACR;;;EAGAC,UAAU;IAACf,YAAWgB;;EACtBC,OAAcC,eAAO;IACnBc,SAAS7B,KAAK2B,UAAUxB,QAAQA,OAAO;IACvC2B,QAAQ5B,MAAMA;IACd6B,MAAaZ;EACf,CAAA;EACAM,QAAeO;AACjB,CAAA;",
|
|
6
|
+
"names": ["Schema", "SchemaAST", "resolveProvider", "providers", "kind", "find", "provider", "assertUniqueKinds", "seen", "Set", "has", "Error", "add", "buildChannelFormSchema", "needsSelector", "length", "some", "fieldCount", "createFields", "Struct", "name", "optional", "String", "branches", "map", "extend", "Literal", "backend", "Union", "schema", "getPropertySignatures", "ast", "Capability", "meta", "ChannelBackend", "make", "profile", "key", "Schema", "Capability", "Operation", "Key", "Type", "DXN", "Actor", "Channel", "meta", "makeKey", "name", "make", "profile", "key", "CreateChannel", "icon", "services", "Service", "input", "Struct", "spaceId", "SpaceId", "optional", "String", "kind", "options", "Record", "value", "Any", "output", "object", "getSchema", "AppendChannelMessage", "channel", "sender", "text", "Void"]
|
|
7
7
|
}
|
|
@@ -34,8 +34,8 @@ var getMessageMetadata = (id, identity, fallbackSender) => {
|
|
|
34
34
|
};
|
|
35
35
|
|
|
36
36
|
// src/components/Chat/Chat.tsx
|
|
37
|
-
var Chat = composable(({ id, identity, members, messages, activity, onSend, autoFocus, current, readOnly }, forwardedRef) => {
|
|
38
|
-
const { t } = useTranslation(meta.
|
|
37
|
+
var Chat = composable(({ id, identity, members, messages, activity, onSend, autoFocus, current, readOnly, classNames }, forwardedRef) => {
|
|
38
|
+
const { t } = useTranslation(meta.profile.key);
|
|
39
39
|
const components = useMemo(() => ({
|
|
40
40
|
Object: ObjectTile
|
|
41
41
|
}), []);
|
|
@@ -57,7 +57,10 @@ var Chat = composable(({ id, identity, members, messages, activity, onSend, auto
|
|
|
57
57
|
}, /* @__PURE__ */ React.createElement(Thread.Content, {
|
|
58
58
|
id,
|
|
59
59
|
current,
|
|
60
|
-
classNames:
|
|
60
|
+
classNames: [
|
|
61
|
+
"dx-container",
|
|
62
|
+
classNames
|
|
63
|
+
],
|
|
61
64
|
ref: forwardedRef
|
|
62
65
|
}, /* @__PURE__ */ React.createElement(Thread.Messages, {
|
|
63
66
|
messages
|
|
@@ -79,7 +82,7 @@ var ObjectTile = ({ subject }) => {
|
|
|
79
82
|
return /* @__PURE__ */ React.createElement(Card.Root, {
|
|
80
83
|
className: mx("grid col-span-3 py-1 pr-4", hoverableControls, hoverableFocusedWithinControls)
|
|
81
84
|
}, /* @__PURE__ */ React.createElement(Surface.Surface, {
|
|
82
|
-
type: AppSurface.
|
|
85
|
+
type: AppSurface.CardContent,
|
|
83
86
|
limit: 1,
|
|
84
87
|
data: {
|
|
85
88
|
subject
|