@dxos/plugin-thread 0.10.0 → 0.11.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.
Files changed (166) hide show
  1. package/dist/lib/{neutral/ThreadPlugin.mjs → ThreadPlugin.mjs} +26 -66
  2. package/dist/lib/ThreadPlugin.mjs.map +1 -0
  3. package/dist/lib/ThreadPlugin.node.mjs +19 -0
  4. package/dist/lib/ThreadPlugin.node.mjs.map +1 -0
  5. package/dist/lib/ThreadPlugin.workerd.mjs +19 -0
  6. package/dist/lib/ThreadPlugin.workerd.mjs.map +1 -0
  7. package/dist/lib/capabilities/node.mjs +8 -0
  8. package/dist/lib/capabilities/node.mjs.map +1 -0
  9. package/dist/lib/capabilities.mjs +11 -0
  10. package/dist/lib/capabilities.mjs.map +1 -0
  11. package/dist/lib/chunk-ChannelArticle.mjs +104 -0
  12. package/dist/lib/chunk-ChannelArticle.mjs.map +1 -0
  13. package/dist/lib/chunk-ChannelCreatePanel.mjs +41 -0
  14. package/dist/lib/chunk-ChannelCreatePanel.mjs.map +1 -0
  15. package/dist/lib/chunk-ThreadArticle.mjs +58 -0
  16. package/dist/lib/chunk-ThreadArticle.mjs.map +1 -0
  17. package/dist/lib/chunk-app-graph-builder.mjs +49 -0
  18. package/dist/lib/chunk-app-graph-builder.mjs.map +1 -0
  19. package/dist/lib/chunk-append-channel-message.mjs +30 -0
  20. package/dist/lib/chunk-append-channel-message.mjs.map +1 -0
  21. package/dist/lib/chunk-channel-backend-feed.mjs +68 -0
  22. package/dist/lib/chunk-channel-backend-feed.mjs.map +1 -0
  23. package/dist/lib/chunk-create-channel.mjs +31 -0
  24. package/dist/lib/chunk-create-channel.mjs.map +1 -0
  25. package/dist/lib/chunk-create-object.mjs +36 -0
  26. package/dist/lib/chunk-create-object.mjs.map +1 -0
  27. package/dist/lib/{neutral/chunk-A5JYVGL2.mjs → chunk-meta.mjs} +20 -25
  28. package/dist/lib/chunk-meta.mjs.map +1 -0
  29. package/dist/lib/chunk-operation-handler.mjs +11 -0
  30. package/dist/lib/chunk-operation-handler.mjs.map +1 -0
  31. package/dist/lib/chunk-paths.mjs +8 -0
  32. package/dist/lib/chunk-paths.mjs.map +1 -0
  33. package/dist/lib/chunk-react-surface.mjs +38 -0
  34. package/dist/lib/chunk-react-surface.mjs.map +1 -0
  35. package/dist/lib/chunk-types.mjs +99 -0
  36. package/dist/lib/chunk-types.mjs.map +1 -0
  37. package/dist/lib/components.mjs +105 -0
  38. package/dist/lib/components.mjs.map +1 -0
  39. package/dist/lib/containers.mjs +9 -0
  40. package/dist/lib/containers.mjs.map +1 -0
  41. package/dist/lib/hooks.mjs +45 -0
  42. package/dist/lib/hooks.mjs.map +1 -0
  43. package/dist/lib/index.mjs +5 -0
  44. package/dist/lib/meta.mjs +2 -0
  45. package/dist/lib/operations.mjs +7 -0
  46. package/dist/lib/operations.mjs.map +1 -0
  47. package/dist/lib/plugin.mjs +9 -0
  48. package/dist/lib/plugin.mjs.map +1 -0
  49. package/dist/lib/translations.mjs +84 -0
  50. package/dist/lib/translations.mjs.map +1 -0
  51. package/dist/lib/types.mjs +2 -0
  52. package/dist/types/src/ThreadPlugin.d.ts.map +1 -1
  53. package/dist/types/src/ThreadPlugin.node.d.ts.map +1 -1
  54. package/dist/types/src/capabilities/app-graph-builder.d.ts +1 -1
  55. package/dist/types/src/capabilities/channel-backend-feed.d.ts +1 -1
  56. package/dist/types/src/capabilities/channel-backend-feed.d.ts.map +1 -1
  57. package/dist/types/src/capabilities/create-object.d.ts +1 -1
  58. package/dist/types/src/capabilities/index.d.ts +0 -1
  59. package/dist/types/src/capabilities/index.d.ts.map +1 -1
  60. package/dist/types/src/capabilities/node.d.ts +5 -0
  61. package/dist/types/src/capabilities/node.d.ts.map +1 -0
  62. package/dist/types/src/capabilities/operation-handler.d.ts +1 -1
  63. package/dist/types/src/capabilities/react-surface.d.ts +1 -1
  64. package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
  65. package/dist/types/src/components/{Chat/Chat.d.ts → MessageThread/MessageThread.d.ts} +11 -12
  66. package/dist/types/src/components/MessageThread/MessageThread.d.ts.map +1 -0
  67. package/dist/types/src/components/MessageThread/index.d.ts +2 -0
  68. package/dist/types/src/components/MessageThread/index.d.ts.map +1 -0
  69. package/dist/types/src/components/index.d.ts +1 -1
  70. package/dist/types/src/components/index.d.ts.map +1 -1
  71. package/dist/types/src/containers/ChannelArticle/ChannelArticle.d.ts +4 -9
  72. package/dist/types/src/containers/ChannelArticle/ChannelArticle.d.ts.map +1 -1
  73. package/dist/types/src/containers/ChannelArticle/ChannelArticle.stories.d.ts +4 -1
  74. package/dist/types/src/containers/ChannelArticle/ChannelArticle.stories.d.ts.map +1 -1
  75. package/dist/types/src/containers/ChannelCreatePanel/ChannelCreatePanel.d.ts +4 -8
  76. package/dist/types/src/containers/ChannelCreatePanel/ChannelCreatePanel.d.ts.map +1 -1
  77. package/dist/types/src/containers/ThreadArticle/ThreadArticle.d.ts +1 -3
  78. package/dist/types/src/containers/ThreadArticle/ThreadArticle.d.ts.map +1 -1
  79. package/dist/types/src/containers/ThreadArticle/ThreadArticle.stories.d.ts.map +1 -1
  80. package/dist/types/src/util.d.ts +14 -3
  81. package/dist/types/src/util.d.ts.map +1 -1
  82. package/dist/types/tsconfig.tsbuildinfo +1 -1
  83. package/dx.config.ts +2 -1
  84. package/package.json +54 -46
  85. package/src/ThreadPlugin.node.ts +1 -2
  86. package/src/ThreadPlugin.test.ts +5 -2
  87. package/src/ThreadPlugin.tsx +1 -10
  88. package/src/capabilities/app-graph-builder.ts +5 -3
  89. package/src/capabilities/index.ts +0 -1
  90. package/src/capabilities/node.ts +18 -0
  91. package/src/capabilities/{react-surface.tsx → react-surface.ts} +6 -14
  92. package/src/components/{Chat/Chat.tsx → MessageThread/MessageThread.tsx} +20 -17
  93. package/src/components/{Chat → MessageThread}/index.ts +1 -1
  94. package/src/components/index.ts +1 -1
  95. package/src/containers/ChannelArticle/ChannelArticle.stories.tsx +4 -1
  96. package/src/containers/ChannelArticle/ChannelArticle.tsx +6 -4
  97. package/src/containers/ChannelCreatePanel/ChannelCreatePanel.tsx +4 -3
  98. package/src/containers/ThreadArticle/ThreadArticle.stories.tsx +4 -2
  99. package/src/containers/ThreadArticle/ThreadArticle.tsx +30 -18
  100. package/src/paths.ts +3 -3
  101. package/src/util.ts +21 -7
  102. package/dist/lib/neutral/ChannelArticle-CTYSCRTR.mjs +0 -122
  103. package/dist/lib/neutral/ChannelArticle-CTYSCRTR.mjs.map +0 -7
  104. package/dist/lib/neutral/ChannelCreatePanel-NUXXKHZQ.mjs +0 -38
  105. package/dist/lib/neutral/ChannelCreatePanel-NUXXKHZQ.mjs.map +0 -7
  106. package/dist/lib/neutral/ThreadArticle-ROQXQLEZ.mjs +0 -57
  107. package/dist/lib/neutral/ThreadArticle-ROQXQLEZ.mjs.map +0 -7
  108. package/dist/lib/neutral/ThreadPlugin.mjs.map +0 -7
  109. package/dist/lib/neutral/ThreadPlugin.node.mjs +0 -29
  110. package/dist/lib/neutral/ThreadPlugin.node.mjs.map +0 -7
  111. package/dist/lib/neutral/ThreadPlugin.workerd.mjs +0 -27
  112. package/dist/lib/neutral/ThreadPlugin.workerd.mjs.map +0 -7
  113. package/dist/lib/neutral/app-graph-builder-NZOWDFE5.mjs +0 -65
  114. package/dist/lib/neutral/app-graph-builder-NZOWDFE5.mjs.map +0 -7
  115. package/dist/lib/neutral/append-channel-message-YIIJY6GX.mjs +0 -34
  116. package/dist/lib/neutral/append-channel-message-YIIJY6GX.mjs.map +0 -7
  117. package/dist/lib/neutral/capabilities/index.mjs +0 -19
  118. package/dist/lib/neutral/capabilities/index.mjs.map +0 -7
  119. package/dist/lib/neutral/channel-backend-feed-TOS55NID.mjs +0 -57
  120. package/dist/lib/neutral/channel-backend-feed-TOS55NID.mjs.map +0 -7
  121. package/dist/lib/neutral/chunk-5VTDNDBV.mjs +0 -109
  122. package/dist/lib/neutral/chunk-5VTDNDBV.mjs.map +0 -7
  123. package/dist/lib/neutral/chunk-A5JYVGL2.mjs.map +0 -7
  124. package/dist/lib/neutral/chunk-GM3SGQMJ.mjs +0 -69
  125. package/dist/lib/neutral/chunk-GM3SGQMJ.mjs.map +0 -7
  126. package/dist/lib/neutral/chunk-J5LGTIGS.mjs +0 -10
  127. package/dist/lib/neutral/chunk-J5LGTIGS.mjs.map +0 -7
  128. package/dist/lib/neutral/chunk-J7OTCRYF.mjs +0 -12
  129. package/dist/lib/neutral/chunk-J7OTCRYF.mjs.map +0 -7
  130. package/dist/lib/neutral/chunk-XPUQE4Y7.mjs +0 -8
  131. package/dist/lib/neutral/chunk-XPUQE4Y7.mjs.map +0 -7
  132. package/dist/lib/neutral/components/index.mjs +0 -96
  133. package/dist/lib/neutral/components/index.mjs.map +0 -7
  134. package/dist/lib/neutral/containers/index.mjs +0 -13
  135. package/dist/lib/neutral/containers/index.mjs.map +0 -7
  136. package/dist/lib/neutral/create-channel-4CA7P2M5.mjs +0 -41
  137. package/dist/lib/neutral/create-channel-4CA7P2M5.mjs.map +0 -7
  138. package/dist/lib/neutral/create-object-O3TZ2MCJ.mjs +0 -45
  139. package/dist/lib/neutral/create-object-O3TZ2MCJ.mjs.map +0 -7
  140. package/dist/lib/neutral/hooks/index.mjs +0 -11
  141. package/dist/lib/neutral/hooks/index.mjs.map +0 -7
  142. package/dist/lib/neutral/index.mjs +0 -34
  143. package/dist/lib/neutral/index.mjs.map +0 -7
  144. package/dist/lib/neutral/meta.json +0 -1
  145. package/dist/lib/neutral/meta.mjs +0 -10
  146. package/dist/lib/neutral/meta.mjs.map +0 -7
  147. package/dist/lib/neutral/navigation-resolver-LSTZL32O.mjs +0 -18
  148. package/dist/lib/neutral/navigation-resolver-LSTZL32O.mjs.map +0 -7
  149. package/dist/lib/neutral/operation-handler-RU6K2S4L.mjs +0 -13
  150. package/dist/lib/neutral/operation-handler-RU6K2S4L.mjs.map +0 -7
  151. package/dist/lib/neutral/operations/index.mjs +0 -8
  152. package/dist/lib/neutral/operations/index.mjs.map +0 -7
  153. package/dist/lib/neutral/plugin.mjs +0 -16
  154. package/dist/lib/neutral/plugin.mjs.map +0 -7
  155. package/dist/lib/neutral/react-surface-H2EKIMSK.mjs +0 -49
  156. package/dist/lib/neutral/react-surface-H2EKIMSK.mjs.map +0 -7
  157. package/dist/lib/neutral/translations.mjs +0 -91
  158. package/dist/lib/neutral/translations.mjs.map +0 -7
  159. package/dist/lib/neutral/types/index.mjs +0 -16
  160. package/dist/lib/neutral/types/index.mjs.map +0 -7
  161. package/dist/types/src/capabilities/navigation-resolver.d.ts +0 -5
  162. package/dist/types/src/capabilities/navigation-resolver.d.ts.map +0 -1
  163. package/dist/types/src/components/Chat/Chat.d.ts.map +0 -1
  164. package/dist/types/src/components/Chat/index.d.ts +0 -2
  165. package/dist/types/src/components/Chat/index.d.ts.map +0 -1
  166. package/src/capabilities/navigation-resolver.ts +0 -20
@@ -0,0 +1,31 @@
1
+ import { c as resolveProvider, i as ChannelBackend, n as CreateChannel } from "./chunk-types.mjs";
2
+ import { Capability } from "@dxos/app-framework";
3
+ import { Operation } from "@dxos/compute";
4
+ import { Channel } from "@dxos/types";
5
+ import * as Effect from "effect/Effect";
6
+ import { invariant } from "@dxos/invariant";
7
+ //#region src/operations/create-channel.ts
8
+ var __dxlog_file = "/__w/dxos/dxos/packages/plugins/plugin-thread/src/operations/create-channel.ts";
9
+ var handler = CreateChannel.pipe(Operation.withHandler(Effect.fnUntraced(function* ({ name, kind, options }) {
10
+ if (!kind || kind === Channel.FeedBackendKind) return { object: Channel.make({ name }) };
11
+ const provider = resolveProvider(yield* Capability.getAll(ChannelBackend), kind);
12
+ invariant(provider, `No channel backend for kind: ${kind}`, {
13
+ "~LogMeta": "~LogMeta",
14
+ F: __dxlog_file,
15
+ L: 23,
16
+ S: this,
17
+ A: ["provider", "`No channel backend for kind: ${kind}`"]
18
+ });
19
+ const config = provider.makeConfig(options ?? {});
20
+ return { object: Channel.make({
21
+ name,
22
+ backend: {
23
+ kind,
24
+ config
25
+ }
26
+ }) };
27
+ })));
28
+ //#endregion
29
+ export { handler as default };
30
+
31
+ //# sourceMappingURL=chunk-create-channel.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chunk-create-channel.mjs","names":[],"sources":["../../src/operations/create-channel.ts"],"sourcesContent":["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\n\nimport { Capability } from '@dxos/app-framework';\nimport { Operation } from '@dxos/compute';\nimport { invariant } from '@dxos/invariant';\nimport { Channel } from '@dxos/types';\n\nimport { ThreadCapabilities, ThreadOperation, resolveProvider } from '../types';\n\nconst handler: Operation.WithHandler<typeof ThreadOperation.CreateChannel> = ThreadOperation.CreateChannel.pipe(\n Operation.withHandler(\n Effect.fnUntraced(function* ({ name, kind, options }) {\n if (!kind || kind === Channel.FeedBackendKind) {\n return { object: Channel.make({ name }) };\n }\n\n const providers = yield* Capability.getAll(ThreadCapabilities.ChannelBackend);\n const provider = resolveProvider(providers, kind);\n invariant(provider, `No channel backend for kind: ${kind}`);\n const config = provider.makeConfig(options ?? {});\n return { object: Channel.make({ name, backend: { kind, config } }) };\n }),\n ),\n);\n\nexport default handler;\n"],"mappings":";;;;;;;;AAaA,IAAM,UAAA,cAAqG,KACzG,UAAU,YACR,OAAO,WAAW,WAAW,EAAE,MAAM,MAAM,WAAW;CACpD,IAAI,CAAC,QAAQ,SAAS,QAAQ,iBAC5B,OAAO,EAAE,QAAQ,QAAQ,KAAK,EAAE,KAAK,CAAC,EAAE;CAI1C,MAAM,WAAW,gBAAgB,OADR,WAAW,OAAO,cAAiC,GAChC,IAAI;CAChD,UAAU,UAAU,gCAAgC,QAAK;EAAA,YAAA;EAAA,GAAA;EAAA,GAAA;EAAA,GAAA;EAAA,GAAA,CAAA,YAAA,wCAAA;CAAA,CAAC;CAC1D,MAAM,SAAS,SAAS,WAAW,WAAW,CAAC,CAAC;CAChD,OAAO,EAAE,QAAQ,QAAQ,KAAK;EAAE;EAAM,SAAS;GAAE;GAAM;EAAO;CAAE,CAAC,EAAE;AACrE,CAAC,CACH,CACF"}
@@ -0,0 +1,36 @@
1
+ import { c as resolveProvider, i as ChannelBackend } from "./chunk-types.mjs";
2
+ import { n as getChannelsPath } from "./chunk-paths.mjs";
3
+ import { Capability } from "@dxos/app-framework";
4
+ import { Operation } from "@dxos/compute";
5
+ import { Type } from "@dxos/echo";
6
+ import { Channel } from "@dxos/types";
7
+ import * as Effect from "effect/Effect";
8
+ import { SpaceCapabilities, SpaceOperation } from "@dxos/plugin-space";
9
+ import { ChannelCreatePanel } from "#containers";
10
+ //#region src/capabilities/create-object.ts
11
+ var create_object_default = Capability.makeModule(Effect.fnUntraced(function* () {
12
+ return Capability.contributes(SpaceCapabilities.CreateObjectEntry, {
13
+ id: Type.getTypename(Channel.Channel),
14
+ customPanel: ChannelCreatePanel,
15
+ createObject: ({ name, kind, options }, opts) => Effect.gen(function* () {
16
+ const providers = yield* Capability.getAll(ChannelBackend);
17
+ const provider = kind ? resolveProvider(providers, kind) : void 0;
18
+ const object = provider ? Channel.make({
19
+ name,
20
+ backend: {
21
+ kind: provider.kind,
22
+ config: provider.makeConfig(options ?? {})
23
+ }
24
+ }) : Channel.make({ name });
25
+ return yield* Operation.invoke(SpaceOperation.AddObject, {
26
+ object,
27
+ target: opts.target,
28
+ targetNodeId: opts.targetNodeId ?? getChannelsPath(opts.db.spaceId)
29
+ });
30
+ })
31
+ });
32
+ }));
33
+ //#endregion
34
+ export { create_object_default as default };
35
+
36
+ //# sourceMappingURL=chunk-create-object.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chunk-create-object.mjs","names":[],"sources":["../../src/capabilities/create-object.ts"],"sourcesContent":["//\n// Copyright 2023 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\n\nimport { Capability } from '@dxos/app-framework';\nimport { Operation } from '@dxos/compute';\nimport { Type } from '@dxos/echo';\nimport { SpaceCapabilities, SpaceOperation } from '@dxos/plugin-space';\nimport { Channel } from '@dxos/types';\n\n// Lazily loaded (via the #containers barrel) so the react-ui-form dependency\n// graph isn't pulled into this capability module's evaluation.\nimport { ChannelCreatePanel } from '#containers';\n\nimport { getChannelsPath } from '../paths';\nimport { ThreadCapabilities, resolveProvider } from '../types';\n\ntype CreateOptions = Parameters<SpaceCapabilities.CreateObjectEntry['createObject']>[1];\n\nexport default Capability.makeModule(\n Effect.fnUntraced(function* () {\n return Capability.contributes(SpaceCapabilities.CreateObjectEntry, {\n id: Type.getTypename(Channel.Channel),\n customPanel: ChannelCreatePanel,\n createObject: (\n { name, kind, options }: { name?: string; kind?: string; options?: Record<string, unknown> },\n opts: CreateOptions,\n ) =>\n Effect.gen(function* () {\n const providers = yield* Capability.getAll(ThreadCapabilities.ChannelBackend);\n const provider = kind ? resolveProvider(providers, kind) : undefined;\n const object = provider\n ? Channel.make({ name, backend: { kind: provider.kind, config: provider.makeConfig(options ?? {}) } })\n : Channel.make({ name });\n return yield* Operation.invoke(SpaceOperation.AddObject, {\n object,\n target: opts.target,\n targetNodeId: opts.targetNodeId ?? getChannelsPath(opts.db.spaceId),\n });\n }),\n });\n }),\n);\n"],"mappings":";;;;;;;;;;AAqBA,IAAA,wBAAe,WAAW,WACxB,OAAO,WAAW,aAAa;CAC7B,OAAO,WAAW,YAAY,kBAAkB,mBAAmB;EACjE,IAAI,KAAK,YAAY,QAAQ,OAAO;EACpC,aAAa;EACb,eACE,EAAE,MAAM,MAAM,WACd,SAEA,OAAO,IAAI,aAAa;GACtB,MAAM,YAAY,OAAO,WAAW,OAAO,cAAiC;GAC5E,MAAM,WAAW,OAAO,gBAAgB,WAAW,IAAI,IAAI,KAAA;GAC3D,MAAM,SAAS,WACX,QAAQ,KAAK;IAAE;IAAM,SAAS;KAAE,MAAM,SAAS;KAAM,QAAQ,SAAS,WAAW,WAAW,CAAC,CAAC;IAAE;GAAE,CAAC,IACnG,QAAQ,KAAK,EAAE,KAAK,CAAC;GACzB,OAAO,OAAO,UAAU,OAAO,eAAe,WAAW;IACvD;IACA,QAAQ,KAAK;IACb,cAAc,KAAK,gBAAgB,gBAAgB,KAAK,GAAG,OAAO;GACpE,CAAC;EACH,CAAC;CACL,CAAC;AACH,CAAC,CACH"}
@@ -1,15 +1,12 @@
1
- // src/meta.ts
2
1
  import { Plugin } from "@dxos/app-framework";
3
-
4
- // dx.config.ts
5
2
  import { Config2 } from "@dxos/app-framework/config";
6
3
  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`
4
+ //#region dx.config.ts
5
+ var dx_config_default = Config2.make({ plugin: {
6
+ key: "org.dxos.plugin.thread",
7
+ name: "Threads",
8
+ author: "DXOS",
9
+ description: trim`
13
10
  ThreadPlugin provides chat: channels backed by an ECHO feed and free-standing
14
11
  message threads. It renders the channel article and companion surfaces plus a
15
12
  thread surface, and contributes the operations that create a default channel on
@@ -23,23 +20,21 @@ var dx_config_default = Config2.make({
23
20
 
24
21
  The shared message and thread UI comes from @dxos/react-ui-thread; the Channel,
25
22
  Message, and Thread schema come from @dxos/types. Document comments and the
26
- comment-thread AI agent live in the @dxos/plugin-comments plugin.
23
+ comment-thread AI agent live in the @dxos/plugin-review plugin.
27
24
  `,
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
25
+ source: "https://github.com/dxos/dxos/tree/main/packages/plugins/plugin-thread",
26
+ icon: {
27
+ key: "ph--video-conference--regular",
28
+ hue: "rose"
29
+ },
30
+ spec: "PLUGIN.mdl",
31
+ tags: ["alpha"]
32
+ } });
33
+ //#endregion
34
+ //#region src/meta.ts
38
35
  var meta = Plugin.getMetaFromConfig(dx_config_default);
39
36
  var THREAD_ITEM = `${meta.profile.key}.item`;
37
+ //#endregion
38
+ export { meta as n, THREAD_ITEM as t };
40
39
 
41
- export {
42
- meta,
43
- THREAD_ITEM
44
- };
45
- //# sourceMappingURL=chunk-A5JYVGL2.mjs.map
40
+ //# sourceMappingURL=chunk-meta.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chunk-meta.mjs","names":[],"sources":["../../dx.config.ts","../../src/meta.ts"],"sourcesContent":["//\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-review 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 tags: ['alpha'],\n },\n});\n","//\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"],"mappings":";;;;AAOA,IAAA,oBAAe,QAAQ,KAAK,EAC1B,QAAQ;CACN,KAAK;CACL,MAAM;CACN,QAAQ;CACR,aAAa,IAAI;;;;;;;;;;;;;;;;CAgBjB,QAAQ;CACR,MAAM;EAAE,KAAK;EAAiC,KAAK;CAAO;CAC1D,MAAM;CACN,MAAM,CAAC,OAAO;AAChB,EACF,CAAC;;;ACzBD,IAAa,OAAO,OAAO,kBAAkB,iBAAM;AAEnD,IAAa,cAAc,GAAG,KAAK,QAAQ,IAAI"}
@@ -0,0 +1,11 @@
1
+ import { Capabilities, Capability } from "@dxos/app-framework";
2
+ import * as Effect from "effect/Effect";
3
+ import { ThreadOperationHandlerSet } from "#operations";
4
+ //#region src/capabilities/operation-handler.ts
5
+ var operation_handler_default = Capability.makeModule(Effect.fnUntraced(function* () {
6
+ return Capability.contributes(Capabilities.OperationHandler, ThreadOperationHandlerSet);
7
+ }));
8
+ //#endregion
9
+ export { operation_handler_default as default };
10
+
11
+ //# sourceMappingURL=chunk-operation-handler.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chunk-operation-handler.mjs","names":[],"sources":["../../src/capabilities/operation-handler.ts"],"sourcesContent":["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\n\nimport { Capabilities, Capability } from '@dxos/app-framework';\nimport type { OperationHandlerSet } from '@dxos/compute';\n\nimport { ThreadOperationHandlerSet } from '#operations';\n\nexport default Capability.makeModule<OperationHandlerSet.OperationHandlerSet>(\n Effect.fnUntraced(function* () {\n return Capability.contributes(Capabilities.OperationHandler, ThreadOperationHandlerSet);\n }),\n);\n"],"mappings":";;;;AAWA,IAAA,4BAAe,WAAW,WACxB,OAAO,WAAW,aAAa;CAC7B,OAAO,WAAW,YAAY,aAAa,kBAAkB,yBAAyB;AACxF,CAAC,CACH"}
@@ -0,0 +1,8 @@
1
+ import { Channel } from "@dxos/types";
2
+ import { GraphPath } from "@dxos/app-toolkit";
3
+ //#region src/paths.ts
4
+ var { getSectionPath: getChannelsPath, getObjectPath: getChannelPath } = GraphPath.createTypeSectionPaths(Channel.Channel, { groupId: GraphPath.GroupSegments.communications });
5
+ //#endregion
6
+ export { getChannelsPath as n, getChannelPath as t };
7
+
8
+ //# sourceMappingURL=chunk-paths.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chunk-paths.mjs","names":[],"sources":["../../src/paths.ts"],"sourcesContent":["//\n// Copyright 2025 DXOS.org\n//\n\nimport { GraphPath } from '@dxos/app-toolkit';\nimport { Channel } from '@dxos/types';\n\nconst { getSectionPath: getChannelsPath, getObjectPath: getChannelPath } = GraphPath.createTypeSectionPaths(\n Channel.Channel,\n { groupId: GraphPath.GroupSegments.communications },\n);\n\nexport { getChannelPath, getChannelsPath };\n"],"mappings":";;;AAOA,IAAM,EAAE,gBAAgB,iBAAiB,eAAe,mBAAmB,UAAU,uBACnF,QAAQ,SACR,EAAE,SAAS,UAAU,cAAc,eAAe,CACpD"}
@@ -0,0 +1,38 @@
1
+ import { Surface } from "@dxos/app-framework/ui";
2
+ import { Capabilities, Capability } from "@dxos/app-framework";
3
+ import { Channel, Thread } from "@dxos/types";
4
+ import { AppSurface } from "@dxos/app-toolkit/ui";
5
+ import * as Effect from "effect/Effect";
6
+ import { ChannelArticle, ThreadArticle } from "#containers";
7
+ //#region src/capabilities/react-surface.ts
8
+ var react_surface_default = Capability.makeModule(() => Effect.succeed(Capability.contributes(Capabilities.ReactSurface, [
9
+ Surface.create({
10
+ id: "channel",
11
+ filter: AppSurface.object(AppSurface.Article, Channel.Channel),
12
+ component: ChannelArticle,
13
+ props: ({ role, data: { subject, attendableId } }) => ({
14
+ role,
15
+ subject,
16
+ attendableId
17
+ })
18
+ }),
19
+ Surface.create({
20
+ id: "chatCompanion",
21
+ filter: AppSurface.allOf(AppSurface.literal(AppSurface.Article, "chat"), AppSurface.companion(AppSurface.Article, Channel.Channel)),
22
+ component: ChannelArticle,
23
+ props: ({ data: { companionTo } }) => ({
24
+ subject: companionTo,
25
+ chatOnly: true
26
+ })
27
+ }),
28
+ Surface.create({
29
+ id: "thread",
30
+ filter: AppSurface.object(AppSurface.Article, Thread.Thread),
31
+ component: ThreadArticle,
32
+ props: ({ data: { subject } }) => ({ thread: subject })
33
+ })
34
+ ])));
35
+ //#endregion
36
+ export { react_surface_default as default };
37
+
38
+ //# sourceMappingURL=chunk-react-surface.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chunk-react-surface.mjs","names":[],"sources":["../../src/capabilities/react-surface.ts"],"sourcesContent":["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\n\nimport { Capabilities, Capability } from '@dxos/app-framework';\nimport { Surface } from '@dxos/app-framework/ui';\nimport { AppSurface } from '@dxos/app-toolkit/ui';\nimport { Channel, Thread } from '@dxos/types';\n\nimport { ChannelArticle, ThreadArticle } from '#containers';\n\nexport default Capability.makeModule(() =>\n Effect.succeed(\n Capability.contributes(Capabilities.ReactSurface, [\n Surface.create({\n id: 'channel',\n filter: AppSurface.object(AppSurface.Article, Channel.Channel),\n component: ChannelArticle,\n props: ({ role, data: { subject, attendableId } }) => ({ role, subject, attendableId }),\n }),\n Surface.create({\n id: 'chatCompanion',\n filter: AppSurface.allOf(\n AppSurface.literal(AppSurface.Article, 'chat'),\n AppSurface.companion(AppSurface.Article, Channel.Channel),\n ),\n component: ChannelArticle,\n props: ({ data: { companionTo } }) => ({ subject: companionTo, chatOnly: true }),\n }),\n // TODO(burdon): Disambiguate with Channel.\n Surface.create({\n id: 'thread',\n filter: AppSurface.object(AppSurface.Article, Thread.Thread),\n component: ThreadArticle,\n props: ({ data: { subject } }) => ({ thread: subject }),\n }),\n ]),\n ),\n);\n"],"mappings":";;;;;;;AAaA,IAAA,wBAAe,WAAW,iBACxB,OAAO,QACL,WAAW,YAAY,aAAa,cAAc;CAChD,QAAQ,OAAO;EACb,IAAI;EACJ,QAAQ,WAAW,OAAO,WAAW,SAAS,QAAQ,OAAO;EAC7D,WAAW;EACX,QAAQ,EAAE,MAAM,MAAM,EAAE,SAAS,sBAAsB;GAAE;GAAM;GAAS;EAAa;CACvF,CAAC;CACD,QAAQ,OAAO;EACb,IAAI;EACJ,QAAQ,WAAW,MACjB,WAAW,QAAQ,WAAW,SAAS,MAAM,GAC7C,WAAW,UAAU,WAAW,SAAS,QAAQ,OAAO,CAC1D;EACA,WAAW;EACX,QAAQ,EAAE,MAAM,EAAE,qBAAqB;GAAE,SAAS;GAAa,UAAU;EAAK;CAChF,CAAC;CAED,QAAQ,OAAO;EACb,IAAI;EACJ,QAAQ,WAAW,OAAO,WAAW,SAAS,OAAO,MAAM;EAC3D,WAAW;EACX,QAAQ,EAAE,MAAM,EAAE,iBAAiB,EAAE,QAAQ,QAAQ;CACvD,CAAC;AACH,CAAC,CACH,CACF"}
@@ -0,0 +1,99 @@
1
+ import * as Schema from "effect/Schema";
2
+ import * as SchemaAST from "effect/SchemaAST";
3
+ import { Capability } from "@dxos/app-framework";
4
+ import { meta } from "#meta";
5
+ import { Operation } from "@dxos/compute";
6
+ import { DXN, Key, Type } from "@dxos/echo";
7
+ import { Actor, Channel } from "@dxos/types";
8
+ //#region \0rolldown/runtime.js
9
+ var __defProp = Object.defineProperty;
10
+ var __exportAll = (all, no_symbols) => {
11
+ let target = {};
12
+ for (var name in all) __defProp(target, name, {
13
+ get: all[name],
14
+ enumerable: true
15
+ });
16
+ if (!no_symbols) __defProp(target, Symbol.toStringTag, { value: "Module" });
17
+ return target;
18
+ };
19
+ //#endregion
20
+ //#region src/types/channel-backend.ts
21
+ /** Finds the provider matching a `Channel.backend.kind`. */
22
+ var resolveProvider = (providers, kind) => providers.find((provider) => provider.kind === kind);
23
+ /** Throws if two providers share a `kind` (which would make resolution order-dependent). */
24
+ var assertUniqueKinds = (providers) => {
25
+ const seen = /* @__PURE__ */ new Set();
26
+ for (const provider of providers) {
27
+ if (seen.has(provider.kind)) throw new Error(`Duplicate channel backend kind: ${provider.kind}`);
28
+ seen.add(provider.kind);
29
+ }
30
+ };
31
+ /**
32
+ * Builds the create-channel form schema from the registered providers.
33
+ *
34
+ * With a single provider whose create-fields are empty the form is just a
35
+ * `name` field (today's behaviour). With multiple providers (or extra fields)
36
+ * it becomes `{ name?, backend: Union(<{ kind: Literal(p.kind) } & p.createFields>) }`,
37
+ * which react-ui-form renders as a `kind` Select plus the selected branch's fields.
38
+ */
39
+ var buildChannelFormSchema = (providers) => {
40
+ assertUniqueKinds(providers);
41
+ if (!(providers.length > 1 || providers.some((provider) => fieldCount(provider.createFields) > 0))) return Schema.Struct({ name: Schema.optional(Schema.String) });
42
+ const branches = providers.map((provider) => Schema.extend(Schema.Struct({ kind: Schema.Literal(provider.kind) }), provider.createFields));
43
+ const backend = branches.length === 1 ? branches[0] : Schema.Union(...branches);
44
+ return Schema.Struct({
45
+ name: Schema.optional(Schema.String),
46
+ backend
47
+ });
48
+ };
49
+ var fieldCount = (schema) => SchemaAST.getPropertySignatures(schema.ast).length;
50
+ //#endregion
51
+ //#region src/types/ThreadCapabilities.ts
52
+ var ThreadCapabilities_exports = /* @__PURE__ */ __exportAll({ ChannelBackend: () => ChannelBackend });
53
+ /** Registry of channel-message backends. Collect with `Capability.getAll`. */
54
+ var ChannelBackend = Capability.make(`${meta.profile.key}.capability.channel-backend`);
55
+ //#endregion
56
+ //#region src/types/ThreadOperation.ts
57
+ var ThreadOperation_exports = /* @__PURE__ */ __exportAll({
58
+ AppendChannelMessage: () => AppendChannelMessage,
59
+ CreateChannel: () => CreateChannel
60
+ });
61
+ var makeKey = (name) => DXN.make(`${meta.profile.key}.operation.${name}`);
62
+ var CreateChannel = Operation.make({
63
+ meta: {
64
+ key: makeKey("createChannel"),
65
+ name: "Create Channel",
66
+ icon: "ph--hash--regular"
67
+ },
68
+ services: [Capability.Service],
69
+ input: Schema.Struct({
70
+ spaceId: Key.SpaceId,
71
+ name: Schema.optional(Schema.String),
72
+ /** Backend provider id; defaults to the local feed backend. */
73
+ kind: Schema.optional(Schema.String),
74
+ /** Per-backend create options passed to the provider's makeConfig. */
75
+ options: Schema.optional(Schema.Record({
76
+ key: Schema.String,
77
+ value: Schema.Any
78
+ }))
79
+ }),
80
+ output: Schema.Struct({ object: Type.getSchema(Channel.Channel) })
81
+ });
82
+ var AppendChannelMessage = Operation.make({
83
+ meta: {
84
+ key: makeKey("appendChannelMessage"),
85
+ name: "Append Channel Message",
86
+ icon: "ph--chat-text--regular"
87
+ },
88
+ services: [Capability.Service],
89
+ input: Schema.Struct({
90
+ channel: Type.getSchema(Channel.Channel),
91
+ sender: Actor.Actor,
92
+ text: Schema.String
93
+ }),
94
+ output: Schema.Void
95
+ });
96
+ //#endregion
97
+ export { ThreadCapabilities_exports as a, resolveProvider as c, ChannelBackend as i, CreateChannel as n, assertUniqueKinds as o, ThreadOperation_exports as r, buildChannelFormSchema as s, AppendChannelMessage as t };
98
+
99
+ //# sourceMappingURL=chunk-types.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chunk-types.mjs","names":[],"sources":["../../src/types/channel-backend.ts","../../src/types/ThreadCapabilities.ts","../../src/types/ThreadOperation.ts"],"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 { DXN, Key, Type } from '@dxos/echo';\n// Person is referenced in Actor.Actor's inferred type; importing it allows TypeScript to name\n// it in the emitted .d.ts for AppendChannelMessage.\n// eslint-disable-next-line unused-imports/no-unused-imports\nimport { Actor, Channel, type Person } 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: Database.Service 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"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAUA,IAAa,mBACX,WACA,SAC0D,UAAU,MAAM,aAAa,SAAS,SAAS,IAAI;;AAG/G,IAAa,qBAAqB,cAA0E;CAC1G,MAAM,uBAAO,IAAI,IAAY;CAC7B,KAAK,MAAM,YAAY,WAAW;EAChC,IAAI,KAAK,IAAI,SAAS,IAAI,GACxB,MAAM,IAAI,MAAM,mCAAmC,SAAS,MAAM;EAEpE,KAAK,IAAI,SAAS,IAAI;CACxB;AACF;;;;;;;;;AAUA,IAAa,0BACX,cAC+B;CAC/B,kBAAkB,SAAS;CAE3B,IAAI,EADkB,UAAU,SAAS,KAAK,UAAU,MAAM,aAAa,WAAW,SAAS,YAAY,IAAI,CAAC,IAE9G,OAAO,OAAO,OAAO,EAAE,MAAM,OAAO,SAAS,OAAO,MAAM,EAAE,CAAC;CAG/D,MAAM,WAAW,UAAU,KAAK,aAC9B,OAAO,OAAO,OAAO,OAAO,EAAE,MAAM,OAAO,QAAQ,SAAS,IAAI,EAAE,CAAC,GAAG,SAAS,YAAY,CAC7F;CACA,MAAM,UAAU,SAAS,WAAW,IAAI,SAAS,KAAK,OAAO,MAAM,GAAG,QAAQ;CAC9E,OAAO,OAAO,OAAO;EACnB,MAAM,OAAO,SAAS,OAAO,MAAM;EACnC;CACF,CAAC;AACH;AAEA,IAAM,cAAc,WAA+C,UAAU,sBAAsB,OAAO,GAAG,CAAC,CAAC;;;;;ACP/G,IAAa,iBAAiB,WAAW,KAA6B,GAAG,KAAK,QAAQ,IAAI,4BAA4B;;;;;;;AC5BtH,IAAM,WAAW,SAAiB,IAAI,KAAK,GAAG,KAAK,QAAQ,IAAI,aAAa,MAAM;AAElF,IAAa,gBAAgB,UAAU,KAAK;CAC1C,MAAM;EAAE,KAAK,QAAQ,eAAe;EAAG,MAAM;EAAkB,MAAM;CAAoB;CACzF,UAAU,CAAC,WAAW,OAAO;CAC7B,OAAO,OAAO,OAAO;EACnB,SAAS,IAAI;EACb,MAAM,OAAO,SAAS,OAAO,MAAM;;EAEnC,MAAM,OAAO,SAAS,OAAO,MAAM;;EAEnC,SAAS,OAAO,SAAS,OAAO,OAAO;GAAE,KAAK,OAAO;GAAQ,OAAO,OAAO;EAAI,CAAC,CAAC;CACnF,CAAC;CACD,QAAQ,OAAO,OAAO,EACpB,QAAQ,KAAK,UAAU,QAAQ,OAAO,EACxC,CAAC;AACH,CAAC;AAED,IAAa,uBAAuB,UAAU,KAAK;CACjD,MAAM;EACJ,KAAK,QAAQ,sBAAsB;EACnC,MAAM;EACN,MAAM;CACR;CAGA,UAAU,CAAC,WAAW,OAAO;CAC7B,OAAO,OAAO,OAAO;EACnB,SAAS,KAAK,UAAU,QAAQ,OAAO;EACvC,QAAQ,MAAM;EACd,MAAM,OAAO;CACf,CAAC;CACD,QAAQ,OAAO;AACjB,CAAC"}
@@ -0,0 +1,105 @@
1
+ import { useCallback, useMemo } from "react";
2
+ import { Surface } from "@dxos/app-framework/ui";
3
+ import { meta } from "#meta";
4
+ import { hexToFallback, toFallback } from "@dxos/util";
5
+ import { AppSurface } from "@dxos/app-toolkit/ui";
6
+ import { Card, composable, useTranslation } from "@dxos/react-ui";
7
+ import { Thread } from "@dxos/react-ui-thread";
8
+ import { hoverableControls, hoverableFocusedWithinControls, mx } from "@dxos/ui-theme";
9
+ import { generateName } from "@dxos/display-name";
10
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
11
+ //#region src/util.ts
12
+ /**
13
+ * Stable hash for an arbitrary string — used as the avatar-fallback seed for
14
+ * external senders who have no DXOS identity (e.g. Slack/Discord-synced
15
+ * messages). djb2-ish, only stability matters.
16
+ *
17
+ * Coerced to unsigned 32-bit via `>>> 0` because `toFallback` does a plain
18
+ * modulo against `idEmoji.length * idHue.length` and JavaScript's `%`
19
+ * preserves the sign of the dividend — a negative hash would index
20
+ * `idEmoji[-x]` and `idHue[-x]` to `undefined`, causing the avatar to fall
21
+ * through to `Avatar.Content`'s default red/ghost.
22
+ */
23
+ var hashString = (s) => {
24
+ let h = 0;
25
+ for (let i = 0; i < s.length; i++) h = h * 31 + s.charCodeAt(i) | 0;
26
+ return h >>> 0;
27
+ };
28
+ var getMessageMetadata = (id, identity, fallbackSender, created) => {
29
+ const fallback = identity?.identityKey ? hexToFallback(identity.identityKey) : toFallback(hashString(fallbackSender?.name ?? fallbackSender?.email ?? "0"));
30
+ return {
31
+ id,
32
+ timestamp: created,
33
+ authorId: identity?.did,
34
+ authorName: identity?.displayName ?? (identity?.identityKey ? generateName(identity.identityKey) : void 0) ?? fallbackSender?.name ?? fallbackSender?.email,
35
+ authorAvatarProps: {
36
+ hue: identity?.data?.hue ?? fallback.hue,
37
+ emoji: identity?.data?.emoji ?? fallback.emoji
38
+ }
39
+ };
40
+ };
41
+ //#endregion
42
+ //#region src/components/MessageThread/MessageThread.tsx
43
+ /**
44
+ * Pure message-thread UI: message list + composer textbox + activity
45
+ * indicator, built on the `@dxos/react-ui-thread` primitives. Does not load
46
+ * data or invoke operations — the caller passes messages and an `onSend`
47
+ * callback. Used by `ChannelArticle` and `ThreadArticle`.
48
+ */
49
+ var MessageThread = composable(({ id, identity, members, messages, activity, onSend, autoFocus, current, readOnly, classNames }, forwardedRef) => {
50
+ const { t } = useTranslation(meta.profile.key);
51
+ const components = useMemo(() => ({ Object: ObjectTile }), []);
52
+ const textboxMetadata = useMemo(() => getMessageMetadata(id, identity), [id, identity]);
53
+ const getMetadata = useCallback((message) => {
54
+ const sender = members.find((member) => message.sender.identityDid && member.did === message.sender.identityDid || message.sender.identityKey && member.identityKey === message.sender.identityKey);
55
+ return getMessageMetadata(message.id, sender, message.sender, message.created);
56
+ }, [members]);
57
+ return /* @__PURE__ */ jsx(Thread.Root, {
58
+ getMetadata,
59
+ components,
60
+ identityDid: identity?.did,
61
+ editable: false,
62
+ children: /* @__PURE__ */ jsxs(Thread.Content, {
63
+ id,
64
+ current,
65
+ classNames: ["dx-container h-full border", classNames],
66
+ ref: forwardedRef,
67
+ children: [/* @__PURE__ */ jsx(Thread.Messages, {
68
+ id,
69
+ messages
70
+ }), !readOnly && /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(Thread.Textbox, {
71
+ ...textboxMetadata,
72
+ autoFocus,
73
+ placeholder: t("message.placeholder"),
74
+ onSend
75
+ }), /* @__PURE__ */ jsx(Thread.Status, {
76
+ activity,
77
+ children: t("activity.message")
78
+ })] })]
79
+ })
80
+ });
81
+ });
82
+ /**
83
+ * Object/reference message-block tile, injected into `Thread.Root` so that
84
+ * `@dxos/react-ui-thread` stays free of `@dxos/app-framework`. Renders the
85
+ * referenced subject via an app-framework `Surface` (the card role).
86
+ */
87
+ var ObjectTile = ({ subject }) => {
88
+ const Fallback = useCallback(() => /* @__PURE__ */ jsx("span", {
89
+ className: "p-1 text-sm text-description",
90
+ children: subject.id
91
+ }), [subject]);
92
+ return /* @__PURE__ */ jsx(Card.Root, {
93
+ classNames: mx("grid col-span-3 py-1 pr-4", hoverableControls, hoverableFocusedWithinControls),
94
+ children: /* @__PURE__ */ jsx(Surface.Surface, {
95
+ type: AppSurface.CardContent,
96
+ limit: 1,
97
+ data: { subject },
98
+ fallback: Fallback
99
+ })
100
+ });
101
+ };
102
+ //#endregion
103
+ export { MessageThread };
104
+
105
+ //# sourceMappingURL=components.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"components.mjs","names":[],"sources":["../../src/util.ts","../../src/components/MessageThread/MessageThread.tsx"],"sourcesContent":["//\n// Copyright 2024 DXOS.org\n//\n\nimport { generateName } from '@dxos/display-name';\nimport { type MessageMetadata } from '@dxos/react-ui-thread';\nimport { hexToFallback, toFallback } from '@dxos/util';\n\n/**\n * Minimal author shape for message metadata. Satisfied by both the `@dxos/halo`\n * `Identity.Info` and `Space.Member` (hex `identityKey`, flat `displayName`/`data`).\n */\nexport type MessageAuthor = {\n did?: string;\n identityKey?: string;\n displayName?: string;\n // Arbitrary profile metadata (matches the `@dxos/halo` `Schema.Any`-valued `data`).\n data?: { readonly [key: string]: any };\n};\n\n/**\n * Stable hash for an arbitrary string — used as the avatar-fallback seed for\n * external senders who have no DXOS identity (e.g. Slack/Discord-synced\n * messages). djb2-ish, only stability matters.\n *\n * Coerced to unsigned 32-bit via `>>> 0` because `toFallback` does a plain\n * modulo against `idEmoji.length * idHue.length` and JavaScript's `%`\n * preserves the sign of the dividend — a negative hash would index\n * `idEmoji[-x]` and `idHue[-x]` to `undefined`, causing the avatar to fall\n * through to `Avatar.Content`'s default red/ghost.\n */\nconst hashString = (s: string): number => {\n let h = 0;\n for (let i = 0; i < s.length; i++) {\n h = (h * 31 + s.charCodeAt(i)) | 0;\n }\n return h >>> 0;\n};\n\nexport const getMessageMetadata = (\n id: string,\n identity?: MessageAuthor,\n /**\n * Externally-sourced sender info (Slack/Discord/etc). Used only when no\n * matching DXOS `identity` is available — provides `name`/`email` for the\n * author label and a stable seed for the avatar fallback.\n */\n fallbackSender?: { name?: string; email?: string },\n /** ISO date string when the message was sent; omitted for the composer's own metadata. */\n created?: string,\n): MessageMetadata => {\n const fallback = identity?.identityKey\n ? hexToFallback(identity.identityKey)\n : toFallback(hashString(fallbackSender?.name ?? fallbackSender?.email ?? '0'));\n return {\n id,\n timestamp: created,\n authorId: identity?.did,\n authorName:\n identity?.displayName ??\n (identity?.identityKey ? generateName(identity.identityKey) : undefined) ??\n fallbackSender?.name ??\n fallbackSender?.email,\n authorAvatarProps: {\n hue: identity?.data?.hue ?? fallback.hue,\n emoji: identity?.data?.emoji ?? fallback.emoji,\n },\n };\n};\n","//\n// Copyright 2026 DXOS.org\n//\n\nimport React, { useCallback, useMemo } from 'react';\n\nimport { Surface } from '@dxos/app-framework/ui';\nimport { AppSurface } from '@dxos/app-toolkit/ui';\nimport { type Identity, type Space } from '@dxos/halo';\nimport { Card, type ThemedClassName, composable, useTranslation } from '@dxos/react-ui';\nimport { type ObjectTileComponent, Thread } from '@dxos/react-ui-thread';\nimport { type Message } from '@dxos/types';\nimport { hoverableControls, hoverableFocusedWithinControls, mx } from '@dxos/ui-theme';\n\nimport { meta } from '#meta';\n\nimport { getMessageMetadata } from '../../util';\n\nexport type MessageThreadProps = ThemedClassName<{\n /** Stable id used for the underlying thread root and message metadata. */\n id: string;\n /** Identity used to attribute outgoing messages in the textbox metadata. */\n identity?: Identity.Info;\n /** Space members for rendering sender names/avatars on incoming messages. */\n members: readonly Space.Member[];\n /** Messages to render in order. */\n messages: readonly Message.Message[];\n /** Activity indicator (e.g. processing) shown beneath the textbox. */\n activity?: boolean;\n /** Autofocus textbox */\n autoFocus?: boolean;\n /** Marks the thread as the current/attended one. */\n current?: boolean | string;\n /**\n * When true, hide the composer textbox and activity indicator. Used for\n * channels whose source-of-truth lives elsewhere (e.g. externally-synced\n * Slack/Discord channels keyed by a foreign id) — sending isn't meaningful\n * because there is no local-write path back to the source.\n */\n readOnly?: boolean;\n /**\n * Called with the user's textbox content when they press send.\n * Returning `true` signals the message was accepted; the textbox is then cleared.\n */\n onSend: (text: string) => boolean;\n}>;\n\n/**\n * Pure message-thread UI: message list + composer textbox + activity\n * indicator, built on the `@dxos/react-ui-thread` primitives. Does not load\n * data or invoke operations — the caller passes messages and an `onSend`\n * callback. Used by `ChannelArticle` and `ThreadArticle`.\n */\nexport const MessageThread = composable<HTMLDivElement, MessageThreadProps>(\n ({ id, identity, members, messages, activity, onSend, autoFocus, current, readOnly, classNames }, forwardedRef) => {\n const { t } = useTranslation(meta.profile.key);\n\n const components = useMemo(() => ({ Object: ObjectTile }), []);\n\n const textboxMetadata = useMemo(() => getMessageMetadata(id, identity), [id, identity]);\n\n const getMetadata = useCallback(\n (message: Message.Message) => {\n // TODO(burdon): Factor out.\n const sender = members.find(\n (member) =>\n (message.sender.identityDid && member.did === message.sender.identityDid) ||\n (message.sender.identityKey && member.identityKey === message.sender.identityKey),\n );\n\n // Pass `message.sender` as the fallback so externally-synced messages\n // (Slack, etc.) display the source-side sender name instead of \"Anonymous\"\n // when no DXOS identity matches.\n return getMessageMetadata(message.id, sender, message.sender, message.created);\n },\n [members],\n );\n\n return (\n <Thread.Root getMetadata={getMetadata} components={components} identityDid={identity?.did} editable={false}>\n <Thread.Content\n id={id}\n current={current}\n classNames={['dx-container h-full border', classNames]}\n ref={forwardedRef}\n >\n <Thread.Messages id={id} messages={messages} />\n {!readOnly && (\n <>\n <Thread.Textbox\n {...textboxMetadata}\n autoFocus={autoFocus}\n placeholder={t('message.placeholder')}\n onSend={onSend}\n />\n <Thread.Status activity={activity}>{t('activity.message')}</Thread.Status>\n </>\n )}\n </Thread.Content>\n </Thread.Root>\n );\n },\n);\n\n/**\n * Object/reference message-block tile, injected into `Thread.Root` so that\n * `@dxos/react-ui-thread` stays free of `@dxos/app-framework`. Renders the\n * referenced subject via an app-framework `Surface` (the card role).\n */\nconst ObjectTile: ObjectTileComponent = ({ subject }) => {\n const Fallback = useCallback(() => <span className='p-1 text-sm text-description'>{subject.id}</span>, [subject]);\n return (\n <Card.Root classNames={mx('grid col-span-3 py-1 pr-4', hoverableControls, hoverableFocusedWithinControls)}>\n <Surface.Surface\n type={AppSurface.CardContent}\n limit={1}\n data={{ subject } satisfies AppSurface.ObjectCardData}\n fallback={Fallback}\n />\n </Card.Root>\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AA+BA,IAAM,cAAc,MAAsB;CACxC,IAAI,IAAI;CACR,KAAK,IAAI,IAAI,GAAG,IAAI,EAAE,QAAQ,KAC5B,IAAK,IAAI,KAAK,EAAE,WAAW,CAAC,IAAK;CAEnC,OAAO,MAAM;AACf;AAEA,IAAa,sBACX,IACA,UAMA,gBAEA,YACoB;CACpB,MAAM,WAAW,UAAU,cACvB,cAAc,SAAS,WAAW,IAClC,WAAW,WAAW,gBAAgB,QAAQ,gBAAgB,SAAS,GAAG,CAAC;CAC/E,OAAO;EACL;EACA,WAAW;EACX,UAAU,UAAU;EACpB,YACE,UAAU,gBACT,UAAU,cAAc,aAAa,SAAS,WAAW,IAAI,KAAA,MAC9D,gBAAgB,QAChB,gBAAgB;EAClB,mBAAmB;GACjB,KAAK,UAAU,MAAM,OAAO,SAAS;GACrC,OAAO,UAAU,MAAM,SAAS,SAAS;EAC3C;CACF;AACF;;;;;;;;;ACfA,IAAa,gBAAgB,YAC1B,EAAE,IAAI,UAAU,SAAS,UAAU,UAAU,QAAQ,WAAW,SAAS,UAAU,cAAc,iBAAiB;CACjH,MAAM,EAAE,MAAM,eAAe,KAAK,QAAQ,GAAG;CAE7C,MAAM,aAAa,eAAe,EAAE,QAAQ,WAAW,IAAI,CAAC,CAAC;CAE7D,MAAM,kBAAkB,cAAc,mBAAmB,IAAI,QAAQ,GAAG,CAAC,IAAI,QAAQ,CAAC;CAEtF,MAAM,cAAc,aACjB,YAA6B;EAE5B,MAAM,SAAS,QAAQ,MACpB,WACE,QAAQ,OAAO,eAAe,OAAO,QAAQ,QAAQ,OAAO,eAC5D,QAAQ,OAAO,eAAe,OAAO,gBAAgB,QAAQ,OAAO,WACzE;EAKA,OAAO,mBAAmB,QAAQ,IAAI,QAAQ,QAAQ,QAAQ,QAAQ,OAAO;CAC/E,GACA,CAAC,OAAO,CACV;CAEA,OACE,oBAAC,OAAO,MAAR;EAA0B;EAAyB;EAAY,aAAa,UAAU;EAAK,UAAU;YACnG,qBAAC,OAAO,SAAR;GACM;GACK;GACT,YAAY,CAAC,8BAA8B,UAAU;GACrD,KAAK;aAJP,CAME,oBAAC,OAAO,UAAR;IAAqB;IAAc;GAAW,CAAA,GAC7C,CAAC,YACA,qBAAA,UAAA,EAAA,UAAA,CACE,oBAAC,OAAO,SAAR;IACE,GAAI;IACO;IACX,aAAa,EAAE,qBAAqB;IAC5B;GACT,CAAA,GACD,oBAAC,OAAO,QAAR;IAAyB;cAAW,EAAE,kBAAkB;GAAiB,CAAA,CACzE,EAAA,CAAA,CAEU;;CACL,CAAA;AAEjB,CACF;;;;;;AAOA,IAAM,cAAmC,EAAE,cAAc;CACvD,MAAM,WAAW,kBAAkB,oBAAC,QAAD;EAAM,WAAU;YAAgC,QAAQ;CAAS,CAAA,GAAG,CAAC,OAAO,CAAC;CAChH,OACE,oBAAC,KAAK,MAAN;EAAW,YAAY,GAAG,6BAA6B,mBAAmB,8BAA8B;YACtG,oBAAC,QAAQ,SAAT;GACE,MAAM,WAAW;GACjB,OAAO;GACP,MAAM,EAAE,QAAQ;GAChB,UAAU;EACX,CAAA;CACQ,CAAA;AAEf"}
@@ -0,0 +1,9 @@
1
+ import { lazy } from "react";
2
+ //#region src/containers/index.ts
3
+ var ChannelCreatePanel = lazy(() => import("./chunk-ChannelCreatePanel.mjs"));
4
+ var ChannelArticle = lazy(() => import("./chunk-ChannelArticle.mjs"));
5
+ var ThreadArticle = lazy(() => import("./chunk-ThreadArticle.mjs"));
6
+ //#endregion
7
+ export { ChannelArticle, ChannelCreatePanel, ThreadArticle };
8
+
9
+ //# sourceMappingURL=containers.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"containers.mjs","names":[],"sources":["../../src/containers/index.ts"],"sourcesContent":["//\n// Copyright 2025 DXOS.org\n//\n\nimport { type ComponentType, lazy } from 'react';\n\nexport const ChannelCreatePanel: ComponentType<any> = lazy(() => import('./ChannelCreatePanel'));\nexport const ChannelArticle: ComponentType<any> = lazy(() => import('./ChannelArticle'));\nexport const ThreadArticle: ComponentType<any> = lazy(() => import('./ThreadArticle'));\n"],"mappings":";;AAMA,IAAa,qBAAyC,WAAW,OAAO,iCAAuB;AAC/F,IAAa,iBAAqC,WAAW,OAAO,6BAAmB;AACvF,IAAa,gBAAoC,WAAW,OAAO,4BAAkB"}
@@ -0,0 +1,45 @@
1
+ import { c as resolveProvider, i as ChannelBackend } from "./chunk-types.mjs";
2
+ import { useCallback, useEffect, useMemo, useRef, useState, useSyncExternalStore } from "react";
3
+ import { useCapabilities } from "@dxos/app-framework/ui";
4
+ //#region src/hooks/useMessages.ts
5
+ var EMPTY = [];
6
+ /** Reactive message list for a channel, resolved through its backend provider. */
7
+ var useMessages = (channel) => {
8
+ const providers = useCapabilities(ChannelBackend);
9
+ const provider = useMemo(() => channel ? resolveProvider(providers, channel.backend.kind) : void 0, [providers, channel]);
10
+ const ref = useRef(EMPTY);
11
+ return useSyncExternalStore(useCallback((onChange) => {
12
+ if (!provider || !channel) return () => {};
13
+ return provider.subscribe(channel, (messages) => {
14
+ ref.current = messages;
15
+ onChange();
16
+ });
17
+ }, [provider, channel]), () => ref.current);
18
+ };
19
+ //#endregion
20
+ //#region src/hooks/useStatus.ts
21
+ var useStatus = (space, channel) => {
22
+ const [processing, setProcessing] = useState(false);
23
+ useEffect(() => {
24
+ if (!space || !channel) return;
25
+ const unsubscribe = space.listen(`status/${channel}`, (status) => {
26
+ const { event } = status.payload ?? {};
27
+ setProcessing(event === "processing");
28
+ });
29
+ const t = setInterval(() => {
30
+ setProcessing((prev) => {
31
+ if (typeof prev?.ts === "number" && Date.now() - prev.ts > 3e4) return;
32
+ else return prev;
33
+ });
34
+ }, 1e3);
35
+ return () => {
36
+ unsubscribe();
37
+ clearInterval(t);
38
+ };
39
+ }, [space, channel]);
40
+ return processing;
41
+ };
42
+ //#endregion
43
+ export { useMessages, useStatus };
44
+
45
+ //# sourceMappingURL=hooks.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hooks.mjs","names":[],"sources":["../../src/hooks/useMessages.ts","../../src/hooks/useStatus.ts"],"sourcesContent":["//\n// Copyright 2026 DXOS.org\n//\n\nimport { useCallback, useMemo, useRef, useSyncExternalStore } from 'react';\n\nimport { useCapabilities } from '@dxos/app-framework/ui';\nimport { type Channel, type Message } from '@dxos/types';\n\nimport { ThreadCapabilities, resolveProvider } from '../types';\n\nconst EMPTY: readonly Message.Message[] = [];\n\n/** Reactive message list for a channel, resolved through its backend provider. */\nexport const useMessages = (channel: Channel.Channel | undefined): readonly Message.Message[] => {\n const providers = useCapabilities(ThreadCapabilities.ChannelBackend);\n const provider = useMemo(\n () => (channel ? resolveProvider(providers, channel.backend.kind) : undefined),\n [providers, channel],\n );\n\n const ref = useRef<readonly Message.Message[]>(EMPTY);\n const subscribe = useCallback(\n (onChange: () => void) => {\n if (!provider || !channel) {\n return () => {};\n }\n return provider.subscribe(channel, (messages) => {\n ref.current = messages;\n onChange();\n });\n },\n [provider, channel],\n );\n\n return useSyncExternalStore(subscribe, () => ref.current);\n};\n","//\n// Copyright 2024 DXOS.org\n//\n\nimport { useEffect, useState } from 'react';\n\nimport { type Space } from '@dxos/react-client/echo';\n\n// TODO(burdon): Generalize and factor out.\nexport const useStatus = (space?: Space, channel?: string) => {\n const [processing, setProcessing] = useState(false);\n useEffect(() => {\n if (!space || !channel) {\n return;\n }\n\n const unsubscribe = space.listen(`status/${channel}`, (status) => {\n const { event } = status.payload ?? {};\n setProcessing(event === 'processing');\n });\n\n const t = setInterval(() => {\n setProcessing((prev: any) => {\n if (typeof prev?.ts === 'number' && Date.now() - prev.ts > 30_000) {\n return undefined;\n } else {\n return prev;\n }\n });\n }, 1_000);\n\n return () => {\n unsubscribe();\n clearInterval(t);\n };\n }, [space, channel]);\n\n return processing;\n};\n"],"mappings":";;;;AAWA,IAAM,QAAoC,CAAC;;AAG3C,IAAa,eAAe,YAAqE;CAC/F,MAAM,YAAY,gBAAgB,cAAiC;CACnE,MAAM,WAAW,cACR,UAAU,gBAAgB,WAAW,QAAQ,QAAQ,IAAI,IAAI,KAAA,GACpE,CAAC,WAAW,OAAO,CACrB;CAEA,MAAM,MAAM,OAAmC,KAAK;CAcpD,OAAO,qBAbW,aACf,aAAyB;EACxB,IAAI,CAAC,YAAY,CAAC,SAChB,aAAa,CAAC;EAEhB,OAAO,SAAS,UAAU,UAAU,aAAa;GAC/C,IAAI,UAAU;GACd,SAAS;EACX,CAAC;CACH,GACA,CAAC,UAAU,OAAO,CAGQ,SAAiB,IAAI,OAAO;AAC1D;;;AC3BA,IAAa,aAAa,OAAe,YAAqB;CAC5D,MAAM,CAAC,YAAY,iBAAiB,SAAS,KAAK;CAClD,gBAAgB;EACd,IAAI,CAAC,SAAS,CAAC,SACb;EAGF,MAAM,cAAc,MAAM,OAAO,UAAU,YAAY,WAAW;GAChE,MAAM,EAAE,UAAU,OAAO,WAAW,CAAC;GACrC,cAAc,UAAU,YAAY;EACtC,CAAC;EAED,MAAM,IAAI,kBAAkB;GAC1B,eAAe,SAAc;IAC3B,IAAI,OAAO,MAAM,OAAO,YAAY,KAAK,IAAI,IAAI,KAAK,KAAK,KACzD;SAEA,OAAO;GAEX,CAAC;EACH,GAAG,GAAK;EAER,aAAa;GACX,YAAY;GACZ,cAAc,CAAC;EACjB;CACF,GAAG,CAAC,OAAO,OAAO,CAAC;CAEnB,OAAO;AACT"}
@@ -0,0 +1,5 @@
1
+ import { a as ThreadCapabilities_exports, c as resolveProvider, o as assertUniqueKinds, r as ThreadOperation_exports, s as buildChannelFormSchema } from "./chunk-types.mjs";
2
+ import { useMessages, useStatus } from "./hooks.mjs";
3
+ import { n as meta, t as THREAD_ITEM } from "./chunk-meta.mjs";
4
+ import { n as getChannelsPath, t as getChannelPath } from "./chunk-paths.mjs";
5
+ export { THREAD_ITEM, ThreadCapabilities_exports as ThreadCapabilities, ThreadOperation_exports as ThreadOperation, assertUniqueKinds, buildChannelFormSchema, getChannelPath, getChannelsPath, meta, resolveProvider, useMessages, useStatus };
@@ -0,0 +1,2 @@
1
+ import { n as meta, t as THREAD_ITEM } from "./chunk-meta.mjs";
2
+ export { THREAD_ITEM, meta };
@@ -0,0 +1,7 @@
1
+ import { OperationHandlerSet } from "@dxos/compute";
2
+ //#region src/operations/index.ts
3
+ var ThreadOperationHandlerSet = OperationHandlerSet.lazy(() => import("./chunk-append-channel-message.mjs"), () => import("./chunk-create-channel.mjs"));
4
+ //#endregion
5
+ export { ThreadOperationHandlerSet };
6
+
7
+ //# sourceMappingURL=operations.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"operations.mjs","names":[],"sources":["../../src/operations/index.ts"],"sourcesContent":["//\n// Copyright 2025 DXOS.org\n//\n\nimport { OperationHandlerSet } from '@dxos/compute';\n\nexport const ThreadOperationHandlerSet = OperationHandlerSet.lazy(\n () => import('./append-channel-message'),\n () => import('./create-channel'),\n);\n"],"mappings":";;AAMA,IAAa,4BAA4B,oBAAoB,WACrD,OAAO,6CACP,OAAO,6BACf"}
@@ -0,0 +1,9 @@
1
+ import { n as meta } from "./chunk-meta.mjs";
2
+ import { ThreadOperationHandlerSet } from "./operations.mjs";
3
+ import { Plugin } from "@dxos/app-framework";
4
+ //#region src/plugin.ts
5
+ var ThreadPlugin = Plugin.lazy(meta, () => import("#plugin"));
6
+ //#endregion
7
+ export { ThreadOperationHandlerSet, ThreadPlugin };
8
+
9
+ //# sourceMappingURL=plugin.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plugin.mjs","names":[],"sources":["../../src/plugin.ts"],"sourcesContent":["//\n// Copyright 2023 DXOS.org\n//\n\nimport { Plugin } from '@dxos/app-framework';\n\nimport { meta } from './meta';\n\nexport const ThreadPlugin = Plugin.lazy(meta, () => import('#plugin'));\n\nexport { ThreadOperationHandlerSet } from './operations';\n"],"mappings":";;;;AAQA,IAAa,eAAe,OAAO,KAAK,YAAY,OAAO,UAAU"}