@dxos/plugin-thread 0.12.0-next-73daef452f1464b62efdbca75fb0067c1066f264 → 0.13.0
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/PLUGIN.mdl +122 -1
- package/dist/lib/ChannelBackend.mjs +46 -3
- package/dist/lib/ChannelBackend.mjs.map +1 -1
- package/dist/lib/ThreadCapabilities.mjs.map +1 -1
- package/dist/lib/ThreadOperation.mjs +101 -4
- package/dist/lib/ThreadOperation.mjs.map +1 -1
- package/dist/lib/ThreadOperationHandlerSet.mjs +19 -0
- package/dist/lib/ThreadOperationHandlerSet.mjs.map +1 -0
- package/dist/lib/capabilities.browser.mjs +36 -0
- package/dist/lib/capabilities.browser.mjs.map +1 -0
- package/dist/lib/capabilities.mjs +8 -5
- package/dist/lib/capabilities.mjs.map +1 -1
- package/dist/lib/capabilities.node.mjs +6 -1
- package/dist/lib/capabilities.node.mjs.map +1 -1
- package/dist/lib/capabilities.tauri.mjs +36 -0
- package/dist/lib/capabilities.tauri.mjs.map +1 -0
- package/dist/lib/capabilities.workerd.mjs +6 -1
- package/dist/lib/capabilities.workerd.mjs.map +1 -1
- package/dist/lib/chunk-ChannelArticle.mjs +16 -19
- package/dist/lib/chunk-ChannelArticle.mjs.map +1 -1
- package/dist/lib/chunk-ChannelCreatePanel.mjs +5 -4
- package/dist/lib/chunk-ChannelCreatePanel.mjs.map +1 -1
- package/dist/lib/chunk-PLUGIN.mjs +6 -0
- package/dist/lib/chunk-PLUGIN.mjs.map +1 -0
- package/dist/lib/chunk-ThreadArticle.mjs +13 -8
- package/dist/lib/chunk-ThreadArticle.mjs.map +1 -1
- package/dist/lib/chunk-app-graph-builder.mjs +7 -4
- package/dist/lib/chunk-app-graph-builder.mjs.map +1 -1
- package/dist/lib/chunk-append-channel-message.mjs +3 -14
- package/dist/lib/chunk-append-channel-message.mjs.map +1 -1
- package/dist/lib/chunk-channel-backend-feed.mjs +8 -18
- package/dist/lib/chunk-channel-backend-feed.mjs.map +1 -1
- package/dist/lib/chunk-connect-channel.mjs +14 -0
- package/dist/lib/chunk-connect-channel.mjs.map +1 -0
- package/dist/lib/chunk-create-channel.mjs +1 -1
- package/dist/lib/chunk-create-object.mjs +1 -1
- package/dist/lib/chunk-disconnect-channel.mjs +14 -0
- package/dist/lib/chunk-disconnect-channel.mjs.map +1 -0
- package/dist/lib/chunk-get-channel-status.mjs +14 -0
- package/dist/lib/chunk-get-channel-status.mjs.map +1 -0
- package/dist/lib/chunk-open-direct.mjs +15 -0
- package/dist/lib/chunk-open-direct.mjs.map +1 -0
- package/dist/lib/chunk-operation-handler.mjs +2 -2
- package/dist/lib/chunk-operation-handler.mjs.map +1 -1
- package/dist/lib/chunk-react-surface.mjs +2 -2
- package/dist/lib/chunk-react-surface.mjs.map +1 -1
- package/dist/lib/chunk-send-to-channel.mjs +28 -0
- package/dist/lib/chunk-send-to-channel.mjs.map +1 -0
- package/dist/lib/components.mjs +9 -7
- package/dist/lib/components.mjs.map +1 -1
- package/dist/lib/containers.mjs.map +1 -1
- package/dist/lib/hooks.mjs +4 -3
- package/dist/lib/hooks.mjs.map +1 -1
- package/dist/lib/index.mjs +2 -4
- package/dist/lib/meta.mjs +1 -0
- package/dist/lib/meta.mjs.map +1 -1
- package/dist/lib/operations.mjs +2 -9
- package/dist/lib/translations.mjs +1 -1
- package/dist/lib/translations.mjs.map +1 -1
- package/dist/types/src/capabilities/channel-backend-feed.d.ts.map +1 -1
- package/dist/types/src/capabilities/gen/browser.d.ts +10 -0
- package/dist/types/src/capabilities/gen/browser.d.ts.map +1 -0
- package/dist/types/src/capabilities/gen/node.d.ts.map +1 -1
- package/dist/types/src/capabilities/gen/tauri.d.ts +10 -0
- package/dist/types/src/capabilities/gen/tauri.d.ts.map +1 -0
- package/dist/types/src/capabilities/gen/workerd.d.ts.map +1 -1
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/components/MessageThread/MessageThread.d.ts +2 -2
- package/dist/types/src/components/MessageThread/MessageThread.d.ts.map +1 -1
- package/dist/types/src/components/MessageThread/index.d.ts +1 -1
- package/dist/types/src/components/MessageThread/index.d.ts.map +1 -1
- package/dist/types/src/components/index.d.ts +1 -1
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/containers/ChannelArticle/ChannelArticle.d.ts +1 -1
- 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/ChannelArticle/index.d.ts +1 -1
- package/dist/types/src/containers/ChannelArticle/index.d.ts.map +1 -1
- package/dist/types/src/containers/ChannelCreatePanel/ChannelCreatePanel.d.ts +1 -1
- package/dist/types/src/containers/ChannelCreatePanel/ChannelCreatePanel.d.ts.map +1 -1
- package/dist/types/src/containers/ChannelCreatePanel/index.d.ts +1 -1
- package/dist/types/src/containers/ChannelCreatePanel/index.d.ts.map +1 -1
- package/dist/types/src/containers/ThreadArticle/ThreadArticle.d.ts +2 -2
- package/dist/types/src/containers/ThreadArticle/ThreadArticle.d.ts.map +1 -1
- package/dist/types/src/containers/ThreadArticle/index.d.ts +1 -1
- package/dist/types/src/containers/ThreadArticle/index.d.ts.map +1 -1
- package/dist/types/src/containers/index.d.ts.map +1 -1
- package/dist/types/src/hooks/index.d.ts +2 -2
- package/dist/types/src/hooks/index.d.ts.map +1 -1
- package/dist/types/src/hooks/useStatus.d.ts.map +1 -1
- package/dist/types/src/index.d.ts +2 -4
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/operations/ThreadOperationHandlerSet.d.ts +3 -0
- package/dist/types/src/operations/ThreadOperationHandlerSet.d.ts.map +1 -0
- package/dist/types/src/operations/append-channel-message.d.ts.map +1 -1
- package/dist/types/src/operations/channel-operations.test.d.ts +2 -0
- package/dist/types/src/operations/channel-operations.test.d.ts.map +1 -0
- package/dist/types/src/operations/connect-channel.d.ts +5 -0
- package/dist/types/src/operations/connect-channel.d.ts.map +1 -0
- package/dist/types/src/operations/disconnect-channel.d.ts +5 -0
- package/dist/types/src/operations/disconnect-channel.d.ts.map +1 -0
- package/dist/types/src/operations/get-channel-status.d.ts +5 -0
- package/dist/types/src/operations/get-channel-status.d.ts.map +1 -0
- package/dist/types/src/operations/index.d.ts +1 -2
- package/dist/types/src/operations/index.d.ts.map +1 -1
- package/dist/types/src/operations/open-direct.d.ts +5 -0
- package/dist/types/src/operations/open-direct.d.ts.map +1 -0
- package/dist/types/src/operations/send-to-channel.d.ts +5 -0
- package/dist/types/src/operations/send-to-channel.d.ts.map +1 -0
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/ChannelBackend.d.ts +79 -1
- package/dist/types/src/types/ChannelBackend.d.ts.map +1 -1
- package/dist/types/src/types/ThreadCapabilities.d.ts +30 -4
- package/dist/types/src/types/ThreadCapabilities.d.ts.map +1 -1
- package/dist/types/src/types/ThreadOperation.d.ts +78 -2
- package/dist/types/src/types/ThreadOperation.d.ts.map +1 -1
- package/dist/types/src/types/index.d.ts +4 -4
- package/dist/types/src/types/index.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/dx.config.ts +3 -0
- package/package.json +53 -40
- package/src/capabilities/app-graph-builder.ts +3 -2
- package/src/capabilities/channel-backend-feed.ts +5 -10
- package/src/capabilities/gen/browser.ts +57 -0
- package/src/capabilities/gen/node.ts +5 -5
- package/src/capabilities/gen/tauri.ts +57 -0
- package/src/capabilities/gen/workerd.ts +5 -5
- package/src/capabilities/index.ts +8 -8
- package/src/capabilities/operation-handler.ts +1 -1
- package/src/capabilities/react-surface.ts +2 -2
- package/src/components/MessageThread/MessageThread.tsx +11 -14
- package/src/components/MessageThread/index.ts +1 -1
- package/src/components/index.ts +1 -1
- package/src/containers/ChannelArticle/ChannelArticle.stories.tsx +4 -4
- package/src/containers/ChannelArticle/ChannelArticle.tsx +17 -20
- package/src/containers/ChannelArticle/index.ts +1 -1
- package/src/containers/ChannelCreatePanel/ChannelCreatePanel.tsx +10 -5
- package/src/containers/ChannelCreatePanel/index.ts +1 -1
- package/src/containers/ThreadArticle/ThreadArticle.stories.tsx +7 -7
- package/src/containers/ThreadArticle/ThreadArticle.tsx +21 -12
- package/src/containers/ThreadArticle/index.ts +1 -1
- package/src/containers/index.ts +3 -3
- package/src/hooks/index.ts +2 -2
- package/src/hooks/useMessages.ts +2 -2
- package/src/hooks/useStatus.ts +4 -1
- package/src/index.ts +2 -4
- package/src/meta.ts +1 -1
- package/src/operations/ThreadOperationHandlerSet.ts +20 -0
- package/src/operations/append-channel-message.ts +2 -6
- package/src/operations/channel-operations.test.ts +185 -0
- package/src/operations/connect-channel.ts +23 -0
- package/src/operations/disconnect-channel.ts +23 -0
- package/src/operations/get-channel-status.ts +23 -0
- package/src/operations/index.ts +1 -9
- package/src/operations/open-direct.ts +32 -0
- package/src/operations/send-to-channel.ts +33 -0
- package/src/plugin.test.ts +3 -3
- package/src/translations.ts +2 -2
- package/src/types/ChannelBackend.test.ts +2 -2
- package/src/types/ChannelBackend.ts +66 -2
- package/src/types/ThreadCapabilities.ts +41 -4
- package/src/types/ThreadOperation.ts +114 -5
- package/src/types/index.ts +4 -4
- package/dist/lib/chunk-paths.mjs +0 -8
- package/dist/lib/chunk-paths.mjs.map +0 -1
- package/dist/lib/operations.mjs.map +0 -1
package/dx.config.ts
CHANGED
|
@@ -29,6 +29,9 @@ export default Config2.make({
|
|
|
29
29
|
source: 'https://github.com/dxos/dxos/tree/main/packages/plugins/plugin-thread',
|
|
30
30
|
icon: { key: 'ph--video-conference--regular', hue: 'rose' },
|
|
31
31
|
spec: 'PLUGIN.mdl',
|
|
32
|
+
screenshots: [
|
|
33
|
+
{ dark: 'https://pub-39066a86073446d7b77b1c157b660bb5.r2.dev/demos/2026-08-27-qa-flows/plugin-thread-QA-1.webm' },
|
|
34
|
+
],
|
|
32
35
|
tags: ['alpha'],
|
|
33
36
|
},
|
|
34
37
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dxos/plugin-thread",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.13.0",
|
|
4
4
|
"description": "DXOS Threads Surface plugin",
|
|
5
5
|
"homepage": "https://dxos.org",
|
|
6
6
|
"bugs": "https://github.com/dxos/dxos/issues",
|
|
@@ -10,19 +10,21 @@
|
|
|
10
10
|
},
|
|
11
11
|
"license": "FSL-1.1-Apache-2.0",
|
|
12
12
|
"author": "DXOS.org",
|
|
13
|
-
"sideEffects":
|
|
13
|
+
"sideEffects": false,
|
|
14
14
|
"type": "module",
|
|
15
15
|
"imports": {
|
|
16
16
|
"#capabilities": {
|
|
17
17
|
"source": {
|
|
18
18
|
"workerd": "./src/capabilities/gen/workerd.ts",
|
|
19
19
|
"node": "./src/capabilities/gen/node.ts",
|
|
20
|
-
"
|
|
20
|
+
"tauri": "./src/capabilities/gen/tauri.ts",
|
|
21
|
+
"browser": "./src/capabilities/gen/browser.ts"
|
|
21
22
|
},
|
|
22
23
|
"types": "./dist/types/src/capabilities/index.d.ts",
|
|
23
24
|
"workerd": "./dist/lib/capabilities.workerd.mjs",
|
|
24
25
|
"node": "./dist/lib/capabilities.node.mjs",
|
|
25
|
-
"
|
|
26
|
+
"tauri": "./dist/lib/capabilities.tauri.mjs",
|
|
27
|
+
"browser": "./dist/lib/capabilities.browser.mjs"
|
|
26
28
|
},
|
|
27
29
|
"#components": {
|
|
28
30
|
"source": "./src/components/index.ts",
|
|
@@ -78,6 +80,11 @@
|
|
|
78
80
|
"types": "./dist/types/src/translations.d.ts",
|
|
79
81
|
"import": "./dist/lib/translations.mjs"
|
|
80
82
|
},
|
|
83
|
+
"./ThreadOperationHandlerSet": {
|
|
84
|
+
"source": "./src/operations/ThreadOperationHandlerSet.ts",
|
|
85
|
+
"types": "./dist/types/src/operations/ThreadOperationHandlerSet.d.ts",
|
|
86
|
+
"import": "./dist/lib/ThreadOperationHandlerSet.mjs"
|
|
87
|
+
},
|
|
81
88
|
"./ChannelBackend": {
|
|
82
89
|
"source": "./src/types/ChannelBackend.ts",
|
|
83
90
|
"types": "./dist/types/src/types/ChannelBackend.d.ts",
|
|
@@ -118,6 +125,9 @@
|
|
|
118
125
|
],
|
|
119
126
|
"ThreadOperation": [
|
|
120
127
|
"dist/types/src/types/ThreadOperation.d.ts"
|
|
128
|
+
],
|
|
129
|
+
"ThreadOperationHandlerSet": [
|
|
130
|
+
"dist/types/src/operations/ThreadOperationHandlerSet.d.ts"
|
|
121
131
|
]
|
|
122
132
|
}
|
|
123
133
|
},
|
|
@@ -128,52 +138,55 @@
|
|
|
128
138
|
"PLUGIN.mdl"
|
|
129
139
|
],
|
|
130
140
|
"dependencies": {
|
|
131
|
-
"@effect/atom-react": "4.0.0
|
|
132
|
-
"@dxos/app-framework": "0.
|
|
133
|
-
"@dxos/app-graph": "0.
|
|
134
|
-
"@dxos/app-toolkit": "0.
|
|
135
|
-
"@dxos/compute": "0.
|
|
136
|
-
"@dxos/display-name": "0.
|
|
137
|
-
"@dxos/echo": "0.
|
|
138
|
-
"@dxos/
|
|
139
|
-
"@dxos/halo": "0.
|
|
140
|
-
"@dxos/halo-react": "0.
|
|
141
|
-
"@dxos/invariant": "0.
|
|
142
|
-
"@dxos/log": "0.
|
|
143
|
-
"@dxos/
|
|
144
|
-
"@dxos/plugin-
|
|
145
|
-
"@dxos/plugin-space": "0.
|
|
146
|
-
"@dxos/react-client": "0.
|
|
147
|
-
"@dxos/react-ui-thread": "0.
|
|
148
|
-
"@dxos/types": "0.
|
|
149
|
-
"@dxos/
|
|
141
|
+
"@effect/atom-react": "4.0.0",
|
|
142
|
+
"@dxos/app-framework": "0.13.0",
|
|
143
|
+
"@dxos/app-graph": "0.13.0",
|
|
144
|
+
"@dxos/app-toolkit": "0.13.0",
|
|
145
|
+
"@dxos/compute": "0.13.0",
|
|
146
|
+
"@dxos/display-name": "0.13.0",
|
|
147
|
+
"@dxos/echo": "0.13.0",
|
|
148
|
+
"@dxos/errors": "0.13.0",
|
|
149
|
+
"@dxos/halo": "0.13.0",
|
|
150
|
+
"@dxos/halo-react": "0.13.0",
|
|
151
|
+
"@dxos/invariant": "0.13.0",
|
|
152
|
+
"@dxos/log": "0.13.0",
|
|
153
|
+
"@dxos/effect": "0.13.0",
|
|
154
|
+
"@dxos/plugin-calls": "0.13.0",
|
|
155
|
+
"@dxos/plugin-space": "0.13.0",
|
|
156
|
+
"@dxos/react-client": "0.13.0",
|
|
157
|
+
"@dxos/react-ui-thread": "0.13.0",
|
|
158
|
+
"@dxos/types": "0.13.0",
|
|
159
|
+
"@dxos/protocols": "0.13.0",
|
|
160
|
+
"@dxos/util": "0.13.0"
|
|
150
161
|
},
|
|
151
162
|
"devDependencies": {
|
|
152
|
-
"@storybook/react-vite": "^10.
|
|
163
|
+
"@storybook/react-vite": "^10.6.0",
|
|
153
164
|
"@types/react": "~19.2.17",
|
|
154
165
|
"@types/react-dom": "~19.2.3",
|
|
155
|
-
"effect": "4.0.0
|
|
166
|
+
"effect": "4.0.0",
|
|
156
167
|
"react": "~19.2.7",
|
|
157
168
|
"react-dom": "~19.2.7",
|
|
158
|
-
"vite": "^8.2.
|
|
159
|
-
"@dxos/echo-
|
|
160
|
-
"@dxos/
|
|
161
|
-
"@dxos/
|
|
162
|
-
"@dxos/
|
|
163
|
-
"@dxos/
|
|
164
|
-
"@dxos/react-ui-
|
|
165
|
-
"@dxos/react-ui-
|
|
166
|
-
"@dxos/ui-
|
|
169
|
+
"vite": "^8.2.2",
|
|
170
|
+
"@dxos/echo-client": "0.13.0",
|
|
171
|
+
"@dxos/echo-react": "0.13.0",
|
|
172
|
+
"@dxos/plugin-client": "0.13.0",
|
|
173
|
+
"@dxos/plugin-testing": "0.13.0",
|
|
174
|
+
"@dxos/random": "0.13.0",
|
|
175
|
+
"@dxos/react-ui-form": "0.13.0",
|
|
176
|
+
"@dxos/react-ui-menu": "0.13.0",
|
|
177
|
+
"@dxos/react-ui-mosaic": "0.13.0",
|
|
178
|
+
"@dxos/ui-theme": "0.13.0",
|
|
179
|
+
"@dxos/react-ui": "0.13.0"
|
|
167
180
|
},
|
|
168
181
|
"peerDependencies": {
|
|
169
|
-
"@effect/atom-react": "4.0.0
|
|
170
|
-
"effect": "4.0.0
|
|
182
|
+
"@effect/atom-react": "4.0.0",
|
|
183
|
+
"effect": "4.0.0",
|
|
171
184
|
"react": "~19.2.7",
|
|
172
185
|
"react-dom": "~19.2.7",
|
|
173
|
-
"@dxos/react-ui": "^0.
|
|
174
|
-
"@dxos/react-ui-form": "^0.
|
|
175
|
-
"@dxos/react-ui-menu": "^0.
|
|
176
|
-
"@dxos/ui-theme": "^0.
|
|
186
|
+
"@dxos/react-ui": "^0.13.0",
|
|
187
|
+
"@dxos/react-ui-form": "^0.13.0",
|
|
188
|
+
"@dxos/react-ui-menu": "^0.13.0",
|
|
189
|
+
"@dxos/ui-theme": "^0.13.0"
|
|
177
190
|
},
|
|
178
191
|
"publishConfig": {
|
|
179
192
|
"access": "public"
|
|
@@ -16,11 +16,11 @@ import { Obj, Type } from '@dxos/echo';
|
|
|
16
16
|
import * as CallsCapabilities from '@dxos/plugin-calls/CallsCapabilities';
|
|
17
17
|
import * as SpaceOperation from '@dxos/plugin-space/SpaceOperation';
|
|
18
18
|
import { Channel } from '@dxos/types';
|
|
19
|
-
import
|
|
19
|
+
import * as Position from '@dxos/util/Position';
|
|
20
20
|
|
|
21
21
|
import { meta } from '#meta';
|
|
22
22
|
|
|
23
|
-
import { getChannelsPath } from '../paths';
|
|
23
|
+
import { getChannelsPath } from '../paths.ts';
|
|
24
24
|
|
|
25
25
|
const channelTypename = Type.getTypename(Channel.Channel);
|
|
26
26
|
|
|
@@ -45,6 +45,7 @@ export default Capability.makeModule(
|
|
|
45
45
|
|
|
46
46
|
AppGraphBuilder.createTypeExtension({
|
|
47
47
|
id: 'channelChatCompanion',
|
|
48
|
+
relation: AppNode.companion,
|
|
48
49
|
type: Channel.Channel,
|
|
49
50
|
connector: (channel, get) => {
|
|
50
51
|
const [callManager] = get(callManagerAtom);
|
|
@@ -6,12 +6,11 @@ import * as Effect from 'effect/Effect';
|
|
|
6
6
|
import * as Schema from 'effect/Schema';
|
|
7
7
|
|
|
8
8
|
import * as Capability from '@dxos/app-framework/Capability';
|
|
9
|
-
import { Database, Feed,
|
|
9
|
+
import { Database, Feed, Obj } from '@dxos/echo';
|
|
10
10
|
import { invariant } from '@dxos/invariant';
|
|
11
|
-
import
|
|
12
|
-
import { Channel, Message } from '@dxos/types';
|
|
11
|
+
import { Channel } from '@dxos/types';
|
|
13
12
|
|
|
14
|
-
import { ThreadCapabilities } from '#types';
|
|
13
|
+
import { ChannelBackend, ThreadCapabilities } from '#types';
|
|
15
14
|
|
|
16
15
|
/**
|
|
17
16
|
* Default local ECHO-feed-backed channel provider. Stores messages in a `Feed`
|
|
@@ -32,19 +31,15 @@ export const feedChannelBackend: ThreadCapabilities.ChannelBackendProvider = {
|
|
|
32
31
|
return () => {};
|
|
33
32
|
}
|
|
34
33
|
|
|
35
|
-
|
|
36
|
-
return result.subscribe(() => onMessages(result.results), { fire: true });
|
|
34
|
+
return ChannelBackend.subscribeFeed(db, feed, onMessages);
|
|
37
35
|
},
|
|
38
36
|
send: (channel, message) =>
|
|
39
37
|
Effect.gen(function* () {
|
|
40
38
|
const db = Obj.getDatabase(channel);
|
|
41
39
|
invariant(db, 'Database not found');
|
|
42
|
-
const client = yield* Capability.get(ClientCapabilities.Client);
|
|
43
|
-
const space = client.spaces.get(db.spaceId);
|
|
44
|
-
invariant(space, 'Space not found');
|
|
45
40
|
const feed = Channel.getFeed(channel);
|
|
46
41
|
invariant(feed, 'Channel is not feed-backed');
|
|
47
|
-
yield* Feed.append(feed, [message]).pipe(Effect.provide(Database.layer(
|
|
42
|
+
yield* Feed.append(feed, [message]).pipe(Effect.provide(Database.layer(db)));
|
|
48
43
|
}),
|
|
49
44
|
readOnly: (channel) => Obj.getMeta(channel).keys.length > 0,
|
|
50
45
|
};
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2026 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
// GENERATED by dx-plugin — do not edit. Sliced from ../index.ts for the 'browser' condition.
|
|
6
|
+
|
|
7
|
+
import * as ActivationEvents from '@dxos/app-framework/ActivationEvents';
|
|
8
|
+
import * as Capability from '@dxos/app-framework/Capability';
|
|
9
|
+
import * as AppCapability from '@dxos/app-toolkit/AppCapability';
|
|
10
|
+
import * as SpaceCapability from '@dxos/plugin-space/SpaceCapability';
|
|
11
|
+
import { translations as threadTranslations } from '@dxos/react-ui-thread/translations';
|
|
12
|
+
|
|
13
|
+
import { meta } from '#meta';
|
|
14
|
+
import { translations } from '#translations';
|
|
15
|
+
import { ThreadCapabilities, ThreadEvents } from '#types';
|
|
16
|
+
|
|
17
|
+
import pluginSpec from '../../../PLUGIN.mdl?raw';
|
|
18
|
+
|
|
19
|
+
// The graph builder reads the call manager OPTIONALLY (reactive atom with an absence guard),
|
|
20
|
+
// so no spec-level require: a hard cross-plugin require would fail this plugin whenever
|
|
21
|
+
// plugin-calls is disabled. Cross-feature requires are only valid with a plugin-level dependsOn.
|
|
22
|
+
export const AppGraphBuilder = AppCapability.appGraphBuilder(() => import('../app-graph-builder.ts'));
|
|
23
|
+
|
|
24
|
+
export const ChannelBackendFeed = Capability.lazyModule(
|
|
25
|
+
'ChannelBackendFeed',
|
|
26
|
+
{
|
|
27
|
+
provides: [ThreadCapabilities.ChannelBackend],
|
|
28
|
+
activatesOn: ThreadEvents.Start,
|
|
29
|
+
environments: ['browser', 'node', 'tauri', 'workerd'],
|
|
30
|
+
},
|
|
31
|
+
() => import('../channel-backend-feed.ts'),
|
|
32
|
+
);
|
|
33
|
+
|
|
34
|
+
// `CreateObjectEntry` carries a `customPanel` React component alongside the object factory, so it
|
|
35
|
+
// cannot load without React — browser only.
|
|
36
|
+
export const CreateObject = SpaceCapability.createObject(() => import('../create-object.ts'), {
|
|
37
|
+
environments: ['browser', 'tauri'],
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
export const OperationHandler = AppCapability.operationHandler(() => import('../operation-handler.ts'), {
|
|
41
|
+
activatesOn: ActivationEvents.Idle,
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
export const ReactSurface = AppCapability.surface(() => import('../react-surface.ts'), {
|
|
45
|
+
roles: ['org.dxos.role.article'],
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
export const Schema = AppCapability.schema(() => import('../schema.ts'));
|
|
49
|
+
|
|
50
|
+
export const Translations = AppCapability.translations([...translations, ...threadTranslations]);
|
|
51
|
+
|
|
52
|
+
export const PluginAsset = AppCapability.pluginAsset({
|
|
53
|
+
pluginId: meta.profile.key,
|
|
54
|
+
path: 'PLUGIN.mdl',
|
|
55
|
+
content: pluginSpec,
|
|
56
|
+
mimeType: 'application/x-mdl',
|
|
57
|
+
});
|
|
@@ -15,23 +15,23 @@ import { ThreadCapabilities, ThreadEvents } from '#types';
|
|
|
15
15
|
// The graph builder reads the call manager OPTIONALLY (reactive atom with an absence guard),
|
|
16
16
|
// so no spec-level require: a hard cross-plugin require would fail this plugin whenever
|
|
17
17
|
// plugin-calls is disabled. Cross-feature requires are only valid with a plugin-level dependsOn.
|
|
18
|
-
export const AppGraphBuilder = AppCapability.appGraphBuilder(() => import('../app-graph-builder'));
|
|
18
|
+
export const AppGraphBuilder = AppCapability.appGraphBuilder(() => import('../app-graph-builder.ts'));
|
|
19
19
|
|
|
20
20
|
export const ChannelBackendFeed = Capability.lazyModule(
|
|
21
21
|
'ChannelBackendFeed',
|
|
22
22
|
{
|
|
23
23
|
provides: [ThreadCapabilities.ChannelBackend],
|
|
24
24
|
activatesOn: ThreadEvents.Start,
|
|
25
|
-
environments: ['node', 'workerd'],
|
|
25
|
+
environments: ['browser', 'node', 'tauri', 'workerd'],
|
|
26
26
|
},
|
|
27
|
-
() => import('../channel-backend-feed'),
|
|
27
|
+
() => import('../channel-backend-feed.ts'),
|
|
28
28
|
);
|
|
29
29
|
|
|
30
|
-
export const OperationHandler = AppCapability.operationHandler(() => import('../operation-handler'), {
|
|
30
|
+
export const OperationHandler = AppCapability.operationHandler(() => import('../operation-handler.ts'), {
|
|
31
31
|
activatesOn: ActivationEvents.Idle,
|
|
32
32
|
});
|
|
33
33
|
|
|
34
|
-
export const Schema = AppCapability.schema(() => import('../schema'));
|
|
34
|
+
export const Schema = AppCapability.schema(() => import('../schema.ts'));
|
|
35
35
|
|
|
36
36
|
export const Translations = AppCapability.translations([...translations, ...threadTranslations]);
|
|
37
37
|
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2026 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
// GENERATED by dx-plugin — do not edit. Sliced from ../index.ts for the 'tauri' condition.
|
|
6
|
+
|
|
7
|
+
import * as ActivationEvents from '@dxos/app-framework/ActivationEvents';
|
|
8
|
+
import * as Capability from '@dxos/app-framework/Capability';
|
|
9
|
+
import * as AppCapability from '@dxos/app-toolkit/AppCapability';
|
|
10
|
+
import * as SpaceCapability from '@dxos/plugin-space/SpaceCapability';
|
|
11
|
+
import { translations as threadTranslations } from '@dxos/react-ui-thread/translations';
|
|
12
|
+
|
|
13
|
+
import { meta } from '#meta';
|
|
14
|
+
import { translations } from '#translations';
|
|
15
|
+
import { ThreadCapabilities, ThreadEvents } from '#types';
|
|
16
|
+
|
|
17
|
+
import pluginSpec from '../../../PLUGIN.mdl?raw';
|
|
18
|
+
|
|
19
|
+
// The graph builder reads the call manager OPTIONALLY (reactive atom with an absence guard),
|
|
20
|
+
// so no spec-level require: a hard cross-plugin require would fail this plugin whenever
|
|
21
|
+
// plugin-calls is disabled. Cross-feature requires are only valid with a plugin-level dependsOn.
|
|
22
|
+
export const AppGraphBuilder = AppCapability.appGraphBuilder(() => import('../app-graph-builder.ts'));
|
|
23
|
+
|
|
24
|
+
export const ChannelBackendFeed = Capability.lazyModule(
|
|
25
|
+
'ChannelBackendFeed',
|
|
26
|
+
{
|
|
27
|
+
provides: [ThreadCapabilities.ChannelBackend],
|
|
28
|
+
activatesOn: ThreadEvents.Start,
|
|
29
|
+
environments: ['browser', 'node', 'tauri', 'workerd'],
|
|
30
|
+
},
|
|
31
|
+
() => import('../channel-backend-feed.ts'),
|
|
32
|
+
);
|
|
33
|
+
|
|
34
|
+
// `CreateObjectEntry` carries a `customPanel` React component alongside the object factory, so it
|
|
35
|
+
// cannot load without React — browser only.
|
|
36
|
+
export const CreateObject = SpaceCapability.createObject(() => import('../create-object.ts'), {
|
|
37
|
+
environments: ['browser', 'tauri'],
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
export const OperationHandler = AppCapability.operationHandler(() => import('../operation-handler.ts'), {
|
|
41
|
+
activatesOn: ActivationEvents.Idle,
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
export const ReactSurface = AppCapability.surface(() => import('../react-surface.ts'), {
|
|
45
|
+
roles: ['org.dxos.role.article'],
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
export const Schema = AppCapability.schema(() => import('../schema.ts'));
|
|
49
|
+
|
|
50
|
+
export const Translations = AppCapability.translations([...translations, ...threadTranslations]);
|
|
51
|
+
|
|
52
|
+
export const PluginAsset = AppCapability.pluginAsset({
|
|
53
|
+
pluginId: meta.profile.key,
|
|
54
|
+
path: 'PLUGIN.mdl',
|
|
55
|
+
content: pluginSpec,
|
|
56
|
+
mimeType: 'application/x-mdl',
|
|
57
|
+
});
|
|
@@ -15,23 +15,23 @@ import { ThreadCapabilities, ThreadEvents } from '#types';
|
|
|
15
15
|
// The graph builder reads the call manager OPTIONALLY (reactive atom with an absence guard),
|
|
16
16
|
// so no spec-level require: a hard cross-plugin require would fail this plugin whenever
|
|
17
17
|
// plugin-calls is disabled. Cross-feature requires are only valid with a plugin-level dependsOn.
|
|
18
|
-
export const AppGraphBuilder = AppCapability.appGraphBuilder(() => import('../app-graph-builder'));
|
|
18
|
+
export const AppGraphBuilder = AppCapability.appGraphBuilder(() => import('../app-graph-builder.ts'));
|
|
19
19
|
|
|
20
20
|
export const ChannelBackendFeed = Capability.lazyModule(
|
|
21
21
|
'ChannelBackendFeed',
|
|
22
22
|
{
|
|
23
23
|
provides: [ThreadCapabilities.ChannelBackend],
|
|
24
24
|
activatesOn: ThreadEvents.Start,
|
|
25
|
-
environments: ['node', 'workerd'],
|
|
25
|
+
environments: ['browser', 'node', 'tauri', 'workerd'],
|
|
26
26
|
},
|
|
27
|
-
() => import('../channel-backend-feed'),
|
|
27
|
+
() => import('../channel-backend-feed.ts'),
|
|
28
28
|
);
|
|
29
29
|
|
|
30
|
-
export const OperationHandler = AppCapability.operationHandler(() => import('../operation-handler'), {
|
|
30
|
+
export const OperationHandler = AppCapability.operationHandler(() => import('../operation-handler.ts'), {
|
|
31
31
|
activatesOn: ActivationEvents.Idle,
|
|
32
32
|
});
|
|
33
33
|
|
|
34
|
-
export const Schema = AppCapability.schema(() => import('../schema'));
|
|
34
|
+
export const Schema = AppCapability.schema(() => import('../schema.ts'));
|
|
35
35
|
|
|
36
36
|
export const Translations = AppCapability.translations([...translations, ...threadTranslations]);
|
|
37
37
|
|
|
@@ -18,28 +18,28 @@ import pluginSpec from '../../PLUGIN.mdl?raw';
|
|
|
18
18
|
// The graph builder reads the call manager OPTIONALLY (reactive atom with an absence guard),
|
|
19
19
|
// so no spec-level require: a hard cross-plugin require would fail this plugin whenever
|
|
20
20
|
// plugin-calls is disabled. Cross-feature requires are only valid with a plugin-level dependsOn.
|
|
21
|
-
export const AppGraphBuilder = AppCapability.appGraphBuilder(() => import('./app-graph-builder'));
|
|
21
|
+
export const AppGraphBuilder = AppCapability.appGraphBuilder(() => import('./app-graph-builder.ts'));
|
|
22
22
|
export const ChannelBackendFeed = Capability.lazyModule(
|
|
23
23
|
'ChannelBackendFeed',
|
|
24
24
|
{
|
|
25
25
|
provides: [ThreadCapabilities.ChannelBackend],
|
|
26
26
|
activatesOn: ThreadEvents.Start,
|
|
27
|
-
environments: ['node', 'workerd'],
|
|
27
|
+
environments: ['browser', 'node', 'tauri', 'workerd'],
|
|
28
28
|
},
|
|
29
|
-
() => import('./channel-backend-feed'),
|
|
29
|
+
() => import('./channel-backend-feed.ts'),
|
|
30
30
|
);
|
|
31
31
|
// `CreateObjectEntry` carries a `customPanel` React component alongside the object factory, so it
|
|
32
32
|
// cannot load without React — browser only.
|
|
33
|
-
export const CreateObject = SpaceCapability.createObject(() => import('./create-object'), {
|
|
34
|
-
environments: [],
|
|
33
|
+
export const CreateObject = SpaceCapability.createObject(() => import('./create-object.ts'), {
|
|
34
|
+
environments: ['browser', 'tauri'],
|
|
35
35
|
});
|
|
36
|
-
export const OperationHandler = AppCapability.operationHandler(() => import('./operation-handler'), {
|
|
36
|
+
export const OperationHandler = AppCapability.operationHandler(() => import('./operation-handler.ts'), {
|
|
37
37
|
activatesOn: ActivationEvents.Idle,
|
|
38
38
|
});
|
|
39
|
-
export const ReactSurface = AppCapability.surface(() => import('./react-surface'), {
|
|
39
|
+
export const ReactSurface = AppCapability.surface(() => import('./react-surface.ts'), {
|
|
40
40
|
roles: ['org.dxos.role.article'],
|
|
41
41
|
});
|
|
42
|
-
export const Schema = AppCapability.schema(() => import('./schema'));
|
|
42
|
+
export const Schema = AppCapability.schema(() => import('./schema.ts'));
|
|
43
43
|
export const Translations = AppCapability.translations([...translations, ...threadTranslations]);
|
|
44
44
|
export const PluginAsset = AppCapability.pluginAsset({
|
|
45
45
|
pluginId: meta.profile.key,
|
|
@@ -11,6 +11,6 @@ import { ThreadOperationHandlerSet } from '#operations';
|
|
|
11
11
|
|
|
12
12
|
export default Capability.makeModule(
|
|
13
13
|
Effect.fnUntraced(function* () {
|
|
14
|
-
return Capability.contribute(Capabilities.OperationHandler, ThreadOperationHandlerSet);
|
|
14
|
+
return Capability.contribute(Capabilities.OperationHandler, ThreadOperationHandlerSet.handlers);
|
|
15
15
|
}),
|
|
16
16
|
);
|
|
@@ -6,8 +6,8 @@ import * as Effect from 'effect/Effect';
|
|
|
6
6
|
|
|
7
7
|
import * as Capabilities from '@dxos/app-framework/Capabilities';
|
|
8
8
|
import * as Capability from '@dxos/app-framework/Capability';
|
|
9
|
-
import
|
|
10
|
-
import
|
|
9
|
+
import * as Surface from '@dxos/app-framework/Surface';
|
|
10
|
+
import * as AppSurface from '@dxos/app-toolkit/AppSurface';
|
|
11
11
|
import { Channel, Thread } from '@dxos/types';
|
|
12
12
|
|
|
13
13
|
import { ChannelArticle, ThreadArticle } from '#containers';
|
|
@@ -4,19 +4,21 @@
|
|
|
4
4
|
|
|
5
5
|
import React, { useCallback, useMemo } from 'react';
|
|
6
6
|
|
|
7
|
-
import
|
|
8
|
-
import
|
|
7
|
+
import * as Surface from '@dxos/app-framework/Surface';
|
|
8
|
+
import * as AppSurface from '@dxos/app-toolkit/AppSurface';
|
|
9
9
|
import { type Identity, type Space } from '@dxos/halo';
|
|
10
|
-
import { Card, type ThemedClassName, composable, useTranslation } from '@dxos/react-ui';
|
|
11
10
|
import { type ObjectTileComponent, Thread } from '@dxos/react-ui-thread';
|
|
11
|
+
import * as Card from '@dxos/react-ui/Card';
|
|
12
|
+
import * as Hooks from '@dxos/react-ui/Hooks';
|
|
13
|
+
import * as Util from '@dxos/react-ui/Util';
|
|
12
14
|
import { type Message } from '@dxos/types';
|
|
13
15
|
import { hoverableControls, hoverableFocusedWithinControls, mx } from '@dxos/ui-theme';
|
|
14
16
|
|
|
15
17
|
import { meta } from '#meta';
|
|
16
18
|
|
|
17
|
-
import { getMessageMetadata } from '../../util';
|
|
19
|
+
import { getMessageMetadata } from '../../util.ts';
|
|
18
20
|
|
|
19
|
-
export type MessageThreadProps = ThemedClassName<{
|
|
21
|
+
export type MessageThreadProps = Util.ThemedClassName<{
|
|
20
22
|
/** Stable id used for the underlying thread root and message metadata. */
|
|
21
23
|
id: string;
|
|
22
24
|
/** Identity used to attribute outgoing messages in the textbox metadata. */
|
|
@@ -51,9 +53,9 @@ export type MessageThreadProps = ThemedClassName<{
|
|
|
51
53
|
* data or invoke operations — the caller passes messages and an `onSend`
|
|
52
54
|
* callback. Used by `ChannelArticle` and `ThreadArticle`.
|
|
53
55
|
*/
|
|
54
|
-
export const MessageThread = composable<HTMLDivElement, MessageThreadProps>(
|
|
56
|
+
export const MessageThread = Util.composable<HTMLDivElement, MessageThreadProps>(
|
|
55
57
|
({ id, identity, members, messages, activity, onSend, autoFocus, current, readOnly, classNames }, forwardedRef) => {
|
|
56
|
-
const { t } = useTranslation(meta.profile.key);
|
|
58
|
+
const { t } = Hooks.useTranslation(meta.profile.key);
|
|
57
59
|
|
|
58
60
|
const components = useMemo(() => ({ Object: ObjectTile }), []);
|
|
59
61
|
|
|
@@ -78,12 +80,7 @@ export const MessageThread = composable<HTMLDivElement, MessageThreadProps>(
|
|
|
78
80
|
|
|
79
81
|
return (
|
|
80
82
|
<Thread.Root getMetadata={getMetadata} components={components} identityDid={identity?.did} editable={false}>
|
|
81
|
-
<Thread.Content
|
|
82
|
-
id={id}
|
|
83
|
-
current={current}
|
|
84
|
-
classNames={['dx-container h-full border', classNames]}
|
|
85
|
-
ref={forwardedRef}
|
|
86
|
-
>
|
|
83
|
+
<Thread.Content id={id} current={current} classNames={['dx-expand border', classNames]} ref={forwardedRef}>
|
|
87
84
|
<Thread.Messages id={id} messages={messages} />
|
|
88
85
|
{!readOnly && (
|
|
89
86
|
<>
|
|
@@ -108,7 +105,7 @@ export const MessageThread = composable<HTMLDivElement, MessageThreadProps>(
|
|
|
108
105
|
* referenced subject via an app-framework `Surface` (the card role).
|
|
109
106
|
*/
|
|
110
107
|
const ObjectTile: ObjectTileComponent = ({ subject }) => {
|
|
111
|
-
const Fallback = useCallback(() => <span className='p-1 text-sm text-
|
|
108
|
+
const Fallback = useCallback(() => <span className='p-1 text-sm text-fg-muted'>{subject.id}</span>, [subject]);
|
|
112
109
|
return (
|
|
113
110
|
<Card.Root classNames={mx('grid col-span-3 py-1 pr-4', hoverableControls, hoverableFocusedWithinControls)}>
|
|
114
111
|
<Surface.Surface
|
package/src/components/index.ts
CHANGED
|
@@ -9,7 +9,7 @@ import React from 'react';
|
|
|
9
9
|
import * as Capability from '@dxos/app-framework/Capability';
|
|
10
10
|
import { withPluginManager } from '@dxos/app-framework/testing';
|
|
11
11
|
import * as AppCapabilities from '@dxos/app-toolkit/AppCapabilities';
|
|
12
|
-
import
|
|
12
|
+
import * as AppSurface from '@dxos/app-toolkit/AppSurface';
|
|
13
13
|
import { Database, Feed, Query } from '@dxos/echo';
|
|
14
14
|
import { useQuery } from '@dxos/echo-react';
|
|
15
15
|
import { invariant } from '@dxos/invariant';
|
|
@@ -17,7 +17,7 @@ import * as CallsPlugin from '@dxos/plugin-calls/CallsPlugin';
|
|
|
17
17
|
import { ClientPlugin } from '@dxos/plugin-client/testing';
|
|
18
18
|
import { initializeIdentity } from '@dxos/plugin-client/testing';
|
|
19
19
|
import { SpacePlugin } from '@dxos/plugin-space/testing';
|
|
20
|
-
import
|
|
20
|
+
import * as CorePlugins from '@dxos/plugin-testing/CorePlugins';
|
|
21
21
|
import { Config } from '@dxos/react-client';
|
|
22
22
|
import { useSpaces } from '@dxos/react-client/echo';
|
|
23
23
|
import { withMosaic } from '@dxos/react-ui-mosaic/testing';
|
|
@@ -27,7 +27,7 @@ import { Channel, Message, Thread } from '@dxos/types';
|
|
|
27
27
|
import { ThreadPlugin } from '#plugin';
|
|
28
28
|
import { translations } from '#translations';
|
|
29
29
|
|
|
30
|
-
import { ChannelArticle, type ChannelArticleProps } from './ChannelArticle';
|
|
30
|
+
import { ChannelArticle, type ChannelArticleProps } from './ChannelArticle.tsx';
|
|
31
31
|
|
|
32
32
|
// TODO(wittjosiah): Channel doesn't render full height.
|
|
33
33
|
const DefaultStory = ({ roomId }: ChannelArticleProps) => {
|
|
@@ -53,7 +53,7 @@ const meta = {
|
|
|
53
53
|
Capability.contribute(AppCapabilities.Schema, [Channel.Channel, Feed.Feed, Thread.Thread, Message.Message]),
|
|
54
54
|
],
|
|
55
55
|
plugins: [
|
|
56
|
-
...
|
|
56
|
+
...CorePlugins.make(),
|
|
57
57
|
ClientPlugin.make({
|
|
58
58
|
types: [Channel.Channel, Feed.Feed, Thread.Thread, Message.Message],
|
|
59
59
|
config: new Config({
|