@parhelia/core 0.4.12825 → 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 (1047) 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 +43 -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/HeartbeatDiagnosticsPanel.js +1 -1
  73. package/dist/editor/ai/InlineAiDialog.js +11 -8
  74. package/dist/editor/ai/InlineAiDialog.js.map +1 -1
  75. package/dist/editor/ai/InlineAiTrigger.js +18 -14
  76. package/dist/editor/ai/InlineAiTrigger.js.map +1 -1
  77. package/dist/editor/ai/agentActivitySummary.js +5 -0
  78. package/dist/editor/ai/agentActivitySummary.js.map +1 -1
  79. package/dist/editor/ai/agentMessageConversion.js +1 -0
  80. package/dist/editor/ai/agentMessageConversion.js.map +1 -1
  81. package/dist/editor/ai/agentMessageMarkdown.js +4 -4
  82. package/dist/editor/ai/agentMessageMarkdown.js.map +1 -1
  83. package/dist/editor/ai/dialogs/capturePageScreenshot.d.ts +4 -1
  84. package/dist/editor/ai/dialogs/capturePageScreenshot.js +214 -44
  85. package/dist/editor/ai/dialogs/capturePageScreenshot.js.map +1 -1
  86. package/dist/editor/ai/dialogs/captureShared.d.ts +8 -1
  87. package/dist/editor/ai/dialogs/captureShared.js +4 -1
  88. package/dist/editor/ai/dialogs/captureShared.js.map +1 -1
  89. package/dist/editor/ai/dialogs/offscreenPageCapture.js +1 -1
  90. package/dist/editor/ai/dialogs/offscreenPageCapture.js.map +1 -1
  91. package/dist/editor/ai/prepareInlineAiTextSelection.d.ts +2 -1
  92. package/dist/editor/ai/prepareInlineAiTextSelection.js +1 -2
  93. package/dist/editor/ai/prepareInlineAiTextSelection.js.map +1 -1
  94. package/dist/editor/ai/terminal/agentCost.d.ts +2 -0
  95. package/dist/editor/ai/terminal/agentCost.js +1 -0
  96. package/dist/editor/ai/terminal/agentCost.js.map +1 -1
  97. package/dist/editor/ai/terminal/agentSessionLiveTotals.js +3 -0
  98. package/dist/editor/ai/terminal/agentSessionLiveTotals.js.map +1 -1
  99. package/dist/editor/ai/terminal/agentSessionSelectors.d.ts +5 -2
  100. package/dist/editor/ai/terminal/agentSessionSelectors.js +5 -2
  101. package/dist/editor/ai/terminal/agentSessionSelectors.js.map +1 -1
  102. package/dist/editor/ai/terminal/agentSessionState.js +8 -1
  103. package/dist/editor/ai/terminal/agentSessionState.js.map +1 -1
  104. package/dist/editor/ai/terminal/components/AgentActivityOverviewPanel.js +2 -2
  105. package/dist/editor/ai/terminal/components/AgentActivityOverviewPanel.js.map +1 -1
  106. package/dist/editor/ai/terminal/components/AgentBanners.js +2 -2
  107. package/dist/editor/ai/terminal/components/AgentBanners.js.map +1 -1
  108. package/dist/editor/ai/terminal/components/AgentCostDisplay.d.ts +2 -0
  109. package/dist/editor/ai/terminal/components/AgentCostDisplay.js +2 -1
  110. package/dist/editor/ai/terminal/components/AgentCostDisplay.js.map +1 -1
  111. package/dist/editor/ai/terminal/components/AgentFullPromptControls.js +1 -1
  112. package/dist/editor/ai/terminal/components/AgentFullPromptControls.js.map +1 -1
  113. package/dist/editor/ai/terminal/components/AgentModeSelector.js +7 -3
  114. package/dist/editor/ai/terminal/components/AgentModeSelector.js.map +1 -1
  115. package/dist/editor/ai/terminal/components/AgentPromptActionButtons.js +3 -3
  116. package/dist/editor/ai/terminal/components/AgentPromptActionButtons.js.map +1 -1
  117. package/dist/editor/ai/terminal/components/AgentPromptInputArea.js +2 -2
  118. package/dist/editor/ai/terminal/components/AgentReadOnlyNotice.js +1 -1
  119. package/dist/editor/ai/terminal/components/AgentReadOnlyNotice.js.map +1 -1
  120. package/dist/editor/ai/terminal/components/AgentTerminalFullLayout.js +1 -1
  121. package/dist/editor/ai/terminal/components/AgentTerminalStatusBar.d.ts +5 -2
  122. package/dist/editor/ai/terminal/components/AgentTerminalStatusBar.js +43 -4
  123. package/dist/editor/ai/terminal/components/AgentTerminalStatusBar.js.map +1 -1
  124. package/dist/editor/ai/terminal/components/AgentTerminalSummaryLayout.js +1 -1
  125. package/dist/editor/ai/terminal/components/AgentTerminalSummaryLayout.js.map +1 -1
  126. package/dist/editor/ai/terminal/components/AiResponseMessage.js +32 -15
  127. package/dist/editor/ai/terminal/components/AiResponseMessage.js.map +1 -1
  128. package/dist/editor/ai/terminal/components/ApprovalCard.d.ts +3 -1
  129. package/dist/editor/ai/terminal/components/ApprovalCard.js +8 -16
  130. package/dist/editor/ai/terminal/components/ApprovalCard.js.map +1 -1
  131. package/dist/editor/ai/terminal/components/CreateItemToolCallContent.js +1 -1
  132. package/dist/editor/ai/terminal/components/CreateItemToolCallContent.js.map +1 -1
  133. package/dist/editor/ai/terminal/components/EditFieldToolCallContent.d.ts +7 -4
  134. package/dist/editor/ai/terminal/components/EditFieldToolCallContent.js +57 -32
  135. package/dist/editor/ai/terminal/components/EditFieldToolCallContent.js.map +1 -1
  136. package/dist/editor/ai/terminal/components/ResponseTurnDuration.js +1 -2
  137. package/dist/editor/ai/terminal/components/ResponseTurnDuration.js.map +1 -1
  138. package/dist/editor/ai/terminal/components/ToolCallDiagnosticsPanel.d.ts +6 -0
  139. package/dist/editor/ai/terminal/components/ToolCallDiagnosticsPanel.js +61 -0
  140. package/dist/editor/ai/terminal/components/ToolCallDiagnosticsPanel.js.map +1 -0
  141. package/dist/editor/ai/terminal/components/ToolCallDisplay.d.ts +5 -0
  142. package/dist/editor/ai/terminal/components/ToolCallDisplay.js +19 -8
  143. package/dist/editor/ai/terminal/components/ToolCallDisplay.js.map +1 -1
  144. package/dist/editor/ai/terminal/components/UserMessage.js +4 -2
  145. package/dist/editor/ai/terminal/components/UserMessage.js.map +1 -1
  146. package/dist/editor/ai/terminal/components/ValueDiff.js +1 -1
  147. package/dist/editor/ai/terminal/components/ValueDiff.js.map +1 -1
  148. package/dist/editor/ai/terminal/components/toolCallContentRenderers.js +7 -4
  149. package/dist/editor/ai/terminal/components/toolCallContentRenderers.js.map +1 -1
  150. package/dist/editor/ai/terminal/components/useApprovalActions.js +1 -1
  151. package/dist/editor/ai/terminal/components/useApprovalActions.js.map +1 -1
  152. package/dist/editor/ai/terminal/toolCallDiagnostics.d.ts +34 -0
  153. package/dist/editor/ai/terminal/toolCallDiagnostics.js +218 -0
  154. package/dist/editor/ai/terminal/toolCallDiagnostics.js.map +1 -0
  155. package/dist/editor/ai/terminal/types.d.ts +1 -0
  156. package/dist/editor/ai/terminal/useAgentEditorContext.js +3 -1
  157. package/dist/editor/ai/terminal/useAgentEditorContext.js.map +1 -1
  158. package/dist/editor/ai/terminal/useAgentLoadPipeline.d.ts +1 -0
  159. package/dist/editor/ai/terminal/useAgentLoadPipeline.js +2 -1
  160. package/dist/editor/ai/terminal/useAgentLoadPipeline.js.map +1 -1
  161. package/dist/editor/ai/terminal/useAgentLoader.d.ts +2 -0
  162. package/dist/editor/ai/terminal/useAgentLoader.js +17 -2
  163. package/dist/editor/ai/terminal/useAgentLoader.js.map +1 -1
  164. package/dist/editor/ai/terminal/useAgentModeState.d.ts +5 -1
  165. package/dist/editor/ai/terminal/useAgentModeState.js +11 -3
  166. package/dist/editor/ai/terminal/useAgentModeState.js.map +1 -1
  167. package/dist/editor/ai/terminal/useAgentRunDeltaSocketHandler.d.ts +1 -0
  168. package/dist/editor/ai/terminal/useAgentRunDeltaSocketHandler.js +5 -1
  169. package/dist/editor/ai/terminal/useAgentRunDeltaSocketHandler.js.map +1 -1
  170. package/dist/editor/ai/terminal/useAgentRunRefs.d.ts +1 -0
  171. package/dist/editor/ai/terminal/useAgentRunRefs.js +3 -0
  172. package/dist/editor/ai/terminal/useAgentRunRefs.js.map +1 -1
  173. package/dist/editor/ai/terminal/useAgentSessionSync.d.ts +6 -0
  174. package/dist/editor/ai/terminal/useAgentSessionSync.js +27 -3
  175. package/dist/editor/ai/terminal/useAgentSessionSync.js.map +1 -1
  176. package/dist/editor/ai/terminal/useAgentSettingsData.d.ts +1 -1
  177. package/dist/editor/ai/terminal/useAgentSettingsPanel.js +7 -6
  178. package/dist/editor/ai/terminal/useAgentSettingsPanel.js.map +1 -1
  179. package/dist/editor/ai/terminal/useAgentSettingsSelectOptions.js +14 -2
  180. package/dist/editor/ai/terminal/useAgentSettingsSelectOptions.js.map +1 -1
  181. package/dist/editor/ai/terminal/useAgentStatusBarContent.js +11 -4
  182. package/dist/editor/ai/terminal/useAgentStatusBarContent.js.map +1 -1
  183. package/dist/editor/ai/terminal/useAgentStreamPipeline.d.ts +1 -0
  184. package/dist/editor/ai/terminal/useAgentStreamPipeline.js +2 -1
  185. package/dist/editor/ai/terminal/useAgentStreamPipeline.js.map +1 -1
  186. package/dist/editor/ai/terminal/useAgentSubmitHandlers.js +11 -2
  187. package/dist/editor/ai/terminal/useAgentSubmitHandlers.js.map +1 -1
  188. package/dist/editor/ai/terminal/useAgentTerminalController.js +3 -1
  189. package/dist/editor/ai/terminal/useAgentTerminalController.js.map +1 -1
  190. package/dist/editor/ai/terminal/useAgentToolCallHandler.js +1 -0
  191. package/dist/editor/ai/terminal/useAgentToolCallHandler.js.map +1 -1
  192. package/dist/editor/ai/types.d.ts +4 -0
  193. package/dist/editor/ai-image-editor/AiImageEditorDialog.d.ts +33 -0
  194. package/dist/editor/ai-image-editor/AiImageEditorDialog.js +372 -127
  195. package/dist/editor/ai-image-editor/AiImageEditorDialog.js.map +1 -1
  196. package/dist/editor/ai-image-editor/AiImageResultOverlay.js +4 -2
  197. package/dist/editor/ai-image-editor/AiImageResultOverlay.js.map +1 -1
  198. package/dist/editor/bridge/BridgeClient.js +11 -0
  199. package/dist/editor/bridge/BridgeClient.js.map +1 -1
  200. package/dist/editor/bridge/protocol.d.ts +56 -0
  201. package/dist/editor/bridge/protocol.js +3 -0
  202. package/dist/editor/bridge/protocol.js.map +1 -1
  203. package/dist/editor/client/EditorShell.js +331 -122
  204. package/dist/editor/client/EditorShell.js.map +1 -1
  205. package/dist/editor/client/SessionExpiredOverlay.js +9 -2
  206. package/dist/editor/client/SessionExpiredOverlay.js.map +1 -1
  207. package/dist/editor/client/clipboardStorage.d.ts +10 -0
  208. package/dist/editor/client/clipboardStorage.js +57 -0
  209. package/dist/editor/client/clipboardStorage.js.map +1 -0
  210. package/dist/editor/client/editContext.d.ts +92 -11
  211. package/dist/editor/client/editContext.js.map +1 -1
  212. package/dist/editor/client/editHistoryReconciliation.d.ts +2 -1
  213. package/dist/editor/client/editHistoryReconciliation.js +5 -2
  214. package/dist/editor/client/editHistoryReconciliation.js.map +1 -1
  215. package/dist/editor/client/hooks/useRepositoryItemRefresh.d.ts +4 -0
  216. package/dist/editor/client/hooks/useRepositoryItemRefresh.js +62 -0
  217. package/dist/editor/client/hooks/useRepositoryItemRefresh.js.map +1 -0
  218. package/dist/editor/client/hooks/useSocketMessageHandler.d.ts +6 -0
  219. package/dist/editor/client/hooks/useSocketMessageHandler.js +66 -3
  220. package/dist/editor/client/hooks/useSocketMessageHandler.js.map +1 -1
  221. package/dist/editor/client/itemsRepository.d.ts +10 -2
  222. package/dist/editor/client/itemsRepository.js +224 -43
  223. package/dist/editor/client/itemsRepository.js.map +1 -1
  224. package/dist/editor/client/liveEditState.d.ts +16 -0
  225. package/dist/editor/client/liveEditState.js +25 -0
  226. package/dist/editor/client/liveEditState.js.map +1 -0
  227. package/dist/editor/client/liveSessionState.d.ts +6 -0
  228. package/dist/editor/client/liveSessionState.js +20 -0
  229. package/dist/editor/client/liveSessionState.js.map +1 -0
  230. package/dist/editor/client/operations.d.ts +13 -2
  231. package/dist/editor/client/operations.js +100 -29
  232. package/dist/editor/client/operations.js.map +1 -1
  233. package/dist/editor/client/pageModelBuilder.d.ts +6 -0
  234. package/dist/editor/client/pageModelBuilder.js +74 -7
  235. package/dist/editor/client/pageModelBuilder.js.map +1 -1
  236. package/dist/editor/client/ui/EditorChrome.d.ts +2 -2
  237. package/dist/editor/client/ui/EditorChrome.js +12 -8
  238. package/dist/editor/client/ui/EditorChrome.js.map +1 -1
  239. package/dist/editor/client/ui/FullscreenControls.d.ts +3 -5
  240. package/dist/editor/client/ui/FullscreenControls.js +2 -2
  241. package/dist/editor/client/ui/FullscreenControls.js.map +1 -1
  242. package/dist/editor/client/valueStore.d.ts +22 -0
  243. package/dist/editor/client/valueStore.js +29 -0
  244. package/dist/editor/client/valueStore.js.map +1 -0
  245. package/dist/editor/commands/componentClipboardCommands.d.ts +35 -0
  246. package/dist/editor/commands/componentClipboardCommands.js +271 -0
  247. package/dist/editor/commands/componentClipboardCommands.js.map +1 -0
  248. package/dist/editor/commands/componentCommands.js +80 -19
  249. package/dist/editor/commands/componentCommands.js.map +1 -1
  250. package/dist/editor/commands/componentMenuGroups.d.ts +2 -0
  251. package/dist/editor/commands/componentMenuGroups.js +43 -0
  252. package/dist/editor/commands/componentMenuGroups.js.map +1 -0
  253. package/dist/editor/commands/itemCommands.d.ts +9 -0
  254. package/dist/editor/commands/itemCommands.js +76 -9
  255. package/dist/editor/commands/itemCommands.js.map +1 -1
  256. package/dist/editor/component-conversion/ComponentTypePickerDialog.d.ts +12 -0
  257. package/dist/editor/component-conversion/ComponentTypePickerDialog.js +40 -0
  258. package/dist/editor/component-conversion/ComponentTypePickerDialog.js.map +1 -0
  259. package/dist/editor/component-conversion/ConversionAiDebugButton.d.ts +17 -0
  260. package/dist/editor/component-conversion/ConversionAiDebugButton.js +80 -0
  261. package/dist/editor/component-conversion/ConversionAiDebugButton.js.map +1 -0
  262. package/dist/editor/component-conversion/ConvertComponentDialog.d.ts +28 -0
  263. package/dist/editor/component-conversion/ConvertComponentDialog.js +633 -0
  264. package/dist/editor/component-conversion/ConvertComponentDialog.js.map +1 -0
  265. package/dist/editor/component-conversion/conversionModel.d.ts +109 -0
  266. package/dist/editor/component-conversion/conversionModel.js +519 -0
  267. package/dist/editor/component-conversion/conversionModel.js.map +1 -0
  268. package/dist/editor/component-conversion/conversionService.d.ts +12 -0
  269. package/dist/editor/component-conversion/conversionService.js +16 -0
  270. package/dist/editor/component-conversion/conversionService.js.map +1 -0
  271. package/dist/editor/component-conversion/conversionTypes.d.ts +214 -0
  272. package/dist/editor/component-conversion/conversionTypes.js +2 -0
  273. package/dist/editor/component-conversion/conversionTypes.js.map +1 -0
  274. package/dist/editor/component-conversion/convertComponentsCommand.d.ts +25 -0
  275. package/dist/editor/component-conversion/convertComponentsCommand.js +196 -0
  276. package/dist/editor/component-conversion/convertComponentsCommand.js.map +1 -0
  277. package/dist/editor/editor-warnings/ValidationErrors.js +4 -4
  278. package/dist/editor/editor-warnings/ValidationErrors.js.map +1 -1
  279. package/dist/editor/field-types/AttachmentEditor.js +4 -3
  280. package/dist/editor/field-types/AttachmentEditor.js.map +1 -1
  281. package/dist/editor/field-types/DateFieldEditor.js +2 -1
  282. package/dist/editor/field-types/DateFieldEditor.js.map +1 -1
  283. package/dist/editor/field-types/DateTimeFieldEditor.js +2 -1
  284. package/dist/editor/field-types/DateTimeFieldEditor.js.map +1 -1
  285. package/dist/editor/field-types/DropLinkEditor.js +3 -1
  286. package/dist/editor/field-types/DropLinkEditor.js.map +1 -1
  287. package/dist/editor/field-types/DropListEditor.js +3 -1
  288. package/dist/editor/field-types/DropListEditor.js.map +1 -1
  289. package/dist/editor/field-types/FieldHistoryBoundary.js +28 -7
  290. package/dist/editor/field-types/FieldHistoryBoundary.js.map +1 -1
  291. package/dist/editor/field-types/ImageFieldEditor.js +3 -1
  292. package/dist/editor/field-types/ImageFieldEditor.js.map +1 -1
  293. package/dist/editor/field-types/InternalLinkFieldEditor.js +2 -1
  294. package/dist/editor/field-types/InternalLinkFieldEditor.js.map +1 -1
  295. package/dist/editor/field-types/LinkFieldEditor.js +2 -1
  296. package/dist/editor/field-types/LinkFieldEditor.js.map +1 -1
  297. package/dist/editor/field-types/MultiLineText.js +68 -22
  298. package/dist/editor/field-types/MultiLineText.js.map +1 -1
  299. package/dist/editor/field-types/NameValueListEditor.js +3 -1
  300. package/dist/editor/field-types/NameValueListEditor.js.map +1 -1
  301. package/dist/editor/field-types/PictureFieldEditor.js +4 -2
  302. package/dist/editor/field-types/PictureFieldEditor.js.map +1 -1
  303. package/dist/editor/field-types/RawEditor.js +7 -4
  304. package/dist/editor/field-types/RawEditor.js.map +1 -1
  305. package/dist/editor/field-types/RichTextEditor.d.ts +1 -2
  306. package/dist/editor/field-types/RichTextEditor.js +5 -26
  307. package/dist/editor/field-types/RichTextEditor.js.map +1 -1
  308. package/dist/editor/field-types/RichTextEditorComponent.d.ts +1 -2
  309. package/dist/editor/field-types/RichTextEditorComponent.js +120 -34
  310. package/dist/editor/field-types/RichTextEditorComponent.js.map +1 -1
  311. package/dist/editor/field-types/SingleLineText.js +68 -22
  312. package/dist/editor/field-types/SingleLineText.js.map +1 -1
  313. package/dist/editor/field-types/TreeListEditor.js +4 -2
  314. package/dist/editor/field-types/TreeListEditor.js.map +1 -1
  315. package/dist/editor/field-types/fieldStyles.d.ts +21 -0
  316. package/dist/editor/field-types/fieldStyles.js +22 -0
  317. package/dist/editor/field-types/fieldStyles.js.map +1 -0
  318. package/dist/editor/field-types/richtext/bridgeRichTextProfile.d.ts +15 -1
  319. package/dist/editor/field-types/richtext/bridgeRichTextProfile.js +27 -0
  320. package/dist/editor/field-types/richtext/bridgeRichTextProfile.js.map +1 -1
  321. package/dist/editor/field-types/richtext/components/EditorDropdown.css +14 -0
  322. package/dist/editor/field-types/richtext/components/EditorDropdown.d.ts +3 -1
  323. package/dist/editor/field-types/richtext/components/EditorDropdown.js +33 -8
  324. package/dist/editor/field-types/richtext/components/EditorDropdown.js.map +1 -1
  325. package/dist/editor/field-types/richtext/components/ReactSlate.css +23 -54
  326. package/dist/editor/field-types/richtext/components/ReactSlate.d.ts +10 -1
  327. package/dist/editor/field-types/richtext/components/ReactSlate.js +365 -172
  328. package/dist/editor/field-types/richtext/components/ReactSlate.js.map +1 -1
  329. package/dist/editor/field-types/richtext/components/SimpleRichTextEditor.js +1 -1
  330. package/dist/editor/field-types/richtext/components/SimpleRichTextEditor.js.map +1 -1
  331. package/dist/editor/field-types/richtext/components/ToolbarButton.js +13 -5
  332. package/dist/editor/field-types/richtext/components/ToolbarButton.js.map +1 -1
  333. package/dist/editor/field-types/richtext/config/pluginFactory.d.ts +2 -0
  334. package/dist/editor/field-types/richtext/config/pluginFactory.js +2 -1
  335. package/dist/editor/field-types/richtext/config/pluginFactory.js.map +1 -1
  336. package/dist/editor/field-types/richtext/hooks/useProfileCache.js +1 -0
  337. package/dist/editor/field-types/richtext/hooks/useProfileCache.js.map +1 -1
  338. package/dist/editor/field-types/richtext/hooks/useRichTextProfile.d.ts +0 -2
  339. package/dist/editor/field-types/richtext/hooks/useRichTextProfile.js +2 -5
  340. package/dist/editor/field-types/richtext/hooks/useRichTextProfile.js.map +1 -1
  341. package/dist/editor/field-types/richtext/types.d.ts +47 -2
  342. package/dist/editor/field-types/richtext/types.js +19 -0
  343. package/dist/editor/field-types/richtext/types.js.map +1 -1
  344. package/dist/editor/field-types/richtext/utils/changeHighlight.d.ts +14 -0
  345. package/dist/editor/field-types/richtext/utils/changeHighlight.js +12 -1
  346. package/dist/editor/field-types/richtext/utils/changeHighlight.js.map +1 -1
  347. package/dist/editor/field-types/richtext/utils/conversion.js +108 -32
  348. package/dist/editor/field-types/richtext/utils/conversion.js.map +1 -1
  349. package/dist/editor/field-types/richtext/utils/cssClasses.d.ts +27 -0
  350. package/dist/editor/field-types/richtext/utils/cssClasses.js +98 -0
  351. package/dist/editor/field-types/richtext/utils/cssClasses.js.map +1 -0
  352. package/dist/editor/field-types/richtext/utils/plugins.d.ts +40 -1
  353. package/dist/editor/field-types/richtext/utils/plugins.js +178 -4
  354. package/dist/editor/field-types/richtext/utils/plugins.js.map +1 -1
  355. package/dist/editor/field-types/richtext/utils/profileMapper.d.ts +17 -1
  356. package/dist/editor/field-types/richtext/utils/profileMapper.js +153 -55
  357. package/dist/editor/field-types/richtext/utils/profileMapper.js.map +1 -1
  358. package/dist/editor/field-types/richtext/utils/spellCheckText.d.ts +31 -0
  359. package/dist/editor/field-types/richtext/utils/spellCheckText.js +82 -0
  360. package/dist/editor/field-types/richtext/utils/spellCheckText.js.map +1 -0
  361. package/dist/editor/field-types/useFocusedFieldInput.d.ts +13 -0
  362. package/dist/editor/field-types/useFocusedFieldInput.js +50 -0
  363. package/dist/editor/field-types/useFocusedFieldInput.js.map +1 -0
  364. package/dist/editor/field-types/useFormFieldCaretPresence.js +8 -1
  365. package/dist/editor/field-types/useFormFieldCaretPresence.js.map +1 -1
  366. package/dist/editor/field-types/useFormFieldSelectionRange.d.ts +20 -13
  367. package/dist/editor/field-types/useFormFieldSelectionRange.js +40 -14
  368. package/dist/editor/field-types/useFormFieldSelectionRange.js.map +1 -1
  369. package/dist/editor/find-replace/findReplaceTargets.d.ts +2 -0
  370. package/dist/editor/find-replace/findReplaceTargets.js +2 -2
  371. package/dist/editor/find-replace/findReplaceTargets.js.map +1 -1
  372. package/dist/editor/itemContextMenuGroups.js +10 -1
  373. package/dist/editor/itemContextMenuGroups.js.map +1 -1
  374. package/dist/editor/media-selector/AiImageSearch.js +1 -163
  375. package/dist/editor/media-selector/AiImageSearch.js.map +1 -1
  376. package/dist/editor/media-selector/MediaDetailsView.d.ts +14 -0
  377. package/dist/editor/media-selector/MediaDetailsView.js +152 -0
  378. package/dist/editor/media-selector/MediaDetailsView.js.map +1 -0
  379. package/dist/editor/media-selector/MediaFolderBrowser.js +326 -106
  380. package/dist/editor/media-selector/MediaFolderBrowser.js.map +1 -1
  381. package/dist/editor/media-selector/TreeSelector.js +40 -2
  382. package/dist/editor/media-selector/TreeSelector.js.map +1 -1
  383. package/dist/editor/media-selector/UploadZone.js +1 -1
  384. package/dist/editor/media-selector/UploadZone.js.map +1 -1
  385. package/dist/editor/media-selector/useMediaFolderDrag.d.ts +26 -0
  386. package/dist/editor/media-selector/useMediaFolderDrag.js +153 -0
  387. package/dist/editor/media-selector/useMediaFolderDrag.js.map +1 -0
  388. package/dist/editor/menubar/ActiveUsers.js +5 -3
  389. package/dist/editor/menubar/ActiveUsers.js.map +1 -1
  390. package/dist/editor/menubar/PageSelector.js +21 -22
  391. package/dist/editor/menubar/PageSelector.js.map +1 -1
  392. package/dist/editor/menubar/ToolbarFactory.js +8 -2
  393. package/dist/editor/menubar/ToolbarFactory.js.map +1 -1
  394. package/dist/editor/menubar/VersionPreviewCard.js +4 -2
  395. package/dist/editor/menubar/VersionPreviewCard.js.map +1 -1
  396. package/dist/editor/menubar/WorkflowButton.js +10 -10
  397. package/dist/editor/menubar/WorkflowButton.js.map +1 -1
  398. package/dist/editor/menubar/toolbar-sections/CommentsToggleControl.d.ts +13 -0
  399. package/dist/editor/menubar/toolbar-sections/CommentsToggleControl.js +88 -0
  400. package/dist/editor/menubar/toolbar-sections/CommentsToggleControl.js.map +1 -0
  401. package/dist/editor/menubar/toolbar-sections/DeviceSwitchToolbar.d.ts +3 -4
  402. package/dist/editor/menubar/toolbar-sections/DeviceSwitchToolbar.js +15 -13
  403. package/dist/editor/menubar/toolbar-sections/DeviceSwitchToolbar.js.map +1 -1
  404. package/dist/editor/menubar/toolbar-sections/EditControls.d.ts +9 -0
  405. package/dist/editor/menubar/toolbar-sections/EditControls.js +24 -1
  406. package/dist/editor/menubar/toolbar-sections/EditControls.js.map +1 -1
  407. package/dist/editor/menubar/toolbar-sections/FullscreenControl.js +3 -2
  408. package/dist/editor/menubar/toolbar-sections/FullscreenControl.js.map +1 -1
  409. package/dist/editor/menubar/toolbar-sections/InsertControls.js +4 -2
  410. package/dist/editor/menubar/toolbar-sections/InsertControls.js.map +1 -1
  411. package/dist/editor/menubar/toolbar-sections/LayoutModeControls.js +3 -2
  412. package/dist/editor/menubar/toolbar-sections/LayoutModeControls.js.map +1 -1
  413. package/dist/editor/menubar/toolbar-sections/ReviewCommands.js +2 -2
  414. package/dist/editor/menubar/toolbar-sections/ReviewCommands.js.map +1 -1
  415. package/dist/editor/menubar/toolbar-sections/SpellCheckToggleControl.d.ts +5 -0
  416. package/dist/editor/menubar/toolbar-sections/SpellCheckToggleControl.js +16 -0
  417. package/dist/editor/menubar/toolbar-sections/SpellCheckToggleControl.js.map +1 -0
  418. package/dist/editor/menubar/toolbar-sections/UndoRedoControls.js +2 -2
  419. package/dist/editor/menubar/toolbar-sections/UndoRedoControls.js.map +1 -1
  420. package/dist/editor/menubar/toolbar-sections/UtilityControls.js +7 -7
  421. package/dist/editor/menubar/toolbar-sections/UtilityControls.js.map +1 -1
  422. package/dist/editor/menubar/toolbar-sections/ViewportControls.d.ts +3 -4
  423. package/dist/editor/menubar/toolbar-sections/ViewportControls.js +19 -31
  424. package/dist/editor/menubar/toolbar-sections/ViewportControls.js.map +1 -1
  425. package/dist/editor/menubar/toolbar-sections/index.d.ts +1 -1
  426. package/dist/editor/menubar/toolbar-sections/index.js +1 -1
  427. package/dist/editor/menubar/toolbar-sections/index.js.map +1 -1
  428. package/dist/editor/mobileBottomPanel.d.ts +40 -0
  429. package/dist/editor/mobileBottomPanel.js +63 -0
  430. package/dist/editor/mobileBottomPanel.js.map +1 -0
  431. package/dist/editor/notifications/useNotifications.js +12 -17
  432. package/dist/editor/notifications/useNotifications.js.map +1 -1
  433. package/dist/editor/page-editor-chrome/AgentChangeHighlightings.d.ts +3 -6
  434. package/dist/editor/page-editor-chrome/AgentChangeHighlightings.js +8 -6
  435. package/dist/editor/page-editor-chrome/AgentChangeHighlightings.js.map +1 -1
  436. package/dist/editor/page-editor-chrome/BridgeInlineFormatOverlay.d.ts +5 -1
  437. package/dist/editor/page-editor-chrome/BridgeInlineFormatOverlay.js +60 -10
  438. package/dist/editor/page-editor-chrome/BridgeInlineFormatOverlay.js.map +1 -1
  439. package/dist/editor/page-editor-chrome/BridgePasteCleanupOverlay.d.ts +6 -0
  440. package/dist/editor/page-editor-chrome/BridgePasteCleanupOverlay.js +100 -0
  441. package/dist/editor/page-editor-chrome/BridgePasteCleanupOverlay.js.map +1 -0
  442. package/dist/editor/page-editor-chrome/BridgeToolbarDropdown.d.ts +16 -0
  443. package/dist/editor/page-editor-chrome/BridgeToolbarDropdown.js +23 -0
  444. package/dist/editor/page-editor-chrome/BridgeToolbarDropdown.js.map +1 -0
  445. package/dist/editor/page-editor-chrome/CanvasOverviewRulerBinding.d.ts +9 -0
  446. package/dist/editor/page-editor-chrome/CanvasOverviewRulerBinding.js +32 -0
  447. package/dist/editor/page-editor-chrome/CanvasOverviewRulerBinding.js.map +1 -0
  448. package/dist/editor/page-editor-chrome/CommentHighlightings.d.ts +4 -1
  449. package/dist/editor/page-editor-chrome/CommentHighlightings.js +195 -388
  450. package/dist/editor/page-editor-chrome/CommentHighlightings.js.map +1 -1
  451. package/dist/editor/page-editor-chrome/CommentTargetPickerCanvasLayer.d.ts +14 -0
  452. package/dist/editor/page-editor-chrome/CommentTargetPickerCanvasLayer.js +110 -0
  453. package/dist/editor/page-editor-chrome/CommentTargetPickerCanvasLayer.js.map +1 -0
  454. package/dist/editor/page-editor-chrome/ConversionIndicators.d.ts +8 -0
  455. package/dist/editor/page-editor-chrome/ConversionIndicators.js +75 -0
  456. package/dist/editor/page-editor-chrome/ConversionIndicators.js.map +1 -0
  457. package/dist/editor/page-editor-chrome/DiffHighlightOverlay.d.ts +9 -13
  458. package/dist/editor/page-editor-chrome/DiffHighlightOverlay.js +25 -20
  459. package/dist/editor/page-editor-chrome/DiffHighlightOverlay.js.map +1 -1
  460. package/dist/editor/page-editor-chrome/DragInsertionOverlay.js +21 -17
  461. package/dist/editor/page-editor-chrome/DragInsertionOverlay.js.map +1 -1
  462. package/dist/editor/page-editor-chrome/EmptyImageFieldIndicators.d.ts +1 -1
  463. package/dist/editor/page-editor-chrome/EmptyImageFieldIndicators.js +9 -6
  464. package/dist/editor/page-editor-chrome/EmptyImageFieldIndicators.js.map +1 -1
  465. package/dist/editor/page-editor-chrome/FeedbackLeaderCanvasSegment.d.ts +15 -0
  466. package/dist/editor/page-editor-chrome/FeedbackLeaderCanvasSegment.js +31 -0
  467. package/dist/editor/page-editor-chrome/FeedbackLeaderCanvasSegment.js.map +1 -0
  468. package/dist/editor/page-editor-chrome/FieldActionIndicator.d.ts +1 -1
  469. package/dist/editor/page-editor-chrome/FieldActionIndicator.js +6 -3
  470. package/dist/editor/page-editor-chrome/FieldActionIndicator.js.map +1 -1
  471. package/dist/editor/page-editor-chrome/FieldEditedIndicator.js +10 -6
  472. package/dist/editor/page-editor-chrome/FieldEditedIndicator.js.map +1 -1
  473. package/dist/editor/page-editor-chrome/FindReplaceHighlightings.d.ts +1 -1
  474. package/dist/editor/page-editor-chrome/FindReplaceHighlightings.js +7 -4
  475. package/dist/editor/page-editor-chrome/FindReplaceHighlightings.js.map +1 -1
  476. package/dist/editor/page-editor-chrome/FrameMenu.d.ts +1 -1
  477. package/dist/editor/page-editor-chrome/FrameMenu.js +13 -11
  478. package/dist/editor/page-editor-chrome/FrameMenu.js.map +1 -1
  479. package/dist/editor/page-editor-chrome/FrameMenus.d.ts +1 -1
  480. package/dist/editor/page-editor-chrome/FrameMenus.js +7 -5
  481. package/dist/editor/page-editor-chrome/FrameMenus.js.map +1 -1
  482. package/dist/editor/page-editor-chrome/InlineFieldHistoryButton.d.ts +2 -2
  483. package/dist/editor/page-editor-chrome/InlineFieldHistoryButton.js +20 -39
  484. package/dist/editor/page-editor-chrome/InlineFieldHistoryButton.js.map +1 -1
  485. package/dist/editor/page-editor-chrome/LockedFieldIndicator.d.ts +1 -1
  486. package/dist/editor/page-editor-chrome/LockedFieldIndicator.js +27 -21
  487. package/dist/editor/page-editor-chrome/LockedFieldIndicator.js.map +1 -1
  488. package/dist/editor/page-editor-chrome/NoLayout.js +5 -3
  489. package/dist/editor/page-editor-chrome/NoLayout.js.map +1 -1
  490. package/dist/editor/page-editor-chrome/PageEditorChrome.d.ts +1 -1
  491. package/dist/editor/page-editor-chrome/PageEditorChrome.js +29 -23
  492. package/dist/editor/page-editor-chrome/PageEditorChrome.js.map +1 -1
  493. package/dist/editor/page-editor-chrome/PictureEditorOverlay.d.ts +1 -1
  494. package/dist/editor/page-editor-chrome/PictureEditorOverlay.js +24 -21
  495. package/dist/editor/page-editor-chrome/PictureEditorOverlay.js.map +1 -1
  496. package/dist/editor/page-editor-chrome/PlaceholderDropZone.js +10 -4
  497. package/dist/editor/page-editor-chrome/PlaceholderDropZone.js.map +1 -1
  498. package/dist/editor/page-editor-chrome/PlaceholderDropZones.d.ts +1 -1
  499. package/dist/editor/page-editor-chrome/PlaceholderDropZones.js +11 -10
  500. package/dist/editor/page-editor-chrome/PlaceholderDropZones.js.map +1 -1
  501. package/dist/editor/page-editor-chrome/SpellCheckHighlightings.d.ts +12 -0
  502. package/dist/editor/page-editor-chrome/SpellCheckHighlightings.js +197 -0
  503. package/dist/editor/page-editor-chrome/SpellCheckHighlightings.js.map +1 -0
  504. package/dist/editor/page-editor-chrome/SuggestionHighlightings.d.ts +1 -1
  505. package/dist/editor/page-editor-chrome/SuggestionHighlightings.js +226 -388
  506. package/dist/editor/page-editor-chrome/SuggestionHighlightings.js.map +1 -1
  507. package/dist/editor/page-editor-chrome/ValidationRulerMarks.d.ts +11 -0
  508. package/dist/editor/page-editor-chrome/ValidationRulerMarks.js +56 -0
  509. package/dist/editor/page-editor-chrome/ValidationRulerMarks.js.map +1 -0
  510. package/dist/editor/page-editor-chrome/VersionDiffHighlightings.d.ts +1 -1
  511. package/dist/editor/page-editor-chrome/VersionDiffHighlightings.js +11 -8
  512. package/dist/editor/page-editor-chrome/VersionDiffHighlightings.js.map +1 -1
  513. package/dist/editor/page-editor-chrome/overlay/IframeOverlayProvider.d.ts +15 -2
  514. package/dist/editor/page-editor-chrome/overlay/IframeOverlayProvider.js +70 -9
  515. package/dist/editor/page-editor-chrome/overlay/IframeOverlayProvider.js.map +1 -1
  516. package/dist/editor/page-editor-chrome/overlay/feedbackAnchorMeasurements.d.ts +44 -0
  517. package/dist/editor/page-editor-chrome/overlay/feedbackAnchorMeasurements.js +89 -0
  518. package/dist/editor/page-editor-chrome/overlay/feedbackAnchorMeasurements.js.map +1 -0
  519. package/dist/editor/page-editor-chrome/overlay/feedbackAnchorStore.d.ts +17 -0
  520. package/dist/editor/page-editor-chrome/overlay/feedbackAnchorStore.js +53 -0
  521. package/dist/editor/page-editor-chrome/overlay/feedbackAnchorStore.js.map +1 -0
  522. package/dist/editor/page-editor-chrome/overlay/geometry.d.ts +15 -0
  523. package/dist/editor/page-editor-chrome/overlay/geometry.js +40 -0
  524. package/dist/editor/page-editor-chrome/overlay/geometry.js.map +1 -1
  525. package/dist/editor/page-editor-chrome/overlay/useBridgeTextRangeRequest.d.ts +11 -0
  526. package/dist/editor/page-editor-chrome/overlay/useBridgeTextRangeRequest.js +84 -0
  527. package/dist/editor/page-editor-chrome/overlay/useBridgeTextRangeRequest.js.map +1 -0
  528. package/dist/editor/page-editor-chrome/overlay/useCommentAnchorMeasurements.d.ts +34 -0
  529. package/dist/editor/page-editor-chrome/overlay/useCommentAnchorMeasurements.js +229 -0
  530. package/dist/editor/page-editor-chrome/overlay/useCommentAnchorMeasurements.js.map +1 -0
  531. package/dist/editor/page-editor-chrome/overlay/useOverlayViewportRight.d.ts +9 -0
  532. package/dist/editor/page-editor-chrome/overlay/useOverlayViewportRight.js +34 -0
  533. package/dist/editor/page-editor-chrome/overlay/useOverlayViewportRight.js.map +1 -0
  534. package/dist/editor/page-editor-chrome/overlay/useSuggestionAnchorMeasurements.d.ts +49 -0
  535. package/dist/editor/page-editor-chrome/overlay/useSuggestionAnchorMeasurements.js +241 -0
  536. package/dist/editor/page-editor-chrome/overlay/useSuggestionAnchorMeasurements.js.map +1 -0
  537. package/dist/editor/page-editor-chrome/useBridgeInlineEditing.d.ts +7 -0
  538. package/dist/editor/page-editor-chrome/useBridgeInlineEditing.js +63 -5
  539. package/dist/editor/page-editor-chrome/useBridgeInlineEditing.js.map +1 -1
  540. package/dist/editor/page-editor-chrome/useBridgeRichTextFieldOptions.d.ts +12 -0
  541. package/dist/editor/page-editor-chrome/useBridgeRichTextFieldOptions.js +79 -0
  542. package/dist/editor/page-editor-chrome/useBridgeRichTextFieldOptions.js.map +1 -0
  543. package/dist/editor/page-editor-chrome/useComponentDragHandle.js +1 -1
  544. package/dist/editor/page-editor-chrome/useComponentDragHandle.js.map +1 -1
  545. package/dist/editor/page-editor-chrome/useDragInsertionGesture.js +1 -1
  546. package/dist/editor/page-editor-chrome/useDragInsertionGesture.js.map +1 -1
  547. package/dist/editor/page-editor-chrome/usePinnedHoveredComponentId.d.ts +1 -1
  548. package/dist/editor/page-editor-chrome/usePinnedHoveredComponentId.js +4 -2
  549. package/dist/editor/page-editor-chrome/usePinnedHoveredComponentId.js.map +1 -1
  550. package/dist/editor/page-viewer/CanvasOverviewRuler.d.ts +11 -0
  551. package/dist/editor/page-viewer/CanvasOverviewRuler.js +65 -0
  552. package/dist/editor/page-viewer/CanvasOverviewRuler.js.map +1 -0
  553. package/dist/editor/page-viewer/DeviceToolbar.d.ts +1 -1
  554. package/dist/editor/page-viewer/DeviceToolbar.js +8 -3
  555. package/dist/editor/page-viewer/DeviceToolbar.js.map +1 -1
  556. package/dist/editor/page-viewer/DynamicRenderingsBar.d.ts +23 -0
  557. package/dist/editor/page-viewer/DynamicRenderingsBar.js +28 -0
  558. package/dist/editor/page-viewer/DynamicRenderingsBar.js.map +1 -0
  559. package/dist/editor/page-viewer/DynamicRenderingsStrip.d.ts +18 -0
  560. package/dist/editor/page-viewer/DynamicRenderingsStrip.js +29 -0
  561. package/dist/editor/page-viewer/DynamicRenderingsStrip.js.map +1 -0
  562. package/dist/editor/page-viewer/EditorForm.js +29 -24
  563. package/dist/editor/page-viewer/EditorForm.js.map +1 -1
  564. package/dist/editor/page-viewer/FeedbackMargin.d.ts +57 -0
  565. package/dist/editor/page-viewer/FeedbackMargin.js +378 -0
  566. package/dist/editor/page-viewer/FeedbackMargin.js.map +1 -0
  567. package/dist/editor/page-viewer/FeedbackMarginController.d.ts +76 -0
  568. package/dist/editor/page-viewer/FeedbackMarginController.js +241 -0
  569. package/dist/editor/page-viewer/FeedbackMarginController.js.map +1 -0
  570. package/dist/editor/page-viewer/FeedbackMarginMarker.d.ts +16 -0
  571. package/dist/editor/page-viewer/FeedbackMarginMarker.js +24 -0
  572. package/dist/editor/page-viewer/FeedbackMarginMarker.js.map +1 -0
  573. package/dist/editor/page-viewer/FeedbackMarginResizeHandle.d.ts +23 -0
  574. package/dist/editor/page-viewer/FeedbackMarginResizeHandle.js +105 -0
  575. package/dist/editor/page-viewer/FeedbackMarginResizeHandle.js.map +1 -0
  576. package/dist/editor/page-viewer/InteractivePreviewBar.d.ts +24 -0
  577. package/dist/editor/page-viewer/InteractivePreviewBar.js +31 -0
  578. package/dist/editor/page-viewer/InteractivePreviewBar.js.map +1 -0
  579. package/dist/editor/page-viewer/MiniMap.d.ts +9 -3
  580. package/dist/editor/page-viewer/MiniMap.js +50 -60
  581. package/dist/editor/page-viewer/MiniMap.js.map +1 -1
  582. package/dist/editor/page-viewer/MinimapDropTargets.d.ts +1 -1
  583. package/dist/editor/page-viewer/MinimapDropTargets.js +9 -7
  584. package/dist/editor/page-viewer/MinimapDropTargets.js.map +1 -1
  585. package/dist/editor/page-viewer/MobileCommentsPanel.d.ts +16 -0
  586. package/dist/editor/page-viewer/MobileCommentsPanel.js +112 -0
  587. package/dist/editor/page-viewer/MobileCommentsPanel.js.map +1 -0
  588. package/dist/editor/page-viewer/PageViewer.js +22 -67
  589. package/dist/editor/page-viewer/PageViewer.js.map +1 -1
  590. package/dist/editor/page-viewer/PageViewerFrame.d.ts +1 -0
  591. package/dist/editor/page-viewer/PageViewerFrame.js +610 -224
  592. package/dist/editor/page-viewer/PageViewerFrame.js.map +1 -1
  593. package/dist/editor/page-viewer/RenderingAiCheck.d.ts +18 -0
  594. package/dist/editor/page-viewer/RenderingAiCheck.js +45 -0
  595. package/dist/editor/page-viewer/RenderingAiCheck.js.map +1 -0
  596. package/dist/editor/page-viewer/RenderingApprovalDialog.d.ts +32 -0
  597. package/dist/editor/page-viewer/RenderingApprovalDialog.js +191 -0
  598. package/dist/editor/page-viewer/RenderingApprovalDialog.js.map +1 -0
  599. package/dist/editor/page-viewer/SealedClientCodePreview.d.ts +17 -0
  600. package/dist/editor/page-viewer/SealedClientCodePreview.js +38 -0
  601. package/dist/editor/page-viewer/SealedClientCodePreview.js.map +1 -0
  602. package/dist/editor/page-viewer/bridgeFieldPatch.d.ts +9 -0
  603. package/dist/editor/page-viewer/bridgeFieldPatch.js +21 -0
  604. package/dist/editor/page-viewer/bridgeFieldPatch.js.map +1 -1
  605. package/dist/editor/page-viewer/bridgeInlineEditSession.js +8 -0
  606. package/dist/editor/page-viewer/bridgeInlineEditSession.js.map +1 -1
  607. package/dist/editor/page-viewer/canvasFrameNavigation.d.ts +18 -0
  608. package/dist/editor/page-viewer/canvasFrameNavigation.js +36 -0
  609. package/dist/editor/page-viewer/canvasFrameNavigation.js.map +1 -0
  610. package/dist/editor/page-viewer/canvasLoadSettling.d.ts +42 -0
  611. package/dist/editor/page-viewer/canvasLoadSettling.js +46 -0
  612. package/dist/editor/page-viewer/canvasLoadSettling.js.map +1 -0
  613. package/dist/editor/page-viewer/canvasScrollHandoff.d.ts +34 -0
  614. package/dist/editor/page-viewer/canvasScrollHandoff.js +55 -0
  615. package/dist/editor/page-viewer/canvasScrollHandoff.js.map +1 -0
  616. package/dist/editor/page-viewer/feedbackMarginLayout.d.ts +119 -0
  617. package/dist/editor/page-viewer/feedbackMarginLayout.js +155 -0
  618. package/dist/editor/page-viewer/feedbackMarginLayout.js.map +1 -0
  619. package/dist/editor/page-viewer/feedbackMarginSources.d.ts +36 -0
  620. package/dist/editor/page-viewer/feedbackMarginSources.js +196 -0
  621. package/dist/editor/page-viewer/feedbackMarginSources.js.map +1 -0
  622. package/dist/editor/page-viewer/feedbackMarginWidth.d.ts +43 -0
  623. package/dist/editor/page-viewer/feedbackMarginWidth.js +107 -0
  624. package/dist/editor/page-viewer/feedbackMarginWidth.js.map +1 -0
  625. package/dist/editor/page-viewer/interactivePreview.d.ts +168 -0
  626. package/dist/editor/page-viewer/interactivePreview.js +344 -0
  627. package/dist/editor/page-viewer/interactivePreview.js.map +1 -0
  628. package/dist/editor/page-viewer/minimapViewport.js +5 -2
  629. package/dist/editor/page-viewer/minimapViewport.js.map +1 -1
  630. package/dist/editor/page-viewer/openPageItems.d.ts +29 -0
  631. package/dist/editor/page-viewer/openPageItems.js +73 -0
  632. package/dist/editor/page-viewer/openPageItems.js.map +1 -0
  633. package/dist/editor/page-viewer/overviewRuler.d.ts +128 -0
  634. package/dist/editor/page-viewer/overviewRuler.js +226 -0
  635. package/dist/editor/page-viewer/overviewRuler.js.map +1 -0
  636. package/dist/editor/page-viewer/pageViewContext.d.ts +99 -37
  637. package/dist/editor/page-viewer/pageViewContext.js +207 -238
  638. package/dist/editor/page-viewer/pageViewContext.js.map +1 -1
  639. package/dist/editor/page-viewer/renderingApproval.d.ts +59 -0
  640. package/dist/editor/page-viewer/renderingApproval.js +186 -0
  641. package/dist/editor/page-viewer/renderingApproval.js.map +1 -0
  642. package/dist/editor/page-viewer/renderingChanges.d.ts +29 -0
  643. package/dist/editor/page-viewer/renderingChanges.js +40 -0
  644. package/dist/editor/page-viewer/renderingChanges.js.map +1 -0
  645. package/dist/editor/page-viewer/scrollIntoViewTextRanges.d.ts +23 -0
  646. package/dist/editor/page-viewer/scrollIntoViewTextRanges.js +26 -0
  647. package/dist/editor/page-viewer/scrollIntoViewTextRanges.js.map +1 -0
  648. package/dist/editor/page-viewer/useInteractivePreview.d.ts +77 -0
  649. package/dist/editor/page-viewer/useInteractivePreview.js +210 -0
  650. package/dist/editor/page-viewer/useInteractivePreview.js.map +1 -0
  651. package/dist/editor/pageModel.d.ts +12 -0
  652. package/dist/editor/personalization/ConditionTreeEditor.js +1 -1
  653. package/dist/editor/personalization/ConditionTreeEditor.js.map +1 -1
  654. package/dist/editor/personalization/PersonalizationPanel.js +1 -1
  655. package/dist/editor/personalization/PersonalizationPanel.js.map +1 -1
  656. package/dist/editor/reviews/CollapsibleText.d.ts +13 -0
  657. package/dist/editor/reviews/CollapsibleText.js +41 -0
  658. package/dist/editor/reviews/CollapsibleText.js.map +1 -0
  659. package/dist/editor/reviews/Comment.d.ts +10 -1
  660. package/dist/editor/reviews/Comment.js +47 -26
  661. package/dist/editor/reviews/Comment.js.map +1 -1
  662. package/dist/editor/reviews/CommentDisplayPopover.js +29 -25
  663. package/dist/editor/reviews/CommentDisplayPopover.js.map +1 -1
  664. package/dist/editor/reviews/CommentEditor.d.ts +25 -1
  665. package/dist/editor/reviews/CommentEditor.js +130 -24
  666. package/dist/editor/reviews/CommentEditor.js.map +1 -1
  667. package/dist/editor/reviews/CommentPopover.d.ts +0 -4
  668. package/dist/editor/reviews/CommentPopover.js +4 -8
  669. package/dist/editor/reviews/CommentPopover.js.map +1 -1
  670. package/dist/editor/reviews/CommentQuote.d.ts +10 -1
  671. package/dist/editor/reviews/CommentQuote.js +15 -10
  672. package/dist/editor/reviews/CommentQuote.js.map +1 -1
  673. package/dist/editor/reviews/CommentTargetOutline.d.ts +13 -0
  674. package/dist/editor/reviews/CommentTargetOutline.js +21 -0
  675. package/dist/editor/reviews/CommentTargetOutline.js.map +1 -0
  676. package/dist/editor/reviews/CommentTargetPickerDomLayer.d.ts +7 -0
  677. package/dist/editor/reviews/CommentTargetPickerDomLayer.js +117 -0
  678. package/dist/editor/reviews/CommentTargetPickerDomLayer.js.map +1 -0
  679. package/dist/editor/reviews/CommentThreadAgentLink.d.ts +6 -1
  680. package/dist/editor/reviews/CommentThreadAgentLink.js +4 -4
  681. package/dist/editor/reviews/CommentThreadAgentLink.js.map +1 -1
  682. package/dist/editor/reviews/CommentThreadCard.d.ts +34 -0
  683. package/dist/editor/reviews/CommentThreadCard.js +156 -0
  684. package/dist/editor/reviews/CommentThreadCard.js.map +1 -0
  685. package/dist/editor/reviews/CommentView.d.ts +7 -1
  686. package/dist/editor/reviews/CommentView.js +24 -6
  687. package/dist/editor/reviews/CommentView.js.map +1 -1
  688. package/dist/editor/reviews/Comments.js +5 -14
  689. package/dist/editor/reviews/Comments.js.map +1 -1
  690. package/dist/editor/reviews/CreateReviewDialog.js +36 -9
  691. package/dist/editor/reviews/CreateReviewDialog.js.map +1 -1
  692. package/dist/editor/reviews/EditReviewSettingsDialog.js +1 -1
  693. package/dist/editor/reviews/EditReviewSettingsDialog.js.map +1 -1
  694. package/dist/editor/reviews/FeedbackCard.d.ts +16 -1
  695. package/dist/editor/reviews/FeedbackCard.js +14 -3
  696. package/dist/editor/reviews/FeedbackCard.js.map +1 -1
  697. package/dist/editor/reviews/FeedbackFilters.d.ts +9 -5
  698. package/dist/editor/reviews/FeedbackFilters.js +15 -36
  699. package/dist/editor/reviews/FeedbackFilters.js.map +1 -1
  700. package/dist/editor/reviews/FeedbackModeIntro.d.ts +7 -1
  701. package/dist/editor/reviews/FeedbackModeIntro.js +11 -6
  702. package/dist/editor/reviews/FeedbackModeIntro.js.map +1 -1
  703. package/dist/editor/reviews/MentionText.d.ts +2 -1
  704. package/dist/editor/reviews/MentionText.js +5 -3
  705. package/dist/editor/reviews/MentionText.js.map +1 -1
  706. package/dist/editor/reviews/MultiReviewManager.js +18 -3
  707. package/dist/editor/reviews/MultiReviewManager.js.map +1 -1
  708. package/dist/editor/reviews/ReviewItemsPanel.js +4 -0
  709. package/dist/editor/reviews/ReviewItemsPanel.js.map +1 -1
  710. package/dist/editor/reviews/SuggestedEdit.d.ts +10 -1
  711. package/dist/editor/reviews/SuggestedEdit.js +77 -10
  712. package/dist/editor/reviews/SuggestedEdit.js.map +1 -1
  713. package/dist/editor/reviews/SuggestionCommentThread.d.ts +5 -1
  714. package/dist/editor/reviews/SuggestionCommentThread.js +48 -17
  715. package/dist/editor/reviews/SuggestionCommentThread.js.map +1 -1
  716. package/dist/editor/reviews/SuggestionDisplayPopover.d.ts +1 -3
  717. package/dist/editor/reviews/SuggestionDisplayPopover.js +2 -7
  718. package/dist/editor/reviews/SuggestionDisplayPopover.js.map +1 -1
  719. package/dist/editor/reviews/SuggestionThreadCard.d.ts +19 -0
  720. package/dist/editor/reviews/SuggestionThreadCard.js +25 -0
  721. package/dist/editor/reviews/SuggestionThreadCard.js.map +1 -0
  722. package/dist/editor/reviews/addCommentOnTarget.d.ts +22 -0
  723. package/dist/editor/reviews/addCommentOnTarget.js +32 -0
  724. package/dist/editor/reviews/addCommentOnTarget.js.map +1 -0
  725. package/dist/editor/reviews/applySuggestedEditActions.js +7 -1
  726. package/dist/editor/reviews/applySuggestedEditActions.js.map +1 -1
  727. package/dist/editor/reviews/balloonLayout.d.ts +51 -0
  728. package/dist/editor/reviews/balloonLayout.js +101 -0
  729. package/dist/editor/reviews/balloonLayout.js.map +1 -0
  730. package/dist/editor/reviews/commentImages.d.ts +1 -2
  731. package/dist/editor/reviews/commentImages.js +1 -37
  732. package/dist/editor/reviews/commentImages.js.map +1 -1
  733. package/dist/editor/reviews/commentTargetPicker.d.ts +114 -0
  734. package/dist/editor/reviews/commentTargetPicker.js +153 -0
  735. package/dist/editor/reviews/commentTargetPicker.js.map +1 -0
  736. package/dist/editor/reviews/feedbackAvatar.js +2 -1
  737. package/dist/editor/reviews/feedbackAvatar.js.map +1 -1
  738. package/dist/editor/reviews/feedbackBalloonDate.d.ts +8 -0
  739. package/dist/editor/reviews/feedbackBalloonDate.js +22 -0
  740. package/dist/editor/reviews/feedbackBalloonDate.js.map +1 -0
  741. package/dist/editor/reviews/feedbackDrafts.d.ts +49 -0
  742. package/dist/editor/reviews/feedbackDrafts.js +74 -0
  743. package/dist/editor/reviews/feedbackDrafts.js.map +1 -0
  744. package/dist/editor/reviews/feedbackHoverState.d.ts +18 -0
  745. package/dist/editor/reviews/feedbackHoverState.js +35 -0
  746. package/dist/editor/reviews/feedbackHoverState.js.map +1 -0
  747. package/dist/editor/reviews/feedbackPersonFilter.d.ts +3 -0
  748. package/dist/editor/reviews/feedbackPersonFilter.js +32 -0
  749. package/dist/editor/reviews/feedbackPersonFilter.js.map +1 -0
  750. package/dist/editor/reviews/feedbackSelection.js +7 -3
  751. package/dist/editor/reviews/feedbackSelection.js.map +1 -1
  752. package/dist/editor/reviews/feedbackThreadSelection.d.ts +10 -0
  753. package/dist/editor/reviews/feedbackThreadSelection.js +31 -0
  754. package/dist/editor/reviews/feedbackThreadSelection.js.map +1 -0
  755. package/dist/editor/reviews/feedbackThreads.d.ts +50 -0
  756. package/dist/editor/reviews/feedbackThreads.js +135 -0
  757. package/dist/editor/reviews/feedbackThreads.js.map +1 -0
  758. package/dist/editor/reviews/feedbackWheelForwarding.d.ts +34 -0
  759. package/dist/editor/reviews/feedbackWheelForwarding.js +108 -0
  760. package/dist/editor/reviews/feedbackWheelForwarding.js.map +1 -0
  761. package/dist/editor/reviews/openCommentsFeedback.d.ts +1 -1
  762. package/dist/editor/reviews/openCommentsFeedback.js +2 -1
  763. package/dist/editor/reviews/openCommentsFeedback.js.map +1 -1
  764. package/dist/editor/reviews/pendingReviewSelection.d.ts +13 -0
  765. package/dist/editor/reviews/pendingReviewSelection.js +29 -0
  766. package/dist/editor/reviews/pendingReviewSelection.js.map +1 -0
  767. package/dist/editor/reviews/requestReview.d.ts +27 -0
  768. package/dist/editor/reviews/requestReview.js +36 -0
  769. package/dist/editor/reviews/requestReview.js.map +1 -0
  770. package/dist/editor/reviews/reviewUrlScope.d.ts +23 -0
  771. package/dist/editor/reviews/reviewUrlScope.js +86 -0
  772. package/dist/editor/reviews/reviewUrlScope.js.map +1 -0
  773. package/dist/editor/reviews/scrollWithin.d.ts +29 -0
  774. package/dist/editor/reviews/scrollWithin.js +87 -0
  775. package/dist/editor/reviews/scrollWithin.js.map +1 -0
  776. package/dist/editor/reviews/subtreeFeedback.d.ts +57 -0
  777. package/dist/editor/reviews/subtreeFeedback.js +137 -0
  778. package/dist/editor/reviews/subtreeFeedback.js.map +1 -0
  779. package/dist/editor/reviews/useCommentImagePaste.d.ts +9 -1
  780. package/dist/editor/reviews/useCommentImagePaste.js +68 -4
  781. package/dist/editor/reviews/useCommentImagePaste.js.map +1 -1
  782. package/dist/editor/reviews/useFeedbackThreads.d.ts +35 -0
  783. package/dist/editor/reviews/useFeedbackThreads.js +137 -0
  784. package/dist/editor/reviews/useFeedbackThreads.js.map +1 -0
  785. package/dist/editor/reviews/useMeasuredHeights.d.ts +25 -0
  786. package/dist/editor/reviews/useMeasuredHeights.js +176 -0
  787. package/dist/editor/reviews/useMeasuredHeights.js.map +1 -0
  788. package/dist/editor/reviews/usePendingFeedbackFocus.d.ts +7 -0
  789. package/dist/editor/reviews/usePendingFeedbackFocus.js +42 -0
  790. package/dist/editor/reviews/usePendingFeedbackFocus.js.map +1 -0
  791. package/dist/editor/services/agentService.d.ts +101 -5
  792. package/dist/editor/services/agentService.js +16 -0
  793. package/dist/editor/services/agentService.js.map +1 -1
  794. package/dist/editor/services/aiService.d.ts +2 -0
  795. package/dist/editor/services/aiService.js.map +1 -1
  796. package/dist/editor/services/contentService.d.ts +11 -1
  797. package/dist/editor/services/contentService.js +2 -1
  798. package/dist/editor/services/contentService.js.map +1 -1
  799. package/dist/editor/services/editService.d.ts +2 -0
  800. package/dist/editor/services/editService.js.map +1 -1
  801. package/dist/editor/services/indexService.d.ts +1 -0
  802. package/dist/editor/services/indexService.js +4 -0
  803. package/dist/editor/services/indexService.js.map +1 -1
  804. package/dist/editor/services/mcpAccessService.d.ts +93 -0
  805. package/dist/editor/services/mcpAccessService.js +41 -0
  806. package/dist/editor/services/mcpAccessService.js.map +1 -0
  807. package/dist/editor/services/previewTokenService.d.ts +14 -0
  808. package/dist/editor/services/previewTokenService.js +34 -0
  809. package/dist/editor/services/previewTokenService.js.map +1 -0
  810. package/dist/editor/services/renderingsService.d.ts +117 -0
  811. package/dist/editor/services/renderingsService.js +245 -0
  812. package/dist/editor/services/renderingsService.js.map +1 -0
  813. package/dist/editor/services/reviewsService.d.ts +6 -1
  814. package/dist/editor/services/reviewsService.js +14 -6
  815. package/dist/editor/services/reviewsService.js.map +1 -1
  816. package/dist/editor/services/serviceHelper.d.ts +17 -1
  817. package/dist/editor/services/serviceHelper.js +67 -12
  818. package/dist/editor/services/serviceHelper.js.map +1 -1
  819. package/dist/editor/services/spellCheckService.d.ts +13 -0
  820. package/dist/editor/services/spellCheckService.js +33 -0
  821. package/dist/editor/services/spellCheckService.js.map +1 -0
  822. package/dist/editor/services/suggestedEditsService.d.ts +1 -0
  823. package/dist/editor/services/suggestedEditsService.js +7 -0
  824. package/dist/editor/services/suggestedEditsService.js.map +1 -1
  825. package/dist/editor/settings/MigrationJournalCard.js +2 -2
  826. package/dist/editor/settings/MigrationJournalCard.js.map +1 -1
  827. package/dist/editor/settings/StatusSummary.js +5 -2
  828. package/dist/editor/settings/StatusSummary.js.map +1 -1
  829. package/dist/editor/settings/index/CollectionWarningsDisplay.js +1 -1
  830. package/dist/editor/settings/index/CollectionWarningsDisplay.js.map +1 -1
  831. package/dist/editor/settings/index/IndexGenerationsSection.d.ts +4 -5
  832. package/dist/editor/settings/index/IndexGenerationsSection.js +83 -33
  833. package/dist/editor/settings/index/IndexGenerationsSection.js.map +1 -1
  834. package/dist/editor/settings/panels/AgentProfileConfigPanel.js +1 -1
  835. package/dist/editor/settings/panels/AgentProfileConfigPanel.js.map +1 -1
  836. package/dist/editor/settings/panels/AgentToolsPanel.js +1 -1
  837. package/dist/editor/settings/panels/AgentToolsPanel.js.map +1 -1
  838. package/dist/editor/settings/panels/JavaScriptToolAgentPanel.js +1 -1
  839. package/dist/editor/settings/panels/JavaScriptToolAgentPanel.js.map +1 -1
  840. package/dist/editor/settings/panels/McpAccessPanel.d.ts +7 -0
  841. package/dist/editor/settings/panels/McpAccessPanel.js +96 -0
  842. package/dist/editor/settings/panels/McpAccessPanel.js.map +1 -0
  843. package/dist/editor/settings/panels/McpAccessSettingsView.d.ts +8 -0
  844. package/dist/editor/settings/panels/McpAccessSettingsView.js +221 -0
  845. package/dist/editor/settings/panels/McpAccessSettingsView.js.map +1 -0
  846. package/dist/editor/settings/panels/ModelConfigPanel.js +1 -0
  847. package/dist/editor/settings/panels/ModelConfigPanel.js.map +1 -1
  848. package/dist/editor/settings/panels/ModelsPanel.js +60 -6
  849. package/dist/editor/settings/panels/ModelsPanel.js.map +1 -1
  850. package/dist/editor/settings/panels/PersistentLogsPanel.js +2 -1
  851. package/dist/editor/settings/panels/PersistentLogsPanel.js.map +1 -1
  852. package/dist/editor/settings/panels/ProjectTemplateAgentPanel.js +1 -1
  853. package/dist/editor/settings/panels/ProjectTemplateAgentPanel.js.map +1 -1
  854. package/dist/editor/settings/panels/ProvidersPanel.js +2 -1
  855. package/dist/editor/settings/panels/ProvidersPanel.js.map +1 -1
  856. package/dist/editor/settings/panels/SearchConfigPanel.js +6 -5
  857. package/dist/editor/settings/panels/SearchConfigPanel.js.map +1 -1
  858. package/dist/editor/settings/panels/SpellCheckPanel.d.ts +8 -0
  859. package/dist/editor/settings/panels/SpellCheckPanel.js +253 -0
  860. package/dist/editor/settings/panels/SpellCheckPanel.js.map +1 -0
  861. package/dist/editor/settings/panels/StatusPanel.js +5 -6
  862. package/dist/editor/settings/panels/StatusPanel.js.map +1 -1
  863. package/dist/editor/settings/panels/UserPreferencesPanel.js +5 -2
  864. package/dist/editor/settings/panels/UserPreferencesPanel.js.map +1 -1
  865. package/dist/editor/settings/panels/index.d.ts +2 -0
  866. package/dist/editor/settings/panels/index.js +2 -0
  867. package/dist/editor/settings/panels/index.js.map +1 -1
  868. package/dist/editor/sidebar/ComponentPalette.js +7 -3
  869. package/dist/editor/sidebar/ComponentPalette.js.map +1 -1
  870. package/dist/editor/sidebar/ComponentTree.d.ts +1 -1
  871. package/dist/editor/sidebar/ComponentTree.js +32 -56
  872. package/dist/editor/sidebar/ComponentTree.js.map +1 -1
  873. package/dist/editor/sidebar/DictionaryEditor.js +2 -1
  874. package/dist/editor/sidebar/DictionaryEditor.js.map +1 -1
  875. package/dist/editor/sidebar/EditHistory.js +5 -4
  876. package/dist/editor/sidebar/EditHistory.js.map +1 -1
  877. package/dist/editor/sidebar/FeedbackSidebar.d.ts +7 -0
  878. package/dist/editor/sidebar/FeedbackSidebar.js +300 -0
  879. package/dist/editor/sidebar/FeedbackSidebar.js.map +1 -0
  880. package/dist/editor/sidebar/OperationDetailsContent.js +50 -0
  881. package/dist/editor/sidebar/OperationDetailsContent.js.map +1 -1
  882. package/dist/editor/sidebar/OperationItem.js +2 -0
  883. package/dist/editor/sidebar/OperationItem.js.map +1 -1
  884. package/dist/editor/sidebar/Sessions.js +3 -1
  885. package/dist/editor/sidebar/Sessions.js.map +1 -1
  886. package/dist/editor/sidebar/Validation.js +1 -1
  887. package/dist/editor/sidebar/Validation.js.map +1 -1
  888. package/dist/editor/sidebar/Workbox.js +3 -108
  889. package/dist/editor/sidebar/Workbox.js.map +1 -1
  890. package/dist/editor/sidebar/liveComponentThumbnails.d.ts +1 -1
  891. package/dist/editor/sidebar/liveComponentThumbnails.js +19 -14
  892. package/dist/editor/sidebar/liveComponentThumbnails.js.map +1 -1
  893. package/dist/editor/spellcheck/canvasSpellCheckContextMenu.d.ts +30 -0
  894. package/dist/editor/spellcheck/canvasSpellCheckContextMenu.js +69 -0
  895. package/dist/editor/spellcheck/canvasSpellCheckContextMenu.js.map +1 -0
  896. package/dist/editor/spellcheck/htmlSpellDocument.d.ts +60 -0
  897. package/dist/editor/spellcheck/htmlSpellDocument.js +181 -0
  898. package/dist/editor/spellcheck/htmlSpellDocument.js.map +1 -0
  899. package/dist/editor/spellcheck/htmlSpellTokenizer.d.ts +45 -0
  900. package/dist/editor/spellcheck/htmlSpellTokenizer.js +277 -0
  901. package/dist/editor/spellcheck/htmlSpellTokenizer.js.map +1 -0
  902. package/dist/editor/spellcheck/replacementGuard.d.ts +27 -0
  903. package/dist/editor/spellcheck/replacementGuard.js +29 -0
  904. package/dist/editor/spellcheck/replacementGuard.js.map +1 -0
  905. package/dist/editor/spellcheck/spellCheckCanvasStore.d.ts +17 -0
  906. package/dist/editor/spellcheck/spellCheckCanvasStore.js +37 -0
  907. package/dist/editor/spellcheck/spellCheckCanvasStore.js.map +1 -0
  908. package/dist/editor/spellcheck/spellCheckCanvasTargets.d.ts +71 -0
  909. package/dist/editor/spellcheck/spellCheckCanvasTargets.js +126 -0
  910. package/dist/editor/spellcheck/spellCheckCanvasTargets.js.map +1 -0
  911. package/dist/editor/spellcheck/spellCheckClient.d.ts +66 -0
  912. package/dist/editor/spellcheck/spellCheckClient.js +0 -0
  913. package/dist/editor/spellcheck/spellCheckClient.js.map +1 -0
  914. package/dist/editor/spellcheck/spellCheckContextMenu.d.ts +52 -0
  915. package/dist/editor/spellcheck/spellCheckContextMenu.js +120 -0
  916. package/dist/editor/spellcheck/spellCheckContextMenu.js.map +1 -0
  917. package/dist/editor/spellcheck/spellCheckReplace.d.ts +8 -0
  918. package/dist/editor/spellcheck/spellCheckReplace.js +20 -0
  919. package/dist/editor/spellcheck/spellCheckReplace.js.map +1 -0
  920. package/dist/editor/spellcheck/spellCheckStyles.d.ts +11 -0
  921. package/dist/editor/spellcheck/spellCheckStyles.js +12 -0
  922. package/dist/editor/spellcheck/spellCheckStyles.js.map +1 -0
  923. package/dist/editor/spellcheck/spellCheckTypes.d.ts +94 -0
  924. package/dist/editor/spellcheck/spellCheckTypes.js +2 -0
  925. package/dist/editor/spellcheck/spellCheckTypes.js.map +1 -0
  926. package/dist/editor/spellcheck/textMarkHitTest.d.ts +14 -0
  927. package/dist/editor/spellcheck/textMarkHitTest.js +39 -0
  928. package/dist/editor/spellcheck/textMarkHitTest.js.map +1 -0
  929. package/dist/editor/spellcheck/useSpellCheck.d.ts +16 -0
  930. package/dist/editor/spellcheck/useSpellCheck.js +57 -0
  931. package/dist/editor/spellcheck/useSpellCheck.js.map +1 -0
  932. package/dist/editor/ui/DynamicRenderingsPublishWarning.d.ts +14 -0
  933. package/dist/editor/ui/DynamicRenderingsPublishWarning.js +40 -0
  934. package/dist/editor/ui/DynamicRenderingsPublishWarning.js.map +1 -0
  935. package/dist/editor/ui/ItemNameDialogNew.js +11 -2
  936. package/dist/editor/ui/ItemNameDialogNew.js.map +1 -1
  937. package/dist/editor/ui/ItemSearch.d.ts +2 -0
  938. package/dist/editor/ui/ItemSearch.js +2 -2
  939. package/dist/editor/ui/ItemSearch.js.map +1 -1
  940. package/dist/editor/ui/PublishDialog.d.ts +2 -0
  941. package/dist/editor/ui/PublishDialog.js +4 -1
  942. package/dist/editor/ui/PublishDialog.js.map +1 -1
  943. package/dist/editor/ui/PublishItemDialog.js +3 -2
  944. package/dist/editor/ui/PublishItemDialog.js.map +1 -1
  945. package/dist/editor/ui/PublishReadinessSummary.js +1 -1
  946. package/dist/editor/ui/PublishReadinessSummary.js.map +1 -1
  947. package/dist/editor/ui/PublishRestrictionsDialog.d.ts +33 -0
  948. package/dist/editor/ui/PublishRestrictionsDialog.js +208 -38
  949. package/dist/editor/ui/PublishRestrictionsDialog.js.map +1 -1
  950. package/dist/editor/ui/RootItemPicker.d.ts +18 -0
  951. package/dist/editor/ui/RootItemPicker.js +112 -0
  952. package/dist/editor/ui/RootItemPicker.js.map +1 -0
  953. package/dist/editor/ui/WorkboxItemsTable.js +1 -1
  954. package/dist/editor/ui/WorkboxItemsTable.js.map +1 -1
  955. package/dist/editor/utils/dataTransferImages.d.ts +7 -0
  956. package/dist/editor/utils/dataTransferImages.js +43 -0
  957. package/dist/editor/utils/dataTransferImages.js.map +1 -0
  958. package/dist/editor/utils/itemConverters.js +9 -0
  959. package/dist/editor/utils/itemConverters.js.map +1 -1
  960. package/dist/editor/utils/keyboardNavigation.js +38 -4
  961. package/dist/editor/utils/keyboardNavigation.js.map +1 -1
  962. package/dist/editor/utils.d.ts +4 -4
  963. package/dist/editor/utils.js +9 -8
  964. package/dist/editor/utils.js.map +1 -1
  965. package/dist/editor/validation/navigateToValidationIssue.d.ts +2 -2
  966. package/dist/editor/validation/navigateToValidationIssue.js +1 -1
  967. package/dist/editor/validation/navigateToValidationIssue.js.map +1 -1
  968. package/dist/editor/validation/validationRulerIssues.d.ts +17 -0
  969. package/dist/editor/validation/validationRulerIssues.js +44 -0
  970. package/dist/editor/validation/validationRulerIssues.js.map +1 -0
  971. package/dist/editor/views/CompareView.js +3 -4
  972. package/dist/editor/views/CompareView.js.map +1 -1
  973. package/dist/editor/views/EditorSlot.js +10 -4
  974. package/dist/editor/views/EditorSlot.js.map +1 -1
  975. package/dist/editor/views/ItemEditor.d.ts +3 -1
  976. package/dist/editor/views/ItemEditor.js +43 -38
  977. package/dist/editor/views/ItemEditor.js.map +1 -1
  978. package/dist/editor/views/ItemEditorPane.js +3 -3
  979. package/dist/editor/views/ItemEditorPane.js.map +1 -1
  980. package/dist/editor/views/SingleEditView.js +10 -32
  981. package/dist/editor/views/SingleEditView.js.map +1 -1
  982. package/dist/editor/views/editorSlotContext.js +62 -90
  983. package/dist/editor/views/editorSlotContext.js.map +1 -1
  984. package/dist/index.d.ts +10 -5
  985. package/dist/index.js +8 -4
  986. package/dist/index.js.map +1 -1
  987. package/dist/licensing/FeatureGate.js +1 -1
  988. package/dist/licensing/FeatureGate.js.map +1 -1
  989. package/dist/licensing/LicenseContext.js +31 -17
  990. package/dist/licensing/LicenseContext.js.map +1 -1
  991. package/dist/revision.d.ts +2 -2
  992. package/dist/revision.js +2 -2
  993. package/dist/setup/services/setupWizardService.d.ts +6 -2
  994. package/dist/setup/services/setupWizardService.js +10 -0
  995. package/dist/setup/services/setupWizardService.js.map +1 -1
  996. package/dist/setup/wizard/steps/AddModelDialog.js +1 -0
  997. package/dist/setup/wizard/steps/AddModelDialog.js.map +1 -1
  998. package/dist/setup/wizard/steps/ImportModelDialog.js +2 -1
  999. package/dist/setup/wizard/steps/ImportModelDialog.js.map +1 -1
  1000. package/dist/splash-screen/ModernSplashScreen.js +4 -3
  1001. package/dist/splash-screen/ModernSplashScreen.js.map +1 -1
  1002. package/dist/splash-screen/RecentPages.js +5 -2
  1003. package/dist/splash-screen/RecentPages.js.map +1 -1
  1004. package/dist/task-board/TaskBoardWorkspace.js +49 -12
  1005. package/dist/task-board/TaskBoardWorkspace.js.map +1 -1
  1006. package/dist/task-board/components/GoalsMatrix.js +1 -1
  1007. package/dist/task-board/components/GoalsMatrix.js.map +1 -1
  1008. package/dist/task-board/components/IssuePanel.js +4 -4
  1009. package/dist/task-board/components/IssuePanel.js.map +1 -1
  1010. package/dist/task-board/components/ProjectBudgetBanner.js +1 -1
  1011. package/dist/task-board/components/ProjectBudgetBanner.js.map +1 -1
  1012. package/dist/task-board/components/ProjectGoalsPanel.js +1 -1
  1013. package/dist/task-board/components/ProjectGoalsPanel.js.map +1 -1
  1014. package/dist/task-board/components/TaskDetailPanel.js +18 -8
  1015. package/dist/task-board/components/TaskDetailPanel.js.map +1 -1
  1016. package/dist/task-board/components/WizardCommunicationCards.js +1 -1
  1017. package/dist/task-board/components/WizardCommunicationCards.js.map +1 -1
  1018. package/dist/task-board/services/taskService.d.ts +1 -2
  1019. package/dist/task-board/services/taskService.js +0 -3
  1020. package/dist/task-board/services/taskService.js.map +1 -1
  1021. package/dist/task-board/taskBlockers.d.ts +10 -0
  1022. package/dist/task-board/taskBlockers.js +66 -0
  1023. package/dist/task-board/taskBlockers.js.map +1 -0
  1024. package/dist/task-board/types.d.ts +0 -7
  1025. package/dist/task-board/utils/projectDashboardModel.js +7 -1
  1026. package/dist/task-board/utils/projectDashboardModel.js.map +1 -1
  1027. package/dist/task-board/views/DependencyGraphView.d.ts +22 -0
  1028. package/dist/task-board/views/DependencyGraphView.js +111 -14
  1029. package/dist/task-board/views/DependencyGraphView.js.map +1 -1
  1030. package/dist/task-board/views/KanbanView.js +8 -10
  1031. package/dist/task-board/views/KanbanView.js.map +1 -1
  1032. package/dist/task-board/views/ProjectDashboardView.js +5 -13
  1033. package/dist/task-board/views/ProjectDashboardView.js.map +1 -1
  1034. package/dist/tour/Tour.js +4 -1
  1035. package/dist/tour/Tour.js.map +1 -1
  1036. package/dist/tour/sandbox-tour-copy.d.ts +8 -0
  1037. package/dist/tour/sandbox-tour-copy.js +8 -0
  1038. package/dist/tour/sandbox-tour-copy.js.map +1 -1
  1039. package/dist/tour/sandbox-tour.d.ts +3 -0
  1040. package/dist/tour/sandbox-tour.js +107 -3
  1041. package/dist/tour/sandbox-tour.js.map +1 -1
  1042. package/dist/types.d.ts +85 -1
  1043. package/package.json +6 -2
  1044. package/styles.css +17 -0
  1045. package/dist/editor/page-editor-chrome/bridgeLinkValue.d.ts +0 -10
  1046. package/dist/editor/page-editor-chrome/bridgeLinkValue.js +0 -55
  1047. package/dist/editor/page-editor-chrome/bridgeLinkValue.js.map +0 -1
@@ -1,17 +1,29 @@
1
1
  import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { useCallback, useEffect, useLayoutEffect, useRef, useState, useSyncExternalStore, } from "react";
3
- import { BRIDGE_DOM_UPDATED_EVENT, MiniMap } from "./MiniMap";
3
+ import { MiniMap } from "./MiniMap";
4
+ import { FEEDBACK_MARGIN_MIN_WIDTH, FEEDBACK_MARGIN_RAIL_WIDTH, FeedbackMargin, } from "./FeedbackMargin";
5
+ import { getFeedbackMarginRoom, resolveFeedbackMarginSize, shouldShowFeedbackMargin, } from "./feedbackMarginLayout";
6
+ import { useFeedbackMarginCollapsed, useFeedbackMarginPreferredWidth, } from "./feedbackMarginWidth";
7
+ import { handleCanvasPickInteraction, isCanvasPickSelection, markPickedSelection, releasePickedSelection, stopCommentTargetPicking, useCommentTargetPicking, } from "../reviews/commentTargetPicker";
8
+ import { shouldOpenMobileFormOnCanvasTap } from "../mobileBottomPanel";
9
+ import { navigateCanvasFrame } from "./canvasFrameNavigation";
10
+ import { isCanvasLoadSettling, resolveDeferredCanvasRefresh, } from "./canvasLoadSettling";
11
+ import { getCanvasScrollHandoffKey, stashCanvasScrollHandoff, takeCanvasScrollHandoff, } from "./canvasScrollHandoff";
4
12
  import { resolveMiniMapVisibility, } from "./minimapVisibility";
5
13
  import { useCanvasSelection, useEditContext, useEditContextRef, useFieldsEditContext, useFieldsEditContextRef, } from "../client/editContext";
6
14
  import { useSlotContext } from "../views/editorSlotContext";
15
+ import { getScrollIntoViewTextRangeKey, getScrollIntoViewTextRangeQuery, SCROLL_INTO_VIEW_BRIDGE_SOURCE, } from "./scrollIntoViewTextRanges";
7
16
  import { useDebouncedCallback, useThrottledCallback } from "use-debounce";
8
17
  import { PageEditorChrome } from "../page-editor-chrome/PageEditorChrome";
18
+ import { BridgePasteCleanupOverlay } from "../page-editor-chrome/BridgePasteCleanupOverlay";
9
19
  import { useBridgeInlineEditing, } from "../page-editor-chrome/useBridgeInlineEditing";
10
20
  import { createBridgeInlineEditSessionCoordinator, } from "./bridgeInlineEditSession";
11
21
  import { getInlineAiAnchorFromBridgeToolbar, getVisibleBridgeToolbarRect, waitForVisibleBridgeToolbarRect, } from "../page-editor-chrome/bridgeInlineFormatToolbarLayout";
12
22
  import { IFRAME_OVERLAY_BRIDGE_DRAG_GESTURE_EVENT, IFRAME_OVERLAY_BRIDGE_GEOMETRY_EVENT, IFRAME_OVERLAY_BRIDGE_SCROLL_EVENT, IframeOverlayProvider, } from "../page-editor-chrome/overlay/IframeOverlayProvider";
13
- import { projectBridgeGeometryToScroll } from "../page-editor-chrome/overlay/geometry";
14
- import { CANVAS_REFRESH_COMPLETED_EVENT, DEVICE_CHANGE_EVENT, useViewportChangeSignal, } from "./pageViewContext";
23
+ import { createOverviewRulerStore, OverviewRulerContext, } from "./overviewRuler";
24
+ import { CanvasOverviewRuler } from "./CanvasOverviewRuler";
25
+ import { getBridgeGeometryDocumentSize, getBridgeGeometryScrollScale, getBridgeOverlayGeometryDetail, projectBridgeGeometryToScroll, } from "../page-editor-chrome/overlay/geometry";
26
+ import { CANVAS_REFRESH_COMPLETED_EVENT, usePageViewState, } from "./pageViewContext";
15
27
  import uuid from "react-uuid";
16
28
  import { cn } from "../../lib/utils";
17
29
  import { normalizeMarkerId } from "../utils";
@@ -25,7 +37,12 @@ import { FieldActionsOverlay, } from "../FieldActionsOverlay";
25
37
  import { alignLoopbackHostToEditor, alignXmCloudManagedEditingHostToEditor, applyParheliaRenderContext, crossesPreviewRenderBoundary, getEditorQueryParam, } from "./renderUrl";
26
38
  import { NoLayout } from "../page-editor-chrome/NoLayout";
27
39
  import { Spinner } from "../ui/Spinner";
40
+ import { buildCanvasSpellCheckMenuItems } from "../spellcheck/canvasSpellCheckContextMenu";
28
41
  import { DeviceToolbar } from "./DeviceToolbar";
42
+ import { DynamicRenderingsStrip } from "./DynamicRenderingsStrip";
43
+ import { readCanvasRenderings } from "./interactivePreview";
44
+ import { recordPageRenderingIds } from "./renderingApproval";
45
+ import { useInteractivePreview } from "./useInteractivePreview";
29
46
  import { isPreviewEditAttemptInteraction, showPreviewEditAttemptToast, } from "./previewEditAttempt";
30
47
  import { FullscreenControls } from "../client/ui/FullscreenControls";
31
48
  import { PageSelector } from "../menubar/PageSelector";
@@ -51,14 +68,13 @@ import { downloadLink } from "../bridge/linkDownload";
51
68
  const ZOOM_MIN = 0.25;
52
69
  const ZOOM_MAX = 2;
53
70
  const ZOOM_STEP = 0.25;
54
- const ZOOM_TRANSITION_MS = 300;
71
+ export const ZOOM_TRANSITION_MS = 300;
55
72
  // useSyncExternalStore fallbacks for frames rendered without a slot context.
56
73
  const subscribeToNothing = () => () => { };
57
74
  const getUndefined = () => undefined;
58
75
  const BRIDGE_INLINE_EDIT_RELEASE_EVENT = "parhelia:bridge-inline-edit-release";
59
76
  const INLINE_AI_CLOSE_EVENT = "inline-ai-close";
60
77
  const BRIDGE_INLINE_LINK_OPEN_EVENT = "bridge-inline-link-open";
61
- const SCROLL_INTO_VIEW_BRIDGE_SOURCE = "scroll-into-view";
62
78
  // How long a requested canvas refresh may suppress viewport reactions
63
79
  // (selection auto-scroll, scrollIntoView) before it is presumed lost.
64
80
  const CANVAS_REFRESH_IN_FLIGHT_MAX_MS = 15000;
@@ -119,37 +135,10 @@ function dispatchBridgeOverlayScroll(iframe, scroll, scrollScale = 1) {
119
135
  },
120
136
  }));
121
137
  }
122
- function getBridgeGeometryScrollScale(geometry) {
123
- return typeof geometry?.scrollScale === "number" &&
124
- Number.isFinite(geometry.scrollScale) &&
125
- geometry.scrollScale > 0
126
- ? geometry.scrollScale
127
- : 1;
128
- }
129
138
  function dispatchBridgeOverlayGeometry(iframe, geometry, scrollOverride) {
130
- const documentSize = getBridgeGeometryDocumentSize(geometry);
131
- const scrollScale = getBridgeGeometryScrollScale(geometry);
132
- const scroll = scrollOverride ?? geometry?.scroll;
133
- const detail = {
134
- scrollLeft: (scroll?.x ?? 0) * scrollScale,
135
- scrollTop: (scroll?.y ?? 0) * scrollScale,
136
- viewportWidth: geometry?.viewport.width,
137
- viewportHeight: geometry?.viewport.height,
138
- scrollWidth: documentSize?.width,
139
- scrollHeight: documentSize?.height,
140
- };
139
+ const detail = getBridgeOverlayGeometryDetail(geometry, scrollOverride);
141
140
  iframe?.dispatchEvent(new CustomEvent(IFRAME_OVERLAY_BRIDGE_GEOMETRY_EVENT, { detail }));
142
141
  }
143
- function getBridgeGeometryDocumentSize(geometry) {
144
- if (!geometry)
145
- return undefined;
146
- const rectScale = geometry.rectScale ?? 1;
147
- const scrollScale = getBridgeGeometryScrollScale(geometry);
148
- return {
149
- width: Math.max(geometry.viewport.width, ...geometry.targets.map((target) => target.rect.right * rectScale + geometry.scroll.x * scrollScale)),
150
- height: Math.max(geometry.viewport.height, ...geometry.targets.map((target) => target.rect.bottom * rectScale + geometry.scroll.y * scrollScale)),
151
- };
152
- }
153
142
  function bridgeKeysMatch(left, right) {
154
143
  const normalizedLeft = normalizeMarkerId(left);
155
144
  const normalizedRight = normalizeMarkerId(right);
@@ -266,7 +255,9 @@ function findScrollIntoViewDocumentBounds(geometry, target, options = {}) {
266
255
  ? findBridgeComponentDocumentBounds(geometry, target.fallbackComponentId)
267
256
  : undefined));
268
257
  }
269
- const textRangeBounds = findBridgeTextRangeDocumentBounds(geometry, target.key);
258
+ // The scroll measures the target under its own keys (see
259
+ // `getScrollIntoViewTextRangeKey`), never an overlay's.
260
+ const textRangeBounds = findBridgeTextRangeDocumentBounds(geometry, getScrollIntoViewTextRangeKey(target.key));
270
261
  if (textRangeBounds || !options.includeTextRangeFallback) {
271
262
  return textRangeBounds;
272
263
  }
@@ -310,8 +301,8 @@ function getScrollIntoViewSignature(target) {
310
301
  ].join("|");
311
302
  }
312
303
  function requestScrollTargetGeometry(pageViewContext, target) {
313
- const textRanges = target.textRanges?.filter((range) => !!range);
314
- if (!textRanges?.length)
304
+ const textRanges = getScrollIntoViewTextRangeQuery(target);
305
+ if (!textRanges.length)
315
306
  return false;
316
307
  return (pageViewContext.requestBridgeGeometry?.({
317
308
  source: SCROLL_INTO_VIEW_BRIDGE_SOURCE,
@@ -329,7 +320,7 @@ function getFocusedFieldScrollKey(field) {
329
320
  ].join("|");
330
321
  }
331
322
  function scrollBridgeBoundsIntoView(pageViewContext, bounds, currentScroll) {
332
- const geometry = pageViewContext.bridgeGeometry;
323
+ const geometry = pageViewContext.getState().bridgeGeometry;
333
324
  if (!geometry)
334
325
  return false;
335
326
  const scrollScale = getBridgeGeometryScrollScale(geometry);
@@ -392,6 +383,10 @@ function restoreIframeWindowScroll(iframe, targetScroll, options = {}) {
392
383
  }
393
384
  };
394
385
  const apply = () => {
386
+ if (options.isCurrent?.() === false) {
387
+ completed = true;
388
+ return;
389
+ }
395
390
  try {
396
391
  attempts += 1;
397
392
  win.scrollTo(targetScroll.x, targetScroll.y);
@@ -584,12 +579,27 @@ function getBridgeSelectionMetadataString(selection, key) {
584
579
  }
585
580
  export function PageViewerFrame(props) {
586
581
  const editContext = useEditContext();
587
- useViewportChangeSignal();
588
582
  if (!editContext || !props.pageViewContext)
589
583
  return null;
590
584
  return (_jsx(PageViewerFrameContent, { ...props, editContext: editContext, pageViewContext: props.pageViewContext }));
591
585
  }
592
586
  function PageViewerFrameContent({ compareView, pageViewContext, editContext, className, slotCloseButton, }) {
587
+ // The page view state this frame renders from. Handlers and effects that run
588
+ // later read the current state (`getState()`) instead.
589
+ // Which page to load and from where: the canvas load effect depends on these
590
+ // values and runs whenever one changes.
591
+ const pageItemDescriptor = usePageViewState(pageViewContext, (state) => state.pageItemDescriptor);
592
+ const editUrl = usePageViewState(pageViewContext, (state) => state.editUrl);
593
+ const previewUrl = usePageViewState(pageViewContext, (state) => state.previewUrl);
594
+ const siteName = usePageViewState(pageViewContext, (state) => state.site?.name);
595
+ const page = usePageViewState(pageViewContext, (state) => state.page);
596
+ const zoom = usePageViewState(pageViewContext, (state) => state.zoom);
597
+ const device = usePageViewState(pageViewContext, (state) => state.device);
598
+ const deviceWidth = usePageViewState(pageViewContext, (state) => state.deviceWidth);
599
+ const deviceHeight = usePageViewState(pageViewContext, (state) => state.deviceHeight);
600
+ const fullscreen = usePageViewState(pageViewContext, (state) => state.fullscreen);
601
+ const bridgeReady = usePageViewState(pageViewContext, (state) => state.bridgeReady);
602
+ const bridgeStructure = usePageViewState(pageViewContext, (state) => state.bridgeStructure);
593
603
  const fieldsContext = useFieldsEditContext();
594
604
  const slotContext = useSlotContext();
595
605
  const canvasSelection = useCanvasSelection();
@@ -598,13 +608,6 @@ function PageViewerFrameContent({ compareView, pageViewContext, editContext, cla
598
608
  useEffect(() => {
599
609
  pageViewContextRef.current = pageViewContext;
600
610
  }, [pageViewContext]);
601
- const latestBridgeSelectionRef = useRef(pageViewContext.bridgeSelection);
602
- // Bridge events are ordered, but the context setter commits asynchronously.
603
- // A layout synchronization cannot run later and clobber a newer event-time
604
- // ref the way a pending passive effect could.
605
- useLayoutEffect(() => {
606
- latestBridgeSelectionRef.current = pageViewContext.bridgeSelection;
607
- }, [pageViewContext.bridgeSelection]);
608
611
  const editContextRef = useEditContextRef();
609
612
  const fieldsContextRef = useFieldsEditContextRef();
610
613
  const iframeRef = useRef(null);
@@ -633,6 +636,7 @@ function PageViewerFrameContent({ compareView, pageViewContext, editContext, cla
633
636
  };
634
637
  }, []);
635
638
  const [isBridgeInlineEditing, setIsBridgeInlineEditing] = useState(false);
639
+ const pickingCommentTarget = useCommentTargetPicking();
636
640
  const bridgeInlineEditSessionRef = useRef(null);
637
641
  if (!bridgeInlineEditSessionRef.current) {
638
642
  bridgeInlineEditSessionRef.current =
@@ -657,7 +661,15 @@ function PageViewerFrameContent({ compareView, pageViewContext, editContext, cla
657
661
  const directOverlayScrollSyncRef = useRef(false);
658
662
  const lastBridgeHoverInteractionRef = useRef(undefined);
659
663
  const [bridgeInteraction, setBridgeInteraction] = useState(undefined);
664
+ const [pasteCleanupMenu, setPasteCleanupMenu] = useState();
665
+ const sendPasteCleanupCommand = useCallback((payload) => {
666
+ bridgeClientRef.current?.sendCommand("pasteCleanup", payload);
667
+ }, []);
660
668
  const pendingRefreshScrollRef = useRef(undefined);
669
+ // Selected component handed over by a frame that unmounted for a layout
670
+ // switch; once geometry arrives it is put back at its previous distance
671
+ // from the canvas top (see canvasScrollHandoff).
672
+ const pendingScrollAnchorRef = useRef(undefined);
661
673
  // #fragment carried by a canvas link navigation (preview click / alt+click).
662
674
  // Applied to the next iframe src load so the browser lands the canvas on the
663
675
  // linked section instead of the page top.
@@ -721,11 +733,18 @@ function PageViewerFrameContent({ compareView, pageViewContext, editContext, cla
721
733
  // bridge is delivering that newer target. Restoring the stale capture
722
734
  // would fight it (restoreIframeWindowScroll re-asserts for ~150
723
735
  // frames and cancels in-flight smooth scrolls).
736
+ logFieldValueDiagnostic("canvas-load", `scroll restore ctx=${pageViewContextRef.current?.debugId} dropped y=${targetScroll.y}: newer scroll command`);
724
737
  clearPendingTarget();
725
738
  return;
726
739
  }
727
- const currentScroll = getIframeWindowScroll(iframe) ??
728
- observedScroll ?? { x: 0, y: 0 };
740
+ const iframeScroll = getIframeWindowScroll(iframe);
741
+ if (!iframeScroll && !bridgeClientRef.current?.isReady()) {
742
+ // A cross-origin host can only be scrolled through the bridge, and the
743
+ // iframe load event fires before its handshake. Keep the target for
744
+ // the bridge's ready event instead of dropping it here.
745
+ return;
746
+ }
747
+ const currentScroll = iframeScroll ?? observedScroll ?? { x: 0, y: 0 };
729
748
  const deltaX = targetScroll.x - currentScroll.x;
730
749
  const deltaY = targetScroll.y - currentScroll.y;
731
750
  // Already at the target: re-asserting the position would be a no-op
@@ -735,10 +754,14 @@ function PageViewerFrameContent({ compareView, pageViewContext, editContext, cla
735
754
  clearPendingTarget();
736
755
  return;
737
756
  }
757
+ logFieldValueDiagnostic("canvas-load", `scroll restore ctx=${pageViewContextRef.current?.debugId} y=${currentScroll.y}->${targetScroll.y} from=${iframeScroll ? "window" : "bridge"}`);
738
758
  const restoreStarted = restoreIframeWindowScroll(iframe, targetScroll, {
739
759
  maxAttempts: 150,
740
760
  onSettled: clearPendingTarget,
741
761
  onExpired: clearPendingTarget,
762
+ // A newer target (or a cleared one) owns the viewport now; re-asserting
763
+ // this one for the rest of the ~150 frames would fight it.
764
+ isCurrent: () => pendingRefreshScrollRef.current === targetScroll,
742
765
  });
743
766
  if (!restoreStarted) {
744
767
  clearPendingTarget();
@@ -769,7 +792,19 @@ function PageViewerFrameContent({ compareView, pageViewContext, editContext, cla
769
792
  requestedTextRangeGeometry: false,
770
793
  });
771
794
  const [showSpinner, setShowSpinner] = useState(false);
795
+ // Collects the canvas highlightings' marks for the overview ruler.
796
+ const [overviewRulerStore] = useState(createOverviewRulerStore);
772
797
  const [iframeSrc, setIframeSrc] = useState();
798
+ // Mirrors iframeSrc for the render effect, which must read the last
799
+ // requested canvas URL without re-running on it. The iframe's `src`
800
+ // attribute no longer tracks it: later loads go through location.replace()
801
+ // (see navigateCanvasFrame), so the attribute keeps the first URL.
802
+ const requestedIframeSrcRef = useRef(undefined);
803
+ // The full iframe load that has been requested but whose bridge has not
804
+ // connected yet. The render effect consults it so a pre-bridge re-run for the
805
+ // same URL waits for this load instead of issuing a second one (see
806
+ // canvasLoadSettling.ts). Cleared once the bridge reports ready.
807
+ const inFlightCanvasLoadRef = useRef(null);
773
808
  const [loadedIframeSrc, setLoadedIframeSrc] = useState();
774
809
  const [scroll, setScroll] = useState(0);
775
810
  const [showMiniMap, setShowMiniMap] = useState(false);
@@ -788,6 +823,13 @@ function PageViewerFrameContent({ compareView, pageViewContext, editContext, cla
788
823
  iframeRef.current = node;
789
824
  setIframeElement(node);
790
825
  }, []);
826
+ // Apply the requested canvas URL to the frame. Runs again for a remounted
827
+ // iframe element so a fresh frame picks up the current URL.
828
+ useEffect(() => {
829
+ if (!iframeElement || !iframeSrc)
830
+ return;
831
+ navigateCanvasFrame(iframeElement, iframeSrc);
832
+ }, [iframeElement, iframeSrc]);
791
833
  // Clear preSelectedAction when overlay is closed
792
834
  useEffect(() => {
793
835
  if (editContext?.currentOverlay !==
@@ -795,8 +837,47 @@ function PageViewerFrameContent({ compareView, pageViewContext, editContext, cla
795
837
  setPreSelectedAction(undefined);
796
838
  }
797
839
  }, [editContext?.currentOverlay, contextMenuField?.fieldId]);
798
- const zoom = pageViewContext.zoom;
799
840
  const [currentItemDescriptor, setCurrentItemDescriptor] = useState(undefined);
841
+ // The iframe, and with it the scroll position, goes away with this frame.
842
+ // A layout switch (fullscreen on/off) mounts a new frame for the same page
843
+ // right away; hand it the scroll so the page does not jump back to the top.
844
+ const loadedItemDescriptorRef = useRef(undefined);
845
+ useLayoutEffect(() => {
846
+ loadedItemDescriptorRef.current = currentItemDescriptor;
847
+ }, [currentItemDescriptor]);
848
+ useLayoutEffect(() => () => {
849
+ const loadedItemDescriptor = loadedItemDescriptorRef.current;
850
+ const unmountingContextId = pageViewContextRef.current?.debugId;
851
+ if (!loadedItemDescriptor) {
852
+ logFieldValueDiagnostic("canvas-load", `frame unmount ctx=${unmountingContextId} no handoff: no page loaded`);
853
+ return;
854
+ }
855
+ // Layout cleanups run before React detaches the iframe, so the live
856
+ // window scroll is still readable for same-origin hosts.
857
+ const windowScroll = getIframeWindowScroll(iframeRef.current);
858
+ const scroll = windowScroll ?? latestBridgeScrollRef.current;
859
+ if (!scroll) {
860
+ logFieldValueDiagnostic("canvas-load", `frame unmount ctx=${unmountingContextId} no handoff: no scroll known`);
861
+ return;
862
+ }
863
+ let anchor;
864
+ const geometry = pageViewContextRef.current?.getState().bridgeGeometry;
865
+ const selection = editContextRef.current?.getSelection() ?? [];
866
+ const selectedComponentId = selection[selection.length - 1];
867
+ const bounds = selectedComponentId
868
+ ? findBridgeComponentDocumentBounds(geometry, selectedComponentId)
869
+ : undefined;
870
+ if (geometry && selectedComponentId && bounds) {
871
+ const viewportTop = bounds.y - scroll.y * getBridgeGeometryScrollScale(geometry);
872
+ // Only a component the user can see anchors the view.
873
+ if (viewportTop < geometry.viewport.height &&
874
+ viewportTop + bounds.height > 0) {
875
+ anchor = { componentId: selectedComponentId, viewportTop };
876
+ }
877
+ }
878
+ logFieldValueDiagnostic("canvas-load", `frame unmount ctx=${unmountingContextId} handoff y=${scroll.y} from=${windowScroll ? "window" : "bridge"} anchor=${anchor?.componentId ?? "none"}`);
879
+ stashCanvasScrollHandoff(getCanvasScrollHandoffKey(loadedItemDescriptor), { scroll, anchor });
880
+ }, []);
800
881
  // Field action handlers for the overlay
801
882
  const handleActionClick = async (action, event) => {
802
883
  if (contextMenuField) {
@@ -810,7 +891,6 @@ function PageViewerFrameContent({ compareView, pageViewContext, editContext, cla
810
891
  };
811
892
  // Note: handleParameterizedActionFromContextMenu is now created inline in handleContextMenu
812
893
  // to avoid React state timing issues with contextMenuPosition
813
- const pageItemDescriptor = pageViewContext.pageItemDescriptor;
814
894
  const shouldTrackMinimapScroll = useCallback(() => {
815
895
  const editor = editContextRef.current;
816
896
  return !!(showMiniMap &&
@@ -822,9 +902,7 @@ function PageViewerFrameContent({ compareView, pageViewContext, editContext, cla
822
902
  if (!shouldTrackMinimapScroll())
823
903
  return;
824
904
  setScroll(e);
825
- if (!compareView)
826
- pageViewContextRef.current?.setScroll(e);
827
- }, [compareView, shouldTrackMinimapScroll]);
905
+ }, [shouldTrackMinimapScroll]);
828
906
  const scrollHandler = useThrottledCallback(updateScrollPosition, 100);
829
907
  const scrollHandlerRef = useRef(scrollHandler);
830
908
  useEffect(() => {
@@ -840,14 +918,13 @@ function PageViewerFrameContent({ compareView, pageViewContext, editContext, cla
840
918
  }, []);
841
919
  const projectCurrentBridgeGeometryToScroll = useCallback((scroll) => {
842
920
  const activeContext = pageViewContextRef.current;
843
- const currentGeometry = activeContext?.bridgeGeometry;
921
+ const currentGeometry = activeContext?.getState().bridgeGeometry;
844
922
  const projectedGeometry = projectBridgeGeometryToScroll(currentGeometry, scroll);
845
923
  if (!activeContext ||
846
924
  !projectedGeometry ||
847
925
  projectedGeometry === currentGeometry) {
848
926
  return;
849
927
  }
850
- activeContext.bridgeGeometry = projectedGeometry;
851
928
  activeContext.setBridgeGeometry(projectedGeometry);
852
929
  scheduleBridgeGeometryRevision();
853
930
  }, [scheduleBridgeGeometryRevision]);
@@ -959,11 +1036,13 @@ function PageViewerFrameContent({ compareView, pageViewContext, editContext, cla
959
1036
  });
960
1037
  if (!previewScope.onlySuggestionId)
961
1038
  return;
962
- const structureField = pageViewContextRef.current?.bridgeStructure?.fields.find((candidate) => candidate.elementKey === elementKey);
1039
+ const structureField = pageViewContextRef.current
1040
+ ?.getState()
1041
+ .bridgeStructure?.fields.find((candidate) => candidate.elementKey === elementKey);
963
1042
  if (!structureField)
964
1043
  return;
965
- const fallbackItem = pageViewContextRef.current?.pageItemDescriptor ??
966
- pageViewContextRef.current?.page?.item?.descriptor;
1044
+ const fallbackItem = pageViewContextRef.current?.getState().pageItemDescriptor ??
1045
+ pageViewContextRef.current?.getState().page?.item?.descriptor;
967
1046
  const bridgeItem = structureField.item;
968
1047
  const itemDescriptor = {
969
1048
  id: bridgeItem?.id ?? fallbackItem?.id,
@@ -986,9 +1065,9 @@ function PageViewerFrameContent({ compareView, pageViewContext, editContext, cla
986
1065
  itemId: itemDescriptor.id,
987
1066
  language: itemDescriptor.language,
988
1067
  version: itemDescriptor.version,
989
- pageItemId: pageViewContextRef.current?.pageItemDescriptor?.id,
990
- pageItemLanguage: pageViewContextRef.current?.pageItemDescriptor?.language,
991
- pageItemVersion: pageViewContextRef.current?.pageItemDescriptor?.version,
1068
+ pageItemId: pageViewContextRef.current?.getState().pageItemDescriptor?.id,
1069
+ pageItemLanguage: pageViewContextRef.current?.getState().pageItemDescriptor?.language,
1070
+ pageItemVersion: pageViewContextRef.current?.getState().pageItemDescriptor?.version,
992
1071
  };
993
1072
  if (!previewScopeCoversField(previewScope, editor.suggestedEdits, suggestionField)) {
994
1073
  return;
@@ -1188,16 +1267,17 @@ function PageViewerFrameContent({ compareView, pageViewContext, editContext, cla
1188
1267
  repositoryValue,
1189
1268
  modifiedFields: preferRepositoryValue
1190
1269
  ? undefined
1191
- : fieldsContext?.modifiedFields,
1270
+ : (slotContext?.fieldModificationStore.getAllFields() ??
1271
+ fieldsContext?.modifiedFields),
1192
1272
  suggestedEdits: editContext.suggestedEdits,
1193
1273
  field: {
1194
1274
  fieldId: field.id || structureField.fieldId,
1195
1275
  itemId: itemDescriptor.id,
1196
1276
  language: itemDescriptor.language,
1197
1277
  version: itemDescriptor.version,
1198
- pageItemId: pageViewContext.pageItemDescriptor?.id,
1199
- pageItemLanguage: pageViewContext.pageItemDescriptor?.language,
1200
- pageItemVersion: pageViewContext.pageItemDescriptor?.version,
1278
+ pageItemId: pageItemDescriptor?.id,
1279
+ pageItemLanguage: pageItemDescriptor?.language,
1280
+ pageItemVersion: pageItemDescriptor?.version,
1201
1281
  },
1202
1282
  mode: previewScope.mode,
1203
1283
  onlySuggestionId: previewScope.onlySuggestionId,
@@ -1217,7 +1297,8 @@ function PageViewerFrameContent({ compareView, pageViewContext, editContext, cla
1217
1297
  editContext.suggestedEdits,
1218
1298
  editContext.suggestionVariantSelection,
1219
1299
  fieldsContext?.modifiedFields,
1220
- pageViewContext.pageItemDescriptor,
1300
+ slotContext?.fieldModificationStore,
1301
+ pageItemDescriptor,
1221
1302
  ]);
1222
1303
  const buildBridgeFieldPatch = useCallback(({ field, structureField, itemDescriptor, preferRepositoryValue, replaceActiveInlineEdit, }) => {
1223
1304
  const display = getBridgePatchDisplayValue({
@@ -1292,8 +1373,8 @@ function PageViewerFrameContent({ compareView, pageViewContext, editContext, cla
1292
1373
  return;
1293
1374
  }
1294
1375
  const sourceItem = activeField.item ??
1295
- pageViewContextRef.current?.page?.item ??
1296
- pageViewContextRef.current?.pageItemDescriptor;
1376
+ pageViewContextRef.current?.getState().page?.item ??
1377
+ pageViewContextRef.current?.getState().pageItemDescriptor;
1297
1378
  const version = typeof sourceItem?.version === "number" &&
1298
1379
  Number.isFinite(sourceItem.version)
1299
1380
  ? sourceItem.version
@@ -1325,30 +1406,34 @@ function PageViewerFrameContent({ compareView, pageViewContext, editContext, cla
1325
1406
  });
1326
1407
  lastSentBridgeCaretRef.current = nextKey;
1327
1408
  }, [clearBridgeRemoteCaretPosition, editContextRef, pageViewContextRef]);
1409
+ // Subscribed, not rendered: carets move on every keystroke of every session.
1410
+ const remoteCaretsStore = editContext.remoteCaretsStore;
1328
1411
  useEffect(() => {
1329
- const bridge = bridgeClientRef.current;
1330
- const structureFields = pageViewContext.bridgeStructure?.fields ?? [];
1331
- if (!bridge || structureFields.length === 0)
1412
+ if (!remoteCaretsStore)
1332
1413
  return;
1333
- const patches = buildRemoteCaretFieldPatches({
1334
- remoteCarets: editContext.remoteCarets,
1335
- structureFields,
1336
- activeInlineEdit: activeBridgeInlineEditRef.current,
1337
- });
1338
- // Keep the host informed about the complete live-draft set. Unlike an
1339
- // ordinary field patch, this state survives host-app/React renders: the
1340
- // bridge reapplies these values in its mutation observer before other
1341
- // observers can see stale server markup.
1342
- bridge.sendCommand("syncRemoteFieldDrafts", { drafts: patches });
1343
- for (const patch of patches) {
1344
- const structureField = structureFields.find((field) => field.elementKey === patch.elementKey);
1345
- sendBridgeFieldPatch(bridge, patch, structureField?.textContent);
1346
- }
1347
- }, [
1348
- editContext.remoteCarets,
1349
- pageViewContext.bridgeStructure,
1350
- sendBridgeFieldPatch,
1351
- ]);
1414
+ const syncRemoteFieldDrafts = () => {
1415
+ const bridge = bridgeClientRef.current;
1416
+ const structureFields = bridgeStructure?.fields ?? [];
1417
+ if (!bridge || structureFields.length === 0)
1418
+ return;
1419
+ const patches = buildRemoteCaretFieldPatches({
1420
+ remoteCarets: remoteCaretsStore.get(),
1421
+ structureFields,
1422
+ activeInlineEdit: activeBridgeInlineEditRef.current,
1423
+ });
1424
+ // Keep the host informed about the complete live-draft set. Unlike an
1425
+ // ordinary field patch, this state survives host-app/React renders: the
1426
+ // bridge reapplies these values in its mutation observer before other
1427
+ // observers can see stale server markup.
1428
+ bridge.sendCommand("syncRemoteFieldDrafts", { drafts: patches });
1429
+ for (const patch of patches) {
1430
+ const structureField = structureFields.find((field) => field.elementKey === patch.elementKey);
1431
+ sendBridgeFieldPatch(bridge, patch, structureField?.textContent);
1432
+ }
1433
+ };
1434
+ syncRemoteFieldDrafts();
1435
+ return remoteCaretsStore.subscribe(syncRemoteFieldDrafts);
1436
+ }, [remoteCaretsStore, bridgeStructure, sendBridgeFieldPatch]);
1352
1437
  const handleBridgeSelection = useCallback((selection, iframe) => {
1353
1438
  const editor = editContextRef.current;
1354
1439
  if (!editor)
@@ -1376,8 +1461,8 @@ function PageViewerFrameContent({ compareView, pageViewContext, editContext, cla
1376
1461
  }
1377
1462
  clearBridgeRemoteCaretPosition();
1378
1463
  const item = selection.activeField.item ??
1379
- pageViewContextRef.current?.page?.item ??
1380
- pageViewContextRef.current?.pageItemDescriptor;
1464
+ pageViewContextRef.current?.getState().page?.item ??
1465
+ pageViewContextRef.current?.getState().pageItemDescriptor;
1381
1466
  if (!item?.id) {
1382
1467
  editor.setSelectedRange(undefined);
1383
1468
  return;
@@ -1418,7 +1503,7 @@ function PageViewerFrameContent({ compareView, pageViewContext, editContext, cla
1418
1503
  editor.setSelectedRange(nextRange);
1419
1504
  }, [clearBridgeRemoteCaretPosition, sendBridgeRemoteCaretPosition]);
1420
1505
  const resolveBridgeFieldDescriptor = useCallback(async (interaction) => {
1421
- const pageView = pageViewContextRef.current;
1506
+ const pageView = pageViewContextRef.current?.getState();
1422
1507
  const selectedRange = editContextRef.current?.selectedRange;
1423
1508
  const selectedRangeElementKey = selectedRange?.elementKey;
1424
1509
  const selectedRangeMatchesInteraction = !!((interaction.kind === "contextMenu" ||
@@ -1544,7 +1629,7 @@ function PageViewerFrameContent({ compareView, pageViewContext, editContext, cla
1544
1629
  clearBridgeTextCompletion();
1545
1630
  return;
1546
1631
  }
1547
- const bridgeSelection = latestBridgeSelectionRef.current;
1632
+ const bridgeSelection = pageViewContextRef.current?.getState().bridgeSelection;
1548
1633
  const selectionMatches = bridgeSelectionMatchesInteraction(bridgeSelection, interaction);
1549
1634
  const activeField = selectionMatches
1550
1635
  ? bridgeSelection?.activeField
@@ -1688,6 +1773,9 @@ function PageViewerFrameContent({ compareView, pageViewContext, editContext, cla
1688
1773
  sendTextCompletionCommand,
1689
1774
  ]);
1690
1775
  const handleBridgeInteraction = useCallback(async (interaction, iframe) => {
1776
+ if (interaction.kind === "click" && interaction.fieldId) {
1777
+ logFieldValueDiagnostic("bridge-inline", `interaction click field=${interaction.fieldId} element=${interaction.elementKey ?? "none"} component=${interaction.componentId ?? "none"}`);
1778
+ }
1691
1779
  if (interaction.kind === "wheel") {
1692
1780
  if (!interaction.ctrlKey && !interaction.metaKey)
1693
1781
  return;
@@ -1752,10 +1840,10 @@ function PageViewerFrameContent({ compareView, pageViewContext, editContext, cla
1752
1840
  const editor = editContextRef.current;
1753
1841
  let linkRange = editor?.selectedRange;
1754
1842
  if (!isBridgeLinkShortcutRange(linkRange, interaction)) {
1755
- const bridgeSelection = latestBridgeSelectionRef.current;
1843
+ const bridgeSelection = pageViewContextRef.current?.getState().bridgeSelection;
1756
1844
  const item = bridgeSelection?.activeField?.item ??
1757
- pageViewContextRef.current?.page?.item ??
1758
- pageViewContextRef.current?.pageItemDescriptor;
1845
+ pageViewContextRef.current?.getState().page?.item ??
1846
+ pageViewContextRef.current?.getState().pageItemDescriptor;
1759
1847
  if (bridgeSelection &&
1760
1848
  !bridgeSelection.collapsed &&
1761
1849
  bridgeSelection.text?.trim() &&
@@ -1823,16 +1911,16 @@ function PageViewerFrameContent({ compareView, pageViewContext, editContext, cla
1823
1911
  const editor = editContextRef.current;
1824
1912
  const field = await resolveBridgeFieldDescriptor(interaction);
1825
1913
  if (editor && field) {
1826
- await editor.setFocusedField(field, editor.mode !== "suggestions");
1914
+ await fieldsContextRef.current?.setFocusedField(field, editor.mode !== "suggestions");
1827
1915
  }
1828
1916
  const iframeRect = iframe.getBoundingClientRect();
1829
- const bridgeSelection = latestBridgeSelectionRef.current;
1917
+ const bridgeSelection = pageViewContextRef.current?.getState().bridgeSelection;
1830
1918
  const commandRange = resolveBridgeInlineAiSelectionRange({
1831
1919
  interaction,
1832
1920
  bridgeSelection,
1833
1921
  iframeRect,
1834
- fallbackItem: pageViewContextRef.current?.page?.item ??
1835
- pageViewContextRef.current?.pageItemDescriptor,
1922
+ fallbackItem: pageViewContextRef.current?.getState().page?.item ??
1923
+ pageViewContextRef.current?.getState().pageItemDescriptor,
1836
1924
  });
1837
1925
  const fallbackCaretRect = !interaction.selectionRect &&
1838
1926
  !interaction.caretRect &&
@@ -1956,8 +2044,8 @@ function PageViewerFrameContent({ compareView, pageViewContext, editContext, cla
1956
2044
  structuredFieldValue,
1957
2045
  anchorIndex: interaction.link.anchorIndex,
1958
2046
  });
1959
- const sourceItem = pageViewContextRef.current?.page?.item ??
1960
- pageViewContextRef.current?.pageItemDescriptor ??
2047
+ const sourceItem = pageViewContextRef.current?.getState().page?.item ??
2048
+ pageViewContextRef.current?.getState().pageItemDescriptor ??
1961
2049
  interaction.item;
1962
2050
  if (!targetItemId &&
1963
2051
  canvasLinkHash &&
@@ -1968,7 +2056,7 @@ function PageViewerFrameContent({ compareView, pageViewContext, editContext, cla
1968
2056
  if (!targetItemId && sourceItem) {
1969
2057
  const linkPath = extractInternalLinkPath(interaction.link.href, window.location.href);
1970
2058
  if (linkPath) {
1971
- const resolvedPage = await resolvePageAndSiteByPath(linkPath, sourceItem.language ?? "en", pageViewContextRef.current?.site?.name);
2059
+ const resolvedPage = await resolvePageAndSiteByPath(linkPath, sourceItem.language ?? "en", pageViewContextRef.current?.getState().site?.name);
1972
2060
  targetItemId = resolvedPage?.pageItem.id;
1973
2061
  }
1974
2062
  }
@@ -2028,7 +2116,7 @@ function PageViewerFrameContent({ compareView, pageViewContext, editContext, cla
2028
2116
  !interaction.fieldId &&
2029
2117
  interaction.clientX !== undefined &&
2030
2118
  interaction.clientY !== undefined) {
2031
- const fieldTarget = findBridgeFieldTargetAtPoint(pageViewContextRef.current?.bridgeGeometry, interaction.clientX, interaction.clientY);
2119
+ const fieldTarget = findBridgeFieldTargetAtPoint(pageViewContextRef.current?.getState().bridgeGeometry, interaction.clientX, interaction.clientY);
2032
2120
  if (fieldTarget?.fieldId) {
2033
2121
  effectiveInteraction = {
2034
2122
  ...interaction,
@@ -2037,7 +2125,7 @@ function PageViewerFrameContent({ compareView, pageViewContext, editContext, cla
2037
2125
  };
2038
2126
  }
2039
2127
  }
2040
- const componentId = resolveBridgeComponentId(effectiveInteraction.componentId, pageViewContextRef.current?.page);
2128
+ const componentId = resolveBridgeComponentId(effectiveInteraction.componentId, pageViewContextRef.current?.getState().page);
2041
2129
  const isEditableFieldClick = !!(effectiveInteraction.kind === "click" &&
2042
2130
  effectiveInteraction.fieldId &&
2043
2131
  effectiveInteraction.elementKey &&
@@ -2105,7 +2193,7 @@ function PageViewerFrameContent({ compareView, pageViewContext, editContext, cla
2105
2193
  const currentSelection = editor.getSelection();
2106
2194
  if (interaction.kind === "contextMenu") {
2107
2195
  if (pageViewContextRef.current) {
2108
- pageViewContextRef.current.bridgeInteraction = effectiveInteraction;
2196
+ pageViewContextRef.current.setBridgeInteraction(effectiveInteraction);
2109
2197
  }
2110
2198
  const selectedIds = currentSelection.includes(componentId)
2111
2199
  ? currentSelection
@@ -2113,7 +2201,7 @@ function PageViewerFrameContent({ compareView, pageViewContext, editContext, cla
2113
2201
  if (!currentSelection.includes(componentId)) {
2114
2202
  selectFromBridgeInteraction(selectedIds);
2115
2203
  }
2116
- const page = pageViewContextRef.current?.page;
2204
+ const page = pageViewContextRef.current?.getState().page;
2117
2205
  if (!page)
2118
2206
  return;
2119
2207
  const selectedComponents = selectedIds
@@ -2189,6 +2277,23 @@ function PageViewerFrameContent({ compareView, pageViewContext, editContext, cla
2189
2277
  }, 100);
2190
2278
  };
2191
2279
  items = await buildComponentContextMenuItems(selectedComponents, editor, field, fieldButtons, handleParameterizedActionWithPosition);
2280
+ // Right-click on an underlined misspelling: suggestions come first.
2281
+ const spellItems = await buildCanvasSpellCheckMenuItems({
2282
+ editor,
2283
+ geometry: pageViewContextRef.current?.getState().bridgeGeometry,
2284
+ clientX: interaction.clientX,
2285
+ clientY: interaction.clientY,
2286
+ enabled: !editor.readonly &&
2287
+ editor.mode === "edit" &&
2288
+ editor.userInfo?.preferences?.spellCheckEnabled !== false,
2289
+ });
2290
+ if (spellItems.length > 0) {
2291
+ items = [
2292
+ ...spellItems,
2293
+ { id: "spellcheck-section-separator", separator: true },
2294
+ ...items,
2295
+ ];
2296
+ }
2192
2297
  }
2193
2298
  catch (error) {
2194
2299
  console.error("Failed to build component context menu:", error);
@@ -2212,7 +2317,7 @@ function PageViewerFrameContent({ compareView, pageViewContext, editContext, cla
2212
2317
  return;
2213
2318
  }
2214
2319
  if (interaction.shiftKey && currentSelection.length > 0) {
2215
- const orderedIds = getOrderedBridgeComponentIds(pageViewContextRef.current?.bridgeGeometry, pageViewContextRef.current?.page);
2320
+ const orderedIds = getOrderedBridgeComponentIds(pageViewContextRef.current?.getState().bridgeGeometry, pageViewContextRef.current?.getState().page);
2216
2321
  const anchorId = currentSelection[currentSelection.length - 1];
2217
2322
  const anchorIndex = orderedIds.findIndex((id) => bridgeIdsMatch(id, anchorId));
2218
2323
  const targetIndex = orderedIds.findIndex((id) => bridgeIdsMatch(id, componentId));
@@ -2248,6 +2353,18 @@ function PageViewerFrameContent({ compareView, pageViewContext, editContext, cla
2248
2353
  return;
2249
2354
  }
2250
2355
  selectFromBridgeInteraction([componentId]);
2356
+ // On a phone the tap also opens the edit form when the component is
2357
+ // already selected: the selection-driven auto-open in the shell only
2358
+ // reacts to changes, and the comments panel may be covering the form.
2359
+ if (interaction.kind === "click" &&
2360
+ shouldOpenMobileFormOnCanvasTap({
2361
+ isMobile: editor.isMobile,
2362
+ workspaceId: editor.workspaceId,
2363
+ mode: editor.mode,
2364
+ hasTarget: true,
2365
+ })) {
2366
+ editor.setMobileEditorPanelOpen(true);
2367
+ }
2251
2368
  if (isEditableFieldClick) {
2252
2369
  clearSelectedRangeForEditableClick();
2253
2370
  beginTrackedBridgeInlineEditAfterSelection(effectiveInteraction);
@@ -2282,7 +2399,7 @@ function PageViewerFrameContent({ compareView, pageViewContext, editContext, cla
2282
2399
  const active = activeBridgePointerDragRef.current;
2283
2400
  if (!active || event.pointerId !== active.pointerId)
2284
2401
  return;
2285
- const projected = projectParentPointerToHost(event.clientX, event.clientY, iframe.getBoundingClientRect(), pageViewContextRef.current?.bridgeGeometry?.viewport);
2402
+ const projected = projectParentPointerToHost(event.clientX, event.clientY, iframe.getBoundingClientRect(), pageViewContextRef.current?.getState().bridgeGeometry?.viewport);
2286
2403
  if (!projected.inside)
2287
2404
  return;
2288
2405
  active.clientX = projected.clientX;
@@ -2301,7 +2418,7 @@ function PageViewerFrameContent({ compareView, pageViewContext, editContext, cla
2301
2418
  if (!active)
2302
2419
  return;
2303
2420
  const rect = iframe.getBoundingClientRect();
2304
- const payload = resolveParentBridgePointerRelease(active, event, rect, pageViewContextRef.current?.bridgeGeometry?.viewport);
2421
+ const payload = resolveParentBridgePointerRelease(active, event, rect, pageViewContextRef.current?.getState().bridgeGeometry?.viewport);
2305
2422
  if (!payload)
2306
2423
  return;
2307
2424
  // Clear before dispatching and before asking the host to clean up. Any
@@ -2358,7 +2475,7 @@ function PageViewerFrameContent({ compareView, pageViewContext, editContext, cla
2358
2475
  lastY = scroll.y;
2359
2476
  latestBridgeScrollRef.current = scroll;
2360
2477
  projectCurrentBridgeGeometryToScroll(scroll);
2361
- dispatchBridgeOverlayScroll(iframe, scroll, getBridgeGeometryScrollScale(pageViewContextRef.current?.bridgeGeometry));
2478
+ dispatchBridgeOverlayScroll(iframe, scroll, getBridgeGeometryScrollScale(pageViewContextRef.current?.getState().bridgeGeometry));
2362
2479
  };
2363
2480
  iframeDocument.addEventListener("scroll", handleScroll, {
2364
2481
  capture: true,
@@ -2391,8 +2508,8 @@ function PageViewerFrameContent({ compareView, pageViewContext, editContext, cla
2391
2508
  return;
2392
2509
  }
2393
2510
  const allowedHostOrigins = [
2394
- getUrlOrigin(pageViewContext.editUrl),
2395
- getUrlOrigin(pageViewContext.previewUrl),
2511
+ getUrlOrigin(editUrl),
2512
+ getUrlOrigin(previewUrl),
2396
2513
  ].filter((origin) => Boolean(origin));
2397
2514
  // The iframe can finish loading before the page-view URLs have propagated
2398
2515
  // into context, and a same-origin host can normalize its live URL after the
@@ -2406,6 +2523,8 @@ function PageViewerFrameContent({ compareView, pageViewContext, editContext, cla
2406
2523
  editorOrigin: window.location.origin,
2407
2524
  allowedHostOrigins,
2408
2525
  onReadyChange: (ready) => {
2526
+ if (ready)
2527
+ inFlightCanvasLoadRef.current = null;
2409
2528
  pageViewContext.setBridgeReady(ready);
2410
2529
  if (!ready)
2411
2530
  pageViewContext.setIframeSupportsRefresh(false);
@@ -2440,6 +2559,7 @@ function PageViewerFrameContent({ compareView, pageViewContext, editContext, cla
2440
2559
  selectedComponentIds: editContextRef.current?.getSelection() ?? [],
2441
2560
  featureFlags: {
2442
2561
  crossOriginBridge: true,
2562
+ pasteCleanupOverlay: true,
2443
2563
  // Lets the host emit its own perf logs + interaction perf
2444
2564
  // timestamps without needing a flag in the iframe's origin.
2445
2565
  perfTrace: isPerfTraceEnabled(),
@@ -2448,7 +2568,7 @@ function PageViewerFrameContent({ compareView, pageViewContext, editContext, cla
2448
2568
  acknowledgedCapabilities: bridge.getAcknowledgedCapabilities(),
2449
2569
  });
2450
2570
  bridge.sendCommand("setZoom", {
2451
- zoom: pageViewContextRef.current?.zoom ?? 1,
2571
+ zoom: pageViewContextRef.current?.getState().zoom ?? 1,
2452
2572
  });
2453
2573
  // Ready confirms the bridge transport, not that its initial
2454
2574
  // mutation-driven geometry snapshot reached the editor. Query the
@@ -2462,8 +2582,12 @@ function PageViewerFrameContent({ compareView, pageViewContext, editContext, cla
2462
2582
  bridge.sendCommand("queryGeometry", {
2463
2583
  textRanges: Array.from(bridgeTextRangeSourcesRef.current.values()).flat(),
2464
2584
  });
2465
- if (pendingRefreshScrollRef.current) {
2466
- restorePendingRefreshScroll(iframe, pendingRefreshScrollRef.current);
2585
+ // With a handed-over anchor, the first geometry decides the
2586
+ // target (see the anchor effect); a relative scrollBy sent now
2587
+ // would add up with the anchor's on cross-origin hosts.
2588
+ if (pendingRefreshScrollRef.current &&
2589
+ !pendingScrollAnchorRef.current) {
2590
+ restorePendingRefreshScroll(iframe, pendingRefreshScrollRef.current, event.payload.scroll);
2467
2591
  }
2468
2592
  break;
2469
2593
  case "structureUpdated":
@@ -2493,7 +2617,7 @@ function PageViewerFrameContent({ compareView, pageViewContext, editContext, cla
2493
2617
  pageViewContext.setPageSkeleton(event.payload.pageSkeleton);
2494
2618
  break;
2495
2619
  case "resizeChanged": {
2496
- const currentGeometry = pageViewContext.bridgeGeometry;
2620
+ const currentGeometry = pageViewContext.getState().bridgeGeometry;
2497
2621
  const viewportChanged = !currentGeometry ||
2498
2622
  currentGeometry.viewport.width !== event.payload.viewport.width ||
2499
2623
  currentGeometry.viewport.height !==
@@ -2508,7 +2632,6 @@ function PageViewerFrameContent({ compareView, pageViewContext, editContext, cla
2508
2632
  // example, when the minimap narrows the canvas). Remove that stale
2509
2633
  // snapshot immediately and request its replacement now, preserving
2510
2634
  // every overlay's registered text-range query.
2511
- pageViewContext.bridgeGeometry = undefined;
2512
2635
  pageViewContext.setBridgeGeometry(undefined);
2513
2636
  scheduleBridgeGeometryRevision();
2514
2637
  bridge.sendCommand("queryGeometry", {
@@ -2532,7 +2655,6 @@ function PageViewerFrameContent({ compareView, pageViewContext, editContext, cla
2532
2655
  : undefined) ?? event.payload.geometry.scroll;
2533
2656
  const geometry = projectBridgeGeometryToScroll(event.payload.geometry, liveScroll) ?? event.payload.geometry;
2534
2657
  latestBridgeScrollRef.current = geometry.scroll;
2535
- pageViewContext.bridgeGeometry = geometry;
2536
2658
  pageViewContext.setBridgeGeometry(geometry);
2537
2659
  scheduleBridgeGeometryRevision();
2538
2660
  dispatchBridgeOverlayScroll(iframe, geometry.scroll, getBridgeGeometryScrollScale(geometry));
@@ -2543,10 +2665,8 @@ function PageViewerFrameContent({ compareView, pageViewContext, editContext, cla
2543
2665
  break;
2544
2666
  }
2545
2667
  case "domUpdated":
2546
- pageViewContext.bridgeDom = event.payload;
2547
2668
  pageViewContext.setBridgeDom(event.payload);
2548
2669
  scheduleBridgeDomRevision();
2549
- window.dispatchEvent(new CustomEvent(BRIDGE_DOM_UPDATED_EVENT));
2550
2670
  break;
2551
2671
  case "refreshStarted":
2552
2672
  hostAppRefreshSawStructureUpdateRef.current = false;
@@ -2589,7 +2709,6 @@ function PageViewerFrameContent({ compareView, pageViewContext, editContext, cla
2589
2709
  : undefined) ?? event.payload.geometry.scroll;
2590
2710
  const geometry = projectBridgeGeometryToScroll(event.payload.geometry, liveScroll) ?? event.payload.geometry;
2591
2711
  latestBridgeScrollRef.current = geometry.scroll;
2592
- pageViewContext.bridgeGeometry = geometry;
2593
2712
  pageViewContext.setBridgeGeometry(geometry);
2594
2713
  scheduleBridgeGeometryRevision();
2595
2714
  dispatchBridgeOverlayScroll(iframe, geometry.scroll, getBridgeGeometryScrollScale(geometry));
@@ -2606,6 +2725,9 @@ function PageViewerFrameContent({ compareView, pageViewContext, editContext, cla
2606
2725
  // The host already replayed a scroll issued during the refresh
2607
2726
  // (e.g. a minimap navigation) — restoring the pre-refresh
2608
2727
  // position now would clobber that newer intent.
2728
+ if (pendingRefreshScrollRef.current) {
2729
+ logFieldValueDiagnostic("canvas-load", `scroll restore ctx=${pageViewContext.debugId} dropped y=${pendingRefreshScrollRef.current.y}: host replayed a newer scroll`);
2730
+ }
2609
2731
  pendingRefreshScrollRef.current = undefined;
2610
2732
  }
2611
2733
  else if (pendingRefreshScrollRef.current) {
@@ -2635,10 +2757,24 @@ function PageViewerFrameContent({ compareView, pageViewContext, editContext, cla
2635
2757
  }
2636
2758
  setShowSpinner(false);
2637
2759
  break;
2760
+ case "pasteCleanupChanged":
2761
+ setPasteCleanupMenu(event.payload.menu);
2762
+ break;
2638
2763
  case "selectionChanged":
2639
- latestBridgeSelectionRef.current = event.payload.selection;
2640
2764
  pageViewContext.setBridgeSelection(event.payload.selection);
2641
2765
  handleBridgeSelection(event.payload.selection, iframe);
2766
+ // Comment target picking: a passage selected on the canvas is
2767
+ // the target once the pointer is released. The composer reads
2768
+ // the selection from the edit context, which the call above
2769
+ // updates with the next render. The formatting menu stays away
2770
+ // from a passage picked this way until the selection changes.
2771
+ releasePickedSelection(event.payload.selection);
2772
+ if (!compareView &&
2773
+ isCanvasPickSelection(event.payload.selection)) {
2774
+ markPickedSelection(event.payload.selection);
2775
+ stopCommentTargetPicking();
2776
+ window.requestAnimationFrame(() => window.requestAnimationFrame(() => editContextRef.current?.addComment()));
2777
+ }
2642
2778
  break;
2643
2779
  case "fieldValueChanged":
2644
2780
  handleBridgeFieldValueChanged(event.payload);
@@ -2679,6 +2815,12 @@ function PageViewerFrameContent({ compareView, pageViewContext, editContext, cla
2679
2815
  transportMs: Date.now() - event.timestamp,
2680
2816
  }, eventAt ?? event.timestamp);
2681
2817
  }
2818
+ // While picking a comment target, clicks, Escape and the context
2819
+ // menu belong to the picker, not to selection or inline editing.
2820
+ if (!compareView &&
2821
+ handleCanvasPickInteraction(event.payload, editContextRef.current, pageViewContextRef.current?.getState().pageItemDescriptor)) {
2822
+ break;
2823
+ }
2682
2824
  setBridgeInteraction(event.payload);
2683
2825
  pageViewContext.setBridgeInteraction(event.payload);
2684
2826
  void handleBridgeInteraction(event.payload, iframe);
@@ -2728,7 +2870,7 @@ function PageViewerFrameContent({ compareView, pageViewContext, editContext, cla
2728
2870
  // late echo of a scroll the overlay already applied; re-dispatching
2729
2871
  // it would briefly drag the overlay back to a stale position.
2730
2872
  if (!directOverlayScrollSyncRef.current) {
2731
- dispatchBridgeOverlayScroll(iframe, event.payload.scroll, getBridgeGeometryScrollScale(pageViewContextRef.current?.bridgeGeometry));
2873
+ dispatchBridgeOverlayScroll(iframe, event.payload.scroll, getBridgeGeometryScrollScale(pageViewContextRef.current?.getState().bridgeGeometry));
2732
2874
  }
2733
2875
  if (shouldTrackMinimapScroll()) {
2734
2876
  scrollHandlerRef.current(event.payload.scroll.y);
@@ -2740,6 +2882,7 @@ function PageViewerFrameContent({ compareView, pageViewContext, editContext, cla
2740
2882
  }
2741
2883
  },
2742
2884
  });
2885
+ setPasteCleanupMenu(undefined);
2743
2886
  bridgeClientRef.current = client;
2744
2887
  pageViewContext.setBridgeReady(false);
2745
2888
  client.connect();
@@ -2767,8 +2910,8 @@ function PageViewerFrameContent({ compareView, pageViewContext, editContext, cla
2767
2910
  clearActiveBridgeInlineEdit,
2768
2911
  bridgeInlineEditSession,
2769
2912
  reconcileActiveBridgeInlineEdit,
2770
- pageViewContext.editUrl,
2771
- pageViewContext.previewUrl,
2913
+ editUrl,
2914
+ previewUrl,
2772
2915
  scheduleBridgeDomRevision,
2773
2916
  scheduleBridgeGeometryRevision,
2774
2917
  shouldTrackMinimapScroll,
@@ -2784,7 +2927,7 @@ function PageViewerFrameContent({ compareView, pageViewContext, editContext, cla
2784
2927
  if (fieldChanges.length === 0)
2785
2928
  return;
2786
2929
  const bridge = bridgeClientRef.current;
2787
- const structure = pageViewContextRef.current?.bridgeStructure;
2930
+ const structure = pageViewContextRef.current?.getState().bridgeStructure;
2788
2931
  if (!bridge || !structure?.fields.length)
2789
2932
  return;
2790
2933
  const processResolvedField = (change, changedFieldId, field) => {
@@ -2792,8 +2935,8 @@ function PageViewerFrameContent({ compareView, pageViewContext, editContext, cla
2792
2935
  return;
2793
2936
  const patchedElementKeys = new Set();
2794
2937
  const patches = [];
2795
- const pageItemDescriptor = pageViewContextRef.current?.pageItemDescriptor ??
2796
- pageViewContextRef.current?.page?.item?.descriptor;
2938
+ const pageItemDescriptor = pageViewContextRef.current?.getState().pageItemDescriptor ??
2939
+ pageViewContextRef.current?.getState().page?.item?.descriptor;
2797
2940
  for (const structureField of structure.fields) {
2798
2941
  if (!structureField.elementKey)
2799
2942
  continue;
@@ -2832,7 +2975,7 @@ function PageViewerFrameContent({ compareView, pageViewContext, editContext, cla
2832
2975
  // stale mid-typing — applying it would roll the canvas text back
2833
2976
  // and make the remote caret jump against the shorter text.
2834
2977
  if (hasRemoteCaretDraftForField({
2835
- remoteCarets: editContextRef.current?.remoteCarets,
2978
+ remoteCarets: editContextRef.current?.remoteCaretsStore?.get(),
2836
2979
  fieldId: structureField.fieldId,
2837
2980
  item: structureField.item,
2838
2981
  })) {
@@ -2860,8 +3003,8 @@ function PageViewerFrameContent({ compareView, pageViewContext, editContext, cla
2860
3003
  };
2861
3004
  const asyncFieldChanges = [];
2862
3005
  for (const change of fieldChanges) {
2863
- const pageItemDescriptor = pageViewContextRef.current?.pageItemDescriptor ??
2864
- pageViewContextRef.current?.page?.item?.descriptor;
3006
+ const pageItemDescriptor = pageViewContextRef.current?.getState().pageItemDescriptor ??
3007
+ pageViewContextRef.current?.getState().page?.item?.descriptor;
2865
3008
  if (!bridgeStructureTargetsChangedItem(structure.fields, change.item, pageItemDescriptor)) {
2866
3009
  continue;
2867
3010
  }
@@ -2924,8 +3067,8 @@ function PageViewerFrameContent({ compareView, pageViewContext, editContext, cla
2924
3067
  ]);
2925
3068
  useEffect(() => {
2926
3069
  const bridge = bridgeClientRef.current;
2927
- const structure = pageViewContext.bridgeStructure;
2928
- if (!pageViewContext.bridgeReady || !bridge || !structure?.fields.length) {
3070
+ const structure = bridgeStructure;
3071
+ if (!bridgeReady || !bridge || !structure?.fields.length) {
2929
3072
  return;
2930
3073
  }
2931
3074
  let disposed = false;
@@ -2938,8 +3081,8 @@ function PageViewerFrameContent({ compareView, pageViewContext, editContext, cla
2938
3081
  continue;
2939
3082
  if (patchedElementKeys.has(structureField.elementKey))
2940
3083
  continue;
2941
- const fallbackItem = pageViewContextRef.current?.pageItemDescriptor ??
2942
- pageViewContextRef.current?.page?.item?.descriptor;
3084
+ const fallbackItem = pageViewContextRef.current?.getState().pageItemDescriptor ??
3085
+ pageViewContextRef.current?.getState().page?.item?.descriptor;
2943
3086
  const bridgeItem = structureField.item;
2944
3087
  const itemDescriptor = {
2945
3088
  id: bridgeItem?.id ?? fallbackItem?.id,
@@ -2964,9 +3107,9 @@ function PageViewerFrameContent({ compareView, pageViewContext, editContext, cla
2964
3107
  itemId: itemDescriptor.id,
2965
3108
  language: itemDescriptor.language,
2966
3109
  version: itemDescriptor.version,
2967
- pageItemId: pageViewContextRef.current?.pageItemDescriptor?.id,
2968
- pageItemLanguage: pageViewContextRef.current?.pageItemDescriptor?.language,
2969
- pageItemVersion: pageViewContextRef.current?.pageItemDescriptor?.version,
3110
+ pageItemId: pageViewContextRef.current?.getState().pageItemDescriptor?.id,
3111
+ pageItemLanguage: pageViewContextRef.current?.getState().pageItemDescriptor?.language,
3112
+ pageItemVersion: pageViewContextRef.current?.getState().pageItemDescriptor?.version,
2970
3113
  };
2971
3114
  // Suggestions mode previews every field with pending suggestions. A
2972
3115
  // selected suggestion card outside that mode previews only its own
@@ -2977,7 +3120,12 @@ function PageViewerFrameContent({ compareView, pageViewContext, editContext, cla
2977
3120
  showSelectedOnPage: editContext.showSelectedSuggestionOnPage,
2978
3121
  }), editContext.suggestedEdits, suggestionField);
2979
3122
  const dirtyModifiedField = findModifiedBridgeField({
2980
- modifiedFields: fieldsContext?.modifiedFields,
3123
+ // Global React snapshots are intentionally deferred by the store.
3124
+ // An undo refresh can finish before that notification: consult the
3125
+ // live store so a formerly dirty value is not patched over the
3126
+ // authoritative server HTML during this window.
3127
+ modifiedFields: slotContext?.fieldModificationStore.getAllFields() ??
3128
+ fieldsContext?.modifiedFields,
2981
3129
  structureField,
2982
3130
  field,
2983
3131
  itemDescriptor: itemDescriptor,
@@ -3023,9 +3171,10 @@ function PageViewerFrameContent({ compareView, pageViewContext, editContext, cla
3023
3171
  editContext.showSelectedSuggestionOnPage,
3024
3172
  editContext.suggestedEdits,
3025
3173
  fieldsContext?.modifiedFields,
3174
+ slotContext?.fieldModificationStore,
3026
3175
  bridgeDomRevision,
3027
- pageViewContext.bridgeReady,
3028
- pageViewContext.bridgeStructure,
3176
+ bridgeReady,
3177
+ bridgeStructure,
3029
3178
  sendBridgeFieldPatch,
3030
3179
  ]);
3031
3180
  useEffect(() => {
@@ -3067,6 +3216,8 @@ function PageViewerFrameContent({ compareView, pageViewContext, editContext, cla
3067
3216
  return (bridgeClientRef.current?.sendCommand("applyRichTextCommand", payload) ??
3068
3217
  false);
3069
3218
  };
3219
+ const requestBridgeRichTextFieldOptions = (payload) => bridgeClientRef.current?.sendCommand("setRichTextFieldOptions", payload) ??
3220
+ false;
3070
3221
  const requestBridgePreviewGap = (payload) => {
3071
3222
  return (bridgeClientRef.current?.sendCommand("previewGap", payload) ?? false);
3072
3223
  };
@@ -3101,6 +3252,8 @@ function PageViewerFrameContent({ compareView, pageViewContext, editContext, cla
3101
3252
  pageViewContext.requestBridgeScrollBy = requestBridgeScrollBy;
3102
3253
  pageViewContext.requestBridgeFieldPatch = sendApplyFieldPatchCommand;
3103
3254
  pageViewContext.requestBridgeRichTextCommand = requestBridgeRichTextCommand;
3255
+ pageViewContext.requestBridgeRichTextFieldOptions =
3256
+ requestBridgeRichTextFieldOptions;
3104
3257
  pageViewContext.requestBridgePreviewGap = requestBridgePreviewGap;
3105
3258
  pageViewContext.requestBridgeCaptureSnapshot = requestBridgeCaptureSnapshot;
3106
3259
  pageViewContext.requestBridgeComponentSnapshot =
@@ -3108,7 +3261,9 @@ function PageViewerFrameContent({ compareView, pageViewContext, editContext, cla
3108
3261
  pageViewContext.requestBridgePageSnapshot = requestBridgePageSnapshot;
3109
3262
  pageViewContext.requestBridgeCancelPointerDrag =
3110
3263
  requestBridgeCancelPointerDrag;
3264
+ pageViewContext.setCanvasAttached(true);
3111
3265
  return () => {
3266
+ pageViewContext.setCanvasAttached(false);
3112
3267
  if (pageViewContext.requestBridgeGeometry === requestBridgeGeometry) {
3113
3268
  pageViewContext.requestBridgeGeometry = undefined;
3114
3269
  }
@@ -3140,6 +3295,10 @@ function PageViewerFrameContent({ compareView, pageViewContext, editContext, cla
3140
3295
  requestBridgeRichTextCommand) {
3141
3296
  pageViewContext.requestBridgeRichTextCommand = undefined;
3142
3297
  }
3298
+ if (pageViewContext.requestBridgeRichTextFieldOptions ===
3299
+ requestBridgeRichTextFieldOptions) {
3300
+ pageViewContext.requestBridgeRichTextFieldOptions = undefined;
3301
+ }
3143
3302
  };
3144
3303
  }, [pageViewContext, sendApplyFieldPatchCommand]);
3145
3304
  useEffect(() => {
@@ -3163,8 +3322,8 @@ function PageViewerFrameContent({ compareView, pageViewContext, editContext, cla
3163
3322
  if (!iframeRef.current)
3164
3323
  return;
3165
3324
  const iframe = iframeRef.current;
3166
- const bridgeGeometry = pageViewContextRef.current?.bridgeGeometry;
3167
- const bridgeDom = pageViewContextRef.current?.bridgeDom;
3325
+ const bridgeGeometry = pageViewContextRef.current?.getState().bridgeGeometry;
3326
+ const bridgeDom = pageViewContextRef.current?.getState().bridgeDom;
3168
3327
  const contentHeight = bridgeDom?.scrollHeight ??
3169
3328
  getBridgeGeometryDocumentSize(bridgeGeometry)?.height;
3170
3329
  const contentWidth = bridgeDom?.viewport.width ?? bridgeGeometry?.viewport.width;
@@ -3212,18 +3371,38 @@ function PageViewerFrameContent({ compareView, pageViewContext, editContext, cla
3212
3371
  ? pickVersionAtDate(editContext.itemVersions, editContext.previewDate)
3213
3372
  ?.version
3214
3373
  : undefined;
3374
+ // The page's dynamic renderings, read from the preview canvas, for the strip
3375
+ // that lists them for review and approval (never in compare panes). Client
3376
+ // code that is not approved runs only in the review dialog's sealed frame;
3377
+ // the canvas itself always stays the canvas.
3378
+ const interactivePreviewPage = pageItemDescriptor
3379
+ ? {
3380
+ id: pageItemDescriptor.id,
3381
+ language: pageItemDescriptor.language,
3382
+ version: previewDateVersion ?? pageItemDescriptor.version,
3383
+ }
3384
+ : undefined;
3385
+ const interactivePreview = useInteractivePreview({
3386
+ mode: compareView ? undefined : editContext.mode,
3387
+ page: interactivePreviewPage,
3388
+ });
3389
+ const { setHint: setCanvasRenderings } = interactivePreview;
3390
+ // The latest preview canvas URL (without its edit_rev nonce); the review
3391
+ // dialog's sealed frame loads the page with its query.
3392
+ const previewCanvasUrlRef = useRef(undefined);
3393
+ const getPreviewCanvasUrl = useCallback(() => previewCanvasUrlRef.current, []);
3215
3394
  useEffect(() => {
3216
- if (!pageItemDescriptor ||
3217
- !pageViewContext.editUrl ||
3218
- !pageViewContext.previewUrl)
3395
+ if (!pageItemDescriptor || !editUrl || !previewUrl) {
3396
+ if (!requestedIframeSrcRef.current) {
3397
+ logFieldValueDiagnostic("canvas-load", `frame waiting ctx=${pageViewContext.debugId} compare=${!!compareView} descriptor=${pageItemDescriptor ? `${pageItemDescriptor.id}/v${pageItemDescriptor.version}` : "none"} editUrl=${editUrl ? "yes" : "no"} previewUrl=${previewUrl ? "yes" : "no"}`);
3398
+ }
3219
3399
  return;
3220
- const urlPath = editContext.mode === "preview"
3221
- ? pageViewContext.previewUrl
3222
- : pageViewContext.editUrl;
3400
+ }
3401
+ const urlPath = editContext.mode === "preview" ? previewUrl : editUrl;
3223
3402
  const renderUrl = new URL(urlPath, window.location.origin);
3224
3403
  alignLoopbackHostToEditor(renderUrl);
3225
3404
  alignXmCloudManagedEditingHostToEditor(renderUrl);
3226
- applyParheliaRenderContext(renderUrl, pageItemDescriptor, getEditorQueryParam("site") || pageViewContext.site?.name);
3405
+ applyParheliaRenderContext(renderUrl, pageItemDescriptor, getEditorQueryParam("site") || siteName);
3227
3406
  const editRev = uuid();
3228
3407
  renderUrl.searchParams.set("edit_rev", editRev);
3229
3408
  if (editContext.mode !== "preview" && editContext.sessionId) {
@@ -3261,7 +3440,7 @@ function PageViewerFrameContent({ compareView, pageViewContext, editContext, cla
3261
3440
  }
3262
3441
  // Detect if the version in the URL changed - this requires a full reload, not just requestRefresh
3263
3442
  // because Next.js router.replace may not properly refetch server data for version changes.
3264
- const currentIframeUrl = iframeRef.current?.src;
3443
+ const currentIframeUrl = requestedIframeSrcRef.current ?? iframeRef.current?.src;
3265
3444
  const currentIframeOrigin = getUrlOrigin(currentIframeUrl);
3266
3445
  const renderUrlIsCrossOrigin = renderUrl.origin !== window.location.origin;
3267
3446
  const iframeOriginChanged = !!(currentIframeOrigin && currentIframeOrigin !== renderUrl.origin);
@@ -3282,6 +3461,7 @@ function PageViewerFrameContent({ compareView, pageViewContext, editContext, cla
3282
3461
  const initialLoad = currentItemDescriptor?.id !== pageItemDescriptor.id ||
3283
3462
  currentItemDescriptor?.language !== pageItemDescriptor.language ||
3284
3463
  currentItemDescriptor?.version !== pageItemDescriptor.version;
3464
+ const scrollHandoffKey = getCanvasScrollHandoffKey(pageItemDescriptor);
3285
3465
  // A user-requested hard refresh: skip the incremental path entirely. It is
3286
3466
  // the escape hatch for the case where the bridge patch is what produced the
3287
3467
  // wrong DOM, so routing it through the bridge again would repeat the fault.
@@ -3295,6 +3475,9 @@ function PageViewerFrameContent({ compareView, pageViewContext, editContext, cla
3295
3475
  const modeChanged = previousRenderMode !== editContext.mode;
3296
3476
  const previewRenderBoundaryChanged = crossesPreviewRenderBoundary(previousRenderMode, editContext.mode);
3297
3477
  lastRenderModeRef.current = editContext.mode;
3478
+ if (editContext.mode === "preview") {
3479
+ previewCanvasUrlRef.current = signatureUrl.toString();
3480
+ }
3298
3481
  const shouldUseIframeSrcReload = initialLoad ||
3299
3482
  iframeOriginChanged ||
3300
3483
  fullReloadRequested ||
@@ -3304,7 +3487,8 @@ function PageViewerFrameContent({ compareView, pageViewContext, editContext, cla
3304
3487
  // mode change. Mode is delivered by setEditorMode and cannot change the
3305
3488
  // server-rendered URL/revision; reloading during a transient bridge
3306
3489
  // disconnect would needlessly reset iframe scroll. Before the first bridge
3307
- // connection, identical non-mode re-runs still use the recovery path.
3490
+ // connection, identical non-mode re-runs still use the recovery path -
3491
+ // deferred while the load they duplicate is settling (see below).
3308
3492
  if (!shouldUseIframeSrcReload &&
3309
3493
  !versionChanged &&
3310
3494
  lastRenderSignatureRef.current === renderSignature &&
@@ -3320,12 +3504,29 @@ function PageViewerFrameContent({ compareView, pageViewContext, editContext, cla
3320
3504
  // its own landing position. Restoring the previous page's scroll on
3321
3505
  // ready would yank the canvas off that spot.
3322
3506
  pendingRefreshScrollRef.current = undefined;
3507
+ pendingScrollAnchorRef.current = undefined;
3323
3508
  }
3324
3509
  else if (!pendingRefreshScrollRef.current) {
3510
+ // This frame's first load continues where a frame that just unmounted
3511
+ // for the same page (layout switch) left off.
3512
+ const handoff = currentItemDescriptor === undefined
3513
+ ? takeCanvasScrollHandoff(scrollHandoffKey)
3514
+ : undefined;
3515
+ if (handoff) {
3516
+ // The page view context outlives the frame: its geometry still
3517
+ // describes the previous layout, and must not position the anchor
3518
+ // (or be projected onto this document's first scroll).
3519
+ pageViewContext.setBridgeGeometry(undefined);
3520
+ }
3521
+ pendingScrollAnchorRef.current = handoff?.anchor;
3325
3522
  pendingRefreshScrollRef.current =
3326
- getIframeWindowScroll(iframeRef.current) ??
3523
+ handoff?.scroll ??
3524
+ getIframeWindowScroll(iframeRef.current) ??
3327
3525
  latestBridgeScrollRef.current;
3328
3526
  pendingRefreshScrollCapturedAtRef.current = Date.now();
3527
+ if (currentItemDescriptor === undefined) {
3528
+ logFieldValueDiagnostic("canvas-load", `frame handoff ctx=${pageViewContext.debugId} taken=${handoff ? `y=${handoff.scroll.y}` : "none"} target=${pendingRefreshScrollRef.current ? `y=${pendingRefreshScrollRef.current.y}` : "none"}`);
3529
+ }
3329
3530
  }
3330
3531
  canvasRefreshInFlightSinceRef.current = Date.now();
3331
3532
  awaitingHostAppRefreshRenderRef.current = false;
@@ -3340,6 +3541,7 @@ function PageViewerFrameContent({ compareView, pageViewContext, editContext, cla
3340
3541
  : fullReloadRequested
3341
3542
  ? "Hard refresh requested - setting iframe src"
3342
3543
  : "Reloading iframe src");
3544
+ logFieldValueDiagnostic("canvas-load", `frame load ctx=${pageViewContext.debugId} compare=${!!compareView} page=${pageItemDescriptor?.id}/v${pageItemDescriptor?.version} initial=${initialLoad}`);
3343
3545
  setLoadedIframeSrc(undefined);
3344
3546
  // A canvas link navigation may carry a #anchor; the browser scrolls the
3345
3547
  // freshly loaded document to it natively.
@@ -3347,6 +3549,12 @@ function PageViewerFrameContent({ compareView, pageViewContext, editContext, cla
3347
3549
  renderUrl.hash = pendingCanvasAnchorRef.current;
3348
3550
  pendingCanvasAnchorRef.current = undefined;
3349
3551
  }
3552
+ requestedIframeSrcRef.current = renderUrl.toString();
3553
+ inFlightCanvasLoadRef.current = {
3554
+ signatureUrl: signatureUrl.toString(),
3555
+ requestedSrc: renderUrl.toString(),
3556
+ startedAt: Date.now(),
3557
+ };
3350
3558
  setIframeSrc(renderUrl.toString());
3351
3559
  }
3352
3560
  function runBridgeRefresh() {
@@ -3387,11 +3595,52 @@ function PageViewerFrameContent({ compareView, pageViewContext, editContext, cla
3387
3595
  }
3388
3596
  else {
3389
3597
  const retryDelayMs = 150;
3390
- const retryTimer = setTimeout(() => {
3391
- runBridgeRefresh();
3392
- }, retryDelayMs);
3598
+ const signatureUrlString = signatureUrl.toString();
3599
+ // No bridge yet. When the full load for this same URL is still
3600
+ // settling - the usual page open: the revision arrives or a dependency
3601
+ // changes identity right after src was set, before the bridge
3602
+ // handshake - the recovery path would issue a second full load that
3603
+ // differs only by its edit_rev nonce. Poll until that load settles
3604
+ // instead: a ready bridge either already covers this signature or
3605
+ // applies it incrementally, and a load that never yields a bridge
3606
+ // still gets the recovery reload. Outside that window the single
3607
+ // retry keeps the pre-bridge recovery behaviour unchanged.
3608
+ const deferToInFlightLoad = isCanvasLoadSettling(inFlightCanvasLoadRef.current, signatureUrlString, Date.now());
3609
+ if (deferToInFlightLoad) {
3610
+ console.log("Deferring canvas refresh - initial load in flight");
3611
+ }
3612
+ let retryTimer;
3613
+ const retry = () => {
3614
+ retryTimer = undefined;
3615
+ if (!deferToInFlightLoad) {
3616
+ runBridgeRefresh();
3617
+ return;
3618
+ }
3619
+ const decision = resolveDeferredCanvasRefresh({
3620
+ bridgeSupportsRefresh: !!bridgeClientRef.current?.supportsCapability("refresh"),
3621
+ renderSignature,
3622
+ lastAppliedSignature: lastRenderSignatureRef.current,
3623
+ load: inFlightCanvasLoadRef.current,
3624
+ signatureUrl: signatureUrlString,
3625
+ now: Date.now(),
3626
+ });
3627
+ if (decision === "wait") {
3628
+ retryTimer = setTimeout(retry, retryDelayMs);
3629
+ }
3630
+ else if (decision === "bridge-refresh") {
3631
+ runBridgeRefresh();
3632
+ }
3633
+ else if (decision === "reload") {
3634
+ runFallbackRefresh();
3635
+ }
3636
+ // "skip": the settled load already rendered this signature.
3637
+ };
3638
+ retryTimer = setTimeout(retry, retryDelayMs);
3393
3639
  setCurrentItemDescriptor(pageItemDescriptor);
3394
- return () => clearTimeout(retryTimer);
3640
+ return () => {
3641
+ if (retryTimer !== undefined)
3642
+ clearTimeout(retryTimer);
3643
+ };
3395
3644
  }
3396
3645
  }
3397
3646
  else {
@@ -3403,16 +3652,42 @@ function PageViewerFrameContent({ compareView, pageViewContext, editContext, cla
3403
3652
  editContext.revision,
3404
3653
  editContext.fullReloadToken,
3405
3654
  pageItemDescriptor,
3406
- pageViewContext.editUrl,
3407
- pageViewContext.previewUrl,
3408
- pageViewContext.site?.name,
3409
- pageViewContext.fullscreen,
3655
+ editUrl,
3656
+ previewUrl,
3657
+ siteName,
3658
+ fullscreen,
3410
3659
  editContext.mode,
3411
3660
  editContext.previewDate,
3412
3661
  previewDateVersion,
3413
3662
  editContext.sessionId,
3414
3663
  editContext.layoutMode,
3415
3664
  ]);
3665
+ // The rendering host wraps every dynamic rendering in the canvas document
3666
+ // (same-origin) and, in preview mode, lists those with client code in a
3667
+ // hint. Read them once the canvas has loaded, and again when the host
3668
+ // reports DOM changes. Declared after the render effect: a load that effect
3669
+ // has just requested means the document is outdated. The primary canvas also
3670
+ // records them, in edit mode too, for the publish dialog's approval warning.
3671
+ useEffect(() => {
3672
+ if (!iframeElement ||
3673
+ !loadedIframeSrc ||
3674
+ requestedIframeSrcRef.current !== loadedIframeSrc) {
3675
+ return;
3676
+ }
3677
+ const renderings = readCanvasRenderings(iframeElement);
3678
+ setCanvasRenderings(renderings);
3679
+ if (!compareView && pageItemDescriptor) {
3680
+ recordPageRenderingIds(pageItemDescriptor, renderings.renderingIds);
3681
+ }
3682
+ }, [
3683
+ bridgeDomRevision,
3684
+ compareView,
3685
+ editContext.mode,
3686
+ iframeElement,
3687
+ loadedIframeSrc,
3688
+ pageItemDescriptor,
3689
+ setCanvasRenderings,
3690
+ ]);
3416
3691
  useEffect(() => {
3417
3692
  if (fieldsContext?.focusedField) {
3418
3693
  const focusedField = fieldsContext.focusedField;
@@ -3445,7 +3720,7 @@ function PageViewerFrameContent({ compareView, pageViewContext, editContext, cla
3445
3720
  focusedField.item.id !== currentSelection[0])
3446
3721
  return;
3447
3722
  lastScrolledFocusedFieldKeyRef.current = focusedFieldKey;
3448
- const bounds = findBridgeFieldDocumentBounds(pageViewContextRef.current?.bridgeGeometry, focusedField);
3723
+ const bounds = findBridgeFieldDocumentBounds(pageViewContextRef.current?.getState().bridgeGeometry, focusedField);
3449
3724
  const activePageViewContext = pageViewContextRef.current;
3450
3725
  if (bounds && activePageViewContext) {
3451
3726
  scrollBridgeBoundsIntoView(activePageViewContext, bounds, latestBridgeScrollRef.current);
@@ -3503,15 +3778,33 @@ function PageViewerFrameContent({ compareView, pageViewContext, editContext, cla
3503
3778
  if (isCanvasRefreshInFlight())
3504
3779
  return;
3505
3780
  if (!fieldsContext?.focusedField && canvasSelection.length > 0) {
3506
- const lastSelectedComponent = getComponentById(canvasSelection[canvasSelection.length - 1], pageViewContextRef.current.page);
3781
+ const lastSelectedComponent = getComponentById(canvasSelection[canvasSelection.length - 1], pageViewContextRef.current.getState().page);
3507
3782
  if (lastSelectedComponent) {
3508
3783
  editContext.setScrollIntoView(lastSelectedComponent.id);
3509
3784
  }
3510
3785
  }
3511
3786
  }, [canvasSelection, fieldsContext?.focusedField, isCanvasRefreshInFlight]);
3512
3787
  useEffect(() => {
3513
- if (!editContext.scrollIntoView)
3788
+ // The scroll's text-range query lives only while its request is pending:
3789
+ // once the request is resolved, replaced by a target of another kind or
3790
+ // withdrawn by whoever set it, the range must not stay in the union and
3791
+ // be measured on every geometry, and a later request for the same target
3792
+ // must query afresh.
3793
+ const endScrollIntoViewRequest = () => {
3794
+ const requestState = scrollIntoViewRequestRef.current;
3795
+ requestState.signature = "";
3796
+ requestState.requestedTextRangeGeometry = false;
3797
+ if (bridgeTextRangeSourcesRef.current.has(SCROLL_INTO_VIEW_BRIDGE_SOURCE)) {
3798
+ pageViewContextRef.current?.requestBridgeGeometry?.({
3799
+ source: SCROLL_INTO_VIEW_BRIDGE_SOURCE,
3800
+ textRanges: [],
3801
+ });
3802
+ }
3803
+ };
3804
+ if (!editContext.scrollIntoView) {
3805
+ endScrollIntoViewRequest();
3514
3806
  return;
3807
+ }
3515
3808
  const activePageViewContext = pageViewContextRef.current;
3516
3809
  if (!activePageViewContext)
3517
3810
  return;
@@ -3540,27 +3833,55 @@ function PageViewerFrameContent({ compareView, pageViewContext, editContext, cla
3540
3833
  return;
3541
3834
  }
3542
3835
  }
3543
- const exactBounds = findScrollIntoViewDocumentBounds(activePageViewContext.bridgeGeometry, scrollTarget, { includeTextRangeFallback: false });
3836
+ const bridgeGeometry = activePageViewContext.getState().bridgeGeometry;
3837
+ const exactBounds = findScrollIntoViewDocumentBounds(bridgeGeometry, scrollTarget, { includeTextRangeFallback: false });
3544
3838
  let bounds = exactBounds;
3545
- bounds ??= findScrollIntoViewDocumentBounds(activePageViewContext.bridgeGeometry, scrollTarget, { includeTextRangeFallback: true });
3839
+ bounds ??= findScrollIntoViewDocumentBounds(bridgeGeometry, scrollTarget, {
3840
+ includeTextRangeFallback: true,
3841
+ });
3546
3842
  if (bounds) {
3547
3843
  scrollBridgeBoundsIntoView(activePageViewContext, bounds, latestBridgeScrollRef.current);
3548
3844
  }
3549
- if (isTextRangeScrollTarget(scrollTarget)) {
3550
- activePageViewContext.requestBridgeGeometry?.({
3551
- source: SCROLL_INTO_VIEW_BRIDGE_SOURCE,
3552
- textRanges: [],
3553
- });
3554
- }
3555
- requestState.signature = "";
3556
- requestState.requestedTextRangeGeometry = false;
3845
+ endScrollIntoViewRequest();
3557
3846
  editContext.setScrollIntoView(undefined);
3558
3847
  }, [
3559
3848
  editContext.scrollIntoView,
3560
- pageViewContext.page,
3561
- pageViewContext.bridgeGeometry,
3849
+ page,
3850
+ // Runs again for each geometry the bridge reports (read above).
3851
+ bridgeGeometryRevision,
3562
3852
  isCanvasRefreshInFlight,
3563
3853
  ]);
3854
+ // A layout switch changes the canvas width, so the page reflows and the
3855
+ // handed-over pixel offset alone no longer shows the same content. The first
3856
+ // geometry of the new document puts the selected component back at its
3857
+ // previous distance from the canvas top; without it (component not
3858
+ // rendered), the plain offset is restored.
3859
+ useEffect(() => {
3860
+ const anchor = pendingScrollAnchorRef.current;
3861
+ const geometry = pageViewContext.getState().bridgeGeometry;
3862
+ if (!anchor || !geometry || isCanvasRefreshInFlight())
3863
+ return;
3864
+ pendingScrollAnchorRef.current = undefined;
3865
+ const bounds = findBridgeComponentDocumentBounds(geometry, anchor.componentId);
3866
+ const targetScroll = bounds
3867
+ ? {
3868
+ x: geometry.scroll.x,
3869
+ y: Math.max(0, (bounds.y - anchor.viewportTop) /
3870
+ getBridgeGeometryScrollScale(geometry)),
3871
+ }
3872
+ : pendingRefreshScrollRef.current;
3873
+ logFieldValueDiagnostic("canvas-load", `scroll anchor ctx=${pageViewContext.debugId} component=${anchor.componentId} top=${Math.round(anchor.viewportTop)} bounds=${bounds ? Math.round(bounds.y) : "none"} target=${targetScroll ? `y=${Math.round(targetScroll.y)}` : "none"}`);
3874
+ if (!targetScroll)
3875
+ return;
3876
+ pendingRefreshScrollRef.current = targetScroll;
3877
+ pendingRefreshScrollCapturedAtRef.current = Date.now();
3878
+ restorePendingRefreshScroll(iframeRef.current, targetScroll, geometry.scroll);
3879
+ }, [
3880
+ // Runs again for each geometry the bridge reports (read above).
3881
+ bridgeGeometryRevision,
3882
+ isCanvasRefreshInFlight,
3883
+ restorePendingRefreshScroll,
3884
+ ]);
3564
3885
  useEffect(() => {
3565
3886
  const handleMessage = (message) => {
3566
3887
  if (message.origin !== window.location.origin)
@@ -3583,7 +3904,7 @@ function PageViewerFrameContent({ compareView, pageViewContext, editContext, cla
3583
3904
  return;
3584
3905
  const handleLoad = () => {
3585
3906
  setShowSpinner(false);
3586
- applyIframeZoom(iframe, pageViewContextRef.current?.zoom ?? 1, "PageViewerFrame.tsx:handleLoad-zoom");
3907
+ applyIframeZoom(iframe, pageViewContextRef.current?.getState().zoom ?? 1, "PageViewerFrame.tsx:handleLoad-zoom");
3587
3908
  };
3588
3909
  iframe.addEventListener("load", handleLoad);
3589
3910
  return () => {
@@ -3653,8 +3974,15 @@ function PageViewerFrameContent({ compareView, pageViewContext, editContext, cla
3653
3974
  mode: editContext.mode,
3654
3975
  readOnly: editContext.readonly,
3655
3976
  suggestionsCursorActive: !isBridgeInlineEditing && editContext.mode === "suggestions",
3977
+ commentPickerActive: pickingCommentTarget && !compareView,
3656
3978
  });
3657
- }, [editContext.mode, editContext.readonly, isBridgeInlineEditing]);
3979
+ }, [
3980
+ editContext.mode,
3981
+ editContext.readonly,
3982
+ isBridgeInlineEditing,
3983
+ pickingCommentTarget,
3984
+ compareView,
3985
+ ]);
3658
3986
  useEffect(() => {
3659
3987
  const previousMode = previousBridgeInlineEditModeRef.current;
3660
3988
  previousBridgeInlineEditModeRef.current = editContext.mode;
@@ -3688,7 +4016,7 @@ function PageViewerFrameContent({ compareView, pageViewContext, editContext, cla
3688
4016
  };
3689
4017
  }, [zoom]);
3690
4018
  useEffect(() => {
3691
- if (!pageViewContext.bridgeReady ||
4019
+ if (!bridgeReady ||
3692
4020
  (!editContext.dragObject &&
3693
4021
  !editContext.selectedForInsertion &&
3694
4022
  !editContext.insertMode)) {
@@ -3702,33 +4030,22 @@ function PageViewerFrameContent({ compareView, pageViewContext, editContext, cla
3702
4030
  editContext.dragObject,
3703
4031
  editContext.insertMode,
3704
4032
  editContext.selectedForInsertion,
3705
- pageViewContext.bridgeReady,
4033
+ bridgeReady,
3706
4034
  ]);
4035
+ // A device or size change reflows the page: tell the bridge the zoom again
4036
+ // and measure once the transition settled.
3707
4037
  useEffect(() => {
3708
- let geometryTimer = null;
3709
- const sendViewportStateToBridge = (event) => {
3710
- const detail = event.detail;
3711
- const nextZoom = detail?.zoom ?? pageViewContextRef.current?.zoom ?? zoom;
3712
- bridgeClientRef.current?.sendCommand("setZoom", {
3713
- zoom: nextZoom,
3714
- });
3715
- if (geometryTimer != null) {
3716
- window.clearTimeout(geometryTimer);
3717
- }
3718
- geometryTimer = window.setTimeout(() => {
3719
- geometryTimer = null;
3720
- bridgeClientRef.current?.sendCommand("queryGeometry", {});
3721
- }, ZOOM_TRANSITION_MS + 75);
3722
- };
3723
- window.addEventListener(DEVICE_CHANGE_EVENT, sendViewportStateToBridge);
4038
+ bridgeClientRef.current?.sendCommand("setZoom", {
4039
+ zoom: pageViewContext.getState().zoom,
4040
+ });
4041
+ const geometryTimer = window.setTimeout(() => {
4042
+ bridgeClientRef.current?.sendCommand("queryGeometry", {});
4043
+ }, ZOOM_TRANSITION_MS + 75);
3724
4044
  return () => {
3725
- if (geometryTimer != null) {
3726
- window.clearTimeout(geometryTimer);
3727
- }
3728
- window.removeEventListener(DEVICE_CHANGE_EVENT, sendViewportStateToBridge);
4045
+ window.clearTimeout(geometryTimer);
3729
4046
  };
3730
- }, [zoom]);
3731
- const shouldRenderMiniMap = !pageViewContext.fullscreen &&
4047
+ }, [pageViewContext, device, deviceWidth, deviceHeight]);
4048
+ const shouldRenderMiniMap = !fullscreen &&
3732
4049
  showMiniMap &&
3733
4050
  editContext.showMinimap &&
3734
4051
  !editContext.isMobile &&
@@ -3746,6 +4063,58 @@ function PageViewerFrameContent({ compareView, pageViewContext, editContext, cla
3746
4063
  const miniMapColumnWidth = editContext.configuration.outline.width || 100;
3747
4064
  const reportCompareFrameWidth = slotContext?.reportCompareFrameWidth;
3748
4065
  const miniMapReservedWidth = shouldRenderMiniMap ? miniMapColumnWidth : 0;
4066
+ // The pane's content width decides how wide the comment margin is beside
4067
+ // the canvas. The pane is the splitter panel around this frame, so resizing
4068
+ // the margin inside it does not change the measurement (no flapping).
4069
+ const [frameContainerWidth, setFrameContainerWidth] = useState();
4070
+ useLayoutEffect(() => {
4071
+ const container = frameContainerRef.current;
4072
+ if (!container || typeof ResizeObserver === "undefined")
4073
+ return;
4074
+ const measure = () => {
4075
+ const style = window.getComputedStyle(container);
4076
+ const padding = (parseFloat(style.paddingLeft) || 0) +
4077
+ (parseFloat(style.paddingRight) || 0);
4078
+ const width = container.clientWidth - padding;
4079
+ setFrameContainerWidth((previous) => previous === width ? previous : width);
4080
+ };
4081
+ measure();
4082
+ const observer = new ResizeObserver(measure);
4083
+ observer.observe(container);
4084
+ return () => observer.disconnect();
4085
+ }, []);
4086
+ // The comment margin sits beside the canvas of the primary pane. Compare
4087
+ // panes share one iframe width, so its column counts against the width
4088
+ // this pane reports exactly like the minimap column does.
4089
+ const shouldRenderFeedbackMargin = shouldShowFeedbackMargin({
4090
+ showComments: !!editContext.showComments,
4091
+ compareView,
4092
+ isMobile: !!editContext.isMobile,
4093
+ fullscreen: !!fullscreen,
4094
+ slotActive: slotContext?.isActive ?? true,
4095
+ hasLayout: !!page?.item?.hasLayout,
4096
+ });
4097
+ // Takes the width the user dragged it to (or the rail they dragged it into)
4098
+ // where the pane has room for it; narrows first, then collapses into a
4099
+ // rail; never hidden for lack of room.
4100
+ const feedbackMarginPreferredWidth = useFeedbackMarginPreferredWidth();
4101
+ const feedbackMarginCollapsed = useFeedbackMarginCollapsed();
4102
+ const feedbackMarginRoom = getFeedbackMarginRoom({
4103
+ paneWidth: frameContainerWidth,
4104
+ reservedWidth: miniMapReservedWidth,
4105
+ });
4106
+ const feedbackMarginSize = resolveFeedbackMarginSize({
4107
+ paneWidth: frameContainerWidth,
4108
+ reservedWidth: miniMapReservedWidth,
4109
+ maxWidth: feedbackMarginPreferredWidth,
4110
+ minWidth: FEEDBACK_MARGIN_MIN_WIDTH,
4111
+ railWidth: FEEDBACK_MARGIN_RAIL_WIDTH,
4112
+ collapsed: feedbackMarginCollapsed,
4113
+ });
4114
+ const feedbackMarginReservedWidth = shouldRenderFeedbackMargin
4115
+ ? feedbackMarginSize.width
4116
+ : 0;
4117
+ const overlayInvalidationKey = `${zoom}:${bridgeGeometryRevision}:${feedbackMarginReservedWidth}`;
3749
4118
  useLayoutEffect(() => {
3750
4119
  if (!inCompareMode || !reportCompareFrameWidth)
3751
4120
  return;
@@ -3756,7 +4125,10 @@ function PageViewerFrameContent({ compareView, pageViewContext, editContext, cla
3756
4125
  const style = window.getComputedStyle(container);
3757
4126
  const padding = (parseFloat(style.paddingLeft) || 0) +
3758
4127
  (parseFloat(style.paddingRight) || 0);
3759
- const available = container.clientWidth - padding - miniMapReservedWidth;
4128
+ const available = container.clientWidth -
4129
+ padding -
4130
+ miniMapReservedWidth -
4131
+ feedbackMarginReservedWidth;
3760
4132
  reportCompareFrameWidth(compareFrameView, available > 0 ? available : undefined);
3761
4133
  };
3762
4134
  report();
@@ -3768,6 +4140,7 @@ function PageViewerFrameContent({ compareView, pageViewContext, editContext, cla
3768
4140
  reportCompareFrameWidth,
3769
4141
  compareFrameView,
3770
4142
  miniMapReservedWidth,
4143
+ feedbackMarginReservedWidth,
3771
4144
  ]);
3772
4145
  // Withdraw this pane's report only on unmount, so a minimap toggle or a
3773
4146
  // resize does not briefly drop the other pane back to full width.
@@ -3775,34 +4148,42 @@ function PageViewerFrameContent({ compareView, pageViewContext, editContext, cla
3775
4148
  return () => reportCompareFrameWidth?.(compareFrameView, undefined);
3776
4149
  }, [reportCompareFrameWidth, compareFrameView]);
3777
4150
  const sharedCompareFrameWidth = useSyncExternalStore(slotContext?.subscribeCompareFrameWidth ?? subscribeToNothing, slotContext?.getCompareFrameWidth ?? getUndefined, getUndefined);
3778
- if (pageViewContext.page?.item && !pageViewContext.page?.item.hasLayout) {
4151
+ if (page?.item && !page.item.hasLayout) {
3779
4152
  return _jsx(NoLayout, {});
3780
4153
  }
3781
- const isResponsiveDevice = pageViewContext.device === "desktop" ||
3782
- pageViewContext.device === "Responsive";
3783
- const deviceHeight = pageViewContext.device === "desktop" || !pageViewContext.deviceHeight
3784
- ? "100%"
3785
- : pageViewContext.deviceHeight || 640;
4154
+ const isResponsiveDevice = device === "desktop" || device === "Responsive";
4155
+ const frameHeight = device === "desktop" || !deviceHeight ? "100%" : deviceHeight || 640;
3786
4156
  const compareFrameWidth = inCompareMode ? sharedCompareFrameWidth : undefined;
3787
- const deviceWidth = isResponsiveDevice
4157
+ const frameWidth = isResponsiveDevice
3788
4158
  ? compareFrameWidth !== undefined
3789
- ? compareFrameWidth + miniMapReservedWidth + "px"
4159
+ ? compareFrameWidth +
4160
+ miniMapReservedWidth +
4161
+ feedbackMarginReservedWidth +
4162
+ "px"
3790
4163
  : "100%"
3791
4164
  : inCompareMode
3792
- ? (pageViewContext.deviceWidth || 640) + miniMapReservedWidth + "px"
3793
- : (pageViewContext.deviceWidth || 640) +
4165
+ ? (deviceWidth || 640) +
4166
+ miniMapReservedWidth +
4167
+ feedbackMarginReservedWidth +
4168
+ "px"
4169
+ : (deviceWidth || 640) +
3794
4170
  editContext.configuration.outline.width +
4171
+ feedbackMarginReservedWidth +
3795
4172
  "px";
3796
4173
  const showSuggestionsCursor = !isBridgeInlineEditing && editContext.mode === "suggestions";
3797
- return (_jsxs("div", { ref: frameContainerRef, className: cn("relative flex h-full w-full flex-col items-center select-none", className, editContext.showAgentsPanel && !editContext.currentWizardId && "pr-0"), children: [!pageViewContext.fullscreen && (_jsx(EditorWarnings, { item: pageViewContext.page?.item })), slotCloseButton && (_jsx("div", { className: "absolute top-3 right-3 z-50", children: slotCloseButton })), pageViewContext.fullscreen && (_jsxs("div", { className: "border-neutral-grey-15 relative z-40 grid h-11 w-full shrink-0 grid-cols-[minmax(0,1fr)_auto_minmax(0,1fr)] items-center border-b bg-white px-3 shadow-sm", "data-testid": "fullscreen-page-title-bar", children: [_jsx("div", { className: "w-full min-w-0 pr-3 text-left", children: _jsx(PageSelector, { itemDescriptor: pageViewContext.page?.item, variant: "fullscreen" }) }), _jsx("div", { className: "justify-self-center", children: _jsx(FullscreenControls, { device: pageViewContext.device, setDevice: (device) => pageViewContext.setDevice(device), zoom: pageViewContext.zoom, setZoom: pageViewContext.setZoom, canExit: !editContext.configuration.forceFullscreen, onExit: () => editContext.setFullscreen(false) }) }), _jsx("div", { "aria-hidden": "true" })] })), pageViewContext.device !== "desktop" && (_jsx(DeviceToolbar, { pageViewContext: pageViewContext, configuration: editContext.configuration })), _jsxs("div", { className: "relative flex min-h-0 flex-1 transition-[width] duration-300 ease-in-out select-none motion-reduce:transition-none", "data-testid": "page-viewer-viewport", style: {
3798
- width: deviceWidth,
4174
+ const showDynamicRenderingsStrip = !compareView &&
4175
+ editContext.mode === "preview" &&
4176
+ interactivePreview.renderingIds.length > 0;
4177
+ return (_jsxs("div", { ref: frameContainerRef, className: cn("relative flex h-full w-full flex-col items-center select-none", className, editContext.showAgentsPanel && !editContext.currentWizardId && "pr-0"), children: [!fullscreen && _jsx(EditorWarnings, { item: page?.item }), slotCloseButton && (_jsx("div", { className: "absolute top-3 right-3 z-50", children: slotCloseButton })), fullscreen && (_jsxs("div", { className: "border-neutral-grey-15 relative z-40 grid h-11 w-full shrink-0 grid-cols-[minmax(0,1fr)_auto_minmax(0,1fr)] items-center border-b bg-white px-3 shadow-sm", "data-testid": "fullscreen-page-title-bar", children: [_jsx("div", { className: "w-full min-w-0 pr-3 text-left", children: _jsx(PageSelector, { itemDescriptor: page?.item, variant: "fullscreen" }) }), _jsx("div", { className: "justify-self-center", children: _jsx(FullscreenControls, { pageViewContext: pageViewContext, canExit: !editContext.configuration.forceFullscreen, onExit: () => editContext.setFullscreen(false) }) }), _jsx("div", { "aria-hidden": "true" })] })), showDynamicRenderingsStrip && (_jsx(DynamicRenderingsStrip, { page: interactivePreviewPage, renderingIds: interactivePreview.renderingIds, getCanvasUrl: getPreviewCanvasUrl })), device !== "desktop" && (_jsx(DeviceToolbar, { pageViewContext: pageViewContext, configuration: editContext.configuration })), _jsxs("div", { className: "relative flex min-h-0 flex-1 transition-[width] duration-300 ease-in-out select-none motion-reduce:transition-none", "data-testid": "page-viewer-viewport", style: {
4178
+ width: frameWidth,
3799
4179
  }, children: [_jsxs("div", { className: "relative h-full w-full overflow-visible", onMouseLeave: () => {
3800
- if (pageViewContext.bridgeInteraction?.kind === "hover") {
4180
+ if (pageViewContext.getState().bridgeInteraction?.kind === "hover") {
4181
+ setPasteCleanupMenu(undefined);
3801
4182
  setBridgeInteraction(undefined);
3802
4183
  pageViewContext.setBridgeInteraction(undefined);
3803
4184
  }
3804
4185
  }, children: [_jsx("iframe", { ref: bindIframeRef, className: "page-iframe h-full w-full bg-white transition-[height] duration-300 ease-in-out motion-reduce:transition-none", style: {
3805
- height: deviceHeight,
4186
+ height: frameHeight,
3806
4187
  // The iframe element exists before its document has loaded. Keep
3807
4188
  // that blank document out of both the UI and accessibility tree;
3808
4189
  // consumers can treat a visible canvas as a rendered canvas.
@@ -3810,7 +4191,7 @@ function PageViewerFrameContent({ compareView, pageViewContext, editContext, cla
3810
4191
  cursor: showSuggestionsCursor
3811
4192
  ? SUGGESTIONS_CURSOR_VALUE
3812
4193
  : undefined,
3813
- }, src: iframeSrc, "data-testid": "pageEditoriframe", onLoad: () => {
4194
+ }, "data-testid": "pageEditoriframe", onLoad: () => {
3814
4195
  const iframe = iframeRef.current;
3815
4196
  if (iframeSrc && iframe) {
3816
4197
  parentBridgeInjectionRef.current?.dispose();
@@ -3823,13 +4204,18 @@ function PageViewerFrameContent({ compareView, pageViewContext, editContext, cla
3823
4204
  latestParentBridgeInjectionRef.current =
3824
4205
  parentBridgeInjectionRef.current.attempt;
3825
4206
  }
3826
- const loadedSrc = iframe?.src;
3827
- if (iframeSrc && loadedSrc) {
3828
- setLoadedIframeSrc(loadedSrc);
4207
+ if (iframeSrc) {
4208
+ const inFlightLoad = inFlightCanvasLoadRef.current;
4209
+ if (inFlightLoad &&
4210
+ inFlightLoad.requestedSrc === iframeSrc &&
4211
+ inFlightLoad.loadedAt === undefined) {
4212
+ inFlightLoad.loadedAt = Date.now();
4213
+ }
4214
+ setLoadedIframeSrc(iframeSrc);
3829
4215
  }
3830
4216
  const sendZoomToBridge = () => {
3831
4217
  bridgeClientRef.current?.sendCommand("setZoom", {
3832
- zoom: pageViewContextRef.current?.zoom ?? zoom,
4218
+ zoom: pageViewContextRef.current?.getState().zoom ?? zoom,
3833
4219
  });
3834
4220
  };
3835
4221
  sendZoomToBridge();
@@ -3843,6 +4229,6 @@ function PageViewerFrameContent({ compareView, pageViewContext, editContext, cla
3843
4229
  }
3844
4230
  completeCanvasRefresh();
3845
4231
  }
3846
- } }), iframeElement && (_jsx(IframeOverlayProvider, { iframe: iframeElement, mode: "scrolling", scrollScale: 1, visualScale: 1, invalidationKey: `${zoom}:${bridgeGeometryRevision}`, deferredInvalidationMs: ZOOM_TRANSITION_MS + 50, bleed: { top: 2, right: 150, bottom: 2, left: 2 }, children: _jsx(PageEditorChrome, { iframe: iframeElement, compareView: compareView, pageViewContext: pageViewContext, bridgeInteraction: bridgeInteraction, onBridgeRichTextCommand: sendApplyRichTextCommand }) })), pageViewContext.deviceHeight && pageViewContext.device && (_jsx("div", { className: "bg-neutral-grey-5 relative z-40 h-full w-full" }))] }), shouldRenderMiniMap && (_jsx(MiniMap, { compareView: compareView, scroll: scroll, mainViewIframeRef: iframeRef, pageViewContext: pageViewContext })), showSpinner && (_jsxs(_Fragment, { children: [_jsx("div", { className: "bg-neutral-grey-5/50 absolute top-0 left-0 h-full w-full" }), _jsx("div", { className: "absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 transform", children: _jsx(Spinner, {}) })] }))] }), _jsx(FieldActionsOverlay, { ref: fieldActionsOverlay, generatorButtons: contextMenuFieldButtons, onActionClick: handleActionClick, onParameterizedActionExecute: handleParameterizedActionExecute, currentOverlay: editContext?.currentOverlay, fieldId: contextMenuField?.fieldId || "", setCurrentOverlay: editContext?.setCurrentOverlay || (() => { }), preSelectedAction: preSelectedAction })] }));
4232
+ } }, "canvas"), _jsxs(OverviewRulerContext.Provider, { value: overviewRulerStore, children: [iframeElement && (_jsxs(IframeOverlayProvider, { iframe: iframeElement, mode: "scrolling", scrollScale: 1, visualScale: 1, invalidationKey: overlayInvalidationKey, deferredInvalidationMs: ZOOM_TRANSITION_MS + 50, bleed: { top: 2, right: 150, bottom: 2, left: 2 }, children: [_jsx(PageEditorChrome, { iframe: iframeElement, compareView: compareView, pageViewContext: pageViewContext, bridgeInteraction: bridgeInteraction, onBridgeRichTextCommand: sendApplyRichTextCommand }), pasteCleanupMenu && editContext.mode !== "preview" && (_jsx(BridgePasteCleanupOverlay, { iframe: iframeElement, menu: pasteCleanupMenu, onCommand: sendPasteCleanupCommand }))] })), _jsx(CanvasOverviewRuler, { height: frameHeight })] }), deviceHeight && device && (_jsx("div", { className: "bg-neutral-grey-5 relative z-40 h-full w-full" }))] }), shouldRenderFeedbackMargin && (_jsx(FeedbackMargin, { iframe: iframeElement, pageViewContext: pageViewContext, height: frameHeight, size: feedbackMarginSize, maxResizeWidth: feedbackMarginRoom, invalidationKey: overlayInvalidationKey, deferredInvalidationMs: ZOOM_TRANSITION_MS + 50 })), shouldRenderMiniMap && (_jsx(MiniMap, { compareView: compareView, scroll: scroll, mainViewIframeRef: iframeRef, pageViewContext: pageViewContext })), showSpinner && (_jsxs(_Fragment, { children: [_jsx("div", { className: "bg-neutral-grey-5/50 absolute top-0 left-0 h-full w-full" }), _jsx("div", { className: "absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 transform", children: _jsx(Spinner, {}) })] }))] }), _jsx(FieldActionsOverlay, { ref: fieldActionsOverlay, generatorButtons: contextMenuFieldButtons, onActionClick: handleActionClick, onParameterizedActionExecute: handleParameterizedActionExecute, currentOverlay: editContext?.currentOverlay, fieldId: contextMenuField?.fieldId || "", setCurrentOverlay: editContext?.setCurrentOverlay || (() => { }), preSelectedAction: preSelectedAction })] }));
3847
4233
  }
3848
4234
  //# sourceMappingURL=PageViewerFrame.js.map