@dxos/plugin-thread 0.6.13-main.ed424a1 → 0.6.13-staging.1e988a3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/browser/{ThreadArticle-53PBPWLD.mjs → ThreadArticle-O64ZECMF.mjs} +3 -3
- package/dist/lib/browser/{ThreadMain-FZAZVPHO.mjs → ThreadMain-ZDCRC6RG.mjs} +3 -3
- package/dist/lib/browser/chunk-5IBJO53M.mjs +21 -0
- package/dist/lib/browser/chunk-5IBJO53M.mjs.map +7 -0
- package/dist/lib/browser/{chunk-JFQZ5W2I.mjs → chunk-GKPZHUT3.mjs} +2 -2
- package/dist/lib/browser/{chunk-JFQZ5W2I.mjs.map → chunk-GKPZHUT3.mjs.map} +1 -1
- package/dist/lib/browser/{chunk-DIFHKCVY.mjs → chunk-P7ZE5N5M.mjs} +11 -13
- package/dist/lib/browser/chunk-P7ZE5N5M.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +393 -411
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/meta.mjs +1 -1
- package/dist/lib/browser/types.mjs +2 -2
- package/dist/lib/node/{ThreadArticle-UORKW5YD.cjs → ThreadArticle-DO56JXBU.cjs} +7 -7
- package/dist/lib/node/{ThreadMain-FVSLLIWS.cjs → ThreadMain-XJX75GHG.cjs} +7 -7
- package/dist/lib/node/{chunk-FK2N2QH7.cjs → chunk-5PZNPPQF.cjs} +63 -65
- package/dist/lib/node/chunk-5PZNPPQF.cjs.map +7 -0
- package/dist/lib/node/{chunk-JIJ7Z6NO.cjs → chunk-BWBONZGU.cjs} +22 -7
- package/dist/lib/node/chunk-BWBONZGU.cjs.map +7 -0
- package/dist/lib/node/{chunk-FOZUQZF4.cjs → chunk-D5GOVXHS.cjs} +6 -6
- package/dist/lib/node/{chunk-FOZUQZF4.cjs.map → chunk-D5GOVXHS.cjs.map} +1 -1
- package/dist/lib/node/index.cjs +441 -455
- package/dist/lib/node/index.cjs.map +4 -4
- package/dist/lib/node/meta.cjs +4 -4
- package/dist/lib/node/meta.cjs.map +1 -1
- package/dist/lib/node/meta.json +1 -1
- package/dist/lib/node/types.cjs +3 -3
- package/dist/lib/node/types.cjs.map +1 -1
- package/dist/types/src/ThreadPlugin.d.ts.map +1 -1
- package/dist/types/src/components/ChatContainer.d.ts.map +1 -1
- package/dist/types/src/components/CommentContainer.d.ts +1 -1
- package/dist/types/src/components/CommentContainer.d.ts.map +1 -1
- package/dist/types/src/components/CommentsContainer.d.ts +5 -1
- package/dist/types/src/components/CommentsContainer.d.ts.map +1 -1
- package/dist/types/src/components/MessageContainer.d.ts.map +1 -1
- package/dist/types/src/components/index.d.ts +3 -4
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/components/testing.d.ts +0 -2
- package/dist/types/src/components/testing.d.ts.map +1 -1
- package/dist/types/src/components/types.d.ts +2 -2
- package/dist/types/src/components/types.d.ts.map +1 -1
- package/dist/types/src/meta.d.ts +9 -3
- package/dist/types/src/meta.d.ts.map +1 -1
- package/dist/types/src/types.d.ts +1 -6
- package/dist/types/src/types.d.ts.map +1 -1
- package/dist/types/src/types.test.d.ts +2 -0
- package/dist/types/src/types.test.d.ts.map +1 -0
- package/package.json +37 -40
- package/src/ThreadPlugin.tsx +310 -120
- package/src/components/ChatContainer.tsx +8 -7
- package/src/components/CommentContainer.tsx +19 -18
- package/src/components/Comments.stories.tsx +2 -2
- package/src/components/CommentsContainer.tsx +31 -18
- package/src/components/MessageContainer.tsx +3 -3
- package/src/components/index.ts +2 -3
- package/src/components/types.ts +2 -2
- package/src/meta.tsx +20 -0
- package/src/types.test.ts +13 -0
- package/src/types.ts +3 -8
- package/dist/lib/browser/chunk-5G3KL6TC.mjs +0 -16
- package/dist/lib/browser/chunk-5G3KL6TC.mjs.map +0 -7
- package/dist/lib/browser/chunk-DIFHKCVY.mjs.map +0 -7
- package/dist/lib/node/chunk-FK2N2QH7.cjs.map +0 -7
- package/dist/lib/node/chunk-JIJ7Z6NO.cjs.map +0 -7
- package/dist/lib/node-esm/ThreadArticle-E4MLJZIM.mjs +0 -19
- package/dist/lib/node-esm/ThreadArticle-E4MLJZIM.mjs.map +0 -7
- package/dist/lib/node-esm/ThreadMain-Y6JU6S7A.mjs +0 -27
- package/dist/lib/node-esm/ThreadMain-Y6JU6S7A.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-DC5ZA6H5.mjs +0 -18
- package/dist/lib/node-esm/chunk-DC5ZA6H5.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-SJEUDBZV.mjs +0 -413
- package/dist/lib/node-esm/chunk-SJEUDBZV.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-ZXIPFXSA.mjs +0 -21
- package/dist/lib/node-esm/chunk-ZXIPFXSA.mjs.map +0 -7
- package/dist/lib/node-esm/index.mjs +0 -1121
- package/dist/lib/node-esm/index.mjs.map +0 -7
- package/dist/lib/node-esm/meta.json +0 -1
- package/dist/lib/node-esm/meta.mjs +0 -12
- package/dist/lib/node-esm/meta.mjs.map +0 -7
- package/dist/lib/node-esm/types.mjs +0 -9
- package/dist/lib/node-esm/types.mjs.map +0 -7
- package/dist/types/src/components/ThreadComplementary.d.ts +0 -10
- package/dist/types/src/components/ThreadComplementary.d.ts.map +0 -1
- package/dist/types/src/extensions/index.d.ts +0 -2
- package/dist/types/src/extensions/index.d.ts.map +0 -1
- package/dist/types/src/extensions/threads.d.ts +0 -9
- package/dist/types/src/extensions/threads.d.ts.map +0 -1
- package/src/components/ThreadComplementary.tsx +0 -113
- package/src/extensions/index.ts +0 -5
- package/src/extensions/threads.ts +0 -117
- package/src/meta.ts +0 -15
- /package/dist/lib/browser/{ThreadArticle-53PBPWLD.mjs.map → ThreadArticle-O64ZECMF.mjs.map} +0 -0
- /package/dist/lib/browser/{ThreadMain-FZAZVPHO.mjs.map → ThreadMain-ZDCRC6RG.mjs.map} +0 -0
- /package/dist/lib/node/{ThreadArticle-UORKW5YD.cjs.map → ThreadArticle-DO56JXBU.cjs.map} +0 -0
- /package/dist/lib/node/{ThreadMain-FVSLLIWS.cjs.map → ThreadMain-XJX75GHG.cjs.map} +0 -0
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/ThreadPlugin.tsx", "../../../src/components/index.ts", "../../../src/components/CommentContainer.tsx", "../../../src/components/CommentsContainer.tsx", "../../../src/components/ThreadComplementary.tsx", "../../../src/components/ThreadSettings.tsx", "../../../src/extensions/threads.ts", "../../../src/translations.ts", "../../../src/index.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport React from 'react';\n\nimport {\n type IntentPluginProvides,\n type LocationProvides,\n NavigationAction,\n type Plugin,\n type PluginDefinition,\n isLayoutParts,\n parseIntentPlugin,\n parseNavigationPlugin,\n parseMetadataResolverPlugin,\n resolvePlugin,\n} from '@dxos/app-framework';\nimport { type UnsubscribeCallback } from '@dxos/async';\nimport { LocalStorageStore } from '@dxos/local-storage';\nimport { log } from '@dxos/log';\nimport { parseClientPlugin } from '@dxos/plugin-client';\nimport { type ActionGroup, createExtension, isActionGroup, toSignal } from '@dxos/plugin-graph';\nimport { ObservabilityAction } from '@dxos/plugin-observability/meta';\nimport { SpaceAction } from '@dxos/plugin-space';\nimport { ThreadType, MessageType, ChannelType } from '@dxos/plugin-space/types';\nimport { create, type EchoReactiveObject, getTypename } from '@dxos/react-client/echo';\nimport { getSpace, fullyQualifiedId, loadObjectReferences, parseFullyQualifiedId } from '@dxos/react-client/echo';\nimport { translations as threadTranslations } from '@dxos/react-ui-thread';\n\nimport {\n ChatContainer,\n ChatHeading,\n ThreadArticle,\n ThreadComplementary,\n ThreadMain,\n ThreadSettings,\n} from './components';\nimport { threads } from './extensions';\nimport meta, { THREAD_ITEM, THREAD_PLUGIN } from './meta';\nimport translations from './translations';\nimport { ThreadAction, type ThreadPluginProvides, type ThreadSettingsProps, type ThreadState } from './types';\n\ntype SubjectId = string;\n\nconst initialViewState = { showResolvedThreads: false };\n\ntype ViewStore = Record<SubjectId, typeof initialViewState>;\n\n// TODO(Zan): Every instance of `cursor` should be replaced with `anchor`.\n// NOTE(burdon): Review/discuss CursorConverter semantics.\nexport const ThreadPlugin = (): PluginDefinition<ThreadPluginProvides> => {\n const settings = new LocalStorageStore<ThreadSettingsProps>(THREAD_PLUGIN);\n const state = create<ThreadState>({ drafts: {} });\n\n const viewStore = create<ViewStore>({});\n const getViewState = (subjectId: string) => {\n if (!viewStore[subjectId]) {\n viewStore[subjectId] = { ...initialViewState };\n }\n return viewStore[subjectId];\n };\n\n let navigationPlugin: Plugin<LocationProvides> | undefined;\n let intentPlugin: Plugin<IntentPluginProvides> | undefined;\n\n const unsubscribeCallbacks = [] as UnsubscribeCallback[];\n\n return {\n meta,\n ready: async (plugins) => {\n settings.prop({ key: 'standalone', type: LocalStorageStore.bool({ allowUndefined: true }) });\n\n navigationPlugin = resolvePlugin(plugins, parseNavigationPlugin);\n intentPlugin = resolvePlugin(plugins, parseIntentPlugin)!;\n },\n unload: async () => {\n unsubscribeCallbacks.forEach((unsubscribe) => unsubscribe());\n },\n provides: {\n settings: settings.values,\n metadata: {\n records: {\n [ChannelType.typename]: {\n placeholder: ['channel title placeholder', { ns: THREAD_PLUGIN }],\n icon: 'ph--chat--regular',\n // TODO(wittjosiah): Move out of metadata.\n loadReferences: (channel: ChannelType) => loadObjectReferences(channel, (channel) => channel.threads),\n },\n [ThreadType.typename]: {\n // TODO(wittjosiah): Move out of metadata.\n loadReferences: (thread: ThreadType) => loadObjectReferences(thread, (thread) => thread.messages),\n },\n [MessageType.typename]: {\n // TODO(wittjosiah): Move out of metadata.\n loadReferences: (message: MessageType) => [], // loadObjectReferences(message, (message) => [...message.parts, message.context]),\n },\n [THREAD_ITEM]: {\n parse: (item: EchoReactiveObject<any>, type: string) => {\n switch (type) {\n case 'node':\n return { id: item.id, label: item.title, data: item };\n case 'object':\n return item;\n case 'view-object':\n return { id: `${item.id}-view`, object: item };\n }\n },\n },\n },\n },\n translations: [...translations, ...threadTranslations],\n echo: { schema: [ChannelType, ThreadType, MessageType] },\n graph: {\n builder: (plugins) => {\n const client = resolvePlugin(plugins, parseClientPlugin)?.provides.client;\n const dispatch = resolvePlugin(plugins, parseIntentPlugin)?.provides.intent.dispatch;\n const metadataResolver = resolvePlugin(plugins, parseMetadataResolverPlugin)?.provides.metadata.resolver;\n\n if (!client || !dispatch || !metadataResolver) {\n return [];\n }\n\n return [\n createExtension({\n id: `${THREAD_PLUGIN}/comments-for-subject`,\n resolver: ({ id }) => {\n // TODO(Zan): Find util (or make one).\n if (!id.endsWith('~comments')) {\n return;\n }\n\n const [subjectId] = id.split('~');\n const [spaceId, objectId] = parseFullyQualifiedId(subjectId);\n const space = client.spaces.get().find((space) => space.id === spaceId);\n const object = toSignal(\n (onChange) => {\n const timeout = setTimeout(async () => {\n await space?.db.loadObjectById(objectId);\n onChange();\n });\n\n return () => clearTimeout(timeout);\n },\n () => space?.db.getObjectById(objectId),\n subjectId,\n );\n if (!object || !subjectId) {\n return;\n }\n\n const meta = metadataResolver(getTypename(object) ?? '');\n const label = meta.label?.(object) ||\n object.name ||\n meta.placeholder || ['unnamed object threads label', { ns: THREAD_PLUGIN }];\n\n const viewState = getViewState(subjectId);\n\n return {\n id,\n type: 'orphan-comments-for-subject',\n data: null,\n properties: {\n icon: 'ph--chat-text--regular',\n label,\n showResolvedThreads: viewState.showResolvedThreads,\n object,\n },\n };\n },\n actions: ({ node }) => {\n const dataId = node.id.split('~').at(0);\n if (!node.id.endsWith('~comments') || !dataId) {\n return;\n }\n\n const [spaceId, objectId] = dataId.split(':');\n\n const viewState = getViewState(dataId);\n const toggle = () => {\n const newToggleState = !viewState.showResolvedThreads;\n viewState.showResolvedThreads = newToggleState;\n void dispatch({\n action: ObservabilityAction.SEND_EVENT,\n data: {\n name: 'threads.toggle-show-resolved',\n properties: { spaceId, threadId: objectId, showResolved: newToggleState },\n },\n });\n };\n\n return [\n {\n id: `${THREAD_PLUGIN}/toggle-show-resolved/${node.id}`,\n data: toggle,\n properties: {\n label: ['toggle show resolved', { ns: THREAD_PLUGIN }],\n menuItemType: 'toggle',\n isChecked: viewState.showResolvedThreads,\n testId: 'threadPlugin.toggleShowResolved',\n icon: viewState.showResolvedThreads ? 'ph--eye-slash--regular' : 'ph--eye--regular',\n },\n },\n ];\n },\n }),\n createExtension({\n id: ThreadAction.CREATE,\n filter: (node): node is ActionGroup =>\n !!settings.values.standalone && isActionGroup(node) && node.id.startsWith(SpaceAction.ADD_OBJECT),\n actions: ({ node }) => {\n const id = node.id.split('/').at(-1);\n const [spaceId, objectId] = id?.split(':') ?? [];\n const space = client.spaces.get().find((space) => space.id === spaceId);\n const object = objectId && space?.db.getObjectById(objectId);\n const target = objectId ? object : space;\n if (!target) {\n return;\n }\n\n return [\n {\n id: `${THREAD_PLUGIN}/create/${node.id}`,\n data: async () => {\n await dispatch([\n { plugin: THREAD_PLUGIN, action: ThreadAction.CREATE },\n { action: SpaceAction.ADD_OBJECT, data: { target } },\n { action: NavigationAction.OPEN },\n ]);\n },\n properties: {\n label: ['create channel label', { ns: THREAD_PLUGIN }],\n icon: 'ph--chat--regular',\n testId: 'threadPlugin.createObject',\n },\n },\n ];\n },\n }),\n ];\n },\n },\n surface: {\n component: ({ data, role }) => {\n switch (role) {\n case 'main': {\n return data.active instanceof ChannelType && data.active.threads[0] ? (\n <ThreadMain thread={data.active.threads[0]} />\n ) : null;\n }\n\n case 'settings': {\n return data.plugin === meta.id ? <ThreadSettings settings={settings.values} /> : null;\n }\n\n case 'article': {\n const location = navigationPlugin?.provides.location;\n\n if (data.object instanceof ChannelType && data.object.threads[0]) {\n const channel = data.object;\n // TODO(zan): Maybe we should have utility for positional main object ids.\n if (isLayoutParts(location?.active) && location.active.main) {\n const layoutEntries = location.active.main;\n const currentPosition = layoutEntries.findIndex((entry) => channel.id === entry.id);\n if (currentPosition > 0) {\n const objectToTheLeft = layoutEntries[currentPosition - 1];\n const context = getSpace(data.object)?.db.getObjectById(objectToTheLeft.id);\n return <ThreadArticle thread={data.object.threads[0]} context={context} />;\n }\n }\n\n return <ThreadArticle thread={data.object.threads[0]} />;\n }\n\n if (data.subject instanceof ThreadType) {\n return (\n <>\n <ChatHeading attendableId={data.subject.id} />\n <ChatContainer thread={data.subject} />\n </>\n );\n }\n\n break;\n }\n\n case 'complementary--comments': {\n if (\n data.subject &&\n typeof data.subject === 'object' &&\n 'threads' in data.subject &&\n Array.isArray(data.subject.threads)\n ) {\n const { showResolvedThreads } = getViewState(fullyQualifiedId(data.subject));\n\n return (\n <ThreadComplementary\n role={role}\n subject={data.subject}\n drafts={state.drafts[fullyQualifiedId(data.subject)]}\n current={state.current}\n showResolvedThreads={showResolvedThreads}\n />\n );\n }\n\n break;\n }\n }\n\n return null;\n },\n },\n intent: {\n resolver: async (intent) => {\n switch (intent.action) {\n case ThreadAction.CREATE: {\n if (intent.data && intent.data.cursor !== undefined) {\n const { cursor, name, subject } = intent.data;\n\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', subject?.typename);\n return;\n }\n }\n\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: thread,\n intents: [\n [\n {\n action: ThreadAction.SELECT,\n data: { current: fullyQualifiedId(thread) },\n },\n ],\n [\n {\n action: NavigationAction.OPEN,\n data: {\n activeParts: { complementary: 'comments' },\n },\n },\n ],\n ],\n };\n } else {\n // NOTE: This is the standalone thread creation case.\n return {\n data: create(ChannelType, { threads: [create(ThreadType, { messages: [] })] }),\n };\n }\n }\n\n case ThreadAction.SELECT: {\n state.current = intent.data?.current;\n\n return {\n data: true,\n intents: !intent.data?.skipOpen\n ? [\n [\n {\n action: NavigationAction.OPEN,\n data: {\n activeParts: { complementary: 'comments' },\n },\n },\n ],\n ]\n : [],\n };\n }\n\n case ThreadAction.TOGGLE_RESOLVED: {\n const { thread } = intent.data ?? {};\n if (!(thread instanceof ThreadType)) {\n return;\n }\n\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 data: true,\n intents: [\n [\n {\n action: ObservabilityAction.SEND_EVENT,\n data: { name: 'threads.toggle-resolved', properties: { threadId: thread.id, spaceId } },\n },\n ],\n ],\n };\n }\n\n case ThreadAction.DELETE: {\n const { subject, thread } = intent.data ?? {};\n if (\n !(thread instanceof ThreadType) ||\n !(subject && typeof subject === 'object' && 'threads' in subject)\n ) {\n return;\n }\n\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 { data: true };\n }\n }\n\n const space = getSpace(thread);\n if (!space || !subject.threads) {\n return;\n }\n\n if (!intent.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: translations[0]['en-US'][THREAD_PLUGIN]['thread deleted label'],\n data: { cursor },\n },\n intents: [\n [\n {\n action: ObservabilityAction.SEND_EVENT,\n data: { name: 'threads.delete', properties: { threadId: thread.id, spaceId: space.id } },\n },\n ],\n ],\n };\n } else if (intent.undo) {\n // TODO(wittjosiah): SDK should do this automatically.\n const savedThread = space.db.add(thread);\n subject.threads.push(savedThread);\n\n return {\n data: true,\n intents: [\n [\n {\n action: ObservabilityAction.SEND_EVENT,\n data: { name: 'threads.undo-delete', properties: { threadId: thread.id, spaceId: space.id } },\n },\n ],\n ],\n };\n }\n break;\n }\n\n case ThreadAction.ON_MESSAGE_ADD: {\n const { thread, subject } = intent.data ?? {};\n if (\n !(thread instanceof ThreadType) ||\n !(subject && typeof subject === 'object' && 'threads' in subject && Array.isArray(subject.threads))\n ) {\n return;\n }\n\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(thread) : (subject.threads = [thread]);\n state.drafts[subjectId] = state.drafts[subjectId]?.filter(({ id }) => id !== thread.id);\n intents.push({\n action: ObservabilityAction.SEND_EVENT,\n data: { name: 'threads.thread-created', properties: analyticsProperties },\n });\n }\n\n intents.push({\n action: ObservabilityAction.SEND_EVENT,\n data: {\n name: 'threads.message-added',\n properties: { ...analyticsProperties, threadLength: thread.messages.length },\n },\n });\n\n return {\n data: thread,\n intents: [intents],\n };\n }\n\n case ThreadAction.DELETE_MESSAGE: {\n const { subject, thread, messageId } = intent.data ?? {};\n const space = getSpace(subject);\n\n if (\n !(thread instanceof ThreadType) ||\n !(subject && typeof subject === 'object' && 'threads' in subject)\n ) {\n return;\n }\n\n if (!intent.undo) {\n const message = thread.messages.find((m) => m?.id === messageId);\n const messageIndex = thread.messages.findIndex((m) => m?.id === messageId);\n if (messageIndex === -1 || !message) {\n return undefined;\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: [[{ action: ThreadAction.DELETE, data: { subject, thread } }]],\n };\n } else {\n thread.messages.splice(messageIndex, 1);\n }\n\n return {\n undoable: {\n message: translations[0]['en-US'][THREAD_PLUGIN]['message deleted label'],\n data: { message, messageIndex },\n },\n intents: [\n [\n {\n action: ObservabilityAction.SEND_EVENT,\n data: {\n name: 'threads.message.delete',\n properties: { threadId: thread.id, spaceId: space?.id },\n },\n },\n ],\n ],\n };\n } else if (intent.undo) {\n const message = intent.data?.message;\n const messageIndex = intent.data?.messageIndex;\n if (!(message instanceof MessageType) || !(typeof messageIndex === 'number')) {\n return;\n }\n\n thread.messages.splice(messageIndex, 0, message);\n return {\n data: true,\n intents: [\n [\n {\n action: ObservabilityAction.SEND_EVENT,\n data: {\n name: 'threads.message.undo-delete',\n properties: { threadId: thread.id, spaceId: space?.id },\n },\n },\n ],\n ],\n };\n }\n }\n }\n },\n },\n markdown: {\n extensions: ({ document: doc }) => {\n return threads(state, doc, intentPlugin?.provides.intent.dispatch);\n },\n },\n },\n };\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport React from 'react';\n\n// Lazily load components for content surfaces.\nexport const ThreadMain = React.lazy(() => import('./ThreadMain'));\nexport const ThreadArticle = React.lazy(() => import('./ThreadArticle'));\n\n// TODO(wittjosiah): Suspense boundary for sidebar?\nexport * from './CommentContainer';\nexport * from './CommentsContainer';\nexport * from './ChatContainer';\nexport * from './MessageContainer';\nexport * from './ThreadComplementary';\nexport * from './ThreadSettings';\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { CheckCircle, X } from '@phosphor-icons/react';\nimport React, { useCallback, useMemo, useRef, useState } from 'react';\n\nimport { create } from '@dxos/echo-schema';\nimport { MessageType } from '@dxos/plugin-space/types';\nimport { fullyQualifiedId, getSpace, useMembers } from '@dxos/react-client/echo';\nimport { useIdentity } from '@dxos/react-client/halo';\nimport { Button, Tag, Tooltip, useThemeContext, useTranslation } from '@dxos/react-ui';\nimport { createBasicExtensions, createThemeExtensions, listener } from '@dxos/react-ui-editor';\nimport {\n getSize,\n hoverableControlItem,\n hoverableControls,\n hoverableFocusedWithinControls,\n mx,\n} from '@dxos/react-ui-theme';\nimport { MessageTextbox, type MessageTextboxProps, Thread, ThreadFooter, ThreadHeading } from '@dxos/react-ui-thread';\nimport { nonNullable } from '@dxos/util';\n\nimport { MessageContainer } from './MessageContainer';\nimport { command } from './command-extension';\nimport { type ThreadContainerProps } from './types';\nimport { useStatus } from '../hooks';\nimport { THREAD_PLUGIN } from '../meta';\nimport { getMessageMetadata } from '../util';\n\nconst sizeClass = getSize(4);\n\nconst ToggleResolvedButton = ({\n isResolved,\n onResolve,\n}: {\n isResolved: boolean | undefined;\n onResolve: () => void;\n}) => {\n const { t } = useTranslation(THREAD_PLUGIN);\n const label = t(isResolved ? 'mark as unresolved label' : 'mark as resolved label');\n return (\n <Tooltip.Root>\n <Tooltip.Trigger asChild>\n <Button\n variant='ghost'\n data-testid='thread.toggle-resolved'\n onClick={onResolve}\n classNames={['min-bs-0 p-1', !isResolved && hoverableControlItem]}\n >\n <span className='sr-only'>{label}</span>\n {isResolved ? <CheckCircle className={sizeClass} weight='fill' /> : <CheckCircle className={sizeClass} />}\n </Button>\n </Tooltip.Trigger>\n <Tooltip.Portal>\n <Tooltip.Content classNames={'z-[21]'}>\n {label}\n <Tooltip.Arrow />\n </Tooltip.Content>\n </Tooltip.Portal>\n </Tooltip.Root>\n );\n};\n\nconst DeleteThreadButton = ({ onDelete }: { onDelete: () => void }) => {\n const { t } = useTranslation(THREAD_PLUGIN);\n const label = t('delete thread label');\n return (\n <Tooltip.Root>\n <Tooltip.Trigger asChild>\n <Button\n variant='ghost'\n data-testid='thread.delete'\n onClick={onDelete}\n classNames={['min-bs-0 p-1', hoverableControlItem]}\n >\n <span className='sr-only'>{label}</span>\n <X className={sizeClass} />\n </Button>\n </Tooltip.Trigger>\n <Tooltip.Portal>\n <Tooltip.Content classNames='z-[21]'>\n {label}\n <Tooltip.Arrow />\n </Tooltip.Content>\n </Tooltip.Portal>\n </Tooltip.Root>\n );\n};\n\nexport const CommentContainer = ({\n thread,\n detached,\n context,\n current,\n onAttend,\n onThreadDelete,\n onMessageDelete,\n onResolve,\n onComment,\n}: ThreadContainerProps) => {\n const identity = useIdentity()!;\n const space = getSpace(thread);\n const members = useMembers(space?.key);\n const activity = useStatus(space, fullyQualifiedId(thread));\n const { t } = useTranslation(THREAD_PLUGIN);\n const threadScrollRef = useRef<HTMLDivElement | null>(null);\n const { themeMode } = useThemeContext();\n\n const textboxMetadata = getMessageMetadata(fullyQualifiedId(thread), identity);\n // TODO(wittjosiah): This is a hack to reset the editor after a message is sent.\n const [_count, _setCount] = useState(0);\n const rerenderEditor = () => _setCount((count) => count + 1);\n const messageRef = useRef('');\n const extensions = useMemo(\n () => [\n createBasicExtensions({ placeholder: t('message placeholder') }),\n createThemeExtensions({ themeMode }),\n listener({ onChange: (text) => (messageRef.current = text) }),\n command,\n ],\n [_count],\n );\n\n // TODO(thure): Factor out.\n const scrollToEnd = (behavior: ScrollBehavior) =>\n setTimeout(() => threadScrollRef.current?.scrollIntoView({ behavior, block: 'end' }), 10);\n\n const handleCreate: MessageTextboxProps['onSend'] = useCallback(() => {\n if (!messageRef.current) {\n return false;\n }\n\n thread.messages.push(\n create(MessageType, {\n sender: { identityKey: identity.identityKey.toHex() },\n timestamp: new Date().toISOString(),\n text: messageRef.current,\n context,\n }),\n );\n onComment?.(thread);\n\n messageRef.current = '';\n scrollToEnd('instant');\n rerenderEditor();\n\n // TODO(burdon): Scroll to bottom.\n return true;\n }, [thread, identity]);\n\n return (\n <Thread onClickCapture={onAttend} onFocusCapture={onAttend} current={current} id={fullyQualifiedId(thread)}>\n <div\n role='none'\n className={mx(\n 'col-span-2 grid grid-cols-[var(--rail-size)_1fr_min-content]',\n hoverableControls,\n hoverableFocusedWithinControls,\n )}\n >\n {detached ? (\n <Tooltip.Root>\n <Tooltip.Trigger asChild>\n <ThreadHeading detached>{thread.name ?? t('thread title placeholder')}</ThreadHeading>\n </Tooltip.Trigger>\n <Tooltip.Portal>\n <Tooltip.Content classNames='z-[21]' side='top'>\n {t('detached thread label')}\n <Tooltip.Arrow />\n </Tooltip.Content>\n </Tooltip.Portal>\n </Tooltip.Root>\n ) : (\n <ThreadHeading>{thread.name ?? t('thread title placeholder')}</ThreadHeading>\n )}\n <div className='flex flex-row items-center pli-1'>\n {thread.status === 'staged' && <Tag palette='neutral'>{t('draft button')}</Tag>}\n {onResolve && !(thread?.status === 'staged') && (\n <ToggleResolvedButton isResolved={thread?.status === 'resolved'} onResolve={onResolve} />\n )}\n {onThreadDelete && <DeleteThreadButton onDelete={onThreadDelete} />}\n </div>\n </div>\n {thread.messages.filter(nonNullable).map((message) => (\n <MessageContainer\n key={message.id}\n message={message}\n members={members}\n onDelete={(id: string) => onMessageDelete?.(id)}\n />\n ))}\n {/*\n TODO(wittjosiah): Can't autofocus this generally.\n There can be multiple threads with inputs and they can't all be focused.\n Also, it steals focus from documents when first rendered.\n Need to find a way to autofocus in one scenario only: when a new thread is created.\n */}\n <MessageTextbox extensions={extensions} onSend={handleCreate} {...textboxMetadata} />\n <ThreadFooter activity={activity}>{t('activity message')}</ThreadFooter>\n {/* NOTE(thure): This can’t also be the `overflow-anchor` because `ScrollArea` injects an interceding node that contains this necessary ref’d element. */}\n <div role='none' className='bs-px -mbs-px' ref={threadScrollRef} />\n </Thread>\n );\n};\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport { ChatText } from '@phosphor-icons/react';\nimport React, { useEffect } from 'react';\n\nimport { type ThreadType } from '@dxos/plugin-space/types';\nimport { fullyQualifiedId } from '@dxos/react-client/echo';\nimport { useTranslation, Trans } from '@dxos/react-ui';\nimport { descriptionText, mx } from '@dxos/react-ui-theme';\n\nimport { CommentContainer } from './CommentContainer';\nimport { type ThreadContainerProps } from './types';\nimport { THREAD_PLUGIN } from '../meta';\n\nexport type ThreadsContainerProps = Omit<\n ThreadContainerProps,\n 'thread' | 'detached' | 'onAttend' | 'onThreadDelete' | 'onMessageDelete' | 'current' | 'autoFocus'\n> & {\n threads: ThreadType[];\n /**\n * Threads that are no longer anchored to a position in the object.\n */\n detached?: string[];\n currentId?: string;\n showResolvedThreads?: boolean;\n onThreadAttend?: (thread: ThreadType) => void;\n onThreadDelete?: (thread: ThreadType) => void;\n onMessageDelete?: (thread: ThreadType, messageId: string) => void;\n onThreadToggleResolved?: (thread: ThreadType) => void;\n onComment?: (thread: ThreadType) => void;\n};\n\n/**\n * Comment threads.\n */\nexport const CommentsContainer = ({\n threads,\n detached = [],\n currentId,\n showResolvedThreads,\n onThreadAttend,\n onThreadDelete,\n onMessageDelete,\n onThreadToggleResolved,\n ...props\n}: ThreadsContainerProps) => {\n const { t } = useTranslation(THREAD_PLUGIN);\n const filteredThreads = showResolvedThreads ? threads : threads.filter((thread) => !(thread?.status === 'resolved'));\n\n useEffect(() => {\n if (currentId) {\n document.getElementById(currentId)?.scrollIntoView({ behavior: 'smooth', block: 'end' });\n }\n }, [currentId]);\n\n return (\n <>\n {filteredThreads.length > 0 ? (\n filteredThreads.map((thread) => {\n const threadId = fullyQualifiedId(thread);\n return (\n <CommentContainer\n key={threadId}\n thread={thread}\n current={currentId === threadId}\n detached={detached.includes(threadId)}\n {...(onThreadAttend && { onAttend: () => onThreadAttend(thread) })}\n {...(onThreadDelete && { onThreadDelete: () => onThreadDelete(thread) })}\n {...(onMessageDelete && { onMessageDelete: (messageId: string) => onMessageDelete(thread, messageId) })}\n {...(onThreadToggleResolved && { onResolve: () => onThreadToggleResolved(thread) })}\n {...props}\n />\n );\n })\n ) : (\n <div\n role='alert'\n className={mx(\n descriptionText,\n 'place-self-center border border-dashed border-neutral-400/50 rounded-lg text-center p-4 m-4',\n )}\n >\n <h2 className='mbe-2 font-medium text-baseText'>{t('no comments title')}</h2>\n <p>\n <Trans\n {...{\n t,\n i18nKey: 'no comments message',\n components: {\n commentIcon: <ChatText className='inline-block' />,\n },\n }}\n />\n </p>\n </div>\n )}\n </>\n );\n};\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport React, { useEffect, useMemo } from 'react';\n\nimport { LayoutAction, type Plugin, useIntentDispatcher, useResolvePlugins } from '@dxos/app-framework';\nimport { type ThreadType } from '@dxos/plugin-space';\nimport { fullyQualifiedId } from '@dxos/react-client/echo';\nimport { ScrollArea } from '@dxos/react-ui';\nimport { useAttended } from '@dxos/react-ui-attention';\nimport { nonNullable } from '@dxos/util';\n\nimport { CommentsContainer } from '../components';\nimport { THREAD_PLUGIN } from '../meta';\nimport { ThreadAction, type ThreadProvides } from '../types';\n\nconst providesThreadsConfig = (plugin: any): Plugin<ThreadProvides<any>> | undefined =>\n 'thread' in plugin.provides ? (plugin as Plugin<ThreadProvides<any>>) : undefined;\n\nexport const ThreadComplementary = ({\n role,\n subject,\n drafts,\n current,\n showResolvedThreads,\n}: {\n role: string;\n subject: any;\n drafts: ThreadType[] | undefined;\n current?: string;\n showResolvedThreads?: boolean;\n}) => {\n const dispatch = useIntentDispatcher();\n\n const threadsIntegrators = useResolvePlugins(providesThreadsConfig);\n const threadProvides = useMemo(() => threadsIntegrators.map((p) => p.provides.thread), [threadsIntegrators]);\n const createSort = useMemo(\n () => threadProvides.find((p) => p.predicate(subject))?.createSort,\n [threadProvides, subject],\n );\n const sort = useMemo(() => createSort?.(subject), [createSort, subject]);\n\n const threads = useMemo(() => {\n return subject.threads.concat(drafts ?? []).filter(nonNullable) as ThreadType[];\n }, [JSON.stringify(subject.threads), JSON.stringify(drafts)]);\n\n const detachedIds = useMemo(() => {\n return threads.filter(({ anchor }) => !anchor).map((thread) => fullyQualifiedId(thread));\n }, [threads]);\n\n useEffect(() => {\n if (!sort) {\n return;\n }\n threads.sort((a, b) => sort(a?.anchor, b?.anchor));\n }, [sort, threads]);\n\n const attended = useAttended();\n const qualifiedSubjectId = fullyQualifiedId(subject);\n\n return (\n <div role='none' className='contents'>\n <ScrollArea.Root classNames='row-span-2'>\n <ScrollArea.Viewport>\n <CommentsContainer\n threads={threads}\n detached={detachedIds}\n currentId={attended.includes(qualifiedSubjectId) ? current : undefined}\n showResolvedThreads={showResolvedThreads}\n onThreadAttend={(thread) => {\n const threadId = fullyQualifiedId(thread);\n if (current !== threadId) {\n current = threadId;\n\n void dispatch?.([\n {\n action: LayoutAction.SCROLL_INTO_VIEW,\n data: {\n id: fullyQualifiedId(subject),\n thread: threadId,\n cursor: thread.anchor,\n },\n },\n ]);\n }\n }}\n onThreadDelete={(thread) => {\n return dispatch({ plugin: THREAD_PLUGIN, action: ThreadAction.DELETE, data: { subject, thread } });\n }}\n onMessageDelete={(thread, messageId) =>\n dispatch({\n plugin: THREAD_PLUGIN,\n action: ThreadAction.DELETE_MESSAGE,\n data: { subject, thread, messageId },\n })\n }\n onThreadToggleResolved={(thread) =>\n dispatch({ plugin: THREAD_PLUGIN, action: ThreadAction.TOGGLE_RESOLVED, data: { thread } })\n }\n onComment={(thread) => {\n void dispatch({ action: ThreadAction.ON_MESSAGE_ADD, data: { thread, subject } });\n }}\n />\n <div role='none' className='bs-10' />\n <ScrollArea.Scrollbar>\n <ScrollArea.Thumb />\n </ScrollArea.Scrollbar>\n </ScrollArea.Viewport>\n </ScrollArea.Root>\n </div>\n );\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport React from 'react';\n\nimport { SettingsValue } from '@dxos/plugin-settings';\nimport { Input, useTranslation } from '@dxos/react-ui';\n\nimport { THREAD_PLUGIN } from '../meta';\nimport type { ThreadSettingsProps } from '../types';\n\nexport const ThreadSettings = ({ settings }: { settings: ThreadSettingsProps }) => {\n const { t } = useTranslation(THREAD_PLUGIN);\n\n return (\n <>\n <SettingsValue label={t('settings standalone label')}>\n <Input.Switch checked={settings.standalone} onCheckedChange={(checked) => (settings.standalone = !!checked)} />\n </SettingsValue>\n </>\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 { type IntentDispatcher } from '@dxos/app-framework';\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';\nimport { nonNullable } from '@dxos/util';\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, ['content']), start, end);\n }\n};\n\n/**\n * Construct plugins.\n */\nexport const threads = (state: ThreadState, doc?: DocumentType, dispatch?: IntentDispatcher): 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 [...doc.threads.filter(nonNullable), ...(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 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({\n action: ThreadAction.CREATE,\n data: {\n cursor,\n name,\n subject: doc,\n },\n });\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((thread) => thread?.id === id);\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((thread) => thread?.id === id);\n\n if (thread instanceof ThreadType && thread.anchor) {\n thread.name = getName(doc, thread.anchor);\n thread.anchor = cursor;\n }\n },\n onSelect: ({ selection: { current, closest } }) => {\n void dispatch({\n action: ThreadAction.SELECT,\n data: {\n current: current ?? closest,\n skipOpen: true,\n },\n });\n },\n }),\n ];\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { THREAD_PLUGIN } from './meta';\n\nexport default [\n {\n 'en-US': {\n [THREAD_PLUGIN]: {\n 'plugin name': 'Threads',\n 'channel name placeholder': 'New channel',\n 'channel title label': 'Title',\n 'delete channel label': 'Delete channel',\n 'create channel label': 'Create channel',\n 'message placeholder': 'Reply…',\n 'settings standalone label': 'Enable channel creation (experimental)',\n 'activity message': 'Processing…',\n 'anonymous label': 'Anonymous',\n 'delete message block label': 'Delete message block',\n 'detached thread label': 'Referenced content was removed',\n 'delete thread label': 'Delete thread',\n 'thread deleted label': 'You deleted a thread.',\n 'message deleted label': 'You deleted a message.',\n 'comments heading': 'Comments',\n 'chat heading': 'Chat',\n 'draft button': 'DRAFT',\n 'no comments title': 'No comments (yet)',\n 'no comments message':\n 'To start a comment thread, select a range of text in a document and click the <commentIcon></commentIcon> Create comment button in the toolbar.',\n 'toggle show resolved': 'Show resolved',\n 'unnamed object threads label': 'Threads',\n 'mark as resolved label': 'Mark as resolved',\n 'mark as unresolved label': 'Mark as unresolved',\n 'save message label': 'Save',\n 'edit message label': 'Edit',\n 'delete message label': 'Delete message',\n },\n },\n },\n];\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { ThreadPlugin } from './ThreadPlugin';\n\nexport default ThreadPlugin;\n\nexport * from './hooks';\nexport * from './types';\n\nexport * from './ThreadPlugin';\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;AAIA,OAAOA,YAAW;AAElB,SAGEC,kBAGAC,eACAC,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AE,OAAOiI,iBAAiB,WAAW;AAC5E;gBACF;AAEAnI,uBAAOC,SAASqH,OAAOa,cAAc,GAAGhI,OAAAA;AACxC,uBAAO;kBACLO,MAAM;kBACNmG,SAAS;oBACP;sBACE;wBACExD,QAAQC,oBAAoBC;wBAC5B7C,MAAM;0BACJkC,MAAM;0BACNE,YAAY;4BAAEU,UAAUxD,OAAOO;4BAAIqB,SAASG,OAAOxB;0BAAG;wBACxD;sBACF;;;gBAGN;cACF;YACF;UACF;QACF;MACF;MACA6H,UAAU;QACRC,YAAY,CAAC,EAAEC,UAAUC,IAAG,MAAE;AAC5B,iBAAOzI,QAAQnC,OAAO4K,KAAKrK,cAAcgB,SAASmC,OAAOD,QAAAA;QAC3D;MACF;IACF;EACF;AACF;;;AQllBA,IAAA,cAAeoH;",
|
|
6
|
-
"names": ["React", "NavigationAction", "isLayoutParts", "parseIntentPlugin", "parseNavigationPlugin", "parseMetadataResolverPlugin", "resolvePlugin", "LocalStorageStore", "log", "parseClientPlugin", "createExtension", "isActionGroup", "toSignal", "ObservabilityAction", "SpaceAction", "ThreadType", "MessageType", "ChannelType", "create", "getTypename", "getSpace", "fullyQualifiedId", "loadObjectReferences", "parseFullyQualifiedId", "translations", "threadTranslations", "React", "CheckCircle", "X", "React", "useCallback", "useMemo", "useRef", "useState", "create", "MessageType", "fullyQualifiedId", "getSpace", "useMembers", "useIdentity", "Button", "Tag", "Tooltip", "useThemeContext", "useTranslation", "createBasicExtensions", "createThemeExtensions", "listener", "getSize", "hoverableControlItem", "hoverableControls", "hoverableFocusedWithinControls", "mx", "MessageTextbox", "Thread", "ThreadFooter", "ThreadHeading", "nonNullable", "sizeClass", "getSize", "ToggleResolvedButton", "isResolved", "onResolve", "t", "useTranslation", "THREAD_PLUGIN", "label", "Tooltip", "Root", "Trigger", "asChild", "Button", "variant", "data-testid", "onClick", "classNames", "hoverableControlItem", "span", "className", "CheckCircle", "weight", "Portal", "Content", "Arrow", "DeleteThreadButton", "onDelete", "X", "CommentContainer", "thread", "detached", "context", "current", "onAttend", "onThreadDelete", "onMessageDelete", "onComment", "identity", "useIdentity", "space", "getSpace", "members", "useMembers", "key", "activity", "useStatus", "fullyQualifiedId", "threadScrollRef", "useRef", "themeMode", "useThemeContext", "textboxMetadata", "getMessageMetadata", "_count", "_setCount", "useState", "rerenderEditor", "count", "messageRef", "extensions", "useMemo", "createBasicExtensions", "placeholder", "createThemeExtensions", "listener", "onChange", "text", "command", "scrollToEnd", "behavior", "setTimeout", "scrollIntoView", "block", "handleCreate", "useCallback", "messages", "push", "create", "MessageType", "sender", "identityKey", "toHex", "timestamp", "Date", "toISOString", "Thread", "onClickCapture", "onFocusCapture", "id", "div", "role", "mx", "hoverableControls", "hoverableFocusedWithinControls", "ThreadHeading", "name", "side", "status", "Tag", "palette", "filter", "nonNullable", "map", "message", "MessageContainer", "MessageTextbox", "onSend", "ThreadFooter", "ref", "ChatText", "React", "useEffect", "fullyQualifiedId", "useTranslation", "Trans", "descriptionText", "mx", "CommentsContainer", "threads", "detached", "currentId", "showResolvedThreads", "onThreadAttend", "onThreadDelete", "onMessageDelete", "onThreadToggleResolved", "props", "t", "useTranslation", "THREAD_PLUGIN", "filteredThreads", "filter", "thread", "status", "useEffect", "document", "getElementById", "scrollIntoView", "behavior", "block", "React", "length", "map", "threadId", "fullyQualifiedId", "CommentContainer", "key", "current", "includes", "onAttend", "messageId", "onResolve", "div", "role", "className", "mx", "descriptionText", "h2", "p", "Trans", "i18nKey", "components", "commentIcon", "ChatText", "React", "useEffect", "useMemo", "LayoutAction", "useIntentDispatcher", "useResolvePlugins", "fullyQualifiedId", "ScrollArea", "useAttended", "nonNullable", "providesThreadsConfig", "plugin", "provides", "undefined", "ThreadComplementary", "role", "subject", "drafts", "current", "showResolvedThreads", "dispatch", "useIntentDispatcher", "threadsIntegrators", "useResolvePlugins", "threadProvides", "useMemo", "map", "p", "thread", "createSort", "find", "predicate", "sort", "threads", "concat", "filter", "nonNullable", "JSON", "stringify", "detachedIds", "anchor", "fullyQualifiedId", "useEffect", "a", "b", "attended", "useAttended", "qualifiedSubjectId", "React", "div", "className", "ScrollArea", "Root", "classNames", "Viewport", "CommentsContainer", "detached", "currentId", "includes", "onThreadAttend", "threadId", "action", "LayoutAction", "SCROLL_INTO_VIEW", "data", "id", "cursor", "onThreadDelete", "THREAD_PLUGIN", "ThreadAction", "DELETE", "onMessageDelete", "messageId", "DELETE_MESSAGE", "onThreadToggleResolved", "TOGGLE_RESOLVED", "onComment", "ON_MESSAGE_ADD", "Scrollbar", "Thumb", "React", "SettingsValue", "Input", "useTranslation", "ThreadSettings", "settings", "t", "useTranslation", "THREAD_PLUGIN", "React", "SettingsValue", "label", "Input", "Switch", "checked", "standalone", "onCheckedChange", "ThreadMain", "React", "lazy", "ThreadArticle", "EditorView", "computed", "effect", "ThreadType", "getSpace", "getTextInRange", "createDocAccessor", "fullyQualifiedId", "comments", "createExternalCommentSync", "nonNullable", "getName", "doc", "anchor", "content", "start", "end", "split", "getTextInRange", "createDocAccessor", "threads", "state", "dispatch", "space", "getSpace", "comments", "computed", "filter", "nonNullable", "drafts", "fullyQualifiedId", "thread", "status", "EditorView", "updateListener", "of", "update", "docChanged", "forEach", "name", "createExternalCommentSync", "sink", "effect", "value", "map", "id", "cursor", "onCreate", "action", "ThreadAction", "CREATE", "data", "subject", "onDelete", "draft", "index", "findIndex", "splice", "find", "undefined", "onUpdate", "ThreadType", "onSelect", "selection", "current", "closest", "SELECT", "skipOpen", "THREAD_PLUGIN", "initialViewState", "showResolvedThreads", "ThreadPlugin", "settings", "LocalStorageStore", "THREAD_PLUGIN", "state", "create", "drafts", "viewStore", "getViewState", "subjectId", "navigationPlugin", "intentPlugin", "unsubscribeCallbacks", "meta", "ready", "plugins", "prop", "key", "type", "bool", "allowUndefined", "resolvePlugin", "parseNavigationPlugin", "parseIntentPlugin", "unload", "forEach", "unsubscribe", "provides", "values", "metadata", "records", "ChannelType", "typename", "placeholder", "ns", "icon", "loadReferences", "channel", "loadObjectReferences", "threads", "ThreadType", "thread", "messages", "MessageType", "message", "THREAD_ITEM", "parse", "item", "id", "label", "title", "data", "object", "translations", "threadTranslations", "echo", "schema", "graph", "builder", "client", "parseClientPlugin", "dispatch", "intent", "metadataResolver", "parseMetadataResolverPlugin", "resolver", "createExtension", "endsWith", "split", "spaceId", "objectId", "parseFullyQualifiedId", "space", "spaces", "get", "find", "toSignal", "onChange", "timeout", "setTimeout", "db", "loadObjectById", "clearTimeout", "getObjectById", "getTypename", "name", "viewState", "properties", "actions", "node", "dataId", "at", "toggle", "newToggleState", "action", "ObservabilityAction", "SEND_EVENT", "threadId", "showResolved", "menuItemType", "isChecked", "testId", "ThreadAction", "CREATE", "filter", "standalone", "isActionGroup", "startsWith", "SpaceAction", "ADD_OBJECT", "target", "plugin", "NavigationAction", "OPEN", "surface", "component", "role", "active", "React", "ThreadMain", "ThreadSettings", "location", "isLayoutParts", "main", "layoutEntries", "currentPosition", "findIndex", "entry", "objectToTheLeft", "context", "getSpace", "ThreadArticle", "subject", "ChatHeading", "attendableId", "ChatContainer", "Array", "isArray", "fullyQualifiedId", "ThreadComplementary", "current", "cursor", "undefined", "err", "log", "error", "anchor", "status", "draft", "push", "intents", "SELECT", "activeParts", "complementary", "skipOpen", "TOGGLE_RESOLVED", "DELETE", "index", "t", "splice", "undo", "remove", "undoable", "savedThread", "add", "ON_MESSAGE_ADD", "analyticsProperties", "threadLength", "length", "DELETE_MESSAGE", "messageId", "m", "messageIndex", "markdown", "extensions", "document", "doc", "ThreadPlugin"]
|
|
7
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"inputs":{"packages/plugins/plugin-thread/src/components/command-extension.ts":{"bytes":3679,"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":4347,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/plugin-observability/meta","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":1400,"imports":[],"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":24042,"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/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-mosaic","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/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":24394,"imports":[{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"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":"@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":9875,"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":18688,"imports":[{"path":"react","kind":"import-statement","external":true},{"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":"@dxos/react-client/halo","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-deck","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/types.ts":{"bytes":3772,"imports":[{"path":"packages/plugins/plugin-thread/src/meta.ts","kind":"import-statement","original":"./meta"}],"format":"esm"},"packages/plugins/plugin-thread/src/components/ThreadComplementary.tsx":{"bytes":14271,"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","kind":"import-statement","external":true},{"path":"@dxos/react-ui-attention","kind":"import-statement","external":true},{"path":"@dxos/util","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"},{"path":"packages/plugins/plugin-thread/src/types.ts","kind":"import-statement","original":"../types"}],"format":"esm"},"packages/plugins/plugin-thread/src/components/ThreadSettings.tsx":{"bytes":2595,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/plugin-settings","kind":"import-statement","external":true},{"path":"@dxos/react-ui","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/components/ThreadMain.tsx":{"bytes":2735,"imports":[{"path":"react","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/ChatContainer.tsx","kind":"import-statement","original":"./ChatContainer"}],"format":"esm"},"packages/plugins/plugin-thread/src/components/ThreadArticle.tsx":{"bytes":1740,"imports":[{"path":"react","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":2013,"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/ThreadMain.tsx","kind":"dynamic-import","original":"./ThreadMain"},{"path":"packages/plugins/plugin-thread/src/components/ThreadArticle.tsx","kind":"dynamic-import","original":"./ThreadArticle"}],"format":"esm"},"packages/plugins/plugin-thread/src/extensions/threads.ts":{"bytes":13948,"imports":[{"path":"@codemirror/view","kind":"import-statement","external":true},{"path":"@preact/signals-core","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":"@dxos/util","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/translations.ts":{"bytes":4946,"imports":[{"path":"packages/plugins/plugin-thread/src/meta.ts","kind":"import-statement","original":"./meta"}],"format":"esm"},"packages/plugins/plugin-thread/src/ThreadPlugin.tsx":{"bytes":88100,"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/log","kind":"import-statement","external":true},{"path":"@dxos/plugin-client","kind":"import-statement","external":true},{"path":"@dxos/plugin-graph","kind":"import-statement","external":true},{"path":"@dxos/plugin-observability/meta","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/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui-thread","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/extensions/index.ts","kind":"import-statement","original":"./extensions"},{"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":948,"imports":[{"path":"packages/plugins/plugin-thread/src/ThreadPlugin.tsx","kind":"import-statement","original":"./ThreadPlugin"},{"path":"packages/plugins/plugin-thread/src/hooks/index.ts","kind":"import-statement","original":"./hooks"},{"path":"packages/plugins/plugin-thread/src/types.ts","kind":"import-statement","original":"./types"},{"path":"packages/plugins/plugin-thread/src/ThreadPlugin.tsx","kind":"import-statement","original":"./ThreadPlugin"}],"format":"esm"}},"outputs":{"packages/plugins/plugin-thread/dist/lib/node-esm/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":74512},"packages/plugins/plugin-thread/dist/lib/node-esm/index.mjs":{"imports":[{"path":"packages/plugins/plugin-thread/dist/lib/node-esm/chunk-ZXIPFXSA.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-thread/dist/lib/node-esm/chunk-SJEUDBZV.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-thread/dist/lib/node-esm/chunk-DC5ZA6H5.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/log","kind":"import-statement","external":true},{"path":"@dxos/plugin-client","kind":"import-statement","external":true},{"path":"@dxos/plugin-graph","kind":"import-statement","external":true},{"path":"@dxos/plugin-observability/meta","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/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui-thread","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/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":"@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/react-client/echo","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/util","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/plugin-settings","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-thread/dist/lib/node-esm/ThreadMain-Y6JU6S7A.mjs","kind":"dynamic-import"},{"path":"packages/plugins/plugin-thread/dist/lib/node-esm/ThreadArticle-E4MLJZIM.mjs","kind":"dynamic-import"},{"path":"@codemirror/view","kind":"import-statement","external":true},{"path":"@preact/signals-core","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":"@dxos/util","kind":"import-statement","external":true}],"exports":["ThreadAction","ThreadPlugin","default","useAnalyticsCallback","useOnEditAnalytics","useStatus"],"entryPoint":"packages/plugins/plugin-thread/src/index.ts","inputs":{"packages/plugins/plugin-thread/src/ThreadPlugin.tsx":{"bytesInOutput":23422},"packages/plugins/plugin-thread/src/components/index.ts":{"bytesInOutput":180},"packages/plugins/plugin-thread/src/components/CommentContainer.tsx":{"bytesInOutput":6383},"packages/plugins/plugin-thread/src/components/CommentsContainer.tsx":{"bytesInOutput":2259},"packages/plugins/plugin-thread/src/components/ThreadComplementary.tsx":{"bytesInOutput":3508},"packages/plugins/plugin-thread/src/components/ThreadSettings.tsx":{"bytesInOutput":581},"packages/plugins/plugin-thread/src/extensions/threads.ts":{"bytesInOutput":2936},"packages/plugins/plugin-thread/src/extensions/index.ts":{"bytesInOutput":0},"packages/plugins/plugin-thread/src/translations.ts":{"bytesInOutput":1495},"packages/plugins/plugin-thread/src/index.ts":{"bytesInOutput":32}},"bytes":42056},"packages/plugins/plugin-thread/dist/lib/node-esm/meta.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"packages/plugins/plugin-thread/dist/lib/node-esm/meta.mjs":{"imports":[{"path":"packages/plugins/plugin-thread/dist/lib/node-esm/chunk-DC5ZA6H5.mjs","kind":"import-statement"}],"exports":["THREAD_ITEM","THREAD_PLUGIN","default"],"entryPoint":"packages/plugins/plugin-thread/src/meta.ts","inputs":{},"bytes":283},"packages/plugins/plugin-thread/dist/lib/node-esm/types.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"packages/plugins/plugin-thread/dist/lib/node-esm/types.mjs":{"imports":[{"path":"packages/plugins/plugin-thread/dist/lib/node-esm/chunk-ZXIPFXSA.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-thread/dist/lib/node-esm/chunk-DC5ZA6H5.mjs","kind":"import-statement"}],"exports":["ThreadAction"],"entryPoint":"packages/plugins/plugin-thread/src/types.ts","inputs":{},"bytes":240},"packages/plugins/plugin-thread/dist/lib/node-esm/chunk-ZXIPFXSA.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":2081},"packages/plugins/plugin-thread/dist/lib/node-esm/chunk-ZXIPFXSA.mjs":{"imports":[{"path":"packages/plugins/plugin-thread/dist/lib/node-esm/chunk-DC5ZA6H5.mjs","kind":"import-statement"}],"exports":["ThreadAction"],"inputs":{"packages/plugins/plugin-thread/src/types.ts":{"bytesInOutput":694}},"bytes":962},"packages/plugins/plugin-thread/dist/lib/node-esm/ThreadMain-Y6JU6S7A.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1393},"packages/plugins/plugin-thread/dist/lib/node-esm/ThreadMain-Y6JU6S7A.mjs":{"imports":[{"path":"packages/plugins/plugin-thread/dist/lib/node-esm/chunk-SJEUDBZV.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-thread/dist/lib/node-esm/chunk-DC5ZA6H5.mjs","kind":"import-statement"},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"packages/plugins/plugin-thread/src/components/ThreadMain.tsx","inputs":{"packages/plugins/plugin-thread/src/components/ThreadMain.tsx":{"bytesInOutput":536}},"bytes":873},"packages/plugins/plugin-thread/dist/lib/node-esm/ThreadArticle-E4MLJZIM.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":853},"packages/plugins/plugin-thread/dist/lib/node-esm/ThreadArticle-E4MLJZIM.mjs":{"imports":[{"path":"packages/plugins/plugin-thread/dist/lib/node-esm/chunk-SJEUDBZV.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-thread/dist/lib/node-esm/chunk-DC5ZA6H5.mjs","kind":"import-statement"},{"path":"react","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"packages/plugins/plugin-thread/src/components/ThreadArticle.tsx","inputs":{"packages/plugins/plugin-thread/src/components/ThreadArticle.tsx":{"bytesInOutput":271}},"bytes":617},"packages/plugins/plugin-thread/dist/lib/node-esm/chunk-SJEUDBZV.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":30225},"packages/plugins/plugin-thread/dist/lib/node-esm/chunk-SJEUDBZV.mjs":{"imports":[{"path":"packages/plugins/plugin-thread/dist/lib/node-esm/chunk-DC5ZA6H5.mjs","kind":"import-statement"},{"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/meta","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":"react","kind":"import-statement","external":true},{"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":"@dxos/react-client/halo","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-deck","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":"@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/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-mosaic","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":"@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","ChatHeading","MessageContainer","command","getMessageMetadata","useAnalyticsCallback","useOnEditAnalytics","useStatus"],"inputs":{"packages/plugins/plugin-thread/src/hooks/useStatus.ts":{"bytesInOutput":748},"packages/plugins/plugin-thread/src/hooks/analytics.ts":{"bytesInOutput":975},"packages/plugins/plugin-thread/src/hooks/index.ts":{"bytesInOutput":0},"packages/plugins/plugin-thread/src/components/ChatContainer.tsx":{"bytesInOutput":4622},"packages/plugins/plugin-thread/src/components/MessageContainer.tsx":{"bytesInOutput":6321},"packages/plugins/plugin-thread/src/components/command-extension.ts":{"bytesInOutput":715},"packages/plugins/plugin-thread/src/util.ts":{"bytesInOutput":563}},"bytes":14819},"packages/plugins/plugin-thread/dist/lib/node-esm/chunk-DC5ZA6H5.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":671},"packages/plugins/plugin-thread/dist/lib/node-esm/chunk-DC5ZA6H5.mjs":{"imports":[],"exports":["THREAD_ITEM","THREAD_PLUGIN","meta_default"],"inputs":{"packages/plugins/plugin-thread/src/meta.ts":{"bytesInOutput":229}},"bytes":472}}}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
|
|
2
|
-
import {
|
|
3
|
-
THREAD_ITEM,
|
|
4
|
-
THREAD_PLUGIN,
|
|
5
|
-
meta_default
|
|
6
|
-
} from "./chunk-DC5ZA6H5.mjs";
|
|
7
|
-
export {
|
|
8
|
-
THREAD_ITEM,
|
|
9
|
-
THREAD_PLUGIN,
|
|
10
|
-
meta_default as default
|
|
11
|
-
};
|
|
12
|
-
//# sourceMappingURL=meta.mjs.map
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { type ThreadType } from '@dxos/plugin-space';
|
|
3
|
-
export declare const ThreadComplementary: ({ role, subject, drafts, current, showResolvedThreads, }: {
|
|
4
|
-
role: string;
|
|
5
|
-
subject: any;
|
|
6
|
-
drafts: ThreadType[] | undefined;
|
|
7
|
-
current?: string;
|
|
8
|
-
showResolvedThreads?: boolean;
|
|
9
|
-
}) => React.JSX.Element;
|
|
10
|
-
//# sourceMappingURL=ThreadComplementary.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ThreadComplementary.d.ts","sourceRoot":"","sources":["../../../../src/components/ThreadComplementary.tsx"],"names":[],"mappings":"AAIA,OAAO,KAA6B,MAAM,OAAO,CAAC;AAGlD,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAarD,eAAO,MAAM,mBAAmB,6DAM7B;IACD,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,GAAG,CAAC;IACb,MAAM,EAAE,UAAU,EAAE,GAAG,SAAS,CAAC;IACjC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,mBAAmB,CAAC,EAAE,OAAO,CAAC;CAC/B,sBAgFA,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/extensions/index.ts"],"names":[],"mappings":"AAIA,cAAc,WAAW,CAAC"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { type Extension } from '@codemirror/state';
|
|
2
|
-
import { type IntentDispatcher } from '@dxos/app-framework';
|
|
3
|
-
import { type DocumentType } from '@dxos/plugin-markdown/types';
|
|
4
|
-
import { type ThreadState } from '../types';
|
|
5
|
-
/**
|
|
6
|
-
* Construct plugins.
|
|
7
|
-
*/
|
|
8
|
-
export declare const threads: (state: ThreadState, doc?: DocumentType, dispatch?: IntentDispatcher) => Extension;
|
|
9
|
-
//# sourceMappingURL=threads.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"threads.d.ts","sourceRoot":"","sources":["../../../../src/extensions/threads.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAInD,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAC5D,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAMhE,OAAO,EAAgB,KAAK,WAAW,EAAE,MAAM,UAAU,CAAC;AAU1D;;GAEG;AACH,eAAO,MAAM,OAAO,UAAW,WAAW,QAAQ,YAAY,aAAa,gBAAgB,KAAG,SAwF7F,CAAC"}
|
|
@@ -1,113 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2024 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
import React, { useEffect, useMemo } from 'react';
|
|
6
|
-
|
|
7
|
-
import { LayoutAction, type Plugin, useIntentDispatcher, useResolvePlugins } from '@dxos/app-framework';
|
|
8
|
-
import { type ThreadType } from '@dxos/plugin-space';
|
|
9
|
-
import { fullyQualifiedId } from '@dxos/react-client/echo';
|
|
10
|
-
import { ScrollArea } from '@dxos/react-ui';
|
|
11
|
-
import { useAttended } from '@dxos/react-ui-attention';
|
|
12
|
-
import { nonNullable } from '@dxos/util';
|
|
13
|
-
|
|
14
|
-
import { CommentsContainer } from '../components';
|
|
15
|
-
import { THREAD_PLUGIN } from '../meta';
|
|
16
|
-
import { ThreadAction, type ThreadProvides } from '../types';
|
|
17
|
-
|
|
18
|
-
const providesThreadsConfig = (plugin: any): Plugin<ThreadProvides<any>> | undefined =>
|
|
19
|
-
'thread' in plugin.provides ? (plugin as Plugin<ThreadProvides<any>>) : undefined;
|
|
20
|
-
|
|
21
|
-
export const ThreadComplementary = ({
|
|
22
|
-
role,
|
|
23
|
-
subject,
|
|
24
|
-
drafts,
|
|
25
|
-
current,
|
|
26
|
-
showResolvedThreads,
|
|
27
|
-
}: {
|
|
28
|
-
role: string;
|
|
29
|
-
subject: any;
|
|
30
|
-
drafts: ThreadType[] | undefined;
|
|
31
|
-
current?: string;
|
|
32
|
-
showResolvedThreads?: boolean;
|
|
33
|
-
}) => {
|
|
34
|
-
const dispatch = useIntentDispatcher();
|
|
35
|
-
|
|
36
|
-
const threadsIntegrators = useResolvePlugins(providesThreadsConfig);
|
|
37
|
-
const threadProvides = useMemo(() => threadsIntegrators.map((p) => p.provides.thread), [threadsIntegrators]);
|
|
38
|
-
const createSort = useMemo(
|
|
39
|
-
() => threadProvides.find((p) => p.predicate(subject))?.createSort,
|
|
40
|
-
[threadProvides, subject],
|
|
41
|
-
);
|
|
42
|
-
const sort = useMemo(() => createSort?.(subject), [createSort, subject]);
|
|
43
|
-
|
|
44
|
-
const threads = useMemo(() => {
|
|
45
|
-
return subject.threads.concat(drafts ?? []).filter(nonNullable) as ThreadType[];
|
|
46
|
-
}, [JSON.stringify(subject.threads), JSON.stringify(drafts)]);
|
|
47
|
-
|
|
48
|
-
const detachedIds = useMemo(() => {
|
|
49
|
-
return threads.filter(({ anchor }) => !anchor).map((thread) => fullyQualifiedId(thread));
|
|
50
|
-
}, [threads]);
|
|
51
|
-
|
|
52
|
-
useEffect(() => {
|
|
53
|
-
if (!sort) {
|
|
54
|
-
return;
|
|
55
|
-
}
|
|
56
|
-
threads.sort((a, b) => sort(a?.anchor, b?.anchor));
|
|
57
|
-
}, [sort, threads]);
|
|
58
|
-
|
|
59
|
-
const attended = useAttended();
|
|
60
|
-
const qualifiedSubjectId = fullyQualifiedId(subject);
|
|
61
|
-
|
|
62
|
-
return (
|
|
63
|
-
<div role='none' className='contents'>
|
|
64
|
-
<ScrollArea.Root classNames='row-span-2'>
|
|
65
|
-
<ScrollArea.Viewport>
|
|
66
|
-
<CommentsContainer
|
|
67
|
-
threads={threads}
|
|
68
|
-
detached={detachedIds}
|
|
69
|
-
currentId={attended.includes(qualifiedSubjectId) ? current : undefined}
|
|
70
|
-
showResolvedThreads={showResolvedThreads}
|
|
71
|
-
onThreadAttend={(thread) => {
|
|
72
|
-
const threadId = fullyQualifiedId(thread);
|
|
73
|
-
if (current !== threadId) {
|
|
74
|
-
current = threadId;
|
|
75
|
-
|
|
76
|
-
void dispatch?.([
|
|
77
|
-
{
|
|
78
|
-
action: LayoutAction.SCROLL_INTO_VIEW,
|
|
79
|
-
data: {
|
|
80
|
-
id: fullyQualifiedId(subject),
|
|
81
|
-
thread: threadId,
|
|
82
|
-
cursor: thread.anchor,
|
|
83
|
-
},
|
|
84
|
-
},
|
|
85
|
-
]);
|
|
86
|
-
}
|
|
87
|
-
}}
|
|
88
|
-
onThreadDelete={(thread) => {
|
|
89
|
-
return dispatch({ plugin: THREAD_PLUGIN, action: ThreadAction.DELETE, data: { subject, thread } });
|
|
90
|
-
}}
|
|
91
|
-
onMessageDelete={(thread, messageId) =>
|
|
92
|
-
dispatch({
|
|
93
|
-
plugin: THREAD_PLUGIN,
|
|
94
|
-
action: ThreadAction.DELETE_MESSAGE,
|
|
95
|
-
data: { subject, thread, messageId },
|
|
96
|
-
})
|
|
97
|
-
}
|
|
98
|
-
onThreadToggleResolved={(thread) =>
|
|
99
|
-
dispatch({ plugin: THREAD_PLUGIN, action: ThreadAction.TOGGLE_RESOLVED, data: { thread } })
|
|
100
|
-
}
|
|
101
|
-
onComment={(thread) => {
|
|
102
|
-
void dispatch({ action: ThreadAction.ON_MESSAGE_ADD, data: { thread, subject } });
|
|
103
|
-
}}
|
|
104
|
-
/>
|
|
105
|
-
<div role='none' className='bs-10' />
|
|
106
|
-
<ScrollArea.Scrollbar>
|
|
107
|
-
<ScrollArea.Thumb />
|
|
108
|
-
</ScrollArea.Scrollbar>
|
|
109
|
-
</ScrollArea.Viewport>
|
|
110
|
-
</ScrollArea.Root>
|
|
111
|
-
</div>
|
|
112
|
-
);
|
|
113
|
-
};
|
package/src/extensions/index.ts
DELETED
|
@@ -1,117 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2024 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
import { type Extension } from '@codemirror/state';
|
|
6
|
-
import { EditorView } from '@codemirror/view';
|
|
7
|
-
import { computed, effect } from '@preact/signals-core';
|
|
8
|
-
|
|
9
|
-
import { type IntentDispatcher } from '@dxos/app-framework';
|
|
10
|
-
import { type DocumentType } from '@dxos/plugin-markdown/types';
|
|
11
|
-
import { ThreadType } from '@dxos/plugin-space/types';
|
|
12
|
-
import { getSpace, getTextInRange, createDocAccessor, fullyQualifiedId } from '@dxos/react-client/echo';
|
|
13
|
-
import { comments, createExternalCommentSync } from '@dxos/react-ui-editor';
|
|
14
|
-
import { nonNullable } from '@dxos/util';
|
|
15
|
-
|
|
16
|
-
import { ThreadAction, type ThreadState } from '../types';
|
|
17
|
-
|
|
18
|
-
// TODO(burdon): Factor out.
|
|
19
|
-
const getName = (doc: DocumentType, anchor: string): string | undefined => {
|
|
20
|
-
if (doc.content) {
|
|
21
|
-
const [start, end] = anchor.split(':');
|
|
22
|
-
return getTextInRange(createDocAccessor(doc.content, ['content']), start, end);
|
|
23
|
-
}
|
|
24
|
-
};
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
* Construct plugins.
|
|
28
|
-
*/
|
|
29
|
-
export const threads = (state: ThreadState, doc?: DocumentType, dispatch?: IntentDispatcher): Extension => {
|
|
30
|
-
const space = doc && getSpace(doc);
|
|
31
|
-
if (!doc || !space || !dispatch) {
|
|
32
|
-
// Include no-op comments extension here to ensure that the facets are always present when they are expected.
|
|
33
|
-
// TODO(wittjosiah): The Editor should only look for these facets when comments are available.
|
|
34
|
-
return [comments()];
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
// TODO(Zan): When we have the deepsignal specific equivalent of this we should use that instead.
|
|
38
|
-
const threads = computed(() =>
|
|
39
|
-
[...doc.threads.filter(nonNullable), ...(state.drafts[fullyQualifiedId(doc)] ?? [])].filter(
|
|
40
|
-
(thread) => !(thread?.status === 'resolved'),
|
|
41
|
-
),
|
|
42
|
-
);
|
|
43
|
-
|
|
44
|
-
return [
|
|
45
|
-
EditorView.updateListener.of((update) => {
|
|
46
|
-
if (update.docChanged) {
|
|
47
|
-
doc.threads.forEach((thread) => {
|
|
48
|
-
if (thread?.anchor) {
|
|
49
|
-
// Only update if the name has changed, otherwise this will cause an infinite loop.
|
|
50
|
-
// Skip if the name is empty; this means comment text was deleted, but thread name should remain.
|
|
51
|
-
const name = getName(doc, thread.anchor);
|
|
52
|
-
if (name && name !== thread.name) {
|
|
53
|
-
thread.name = name;
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
});
|
|
57
|
-
}
|
|
58
|
-
}),
|
|
59
|
-
|
|
60
|
-
createExternalCommentSync(
|
|
61
|
-
fullyQualifiedId(doc),
|
|
62
|
-
(sink) => effect(() => sink()),
|
|
63
|
-
() =>
|
|
64
|
-
threads.value
|
|
65
|
-
.filter((thread) => thread?.anchor)
|
|
66
|
-
.map((thread) => ({ id: fullyQualifiedId(thread), cursor: thread.anchor! })),
|
|
67
|
-
),
|
|
68
|
-
|
|
69
|
-
comments({
|
|
70
|
-
id: fullyQualifiedId(doc),
|
|
71
|
-
onCreate: ({ cursor }) => {
|
|
72
|
-
const name = getName(doc, cursor);
|
|
73
|
-
void dispatch({
|
|
74
|
-
action: ThreadAction.CREATE,
|
|
75
|
-
data: {
|
|
76
|
-
cursor,
|
|
77
|
-
name,
|
|
78
|
-
subject: doc,
|
|
79
|
-
},
|
|
80
|
-
});
|
|
81
|
-
},
|
|
82
|
-
onDelete: ({ id }) => {
|
|
83
|
-
const draft = state.drafts[fullyQualifiedId(doc)];
|
|
84
|
-
if (draft) {
|
|
85
|
-
const index = draft.findIndex((thread) => fullyQualifiedId(thread) === id);
|
|
86
|
-
if (index !== -1) {
|
|
87
|
-
draft.splice(index, 1);
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
const thread = doc.threads.find((thread) => thread?.id === id);
|
|
92
|
-
if (thread) {
|
|
93
|
-
thread.anchor = undefined;
|
|
94
|
-
}
|
|
95
|
-
},
|
|
96
|
-
onUpdate: ({ id, cursor }) => {
|
|
97
|
-
const thread =
|
|
98
|
-
state.drafts[fullyQualifiedId(doc)]?.find((thread) => fullyQualifiedId(thread) === id) ??
|
|
99
|
-
doc.threads.find((thread) => thread?.id === id);
|
|
100
|
-
|
|
101
|
-
if (thread instanceof ThreadType && thread.anchor) {
|
|
102
|
-
thread.name = getName(doc, thread.anchor);
|
|
103
|
-
thread.anchor = cursor;
|
|
104
|
-
}
|
|
105
|
-
},
|
|
106
|
-
onSelect: ({ selection: { current, closest } }) => {
|
|
107
|
-
void dispatch({
|
|
108
|
-
action: ThreadAction.SELECT,
|
|
109
|
-
data: {
|
|
110
|
-
current: current ?? closest,
|
|
111
|
-
skipOpen: true,
|
|
112
|
-
},
|
|
113
|
-
});
|
|
114
|
-
},
|
|
115
|
-
}),
|
|
116
|
-
];
|
|
117
|
-
};
|