@dxos/plugin-thread 0.8.1-main.ae460ac → 0.8.1-staging.31c3ee1
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/ChatContainer-IOOAQW6S.mjs +138 -0
- package/dist/lib/browser/ChatContainer-IOOAQW6S.mjs.map +7 -0
- package/dist/lib/browser/app-graph-builder-6W4UKJDI.mjs +41 -0
- package/dist/lib/browser/app-graph-builder-6W4UKJDI.mjs.map +7 -0
- package/dist/lib/browser/{chunk-NAO3LZMZ.mjs → chunk-EP6MRLY7.mjs} +2 -2
- package/dist/lib/browser/{chunk-BNEWNQBO.mjs → chunk-QDJ3Y6WF.mjs} +14 -19
- package/dist/lib/browser/{chunk-BNEWNQBO.mjs.map → chunk-QDJ3Y6WF.mjs.map} +3 -3
- package/dist/lib/browser/chunk-S5ZR4FYW.mjs +17 -0
- package/dist/lib/browser/chunk-S5ZR4FYW.mjs.map +7 -0
- package/dist/lib/browser/{chunk-UPKU23DA.mjs → chunk-TFVPUPOO.mjs} +35 -140
- package/dist/lib/browser/chunk-TFVPUPOO.mjs.map +7 -0
- package/dist/lib/browser/{chunk-636QDHE3.mjs → chunk-WBJLUUOK.mjs} +1 -1
- package/dist/lib/browser/{chunk-636QDHE3.mjs.map → chunk-WBJLUUOK.mjs.map} +2 -2
- package/dist/lib/browser/{chunk-YK3ICB7G.mjs → chunk-WOG72DWE.mjs} +25 -11
- package/dist/lib/browser/chunk-WOG72DWE.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +47 -49
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/{intent-resolver-FAFQ54NP.mjs → intent-resolver-QAY4FLLM.mjs} +134 -94
- package/dist/lib/browser/intent-resolver-QAY4FLLM.mjs.map +7 -0
- package/dist/lib/browser/{markdown-RPYOUBVR.mjs → markdown-7KXBXCUS.mjs} +9 -10
- package/dist/lib/browser/markdown-7KXBXCUS.mjs.map +7 -0
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/{react-surface-Y4MUSICN.mjs → react-surface-MT3OWULR.mjs} +55 -51
- package/dist/lib/browser/react-surface-MT3OWULR.mjs.map +7 -0
- package/dist/lib/browser/{settings-WQTE5AEZ.mjs → settings-4FEC7EAX.mjs} +3 -3
- package/dist/lib/browser/{state-GNFUURIC.mjs → state-PNMSLKAH.mjs} +4 -3
- package/dist/lib/browser/state-PNMSLKAH.mjs.map +7 -0
- package/dist/lib/browser/types.mjs +2 -2
- package/dist/lib/node/ChatContainer-4FNDRF3G.cjs +163 -0
- package/dist/lib/node/ChatContainer-4FNDRF3G.cjs.map +7 -0
- package/dist/lib/node/app-graph-builder-HZNWT4QU.cjs +57 -0
- package/dist/lib/node/app-graph-builder-HZNWT4QU.cjs.map +7 -0
- package/dist/lib/node/{chunk-CMEMMYDL.cjs → chunk-46BSFPBV.cjs} +29 -15
- package/dist/lib/node/chunk-46BSFPBV.cjs.map +7 -0
- package/dist/lib/node/{chunk-AWSTZ2KN.cjs → chunk-AKINTFBH.cjs} +17 -23
- package/dist/lib/node/chunk-AKINTFBH.cjs.map +7 -0
- package/dist/lib/node/chunk-E7Z3BKRQ.cjs +232 -0
- package/dist/lib/node/chunk-E7Z3BKRQ.cjs.map +7 -0
- package/dist/lib/node/{chunk-FPWNZ6TB.cjs → chunk-NQ5DTPOY.cjs} +7 -7
- package/dist/lib/node/{chunk-F735VMTN.cjs → chunk-ONLWOUYZ.cjs} +4 -4
- package/dist/lib/node/{chunk-F735VMTN.cjs.map → chunk-ONLWOUYZ.cjs.map} +2 -2
- package/dist/lib/node/{chunk-BHFHFTHO.cjs → chunk-S2A6BXEA.cjs} +12 -9
- package/dist/lib/node/chunk-S2A6BXEA.cjs.map +7 -0
- package/dist/lib/node/index.cjs +78 -83
- package/dist/lib/node/index.cjs.map +4 -4
- package/dist/lib/node/{intent-resolver-DVBEXJ33.cjs → intent-resolver-S6FE5OR7.cjs} +153 -113
- package/dist/lib/node/intent-resolver-S6FE5OR7.cjs.map +7 -0
- package/dist/lib/node/{markdown-ELRGISXE.cjs → markdown-L2WMCQKM.cjs} +13 -14
- package/dist/lib/node/markdown-L2WMCQKM.cjs.map +7 -0
- package/dist/lib/node/meta.json +1 -1
- package/dist/lib/node/{react-surface-7HLTN5XS.cjs → react-surface-Z45BYECE.cjs} +68 -64
- package/dist/lib/node/react-surface-Z45BYECE.cjs.map +7 -0
- package/dist/lib/node/{settings-7VQYARM5.cjs → settings-IXCPE55J.cjs} +8 -8
- package/dist/lib/node/{state-TQWEZ6B3.cjs → state-AT73KPGZ.cjs} +8 -7
- package/dist/lib/node/state-AT73KPGZ.cjs.map +7 -0
- package/dist/lib/node/types.cjs +4 -4
- package/dist/lib/node/types.cjs.map +1 -1
- package/dist/lib/node-esm/ChatContainer-NYLCL6QA.mjs +139 -0
- package/dist/lib/node-esm/ChatContainer-NYLCL6QA.mjs.map +7 -0
- package/dist/lib/node-esm/app-graph-builder-M3KK5QJH.mjs +42 -0
- package/dist/lib/node-esm/app-graph-builder-M3KK5QJH.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-FXUATCLW.mjs → chunk-42F2DTMM.mjs} +1 -1
- package/dist/lib/node-esm/{chunk-FXUATCLW.mjs.map → chunk-42F2DTMM.mjs.map} +2 -2
- package/dist/lib/node-esm/{chunk-CISLDOH7.mjs → chunk-ADTVMESP.mjs} +35 -140
- package/dist/lib/node-esm/chunk-ADTVMESP.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-33NDMQQQ.mjs → chunk-E446MGLP.mjs} +25 -11
- package/dist/lib/node-esm/chunk-E446MGLP.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-HLWJTUWZ.mjs → chunk-J56FORYF.mjs} +14 -19
- package/dist/lib/node-esm/{chunk-HLWJTUWZ.mjs.map → chunk-J56FORYF.mjs.map} +3 -3
- package/dist/lib/node-esm/{chunk-ZJITX3TO.mjs → chunk-WLY2HMDB.mjs} +2 -2
- package/dist/lib/node-esm/chunk-WSE23GSG.mjs +19 -0
- package/dist/lib/node-esm/chunk-WSE23GSG.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +47 -49
- package/dist/lib/node-esm/index.mjs.map +4 -4
- package/dist/lib/node-esm/{intent-resolver-DHVLBNCC.mjs → intent-resolver-OURFRSSF.mjs} +134 -94
- package/dist/lib/node-esm/intent-resolver-OURFRSSF.mjs.map +7 -0
- package/dist/lib/node-esm/{markdown-23OB7EZG.mjs → markdown-ZKU23UVD.mjs} +9 -10
- package/dist/lib/node-esm/markdown-ZKU23UVD.mjs.map +7 -0
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/{react-surface-AZHTTR6J.mjs → react-surface-KIJ767JK.mjs} +55 -51
- package/dist/lib/node-esm/react-surface-KIJ767JK.mjs.map +7 -0
- package/dist/lib/node-esm/{settings-SGMM7UDT.mjs → settings-ZUJQ4LWI.mjs} +3 -3
- package/dist/lib/node-esm/{state-7MLR27YG.mjs → state-SSDX5O67.mjs} +4 -3
- package/dist/lib/node-esm/state-SSDX5O67.mjs.map +7 -0
- package/dist/lib/node-esm/types.mjs +2 -2
- package/dist/types/src/ThreadPlugin.d.ts.map +1 -1
- package/dist/types/src/capabilities/app-graph-builder.d.ts +181 -0
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -0
- package/dist/types/src/capabilities/index.d.ts +177 -0
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/intent-resolver.d.ts.map +1 -1
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
- package/dist/types/src/components/Chat.stories.d.ts.map +1 -1
- package/dist/types/src/components/ChatContainer.d.ts +10 -2
- package/dist/types/src/components/ChatContainer.d.ts.map +1 -1
- package/dist/types/src/components/CommentContainer.d.ts +2 -1
- 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 +2 -1
- package/dist/types/src/components/CommentsContainer.d.ts.map +1 -1
- package/dist/types/src/components/MessageContainer.d.ts +5 -3
- package/dist/types/src/components/MessageContainer.d.ts.map +1 -1
- package/dist/types/src/components/ThreadComplementary.d.ts +2 -1
- package/dist/types/src/components/ThreadComplementary.d.ts.map +1 -1
- package/dist/types/src/components/ThreadSettings.d.ts +2 -1
- package/dist/types/src/components/ThreadSettings.d.ts.map +1 -1
- package/dist/types/src/components/index.d.ts +1 -4
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/components/testing.d.ts +45 -40
- package/dist/types/src/components/testing.d.ts.map +1 -1
- package/dist/types/src/events.d.ts +4 -0
- package/dist/types/src/events.d.ts.map +1 -0
- package/dist/types/src/hooks/analytics.d.ts +2 -2
- package/dist/types/src/hooks/analytics.d.ts.map +1 -1
- package/dist/types/src/index.d.ts +2 -0
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/meta.d.ts +2 -7
- package/dist/types/src/meta.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts +5 -12
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types.d.ts +40 -9
- package/dist/types/src/types.d.ts.map +1 -1
- package/package.json +33 -30
- package/src/ThreadPlugin.tsx +17 -28
- package/src/capabilities/app-graph-builder.ts +34 -0
- package/src/capabilities/index.ts +1 -0
- package/src/capabilities/intent-resolver.ts +97 -61
- package/src/capabilities/react-surface.tsx +29 -27
- package/src/capabilities/state.ts +1 -1
- package/src/components/Chat.stories.tsx +19 -9
- package/src/components/ChatContainer.tsx +29 -29
- package/src/components/CommentContainer.tsx +8 -2
- package/src/components/Comments.stories.tsx +2 -1
- package/src/components/MessageContainer.tsx +23 -17
- package/src/components/ThreadComplementary.tsx +26 -32
- package/src/components/index.ts +1 -2
- package/src/components/testing.ts +6 -29
- package/src/events.ts +11 -0
- package/src/extensions/threads.ts +3 -3
- package/src/hooks/analytics.ts +23 -18
- package/src/index.ts +2 -0
- package/src/meta.ts +2 -2
- package/src/translations.ts +2 -4
- package/src/types.ts +22 -8
- package/src/util.ts +1 -1
- package/dist/lib/browser/ThreadContainer-6OP5AG2W.mjs +0 -19
- package/dist/lib/browser/ThreadContainer-6OP5AG2W.mjs.map +0 -7
- package/dist/lib/browser/chunk-UPKU23DA.mjs.map +0 -7
- package/dist/lib/browser/chunk-VOMIDDNO.mjs +0 -15
- package/dist/lib/browser/chunk-VOMIDDNO.mjs.map +0 -7
- package/dist/lib/browser/chunk-YK3ICB7G.mjs.map +0 -7
- package/dist/lib/browser/intent-resolver-FAFQ54NP.mjs.map +0 -7
- package/dist/lib/browser/markdown-RPYOUBVR.mjs.map +0 -7
- package/dist/lib/browser/react-surface-Y4MUSICN.mjs.map +0 -7
- package/dist/lib/browser/state-GNFUURIC.mjs.map +0 -7
- package/dist/lib/node/ThreadContainer-LTKKLPXX.cjs +0 -45
- package/dist/lib/node/ThreadContainer-LTKKLPXX.cjs.map +0 -7
- package/dist/lib/node/chunk-AWSTZ2KN.cjs.map +0 -7
- package/dist/lib/node/chunk-BHFHFTHO.cjs.map +0 -7
- package/dist/lib/node/chunk-CMEMMYDL.cjs.map +0 -7
- package/dist/lib/node/chunk-RQR5Z23G.cjs +0 -331
- package/dist/lib/node/chunk-RQR5Z23G.cjs.map +0 -7
- package/dist/lib/node/intent-resolver-DVBEXJ33.cjs.map +0 -7
- package/dist/lib/node/markdown-ELRGISXE.cjs.map +0 -7
- package/dist/lib/node/react-surface-7HLTN5XS.cjs.map +0 -7
- package/dist/lib/node/state-TQWEZ6B3.cjs.map +0 -7
- package/dist/lib/node-esm/ThreadContainer-SV74JFRH.mjs +0 -20
- package/dist/lib/node-esm/ThreadContainer-SV74JFRH.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-33NDMQQQ.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-CISLDOH7.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-PJPVEO7E.mjs +0 -17
- package/dist/lib/node-esm/chunk-PJPVEO7E.mjs.map +0 -7
- package/dist/lib/node-esm/intent-resolver-DHVLBNCC.mjs.map +0 -7
- package/dist/lib/node-esm/markdown-23OB7EZG.mjs.map +0 -7
- package/dist/lib/node-esm/react-surface-AZHTTR6J.mjs.map +0 -7
- package/dist/lib/node-esm/state-7MLR27YG.mjs.map +0 -7
- package/dist/types/src/components/ThreadContainer.d.ts +0 -7
- package/dist/types/src/components/ThreadContainer.d.ts.map +0 -1
- package/src/components/ThreadContainer.tsx +0 -22
- /package/dist/lib/browser/{chunk-NAO3LZMZ.mjs.map → chunk-EP6MRLY7.mjs.map} +0 -0
- /package/dist/lib/browser/{settings-WQTE5AEZ.mjs.map → settings-4FEC7EAX.mjs.map} +0 -0
- /package/dist/lib/node/{chunk-FPWNZ6TB.cjs.map → chunk-NQ5DTPOY.cjs.map} +0 -0
- /package/dist/lib/node/{settings-7VQYARM5.cjs.map → settings-IXCPE55J.cjs.map} +0 -0
- /package/dist/lib/node-esm/{chunk-ZJITX3TO.mjs.map → chunk-WLY2HMDB.mjs.map} +0 -0
- /package/dist/lib/node-esm/{settings-SGMM7UDT.mjs.map → settings-ZUJQ4LWI.mjs.map} +0 -0
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import { type SpaceMember } from '@dxos/react-client/echo';
|
|
3
|
-
|
|
3
|
+
import { type MessageType } from '@dxos/schema';
|
|
4
|
+
export declare const MessageContainer: ({ message, members, editable, onDelete, }: {
|
|
4
5
|
message: MessageType;
|
|
5
6
|
members: SpaceMember[];
|
|
7
|
+
editable?: boolean;
|
|
6
8
|
onDelete?: (id: string) => void;
|
|
7
|
-
}) =>
|
|
9
|
+
}) => React.JSX.Element;
|
|
8
10
|
//# sourceMappingURL=MessageContainer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MessageContainer.d.ts","sourceRoot":"","sources":["../../../../src/components/MessageContainer.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"MessageContainer.d.ts","sourceRoot":"","sources":["../../../../src/components/MessageContainer.tsx"],"names":[],"mappings":"AAMA,OAAO,KAA+D,MAAM,OAAO,CAAC;AAKpF,OAAO,EAAyC,KAAK,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAYlG,OAAO,EAAyB,KAAK,WAAW,EAAE,MAAM,cAAc,CAAC;AAUvE,eAAO,MAAM,gBAAgB,8CAK1B;IACD,OAAO,EAAE,WAAW,CAAC;IACrB,OAAO,EAAE,WAAW,EAAE,CAAC;IACvB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;CACjC,sBAwEA,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ThreadComplementary.d.ts","sourceRoot":"","sources":["../../../../src/components/ThreadComplementary.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ThreadComplementary.d.ts","sourceRoot":"","sources":["../../../../src/components/ThreadComplementary.tsx"],"names":[],"mappings":"AAIA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAkB/D,eAAO,MAAM,mBAAmB,gBAAiB;IAAE,OAAO,EAAE,GAAG,CAAA;CAAE,sBAiIhE,CAAC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import type { ThreadSettingsProps } from '../types';
|
|
2
3
|
export declare const ThreadSettings: ({ settings }: {
|
|
3
4
|
settings: ThreadSettingsProps;
|
|
4
|
-
}) =>
|
|
5
|
+
}) => React.JSX.Element;
|
|
5
6
|
//# 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":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAEpD,eAAO,MAAM,cAAc,iBAAkB;IAAE,QAAQ,EAAE,mBAAmB,CAAA;CAAE,sBAI7E,CAAC"}
|
|
@@ -1,9 +1,6 @@
|
|
|
1
|
-
export declare const
|
|
2
|
-
role: string;
|
|
3
|
-
}) => import("react/jsx-runtime").JSX.Element>;
|
|
1
|
+
export declare const ChatContainer: import("react").LazyExoticComponent<({ space, dxn, context, current, autoFocusTextbox }: import("./ChatContainer").ChatContainerProps) => import("react").JSX.Element>;
|
|
4
2
|
export * from './CommentContainer';
|
|
5
3
|
export * from './CommentsContainer';
|
|
6
|
-
export * from './ChatContainer';
|
|
7
4
|
export * from './MessageContainer';
|
|
8
5
|
export * from './ThreadComplementary';
|
|
9
6
|
export * from './ThreadSettings';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/index.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/index.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,aAAa,wKAAwC,CAAC;AAGnE,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,uBAAuB,CAAC;AACtC,cAAc,kBAAkB,CAAC"}
|
|
@@ -1,53 +1,58 @@
|
|
|
1
|
-
import { Expando } from '@dxos/echo-schema';
|
|
2
1
|
import { type Identity } from '@dxos/react-client/halo';
|
|
3
|
-
export declare const createChatThread: (identity: Identity) => import("@dxos/live-object").ReactiveObject<import("@dxos/echo-schema").TypedObjectFields<{
|
|
4
|
-
name: import("effect/Schema").optional<typeof import("effect/Schema").String>;
|
|
5
|
-
anchor: import("effect/Schema").optional<typeof import("effect/Schema").String>;
|
|
6
|
-
status: import("effect/Schema").optional<import("effect/Schema").Union<[import("effect/Schema").Literal<["staged"]>, import("effect/Schema").Literal<["active"]>, import("effect/Schema").Literal<["resolved"]>]>>;
|
|
7
|
-
messages: import("effect/Schema").mutable<import("effect/Schema").Array$<import("@dxos/echo-schema").Ref$<import("@dxos/echo-schema").TypedObjectFields<{
|
|
8
|
-
timestamp: typeof import("effect/Schema").String;
|
|
9
|
-
state: import("effect/Schema").optional<import("effect/Schema").Enums<typeof import("@dxos/plugin-space/types").MessageState>>;
|
|
10
|
-
sender: import("effect/Schema").mutable<import("effect/Schema").Struct<{
|
|
11
|
-
contact: import("effect/Schema").optional<import("@dxos/echo-schema").Ref$<import("@dxos/echo-schema").TypedObjectFields<{
|
|
12
|
-
name: import("effect/Schema").optional<typeof import("effect/Schema").String>;
|
|
13
|
-
identifiers: import("effect/Schema").mutable<import("effect/Schema").Array$<import("effect/Schema").Struct<{
|
|
14
|
-
type: typeof import("effect/Schema").String;
|
|
15
|
-
value: typeof import("effect/Schema").String;
|
|
16
|
-
}>>>;
|
|
17
|
-
}, import("@dxos/echo-schema").TypedObjectOptions>>>;
|
|
18
|
-
identityKey: import("effect/Schema").optional<typeof import("effect/Schema").String>;
|
|
19
|
-
email: import("effect/Schema").optional<typeof import("effect/Schema").String>;
|
|
20
|
-
name: import("effect/Schema").optional<typeof import("effect/Schema").String>;
|
|
21
|
-
}>>;
|
|
22
|
-
text: typeof import("effect/Schema").String;
|
|
23
|
-
parts: import("effect/Schema").optional<import("effect/Schema").mutable<import("effect/Schema").Array$<import("@dxos/echo-schema").Ref$<Expando>>>>;
|
|
24
|
-
properties: import("effect/Schema").optional<import("effect/Schema").mutable<import("effect/Schema").Record$<typeof import("effect/Schema").String, typeof import("effect/Schema").Any>>>;
|
|
25
|
-
context: import("effect/Schema").optional<import("@dxos/echo-schema").Ref$<Expando>>;
|
|
26
|
-
}, import("@dxos/echo-schema").TypedObjectOptions>>>>;
|
|
27
|
-
}, import("@dxos/echo-schema").TypedObjectOptions>>;
|
|
28
2
|
export declare const createCommentThread: (identity: Identity) => import("@dxos/live-object").ReactiveObject<import("@dxos/echo-schema").TypedObjectFields<{
|
|
29
3
|
name: import("effect/Schema").optional<typeof import("effect/Schema").String>;
|
|
30
4
|
anchor: import("effect/Schema").optional<typeof import("effect/Schema").String>;
|
|
31
5
|
status: import("effect/Schema").optional<import("effect/Schema").Union<[import("effect/Schema").Literal<["staged"]>, import("effect/Schema").Literal<["active"]>, import("effect/Schema").Literal<["resolved"]>]>>;
|
|
32
6
|
messages: import("effect/Schema").mutable<import("effect/Schema").Array$<import("@dxos/echo-schema").Ref$<import("@dxos/echo-schema").TypedObjectFields<{
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
sender: import("effect/Schema").
|
|
36
|
-
contact: import("effect/Schema").optional<import("@dxos/echo-schema").Ref$<
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
value:
|
|
41
|
-
|
|
42
|
-
|
|
7
|
+
id: import("@dxos/echo-schema").ObjectIdClass;
|
|
8
|
+
created: import("effect/Schema").SchemaClass<string, string, never>;
|
|
9
|
+
sender: import("effect/Schema").Struct<{
|
|
10
|
+
contact: import("effect/Schema").optional<import("@dxos/echo-schema").Ref$<{
|
|
11
|
+
readonly id: string;
|
|
12
|
+
name?: string | undefined;
|
|
13
|
+
identifiers: {
|
|
14
|
+
readonly value: string;
|
|
15
|
+
readonly type: string;
|
|
16
|
+
}[];
|
|
17
|
+
}>>;
|
|
18
|
+
identityDid: import("effect/Schema").optional<typeof import("effect/Schema").String>;
|
|
43
19
|
identityKey: import("effect/Schema").optional<typeof import("effect/Schema").String>;
|
|
44
20
|
email: import("effect/Schema").optional<typeof import("effect/Schema").String>;
|
|
45
21
|
name: import("effect/Schema").optional<typeof import("effect/Schema").String>;
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
22
|
+
role: import("effect/Schema").optional<import("effect/Schema").Literal<["user", "assistant"]>>;
|
|
23
|
+
}>;
|
|
24
|
+
blocks: import("effect/Schema").Array$<import("effect/Schema").Union<[import("effect/Schema").mutable<import("effect/Schema").extend<import("effect/Schema").Struct<{
|
|
25
|
+
pending: import("effect/Schema").optional<typeof import("effect/Schema").Boolean>;
|
|
26
|
+
}>, import("effect/Schema").Struct<{
|
|
27
|
+
type: import("effect/Schema").Literal<["text"]>;
|
|
28
|
+
disposition: import("effect/Schema").optional<typeof import("effect/Schema").String>;
|
|
29
|
+
text: typeof import("effect/Schema").String;
|
|
30
|
+
}>>>, import("effect/Schema").mutable<import("effect/Schema").extend<import("effect/Schema").Struct<{
|
|
31
|
+
pending: import("effect/Schema").optional<typeof import("effect/Schema").Boolean>;
|
|
32
|
+
}>, import("effect/Schema").Struct<{
|
|
33
|
+
type: import("effect/Schema").Literal<["json"]>;
|
|
34
|
+
disposition: import("effect/Schema").optional<typeof import("effect/Schema").String>;
|
|
35
|
+
data: typeof import("effect/Schema").String;
|
|
36
|
+
}>>>, import("effect/Schema").mutable<import("effect/Schema").extend<import("effect/Schema").Struct<{
|
|
37
|
+
pending: import("effect/Schema").optional<typeof import("effect/Schema").Boolean>;
|
|
38
|
+
}>, import("effect/Schema").Struct<{
|
|
39
|
+
type: import("effect/Schema").Literal<["image"]>;
|
|
40
|
+
id: import("effect/Schema").optional<typeof import("effect/Schema").String>;
|
|
41
|
+
source: import("effect/Schema").optional<import("effect/Schema").Union<[import("effect/Schema").mutable<import("effect/Schema").Struct<{
|
|
42
|
+
type: import("effect/Schema").Literal<["base64"]>;
|
|
43
|
+
mediaType: typeof import("effect/Schema").String;
|
|
44
|
+
data: typeof import("effect/Schema").String;
|
|
45
|
+
}>>, import("effect/Schema").mutable<import("effect/Schema").Struct<{
|
|
46
|
+
type: import("effect/Schema").Literal<["http"]>;
|
|
47
|
+
url: typeof import("effect/Schema").String;
|
|
48
|
+
}>>]>>;
|
|
49
|
+
}>>>, import("effect/Schema").mutable<import("effect/Schema").extend<import("effect/Schema").Struct<{
|
|
50
|
+
pending: import("effect/Schema").optional<typeof import("effect/Schema").Boolean>;
|
|
51
|
+
}>, import("effect/Schema").Struct<{
|
|
52
|
+
type: import("effect/Schema").Literal<["reference"]>;
|
|
53
|
+
reference: import("@dxos/echo-schema").Ref$<import("@dxos/echo-schema").Expando>;
|
|
54
|
+
}>>>]>>;
|
|
49
55
|
properties: import("effect/Schema").optional<import("effect/Schema").mutable<import("effect/Schema").Record$<typeof import("effect/Schema").String, typeof import("effect/Schema").Any>>>;
|
|
50
|
-
context: import("effect/Schema").optional<import("@dxos/echo-schema").Ref$<Expando>>;
|
|
51
56
|
}, import("@dxos/echo-schema").TypedObjectOptions>>>>;
|
|
52
57
|
}, import("@dxos/echo-schema").TypedObjectOptions>>;
|
|
53
58
|
//# sourceMappingURL=testing.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"testing.d.ts","sourceRoot":"","sources":["../../../../src/components/testing.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"testing.d.ts","sourceRoot":"","sources":["../../../../src/components/testing.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAGxD,eAAO,MAAM,mBAAmB,aAAc,QAAQ;;;;oFAOhC,mBAAmB,cAAc,mBAAmB;mBAE9D,mBAAgB;;;6DAIN,mBAClB;;oBAGkD,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8BAA4pD,mBAAmB;;;cAAqI,mBAAmB;mDAD73D,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../../src/events.ts"],"names":[],"mappings":"AAQA,yBAAiB,YAAY,CAAC;IACrB,MAAM,aAAa,+CAA6D,CAAC;CACzF"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { type ReactiveObject } from '@dxos/live-object';
|
|
2
|
-
|
|
3
|
-
export declare const useOnEditAnalytics: (message: ReactiveObject<any>, editing: boolean) => void;
|
|
2
|
+
import { type TextContentBlock } from '@dxos/schema';
|
|
3
|
+
export declare const useOnEditAnalytics: (message: ReactiveObject<any>, textBlock: TextContentBlock | undefined, editing: boolean) => void;
|
|
4
4
|
//# sourceMappingURL=analytics.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"analytics.d.ts","sourceRoot":"","sources":["../../../../src/hooks/analytics.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"analytics.d.ts","sourceRoot":"","sources":["../../../../src/hooks/analytics.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAIxD,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAErD,eAAO,MAAM,kBAAkB,YACpB,cAAc,CAAC,GAAG,CAAC,aACjB,gBAAgB,GAAG,SAAS,WAC9B,OAAO,SAuBjB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAIA,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AAEvB,cAAc,gBAAgB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AACpD,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AAEvB,cAAc,gBAAgB,CAAC"}
|
package/dist/types/src/meta.d.ts
CHANGED
|
@@ -1,10 +1,5 @@
|
|
|
1
|
+
import { type PluginMeta } from '@dxos/app-framework';
|
|
1
2
|
export declare const THREAD_PLUGIN = "dxos.org/plugin/thread";
|
|
2
3
|
export declare const THREAD_ITEM = "dxos.org/plugin/thread/item";
|
|
3
|
-
export declare const meta:
|
|
4
|
-
id: string;
|
|
5
|
-
name: string;
|
|
6
|
-
description: string;
|
|
7
|
-
icon: string;
|
|
8
|
-
source: string;
|
|
9
|
-
};
|
|
4
|
+
export declare const meta: PluginMeta;
|
|
10
5
|
//# sourceMappingURL=meta.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"meta.d.ts","sourceRoot":"","sources":["../../../src/meta.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"meta.d.ts","sourceRoot":"","sources":["../../../src/meta.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEtD,eAAO,MAAM,aAAa,2BAA2B,CAAC;AACtD,eAAO,MAAM,WAAW,gCAA0B,CAAC;AAEnD,eAAO,MAAM,IAAI,EAAE,UAMlB,CAAC"}
|
|
@@ -2,11 +2,9 @@ declare const _default: {
|
|
|
2
2
|
'en-US': {
|
|
3
3
|
[x: string]: {
|
|
4
4
|
'typename label': string;
|
|
5
|
+
'object name placeholder': string;
|
|
5
6
|
'plugin name'?: undefined;
|
|
6
|
-
'channel name placeholder'?: undefined;
|
|
7
7
|
'channel title label'?: undefined;
|
|
8
|
-
'delete channel label'?: undefined;
|
|
9
|
-
'create channel label'?: undefined;
|
|
10
8
|
'message placeholder'?: undefined;
|
|
11
9
|
'activity message'?: undefined;
|
|
12
10
|
'anonymous label'?: undefined;
|
|
@@ -28,15 +26,12 @@ declare const _default: {
|
|
|
28
26
|
'edit message label'?: undefined;
|
|
29
27
|
'delete message label'?: undefined;
|
|
30
28
|
'open comments panel label'?: undefined;
|
|
31
|
-
'comments
|
|
29
|
+
'comments label'?: undefined;
|
|
32
30
|
'show all label'?: undefined;
|
|
33
31
|
'show unresolved label'?: undefined;
|
|
34
32
|
} | {
|
|
35
33
|
'plugin name': string;
|
|
36
|
-
'channel name placeholder': string;
|
|
37
34
|
'channel title label': string;
|
|
38
|
-
'delete channel label': string;
|
|
39
|
-
'create channel label': string;
|
|
40
35
|
'message placeholder': string;
|
|
41
36
|
'activity message': string;
|
|
42
37
|
'anonymous label': string;
|
|
@@ -58,17 +53,15 @@ declare const _default: {
|
|
|
58
53
|
'edit message label': string;
|
|
59
54
|
'delete message label': string;
|
|
60
55
|
'open comments panel label': string;
|
|
61
|
-
'comments
|
|
56
|
+
'comments label': string;
|
|
62
57
|
'show all label': string;
|
|
63
58
|
'show unresolved label': string;
|
|
64
59
|
'typename label'?: undefined;
|
|
60
|
+
'object name placeholder'?: undefined;
|
|
65
61
|
};
|
|
66
62
|
"dxos.org/plugin/thread": {
|
|
67
63
|
'plugin name': string;
|
|
68
|
-
'channel name placeholder': string;
|
|
69
64
|
'channel title label': string;
|
|
70
|
-
'delete channel label': string;
|
|
71
|
-
'create channel label': string;
|
|
72
65
|
'message placeholder': string;
|
|
73
66
|
'activity message': string;
|
|
74
67
|
'anonymous label': string;
|
|
@@ -90,7 +83,7 @@ declare const _default: {
|
|
|
90
83
|
'edit message label': string;
|
|
91
84
|
'delete message label': string;
|
|
92
85
|
'open comments panel label': string;
|
|
93
|
-
'comments
|
|
86
|
+
'comments label': string;
|
|
94
87
|
'show all label': string;
|
|
95
88
|
'show unresolved label': string;
|
|
96
89
|
};
|
|
@@ -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,wBAsCE"}
|
|
@@ -1,16 +1,30 @@
|
|
|
1
1
|
import { S } from '@dxos/echo-schema';
|
|
2
|
-
import { ChannelType,
|
|
2
|
+
import { ChannelType, ThreadType } from '@dxos/plugin-space/types';
|
|
3
|
+
import { MessageType } from '@dxos/schema';
|
|
3
4
|
export declare namespace ThreadAction {
|
|
5
|
+
const CreateChannel_base: S.TaggedClass<CreateChannel, "dxos.org/plugin/thread/action/create-channel", {
|
|
6
|
+
readonly _tag: S.tag<"dxos.org/plugin/thread/action/create-channel">;
|
|
7
|
+
} & {
|
|
8
|
+
input: S.Struct<{
|
|
9
|
+
spaceId: typeof S.String;
|
|
10
|
+
name: S.optional<typeof S.String>;
|
|
11
|
+
}>;
|
|
12
|
+
output: S.Struct<{
|
|
13
|
+
object: typeof ChannelType;
|
|
14
|
+
}>;
|
|
15
|
+
}>;
|
|
16
|
+
export class CreateChannel extends CreateChannel_base {
|
|
17
|
+
}
|
|
4
18
|
const Create_base: S.TaggedClass<Create, "dxos.org/plugin/thread/action/create", {
|
|
5
19
|
readonly _tag: S.tag<"dxos.org/plugin/thread/action/create">;
|
|
6
20
|
} & {
|
|
7
21
|
input: S.Struct<{
|
|
8
22
|
name: S.optional<typeof S.String>;
|
|
9
|
-
cursor:
|
|
10
|
-
subject: S.
|
|
23
|
+
cursor: typeof S.String;
|
|
24
|
+
subject: S.Schema<import("@dxos/echo-db").ReactiveEchoObject<any>, import("@dxos/echo-db").ReactiveEchoObject<any>, never>;
|
|
11
25
|
}>;
|
|
12
26
|
output: S.Struct<{
|
|
13
|
-
object:
|
|
27
|
+
object: typeof ThreadType;
|
|
14
28
|
}>;
|
|
15
29
|
}>;
|
|
16
30
|
export class Create extends Create_base {
|
|
@@ -20,7 +34,6 @@ export declare namespace ThreadAction {
|
|
|
20
34
|
} & {
|
|
21
35
|
input: S.Struct<{
|
|
22
36
|
current: typeof S.String;
|
|
23
|
-
skipOpen: S.optional<typeof S.Boolean>;
|
|
24
37
|
}>;
|
|
25
38
|
output: typeof S.Void;
|
|
26
39
|
}>;
|
|
@@ -48,16 +61,32 @@ export declare namespace ThreadAction {
|
|
|
48
61
|
}>;
|
|
49
62
|
export class Delete extends Delete_base {
|
|
50
63
|
}
|
|
51
|
-
const
|
|
52
|
-
readonly _tag: S.tag<"dxos.org/plugin/thread/action/
|
|
64
|
+
const AddMessage_base: S.TaggedClass<AddMessage, "dxos.org/plugin/thread/action/add-message", {
|
|
65
|
+
readonly _tag: S.tag<"dxos.org/plugin/thread/action/add-message">;
|
|
53
66
|
} & {
|
|
54
67
|
input: S.Struct<{
|
|
55
|
-
thread: typeof ThreadType;
|
|
56
68
|
subject: S.Schema<import("@dxos/echo-db").ReactiveEchoObject<any>, import("@dxos/echo-db").ReactiveEchoObject<any>, never>;
|
|
69
|
+
thread: typeof ThreadType;
|
|
70
|
+
sender: S.Struct<{
|
|
71
|
+
contact: S.optional<import("@dxos/echo-schema").Ref$<{
|
|
72
|
+
readonly id: string;
|
|
73
|
+
name?: string | undefined;
|
|
74
|
+
identifiers: {
|
|
75
|
+
readonly value: string;
|
|
76
|
+
readonly type: string;
|
|
77
|
+
}[];
|
|
78
|
+
}>>;
|
|
79
|
+
identityDid: S.optional<typeof S.String>;
|
|
80
|
+
identityKey: S.optional<typeof S.String>;
|
|
81
|
+
email: S.optional<typeof S.String>;
|
|
82
|
+
name: S.optional<typeof S.String>;
|
|
83
|
+
role: S.optional<S.Literal<["user", "assistant"]>>;
|
|
84
|
+
}>;
|
|
85
|
+
text: typeof S.String;
|
|
57
86
|
}>;
|
|
58
87
|
output: typeof S.Void;
|
|
59
88
|
}>;
|
|
60
|
-
export class
|
|
89
|
+
export class AddMessage extends AddMessage_base {
|
|
61
90
|
}
|
|
62
91
|
const DeleteMessage_base: S.TaggedClass<DeleteMessage, "dxos.org/plugin/thread/action/delete-message", {
|
|
63
92
|
readonly _tag: S.tag<"dxos.org/plugin/thread/action/delete-message">;
|
|
@@ -86,6 +115,8 @@ export type ViewState = {
|
|
|
86
115
|
};
|
|
87
116
|
export type ViewStore = Record<SubjectId, ViewState>;
|
|
88
117
|
export type ThreadState = {
|
|
118
|
+
/** Current channel activity. */
|
|
119
|
+
activities: Record<string, string | undefined>;
|
|
89
120
|
/** In-memory draft threads. */
|
|
90
121
|
drafts: Record<string, ThreadType[]>;
|
|
91
122
|
current?: string | undefined;
|
|
@@ -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,
|
|
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,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAEnE,OAAO,EAAe,WAAW,EAAE,MAAM,cAAc,CAAC;AAIxD,yBAAiB,YAAY,CAAC;;;;;;;;;;;;IAG5B,MAAM,OAAO,aAAc,SAAQ,kBASjC;KAAG;;;;;;;;;;;;;IAEL,MAAM,OAAO,MAAO,SAAQ,WAS1B;KAAG;;;;;;;;;IAEL,MAAM,OAAO,MAAO,SAAQ,WAK1B;KAAG;;;;;;;;;IAEL,MAAM,OAAO,cAAe,SAAQ,mBAKlC;KAAG;;;;;;;;;;;IAEL,MAAM,OAAO,MAAO,SAAQ,WAO1B;KAAG;;;;;;;;yBAvCU,EAAG,QAAQ,QACxB,mBACS;;wBAGR,CAAC;;;;;;6BAKM,EAAG,QAAQ,QACjB,EAAG,MAAM;6BAEC,EAAG,QACf,QAAO,EAAG,MAAM;uBAElB,EAAA,QAED,QAAQ,EAAE,MAAM;sBAAa,EAAE,QAAQ,QAAO,EAAG,MAAM;sBAAY,EAAG,QAAQ,CAAE,EAC7E,OAAE;;;;;;IAsBJ,MAAM,OAAO,UAAW,SAAQ,eAQ9B;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,gCAAgC;IAChC,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAAC;IAC/C,+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,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dxos/plugin-thread",
|
|
3
|
-
"version": "0.8.1-
|
|
3
|
+
"version": "0.8.1-staging.31c3ee1",
|
|
4
4
|
"description": "DXOS Threads Surface plugin",
|
|
5
5
|
"homepage": "https://dxos.org",
|
|
6
6
|
"bugs": "https://github.com/dxos/dxos/issues",
|
|
@@ -39,29 +39,32 @@
|
|
|
39
39
|
"@preact/signals-core": "^1.6.0",
|
|
40
40
|
"date-fns": "^3.3.1",
|
|
41
41
|
"lodash.get": "^4.4.2",
|
|
42
|
-
"@dxos/app-framework": "0.8.1-
|
|
43
|
-
"@dxos/
|
|
44
|
-
"@dxos/
|
|
45
|
-
"@dxos/echo-schema": "0.8.1-
|
|
46
|
-
"@dxos/
|
|
47
|
-
"@dxos/
|
|
48
|
-
"@dxos/
|
|
49
|
-
"@dxos/log": "0.8.1-
|
|
50
|
-
"@dxos/
|
|
51
|
-
"@dxos/plugin-
|
|
52
|
-
"@dxos/plugin-
|
|
53
|
-
"@dxos/plugin-graph": "0.8.1-
|
|
54
|
-
"@dxos/plugin-markdown": "0.8.1-
|
|
55
|
-
"@dxos/plugin-
|
|
56
|
-
"@dxos/
|
|
57
|
-
"@dxos/
|
|
58
|
-
"@dxos/
|
|
59
|
-
"@dxos/react-ui-attention": "0.8.1-
|
|
60
|
-
"@dxos/react-ui-form": "0.8.1-
|
|
61
|
-
"@dxos/react-ui-
|
|
62
|
-
"@dxos/react-ui-
|
|
63
|
-
"@dxos/react-ui-
|
|
64
|
-
"@dxos/
|
|
42
|
+
"@dxos/app-framework": "0.8.1-staging.31c3ee1",
|
|
43
|
+
"@dxos/async": "0.8.1-staging.31c3ee1",
|
|
44
|
+
"@dxos/display-name": "0.8.1-staging.31c3ee1",
|
|
45
|
+
"@dxos/echo-schema": "0.8.1-staging.31c3ee1",
|
|
46
|
+
"@dxos/keys": "0.8.1-staging.31c3ee1",
|
|
47
|
+
"@dxos/invariant": "0.8.1-staging.31c3ee1",
|
|
48
|
+
"@dxos/live-object": "0.8.1-staging.31c3ee1",
|
|
49
|
+
"@dxos/log": "0.8.1-staging.31c3ee1",
|
|
50
|
+
"@dxos/local-storage": "0.8.1-staging.31c3ee1",
|
|
51
|
+
"@dxos/plugin-client": "0.8.1-staging.31c3ee1",
|
|
52
|
+
"@dxos/plugin-deck": "0.8.1-staging.31c3ee1",
|
|
53
|
+
"@dxos/plugin-graph": "0.8.1-staging.31c3ee1",
|
|
54
|
+
"@dxos/plugin-markdown": "0.8.1-staging.31c3ee1",
|
|
55
|
+
"@dxos/plugin-observability": "0.8.1-staging.31c3ee1",
|
|
56
|
+
"@dxos/plugin-attention": "0.8.1-staging.31c3ee1",
|
|
57
|
+
"@dxos/plugin-space": "0.8.1-staging.31c3ee1",
|
|
58
|
+
"@dxos/react-client": "0.8.1-staging.31c3ee1",
|
|
59
|
+
"@dxos/react-ui-attention": "0.8.1-staging.31c3ee1",
|
|
60
|
+
"@dxos/react-ui-form": "0.8.1-staging.31c3ee1",
|
|
61
|
+
"@dxos/react-ui-editor": "0.8.1-staging.31c3ee1",
|
|
62
|
+
"@dxos/react-ui-stack": "0.8.1-staging.31c3ee1",
|
|
63
|
+
"@dxos/react-ui-menu": "0.8.1-staging.31c3ee1",
|
|
64
|
+
"@dxos/react-ui-thread": "0.8.1-staging.31c3ee1",
|
|
65
|
+
"@dxos/util": "0.8.1-staging.31c3ee1",
|
|
66
|
+
"@dxos/react-ui-tabs": "0.8.1-staging.31c3ee1",
|
|
67
|
+
"@dxos/schema": "0.8.1-staging.31c3ee1"
|
|
65
68
|
},
|
|
66
69
|
"devDependencies": {
|
|
67
70
|
"@phosphor-icons/react": "^2.1.5",
|
|
@@ -71,17 +74,17 @@
|
|
|
71
74
|
"react": "~18.2.0",
|
|
72
75
|
"react-dom": "~18.2.0",
|
|
73
76
|
"vite": "5.4.7",
|
|
74
|
-
"@dxos/random": "0.8.1-
|
|
75
|
-
"@dxos/react-ui": "0.8.1-
|
|
76
|
-
"@dxos/react-ui-theme": "0.8.1-
|
|
77
|
-
"@dxos/storybook-utils": "0.8.1-
|
|
77
|
+
"@dxos/random": "0.8.1-staging.31c3ee1",
|
|
78
|
+
"@dxos/react-ui": "0.8.1-staging.31c3ee1",
|
|
79
|
+
"@dxos/react-ui-theme": "0.8.1-staging.31c3ee1",
|
|
80
|
+
"@dxos/storybook-utils": "0.8.1-staging.31c3ee1"
|
|
78
81
|
},
|
|
79
82
|
"peerDependencies": {
|
|
80
83
|
"@phosphor-icons/react": "^2.1.5",
|
|
81
84
|
"react": "~18.2.0",
|
|
82
85
|
"react-dom": "~18.2.0",
|
|
83
|
-
"@dxos/react-ui": "0.8.1-
|
|
84
|
-
"@dxos/react-ui
|
|
86
|
+
"@dxos/react-ui-theme": "0.8.1-staging.31c3ee1",
|
|
87
|
+
"@dxos/react-ui": "0.8.1-staging.31c3ee1"
|
|
85
88
|
},
|
|
86
89
|
"publishConfig": {
|
|
87
90
|
"access": "public"
|
package/src/ThreadPlugin.tsx
CHANGED
|
@@ -4,15 +4,16 @@
|
|
|
4
4
|
|
|
5
5
|
import { Capabilities, contributes, createIntent, defineModule, definePlugin, Events } from '@dxos/app-framework';
|
|
6
6
|
import { ClientCapabilities, ClientEvents } from '@dxos/plugin-client';
|
|
7
|
-
import { DeckCapabilities, DeckEvents } from '@dxos/plugin-deck';
|
|
8
7
|
import { MarkdownEvents } from '@dxos/plugin-markdown';
|
|
9
8
|
import { SpaceCapabilities, ThreadEvents } from '@dxos/plugin-space';
|
|
10
|
-
import { ChannelType, defineObjectForm,
|
|
9
|
+
import { ChannelType, defineObjectForm, ThreadType } from '@dxos/plugin-space/types';
|
|
11
10
|
import { type ReactiveEchoObject, RefArray } from '@dxos/react-client/echo';
|
|
12
11
|
import { translations as threadTranslations } from '@dxos/react-ui-thread';
|
|
12
|
+
import { MessageType, MessageTypeV1, MessageTypeV1ToV2 } from '@dxos/schema';
|
|
13
13
|
|
|
14
|
-
import { IntentResolver, Markdown, ReactSurface, ThreadState } from './capabilities';
|
|
15
|
-
import {
|
|
14
|
+
import { AppGraphBuilder, IntentResolver, Markdown, ReactSurface, ThreadState } from './capabilities';
|
|
15
|
+
import { ThreadEvents as LocalThreadEvents } from './events';
|
|
16
|
+
import { meta, THREAD_ITEM } from './meta';
|
|
16
17
|
import translations from './translations';
|
|
17
18
|
import { ThreadAction } from './types';
|
|
18
19
|
|
|
@@ -46,10 +47,7 @@ export const ThreadPlugin = () =>
|
|
|
46
47
|
contributes(Capabilities.Metadata, {
|
|
47
48
|
id: ChannelType.typename,
|
|
48
49
|
metadata: {
|
|
49
|
-
|
|
50
|
-
icon: 'ph--chat--regular',
|
|
51
|
-
// TODO(wittjosiah): Move out of metadata.
|
|
52
|
-
loadReferences: async (channel: ChannelType) => await RefArray.loadAll(channel.threads ?? []),
|
|
50
|
+
icon: 'ph--hash--regular',
|
|
53
51
|
},
|
|
54
52
|
}),
|
|
55
53
|
contributes(Capabilities.Metadata, {
|
|
@@ -91,33 +89,19 @@ export const ThreadPlugin = () =>
|
|
|
91
89
|
SpaceCapabilities.ObjectForm,
|
|
92
90
|
defineObjectForm({
|
|
93
91
|
objectSchema: ChannelType,
|
|
94
|
-
getIntent: () => createIntent(ThreadAction.
|
|
92
|
+
getIntent: (_, options) => createIntent(ThreadAction.CreateChannel, { spaceId: options.space.id }),
|
|
95
93
|
}),
|
|
96
94
|
),
|
|
97
95
|
}),
|
|
98
96
|
defineModule({
|
|
99
97
|
id: `${meta.id}/module/schema`,
|
|
100
98
|
activatesOn: ClientEvents.SetupSchema,
|
|
101
|
-
activate: () => contributes(ClientCapabilities.Schema, [ThreadType, MessageType]),
|
|
99
|
+
activate: () => contributes(ClientCapabilities.Schema, [ThreadType, MessageType, MessageTypeV1]),
|
|
102
100
|
}),
|
|
103
101
|
defineModule({
|
|
104
|
-
id: `${meta.id}/module/
|
|
105
|
-
activatesOn:
|
|
106
|
-
activate: () =>
|
|
107
|
-
contributes(DeckCapabilities.ComplementaryPanel, {
|
|
108
|
-
id: 'comments',
|
|
109
|
-
label: ['comments panel label', { ns: THREAD_PLUGIN }],
|
|
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
|
-
}),
|
|
102
|
+
id: `${meta.id}/module/migration`,
|
|
103
|
+
activatesOn: ClientEvents.SetupMigration,
|
|
104
|
+
activate: () => contributes(ClientCapabilities.Migration, [MessageTypeV1ToV2]),
|
|
121
105
|
}),
|
|
122
106
|
defineModule({
|
|
123
107
|
id: `${meta.id}/module/markdown`,
|
|
@@ -128,7 +112,7 @@ export const ThreadPlugin = () =>
|
|
|
128
112
|
id: `${meta.id}/module/react-surface`,
|
|
129
113
|
activatesOn: Events.SetupReactSurface,
|
|
130
114
|
// TODO(wittjosiah): Should occur before the comments thread is loaded when surfaces activation is more granular.
|
|
131
|
-
activatesBefore: [ThreadEvents.SetupThread],
|
|
115
|
+
activatesBefore: [ThreadEvents.SetupThread, LocalThreadEvents.SetupActivity],
|
|
132
116
|
activate: ReactSurface,
|
|
133
117
|
}),
|
|
134
118
|
defineModule({
|
|
@@ -136,4 +120,9 @@ export const ThreadPlugin = () =>
|
|
|
136
120
|
activatesOn: Events.SetupIntentResolver,
|
|
137
121
|
activate: IntentResolver,
|
|
138
122
|
}),
|
|
123
|
+
defineModule({
|
|
124
|
+
id: `${meta.id}/module/app-graph-builder`,
|
|
125
|
+
activatesOn: Events.SetupAppGraph,
|
|
126
|
+
activate: AppGraphBuilder,
|
|
127
|
+
}),
|
|
139
128
|
]);
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { Capabilities, contributes, type PluginsContext } from '@dxos/app-framework';
|
|
6
|
+
import { type ReactiveEchoObject } from '@dxos/client/echo';
|
|
7
|
+
import { PLANK_COMPANION_TYPE, ATTENDABLE_PATH_SEPARATOR } from '@dxos/plugin-deck/types';
|
|
8
|
+
import { createExtension, type Node } from '@dxos/plugin-graph';
|
|
9
|
+
|
|
10
|
+
import { meta } from '../meta';
|
|
11
|
+
|
|
12
|
+
export default (context: PluginsContext) =>
|
|
13
|
+
contributes(Capabilities.AppGraphBuilder, [
|
|
14
|
+
createExtension({
|
|
15
|
+
id: `${meta.id}/comments`,
|
|
16
|
+
// TODO(wittjosiah): Support comments on any object.
|
|
17
|
+
// filter: (node): node is Node<ReactiveEchoObject<any>> => isEchoObject(node.data),
|
|
18
|
+
filter: (node): node is Node<ReactiveEchoObject<any>> =>
|
|
19
|
+
!!node.data && typeof node.data === 'object' && 'threads' in node.data && Array.isArray(node.data.threads),
|
|
20
|
+
connector: ({ node }) => [
|
|
21
|
+
{
|
|
22
|
+
id: [node.id, 'comments'].join(ATTENDABLE_PATH_SEPARATOR),
|
|
23
|
+
type: PLANK_COMPANION_TYPE,
|
|
24
|
+
data: 'comments',
|
|
25
|
+
properties: {
|
|
26
|
+
label: ['comments label', { ns: meta.id }],
|
|
27
|
+
icon: 'ph--chat-text--regular',
|
|
28
|
+
disposition: 'hidden',
|
|
29
|
+
position: 'hoist',
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
],
|
|
33
|
+
}),
|
|
34
|
+
]);
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
import { lazy } from '@dxos/app-framework';
|
|
6
6
|
|
|
7
|
+
export const AppGraphBuilder = lazy(() => import('./app-graph-builder'));
|
|
7
8
|
export const IntentResolver = lazy(() => import('./intent-resolver'));
|
|
8
9
|
export const Markdown = lazy(() => import('./markdown'));
|
|
9
10
|
export const ReactSurface = lazy(() => import('./react-surface'));
|