@dxos/plugin-thread 0.7.5-labs.8a82073 → 0.7.5-labs.a8b535d
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/browser/{ThreadContainer-T4WIBHY6.mjs → ThreadContainer-6OP5AG2W.mjs} +2 -2
- package/dist/lib/browser/{chunk-5EQVG4L3.mjs → chunk-UPKU23DA.mjs} +8 -18
- package/dist/lib/browser/chunk-UPKU23DA.mjs.map +7 -0
- package/dist/lib/browser/chunk-VOMIDDNO.mjs +15 -0
- package/dist/lib/browser/chunk-VOMIDDNO.mjs.map +7 -0
- package/dist/lib/browser/{chunk-NO5AZLUZ.mjs → chunk-YK3ICB7G.mjs} +2 -4
- package/dist/lib/browser/{chunk-NO5AZLUZ.mjs.map → chunk-YK3ICB7G.mjs.map} +3 -3
- package/dist/lib/browser/index.mjs +43 -45
- package/dist/lib/browser/index.mjs.map +3 -3
- package/dist/lib/browser/{intent-resolver-QFP6L3AF.mjs → intent-resolver-FAFQ54NP.mjs} +4 -4
- package/dist/lib/browser/{intent-resolver-QFP6L3AF.mjs.map → intent-resolver-FAFQ54NP.mjs.map} +1 -1
- package/dist/lib/browser/{markdown-2NBXKXCY.mjs → markdown-RPYOUBVR.mjs} +4 -4
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/{react-surface-LDPZN456.mjs → react-surface-Y4MUSICN.mjs} +42 -33
- package/dist/lib/browser/react-surface-Y4MUSICN.mjs.map +7 -0
- package/dist/lib/browser/{settings-TKOPRXSU.mjs → settings-WQTE5AEZ.mjs} +2 -2
- package/dist/lib/browser/types.mjs +1 -1
- package/dist/lib/node/{ThreadContainer-4XACAVGV.cjs → ThreadContainer-LTKKLPXX.cjs} +6 -6
- package/dist/lib/node/{chunk-346YIZVL.cjs → chunk-BHFHFTHO.cjs} +8 -13
- package/dist/lib/node/chunk-BHFHFTHO.cjs.map +7 -0
- package/dist/lib/node/{chunk-AUVKOX5Q.cjs → chunk-CMEMMYDL.cjs} +5 -7
- package/dist/lib/node/{chunk-AUVKOX5Q.cjs.map → chunk-CMEMMYDL.cjs.map} +3 -3
- package/dist/lib/node/{chunk-VAZ3BCTU.cjs → chunk-RQR5Z23G.cjs} +11 -20
- package/dist/lib/node/chunk-RQR5Z23G.cjs.map +7 -0
- package/dist/lib/node/index.cjs +44 -44
- package/dist/lib/node/index.cjs.map +3 -3
- package/dist/lib/node/{intent-resolver-ZSOQILPJ.cjs → intent-resolver-DVBEXJ33.cjs} +13 -13
- package/dist/lib/node/{intent-resolver-ZSOQILPJ.cjs.map → intent-resolver-DVBEXJ33.cjs.map} +1 -1
- package/dist/lib/node/{markdown-FWRKMSKV.cjs → markdown-ELRGISXE.cjs} +7 -7
- package/dist/lib/node/meta.json +1 -1
- package/dist/lib/node/{react-surface-MCQUT7BC.cjs → react-surface-7HLTN5XS.cjs} +46 -37
- package/dist/lib/node/react-surface-7HLTN5XS.cjs.map +7 -0
- package/dist/lib/node/{settings-TH4YSUVU.cjs → settings-7VQYARM5.cjs} +6 -6
- package/dist/lib/node/types.cjs +3 -3
- package/dist/lib/node/types.cjs.map +1 -1
- package/dist/lib/node-esm/{ThreadContainer-FGFB25TQ.mjs → ThreadContainer-SV74JFRH.mjs} +2 -2
- package/dist/lib/node-esm/{chunk-B3CF35MY.mjs → chunk-33NDMQQQ.mjs} +2 -4
- package/dist/lib/node-esm/{chunk-B3CF35MY.mjs.map → chunk-33NDMQQQ.mjs.map} +3 -3
- package/dist/lib/node-esm/{chunk-DKCH2H5C.mjs → chunk-CISLDOH7.mjs} +8 -18
- package/dist/lib/node-esm/chunk-CISLDOH7.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-PJPVEO7E.mjs +17 -0
- package/dist/lib/node-esm/chunk-PJPVEO7E.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +43 -45
- package/dist/lib/node-esm/index.mjs.map +3 -3
- package/dist/lib/node-esm/{intent-resolver-MHP4C2NZ.mjs → intent-resolver-DHVLBNCC.mjs} +4 -4
- package/dist/lib/node-esm/{intent-resolver-MHP4C2NZ.mjs.map → intent-resolver-DHVLBNCC.mjs.map} +1 -1
- package/dist/lib/node-esm/{markdown-6AQFDAW3.mjs → markdown-23OB7EZG.mjs} +4 -4
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/{react-surface-6JMVZUDM.mjs → react-surface-AZHTTR6J.mjs} +42 -33
- package/dist/lib/node-esm/react-surface-AZHTTR6J.mjs.map +7 -0
- package/dist/lib/node-esm/{settings-KEDRR7RM.mjs → settings-SGMM7UDT.mjs} +2 -2
- package/dist/lib/node-esm/types.mjs +1 -1
- package/dist/types/src/ThreadPlugin.d.ts.map +1 -1
- package/dist/types/src/capabilities/index.d.ts +2 -179
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/markdown.d.ts +1 -1
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
- package/dist/types/src/capabilities/state.d.ts +1 -1
- package/dist/types/src/components/Chat.stories.d.ts.map +1 -1
- package/dist/types/src/components/ChatContainer.d.ts +2 -3
- package/dist/types/src/components/ChatContainer.d.ts.map +1 -1
- package/dist/types/src/components/CommentContainer.d.ts +1 -2
- package/dist/types/src/components/CommentContainer.d.ts.map +1 -1
- package/dist/types/src/components/Comments.stories.d.ts.map +1 -1
- package/dist/types/src/components/CommentsContainer.d.ts +1 -2
- package/dist/types/src/components/CommentsContainer.d.ts.map +1 -1
- package/dist/types/src/components/MessageContainer.d.ts +1 -2
- package/dist/types/src/components/MessageContainer.d.ts.map +1 -1
- package/dist/types/src/components/ThreadComplementary.d.ts +1 -2
- package/dist/types/src/components/ThreadComplementary.d.ts.map +1 -1
- package/dist/types/src/components/ThreadContainer.d.ts +2 -2
- package/dist/types/src/components/ThreadContainer.d.ts.map +1 -1
- package/dist/types/src/components/ThreadSettings.d.ts +1 -2
- package/dist/types/src/components/ThreadSettings.d.ts.map +1 -1
- package/dist/types/src/components/index.d.ts +1 -1
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/components/testing.d.ts +12 -12
- package/dist/types/src/components/testing.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts +6 -3
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types.d.ts +5 -7
- package/dist/types/src/types.d.ts.map +1 -1
- package/package.json +31 -30
- package/src/ThreadPlugin.tsx +44 -47
- package/src/capabilities/index.ts +0 -1
- package/src/capabilities/intent-resolver.ts +1 -1
- package/src/capabilities/react-surface.tsx +1 -2
- package/src/components/Chat.stories.tsx +1 -5
- package/src/components/CommentContainer.tsx +2 -2
- package/src/components/Comments.stories.tsx +8 -2
- package/src/components/MessageContainer.tsx +6 -19
- package/src/components/ThreadComplementary.tsx +34 -4
- package/src/components/ThreadSettings.tsx +5 -11
- package/src/translations.ts +2 -1
- package/src/types.ts +1 -5
- package/dist/lib/browser/app-graph-builder-IANFWFYN.mjs +0 -121
- package/dist/lib/browser/app-graph-builder-IANFWFYN.mjs.map +0 -7
- package/dist/lib/browser/chunk-5EQVG4L3.mjs.map +0 -7
- package/dist/lib/browser/chunk-L4QHQNDC.mjs +0 -18
- package/dist/lib/browser/chunk-L4QHQNDC.mjs.map +0 -7
- package/dist/lib/browser/react-surface-LDPZN456.mjs.map +0 -7
- package/dist/lib/node/app-graph-builder-LFEDPJLK.cjs +0 -135
- package/dist/lib/node/app-graph-builder-LFEDPJLK.cjs.map +0 -7
- package/dist/lib/node/chunk-346YIZVL.cjs.map +0 -7
- package/dist/lib/node/chunk-VAZ3BCTU.cjs.map +0 -7
- package/dist/lib/node/react-surface-MCQUT7BC.cjs.map +0 -7
- package/dist/lib/node-esm/app-graph-builder-IXHFRMCY.mjs +0 -122
- package/dist/lib/node-esm/app-graph-builder-IXHFRMCY.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-3INUK3A6.mjs +0 -20
- package/dist/lib/node-esm/chunk-3INUK3A6.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-DKCH2H5C.mjs.map +0 -7
- package/dist/lib/node-esm/react-surface-6JMVZUDM.mjs.map +0 -7
- package/dist/types/src/capabilities/app-graph-builder.d.ts +0 -180
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +0 -1
- package/src/capabilities/app-graph-builder.ts +0 -119
- /package/dist/lib/browser/{ThreadContainer-T4WIBHY6.mjs.map → ThreadContainer-6OP5AG2W.mjs.map} +0 -0
- /package/dist/lib/browser/{markdown-2NBXKXCY.mjs.map → markdown-RPYOUBVR.mjs.map} +0 -0
- /package/dist/lib/browser/{settings-TKOPRXSU.mjs.map → settings-WQTE5AEZ.mjs.map} +0 -0
- /package/dist/lib/node/{ThreadContainer-4XACAVGV.cjs.map → ThreadContainer-LTKKLPXX.cjs.map} +0 -0
- /package/dist/lib/node/{markdown-FWRKMSKV.cjs.map → markdown-ELRGISXE.cjs.map} +0 -0
- /package/dist/lib/node/{settings-TH4YSUVU.cjs.map → settings-7VQYARM5.cjs.map} +0 -0
- /package/dist/lib/node-esm/{ThreadContainer-FGFB25TQ.mjs.map → ThreadContainer-SV74JFRH.mjs.map} +0 -0
- /package/dist/lib/node-esm/{markdown-6AQFDAW3.mjs.map → markdown-23OB7EZG.mjs.map} +0 -0
- /package/dist/lib/node-esm/{settings-KEDRR7RM.mjs.map → settings-SGMM7UDT.mjs.map} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ThreadContainer.d.ts","sourceRoot":"","sources":["../../../../src/components/ThreadContainer.tsx"],"names":[],"mappings":"AAIA,
|
|
1
|
+
{"version":3,"file":"ThreadContainer.d.ts","sourceRoot":"","sources":["../../../../src/components/ThreadContainer.tsx"],"names":[],"mappings":"AAIA,OAAc,EAAE,KAAK,cAAc,EAAE,MAAM,OAAO,CAAC;AAInD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD,QAAA,MAAM,eAAe,uBAGlB,IAAI,CAAC,cAAc,CAAC,OAAO,aAAa,CAAC,EAAE,QAAQ,GAAG,SAAS,CAAC,GAAG;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,4CAMrF,CAAC;AAEF,eAAe,eAAe,CAAC"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import type { ThreadSettingsProps } from '../types';
|
|
3
2
|
export declare const ThreadSettings: ({ settings }: {
|
|
4
3
|
settings: ThreadSettingsProps;
|
|
5
|
-
}) =>
|
|
4
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
6
5
|
//# sourceMappingURL=ThreadSettings.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ThreadSettings.d.ts","sourceRoot":"","sources":["../../../../src/components/ThreadSettings.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ThreadSettings.d.ts","sourceRoot":"","sources":["../../../../src/components/ThreadSettings.tsx"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAEpD,eAAO,MAAM,cAAc,iBAAkB;IAAE,QAAQ,EAAE,mBAAmB,CAAA;CAAE,4CAI7E,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export declare const ThreadContainer: import("react").LazyExoticComponent<({ role, ...props }: Pick<import("react").ComponentProps<typeof import("./ChatContainer").ChatContainer>, "thread" | "context"> & {
|
|
2
2
|
role: string;
|
|
3
|
-
}) => import("react").JSX.Element>;
|
|
3
|
+
}) => import("react/jsx-runtime").JSX.Element>;
|
|
4
4
|
export * from './CommentContainer';
|
|
5
5
|
export * from './CommentsContainer';
|
|
6
6
|
export * from './ChatContainer';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/index.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,eAAe;;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/index.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,eAAe;;8CAA0C,CAAC;AAGvE,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,iBAAiB,CAAC;AAChC,cAAc,oBAAoB,CAAC;AACnC,cAAc,uBAAuB,CAAC;AACtC,cAAc,kBAAkB,CAAC"}
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import { Expando } from '@dxos/echo-schema';
|
|
2
2
|
import { type Identity } from '@dxos/react-client/halo';
|
|
3
|
-
export declare const createChatThread: (identity: Identity) => import("@dxos/live-object").ReactiveObject<import("
|
|
3
|
+
export declare const createChatThread: (identity: Identity) => import("@dxos/live-object").ReactiveObject<import("@dxos/echo-schema").TypedObjectFields<{
|
|
4
4
|
name: import("@effect/schema/Schema").optional<typeof import("@effect/schema/Schema").String>;
|
|
5
5
|
anchor: import("@effect/schema/Schema").optional<typeof import("@effect/schema/Schema").String>;
|
|
6
6
|
status: import("@effect/schema/Schema").optional<import("@effect/schema/Schema").Union<[import("@effect/schema/Schema").Literal<["staged"]>, import("@effect/schema/Schema").Literal<["active"]>, import("@effect/schema/Schema").Literal<["resolved"]>]>>;
|
|
7
|
-
messages: import("@effect/schema/Schema").mutable<import("@effect/schema/Schema").Array$<import("@dxos/echo-schema").Ref$<import("
|
|
7
|
+
messages: import("@effect/schema/Schema").mutable<import("@effect/schema/Schema").Array$<import("@dxos/echo-schema").Ref$<import("@dxos/echo-schema").TypedObjectFields<{
|
|
8
8
|
timestamp: typeof import("@effect/schema/Schema").String;
|
|
9
9
|
state: import("@effect/schema/Schema").optional<import("@effect/schema/Schema").Enums<typeof import("@dxos/plugin-space/types").MessageState>>;
|
|
10
10
|
sender: import("@effect/schema/Schema").mutable<import("@effect/schema/Schema").Struct<{
|
|
11
|
-
contact: import("@effect/schema/Schema").optional<import("@dxos/echo-schema").Ref$<import("
|
|
11
|
+
contact: import("@effect/schema/Schema").optional<import("@dxos/echo-schema").Ref$<import("@dxos/echo-schema").TypedObjectFields<{
|
|
12
12
|
name: import("@effect/schema/Schema").optional<typeof import("@effect/schema/Schema").String>;
|
|
13
13
|
identifiers: import("@effect/schema/Schema").mutable<import("@effect/schema/Schema").Array$<import("@effect/schema/Schema").Struct<{
|
|
14
14
|
type: typeof import("@effect/schema/Schema").String;
|
|
15
15
|
value: typeof import("@effect/schema/Schema").String;
|
|
16
16
|
}>>>;
|
|
17
|
-
}, import("
|
|
17
|
+
}, import("@dxos/echo-schema").TypedObjectOptions>>>;
|
|
18
18
|
identityKey: import("@effect/schema/Schema").optional<typeof import("@effect/schema/Schema").String>;
|
|
19
19
|
email: import("@effect/schema/Schema").optional<typeof import("@effect/schema/Schema").String>;
|
|
20
20
|
name: import("@effect/schema/Schema").optional<typeof import("@effect/schema/Schema").String>;
|
|
@@ -23,23 +23,23 @@ export declare const createChatThread: (identity: Identity) => import("@dxos/liv
|
|
|
23
23
|
parts: import("@effect/schema/Schema").optional<import("@effect/schema/Schema").mutable<import("@effect/schema/Schema").Array$<import("@dxos/echo-schema").Ref$<Expando>>>>;
|
|
24
24
|
properties: import("@effect/schema/Schema").optional<import("@effect/schema/Schema").mutable<import("@effect/schema/Schema").Record$<typeof import("@effect/schema/Schema").String, typeof import("@effect/schema/Schema").Any>>>;
|
|
25
25
|
context: import("@effect/schema/Schema").optional<import("@dxos/echo-schema").Ref$<Expando>>;
|
|
26
|
-
}, import("
|
|
27
|
-
}, import("
|
|
28
|
-
export declare const createCommentThread: (identity: Identity) => import("@dxos/live-object").ReactiveObject<import("
|
|
26
|
+
}, import("@dxos/echo-schema").TypedObjectOptions>>>>;
|
|
27
|
+
}, import("@dxos/echo-schema").TypedObjectOptions>>;
|
|
28
|
+
export declare const createCommentThread: (identity: Identity) => import("@dxos/live-object").ReactiveObject<import("@dxos/echo-schema").TypedObjectFields<{
|
|
29
29
|
name: import("@effect/schema/Schema").optional<typeof import("@effect/schema/Schema").String>;
|
|
30
30
|
anchor: import("@effect/schema/Schema").optional<typeof import("@effect/schema/Schema").String>;
|
|
31
31
|
status: import("@effect/schema/Schema").optional<import("@effect/schema/Schema").Union<[import("@effect/schema/Schema").Literal<["staged"]>, import("@effect/schema/Schema").Literal<["active"]>, import("@effect/schema/Schema").Literal<["resolved"]>]>>;
|
|
32
|
-
messages: import("@effect/schema/Schema").mutable<import("@effect/schema/Schema").Array$<import("@dxos/echo-schema").Ref$<import("
|
|
32
|
+
messages: import("@effect/schema/Schema").mutable<import("@effect/schema/Schema").Array$<import("@dxos/echo-schema").Ref$<import("@dxos/echo-schema").TypedObjectFields<{
|
|
33
33
|
timestamp: typeof import("@effect/schema/Schema").String;
|
|
34
34
|
state: import("@effect/schema/Schema").optional<import("@effect/schema/Schema").Enums<typeof import("@dxos/plugin-space/types").MessageState>>;
|
|
35
35
|
sender: import("@effect/schema/Schema").mutable<import("@effect/schema/Schema").Struct<{
|
|
36
|
-
contact: import("@effect/schema/Schema").optional<import("@dxos/echo-schema").Ref$<import("
|
|
36
|
+
contact: import("@effect/schema/Schema").optional<import("@dxos/echo-schema").Ref$<import("@dxos/echo-schema").TypedObjectFields<{
|
|
37
37
|
name: import("@effect/schema/Schema").optional<typeof import("@effect/schema/Schema").String>;
|
|
38
38
|
identifiers: import("@effect/schema/Schema").mutable<import("@effect/schema/Schema").Array$<import("@effect/schema/Schema").Struct<{
|
|
39
39
|
type: typeof import("@effect/schema/Schema").String;
|
|
40
40
|
value: typeof import("@effect/schema/Schema").String;
|
|
41
41
|
}>>>;
|
|
42
|
-
}, import("
|
|
42
|
+
}, import("@dxos/echo-schema").TypedObjectOptions>>>;
|
|
43
43
|
identityKey: import("@effect/schema/Schema").optional<typeof import("@effect/schema/Schema").String>;
|
|
44
44
|
email: import("@effect/schema/Schema").optional<typeof import("@effect/schema/Schema").String>;
|
|
45
45
|
name: import("@effect/schema/Schema").optional<typeof import("@effect/schema/Schema").String>;
|
|
@@ -48,6 +48,6 @@ export declare const createCommentThread: (identity: Identity) => import("@dxos/
|
|
|
48
48
|
parts: import("@effect/schema/Schema").optional<import("@effect/schema/Schema").mutable<import("@effect/schema/Schema").Array$<import("@dxos/echo-schema").Ref$<Expando>>>>;
|
|
49
49
|
properties: import("@effect/schema/Schema").optional<import("@effect/schema/Schema").mutable<import("@effect/schema/Schema").Record$<typeof import("@effect/schema/Schema").String, typeof import("@effect/schema/Schema").Any>>>;
|
|
50
50
|
context: import("@effect/schema/Schema").optional<import("@dxos/echo-schema").Ref$<Expando>>;
|
|
51
|
-
}, import("
|
|
52
|
-
}, import("
|
|
51
|
+
}, import("@dxos/echo-schema").TypedObjectOptions>>>>;
|
|
52
|
+
}, import("@dxos/echo-schema").TypedObjectOptions>>;
|
|
53
53
|
//# sourceMappingURL=testing.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"testing.d.ts","sourceRoot":"","sources":["../../../../src/components/testing.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAK5C,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAExD,eAAO,MAAM,gBAAgB,aAAc,QAAQ;;;;
|
|
1
|
+
{"version":3,"file":"testing.d.ts","sourceRoot":"","sources":["../../../../src/components/testing.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAK5C,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAExD,eAAO,MAAM,gBAAgB,aAAc,QAAQ;;;;oGAwCu6F,mBAAmB,cAAc,mBAAmB;;;;qEAAsU,mBAAmB,cAAc,mBAAmB;;;;;;sBAAuQ,mBAAmB;;;;;;8IAAyY,mBAAmB;;iEAA+S,mBAAmB;cAAgC,mBAAmB;mDAnBl7I,CAAC;AAEF,eAAO,MAAM,mBAAmB,aAAc,QAAQ;;;;oGAiBo6F,mBAAmB,cAAc,mBAAmB;;;;qEAAsU,mBAAmB,cAAc,mBAAmB;;;;;;sBAAuQ,mBAAmB;;;;;;8IAAyY,mBAAmB;;iEAA+S,mBAAmB;cAAgC,mBAAmB;mDADl7I,CAAC"}
|
|
@@ -8,7 +8,6 @@ declare const _default: {
|
|
|
8
8
|
'delete channel label'?: undefined;
|
|
9
9
|
'create channel label'?: undefined;
|
|
10
10
|
'message placeholder'?: undefined;
|
|
11
|
-
'settings standalone label'?: undefined;
|
|
12
11
|
'activity message'?: undefined;
|
|
13
12
|
'anonymous label'?: undefined;
|
|
14
13
|
'delete message block label'?: undefined;
|
|
@@ -30,6 +29,8 @@ declare const _default: {
|
|
|
30
29
|
'delete message label'?: undefined;
|
|
31
30
|
'open comments panel label'?: undefined;
|
|
32
31
|
'comments panel label'?: undefined;
|
|
32
|
+
'show all label'?: undefined;
|
|
33
|
+
'show unresolved label'?: undefined;
|
|
33
34
|
} | {
|
|
34
35
|
'plugin name': string;
|
|
35
36
|
'channel name placeholder': string;
|
|
@@ -37,7 +38,6 @@ declare const _default: {
|
|
|
37
38
|
'delete channel label': string;
|
|
38
39
|
'create channel label': string;
|
|
39
40
|
'message placeholder': string;
|
|
40
|
-
'settings standalone label': string;
|
|
41
41
|
'activity message': string;
|
|
42
42
|
'anonymous label': string;
|
|
43
43
|
'delete message block label': string;
|
|
@@ -59,6 +59,8 @@ declare const _default: {
|
|
|
59
59
|
'delete message label': string;
|
|
60
60
|
'open comments panel label': string;
|
|
61
61
|
'comments panel label': string;
|
|
62
|
+
'show all label': string;
|
|
63
|
+
'show unresolved label': string;
|
|
62
64
|
'typename label'?: undefined;
|
|
63
65
|
};
|
|
64
66
|
"dxos.org/plugin/thread": {
|
|
@@ -68,7 +70,6 @@ declare const _default: {
|
|
|
68
70
|
'delete channel label': string;
|
|
69
71
|
'create channel label': string;
|
|
70
72
|
'message placeholder': string;
|
|
71
|
-
'settings standalone label': string;
|
|
72
73
|
'activity message': string;
|
|
73
74
|
'anonymous label': string;
|
|
74
75
|
'delete message block label': string;
|
|
@@ -90,6 +91,8 @@ declare const _default: {
|
|
|
90
91
|
'delete message label': string;
|
|
91
92
|
'open comments panel label': string;
|
|
92
93
|
'comments panel label': string;
|
|
94
|
+
'show all label': string;
|
|
95
|
+
'show unresolved label': string;
|
|
93
96
|
};
|
|
94
97
|
};
|
|
95
98
|
}[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"translations.d.ts","sourceRoot":"","sources":["../../../src/translations.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"translations.d.ts","sourceRoot":"","sources":["../../../src/translations.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAQA,wBAwCE"}
|
|
@@ -7,7 +7,7 @@ export declare namespace ThreadAction {
|
|
|
7
7
|
input: S.Struct<{
|
|
8
8
|
name: S.optional<typeof S.String>;
|
|
9
9
|
cursor: S.optional<typeof S.String>;
|
|
10
|
-
subject: S.optional<S.Schema<import("@dxos/
|
|
10
|
+
subject: S.optional<S.Schema<import("@dxos/echo-db").ReactiveEchoObject<any>, import("@dxos/echo-db").ReactiveEchoObject<any>, never>>;
|
|
11
11
|
}>;
|
|
12
12
|
output: S.Struct<{
|
|
13
13
|
object: S.Union<[typeof ChannelType, typeof ThreadType]>;
|
|
@@ -41,7 +41,7 @@ export declare namespace ThreadAction {
|
|
|
41
41
|
} & {
|
|
42
42
|
input: S.Struct<{
|
|
43
43
|
thread: typeof ThreadType;
|
|
44
|
-
subject: S.Schema<import("@dxos/
|
|
44
|
+
subject: S.Schema<import("@dxos/echo-db").ReactiveEchoObject<any>, import("@dxos/echo-db").ReactiveEchoObject<any>, never>;
|
|
45
45
|
cursor: S.optional<typeof S.String>;
|
|
46
46
|
}>;
|
|
47
47
|
output: typeof S.Void;
|
|
@@ -53,7 +53,7 @@ export declare namespace ThreadAction {
|
|
|
53
53
|
} & {
|
|
54
54
|
input: S.Struct<{
|
|
55
55
|
thread: typeof ThreadType;
|
|
56
|
-
subject: S.Schema<import("@dxos/
|
|
56
|
+
subject: S.Schema<import("@dxos/echo-db").ReactiveEchoObject<any>, import("@dxos/echo-db").ReactiveEchoObject<any>, never>;
|
|
57
57
|
}>;
|
|
58
58
|
output: typeof S.Void;
|
|
59
59
|
}>;
|
|
@@ -64,7 +64,7 @@ export declare namespace ThreadAction {
|
|
|
64
64
|
} & {
|
|
65
65
|
input: S.Struct<{
|
|
66
66
|
thread: typeof ThreadType;
|
|
67
|
-
subject: S.Schema<import("@dxos/
|
|
67
|
+
subject: S.Schema<import("@dxos/echo-db").ReactiveEchoObject<any>, import("@dxos/echo-db").ReactiveEchoObject<any>, never>;
|
|
68
68
|
messageId: typeof S.String;
|
|
69
69
|
message: S.optional<typeof MessageType>;
|
|
70
70
|
messageIndex: S.optional<typeof S.Number>;
|
|
@@ -75,9 +75,7 @@ export declare namespace ThreadAction {
|
|
|
75
75
|
}
|
|
76
76
|
export {};
|
|
77
77
|
}
|
|
78
|
-
export declare const ThreadSettingsSchema: S.mutable<S.Struct<{
|
|
79
|
-
standalone: S.optional<typeof S.Boolean>;
|
|
80
|
-
}>>;
|
|
78
|
+
export declare const ThreadSettingsSchema: S.mutable<S.Struct<{}>>;
|
|
81
79
|
export type ThreadSettingsProps = S.Schema.Type<typeof ThreadSettingsSchema>;
|
|
82
80
|
export interface ThreadModel {
|
|
83
81
|
root: ThreadType;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/types.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,CAAC,EAAE,MAAM,mBAAmB,CAAC;AACtC,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAKhF,yBAAiB,YAAY,CAAC;;;;;;;;;;;;;IAG5B,MAAM,OAAO,MAAO,SAAQ,WAS1B;KAAG;;;;;;;;;;IAEL,MAAM,OAAO,MAAO,SAAQ,WAM1B;KAAG;;;;;;;;;IAEL,MAAM,OAAO,cAAe,SAAQ,mBAKlC;KAAG;;;;;;;;;;;IAEL,MAAM,OAAO,MAAO,SAAQ,WAO1B;KAAG;;;;;;;;;;IAGL,MAAM,OAAO,YAAa,SAAQ,iBAMhC;KAAG;;;;;;;;;;;;;IAEL,MAAM,OAAO,aAAc,SAAQ,kBASjC;KAAG;;CACN;AAED,eAAO,MAAM,oBAAoB
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/types.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,CAAC,EAAE,MAAM,mBAAmB,CAAC;AACtC,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAKhF,yBAAiB,YAAY,CAAC;;;;;;;;;;;;;IAG5B,MAAM,OAAO,MAAO,SAAQ,WAS1B;KAAG;;;;;;;;;;IAEL,MAAM,OAAO,MAAO,SAAQ,WAM1B;KAAG;;;;;;;;;IAEL,MAAM,OAAO,cAAe,SAAQ,mBAKlC;KAAG;;;;;;;;;;;IAEL,MAAM,OAAO,MAAO,SAAQ,WAO1B;KAAG;;;;;;;;;;IAGL,MAAM,OAAO,YAAa,SAAQ,iBAMhC;KAAG;;;;;;;;;;;;;IAEL,MAAM,OAAO,aAAc,SAAQ,kBASjC;KAAG;;CACN;AAED,eAAO,MAAM,oBAAoB,yBAA0B,CAAC;AAE5D,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAE7E,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,UAAU,CAAC;CAClB;AAED,KAAK,SAAS,GAAG,MAAM,CAAC;AACxB,MAAM,MAAM,SAAS,GAAG;IAAE,mBAAmB,EAAE,OAAO,CAAA;CAAE,CAAC;AACzD,MAAM,MAAM,SAAS,GAAG,MAAM,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC;AAErD,MAAM,MAAM,WAAW,GAAG;IACxB,+BAA+B;IAC/B,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,UAAU,EAAE,CAAC,CAAC;IACrC,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC9B,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dxos/plugin-thread",
|
|
3
|
-
"version": "0.7.5-labs.
|
|
3
|
+
"version": "0.7.5-labs.a8b535d",
|
|
4
4
|
"description": "DXOS Threads Surface plugin",
|
|
5
5
|
"homepage": "https://dxos.org",
|
|
6
6
|
"bugs": "https://github.com/dxos/dxos/issues",
|
|
7
7
|
"license": "MIT",
|
|
8
8
|
"author": "DXOS.org",
|
|
9
9
|
"sideEffects": true,
|
|
10
|
+
"type": "module",
|
|
10
11
|
"exports": {
|
|
11
12
|
".": {
|
|
12
13
|
"types": "./dist/types/src/index.d.ts",
|
|
@@ -38,29 +39,29 @@
|
|
|
38
39
|
"@preact/signals-core": "^1.6.0",
|
|
39
40
|
"date-fns": "^3.3.1",
|
|
40
41
|
"lodash.get": "^4.4.2",
|
|
41
|
-
"@dxos/app-framework": "0.7.5-labs.
|
|
42
|
-
"@dxos/
|
|
43
|
-
"@dxos/
|
|
44
|
-
"@dxos/
|
|
45
|
-
"@dxos/
|
|
46
|
-
"@dxos/
|
|
47
|
-
"@dxos/
|
|
48
|
-
"@dxos/
|
|
49
|
-
"@dxos/
|
|
50
|
-
"@dxos/plugin-
|
|
51
|
-
"@dxos/plugin-
|
|
52
|
-
"@dxos/plugin-
|
|
53
|
-
"@dxos/plugin-
|
|
54
|
-
"@dxos/plugin-observability": "0.7.5-labs.
|
|
55
|
-
"@dxos/
|
|
56
|
-
"@dxos/
|
|
57
|
-
"@dxos/react-ui-attention": "0.7.5-labs.
|
|
58
|
-
"@dxos/react-ui-editor": "0.7.5-labs.
|
|
59
|
-
"@dxos/react-ui-
|
|
60
|
-
"@dxos/react-ui-
|
|
61
|
-
"@dxos/react-ui-
|
|
62
|
-
"@dxos/react-ui-thread": "0.7.5-labs.
|
|
63
|
-
"@dxos/util": "0.7.5-labs.
|
|
42
|
+
"@dxos/app-framework": "0.7.5-labs.a8b535d",
|
|
43
|
+
"@dxos/display-name": "0.7.5-labs.a8b535d",
|
|
44
|
+
"@dxos/async": "0.7.5-labs.a8b535d",
|
|
45
|
+
"@dxos/echo-schema": "0.7.5-labs.a8b535d",
|
|
46
|
+
"@dxos/invariant": "0.7.5-labs.a8b535d",
|
|
47
|
+
"@dxos/local-storage": "0.7.5-labs.a8b535d",
|
|
48
|
+
"@dxos/live-object": "0.7.5-labs.a8b535d",
|
|
49
|
+
"@dxos/log": "0.7.5-labs.a8b535d",
|
|
50
|
+
"@dxos/plugin-attention": "0.7.5-labs.a8b535d",
|
|
51
|
+
"@dxos/plugin-client": "0.7.5-labs.a8b535d",
|
|
52
|
+
"@dxos/plugin-graph": "0.7.5-labs.a8b535d",
|
|
53
|
+
"@dxos/plugin-markdown": "0.7.5-labs.a8b535d",
|
|
54
|
+
"@dxos/plugin-deck": "0.7.5-labs.a8b535d",
|
|
55
|
+
"@dxos/plugin-observability": "0.7.5-labs.a8b535d",
|
|
56
|
+
"@dxos/react-client": "0.7.5-labs.a8b535d",
|
|
57
|
+
"@dxos/plugin-space": "0.7.5-labs.a8b535d",
|
|
58
|
+
"@dxos/react-ui-attention": "0.7.5-labs.a8b535d",
|
|
59
|
+
"@dxos/react-ui-editor": "0.7.5-labs.a8b535d",
|
|
60
|
+
"@dxos/react-ui-form": "0.7.5-labs.a8b535d",
|
|
61
|
+
"@dxos/react-ui-stack": "0.7.5-labs.a8b535d",
|
|
62
|
+
"@dxos/react-ui-tabs": "0.7.5-labs.a8b535d",
|
|
63
|
+
"@dxos/react-ui-thread": "0.7.5-labs.a8b535d",
|
|
64
|
+
"@dxos/util": "0.7.5-labs.a8b535d"
|
|
64
65
|
},
|
|
65
66
|
"devDependencies": {
|
|
66
67
|
"@phosphor-icons/react": "^2.1.5",
|
|
@@ -70,17 +71,17 @@
|
|
|
70
71
|
"react": "~18.2.0",
|
|
71
72
|
"react-dom": "~18.2.0",
|
|
72
73
|
"vite": "5.4.7",
|
|
73
|
-
"@dxos/random": "0.7.5-labs.
|
|
74
|
-
"@dxos/react-ui": "0.7.5-labs.
|
|
75
|
-
"@dxos/
|
|
76
|
-
"@dxos/
|
|
74
|
+
"@dxos/random": "0.7.5-labs.a8b535d",
|
|
75
|
+
"@dxos/react-ui": "0.7.5-labs.a8b535d",
|
|
76
|
+
"@dxos/storybook-utils": "0.7.5-labs.a8b535d",
|
|
77
|
+
"@dxos/react-ui-theme": "0.7.5-labs.a8b535d"
|
|
77
78
|
},
|
|
78
79
|
"peerDependencies": {
|
|
79
80
|
"@phosphor-icons/react": "^2.1.5",
|
|
80
81
|
"react": "~18.2.0",
|
|
81
82
|
"react-dom": "~18.2.0",
|
|
82
|
-
"@dxos/react-ui": "0.7.5-labs.
|
|
83
|
-
"@dxos/react-ui-theme": "0.7.5-labs.
|
|
83
|
+
"@dxos/react-ui": "0.7.5-labs.a8b535d",
|
|
84
|
+
"@dxos/react-ui-theme": "0.7.5-labs.a8b535d"
|
|
84
85
|
},
|
|
85
86
|
"publishConfig": {
|
|
86
87
|
"access": "public"
|
package/src/ThreadPlugin.tsx
CHANGED
|
@@ -2,39 +2,36 @@
|
|
|
2
2
|
// Copyright 2023 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import {
|
|
6
|
-
allOf,
|
|
7
|
-
Capabilities,
|
|
8
|
-
contributes,
|
|
9
|
-
createIntent,
|
|
10
|
-
defineModule,
|
|
11
|
-
definePlugin,
|
|
12
|
-
Events,
|
|
13
|
-
type PluginsContext,
|
|
14
|
-
} from '@dxos/app-framework';
|
|
5
|
+
import { Capabilities, contributes, createIntent, defineModule, definePlugin, Events } from '@dxos/app-framework';
|
|
15
6
|
import { ClientCapabilities, ClientEvents } from '@dxos/plugin-client';
|
|
16
|
-
import { DeckCapabilities } from '@dxos/plugin-deck';
|
|
17
|
-
import {
|
|
7
|
+
import { DeckCapabilities, DeckEvents } from '@dxos/plugin-deck';
|
|
8
|
+
import { MarkdownEvents } from '@dxos/plugin-markdown';
|
|
9
|
+
import { SpaceCapabilities, ThreadEvents } from '@dxos/plugin-space';
|
|
10
|
+
import { ChannelType, defineObjectForm, MessageType, ThreadType } from '@dxos/plugin-space/types';
|
|
18
11
|
import { type ReactiveEchoObject, RefArray } from '@dxos/react-client/echo';
|
|
19
12
|
import { translations as threadTranslations } from '@dxos/react-ui-thread';
|
|
20
13
|
|
|
21
|
-
import {
|
|
14
|
+
import { IntentResolver, Markdown, ReactSurface, ThreadState } from './capabilities';
|
|
22
15
|
import { meta, THREAD_ITEM, THREAD_PLUGIN } from './meta';
|
|
23
16
|
import translations from './translations';
|
|
24
|
-
import { ThreadAction
|
|
17
|
+
import { ThreadAction } from './types';
|
|
25
18
|
|
|
26
19
|
// TODO(Zan): Every instance of `cursor` should be replaced with `anchor`.
|
|
27
20
|
// NOTE(burdon): Review/discuss CursorConverter semantics.
|
|
28
21
|
export const ThreadPlugin = () =>
|
|
29
22
|
definePlugin(meta, [
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
23
|
+
// TODO(wittjosiah): Currently not used but leaving because there will likely be settings for threads again.
|
|
24
|
+
// defineModule({
|
|
25
|
+
// id: `${meta.id}/module/settings`,
|
|
26
|
+
// activatesOn: Events.SetupSettings,
|
|
27
|
+
// activate: ThreadSettings,
|
|
28
|
+
// }),
|
|
35
29
|
defineModule({
|
|
36
30
|
id: `${meta.id}/module/state`,
|
|
37
|
-
|
|
31
|
+
// TODO(wittjosiah): Does not integrate with settings store.
|
|
32
|
+
// Should this be a different event?
|
|
33
|
+
// Should settings store be renamed to be more generic?
|
|
34
|
+
activatesOn: Events.SetupSettings,
|
|
38
35
|
activate: ThreadState,
|
|
39
36
|
}),
|
|
40
37
|
defineModule({
|
|
@@ -49,7 +46,6 @@ export const ThreadPlugin = () =>
|
|
|
49
46
|
contributes(Capabilities.Metadata, {
|
|
50
47
|
id: ChannelType.typename,
|
|
51
48
|
metadata: {
|
|
52
|
-
createObject: (props: { name?: string }) => createIntent(ThreadAction.Create, props),
|
|
53
49
|
placeholder: ['channel name placeholder', { ns: THREAD_PLUGIN }],
|
|
54
50
|
icon: 'ph--chat--regular',
|
|
55
51
|
// TODO(wittjosiah): Move out of metadata.
|
|
@@ -88,55 +84,56 @@ export const ThreadPlugin = () =>
|
|
|
88
84
|
],
|
|
89
85
|
}),
|
|
90
86
|
defineModule({
|
|
91
|
-
id: `${meta.id}/module/
|
|
87
|
+
id: `${meta.id}/module/object-form`,
|
|
92
88
|
activatesOn: ClientEvents.SetupSchema,
|
|
93
|
-
activate: () =>
|
|
89
|
+
activate: () =>
|
|
90
|
+
contributes(
|
|
91
|
+
SpaceCapabilities.ObjectForm,
|
|
92
|
+
defineObjectForm({
|
|
93
|
+
objectSchema: ChannelType,
|
|
94
|
+
getIntent: () => createIntent(ThreadAction.Create),
|
|
95
|
+
}),
|
|
96
|
+
),
|
|
94
97
|
}),
|
|
95
98
|
defineModule({
|
|
96
|
-
id: `${meta.id}/module/
|
|
97
|
-
activatesOn:
|
|
98
|
-
activate: (
|
|
99
|
-
const client = context.requestCapability(ClientCapabilities.Client);
|
|
100
|
-
const settings = context
|
|
101
|
-
.requestCapability(Capabilities.SettingsStore)
|
|
102
|
-
.getStore<ThreadSettingsProps>(THREAD_PLUGIN)!.value;
|
|
103
|
-
if (settings.standalone) {
|
|
104
|
-
// TODO(wittjosiah): Requires reload to disable.
|
|
105
|
-
client.addTypes([ChannelType]);
|
|
106
|
-
return contributes(ClientCapabilities.Schema, [ChannelType]);
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
return [];
|
|
110
|
-
},
|
|
99
|
+
id: `${meta.id}/module/schema`,
|
|
100
|
+
activatesOn: ClientEvents.SetupSchema,
|
|
101
|
+
activate: () => contributes(ClientCapabilities.Schema, [ThreadType, MessageType]),
|
|
111
102
|
}),
|
|
112
103
|
defineModule({
|
|
113
104
|
id: `${meta.id}/module/complementary-panel`,
|
|
114
|
-
activatesOn:
|
|
105
|
+
activatesOn: DeckEvents.SetupComplementaryPanels,
|
|
115
106
|
activate: () =>
|
|
116
107
|
contributes(DeckCapabilities.ComplementaryPanel, {
|
|
117
108
|
id: 'comments',
|
|
118
109
|
label: ['comments panel label', { ns: THREAD_PLUGIN }],
|
|
119
110
|
icon: 'ph--chat-text--regular',
|
|
111
|
+
position: 'hoist',
|
|
112
|
+
// TODO(wittjosiah): Support comments on any object.
|
|
113
|
+
// filter: (node) => isEchoObject(node.data) && !!getSpace(node.data),
|
|
114
|
+
filter: (node) =>
|
|
115
|
+
!!node.data &&
|
|
116
|
+
typeof node.data === 'object' &&
|
|
117
|
+
'threads' in node.data &&
|
|
118
|
+
Array.isArray(node.data.threads) &&
|
|
119
|
+
!(node.data instanceof ChannelType),
|
|
120
120
|
}),
|
|
121
121
|
}),
|
|
122
122
|
defineModule({
|
|
123
123
|
id: `${meta.id}/module/markdown`,
|
|
124
|
-
activatesOn:
|
|
124
|
+
activatesOn: MarkdownEvents.SetupExtensions,
|
|
125
125
|
activate: Markdown,
|
|
126
126
|
}),
|
|
127
127
|
defineModule({
|
|
128
128
|
id: `${meta.id}/module/react-surface`,
|
|
129
|
-
activatesOn: Events.
|
|
129
|
+
activatesOn: Events.SetupReactSurface,
|
|
130
|
+
// TODO(wittjosiah): Should occur before the comments thread is loaded when surfaces activation is more granular.
|
|
131
|
+
activatesBefore: [ThreadEvents.SetupThread],
|
|
130
132
|
activate: ReactSurface,
|
|
131
133
|
}),
|
|
132
134
|
defineModule({
|
|
133
135
|
id: `${meta.id}/module/intent-resolver`,
|
|
134
|
-
activatesOn: Events.
|
|
136
|
+
activatesOn: Events.SetupIntentResolver,
|
|
135
137
|
activate: IntentResolver,
|
|
136
138
|
}),
|
|
137
|
-
defineModule({
|
|
138
|
-
id: `${meta.id}/module/app-graph-builder`,
|
|
139
|
-
activatesOn: Events.SetupAppGraph,
|
|
140
|
-
activate: AppGraphBuilder,
|
|
141
|
-
}),
|
|
142
139
|
]);
|
|
@@ -4,7 +4,6 @@
|
|
|
4
4
|
|
|
5
5
|
import { lazy } from '@dxos/app-framework';
|
|
6
6
|
|
|
7
|
-
export const AppGraphBuilder = lazy(() => import('./app-graph-builder'));
|
|
8
7
|
export const IntentResolver = lazy(() => import('./intent-resolver'));
|
|
9
8
|
export const Markdown = lazy(() => import('./markdown'));
|
|
10
9
|
export const ReactSurface = lazy(() => import('./react-surface'));
|
|
@@ -55,7 +55,7 @@ export default (context: PluginsContext) =>
|
|
|
55
55
|
],
|
|
56
56
|
};
|
|
57
57
|
} else {
|
|
58
|
-
//
|
|
58
|
+
// TODO(wittjosiah): Create separate intent for channel creation.
|
|
59
59
|
return {
|
|
60
60
|
data: { object: create(ChannelType, { threads: [makeRef(create(ThreadType, { messages: [] }))] }) },
|
|
61
61
|
};
|
|
@@ -7,7 +7,6 @@ import React from 'react';
|
|
|
7
7
|
import { Capabilities, contributes, createSurface, useLayout } from '@dxos/app-framework';
|
|
8
8
|
import { type Ref } from '@dxos/echo-schema';
|
|
9
9
|
import { SettingsStore } from '@dxos/local-storage';
|
|
10
|
-
import { log } from '@dxos/log';
|
|
11
10
|
import { ChannelType, type ThreadType } from '@dxos/plugin-space/types';
|
|
12
11
|
import { getSpace } from '@dxos/react-client/echo';
|
|
13
12
|
|
|
@@ -30,7 +29,7 @@ export default () =>
|
|
|
30
29
|
if (!thread) {
|
|
31
30
|
return null;
|
|
32
31
|
}
|
|
33
|
-
|
|
32
|
+
|
|
34
33
|
const currentPosition = layout.active.findIndex((id) => id === channel.id);
|
|
35
34
|
if (currentPosition > 0) {
|
|
36
35
|
const objectToTheLeft = layout.active[currentPosition - 1];
|
|
@@ -15,7 +15,6 @@ import { useClient } from '@dxos/react-client';
|
|
|
15
15
|
import { type Space } from '@dxos/react-client/echo';
|
|
16
16
|
import { useIdentity } from '@dxos/react-client/halo';
|
|
17
17
|
import { withClientProvider } from '@dxos/react-client/testing';
|
|
18
|
-
import { Mosaic } from '@dxos/react-ui-mosaic';
|
|
19
18
|
import { Thread } from '@dxos/react-ui-thread';
|
|
20
19
|
import { withLayout, withTheme } from '@dxos/storybook-utils';
|
|
21
20
|
|
|
@@ -47,10 +46,7 @@ const Story = () => {
|
|
|
47
46
|
}
|
|
48
47
|
|
|
49
48
|
return (
|
|
50
|
-
<
|
|
51
|
-
<main className='max-is-prose mli-auto bs-dvh overflow-hidden'>{space && <ChatContainer thread={thread} />}</main>
|
|
52
|
-
<Mosaic.DragOverlay />
|
|
53
|
-
</Mosaic.Root>
|
|
49
|
+
<main className='max-is-prose mli-auto bs-dvh overflow-hidden'>{space && <ChatContainer thread={thread} />}</main>
|
|
54
50
|
);
|
|
55
51
|
};
|
|
56
52
|
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
mx,
|
|
19
19
|
} from '@dxos/react-ui-theme';
|
|
20
20
|
import { MessageTextbox, type MessageTextboxProps, Thread, ThreadFooter, ThreadHeading } from '@dxos/react-ui-thread';
|
|
21
|
-
import {
|
|
21
|
+
import { isNonNullable } from '@dxos/util';
|
|
22
22
|
|
|
23
23
|
import { MessageContainer } from './MessageContainer';
|
|
24
24
|
import { command } from './command-extension';
|
|
@@ -179,7 +179,7 @@ export const CommentContainer = ({
|
|
|
179
179
|
</div>
|
|
180
180
|
</div>
|
|
181
181
|
{/** TODO(dmaretskyi): How's `thread.messages` undefined? */}
|
|
182
|
-
{RefArray.allResolvedTargets(thread.messages?.filter(
|
|
182
|
+
{RefArray.allResolvedTargets(thread.messages?.filter(isNonNullable) ?? []).map((message) => (
|
|
183
183
|
<MessageContainer key={message.id} message={message} members={members} onDelete={handleMessageDelete} />
|
|
184
184
|
))}
|
|
185
185
|
{/*
|
|
@@ -7,6 +7,8 @@ import '@dxos-theme';
|
|
|
7
7
|
import { type Meta } from '@storybook/react';
|
|
8
8
|
import React, { useEffect, useState } from 'react';
|
|
9
9
|
|
|
10
|
+
import { IntentPlugin } from '@dxos/app-framework';
|
|
11
|
+
import { withPluginManager } from '@dxos/app-framework/testing';
|
|
10
12
|
import { MessageType, ThreadType } from '@dxos/plugin-space/types';
|
|
11
13
|
import { faker } from '@dxos/random';
|
|
12
14
|
import { Filter, fullyQualifiedId, useQuery, useSpace } from '@dxos/react-client/echo';
|
|
@@ -44,7 +46,7 @@ const Story = ({ spaceKey }: ClientRepeatedComponentProps) => {
|
|
|
44
46
|
|
|
45
47
|
return (
|
|
46
48
|
<div className='flex justify-center overflow-y-auto bg-white dark:bg-black'>
|
|
47
|
-
<div className='flex flex-col w-[
|
|
49
|
+
<div className='flex flex-col w-[30rem]'>
|
|
48
50
|
<CommentsContainer threads={threads} detached={detached} onThreadDelete={console.log} />
|
|
49
51
|
</div>
|
|
50
52
|
</div>
|
|
@@ -57,7 +59,11 @@ const meta: Meta = {
|
|
|
57
59
|
title: 'plugins/plugin-thread/Comments',
|
|
58
60
|
// TODO(wittjosiah): Use decorator.
|
|
59
61
|
render: () => <ClientRepeater component={Story} createIdentity createSpace types={[ThreadType, MessageType]} />,
|
|
60
|
-
decorators: [
|
|
62
|
+
decorators: [
|
|
63
|
+
withTheme,
|
|
64
|
+
withLayout({ fullscreen: true, tooltips: true }),
|
|
65
|
+
withPluginManager({ plugins: [IntentPlugin()] }),
|
|
66
|
+
],
|
|
61
67
|
parameters: { translations },
|
|
62
68
|
};
|
|
63
69
|
|