@dxos/plugin-thread 0.8.0 → 0.8.1-main.81238a8

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 (157) hide show
  1. package/dist/lib/browser/ChannelContainer-6YTHIJPS.mjs +74 -0
  2. package/dist/lib/browser/ChannelContainer-6YTHIJPS.mjs.map +7 -0
  3. package/dist/lib/browser/{chunk-UPKU23DA.mjs → chunk-3BIHVVEA.mjs} +5 -5
  4. package/dist/lib/browser/chunk-3BIHVVEA.mjs.map +7 -0
  5. package/dist/lib/browser/{chunk-BNEWNQBO.mjs → chunk-K3NUEKPS.mjs} +14 -2
  6. package/dist/lib/browser/{chunk-BNEWNQBO.mjs.map → chunk-K3NUEKPS.mjs.map} +4 -4
  7. package/dist/lib/browser/{chunk-NAO3LZMZ.mjs → chunk-NOOMCX5E.mjs} +3 -2
  8. package/dist/lib/browser/chunk-NOOMCX5E.mjs.map +7 -0
  9. package/dist/lib/browser/{chunk-YK3ICB7G.mjs → chunk-OPDRTA7Q.mjs} +2 -2
  10. package/dist/lib/browser/{chunk-YK3ICB7G.mjs.map → chunk-OPDRTA7Q.mjs.map} +1 -1
  11. package/dist/lib/browser/{chunk-636QDHE3.mjs → chunk-WBJLUUOK.mjs} +1 -1
  12. package/dist/lib/browser/{chunk-636QDHE3.mjs.map → chunk-WBJLUUOK.mjs.map} +2 -2
  13. package/dist/lib/browser/index.mjs +25 -15
  14. package/dist/lib/browser/index.mjs.map +4 -4
  15. package/dist/lib/browser/{intent-resolver-FAFQ54NP.mjs → intent-resolver-WAVFYWIS.mjs} +5 -5
  16. package/dist/lib/browser/{intent-resolver-FAFQ54NP.mjs.map → intent-resolver-WAVFYWIS.mjs.map} +2 -2
  17. package/dist/lib/browser/{markdown-RPYOUBVR.mjs → markdown-R6VIT67G.mjs} +6 -6
  18. package/dist/lib/browser/markdown-R6VIT67G.mjs.map +7 -0
  19. package/dist/lib/browser/meta.json +1 -1
  20. package/dist/lib/browser/{react-surface-Y4MUSICN.mjs → react-surface-2MKPJW4D.mjs} +15 -28
  21. package/dist/lib/browser/react-surface-2MKPJW4D.mjs.map +7 -0
  22. package/dist/lib/browser/{settings-WQTE5AEZ.mjs → settings-2EJW5SUY.mjs} +3 -3
  23. package/dist/lib/browser/{state-GNFUURIC.mjs → state-HPUFZBB7.mjs} +4 -3
  24. package/dist/lib/browser/state-HPUFZBB7.mjs.map +7 -0
  25. package/dist/lib/browser/types.mjs +2 -2
  26. package/dist/lib/node/ChannelContainer-AVRYTS7L.cjs +98 -0
  27. package/dist/lib/node/ChannelContainer-AVRYTS7L.cjs.map +7 -0
  28. package/dist/lib/node/{chunk-AWSTZ2KN.cjs → chunk-E6HDHBUB.cjs} +28 -4
  29. package/dist/lib/node/chunk-E6HDHBUB.cjs.map +7 -0
  30. package/dist/lib/node/{chunk-RQR5Z23G.cjs → chunk-EHS2JT63.cjs} +12 -12
  31. package/dist/lib/node/chunk-EHS2JT63.cjs.map +7 -0
  32. package/dist/lib/node/{chunk-CMEMMYDL.cjs → chunk-GBL2K6YX.cjs} +6 -6
  33. package/dist/lib/node/{chunk-CMEMMYDL.cjs.map → chunk-GBL2K6YX.cjs.map} +1 -1
  34. package/dist/lib/node/{chunk-F735VMTN.cjs → chunk-ONLWOUYZ.cjs} +4 -4
  35. package/dist/lib/node/{chunk-F735VMTN.cjs.map → chunk-ONLWOUYZ.cjs.map} +2 -2
  36. package/dist/lib/node/{chunk-FPWNZ6TB.cjs → chunk-VEVJBOWK.cjs} +8 -7
  37. package/dist/lib/node/chunk-VEVJBOWK.cjs.map +7 -0
  38. package/dist/lib/node/index.cjs +62 -53
  39. package/dist/lib/node/index.cjs.map +4 -4
  40. package/dist/lib/node/{intent-resolver-DVBEXJ33.cjs → intent-resolver-ESZ7YDRL.cjs} +22 -22
  41. package/dist/lib/node/{intent-resolver-DVBEXJ33.cjs.map → intent-resolver-ESZ7YDRL.cjs.map} +2 -2
  42. package/dist/lib/node/{markdown-ELRGISXE.cjs → markdown-KJJCSWOZ.cjs} +12 -12
  43. package/dist/lib/node/markdown-KJJCSWOZ.cjs.map +7 -0
  44. package/dist/lib/node/meta.json +1 -1
  45. package/dist/lib/node/{react-surface-7HLTN5XS.cjs → react-surface-YJNIS6CL.cjs} +35 -48
  46. package/dist/lib/node/react-surface-YJNIS6CL.cjs.map +7 -0
  47. package/dist/lib/node/{settings-7VQYARM5.cjs → settings-5YWRJNSN.cjs} +8 -8
  48. package/dist/lib/node/{state-TQWEZ6B3.cjs → state-JMI5ZXZI.cjs} +8 -7
  49. package/dist/lib/node/state-JMI5ZXZI.cjs.map +7 -0
  50. package/dist/lib/node/types.cjs +4 -4
  51. package/dist/lib/node/types.cjs.map +1 -1
  52. package/dist/lib/node-esm/ChannelContainer-2ZU33KAF.mjs +75 -0
  53. package/dist/lib/node-esm/ChannelContainer-2ZU33KAF.mjs.map +7 -0
  54. package/dist/lib/node-esm/{chunk-FXUATCLW.mjs → chunk-42F2DTMM.mjs} +1 -1
  55. package/dist/lib/node-esm/{chunk-FXUATCLW.mjs.map → chunk-42F2DTMM.mjs.map} +2 -2
  56. package/dist/lib/node-esm/{chunk-33NDMQQQ.mjs → chunk-B5VGBXRR.mjs} +2 -2
  57. package/dist/lib/node-esm/{chunk-33NDMQQQ.mjs.map → chunk-B5VGBXRR.mjs.map} +1 -1
  58. package/dist/lib/node-esm/{chunk-HLWJTUWZ.mjs → chunk-L4C7BEQZ.mjs} +14 -2
  59. package/dist/lib/node-esm/{chunk-HLWJTUWZ.mjs.map → chunk-L4C7BEQZ.mjs.map} +4 -4
  60. package/dist/lib/node-esm/{chunk-CISLDOH7.mjs → chunk-RN3V7SYL.mjs} +5 -5
  61. package/dist/lib/node-esm/chunk-RN3V7SYL.mjs.map +7 -0
  62. package/dist/lib/node-esm/{chunk-ZJITX3TO.mjs → chunk-TXW5SIBN.mjs} +3 -2
  63. package/dist/lib/node-esm/chunk-TXW5SIBN.mjs.map +7 -0
  64. package/dist/lib/node-esm/index.mjs +25 -15
  65. package/dist/lib/node-esm/index.mjs.map +4 -4
  66. package/dist/lib/node-esm/{intent-resolver-DHVLBNCC.mjs → intent-resolver-YLBQTBSE.mjs} +5 -5
  67. package/dist/lib/node-esm/{intent-resolver-DHVLBNCC.mjs.map → intent-resolver-YLBQTBSE.mjs.map} +2 -2
  68. package/dist/lib/node-esm/{markdown-23OB7EZG.mjs → markdown-LF4X5O6L.mjs} +6 -6
  69. package/dist/lib/node-esm/markdown-LF4X5O6L.mjs.map +7 -0
  70. package/dist/lib/node-esm/meta.json +1 -1
  71. package/dist/lib/node-esm/{react-surface-AZHTTR6J.mjs → react-surface-ZEDBXBP3.mjs} +15 -28
  72. package/dist/lib/node-esm/react-surface-ZEDBXBP3.mjs.map +7 -0
  73. package/dist/lib/node-esm/{settings-SGMM7UDT.mjs → settings-5EZW6KK4.mjs} +3 -3
  74. package/dist/lib/node-esm/{state-7MLR27YG.mjs → state-PSZO57LP.mjs} +4 -3
  75. package/dist/lib/node-esm/state-PSZO57LP.mjs.map +7 -0
  76. package/dist/lib/node-esm/types.mjs +2 -2
  77. package/dist/types/src/ThreadPlugin.d.ts.map +1 -1
  78. package/dist/types/src/capabilities/capabilities.d.ts +5 -0
  79. package/dist/types/src/capabilities/capabilities.d.ts.map +1 -1
  80. package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
  81. package/dist/types/src/components/ChannelContainer.d.ts +9 -0
  82. package/dist/types/src/components/ChannelContainer.d.ts.map +1 -0
  83. package/dist/types/src/components/ChatContainer.d.ts +3 -2
  84. package/dist/types/src/components/ChatContainer.d.ts.map +1 -1
  85. package/dist/types/src/components/CommentContainer.d.ts +2 -1
  86. package/dist/types/src/components/CommentContainer.d.ts.map +1 -1
  87. package/dist/types/src/components/CommentsContainer.d.ts +2 -1
  88. package/dist/types/src/components/CommentsContainer.d.ts.map +1 -1
  89. package/dist/types/src/components/MessageContainer.d.ts +2 -1
  90. package/dist/types/src/components/MessageContainer.d.ts.map +1 -1
  91. package/dist/types/src/components/ThreadComplementary.d.ts +2 -1
  92. package/dist/types/src/components/ThreadComplementary.d.ts.map +1 -1
  93. package/dist/types/src/components/ThreadSettings.d.ts +2 -1
  94. package/dist/types/src/components/ThreadSettings.d.ts.map +1 -1
  95. package/dist/types/src/components/index.d.ts +3 -2
  96. package/dist/types/src/components/index.d.ts.map +1 -1
  97. package/dist/types/src/components/testing.d.ts +38 -38
  98. package/dist/types/src/components/testing.d.ts.map +1 -1
  99. package/dist/types/src/events.d.ts +4 -0
  100. package/dist/types/src/events.d.ts.map +1 -0
  101. package/dist/types/src/index.d.ts +2 -0
  102. package/dist/types/src/index.d.ts.map +1 -1
  103. package/dist/types/src/meta.d.ts +2 -7
  104. package/dist/types/src/meta.d.ts.map +1 -1
  105. package/dist/types/src/types.d.ts +2 -0
  106. package/dist/types/src/types.d.ts.map +1 -1
  107. package/package.json +31 -30
  108. package/src/ThreadPlugin.tsx +2 -1
  109. package/src/capabilities/capabilities.ts +6 -0
  110. package/src/capabilities/intent-resolver.ts +1 -1
  111. package/src/capabilities/react-surface.tsx +5 -16
  112. package/src/capabilities/state.ts +1 -1
  113. package/src/components/ChannelContainer.tsx +80 -0
  114. package/src/components/ChatContainer.tsx +1 -1
  115. package/src/components/CommentContainer.tsx +1 -1
  116. package/src/components/MessageContainer.tsx +1 -1
  117. package/src/components/ThreadComplementary.tsx +1 -1
  118. package/src/components/index.ts +1 -1
  119. package/src/events.ts +11 -0
  120. package/src/extensions/threads.ts +2 -2
  121. package/src/index.ts +2 -0
  122. package/src/meta.ts +2 -2
  123. package/src/types.ts +2 -0
  124. package/dist/lib/browser/ThreadContainer-6OP5AG2W.mjs +0 -19
  125. package/dist/lib/browser/ThreadContainer-6OP5AG2W.mjs.map +0 -7
  126. package/dist/lib/browser/chunk-NAO3LZMZ.mjs.map +0 -7
  127. package/dist/lib/browser/chunk-UPKU23DA.mjs.map +0 -7
  128. package/dist/lib/browser/chunk-VOMIDDNO.mjs +0 -15
  129. package/dist/lib/browser/chunk-VOMIDDNO.mjs.map +0 -7
  130. package/dist/lib/browser/markdown-RPYOUBVR.mjs.map +0 -7
  131. package/dist/lib/browser/react-surface-Y4MUSICN.mjs.map +0 -7
  132. package/dist/lib/browser/state-GNFUURIC.mjs.map +0 -7
  133. package/dist/lib/node/ThreadContainer-LTKKLPXX.cjs +0 -45
  134. package/dist/lib/node/ThreadContainer-LTKKLPXX.cjs.map +0 -7
  135. package/dist/lib/node/chunk-AWSTZ2KN.cjs.map +0 -7
  136. package/dist/lib/node/chunk-BHFHFTHO.cjs +0 -50
  137. package/dist/lib/node/chunk-BHFHFTHO.cjs.map +0 -7
  138. package/dist/lib/node/chunk-FPWNZ6TB.cjs.map +0 -7
  139. package/dist/lib/node/chunk-RQR5Z23G.cjs.map +0 -7
  140. package/dist/lib/node/markdown-ELRGISXE.cjs.map +0 -7
  141. package/dist/lib/node/react-surface-7HLTN5XS.cjs.map +0 -7
  142. package/dist/lib/node/state-TQWEZ6B3.cjs.map +0 -7
  143. package/dist/lib/node-esm/ThreadContainer-SV74JFRH.mjs +0 -20
  144. package/dist/lib/node-esm/ThreadContainer-SV74JFRH.mjs.map +0 -7
  145. package/dist/lib/node-esm/chunk-CISLDOH7.mjs.map +0 -7
  146. package/dist/lib/node-esm/chunk-PJPVEO7E.mjs +0 -17
  147. package/dist/lib/node-esm/chunk-PJPVEO7E.mjs.map +0 -7
  148. package/dist/lib/node-esm/chunk-ZJITX3TO.mjs.map +0 -7
  149. package/dist/lib/node-esm/markdown-23OB7EZG.mjs.map +0 -7
  150. package/dist/lib/node-esm/react-surface-AZHTTR6J.mjs.map +0 -7
  151. package/dist/lib/node-esm/state-7MLR27YG.mjs.map +0 -7
  152. package/dist/types/src/components/ThreadContainer.d.ts +0 -7
  153. package/dist/types/src/components/ThreadContainer.d.ts.map +0 -1
  154. package/src/components/ThreadContainer.tsx +0 -22
  155. /package/dist/lib/browser/{settings-WQTE5AEZ.mjs.map → settings-2EJW5SUY.mjs.map} +0 -0
  156. /package/dist/lib/node/{settings-7VQYARM5.cjs.map → settings-5YWRJNSN.cjs.map} +0 -0
  157. /package/dist/lib/node-esm/{settings-SGMM7UDT.mjs.map → settings-5EZW6KK4.mjs.map} +0 -0
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/capabilities/intent-resolver.ts"],
4
- "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport {\n Capabilities,\n contributes,\n createIntent,\n createResolver,\n LayoutAction,\n type PluginsContext,\n} from '@dxos/app-framework';\nimport { Ref } from '@dxos/echo-schema';\nimport { log } from '@dxos/log';\nimport { ObservabilityAction } from '@dxos/plugin-observability/types';\nimport { ChannelType, ThreadType } from '@dxos/plugin-space/types';\nimport { create, fullyQualifiedId, getSpace, makeRef } from '@dxos/react-client/echo';\n\nimport { ThreadCapabilities } from './capabilities';\nimport { THREAD_PLUGIN } from '../meta';\nimport { ThreadAction } from '../types';\n\nexport default (context: PluginsContext) =>\n contributes(Capabilities.IntentResolver, [\n createResolver({\n intent: ThreadAction.Create,\n resolve: ({ name, cursor, subject }) => {\n if (cursor && subject) {\n // Seed the threads array if it does not exist.\n if (subject?.threads === undefined) {\n try {\n // Static schema will throw an error if subject does not support threads array property.\n subject.threads = [];\n } catch (err) {\n log.error('Subject does not support threads array', { typename: subject?.typename });\n return;\n }\n }\n\n const { state } = context.requestCapability(ThreadCapabilities.MutableState);\n const subjectId = fullyQualifiedId(subject);\n const thread = create(ThreadType, { name, anchor: cursor, messages: [], status: 'staged' });\n const draft = state.drafts[subjectId];\n if (draft) {\n draft.push(thread);\n } else {\n state.drafts[subjectId] = [thread];\n }\n\n return {\n data: { object: thread },\n intents: [\n createIntent(ThreadAction.Select, { current: fullyQualifiedId(thread) }),\n createIntent(LayoutAction.UpdateComplementary, { part: 'complementary', subject: 'comments' }),\n ],\n };\n } else {\n // TODO(wittjosiah): Create separate intent for channel creation.\n return {\n data: { object: create(ChannelType, { threads: [makeRef(create(ThreadType, { messages: [] }))] }) },\n };\n }\n },\n }),\n createResolver({\n intent: ThreadAction.Select,\n resolve: ({ current, skipOpen }) => {\n const { state } = context.requestCapability(ThreadCapabilities.MutableState);\n state.current = current;\n\n return {\n intents: !skipOpen\n ? [createIntent(LayoutAction.UpdateComplementary, { part: 'complementary', subject: 'comments' })]\n : undefined,\n };\n },\n }),\n createResolver({\n intent: ThreadAction.ToggleResolved,\n resolve: ({ thread }) => {\n if (thread.status === 'active' || thread.status === undefined) {\n thread.status = 'resolved';\n } else if (thread.status === 'resolved') {\n thread.status = 'active';\n }\n\n const space = getSpace(thread);\n const spaceId = space?.id;\n\n return {\n intents: [\n createIntent(ObservabilityAction.SendEvent, {\n name: 'threads.toggle-resolved',\n properties: { threadId: thread.id, spaceId },\n }),\n ],\n };\n },\n }),\n createResolver({\n intent: ThreadAction.Delete,\n resolve: ({ subject, thread }, undo) => {\n const { state } = context.requestCapability(ThreadCapabilities.MutableState);\n const subjectId = fullyQualifiedId(subject);\n const draft = state.drafts[subjectId];\n if (draft) {\n // Check if we're deleting a draft; if so, remove it.\n const index = draft.findIndex((t) => t.id === thread.id);\n if (index !== -1) {\n draft.splice(index, 1);\n return;\n }\n }\n\n const space = getSpace(thread);\n if (!space || !subject.threads) {\n return;\n }\n\n if (!undo) {\n const index = subject.threads.findIndex((t: any) => t?.id === thread.id);\n const cursor = subject.threads[index]?.anchor;\n if (index !== -1) {\n subject.threads?.splice(index, 1);\n }\n\n space.db.remove(thread);\n\n return {\n undoable: {\n message: ['thread deleted label', { ns: THREAD_PLUGIN }],\n data: { cursor },\n },\n intents: [\n createIntent(ObservabilityAction.SendEvent, {\n name: 'threads.delete',\n properties: { threadId: thread.id, spaceId: space.id },\n }),\n ],\n };\n } else {\n // TODO(wittjosiah): SDK should do this automatically.\n const savedThread = space.db.add(thread);\n subject.threads.push(savedThread);\n\n return {\n intents: [\n createIntent(ObservabilityAction.SendEvent, {\n name: 'threads.undo-delete',\n properties: { threadId: thread.id, spaceId: space.id },\n }),\n ],\n };\n }\n },\n }),\n createResolver({\n intent: ThreadAction.OnMessageAdd,\n resolve: ({ thread, subject }) => {\n const { state } = context.requestCapability(ThreadCapabilities.MutableState);\n const subjectId = fullyQualifiedId(subject);\n const space = getSpace(subject);\n const intents = [];\n const analyticsProperties = { threadId: thread.id, spaceId: space?.id };\n\n if (state.drafts[subjectId]?.find((t) => t === thread)) {\n // Move draft to document.\n thread.status = 'active';\n subject.threads ? subject.threads.push(makeRef(thread)) : (subject.threads = [makeRef(thread)]);\n state.drafts[subjectId] = state.drafts[subjectId]?.filter(({ id }) => id !== thread.id);\n intents.push(\n createIntent(ObservabilityAction.SendEvent, {\n name: 'threads.thread-created',\n properties: analyticsProperties,\n }),\n );\n }\n\n intents.push(\n createIntent(ObservabilityAction.SendEvent, {\n name: 'threads.message-added',\n properties: { ...analyticsProperties, threadLength: thread.messages.length },\n }),\n );\n\n return { intents };\n },\n }),\n createResolver({\n intent: ThreadAction.DeleteMessage,\n resolve: ({ subject, thread, messageId, message, messageIndex }, undo) => {\n const space = getSpace(subject);\n\n if (!undo) {\n const messageIndex = thread.messages.findIndex(Ref.hasObjectId(messageId));\n const message = thread.messages[messageIndex]?.target;\n if (!message) {\n return;\n }\n\n if (messageIndex === 0 && thread.messages.length === 1) {\n // If the message is the only message in the thread, delete the thread.\n return {\n intents: [createIntent(ThreadAction.Delete, { subject, thread })],\n };\n } else {\n thread.messages.splice(messageIndex, 1);\n }\n\n return {\n undoable: {\n message: ['message deleted label', { ns: THREAD_PLUGIN }],\n data: { message, messageIndex },\n },\n intents: [\n createIntent(ObservabilityAction.SendEvent, {\n name: 'threads.message.delete',\n properties: { threadId: thread.id, spaceId: space?.id },\n }),\n ],\n };\n } else {\n if (!messageIndex || !message) {\n return;\n }\n\n thread.messages.splice(messageIndex, 0, makeRef(message));\n return {\n intents: [\n createIntent(ObservabilityAction.SendEvent, {\n name: 'threads.message.undo-delete',\n properties: { threadId: thread.id, spaceId: space?.id },\n }),\n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AO;UACLd,UAAU;YACRC,SAAS;cAAC;cAAyB;gBAAEC,IAAIC;cAAc;;YACvDhC,MAAM;cAAE8B,SAAAA;cAASa,cAAAA;YAAa;UAChC;UACAzC,SAAS;YACPC,aAAac,oBAAoBC,WAAW;cAC1C1C,MAAM;cACN2C,YAAY;gBAAEC,UAAU7B,OAAOyB;gBAAID,SAASF,OAAOG;cAAG;YACxD,CAAA;;QAEJ;MACF,OAAO;AACL,YAAI,CAAC2B,gBAAgB,CAACb,SAAS;AAC7B;QACF;AAEAvC,eAAOI,SAAS+B,OAAOiB,cAAc,GAAGjC,QAAQoB,OAAAA,CAAAA;AAChD,eAAO;UACL5B,SAAS;YACPC,aAAac,oBAAoBC,WAAW;cAC1C1C,MAAM;cACN2C,YAAY;gBAAEC,UAAU7B,OAAOyB;gBAAID,SAASF,OAAOG;cAAG;YACxD,CAAA;;QAEJ;MACF;IACF;EACF,CAAA;CACD;",
4
+ "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport {\n Capabilities,\n contributes,\n createIntent,\n createResolver,\n LayoutAction,\n type PluginsContext,\n} from '@dxos/app-framework';\nimport { Ref } from '@dxos/echo-schema';\nimport { log } from '@dxos/log';\nimport { ObservabilityAction } from '@dxos/plugin-observability/types';\nimport { ChannelType, ThreadType } from '@dxos/plugin-space/types';\nimport { create, fullyQualifiedId, getSpace, makeRef } from '@dxos/react-client/echo';\n\nimport { ThreadCapabilities } from './capabilities';\nimport { THREAD_PLUGIN } from '../meta';\nimport { ThreadAction } from '../types';\n\nexport default (context: PluginsContext) =>\n contributes(Capabilities.IntentResolver, [\n createResolver({\n intent: ThreadAction.Create,\n resolve: ({ name, cursor, subject }) => {\n if (cursor && subject) {\n // Seed the threads array if it does not exist.\n if (subject?.threads === undefined) {\n try {\n // Static schema will throw an error if subject does not support threads array property.\n subject.threads = [];\n } catch (err) {\n log.error('Subject does not support threads array', { typename: subject?.typename });\n return;\n }\n }\n\n const { state } = context.requestCapability(ThreadCapabilities.MutableState);\n const subjectId = fullyQualifiedId(subject);\n const thread = create(ThreadType, { name, anchor: cursor, messages: [], status: 'staged' });\n const draft = state.drafts[subjectId];\n if (draft) {\n draft.push(thread);\n } else {\n state.drafts[subjectId] = [thread];\n }\n\n return {\n data: { object: thread },\n intents: [\n createIntent(ThreadAction.Select, { current: fullyQualifiedId(thread) }),\n createIntent(LayoutAction.UpdateComplementary, { part: 'complementary', subject: 'comments' }),\n ],\n };\n } else {\n // TODO(wittjosiah): Create separate intent for channel creation.\n return {\n data: { object: create(ChannelType, { threads: [makeRef(create(ThreadType, { messages: [] }))] }) },\n };\n }\n },\n }),\n createResolver({\n intent: ThreadAction.Select,\n resolve: ({ current, skipOpen }) => {\n const { state } = context.requestCapability(ThreadCapabilities.MutableState);\n state.current = current;\n\n return {\n intents: !skipOpen\n ? [createIntent(LayoutAction.UpdateComplementary, { part: 'complementary', subject: 'comments' })]\n : undefined,\n };\n },\n }),\n createResolver({\n intent: ThreadAction.ToggleResolved,\n resolve: ({ thread }) => {\n if (thread.status === 'active' || thread.status === undefined) {\n thread.status = 'resolved';\n } else if (thread.status === 'resolved') {\n thread.status = 'active';\n }\n\n const space = getSpace(thread);\n const spaceId = space?.id;\n\n return {\n intents: [\n createIntent(ObservabilityAction.SendEvent, {\n name: 'threads.toggle-resolved',\n properties: { threadId: thread.id, spaceId },\n }),\n ],\n };\n },\n }),\n createResolver({\n intent: ThreadAction.Delete,\n resolve: ({ subject, thread }, undo) => {\n const { state } = context.requestCapability(ThreadCapabilities.MutableState);\n const subjectId = fullyQualifiedId(subject);\n const draft = state.drafts[subjectId];\n if (draft) {\n // Check if we're deleting a draft; if so, remove it.\n const index = draft.findIndex((t) => t.id === thread.id);\n if (index !== -1) {\n draft.splice(index, 1);\n return;\n }\n }\n\n const space = getSpace(thread);\n if (!space || !subject.threads) {\n return;\n }\n\n if (!undo) {\n const index = subject.threads.findIndex((t: any) => t?.id === thread.id);\n const cursor = subject.threads[index]?.anchor;\n if (index !== -1) {\n subject.threads?.splice(index, 1);\n }\n\n space.db.remove(thread);\n\n return {\n undoable: {\n message: ['thread deleted label', { ns: THREAD_PLUGIN }],\n data: { cursor },\n },\n intents: [\n createIntent(ObservabilityAction.SendEvent, {\n name: 'threads.delete',\n properties: { threadId: thread.id, spaceId: space.id },\n }),\n ],\n };\n } else {\n // TODO(wittjosiah): SDK should do this automatically.\n const savedThread = space.db.add(thread);\n subject.threads.push(savedThread);\n\n return {\n intents: [\n createIntent(ObservabilityAction.SendEvent, {\n name: 'threads.undo-delete',\n properties: { threadId: thread.id, spaceId: space.id },\n }),\n ],\n };\n }\n },\n }),\n createResolver({\n intent: ThreadAction.OnMessageAdd,\n resolve: ({ thread, subject }) => {\n const { state } = context.requestCapability(ThreadCapabilities.MutableState);\n const subjectId = fullyQualifiedId(subject);\n const space = getSpace(subject);\n const intents = [];\n const analyticsProperties = { threadId: thread.id, spaceId: space?.id };\n\n if (state.drafts[subjectId]?.find((t) => t === thread)) {\n // Move draft to document.\n thread.status = 'active';\n subject.threads ? subject.threads.push(makeRef(thread)) : (subject.threads = [makeRef(thread)]);\n state.drafts[subjectId] = state.drafts[subjectId]?.filter(({ id }) => id !== thread.id);\n intents.push(\n createIntent(ObservabilityAction.SendEvent, {\n name: 'threads.thread-created',\n properties: analyticsProperties,\n }),\n );\n }\n\n intents.push(\n createIntent(ObservabilityAction.SendEvent, {\n name: 'threads.message-added',\n properties: { ...analyticsProperties, threadLength: thread.messages.length },\n }),\n );\n\n return { intents };\n },\n }),\n createResolver({\n intent: ThreadAction.DeleteMessage,\n resolve: ({ subject, thread, messageId, message, messageIndex }, undo) => {\n const space = getSpace(subject);\n\n if (!undo) {\n const messageIndex = thread.messages.findIndex(Ref.hasObjectId(messageId));\n const message = thread.messages[messageIndex]?.target;\n if (!message) {\n return;\n }\n\n if (messageIndex === 0 && thread.messages.length === 1) {\n // If the message is the only message in the thread, delete the thread.\n return {\n intents: [createIntent(ThreadAction.Delete, { subject, thread })],\n };\n } else {\n thread.messages.splice(messageIndex, 1);\n }\n\n return {\n undoable: {\n message: ['message deleted label', { ns: THREAD_PLUGIN }],\n data: { message, messageIndex },\n },\n intents: [\n createIntent(ObservabilityAction.SendEvent, {\n name: 'threads.message.delete',\n properties: { threadId: thread.id, spaceId: space?.id },\n }),\n ],\n };\n } else {\n if (messageIndex === undefined || !message) {\n return;\n }\n\n thread.messages.splice(messageIndex, 0, makeRef(message));\n return {\n intents: [\n createIntent(ObservabilityAction.SendEvent, {\n name: 'threads.message.undo-delete',\n properties: { threadId: thread.id, spaceId: space?.id },\n }),\n ],\n };\n }\n },\n }),\n ]);\n"],
5
+ "mappings": ";;;;;;;;;;;AAIA,SACEA,cACAC,aACAC,cACAC,gBACAC,oBAEK;AACP,SAASC,WAAW;AACpB,SAASC,WAAW;AACpB,SAASC,2BAA2B;AACpC,SAASC,aAAaC,kBAAkB;AACxC,SAASC,QAAQC,kBAAkBC,UAAUC,eAAe;;AAM5D,IAAA,0BAAe,CAACC,YACdC,YAAYC,aAAaC,gBAAgB;EACvCC,eAAe;IACbC,QAAQC,aAAaC;IACrBC,SAAS,CAAC,EAAEC,MAAMC,QAAQC,QAAO,MAAE;AACjC,UAAID,UAAUC,SAAS;AAErB,YAAIA,SAASC,YAAYC,QAAW;AAClC,cAAI;AAEFF,oBAAQC,UAAU,CAAA;UACpB,SAASE,KAAK;AACZC,gBAAIC,MAAM,0CAA0C;cAAEC,UAAUN,SAASM;YAAS,GAAA;;;;;;AAClF;UACF;QACF;AAEA,cAAM,EAAEC,MAAK,IAAKlB,QAAQmB,kBAAkBC,mBAAmBC,YAAY;AAC3E,cAAMC,YAAYC,iBAAiBZ,OAAAA;AACnC,cAAMa,SAASC,OAAOC,YAAY;UAAEjB;UAAMkB,QAAQjB;UAAQkB,UAAU,CAAA;UAAIC,QAAQ;QAAS,CAAA;AACzF,cAAMC,QAAQZ,MAAMa,OAAOT,SAAAA;AAC3B,YAAIQ,OAAO;AACTA,gBAAME,KAAKR,MAAAA;QACb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OI,SAAS6B,UAAUoB,IAAIC,YAAYH,SAAAA,CAAAA;AAC/D,cAAMZ,WAAUvC,OAAOI,SAASgD,aAAAA,GAAeG;AAC/C,YAAI,CAAChB,UAAS;AACZ;QACF;AAEA,YAAIa,kBAAiB,KAAKpD,OAAOI,SAAS6C,WAAW,GAAG;AAEtD,iBAAO;YACLtC,SAAS;cAACC,aAAa9B,aAAagD,QAAQ;gBAAE3C;gBAASa;cAAO,CAAA;;UAChE;QACF,OAAO;AACLA,iBAAOI,SAAS+B,OAAOiB,eAAc,CAAA;QACvC;AAEA,eAAO;UACLd,UAAU;YACRC,SAAS;cAAC;cAAyB;gBAAEC,IAAIC;cAAc;;YACvDhC,MAAM;cAAE8B,SAAAA;cAASa,cAAAA;YAAa;UAChC;UACAzC,SAAS;YACPC,aAAac,oBAAoBC,WAAW;cAC1C1C,MAAM;cACN2C,YAAY;gBAAEC,UAAU7B,OAAOyB;gBAAID,SAASF,OAAOG;cAAG;YACxD,CAAA;;QAEJ;MACF,OAAO;AACL,YAAI2B,iBAAiB/D,UAAa,CAACkD,SAAS;AAC1C;QACF;AAEAvC,eAAOI,SAAS+B,OAAOiB,cAAc,GAAGjC,QAAQoB,OAAAA,CAAAA;AAChD,eAAO;UACL5B,SAAS;YACPC,aAAac,oBAAoBC,WAAW;cAC1C1C,MAAM;cACN2C,YAAY;gBAAEC,UAAU7B,OAAOyB;gBAAID,SAASF,OAAOG;cAAG;YACxD,CAAA;;QAEJ;MACF;IACF;EACF,CAAA;CACD;",
6
6
  "names": ["Capabilities", "contributes", "createIntent", "createResolver", "LayoutAction", "Ref", "log", "ObservabilityAction", "ChannelType", "ThreadType", "create", "fullyQualifiedId", "getSpace", "makeRef", "context", "contributes", "Capabilities", "IntentResolver", "createResolver", "intent", "ThreadAction", "Create", "resolve", "name", "cursor", "subject", "threads", "undefined", "err", "log", "error", "typename", "state", "requestCapability", "ThreadCapabilities", "MutableState", "subjectId", "fullyQualifiedId", "thread", "create", "ThreadType", "anchor", "messages", "status", "draft", "drafts", "push", "data", "object", "intents", "createIntent", "Select", "current", "LayoutAction", "UpdateComplementary", "part", "ChannelType", "makeRef", "skipOpen", "ToggleResolved", "space", "getSpace", "spaceId", "id", "ObservabilityAction", "SendEvent", "properties", "threadId", "Delete", "undo", "index", "findIndex", "t", "splice", "db", "remove", "undoable", "message", "ns", "THREAD_PLUGIN", "savedThread", "add", "OnMessageAdd", "analyticsProperties", "find", "filter", "threadLength", "length", "DeleteMessage", "messageId", "messageIndex", "Ref", "hasObjectId", "target"]
7
7
  }
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  ThreadAction
3
- } from "./chunk-YK3ICB7G.mjs";
3
+ } from "./chunk-OPDRTA7Q.mjs";
4
4
  import {
5
5
  ThreadCapabilities
6
- } from "./chunk-NAO3LZMZ.mjs";
7
- import "./chunk-636QDHE3.mjs";
6
+ } from "./chunk-NOOMCX5E.mjs";
7
+ import "./chunk-WBJLUUOK.mjs";
8
8
 
9
9
  // packages/plugins/plugin-thread/src/capabilities/markdown.ts
10
10
  import { Capabilities, contributes } from "@dxos/app-framework";
@@ -35,13 +35,13 @@ var threads = (state, doc, dispatch) => {
35
35
  ];
36
36
  }
37
37
  const threads2 = computed(() => [
38
- ...RefArray.allResolvedTargets(doc.threads),
38
+ ...RefArray.targets(doc.threads),
39
39
  ...state.drafts[fullyQualifiedId(doc)] ?? []
40
40
  ].filter((thread) => !(thread?.status === "resolved")));
41
41
  return [
42
42
  EditorView.updateListener.of((update) => {
43
43
  if (update.docChanged) {
44
- RefArray.allResolvedTargets(doc.threads).forEach((thread) => {
44
+ RefArray.targets(doc.threads).forEach((thread) => {
45
45
  if (thread.anchor) {
46
46
  const name = getName(doc, thread.anchor);
47
47
  if (name && name !== thread.name) {
@@ -109,4 +109,4 @@ var markdown_default = (context) => contributes(MarkdownCapabilities.Extensions,
109
109
  export {
110
110
  markdown_default as default
111
111
  };
112
- //# sourceMappingURL=markdown-RPYOUBVR.mjs.map
112
+ //# sourceMappingURL=markdown-R6VIT67G.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/capabilities/markdown.ts", "../../../src/extensions/threads.ts"],
4
+ "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { Capabilities, contributes, type PluginsContext } from '@dxos/app-framework';\nimport { MarkdownCapabilities } from '@dxos/plugin-markdown';\n\nimport { ThreadCapabilities } from './capabilities';\nimport { threads } from '../extensions';\n\nexport default (context: PluginsContext) =>\n contributes(MarkdownCapabilities.Extensions, [\n ({ document: doc }) => {\n const { dispatchPromise: dispatch } = context.requestCapability(Capabilities.IntentDispatcher);\n const { state } = context.requestCapability(ThreadCapabilities.MutableState);\n return threads(state, doc, dispatch);\n },\n ]);\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport { type Extension } from '@codemirror/state';\nimport { EditorView } from '@codemirror/view';\nimport { computed, effect } from '@preact/signals-core';\n\nimport { createIntent, type PromiseIntentDispatcher } from '@dxos/app-framework';\nimport { Ref } from '@dxos/echo-schema';\nimport { RefArray } from '@dxos/live-object';\nimport { type DocumentType } from '@dxos/plugin-markdown/types';\nimport { ThreadType } from '@dxos/plugin-space/types';\nimport { getSpace, getTextInRange, createDocAccessor, fullyQualifiedId } from '@dxos/react-client/echo';\nimport { comments, createExternalCommentSync } from '@dxos/react-ui-editor';\n\nimport { ThreadAction, type ThreadState } from '../types';\n\n// TODO(burdon): Factor out.\nconst getName = (doc: DocumentType, anchor: string): string | undefined => {\n if (doc.content) {\n const [start, end] = anchor.split(':');\n return getTextInRange(createDocAccessor(doc.content.target!, ['content']), start, end);\n }\n};\n\n/**\n * Construct plugins.\n */\nexport const threads = (state: ThreadState, doc?: DocumentType, dispatch?: PromiseIntentDispatcher): Extension => {\n const space = doc && getSpace(doc);\n if (!doc || !space || !dispatch) {\n // Include no-op comments extension here to ensure that the facets are always present when they are expected.\n // TODO(wittjosiah): The Editor should only look for these facets when comments are available.\n return [comments()];\n }\n\n // TODO(Zan): When we have the deepsignal specific equivalent of this we should use that instead.\n const threads = computed(() =>\n [...RefArray.targets(doc.threads), ...(state.drafts[fullyQualifiedId(doc)] ?? [])].filter(\n (thread) => !(thread?.status === 'resolved'),\n ),\n );\n\n return [\n EditorView.updateListener.of((update) => {\n if (update.docChanged) {\n RefArray.targets(doc.threads).forEach((thread) => {\n if (thread.anchor) {\n // Only update if the name has changed, otherwise this will cause an infinite loop.\n // Skip if the name is empty; this means comment text was deleted, but thread name should remain.\n const name = getName(doc, thread.anchor);\n if (name && name !== thread.name) {\n thread.name = name;\n }\n }\n });\n }\n }),\n\n createExternalCommentSync(\n fullyQualifiedId(doc),\n (sink) => effect(() => sink()),\n () =>\n threads.value\n .filter((thread) => thread?.anchor)\n .map((thread) => ({ id: fullyQualifiedId(thread), cursor: thread.anchor! })),\n ),\n\n comments({\n id: fullyQualifiedId(doc),\n onCreate: ({ cursor }) => {\n const name = getName(doc, cursor);\n void dispatch(createIntent(ThreadAction.Create, { cursor, name, subject: doc }));\n },\n onDelete: ({ id }) => {\n const draft = state.drafts[fullyQualifiedId(doc)];\n if (draft) {\n const index = draft.findIndex((thread) => fullyQualifiedId(thread) === id);\n if (index !== -1) {\n draft.splice(index, 1);\n }\n }\n\n const thread = doc.threads.find(Ref.hasObjectId(id))?.target;\n if (thread) {\n thread.anchor = undefined;\n }\n },\n onUpdate: ({ id, cursor }) => {\n const thread =\n state.drafts[fullyQualifiedId(doc)]?.find((thread) => fullyQualifiedId(thread) === id) ??\n doc.threads.find(Ref.hasObjectId(id))?.target;\n\n if (thread instanceof ThreadType && thread.anchor) {\n thread.name = getName(doc, thread.anchor);\n thread.anchor = cursor;\n }\n },\n onSelect: ({ selection }) => {\n const current = selection.current ?? selection.closest;\n if (current) {\n void dispatch(createIntent(ThreadAction.Select, { current, skipOpen: true }));\n }\n },\n }),\n ];\n};\n"],
5
+ "mappings": ";;;;;;;;;AAIA,SAASA,cAAcC,mBAAwC;AAC/D,SAASC,4BAA4B;;;AC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AC/C,YAAID,SAAS;AACX,eAAK5C,SAAS2B,aAAaC,aAAakB,QAAQ;YAAEF;YAASG,UAAU;UAAK,CAAA,CAAA;QAC5E;MACF;IACF,CAAA;;AAEJ;;;ADjGA,IAAA,mBAAe,CAACC,YACdC,YAAYC,qBAAqBC,YAAY;EAC3C,CAAC,EAAEC,UAAUC,IAAG,MAAE;AAChB,UAAM,EAAEC,iBAAiBC,SAAQ,IAAKP,QAAQQ,kBAAkBC,aAAaC,gBAAgB;AAC7F,UAAM,EAAEC,MAAK,IAAKX,QAAQQ,kBAAkBI,mBAAmBC,YAAY;AAC3E,WAAOC,QAAQH,OAAON,KAAKE,QAAAA;EAC7B;CACD;",
6
+ "names": ["Capabilities", "contributes", "MarkdownCapabilities", "EditorView", "computed", "effect", "createIntent", "Ref", "RefArray", "ThreadType", "getSpace", "getTextInRange", "createDocAccessor", "fullyQualifiedId", "comments", "createExternalCommentSync", "getName", "doc", "anchor", "content", "start", "end", "split", "getTextInRange", "createDocAccessor", "target", "threads", "state", "dispatch", "space", "getSpace", "comments", "computed", "RefArray", "targets", "drafts", "fullyQualifiedId", "filter", "thread", "status", "EditorView", "updateListener", "of", "update", "docChanged", "forEach", "name", "createExternalCommentSync", "sink", "effect", "value", "map", "id", "cursor", "onCreate", "createIntent", "ThreadAction", "Create", "subject", "onDelete", "draft", "index", "findIndex", "splice", "find", "Ref", "hasObjectId", "undefined", "onUpdate", "ThreadType", "onSelect", "selection", "current", "closest", "Select", "skipOpen", "context", "contributes", "MarkdownCapabilities", "Extensions", "document", "doc", "dispatchPromise", "dispatch", "requestCapability", "Capabilities", "IntentDispatcher", "state", "ThreadCapabilities", "MutableState", "threads"]
7
+ }
@@ -1 +1 @@
1
- {"inputs":{"packages/plugins/plugin-thread/src/hooks/useStatus.ts":{"bytes":3661,"imports":[{"path":"react","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/plugin-thread/src/hooks/analytics.ts":{"bytes":4342,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/plugin-observability/types","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/plugin-thread/src/hooks/index.ts":{"bytes":602,"imports":[{"path":"packages/plugins/plugin-thread/src/hooks/useStatus.ts","kind":"import-statement","original":"./useStatus"},{"path":"packages/plugins/plugin-thread/src/hooks/analytics.ts","kind":"import-statement","original":"./analytics"}],"format":"esm"},"packages/plugins/plugin-thread/src/meta.ts":{"bytes":1668,"imports":[],"format":"esm"},"packages/plugins/plugin-thread/src/capabilities/capabilities.ts":{"bytes":2014,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-thread/src/meta.ts","kind":"import-statement","original":"../meta"}],"format":"esm"},"packages/plugins/plugin-thread/src/types.ts":{"bytes":8774,"imports":[{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/plugin-space/types","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-thread/src/meta.ts","kind":"import-statement","original":"./meta"}],"format":"esm"},"packages/plugins/plugin-thread/src/capabilities/intent-resolver.ts":{"bytes":32490,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/plugin-observability/types","kind":"import-statement","external":true},{"path":"@dxos/plugin-space/types","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-thread/src/capabilities/capabilities.ts","kind":"import-statement","original":"./capabilities"},{"path":"packages/plugins/plugin-thread/src/meta.ts","kind":"import-statement","original":"../meta"},{"path":"packages/plugins/plugin-thread/src/types.ts","kind":"import-statement","original":"../types"}],"format":"esm"},"packages/plugins/plugin-thread/src/extensions/threads.ts":{"bytes":14240,"imports":[{"path":"@codemirror/view","kind":"import-statement","external":true},{"path":"@preact/signals-core","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/live-object","kind":"import-statement","external":true},{"path":"@dxos/plugin-space/types","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui-editor","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-thread/src/types.ts","kind":"import-statement","original":"../types"}],"format":"esm"},"packages/plugins/plugin-thread/src/extensions/index.ts":{"bytes":512,"imports":[{"path":"packages/plugins/plugin-thread/src/extensions/threads.ts","kind":"import-statement","original":"./threads"}],"format":"esm"},"packages/plugins/plugin-thread/src/capabilities/markdown.ts":{"bytes":2695,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/plugin-markdown","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-thread/src/capabilities/capabilities.ts","kind":"import-statement","original":"./capabilities"},{"path":"packages/plugins/plugin-thread/src/extensions/index.ts","kind":"import-statement","original":"../extensions"}],"format":"esm"},"packages/plugins/plugin-thread/src/components/command-extension.ts":{"bytes":3522,"imports":[{"path":"@codemirror/language","kind":"import-statement","external":true},{"path":"@dxos/react-ui-editor","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/plugin-thread/src/util.ts":{"bytes":3056,"imports":[{"path":"@dxos/display-name","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/plugin-thread/src/components/MessageContainer.tsx":{"bytes":22224,"imports":[{"path":"@codemirror/view","kind":"import-statement","external":true},{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/live-object","kind":"import-statement","external":true},{"path":"@dxos/react-client","kind":"import-statement","external":true},{"path":"@dxos/react-client/halo","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-editor","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"@dxos/react-ui-thread","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-thread/src/components/command-extension.ts","kind":"import-statement","original":"./command-extension"},{"path":"packages/plugins/plugin-thread/src/hooks/index.ts","kind":"import-statement","original":"../hooks"},{"path":"packages/plugins/plugin-thread/src/meta.ts","kind":"import-statement","original":"../meta"},{"path":"packages/plugins/plugin-thread/src/util.ts","kind":"import-statement","original":"../util"}],"format":"esm"},"packages/plugins/plugin-thread/src/components/CommentContainer.tsx":{"bytes":24910,"imports":[{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/live-object","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-client/halo","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-editor","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"@dxos/react-ui-thread","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-thread/src/components/MessageContainer.tsx","kind":"import-statement","original":"./MessageContainer"},{"path":"packages/plugins/plugin-thread/src/components/command-extension.ts","kind":"import-statement","original":"./command-extension"},{"path":"packages/plugins/plugin-thread/src/hooks/index.ts","kind":"import-statement","original":"../hooks"},{"path":"packages/plugins/plugin-thread/src/meta.ts","kind":"import-statement","original":"../meta"},{"path":"packages/plugins/plugin-thread/src/util.ts","kind":"import-statement","original":"../util"}],"format":"esm"},"packages/plugins/plugin-thread/src/components/CommentsContainer.tsx":{"bytes":7688,"imports":[{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-thread/src/components/CommentContainer.tsx","kind":"import-statement","original":"./CommentContainer"},{"path":"packages/plugins/plugin-thread/src/meta.ts","kind":"import-statement","original":"../meta"}],"format":"esm"},"packages/plugins/plugin-thread/src/components/ChatContainer.tsx":{"bytes":19005,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/live-object","kind":"import-statement","external":true},{"path":"@dxos/plugin-space/types","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-client/halo","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-editor","kind":"import-statement","external":true},{"path":"@dxos/react-ui-stack","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"@dxos/react-ui-thread","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-thread/src/components/MessageContainer.tsx","kind":"import-statement","original":"./MessageContainer"},{"path":"packages/plugins/plugin-thread/src/components/command-extension.ts","kind":"import-statement","original":"./command-extension"},{"path":"packages/plugins/plugin-thread/src/hooks/index.ts","kind":"import-statement","original":"../hooks"},{"path":"packages/plugins/plugin-thread/src/meta.ts","kind":"import-statement","original":"../meta"},{"path":"packages/plugins/plugin-thread/src/util.ts","kind":"import-statement","original":"../util"}],"format":"esm"},"packages/plugins/plugin-thread/src/components/ThreadComplementary.tsx":{"bytes":20154,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/plugin-space","kind":"import-statement","external":true},{"path":"@dxos/plugin-space/types","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-client/halo","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-attention","kind":"import-statement","external":true},{"path":"@dxos/react-ui-tabs","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-thread/src/capabilities/index.ts","kind":"import-statement","original":"../capabilities"},{"path":"packages/plugins/plugin-thread/src/components/index.ts","kind":"import-statement","original":"../components"},{"path":"packages/plugins/plugin-thread/src/meta.ts","kind":"import-statement","original":"../meta"},{"path":"packages/plugins/plugin-thread/src/types.ts","kind":"import-statement","original":"../types"}],"format":"esm"},"packages/plugins/plugin-thread/src/components/ThreadSettings.tsx":{"bytes":1673,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui-form","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/plugin-thread/src/components/ThreadContainer.tsx":{"bytes":1851,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui-stack","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-thread/src/components/ChatContainer.tsx","kind":"import-statement","original":"./ChatContainer"}],"format":"esm"},"packages/plugins/plugin-thread/src/components/index.ts":{"bytes":1612,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-thread/src/components/CommentContainer.tsx","kind":"import-statement","original":"./CommentContainer"},{"path":"packages/plugins/plugin-thread/src/components/CommentsContainer.tsx","kind":"import-statement","original":"./CommentsContainer"},{"path":"packages/plugins/plugin-thread/src/components/ChatContainer.tsx","kind":"import-statement","original":"./ChatContainer"},{"path":"packages/plugins/plugin-thread/src/components/MessageContainer.tsx","kind":"import-statement","original":"./MessageContainer"},{"path":"packages/plugins/plugin-thread/src/components/ThreadComplementary.tsx","kind":"import-statement","original":"./ThreadComplementary"},{"path":"packages/plugins/plugin-thread/src/components/ThreadSettings.tsx","kind":"import-statement","original":"./ThreadSettings"},{"path":"packages/plugins/plugin-thread/src/components/ThreadContainer.tsx","kind":"dynamic-import","original":"./ThreadContainer"}],"format":"esm"},"packages/plugins/plugin-thread/src/capabilities/react-surface.tsx":{"bytes":8922,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/local-storage","kind":"import-statement","external":true},{"path":"@dxos/plugin-space/types","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-thread/src/components/index.ts","kind":"import-statement","original":"../components"},{"path":"packages/plugins/plugin-thread/src/meta.ts","kind":"import-statement","original":"../meta"}],"format":"esm"},"packages/plugins/plugin-thread/src/capabilities/settings.ts":{"bytes":1949,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/live-object","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-thread/src/meta.ts","kind":"import-statement","original":"../meta"},{"path":"packages/plugins/plugin-thread/src/types.ts","kind":"import-statement","original":"../types"}],"format":"esm"},"packages/plugins/plugin-thread/src/capabilities/state.ts":{"bytes":2760,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/live-object","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-thread/src/capabilities/capabilities.ts","kind":"import-statement","original":"./capabilities"}],"format":"esm"},"packages/plugins/plugin-thread/src/capabilities/index.ts":{"bytes":1859,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-thread/src/capabilities/capabilities.ts","kind":"import-statement","original":"./capabilities"},{"path":"packages/plugins/plugin-thread/src/capabilities/intent-resolver.ts","kind":"dynamic-import","original":"./intent-resolver"},{"path":"packages/plugins/plugin-thread/src/capabilities/markdown.ts","kind":"dynamic-import","original":"./markdown"},{"path":"packages/plugins/plugin-thread/src/capabilities/react-surface.tsx","kind":"dynamic-import","original":"./react-surface"},{"path":"packages/plugins/plugin-thread/src/capabilities/settings.ts","kind":"dynamic-import","original":"./settings"},{"path":"packages/plugins/plugin-thread/src/capabilities/state.ts","kind":"dynamic-import","original":"./state"}],"format":"esm"},"packages/plugins/plugin-thread/src/translations.ts":{"bytes":5784,"imports":[{"path":"@dxos/plugin-space/types","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-thread/src/meta.ts","kind":"import-statement","original":"./meta"}],"format":"esm"},"packages/plugins/plugin-thread/src/ThreadPlugin.tsx":{"bytes":20483,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/plugin-client","kind":"import-statement","external":true},{"path":"@dxos/plugin-deck","kind":"import-statement","external":true},{"path":"@dxos/plugin-markdown","kind":"import-statement","external":true},{"path":"@dxos/plugin-space","kind":"import-statement","external":true},{"path":"@dxos/plugin-space/types","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui-thread","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-thread/src/capabilities/index.ts","kind":"import-statement","original":"./capabilities"},{"path":"packages/plugins/plugin-thread/src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"packages/plugins/plugin-thread/src/translations.ts","kind":"import-statement","original":"./translations"},{"path":"packages/plugins/plugin-thread/src/types.ts","kind":"import-statement","original":"./types"}],"format":"esm"},"packages/plugins/plugin-thread/src/index.ts":{"bytes":679,"imports":[{"path":"packages/plugins/plugin-thread/src/hooks/index.ts","kind":"import-statement","original":"./hooks"},{"path":"packages/plugins/plugin-thread/src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"packages/plugins/plugin-thread/src/ThreadPlugin.tsx","kind":"import-statement","original":"./ThreadPlugin"}],"format":"esm"}},"outputs":{"packages/plugins/plugin-thread/dist/lib/browser/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":11886},"packages/plugins/plugin-thread/dist/lib/browser/index.mjs":{"imports":[{"path":"packages/plugins/plugin-thread/dist/lib/browser/chunk-VOMIDDNO.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-thread/dist/lib/browser/chunk-BNEWNQBO.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-thread/dist/lib/browser/chunk-YK3ICB7G.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-thread/dist/lib/browser/chunk-NAO3LZMZ.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-thread/dist/lib/browser/chunk-636QDHE3.mjs","kind":"import-statement"},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/plugin-client","kind":"import-statement","external":true},{"path":"@dxos/plugin-deck","kind":"import-statement","external":true},{"path":"@dxos/plugin-markdown","kind":"import-statement","external":true},{"path":"@dxos/plugin-space","kind":"import-statement","external":true},{"path":"@dxos/plugin-space/types","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui-thread","kind":"import-statement","external":true},{"path":"@dxos/plugin-space/types","kind":"import-statement","external":true}],"exports":["THREAD_ITEM","THREAD_PLUGIN","ThreadPlugin","meta","useAnalyticsCallback","useOnEditAnalytics","useStatus"],"entryPoint":"packages/plugins/plugin-thread/src/index.ts","inputs":{"packages/plugins/plugin-thread/src/index.ts":{"bytesInOutput":0},"packages/plugins/plugin-thread/src/ThreadPlugin.tsx":{"bytesInOutput":4846},"packages/plugins/plugin-thread/src/translations.ts":{"bytesInOutput":1741}},"bytes":7278},"packages/plugins/plugin-thread/dist/lib/browser/types.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"packages/plugins/plugin-thread/dist/lib/browser/types.mjs":{"imports":[{"path":"packages/plugins/plugin-thread/dist/lib/browser/chunk-YK3ICB7G.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-thread/dist/lib/browser/chunk-636QDHE3.mjs","kind":"import-statement"}],"exports":["ThreadAction","ThreadSettingsSchema"],"entryPoint":"packages/plugins/plugin-thread/src/types.ts","inputs":{},"bytes":196},"packages/plugins/plugin-thread/dist/lib/browser/intent-resolver-FAFQ54NP.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":14348},"packages/plugins/plugin-thread/dist/lib/browser/intent-resolver-FAFQ54NP.mjs":{"imports":[{"path":"packages/plugins/plugin-thread/dist/lib/browser/chunk-YK3ICB7G.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-thread/dist/lib/browser/chunk-NAO3LZMZ.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-thread/dist/lib/browser/chunk-636QDHE3.mjs","kind":"import-statement"},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/plugin-observability/types","kind":"import-statement","external":true},{"path":"@dxos/plugin-space/types","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"packages/plugins/plugin-thread/src/capabilities/intent-resolver.ts","inputs":{"packages/plugins/plugin-thread/src/capabilities/intent-resolver.ts":{"bytesInOutput":8097}},"bytes":8443},"packages/plugins/plugin-thread/dist/lib/browser/markdown-RPYOUBVR.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":8575},"packages/plugins/plugin-thread/dist/lib/browser/markdown-RPYOUBVR.mjs":{"imports":[{"path":"packages/plugins/plugin-thread/dist/lib/browser/chunk-YK3ICB7G.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-thread/dist/lib/browser/chunk-NAO3LZMZ.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-thread/dist/lib/browser/chunk-636QDHE3.mjs","kind":"import-statement"},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/plugin-markdown","kind":"import-statement","external":true},{"path":"@codemirror/view","kind":"import-statement","external":true},{"path":"@preact/signals-core","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/live-object","kind":"import-statement","external":true},{"path":"@dxos/plugin-space/types","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui-editor","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"packages/plugins/plugin-thread/src/capabilities/markdown.ts","inputs":{"packages/plugins/plugin-thread/src/capabilities/markdown.ts":{"bytesInOutput":469},"packages/plugins/plugin-thread/src/extensions/threads.ts":{"bytesInOutput":2994},"packages/plugins/plugin-thread/src/extensions/index.ts":{"bytesInOutput":0}},"bytes":3888},"packages/plugins/plugin-thread/dist/lib/browser/ThreadContainer-6OP5AG2W.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":951},"packages/plugins/plugin-thread/dist/lib/browser/ThreadContainer-6OP5AG2W.mjs":{"imports":[{"path":"packages/plugins/plugin-thread/dist/lib/browser/chunk-UPKU23DA.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-thread/dist/lib/browser/chunk-BNEWNQBO.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-thread/dist/lib/browser/chunk-636QDHE3.mjs","kind":"import-statement"},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui-stack","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"packages/plugins/plugin-thread/src/components/ThreadContainer.tsx","inputs":{"packages/plugins/plugin-thread/src/components/ThreadContainer.tsx":{"bytesInOutput":325}},"bytes":616},"packages/plugins/plugin-thread/dist/lib/browser/react-surface-Y4MUSICN.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":33823},"packages/plugins/plugin-thread/dist/lib/browser/react-surface-Y4MUSICN.mjs":{"imports":[{"path":"packages/plugins/plugin-thread/dist/lib/browser/chunk-VOMIDDNO.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-thread/dist/lib/browser/chunk-UPKU23DA.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-thread/dist/lib/browser/chunk-BNEWNQBO.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-thread/dist/lib/browser/chunk-YK3ICB7G.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-thread/dist/lib/browser/chunk-NAO3LZMZ.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-thread/dist/lib/browser/chunk-636QDHE3.mjs","kind":"import-statement"},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/local-storage","kind":"import-statement","external":true},{"path":"@dxos/plugin-space/types","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/live-object","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-client/halo","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-editor","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"@dxos/react-ui-thread","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/plugin-space","kind":"import-statement","external":true},{"path":"@dxos/plugin-space/types","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-client/halo","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-attention","kind":"import-statement","external":true},{"path":"@dxos/react-ui-tabs","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui-form","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-thread/dist/lib/browser/ThreadContainer-6OP5AG2W.mjs","kind":"dynamic-import"}],"exports":["default"],"entryPoint":"packages/plugins/plugin-thread/src/capabilities/react-surface.tsx","inputs":{"packages/plugins/plugin-thread/src/capabilities/react-surface.tsx":{"bytesInOutput":2024},"packages/plugins/plugin-thread/src/components/index.ts":{"bytesInOutput":106},"packages/plugins/plugin-thread/src/components/CommentContainer.tsx":{"bytesInOutput":6577},"packages/plugins/plugin-thread/src/components/CommentsContainer.tsx":{"bytesInOutput":1776},"packages/plugins/plugin-thread/src/components/ThreadComplementary.tsx":{"bytesInOutput":4984},"packages/plugins/plugin-thread/src/components/ThreadSettings.tsx":{"bytesInOutput":213}},"bytes":16670},"packages/plugins/plugin-thread/dist/lib/browser/chunk-VOMIDDNO.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":907},"packages/plugins/plugin-thread/dist/lib/browser/chunk-VOMIDDNO.mjs":{"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-thread/dist/lib/browser/intent-resolver-FAFQ54NP.mjs","kind":"dynamic-import"},{"path":"packages/plugins/plugin-thread/dist/lib/browser/markdown-RPYOUBVR.mjs","kind":"dynamic-import"},{"path":"packages/plugins/plugin-thread/dist/lib/browser/react-surface-Y4MUSICN.mjs","kind":"dynamic-import"},{"path":"packages/plugins/plugin-thread/dist/lib/browser/settings-WQTE5AEZ.mjs","kind":"dynamic-import"},{"path":"packages/plugins/plugin-thread/dist/lib/browser/state-GNFUURIC.mjs","kind":"dynamic-import"}],"exports":["IntentResolver","Markdown","ReactSurface","ThreadState"],"inputs":{"packages/plugins/plugin-thread/src/capabilities/index.ts":{"bytesInOutput":382}},"bytes":559},"packages/plugins/plugin-thread/dist/lib/browser/chunk-UPKU23DA.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":24864},"packages/plugins/plugin-thread/dist/lib/browser/chunk-UPKU23DA.mjs":{"imports":[{"path":"packages/plugins/plugin-thread/dist/lib/browser/chunk-BNEWNQBO.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-thread/dist/lib/browser/chunk-636QDHE3.mjs","kind":"import-statement"},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/live-object","kind":"import-statement","external":true},{"path":"@dxos/plugin-space/types","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-client/halo","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-editor","kind":"import-statement","external":true},{"path":"@dxos/react-ui-stack","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"@dxos/react-ui-thread","kind":"import-statement","external":true},{"path":"@codemirror/view","kind":"import-statement","external":true},{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/live-object","kind":"import-statement","external":true},{"path":"@dxos/react-client","kind":"import-statement","external":true},{"path":"@dxos/react-client/halo","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-editor","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"@dxos/react-ui-thread","kind":"import-statement","external":true},{"path":"@codemirror/language","kind":"import-statement","external":true},{"path":"@dxos/react-ui-editor","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"@dxos/display-name","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true}],"exports":["ChatContainer","MessageContainer","command","getMessageMetadata"],"inputs":{"packages/plugins/plugin-thread/src/components/ChatContainer.tsx":{"bytesInOutput":4165},"packages/plugins/plugin-thread/src/components/MessageContainer.tsx":{"bytesInOutput":5797},"packages/plugins/plugin-thread/src/components/command-extension.ts":{"bytesInOutput":688},"packages/plugins/plugin-thread/src/util.ts":{"bytesInOutput":563}},"bytes":11865},"packages/plugins/plugin-thread/dist/lib/browser/chunk-BNEWNQBO.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":4158},"packages/plugins/plugin-thread/dist/lib/browser/chunk-BNEWNQBO.mjs":{"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/plugin-observability/types","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true}],"exports":["useAnalyticsCallback","useOnEditAnalytics","useStatus"],"inputs":{"packages/plugins/plugin-thread/src/hooks/useStatus.ts":{"bytesInOutput":748},"packages/plugins/plugin-thread/src/hooks/analytics.ts":{"bytesInOutput":976},"packages/plugins/plugin-thread/src/hooks/index.ts":{"bytesInOutput":0}},"bytes":1954},"packages/plugins/plugin-thread/dist/lib/browser/settings-WQTE5AEZ.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":966},"packages/plugins/plugin-thread/dist/lib/browser/settings-WQTE5AEZ.mjs":{"imports":[{"path":"packages/plugins/plugin-thread/dist/lib/browser/chunk-YK3ICB7G.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-thread/dist/lib/browser/chunk-636QDHE3.mjs","kind":"import-statement"},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/live-object","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"packages/plugins/plugin-thread/src/capabilities/settings.ts","inputs":{"packages/plugins/plugin-thread/src/capabilities/settings.ts":{"bytesInOutput":307}},"bytes":579},"packages/plugins/plugin-thread/dist/lib/browser/chunk-YK3ICB7G.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":4557},"packages/plugins/plugin-thread/dist/lib/browser/chunk-YK3ICB7G.mjs":{"imports":[{"path":"packages/plugins/plugin-thread/dist/lib/browser/chunk-636QDHE3.mjs","kind":"import-statement"},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/plugin-space/types","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true}],"exports":["ThreadAction","ThreadSettingsSchema"],"inputs":{"packages/plugins/plugin-thread/src/types.ts":{"bytesInOutput":2002}},"bytes":2202},"packages/plugins/plugin-thread/dist/lib/browser/state-GNFUURIC.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1399},"packages/plugins/plugin-thread/dist/lib/browser/state-GNFUURIC.mjs":{"imports":[{"path":"packages/plugins/plugin-thread/dist/lib/browser/chunk-NAO3LZMZ.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-thread/dist/lib/browser/chunk-636QDHE3.mjs","kind":"import-statement"},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/live-object","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"packages/plugins/plugin-thread/src/capabilities/state.ts","inputs":{"packages/plugins/plugin-thread/src/capabilities/state.ts":{"bytesInOutput":529}},"bytes":765},"packages/plugins/plugin-thread/dist/lib/browser/chunk-NAO3LZMZ.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1052},"packages/plugins/plugin-thread/dist/lib/browser/chunk-NAO3LZMZ.mjs":{"imports":[{"path":"packages/plugins/plugin-thread/dist/lib/browser/chunk-636QDHE3.mjs","kind":"import-statement"},{"path":"@dxos/app-framework","kind":"import-statement","external":true}],"exports":["ThreadCapabilities"],"inputs":{"packages/plugins/plugin-thread/src/capabilities/capabilities.ts":{"bytesInOutput":343}},"bytes":545},"packages/plugins/plugin-thread/dist/lib/browser/chunk-636QDHE3.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":791},"packages/plugins/plugin-thread/dist/lib/browser/chunk-636QDHE3.mjs":{"imports":[],"exports":["THREAD_ITEM","THREAD_PLUGIN","meta"],"inputs":{"packages/plugins/plugin-thread/src/meta.ts":{"bytesInOutput":306}},"bytes":448}}}
1
+ {"inputs":{"packages/plugins/plugin-thread/src/meta.ts":{"bytes":1656,"imports":[],"format":"esm"},"packages/plugins/plugin-thread/src/capabilities/capabilities.ts":{"bytes":2542,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-thread/src/meta.ts","kind":"import-statement","original":"../meta"}],"format":"esm"},"packages/plugins/plugin-thread/src/types.ts":{"bytes":8890,"imports":[{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/plugin-space/types","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-thread/src/meta.ts","kind":"import-statement","original":"./meta"}],"format":"esm"},"packages/plugins/plugin-thread/src/capabilities/intent-resolver.ts":{"bytes":32523,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/plugin-observability/types","kind":"import-statement","external":true},{"path":"@dxos/plugin-space/types","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-thread/src/capabilities/capabilities.ts","kind":"import-statement","original":"./capabilities"},{"path":"packages/plugins/plugin-thread/src/meta.ts","kind":"import-statement","original":"../meta"},{"path":"packages/plugins/plugin-thread/src/types.ts","kind":"import-statement","original":"../types"}],"format":"esm"},"packages/plugins/plugin-thread/src/extensions/threads.ts":{"bytes":14170,"imports":[{"path":"@codemirror/view","kind":"import-statement","external":true},{"path":"@preact/signals-core","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/live-object","kind":"import-statement","external":true},{"path":"@dxos/plugin-space/types","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui-editor","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-thread/src/types.ts","kind":"import-statement","original":"../types"}],"format":"esm"},"packages/plugins/plugin-thread/src/extensions/index.ts":{"bytes":512,"imports":[{"path":"packages/plugins/plugin-thread/src/extensions/threads.ts","kind":"import-statement","original":"./threads"}],"format":"esm"},"packages/plugins/plugin-thread/src/capabilities/markdown.ts":{"bytes":2695,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/plugin-markdown","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-thread/src/capabilities/capabilities.ts","kind":"import-statement","original":"./capabilities"},{"path":"packages/plugins/plugin-thread/src/extensions/index.ts","kind":"import-statement","original":"../extensions"}],"format":"esm"},"packages/plugins/plugin-thread/src/components/command-extension.ts":{"bytes":3522,"imports":[{"path":"@codemirror/language","kind":"import-statement","external":true},{"path":"@dxos/react-ui-editor","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/plugin-thread/src/hooks/useStatus.ts":{"bytes":3661,"imports":[{"path":"react","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/plugin-thread/src/hooks/analytics.ts":{"bytes":4342,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/plugin-observability/types","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/plugin-thread/src/hooks/index.ts":{"bytes":602,"imports":[{"path":"packages/plugins/plugin-thread/src/hooks/useStatus.ts","kind":"import-statement","original":"./useStatus"},{"path":"packages/plugins/plugin-thread/src/hooks/analytics.ts","kind":"import-statement","original":"./analytics"}],"format":"esm"},"packages/plugins/plugin-thread/src/util.ts":{"bytes":3056,"imports":[{"path":"@dxos/display-name","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/plugin-thread/src/components/MessageContainer.tsx":{"bytes":22181,"imports":[{"path":"@codemirror/view","kind":"import-statement","external":true},{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/live-object","kind":"import-statement","external":true},{"path":"@dxos/react-client","kind":"import-statement","external":true},{"path":"@dxos/react-client/halo","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-editor","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"@dxos/react-ui-thread","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-thread/src/components/command-extension.ts","kind":"import-statement","original":"./command-extension"},{"path":"packages/plugins/plugin-thread/src/hooks/index.ts","kind":"import-statement","original":"../hooks"},{"path":"packages/plugins/plugin-thread/src/meta.ts","kind":"import-statement","original":"../meta"},{"path":"packages/plugins/plugin-thread/src/util.ts","kind":"import-statement","original":"../util"}],"format":"esm"},"packages/plugins/plugin-thread/src/components/CommentContainer.tsx":{"bytes":24867,"imports":[{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/live-object","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-client/halo","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-editor","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"@dxos/react-ui-thread","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-thread/src/components/MessageContainer.tsx","kind":"import-statement","original":"./MessageContainer"},{"path":"packages/plugins/plugin-thread/src/components/command-extension.ts","kind":"import-statement","original":"./command-extension"},{"path":"packages/plugins/plugin-thread/src/hooks/index.ts","kind":"import-statement","original":"../hooks"},{"path":"packages/plugins/plugin-thread/src/meta.ts","kind":"import-statement","original":"../meta"},{"path":"packages/plugins/plugin-thread/src/util.ts","kind":"import-statement","original":"../util"}],"format":"esm"},"packages/plugins/plugin-thread/src/components/CommentsContainer.tsx":{"bytes":7688,"imports":[{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-thread/src/components/CommentContainer.tsx","kind":"import-statement","original":"./CommentContainer"},{"path":"packages/plugins/plugin-thread/src/meta.ts","kind":"import-statement","original":"../meta"}],"format":"esm"},"packages/plugins/plugin-thread/src/components/ChatContainer.tsx":{"bytes":18962,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/live-object","kind":"import-statement","external":true},{"path":"@dxos/plugin-space/types","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-client/halo","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-editor","kind":"import-statement","external":true},{"path":"@dxos/react-ui-stack","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"@dxos/react-ui-thread","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-thread/src/components/MessageContainer.tsx","kind":"import-statement","original":"./MessageContainer"},{"path":"packages/plugins/plugin-thread/src/components/command-extension.ts","kind":"import-statement","original":"./command-extension"},{"path":"packages/plugins/plugin-thread/src/hooks/index.ts","kind":"import-statement","original":"../hooks"},{"path":"packages/plugins/plugin-thread/src/meta.ts","kind":"import-statement","original":"../meta"},{"path":"packages/plugins/plugin-thread/src/util.ts","kind":"import-statement","original":"../util"}],"format":"esm"},"packages/plugins/plugin-thread/src/components/ThreadComplementary.tsx":{"bytes":20111,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/plugin-space","kind":"import-statement","external":true},{"path":"@dxos/plugin-space/types","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-client/halo","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-attention","kind":"import-statement","external":true},{"path":"@dxos/react-ui-tabs","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-thread/src/capabilities/index.ts","kind":"import-statement","original":"../capabilities"},{"path":"packages/plugins/plugin-thread/src/components/index.ts","kind":"import-statement","original":"../components"},{"path":"packages/plugins/plugin-thread/src/meta.ts","kind":"import-statement","original":"../meta"},{"path":"packages/plugins/plugin-thread/src/types.ts","kind":"import-statement","original":"../types"}],"format":"esm"},"packages/plugins/plugin-thread/src/components/ThreadSettings.tsx":{"bytes":1673,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui-form","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/plugin-thread/src/components/ChannelContainer.tsx":{"bytes":9290,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui-editor","kind":"import-statement","external":true},{"path":"@dxos/react-ui-menu","kind":"import-statement","external":true},{"path":"@dxos/react-ui-stack","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-thread/src/components/ChatContainer.tsx","kind":"import-statement","original":"./ChatContainer"},{"path":"packages/plugins/plugin-thread/src/capabilities/index.ts","kind":"import-statement","original":"../capabilities"}],"format":"esm"},"packages/plugins/plugin-thread/src/components/index.ts":{"bytes":1618,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-thread/src/components/CommentContainer.tsx","kind":"import-statement","original":"./CommentContainer"},{"path":"packages/plugins/plugin-thread/src/components/CommentsContainer.tsx","kind":"import-statement","original":"./CommentsContainer"},{"path":"packages/plugins/plugin-thread/src/components/ChatContainer.tsx","kind":"import-statement","original":"./ChatContainer"},{"path":"packages/plugins/plugin-thread/src/components/MessageContainer.tsx","kind":"import-statement","original":"./MessageContainer"},{"path":"packages/plugins/plugin-thread/src/components/ThreadComplementary.tsx","kind":"import-statement","original":"./ThreadComplementary"},{"path":"packages/plugins/plugin-thread/src/components/ThreadSettings.tsx","kind":"import-statement","original":"./ThreadSettings"},{"path":"packages/plugins/plugin-thread/src/components/ChannelContainer.tsx","kind":"dynamic-import","original":"./ChannelContainer"}],"format":"esm"},"packages/plugins/plugin-thread/src/capabilities/react-surface.tsx":{"bytes":7856,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/local-storage","kind":"import-statement","external":true},{"path":"@dxos/plugin-space/types","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-thread/src/components/index.ts","kind":"import-statement","original":"../components"},{"path":"packages/plugins/plugin-thread/src/meta.ts","kind":"import-statement","original":"../meta"}],"format":"esm"},"packages/plugins/plugin-thread/src/capabilities/settings.ts":{"bytes":1949,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/live-object","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-thread/src/meta.ts","kind":"import-statement","original":"../meta"},{"path":"packages/plugins/plugin-thread/src/types.ts","kind":"import-statement","original":"../types"}],"format":"esm"},"packages/plugins/plugin-thread/src/capabilities/state.ts":{"bytes":2844,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/live-object","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-thread/src/capabilities/capabilities.ts","kind":"import-statement","original":"./capabilities"}],"format":"esm"},"packages/plugins/plugin-thread/src/capabilities/index.ts":{"bytes":1859,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-thread/src/capabilities/capabilities.ts","kind":"import-statement","original":"./capabilities"},{"path":"packages/plugins/plugin-thread/src/capabilities/intent-resolver.ts","kind":"dynamic-import","original":"./intent-resolver"},{"path":"packages/plugins/plugin-thread/src/capabilities/markdown.ts","kind":"dynamic-import","original":"./markdown"},{"path":"packages/plugins/plugin-thread/src/capabilities/react-surface.tsx","kind":"dynamic-import","original":"./react-surface"},{"path":"packages/plugins/plugin-thread/src/capabilities/settings.ts","kind":"dynamic-import","original":"./settings"},{"path":"packages/plugins/plugin-thread/src/capabilities/state.ts","kind":"dynamic-import","original":"./state"}],"format":"esm"},"packages/plugins/plugin-thread/src/events.ts":{"bytes":1278,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-thread/src/meta.ts","kind":"import-statement","original":"./meta"}],"format":"esm"},"packages/plugins/plugin-thread/src/translations.ts":{"bytes":5784,"imports":[{"path":"@dxos/plugin-space/types","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-thread/src/meta.ts","kind":"import-statement","original":"./meta"}],"format":"esm"},"packages/plugins/plugin-thread/src/ThreadPlugin.tsx":{"bytes":20854,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/plugin-client","kind":"import-statement","external":true},{"path":"@dxos/plugin-deck","kind":"import-statement","external":true},{"path":"@dxos/plugin-markdown","kind":"import-statement","external":true},{"path":"@dxos/plugin-space","kind":"import-statement","external":true},{"path":"@dxos/plugin-space/types","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui-thread","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-thread/src/capabilities/index.ts","kind":"import-statement","original":"./capabilities"},{"path":"packages/plugins/plugin-thread/src/events.ts","kind":"import-statement","original":"./events"},{"path":"packages/plugins/plugin-thread/src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"packages/plugins/plugin-thread/src/translations.ts","kind":"import-statement","original":"./translations"},{"path":"packages/plugins/plugin-thread/src/types.ts","kind":"import-statement","original":"./types"}],"format":"esm"},"packages/plugins/plugin-thread/src/index.ts":{"bytes":958,"imports":[{"path":"packages/plugins/plugin-thread/src/capabilities/index.ts","kind":"import-statement","original":"./capabilities"},{"path":"packages/plugins/plugin-thread/src/events.ts","kind":"import-statement","original":"./events"},{"path":"packages/plugins/plugin-thread/src/hooks/index.ts","kind":"import-statement","original":"./hooks"},{"path":"packages/plugins/plugin-thread/src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"packages/plugins/plugin-thread/src/ThreadPlugin.tsx","kind":"import-statement","original":"./ThreadPlugin"}],"format":"esm"}},"outputs":{"packages/plugins/plugin-thread/dist/lib/browser/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":12541},"packages/plugins/plugin-thread/dist/lib/browser/index.mjs":{"imports":[{"path":"packages/plugins/plugin-thread/dist/lib/browser/chunk-K3NUEKPS.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-thread/dist/lib/browser/chunk-OPDRTA7Q.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-thread/dist/lib/browser/chunk-NOOMCX5E.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-thread/dist/lib/browser/chunk-WBJLUUOK.mjs","kind":"import-statement"},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/plugin-client","kind":"import-statement","external":true},{"path":"@dxos/plugin-deck","kind":"import-statement","external":true},{"path":"@dxos/plugin-markdown","kind":"import-statement","external":true},{"path":"@dxos/plugin-space","kind":"import-statement","external":true},{"path":"@dxos/plugin-space/types","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui-thread","kind":"import-statement","external":true},{"path":"@dxos/plugin-space/types","kind":"import-statement","external":true}],"exports":["THREAD_ITEM","THREAD_PLUGIN","ThreadCapabilities","ThreadEvents","ThreadPlugin","meta","useAnalyticsCallback","useOnEditAnalytics","useStatus"],"entryPoint":"packages/plugins/plugin-thread/src/index.ts","inputs":{"packages/plugins/plugin-thread/src/index.ts":{"bytesInOutput":0},"packages/plugins/plugin-thread/src/events.ts":{"bytesInOutput":224},"packages/plugins/plugin-thread/src/ThreadPlugin.tsx":{"bytesInOutput":4914},"packages/plugins/plugin-thread/src/translations.ts":{"bytesInOutput":1741}},"bytes":7648},"packages/plugins/plugin-thread/dist/lib/browser/types.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"packages/plugins/plugin-thread/dist/lib/browser/types.mjs":{"imports":[{"path":"packages/plugins/plugin-thread/dist/lib/browser/chunk-OPDRTA7Q.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-thread/dist/lib/browser/chunk-WBJLUUOK.mjs","kind":"import-statement"}],"exports":["ThreadAction","ThreadSettingsSchema"],"entryPoint":"packages/plugins/plugin-thread/src/types.ts","inputs":{},"bytes":196},"packages/plugins/plugin-thread/dist/lib/browser/intent-resolver-WAVFYWIS.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":14364},"packages/plugins/plugin-thread/dist/lib/browser/intent-resolver-WAVFYWIS.mjs":{"imports":[{"path":"packages/plugins/plugin-thread/dist/lib/browser/chunk-OPDRTA7Q.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-thread/dist/lib/browser/chunk-NOOMCX5E.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-thread/dist/lib/browser/chunk-WBJLUUOK.mjs","kind":"import-statement"},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/plugin-observability/types","kind":"import-statement","external":true},{"path":"@dxos/plugin-space/types","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"packages/plugins/plugin-thread/src/capabilities/intent-resolver.ts","inputs":{"packages/plugins/plugin-thread/src/capabilities/intent-resolver.ts":{"bytesInOutput":8107}},"bytes":8453},"packages/plugins/plugin-thread/dist/lib/browser/markdown-R6VIT67G.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":8538},"packages/plugins/plugin-thread/dist/lib/browser/markdown-R6VIT67G.mjs":{"imports":[{"path":"packages/plugins/plugin-thread/dist/lib/browser/chunk-OPDRTA7Q.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-thread/dist/lib/browser/chunk-NOOMCX5E.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-thread/dist/lib/browser/chunk-WBJLUUOK.mjs","kind":"import-statement"},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/plugin-markdown","kind":"import-statement","external":true},{"path":"@codemirror/view","kind":"import-statement","external":true},{"path":"@preact/signals-core","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/live-object","kind":"import-statement","external":true},{"path":"@dxos/plugin-space/types","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui-editor","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"packages/plugins/plugin-thread/src/capabilities/markdown.ts","inputs":{"packages/plugins/plugin-thread/src/capabilities/markdown.ts":{"bytesInOutput":469},"packages/plugins/plugin-thread/src/extensions/threads.ts":{"bytesInOutput":2972},"packages/plugins/plugin-thread/src/extensions/index.ts":{"bytesInOutput":0}},"bytes":3866},"packages/plugins/plugin-thread/dist/lib/browser/ChannelContainer-6YTHIJPS.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":4871},"packages/plugins/plugin-thread/dist/lib/browser/ChannelContainer-6YTHIJPS.mjs":{"imports":[{"path":"packages/plugins/plugin-thread/dist/lib/browser/chunk-3BIHVVEA.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-thread/dist/lib/browser/chunk-K3NUEKPS.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-thread/dist/lib/browser/chunk-NOOMCX5E.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-thread/dist/lib/browser/chunk-WBJLUUOK.mjs","kind":"import-statement"},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui-editor","kind":"import-statement","external":true},{"path":"@dxos/react-ui-menu","kind":"import-statement","external":true},{"path":"@dxos/react-ui-stack","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"packages/plugins/plugin-thread/src/components/ChannelContainer.tsx","inputs":{"packages/plugins/plugin-thread/src/components/ChannelContainer.tsx":{"bytesInOutput":2128}},"bytes":2483},"packages/plugins/plugin-thread/dist/lib/browser/react-surface-2MKPJW4D.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":33334},"packages/plugins/plugin-thread/dist/lib/browser/react-surface-2MKPJW4D.mjs":{"imports":[{"path":"packages/plugins/plugin-thread/dist/lib/browser/chunk-3BIHVVEA.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-thread/dist/lib/browser/chunk-K3NUEKPS.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-thread/dist/lib/browser/chunk-OPDRTA7Q.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-thread/dist/lib/browser/chunk-NOOMCX5E.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-thread/dist/lib/browser/chunk-WBJLUUOK.mjs","kind":"import-statement"},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/local-storage","kind":"import-statement","external":true},{"path":"@dxos/plugin-space/types","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/live-object","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-client/halo","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-editor","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"@dxos/react-ui-thread","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/plugin-space","kind":"import-statement","external":true},{"path":"@dxos/plugin-space/types","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-client/halo","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-attention","kind":"import-statement","external":true},{"path":"@dxos/react-ui-tabs","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui-form","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-thread/dist/lib/browser/ChannelContainer-6YTHIJPS.mjs","kind":"dynamic-import"}],"exports":["default"],"entryPoint":"packages/plugins/plugin-thread/src/capabilities/react-surface.tsx","inputs":{"packages/plugins/plugin-thread/src/capabilities/react-surface.tsx":{"bytesInOutput":1744},"packages/plugins/plugin-thread/src/components/index.ts":{"bytesInOutput":108},"packages/plugins/plugin-thread/src/components/CommentContainer.tsx":{"bytesInOutput":6566},"packages/plugins/plugin-thread/src/components/CommentsContainer.tsx":{"bytesInOutput":1776},"packages/plugins/plugin-thread/src/components/ThreadComplementary.tsx":{"bytesInOutput":4973},"packages/plugins/plugin-thread/src/components/ThreadSettings.tsx":{"bytesInOutput":213}},"bytes":16339},"packages/plugins/plugin-thread/dist/lib/browser/chunk-3BIHVVEA.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":24816},"packages/plugins/plugin-thread/dist/lib/browser/chunk-3BIHVVEA.mjs":{"imports":[{"path":"packages/plugins/plugin-thread/dist/lib/browser/chunk-K3NUEKPS.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-thread/dist/lib/browser/chunk-WBJLUUOK.mjs","kind":"import-statement"},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/live-object","kind":"import-statement","external":true},{"path":"@dxos/plugin-space/types","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-client/halo","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-editor","kind":"import-statement","external":true},{"path":"@dxos/react-ui-stack","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"@dxos/react-ui-thread","kind":"import-statement","external":true},{"path":"@codemirror/view","kind":"import-statement","external":true},{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/live-object","kind":"import-statement","external":true},{"path":"@dxos/react-client","kind":"import-statement","external":true},{"path":"@dxos/react-client/halo","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-editor","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"@dxos/react-ui-thread","kind":"import-statement","external":true},{"path":"@codemirror/language","kind":"import-statement","external":true},{"path":"@dxos/react-ui-editor","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"@dxos/display-name","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true}],"exports":["ChatContainer","MessageContainer","command","getMessageMetadata"],"inputs":{"packages/plugins/plugin-thread/src/components/ChatContainer.tsx":{"bytesInOutput":4154},"packages/plugins/plugin-thread/src/components/MessageContainer.tsx":{"bytesInOutput":5786},"packages/plugins/plugin-thread/src/components/command-extension.ts":{"bytesInOutput":688},"packages/plugins/plugin-thread/src/util.ts":{"bytesInOutput":563}},"bytes":11843},"packages/plugins/plugin-thread/dist/lib/browser/chunk-K3NUEKPS.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":4980},"packages/plugins/plugin-thread/dist/lib/browser/chunk-K3NUEKPS.mjs":{"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/plugin-observability/types","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-thread/dist/lib/browser/intent-resolver-WAVFYWIS.mjs","kind":"dynamic-import"},{"path":"packages/plugins/plugin-thread/dist/lib/browser/markdown-R6VIT67G.mjs","kind":"dynamic-import"},{"path":"packages/plugins/plugin-thread/dist/lib/browser/react-surface-2MKPJW4D.mjs","kind":"dynamic-import"},{"path":"packages/plugins/plugin-thread/dist/lib/browser/settings-2EJW5SUY.mjs","kind":"dynamic-import"},{"path":"packages/plugins/plugin-thread/dist/lib/browser/state-HPUFZBB7.mjs","kind":"dynamic-import"}],"exports":["IntentResolver","Markdown","ReactSurface","ThreadState","useAnalyticsCallback","useOnEditAnalytics","useStatus"],"inputs":{"packages/plugins/plugin-thread/src/hooks/useStatus.ts":{"bytesInOutput":748},"packages/plugins/plugin-thread/src/hooks/analytics.ts":{"bytesInOutput":976},"packages/plugins/plugin-thread/src/hooks/index.ts":{"bytesInOutput":0},"packages/plugins/plugin-thread/src/capabilities/index.ts":{"bytesInOutput":382}},"bytes":2458},"packages/plugins/plugin-thread/dist/lib/browser/settings-2EJW5SUY.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":966},"packages/plugins/plugin-thread/dist/lib/browser/settings-2EJW5SUY.mjs":{"imports":[{"path":"packages/plugins/plugin-thread/dist/lib/browser/chunk-OPDRTA7Q.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-thread/dist/lib/browser/chunk-WBJLUUOK.mjs","kind":"import-statement"},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/live-object","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"packages/plugins/plugin-thread/src/capabilities/settings.ts","inputs":{"packages/plugins/plugin-thread/src/capabilities/settings.ts":{"bytesInOutput":307}},"bytes":579},"packages/plugins/plugin-thread/dist/lib/browser/chunk-OPDRTA7Q.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":4644},"packages/plugins/plugin-thread/dist/lib/browser/chunk-OPDRTA7Q.mjs":{"imports":[{"path":"packages/plugins/plugin-thread/dist/lib/browser/chunk-WBJLUUOK.mjs","kind":"import-statement"},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/plugin-space/types","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true}],"exports":["ThreadAction","ThreadSettingsSchema"],"inputs":{"packages/plugins/plugin-thread/src/types.ts":{"bytesInOutput":2002}},"bytes":2202},"packages/plugins/plugin-thread/dist/lib/browser/state-HPUFZBB7.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1445},"packages/plugins/plugin-thread/dist/lib/browser/state-HPUFZBB7.mjs":{"imports":[{"path":"packages/plugins/plugin-thread/dist/lib/browser/chunk-NOOMCX5E.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-thread/dist/lib/browser/chunk-WBJLUUOK.mjs","kind":"import-statement"},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/live-object","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"packages/plugins/plugin-thread/src/capabilities/state.ts","inputs":{"packages/plugins/plugin-thread/src/capabilities/state.ts":{"bytesInOutput":549}},"bytes":785},"packages/plugins/plugin-thread/dist/lib/browser/chunk-NOOMCX5E.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1370},"packages/plugins/plugin-thread/dist/lib/browser/chunk-NOOMCX5E.mjs":{"imports":[{"path":"packages/plugins/plugin-thread/dist/lib/browser/chunk-WBJLUUOK.mjs","kind":"import-statement"},{"path":"@dxos/app-framework","kind":"import-statement","external":true}],"exports":["ThreadCapabilities"],"inputs":{"packages/plugins/plugin-thread/src/capabilities/capabilities.ts":{"bytesInOutput":434}},"bytes":636},"packages/plugins/plugin-thread/dist/lib/browser/chunk-WBJLUUOK.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":783},"packages/plugins/plugin-thread/dist/lib/browser/chunk-WBJLUUOK.mjs":{"imports":[],"exports":["THREAD_ITEM","THREAD_PLUGIN","meta"],"inputs":{"packages/plugins/plugin-thread/src/meta.ts":{"bytesInOutput":306}},"bytes":448}}}
@@ -1,21 +1,20 @@
1
- import "./chunk-VOMIDDNO.mjs";
2
1
  import {
3
2
  MessageContainer,
4
3
  command,
5
4
  getMessageMetadata
6
- } from "./chunk-UPKU23DA.mjs";
5
+ } from "./chunk-3BIHVVEA.mjs";
7
6
  import {
8
7
  useStatus
9
- } from "./chunk-BNEWNQBO.mjs";
8
+ } from "./chunk-K3NUEKPS.mjs";
10
9
  import {
11
10
  ThreadAction
12
- } from "./chunk-YK3ICB7G.mjs";
11
+ } from "./chunk-OPDRTA7Q.mjs";
13
12
  import {
14
13
  ThreadCapabilities
15
- } from "./chunk-NAO3LZMZ.mjs";
14
+ } from "./chunk-NOOMCX5E.mjs";
16
15
  import {
17
16
  THREAD_PLUGIN
18
- } from "./chunk-636QDHE3.mjs";
17
+ } from "./chunk-WBJLUUOK.mjs";
19
18
 
20
19
  // packages/plugins/plugin-thread/src/capabilities/react-surface.tsx
21
20
  import React5 from "react";
@@ -166,7 +165,7 @@ var CommentContainer = ({ thread, detached, current, onAttend, onComment, onReso
166
165
  onResolve: handleResolve
167
166
  }), onThreadDelete && /* @__PURE__ */ React.createElement(DeleteThreadButton, {
168
167
  onDelete: handleThreadDelete
169
- }))), RefArray.allResolvedTargets(thread.messages?.filter(isNonNullable) ?? []).map((message) => /* @__PURE__ */ React.createElement(MessageContainer, {
168
+ }))), RefArray.targets(thread.messages?.filter(isNonNullable) ?? []).map((message) => /* @__PURE__ */ React.createElement(MessageContainer, {
170
169
  key: message.id,
171
170
  message,
172
171
  members,
@@ -261,7 +260,7 @@ var ThreadComplementary = ({ subject }) => {
261
260
  createSort,
262
261
  subject
263
262
  ]);
264
- const threadObjects = RefArray2.allResolvedTargets(subject.threads ?? []);
263
+ const threadObjects = RefArray2.targets(subject.threads ?? []);
265
264
  const threads = useMemo2(() => {
266
265
  return threadObjects.concat(drafts ?? []).filter(isNonNullable2);
267
266
  }, [
@@ -378,7 +377,7 @@ var ThreadSettings = ({ settings }) => {
378
377
  };
379
378
 
380
379
  // packages/plugins/plugin-thread/src/components/index.ts
381
- var ThreadContainer = lazy(() => import("./ThreadContainer-6OP5AG2W.mjs"));
380
+ var ChannelContainer = lazy(() => import("./ChannelContainer-6YTHIJPS.mjs"));
382
381
 
383
382
  // packages/plugins/plugin-thread/src/capabilities/react-surface.tsx
384
383
  var react_surface_default = () => contributes(Capabilities.ReactSurface, [
@@ -386,27 +385,15 @@ var react_surface_default = () => contributes(Capabilities.ReactSurface, [
386
385
  id: `${THREAD_PLUGIN}/channel`,
387
386
  role: "article",
388
387
  filter: (data) => data.subject instanceof ChannelType && !!data.subject.threads[0],
389
- component: ({ data, role }) => {
388
+ component: ({ data: { subject: channel }, role }) => {
390
389
  const layout = useLayout();
391
- const channel = data.subject;
392
- void channel.threads[0].load();
393
- const thread = channel.threads[0].target;
394
- if (!thread) {
395
- return null;
396
- }
397
390
  const currentPosition = layout.active.findIndex((id) => id === channel.id);
398
- if (currentPosition > 0) {
399
- const objectToTheLeft = layout.active[currentPosition - 1];
400
- const context = getSpace2(channel)?.db.getObjectById(objectToTheLeft);
401
- return /* @__PURE__ */ React5.createElement(ThreadContainer, {
402
- role,
403
- thread,
404
- context
405
- });
406
- }
407
- return /* @__PURE__ */ React5.createElement(ThreadContainer, {
391
+ const objectToTheLeft = layout.active[currentPosition - 1];
392
+ const context = currentPosition > 0 ? getSpace2(channel)?.db.getObjectById(objectToTheLeft) : void 0;
393
+ return /* @__PURE__ */ React5.createElement(ChannelContainer, {
408
394
  role,
409
- thread
395
+ channel,
396
+ context
410
397
  });
411
398
  }
412
399
  }),
@@ -430,4 +417,4 @@ var react_surface_default = () => contributes(Capabilities.ReactSurface, [
430
417
  export {
431
418
  react_surface_default as default
432
419
  };
433
- //# sourceMappingURL=react-surface-Y4MUSICN.mjs.map
420
+ //# sourceMappingURL=react-surface-2MKPJW4D.mjs.map