@parhelia/core 0.4.12818 → 0.4.12871

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 (1146) hide show
  1. package/dist/components/emoji/EmojiPicker.d.ts +18 -0
  2. package/dist/components/emoji/EmojiPicker.js +102 -0
  3. package/dist/components/emoji/EmojiPicker.js.map +1 -0
  4. package/dist/components/emoji/EmojiText.d.ts +19 -0
  5. package/dist/components/emoji/EmojiText.js +30 -0
  6. package/dist/components/emoji/EmojiText.js.map +1 -0
  7. package/dist/components/emoji/emojiData.generated.d.ts +2 -0
  8. package/dist/components/emoji/emojiData.generated.js +1878 -0
  9. package/dist/components/emoji/emojiData.generated.js.map +1 -0
  10. package/dist/components/emoji/emojiIndex.d.ts +46 -0
  11. package/dist/components/emoji/emojiIndex.js +173 -0
  12. package/dist/components/emoji/emojiIndex.js.map +1 -0
  13. package/dist/components/emoji/emoticons.d.ts +21 -0
  14. package/dist/components/emoji/emoticons.js +167 -0
  15. package/dist/components/emoji/emoticons.js.map +1 -0
  16. package/dist/components/emoji/textareaInsert.d.ts +19 -0
  17. package/dist/components/emoji/textareaInsert.js +29 -0
  18. package/dist/components/emoji/textareaInsert.js.map +1 -0
  19. package/dist/components/emoji/twemoji.d.ts +30 -0
  20. package/dist/components/emoji/twemoji.js +84 -0
  21. package/dist/components/emoji/twemoji.js.map +1 -0
  22. package/dist/components/ui/alert.d.ts +6 -1
  23. package/dist/components/ui/alert.js +12 -3
  24. package/dist/components/ui/alert.js.map +1 -1
  25. package/dist/components/ui/context-menu.d.ts +25 -0
  26. package/dist/components/ui/context-menu.js +54 -36
  27. package/dist/components/ui/context-menu.js.map +1 -1
  28. package/dist/components/ui/copy-button.d.ts +3 -1
  29. package/dist/components/ui/copy-button.js +13 -2
  30. package/dist/components/ui/copy-button.js.map +1 -1
  31. package/dist/components/ui/mention-textarea.d.ts +8 -0
  32. package/dist/components/ui/mention-textarea.js +98 -46
  33. package/dist/components/ui/mention-textarea.js.map +1 -1
  34. package/dist/components/ui/paste-button.js +11 -1
  35. package/dist/components/ui/paste-button.js.map +1 -1
  36. package/dist/config/config.js +46 -4
  37. package/dist/config/config.js.map +1 -1
  38. package/dist/config/types.d.ts +2 -0
  39. package/dist/config/types.js.map +1 -1
  40. package/dist/editor/ConcurrentUserLimitDialog.js +5 -2
  41. package/dist/editor/ConcurrentUserLimitDialog.js.map +1 -1
  42. package/dist/editor/ContentTree.js +7 -2
  43. package/dist/editor/ContentTree.js.map +1 -1
  44. package/dist/editor/ContextMenu.js +11 -36
  45. package/dist/editor/ContextMenu.js.map +1 -1
  46. package/dist/editor/EditorWarning.js +8 -4
  47. package/dist/editor/EditorWarning.js.map +1 -1
  48. package/dist/editor/FieldList.js +1 -1
  49. package/dist/editor/FieldList.js.map +1 -1
  50. package/dist/editor/FieldListField.js +18 -13
  51. package/dist/editor/FieldListField.js.map +1 -1
  52. package/dist/editor/FieldListFieldWithFallbacks.js +1 -1
  53. package/dist/editor/GlobalMenuBar.js +2 -1
  54. package/dist/editor/GlobalMenuBar.js.map +1 -1
  55. package/dist/editor/ImageEditor.js +3 -1
  56. package/dist/editor/ImageEditor.js.map +1 -1
  57. package/dist/editor/MainLayout.js +1 -1
  58. package/dist/editor/MainLayout.js.map +1 -1
  59. package/dist/editor/MigrationsView.js +3 -2
  60. package/dist/editor/MigrationsView.js.map +1 -1
  61. package/dist/editor/MobileLayout.js +43 -20
  62. package/dist/editor/MobileLayout.js.map +1 -1
  63. package/dist/editor/PictureEditor.js +4 -2
  64. package/dist/editor/PictureEditor.js.map +1 -1
  65. package/dist/editor/QuickItemSwitcher.js +4 -2
  66. package/dist/editor/QuickItemSwitcher.js.map +1 -1
  67. package/dist/editor/agent-changes/agentChangeTargets.js +6 -0
  68. package/dist/editor/agent-changes/agentChangeTargets.js.map +1 -1
  69. package/dist/editor/agent-changes/agentChangeTextHighlight.d.ts +48 -4
  70. package/dist/editor/agent-changes/agentChangeTextHighlight.js +67 -9
  71. package/dist/editor/agent-changes/agentChangeTextHighlight.js.map +1 -1
  72. package/dist/editor/ai/AgentStatusBadge.js +11 -9
  73. package/dist/editor/ai/AgentStatusBadge.js.map +1 -1
  74. package/dist/editor/ai/Agents.js +2 -2
  75. package/dist/editor/ai/Agents.js.map +1 -1
  76. package/dist/editor/ai/HeartbeatDiagnosticsPanel.js +1 -1
  77. package/dist/editor/ai/InlineAiDialog.js +11 -8
  78. package/dist/editor/ai/InlineAiDialog.js.map +1 -1
  79. package/dist/editor/ai/InlineAiTrigger.js +18 -14
  80. package/dist/editor/ai/InlineAiTrigger.js.map +1 -1
  81. package/dist/editor/ai/agentActivitySummary.js +5 -0
  82. package/dist/editor/ai/agentActivitySummary.js.map +1 -1
  83. package/dist/editor/ai/agentDiagnostics.d.ts +1 -1
  84. package/dist/editor/ai/agentDiagnostics.js +8 -0
  85. package/dist/editor/ai/agentDiagnostics.js.map +1 -1
  86. package/dist/editor/ai/agentMessageConversion.js +1 -0
  87. package/dist/editor/ai/agentMessageConversion.js.map +1 -1
  88. package/dist/editor/ai/agentMessageMarkdown.js +4 -4
  89. package/dist/editor/ai/agentMessageMarkdown.js.map +1 -1
  90. package/dist/editor/ai/dialogs/capturePageScreenshot.d.ts +4 -1
  91. package/dist/editor/ai/dialogs/capturePageScreenshot.js +214 -44
  92. package/dist/editor/ai/dialogs/capturePageScreenshot.js.map +1 -1
  93. package/dist/editor/ai/dialogs/captureShared.d.ts +8 -1
  94. package/dist/editor/ai/dialogs/captureShared.js +4 -1
  95. package/dist/editor/ai/dialogs/captureShared.js.map +1 -1
  96. package/dist/editor/ai/dialogs/offscreenPageCapture.js +1 -1
  97. package/dist/editor/ai/dialogs/offscreenPageCapture.js.map +1 -1
  98. package/dist/editor/ai/prepareInlineAiTextSelection.d.ts +2 -1
  99. package/dist/editor/ai/prepareInlineAiTextSelection.js +1 -2
  100. package/dist/editor/ai/prepareInlineAiTextSelection.js.map +1 -1
  101. package/dist/editor/ai/terminal/agentCost.d.ts +2 -0
  102. package/dist/editor/ai/terminal/agentCost.js +1 -0
  103. package/dist/editor/ai/terminal/agentCost.js.map +1 -1
  104. package/dist/editor/ai/terminal/agentSessionLiveTotals.js +3 -0
  105. package/dist/editor/ai/terminal/agentSessionLiveTotals.js.map +1 -1
  106. package/dist/editor/ai/terminal/agentSessionSelectors.d.ts +5 -2
  107. package/dist/editor/ai/terminal/agentSessionSelectors.js +5 -2
  108. package/dist/editor/ai/terminal/agentSessionSelectors.js.map +1 -1
  109. package/dist/editor/ai/terminal/agentSessionSnapshot.d.ts +15 -0
  110. package/dist/editor/ai/terminal/agentSessionSnapshot.js +103 -3
  111. package/dist/editor/ai/terminal/agentSessionSnapshot.js.map +1 -1
  112. package/dist/editor/ai/terminal/agentSessionState.js +13 -2
  113. package/dist/editor/ai/terminal/agentSessionState.js.map +1 -1
  114. package/dist/editor/ai/terminal/components/AgentActivityOverviewPanel.js +7 -7
  115. package/dist/editor/ai/terminal/components/AgentActivityOverviewPanel.js.map +1 -1
  116. package/dist/editor/ai/terminal/components/AgentBanners.js +2 -2
  117. package/dist/editor/ai/terminal/components/AgentBanners.js.map +1 -1
  118. package/dist/editor/ai/terminal/components/AgentCostDisplay.d.ts +2 -0
  119. package/dist/editor/ai/terminal/components/AgentCostDisplay.js +2 -1
  120. package/dist/editor/ai/terminal/components/AgentCostDisplay.js.map +1 -1
  121. package/dist/editor/ai/terminal/components/AgentFullPromptControls.js +1 -1
  122. package/dist/editor/ai/terminal/components/AgentFullPromptControls.js.map +1 -1
  123. package/dist/editor/ai/terminal/components/AgentModeSelector.js +7 -3
  124. package/dist/editor/ai/terminal/components/AgentModeSelector.js.map +1 -1
  125. package/dist/editor/ai/terminal/components/AgentPromptActionButtons.js +3 -3
  126. package/dist/editor/ai/terminal/components/AgentPromptActionButtons.js.map +1 -1
  127. package/dist/editor/ai/terminal/components/AgentPromptInputArea.js +2 -2
  128. package/dist/editor/ai/terminal/components/AgentPromptTrayPopovers.js +1 -1
  129. package/dist/editor/ai/terminal/components/AgentPromptTrayPopovers.js.map +1 -1
  130. package/dist/editor/ai/terminal/components/AgentReadOnlyNotice.js +1 -1
  131. package/dist/editor/ai/terminal/components/AgentReadOnlyNotice.js.map +1 -1
  132. package/dist/editor/ai/terminal/components/AgentSkillSettingsSection.js +2 -2
  133. package/dist/editor/ai/terminal/components/AgentSkillSettingsSection.js.map +1 -1
  134. package/dist/editor/ai/terminal/components/AgentTerminalFullLayout.js +1 -1
  135. package/dist/editor/ai/terminal/components/AgentTerminalStatusBar.d.ts +5 -2
  136. package/dist/editor/ai/terminal/components/AgentTerminalStatusBar.js +43 -4
  137. package/dist/editor/ai/terminal/components/AgentTerminalStatusBar.js.map +1 -1
  138. package/dist/editor/ai/terminal/components/AgentTerminalSummaryLayout.js +1 -1
  139. package/dist/editor/ai/terminal/components/AgentTerminalSummaryLayout.js.map +1 -1
  140. package/dist/editor/ai/terminal/components/AiResponseMessage.js +40 -22
  141. package/dist/editor/ai/terminal/components/AiResponseMessage.js.map +1 -1
  142. package/dist/editor/ai/terminal/components/ApprovalCard.d.ts +3 -1
  143. package/dist/editor/ai/terminal/components/ApprovalCard.js +8 -16
  144. package/dist/editor/ai/terminal/components/ApprovalCard.js.map +1 -1
  145. package/dist/editor/ai/terminal/components/ContextInfoBar.js +1 -1
  146. package/dist/editor/ai/terminal/components/ContextInfoBar.js.map +1 -1
  147. package/dist/editor/ai/terminal/components/CreateItemToolCallContent.js +1 -1
  148. package/dist/editor/ai/terminal/components/CreateItemToolCallContent.js.map +1 -1
  149. package/dist/editor/ai/terminal/components/EditFieldToolCallContent.d.ts +7 -4
  150. package/dist/editor/ai/terminal/components/EditFieldToolCallContent.js +57 -32
  151. package/dist/editor/ai/terminal/components/EditFieldToolCallContent.js.map +1 -1
  152. package/dist/editor/ai/terminal/components/ResponseTurnDuration.js +1 -2
  153. package/dist/editor/ai/terminal/components/ResponseTurnDuration.js.map +1 -1
  154. package/dist/editor/ai/terminal/components/ToolCallDiagnosticsPanel.d.ts +6 -0
  155. package/dist/editor/ai/terminal/components/ToolCallDiagnosticsPanel.js +61 -0
  156. package/dist/editor/ai/terminal/components/ToolCallDiagnosticsPanel.js.map +1 -0
  157. package/dist/editor/ai/terminal/components/ToolCallDisplay.d.ts +5 -0
  158. package/dist/editor/ai/terminal/components/ToolCallDisplay.js +19 -8
  159. package/dist/editor/ai/terminal/components/ToolCallDisplay.js.map +1 -1
  160. package/dist/editor/ai/terminal/components/UserMessage.js +4 -2
  161. package/dist/editor/ai/terminal/components/UserMessage.js.map +1 -1
  162. package/dist/editor/ai/terminal/components/ValueDiff.js +1 -1
  163. package/dist/editor/ai/terminal/components/ValueDiff.js.map +1 -1
  164. package/dist/editor/ai/terminal/components/toolCallContentRenderers.js +7 -4
  165. package/dist/editor/ai/terminal/components/toolCallContentRenderers.js.map +1 -1
  166. package/dist/editor/ai/terminal/components/useApprovalActions.js +1 -1
  167. package/dist/editor/ai/terminal/components/useApprovalActions.js.map +1 -1
  168. package/dist/editor/ai/terminal/toolCallDiagnostics.d.ts +34 -0
  169. package/dist/editor/ai/terminal/toolCallDiagnostics.js +218 -0
  170. package/dist/editor/ai/terminal/toolCallDiagnostics.js.map +1 -0
  171. package/dist/editor/ai/terminal/types.d.ts +1 -0
  172. package/dist/editor/ai/terminal/useAgentEditorContext.js +16 -4
  173. package/dist/editor/ai/terminal/useAgentEditorContext.js.map +1 -1
  174. package/dist/editor/ai/terminal/useAgentLoadPipeline.d.ts +1 -0
  175. package/dist/editor/ai/terminal/useAgentLoadPipeline.js +2 -1
  176. package/dist/editor/ai/terminal/useAgentLoadPipeline.js.map +1 -1
  177. package/dist/editor/ai/terminal/useAgentLoader.d.ts +2 -0
  178. package/dist/editor/ai/terminal/useAgentLoader.js +17 -2
  179. package/dist/editor/ai/terminal/useAgentLoader.js.map +1 -1
  180. package/dist/editor/ai/terminal/useAgentModeState.d.ts +5 -1
  181. package/dist/editor/ai/terminal/useAgentModeState.js +11 -3
  182. package/dist/editor/ai/terminal/useAgentModeState.js.map +1 -1
  183. package/dist/editor/ai/terminal/useAgentOperationHistoryLoader.js +5 -1
  184. package/dist/editor/ai/terminal/useAgentOperationHistoryLoader.js.map +1 -1
  185. package/dist/editor/ai/terminal/useAgentOperationSocketHandler.js +33 -1
  186. package/dist/editor/ai/terminal/useAgentOperationSocketHandler.js.map +1 -1
  187. package/dist/editor/ai/terminal/useAgentRunDeltaSocketHandler.d.ts +1 -0
  188. package/dist/editor/ai/terminal/useAgentRunDeltaSocketHandler.js +5 -1
  189. package/dist/editor/ai/terminal/useAgentRunDeltaSocketHandler.js.map +1 -1
  190. package/dist/editor/ai/terminal/useAgentRunRefs.d.ts +1 -0
  191. package/dist/editor/ai/terminal/useAgentRunRefs.js +3 -0
  192. package/dist/editor/ai/terminal/useAgentRunRefs.js.map +1 -1
  193. package/dist/editor/ai/terminal/useAgentServerReconciler.js +11 -0
  194. package/dist/editor/ai/terminal/useAgentServerReconciler.js.map +1 -1
  195. package/dist/editor/ai/terminal/useAgentSessionSync.d.ts +6 -0
  196. package/dist/editor/ai/terminal/useAgentSessionSync.js +27 -3
  197. package/dist/editor/ai/terminal/useAgentSessionSync.js.map +1 -1
  198. package/dist/editor/ai/terminal/useAgentSettingsData.d.ts +1 -1
  199. package/dist/editor/ai/terminal/useAgentSettingsPanel.js +7 -6
  200. package/dist/editor/ai/terminal/useAgentSettingsPanel.js.map +1 -1
  201. package/dist/editor/ai/terminal/useAgentSettingsSelectOptions.js +14 -2
  202. package/dist/editor/ai/terminal/useAgentSettingsSelectOptions.js.map +1 -1
  203. package/dist/editor/ai/terminal/useAgentStatusBarContent.js +11 -4
  204. package/dist/editor/ai/terminal/useAgentStatusBarContent.js.map +1 -1
  205. package/dist/editor/ai/terminal/useAgentStreamPipeline.d.ts +1 -0
  206. package/dist/editor/ai/terminal/useAgentStreamPipeline.js +2 -1
  207. package/dist/editor/ai/terminal/useAgentStreamPipeline.js.map +1 -1
  208. package/dist/editor/ai/terminal/useAgentSubmitHandlers.d.ts +1 -0
  209. package/dist/editor/ai/terminal/useAgentSubmitHandlers.js +17 -4
  210. package/dist/editor/ai/terminal/useAgentSubmitHandlers.js.map +1 -1
  211. package/dist/editor/ai/terminal/useAgentTerminalController.js +7 -1
  212. package/dist/editor/ai/terminal/useAgentTerminalController.js.map +1 -1
  213. package/dist/editor/ai/terminal/useAgentToolCallHandler.js +1 -0
  214. package/dist/editor/ai/terminal/useAgentToolCallHandler.js.map +1 -1
  215. package/dist/editor/ai/types.d.ts +4 -0
  216. package/dist/editor/ai-image-editor/AiImageEditorDialog.d.ts +33 -0
  217. package/dist/editor/ai-image-editor/AiImageEditorDialog.js +372 -127
  218. package/dist/editor/ai-image-editor/AiImageEditorDialog.js.map +1 -1
  219. package/dist/editor/ai-image-editor/AiImageResultOverlay.js +4 -2
  220. package/dist/editor/ai-image-editor/AiImageResultOverlay.js.map +1 -1
  221. package/dist/editor/bridge/BridgeClient.js +11 -0
  222. package/dist/editor/bridge/BridgeClient.js.map +1 -1
  223. package/dist/editor/bridge/protocol.d.ts +61 -0
  224. package/dist/editor/bridge/protocol.js +3 -0
  225. package/dist/editor/bridge/protocol.js.map +1 -1
  226. package/dist/editor/client/EditorShell.js +335 -125
  227. package/dist/editor/client/EditorShell.js.map +1 -1
  228. package/dist/editor/client/SessionExpiredOverlay.js +9 -2
  229. package/dist/editor/client/SessionExpiredOverlay.js.map +1 -1
  230. package/dist/editor/client/clipboardStorage.d.ts +10 -0
  231. package/dist/editor/client/clipboardStorage.js +57 -0
  232. package/dist/editor/client/clipboardStorage.js.map +1 -0
  233. package/dist/editor/client/editContext.d.ts +92 -11
  234. package/dist/editor/client/editContext.js.map +1 -1
  235. package/dist/editor/client/editHistoryReconciliation.d.ts +2 -1
  236. package/dist/editor/client/editHistoryReconciliation.js +5 -2
  237. package/dist/editor/client/editHistoryReconciliation.js.map +1 -1
  238. package/dist/editor/client/hooks/useRepositoryItemRefresh.d.ts +4 -0
  239. package/dist/editor/client/hooks/useRepositoryItemRefresh.js +62 -0
  240. package/dist/editor/client/hooks/useRepositoryItemRefresh.js.map +1 -0
  241. package/dist/editor/client/hooks/useSocketMessageHandler.d.ts +6 -0
  242. package/dist/editor/client/hooks/useSocketMessageHandler.js +69 -4
  243. package/dist/editor/client/hooks/useSocketMessageHandler.js.map +1 -1
  244. package/dist/editor/client/itemsRepository.d.ts +10 -2
  245. package/dist/editor/client/itemsRepository.js +224 -43
  246. package/dist/editor/client/itemsRepository.js.map +1 -1
  247. package/dist/editor/client/liveEditState.d.ts +16 -0
  248. package/dist/editor/client/liveEditState.js +25 -0
  249. package/dist/editor/client/liveEditState.js.map +1 -0
  250. package/dist/editor/client/liveSessionState.d.ts +6 -0
  251. package/dist/editor/client/liveSessionState.js +20 -0
  252. package/dist/editor/client/liveSessionState.js.map +1 -0
  253. package/dist/editor/client/operations.d.ts +13 -2
  254. package/dist/editor/client/operations.js +134 -31
  255. package/dist/editor/client/operations.js.map +1 -1
  256. package/dist/editor/client/pageModelBuilder.d.ts +6 -0
  257. package/dist/editor/client/pageModelBuilder.js +74 -7
  258. package/dist/editor/client/pageModelBuilder.js.map +1 -1
  259. package/dist/editor/client/ui/EditorChrome.d.ts +2 -2
  260. package/dist/editor/client/ui/EditorChrome.js +12 -8
  261. package/dist/editor/client/ui/EditorChrome.js.map +1 -1
  262. package/dist/editor/client/ui/FullscreenControls.d.ts +3 -5
  263. package/dist/editor/client/ui/FullscreenControls.js +2 -2
  264. package/dist/editor/client/ui/FullscreenControls.js.map +1 -1
  265. package/dist/editor/client/valueStore.d.ts +22 -0
  266. package/dist/editor/client/valueStore.js +29 -0
  267. package/dist/editor/client/valueStore.js.map +1 -0
  268. package/dist/editor/commands/commands.d.ts +6 -0
  269. package/dist/editor/commands/commands.js.map +1 -1
  270. package/dist/editor/commands/componentClipboardCommands.d.ts +35 -0
  271. package/dist/editor/commands/componentClipboardCommands.js +271 -0
  272. package/dist/editor/commands/componentClipboardCommands.js.map +1 -0
  273. package/dist/editor/commands/componentCommands.js +80 -19
  274. package/dist/editor/commands/componentCommands.js.map +1 -1
  275. package/dist/editor/commands/componentMenuGroups.d.ts +2 -0
  276. package/dist/editor/commands/componentMenuGroups.js +43 -0
  277. package/dist/editor/commands/componentMenuGroups.js.map +1 -0
  278. package/dist/editor/commands/itemCommands.d.ts +9 -0
  279. package/dist/editor/commands/itemCommands.js +76 -9
  280. package/dist/editor/commands/itemCommands.js.map +1 -1
  281. package/dist/editor/component-conversion/ComponentTypePickerDialog.d.ts +12 -0
  282. package/dist/editor/component-conversion/ComponentTypePickerDialog.js +40 -0
  283. package/dist/editor/component-conversion/ComponentTypePickerDialog.js.map +1 -0
  284. package/dist/editor/component-conversion/ConversionAiDebugButton.d.ts +17 -0
  285. package/dist/editor/component-conversion/ConversionAiDebugButton.js +80 -0
  286. package/dist/editor/component-conversion/ConversionAiDebugButton.js.map +1 -0
  287. package/dist/editor/component-conversion/ConvertComponentDialog.d.ts +28 -0
  288. package/dist/editor/component-conversion/ConvertComponentDialog.js +633 -0
  289. package/dist/editor/component-conversion/ConvertComponentDialog.js.map +1 -0
  290. package/dist/editor/component-conversion/conversionModel.d.ts +109 -0
  291. package/dist/editor/component-conversion/conversionModel.js +519 -0
  292. package/dist/editor/component-conversion/conversionModel.js.map +1 -0
  293. package/dist/editor/component-conversion/conversionService.d.ts +12 -0
  294. package/dist/editor/component-conversion/conversionService.js +16 -0
  295. package/dist/editor/component-conversion/conversionService.js.map +1 -0
  296. package/dist/editor/component-conversion/conversionTypes.d.ts +214 -0
  297. package/dist/editor/component-conversion/conversionTypes.js +2 -0
  298. package/dist/editor/component-conversion/conversionTypes.js.map +1 -0
  299. package/dist/editor/component-conversion/convertComponentsCommand.d.ts +25 -0
  300. package/dist/editor/component-conversion/convertComponentsCommand.js +196 -0
  301. package/dist/editor/component-conversion/convertComponentsCommand.js.map +1 -0
  302. package/dist/editor/editor-warnings/ValidationErrors.js +4 -4
  303. package/dist/editor/editor-warnings/ValidationErrors.js.map +1 -1
  304. package/dist/editor/field-types/AttachmentEditor.js +4 -3
  305. package/dist/editor/field-types/AttachmentEditor.js.map +1 -1
  306. package/dist/editor/field-types/DateFieldEditor.js +2 -1
  307. package/dist/editor/field-types/DateFieldEditor.js.map +1 -1
  308. package/dist/editor/field-types/DateTimeFieldEditor.js +2 -1
  309. package/dist/editor/field-types/DateTimeFieldEditor.js.map +1 -1
  310. package/dist/editor/field-types/DropLinkEditor.js +3 -1
  311. package/dist/editor/field-types/DropLinkEditor.js.map +1 -1
  312. package/dist/editor/field-types/DropListEditor.js +3 -1
  313. package/dist/editor/field-types/DropListEditor.js.map +1 -1
  314. package/dist/editor/field-types/FieldHistoryBoundary.js +28 -7
  315. package/dist/editor/field-types/FieldHistoryBoundary.js.map +1 -1
  316. package/dist/editor/field-types/ImageFieldEditor.js +3 -1
  317. package/dist/editor/field-types/ImageFieldEditor.js.map +1 -1
  318. package/dist/editor/field-types/InternalLinkFieldEditor.js +2 -1
  319. package/dist/editor/field-types/InternalLinkFieldEditor.js.map +1 -1
  320. package/dist/editor/field-types/LinkFieldEditor.js +2 -1
  321. package/dist/editor/field-types/LinkFieldEditor.js.map +1 -1
  322. package/dist/editor/field-types/MultiLineText.js +68 -22
  323. package/dist/editor/field-types/MultiLineText.js.map +1 -1
  324. package/dist/editor/field-types/NameValueListEditor.js +3 -1
  325. package/dist/editor/field-types/NameValueListEditor.js.map +1 -1
  326. package/dist/editor/field-types/PictureFieldEditor.js +4 -2
  327. package/dist/editor/field-types/PictureFieldEditor.js.map +1 -1
  328. package/dist/editor/field-types/RawEditor.js +7 -4
  329. package/dist/editor/field-types/RawEditor.js.map +1 -1
  330. package/dist/editor/field-types/RichTextEditor.d.ts +1 -2
  331. package/dist/editor/field-types/RichTextEditor.js +5 -26
  332. package/dist/editor/field-types/RichTextEditor.js.map +1 -1
  333. package/dist/editor/field-types/RichTextEditorComponent.d.ts +1 -2
  334. package/dist/editor/field-types/RichTextEditorComponent.js +121 -26
  335. package/dist/editor/field-types/RichTextEditorComponent.js.map +1 -1
  336. package/dist/editor/field-types/SingleLineText.js +68 -22
  337. package/dist/editor/field-types/SingleLineText.js.map +1 -1
  338. package/dist/editor/field-types/TreeListEditor.js +4 -2
  339. package/dist/editor/field-types/TreeListEditor.js.map +1 -1
  340. package/dist/editor/field-types/fieldStyles.d.ts +21 -0
  341. package/dist/editor/field-types/fieldStyles.js +22 -0
  342. package/dist/editor/field-types/fieldStyles.js.map +1 -0
  343. package/dist/editor/field-types/richtext/bridgeRichTextProfile.d.ts +15 -1
  344. package/dist/editor/field-types/richtext/bridgeRichTextProfile.js +27 -0
  345. package/dist/editor/field-types/richtext/bridgeRichTextProfile.js.map +1 -1
  346. package/dist/editor/field-types/richtext/components/EditorDropdown.css +14 -0
  347. package/dist/editor/field-types/richtext/components/EditorDropdown.d.ts +3 -1
  348. package/dist/editor/field-types/richtext/components/EditorDropdown.js +33 -8
  349. package/dist/editor/field-types/richtext/components/EditorDropdown.js.map +1 -1
  350. package/dist/editor/field-types/richtext/components/ReactSlate.css +23 -54
  351. package/dist/editor/field-types/richtext/components/ReactSlate.d.ts +10 -1
  352. package/dist/editor/field-types/richtext/components/ReactSlate.js +373 -174
  353. package/dist/editor/field-types/richtext/components/ReactSlate.js.map +1 -1
  354. package/dist/editor/field-types/richtext/components/SimpleRichTextEditor.js +1 -1
  355. package/dist/editor/field-types/richtext/components/SimpleRichTextEditor.js.map +1 -1
  356. package/dist/editor/field-types/richtext/components/ToolbarButton.js +13 -5
  357. package/dist/editor/field-types/richtext/components/ToolbarButton.js.map +1 -1
  358. package/dist/editor/field-types/richtext/config/pluginFactory.d.ts +2 -0
  359. package/dist/editor/field-types/richtext/config/pluginFactory.js +2 -1
  360. package/dist/editor/field-types/richtext/config/pluginFactory.js.map +1 -1
  361. package/dist/editor/field-types/richtext/hooks/useProfileCache.js +1 -0
  362. package/dist/editor/field-types/richtext/hooks/useProfileCache.js.map +1 -1
  363. package/dist/editor/field-types/richtext/hooks/useRichTextProfile.d.ts +0 -2
  364. package/dist/editor/field-types/richtext/hooks/useRichTextProfile.js +2 -5
  365. package/dist/editor/field-types/richtext/hooks/useRichTextProfile.js.map +1 -1
  366. package/dist/editor/field-types/richtext/types.d.ts +47 -2
  367. package/dist/editor/field-types/richtext/types.js +19 -0
  368. package/dist/editor/field-types/richtext/types.js.map +1 -1
  369. package/dist/editor/field-types/richtext/utils/changeHighlight.d.ts +14 -0
  370. package/dist/editor/field-types/richtext/utils/changeHighlight.js +12 -1
  371. package/dist/editor/field-types/richtext/utils/changeHighlight.js.map +1 -1
  372. package/dist/editor/field-types/richtext/utils/conversion.js +108 -32
  373. package/dist/editor/field-types/richtext/utils/conversion.js.map +1 -1
  374. package/dist/editor/field-types/richtext/utils/cssClasses.d.ts +27 -0
  375. package/dist/editor/field-types/richtext/utils/cssClasses.js +98 -0
  376. package/dist/editor/field-types/richtext/utils/cssClasses.js.map +1 -0
  377. package/dist/editor/field-types/richtext/utils/plugins.d.ts +40 -1
  378. package/dist/editor/field-types/richtext/utils/plugins.js +178 -4
  379. package/dist/editor/field-types/richtext/utils/plugins.js.map +1 -1
  380. package/dist/editor/field-types/richtext/utils/profileMapper.d.ts +17 -1
  381. package/dist/editor/field-types/richtext/utils/profileMapper.js +153 -55
  382. package/dist/editor/field-types/richtext/utils/profileMapper.js.map +1 -1
  383. package/dist/editor/field-types/richtext/utils/spellCheckText.d.ts +31 -0
  384. package/dist/editor/field-types/richtext/utils/spellCheckText.js +82 -0
  385. package/dist/editor/field-types/richtext/utils/spellCheckText.js.map +1 -0
  386. package/dist/editor/field-types/useFocusedFieldInput.d.ts +13 -0
  387. package/dist/editor/field-types/useFocusedFieldInput.js +50 -0
  388. package/dist/editor/field-types/useFocusedFieldInput.js.map +1 -0
  389. package/dist/editor/field-types/useFormFieldCaretPresence.js +9 -1
  390. package/dist/editor/field-types/useFormFieldCaretPresence.js.map +1 -1
  391. package/dist/editor/field-types/useFormFieldSelectionRange.d.ts +20 -13
  392. package/dist/editor/field-types/useFormFieldSelectionRange.js +40 -14
  393. package/dist/editor/field-types/useFormFieldSelectionRange.js.map +1 -1
  394. package/dist/editor/find-replace/FindReplacePanel.d.ts +11 -0
  395. package/dist/editor/find-replace/FindReplacePanel.js +311 -0
  396. package/dist/editor/find-replace/FindReplacePanel.js.map +1 -0
  397. package/dist/editor/find-replace/findReplaceCommand.d.ts +8 -0
  398. package/dist/editor/find-replace/findReplaceCommand.js +25 -0
  399. package/dist/editor/find-replace/findReplaceCommand.js.map +1 -0
  400. package/dist/editor/find-replace/findReplaceMatches.d.ts +42 -0
  401. package/dist/editor/find-replace/findReplaceMatches.js +66 -0
  402. package/dist/editor/find-replace/findReplaceMatches.js.map +1 -0
  403. package/dist/editor/find-replace/findReplaceStore.d.ts +30 -0
  404. package/dist/editor/find-replace/findReplaceStore.js +61 -0
  405. package/dist/editor/find-replace/findReplaceStore.js.map +1 -0
  406. package/dist/editor/find-replace/findReplaceTargets.d.ts +51 -0
  407. package/dist/editor/find-replace/findReplaceTargets.js +110 -0
  408. package/dist/editor/find-replace/findReplaceTargets.js.map +1 -0
  409. package/dist/editor/find-replace/findReplaceText.d.ts +50 -0
  410. package/dist/editor/find-replace/findReplaceText.js +189 -0
  411. package/dist/editor/find-replace/findReplaceText.js.map +1 -0
  412. package/dist/editor/itemContextMenuGroups.js +10 -1
  413. package/dist/editor/itemContextMenuGroups.js.map +1 -1
  414. package/dist/editor/media-selector/AiImageSearch.js +1 -163
  415. package/dist/editor/media-selector/AiImageSearch.js.map +1 -1
  416. package/dist/editor/media-selector/MediaDetailsView.d.ts +14 -0
  417. package/dist/editor/media-selector/MediaDetailsView.js +152 -0
  418. package/dist/editor/media-selector/MediaDetailsView.js.map +1 -0
  419. package/dist/editor/media-selector/MediaFolderBrowser.js +326 -106
  420. package/dist/editor/media-selector/MediaFolderBrowser.js.map +1 -1
  421. package/dist/editor/media-selector/TreeSelector.js +40 -2
  422. package/dist/editor/media-selector/TreeSelector.js.map +1 -1
  423. package/dist/editor/media-selector/UploadZone.js +1 -1
  424. package/dist/editor/media-selector/UploadZone.js.map +1 -1
  425. package/dist/editor/media-selector/useMediaFolderDrag.d.ts +26 -0
  426. package/dist/editor/media-selector/useMediaFolderDrag.js +153 -0
  427. package/dist/editor/media-selector/useMediaFolderDrag.js.map +1 -0
  428. package/dist/editor/menubar/ActiveUsers.js +6 -4
  429. package/dist/editor/menubar/ActiveUsers.js.map +1 -1
  430. package/dist/editor/menubar/PageSelector.js +21 -22
  431. package/dist/editor/menubar/PageSelector.js.map +1 -1
  432. package/dist/editor/menubar/ToolbarFactory.js +16 -2
  433. package/dist/editor/menubar/ToolbarFactory.js.map +1 -1
  434. package/dist/editor/menubar/VersionPreviewCard.js +4 -2
  435. package/dist/editor/menubar/VersionPreviewCard.js.map +1 -1
  436. package/dist/editor/menubar/VersionSelector.js +2 -2
  437. package/dist/editor/menubar/VersionSelector.js.map +1 -1
  438. package/dist/editor/menubar/WorkflowButton.js +10 -10
  439. package/dist/editor/menubar/WorkflowButton.js.map +1 -1
  440. package/dist/editor/menubar/toolbar-sections/CommentsToggleControl.d.ts +13 -0
  441. package/dist/editor/menubar/toolbar-sections/CommentsToggleControl.js +88 -0
  442. package/dist/editor/menubar/toolbar-sections/CommentsToggleControl.js.map +1 -0
  443. package/dist/editor/menubar/toolbar-sections/DeviceSwitchToolbar.d.ts +3 -4
  444. package/dist/editor/menubar/toolbar-sections/DeviceSwitchToolbar.js +15 -13
  445. package/dist/editor/menubar/toolbar-sections/DeviceSwitchToolbar.js.map +1 -1
  446. package/dist/editor/menubar/toolbar-sections/EditControls.d.ts +9 -0
  447. package/dist/editor/menubar/toolbar-sections/EditControls.js +24 -1
  448. package/dist/editor/menubar/toolbar-sections/EditControls.js.map +1 -1
  449. package/dist/editor/menubar/toolbar-sections/FindReplaceControls.d.ts +6 -0
  450. package/dist/editor/menubar/toolbar-sections/FindReplaceControls.js +31 -0
  451. package/dist/editor/menubar/toolbar-sections/FindReplaceControls.js.map +1 -0
  452. package/dist/editor/menubar/toolbar-sections/FullscreenControl.js +3 -2
  453. package/dist/editor/menubar/toolbar-sections/FullscreenControl.js.map +1 -1
  454. package/dist/editor/menubar/toolbar-sections/InsertControls.js +4 -2
  455. package/dist/editor/menubar/toolbar-sections/InsertControls.js.map +1 -1
  456. package/dist/editor/menubar/toolbar-sections/LayoutModeControls.js +3 -2
  457. package/dist/editor/menubar/toolbar-sections/LayoutModeControls.js.map +1 -1
  458. package/dist/editor/menubar/toolbar-sections/ReviewCommands.js +2 -2
  459. package/dist/editor/menubar/toolbar-sections/ReviewCommands.js.map +1 -1
  460. package/dist/editor/menubar/toolbar-sections/SpellCheckToggleControl.d.ts +5 -0
  461. package/dist/editor/menubar/toolbar-sections/SpellCheckToggleControl.js +16 -0
  462. package/dist/editor/menubar/toolbar-sections/SpellCheckToggleControl.js.map +1 -0
  463. package/dist/editor/menubar/toolbar-sections/UndoRedoControls.js +2 -2
  464. package/dist/editor/menubar/toolbar-sections/UndoRedoControls.js.map +1 -1
  465. package/dist/editor/menubar/toolbar-sections/UtilityControls.js +7 -7
  466. package/dist/editor/menubar/toolbar-sections/UtilityControls.js.map +1 -1
  467. package/dist/editor/menubar/toolbar-sections/ViewportControls.d.ts +3 -4
  468. package/dist/editor/menubar/toolbar-sections/ViewportControls.js +19 -31
  469. package/dist/editor/menubar/toolbar-sections/ViewportControls.js.map +1 -1
  470. package/dist/editor/menubar/toolbar-sections/index.d.ts +2 -1
  471. package/dist/editor/menubar/toolbar-sections/index.js +2 -1
  472. package/dist/editor/menubar/toolbar-sections/index.js.map +1 -1
  473. package/dist/editor/mobileBottomPanel.d.ts +40 -0
  474. package/dist/editor/mobileBottomPanel.js +63 -0
  475. package/dist/editor/mobileBottomPanel.js.map +1 -0
  476. package/dist/editor/notifications/useNotifications.js +12 -17
  477. package/dist/editor/notifications/useNotifications.js.map +1 -1
  478. package/dist/editor/page-editor-chrome/AgentChangeHighlightings.d.ts +3 -6
  479. package/dist/editor/page-editor-chrome/AgentChangeHighlightings.js +8 -6
  480. package/dist/editor/page-editor-chrome/AgentChangeHighlightings.js.map +1 -1
  481. package/dist/editor/page-editor-chrome/BridgeInlineFormatOverlay.d.ts +5 -1
  482. package/dist/editor/page-editor-chrome/BridgeInlineFormatOverlay.js +60 -10
  483. package/dist/editor/page-editor-chrome/BridgeInlineFormatOverlay.js.map +1 -1
  484. package/dist/editor/page-editor-chrome/BridgePasteCleanupOverlay.d.ts +6 -0
  485. package/dist/editor/page-editor-chrome/BridgePasteCleanupOverlay.js +100 -0
  486. package/dist/editor/page-editor-chrome/BridgePasteCleanupOverlay.js.map +1 -0
  487. package/dist/editor/page-editor-chrome/BridgeToolbarDropdown.d.ts +16 -0
  488. package/dist/editor/page-editor-chrome/BridgeToolbarDropdown.js +23 -0
  489. package/dist/editor/page-editor-chrome/BridgeToolbarDropdown.js.map +1 -0
  490. package/dist/editor/page-editor-chrome/CanvasOverviewRulerBinding.d.ts +9 -0
  491. package/dist/editor/page-editor-chrome/CanvasOverviewRulerBinding.js +32 -0
  492. package/dist/editor/page-editor-chrome/CanvasOverviewRulerBinding.js.map +1 -0
  493. package/dist/editor/page-editor-chrome/CommentHighlightings.d.ts +4 -1
  494. package/dist/editor/page-editor-chrome/CommentHighlightings.js +195 -388
  495. package/dist/editor/page-editor-chrome/CommentHighlightings.js.map +1 -1
  496. package/dist/editor/page-editor-chrome/CommentTargetPickerCanvasLayer.d.ts +14 -0
  497. package/dist/editor/page-editor-chrome/CommentTargetPickerCanvasLayer.js +110 -0
  498. package/dist/editor/page-editor-chrome/CommentTargetPickerCanvasLayer.js.map +1 -0
  499. package/dist/editor/page-editor-chrome/ConversionIndicators.d.ts +8 -0
  500. package/dist/editor/page-editor-chrome/ConversionIndicators.js +75 -0
  501. package/dist/editor/page-editor-chrome/ConversionIndicators.js.map +1 -0
  502. package/dist/editor/page-editor-chrome/DiffHighlightOverlay.d.ts +9 -13
  503. package/dist/editor/page-editor-chrome/DiffHighlightOverlay.js +25 -20
  504. package/dist/editor/page-editor-chrome/DiffHighlightOverlay.js.map +1 -1
  505. package/dist/editor/page-editor-chrome/DragInsertionOverlay.js +21 -17
  506. package/dist/editor/page-editor-chrome/DragInsertionOverlay.js.map +1 -1
  507. package/dist/editor/page-editor-chrome/EmptyImageFieldIndicators.d.ts +1 -1
  508. package/dist/editor/page-editor-chrome/EmptyImageFieldIndicators.js +9 -6
  509. package/dist/editor/page-editor-chrome/EmptyImageFieldIndicators.js.map +1 -1
  510. package/dist/editor/page-editor-chrome/FeedbackLeaderCanvasSegment.d.ts +15 -0
  511. package/dist/editor/page-editor-chrome/FeedbackLeaderCanvasSegment.js +31 -0
  512. package/dist/editor/page-editor-chrome/FeedbackLeaderCanvasSegment.js.map +1 -0
  513. package/dist/editor/page-editor-chrome/FieldActionIndicator.d.ts +1 -1
  514. package/dist/editor/page-editor-chrome/FieldActionIndicator.js +14 -7
  515. package/dist/editor/page-editor-chrome/FieldActionIndicator.js.map +1 -1
  516. package/dist/editor/page-editor-chrome/FieldEditedIndicator.js +10 -6
  517. package/dist/editor/page-editor-chrome/FieldEditedIndicator.js.map +1 -1
  518. package/dist/editor/page-editor-chrome/FindReplaceHighlightings.d.ts +11 -0
  519. package/dist/editor/page-editor-chrome/FindReplaceHighlightings.js +120 -0
  520. package/dist/editor/page-editor-chrome/FindReplaceHighlightings.js.map +1 -0
  521. package/dist/editor/page-editor-chrome/FrameMenu.d.ts +1 -1
  522. package/dist/editor/page-editor-chrome/FrameMenu.js +13 -11
  523. package/dist/editor/page-editor-chrome/FrameMenu.js.map +1 -1
  524. package/dist/editor/page-editor-chrome/FrameMenus.d.ts +1 -1
  525. package/dist/editor/page-editor-chrome/FrameMenus.js +7 -5
  526. package/dist/editor/page-editor-chrome/FrameMenus.js.map +1 -1
  527. package/dist/editor/page-editor-chrome/InlineFieldHistoryButton.d.ts +2 -2
  528. package/dist/editor/page-editor-chrome/InlineFieldHistoryButton.js +20 -39
  529. package/dist/editor/page-editor-chrome/InlineFieldHistoryButton.js.map +1 -1
  530. package/dist/editor/page-editor-chrome/LockedFieldIndicator.d.ts +1 -1
  531. package/dist/editor/page-editor-chrome/LockedFieldIndicator.js +27 -21
  532. package/dist/editor/page-editor-chrome/LockedFieldIndicator.js.map +1 -1
  533. package/dist/editor/page-editor-chrome/NoLayout.js +5 -3
  534. package/dist/editor/page-editor-chrome/NoLayout.js.map +1 -1
  535. package/dist/editor/page-editor-chrome/PageEditorChrome.d.ts +1 -1
  536. package/dist/editor/page-editor-chrome/PageEditorChrome.js +30 -23
  537. package/dist/editor/page-editor-chrome/PageEditorChrome.js.map +1 -1
  538. package/dist/editor/page-editor-chrome/PictureEditorOverlay.d.ts +1 -1
  539. package/dist/editor/page-editor-chrome/PictureEditorOverlay.js +24 -21
  540. package/dist/editor/page-editor-chrome/PictureEditorOverlay.js.map +1 -1
  541. package/dist/editor/page-editor-chrome/PlaceholderDropZone.js +10 -4
  542. package/dist/editor/page-editor-chrome/PlaceholderDropZone.js.map +1 -1
  543. package/dist/editor/page-editor-chrome/PlaceholderDropZones.d.ts +1 -1
  544. package/dist/editor/page-editor-chrome/PlaceholderDropZones.js +11 -10
  545. package/dist/editor/page-editor-chrome/PlaceholderDropZones.js.map +1 -1
  546. package/dist/editor/page-editor-chrome/SpellCheckHighlightings.d.ts +12 -0
  547. package/dist/editor/page-editor-chrome/SpellCheckHighlightings.js +197 -0
  548. package/dist/editor/page-editor-chrome/SpellCheckHighlightings.js.map +1 -0
  549. package/dist/editor/page-editor-chrome/SuggestionHighlightings.d.ts +1 -1
  550. package/dist/editor/page-editor-chrome/SuggestionHighlightings.js +226 -381
  551. package/dist/editor/page-editor-chrome/SuggestionHighlightings.js.map +1 -1
  552. package/dist/editor/page-editor-chrome/ValidationRulerMarks.d.ts +11 -0
  553. package/dist/editor/page-editor-chrome/ValidationRulerMarks.js +56 -0
  554. package/dist/editor/page-editor-chrome/ValidationRulerMarks.js.map +1 -0
  555. package/dist/editor/page-editor-chrome/VersionDiffHighlightings.d.ts +1 -1
  556. package/dist/editor/page-editor-chrome/VersionDiffHighlightings.js +11 -8
  557. package/dist/editor/page-editor-chrome/VersionDiffHighlightings.js.map +1 -1
  558. package/dist/editor/page-editor-chrome/overlay/IframeOverlayProvider.d.ts +15 -2
  559. package/dist/editor/page-editor-chrome/overlay/IframeOverlayProvider.js +70 -9
  560. package/dist/editor/page-editor-chrome/overlay/IframeOverlayProvider.js.map +1 -1
  561. package/dist/editor/page-editor-chrome/overlay/feedbackAnchorMeasurements.d.ts +44 -0
  562. package/dist/editor/page-editor-chrome/overlay/feedbackAnchorMeasurements.js +89 -0
  563. package/dist/editor/page-editor-chrome/overlay/feedbackAnchorMeasurements.js.map +1 -0
  564. package/dist/editor/page-editor-chrome/overlay/feedbackAnchorStore.d.ts +17 -0
  565. package/dist/editor/page-editor-chrome/overlay/feedbackAnchorStore.js +53 -0
  566. package/dist/editor/page-editor-chrome/overlay/feedbackAnchorStore.js.map +1 -0
  567. package/dist/editor/page-editor-chrome/overlay/geometry.d.ts +15 -0
  568. package/dist/editor/page-editor-chrome/overlay/geometry.js +40 -0
  569. package/dist/editor/page-editor-chrome/overlay/geometry.js.map +1 -1
  570. package/dist/editor/page-editor-chrome/overlay/useBridgeTextRangeRequest.d.ts +11 -0
  571. package/dist/editor/page-editor-chrome/overlay/useBridgeTextRangeRequest.js +84 -0
  572. package/dist/editor/page-editor-chrome/overlay/useBridgeTextRangeRequest.js.map +1 -0
  573. package/dist/editor/page-editor-chrome/overlay/useCommentAnchorMeasurements.d.ts +34 -0
  574. package/dist/editor/page-editor-chrome/overlay/useCommentAnchorMeasurements.js +229 -0
  575. package/dist/editor/page-editor-chrome/overlay/useCommentAnchorMeasurements.js.map +1 -0
  576. package/dist/editor/page-editor-chrome/overlay/useOverlayViewportRight.d.ts +9 -0
  577. package/dist/editor/page-editor-chrome/overlay/useOverlayViewportRight.js +34 -0
  578. package/dist/editor/page-editor-chrome/overlay/useOverlayViewportRight.js.map +1 -0
  579. package/dist/editor/page-editor-chrome/overlay/useSuggestionAnchorMeasurements.d.ts +49 -0
  580. package/dist/editor/page-editor-chrome/overlay/useSuggestionAnchorMeasurements.js +241 -0
  581. package/dist/editor/page-editor-chrome/overlay/useSuggestionAnchorMeasurements.js.map +1 -0
  582. package/dist/editor/page-editor-chrome/useBridgeInlineEditing.d.ts +7 -0
  583. package/dist/editor/page-editor-chrome/useBridgeInlineEditing.js +63 -5
  584. package/dist/editor/page-editor-chrome/useBridgeInlineEditing.js.map +1 -1
  585. package/dist/editor/page-editor-chrome/useBridgeRichTextFieldOptions.d.ts +12 -0
  586. package/dist/editor/page-editor-chrome/useBridgeRichTextFieldOptions.js +79 -0
  587. package/dist/editor/page-editor-chrome/useBridgeRichTextFieldOptions.js.map +1 -0
  588. package/dist/editor/page-editor-chrome/useComponentDragHandle.js +1 -1
  589. package/dist/editor/page-editor-chrome/useComponentDragHandle.js.map +1 -1
  590. package/dist/editor/page-editor-chrome/useDragInsertionGesture.js +1 -1
  591. package/dist/editor/page-editor-chrome/useDragInsertionGesture.js.map +1 -1
  592. package/dist/editor/page-editor-chrome/usePinnedHoveredComponentId.d.ts +1 -1
  593. package/dist/editor/page-editor-chrome/usePinnedHoveredComponentId.js +4 -2
  594. package/dist/editor/page-editor-chrome/usePinnedHoveredComponentId.js.map +1 -1
  595. package/dist/editor/page-viewer/CanvasOverviewRuler.d.ts +11 -0
  596. package/dist/editor/page-viewer/CanvasOverviewRuler.js +65 -0
  597. package/dist/editor/page-viewer/CanvasOverviewRuler.js.map +1 -0
  598. package/dist/editor/page-viewer/DeviceToolbar.d.ts +1 -1
  599. package/dist/editor/page-viewer/DeviceToolbar.js +8 -3
  600. package/dist/editor/page-viewer/DeviceToolbar.js.map +1 -1
  601. package/dist/editor/page-viewer/DynamicRenderingsBar.d.ts +23 -0
  602. package/dist/editor/page-viewer/DynamicRenderingsBar.js +28 -0
  603. package/dist/editor/page-viewer/DynamicRenderingsBar.js.map +1 -0
  604. package/dist/editor/page-viewer/DynamicRenderingsStrip.d.ts +18 -0
  605. package/dist/editor/page-viewer/DynamicRenderingsStrip.js +29 -0
  606. package/dist/editor/page-viewer/DynamicRenderingsStrip.js.map +1 -0
  607. package/dist/editor/page-viewer/EditorForm.js +29 -24
  608. package/dist/editor/page-viewer/EditorForm.js.map +1 -1
  609. package/dist/editor/page-viewer/FeedbackMargin.d.ts +57 -0
  610. package/dist/editor/page-viewer/FeedbackMargin.js +378 -0
  611. package/dist/editor/page-viewer/FeedbackMargin.js.map +1 -0
  612. package/dist/editor/page-viewer/FeedbackMarginController.d.ts +76 -0
  613. package/dist/editor/page-viewer/FeedbackMarginController.js +241 -0
  614. package/dist/editor/page-viewer/FeedbackMarginController.js.map +1 -0
  615. package/dist/editor/page-viewer/FeedbackMarginMarker.d.ts +16 -0
  616. package/dist/editor/page-viewer/FeedbackMarginMarker.js +24 -0
  617. package/dist/editor/page-viewer/FeedbackMarginMarker.js.map +1 -0
  618. package/dist/editor/page-viewer/FeedbackMarginResizeHandle.d.ts +23 -0
  619. package/dist/editor/page-viewer/FeedbackMarginResizeHandle.js +105 -0
  620. package/dist/editor/page-viewer/FeedbackMarginResizeHandle.js.map +1 -0
  621. package/dist/editor/page-viewer/InteractivePreviewBar.d.ts +24 -0
  622. package/dist/editor/page-viewer/InteractivePreviewBar.js +31 -0
  623. package/dist/editor/page-viewer/InteractivePreviewBar.js.map +1 -0
  624. package/dist/editor/page-viewer/MiniMap.d.ts +15 -5
  625. package/dist/editor/page-viewer/MiniMap.js +175 -67
  626. package/dist/editor/page-viewer/MiniMap.js.map +1 -1
  627. package/dist/editor/page-viewer/MinimapDropTargets.d.ts +1 -1
  628. package/dist/editor/page-viewer/MinimapDropTargets.js +9 -7
  629. package/dist/editor/page-viewer/MinimapDropTargets.js.map +1 -1
  630. package/dist/editor/page-viewer/MobileCommentsPanel.d.ts +16 -0
  631. package/dist/editor/page-viewer/MobileCommentsPanel.js +112 -0
  632. package/dist/editor/page-viewer/MobileCommentsPanel.js.map +1 -0
  633. package/dist/editor/page-viewer/PageViewer.js +22 -67
  634. package/dist/editor/page-viewer/PageViewer.js.map +1 -1
  635. package/dist/editor/page-viewer/PageViewerFrame.d.ts +1 -0
  636. package/dist/editor/page-viewer/PageViewerFrame.js +631 -229
  637. package/dist/editor/page-viewer/PageViewerFrame.js.map +1 -1
  638. package/dist/editor/page-viewer/RenderingAiCheck.d.ts +18 -0
  639. package/dist/editor/page-viewer/RenderingAiCheck.js +45 -0
  640. package/dist/editor/page-viewer/RenderingAiCheck.js.map +1 -0
  641. package/dist/editor/page-viewer/RenderingApprovalDialog.d.ts +32 -0
  642. package/dist/editor/page-viewer/RenderingApprovalDialog.js +191 -0
  643. package/dist/editor/page-viewer/RenderingApprovalDialog.js.map +1 -0
  644. package/dist/editor/page-viewer/SealedClientCodePreview.d.ts +17 -0
  645. package/dist/editor/page-viewer/SealedClientCodePreview.js +38 -0
  646. package/dist/editor/page-viewer/SealedClientCodePreview.js.map +1 -0
  647. package/dist/editor/page-viewer/bridgeFieldPatch.d.ts +9 -0
  648. package/dist/editor/page-viewer/bridgeFieldPatch.js +21 -0
  649. package/dist/editor/page-viewer/bridgeFieldPatch.js.map +1 -1
  650. package/dist/editor/page-viewer/bridgeInlineEditSession.js +8 -0
  651. package/dist/editor/page-viewer/bridgeInlineEditSession.js.map +1 -1
  652. package/dist/editor/page-viewer/bridgeKeyboardShortcuts.d.ts +6 -0
  653. package/dist/editor/page-viewer/bridgeKeyboardShortcuts.js +19 -1
  654. package/dist/editor/page-viewer/bridgeKeyboardShortcuts.js.map +1 -1
  655. package/dist/editor/page-viewer/canvasFrameNavigation.d.ts +18 -0
  656. package/dist/editor/page-viewer/canvasFrameNavigation.js +36 -0
  657. package/dist/editor/page-viewer/canvasFrameNavigation.js.map +1 -0
  658. package/dist/editor/page-viewer/canvasLoadSettling.d.ts +42 -0
  659. package/dist/editor/page-viewer/canvasLoadSettling.js +46 -0
  660. package/dist/editor/page-viewer/canvasLoadSettling.js.map +1 -0
  661. package/dist/editor/page-viewer/canvasScrollHandoff.d.ts +34 -0
  662. package/dist/editor/page-viewer/canvasScrollHandoff.js +55 -0
  663. package/dist/editor/page-viewer/canvasScrollHandoff.js.map +1 -0
  664. package/dist/editor/page-viewer/feedbackMarginLayout.d.ts +119 -0
  665. package/dist/editor/page-viewer/feedbackMarginLayout.js +155 -0
  666. package/dist/editor/page-viewer/feedbackMarginLayout.js.map +1 -0
  667. package/dist/editor/page-viewer/feedbackMarginSources.d.ts +36 -0
  668. package/dist/editor/page-viewer/feedbackMarginSources.js +196 -0
  669. package/dist/editor/page-viewer/feedbackMarginSources.js.map +1 -0
  670. package/dist/editor/page-viewer/feedbackMarginWidth.d.ts +43 -0
  671. package/dist/editor/page-viewer/feedbackMarginWidth.js +107 -0
  672. package/dist/editor/page-viewer/feedbackMarginWidth.js.map +1 -0
  673. package/dist/editor/page-viewer/interactivePreview.d.ts +168 -0
  674. package/dist/editor/page-viewer/interactivePreview.js +344 -0
  675. package/dist/editor/page-viewer/interactivePreview.js.map +1 -0
  676. package/dist/editor/page-viewer/minimapViewport.d.ts +2 -0
  677. package/dist/editor/page-viewer/minimapViewport.js +34 -0
  678. package/dist/editor/page-viewer/minimapViewport.js.map +1 -0
  679. package/dist/editor/page-viewer/openPageItems.d.ts +29 -0
  680. package/dist/editor/page-viewer/openPageItems.js +73 -0
  681. package/dist/editor/page-viewer/openPageItems.js.map +1 -0
  682. package/dist/editor/page-viewer/overviewRuler.d.ts +128 -0
  683. package/dist/editor/page-viewer/overviewRuler.js +226 -0
  684. package/dist/editor/page-viewer/overviewRuler.js.map +1 -0
  685. package/dist/editor/page-viewer/pageViewContext.d.ts +99 -37
  686. package/dist/editor/page-viewer/pageViewContext.js +207 -238
  687. package/dist/editor/page-viewer/pageViewContext.js.map +1 -1
  688. package/dist/editor/page-viewer/renderingApproval.d.ts +59 -0
  689. package/dist/editor/page-viewer/renderingApproval.js +186 -0
  690. package/dist/editor/page-viewer/renderingApproval.js.map +1 -0
  691. package/dist/editor/page-viewer/renderingChanges.d.ts +29 -0
  692. package/dist/editor/page-viewer/renderingChanges.js +40 -0
  693. package/dist/editor/page-viewer/renderingChanges.js.map +1 -0
  694. package/dist/editor/page-viewer/scrollIntoViewTextRanges.d.ts +23 -0
  695. package/dist/editor/page-viewer/scrollIntoViewTextRanges.js +26 -0
  696. package/dist/editor/page-viewer/scrollIntoViewTextRanges.js.map +1 -0
  697. package/dist/editor/page-viewer/useInteractivePreview.d.ts +77 -0
  698. package/dist/editor/page-viewer/useInteractivePreview.js +210 -0
  699. package/dist/editor/page-viewer/useInteractivePreview.js.map +1 -0
  700. package/dist/editor/pageModel.d.ts +12 -0
  701. package/dist/editor/personalization/ConditionTreeEditor.js +1 -1
  702. package/dist/editor/personalization/ConditionTreeEditor.js.map +1 -1
  703. package/dist/editor/personalization/PersonalizationPanel.js +1 -1
  704. package/dist/editor/personalization/PersonalizationPanel.js.map +1 -1
  705. package/dist/editor/reviews/CollapsibleText.d.ts +13 -0
  706. package/dist/editor/reviews/CollapsibleText.js +41 -0
  707. package/dist/editor/reviews/CollapsibleText.js.map +1 -0
  708. package/dist/editor/reviews/Comment.d.ts +10 -1
  709. package/dist/editor/reviews/Comment.js +47 -26
  710. package/dist/editor/reviews/Comment.js.map +1 -1
  711. package/dist/editor/reviews/CommentDisplayPopover.js +29 -25
  712. package/dist/editor/reviews/CommentDisplayPopover.js.map +1 -1
  713. package/dist/editor/reviews/CommentEditor.d.ts +25 -1
  714. package/dist/editor/reviews/CommentEditor.js +158 -47
  715. package/dist/editor/reviews/CommentEditor.js.map +1 -1
  716. package/dist/editor/reviews/CommentImageAttachments.d.ts +12 -0
  717. package/dist/editor/reviews/CommentImageAttachments.js +19 -0
  718. package/dist/editor/reviews/CommentImageAttachments.js.map +1 -0
  719. package/dist/editor/reviews/CommentPopover.d.ts +0 -4
  720. package/dist/editor/reviews/CommentPopover.js +4 -8
  721. package/dist/editor/reviews/CommentPopover.js.map +1 -1
  722. package/dist/editor/reviews/CommentQuote.d.ts +10 -1
  723. package/dist/editor/reviews/CommentQuote.js +15 -10
  724. package/dist/editor/reviews/CommentQuote.js.map +1 -1
  725. package/dist/editor/reviews/CommentTargetOutline.d.ts +13 -0
  726. package/dist/editor/reviews/CommentTargetOutline.js +21 -0
  727. package/dist/editor/reviews/CommentTargetOutline.js.map +1 -0
  728. package/dist/editor/reviews/CommentTargetPickerDomLayer.d.ts +7 -0
  729. package/dist/editor/reviews/CommentTargetPickerDomLayer.js +117 -0
  730. package/dist/editor/reviews/CommentTargetPickerDomLayer.js.map +1 -0
  731. package/dist/editor/reviews/CommentThreadAgentLink.d.ts +6 -1
  732. package/dist/editor/reviews/CommentThreadAgentLink.js +4 -4
  733. package/dist/editor/reviews/CommentThreadAgentLink.js.map +1 -1
  734. package/dist/editor/reviews/CommentThreadCard.d.ts +34 -0
  735. package/dist/editor/reviews/CommentThreadCard.js +156 -0
  736. package/dist/editor/reviews/CommentThreadCard.js.map +1 -0
  737. package/dist/editor/reviews/CommentView.d.ts +7 -1
  738. package/dist/editor/reviews/CommentView.js +24 -6
  739. package/dist/editor/reviews/CommentView.js.map +1 -1
  740. package/dist/editor/reviews/Comments.js +5 -14
  741. package/dist/editor/reviews/Comments.js.map +1 -1
  742. package/dist/editor/reviews/CreateReviewDialog.js +36 -9
  743. package/dist/editor/reviews/CreateReviewDialog.js.map +1 -1
  744. package/dist/editor/reviews/EditReviewSettingsDialog.js +1 -1
  745. package/dist/editor/reviews/EditReviewSettingsDialog.js.map +1 -1
  746. package/dist/editor/reviews/FeedbackCard.d.ts +16 -1
  747. package/dist/editor/reviews/FeedbackCard.js +14 -3
  748. package/dist/editor/reviews/FeedbackCard.js.map +1 -1
  749. package/dist/editor/reviews/FeedbackFilters.d.ts +9 -5
  750. package/dist/editor/reviews/FeedbackFilters.js +15 -36
  751. package/dist/editor/reviews/FeedbackFilters.js.map +1 -1
  752. package/dist/editor/reviews/FeedbackModeIntro.d.ts +7 -1
  753. package/dist/editor/reviews/FeedbackModeIntro.js +11 -6
  754. package/dist/editor/reviews/FeedbackModeIntro.js.map +1 -1
  755. package/dist/editor/reviews/MentionText.d.ts +2 -1
  756. package/dist/editor/reviews/MentionText.js +5 -3
  757. package/dist/editor/reviews/MentionText.js.map +1 -1
  758. package/dist/editor/reviews/MultiReviewManager.js +18 -3
  759. package/dist/editor/reviews/MultiReviewManager.js.map +1 -1
  760. package/dist/editor/reviews/ReviewItemsPanel.js +4 -0
  761. package/dist/editor/reviews/ReviewItemsPanel.js.map +1 -1
  762. package/dist/editor/reviews/SuggestedEdit.d.ts +10 -1
  763. package/dist/editor/reviews/SuggestedEdit.js +77 -10
  764. package/dist/editor/reviews/SuggestedEdit.js.map +1 -1
  765. package/dist/editor/reviews/SuggestionCommentThread.d.ts +5 -1
  766. package/dist/editor/reviews/SuggestionCommentThread.js +48 -17
  767. package/dist/editor/reviews/SuggestionCommentThread.js.map +1 -1
  768. package/dist/editor/reviews/SuggestionThreadCard.d.ts +19 -0
  769. package/dist/editor/reviews/SuggestionThreadCard.js +25 -0
  770. package/dist/editor/reviews/SuggestionThreadCard.js.map +1 -0
  771. package/dist/editor/reviews/addCommentOnTarget.d.ts +22 -0
  772. package/dist/editor/reviews/addCommentOnTarget.js +32 -0
  773. package/dist/editor/reviews/addCommentOnTarget.js.map +1 -0
  774. package/dist/editor/reviews/applySuggestedEditActions.js +7 -1
  775. package/dist/editor/reviews/applySuggestedEditActions.js.map +1 -1
  776. package/dist/editor/reviews/balloonLayout.d.ts +51 -0
  777. package/dist/editor/reviews/balloonLayout.js +101 -0
  778. package/dist/editor/reviews/balloonLayout.js.map +1 -0
  779. package/dist/editor/reviews/commentAgentAttachments.d.ts +5 -0
  780. package/dist/editor/reviews/commentAgentAttachments.js +51 -0
  781. package/dist/editor/reviews/commentAgentAttachments.js.map +1 -0
  782. package/dist/editor/reviews/commentAi.d.ts +4 -2
  783. package/dist/editor/reviews/commentAi.js +19 -12
  784. package/dist/editor/reviews/commentAi.js.map +1 -1
  785. package/dist/editor/reviews/commentImages.d.ts +1 -2
  786. package/dist/editor/reviews/commentImages.js +1 -37
  787. package/dist/editor/reviews/commentImages.js.map +1 -1
  788. package/dist/editor/reviews/commentTargetPicker.d.ts +114 -0
  789. package/dist/editor/reviews/commentTargetPicker.js +153 -0
  790. package/dist/editor/reviews/commentTargetPicker.js.map +1 -0
  791. package/dist/editor/reviews/feedbackAvatar.js +2 -1
  792. package/dist/editor/reviews/feedbackAvatar.js.map +1 -1
  793. package/dist/editor/reviews/feedbackBalloonDate.d.ts +8 -0
  794. package/dist/editor/reviews/feedbackBalloonDate.js +22 -0
  795. package/dist/editor/reviews/feedbackBalloonDate.js.map +1 -0
  796. package/dist/editor/reviews/feedbackDrafts.d.ts +49 -0
  797. package/dist/editor/reviews/feedbackDrafts.js +74 -0
  798. package/dist/editor/reviews/feedbackDrafts.js.map +1 -0
  799. package/dist/editor/reviews/feedbackHoverState.d.ts +18 -0
  800. package/dist/editor/reviews/feedbackHoverState.js +35 -0
  801. package/dist/editor/reviews/feedbackHoverState.js.map +1 -0
  802. package/dist/editor/reviews/feedbackPersonFilter.d.ts +3 -0
  803. package/dist/editor/reviews/feedbackPersonFilter.js +32 -0
  804. package/dist/editor/reviews/feedbackPersonFilter.js.map +1 -0
  805. package/dist/editor/reviews/feedbackSelection.js +7 -3
  806. package/dist/editor/reviews/feedbackSelection.js.map +1 -1
  807. package/dist/editor/reviews/feedbackThreadSelection.d.ts +10 -0
  808. package/dist/editor/reviews/feedbackThreadSelection.js +31 -0
  809. package/dist/editor/reviews/feedbackThreadSelection.js.map +1 -0
  810. package/dist/editor/reviews/feedbackThreads.d.ts +50 -0
  811. package/dist/editor/reviews/feedbackThreads.js +135 -0
  812. package/dist/editor/reviews/feedbackThreads.js.map +1 -0
  813. package/dist/editor/reviews/feedbackWheelForwarding.d.ts +34 -0
  814. package/dist/editor/reviews/feedbackWheelForwarding.js +108 -0
  815. package/dist/editor/reviews/feedbackWheelForwarding.js.map +1 -0
  816. package/dist/editor/reviews/openCommentsFeedback.d.ts +1 -1
  817. package/dist/editor/reviews/openCommentsFeedback.js +2 -1
  818. package/dist/editor/reviews/openCommentsFeedback.js.map +1 -1
  819. package/dist/editor/reviews/pendingReviewSelection.d.ts +13 -0
  820. package/dist/editor/reviews/pendingReviewSelection.js +29 -0
  821. package/dist/editor/reviews/pendingReviewSelection.js.map +1 -0
  822. package/dist/editor/reviews/requestReview.d.ts +27 -0
  823. package/dist/editor/reviews/requestReview.js +36 -0
  824. package/dist/editor/reviews/requestReview.js.map +1 -0
  825. package/dist/editor/reviews/reviewUrlScope.d.ts +23 -0
  826. package/dist/editor/reviews/reviewUrlScope.js +86 -0
  827. package/dist/editor/reviews/reviewUrlScope.js.map +1 -0
  828. package/dist/editor/reviews/scrollWithin.d.ts +29 -0
  829. package/dist/editor/reviews/scrollWithin.js +87 -0
  830. package/dist/editor/reviews/scrollWithin.js.map +1 -0
  831. package/dist/editor/reviews/subtreeFeedback.d.ts +57 -0
  832. package/dist/editor/reviews/subtreeFeedback.js +137 -0
  833. package/dist/editor/reviews/subtreeFeedback.js.map +1 -0
  834. package/dist/editor/reviews/useCommentImagePaste.d.ts +49 -14
  835. package/dist/editor/reviews/useCommentImagePaste.js +165 -62
  836. package/dist/editor/reviews/useCommentImagePaste.js.map +1 -1
  837. package/dist/editor/reviews/useFeedbackThreads.d.ts +35 -0
  838. package/dist/editor/reviews/useFeedbackThreads.js +137 -0
  839. package/dist/editor/reviews/useFeedbackThreads.js.map +1 -0
  840. package/dist/editor/reviews/useMeasuredHeights.d.ts +25 -0
  841. package/dist/editor/reviews/useMeasuredHeights.js +176 -0
  842. package/dist/editor/reviews/useMeasuredHeights.js.map +1 -0
  843. package/dist/editor/reviews/usePendingFeedbackFocus.d.ts +7 -0
  844. package/dist/editor/reviews/usePendingFeedbackFocus.js +42 -0
  845. package/dist/editor/reviews/usePendingFeedbackFocus.js.map +1 -0
  846. package/dist/editor/services/agentService.d.ts +101 -5
  847. package/dist/editor/services/agentService.js +16 -0
  848. package/dist/editor/services/agentService.js.map +1 -1
  849. package/dist/editor/services/agentStatus.d.ts +1 -0
  850. package/dist/editor/services/agentStatus.js +14 -0
  851. package/dist/editor/services/agentStatus.js.map +1 -1
  852. package/dist/editor/services/aiService.d.ts +2 -0
  853. package/dist/editor/services/aiService.js.map +1 -1
  854. package/dist/editor/services/contentService.d.ts +11 -1
  855. package/dist/editor/services/contentService.js +2 -1
  856. package/dist/editor/services/contentService.js.map +1 -1
  857. package/dist/editor/services/editService.d.ts +2 -0
  858. package/dist/editor/services/editService.js.map +1 -1
  859. package/dist/editor/services/indexService.d.ts +1 -0
  860. package/dist/editor/services/indexService.js +4 -0
  861. package/dist/editor/services/indexService.js.map +1 -1
  862. package/dist/editor/services/mcpAccessService.d.ts +93 -0
  863. package/dist/editor/services/mcpAccessService.js +41 -0
  864. package/dist/editor/services/mcpAccessService.js.map +1 -0
  865. package/dist/editor/services/previewTokenService.d.ts +14 -0
  866. package/dist/editor/services/previewTokenService.js +34 -0
  867. package/dist/editor/services/previewTokenService.js.map +1 -0
  868. package/dist/editor/services/renderingsService.d.ts +117 -0
  869. package/dist/editor/services/renderingsService.js +245 -0
  870. package/dist/editor/services/renderingsService.js.map +1 -0
  871. package/dist/editor/services/reviewsService.d.ts +6 -1
  872. package/dist/editor/services/reviewsService.js +14 -6
  873. package/dist/editor/services/reviewsService.js.map +1 -1
  874. package/dist/editor/services/serviceHelper.d.ts +17 -1
  875. package/dist/editor/services/serviceHelper.js +67 -12
  876. package/dist/editor/services/serviceHelper.js.map +1 -1
  877. package/dist/editor/services/spellCheckService.d.ts +13 -0
  878. package/dist/editor/services/spellCheckService.js +33 -0
  879. package/dist/editor/services/spellCheckService.js.map +1 -0
  880. package/dist/editor/services/suggestedEditsService.d.ts +1 -0
  881. package/dist/editor/services/suggestedEditsService.js +7 -0
  882. package/dist/editor/services/suggestedEditsService.js.map +1 -1
  883. package/dist/editor/settings/MigrationJournalCard.js +2 -2
  884. package/dist/editor/settings/MigrationJournalCard.js.map +1 -1
  885. package/dist/editor/settings/StatusSummary.js +5 -2
  886. package/dist/editor/settings/StatusSummary.js.map +1 -1
  887. package/dist/editor/settings/index/CollectionWarningsDisplay.js +1 -1
  888. package/dist/editor/settings/index/CollectionWarningsDisplay.js.map +1 -1
  889. package/dist/editor/settings/index/IndexGenerationsSection.d.ts +4 -5
  890. package/dist/editor/settings/index/IndexGenerationsSection.js +83 -33
  891. package/dist/editor/settings/index/IndexGenerationsSection.js.map +1 -1
  892. package/dist/editor/settings/index/RecentBatchesList.js +2 -1
  893. package/dist/editor/settings/index/RecentBatchesList.js.map +1 -1
  894. package/dist/editor/settings/panels/AgentProfileConfigPanel.js +1 -1
  895. package/dist/editor/settings/panels/AgentProfileConfigPanel.js.map +1 -1
  896. package/dist/editor/settings/panels/AgentToolsPanel.js +1 -1
  897. package/dist/editor/settings/panels/AgentToolsPanel.js.map +1 -1
  898. package/dist/editor/settings/panels/JavaScriptToolAgentPanel.js +1 -1
  899. package/dist/editor/settings/panels/JavaScriptToolAgentPanel.js.map +1 -1
  900. package/dist/editor/settings/panels/McpAccessPanel.d.ts +7 -0
  901. package/dist/editor/settings/panels/McpAccessPanel.js +96 -0
  902. package/dist/editor/settings/panels/McpAccessPanel.js.map +1 -0
  903. package/dist/editor/settings/panels/McpAccessSettingsView.d.ts +8 -0
  904. package/dist/editor/settings/panels/McpAccessSettingsView.js +221 -0
  905. package/dist/editor/settings/panels/McpAccessSettingsView.js.map +1 -0
  906. package/dist/editor/settings/panels/ModelConfigPanel.js +1 -0
  907. package/dist/editor/settings/panels/ModelConfigPanel.js.map +1 -1
  908. package/dist/editor/settings/panels/ModelsPanel.js +60 -6
  909. package/dist/editor/settings/panels/ModelsPanel.js.map +1 -1
  910. package/dist/editor/settings/panels/PersistentLogsPanel.js +2 -1
  911. package/dist/editor/settings/panels/PersistentLogsPanel.js.map +1 -1
  912. package/dist/editor/settings/panels/ProjectTemplateAgentPanel.js +1 -1
  913. package/dist/editor/settings/panels/ProjectTemplateAgentPanel.js.map +1 -1
  914. package/dist/editor/settings/panels/ProvidersPanel.js +2 -1
  915. package/dist/editor/settings/panels/ProvidersPanel.js.map +1 -1
  916. package/dist/editor/settings/panels/SearchConfigPanel.js +6 -5
  917. package/dist/editor/settings/panels/SearchConfigPanel.js.map +1 -1
  918. package/dist/editor/settings/panels/SpellCheckPanel.d.ts +8 -0
  919. package/dist/editor/settings/panels/SpellCheckPanel.js +253 -0
  920. package/dist/editor/settings/panels/SpellCheckPanel.js.map +1 -0
  921. package/dist/editor/settings/panels/StatusPanel.js +5 -6
  922. package/dist/editor/settings/panels/StatusPanel.js.map +1 -1
  923. package/dist/editor/settings/panels/UserPreferencesPanel.js +5 -2
  924. package/dist/editor/settings/panels/UserPreferencesPanel.js.map +1 -1
  925. package/dist/editor/settings/panels/index.d.ts +2 -0
  926. package/dist/editor/settings/panels/index.js +2 -0
  927. package/dist/editor/settings/panels/index.js.map +1 -1
  928. package/dist/editor/sidebar/ComponentPalette.js +7 -3
  929. package/dist/editor/sidebar/ComponentPalette.js.map +1 -1
  930. package/dist/editor/sidebar/ComponentTree.d.ts +1 -1
  931. package/dist/editor/sidebar/ComponentTree.js +37 -58
  932. package/dist/editor/sidebar/ComponentTree.js.map +1 -1
  933. package/dist/editor/sidebar/DictionaryEditor.js +2 -1
  934. package/dist/editor/sidebar/DictionaryEditor.js.map +1 -1
  935. package/dist/editor/sidebar/EditHistory.js +5 -4
  936. package/dist/editor/sidebar/EditHistory.js.map +1 -1
  937. package/dist/editor/sidebar/FeedbackSidebar.d.ts +7 -0
  938. package/dist/editor/sidebar/FeedbackSidebar.js +300 -0
  939. package/dist/editor/sidebar/FeedbackSidebar.js.map +1 -0
  940. package/dist/editor/sidebar/OperationDetailsContent.js +50 -0
  941. package/dist/editor/sidebar/OperationDetailsContent.js.map +1 -1
  942. package/dist/editor/sidebar/OperationItem.js +4 -1
  943. package/dist/editor/sidebar/OperationItem.js.map +1 -1
  944. package/dist/editor/sidebar/Sessions.js +3 -1
  945. package/dist/editor/sidebar/Sessions.js.map +1 -1
  946. package/dist/editor/sidebar/Validation.js +1 -1
  947. package/dist/editor/sidebar/Validation.js.map +1 -1
  948. package/dist/editor/sidebar/Workbox.js +3 -108
  949. package/dist/editor/sidebar/Workbox.js.map +1 -1
  950. package/dist/editor/sidebar/liveComponentThumbnails.d.ts +7 -3
  951. package/dist/editor/sidebar/liveComponentThumbnails.js +26 -16
  952. package/dist/editor/sidebar/liveComponentThumbnails.js.map +1 -1
  953. package/dist/editor/spellcheck/canvasSpellCheckContextMenu.d.ts +30 -0
  954. package/dist/editor/spellcheck/canvasSpellCheckContextMenu.js +69 -0
  955. package/dist/editor/spellcheck/canvasSpellCheckContextMenu.js.map +1 -0
  956. package/dist/editor/spellcheck/htmlSpellDocument.d.ts +60 -0
  957. package/dist/editor/spellcheck/htmlSpellDocument.js +181 -0
  958. package/dist/editor/spellcheck/htmlSpellDocument.js.map +1 -0
  959. package/dist/editor/spellcheck/htmlSpellTokenizer.d.ts +45 -0
  960. package/dist/editor/spellcheck/htmlSpellTokenizer.js +277 -0
  961. package/dist/editor/spellcheck/htmlSpellTokenizer.js.map +1 -0
  962. package/dist/editor/spellcheck/replacementGuard.d.ts +27 -0
  963. package/dist/editor/spellcheck/replacementGuard.js +29 -0
  964. package/dist/editor/spellcheck/replacementGuard.js.map +1 -0
  965. package/dist/editor/spellcheck/spellCheckCanvasStore.d.ts +17 -0
  966. package/dist/editor/spellcheck/spellCheckCanvasStore.js +37 -0
  967. package/dist/editor/spellcheck/spellCheckCanvasStore.js.map +1 -0
  968. package/dist/editor/spellcheck/spellCheckCanvasTargets.d.ts +71 -0
  969. package/dist/editor/spellcheck/spellCheckCanvasTargets.js +126 -0
  970. package/dist/editor/spellcheck/spellCheckCanvasTargets.js.map +1 -0
  971. package/dist/editor/spellcheck/spellCheckClient.d.ts +66 -0
  972. package/dist/editor/spellcheck/spellCheckClient.js +0 -0
  973. package/dist/editor/spellcheck/spellCheckClient.js.map +1 -0
  974. package/dist/editor/spellcheck/spellCheckContextMenu.d.ts +52 -0
  975. package/dist/editor/spellcheck/spellCheckContextMenu.js +120 -0
  976. package/dist/editor/spellcheck/spellCheckContextMenu.js.map +1 -0
  977. package/dist/editor/spellcheck/spellCheckReplace.d.ts +8 -0
  978. package/dist/editor/spellcheck/spellCheckReplace.js +20 -0
  979. package/dist/editor/spellcheck/spellCheckReplace.js.map +1 -0
  980. package/dist/editor/spellcheck/spellCheckStyles.d.ts +11 -0
  981. package/dist/editor/spellcheck/spellCheckStyles.js +12 -0
  982. package/dist/editor/spellcheck/spellCheckStyles.js.map +1 -0
  983. package/dist/editor/spellcheck/spellCheckTypes.d.ts +94 -0
  984. package/dist/editor/spellcheck/spellCheckTypes.js +2 -0
  985. package/dist/editor/spellcheck/spellCheckTypes.js.map +1 -0
  986. package/dist/editor/spellcheck/textMarkHitTest.d.ts +14 -0
  987. package/dist/editor/spellcheck/textMarkHitTest.js +39 -0
  988. package/dist/editor/spellcheck/textMarkHitTest.js.map +1 -0
  989. package/dist/editor/spellcheck/useSpellCheck.d.ts +16 -0
  990. package/dist/editor/spellcheck/useSpellCheck.js +57 -0
  991. package/dist/editor/spellcheck/useSpellCheck.js.map +1 -0
  992. package/dist/editor/ui/DynamicRenderingsPublishWarning.d.ts +14 -0
  993. package/dist/editor/ui/DynamicRenderingsPublishWarning.js +40 -0
  994. package/dist/editor/ui/DynamicRenderingsPublishWarning.js.map +1 -0
  995. package/dist/editor/ui/ItemNameDialogNew.js +11 -2
  996. package/dist/editor/ui/ItemNameDialogNew.js.map +1 -1
  997. package/dist/editor/ui/ItemSearch.d.ts +2 -0
  998. package/dist/editor/ui/ItemSearch.js +2 -2
  999. package/dist/editor/ui/ItemSearch.js.map +1 -1
  1000. package/dist/editor/ui/ParheliaMark.d.ts +15 -0
  1001. package/dist/editor/ui/ParheliaMark.js +12 -0
  1002. package/dist/editor/ui/ParheliaMark.js.map +1 -0
  1003. package/dist/editor/ui/PublishDialog.d.ts +2 -0
  1004. package/dist/editor/ui/PublishDialog.js +4 -1
  1005. package/dist/editor/ui/PublishDialog.js.map +1 -1
  1006. package/dist/editor/ui/PublishItemDialog.js +3 -2
  1007. package/dist/editor/ui/PublishItemDialog.js.map +1 -1
  1008. package/dist/editor/ui/PublishReadinessSummary.js +1 -1
  1009. package/dist/editor/ui/PublishReadinessSummary.js.map +1 -1
  1010. package/dist/editor/ui/PublishRestrictionsDialog.d.ts +33 -0
  1011. package/dist/editor/ui/PublishRestrictionsDialog.js +208 -38
  1012. package/dist/editor/ui/PublishRestrictionsDialog.js.map +1 -1
  1013. package/dist/editor/ui/RootItemPicker.d.ts +18 -0
  1014. package/dist/editor/ui/RootItemPicker.js +112 -0
  1015. package/dist/editor/ui/RootItemPicker.js.map +1 -0
  1016. package/dist/editor/ui/WorkboxItemsTable.js +1 -1
  1017. package/dist/editor/ui/WorkboxItemsTable.js.map +1 -1
  1018. package/dist/editor/undoEligibility.d.ts +2 -0
  1019. package/dist/editor/undoEligibility.js +8 -0
  1020. package/dist/editor/undoEligibility.js.map +1 -0
  1021. package/dist/editor/utils/dataTransferImages.d.ts +7 -0
  1022. package/dist/editor/utils/dataTransferImages.js +43 -0
  1023. package/dist/editor/utils/dataTransferImages.js.map +1 -0
  1024. package/dist/editor/utils/itemConverters.js +9 -0
  1025. package/dist/editor/utils/itemConverters.js.map +1 -1
  1026. package/dist/editor/utils/keyboardNavigation.js +54 -4
  1027. package/dist/editor/utils/keyboardNavigation.js.map +1 -1
  1028. package/dist/editor/utils.d.ts +4 -4
  1029. package/dist/editor/utils.js +9 -8
  1030. package/dist/editor/utils.js.map +1 -1
  1031. package/dist/editor/validation/navigateToValidationIssue.d.ts +2 -2
  1032. package/dist/editor/validation/navigateToValidationIssue.js +1 -1
  1033. package/dist/editor/validation/navigateToValidationIssue.js.map +1 -1
  1034. package/dist/editor/validation/validationRulerIssues.d.ts +17 -0
  1035. package/dist/editor/validation/validationRulerIssues.js +44 -0
  1036. package/dist/editor/validation/validationRulerIssues.js.map +1 -0
  1037. package/dist/editor/views/CompareView.js +3 -4
  1038. package/dist/editor/views/CompareView.js.map +1 -1
  1039. package/dist/editor/views/EditorSlot.js +10 -4
  1040. package/dist/editor/views/EditorSlot.js.map +1 -1
  1041. package/dist/editor/views/ItemEditor.d.ts +3 -1
  1042. package/dist/editor/views/ItemEditor.js +43 -38
  1043. package/dist/editor/views/ItemEditor.js.map +1 -1
  1044. package/dist/editor/views/ItemEditorPane.js +3 -3
  1045. package/dist/editor/views/ItemEditorPane.js.map +1 -1
  1046. package/dist/editor/views/SingleEditView.js +10 -32
  1047. package/dist/editor/views/SingleEditView.js.map +1 -1
  1048. package/dist/editor/views/editorSlotContext.js +62 -90
  1049. package/dist/editor/views/editorSlotContext.js.map +1 -1
  1050. package/dist/index.d.ts +11 -5
  1051. package/dist/index.js +9 -4
  1052. package/dist/index.js.map +1 -1
  1053. package/dist/lib/utils.d.ts +5 -0
  1054. package/dist/lib/utils.js +7 -0
  1055. package/dist/lib/utils.js.map +1 -1
  1056. package/dist/licensing/FeatureGate.js +1 -1
  1057. package/dist/licensing/FeatureGate.js.map +1 -1
  1058. package/dist/licensing/LicenseContext.js +31 -17
  1059. package/dist/licensing/LicenseContext.js.map +1 -1
  1060. package/dist/revision.d.ts +2 -2
  1061. package/dist/revision.js +2 -2
  1062. package/dist/setup/services/setupWizardService.d.ts +6 -2
  1063. package/dist/setup/services/setupWizardService.js +10 -0
  1064. package/dist/setup/services/setupWizardService.js.map +1 -1
  1065. package/dist/setup/wizard/steps/AddModelDialog.js +1 -0
  1066. package/dist/setup/wizard/steps/AddModelDialog.js.map +1 -1
  1067. package/dist/setup/wizard/steps/ImportModelDialog.js +2 -1
  1068. package/dist/setup/wizard/steps/ImportModelDialog.js.map +1 -1
  1069. package/dist/splash-screen/ModernSplashScreen.js +8 -6
  1070. package/dist/splash-screen/ModernSplashScreen.js.map +1 -1
  1071. package/dist/splash-screen/RecentPages.js +8 -5
  1072. package/dist/splash-screen/RecentPages.js.map +1 -1
  1073. package/dist/task-board/TaskBoardWorkspace.js +218 -35
  1074. package/dist/task-board/TaskBoardWorkspace.js.map +1 -1
  1075. package/dist/task-board/components/AttentionPromptDialog.d.ts +13 -0
  1076. package/dist/task-board/components/AttentionPromptDialog.js +45 -0
  1077. package/dist/task-board/components/AttentionPromptDialog.js.map +1 -0
  1078. package/dist/task-board/components/GoalDataView.d.ts +22 -1
  1079. package/dist/task-board/components/GoalDataView.js +63 -17
  1080. package/dist/task-board/components/GoalDataView.js.map +1 -1
  1081. package/dist/task-board/components/GoalFindingsTable.d.ts +43 -0
  1082. package/dist/task-board/components/GoalFindingsTable.js +160 -0
  1083. package/dist/task-board/components/GoalFindingsTable.js.map +1 -0
  1084. package/dist/task-board/components/GoalsMatrix.js +33 -6
  1085. package/dist/task-board/components/GoalsMatrix.js.map +1 -1
  1086. package/dist/task-board/components/IssuePanel.d.ts +31 -0
  1087. package/dist/task-board/components/IssuePanel.js +268 -0
  1088. package/dist/task-board/components/IssuePanel.js.map +1 -0
  1089. package/dist/task-board/components/ProjectBudgetBanner.js +1 -1
  1090. package/dist/task-board/components/ProjectBudgetBanner.js.map +1 -1
  1091. package/dist/task-board/components/ProjectGoalsPanel.js +66 -13
  1092. package/dist/task-board/components/ProjectGoalsPanel.js.map +1 -1
  1093. package/dist/task-board/components/SubgoalFindings.d.ts +40 -0
  1094. package/dist/task-board/components/SubgoalFindings.js +88 -0
  1095. package/dist/task-board/components/SubgoalFindings.js.map +1 -0
  1096. package/dist/task-board/components/TaskAgentPanel.d.ts +2 -0
  1097. package/dist/task-board/components/TaskAgentPanel.js +5 -4
  1098. package/dist/task-board/components/TaskAgentPanel.js.map +1 -1
  1099. package/dist/task-board/components/TaskDetailPanel.js +22 -16
  1100. package/dist/task-board/components/TaskDetailPanel.js.map +1 -1
  1101. package/dist/task-board/components/WizardCommunicationCards.js +1 -1
  1102. package/dist/task-board/components/WizardCommunicationCards.js.map +1 -1
  1103. package/dist/task-board/components/WizardCommunicationCenter.d.ts +2 -0
  1104. package/dist/task-board/components/WizardCommunicationCenter.js +5 -3
  1105. package/dist/task-board/components/WizardCommunicationCenter.js.map +1 -1
  1106. package/dist/task-board/components/WizardCommunicationShared.js +2 -1
  1107. package/dist/task-board/components/WizardCommunicationShared.js.map +1 -1
  1108. package/dist/task-board/components/WizardTask.d.ts +2 -0
  1109. package/dist/task-board/components/WizardTask.js +2 -2
  1110. package/dist/task-board/components/WizardTask.js.map +1 -1
  1111. package/dist/task-board/components/WizardTaskDetailsPanel.d.ts +4 -0
  1112. package/dist/task-board/components/WizardTaskDetailsPanel.js +16 -3
  1113. package/dist/task-board/components/WizardTaskDetailsPanel.js.map +1 -1
  1114. package/dist/task-board/services/issueService.d.ts +193 -0
  1115. package/dist/task-board/services/issueService.js +97 -0
  1116. package/dist/task-board/services/issueService.js.map +1 -0
  1117. package/dist/task-board/services/taskService.d.ts +1 -2
  1118. package/dist/task-board/services/taskService.js +0 -3
  1119. package/dist/task-board/services/taskService.js.map +1 -1
  1120. package/dist/task-board/taskBlockers.d.ts +10 -0
  1121. package/dist/task-board/taskBlockers.js +66 -0
  1122. package/dist/task-board/taskBlockers.js.map +1 -0
  1123. package/dist/task-board/types.d.ts +24 -7
  1124. package/dist/task-board/utils/projectDashboardModel.js +14 -0
  1125. package/dist/task-board/utils/projectDashboardModel.js.map +1 -1
  1126. package/dist/task-board/views/DependencyGraphView.d.ts +22 -0
  1127. package/dist/task-board/views/DependencyGraphView.js +111 -14
  1128. package/dist/task-board/views/DependencyGraphView.js.map +1 -1
  1129. package/dist/task-board/views/KanbanView.js +8 -10
  1130. package/dist/task-board/views/KanbanView.js.map +1 -1
  1131. package/dist/task-board/views/ProjectDashboardView.js +5 -13
  1132. package/dist/task-board/views/ProjectDashboardView.js.map +1 -1
  1133. package/dist/tour/Tour.js +4 -1
  1134. package/dist/tour/Tour.js.map +1 -1
  1135. package/dist/tour/sandbox-tour-copy.d.ts +8 -0
  1136. package/dist/tour/sandbox-tour-copy.js +8 -0
  1137. package/dist/tour/sandbox-tour-copy.js.map +1 -1
  1138. package/dist/tour/sandbox-tour.d.ts +3 -0
  1139. package/dist/tour/sandbox-tour.js +107 -3
  1140. package/dist/tour/sandbox-tour.js.map +1 -1
  1141. package/dist/types.d.ts +85 -1
  1142. package/package.json +6 -2
  1143. package/styles.css +74 -3
  1144. package/dist/editor/page-editor-chrome/bridgeLinkValue.d.ts +0 -10
  1145. package/dist/editor/page-editor-chrome/bridgeLinkValue.js +0 -55
  1146. package/dist/editor/page-editor-chrome/bridgeLinkValue.js.map +0 -1
@@ -1,4 +1,13 @@
1
1
  import type { Comment } from "../../types";
2
- export declare function CommentQuote({ comment }: {
2
+ /**
3
+ * How following a quote reaches the quoted comment:
4
+ * - `dom`: reveal the quoted comment inside the same surface (list, popover)
5
+ * by scrolling its nearest feedback scroll container;
6
+ * - `select`: select the quoted comment so the owning surface pins its thread
7
+ * and the canvas scrolls to its anchor (the comment margin).
8
+ */
9
+ export type FeedbackNavigation = "dom" | "select";
10
+ export declare function CommentQuote({ comment, navigation, }: {
3
11
  comment: Comment;
12
+ navigation?: FeedbackNavigation;
4
13
  }): import("react").JSX.Element;
@@ -1,16 +1,25 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { formatDate } from "../utils";
3
+ import { useEditContext, useFieldsEditContext } from "../client/editContext";
3
4
  import { useFeedbackAuthor } from "./feedbackAvatar";
4
5
  import { stripCommentImages } from "./commentImages";
5
- import { isTextSelectionClick } from "./feedbackSelection";
6
- export function CommentQuote({ comment }) {
6
+ import { EmojiText } from "../../components/emoji/EmojiText";
7
+ import { isTextSelectionClick, selectFeedbackComment, } from "./feedbackSelection";
8
+ import { revealInFeedbackScrollContainer } from "./scrollWithin";
9
+ export function CommentQuote({ comment, navigation = "dom", }) {
7
10
  const author = useFeedbackAuthor(comment);
11
+ const editContext = useEditContext();
12
+ const fieldsContext = useFieldsEditContext();
8
13
  const created = comment.created ? new Date(comment.created) : undefined;
9
14
  const date = created && !Number.isNaN(created.getTime()) ? created : undefined;
10
15
  return (_jsx("button", { type: "button", className: "border-border-default hover:bg-neutral-grey-5 focus-visible:ring-highlight-100 mb-2 block w-full cursor-pointer rounded-md border bg-white px-3 py-2 text-left shadow-sm focus-visible:ring-2 focus-visible:outline-none", "aria-label": `Jump to comment by ${author.displayName}`, "data-testid": "comment-quote", onClick: (event) => {
11
16
  event.stopPropagation();
12
17
  if (isTextSelectionClick(event.currentTarget, event))
13
18
  return;
19
+ if (navigation === "select") {
20
+ void selectFeedbackComment(comment, editContext, fieldsContext);
21
+ return;
22
+ }
14
23
  // Keep navigation within the surface containing this quote: the same
15
24
  // comment can also be mounted in the sidebar behind an open popover.
16
25
  const thread = event.currentTarget.closest("[data-comment-thread]");
@@ -18,13 +27,9 @@ export function CommentQuote({ comment }) {
18
27
  if (!target)
19
28
  return;
20
29
  target.focus({ preventScroll: true });
21
- target.scrollIntoView({
22
- behavior: window.matchMedia("(prefers-reduced-motion: reduce)")
23
- .matches
24
- ? "instant"
25
- : "smooth",
26
- block: "nearest",
27
- });
28
- }, children: _jsxs("span", { className: "border-neutral-grey-50 block min-w-0 border-l-2 pl-2", children: [_jsxs("span", { className: "text-neutral-grey-50 mb-0.5 flex flex-wrap items-baseline gap-x-2 text-xs leading-4", children: [_jsx("span", { className: "min-w-0 truncate font-medium", children: author.displayName }), date && (_jsx("time", { dateTime: date.toISOString(), children: formatDate(date) }))] }), _jsx("span", { className: "text-neutral-grey-100 line-clamp-3 text-sm leading-5 [overflow-wrap:anywhere] whitespace-pre-wrap select-text", children: stripCommentImages(comment.text) })] }) }));
30
+ // Only the surface's own scroll container moves; scrollIntoView would
31
+ // also scroll every ancestor (editor shell, overlay roots).
32
+ revealInFeedbackScrollContainer(target, { behavior: "smooth" });
33
+ }, children: _jsxs("span", { className: "border-neutral-grey-50 block min-w-0 border-l-2 pl-2", children: [_jsxs("span", { className: "text-neutral-grey-50 mb-0.5 flex flex-wrap items-baseline gap-x-2 text-xs leading-4", children: [_jsx("span", { className: "min-w-0 truncate font-medium", children: author.displayName }), date && (_jsx("time", { dateTime: date.toISOString(), children: formatDate(date) }))] }), _jsx("span", { className: "text-neutral-grey-100 line-clamp-3 text-sm leading-5 [overflow-wrap:anywhere] whitespace-pre-wrap select-text", children: _jsx(EmojiText, { text: stripCommentImages(comment.text) }) })] }) }));
29
34
  }
30
35
  //# sourceMappingURL=CommentQuote.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"CommentQuote.js","sourceRoot":"","sources":["../../../src/editor/reviews/CommentQuote.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AACtC,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAE3D,MAAM,UAAU,YAAY,CAAC,EAAE,OAAO,EAAwB;IAC5D,MAAM,MAAM,GAAG,iBAAiB,CAAC,OAAO,CAAC,CAAC;IAC1C,MAAM,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;IACxE,MAAM,IAAI,GACR,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC;IAEpE,OAAO,CACL,iBACE,IAAI,EAAC,QAAQ,EACb,SAAS,EAAC,0NAA0N,gBACxN,sBAAsB,MAAM,CAAC,WAAW,EAAE,iBAC1C,eAAe,EAC3B,OAAO,EAAE,CAAC,KAAK,EAAE,EAAE;YACjB,KAAK,CAAC,eAAe,EAAE,CAAC;YACxB,IAAI,oBAAoB,CAAC,KAAK,CAAC,aAAa,EAAE,KAAK,CAAC;gBAAE,OAAO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CAAC,aAAa,CAAC,OAAO,CAAC,uBAAuB,CAAC,CAAC;YACpE,MAAM,MAAM,GAAG,KAAK,CAAC,IAAI,CACvB,MAAM,EAAE,gBAAgB,CAAc,mBAAmB,CAAC,IAAI,EAAE,CACjE,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC,SAAS,KAAK,OAAO,CAAC,EAAE,CAAC,CAAC;YAC9D,IAAI,CAAC,MAAM;gBAAE,OAAO;YACpB,MAAM,CAAC,KAAK,CAAC,EAAE,aAAa,EAAE,IAAI,EAAE,CAAC,CAAC;YACtC,sEAAsE;YACtE,4DAA4D;YAC5D,+BAA+B,CAAC,MAAM,EAAE,EAAE,QAAQ,EAAE,QAAQ,EAAE,CAAC,CAAC;QAClE,CAAC,YAED,gBAAM,SAAS,EAAC,sDAAsD,aACpE,gBAAM,SAAS,EAAC,qFAAqF,aACnG,eAAM,SAAS,EAAC,8BAA8B,YAC3C,MAAM,CAAC,WAAW,GACd,EACN,IAAI,IAAI,CACP,eAAM,QAAQ,EAAE,IAAI,CAAC,WAAW,EAAE,YAAG,UAAU,CAAC,IAAI,CAAC,GAAQ,CAC9D,IACI,EACP,eAAM,SAAS,EAAC,+GAA+G,YAC7H,KAAC,SAAS,IAAC,IAAI,EAAE,kBAAkB,CAAC,OAAO,CAAC,IAAI,CAAC,GAAI,GAChD,IACF,GACA,CACV,CAAC;AACJ,CAAC"}
@@ -0,0 +1,13 @@
1
+ import type { PickableRect } from "./commentTargetPicker";
2
+ /**
3
+ * Outlines what a click would comment on while picking a comment target,
4
+ * with a label naming it. Never takes pointer events: the surface or form
5
+ * underneath owns the pointer.
6
+ */
7
+ export declare function CommentTargetOutline({ rect, label, position, zIndex, }: {
8
+ rect: PickableRect;
9
+ label: string;
10
+ /** `absolute` inside the canvas overlay layer, `fixed` over editor forms. */
11
+ position: "absolute" | "fixed";
12
+ zIndex: number;
13
+ }): import("react").JSX.Element;
@@ -0,0 +1,21 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { MessageCirclePlus } from "lucide-react";
3
+ /**
4
+ * Outlines what a click would comment on while picking a comment target,
5
+ * with a label naming it. Never takes pointer events: the surface or form
6
+ * underneath owns the pointer.
7
+ */
8
+ export function CommentTargetOutline({ rect, label, position, zIndex, }) {
9
+ // The label sits above the box, or inside its top edge when there is no
10
+ // room above (targets at the very top of the page or viewport).
11
+ const labelInside = rect.y < 22;
12
+ return (_jsx("div", { "data-testid": "comment-target-outline", className: "border-highlight-100 bg-highlight-100/5 pointer-events-none rounded-[3px] border-2", style: {
13
+ position,
14
+ left: rect.x,
15
+ top: rect.y,
16
+ width: rect.width,
17
+ height: rect.height,
18
+ zIndex,
19
+ }, children: _jsxs("div", { "data-testid": "comment-target-label", className: "bg-highlight-100 absolute left-[-2px] flex max-w-[260px] items-center gap-1 rounded-[3px] px-1.5 py-0.5 text-[11px] leading-4 font-medium whitespace-nowrap text-white", style: labelInside ? { top: -2 } : { bottom: "100%" }, children: [_jsx(MessageCirclePlus, { className: "h-3 w-3 shrink-0", strokeWidth: 1.5 }), _jsx("span", { className: "truncate", children: label })] }) }));
20
+ }
21
+ //# sourceMappingURL=CommentTargetOutline.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CommentTargetOutline.js","sourceRoot":"","sources":["../../../src/editor/reviews/CommentTargetOutline.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAGjD;;;;GAIG;AACH,MAAM,UAAU,oBAAoB,CAAC,EACnC,IAAI,EACJ,KAAK,EACL,QAAQ,EACR,MAAM,GAOP;IACC,wEAAwE;IACxE,gEAAgE;IAChE,MAAM,WAAW,GAAG,IAAI,CAAC,CAAC,GAAG,EAAE,CAAC;IAEhC,OAAO,CACL,6BACc,wBAAwB,EACpC,SAAS,EAAC,oFAAoF,EAC9F,KAAK,EAAE;YACL,QAAQ;YACR,IAAI,EAAE,IAAI,CAAC,CAAC;YACZ,GAAG,EAAE,IAAI,CAAC,CAAC;YACX,KAAK,EAAE,IAAI,CAAC,KAAK;YACjB,MAAM,EAAE,IAAI,CAAC,MAAM;YACnB,MAAM;SACP,YAED,8BACc,sBAAsB,EAClC,SAAS,EAAC,wKAAwK,EAClL,KAAK,EAAE,WAAW,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,aAErD,KAAC,iBAAiB,IAAC,SAAS,EAAC,kBAAkB,EAAC,WAAW,EAAE,GAAG,GAAI,EACpE,eAAM,SAAS,EAAC,UAAU,YAAE,KAAK,GAAQ,IACrC,GACF,CACP,CAAC;AACJ,CAAC"}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * The editor-document half of comment target picking: form fields become
3
+ * pickable, the picker cursor applies across the editor, Escape or a click on
4
+ * anything that is not a target leaves the mode. Mounted only while picking.
5
+ * (The canvas is covered by `CommentTargetPickerCanvasLayer`.)
6
+ */
7
+ export declare function CommentTargetPickerDomLayer(): import("react").ReactPortal | null;
@@ -0,0 +1,117 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { useEffect, useRef, useState } from "react";
3
+ import { createPortal } from "react-dom";
4
+ import { useEditContext } from "../client/editContext";
5
+ import { COMMENT_PICKER_CURSOR, COMMENT_PICKER_IGNORE_ATTRIBUTE, stopCommentTargetPicking, } from "./commentTargetPicker";
6
+ import { CommentTargetOutline } from "./CommentTargetOutline";
7
+ /** Form fields of the editor (item form, page side form) carry these. */
8
+ const FORM_FIELD_SELECTOR = "[data-field-id][data-itemid]";
9
+ const PICKING_ATTRIBUTE = "data-comment-target-picking";
10
+ function closestFormField(target) {
11
+ return target instanceof Element
12
+ ? target.closest(FORM_FIELD_SELECTOR)
13
+ : null;
14
+ }
15
+ function readFieldDescriptor(element) {
16
+ const fieldId = element.getAttribute("data-field-id");
17
+ const itemId = element.getAttribute("data-itemid");
18
+ if (!fieldId || !itemId)
19
+ return null;
20
+ const version = Number.parseInt(element.getAttribute("data-version") ?? "", 10);
21
+ return {
22
+ fieldId,
23
+ item: {
24
+ id: itemId,
25
+ language: element.getAttribute("data-language") ?? "",
26
+ version: Number.isFinite(version) ? version : 0,
27
+ },
28
+ };
29
+ }
30
+ /**
31
+ * The editor-document half of comment target picking: form fields become
32
+ * pickable, the picker cursor applies across the editor, Escape or a click on
33
+ * anything that is not a target leaves the mode. Mounted only while picking.
34
+ * (The canvas is covered by `CommentTargetPickerCanvasLayer`.)
35
+ */
36
+ export function CommentTargetPickerDomLayer() {
37
+ const editContext = useEditContext();
38
+ const [hovered, setHovered] = useState();
39
+ // The edit context changes identity with every editor state change; the
40
+ // listeners only need its latest `addComment`.
41
+ const addCommentRef = useRef(editContext?.addComment);
42
+ addCommentRef.current = editContext?.addComment;
43
+ useEffect(() => {
44
+ const root = document.documentElement;
45
+ root.setAttribute(PICKING_ATTRIBUTE, "");
46
+ const style = document.createElement("style");
47
+ style.textContent = `html[${PICKING_ATTRIBUTE}], html[${PICKING_ATTRIBUTE}] * { cursor: ${COMMENT_PICKER_CURSOR} !important; }`;
48
+ document.head.appendChild(style);
49
+ let hoveredElement = null;
50
+ const showOutline = (element) => {
51
+ hoveredElement = element;
52
+ if (!element) {
53
+ setHovered(undefined);
54
+ return;
55
+ }
56
+ const box = element.getBoundingClientRect();
57
+ setHovered({
58
+ rect: { x: box.left, y: box.top, width: box.width, height: box.height },
59
+ label: element.getAttribute("data-fieldname") || "Field",
60
+ });
61
+ };
62
+ const handleMove = (event) => {
63
+ const field = closestFormField(event.target);
64
+ if (field !== hoveredElement)
65
+ showOutline(field);
66
+ };
67
+ // The outline is fixed-positioned; keep it on its field while scrolling.
68
+ const handleScroll = () => {
69
+ if (hoveredElement)
70
+ showOutline(hoveredElement);
71
+ };
72
+ // The mouse-down is left alone so text can be selected in the field; a
73
+ // selection inside it becomes the comment's range. The click that ends
74
+ // the gesture picks: it must not reach the field's own handlers, and the
75
+ // field gives the focus back so the composer can take it.
76
+ const handleClick = (event) => {
77
+ const target = event.target instanceof Element ? event.target : null;
78
+ if (target?.closest(`[${COMMENT_PICKER_IGNORE_ATTRIBUTE}]`))
79
+ return;
80
+ const field = closestFormField(target);
81
+ const descriptor = field ? readFieldDescriptor(field) : null;
82
+ stopCommentTargetPicking();
83
+ if (!descriptor)
84
+ return; // a click elsewhere just leaves the mode
85
+ event.preventDefault();
86
+ event.stopPropagation();
87
+ const active = document.activeElement;
88
+ if (active instanceof HTMLElement && field?.contains(active)) {
89
+ active.blur();
90
+ }
91
+ addCommentRef.current?.({ field: descriptor });
92
+ };
93
+ const handleKeyDown = (event) => {
94
+ if (event.key !== "Escape")
95
+ return;
96
+ event.preventDefault();
97
+ event.stopPropagation();
98
+ stopCommentTargetPicking();
99
+ };
100
+ document.addEventListener("mousemove", handleMove, true);
101
+ document.addEventListener("scroll", handleScroll, true);
102
+ document.addEventListener("click", handleClick, true);
103
+ document.addEventListener("keydown", handleKeyDown, true);
104
+ return () => {
105
+ document.removeEventListener("mousemove", handleMove, true);
106
+ document.removeEventListener("scroll", handleScroll, true);
107
+ document.removeEventListener("click", handleClick, true);
108
+ document.removeEventListener("keydown", handleKeyDown, true);
109
+ root.removeAttribute(PICKING_ATTRIBUTE);
110
+ style.remove();
111
+ };
112
+ }, []);
113
+ if (!hovered || typeof document === "undefined")
114
+ return null;
115
+ return createPortal(_jsx(CommentTargetOutline, { rect: hovered.rect, label: hovered.label, position: "fixed", zIndex: 300 }), document.body);
116
+ }
117
+ //# sourceMappingURL=CommentTargetPickerDomLayer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CommentTargetPickerDomLayer.js","sourceRoot":"","sources":["../../../src/editor/reviews/CommentTargetPickerDomLayer.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,MAA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13
  className?: string;
14
+ /**
15
+ * Shares a single line with other actions (margin balloon): never wraps;
16
+ * the label truncates before it would push the line apart.
17
+ */
18
+ compact?: boolean;
14
19
  onStarted?: () => void;
15
20
  };
16
21
  /**
@@ -19,5 +24,5 @@ type CommentThreadAgentLinkProps = {
19
24
  * available or the thread cannot be worked on (resolved, read-only, unsaved).
20
25
  * Hidden until the surrounding thread is hovered or the link has focus.
21
26
  */
22
- export declare function CommentThreadAgentLink({ rootComment, threadComments, resolvedAuthorNames, className, onStarted, }: CommentThreadAgentLinkProps): import("react").JSX.Element | null;
27
+ export declare function CommentThreadAgentLink({ rootComment, threadComments, resolvedAuthorNames, className, compact, onStarted, }: CommentThreadAgentLinkProps): import("react").JSX.Element | null;
23
28
  export {};
@@ -17,7 +17,7 @@ export const COMMENT_THREAD_HOVER_GROUP_CLASS = "group/comment-thread";
17
17
  * available or the thread cannot be worked on (resolved, read-only, unsaved).
18
18
  * Hidden until the surrounding thread is hovered or the link has focus.
19
19
  */
20
- export function CommentThreadAgentLink({ rootComment, threadComments, resolvedAuthorNames, className, onStarted, }) {
20
+ export function CommentThreadAgentLink({ rootComment, threadComments, resolvedAuthorNames, className, compact = false, onStarted, }) {
21
21
  const editContext = useEditContext();
22
22
  const canUseAi = useFeature(LicenseFeatures.AI);
23
23
  if (!canUseAi ||
@@ -27,11 +27,11 @@ export function CommentThreadAgentLink({ rootComment, threadComments, resolvedAu
27
27
  editContext?.readonly) {
28
28
  return null;
29
29
  }
30
- return (_jsx("div", { className: cn("flex", className), children: _jsxs("button", { type: "button", className: cn("text-neutral-grey-50 hover:text-neutral-grey-100 inline-flex items-start gap-1.5 text-left text-xs leading-4 underline-offset-2 transition-opacity hover:underline focus-visible:opacity-100", !editContext?.isMobile &&
31
- "opacity-0 group-hover/comment-thread:opacity-100"), "data-testid": "comment-thread-start-agent", onClick: (event) => {
30
+ return (_jsx("div", { className: cn("flex", compact && "min-w-0", className), children: _jsxs("button", { type: "button", className: cn("text-neutral-grey-50 hover:text-neutral-grey-100 inline-flex items-start text-left text-xs leading-4 underline-offset-2 transition-opacity hover:underline focus-visible:opacity-100", compact ? "max-w-full min-w-0 gap-1" : "gap-1.5", !editContext?.isMobile &&
31
+ "opacity-0 group-hover/comment-thread:opacity-100"), title: compact ? COMMENT_THREAD_AGENT_LINK_LABEL : undefined, "data-testid": "comment-thread-start-agent", onClick: (event) => {
32
32
  event.stopPropagation();
33
33
  openAiAgentForCommentThread(rootComment, threadComments, editContext, resolvedAuthorNames);
34
34
  onStarted?.();
35
- }, children: [_jsx(Sparkles, { className: "mt-px h-3.5 w-3.5 shrink-0", strokeWidth: 1 }), COMMENT_THREAD_AGENT_LINK_LABEL] }) }));
35
+ }, children: [_jsx(Sparkles, { className: "mt-px h-3.5 w-3.5 shrink-0", strokeWidth: 1 }), compact ? (_jsx("span", { className: "truncate", children: COMMENT_THREAD_AGENT_LINK_LABEL })) : (COMMENT_THREAD_AGENT_LINK_LABEL)] }) }));
36
36
  }
37
37
  //# sourceMappingURL=CommentThreadAgentLink.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"CommentThreadAgentLink.js","sourceRoot":"","sources":["../../../src/editor/reviews/CommentThreadAgentLink.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAExC,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC9D,OAAO,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC;AAClE,OAAO,EAAE,2BAA2B,EAAE,MAAM,aAAa,CAAC;AAC1D,OAAO,EAAE,EAAE,EAAE,MAAM,iBAAiB,CAAC;AAErC,MAAM,CAAC,MAAM,+BAA+B,GAAG,oBAAoB,CAAC;AAEpE;;;GAGG;AACH,MAAM,CAAC,MAAM,gCAAgC,GAAG,sBAAsB,CAAC;AAWvE;;;;;GAKG;AACH,MAAM,UAAU,sBAAsB,CAAC,EACrC,WAAW,EACX,cAAc,EACd,mBAAmB,EACnB,SAAS,EACT,SAAS,GACmB;IAC5B,MAAM,WAAW,GAAG,cAAc,EAAE,CAAC;IACrC,MAAM,QAAQ,GAAG,UAAU,CAAC,eAAe,CAAC,EAAE,CAAC,CAAC;IAEhD,IACE,CAAC,QAAQ;QACT,CAAC,cAAc,CAAC,WAAW,CAAC;QAC5B,WAAW,CAAC,KAAK;QACjB,WAAW,CAAC,UAAU;QACtB,WAAW,EAAE,QAAQ,EACrB,CAAC;QACD,OAAO,IAAI,CAAC;IACd,CAAC;IAED,OAAO,CACL,cAAK,SAAS,EAAE,EAAE,CAAC,MAAM,EAAE,SAAS,CAAC,YACnC,kBACE,IAAI,EAAC,QAAQ,EACb,SAAS,EAAE,EAAE,CACX,8LAA8L,EAC9L,CAAC,WAAW,EAAE,QAAQ;gBACpB,kDAAkD,CACrD,iBACW,4BAA4B,EACxC,OAAO,EAAE,CAAC,KAAK,EAAE,EAAE;gBACjB,KAAK,CAAC,eAAe,EAAE,CAAC;gBACxB,2BAA2B,CACzB,WAAW,EACX,cAAc,EACd,WAAW,EACX,mBAAmB,CACpB,CAAC;gBACF,SAAS,EAAE,EAAE,CAAC;YAChB,CAAC,aAED,KAAC,QAAQ,IAAC,SAAS,EAAC,4BAA4B,EAAC,WAAW,EAAE,CAAC,GAAI,EAClE,+BAA+B,IACzB,GACL,CACP,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"CommentThreadAgentLink.js","sourceRoot":"","sources":["../../../src/editor/reviews/CommentThreadAgentLink.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAExC,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC9D,OAAO,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC;AAClE,OAAO,EAAE,2BAA2B,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EAAC,WAAW,EAAE,CAAC,GAAI,EAClE,OAAO,CAAC,CAAC,CAAC,CACT,eAAM,SAAS,EAAC,UAAU,YAAE,+BAA+B,GAAQ,CACpE,CAAC,CAAC,CAAC,CACF,+BAA+B,CAChC,IACM,GACL,CACP,CAAC;AACJ,CAAC"}
@@ -0,0 +1,34 @@
1
+ import { type Ref } from "react";
2
+ import type { FeedbackNavigation } from "./CommentQuote";
3
+ import type { CommentThread } from "./feedbackThreads";
4
+ import type { FeedbackItem } from "./feedbackOrdering";
5
+ export type CommentThreadCardProps = {
6
+ thread: CommentThread;
7
+ availableTags: {
8
+ label: string;
9
+ color: string;
10
+ }[];
11
+ getAuthorName: (item: FeedbackItem) => string;
12
+ resolvedAuthorNames: Record<string, string>;
13
+ selected: boolean;
14
+ navigation?: FeedbackNavigation;
15
+ className?: string;
16
+ /** Bounds the thread body (which then scrolls) so one long thread never
17
+ * exceeds the page beside it. */
18
+ bodyMaxHeight?: number;
19
+ /**
20
+ * Word-style margin balloon: flat frame without the context header, small
21
+ * type, replies collapsed and the reply composer opened on demand.
22
+ */
23
+ balloon?: boolean;
24
+ /** Name what the thread is about (a balloon that is not beside it). */
25
+ showContext?: boolean;
26
+ onHoverChange?: (hovered: boolean) => void;
27
+ cardRef?: Ref<HTMLDivElement>;
28
+ };
29
+ /**
30
+ * One comment thread: the root comment, its replies (collapsible), the agent
31
+ * link and the reply composer. Reply target, reply text and collapse state
32
+ * live in the thread's draft so the card can be re-homed without losing them.
33
+ */
34
+ export declare function CommentThreadCard({ thread, availableTags, getAuthorName, resolvedAuthorNames, selected, navigation, className, bodyMaxHeight, balloon, showContext, onHoverChange, cardRef, }: CommentThreadCardProps): import("react").JSX.Element;
@@ -0,0 +1,156 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useEffect, useRef, useState } from "react";
3
+ import { ChevronDown, ChevronRight, Reply } from "lucide-react";
4
+ import uuid from "react-uuid";
5
+ import { toast } from "sonner";
6
+ import { useEditContext, useFieldsEditContext } from "../client/editContext";
7
+ import { CloseButton } from "../../components/ui/close-button";
8
+ import { cn } from "../../lib/utils";
9
+ import { createOrUpdateComment } from "../services/reviewsService";
10
+ import { Comment as CommentComponent } from "./Comment";
11
+ import { CommentEditor, COMMENT_INPUT_PLACEHOLDER } from "./CommentEditor";
12
+ import { COMMENT_THREAD_HOVER_GROUP_CLASS, CommentThreadAgentLink, } from "./CommentThreadAgentLink";
13
+ import { FeedbackCardFrame, getCommentContextSegments } from "./FeedbackCard";
14
+ import { canReplyToComment } from "./feedbackCommentRules";
15
+ import { useFeedbackDraft } from "./feedbackDrafts";
16
+ import { isTextSelectionClick, selectFeedbackComment, } from "./feedbackSelection";
17
+ import { activateCommentsMode } from "./openCommentsFeedback";
18
+ function buildReplyFrom(base, text, quoteParent, context) {
19
+ return {
20
+ id: uuid(),
21
+ isNew: false,
22
+ parentCommentId: base.id,
23
+ quoteParentComment: quoteParent,
24
+ itemId: base.itemId,
25
+ itemName: base.itemName,
26
+ fieldId: base.fieldId,
27
+ fieldName: base.fieldName,
28
+ mainItemId: base.mainItemId,
29
+ language: base.language || context.language,
30
+ version: base.version || context.version,
31
+ position: 0,
32
+ rangeStart: base.rangeStart,
33
+ rangeEnd: base.rangeEnd,
34
+ author: context.author,
35
+ authorDisplayName: context.authorDisplayName,
36
+ created: new Date().toISOString(),
37
+ text,
38
+ tags: "",
39
+ fieldValue: base.fieldValue,
40
+ };
41
+ }
42
+ /**
43
+ * One comment thread: the root comment, its replies (collapsible), the agent
44
+ * link and the reply composer. Reply target, reply text and collapse state
45
+ * live in the thread's draft so the card can be re-homed without losing them.
46
+ */
47
+ export function CommentThreadCard({ thread, availableTags, getAuthorName, resolvedAuthorNames, selected, navigation = "dom", className, bodyMaxHeight, balloon = false, showContext = false, onHoverChange, cardRef, }) {
48
+ const editContext = useEditContext();
49
+ const fieldsContext = useFieldsEditContext();
50
+ const { root, replies } = thread;
51
+ const [draft, updateDraft, clearDraft] = useFeedbackDraft(thread.id);
52
+ const [isSavingReply, setIsSavingReply] = useState(false);
53
+ // Balloons keep replies folded until asked; the list shows them.
54
+ const isCollapsed = draft.collapsed ?? balloon;
55
+ const replyTarget = draft.replyTargetCommentId
56
+ ? [root, ...replies].find((comment) => comment.id === draft.replyTargetCommentId)
57
+ : undefined;
58
+ // Closing the composer discards its draft: the editor has already revoked
59
+ // its pasted images, which must not come back in the next composer.
60
+ const setReplyTarget = (target) => updateDraft(target
61
+ ? { replyTargetCommentId: target.id, collapsed: false }
62
+ : {
63
+ replyTargetCommentId: undefined,
64
+ replyText: undefined,
65
+ replyAttachments: undefined,
66
+ });
67
+ // A card can unmount under the pointer (deleted, resolved, re-homed by the
68
+ // margin) without a mouseleave; do not leave its hover behind.
69
+ const onHoverChangeRef = useRef(onHoverChange);
70
+ onHoverChangeRef.current = onHoverChange;
71
+ useEffect(() => () => onHoverChangeRef.current?.(false), []);
72
+ const contextSegments = getCommentContextSegments(root, editContext?.currentItemDescriptor?.name);
73
+ const cancelNewComment = (event) => {
74
+ event.stopPropagation();
75
+ if (!root.isNew)
76
+ return;
77
+ editContext?.setComments?.((comments) => comments.filter((comment) => comment.id !== root.id));
78
+ if (editContext?.selectedComment?.id === root.id) {
79
+ editContext.setSelectedComment(undefined);
80
+ }
81
+ // Every draft comment has a fresh id; nothing would ever reuse this entry.
82
+ clearDraft();
83
+ };
84
+ const handleReplySave = async (target, text) => {
85
+ if (!editContext?.currentItemDescriptor)
86
+ return;
87
+ activateCommentsMode(editContext, { reason: "comment-reply" });
88
+ const descriptor = editContext.currentItemDescriptor;
89
+ // A balloon opens its composer by targeting the root; that is a plain
90
+ // reply to the thread, not a quote of it.
91
+ const quotesTarget = replyTarget?.id === target.id && !(balloon && target.id === root.id);
92
+ const newReply = buildReplyFrom(target, text, quotesTarget, {
93
+ language: descriptor.language,
94
+ version: descriptor.version,
95
+ author: editContext.user?.name,
96
+ authorDisplayName: editContext.user?.fullName,
97
+ });
98
+ setIsSavingReply(true);
99
+ try {
100
+ const result = await createOrUpdateComment(newReply);
101
+ if (result.type === "error" || result.type === "unauthorized") {
102
+ console.error("Failed to save reply comment:", result);
103
+ toast.error(result.details || result.summary || "Failed to save reply comment");
104
+ return;
105
+ }
106
+ updateDraft({
107
+ replyTargetCommentId: undefined,
108
+ replyText: undefined,
109
+ replyAttachments: undefined,
110
+ });
111
+ await editContext.loadComments?.();
112
+ }
113
+ catch (error) {
114
+ console.error("Failed to save reply comment:", error);
115
+ toast.error(error instanceof Error ? error.message : "Failed to save reply comment");
116
+ }
117
+ finally {
118
+ setIsSavingReply(false);
119
+ }
120
+ };
121
+ const canReplyToRoot = !!editContext && canReplyToComment(root, root, editContext.readonly);
122
+ const renderReplyEditor = () => {
123
+ if (!editContext)
124
+ return null;
125
+ // The list always offers the composer; a balloon only after "Reply".
126
+ if (balloon && !replyTarget)
127
+ return null;
128
+ const target = replyTarget ?? root;
129
+ if (!canReplyToComment(target, root, editContext.readonly)) {
130
+ return null;
131
+ }
132
+ return (_jsxs("div", { className: balloon ? "mt-2 pl-7" : "mt-3 pt-3", onClick: (event) => event.stopPropagation(), children: [replyTarget && (!balloon || replyTarget.id !== root.id) && (_jsxs("div", { className: "text-neutral-grey-50 mb-2 flex items-center justify-between gap-2 text-xs", children: [_jsxs("span", { className: "truncate", children: ["Replying to ", getAuthorName(replyTarget)] }), _jsx("button", { type: "button", className: "badge-pad-sm text-neutral-grey-50 hover:bg-neutral-grey-5 shrink-0 rounded", onClick: () => setReplyTarget(undefined), children: "Cancel" })] })), _jsx(CommentEditor, { onSave: (text) => handleReplySave(target, text), onCancel: () => setReplyTarget(undefined), isSaving: isSavingReply, placeholder: balloon ? "Reply or @mention" : COMMENT_INPUT_PLACEHOLDER, submitLabel: "Reply", showTagSelector: false, showCancelButton: balloon, balloon: balloon, clearOnSave: true, compact: true, autoFocus: !!replyTarget, value: draft.replyText, onValueChange: (replyText) => updateDraft({ replyText }), attachments: draft.replyAttachments, onAttachmentsChange: (replyAttachments) => updateDraft({ replyAttachments }) }, target.id)] }));
133
+ };
134
+ const repliesLabel = `${replies.length} ${replies.length === 1 ? "reply" : "replies"}`;
135
+ const agentLink = (_jsx(CommentThreadAgentLink, { rootComment: root, threadComments: [root, ...replies], resolvedAuthorNames: resolvedAuthorNames, className: balloon ? "ml-auto" : "mt-1", compact: balloon }));
136
+ return (_jsx("div", { ref: cardRef, "data-feedback-thread-id": thread.id, onMouseEnter: onHoverChange ? () => onHoverChange(true) : undefined, onMouseLeave: onHoverChange ? () => onHoverChange(false) : undefined, children: _jsxs(FeedbackCardFrame, { variant: balloon ? "balloon" : "card", contextSegments: contextSegments, showBalloonContext: showContext, selected: selected, className: cn("cursor-pointer", COMMENT_THREAD_HOVER_GROUP_CLASS, className), bodyClassName: bodyMaxHeight ? "overflow-auto" : undefined, bodyStyle: bodyMaxHeight ? { maxHeight: bodyMaxHeight } : undefined, bodyScrollable: !!bodyMaxHeight, testId: "comment-thread", headerAction:
137
+ // The list's frame header holds the draft's close button; a balloon
138
+ // has no header, its input carries the cancel button instead.
139
+ root.isNew && !balloon ? (_jsx(CloseButton, { onClick: cancelNewComment, "data-testid": "add-comment-cancel", label: "Cancel" })) : undefined, onClick: (event) => {
140
+ // A mouse release that ends a text drag-selection also clicks; keep
141
+ // the selection instead of jumping.
142
+ if (isTextSelectionClick(event.currentTarget, event))
143
+ return;
144
+ void selectFeedbackComment(root, editContext, fieldsContext);
145
+ }, children: [_jsx(CommentComponent, { comment: root, availableTags: availableTags, rootCommentId: root.id, resolvedAuthorName: getAuthorName(root), variant: "inline", showContextHeader: false, showEditorCancelButton: !root.isNew, navigation: navigation, balloon: balloon, onReply: (target) => setReplyTarget(target) }), (replies.length > 0 || (balloon && canReplyToRoot && !root.isNew)) && (_jsxs("div", { className: cn("text-neutral-grey-50 flex items-center",
146
+ // One line, always: a wrapped (hover-only) agent link would
147
+ // reserve an empty line in every balloon.
148
+ balloon ? "mt-1 gap-2 pl-7 whitespace-nowrap" : "mb-3 gap-3"), children: [replies.length > 0 && (_jsxs("button", { type: "button", "data-testid": "comment-thread-replies-toggle", "aria-expanded": !isCollapsed, className: cn("hover:text-neutral-grey-100 flex items-center gap-1 text-left", !balloon && "text-neutral-grey-100 text-sm"), onClick: (event) => {
149
+ event.stopPropagation();
150
+ updateDraft({ collapsed: !isCollapsed });
151
+ }, children: [isCollapsed ? (_jsx(ChevronRight, { size: 12, strokeWidth: 1.5 })) : (_jsx(ChevronDown, { size: 12, strokeWidth: 1.5 })), repliesLabel] })), balloon && canReplyToRoot && !root.isNew && !replyTarget && (_jsxs("button", { type: "button", "data-testid": "comment-reply-button", className: "hover:text-neutral-grey-100 flex items-center gap-1", onClick: (event) => {
152
+ event.stopPropagation();
153
+ setReplyTarget(root);
154
+ }, children: [_jsx(Reply, { size: 12, strokeWidth: 1.5 }), "Reply"] })), balloon && agentLink] })), replies.length > 0 && !isCollapsed && (_jsx("div", { className: cn(balloon && "border-border-default mt-1.5 ml-2.5 border-l pl-3"), children: replies.map((reply) => (_jsx(CommentComponent, { comment: reply, availableTags: availableTags, rootCommentId: root.id, resolvedAuthorName: getAuthorName(reply), variant: "inline", showContextHeader: false, navigation: navigation, balloon: balloon, onReply: (target) => setReplyTarget(target) }, reply.id))) })), !balloon && agentLink, renderReplyEditor()] }) }));
155
+ }
156
+ //# sourceMappingURL=CommentThreadCard.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CommentThreadCard.js","sourceRoot":"","sources":["../../../src/editor/reviews/CommentThreadCard.tsx"],"names":[],"mappings":";AAAA,OAAO,EAA6B,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC/E,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AAChE,OAAO,IAAI,MAAM,YAAY,CAAC;AAC9B,OAAO,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAC;AAE/B,OAAO,EAAE,cAAc,EAAE,oBAAoB,EAAE,MAA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B,KAAK,CAAC,eAAe,EAAE,CAAC;gCACxB,cAAc,CAAC,IAAI,CAAC,CAAC;4BACvB,CAAC,aAED,KAAC,KAAK,IAAC,IAAI,EAAE,EAAE,EAAE,WAAW,EAAE,GAAG,GAAI,aAE9B,CACV,EAIA,OAAO,IAAI,SAAS,IACjB,CACP,EACA,OAAO,CAAC,MAAM,GAAG,CAAC,IAAI,CAAC,WAAW,IAAI,CACrC,cACE,SAAS,EAAE,EAAE,CACX,OAAO,IAAI,mDAAmD,CAC/D,YAEA,OAAO,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CACtB,KAAC,gBAAgB,IAEf,OAAO,EAAE,KAAK,EACd,aAAa,EAAE,aAAa,EAC5B,aAAa,EAAE,IAAI,CAAC,EAAE,EACtB,kBAAkB,EAAE,aAAa,CAAC,KAAK,CAAC,EACxC,OAAO,EAAC,QAAQ,EAChB,iBAAiB,EAAE,KAAK,EACxB,UAAU,EAAE,UAAU,EACtB,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,cAAc,CAAC,MAAM,CAAC,IATtC,KAAK,CAAC,EAAE,CAUb,CACH,CAAC,GACE,CACP,EACA,CAAC,OAAO,IAAI,SAAS,EACrB,iBAAiB,EAAE,IACF,GAChB,CACP,CAAC;AACJ,CAAC"}
@@ -1,5 +1,6 @@
1
1
  import React from "react";
2
2
  import { Comment as CommentType } from "../../types";
3
+ import { type FeedbackNavigation } from "./CommentQuote";
3
4
  export interface CommentViewProps {
4
5
  comment: CommentType;
5
6
  canEdit: boolean;
@@ -22,5 +23,10 @@ export interface CommentViewProps {
22
23
  showCommentIcon?: boolean;
23
24
  showContextInfo?: boolean;
24
25
  compact?: boolean;
26
+ /** How following the quoted comment navigates; see `CommentQuote`. */
27
+ quoteNavigation?: FeedbackNavigation;
28
+ /** Compact Word-style balloon presentation (comment margin): small avatar,
29
+ * author and date on one muted line, long text collapsed. */
30
+ balloon?: boolean;
25
31
  }
26
- export declare function CommentView({ comment, canEdit, canDelete, canResolve, availableTags, basePageId, basePageName, quotedComment, resolvedAuthorName, onEdit, onDelete, onResolve, onUnresolve, onReply, hideActions, showCommentIcon, showContextInfo, compact, }: CommentViewProps): React.JSX.Element;
32
+ export declare function CommentView({ comment, canEdit, canDelete, canResolve, availableTags, basePageId, basePageName, quotedComment, resolvedAuthorName, onEdit, onDelete, onResolve, onUnresolve, onReply, hideActions, showCommentIcon, showContextInfo, compact, quoteNavigation, balloon, }: CommentViewProps): React.JSX.Element;
@@ -8,6 +8,9 @@ import { Avatar } from "../../components/ui/avatar";
8
8
  import { MentionText } from "./MentionText";
9
9
  import { FEEDBACK_SIDEBAR_TEXT_CLASS } from "./feedbackSidebarText";
10
10
  import { CommentQuote } from "./CommentQuote";
11
+ import { CollapsibleText } from "./CollapsibleText";
12
+ import { formatFeedbackBalloonDate } from "./feedbackBalloonDate";
13
+ import { cn } from "../../lib/utils";
11
14
  function getValidResolvedDate(comment) {
12
15
  if (!comment.resolvedDate)
13
16
  return undefined;
@@ -29,10 +32,17 @@ function getResolvedStatusText(comment) {
29
32
  return `Resolved on ${dateText}`;
30
33
  return "Resolved";
31
34
  }
32
- export function CommentView({ comment, canEdit, canDelete, canResolve, availableTags = [], basePageId, basePageName, quotedComment, resolvedAuthorName, onEdit, onDelete, onResolve, onUnresolve, onReply, hideActions = false, showCommentIcon = true, showContextInfo = true, compact = false, }) {
35
+ export function CommentView({ comment, canEdit, canDelete, canResolve, availableTags = [], basePageId, basePageName, quotedComment, resolvedAuthorName, onEdit, onDelete, onResolve, onUnresolve, onReply, hideActions = false, showCommentIcon = true, showContextInfo = true, compact = false, quoteNavigation, balloon = false, }) {
33
36
  const author = useFeedbackAuthor(comment, resolvedAuthorName);
34
- const contentIndentClass = showCommentIcon ? "pl-16" : "pl-9";
37
+ const contentIndentClass = balloon
38
+ ? "pl-7"
39
+ : showCommentIcon
40
+ ? "pl-16"
41
+ : "pl-9";
35
42
  const resolvedStatusText = getResolvedStatusText(comment);
43
+ const createdText = comment.created
44
+ ? formatDate(new Date(comment.created))
45
+ : "";
36
46
  const renderTags = () => {
37
47
  const tagLabels = comment.tags
38
48
  ? comment.tags.split(",").filter((t) => t.trim())
@@ -71,9 +81,17 @@ export function CommentView({ comment, canEdit, canDelete, canResolve, available
71
81
  (canResolve && !comment.isResolved && !!onResolve) ||
72
82
  (canResolve && comment.isResolved && !!onUnresolve) ||
73
83
  (!comment.isResolved && !!onReply);
74
- return (_jsxs("div", { "data-comment-id": comment.id, tabIndex: -1, className: "focus:ring-highlight-100 focus:bg-neutral-grey-5 scroll-my-3 rounded-md focus:ring-2 focus:ring-offset-2 focus:outline-none", children: [_jsxs("div", { className: "flex items-center gap-3", children: [showCommentIcon && (_jsx(MessageCircle, { strokeWidth: 1, className: "text-feedback-blue mt-1 h-4 w-4 shrink-0" })), _jsx(Avatar, { src: author.avatarUrl, name: author.displayName, size: "sm", fallbackColor: author.fallbackColor, fallbackClassName: getFeedbackAvatarClassName(comment), className: "!text-[10px] font-medium", title: author.title }), _jsx("div", { className: "min-w-0 flex-1", children: _jsxs("div", { className: `flex min-w-0 ${compact
75
- ? "min-h-7 items-center gap-2"
76
- : "flex-col justify-center gap-0.5"}`, children: [_jsx("span", { className: "text-neutral-grey-100 truncate text-sm leading-5 font-medium", title: author.title, children: author.displayName }), _jsx("span", { className: "text-neutral-grey-50 shrink-0 text-xs leading-4", children: comment.created ? formatDate(new Date(comment.created)) : "" })] }) }), !hideActions && hasActions && (_jsxs(Popover, { children: [_jsx(PopoverTrigger, { asChild: true, children: _jsx("button", { type: "button", className: "text-neutral-grey-50 hover:bg-neutral-grey-5 -mr-1 inline-flex h-7 w-7 shrink-0 items-center justify-center rounded-full", "aria-label": "Comment actions", onClick: (e) => e.stopPropagation(), children: _jsx(MoreHorizontal, { className: "h-4 w-4", strokeWidth: 1 }) }) }), _jsxs(PopoverContent, { className: `${FEEDBACK_SIDEBAR_TEXT_CLASS} w-44 p-1`, align: "end", children: [canEdit && onEdit && (_jsxs("button", { type: "button", className: "hover:bg-neutral-grey-5 flex w-full items-center gap-2 rounded px-2 py-1.5 text-left text-sm", "data-testid": "comment-action-edit", onClick: (e) => {
84
+ return (_jsxs("div", { "data-comment-id": comment.id, tabIndex: -1, className: cn("scroll-my-3 rounded-md focus:outline-none",
85
+ // A balloon already frames its selected thread; a second ring inside
86
+ // it would double the border.
87
+ !balloon &&
88
+ "focus:ring-highlight-100 focus:bg-neutral-grey-5 focus:ring-2 focus:ring-offset-2"), children: [_jsxs("div", { className: cn("flex items-center", balloon ? "gap-2" : "gap-3"), children: [showCommentIcon && (_jsx(MessageCircle, { strokeWidth: 1, className: "text-feedback-blue mt-1 h-4 w-4 shrink-0" })), _jsx(Avatar, { src: author.avatarUrl, name: author.displayName, size: "sm", fallbackColor: author.fallbackColor, fallbackClassName: getFeedbackAvatarClassName(comment), className: cn("!text-[10px] font-medium", balloon && "size-5 !text-[9px]"), title: author.title }), _jsx("div", { className: "min-w-0 flex-1", children: _jsxs("div", { className: cn("flex min-w-0", balloon
89
+ ? "min-h-5 items-baseline gap-1.5"
90
+ : compact
91
+ ? "min-h-7 items-center gap-2"
92
+ : "flex-col justify-center gap-0.5"), children: [_jsx("span", { className: cn("text-neutral-grey-100 truncate font-medium", balloon ? "leading-4" : "text-sm leading-5"), title: author.title, children: author.displayName }), _jsx("span", { className: cn("text-neutral-grey-50 shrink-0 leading-4", !balloon && "text-xs"), title: balloon ? createdText : undefined, children: balloon && comment.created
93
+ ? formatFeedbackBalloonDate(new Date(comment.created))
94
+ : createdText })] }) }), !hideActions && hasActions && (_jsxs(Popover, { children: [_jsx(PopoverTrigger, { asChild: true, children: _jsx("button", { type: "button", className: cn("text-neutral-grey-50 hover:bg-neutral-grey-5 -mr-1 inline-flex shrink-0 items-center justify-center rounded-full", balloon ? "h-6 w-6" : "h-7 w-7"), "aria-label": "Comment actions", onClick: (e) => e.stopPropagation(), children: _jsx(MoreHorizontal, { className: "h-4 w-4", strokeWidth: 1 }) }) }), _jsxs(PopoverContent, { className: `${FEEDBACK_SIDEBAR_TEXT_CLASS} w-44 p-1`, align: "end", children: [canEdit && onEdit && (_jsxs("button", { type: "button", className: "hover:bg-neutral-grey-5 flex w-full items-center gap-2 rounded px-2 py-1.5 text-left text-sm", "data-testid": "comment-action-edit", onClick: (e) => {
77
95
  e.stopPropagation();
78
96
  onEdit();
79
97
  }, children: [_jsx(Edit, { className: "h-4 w-4", strokeWidth: 1 }), "Edit"] })), canResolve && !comment.isResolved && onResolve && (_jsxs("button", { type: "button", className: "hover:bg-neutral-grey-5 flex w-full items-center gap-2 rounded px-2 py-1.5 text-left text-sm", "data-testid": "comment-action-resolve", onClick: (e) => {
@@ -90,6 +108,6 @@ export function CommentView({ comment, canEdit, canDelete, canResolve, available
90
108
  : undefined, children: _jsxs("button", { type: "button", className: "hover:bg-neutral-grey-5 flex w-full items-center gap-2 rounded px-2 py-1.5 text-left text-sm", "data-testid": "comment-action-delete", onClick: (e) => {
91
109
  e.stopPropagation();
92
110
  onDelete();
93
- }, children: [_jsx(DeleteIcon, { size: "lg" }), "Delete"] }) }))] })] }))] }), quotedComment && (_jsx("div", { className: contentIndentClass, children: _jsx(CommentQuote, { comment: quotedComment }) })), _jsx("div", { className: `${contentIndentClass} text-neutral-grey-100 cursor-text text-sm leading-5 [overflow-wrap:anywhere] break-words whitespace-pre-wrap select-text`, "data-testid": "comment-text", children: _jsx(MentionText, { text: comment.text }) }), renderTags(), showContextInfo && renderContextInfo(), comment.isResolved && (_jsxs("div", { className: `${compact ? "mt-2" : "mt-3"} text-feedback-green text-xs font-medium`, children: ["\u2713 ", resolvedStatusText] }))] }));
111
+ }, children: [_jsx(DeleteIcon, { size: "lg" }), "Delete"] }) }))] })] }))] }), quotedComment && (_jsx("div", { className: contentIndentClass, children: _jsx(CommentQuote, { comment: quotedComment, navigation: quoteNavigation }) })), _jsx("div", { className: cn(contentIndentClass, "text-neutral-grey-100 cursor-text [overflow-wrap:anywhere] break-words whitespace-pre-wrap select-text", balloon ? "leading-4" : "text-sm leading-5"), "data-testid": "comment-text", children: balloon ? (_jsx(CollapsibleText, { lines: 4, children: _jsx(MentionText, { text: comment.text }) })) : (_jsx(MentionText, { text: comment.text })) }), renderTags(), showContextInfo && renderContextInfo(), comment.isResolved && (_jsxs("div", { className: `${compact ? "mt-2" : "mt-3"} text-feedback-green text-xs font-medium`, children: ["\u2713 ", resolvedStatusText] }))] }));
94
112
  }
95
113
  //# sourceMappingURL=CommentView.js.map