@dxos/plugin-thread 0.8.3-main.7f5a14c → 0.8.3
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/{ChannelContainer-KWXUKR5Q.mjs → ChannelContainer-PKFBVENP.mjs} +3 -3
- package/dist/lib/browser/{app-graph-builder-CBWNZCXB.mjs → app-graph-builder-OY7R7EJP.mjs} +2 -2
- package/dist/lib/browser/chunk-6NBVNXTM.mjs +21 -0
- package/dist/lib/browser/{chunk-WDOQXTI2.mjs → chunk-AEXWNS6Z.mjs} +5 -3
- package/dist/lib/browser/chunk-AEXWNS6Z.mjs.map +7 -0
- package/dist/lib/browser/{chunk-3EYX6CV7.mjs → chunk-PG5CTFKK.mjs} +47 -43
- package/dist/lib/browser/chunk-PG5CTFKK.mjs.map +7 -0
- package/dist/lib/browser/{chunk-5IRYNA5K.mjs → chunk-XZKBN3NS.mjs} +30 -30
- package/dist/lib/browser/chunk-XZKBN3NS.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +33 -7
- package/dist/lib/browser/index.mjs.map +3 -3
- package/dist/lib/browser/{intent-resolver-I37YU7K3.mjs → intent-resolver-FK2MDVDT.mjs} +19 -22
- package/dist/lib/browser/intent-resolver-FK2MDVDT.mjs.map +7 -0
- package/dist/lib/browser/{markdown-LS3XO2KB.mjs → markdown-TE5SWWNJ.mjs} +7 -8
- package/dist/lib/browser/markdown-TE5SWWNJ.mjs.map +7 -0
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/{react-root-KNCKPHGS.mjs → react-root-NK3A4VG7.mjs} +5 -5
- package/dist/lib/browser/{react-surface-ASWIBD7H.mjs → react-surface-VXUJKSOG.mjs} +5 -5
- package/dist/lib/browser/{settings-ZUY7OX24.mjs → settings-RB2RSLXV.mjs} +2 -2
- package/dist/lib/browser/types/index.mjs +1 -1
- package/dist/lib/node/{ChannelContainer-MA5CFESJ.cjs → ChannelContainer-YS5YT2ML.cjs} +8 -8
- package/dist/lib/node/{ChannelContainer-MA5CFESJ.cjs.map → ChannelContainer-YS5YT2ML.cjs.map} +2 -2
- package/dist/lib/node/{app-graph-builder-K5OAVYI6.cjs → app-graph-builder-PBHJNDQY.cjs} +9 -9
- package/dist/lib/node/{chunk-3YYSLZE4.cjs → chunk-ERG7G6FF.cjs} +10 -10
- package/dist/lib/node/{chunk-WCQKISL5.cjs → chunk-IP533AMV.cjs} +64 -60
- package/dist/lib/node/chunk-IP533AMV.cjs.map +7 -0
- package/dist/lib/node/{chunk-U4SZUERU.cjs → chunk-UM36TPCT.cjs} +33 -33
- package/dist/lib/node/chunk-UM36TPCT.cjs.map +7 -0
- package/dist/lib/node/{chunk-TKHJVC2C.cjs → chunk-ZGDN3XBR.cjs} +8 -6
- package/dist/lib/node/chunk-ZGDN3XBR.cjs.map +7 -0
- package/dist/lib/node/index.cjs +42 -16
- package/dist/lib/node/index.cjs.map +3 -3
- package/dist/lib/node/{intent-resolver-2TX6HSOL.cjs → intent-resolver-SYSJ5SJG.cjs} +36 -39
- package/dist/lib/node/intent-resolver-SYSJ5SJG.cjs.map +7 -0
- package/dist/lib/node/{markdown-GNFW2XDO.cjs → markdown-GQIPJS2F.cjs} +13 -14
- package/dist/lib/node/markdown-GQIPJS2F.cjs.map +7 -0
- package/dist/lib/node/meta.json +1 -1
- package/dist/lib/node/{react-root-BKOXG5AC.cjs → react-root-6HHDMULJ.cjs} +9 -9
- package/dist/lib/node/{react-surface-Q5DWX3UO.cjs → react-surface-NBH42NN2.cjs} +18 -18
- package/dist/lib/node/{settings-5O5V2NOE.cjs → settings-4LQSFEDK.cjs} +6 -6
- package/dist/lib/node/types/index.cjs +6 -6
- package/dist/lib/node/types/index.cjs.map +1 -1
- package/dist/lib/node-esm/{ChannelContainer-VGVEAUAQ.mjs → ChannelContainer-O4QJII2P.mjs} +3 -3
- package/dist/lib/node-esm/{app-graph-builder-UWJQE534.mjs → app-graph-builder-BAHBHYWI.mjs} +2 -2
- package/dist/lib/node-esm/{chunk-KP2JBSWF.mjs → chunk-2RNIPFDA.mjs} +30 -30
- package/dist/lib/node-esm/chunk-2RNIPFDA.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-EHDXOE5R.mjs → chunk-O63QJPQX.mjs} +7 -7
- package/dist/lib/node-esm/{chunk-J323VQ4P.mjs → chunk-UJMPYKT3.mjs} +5 -3
- package/dist/lib/node-esm/chunk-UJMPYKT3.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-6EGLDARC.mjs → chunk-UZWVVFT3.mjs} +47 -43
- package/dist/lib/node-esm/chunk-UZWVVFT3.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +33 -7
- package/dist/lib/node-esm/index.mjs.map +3 -3
- package/dist/lib/node-esm/{intent-resolver-FHRK77IS.mjs → intent-resolver-BU73VYW3.mjs} +19 -22
- package/dist/lib/node-esm/intent-resolver-BU73VYW3.mjs.map +7 -0
- package/dist/lib/node-esm/{markdown-HBGB3UPJ.mjs → markdown-HJUWNBLS.mjs} +7 -8
- package/dist/lib/node-esm/markdown-HJUWNBLS.mjs.map +7 -0
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/{react-root-UPDDCRBV.mjs → react-root-RUXOAQNW.mjs} +5 -5
- package/dist/lib/node-esm/{react-surface-LU3CZDC4.mjs → react-surface-ELXFYKP6.mjs} +5 -5
- package/dist/lib/node-esm/{settings-KFEFSAYG.mjs → settings-EA7DFSM6.mjs} +2 -2
- package/dist/lib/node-esm/types/index.mjs +1 -1
- package/dist/types/src/ThreadPlugin.d.ts.map +1 -1
- package/dist/types/src/capabilities/intent-resolver.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 -1
- package/dist/types/src/components/CommentsContainer.d.ts.map +1 -1
- package/dist/types/src/components/ThreadComplementary.d.ts.map +1 -1
- package/dist/types/src/extensions/threads.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts +128 -2
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/schema.d.ts +117 -301
- package/dist/types/src/types/schema.d.ts.map +1 -1
- package/dist/types/src/types/types.d.ts +153 -828
- package/dist/types/src/types/types.d.ts.map +1 -1
- package/package.json +42 -42
- package/src/ThreadPlugin.tsx +26 -3
- package/src/capabilities/intent-resolver.ts +17 -18
- package/src/components/Call/Toolbar.tsx +1 -1
- package/src/components/ChannelContainer.tsx +18 -22
- package/src/components/CommentContainer.tsx +2 -2
- package/src/components/Comments.stories.tsx +12 -3
- package/src/components/CommentsContainer.tsx +21 -24
- package/src/components/ThreadComplementary.tsx +15 -16
- package/src/extensions/threads.ts +5 -6
- package/src/translations.ts +7 -2
- package/src/types/schema.ts +8 -4
- package/dist/lib/browser/chunk-3EYX6CV7.mjs.map +0 -7
- package/dist/lib/browser/chunk-5IRYNA5K.mjs.map +0 -7
- package/dist/lib/browser/chunk-FWBJHKRW.mjs +0 -21
- package/dist/lib/browser/chunk-WDOQXTI2.mjs.map +0 -7
- package/dist/lib/browser/intent-resolver-I37YU7K3.mjs.map +0 -7
- package/dist/lib/browser/markdown-LS3XO2KB.mjs.map +0 -7
- package/dist/lib/node/chunk-TKHJVC2C.cjs.map +0 -7
- package/dist/lib/node/chunk-U4SZUERU.cjs.map +0 -7
- package/dist/lib/node/chunk-WCQKISL5.cjs.map +0 -7
- package/dist/lib/node/intent-resolver-2TX6HSOL.cjs.map +0 -7
- package/dist/lib/node/markdown-GNFW2XDO.cjs.map +0 -7
- package/dist/lib/node-esm/chunk-6EGLDARC.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-J323VQ4P.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-KP2JBSWF.mjs.map +0 -7
- package/dist/lib/node-esm/intent-resolver-FHRK77IS.mjs.map +0 -7
- package/dist/lib/node-esm/markdown-HBGB3UPJ.mjs.map +0 -7
- /package/dist/lib/browser/{ChannelContainer-KWXUKR5Q.mjs.map → ChannelContainer-PKFBVENP.mjs.map} +0 -0
- /package/dist/lib/browser/{app-graph-builder-CBWNZCXB.mjs.map → app-graph-builder-OY7R7EJP.mjs.map} +0 -0
- /package/dist/lib/browser/{chunk-FWBJHKRW.mjs.map → chunk-6NBVNXTM.mjs.map} +0 -0
- /package/dist/lib/browser/{react-root-KNCKPHGS.mjs.map → react-root-NK3A4VG7.mjs.map} +0 -0
- /package/dist/lib/browser/{react-surface-ASWIBD7H.mjs.map → react-surface-VXUJKSOG.mjs.map} +0 -0
- /package/dist/lib/browser/{settings-ZUY7OX24.mjs.map → settings-RB2RSLXV.mjs.map} +0 -0
- /package/dist/lib/node/{app-graph-builder-K5OAVYI6.cjs.map → app-graph-builder-PBHJNDQY.cjs.map} +0 -0
- /package/dist/lib/node/{chunk-3YYSLZE4.cjs.map → chunk-ERG7G6FF.cjs.map} +0 -0
- /package/dist/lib/node/{react-root-BKOXG5AC.cjs.map → react-root-6HHDMULJ.cjs.map} +0 -0
- /package/dist/lib/node/{react-surface-Q5DWX3UO.cjs.map → react-surface-NBH42NN2.cjs.map} +0 -0
- /package/dist/lib/node/{settings-5O5V2NOE.cjs.map → settings-4LQSFEDK.cjs.map} +0 -0
- /package/dist/lib/node-esm/{ChannelContainer-VGVEAUAQ.mjs.map → ChannelContainer-O4QJII2P.mjs.map} +0 -0
- /package/dist/lib/node-esm/{app-graph-builder-UWJQE534.mjs.map → app-graph-builder-BAHBHYWI.mjs.map} +0 -0
- /package/dist/lib/node-esm/{chunk-EHDXOE5R.mjs.map → chunk-O63QJPQX.mjs.map} +0 -0
- /package/dist/lib/node-esm/{react-root-UPDDCRBV.mjs.map → react-root-RUXOAQNW.mjs.map} +0 -0
- /package/dist/lib/node-esm/{react-surface-LU3CZDC4.mjs.map → react-surface-ELXFYKP6.mjs.map} +0 -0
- /package/dist/lib/node-esm/{settings-KFEFSAYG.mjs.map → settings-EA7DFSM6.mjs.map} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/types/types.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAEhC,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAElC,OAAO,EAAE,UAAU,EAAY,MAAM,cAAc,CAAC;AAEpD,OAAO,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/types/types.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAEhC,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAElC,OAAO,EAAE,UAAU,EAAY,MAAM,cAAc,CAAC;AAEpD,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAGnD,yBAAiB,YAAY,CAAC;;;;;;;;;;;;;;;;;;;;;;;;IAG5B,MAAM,OAAO,aAAc,SAAQ,kBAQjC;KAAG;;;;;;;;;;;;;;;;;;;;;IAEL,MAAM,OAAO,mBAAoB,SAAQ,wBAUxC;KAAG;;;;;;;;;;;IAEJ,MAAM,OAAO,MAAO,SAAQ,WAO1B;KAAG;;;;;;;;;;;;;;;;;;;;;;;;;IAEL,MAAM,OAAO,MAAO,SAAQ,WAO1B;KAAG;;;;;;;;;IAEL,MAAM,OAAO,MAAO,SAAQ,WAK1B;KAAG;;;;;;;;;;;;;;IAEL,MAAM,OAAO,cAAe,SAAQ,mBAKlC;KAAG;;;;;;;;;;;;;;;;;;;;;;;mCAOE,CAAC;;4BAKC,CAAC;8BAA4C,CAAC;6BAE3C,CAAC;+BAET,CAAJ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAdA,MAAM,OAAO,UAAW,SAAQ,eAQ9B;KAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;uCAgCyjhB,CAAC;;gCAA8E,CAAC;kCAAgD,CAAC;iCAAkG,CAAC;mCAAiD,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IA9Bp1hB,MAAM,OAAO,aAAc,SAAQ,kBASjC;KAAG;;CACN;AAED,eAAO,MAAM,oBAAoB,mCAAoC,CAAC;AACtE,MAAM,MAAM,mBAAmB,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAElF,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,4BAA4B;IAC5B,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACjC,+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.3
|
|
3
|
+
"version": "0.8.3",
|
|
4
4
|
"description": "DXOS Threads Surface plugin",
|
|
5
5
|
"homepage": "https://dxos.org",
|
|
6
6
|
"bugs": "https://github.com/dxos/dxos/issues",
|
|
@@ -45,40 +45,40 @@
|
|
|
45
45
|
"md5-hex": "5.0.0",
|
|
46
46
|
"react-resize-detector": "^12.0.2",
|
|
47
47
|
"wavefile": "^11.0.0",
|
|
48
|
-
"@dxos/
|
|
49
|
-
"@dxos/
|
|
50
|
-
"@dxos/
|
|
51
|
-
"@dxos/
|
|
52
|
-
"@dxos/
|
|
53
|
-
"@dxos/
|
|
54
|
-
"@dxos/echo": "0.8.3
|
|
55
|
-
"@dxos/
|
|
56
|
-
"@dxos/
|
|
57
|
-
"@dxos/
|
|
58
|
-
"@dxos/
|
|
59
|
-
"@dxos/
|
|
60
|
-
"@dxos/
|
|
61
|
-
"@dxos/plugin-
|
|
62
|
-
"@dxos/
|
|
63
|
-
"@dxos/plugin-
|
|
64
|
-
"@dxos/plugin-
|
|
65
|
-
"@dxos/plugin-
|
|
66
|
-
"@dxos/plugin-space": "0.8.3
|
|
67
|
-
"@dxos/plugin-
|
|
68
|
-
"@dxos/
|
|
69
|
-
"@dxos/react-
|
|
70
|
-
"@dxos/
|
|
71
|
-
"@dxos/react-ui-
|
|
72
|
-
"@dxos/react-ui-
|
|
73
|
-
"@dxos/react-ui-
|
|
74
|
-
"@dxos/react-ui-menu": "0.8.3
|
|
75
|
-
"@dxos/react-ui-
|
|
76
|
-
"@dxos/react-ui-
|
|
77
|
-
"@dxos/
|
|
78
|
-
"@dxos/react-ui-
|
|
79
|
-
"@dxos/
|
|
80
|
-
"@dxos/
|
|
81
|
-
"@dxos/react-ui-
|
|
48
|
+
"@dxos/app-framework": "0.8.3",
|
|
49
|
+
"@dxos/codec-protobuf": "0.8.3",
|
|
50
|
+
"@dxos/async": "0.8.3",
|
|
51
|
+
"@dxos/context": "0.8.3",
|
|
52
|
+
"@dxos/devtools": "0.8.3",
|
|
53
|
+
"@dxos/echo": "0.8.3",
|
|
54
|
+
"@dxos/echo-schema": "0.8.3",
|
|
55
|
+
"@dxos/keys": "0.8.3",
|
|
56
|
+
"@dxos/display-name": "0.8.3",
|
|
57
|
+
"@dxos/invariant": "0.8.3",
|
|
58
|
+
"@dxos/local-storage": "0.8.3",
|
|
59
|
+
"@dxos/live-object": "0.8.3",
|
|
60
|
+
"@dxos/log": "0.8.3",
|
|
61
|
+
"@dxos/plugin-attention": "0.8.3",
|
|
62
|
+
"@dxos/plugin-client": "0.8.3",
|
|
63
|
+
"@dxos/plugin-deck": "0.8.3",
|
|
64
|
+
"@dxos/plugin-graph": "0.8.3",
|
|
65
|
+
"@dxos/plugin-observability": "0.8.3",
|
|
66
|
+
"@dxos/plugin-space": "0.8.3",
|
|
67
|
+
"@dxos/plugin-markdown": "0.8.3",
|
|
68
|
+
"@dxos/protocols": "0.8.3",
|
|
69
|
+
"@dxos/react-client": "0.8.3",
|
|
70
|
+
"@dxos/react-ui-attention": "0.8.3",
|
|
71
|
+
"@dxos/react-ui-editor": "0.8.3",
|
|
72
|
+
"@dxos/react-ui-form": "0.8.3",
|
|
73
|
+
"@dxos/react-ui-dnd": "0.8.3",
|
|
74
|
+
"@dxos/react-ui-menu": "0.8.3",
|
|
75
|
+
"@dxos/react-ui-syntax-highlighter": "0.8.3",
|
|
76
|
+
"@dxos/react-ui-sfx": "0.8.3",
|
|
77
|
+
"@dxos/react-ui-stack": "0.8.3",
|
|
78
|
+
"@dxos/react-ui-tabs": "0.8.3",
|
|
79
|
+
"@dxos/schema": "0.8.3",
|
|
80
|
+
"@dxos/util": "0.8.3",
|
|
81
|
+
"@dxos/react-ui-thread": "0.8.3"
|
|
82
82
|
},
|
|
83
83
|
"devDependencies": {
|
|
84
84
|
"@effect-rx/rx-react": "^0.34.1",
|
|
@@ -90,11 +90,11 @@
|
|
|
90
90
|
"react": "~18.2.0",
|
|
91
91
|
"react-dom": "~18.2.0",
|
|
92
92
|
"vite": "5.4.7",
|
|
93
|
-
"@dxos/random": "0.8.3
|
|
94
|
-
"@dxos/
|
|
95
|
-
"@dxos/react-ui
|
|
96
|
-
"@dxos/
|
|
97
|
-
"@dxos/
|
|
93
|
+
"@dxos/random": "0.8.3",
|
|
94
|
+
"@dxos/plugin-theme": "0.8.3",
|
|
95
|
+
"@dxos/react-ui": "0.8.3",
|
|
96
|
+
"@dxos/storybook-utils": "0.8.3",
|
|
97
|
+
"@dxos/react-ui-theme": "0.8.3"
|
|
98
98
|
},
|
|
99
99
|
"peerDependencies": {
|
|
100
100
|
"@effect-rx/rx-react": "^0.34.1",
|
|
@@ -103,8 +103,8 @@
|
|
|
103
103
|
"effect": "^3.13.3",
|
|
104
104
|
"react": "~18.2.0",
|
|
105
105
|
"react-dom": "~18.2.0",
|
|
106
|
-
"@dxos/react-ui": "0.8.3
|
|
107
|
-
"@dxos/react-ui-theme": "0.8.3
|
|
106
|
+
"@dxos/react-ui": "0.8.3",
|
|
107
|
+
"@dxos/react-ui-theme": "0.8.3"
|
|
108
108
|
},
|
|
109
109
|
"publishConfig": {
|
|
110
110
|
"access": "public"
|
package/src/ThreadPlugin.tsx
CHANGED
|
@@ -2,12 +2,14 @@
|
|
|
2
2
|
// Copyright 2023 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
+
import { Effect } from 'effect';
|
|
6
|
+
|
|
5
7
|
import { Capabilities, contributes, createIntent, defineModule, definePlugin, Events } from '@dxos/app-framework';
|
|
6
|
-
import { Ref } from '@dxos/echo';
|
|
8
|
+
import { Ref, Type } from '@dxos/echo';
|
|
7
9
|
import { ClientCapabilities, ClientEvents } from '@dxos/plugin-client';
|
|
8
10
|
import { MarkdownEvents } from '@dxos/plugin-markdown';
|
|
9
|
-
import { SpaceCapabilities } from '@dxos/plugin-space';
|
|
10
|
-
import { defineObjectForm } from '@dxos/plugin-space/types';
|
|
11
|
+
import { SpaceCapabilities, SpaceEvents } from '@dxos/plugin-space';
|
|
12
|
+
import { CollectionAction, defineObjectForm } from '@dxos/plugin-space/types';
|
|
11
13
|
import { translations as threadTranslations } from '@dxos/react-ui-thread';
|
|
12
14
|
import { AnchoredTo, DataType } from '@dxos/schema';
|
|
13
15
|
|
|
@@ -119,6 +121,27 @@ export const ThreadPlugin = () =>
|
|
|
119
121
|
activatesOn: ClientEvents.SetupMigration,
|
|
120
122
|
activate: () => contributes(ClientCapabilities.Migration, [DataType.MessageV1ToV2]),
|
|
121
123
|
}),
|
|
124
|
+
defineModule({
|
|
125
|
+
id: `${meta.id}/module/on-space-created`,
|
|
126
|
+
activatesOn: SpaceEvents.SpaceCreated,
|
|
127
|
+
activate: (context) => {
|
|
128
|
+
const { dispatch } = context.getCapability(Capabilities.IntentDispatcher);
|
|
129
|
+
return contributes(SpaceCapabilities.OnSpaceCreated, async ({ space, rootCollection }) => {
|
|
130
|
+
const program = Effect.gen(function* () {
|
|
131
|
+
const { object: collection } = yield* dispatch(
|
|
132
|
+
createIntent(CollectionAction.CreateQueryCollection, { typename: Type.getTypename(ChannelType) }),
|
|
133
|
+
);
|
|
134
|
+
rootCollection.objects.push(Ref.make(collection));
|
|
135
|
+
|
|
136
|
+
const { object: channel } = yield* dispatch(
|
|
137
|
+
createIntent(ThreadAction.CreateChannel, { name: 'General', spaceId: space.id }),
|
|
138
|
+
);
|
|
139
|
+
space.db.add(channel);
|
|
140
|
+
});
|
|
141
|
+
await Effect.runPromise(program);
|
|
142
|
+
});
|
|
143
|
+
},
|
|
144
|
+
}),
|
|
122
145
|
defineModule({
|
|
123
146
|
id: `${meta.id}/module/markdown`,
|
|
124
147
|
activatesOn: MarkdownEvents.SetupExtensions,
|
|
@@ -2,11 +2,9 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import { batch } from '@preact/signals-core';
|
|
6
|
-
|
|
7
5
|
import { Capabilities, contributes, createIntent, createResolver, type PluginContext } from '@dxos/app-framework';
|
|
6
|
+
import { sleep } from '@dxos/async';
|
|
8
7
|
import { Obj, Relation } from '@dxos/echo';
|
|
9
|
-
import { RelationSourceId, RelationTargetId } from '@dxos/echo-schema';
|
|
10
8
|
import { invariant } from '@dxos/invariant';
|
|
11
9
|
import { ATTENDABLE_PATH_SEPARATOR, DeckAction } from '@dxos/plugin-deck/types';
|
|
12
10
|
import { ObservabilityAction } from '@dxos/plugin-observability/types';
|
|
@@ -55,10 +53,11 @@ export default (context: PluginContext) =>
|
|
|
55
53
|
const subjectId = fullyQualifiedId(subject);
|
|
56
54
|
const thread = Obj.make(ThreadType, { name, messages: [], status: 'staged' });
|
|
57
55
|
const anchor = Relation.make(AnchoredTo, {
|
|
58
|
-
[
|
|
59
|
-
[
|
|
56
|
+
[Relation.Source]: thread,
|
|
57
|
+
[Relation.Target]: subject,
|
|
60
58
|
anchor: _anchor,
|
|
61
59
|
});
|
|
60
|
+
|
|
62
61
|
const draft = state.drafts[subjectId];
|
|
63
62
|
if (draft) {
|
|
64
63
|
draft.push(anchor);
|
|
@@ -112,13 +111,13 @@ export default (context: PluginContext) =>
|
|
|
112
111
|
}),
|
|
113
112
|
createResolver({
|
|
114
113
|
intent: ThreadAction.Delete,
|
|
115
|
-
resolve: ({ subject, anchor, thread: _thread }, undo) => {
|
|
116
|
-
const thread = _thread ?? (anchor
|
|
114
|
+
resolve: async ({ subject, anchor, thread: _thread }, undo) => {
|
|
115
|
+
const thread = _thread ?? (Relation.getSource(anchor) as ThreadType);
|
|
117
116
|
const { state } = context.getCapability(ThreadCapabilities.MutableState);
|
|
118
117
|
const subjectId = fullyQualifiedId(subject);
|
|
119
118
|
const draft = state.drafts[subjectId];
|
|
120
119
|
if (draft) {
|
|
121
|
-
// Check if we're deleting a draft; if so,
|
|
120
|
+
// Check if we're deleting a draft; if so, remo ve it.
|
|
122
121
|
const index = draft.findIndex((a) => a.id === anchor.id);
|
|
123
122
|
if (index !== -1) {
|
|
124
123
|
draft.splice(index, 1);
|
|
@@ -132,10 +131,10 @@ export default (context: PluginContext) =>
|
|
|
132
131
|
}
|
|
133
132
|
|
|
134
133
|
if (!undo) {
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
134
|
+
// TODO(wittjosiah): Without sleep, rendering crashes at `Relation.setSource(anchor)`.
|
|
135
|
+
space.db.remove(anchor);
|
|
136
|
+
await sleep(100);
|
|
137
|
+
space.db.remove(thread);
|
|
139
138
|
|
|
140
139
|
return {
|
|
141
140
|
undoable: {
|
|
@@ -153,10 +152,10 @@ export default (context: PluginContext) =>
|
|
|
153
152
|
],
|
|
154
153
|
};
|
|
155
154
|
} else {
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
155
|
+
// TODO(wittjosiah): Without sleep, rendering crashes at `Relation.setSource(anchor)`.
|
|
156
|
+
space.db.add(thread);
|
|
157
|
+
await sleep(100);
|
|
158
|
+
space.db.add(anchor);
|
|
160
159
|
|
|
161
160
|
return {
|
|
162
161
|
intents: [
|
|
@@ -175,7 +174,7 @@ export default (context: PluginContext) =>
|
|
|
175
174
|
createResolver({
|
|
176
175
|
intent: ThreadAction.AddMessage,
|
|
177
176
|
resolve: ({ anchor, subject, sender, text }) => {
|
|
178
|
-
const thread = anchor
|
|
177
|
+
const thread = Relation.getSource(anchor) as ThreadType;
|
|
179
178
|
const { state } = context.getCapability(ThreadCapabilities.MutableState);
|
|
180
179
|
const subjectId = fullyQualifiedId(subject);
|
|
181
180
|
const space = getSpace(subject);
|
|
@@ -237,7 +236,7 @@ export default (context: PluginContext) =>
|
|
|
237
236
|
createResolver({
|
|
238
237
|
intent: ThreadAction.DeleteMessage,
|
|
239
238
|
resolve: ({ subject, anchor, messageId, message, messageIndex }, undo) => {
|
|
240
|
-
const thread = anchor
|
|
239
|
+
const thread = Relation.getSource(anchor) as ThreadType;
|
|
241
240
|
const space = getSpace(subject);
|
|
242
241
|
invariant(space, 'Space not found');
|
|
243
242
|
|
|
@@ -56,7 +56,7 @@ export const Toolbar = ({
|
|
|
56
56
|
// TODO(wittjosiah): In order to use toolbar, need to update to actually use the graph action callbacks directly.
|
|
57
57
|
return (
|
|
58
58
|
<div className={mx('z-20 flex justify-center m-8', autoHideControls && groupHoverControlItemWithTransition)}>
|
|
59
|
-
<NativeToolbar.Root classNames={['p-2 bg-modalSurface rounded-
|
|
59
|
+
<NativeToolbar.Root classNames={['p-2 bg-modalSurface rounded-md shadow-md', classNames]}>
|
|
60
60
|
<ToggleButton
|
|
61
61
|
active={call.media.audioEnabled}
|
|
62
62
|
state={{
|
|
@@ -11,7 +11,7 @@ import { log } from '@dxos/log';
|
|
|
11
11
|
import { useClient } from '@dxos/react-client';
|
|
12
12
|
import { fullyQualifiedId, getSpace } from '@dxos/react-client/echo';
|
|
13
13
|
import { useIdentity } from '@dxos/react-client/halo';
|
|
14
|
-
import { useTranslation, Input, ElevationProvider } from '@dxos/react-ui';
|
|
14
|
+
import { useTranslation, Input, ElevationProvider, type ThemedClassName } from '@dxos/react-ui';
|
|
15
15
|
import { ControlGroup, ControlItemInput, ControlGroupButton } from '@dxos/react-ui-form';
|
|
16
16
|
import { ToolbarMenu, MenuProvider, createMenuAction, useMenuActions, createMenuItemGroup } from '@dxos/react-ui-menu';
|
|
17
17
|
import { useSoundEffect } from '@dxos/react-ui-sfx';
|
|
@@ -160,23 +160,19 @@ const useChannelToolbarActions = (onJoinCall?: () => void) => {
|
|
|
160
160
|
const creator = useMemo(
|
|
161
161
|
() =>
|
|
162
162
|
Rx.make(() => {
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
}
|
|
176
|
-
nodes.push(sortAction);
|
|
177
|
-
edges.push({ source: 'root', target: sortAction.id });
|
|
178
|
-
|
|
179
|
-
return { nodes, edges };
|
|
163
|
+
return {
|
|
164
|
+
nodes: [
|
|
165
|
+
createMenuItemGroup('root', {
|
|
166
|
+
label: ['channel toolbar title', { ns: THREAD_PLUGIN }],
|
|
167
|
+
}),
|
|
168
|
+
createMenuAction('video-call', () => onJoinCall?.(), {
|
|
169
|
+
label: ['start video call label', { ns: THREAD_PLUGIN }],
|
|
170
|
+
icon: 'ph--video-camera--regular',
|
|
171
|
+
type: 'video-call',
|
|
172
|
+
}),
|
|
173
|
+
],
|
|
174
|
+
edges: [{ source: 'root', target: 'video-call' }],
|
|
175
|
+
};
|
|
180
176
|
}),
|
|
181
177
|
[],
|
|
182
178
|
);
|
|
@@ -184,19 +180,19 @@ const useChannelToolbarActions = (onJoinCall?: () => void) => {
|
|
|
184
180
|
return useMenuActions(creator);
|
|
185
181
|
};
|
|
186
182
|
|
|
187
|
-
type ChannelToolbarProps = {
|
|
183
|
+
type ChannelToolbarProps = ThemedClassName<{
|
|
188
184
|
attendableId?: string;
|
|
189
185
|
role?: string;
|
|
190
186
|
onJoinCall?: () => void;
|
|
191
|
-
}
|
|
187
|
+
}>;
|
|
192
188
|
|
|
193
|
-
const ChannelToolbar = ({ attendableId, role, onJoinCall }: ChannelToolbarProps) => {
|
|
189
|
+
const ChannelToolbar = ({ attendableId, role, onJoinCall, classNames }: ChannelToolbarProps) => {
|
|
194
190
|
const menuProps = useChannelToolbarActions(onJoinCall);
|
|
195
191
|
|
|
196
192
|
return (
|
|
197
193
|
<ElevationProvider elevation={role === 'section' ? 'positioned' : 'base'}>
|
|
198
194
|
<MenuProvider {...menuProps} attendableId={attendableId}>
|
|
199
|
-
<ToolbarMenu />
|
|
195
|
+
<ToolbarMenu classNames={classNames} />
|
|
200
196
|
</MenuProvider>
|
|
201
197
|
</ElevationProvider>
|
|
202
198
|
);
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
import { CheckCircle, X } from '@phosphor-icons/react';
|
|
6
6
|
import React, { useCallback, useMemo, useRef, useState } from 'react';
|
|
7
7
|
|
|
8
|
-
import {
|
|
8
|
+
import { Relation } from '@dxos/echo';
|
|
9
9
|
import { RefArray } from '@dxos/live-object';
|
|
10
10
|
import { fullyQualifiedId, getSpace, useMembers } from '@dxos/react-client/echo';
|
|
11
11
|
import { useIdentity } from '@dxos/react-client/halo';
|
|
@@ -105,7 +105,7 @@ export const CommentContainer = ({
|
|
|
105
105
|
const space = getSpace(anchor);
|
|
106
106
|
const members = useMembers(space?.key);
|
|
107
107
|
const detached = !anchor.anchor;
|
|
108
|
-
const thread = anchor
|
|
108
|
+
const thread = Relation.getSource(anchor) as ThreadType;
|
|
109
109
|
const activity = useStatus(space, fullyQualifiedId(thread));
|
|
110
110
|
const { t } = useTranslation(THREAD_PLUGIN);
|
|
111
111
|
const threadScrollRef = useRef<HTMLDivElement | null>(null);
|
|
@@ -10,7 +10,6 @@ import React, { useEffect } from 'react';
|
|
|
10
10
|
import { IntentPlugin } from '@dxos/app-framework';
|
|
11
11
|
import { withPluginManager } from '@dxos/app-framework/testing';
|
|
12
12
|
import { Obj, Query, Relation, Type } from '@dxos/echo';
|
|
13
|
-
import { RelationSourceId, RelationTargetId } from '@dxos/echo-schema';
|
|
14
13
|
import { faker } from '@dxos/random';
|
|
15
14
|
import { useQuery, useSpace } from '@dxos/react-client/echo';
|
|
16
15
|
import { useIdentity } from '@dxos/react-client/halo';
|
|
@@ -36,8 +35,18 @@ const Story = ({ spaceKey }: ClientRepeatedComponentProps) => {
|
|
|
36
35
|
const object = space.db.add(Obj.make(Type.Expando, {}));
|
|
37
36
|
const thread1 = space.db.add(createCommentThread(identity));
|
|
38
37
|
const thread2 = space.db.add(createCommentThread(identity));
|
|
39
|
-
space.db.add(
|
|
40
|
-
|
|
38
|
+
space.db.add(
|
|
39
|
+
Relation.make(AnchoredTo, {
|
|
40
|
+
[Relation.Source]: thread1,
|
|
41
|
+
[Relation.Target]: object,
|
|
42
|
+
}),
|
|
43
|
+
);
|
|
44
|
+
space.db.add(
|
|
45
|
+
Relation.make(AnchoredTo, {
|
|
46
|
+
[Relation.Source]: thread2,
|
|
47
|
+
[Relation.Target]: object,
|
|
48
|
+
}),
|
|
49
|
+
);
|
|
41
50
|
});
|
|
42
51
|
|
|
43
52
|
return () => clearTimeout(t);
|
|
@@ -2,13 +2,11 @@
|
|
|
2
2
|
// Copyright 2024 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import { ChatText } from '@phosphor-icons/react';
|
|
6
5
|
import React, { useEffect } from 'react';
|
|
7
6
|
|
|
8
|
-
import {
|
|
7
|
+
import { Relation } from '@dxos/echo';
|
|
9
8
|
import { fullyQualifiedId } from '@dxos/react-client/echo';
|
|
10
|
-
import {
|
|
11
|
-
import { descriptionMessage, mx } from '@dxos/react-ui-theme';
|
|
9
|
+
import { Callout, Icon, Trans, useTranslation } from '@dxos/react-ui';
|
|
12
10
|
import { type AnchoredTo } from '@dxos/schema';
|
|
13
11
|
|
|
14
12
|
import { CommentContainer, type CommentContainerProps } from './CommentContainer';
|
|
@@ -28,9 +26,9 @@ export const CommentsContainer = ({ anchors, currentId, showResolvedThreads, ...
|
|
|
28
26
|
const { t } = useTranslation(THREAD_PLUGIN);
|
|
29
27
|
// TODO(wittjosiah): There seems to be a race between thread and anchor being deleted.
|
|
30
28
|
const filteredAnchors = showResolvedThreads
|
|
31
|
-
? anchors.filter((anchor) => !!anchor
|
|
29
|
+
? anchors.filter((anchor) => !!Relation.getSource(anchor))
|
|
32
30
|
: anchors.filter((anchor) => {
|
|
33
|
-
const thread = anchor
|
|
31
|
+
const thread = Relation.getSource(anchor);
|
|
34
32
|
return thread && thread.status !== 'resolved';
|
|
35
33
|
});
|
|
36
34
|
|
|
@@ -40,30 +38,29 @@ export const CommentsContainer = ({ anchors, currentId, showResolvedThreads, ...
|
|
|
40
38
|
}
|
|
41
39
|
}, [currentId]);
|
|
42
40
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
const threadId = fullyQualifiedId(thread);
|
|
49
|
-
return <CommentContainer key={threadId} anchor={anchor} current={currentId === threadId} {...props} />;
|
|
50
|
-
})
|
|
51
|
-
) : (
|
|
52
|
-
<div role='alert' className={mx(descriptionMessage, 'place-self-center rounded-lg text-center m-4')}>
|
|
53
|
-
<h2 className='mbe-2 font-medium text-baseText'>{t('no comments title')}</h2>
|
|
54
|
-
<p>
|
|
41
|
+
if (filteredAnchors.length === 0) {
|
|
42
|
+
return (
|
|
43
|
+
<div role='none' className='plb-cardSpacingBlock pli-cardSpacingInline'>
|
|
44
|
+
<Callout.Root>
|
|
45
|
+
<Callout.Title>
|
|
55
46
|
<Trans
|
|
56
47
|
{...{
|
|
57
48
|
t,
|
|
58
49
|
i18nKey: 'no comments message',
|
|
59
50
|
components: {
|
|
60
|
-
commentIcon: <
|
|
51
|
+
commentIcon: <Icon icon='ph--chat-text--regular' size={4} classNames='inline-block' />,
|
|
61
52
|
},
|
|
62
53
|
}}
|
|
63
54
|
/>
|
|
64
|
-
</
|
|
65
|
-
</
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
55
|
+
</Callout.Title>
|
|
56
|
+
</Callout.Root>
|
|
57
|
+
</div>
|
|
58
|
+
);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
return filteredAnchors.map((anchor) => {
|
|
62
|
+
const thread = Relation.getSource(anchor) as ThreadType;
|
|
63
|
+
const threadId = fullyQualifiedId(thread);
|
|
64
|
+
return <CommentContainer key={threadId} anchor={anchor} current={currentId === threadId} {...props} />;
|
|
65
|
+
});
|
|
69
66
|
};
|
|
@@ -5,18 +5,17 @@
|
|
|
5
5
|
import React, { useCallback, useMemo } from 'react';
|
|
6
6
|
|
|
7
7
|
import {
|
|
8
|
-
|
|
8
|
+
Capabilities,
|
|
9
9
|
LayoutAction,
|
|
10
|
+
createIntent,
|
|
10
11
|
useCapability,
|
|
11
12
|
useCapabilities,
|
|
12
13
|
useIntentDispatcher,
|
|
13
|
-
Capabilities,
|
|
14
14
|
} from '@dxos/app-framework';
|
|
15
|
-
import { Filter, Obj, Query } from '@dxos/echo';
|
|
16
|
-
import { RelationSourceId } from '@dxos/echo-schema';
|
|
15
|
+
import { Filter, Obj, Query, Relation } from '@dxos/echo';
|
|
17
16
|
import { fullyQualifiedId, getSpace, useQuery } from '@dxos/react-client/echo';
|
|
18
17
|
import { useIdentity } from '@dxos/react-client/halo';
|
|
19
|
-
import { useTranslation } from '@dxos/react-ui';
|
|
18
|
+
import { useThemeContext, useTranslation } from '@dxos/react-ui';
|
|
20
19
|
import { useAttended } from '@dxos/react-ui-attention';
|
|
21
20
|
import { StackItem } from '@dxos/react-ui-stack';
|
|
22
21
|
import { Tabs } from '@dxos/react-ui-tabs';
|
|
@@ -31,9 +30,12 @@ export const ThreadComplementary = ({ subject }: { subject: any }) => {
|
|
|
31
30
|
const { dispatchPromise: dispatch } = useIntentDispatcher();
|
|
32
31
|
const identity = useIdentity();
|
|
33
32
|
const { t } = useTranslation(THREAD_PLUGIN);
|
|
33
|
+
const { tx } = useThemeContext();
|
|
34
|
+
const subjectId = fullyQualifiedId(subject);
|
|
34
35
|
|
|
35
36
|
const { state, getViewState } = useCapability(ThreadCapabilities.MutableState);
|
|
36
|
-
const
|
|
37
|
+
const drafts = state.drafts[subjectId];
|
|
38
|
+
const viewState = useMemo(() => getViewState(subjectId), [getViewState, subjectId]);
|
|
37
39
|
const { showResolvedThreads } = viewState;
|
|
38
40
|
const onChangeViewState = useCallback(
|
|
39
41
|
(nextValue: string) => {
|
|
@@ -41,7 +43,6 @@ export const ThreadComplementary = ({ subject }: { subject: any }) => {
|
|
|
41
43
|
},
|
|
42
44
|
[viewState],
|
|
43
45
|
);
|
|
44
|
-
const drafts = state.drafts[fullyQualifiedId(subject)];
|
|
45
46
|
|
|
46
47
|
const anchorSorts = useCapabilities(Capabilities.AnchorSort);
|
|
47
48
|
const sort = useMemo(
|
|
@@ -53,15 +54,14 @@ export const ThreadComplementary = ({ subject }: { subject: any }) => {
|
|
|
53
54
|
const objectsAnchoredTo = useQuery(space, Query.select(Filter.ids(subject.id)).targetOf(AnchoredTo));
|
|
54
55
|
const anchors = objectsAnchoredTo
|
|
55
56
|
.toSorted((a, b) => sort?.(a, b) ?? 0)
|
|
56
|
-
.filter((anchor) => Obj.instanceOf(ThreadType, anchor
|
|
57
|
+
.filter((anchor) => Obj.instanceOf(ThreadType, Relation.getSource(anchor)))
|
|
57
58
|
.concat(drafts ?? []);
|
|
58
59
|
|
|
59
60
|
const attended = useAttended();
|
|
60
|
-
const qualifiedSubjectId = fullyQualifiedId(subject);
|
|
61
61
|
|
|
62
62
|
const handleAttend = useCallback(
|
|
63
63
|
(anchor: AnchoredTo) => {
|
|
64
|
-
const thread = anchor
|
|
64
|
+
const thread = Relation.getSource(anchor) as ThreadType;
|
|
65
65
|
const threadId = fullyQualifiedId(thread);
|
|
66
66
|
|
|
67
67
|
if (state.current !== threadId) {
|
|
@@ -91,7 +91,7 @@ export const ThreadComplementary = ({ subject }: { subject: any }) => {
|
|
|
91
91
|
createIntent(ThreadAction.AddMessage, { anchor, subject, sender: { identityDid: identity?.did }, text }),
|
|
92
92
|
);
|
|
93
93
|
|
|
94
|
-
const thread = anchor
|
|
94
|
+
const thread = Relation.getSource(anchor) as ThreadType;
|
|
95
95
|
state.current = fullyQualifiedId(thread);
|
|
96
96
|
},
|
|
97
97
|
[dispatch, identity, subject],
|
|
@@ -99,7 +99,7 @@ export const ThreadComplementary = ({ subject }: { subject: any }) => {
|
|
|
99
99
|
|
|
100
100
|
const handleResolve = useCallback(
|
|
101
101
|
(anchor: AnchoredTo) =>
|
|
102
|
-
dispatch(createIntent(ThreadAction.ToggleResolved, { thread: anchor
|
|
102
|
+
dispatch(createIntent(ThreadAction.ToggleResolved, { thread: Relation.getSource(anchor) as ThreadType })),
|
|
103
103
|
[dispatch],
|
|
104
104
|
);
|
|
105
105
|
|
|
@@ -117,7 +117,7 @@ export const ThreadComplementary = ({ subject }: { subject: any }) => {
|
|
|
117
117
|
const comments = (
|
|
118
118
|
<CommentsContainer
|
|
119
119
|
anchors={anchors}
|
|
120
|
-
currentId={attended.includes(
|
|
120
|
+
currentId={attended.includes(subjectId) ? state.current : undefined}
|
|
121
121
|
showResolvedThreads={showResolvedThreads}
|
|
122
122
|
onAttend={handleAttend}
|
|
123
123
|
onComment={handleComment}
|
|
@@ -131,12 +131,11 @@ export const ThreadComplementary = ({ subject }: { subject: any }) => {
|
|
|
131
131
|
<StackItem.Content toolbar>
|
|
132
132
|
<Tabs.Root
|
|
133
133
|
value={showResolvedThreads ? 'all' : 'unresolved'}
|
|
134
|
-
onValueChange={onChangeViewState}
|
|
135
134
|
orientation='horizontal'
|
|
136
135
|
classNames='contents [&_[role="tabpanel"]]:min-bs-0 [&_[role="tabpanel"]]:overflow-y-auto [&_[role="tabpanel"]]:scrollbar-thin'
|
|
136
|
+
onValueChange={onChangeViewState}
|
|
137
137
|
>
|
|
138
|
-
{
|
|
139
|
-
<Tabs.Tablist classNames='p-1 gap-1 overflow-y-hidden border-be border-subduedSeparator'>
|
|
138
|
+
<Tabs.Tablist classNames={tx('toolbar.root', 'toolbar', {})}>
|
|
140
139
|
<Tabs.Tab value='unresolved' classNames='text-sm'>
|
|
141
140
|
{t('show unresolved label')}
|
|
142
141
|
</Tabs.Tab>
|
|
@@ -7,8 +7,7 @@ import { EditorView } from '@codemirror/view';
|
|
|
7
7
|
import { computed, effect } from '@preact/signals-core';
|
|
8
8
|
|
|
9
9
|
import { createIntent, type PromiseIntentDispatcher } from '@dxos/app-framework';
|
|
10
|
-
import { Filter, Obj, Query } from '@dxos/echo';
|
|
11
|
-
import { RelationSourceId } from '@dxos/echo-schema';
|
|
10
|
+
import { Filter, Obj, Query, Relation } from '@dxos/echo';
|
|
12
11
|
import { type DocumentType } from '@dxos/plugin-markdown/types';
|
|
13
12
|
import { getSpace, getTextInRange, createDocAccessor, fullyQualifiedId, getSource } from '@dxos/react-client/echo';
|
|
14
13
|
import { comments, createExternalCommentSync } from '@dxos/react-ui-editor';
|
|
@@ -41,7 +40,7 @@ export const threads = (state: ThreadState, doc?: DocumentType, dispatch?: Promi
|
|
|
41
40
|
const anchors = computed(() =>
|
|
42
41
|
query.objects
|
|
43
42
|
.filter((anchor) => {
|
|
44
|
-
const thread = anchor
|
|
43
|
+
const thread = Relation.getSource(anchor);
|
|
45
44
|
return Obj.instanceOf(ThreadType, thread) && thread.status !== 'resolved';
|
|
46
45
|
})
|
|
47
46
|
.concat(state.drafts[fullyQualifiedId(doc)] ?? []),
|
|
@@ -61,7 +60,7 @@ export const threads = (state: ThreadState, doc?: DocumentType, dispatch?: Promi
|
|
|
61
60
|
// Only update if the name has changed, otherwise this will cause an infinite loop.
|
|
62
61
|
// Skip if the name is empty; this means comment text was deleted, but thread name should remain.
|
|
63
62
|
const name = getName(doc, anchor.anchor);
|
|
64
|
-
const thread = anchor
|
|
63
|
+
const thread = Relation.getSource(anchor) as ThreadType;
|
|
65
64
|
if (name && name !== thread.name) {
|
|
66
65
|
thread.name = name;
|
|
67
66
|
}
|
|
@@ -76,7 +75,7 @@ export const threads = (state: ThreadState, doc?: DocumentType, dispatch?: Promi
|
|
|
76
75
|
() =>
|
|
77
76
|
anchors.value
|
|
78
77
|
.filter((anchor) => anchor.anchor)
|
|
79
|
-
.map((anchor) => ({ id: fullyQualifiedId(anchor
|
|
78
|
+
.map((anchor) => ({ id: fullyQualifiedId(Relation.getSource(anchor)), cursor: anchor.anchor })),
|
|
80
79
|
),
|
|
81
80
|
|
|
82
81
|
comments({
|
|
@@ -102,7 +101,7 @@ export const threads = (state: ThreadState, doc?: DocumentType, dispatch?: Promi
|
|
|
102
101
|
onUpdate: ({ id, cursor }) => {
|
|
103
102
|
const draft = state.drafts[fullyQualifiedId(doc)]?.find((thread) => fullyQualifiedId(thread) === id);
|
|
104
103
|
if (draft) {
|
|
105
|
-
const thread = draft
|
|
104
|
+
const thread = Relation.getSource(draft) as ThreadType;
|
|
106
105
|
thread.name = getName(doc, cursor);
|
|
107
106
|
draft.anchor = cursor;
|
|
108
107
|
}
|
package/src/translations.ts
CHANGED
|
@@ -2,14 +2,19 @@
|
|
|
2
2
|
// Copyright 2023 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
+
import { Type } from '@dxos/echo';
|
|
6
|
+
|
|
5
7
|
import { THREAD_PLUGIN } from './meta';
|
|
6
8
|
import { ChannelType } from './types';
|
|
7
9
|
|
|
8
10
|
export default [
|
|
9
11
|
{
|
|
10
12
|
'en-US': {
|
|
11
|
-
[ChannelType
|
|
13
|
+
[Type.getTypename(ChannelType)]: {
|
|
12
14
|
'typename label': 'Channel',
|
|
15
|
+
'typename label_zero': 'Channels',
|
|
16
|
+
'typename label_one': 'Channel',
|
|
17
|
+
'typename label_other': 'Channels',
|
|
13
18
|
'object name placeholder': 'New channel',
|
|
14
19
|
},
|
|
15
20
|
[THREAD_PLUGIN]: {
|
|
@@ -39,7 +44,7 @@ export default [
|
|
|
39
44
|
'open comments panel label': 'Show Comments',
|
|
40
45
|
'comments label': 'Comments',
|
|
41
46
|
'show all label': 'All comments',
|
|
42
|
-
'show unresolved label': 'Unresolved
|
|
47
|
+
'show unresolved label': 'Unresolved comments',
|
|
43
48
|
|
|
44
49
|
'channel companion label': 'Channel',
|
|
45
50
|
'call panel label': 'Active Call',
|