@dxos/plugin-thread 0.6.13-main.548ca8d → 0.6.13-main.ed424a1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (36) hide show
  1. package/dist/lib/browser/{ThreadArticle-GBPIH47W.mjs → ThreadArticle-53PBPWLD.mjs} +2 -2
  2. package/dist/lib/browser/{ThreadMain-PGF7W5EV.mjs → ThreadMain-FZAZVPHO.mjs} +2 -2
  3. package/dist/lib/browser/{chunk-O4YRHIZC.mjs → chunk-DIFHKCVY.mjs} +1 -1
  4. package/dist/lib/browser/{chunk-O4YRHIZC.mjs.map → chunk-DIFHKCVY.mjs.map} +2 -2
  5. package/dist/lib/browser/index.mjs +4 -4
  6. package/dist/lib/browser/index.mjs.map +3 -3
  7. package/dist/lib/browser/meta.json +1 -1
  8. package/dist/lib/node/{ThreadArticle-GH5UBWFU.cjs → ThreadArticle-UORKW5YD.cjs} +6 -6
  9. package/dist/lib/node/{ThreadMain-CO6I3DNX.cjs → ThreadMain-FVSLLIWS.cjs} +6 -6
  10. package/dist/lib/node/{chunk-FDYRG7HE.cjs → chunk-FK2N2QH7.cjs} +4 -4
  11. package/dist/lib/node/{chunk-FDYRG7HE.cjs.map → chunk-FK2N2QH7.cjs.map} +2 -2
  12. package/dist/lib/node/index.cjs +56 -56
  13. package/dist/lib/node/index.cjs.map +3 -3
  14. package/dist/lib/node/meta.json +1 -1
  15. package/dist/lib/node-esm/{ThreadArticle-ZTYD52TR.mjs → ThreadArticle-E4MLJZIM.mjs} +2 -2
  16. package/dist/lib/node-esm/{ThreadMain-LEHGOF7R.mjs → ThreadMain-Y6JU6S7A.mjs} +2 -2
  17. package/dist/lib/node-esm/{chunk-XOVJ65DG.mjs → chunk-SJEUDBZV.mjs} +1 -1
  18. package/dist/lib/node-esm/{chunk-XOVJ65DG.mjs.map → chunk-SJEUDBZV.mjs.map} +2 -2
  19. package/dist/lib/node-esm/index.mjs +4 -4
  20. package/dist/lib/node-esm/index.mjs.map +3 -3
  21. package/dist/lib/node-esm/meta.json +1 -1
  22. package/dist/types/src/components/MessageContainer.d.ts.map +1 -1
  23. package/dist/types/src/components/index.d.ts +1 -1
  24. package/dist/types/src/components/testing.d.ts.map +1 -1
  25. package/dist/types/src/components/types.d.ts +2 -2
  26. package/dist/types/src/components/types.d.ts.map +1 -1
  27. package/package.json +28 -28
  28. package/src/ThreadPlugin.tsx +1 -1
  29. package/src/components/MessageContainer.tsx +1 -2
  30. package/src/components/types.ts +2 -2
  31. /package/dist/lib/browser/{ThreadArticle-GBPIH47W.mjs.map → ThreadArticle-53PBPWLD.mjs.map} +0 -0
  32. /package/dist/lib/browser/{ThreadMain-PGF7W5EV.mjs.map → ThreadMain-FZAZVPHO.mjs.map} +0 -0
  33. /package/dist/lib/node/{ThreadArticle-GH5UBWFU.cjs.map → ThreadArticle-UORKW5YD.cjs.map} +0 -0
  34. /package/dist/lib/node/{ThreadMain-CO6I3DNX.cjs.map → ThreadMain-FVSLLIWS.cjs.map} +0 -0
  35. /package/dist/lib/node-esm/{ThreadArticle-ZTYD52TR.mjs.map → ThreadArticle-E4MLJZIM.mjs.map} +0 -0
  36. /package/dist/lib/node-esm/{ThreadMain-LEHGOF7R.mjs.map → ThreadMain-Y6JU6S7A.mjs.map} +0 -0
@@ -31,17 +31,16 @@ __export(node_exports, {
31
31
  ThreadAction: () => import_chunk_FOZUQZF4.ThreadAction,
32
32
  ThreadPlugin: () => ThreadPlugin,
33
33
  default: () => src_default,
34
- useAnalyticsCallback: () => import_chunk_FDYRG7HE.useAnalyticsCallback,
35
- useOnEditAnalytics: () => import_chunk_FDYRG7HE.useOnEditAnalytics,
36
- useStatus: () => import_chunk_FDYRG7HE.useStatus
34
+ useAnalyticsCallback: () => import_chunk_FK2N2QH7.useAnalyticsCallback,
35
+ useOnEditAnalytics: () => import_chunk_FK2N2QH7.useOnEditAnalytics,
36
+ useStatus: () => import_chunk_FK2N2QH7.useStatus
37
37
  });
38
38
  module.exports = __toCommonJS(node_exports);
39
39
  var import_chunk_FOZUQZF4 = require("./chunk-FOZUQZF4.cjs");
40
- var import_chunk_FDYRG7HE = require("./chunk-FDYRG7HE.cjs");
40
+ var import_chunk_FK2N2QH7 = require("./chunk-FK2N2QH7.cjs");
41
41
  var import_chunk_JIJ7Z6NO = require("./chunk-JIJ7Z6NO.cjs");
42
42
  var import_react = __toESM(require("react"));
43
43
  var import_app_framework = require("@dxos/app-framework");
44
- var import_echo_schema = require("@dxos/echo-schema");
45
44
  var import_local_storage = require("@dxos/local-storage");
46
45
  var import_log = require("@dxos/log");
47
46
  var import_plugin_client = require("@dxos/plugin-client");
@@ -50,13 +49,14 @@ var import_meta = require("@dxos/plugin-observability/meta");
50
49
  var import_plugin_space = require("@dxos/plugin-space");
51
50
  var import_types = require("@dxos/plugin-space/types");
52
51
  var import_echo = require("@dxos/react-client/echo");
52
+ var import_echo2 = require("@dxos/react-client/echo");
53
53
  var import_react_ui_thread = require("@dxos/react-ui-thread");
54
54
  var import_react2 = __toESM(require("react"));
55
55
  var import_react3 = require("@phosphor-icons/react");
56
56
  var import_react4 = __toESM(require("react"));
57
- var import_echo_schema2 = require("@dxos/echo-schema");
57
+ var import_echo_schema = require("@dxos/echo-schema");
58
58
  var import_types2 = require("@dxos/plugin-space/types");
59
- var import_echo2 = require("@dxos/react-client/echo");
59
+ var import_echo3 = require("@dxos/react-client/echo");
60
60
  var import_halo = require("@dxos/react-client/halo");
61
61
  var import_react_ui = require("@dxos/react-ui");
62
62
  var import_react_ui_editor = require("@dxos/react-ui-editor");
@@ -65,12 +65,12 @@ var import_react_ui_thread2 = require("@dxos/react-ui-thread");
65
65
  var import_util = require("@dxos/util");
66
66
  var import_react5 = require("@phosphor-icons/react");
67
67
  var import_react6 = __toESM(require("react"));
68
- var import_echo3 = require("@dxos/react-client/echo");
68
+ var import_echo4 = require("@dxos/react-client/echo");
69
69
  var import_react_ui2 = require("@dxos/react-ui");
70
70
  var import_react_ui_theme2 = require("@dxos/react-ui-theme");
71
71
  var import_react7 = __toESM(require("react"));
72
72
  var import_app_framework2 = require("@dxos/app-framework");
73
- var import_echo4 = require("@dxos/react-client/echo");
73
+ var import_echo5 = require("@dxos/react-client/echo");
74
74
  var import_react_ui3 = require("@dxos/react-ui");
75
75
  var import_react_ui_attention = require("@dxos/react-ui-attention");
76
76
  var import_util2 = require("@dxos/util");
@@ -80,7 +80,7 @@ var import_react_ui4 = require("@dxos/react-ui");
80
80
  var import_view = require("@codemirror/view");
81
81
  var import_signals_core = require("@preact/signals-core");
82
82
  var import_types3 = require("@dxos/plugin-space/types");
83
- var import_echo5 = require("@dxos/react-client/echo");
83
+ var import_echo6 = require("@dxos/react-client/echo");
84
84
  var import_react_ui_editor2 = require("@dxos/react-ui-editor");
85
85
  var import_util3 = require("@dxos/util");
86
86
  var sizeClass = (0, import_react_ui_theme.getSize)(4);
@@ -131,13 +131,13 @@ var DeleteThreadButton = ({ onDelete }) => {
131
131
  };
132
132
  var CommentContainer = ({ thread, detached, context, current, onAttend, onThreadDelete, onMessageDelete, onResolve, onComment }) => {
133
133
  const identity = (0, import_halo.useIdentity)();
134
- const space = (0, import_echo2.getSpace)(thread);
135
- const members = (0, import_echo2.useMembers)(space?.key);
136
- const activity = (0, import_chunk_FDYRG7HE.useStatus)(space, (0, import_echo2.fullyQualifiedId)(thread));
134
+ const space = (0, import_echo3.getSpace)(thread);
135
+ const members = (0, import_echo3.useMembers)(space?.key);
136
+ const activity = (0, import_chunk_FK2N2QH7.useStatus)(space, (0, import_echo3.fullyQualifiedId)(thread));
137
137
  const { t } = (0, import_react_ui.useTranslation)(import_chunk_JIJ7Z6NO.THREAD_PLUGIN);
138
138
  const threadScrollRef = (0, import_react4.useRef)(null);
139
139
  const { themeMode } = (0, import_react_ui.useThemeContext)();
140
- const textboxMetadata = (0, import_chunk_FDYRG7HE.getMessageMetadata)((0, import_echo2.fullyQualifiedId)(thread), identity);
140
+ const textboxMetadata = (0, import_chunk_FK2N2QH7.getMessageMetadata)((0, import_echo3.fullyQualifiedId)(thread), identity);
141
141
  const [_count, _setCount] = (0, import_react4.useState)(0);
142
142
  const rerenderEditor = () => _setCount((count) => count + 1);
143
143
  const messageRef = (0, import_react4.useRef)("");
@@ -151,7 +151,7 @@ var CommentContainer = ({ thread, detached, context, current, onAttend, onThread
151
151
  (0, import_react_ui_editor.listener)({
152
152
  onChange: (text) => messageRef.current = text
153
153
  }),
154
- import_chunk_FDYRG7HE.command
154
+ import_chunk_FK2N2QH7.command
155
155
  ], [
156
156
  _count
157
157
  ]);
@@ -163,7 +163,7 @@ var CommentContainer = ({ thread, detached, context, current, onAttend, onThread
163
163
  if (!messageRef.current) {
164
164
  return false;
165
165
  }
166
- thread.messages.push((0, import_echo_schema2.create)(import_types2.MessageType, {
166
+ thread.messages.push((0, import_echo_schema.create)(import_types2.MessageType, {
167
167
  sender: {
168
168
  identityKey: identity.identityKey.toHex()
169
169
  },
@@ -184,7 +184,7 @@ var CommentContainer = ({ thread, detached, context, current, onAttend, onThread
184
184
  onClickCapture: onAttend,
185
185
  onFocusCapture: onAttend,
186
186
  current,
187
- id: (0, import_echo2.fullyQualifiedId)(thread)
187
+ id: (0, import_echo3.fullyQualifiedId)(thread)
188
188
  }, /* @__PURE__ */ import_react4.default.createElement("div", {
189
189
  role: "none",
190
190
  className: (0, import_react_ui_theme.mx)("col-span-2 grid grid-cols-[var(--rail-size)_1fr_min-content]", import_react_ui_theme.hoverableControls, import_react_ui_theme.hoverableFocusedWithinControls)
@@ -204,7 +204,7 @@ var CommentContainer = ({ thread, detached, context, current, onAttend, onThread
204
204
  onResolve
205
205
  }), onThreadDelete && /* @__PURE__ */ import_react4.default.createElement(DeleteThreadButton, {
206
206
  onDelete: onThreadDelete
207
- }))), thread.messages.filter(import_util.nonNullable).map((message) => /* @__PURE__ */ import_react4.default.createElement(import_chunk_FDYRG7HE.MessageContainer, {
207
+ }))), thread.messages.filter(import_util.nonNullable).map((message) => /* @__PURE__ */ import_react4.default.createElement(import_chunk_FK2N2QH7.MessageContainer, {
208
208
  key: message.id,
209
209
  message,
210
210
  members,
@@ -235,7 +235,7 @@ var CommentsContainer = ({ threads: threads2, detached = [], currentId, showReso
235
235
  currentId
236
236
  ]);
237
237
  return /* @__PURE__ */ import_react6.default.createElement(import_react6.default.Fragment, null, filteredThreads.length > 0 ? filteredThreads.map((thread) => {
238
- const threadId = (0, import_echo3.fullyQualifiedId)(thread);
238
+ const threadId = (0, import_echo4.fullyQualifiedId)(thread);
239
239
  return /* @__PURE__ */ import_react6.default.createElement(CommentContainer, {
240
240
  key: threadId,
241
241
  thread,
@@ -292,7 +292,7 @@ var ThreadComplementary = ({ role, subject, drafts, current, showResolvedThreads
292
292
  JSON.stringify(drafts)
293
293
  ]);
294
294
  const detachedIds = (0, import_react7.useMemo)(() => {
295
- return threads2.filter(({ anchor }) => !anchor).map((thread) => (0, import_echo4.fullyQualifiedId)(thread));
295
+ return threads2.filter(({ anchor }) => !anchor).map((thread) => (0, import_echo5.fullyQualifiedId)(thread));
296
296
  }, [
297
297
  threads2
298
298
  ]);
@@ -306,7 +306,7 @@ var ThreadComplementary = ({ role, subject, drafts, current, showResolvedThreads
306
306
  threads2
307
307
  ]);
308
308
  const attended = (0, import_react_ui_attention.useAttended)();
309
- const qualifiedSubjectId = (0, import_echo4.fullyQualifiedId)(subject);
309
+ const qualifiedSubjectId = (0, import_echo5.fullyQualifiedId)(subject);
310
310
  return /* @__PURE__ */ import_react7.default.createElement("div", {
311
311
  role: "none",
312
312
  className: "contents"
@@ -318,14 +318,14 @@ var ThreadComplementary = ({ role, subject, drafts, current, showResolvedThreads
318
318
  currentId: attended.includes(qualifiedSubjectId) ? current : void 0,
319
319
  showResolvedThreads,
320
320
  onThreadAttend: (thread) => {
321
- const threadId = (0, import_echo4.fullyQualifiedId)(thread);
321
+ const threadId = (0, import_echo5.fullyQualifiedId)(thread);
322
322
  if (current !== threadId) {
323
323
  current = threadId;
324
324
  void dispatch?.([
325
325
  {
326
326
  action: import_app_framework2.LayoutAction.SCROLL_INTO_VIEW,
327
327
  data: {
328
- id: (0, import_echo4.fullyQualifiedId)(subject),
328
+ id: (0, import_echo5.fullyQualifiedId)(subject),
329
329
  thread: threadId,
330
330
  cursor: thread.anchor
331
331
  }
@@ -382,18 +382,18 @@ var ThreadSettings = ({ settings }) => {
382
382
  onCheckedChange: (checked) => settings.standalone = !!checked
383
383
  })));
384
384
  };
385
- var ThreadMain = import_react2.default.lazy(() => import("./ThreadMain-CO6I3DNX.cjs"));
386
- var ThreadArticle = import_react2.default.lazy(() => import("./ThreadArticle-GH5UBWFU.cjs"));
385
+ var ThreadMain = import_react2.default.lazy(() => import("./ThreadMain-FVSLLIWS.cjs"));
386
+ var ThreadArticle = import_react2.default.lazy(() => import("./ThreadArticle-UORKW5YD.cjs"));
387
387
  var getName = (doc, anchor) => {
388
388
  if (doc.content) {
389
389
  const [start, end] = anchor.split(":");
390
- return (0, import_echo5.getTextInRange)((0, import_echo5.createDocAccessor)(doc.content, [
390
+ return (0, import_echo6.getTextInRange)((0, import_echo6.createDocAccessor)(doc.content, [
391
391
  "content"
392
392
  ]), start, end);
393
393
  }
394
394
  };
395
395
  var threads = (state, doc, dispatch) => {
396
- const space = doc && (0, import_echo5.getSpace)(doc);
396
+ const space = doc && (0, import_echo6.getSpace)(doc);
397
397
  if (!doc || !space || !dispatch) {
398
398
  return [
399
399
  (0, import_react_ui_editor2.comments)()
@@ -401,7 +401,7 @@ var threads = (state, doc, dispatch) => {
401
401
  }
402
402
  const threads2 = (0, import_signals_core.computed)(() => [
403
403
  ...doc.threads.filter(import_util3.nonNullable),
404
- ...state.drafts[(0, import_echo5.fullyQualifiedId)(doc)] ?? []
404
+ ...state.drafts[(0, import_echo6.fullyQualifiedId)(doc)] ?? []
405
405
  ].filter((thread) => !(thread?.status === "resolved")));
406
406
  return [
407
407
  import_view.EditorView.updateListener.of((update) => {
@@ -416,12 +416,12 @@ var threads = (state, doc, dispatch) => {
416
416
  });
417
417
  }
418
418
  }),
419
- (0, import_react_ui_editor2.createExternalCommentSync)((0, import_echo5.fullyQualifiedId)(doc), (sink) => (0, import_signals_core.effect)(() => sink()), () => threads2.value.filter((thread) => thread?.anchor).map((thread) => ({
420
- id: (0, import_echo5.fullyQualifiedId)(thread),
419
+ (0, import_react_ui_editor2.createExternalCommentSync)((0, import_echo6.fullyQualifiedId)(doc), (sink) => (0, import_signals_core.effect)(() => sink()), () => threads2.value.filter((thread) => thread?.anchor).map((thread) => ({
420
+ id: (0, import_echo6.fullyQualifiedId)(thread),
421
421
  cursor: thread.anchor
422
422
  }))),
423
423
  (0, import_react_ui_editor2.comments)({
424
- id: (0, import_echo5.fullyQualifiedId)(doc),
424
+ id: (0, import_echo6.fullyQualifiedId)(doc),
425
425
  onCreate: ({ cursor }) => {
426
426
  const name = getName(doc, cursor);
427
427
  void dispatch({
@@ -434,9 +434,9 @@ var threads = (state, doc, dispatch) => {
434
434
  });
435
435
  },
436
436
  onDelete: ({ id }) => {
437
- const draft = state.drafts[(0, import_echo5.fullyQualifiedId)(doc)];
437
+ const draft = state.drafts[(0, import_echo6.fullyQualifiedId)(doc)];
438
438
  if (draft) {
439
- const index = draft.findIndex((thread2) => (0, import_echo5.fullyQualifiedId)(thread2) === id);
439
+ const index = draft.findIndex((thread2) => (0, import_echo6.fullyQualifiedId)(thread2) === id);
440
440
  if (index !== -1) {
441
441
  draft.splice(index, 1);
442
442
  }
@@ -447,7 +447,7 @@ var threads = (state, doc, dispatch) => {
447
447
  }
448
448
  },
449
449
  onUpdate: ({ id, cursor }) => {
450
- const thread = state.drafts[(0, import_echo5.fullyQualifiedId)(doc)]?.find((thread2) => (0, import_echo5.fullyQualifiedId)(thread2) === id) ?? doc.threads.find((thread2) => thread2?.id === id);
450
+ const thread = state.drafts[(0, import_echo6.fullyQualifiedId)(doc)]?.find((thread2) => (0, import_echo6.fullyQualifiedId)(thread2) === id) ?? doc.threads.find((thread2) => thread2?.id === id);
451
451
  if (thread instanceof import_types3.ThreadType && thread.anchor) {
452
452
  thread.name = getName(doc, thread.anchor);
453
453
  thread.anchor = cursor;
@@ -505,10 +505,10 @@ var initialViewState = {
505
505
  };
506
506
  var ThreadPlugin = () => {
507
507
  const settings = new import_local_storage.LocalStorageStore(import_chunk_JIJ7Z6NO.THREAD_PLUGIN);
508
- const state = (0, import_echo_schema.create)({
508
+ const state = (0, import_echo.create)({
509
509
  drafts: {}
510
510
  });
511
- const viewStore = (0, import_echo_schema.create)({});
511
+ const viewStore = (0, import_echo.create)({});
512
512
  const getViewState = (subjectId) => {
513
513
  if (!viewStore[subjectId]) {
514
514
  viewStore[subjectId] = {
@@ -548,11 +548,11 @@ var ThreadPlugin = () => {
548
548
  ],
549
549
  icon: "ph--chat--regular",
550
550
  // TODO(wittjosiah): Move out of metadata.
551
- loadReferences: (channel) => (0, import_echo.loadObjectReferences)(channel, (channel2) => channel2.threads)
551
+ loadReferences: (channel) => (0, import_echo2.loadObjectReferences)(channel, (channel2) => channel2.threads)
552
552
  },
553
553
  [import_types.ThreadType.typename]: {
554
554
  // TODO(wittjosiah): Move out of metadata.
555
- loadReferences: (thread) => (0, import_echo.loadObjectReferences)(thread, (thread2) => thread2.messages)
555
+ loadReferences: (thread) => (0, import_echo2.loadObjectReferences)(thread, (thread2) => thread2.messages)
556
556
  },
557
557
  [import_types.MessageType.typename]: {
558
558
  // TODO(wittjosiah): Move out of metadata.
@@ -606,7 +606,7 @@ var ThreadPlugin = () => {
606
606
  return;
607
607
  }
608
608
  const [subjectId] = id.split("~");
609
- const [spaceId, objectId] = (0, import_echo.parseFullyQualifiedId)(subjectId);
609
+ const [spaceId, objectId] = (0, import_echo2.parseFullyQualifiedId)(subjectId);
610
610
  const space = client.spaces.get().find((space2) => space2.id === spaceId);
611
611
  const object = (0, import_plugin_graph.toSignal)((onChange) => {
612
612
  const timeout = setTimeout(async () => {
@@ -618,7 +618,7 @@ var ThreadPlugin = () => {
618
618
  if (!object || !subjectId) {
619
619
  return;
620
620
  }
621
- const meta = metadataResolver((0, import_echo_schema.getTypename)(object) ?? "");
621
+ const meta = metadataResolver((0, import_echo.getTypename)(object) ?? "");
622
622
  const label = meta.label?.(object) || object.name || meta.placeholder || [
623
623
  "unnamed object threads label",
624
624
  {
@@ -751,7 +751,7 @@ var ThreadPlugin = () => {
751
751
  const currentPosition = layoutEntries.findIndex((entry) => channel.id === entry.id);
752
752
  if (currentPosition > 0) {
753
753
  const objectToTheLeft = layoutEntries[currentPosition - 1];
754
- const context = (0, import_echo.getSpace)(data.object)?.db.getObjectById(objectToTheLeft.id);
754
+ const context = (0, import_echo2.getSpace)(data.object)?.db.getObjectById(objectToTheLeft.id);
755
755
  return /* @__PURE__ */ import_react.default.createElement(ThreadArticle, {
756
756
  thread: data.object.threads[0],
757
757
  context
@@ -763,9 +763,9 @@ var ThreadPlugin = () => {
763
763
  });
764
764
  }
765
765
  if (data.subject instanceof import_types.ThreadType) {
766
- return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement(import_chunk_FDYRG7HE.ChatHeading, {
766
+ return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement(import_chunk_FK2N2QH7.ChatHeading, {
767
767
  attendableId: data.subject.id
768
- }), /* @__PURE__ */ import_react.default.createElement(import_chunk_FDYRG7HE.ChatContainer, {
768
+ }), /* @__PURE__ */ import_react.default.createElement(import_chunk_FK2N2QH7.ChatContainer, {
769
769
  thread: data.subject
770
770
  }));
771
771
  }
@@ -773,11 +773,11 @@ var ThreadPlugin = () => {
773
773
  }
774
774
  case "complementary--comments": {
775
775
  if (data.subject && typeof data.subject === "object" && "threads" in data.subject && Array.isArray(data.subject.threads)) {
776
- const { showResolvedThreads } = getViewState((0, import_echo.fullyQualifiedId)(data.subject));
776
+ const { showResolvedThreads } = getViewState((0, import_echo2.fullyQualifiedId)(data.subject));
777
777
  return /* @__PURE__ */ import_react.default.createElement(ThreadComplementary, {
778
778
  role,
779
779
  subject: data.subject,
780
- drafts: state.drafts[(0, import_echo.fullyQualifiedId)(data.subject)],
780
+ drafts: state.drafts[(0, import_echo2.fullyQualifiedId)(data.subject)],
781
781
  current: state.current,
782
782
  showResolvedThreads
783
783
  });
@@ -807,8 +807,8 @@ var ThreadPlugin = () => {
807
807
  return;
808
808
  }
809
809
  }
810
- const subjectId = (0, import_echo.fullyQualifiedId)(subject);
811
- const thread = (0, import_echo_schema.create)(import_types.ThreadType, {
810
+ const subjectId = (0, import_echo2.fullyQualifiedId)(subject);
811
+ const thread = (0, import_echo.create)(import_types.ThreadType, {
812
812
  name,
813
813
  anchor: cursor,
814
814
  messages: [],
@@ -829,7 +829,7 @@ var ThreadPlugin = () => {
829
829
  {
830
830
  action: import_chunk_FOZUQZF4.ThreadAction.SELECT,
831
831
  data: {
832
- current: (0, import_echo.fullyQualifiedId)(thread)
832
+ current: (0, import_echo2.fullyQualifiedId)(thread)
833
833
  }
834
834
  }
835
835
  ],
@@ -847,9 +847,9 @@ var ThreadPlugin = () => {
847
847
  };
848
848
  } else {
849
849
  return {
850
- data: (0, import_echo_schema.create)(import_types.ChannelType, {
850
+ data: (0, import_echo.create)(import_types.ChannelType, {
851
851
  threads: [
852
- (0, import_echo_schema.create)(import_types.ThreadType, {
852
+ (0, import_echo.create)(import_types.ThreadType, {
853
853
  messages: []
854
854
  })
855
855
  ]
@@ -885,7 +885,7 @@ var ThreadPlugin = () => {
885
885
  } else if (thread.status === "resolved") {
886
886
  thread.status = "active";
887
887
  }
888
- const space = (0, import_echo.getSpace)(thread);
888
+ const space = (0, import_echo2.getSpace)(thread);
889
889
  const spaceId = space?.id;
890
890
  return {
891
891
  data: true,
@@ -910,7 +910,7 @@ var ThreadPlugin = () => {
910
910
  if (!(thread instanceof import_types.ThreadType) || !(subject && typeof subject === "object" && "threads" in subject)) {
911
911
  return;
912
912
  }
913
- const subjectId = (0, import_echo.fullyQualifiedId)(subject);
913
+ const subjectId = (0, import_echo2.fullyQualifiedId)(subject);
914
914
  const draft = state.drafts[subjectId];
915
915
  if (draft) {
916
916
  const index = draft.findIndex((t) => t.id === thread.id);
@@ -921,7 +921,7 @@ var ThreadPlugin = () => {
921
921
  };
922
922
  }
923
923
  }
924
- const space = (0, import_echo.getSpace)(thread);
924
+ const space = (0, import_echo2.getSpace)(thread);
925
925
  if (!space || !subject.threads) {
926
926
  return;
927
927
  }
@@ -982,8 +982,8 @@ var ThreadPlugin = () => {
982
982
  if (!(thread instanceof import_types.ThreadType) || !(subject && typeof subject === "object" && "threads" in subject && Array.isArray(subject.threads))) {
983
983
  return;
984
984
  }
985
- const subjectId = (0, import_echo.fullyQualifiedId)(subject);
986
- const space = (0, import_echo.getSpace)(subject);
985
+ const subjectId = (0, import_echo2.fullyQualifiedId)(subject);
986
+ const space = (0, import_echo2.getSpace)(subject);
987
987
  const intents = [];
988
988
  const analyticsProperties = {
989
989
  threadId: thread.id,
@@ -1022,7 +1022,7 @@ var ThreadPlugin = () => {
1022
1022
  }
1023
1023
  case import_chunk_FOZUQZF4.ThreadAction.DELETE_MESSAGE: {
1024
1024
  const { subject, thread, messageId } = intent.data ?? {};
1025
- const space = (0, import_echo.getSpace)(subject);
1025
+ const space = (0, import_echo2.getSpace)(subject);
1026
1026
  if (!(thread instanceof import_types.ThreadType) || !(subject && typeof subject === "object" && "threads" in subject)) {
1027
1027
  return;
1028
1028
  }