@dxos/plugin-thread 0.11.0 → 0.12.0-next-bbabc02363f18d7643ea4160e3a7a7809870fd0d
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/ChannelBackend.mjs +42 -0
- package/dist/lib/ChannelBackend.mjs.map +1 -0
- package/dist/lib/ThreadCapabilities.mjs +11 -0
- package/dist/lib/ThreadCapabilities.mjs.map +1 -0
- package/dist/lib/ThreadEvents.mjs +15 -0
- package/dist/lib/ThreadEvents.mjs.map +1 -0
- package/dist/lib/ThreadOperation.mjs +51 -0
- package/dist/lib/ThreadOperation.mjs.map +1 -0
- package/dist/lib/ThreadPlugin.mjs +5 -9
- package/dist/lib/ThreadPlugin.mjs.map +1 -1
- package/dist/lib/ThreadPlugin.node.mjs +4 -8
- package/dist/lib/ThreadPlugin.node.mjs.map +1 -1
- package/dist/lib/ThreadPlugin.workerd.mjs +4 -8
- package/dist/lib/ThreadPlugin.workerd.mjs.map +1 -1
- package/dist/lib/capabilities/node.mjs +10 -3
- package/dist/lib/capabilities/node.mjs.map +1 -1
- package/dist/lib/capabilities.mjs +14 -6
- package/dist/lib/capabilities.mjs.map +1 -1
- package/dist/lib/chunk-ChannelArticle.mjs +9 -7
- package/dist/lib/chunk-ChannelArticle.mjs.map +1 -1
- package/dist/lib/chunk-ChannelCreatePanel.mjs +4 -3
- package/dist/lib/chunk-ChannelCreatePanel.mjs.map +1 -1
- package/dist/lib/chunk-ThreadArticle.mjs +1 -1
- package/dist/lib/chunk-app-graph-builder.mjs +11 -7
- package/dist/lib/chunk-app-graph-builder.mjs.map +1 -1
- package/dist/lib/chunk-append-channel-message.mjs +6 -4
- package/dist/lib/chunk-append-channel-message.mjs.map +1 -1
- package/dist/lib/chunk-channel-backend-feed.mjs +4 -4
- package/dist/lib/chunk-channel-backend-feed.mjs.map +1 -1
- package/dist/lib/chunk-create-channel.mjs +6 -4
- package/dist/lib/chunk-create-channel.mjs.map +1 -1
- package/dist/lib/chunk-create-object.mjs +7 -5
- package/dist/lib/chunk-create-object.mjs.map +1 -1
- package/dist/lib/chunk-meta.mjs +1 -1
- package/dist/lib/chunk-meta.mjs.map +1 -1
- package/dist/lib/chunk-operation-handler.mjs +3 -2
- package/dist/lib/chunk-operation-handler.mjs.map +1 -1
- package/dist/lib/chunk-paths.mjs +1 -1
- package/dist/lib/chunk-paths.mjs.map +1 -1
- package/dist/lib/chunk-react-surface.mjs +4 -3
- package/dist/lib/chunk-react-surface.mjs.map +1 -1
- package/dist/lib/chunk-rolldown-runtime.mjs +13 -0
- package/dist/lib/components.mjs +1 -1
- package/dist/lib/hooks.mjs +2 -1
- package/dist/lib/hooks.mjs.map +1 -1
- package/dist/lib/index.mjs +5 -2
- package/dist/lib/operations.mjs +4 -2
- package/dist/lib/operations.mjs.map +1 -1
- package/dist/lib/plugin.mjs +2 -3
- package/dist/lib/plugin.mjs.map +1 -1
- package/dist/types/src/ThreadPlugin.d.ts +1 -1
- package/dist/types/src/ThreadPlugin.d.ts.map +1 -1
- package/dist/types/src/ThreadPlugin.node.d.ts +1 -1
- package/dist/types/src/ThreadPlugin.node.d.ts.map +1 -1
- package/dist/types/src/ThreadPlugin.workerd.d.ts +1 -1
- package/dist/types/src/ThreadPlugin.workerd.d.ts.map +1 -1
- package/dist/types/src/capabilities/app-graph-builder.d.ts +2 -2
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
- package/dist/types/src/capabilities/channel-backend-feed.d.ts +3 -3
- package/dist/types/src/capabilities/channel-backend-feed.d.ts.map +1 -1
- package/dist/types/src/capabilities/create-object.d.ts +2 -2
- package/dist/types/src/capabilities/create-object.d.ts.map +1 -1
- package/dist/types/src/capabilities/index.d.ts +6 -7
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/node.d.ts +3 -4
- package/dist/types/src/capabilities/node.d.ts.map +1 -1
- package/dist/types/src/capabilities/operation-handler.d.ts +2 -3
- package/dist/types/src/capabilities/operation-handler.d.ts.map +1 -1
- package/dist/types/src/capabilities/react-surface.d.ts +2 -2
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
- package/dist/types/src/containers/ChannelArticle/ChannelArticle.d.ts.map +1 -1
- package/dist/types/src/containers/ChannelArticle/ChannelArticle.stories.d.ts +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/ThreadArticle/ThreadArticle.stories.d.ts +1 -1
- package/dist/types/src/containers/ThreadArticle/ThreadArticle.stories.d.ts.map +1 -1
- package/dist/types/src/hooks/useMessages.d.ts.map +1 -1
- package/dist/types/src/index.d.ts +4 -1
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/operations/append-channel-message.d.ts +2 -2
- package/dist/types/src/operations/append-channel-message.d.ts.map +1 -1
- package/dist/types/src/operations/create-channel.d.ts +2 -2
- package/dist/types/src/operations/create-channel.d.ts.map +1 -1
- package/dist/types/src/operations/index.d.ts +1 -1
- package/dist/types/src/operations/index.d.ts.map +1 -1
- package/dist/types/src/plugin.d.ts +1 -2
- package/dist/types/src/plugin.d.ts.map +1 -1
- package/dist/types/src/types/{channel-backend.d.ts → ChannelBackend.d.ts} +1 -1
- package/dist/types/src/types/ChannelBackend.d.ts.map +1 -0
- package/dist/types/src/types/ChannelBackend.test.d.ts +2 -0
- package/dist/types/src/types/ChannelBackend.test.d.ts.map +1 -0
- package/dist/types/src/types/ThreadCapabilities.d.ts +2 -2
- package/dist/types/src/types/ThreadCapabilities.d.ts.map +1 -1
- package/dist/types/src/types/ThreadEvents.d.ts +8 -0
- package/dist/types/src/types/ThreadEvents.d.ts.map +1 -0
- package/dist/types/src/types/ThreadOperation.d.ts +2 -2
- package/dist/types/src/types/ThreadOperation.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +67 -43
- package/src/ThreadPlugin.node.ts +5 -11
- package/src/ThreadPlugin.tsx +17 -18
- package/src/ThreadPlugin.workerd.ts +5 -11
- package/src/capabilities/app-graph-builder.ts +13 -7
- package/src/capabilities/channel-backend-feed.ts +4 -4
- package/src/capabilities/create-object.ts +8 -6
- package/src/capabilities/index.ts +22 -9
- package/src/capabilities/node.ts +17 -10
- package/src/capabilities/operation-handler.ts +4 -4
- package/src/capabilities/react-surface.ts +3 -2
- package/src/containers/ChannelArticle/ChannelArticle.stories.tsx +6 -6
- package/src/containers/ChannelArticle/ChannelArticle.tsx +9 -4
- package/src/containers/ChannelCreatePanel/ChannelCreatePanel.tsx +4 -3
- package/src/containers/ThreadArticle/ThreadArticle.stories.tsx +3 -2
- package/src/hooks/useMessages.ts +3 -2
- package/src/index.ts +5 -1
- package/src/meta.ts +1 -1
- package/src/operations/append-channel-message.ts +6 -4
- package/src/operations/create-channel.ts +6 -4
- package/src/operations/index.ts +8 -5
- package/src/paths.ts +1 -1
- package/src/plugin.ts +1 -3
- package/src/types/{channel-backend.test.ts → ChannelBackend.test.ts} +1 -1
- package/src/types/ThreadCapabilities.ts +4 -2
- package/src/types/ThreadEvents.ts +16 -0
- package/src/types/ThreadOperation.ts +2 -2
- package/dist/lib/chunk-types.mjs +0 -99
- package/dist/lib/chunk-types.mjs.map +0 -1
- package/dist/lib/types.mjs +0 -2
- package/dist/types/src/types/channel-backend.d.ts.map +0 -1
- package/dist/types/src/types/channel-backend.test.d.ts +0 -2
- package/dist/types/src/types/channel-backend.test.d.ts.map +0 -1
- package/dist/types/src/types/index.d.ts +0 -4
- package/dist/types/src/types/index.d.ts.map +0 -1
- package/src/types/index.ts +0 -7
- /package/src/types/{channel-backend.ts → ChannelBackend.ts} +0 -0
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ChannelBackend } from "./ThreadCapabilities.mjs";
|
|
2
2
|
import * as Schema from "effect/Schema";
|
|
3
|
-
import
|
|
3
|
+
import * as Capability from "@dxos/app-framework/Capability";
|
|
4
4
|
import { Database, Feed, Filter, Obj, Query } from "@dxos/echo";
|
|
5
5
|
import { Channel, Message } from "@dxos/types";
|
|
6
6
|
import * as Effect from "effect/Effect";
|
|
7
7
|
import { invariant } from "@dxos/invariant";
|
|
8
|
-
import
|
|
8
|
+
import * as ClientCapabilities from "@dxos/plugin-client/ClientCapabilities";
|
|
9
9
|
//#region src/capabilities/channel-backend-feed.ts
|
|
10
10
|
var __dxlog_file = "/__w/dxos/dxos/packages/plugins/plugin-thread/src/capabilities/channel-backend-feed.ts";
|
|
11
11
|
/**
|
|
@@ -60,7 +60,7 @@ var feedChannelBackend = {
|
|
|
60
60
|
};
|
|
61
61
|
/** Contributes the default feed-backed channel provider. */
|
|
62
62
|
var ChannelBackendFeed = Capability.makeModule(Effect.fnUntraced(function* () {
|
|
63
|
-
return Capability.
|
|
63
|
+
return Capability.contribute(ChannelBackend, feedChannelBackend);
|
|
64
64
|
}));
|
|
65
65
|
//#endregion
|
|
66
66
|
export { ChannelBackendFeed, ChannelBackendFeed as default, feedChannelBackend };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chunk-channel-backend-feed.mjs","names":[],"sources":["../../src/capabilities/channel-backend-feed.ts"],"sourcesContent":["//\n// Copyright 2026 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\nimport * as Schema from 'effect/Schema';\n\nimport
|
|
1
|
+
{"version":3,"file":"chunk-channel-backend-feed.mjs","names":[],"sources":["../../src/capabilities/channel-backend-feed.ts"],"sourcesContent":["//\n// Copyright 2026 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\nimport * as Schema from 'effect/Schema';\n\nimport * as Capability from '@dxos/app-framework/Capability';\nimport { Database, Feed, Filter, Obj, Query } from '@dxos/echo';\nimport { invariant } from '@dxos/invariant';\nimport * as ClientCapabilities from '@dxos/plugin-client/ClientCapabilities';\nimport { Channel, Message } from '@dxos/types';\n\nimport * as ThreadCapabilities from '../types/ThreadCapabilities';\n\n/**\n * Default local ECHO-feed-backed channel provider. Stores messages in a `Feed`\n * (`makeConfig` → `Feed.make()`), reads them via a reactive database query, and\n * writes via `Feed.append`. This is the backend `Channel.make()` defaults to.\n */\nexport const feedChannelBackend: ThreadCapabilities.ChannelBackendProvider = {\n kind: Channel.FeedBackendKind,\n label: 'Feed',\n icon: 'ph--rows--regular',\n createFields: Schema.Struct({}),\n makeConfig: () => Feed.make(),\n subscribe: (channel, onMessages) => {\n const feed = Channel.getFeed(channel);\n const db = Obj.getDatabase(channel);\n if (!feed || !db) {\n onMessages([]);\n return () => {};\n }\n\n const result = db.query(Query.select(Filter.type(Message.Message)).from(feed));\n return result.subscribe(() => onMessages(result.results), { fire: true });\n },\n send: (channel, message) =>\n Effect.gen(function* () {\n const db = Obj.getDatabase(channel);\n invariant(db, 'Database not found');\n const client = yield* Capability.get(ClientCapabilities.Client);\n const space = client.spaces.get(db.spaceId);\n invariant(space, 'Space not found');\n const feed = Channel.getFeed(channel);\n invariant(feed, 'Channel is not feed-backed');\n yield* Feed.append(feed, [message]).pipe(Effect.provide(Database.layer(space.db)));\n }),\n readOnly: (channel) => Obj.getMeta(channel).keys.length > 0,\n};\n\n/** Contributes the default feed-backed channel provider. */\nexport const ChannelBackendFeed = Capability.makeModule(\n Effect.fnUntraced(function* () {\n return Capability.contribute(ThreadCapabilities.ChannelBackend, feedChannelBackend);\n }),\n);\n\nexport default ChannelBackendFeed;\n"],"mappings":";;;;;;;;;;;;;;;AAoBA,IAAa,qBAAgE;CAC3E,MAAM,QAAQ;CACd,OAAO;CACP,MAAM;CACN,cAAc,OAAO,OAAO,CAAC,CAAC;CAC9B,kBAAkB,KAAK,KAAK;CAC5B,YAAY,SAAS,eAAe;EAClC,MAAM,OAAO,QAAQ,QAAQ,OAAO;EACpC,MAAM,KAAK,IAAI,YAAY,OAAO;EAClC,IAAI,CAAC,QAAQ,CAAC,IAAI;GAChB,WAAW,CAAC,CAAC;GACb,aAAa,CAAC;EAChB;EAEA,MAAM,SAAS,GAAG,MAAM,MAAM,OAAO,OAAO,KAAK,QAAQ,OAAO,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC;EAC7E,OAAO,OAAO,gBAAgB,WAAW,OAAO,OAAO,GAAG,EAAE,MAAM,KAAK,CAAC;CAC1E;CACA,OAAO,SAAS,YACd,OAAO,IAAI,aAAa;EACtB,MAAM,KAAK,IAAI,YAAY,OAAO;EAClC,UAAU,IAAI,sBAAmB;GAAA,YAAA;GAAA,GAAA;GAAA,GAAA;GAAA,GAAA;GAAA,GAAA,CAAA,MAAA,sBAAA;EAAA,CAAC;EAElC,MAAM,SAAQ,OADQ,WAAW,IAAI,mBAAmB,MAAM,EAAA,CACzC,OAAO,IAAI,GAAG,OAAO;EAC1C,UAAU,OAAO,mBAAgB;GAAA,YAAA;GAAA,GAAA;GAAA,GAAA;GAAA,GAAA;GAAA,GAAA,CAAA,SAAA,mBAAA;EAAA,CAAC;EAClC,MAAM,OAAO,QAAQ,QAAQ,OAAO;EACpC,UAAU,MAAM,8BAA2B;GAAA,YAAA;GAAA,GAAA;GAAA,GAAA;GAAA,GAAA;GAAA,GAAA,CAAA,QAAA,8BAAA;EAAA,CAAC;EAC5C,OAAO,KAAK,OAAO,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,OAAO,QAAQ,SAAS,MAAM,MAAM,EAAE,CAAC,CAAC;CACnF,CAAC;CACH,WAAW,YAAY,IAAI,QAAQ,OAAO,CAAC,CAAC,KAAK,SAAS;AAC5D;;AAGA,IAAa,qBAAqB,WAAW,WAC3C,OAAO,WAAW,aAAa;CAC7B,OAAO,WAAW,WAAW,gBAAmC,kBAAkB;AACpF,CAAC,CACH"}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { resolveProvider } from "./ChannelBackend.mjs";
|
|
2
|
+
import { ChannelBackend } from "./ThreadCapabilities.mjs";
|
|
3
|
+
import { CreateChannel } from "./ThreadOperation.mjs";
|
|
4
|
+
import * as Capability from "@dxos/app-framework/Capability";
|
|
5
|
+
import * as Operation from "@dxos/compute/Operation";
|
|
4
6
|
import { Channel } from "@dxos/types";
|
|
5
7
|
import * as Effect from "effect/Effect";
|
|
6
8
|
import { invariant } from "@dxos/invariant";
|
|
@@ -12,7 +14,7 @@ var handler = CreateChannel.pipe(Operation.withHandler(Effect.fnUntraced(functio
|
|
|
12
14
|
invariant(provider, `No channel backend for kind: ${kind}`, {
|
|
13
15
|
"~LogMeta": "~LogMeta",
|
|
14
16
|
F: __dxlog_file,
|
|
15
|
-
L:
|
|
17
|
+
L: 25,
|
|
16
18
|
S: this,
|
|
17
19
|
A: ["provider", "`No channel backend for kind: ${kind}`"]
|
|
18
20
|
});
|
|
@@ -1 +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
|
|
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 * as Capability from '@dxos/app-framework/Capability';\nimport * as Operation from '@dxos/compute/Operation';\nimport { invariant } from '@dxos/invariant';\nimport { Channel } from '@dxos/types';\n\nimport * as ChannelBackend from '../types/ChannelBackend';\nimport * as ThreadCapabilities from '../types/ThreadCapabilities';\nimport * as ThreadOperation from '../types/ThreadOperation';\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 = ChannelBackend.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":";;;;;;;;;;AAeA,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,gBAA+B,OADvB,WAAW,OAAO,cAAiC,GACjB,IAAI;CAC/D,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"}
|
|
@@ -1,15 +1,17 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { resolveProvider } from "./ChannelBackend.mjs";
|
|
2
|
+
import { ChannelBackend } from "./ThreadCapabilities.mjs";
|
|
2
3
|
import { n as getChannelsPath } from "./chunk-paths.mjs";
|
|
3
|
-
import
|
|
4
|
-
import
|
|
4
|
+
import * as Capability from "@dxos/app-framework/Capability";
|
|
5
|
+
import * as Operation from "@dxos/compute/Operation";
|
|
5
6
|
import { Type } from "@dxos/echo";
|
|
6
7
|
import { Channel } from "@dxos/types";
|
|
7
8
|
import * as Effect from "effect/Effect";
|
|
8
|
-
import {
|
|
9
|
+
import { SpaceOperation } from "@dxos/plugin-space";
|
|
10
|
+
import * as SpaceCapabilities from "@dxos/plugin-space/SpaceCapabilities";
|
|
9
11
|
import { ChannelCreatePanel } from "#containers";
|
|
10
12
|
//#region src/capabilities/create-object.ts
|
|
11
13
|
var create_object_default = Capability.makeModule(Effect.fnUntraced(function* () {
|
|
12
|
-
return Capability.
|
|
14
|
+
return Capability.contribute(SpaceCapabilities.CreateObjectEntry, {
|
|
13
15
|
id: Type.getTypename(Channel.Channel),
|
|
14
16
|
customPanel: ChannelCreatePanel,
|
|
15
17
|
createObject: ({ name, kind, options }, opts) => Effect.gen(function* () {
|
|
@@ -1 +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
|
|
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 * as Capability from '@dxos/app-framework/Capability';\nimport * as Operation from '@dxos/compute/Operation';\nimport { Type } from '@dxos/echo';\nimport { SpaceOperation } from '@dxos/plugin-space';\nimport * as SpaceCapabilities from '@dxos/plugin-space/SpaceCapabilities';\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 * as ChannelBackend from '../types/ChannelBackend';\nimport * as ThreadCapabilities from '../types/ThreadCapabilities';\n\ntype CreateOptions = Parameters<SpaceCapabilities.CreateObjectEntry['createObject']>[1];\n\nexport default Capability.makeModule(\n Effect.fnUntraced(function* () {\n return Capability.contribute(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 ? ChannelBackend.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":";;;;;;;;;;;;AAuBA,IAAA,wBAAe,WAAW,WACxB,OAAO,WAAW,aAAa;CAC7B,OAAO,WAAW,WAAW,kBAAkB,mBAAmB;EAChE,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,gBAA+B,WAAW,IAAI,IAAI,KAAA;GAC1E,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"}
|
package/dist/lib/chunk-meta.mjs
CHANGED
|
@@ -1 +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
|
|
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 * as Plugin from '@dxos/app-framework/Plugin';\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"}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as Capability from "@dxos/app-framework/Capability";
|
|
2
2
|
import * as Effect from "effect/Effect";
|
|
3
|
+
import * as Capabilities from "@dxos/app-framework/Capabilities";
|
|
3
4
|
import { ThreadOperationHandlerSet } from "#operations";
|
|
4
5
|
//#region src/capabilities/operation-handler.ts
|
|
5
6
|
var operation_handler_default = Capability.makeModule(Effect.fnUntraced(function* () {
|
|
6
|
-
return Capability.
|
|
7
|
+
return Capability.contribute(Capabilities.OperationHandler, ThreadOperationHandlerSet);
|
|
7
8
|
}));
|
|
8
9
|
//#endregion
|
|
9
10
|
export { operation_handler_default as default };
|
|
@@ -1 +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
|
|
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 * as Capabilities from '@dxos/app-framework/Capabilities';\nimport * as Capability from '@dxos/app-framework/Capability';\n\nimport { ThreadOperationHandlerSet } from '#operations';\n\nexport default Capability.makeModule(\n Effect.fnUntraced(function* () {\n return Capability.contribute(Capabilities.OperationHandler, ThreadOperationHandlerSet);\n }),\n);\n"],"mappings":";;;;;AAWA,IAAA,4BAAe,WAAW,WACxB,OAAO,WAAW,aAAa;CAC7B,OAAO,WAAW,WAAW,aAAa,kBAAkB,yBAAyB;AACvF,CAAC,CACH"}
|
package/dist/lib/chunk-paths.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Channel } from "@dxos/types";
|
|
2
|
-
import
|
|
2
|
+
import * as GraphPath from "@dxos/app-toolkit/GraphPath";
|
|
3
3
|
//#region src/paths.ts
|
|
4
4
|
var { getSectionPath: getChannelsPath, getObjectPath: getChannelPath } = GraphPath.createTypeSectionPaths(Channel.Channel, { groupId: GraphPath.GroupSegments.communications });
|
|
5
5
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chunk-paths.mjs","names":[],"sources":["../../src/paths.ts"],"sourcesContent":["//\n// Copyright 2025 DXOS.org\n//\n\nimport
|
|
1
|
+
{"version":3,"file":"chunk-paths.mjs","names":[],"sources":["../../src/paths.ts"],"sourcesContent":["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as GraphPath from '@dxos/app-toolkit/GraphPath';\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"}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { Capabilities, Capability } from "@dxos/app-framework";
|
|
1
|
+
import * as Capability from "@dxos/app-framework/Capability";
|
|
3
2
|
import { Channel, Thread } from "@dxos/types";
|
|
3
|
+
import { Surface } from "@dxos/app-framework/ui";
|
|
4
4
|
import { AppSurface } from "@dxos/app-toolkit/ui";
|
|
5
5
|
import * as Effect from "effect/Effect";
|
|
6
6
|
import { ChannelArticle, ThreadArticle } from "#containers";
|
|
7
|
+
import * as Capabilities from "@dxos/app-framework/Capabilities";
|
|
7
8
|
//#region src/capabilities/react-surface.ts
|
|
8
|
-
var react_surface_default = Capability.makeModule(() => Effect.succeed(Capability.
|
|
9
|
+
var react_surface_default = Capability.makeModule(() => Effect.succeed(Capability.contribute(Capabilities.ReactSurface, [
|
|
9
10
|
Surface.create({
|
|
10
11
|
id: "channel",
|
|
11
12
|
filter: AppSurface.object(AppSurface.Article, Channel.Channel),
|
|
@@ -1 +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
|
|
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 * as Capabilities from '@dxos/app-framework/Capabilities';\nimport * as Capability from '@dxos/app-framework/Capability';\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.contribute(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":";;;;;;;;AAcA,IAAA,wBAAe,WAAW,iBACxB,OAAO,QACL,WAAW,WAAW,aAAa,cAAc;CAC/C,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,13 @@
|
|
|
1
|
+
//#region \0rolldown/runtime.js
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __exportAll = (all, no_symbols) => {
|
|
4
|
+
let target = {};
|
|
5
|
+
for (var name in all) __defProp(target, name, {
|
|
6
|
+
get: all[name],
|
|
7
|
+
enumerable: true
|
|
8
|
+
});
|
|
9
|
+
if (!no_symbols) __defProp(target, Symbol.toStringTag, { value: "Module" });
|
|
10
|
+
return target;
|
|
11
|
+
};
|
|
12
|
+
//#endregion
|
|
13
|
+
export { __exportAll as t };
|
package/dist/lib/components.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { meta } from "#meta";
|
|
1
2
|
import { useCallback, useMemo } from "react";
|
|
2
3
|
import { Surface } from "@dxos/app-framework/ui";
|
|
3
|
-
import { meta } from "#meta";
|
|
4
4
|
import { hexToFallback, toFallback } from "@dxos/util";
|
|
5
5
|
import { AppSurface } from "@dxos/app-toolkit/ui";
|
|
6
6
|
import { Card, composable, useTranslation } from "@dxos/react-ui";
|
package/dist/lib/hooks.mjs
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { resolveProvider } from "./ChannelBackend.mjs";
|
|
2
|
+
import { ChannelBackend } from "./ThreadCapabilities.mjs";
|
|
2
3
|
import { useCallback, useEffect, useMemo, useRef, useState, useSyncExternalStore } from "react";
|
|
3
4
|
import { useCapabilities } from "@dxos/app-framework/ui";
|
|
4
5
|
//#region src/hooks/useMessages.ts
|
package/dist/lib/hooks.mjs.map
CHANGED
|
@@ -1 +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
|
|
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 * as ChannelBackend from '../types/ChannelBackend';\nimport * as ThreadCapabilities from '../types/ThreadCapabilities';\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 ? ChannelBackend.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":";;;;;AAYA,IAAM,QAAoC,CAAC;;AAG3C,IAAa,eAAe,YAAqE;CAC/F,MAAM,YAAY,gBAAgB,cAAiC;CACnE,MAAM,WAAW,cACR,UAAU,gBAA+B,WAAW,QAAQ,QAAQ,IAAI,IAAI,KAAA,GACnF,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;;;AC5BA,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"}
|
package/dist/lib/index.mjs
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { t as ChannelBackend_exports } from "./ChannelBackend.mjs";
|
|
2
|
+
import { t as ThreadCapabilities_exports } from "./ThreadCapabilities.mjs";
|
|
3
|
+
import { t as ThreadEvents_exports } from "./ThreadEvents.mjs";
|
|
4
|
+
import { t as ThreadOperation_exports } from "./ThreadOperation.mjs";
|
|
2
5
|
import { useMessages, useStatus } from "./hooks.mjs";
|
|
3
6
|
import { n as meta, t as THREAD_ITEM } from "./chunk-meta.mjs";
|
|
4
7
|
import { n as getChannelsPath, t as getChannelPath } from "./chunk-paths.mjs";
|
|
5
|
-
export { THREAD_ITEM, ThreadCapabilities_exports as ThreadCapabilities,
|
|
8
|
+
export { ChannelBackend_exports as ChannelBackend, THREAD_ITEM, ThreadCapabilities_exports as ThreadCapabilities, ThreadEvents_exports as ThreadEvents, ThreadOperation_exports as ThreadOperation, getChannelPath, getChannelsPath, meta, useMessages, useStatus };
|
package/dist/lib/operations.mjs
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { AppendChannelMessage, CreateChannel } from "./ThreadOperation.mjs";
|
|
2
|
+
import * as Operation from "@dxos/compute/Operation";
|
|
3
|
+
import * as OperationHandlerSet from "@dxos/compute/OperationHandlerSet";
|
|
2
4
|
//#region src/operations/index.ts
|
|
3
|
-
var ThreadOperationHandlerSet = OperationHandlerSet.lazy(() => import("./chunk-append-channel-message.mjs"), () => import("./chunk-create-channel.mjs"));
|
|
5
|
+
var ThreadOperationHandlerSet = OperationHandlerSet.lazy([AppendChannelMessage.pipe(Operation.lazyHandler(() => import("./chunk-append-channel-message.mjs"))), CreateChannel.pipe(Operation.lazyHandler(() => import("./chunk-create-channel.mjs")))]);
|
|
4
6
|
//#endregion
|
|
5
7
|
export { ThreadOperationHandlerSet };
|
|
6
8
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"operations.mjs","names":[],"sources":["../../src/operations/index.ts"],"sourcesContent":["//\n// Copyright 2025 DXOS.org\n//\n\nimport
|
|
1
|
+
{"version":3,"file":"operations.mjs","names":[],"sources":["../../src/operations/index.ts"],"sourcesContent":["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Operation from '@dxos/compute/Operation';\nimport * as OperationHandlerSet from '@dxos/compute/OperationHandlerSet';\n\nimport * as ThreadOperation from '../types/ThreadOperation';\n\nexport const ThreadOperationHandlerSet = OperationHandlerSet.lazy([\n ThreadOperation.AppendChannelMessage.pipe(Operation.lazyHandler(() => import('./append-channel-message'))),\n ThreadOperation.CreateChannel.pipe(Operation.lazyHandler(() => import('./create-channel'))),\n]);\n"],"mappings":";;;;AASA,IAAa,4BAA4B,oBAAoB,KAAK,CAAA,qBAC3B,KAAK,UAAU,kBAAkB,OAAO,qCAA2B,CAAC,GAAA,cAC3E,KAAK,UAAU,kBAAkB,OAAO,6BAAmB,CAAC,CAC5F,CAAC"}
|
package/dist/lib/plugin.mjs
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { n as meta } from "./chunk-meta.mjs";
|
|
2
|
-
import
|
|
3
|
-
import { Plugin } from "@dxos/app-framework";
|
|
2
|
+
import * as Plugin from "@dxos/app-framework/Plugin";
|
|
4
3
|
//#region src/plugin.ts
|
|
5
4
|
var ThreadPlugin = Plugin.lazy(meta, () => import("#plugin"));
|
|
6
5
|
//#endregion
|
|
7
|
-
export {
|
|
6
|
+
export { ThreadPlugin };
|
|
8
7
|
|
|
9
8
|
//# sourceMappingURL=plugin.mjs.map
|
package/dist/lib/plugin.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.mjs","names":[],"sources":["../../src/plugin.ts"],"sourcesContent":["//\n// Copyright 2023 DXOS.org\n//\n\nimport
|
|
1
|
+
{"version":3,"file":"plugin.mjs","names":[],"sources":["../../src/plugin.ts"],"sourcesContent":["//\n// Copyright 2023 DXOS.org\n//\n\nimport * as Plugin from '@dxos/app-framework/Plugin';\n\nimport { meta } from './meta';\n\nexport const ThreadPlugin = Plugin.lazy(meta, () => import('#plugin'));\n"],"mappings":";;;AAQA,IAAa,eAAe,OAAO,KAAK,YAAY,OAAO,UAAU"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ThreadPlugin.d.ts","sourceRoot":"","sources":["../../../src/ThreadPlugin.tsx"],"names":[],"mappings":"AAIA,OAAO,
|
|
1
|
+
{"version":3,"file":"ThreadPlugin.d.ts","sourceRoot":"","sources":["../../../src/ThreadPlugin.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,MAAM,4BAA4B,CAAC;AAcrD,eAAO,MAAM,YAAY,4BAmBxB,CAAC;eAEa,YAAY"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ThreadPlugin.node.d.ts","sourceRoot":"","sources":["../../../src/ThreadPlugin.node.ts"],"names":[],"mappings":"AAIA,OAAO,
|
|
1
|
+
{"version":3,"file":"ThreadPlugin.node.d.ts","sourceRoot":"","sources":["../../../src/ThreadPlugin.node.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,MAAM,4BAA4B,CAAC;AAOrD,eAAO,MAAM,YAAY,4BAKxB,CAAC;eAEa,YAAY"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ThreadPlugin.workerd.d.ts","sourceRoot":"","sources":["../../../src/ThreadPlugin.workerd.ts"],"names":[],"mappings":"AAIA,OAAO,
|
|
1
|
+
{"version":3,"file":"ThreadPlugin.workerd.d.ts","sourceRoot":"","sources":["../../../src/ThreadPlugin.workerd.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,MAAM,4BAA4B,CAAC;AAOrD,eAAO,MAAM,YAAY,4BAKxB,CAAC;eAEa,YAAY"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as Effect from 'effect/Effect';
|
|
2
|
-
import
|
|
3
|
-
declare const _default: (props: void) => Effect.Effect<Capability.
|
|
2
|
+
import * as Capability from '@dxos/app-framework/Capability';
|
|
3
|
+
declare const _default: (props: void) => Effect.Effect<Capability.Contribution<Capability.CapabilityIdentifier<"org.dxos.app-framework.capability.appGraphBuilder", "multi">>, never, import("effect/Scope").Scope | Capability.Service>;
|
|
4
4
|
export default _default;
|
|
5
5
|
//# sourceMappingURL=app-graph-builder.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app-graph-builder.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/app-graph-builder.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAExC,OAAO,
|
|
1
|
+
{"version":3,"file":"app-graph-builder.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/app-graph-builder.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAExC,OAAO,KAAK,UAAU,MAAM,gCAAgC,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as Effect from 'effect/Effect';
|
|
2
|
-
import
|
|
3
|
-
import
|
|
2
|
+
import * as Capability from '@dxos/app-framework/Capability';
|
|
3
|
+
import * as ThreadCapabilities from '../types/ThreadCapabilities';
|
|
4
4
|
/**
|
|
5
5
|
* Default local ECHO-feed-backed channel provider. Stores messages in a `Feed`
|
|
6
6
|
* (`makeConfig` → `Feed.make()`), reads them via a reactive database query, and
|
|
@@ -8,6 +8,6 @@ import { ThreadCapabilities } from '../types';
|
|
|
8
8
|
*/
|
|
9
9
|
export declare const feedChannelBackend: ThreadCapabilities.ChannelBackendProvider;
|
|
10
10
|
/** Contributes the default feed-backed channel provider. */
|
|
11
|
-
export declare const ChannelBackendFeed: (props: void) => Effect.Effect<Capability.
|
|
11
|
+
export declare const ChannelBackendFeed: (props: void) => Effect.Effect<Capability.Contribution<Capability.CapabilityIdentifier<`${string}.capability.channelBackend`, "multi">>, never, import("effect/Scope").Scope>;
|
|
12
12
|
export default ChannelBackendFeed;
|
|
13
13
|
//# sourceMappingURL=channel-backend-feed.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"channel-backend-feed.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/channel-backend-feed.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAGxC,OAAO,
|
|
1
|
+
{"version":3,"file":"channel-backend-feed.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/channel-backend-feed.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAGxC,OAAO,KAAK,UAAU,MAAM,gCAAgC,CAAC;AAM7D,OAAO,KAAK,kBAAkB,MAAM,6BAA6B,CAAC;AAElE;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,EAAE,kBAAkB,CAAC,sBA6BnD,CAAC;AAEF,4DAA4D;AAC5D,eAAO,MAAM,kBAAkB,+KAI9B,CAAC;eAEa,kBAAkB"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as Effect from 'effect/Effect';
|
|
2
|
-
import
|
|
3
|
-
declare const _default: (props: void) => Effect.Effect<Capability.
|
|
2
|
+
import * as Capability from '@dxos/app-framework/Capability';
|
|
3
|
+
declare const _default: (props: void) => Effect.Effect<Capability.Contribution<Capability.CapabilityIdentifier<`${string}.capability.createObject`, "multi">>, never, import("effect/Scope").Scope>;
|
|
4
4
|
export default _default;
|
|
5
5
|
//# sourceMappingURL=create-object.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-object.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/create-object.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAExC,OAAO,
|
|
1
|
+
{"version":3,"file":"create-object.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/create-object.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAExC,OAAO,KAAK,UAAU,MAAM,gCAAgC,CAAC"}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
export declare const
|
|
4
|
-
export declare const
|
|
5
|
-
export declare const
|
|
6
|
-
export declare const
|
|
7
|
-
export declare const ReactSurface: Capability.LazyCapability<void, Capability.ModuleReturn, Error>;
|
|
1
|
+
import * as Capability from '@dxos/app-framework/Capability';
|
|
2
|
+
export declare const AppGraphBuilder: Capability.Module<void>;
|
|
3
|
+
export declare const ChannelBackendFeed: Capability.Module<void>;
|
|
4
|
+
export declare const CreateObject: Capability.Module<void>;
|
|
5
|
+
export declare const OperationHandler: Capability.Module<void>;
|
|
6
|
+
export declare const ReactSurface: Capability.Module<void>;
|
|
8
7
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/index.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,UAAU,MAAM,gCAAgC,CAAC;AAU7D,eAAO,MAAM,eAAe,yBAAqE,CAAC;AAClG,eAAO,MAAM,kBAAkB,yBAI9B,CAAC;AACF,eAAO,MAAM,YAAY,yBAAgE,CAAC;AAC1F,eAAO,MAAM,gBAAgB,yBAE3B,CAAC;AACH,eAAO,MAAM,YAAY,yBAEvB,CAAC"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
export declare const
|
|
4
|
-
export declare const OperationHandler: Capability.LazyCapability<OperationHandlerSet.OperationHandlerSet, Capability.ModuleReturn, Error>;
|
|
1
|
+
import * as Capability from '@dxos/app-framework/Capability';
|
|
2
|
+
export declare const ChannelBackendFeed: Capability.Module<void>;
|
|
3
|
+
export declare const OperationHandler: Capability.Module<void>;
|
|
5
4
|
//# sourceMappingURL=node.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"node.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/node.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"node.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/node.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,UAAU,MAAM,gCAAgC,CAAC;AAY7D,eAAO,MAAM,kBAAkB,yBAI9B,CAAC;AACF,eAAO,MAAM,gBAAgB,yBAE3B,CAAC"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import * as Effect from 'effect/Effect';
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
declare const _default: (props: OperationHandlerSet.OperationHandlerSet) => Effect.Effect<Capability.ModuleReturn, Error, import("effect/Scope").Scope | Capability.Service>;
|
|
2
|
+
import * as Capability from '@dxos/app-framework/Capability';
|
|
3
|
+
declare const _default: (props: void) => Effect.Effect<Capability.Contribution<Capability.CapabilityIdentifier<"org.dxos.app-framework.capability.operationHandler", "multi">>, never, import("effect/Scope").Scope>;
|
|
5
4
|
export default _default;
|
|
6
5
|
//# sourceMappingURL=operation-handler.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"operation-handler.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/operation-handler.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"operation-handler.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/operation-handler.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAGxC,OAAO,KAAK,UAAU,MAAM,gCAAgC,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as Effect from 'effect/Effect';
|
|
2
|
-
import
|
|
3
|
-
declare const _default: (props: void) => Effect.Effect<Capability.
|
|
2
|
+
import * as Capability from '@dxos/app-framework/Capability';
|
|
3
|
+
declare const _default: (props: void) => Effect.Effect<Capability.Contribution<Capability.CapabilityIdentifier<"org.dxos.app-framework.capability.reactSurface", "multi">>, never, import("effect/Scope").Scope>;
|
|
4
4
|
export default _default;
|
|
5
5
|
//# sourceMappingURL=react-surface.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"react-surface.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/react-surface.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"react-surface.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/react-surface.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAGxC,OAAO,KAAK,UAAU,MAAM,gCAAgC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChannelArticle.d.ts","sourceRoot":"","sources":["../../../../../src/containers/ChannelArticle/ChannelArticle.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAsB,MAAM,OAAO,CAAC;AAG3C,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAOlD,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"ChannelArticle.d.ts","sourceRoot":"","sources":["../../../../../src/containers/ChannelArticle/ChannelArticle.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAsB,MAAM,OAAO,CAAC;AAG3C,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAOlD,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,aAAa,CAAC;AAc3C,MAAM,MAAM,mBAAmB,GAAG,UAAU,CAAC,kBAAkB,CAC7D,OAAO,CAAC,OAAO,GAAG,SAAS,EAC3B;IACE,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,sGAAsG;IACtG,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CACF,CAAC;uCAU6B,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,EAAE,mBAAmB"}
|
|
@@ -8,7 +8,7 @@ declare const meta: {
|
|
|
8
8
|
displayName: string;
|
|
9
9
|
};
|
|
10
10
|
render: ({ roomId }: ChannelArticleProps) => React.JSX.Element;
|
|
11
|
-
decorators: import("@storybook/react").Decorator[];
|
|
11
|
+
decorators: import("@storybook/react-vite").Decorator[];
|
|
12
12
|
parameters: {
|
|
13
13
|
translations: [{
|
|
14
14
|
readonly 'en-US': {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import
|
|
2
|
+
import type * as SpaceCapabilities from '@dxos/plugin-space/SpaceCapabilities';
|
|
3
3
|
export declare function ChannelCreatePanel({ target, onCreateObject }: SpaceCapabilities.CreateObjectCustomPanelProps): React.JSX.Element;
|
|
4
4
|
export declare namespace ChannelCreatePanel {
|
|
5
5
|
var displayName: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChannelCreatePanel.d.ts","sourceRoot":"","sources":["../../../../../src/containers/ChannelCreatePanel/ChannelCreatePanel.tsx"],"names":[],"mappings":"AAIA,OAAO,KAA+B,MAAM,OAAO,CAAC;AAIpD,OAAO,
|
|
1
|
+
{"version":3,"file":"ChannelCreatePanel.d.ts","sourceRoot":"","sources":["../../../../../src/containers/ChannelCreatePanel/ChannelCreatePanel.tsx"],"names":[],"mappings":"AAIA,OAAO,KAA+B,MAAM,OAAO,CAAC;AAIpD,OAAO,KAAK,KAAK,iBAAiB,MAAM,sCAAsC,CAAC;2CAa5C,EAAE,MAAM,EAAE,cAAc,EAAE,EAAE,iBAAiB,CAAC,4BAA4B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ThreadArticle.stories.d.ts","sourceRoot":"","sources":["../../../../../src/containers/ThreadArticle/ThreadArticle.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,KAAmB,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"ThreadArticle.stories.d.ts","sourceRoot":"","sources":["../../../../../src/containers/ThreadArticle/ThreadArticle.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,KAAmB,MAAM,OAAO,CAAC;AA+CxC,QAAA,MAAM,IAAI;;eAE2B,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6BH,CAAC;eAEvB,IAAI;AAEnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAAU,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useMessages.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useMessages.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,KAAK,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"useMessages.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useMessages.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,KAAK,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,aAAa,CAAC;AAOzD,kFAAkF;AAClF,eAAO,MAAM,WAAW,YAAa,OAAO,CAAC,OAAO,GAAG,SAAS,KAAG,SAAS,OAAO,CAAC,OAAO,EAsB1F,CAAC"}
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
+
export * as ChannelBackend from './types/ChannelBackend';
|
|
2
|
+
export * as ThreadCapabilities from './types/ThreadCapabilities';
|
|
3
|
+
export * as ThreadEvents from './types/ThreadEvents';
|
|
4
|
+
export * as ThreadOperation from './types/ThreadOperation';
|
|
1
5
|
export * from './hooks';
|
|
2
6
|
export * from './meta';
|
|
3
7
|
export * from './paths';
|
|
4
|
-
export * from './types';
|
|
5
8
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,cAAc,MAAM,wBAAwB,CAAC;AACzD,OAAO,KAAK,kBAAkB,MAAM,4BAA4B,CAAC;AACjE,OAAO,KAAK,YAAY,MAAM,sBAAsB,CAAC;AACrD,OAAO,KAAK,eAAe,MAAM,yBAAyB,CAAC;AAC3D,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import * as Operation from '@dxos/compute/Operation';
|
|
2
|
+
import * as ThreadOperation from '../types/ThreadOperation';
|
|
3
3
|
declare const handler: Operation.WithHandler<typeof ThreadOperation.AppendChannelMessage>;
|
|
4
4
|
export default handler;
|
|
5
5
|
//# sourceMappingURL=append-channel-message.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"append-channel-message.d.ts","sourceRoot":"","sources":["../../../../src/operations/append-channel-message.ts"],"names":[],"mappings":"AAOA,OAAO,
|
|
1
|
+
{"version":3,"file":"append-channel-message.d.ts","sourceRoot":"","sources":["../../../../src/operations/append-channel-message.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,SAAS,MAAM,yBAAyB,CAAC;AAMrD,OAAO,KAAK,eAAe,MAAM,0BAA0B,CAAC;AAE5D,QAAA,MAAM,OAAO,EAAE,SAAS,CAAC,WAAW,CAAC,OAAO,eAAe,CAAC,oBAAoB,CAe7E,CAAC;eAEW,OAAO"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import * as Operation from '@dxos/compute/Operation';
|
|
2
|
+
import * as ThreadOperation from '../types/ThreadOperation';
|
|
3
3
|
declare const handler: Operation.WithHandler<typeof ThreadOperation.CreateChannel>;
|
|
4
4
|
export default handler;
|
|
5
5
|
//# sourceMappingURL=create-channel.d.ts.map
|