@parhelia/core 0.3.12831 → 0.3.12833

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 (600) 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/editor/agent-changes/agentChangeTargets.d.ts +58 -0
  23. package/dist/editor/agent-changes/agentChangeTargets.js +180 -0
  24. package/dist/editor/agent-changes/agentChangeTargets.js.map +1 -0
  25. package/dist/editor/agent-changes/agentChangeTextHighlight.d.ts +101 -0
  26. package/dist/editor/agent-changes/agentChangeTextHighlight.js +167 -0
  27. package/dist/editor/agent-changes/agentChangeTextHighlight.js.map +1 -0
  28. package/dist/editor/ai/AgentImagePreview.d.ts +13 -0
  29. package/dist/editor/ai/AgentImagePreview.js +41 -0
  30. package/dist/editor/ai/AgentImagePreview.js.map +1 -0
  31. package/dist/editor/ai/activityRowNavigation.d.ts +28 -0
  32. package/dist/editor/ai/activityRowNavigation.js +53 -0
  33. package/dist/editor/ai/activityRowNavigation.js.map +1 -0
  34. package/dist/editor/ai/terminal/activeReasoningModel.d.ts +9 -0
  35. package/dist/editor/ai/terminal/activeReasoningModel.js +20 -0
  36. package/dist/editor/ai/terminal/activeReasoningModel.js.map +1 -0
  37. package/dist/editor/ai/terminal/agentDurations.d.ts +27 -0
  38. package/dist/editor/ai/terminal/agentDurations.js +89 -0
  39. package/dist/editor/ai/terminal/agentDurations.js.map +1 -0
  40. package/dist/editor/ai/terminal/agentTurnTiming.d.ts +35 -0
  41. package/dist/editor/ai/terminal/agentTurnTiming.js +128 -0
  42. package/dist/editor/ai/terminal/agentTurnTiming.js.map +1 -0
  43. package/dist/editor/ai/terminal/components/AgentMemorySettingsSection.d.ts +9 -0
  44. package/dist/editor/ai/terminal/components/AgentMemorySettingsSection.js +75 -0
  45. package/dist/editor/ai/terminal/components/AgentMemorySettingsSection.js.map +1 -0
  46. package/dist/editor/ai/terminal/components/AgentProfileRecovery.d.ts +10 -0
  47. package/dist/editor/ai/terminal/components/AgentProfileRecovery.js +12 -0
  48. package/dist/editor/ai/terminal/components/AgentProfileRecovery.js.map +1 -0
  49. package/dist/editor/ai/terminal/components/CreateItemToolCallContent.d.ts +3 -0
  50. package/dist/editor/ai/terminal/components/CreateItemToolCallContent.js +47 -0
  51. package/dist/editor/ai/terminal/components/CreateItemToolCallContent.js.map +1 -0
  52. package/dist/editor/ai/terminal/components/ResponseTurnDuration.d.ts +15 -0
  53. package/dist/editor/ai/terminal/components/ResponseTurnDuration.js +62 -0
  54. package/dist/editor/ai/terminal/components/ResponseTurnDuration.js.map +1 -0
  55. package/dist/editor/ai/terminal/components/ToolCallDiagnosticsPanel.d.ts +6 -0
  56. package/dist/editor/ai/terminal/components/ToolCallDiagnosticsPanel.js +61 -0
  57. package/dist/editor/ai/terminal/components/ToolCallDiagnosticsPanel.js.map +1 -0
  58. package/dist/editor/ai/terminal/components/toolCallResultJson.d.ts +1 -0
  59. package/dist/editor/ai/terminal/components/toolCallResultJson.js +46 -0
  60. package/dist/editor/ai/terminal/components/toolCallResultJson.js.map +1 -0
  61. package/dist/editor/ai/terminal/reasoningEffortLevels.d.ts +8 -0
  62. package/dist/editor/ai/terminal/reasoningEffortLevels.js +54 -0
  63. package/dist/editor/ai/terminal/reasoningEffortLevels.js.map +1 -0
  64. package/dist/editor/ai/terminal/requestUsage.d.ts +3 -0
  65. package/dist/editor/ai/terminal/requestUsage.js +22 -0
  66. package/dist/editor/ai/terminal/requestUsage.js.map +1 -0
  67. package/dist/editor/ai/terminal/toolCallDiagnostics.d.ts +34 -0
  68. package/dist/editor/ai/terminal/toolCallDiagnostics.js +218 -0
  69. package/dist/editor/ai/terminal/toolCallDiagnostics.js.map +1 -0
  70. package/dist/editor/ai/terminal/useAgentProviderWait.d.ts +18 -0
  71. package/dist/editor/ai/terminal/useAgentProviderWait.js +23 -0
  72. package/dist/editor/ai/terminal/useAgentProviderWait.js.map +1 -0
  73. package/dist/editor/ai/terminal/useAgentReasoningEffortState.d.ts +5 -0
  74. package/dist/editor/ai/terminal/useAgentReasoningEffortState.js +10 -0
  75. package/dist/editor/ai/terminal/useAgentReasoningEffortState.js.map +1 -0
  76. package/dist/editor/bridge/bridgeKeys.d.ts +5 -0
  77. package/dist/editor/bridge/bridgeKeys.js +8 -0
  78. package/dist/editor/bridge/bridgeKeys.js.map +1 -0
  79. package/dist/editor/bridge/linkDownload.d.ts +3 -0
  80. package/dist/editor/bridge/linkDownload.js +52 -0
  81. package/dist/editor/bridge/linkDownload.js.map +1 -0
  82. package/dist/editor/client/SessionsDialog.d.ts +2 -0
  83. package/dist/editor/client/SessionsDialog.js +27 -0
  84. package/dist/editor/client/SessionsDialog.js.map +1 -0
  85. package/dist/editor/client/agentLoadItemPolicy.d.ts +22 -0
  86. package/dist/editor/client/agentLoadItemPolicy.js +60 -0
  87. package/dist/editor/client/agentLoadItemPolicy.js.map +1 -0
  88. package/dist/editor/client/clipboardStorage.d.ts +10 -0
  89. package/dist/editor/client/clipboardStorage.js +57 -0
  90. package/dist/editor/client/clipboardStorage.js.map +1 -0
  91. package/dist/editor/client/hooks/useRepositoryItemRefresh.d.ts +4 -0
  92. package/dist/editor/client/hooks/useRepositoryItemRefresh.js +62 -0
  93. package/dist/editor/client/hooks/useRepositoryItemRefresh.js.map +1 -0
  94. package/dist/editor/client/liveEditState.d.ts +16 -0
  95. package/dist/editor/client/liveEditState.js +25 -0
  96. package/dist/editor/client/liveEditState.js.map +1 -0
  97. package/dist/editor/client/liveSessionState.d.ts +6 -0
  98. package/dist/editor/client/liveSessionState.js +20 -0
  99. package/dist/editor/client/liveSessionState.js.map +1 -0
  100. package/dist/editor/client/localUserEditActivity.d.ts +3 -0
  101. package/dist/editor/client/localUserEditActivity.js +12 -0
  102. package/dist/editor/client/localUserEditActivity.js.map +1 -0
  103. package/dist/editor/client/valueStore.d.ts +22 -0
  104. package/dist/editor/client/valueStore.js +29 -0
  105. package/dist/editor/client/valueStore.js.map +1 -0
  106. package/dist/editor/commands/componentClipboardCommands.d.ts +35 -0
  107. package/dist/editor/commands/componentClipboardCommands.js +271 -0
  108. package/dist/editor/commands/componentClipboardCommands.js.map +1 -0
  109. package/dist/editor/commands/componentMenuGroups.d.ts +2 -0
  110. package/dist/editor/commands/componentMenuGroups.js +43 -0
  111. package/dist/editor/commands/componentMenuGroups.js.map +1 -0
  112. package/dist/editor/commands/mediaCommands.d.ts +5 -0
  113. package/dist/editor/commands/mediaCommands.js +59 -0
  114. package/dist/editor/commands/mediaCommands.js.map +1 -0
  115. package/dist/editor/component-conversion/ComponentTypePickerDialog.d.ts +12 -0
  116. package/dist/editor/component-conversion/ComponentTypePickerDialog.js +40 -0
  117. package/dist/editor/component-conversion/ComponentTypePickerDialog.js.map +1 -0
  118. package/dist/editor/component-conversion/ConversionAiDebugButton.d.ts +17 -0
  119. package/dist/editor/component-conversion/ConversionAiDebugButton.js +80 -0
  120. package/dist/editor/component-conversion/ConversionAiDebugButton.js.map +1 -0
  121. package/dist/editor/component-conversion/ConvertComponentDialog.d.ts +28 -0
  122. package/dist/editor/component-conversion/ConvertComponentDialog.js +633 -0
  123. package/dist/editor/component-conversion/ConvertComponentDialog.js.map +1 -0
  124. package/dist/editor/component-conversion/conversionModel.d.ts +109 -0
  125. package/dist/editor/component-conversion/conversionModel.js +519 -0
  126. package/dist/editor/component-conversion/conversionModel.js.map +1 -0
  127. package/dist/editor/component-conversion/conversionService.d.ts +12 -0
  128. package/dist/editor/component-conversion/conversionService.js +16 -0
  129. package/dist/editor/component-conversion/conversionService.js.map +1 -0
  130. package/dist/editor/component-conversion/conversionTypes.d.ts +214 -0
  131. package/dist/editor/component-conversion/conversionTypes.js +2 -0
  132. package/dist/editor/component-conversion/conversionTypes.js.map +1 -0
  133. package/dist/editor/component-conversion/convertComponentsCommand.d.ts +25 -0
  134. package/dist/editor/component-conversion/convertComponentsCommand.js +196 -0
  135. package/dist/editor/component-conversion/convertComponentsCommand.js.map +1 -0
  136. package/dist/editor/componentVisualMode.d.ts +14 -0
  137. package/dist/editor/componentVisualMode.js +43 -0
  138. package/dist/editor/componentVisualMode.js.map +1 -0
  139. package/dist/editor/field-types/FieldHistoryBoundary.d.ts +7 -0
  140. package/dist/editor/field-types/FieldHistoryBoundary.js +40 -0
  141. package/dist/editor/field-types/FieldHistoryBoundary.js.map +1 -0
  142. package/dist/editor/field-types/fieldStyles.d.ts +21 -0
  143. package/dist/editor/field-types/fieldStyles.js +22 -0
  144. package/dist/editor/field-types/fieldStyles.js.map +1 -0
  145. package/dist/editor/field-types/richtext/utils/changeHighlight.d.ts +32 -0
  146. package/dist/editor/field-types/richtext/utils/changeHighlight.js +68 -0
  147. package/dist/editor/field-types/richtext/utils/changeHighlight.js.map +1 -0
  148. package/dist/editor/field-types/richtext/utils/spellCheckText.d.ts +31 -0
  149. package/dist/editor/field-types/richtext/utils/spellCheckText.js +82 -0
  150. package/dist/editor/field-types/richtext/utils/spellCheckText.js.map +1 -0
  151. package/dist/editor/field-types/useFocusedFieldInput.d.ts +13 -0
  152. package/dist/editor/field-types/useFocusedFieldInput.js +50 -0
  153. package/dist/editor/field-types/useFocusedFieldInput.js.map +1 -0
  154. package/dist/editor/field-types/useFormFieldSelectionRange.d.ts +43 -0
  155. package/dist/editor/field-types/useFormFieldSelectionRange.js +149 -0
  156. package/dist/editor/field-types/useFormFieldSelectionRange.js.map +1 -0
  157. package/dist/editor/find-replace/FindReplacePanel.d.ts +11 -0
  158. package/dist/editor/find-replace/FindReplacePanel.js +311 -0
  159. package/dist/editor/find-replace/FindReplacePanel.js.map +1 -0
  160. package/dist/editor/find-replace/findReplaceCommand.d.ts +8 -0
  161. package/dist/editor/find-replace/findReplaceCommand.js +25 -0
  162. package/dist/editor/find-replace/findReplaceCommand.js.map +1 -0
  163. package/dist/editor/find-replace/findReplaceMatches.d.ts +42 -0
  164. package/dist/editor/find-replace/findReplaceMatches.js +66 -0
  165. package/dist/editor/find-replace/findReplaceMatches.js.map +1 -0
  166. package/dist/editor/find-replace/findReplaceStore.d.ts +30 -0
  167. package/dist/editor/find-replace/findReplaceStore.js +61 -0
  168. package/dist/editor/find-replace/findReplaceStore.js.map +1 -0
  169. package/dist/editor/find-replace/findReplaceTargets.d.ts +51 -0
  170. package/dist/editor/find-replace/findReplaceTargets.js +110 -0
  171. package/dist/editor/find-replace/findReplaceTargets.js.map +1 -0
  172. package/dist/editor/find-replace/findReplaceText.d.ts +50 -0
  173. package/dist/editor/find-replace/findReplaceText.js +189 -0
  174. package/dist/editor/find-replace/findReplaceText.js.map +1 -0
  175. package/dist/editor/itemContextMenuGroups.d.ts +16 -0
  176. package/dist/editor/itemContextMenuGroups.js +57 -0
  177. package/dist/editor/itemContextMenuGroups.js.map +1 -0
  178. package/dist/editor/media-selector/MediaDetailsView.d.ts +14 -0
  179. package/dist/editor/media-selector/MediaDetailsView.js +152 -0
  180. package/dist/editor/media-selector/MediaDetailsView.js.map +1 -0
  181. package/dist/editor/media-selector/UploadMediaFileDialog.d.ts +5 -0
  182. package/dist/editor/media-selector/UploadMediaFileDialog.js +14 -0
  183. package/dist/editor/media-selector/UploadMediaFileDialog.js.map +1 -0
  184. package/dist/editor/media-selector/useMediaFolderDrag.d.ts +26 -0
  185. package/dist/editor/media-selector/useMediaFolderDrag.js +153 -0
  186. package/dist/editor/media-selector/useMediaFolderDrag.js.map +1 -0
  187. package/dist/editor/menubar/OpenPublishedPageButton.d.ts +1 -0
  188. package/dist/editor/menubar/OpenPublishedPageButton.js +22 -0
  189. package/dist/editor/menubar/OpenPublishedPageButton.js.map +1 -0
  190. package/dist/editor/menubar/toolbar-sections/CommentsToggleControl.d.ts +11 -0
  191. package/dist/editor/menubar/toolbar-sections/CommentsToggleControl.js +65 -0
  192. package/dist/editor/menubar/toolbar-sections/CommentsToggleControl.js.map +1 -0
  193. package/dist/editor/menubar/toolbar-sections/FindReplaceControls.d.ts +6 -0
  194. package/dist/editor/menubar/toolbar-sections/FindReplaceControls.js +31 -0
  195. package/dist/editor/menubar/toolbar-sections/FindReplaceControls.js.map +1 -0
  196. package/dist/editor/menubar/toolbar-sections/SpellCheckToggleControl.d.ts +5 -0
  197. package/dist/editor/menubar/toolbar-sections/SpellCheckToggleControl.js +16 -0
  198. package/dist/editor/menubar/toolbar-sections/SpellCheckToggleControl.js.map +1 -0
  199. package/dist/editor/mobileBottomPanel.d.ts +40 -0
  200. package/dist/editor/mobileBottomPanel.js +63 -0
  201. package/dist/editor/mobileBottomPanel.js.map +1 -0
  202. package/dist/editor/page-editor-chrome/AgentChangeHighlightings.d.ts +17 -0
  203. package/dist/editor/page-editor-chrome/AgentChangeHighlightings.js +33 -0
  204. package/dist/editor/page-editor-chrome/AgentChangeHighlightings.js.map +1 -0
  205. package/dist/editor/page-editor-chrome/BridgePasteCleanupOverlay.d.ts +6 -0
  206. package/dist/editor/page-editor-chrome/BridgePasteCleanupOverlay.js +100 -0
  207. package/dist/editor/page-editor-chrome/BridgePasteCleanupOverlay.js.map +1 -0
  208. package/dist/editor/page-editor-chrome/CanvasOverviewRulerBinding.d.ts +9 -0
  209. package/dist/editor/page-editor-chrome/CanvasOverviewRulerBinding.js +32 -0
  210. package/dist/editor/page-editor-chrome/CanvasOverviewRulerBinding.js.map +1 -0
  211. package/dist/editor/page-editor-chrome/CommentTargetPickerCanvasLayer.d.ts +14 -0
  212. package/dist/editor/page-editor-chrome/CommentTargetPickerCanvasLayer.js +110 -0
  213. package/dist/editor/page-editor-chrome/CommentTargetPickerCanvasLayer.js.map +1 -0
  214. package/dist/editor/page-editor-chrome/ConversionIndicators.d.ts +8 -0
  215. package/dist/editor/page-editor-chrome/ConversionIndicators.js +75 -0
  216. package/dist/editor/page-editor-chrome/ConversionIndicators.js.map +1 -0
  217. package/dist/editor/page-editor-chrome/DiffHighlightOverlay.d.ts +29 -0
  218. package/dist/editor/page-editor-chrome/DiffHighlightOverlay.js +295 -0
  219. package/dist/editor/page-editor-chrome/DiffHighlightOverlay.js.map +1 -0
  220. package/dist/editor/page-editor-chrome/FeedbackLeaderCanvasSegment.d.ts +15 -0
  221. package/dist/editor/page-editor-chrome/FeedbackLeaderCanvasSegment.js +31 -0
  222. package/dist/editor/page-editor-chrome/FeedbackLeaderCanvasSegment.js.map +1 -0
  223. package/dist/editor/page-editor-chrome/FindReplaceHighlightings.d.ts +11 -0
  224. package/dist/editor/page-editor-chrome/FindReplaceHighlightings.js +120 -0
  225. package/dist/editor/page-editor-chrome/FindReplaceHighlightings.js.map +1 -0
  226. package/dist/editor/page-editor-chrome/SpellCheckHighlightings.d.ts +12 -0
  227. package/dist/editor/page-editor-chrome/SpellCheckHighlightings.js +197 -0
  228. package/dist/editor/page-editor-chrome/SpellCheckHighlightings.js.map +1 -0
  229. package/dist/editor/page-editor-chrome/ValidationRulerMarks.d.ts +11 -0
  230. package/dist/editor/page-editor-chrome/ValidationRulerMarks.js +56 -0
  231. package/dist/editor/page-editor-chrome/ValidationRulerMarks.js.map +1 -0
  232. package/dist/editor/page-editor-chrome/diffRulerSegments.d.ts +18 -0
  233. package/dist/editor/page-editor-chrome/diffRulerSegments.js +37 -0
  234. package/dist/editor/page-editor-chrome/diffRulerSegments.js.map +1 -0
  235. package/dist/editor/page-editor-chrome/overlay/feedbackAnchorMeasurements.d.ts +44 -0
  236. package/dist/editor/page-editor-chrome/overlay/feedbackAnchorMeasurements.js +89 -0
  237. package/dist/editor/page-editor-chrome/overlay/feedbackAnchorMeasurements.js.map +1 -0
  238. package/dist/editor/page-editor-chrome/overlay/feedbackAnchorStore.d.ts +17 -0
  239. package/dist/editor/page-editor-chrome/overlay/feedbackAnchorStore.js +53 -0
  240. package/dist/editor/page-editor-chrome/overlay/feedbackAnchorStore.js.map +1 -0
  241. package/dist/editor/page-editor-chrome/overlay/useBridgeTextRangeRequest.d.ts +11 -0
  242. package/dist/editor/page-editor-chrome/overlay/useBridgeTextRangeRequest.js +84 -0
  243. package/dist/editor/page-editor-chrome/overlay/useBridgeTextRangeRequest.js.map +1 -0
  244. package/dist/editor/page-editor-chrome/overlay/useCommentAnchorMeasurements.d.ts +34 -0
  245. package/dist/editor/page-editor-chrome/overlay/useCommentAnchorMeasurements.js +229 -0
  246. package/dist/editor/page-editor-chrome/overlay/useCommentAnchorMeasurements.js.map +1 -0
  247. package/dist/editor/page-editor-chrome/overlay/useOverlayViewportRight.d.ts +9 -0
  248. package/dist/editor/page-editor-chrome/overlay/useOverlayViewportRight.js +34 -0
  249. package/dist/editor/page-editor-chrome/overlay/useOverlayViewportRight.js.map +1 -0
  250. package/dist/editor/page-editor-chrome/overlay/useSuggestionAnchorMeasurements.d.ts +49 -0
  251. package/dist/editor/page-editor-chrome/overlay/useSuggestionAnchorMeasurements.js +241 -0
  252. package/dist/editor/page-editor-chrome/overlay/useSuggestionAnchorMeasurements.js.map +1 -0
  253. package/dist/editor/page-viewer/CanvasOverviewRuler.d.ts +11 -0
  254. package/dist/editor/page-viewer/CanvasOverviewRuler.js +65 -0
  255. package/dist/editor/page-viewer/CanvasOverviewRuler.js.map +1 -0
  256. package/dist/editor/page-viewer/DynamicRenderingsBar.d.ts +23 -0
  257. package/dist/editor/page-viewer/DynamicRenderingsBar.js +28 -0
  258. package/dist/editor/page-viewer/DynamicRenderingsBar.js.map +1 -0
  259. package/dist/editor/page-viewer/DynamicRenderingsStrip.d.ts +18 -0
  260. package/dist/editor/page-viewer/DynamicRenderingsStrip.js +29 -0
  261. package/dist/editor/page-viewer/DynamicRenderingsStrip.js.map +1 -0
  262. package/dist/editor/page-viewer/FeedbackMargin.d.ts +57 -0
  263. package/dist/editor/page-viewer/FeedbackMargin.js +377 -0
  264. package/dist/editor/page-viewer/FeedbackMargin.js.map +1 -0
  265. package/dist/editor/page-viewer/FeedbackMarginController.d.ts +76 -0
  266. package/dist/editor/page-viewer/FeedbackMarginController.js +241 -0
  267. package/dist/editor/page-viewer/FeedbackMarginController.js.map +1 -0
  268. package/dist/editor/page-viewer/FeedbackMarginMarker.d.ts +16 -0
  269. package/dist/editor/page-viewer/FeedbackMarginMarker.js +24 -0
  270. package/dist/editor/page-viewer/FeedbackMarginMarker.js.map +1 -0
  271. package/dist/editor/page-viewer/FeedbackMarginResizeHandle.d.ts +23 -0
  272. package/dist/editor/page-viewer/FeedbackMarginResizeHandle.js +105 -0
  273. package/dist/editor/page-viewer/FeedbackMarginResizeHandle.js.map +1 -0
  274. package/dist/editor/page-viewer/InteractivePreviewBar.d.ts +24 -0
  275. package/dist/editor/page-viewer/InteractivePreviewBar.js +31 -0
  276. package/dist/editor/page-viewer/InteractivePreviewBar.js.map +1 -0
  277. package/dist/editor/page-viewer/MobileCommentsPanel.d.ts +16 -0
  278. package/dist/editor/page-viewer/MobileCommentsPanel.js +112 -0
  279. package/dist/editor/page-viewer/MobileCommentsPanel.js.map +1 -0
  280. package/dist/editor/page-viewer/PreviewModeNotice.d.ts +7 -0
  281. package/dist/editor/page-viewer/PreviewModeNotice.js +19 -0
  282. package/dist/editor/page-viewer/PreviewModeNotice.js.map +1 -0
  283. package/dist/editor/page-viewer/RenderingAiCheck.d.ts +18 -0
  284. package/dist/editor/page-viewer/RenderingAiCheck.js +45 -0
  285. package/dist/editor/page-viewer/RenderingAiCheck.js.map +1 -0
  286. package/dist/editor/page-viewer/RenderingApprovalDialog.d.ts +32 -0
  287. package/dist/editor/page-viewer/RenderingApprovalDialog.js +191 -0
  288. package/dist/editor/page-viewer/RenderingApprovalDialog.js.map +1 -0
  289. package/dist/editor/page-viewer/SealedClientCodePreview.d.ts +17 -0
  290. package/dist/editor/page-viewer/SealedClientCodePreview.js +38 -0
  291. package/dist/editor/page-viewer/SealedClientCodePreview.js.map +1 -0
  292. package/dist/editor/page-viewer/canvasFrameNavigation.d.ts +18 -0
  293. package/dist/editor/page-viewer/canvasFrameNavigation.js +36 -0
  294. package/dist/editor/page-viewer/canvasFrameNavigation.js.map +1 -0
  295. package/dist/editor/page-viewer/canvasLoadSettling.d.ts +42 -0
  296. package/dist/editor/page-viewer/canvasLoadSettling.js +46 -0
  297. package/dist/editor/page-viewer/canvasLoadSettling.js.map +1 -0
  298. package/dist/editor/page-viewer/canvasScrollHandoff.d.ts +34 -0
  299. package/dist/editor/page-viewer/canvasScrollHandoff.js +55 -0
  300. package/dist/editor/page-viewer/canvasScrollHandoff.js.map +1 -0
  301. package/dist/editor/page-viewer/compareFrameWidth.d.ts +8 -0
  302. package/dist/editor/page-viewer/compareFrameWidth.js +25 -0
  303. package/dist/editor/page-viewer/compareFrameWidth.js.map +1 -0
  304. package/dist/editor/page-viewer/feedbackMarginLayout.d.ts +119 -0
  305. package/dist/editor/page-viewer/feedbackMarginLayout.js +155 -0
  306. package/dist/editor/page-viewer/feedbackMarginLayout.js.map +1 -0
  307. package/dist/editor/page-viewer/feedbackMarginSources.d.ts +36 -0
  308. package/dist/editor/page-viewer/feedbackMarginSources.js +196 -0
  309. package/dist/editor/page-viewer/feedbackMarginSources.js.map +1 -0
  310. package/dist/editor/page-viewer/feedbackMarginWidth.d.ts +43 -0
  311. package/dist/editor/page-viewer/feedbackMarginWidth.js +107 -0
  312. package/dist/editor/page-viewer/feedbackMarginWidth.js.map +1 -0
  313. package/dist/editor/page-viewer/interactivePreview.d.ts +168 -0
  314. package/dist/editor/page-viewer/interactivePreview.js +344 -0
  315. package/dist/editor/page-viewer/interactivePreview.js.map +1 -0
  316. package/dist/editor/page-viewer/minimapViewport.d.ts +2 -0
  317. package/dist/editor/page-viewer/minimapViewport.js +34 -0
  318. package/dist/editor/page-viewer/minimapViewport.js.map +1 -0
  319. package/dist/editor/page-viewer/openPageItems.d.ts +29 -0
  320. package/dist/editor/page-viewer/openPageItems.js +73 -0
  321. package/dist/editor/page-viewer/openPageItems.js.map +1 -0
  322. package/dist/editor/page-viewer/overviewRuler.d.ts +128 -0
  323. package/dist/editor/page-viewer/overviewRuler.js +226 -0
  324. package/dist/editor/page-viewer/overviewRuler.js.map +1 -0
  325. package/dist/editor/page-viewer/previewEditAttempt.d.ts +31 -0
  326. package/dist/editor/page-viewer/previewEditAttempt.js +68 -0
  327. package/dist/editor/page-viewer/previewEditAttempt.js.map +1 -0
  328. package/dist/editor/page-viewer/renderingApproval.d.ts +59 -0
  329. package/dist/editor/page-viewer/renderingApproval.js +186 -0
  330. package/dist/editor/page-viewer/renderingApproval.js.map +1 -0
  331. package/dist/editor/page-viewer/renderingChanges.d.ts +29 -0
  332. package/dist/editor/page-viewer/renderingChanges.js +40 -0
  333. package/dist/editor/page-viewer/renderingChanges.js.map +1 -0
  334. package/dist/editor/page-viewer/scrollIntoViewTextRanges.d.ts +23 -0
  335. package/dist/editor/page-viewer/scrollIntoViewTextRanges.js +26 -0
  336. package/dist/editor/page-viewer/scrollIntoViewTextRanges.js.map +1 -0
  337. package/dist/editor/page-viewer/useInteractivePreview.d.ts +77 -0
  338. package/dist/editor/page-viewer/useInteractivePreview.js +210 -0
  339. package/dist/editor/page-viewer/useInteractivePreview.js.map +1 -0
  340. package/dist/editor/reviews/CollapsibleText.d.ts +13 -0
  341. package/dist/editor/reviews/CollapsibleText.js +41 -0
  342. package/dist/editor/reviews/CollapsibleText.js.map +1 -0
  343. package/dist/editor/reviews/CommentImageAttachments.d.ts +12 -0
  344. package/dist/editor/reviews/CommentImageAttachments.js +19 -0
  345. package/dist/editor/reviews/CommentImageAttachments.js.map +1 -0
  346. package/dist/editor/reviews/CommentQuote.d.ts +13 -0
  347. package/dist/editor/reviews/CommentQuote.js +35 -0
  348. package/dist/editor/reviews/CommentQuote.js.map +1 -0
  349. package/dist/editor/reviews/CommentTargetOutline.d.ts +13 -0
  350. package/dist/editor/reviews/CommentTargetOutline.js +21 -0
  351. package/dist/editor/reviews/CommentTargetOutline.js.map +1 -0
  352. package/dist/editor/reviews/CommentTargetPickerDomLayer.d.ts +7 -0
  353. package/dist/editor/reviews/CommentTargetPickerDomLayer.js +117 -0
  354. package/dist/editor/reviews/CommentTargetPickerDomLayer.js.map +1 -0
  355. package/dist/editor/reviews/CommentThreadAgentLink.d.ts +28 -0
  356. package/dist/editor/reviews/CommentThreadAgentLink.js +37 -0
  357. package/dist/editor/reviews/CommentThreadAgentLink.js.map +1 -0
  358. package/dist/editor/reviews/CommentThreadCard.d.ts +34 -0
  359. package/dist/editor/reviews/CommentThreadCard.js +156 -0
  360. package/dist/editor/reviews/CommentThreadCard.js.map +1 -0
  361. package/dist/editor/reviews/SuggestionThreadCard.d.ts +19 -0
  362. package/dist/editor/reviews/SuggestionThreadCard.js +25 -0
  363. package/dist/editor/reviews/SuggestionThreadCard.js.map +1 -0
  364. package/dist/editor/reviews/addCommentOnTarget.d.ts +22 -0
  365. package/dist/editor/reviews/addCommentOnTarget.js +32 -0
  366. package/dist/editor/reviews/addCommentOnTarget.js.map +1 -0
  367. package/dist/editor/reviews/balloonLayout.d.ts +51 -0
  368. package/dist/editor/reviews/balloonLayout.js +101 -0
  369. package/dist/editor/reviews/balloonLayout.js.map +1 -0
  370. package/dist/editor/reviews/commentAgentAttachments.d.ts +5 -0
  371. package/dist/editor/reviews/commentAgentAttachments.js +51 -0
  372. package/dist/editor/reviews/commentAgentAttachments.js.map +1 -0
  373. package/dist/editor/reviews/commentImages.d.ts +48 -0
  374. package/dist/editor/reviews/commentImages.js +128 -0
  375. package/dist/editor/reviews/commentImages.js.map +1 -0
  376. package/dist/editor/reviews/commentTargetPicker.d.ts +114 -0
  377. package/dist/editor/reviews/commentTargetPicker.js +153 -0
  378. package/dist/editor/reviews/commentTargetPicker.js.map +1 -0
  379. package/dist/editor/reviews/feedbackBalloonDate.d.ts +8 -0
  380. package/dist/editor/reviews/feedbackBalloonDate.js +22 -0
  381. package/dist/editor/reviews/feedbackBalloonDate.js.map +1 -0
  382. package/dist/editor/reviews/feedbackDrafts.d.ts +49 -0
  383. package/dist/editor/reviews/feedbackDrafts.js +74 -0
  384. package/dist/editor/reviews/feedbackDrafts.js.map +1 -0
  385. package/dist/editor/reviews/feedbackHoverState.d.ts +18 -0
  386. package/dist/editor/reviews/feedbackHoverState.js +35 -0
  387. package/dist/editor/reviews/feedbackHoverState.js.map +1 -0
  388. package/dist/editor/reviews/feedbackPersonFilter.d.ts +3 -0
  389. package/dist/editor/reviews/feedbackPersonFilter.js +32 -0
  390. package/dist/editor/reviews/feedbackPersonFilter.js.map +1 -0
  391. package/dist/editor/reviews/feedbackThreadSelection.d.ts +10 -0
  392. package/dist/editor/reviews/feedbackThreadSelection.js +31 -0
  393. package/dist/editor/reviews/feedbackThreadSelection.js.map +1 -0
  394. package/dist/editor/reviews/feedbackThreads.d.ts +50 -0
  395. package/dist/editor/reviews/feedbackThreads.js +135 -0
  396. package/dist/editor/reviews/feedbackThreads.js.map +1 -0
  397. package/dist/editor/reviews/feedbackWheelForwarding.d.ts +34 -0
  398. package/dist/editor/reviews/feedbackWheelForwarding.js +108 -0
  399. package/dist/editor/reviews/feedbackWheelForwarding.js.map +1 -0
  400. package/dist/editor/reviews/reviewUrlScope.d.ts +23 -0
  401. package/dist/editor/reviews/reviewUrlScope.js +86 -0
  402. package/dist/editor/reviews/reviewUrlScope.js.map +1 -0
  403. package/dist/editor/reviews/scrollWithin.d.ts +29 -0
  404. package/dist/editor/reviews/scrollWithin.js +87 -0
  405. package/dist/editor/reviews/scrollWithin.js.map +1 -0
  406. package/dist/editor/reviews/subtreeFeedback.d.ts +57 -0
  407. package/dist/editor/reviews/subtreeFeedback.js +137 -0
  408. package/dist/editor/reviews/subtreeFeedback.js.map +1 -0
  409. package/dist/editor/reviews/useCommentImagePaste.d.ts +80 -0
  410. package/dist/editor/reviews/useCommentImagePaste.js +252 -0
  411. package/dist/editor/reviews/useCommentImagePaste.js.map +1 -0
  412. package/dist/editor/reviews/useFeedbackThreads.d.ts +35 -0
  413. package/dist/editor/reviews/useFeedbackThreads.js +137 -0
  414. package/dist/editor/reviews/useFeedbackThreads.js.map +1 -0
  415. package/dist/editor/reviews/useMeasuredHeights.d.ts +25 -0
  416. package/dist/editor/reviews/useMeasuredHeights.js +176 -0
  417. package/dist/editor/reviews/useMeasuredHeights.js.map +1 -0
  418. package/dist/editor/reviews/usePendingFeedbackFocus.d.ts +7 -0
  419. package/dist/editor/reviews/usePendingFeedbackFocus.js +42 -0
  420. package/dist/editor/reviews/usePendingFeedbackFocus.js.map +1 -0
  421. package/dist/editor/services/mcpAccessService.d.ts +93 -0
  422. package/dist/editor/services/mcpAccessService.js +41 -0
  423. package/dist/editor/services/mcpAccessService.js.map +1 -0
  424. package/dist/editor/services/migrationService.d.ts +31 -0
  425. package/dist/editor/services/migrationService.js +22 -0
  426. package/dist/editor/services/migrationService.js.map +1 -0
  427. package/dist/editor/services/previewTokenService.d.ts +14 -0
  428. package/dist/editor/services/previewTokenService.js +34 -0
  429. package/dist/editor/services/previewTokenService.js.map +1 -0
  430. package/dist/editor/services/publicSiteService.d.ts +40 -0
  431. package/dist/editor/services/publicSiteService.js +5 -0
  432. package/dist/editor/services/publicSiteService.js.map +1 -0
  433. package/dist/editor/services/renderingsService.d.ts +117 -0
  434. package/dist/editor/services/renderingsService.js +245 -0
  435. package/dist/editor/services/renderingsService.js.map +1 -0
  436. package/dist/editor/services/spellCheckService.d.ts +13 -0
  437. package/dist/editor/services/spellCheckService.js +33 -0
  438. package/dist/editor/services/spellCheckService.js.map +1 -0
  439. package/dist/editor/settings/MigrationJournalCard.d.ts +12 -0
  440. package/dist/editor/settings/MigrationJournalCard.js +114 -0
  441. package/dist/editor/settings/MigrationJournalCard.js.map +1 -0
  442. package/dist/editor/settings/panels/McpAccessPanel.d.ts +7 -0
  443. package/dist/editor/settings/panels/McpAccessPanel.js +95 -0
  444. package/dist/editor/settings/panels/McpAccessPanel.js.map +1 -0
  445. package/dist/editor/settings/panels/McpAccessSettingsView.d.ts +8 -0
  446. package/dist/editor/settings/panels/McpAccessSettingsView.js +221 -0
  447. package/dist/editor/settings/panels/McpAccessSettingsView.js.map +1 -0
  448. package/dist/editor/settings/panels/PublicSiteEntryDialog.d.ts +8 -0
  449. package/dist/editor/settings/panels/PublicSiteEntryDialog.js +113 -0
  450. package/dist/editor/settings/panels/PublicSiteEntryDialog.js.map +1 -0
  451. package/dist/editor/settings/panels/PublicSitesPanel.d.ts +1 -0
  452. package/dist/editor/settings/panels/PublicSitesPanel.js +153 -0
  453. package/dist/editor/settings/panels/PublicSitesPanel.js.map +1 -0
  454. package/dist/editor/settings/panels/SpellCheckPanel.d.ts +8 -0
  455. package/dist/editor/settings/panels/SpellCheckPanel.js +253 -0
  456. package/dist/editor/settings/panels/SpellCheckPanel.js.map +1 -0
  457. package/dist/editor/settings/panels/publicSiteHelpers.d.ts +6 -0
  458. package/dist/editor/settings/panels/publicSiteHelpers.js +30 -0
  459. package/dist/editor/settings/panels/publicSiteHelpers.js.map +1 -0
  460. package/dist/editor/sidebar/FeedbackSidebar.d.ts +7 -0
  461. package/dist/editor/sidebar/FeedbackSidebar.js +300 -0
  462. package/dist/editor/sidebar/FeedbackSidebar.js.map +1 -0
  463. package/dist/editor/sidebar/OperationDetailsContent.d.ts +14 -0
  464. package/dist/editor/sidebar/OperationDetailsContent.js +571 -0
  465. package/dist/editor/sidebar/OperationDetailsContent.js.map +1 -0
  466. package/dist/editor/sidebar/liveComponentThumbnails.d.ts +66 -0
  467. package/dist/editor/sidebar/liveComponentThumbnails.js +225 -0
  468. package/dist/editor/sidebar/liveComponentThumbnails.js.map +1 -0
  469. package/dist/editor/spellcheck/canvasSpellCheckContextMenu.d.ts +30 -0
  470. package/dist/editor/spellcheck/canvasSpellCheckContextMenu.js +69 -0
  471. package/dist/editor/spellcheck/canvasSpellCheckContextMenu.js.map +1 -0
  472. package/dist/editor/spellcheck/htmlSpellDocument.d.ts +60 -0
  473. package/dist/editor/spellcheck/htmlSpellDocument.js +181 -0
  474. package/dist/editor/spellcheck/htmlSpellDocument.js.map +1 -0
  475. package/dist/editor/spellcheck/htmlSpellTokenizer.d.ts +45 -0
  476. package/dist/editor/spellcheck/htmlSpellTokenizer.js +277 -0
  477. package/dist/editor/spellcheck/htmlSpellTokenizer.js.map +1 -0
  478. package/dist/editor/spellcheck/replacementGuard.d.ts +27 -0
  479. package/dist/editor/spellcheck/replacementGuard.js +29 -0
  480. package/dist/editor/spellcheck/replacementGuard.js.map +1 -0
  481. package/dist/editor/spellcheck/spellCheckCanvasStore.d.ts +17 -0
  482. package/dist/editor/spellcheck/spellCheckCanvasStore.js +37 -0
  483. package/dist/editor/spellcheck/spellCheckCanvasStore.js.map +1 -0
  484. package/dist/editor/spellcheck/spellCheckCanvasTargets.d.ts +71 -0
  485. package/dist/editor/spellcheck/spellCheckCanvasTargets.js +126 -0
  486. package/dist/editor/spellcheck/spellCheckCanvasTargets.js.map +1 -0
  487. package/dist/editor/spellcheck/spellCheckClient.d.ts +66 -0
  488. package/dist/editor/spellcheck/spellCheckClient.js +0 -0
  489. package/dist/editor/spellcheck/spellCheckClient.js.map +1 -0
  490. package/dist/editor/spellcheck/spellCheckContextMenu.d.ts +52 -0
  491. package/dist/editor/spellcheck/spellCheckContextMenu.js +120 -0
  492. package/dist/editor/spellcheck/spellCheckContextMenu.js.map +1 -0
  493. package/dist/editor/spellcheck/spellCheckReplace.d.ts +8 -0
  494. package/dist/editor/spellcheck/spellCheckReplace.js +20 -0
  495. package/dist/editor/spellcheck/spellCheckReplace.js.map +1 -0
  496. package/dist/editor/spellcheck/spellCheckStyles.d.ts +11 -0
  497. package/dist/editor/spellcheck/spellCheckStyles.js +12 -0
  498. package/dist/editor/spellcheck/spellCheckStyles.js.map +1 -0
  499. package/dist/editor/spellcheck/spellCheckTypes.d.ts +94 -0
  500. package/dist/editor/spellcheck/spellCheckTypes.js +2 -0
  501. package/dist/editor/spellcheck/spellCheckTypes.js.map +1 -0
  502. package/dist/editor/spellcheck/textMarkHitTest.d.ts +14 -0
  503. package/dist/editor/spellcheck/textMarkHitTest.js +39 -0
  504. package/dist/editor/spellcheck/textMarkHitTest.js.map +1 -0
  505. package/dist/editor/spellcheck/useSpellCheck.d.ts +16 -0
  506. package/dist/editor/spellcheck/useSpellCheck.js +57 -0
  507. package/dist/editor/spellcheck/useSpellCheck.js.map +1 -0
  508. package/dist/editor/ui/DynamicRenderingsPublishWarning.d.ts +14 -0
  509. package/dist/editor/ui/DynamicRenderingsPublishWarning.js +40 -0
  510. package/dist/editor/ui/DynamicRenderingsPublishWarning.js.map +1 -0
  511. package/dist/editor/ui/ParheliaMark.d.ts +15 -0
  512. package/dist/editor/ui/ParheliaMark.js +12 -0
  513. package/dist/editor/ui/ParheliaMark.js.map +1 -0
  514. package/dist/editor/ui/PublishReadinessSummary.d.ts +12 -0
  515. package/dist/editor/ui/PublishReadinessSummary.js +34 -0
  516. package/dist/editor/ui/PublishReadinessSummary.js.map +1 -0
  517. package/dist/editor/ui/RootItemPicker.d.ts +18 -0
  518. package/dist/editor/ui/RootItemPicker.js +112 -0
  519. package/dist/editor/ui/RootItemPicker.js.map +1 -0
  520. package/dist/editor/ui/publishReadiness.d.ts +98 -0
  521. package/dist/editor/ui/publishReadiness.js +307 -0
  522. package/dist/editor/ui/publishReadiness.js.map +1 -0
  523. package/dist/editor/ui/usePublishingItem.d.ts +8 -0
  524. package/dist/editor/ui/usePublishingItem.js +47 -0
  525. package/dist/editor/ui/usePublishingItem.js.map +1 -0
  526. package/dist/editor/undoEligibility.d.ts +2 -0
  527. package/dist/editor/undoEligibility.js +8 -0
  528. package/dist/editor/undoEligibility.js.map +1 -0
  529. package/dist/editor/utils/dataTransferImages.d.ts +7 -0
  530. package/dist/editor/utils/dataTransferImages.js +43 -0
  531. package/dist/editor/utils/dataTransferImages.js.map +1 -0
  532. package/dist/editor/utils/linkDisplay.d.ts +12 -0
  533. package/dist/editor/utils/linkDisplay.js +23 -0
  534. package/dist/editor/utils/linkDisplay.js.map +1 -0
  535. package/dist/editor/validation/ValidationIssuesPopover.d.ts +39 -0
  536. package/dist/editor/validation/ValidationIssuesPopover.js +51 -0
  537. package/dist/editor/validation/ValidationIssuesPopover.js.map +1 -0
  538. package/dist/editor/validation/navigateToValidationIssue.d.ts +13 -0
  539. package/dist/editor/validation/navigateToValidationIssue.js +43 -0
  540. package/dist/editor/validation/navigateToValidationIssue.js.map +1 -0
  541. package/dist/editor/validation/validationFixAgent.d.ts +26 -0
  542. package/dist/editor/validation/validationFixAgent.js +124 -0
  543. package/dist/editor/validation/validationFixAgent.js.map +1 -0
  544. package/dist/editor/validation/validationRulerIssues.d.ts +17 -0
  545. package/dist/editor/validation/validationRulerIssues.js +44 -0
  546. package/dist/editor/validation/validationRulerIssues.js.map +1 -0
  547. package/dist/editor/validation/validationSeverity.d.ts +15 -0
  548. package/dist/editor/validation/validationSeverity.js +47 -0
  549. package/dist/editor/validation/validationSeverity.js.map +1 -0
  550. package/dist/lib/viewportClip.d.ts +18 -0
  551. package/dist/lib/viewportClip.js +22 -0
  552. package/dist/lib/viewportClip.js.map +1 -0
  553. package/dist/revision.d.ts +2 -2
  554. package/dist/revision.js +2 -2
  555. package/dist/task-board/components/AttentionPromptDialog.d.ts +13 -0
  556. package/dist/task-board/components/AttentionPromptDialog.js +45 -0
  557. package/dist/task-board/components/AttentionPromptDialog.js.map +1 -0
  558. package/dist/task-board/components/GoalFindingsTable.d.ts +43 -0
  559. package/dist/task-board/components/GoalFindingsTable.js +160 -0
  560. package/dist/task-board/components/GoalFindingsTable.js.map +1 -0
  561. package/dist/task-board/components/IssuePanel.d.ts +31 -0
  562. package/dist/task-board/components/IssuePanel.js +268 -0
  563. package/dist/task-board/components/IssuePanel.js.map +1 -0
  564. package/dist/task-board/components/ProjectProgressIndicator.d.ts +8 -0
  565. package/dist/task-board/components/ProjectProgressIndicator.js +17 -0
  566. package/dist/task-board/components/ProjectProgressIndicator.js.map +1 -0
  567. package/dist/task-board/components/SubgoalFindings.d.ts +40 -0
  568. package/dist/task-board/components/SubgoalFindings.js +88 -0
  569. package/dist/task-board/components/SubgoalFindings.js.map +1 -0
  570. package/dist/task-board/components/commentAuthor.d.ts +14 -0
  571. package/dist/task-board/components/commentAuthor.js +25 -0
  572. package/dist/task-board/components/commentAuthor.js.map +1 -0
  573. package/dist/task-board/services/issueService.d.ts +193 -0
  574. package/dist/task-board/services/issueService.js +97 -0
  575. package/dist/task-board/services/issueService.js.map +1 -0
  576. package/dist/task-board/taskBlockers.d.ts +10 -0
  577. package/dist/task-board/taskBlockers.js +66 -0
  578. package/dist/task-board/taskBlockers.js.map +1 -0
  579. package/dist/task-board/utils/projectDashboardModel.d.ts +68 -0
  580. package/dist/task-board/utils/projectDashboardModel.js +369 -0
  581. package/dist/task-board/utils/projectDashboardModel.js.map +1 -0
  582. package/dist/task-board/views/ProjectDashboardView.d.ts +28 -0
  583. package/dist/task-board/views/ProjectDashboardView.js +308 -0
  584. package/dist/task-board/views/ProjectDashboardView.js.map +1 -0
  585. package/dist/tour/TourInputBoundary.d.ts +6 -0
  586. package/dist/tour/TourInputBoundary.js +82 -0
  587. package/dist/tour/TourInputBoundary.js.map +1 -0
  588. package/dist/tour/sandbox-tour-copy.d.ts +8 -0
  589. package/dist/tour/sandbox-tour-copy.js +8 -0
  590. package/dist/tour/sandbox-tour-copy.js.map +1 -1
  591. package/dist/tour/sandbox-tour.d.ts +3 -0
  592. package/dist/tour/sandbox-tour.js +112 -6
  593. package/dist/tour/sandbox-tour.js.map +1 -1
  594. package/dist/tour/tour-utils.d.ts +6 -0
  595. package/dist/tour/tour-utils.js +10 -0
  596. package/dist/tour/tour-utils.js.map +1 -1
  597. package/package.json +1 -1
  598. package/dist/editor/page-editor-chrome/bridgeLinkValue.d.ts +0 -10
  599. package/dist/editor/page-editor-chrome/bridgeLinkValue.js +0 -55
  600. package/dist/editor/page-editor-chrome/bridgeLinkValue.js.map +0 -1
@@ -0,0 +1,196 @@
1
+ import { useCallback, useEffect, useMemo, useRef, useState } from "react";
2
+ import { getFeedbackAnchor, } from "../page-editor-chrome/overlay/feedbackAnchorMeasurements";
3
+ import { useFeedbackAnchors } from "../page-editor-chrome/overlay/feedbackAnchorStore";
4
+ import { useOverlayMeasurement } from "../page-editor-chrome/overlay/useOverlayMeasurement";
5
+ import { resolveMarginAnchors, } from "./feedbackMarginLayout";
6
+ import { usePageViewState } from "./pageViewContext";
7
+ /**
8
+ * Remembered anchors are shared by every surface of one page: the margin
9
+ * and the mobile panel are never mounted together, and a thread that lost
10
+ * its measurement in one keeps its place when the other takes over.
11
+ */
12
+ const rememberedAnchors = new Map();
13
+ /**
14
+ * The anchor of every listed thread, with a short memory: a thread that
15
+ * loses its canvas measurement while it is still listed (a suggestion that
16
+ * was just applied or rejected no longer marks the canvas, a page re-render
17
+ * briefly drops a target) keeps its last known anchor, so its card stays
18
+ * beside its text instead of jumping into the "content not shown" footer.
19
+ * Only for a moment, though: text that is really gone (component deleted or
20
+ * hidden) sends its card to the footer once the memory expires.
21
+ */
22
+ export function useRememberedMarginAnchors(threads, measure) {
23
+ const [anchorExpiryEpoch, setAnchorExpiryEpoch] = useState(0);
24
+ const { anchors, nextExpiry } = useMemo(() => resolveMarginAnchors(threads, measure, rememberedAnchors, Date.now()),
25
+ // eslint-disable-next-line react-hooks/exhaustive-deps -- the epoch re-runs the expiry
26
+ [threads, measure, anchorExpiryEpoch]);
27
+ useEffect(() => {
28
+ if (nextExpiry === undefined)
29
+ return;
30
+ const timer = window.setTimeout(() => setAnchorExpiryEpoch((epoch) => epoch + 1), Math.max(0, nextExpiry - Date.now()) + 1);
31
+ return () => window.clearTimeout(timer);
32
+ }, [nextExpiry, anchorExpiryEpoch]);
33
+ return anchors;
34
+ }
35
+ function layerMetricsEqual(a, b) {
36
+ return a.layerHeight === b.layerHeight && a.scrollTop === b.scrollTop;
37
+ }
38
+ /**
39
+ * The canvas as the margin's surface. Anchors come from the canvas overlay's
40
+ * own measurements (published by the highlight components), so a card can
41
+ * only ever sit where its highlight is; the margin does not measure on its
42
+ * own. Must run inside the margin's `IframeOverlayProvider`.
43
+ */
44
+ export function useCanvasMarginSource(pageViewContext) {
45
+ const editorIframe = usePageViewState(pageViewContext, (state) => state.editorIframe);
46
+ const { comments, suggestions } = useFeedbackAnchors(editorIframe);
47
+ const layerMetrics = useOverlayMeasurement((metrics) => {
48
+ const scale = metrics.scrollScale * metrics.visualScale;
49
+ return {
50
+ layerHeight: Math.max(metrics.scrollHeight * scale, metrics.viewportHeight),
51
+ scrollTop: metrics.scrollTop * scale,
52
+ };
53
+ }, [], {
54
+ initialValue: { layerHeight: 0, scrollTop: 0 },
55
+ equals: layerMetricsEqual,
56
+ interests: ["viewport", "layout"],
57
+ });
58
+ const measure = useCallback((thread) => getFeedbackAnchor(thread.kind === "comment"
59
+ ? comments[thread.id]
60
+ : suggestions[thread.id]) ?? undefined, [comments, suggestions]);
61
+ return { measure, layerMetrics };
62
+ }
63
+ const normalizeId = (id) => (id ?? "").replace(/[{}-]/g, "").toLowerCase();
64
+ function getThreadTarget(thread) {
65
+ const target = thread.kind === "comment" ? thread.root : thread.suggestion;
66
+ return { itemId: target.itemId, fieldId: target.fieldId };
67
+ }
68
+ /** Where the label line of a form field sits below the field's top edge. */
69
+ const FORM_FIELD_LEADER_OFFSET = 10;
70
+ /**
71
+ * Anchors every thread to its field in the item form (`[data-field-id]`
72
+ * elements under `form`), in coordinates relative to the form's top. A thread
73
+ * without a field is about the item itself and anchors to the top of the
74
+ * form. Threads whose field is not rendered (a field of another item, a
75
+ * collapsed or hidden section) get no anchor and end up in the margin's
76
+ * footer.
77
+ */
78
+ export function measureFormAnchors(form, threads) {
79
+ const origin = form.getBoundingClientRect();
80
+ const fields = Array.from(form.querySelectorAll("[data-field-id]")).map((element) => ({
81
+ element,
82
+ fieldId: normalizeId(element.getAttribute("data-field-id")),
83
+ itemId: normalizeId(element.getAttribute("data-itemid")),
84
+ }));
85
+ const anchors = {};
86
+ for (const thread of threads) {
87
+ const target = getThreadTarget(thread);
88
+ const itemId = normalizeId(target.itemId);
89
+ if (!target.fieldId) {
90
+ // Every listed thread belongs to the item this form edits, so a thread
91
+ // without a field is about the item as a whole. Its `itemId` is not
92
+ // checked: older comments carry whatever was selected back then.
93
+ anchors[thread.id] = {
94
+ y: 0,
95
+ lineMidY: FORM_FIELD_LEADER_OFFSET,
96
+ xStart: 0,
97
+ xEnd: origin.width,
98
+ height: 0,
99
+ };
100
+ continue;
101
+ }
102
+ const fieldId = normalizeId(target.fieldId);
103
+ const field = fields.find((candidate) => candidate.fieldId === fieldId && candidate.itemId === itemId);
104
+ if (!field)
105
+ continue;
106
+ const rect = field.element.getBoundingClientRect();
107
+ // A field inside a collapsed section is in the DOM without a box.
108
+ if (rect.height <= 0 && rect.width <= 0)
109
+ continue;
110
+ const y = rect.top - origin.top;
111
+ anchors[thread.id] = {
112
+ y,
113
+ lineMidY: y + Math.min(FORM_FIELD_LEADER_OFFSET, rect.height / 2),
114
+ xStart: rect.left - origin.left,
115
+ xEnd: rect.right - origin.left,
116
+ height: rect.height,
117
+ };
118
+ }
119
+ return anchors;
120
+ }
121
+ function anchorsEqual(a, b) {
122
+ const keys = Object.keys(a);
123
+ if (keys.length !== Object.keys(b).length)
124
+ return false;
125
+ return keys.every((key) => {
126
+ const left = a[key];
127
+ const right = b[key];
128
+ return (!!right &&
129
+ Math.abs(left.y - right.y) < 0.5 &&
130
+ Math.abs(left.height - right.height) < 0.5 &&
131
+ Math.abs(left.xEnd - right.xEnd) < 0.5);
132
+ });
133
+ }
134
+ /**
135
+ * The item form as the margin's surface. The column scrolls natively with the
136
+ * form (both live in `scroller`), so anchors are plain offsets from the top
137
+ * of `form`, re-measured whenever the form changes size or structure.
138
+ */
139
+ export function useFormMarginSource(scroller, form, threads) {
140
+ const [anchors, setAnchors] = useState({});
141
+ const [layerMetrics, setLayerMetrics] = useState({
142
+ layerHeight: 0,
143
+ scrollTop: 0,
144
+ });
145
+ const threadsRef = useRef(threads);
146
+ threadsRef.current = threads;
147
+ const measureNow = useCallback(() => {
148
+ if (!scroller || !form)
149
+ return;
150
+ const nextAnchors = measureFormAnchors(form, threadsRef.current);
151
+ setAnchors((current) => anchorsEqual(current, nextAnchors) ? current : nextAnchors);
152
+ const nextMetrics = {
153
+ layerHeight: Math.max(form.offsetHeight, scroller.clientHeight),
154
+ scrollTop: scroller.scrollTop,
155
+ };
156
+ setLayerMetrics((current) => layerMetricsEqual(current, nextMetrics) ? current : nextMetrics);
157
+ }, [scroller, form]);
158
+ useEffect(() => {
159
+ if (!scroller || !form)
160
+ return;
161
+ let frame = null;
162
+ const schedule = () => {
163
+ if (frame != null)
164
+ return;
165
+ frame = window.requestAnimationFrame(() => {
166
+ frame = null;
167
+ measureNow();
168
+ });
169
+ };
170
+ measureNow();
171
+ const resizeObserver = typeof ResizeObserver === "undefined"
172
+ ? null
173
+ : new ResizeObserver(schedule);
174
+ resizeObserver?.observe(form);
175
+ resizeObserver?.observe(scroller);
176
+ const mutationObserver = typeof MutationObserver === "undefined"
177
+ ? null
178
+ : new MutationObserver(schedule);
179
+ mutationObserver?.observe(form, { childList: true, subtree: true });
180
+ scroller.addEventListener("scroll", schedule, { passive: true });
181
+ return () => {
182
+ resizeObserver?.disconnect();
183
+ mutationObserver?.disconnect();
184
+ scroller.removeEventListener("scroll", schedule);
185
+ if (frame != null)
186
+ window.cancelAnimationFrame(frame);
187
+ };
188
+ }, [scroller, form, measureNow]);
189
+ // New or filtered threads need their anchors right away.
190
+ useEffect(() => {
191
+ measureNow();
192
+ }, [threads, measureNow]);
193
+ const measure = useCallback((thread) => anchors[thread.id], [anchors]);
194
+ return { measure, layerMetrics };
195
+ }
196
+ //# sourceMappingURL=feedbackMarginSources.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"feedbackMarginSources.js","sourceRoot":"","sources":["../../../src/editor/page-viewer/feedbackMarginSources.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC1E,OAAO,EAEL,iBAAiB,GAClB,MAAM,0DAA0D,CAAC;AAClE,OAAO,EAAE,kBAAkB,EAAE,MAAM,mDAAmD,CAAC;AACvF,OAAO,EAAE,qBAAqB,EAAE,MAAM,qDAAqD,CAAC;AAM5F,OAAO,EAEL,oBAAoB,GACrB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAwB,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAE3E;;;;GAIG;AACH,MAAM,iBAAiB,GAAG,IAAI,GAAG,EAA4B,CAAC;AAE9D;;;;;;;;GAQG;AACH,MAAM,UAAU,0BAA0B,CACxC,OAAkC,EAClC,OAA+D;IAE/D,MAAM,CAAC,iBAAiB,EAAE,oBAAoB,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC;IAC9D,MAAM,EAAE,OAAO,EAAE,UAAU,EAAE,GAAG,OAAO,CACrC,GAAG,EAAE,CAAC,oBAAoB,CAAC,OAAO,EAAE,OAAO,EAAE,iBAAiB,EAAE,IAAI,CAAC,GAAG,EAAE,CAAC;IAC3E,uFAAuF;IACvF,CAAC,OAAO,EAAE,OAAO,EAAE,iBAAiB,CAAC,CACtC,CAAC;IACF,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,UAAU,K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AE,CAAC,EAC9C,CAAC,OAAO,CAAC,CACV,CAAC;IAEF,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,CAAC;AACnC,CAAC"}
@@ -0,0 +1,43 @@
1
+ /** Width of the full column unless the user resized it. */
2
+ export declare const FEEDBACK_MARGIN_DEFAULT_WIDTH = 320;
3
+ /** The full column narrows down to this before it collapses into the rail. */
4
+ export declare const FEEDBACK_MARGIN_MIN_WIDTH = 200;
5
+ /** The widest the user can drag the column. */
6
+ export declare const FEEDBACK_MARGIN_MAX_WIDTH = 640;
7
+ /** Width of the rail of markers the column collapses into. */
8
+ export declare const FEEDBACK_MARGIN_RAIL_WIDTH = 40;
9
+ /**
10
+ * Dragging the column's edge below this collapses it into the rail, and
11
+ * dragging the rail's edge past it opens the column again. Halfway between
12
+ * the two, so a drag holds the column at its minimum before it snaps.
13
+ */
14
+ export declare const FEEDBACK_MARGIN_COLLAPSE_WIDTH: number;
15
+ /** Arrow keys on the resize handle move the edge by this much. */
16
+ export declare const FEEDBACK_MARGIN_RESIZE_STEP = 16;
17
+ export declare function clampFeedbackMarginWidth(width: number, limit?: number): number;
18
+ export declare function getFeedbackMarginPreferredWidth(): number;
19
+ /**
20
+ * The width the user gave the comment margin, shared by the canvas and the
21
+ * form margin and kept per browser. It is a preference: a pane without room
22
+ * for it still narrows the column or shows the rail.
23
+ */
24
+ export declare function useFeedbackMarginPreferredWidth(): number;
25
+ /**
26
+ * Whether the user collapsed the canvas margin into its rail by dragging its
27
+ * edge past the minimum; kept per browser. The preferred width is kept for
28
+ * when the column opens again.
29
+ */
30
+ export declare function useFeedbackMarginCollapsed(): boolean;
31
+ /**
32
+ * `persist: false` while dragging (every pointer move re-renders the column);
33
+ * the drag's end stores the final width.
34
+ */
35
+ export declare function setFeedbackMarginPreferredWidth(width: number, { persist }?: {
36
+ persist?: boolean;
37
+ }): void;
38
+ /** `persist` as for setFeedbackMarginPreferredWidth. */
39
+ export declare function setFeedbackMarginCollapsed(next: boolean, { persist }?: {
40
+ persist?: boolean;
41
+ }): void;
42
+ /** Test hook: forget the cached state so the next read hits storage again. */
43
+ export declare function resetFeedbackMarginPreferredWidthForTests(): void;
@@ -0,0 +1,107 @@
1
+ import { useSyncExternalStore } from "react";
2
+ import { localStorageService } from "../services/localStorageService";
3
+ /** Width of the full column unless the user resized it. */
4
+ export const FEEDBACK_MARGIN_DEFAULT_WIDTH = 320;
5
+ /** The full column narrows down to this before it collapses into the rail. */
6
+ export const FEEDBACK_MARGIN_MIN_WIDTH = 200;
7
+ /** The widest the user can drag the column. */
8
+ export const FEEDBACK_MARGIN_MAX_WIDTH = 640;
9
+ /** Width of the rail of markers the column collapses into. */
10
+ export const FEEDBACK_MARGIN_RAIL_WIDTH = 40;
11
+ /**
12
+ * Dragging the column's edge below this collapses it into the rail, and
13
+ * dragging the rail's edge past it opens the column again. Halfway between
14
+ * the two, so a drag holds the column at its minimum before it snaps.
15
+ */
16
+ export const FEEDBACK_MARGIN_COLLAPSE_WIDTH = (FEEDBACK_MARGIN_MIN_WIDTH + FEEDBACK_MARGIN_RAIL_WIDTH) / 2;
17
+ /** Arrow keys on the resize handle move the edge by this much. */
18
+ export const FEEDBACK_MARGIN_RESIZE_STEP = 16;
19
+ const STORAGE_KEY = "editor.feedbackMargin.width";
20
+ const COLLAPSED_STORAGE_KEY = "editor.feedbackMargin.collapsed";
21
+ export function clampFeedbackMarginWidth(width, limit) {
22
+ const max = limit === undefined || !Number.isFinite(limit)
23
+ ? FEEDBACK_MARGIN_MAX_WIDTH
24
+ : Math.min(FEEDBACK_MARGIN_MAX_WIDTH, Math.floor(limit));
25
+ // The minimum wins over a pane too narrow for it; that pane shows the rail.
26
+ return Math.max(FEEDBACK_MARGIN_MIN_WIDTH, Math.min(max, Math.round(width)));
27
+ }
28
+ function readStoredWidth() {
29
+ const stored = localStorageService.getItem(STORAGE_KEY);
30
+ return typeof stored === "number" && Number.isFinite(stored)
31
+ ? clampFeedbackMarginWidth(stored)
32
+ : FEEDBACK_MARGIN_DEFAULT_WIDTH;
33
+ }
34
+ let preferredWidth;
35
+ let collapsed;
36
+ const listeners = new Set();
37
+ export function getFeedbackMarginPreferredWidth() {
38
+ preferredWidth ??= readStoredWidth();
39
+ return preferredWidth;
40
+ }
41
+ function getCollapsed() {
42
+ collapsed ??=
43
+ localStorageService.getItem(COLLAPSED_STORAGE_KEY) === true;
44
+ return collapsed;
45
+ }
46
+ function subscribe(listener) {
47
+ listeners.add(listener);
48
+ return () => {
49
+ listeners.delete(listener);
50
+ };
51
+ }
52
+ /**
53
+ * The width the user gave the comment margin, shared by the canvas and the
54
+ * form margin and kept per browser. It is a preference: a pane without room
55
+ * for it still narrows the column or shows the rail.
56
+ */
57
+ export function useFeedbackMarginPreferredWidth() {
58
+ return useSyncExternalStore(subscribe, getFeedbackMarginPreferredWidth, getFeedbackMarginPreferredWidth);
59
+ }
60
+ /**
61
+ * Whether the user collapsed the canvas margin into its rail by dragging its
62
+ * edge past the minimum; kept per browser. The preferred width is kept for
63
+ * when the column opens again.
64
+ */
65
+ export function useFeedbackMarginCollapsed() {
66
+ return useSyncExternalStore(subscribe, getCollapsed, getCollapsed);
67
+ }
68
+ /**
69
+ * `persist: false` while dragging (every pointer move re-renders the column);
70
+ * the drag's end stores the final width.
71
+ */
72
+ export function setFeedbackMarginPreferredWidth(width, { persist = true } = {}) {
73
+ const next = clampFeedbackMarginWidth(width);
74
+ if (persist) {
75
+ if (next === FEEDBACK_MARGIN_DEFAULT_WIDTH) {
76
+ localStorageService.removeItem(STORAGE_KEY);
77
+ }
78
+ else {
79
+ localStorageService.setItem(STORAGE_KEY, next);
80
+ }
81
+ }
82
+ if (next === preferredWidth)
83
+ return;
84
+ preferredWidth = next;
85
+ listeners.forEach((listener) => listener());
86
+ }
87
+ /** `persist` as for setFeedbackMarginPreferredWidth. */
88
+ export function setFeedbackMarginCollapsed(next, { persist = true } = {}) {
89
+ if (persist) {
90
+ if (next) {
91
+ localStorageService.setItem(COLLAPSED_STORAGE_KEY, true);
92
+ }
93
+ else {
94
+ localStorageService.removeItem(COLLAPSED_STORAGE_KEY);
95
+ }
96
+ }
97
+ if (next === getCollapsed())
98
+ return;
99
+ collapsed = next;
100
+ listeners.forEach((listener) => listener());
101
+ }
102
+ /** Test hook: forget the cached state so the next read hits storage again. */
103
+ export function resetFeedbackMarginPreferredWidthForTests() {
104
+ preferredWidth = undefined;
105
+ collapsed = undefined;
106
+ }
107
+ //# sourceMappingURL=feedbackMarginWidth.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"feedbackMarginWidth.js","sourceRoot":"","sources":["../../../src/editor/page-viewer/feedbackMarginWidth.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,OAAO,CAAC;AAC7C,OAAO,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AAEtE,2DAA2D;AAC3D,MAAM,CAAC,MAAM,6BAA6B,GAAG,GAAG,CAAC;AACjD,8EAA8E;AAC9E,MAAM,CAAC,MAAM,yBAAyB,GAAG,GAAG,CAAC;AAC7C,+CAA+C;AAC/C,MAAM,CAAC,MAAM,yBAAyB,GAAG,GAAG,CAAC;AAC7C,8DAA8D;AAC9D,MAAM,CAAC,MAAM,0BAA0B,GAAG,EAAE,CAAC;AAC7C;;;;GAIG;AACH,MAAM,CAAC,MAAM,8BAA8B,GACzC,CAAC,yBAAyB,GAAG,0BAA0B,CAAC,GAAG,CAAC,CAAC;AAC/D,kEAAkE;AAClE,MAAM,CAAC,MAAM,2BAA2B,GAAG,EAAE,CAAC;AAE9C,MAAM,WAAW,GAAG,6BAA6B,CAAC;AAClD,MAAM,qBAAqB,GAAG,iCAAiC,CAAC;AAEhE,MAAM,UAAU,wBAAwB,CAAC,KAAa,EAAE,KAAc;IACpE,MAAM,GAAG,GACP,KAAK,KAAK,SAAS,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC;QAC5C,CAAC,CAAC,yBAAyB;QAC3B,CAAC,CAAC,IAAI,CA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1
+ /**
2
+ * Interactive preview: running the client code of dynamic renderings safely,
3
+ * and finding the page's dynamic renderings for the preview strip.
4
+ *
5
+ * The client code of a rendering runs in the edit and preview canvas only once
6
+ * an administrator approved it: the canvas lives on the CM origin with the
7
+ * user's session. The rendering host wraps every
8
+ * dynamic rendering in `<div data-parhelia-rendering="<renderingId>">` and, in
9
+ * preview mode, marks a page that has client code with
10
+ * `<script data-parhelia-has-client-code="<renderingId>,...">`. To try client
11
+ * code that is not approved, the review dialog mints a short-lived preview
12
+ * token and shows a fresh iframe with `sandbox="allow-scripts"` only (an opaque
13
+ * origin: no cookies, no access to the editor) that loads the page through the
14
+ * token's capability URL, where all client code runs. The canvas itself is
15
+ * never replaced.
16
+ *
17
+ * This module holds the pure parts: reading the canvas, building the URLs, the
18
+ * token refresh rule and the session state.
19
+ */
20
+ export declare const CLIENT_CODE_HINT_ATTRIBUTE = "data-parhelia-has-client-code";
21
+ export declare const CLIENT_CODE_HINT_SELECTOR = "script[data-parhelia-has-client-code]";
22
+ /** The wrapper the rendering host puts around every dynamic rendering. */
23
+ export declare const DYNAMIC_RENDERING_ATTRIBUTE = "data-parhelia-rendering";
24
+ export declare const DYNAMIC_RENDERING_SELECTOR = "[data-parhelia-rendering]";
25
+ /** The only sandbox flags the interactive frame gets. */
26
+ export declare const INTERACTIVE_PREVIEW_SANDBOX = "allow-scripts";
27
+ export declare const PREVIEW_TOKEN_ENDPOINT = "/parhelia/renderings/previewToken";
28
+ export declare const INTERACTIVE_PREVIEW_PATH_PREFIX = "/parhelia/preview/";
29
+ /** A token is renewed before a reload once it is this close to expiring. */
30
+ export declare const PREVIEW_TOKEN_REFRESH_MARGIN_SECONDS = 120;
31
+ export type InteractivePreviewPage = {
32
+ id: string;
33
+ language: string;
34
+ version: number;
35
+ };
36
+ export type PreviewTokenResponse = {
37
+ token: string;
38
+ prefix: string;
39
+ expiresInSeconds: number;
40
+ };
41
+ export type InteractivePreviewSession = {
42
+ /** The token's capability path, validated, without a trailing slash. */
43
+ prefix: string;
44
+ expiresInSeconds: number;
45
+ /** Epoch milliseconds at which the token was minted. */
46
+ mintedAt: number;
47
+ };
48
+ /** A GUID in lower-case "D" format, or undefined when the value is none. */
49
+ export declare function normalizeRenderingId(value: string | null | undefined): string | undefined;
50
+ /**
51
+ * Rendering ids from one or more attribute values: comma-separated, limited to
52
+ * well-formed GUIDs, normalized and de-duplicated in order of appearance.
53
+ */
54
+ export declare function parseRenderingIds(values: ReadonlyArray<string | null | undefined>): string[];
55
+ export type CanvasRenderings = {
56
+ /** Every dynamic rendering on the page (wrappers and the hint). */
57
+ renderingIds: string[];
58
+ /** The renderings the host marked as having client code. */
59
+ clientCodeIds: string[];
60
+ };
61
+ export declare const NO_CANVAS_RENDERINGS: CanvasRenderings;
62
+ /**
63
+ * The dynamic renderings in the canvas document. The canvas is normally
64
+ * same-origin with the editor; any other frame (cross-origin, opaque,
65
+ * detached) yields none.
66
+ */
67
+ export declare function readCanvasRenderings(iframe: HTMLIFrameElement | null | undefined): CanvasRenderings;
68
+ export declare function sameRenderingIds(left: readonly string[], right: readonly string[]): boolean;
69
+ export declare function buildPreviewTokenUrl(page: InteractivePreviewPage): string;
70
+ /**
71
+ * The token's prefix as a same-origin preview path without a trailing slash,
72
+ * or undefined for anything else.
73
+ */
74
+ export declare function normalizePreviewPrefix(prefix: unknown, origin?: string): string | undefined;
75
+ /**
76
+ * The interactive frame's URL: the token prefix, then exactly "/" and the
77
+ * query the preview canvas uses, without the editor's own markers. IIS
78
+ * rejects paths longer than 260 characters and the token alone takes about
79
+ * half of that, so the page's route path is never appended: the host resolves
80
+ * the page by its item id (the `route` parameter rides along when the canvas
81
+ * has one). The page context always names the version the token was minted
82
+ * for. Returns undefined for a prefix that is not a same-origin preview path.
83
+ */
84
+ export declare function buildInteractivePreviewFrameUrl(prefix: string, page: InteractivePreviewPage, canvasUrl?: string, origin?: string): string | undefined;
85
+ /**
86
+ * Whether a token must be renewed before the frame is (re)loaded: once it is
87
+ * older than its lifetime minus the refresh margin. Time alone never reloads
88
+ * the frame; this is only consulted when the editor reloads it anyway.
89
+ */
90
+ export declare function isPreviewTokenDue(session: Pick<InteractivePreviewSession, "mintedAt" | "expiresInSeconds">, now: number): boolean;
91
+ export declare function isPreviewTokenResponse(value: unknown): value is PreviewTokenResponse;
92
+ export declare function createInteractivePreviewSession(response: PreviewTokenResponse, mintedAt: number, origin?: string): InteractivePreviewSession | undefined;
93
+ export declare function getInteractivePreviewPageKey(page: InteractivePreviewPage | undefined): string | undefined;
94
+ export type InteractivePreviewStatus = "off" | "starting" | "on";
95
+ export type CanvasRenderingsHint = CanvasRenderings & {
96
+ /** The page whose canvas document the renderings were read from. */
97
+ pageKey?: string;
98
+ };
99
+ export type InteractivePreviewState = {
100
+ status: InteractivePreviewStatus;
101
+ /** The page (see getInteractivePreviewPageKey) the session belongs to. */
102
+ pageKey?: string;
103
+ session?: InteractivePreviewSession;
104
+ /**
105
+ * The preview canvas URL whose query the interactive frame uses. It only
106
+ * changes together with the frame key, so a running frame never navigates.
107
+ */
108
+ canvasUrl?: string;
109
+ /**
110
+ * React key of the interactive iframe. It changes on every (re)load: a
111
+ * sandbox attribute only applies to a fresh iframe element, and a fresh
112
+ * element is also the simplest way to reload an opaque-origin frame.
113
+ */
114
+ frameKey: number;
115
+ /** The token request whose response is awaited, if any. */
116
+ pendingRequestId?: number;
117
+ /** The renderings last read from the normal preview canvas. */
118
+ hint: CanvasRenderingsHint;
119
+ };
120
+ export type InteractivePreviewAction = {
121
+ type: "start";
122
+ pageKey: string;
123
+ requestId: number;
124
+ } | {
125
+ type: "refreshStarted";
126
+ requestId: number;
127
+ } | {
128
+ type: "minted";
129
+ requestId: number;
130
+ session: InteractivePreviewSession;
131
+ canvasUrl?: string;
132
+ } | {
133
+ type: "mintFailed";
134
+ requestId: number;
135
+ } | {
136
+ type: "remount";
137
+ canvasUrl?: string;
138
+ } | {
139
+ type: "stop";
140
+ } | {
141
+ type: "hint";
142
+ pageKey: string | undefined;
143
+ renderings: CanvasRenderings;
144
+ };
145
+ export declare const INITIAL_INTERACTIVE_PREVIEW_STATE: InteractivePreviewState;
146
+ export declare function interactivePreviewReducer(state: InteractivePreviewState, action: InteractivePreviewAction): InteractivePreviewState;
147
+ export type InteractivePreviewContext = {
148
+ mode: string | undefined;
149
+ pageKey: string | undefined;
150
+ };
151
+ /**
152
+ * Whether the interactive frame replaces the canvas right now. Derived rather
153
+ * than stored so that leaving preview mode or opening another page returns to
154
+ * the normal canvas in the same render, before any cleanup has run.
155
+ */
156
+ export declare function isInteractivePreviewActive(state: InteractivePreviewState, context: InteractivePreviewContext): boolean;
157
+ /** A running or starting session that no longer matches the canvas ends. */
158
+ export declare function shouldStopInteractivePreview(state: InteractivePreviewState, context: InteractivePreviewContext): boolean;
159
+ /**
160
+ * The rendering ids "Run client code" is offered for: only in preview mode,
161
+ * and only those read from the canvas of the page that is open now.
162
+ */
163
+ export declare function getOfferedClientCodeRenderings(state: InteractivePreviewState, context: InteractivePreviewContext): string[];
164
+ /**
165
+ * The page's dynamic renderings the preview strip lists, under the same
166
+ * conditions as getOfferedClientCodeRenderings.
167
+ */
168
+ export declare function getPreviewRenderingIds(state: InteractivePreviewState, context: InteractivePreviewContext): string[];