@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,633 @@
1
+ import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useCallback, useEffect, useMemo, useRef, useState } from "react";
3
+ import { AlertTriangle, Check, ChevronLeft, ChevronRight, Info, Replace, RotateCcw, Sparkles, } from "lucide-react";
4
+ import { Dialog, DialogContent } from "../../components/ui/dialog";
5
+ import { StyledDialogTitle } from "../../components/ui/styled-dialog-title";
6
+ import { Button } from "../../components/ui/button";
7
+ import { Select } from "../../components/ui/select";
8
+ import { Textarea } from "../../components/ui/textarea";
9
+ import { sanitizeHtml } from "../../lib/sanitize";
10
+ import { Alert, AlertDescription } from "../../components/ui/alert";
11
+ import { MultiSwitchButton } from "../../components/ui/multi-switch-button";
12
+ import { useEditContext } from "../client/editContext";
13
+ import DialogButtons from "../ui/DialogButtons";
14
+ import { LoadingState } from "../ui/LoadingState";
15
+ import { Spinner } from "../ui/Spinner";
16
+ import { buildClientRows, buildConversions, buildCurrentValues, clearLanguageValues, countPendingAiWrites, createDialogState, encodeRowValue, getLostFields, getMergedSourceIds, getRowOptions, getVisibleChildren, humanizePlaceholder, isAiRow, mergeRefinedPlan, normalizeId, setPreview, updateChild, updateRole, updateRow, } from "./conversionModel";
17
+ import { planComponentConversion, previewConversionValue } from "./conversionService";
18
+ import { ConversionAiDebugButton } from "./ConversionAiDebugButton";
19
+ const MODEL_STORAGE_KEY = "convertComponent.modelId";
20
+ function readStoredModelId() {
21
+ try {
22
+ return window.localStorage.getItem(MODEL_STORAGE_KEY) ?? undefined;
23
+ }
24
+ catch {
25
+ return undefined;
26
+ }
27
+ }
28
+ function storeModelId(modelId) {
29
+ try {
30
+ window.localStorage.setItem(MODEL_STORAGE_KEY, modelId);
31
+ }
32
+ catch {
33
+ // Remembering the model is a convenience only.
34
+ }
35
+ }
36
+ /**
37
+ * Reviews and adjusts a component conversion before it runs. One AI call maps
38
+ * the fields and writes the texts of every component in every language; the
39
+ * user steers it with instructions, picks the model and can change any row.
40
+ * Returns the operation's conversions; nothing is written here.
41
+ */
42
+ export function ConvertComponentDialog(props) {
43
+ const { pageItem, componentIds, target } = props;
44
+ const editContext = useEditContext();
45
+ const showDebug = editContext?.userInfo?.preferences?.showDebugButtons ?? false;
46
+ const [plan, setPlan] = useState(null);
47
+ const [state, setState] = useState(null);
48
+ const [error, setError] = useState(null);
49
+ const [loading, setLoading] = useState(true);
50
+ const [mode, setMode] = useState(undefined);
51
+ const [refine, setRefine] = useState("idle");
52
+ const [refineError, setRefineError] = useState(null);
53
+ const [instructions, setInstructions] = useState([]);
54
+ const [draft, setDraft] = useState("");
55
+ const [activeItems, setActiveItems] = useState({});
56
+ const [pendingPreviews, setPendingPreviews] = useState({});
57
+ const [modelId, setModelId] = useState(readStoredModelId);
58
+ const [aiCalls, setAiCalls] = useState([]);
59
+ const modelIdRef = useRef(modelId);
60
+ modelIdRef.current = modelId;
61
+ /** Shows the model the server used, e.g. its default when a remembered one is gone. */
62
+ const syncModel = useCallback((effective) => {
63
+ modelIdRef.current = effective;
64
+ setModelId(effective);
65
+ }, []);
66
+ const controllerRef = useRef(null);
67
+ const refineControllerRef = useRef(null);
68
+ const previewSequence = useRef({});
69
+ const requestRefine = useCallback(async (request) => {
70
+ refineControllerRef.current?.abort();
71
+ const controller = new AbortController();
72
+ refineControllerRef.current = controller;
73
+ controllerRef.current?.signal.addEventListener("abort", () => controller.abort(), {
74
+ once: true,
75
+ });
76
+ setRefine("running");
77
+ setRefineError(null);
78
+ const result = await planComponentConversion({
79
+ page: pageItem,
80
+ componentIds,
81
+ targetTypeId: target.typeId,
82
+ mode: request.plan.mode,
83
+ useAi: true,
84
+ instructions: request.instructions,
85
+ currentMappings: request.force ? buildClientRows(request.plan, request.state) : undefined,
86
+ currentValues: request.force ? buildCurrentValues(request.plan, request.state) : undefined,
87
+ activeItems: request.activeItems,
88
+ modelId: modelIdRef.current,
89
+ includeAiDebug: showDebug,
90
+ }, controller.signal);
91
+ if (controller.signal.aborted)
92
+ return false;
93
+ if (result.type !== "success" || !result.data) {
94
+ setRefine("error");
95
+ setRefineError(result.summary ?? "The AI is unavailable.");
96
+ return false;
97
+ }
98
+ const refined = result.data;
99
+ setAiCalls(refined.aiCalls ?? []);
100
+ syncModel(refined.modelId);
101
+ if (!refined.aiApplied) {
102
+ setRefine("error");
103
+ setRefineError(refined.aiError ?? "The AI is unavailable.");
104
+ return false;
105
+ }
106
+ setPlan((current) => current
107
+ ? {
108
+ ...current,
109
+ groups: refined.groups,
110
+ items: current.items.map((item) => refined.items.find((r) => r.key === item.key) ?? item),
111
+ aiApplied: true,
112
+ models: refined.models,
113
+ modelId: refined.modelId,
114
+ }
115
+ : current);
116
+ setState((current) => current ? mergeRefinedPlan(current, refined, { force: request.force }) : current);
117
+ setRefine("done");
118
+ return true;
119
+ }, [pageItem, componentIds, target.typeId, showDebug, syncModel]);
120
+ const requestPlan = useCallback(async (requestedMode, aiInstructions) => {
121
+ controllerRef.current?.abort();
122
+ refineControllerRef.current?.abort();
123
+ const controller = new AbortController();
124
+ controllerRef.current = controller;
125
+ setLoading(true);
126
+ setError(null);
127
+ setRefine("idle");
128
+ setRefineError(null);
129
+ setPendingPreviews({});
130
+ const result = await planComponentConversion({
131
+ page: pageItem,
132
+ componentIds,
133
+ targetTypeId: target.typeId,
134
+ mode: requestedMode,
135
+ modelId: modelIdRef.current,
136
+ }, controller.signal);
137
+ if (controller.signal.aborted)
138
+ return;
139
+ if (result.type !== "success" || !result.data) {
140
+ setError(result.summary ?? result.details ?? "The conversion could not be planned.");
141
+ setLoading(false);
142
+ return;
143
+ }
144
+ const nextPlan = result.data;
145
+ syncModel(nextPlan.modelId);
146
+ const nextState = createDialogState(nextPlan);
147
+ const nextActive = Object.fromEntries(nextPlan.groups.map((g) => [g.key, g.itemKeys[0] ?? ""]));
148
+ setPlan(nextPlan);
149
+ setMode(nextPlan.mode);
150
+ setState(nextState);
151
+ setActiveItems(nextActive);
152
+ setLoading(false);
153
+ // The AI maps and writes right away; the name-and-type plan shows meanwhile.
154
+ if (nextPlan.aiAvailable && nextPlan.aiSuggested) {
155
+ void requestRefine({
156
+ plan: nextPlan,
157
+ state: nextState,
158
+ activeItems: nextActive,
159
+ instructions: aiInstructions,
160
+ force: false,
161
+ });
162
+ }
163
+ }, [pageItem, componentIds, target.typeId, requestRefine, syncModel]);
164
+ useEffect(() => {
165
+ void requestPlan(undefined, []);
166
+ return () => {
167
+ controllerRef.current?.abort();
168
+ refineControllerRef.current?.abort();
169
+ };
170
+ }, [requestPlan]);
171
+ const itemsByKey = useMemo(() => new Map((plan?.items ?? []).map((item) => [item.key, item])), [plan]);
172
+ /** Marks preview keys pending; returns a check whether this request is still the latest for a key. */
173
+ const beginPreviews = (keys) => {
174
+ const sequences = keys.map((key) => {
175
+ const sequence = (previewSequence.current[key] ?? 0) + 1;
176
+ previewSequence.current[key] = sequence;
177
+ return sequence;
178
+ });
179
+ setPendingPreviews((current) => ({
180
+ ...current,
181
+ ...Object.fromEntries(keys.map((key) => [key, true])),
182
+ }));
183
+ return (key) => previewSequence.current[key] === sequences[keys.indexOf(key)];
184
+ };
185
+ const endPreviews = (keys) => setPendingPreviews((current) => {
186
+ const next = { ...current };
187
+ for (const key of keys)
188
+ delete next[key];
189
+ return next;
190
+ });
191
+ const fetchPreview = async (group, item, field, row) => {
192
+ if (!plan || !row.sourceKey || row.mode === "empty")
193
+ return;
194
+ const option = group.sourceFields.find((o) => o.key === row.sourceKey);
195
+ if (!option)
196
+ return;
197
+ const sourceComponentId = option.componentId ?? item.sourceComponentIds[0] ?? item.anchorComponentId;
198
+ const key = `${item.key}:${field.id}`;
199
+ const isLatest = beginPreviews([key]);
200
+ const result = await previewConversionValue({
201
+ page: pageItem,
202
+ sourceComponentId,
203
+ sourceFieldId: option.fieldId,
204
+ targetTypeId: plan.target.typeId,
205
+ targetFieldId: field.id,
206
+ mode: row.mode,
207
+ instruction: row.instruction,
208
+ modelId: plan.modelId,
209
+ }, controllerRef.current?.signal);
210
+ if (controllerRef.current?.signal.aborted || !isLatest(key))
211
+ return;
212
+ endPreviews([key]);
213
+ const preview = result.type === "success" && result.data?.preview
214
+ ? result.data.preview
215
+ : { hasValue: false, error: result.data?.error ?? result.summary ?? "Preview failed." };
216
+ setState((current) => (current ? setPreview(current, item.key, field.id, preview) : current));
217
+ };
218
+ /**
219
+ * Runs the AI again on the dialog as it is: one call that keeps the user's
220
+ * rows and writes every AI field of every component and language.
221
+ */
222
+ const rerunAi = (basePlan, baseState) => requestRefine({ plan: basePlan, state: baseState, activeItems, instructions, force: true });
223
+ const changeRow = (group, field, sourceKey, rowMode, instruction) => {
224
+ if (!plan || !state)
225
+ return;
226
+ const effectiveMode = rowMode === "generate" ? "generate" : sourceKey ? rowMode : "empty";
227
+ const row = {
228
+ sourceKey: effectiveMode === "generate" ? null : sourceKey,
229
+ mode: effectiveMode,
230
+ instruction,
231
+ uses: undefined,
232
+ origin: "user",
233
+ };
234
+ let next = clearLanguageValues(updateRow(state, group.key, field.id, row), group.itemKeys, field.id);
235
+ // Copies read straight from the source preview; conversions ask the server
236
+ // for the instance on screen; AI fields run the AI for all of them.
237
+ for (const itemKey of group.itemKeys) {
238
+ const item = itemsByKey.get(itemKey);
239
+ if (!item)
240
+ continue;
241
+ if (effectiveMode === "empty") {
242
+ next = setPreview(next, itemKey, field.id, { hasValue: false });
243
+ }
244
+ else if (effectiveMode === "copy" && sourceKey) {
245
+ next = setPreview(next, itemKey, field.id, item.sourceValues[sourceKey] ?? { hasValue: false });
246
+ }
247
+ else {
248
+ const previews = { ...(next.previews[itemKey] ?? {}) };
249
+ delete previews[field.id];
250
+ next = { ...next, previews: { ...next.previews, [itemKey]: previews } };
251
+ }
252
+ }
253
+ setState(next);
254
+ if (effectiveMode === "generate") {
255
+ void rerunAi(plan, next);
256
+ return;
257
+ }
258
+ const activeKey = activeItems[group.key];
259
+ const activeItem = activeKey ? itemsByKey.get(activeKey) : undefined;
260
+ if (!activeItem)
261
+ return;
262
+ if (effectiveMode === "convert" || effectiveMode === "rewrite") {
263
+ void fetchPreview(group, activeItem, field, row);
264
+ }
265
+ };
266
+ const switchInstance = (group, direction) => {
267
+ if (!state || !plan)
268
+ return;
269
+ const keys = group.itemKeys;
270
+ const index = keys.indexOf(activeItems[group.key] ?? keys[0]);
271
+ const nextKey = keys[(index + direction + keys.length) % keys.length];
272
+ setActiveItems((current) => ({ ...current, [group.key]: nextKey }));
273
+ // Conversions this instance has not shown yet; its AI fields are already written.
274
+ const item = itemsByKey.get(nextKey);
275
+ if (!item)
276
+ return;
277
+ for (const field of plan.target.fields) {
278
+ const row = state.rows[group.key]?.[field.id];
279
+ if (row?.mode === "convert" && !state.previews[nextKey]?.[field.id]) {
280
+ void fetchPreview(group, item, field, row);
281
+ }
282
+ }
283
+ };
284
+ const changeModel = (nextModelId) => {
285
+ if (!plan || !state || nextModelId === (modelId ?? plan.modelId))
286
+ return;
287
+ setModelId(nextModelId);
288
+ modelIdRef.current = nextModelId;
289
+ storeModelId(nextModelId);
290
+ void rerunAi(plan, state);
291
+ };
292
+ const submitInstruction = async () => {
293
+ if (!plan || !state || refine === "running")
294
+ return;
295
+ const text = draft.trim();
296
+ const next = text ? [...instructions, text] : instructions;
297
+ const applied = await requestRefine({ plan, state, activeItems, instructions: next, force: true });
298
+ if (applied) {
299
+ setInstructions(next);
300
+ setDraft("");
301
+ }
302
+ };
303
+ const startOver = () => {
304
+ setInstructions([]);
305
+ setDraft("");
306
+ void requestPlan(plan?.mode, []);
307
+ };
308
+ const pendingAiWrites = plan && state ? countPendingAiWrites(plan, state) : 0;
309
+ const conversions = plan && state ? buildConversions(plan, state) : [];
310
+ const canConvert = !!plan &&
311
+ !!state &&
312
+ !loading &&
313
+ refine !== "running" &&
314
+ conversions.length > 0 &&
315
+ conversions.every((c) => (c.sourceComponentIds?.length ?? 0) > 0 || (c.childActions?.length ?? 0) > 0);
316
+ const convert = () => {
317
+ if (!plan || !state || !canConvert)
318
+ return;
319
+ const count = componentIds.length;
320
+ const title = plan.mode === "merge"
321
+ ? `Merge ${count} components into ${plan.target.name}`
322
+ : count === 1
323
+ ? `Convert ${props.selectionLabel} to ${plan.target.name}`
324
+ : `Convert ${count} components to ${plan.target.name}`;
325
+ props.onClose?.({ mode: plan.mode, conversions, title, instructions, modelId: plan.modelId });
326
+ };
327
+ const subtitle = componentIds.length === 1
328
+ ? props.selectionLabel
329
+ : mode === "merge"
330
+ ? `${componentIds.length} components into one`
331
+ : `${componentIds.length} components`;
332
+ const warnings = plan?.notes.filter((n) => n.kind === "warning") ?? [];
333
+ const infos = plan?.notes.filter((n) => n.kind !== "warning") ?? [];
334
+ return (_jsx(Dialog, { open: true, onOpenChange: (open) => {
335
+ if (!open)
336
+ props.onClose?.(null);
337
+ }, children: _jsxs(DialogContent, { "data-testid": "convert-component-dialog", className: "flex flex-col overflow-hidden border-none p-0 shadow-2xl", style: { width: "min(900px, 95vw)", maxHeight: "90vh" }, children: [_jsx(StyledDialogTitle, { icon: _jsx(Replace, { strokeWidth: 1 }), title: props.sourceTypeName
338
+ ? `Convert from ${props.sourceTypeName} to ${target.name}`
339
+ : `Convert to ${target.name}`, subtitle: subtitle }), loading ? (_jsx(LoadingState, { message: "Planning the conversion...", className: "py-20" })) : error || !plan || !state ? (_jsx("div", { className: "bg-white px-6 py-6", children: _jsxs(Alert, { variant: "destructive", "data-testid": "convert-component-error", children: [_jsx(AlertTriangle, { className: "h-4 w-4" }), _jsx(AlertDescription, { children: error ?? "The conversion could not be planned." })] }) })) : (_jsx("div", { className: "flex min-h-0 flex-1 flex-col overflow-y-auto bg-white", children: _jsxs("div", { className: "space-y-6 px-6 pt-4 pb-6", children: [componentIds.length > 1 && (_jsx("section", { className: "flex flex-wrap items-center gap-3", children: plan.canMerge ? (_jsx(MultiSwitchButton, { value: plan.mode, testId: "convert-component-mode", className: "w-[340px]", "aria-label": "Conversion mode", onValueChange: (value) => {
340
+ if (value !== plan.mode)
341
+ void requestPlan(value, instructions);
342
+ }, options: [
343
+ {
344
+ value: "each",
345
+ label: `Convert each (${componentIds.length})`,
346
+ testId: "convert-component-mode-each",
347
+ },
348
+ {
349
+ value: "merge",
350
+ label: "Merge into one",
351
+ testId: "convert-component-mode-merge",
352
+ },
353
+ ] })) : (_jsx("span", { className: "text-muted-foreground text-xs", children: plan.cannotMergeReason ?? "Each component is converted on its own." })) })), plan.aiAvailable && (_jsx(AiInstructions, { refine: refine, error: refineError, models: plan.models ?? [], modelId: modelId ?? plan.modelId, onModelChange: changeModel, aiCalls: showDebug ? aiCalls : undefined, instructions: instructions, draft: draft, onDraftChange: setDraft, onSubmit: () => void submitInstruction(), onStartOver: startOver })), warnings.length > 0 && (_jsxs(Alert, { variant: "warning", "data-testid": "convert-component-warnings", children: [_jsx(AlertTriangle, { className: "h-4 w-4" }), _jsx(AlertDescription, { className: "space-y-1 text-xs", children: warnings.map((note) => (_jsx("p", { children: note.text }, note.code + note.text))) })] })), plan.mode === "merge" && plan.items[0] && (_jsx(SourcesSection, { plan: plan, state: state, item: plan.items[0], onChange: (componentId, role) => setState(updateRole(state, componentId, role)) })), plan.groups.map((group) => {
354
+ const item = itemsByKey.get(activeItems[group.key] ?? group.itemKeys[0]);
355
+ if (!item)
356
+ return null;
357
+ return (_jsx(GroupSections, { plan: plan, state: state, group: group, item: item, showGroupName: plan.groups.length > 1, pendingPreviews: pendingPreviews, aiRunning: refine === "running", onChangeRow: changeRow, onGeneratePreview: (field, row) => {
358
+ if (row.mode === "generate")
359
+ void rerunAi(plan, state);
360
+ else
361
+ void fetchPreview(group, item, field, row);
362
+ }, onSwitchInstance: (direction) => switchInstance(group, direction), onChangeChild: (childId, child) => setState(updateChild(state, item.key, childId, child)) }, group.key));
363
+ }), infos.length > 0 && (_jsxs("section", { "data-testid": "convert-component-notes", children: [_jsx("h3", { className: "mb-2 text-base font-medium", children: "Good to know" }), _jsx("ul", { className: "space-y-1.5", children: infos.map((note) => (_jsxs("li", { className: "text-muted-foreground flex items-start gap-2 text-xs", "data-note-code": note.code, children: [_jsx(Info, { className: "mt-0.5 h-3.5 w-3.5 shrink-0", strokeWidth: 1.5 }), _jsx("span", { children: note.text })] }, note.code + note.text))) })] }))] }) })), _jsxs(DialogButtons, { className: "items-center", children: [plan && !loading && !error && (_jsxs("div", { className: "text-muted-foreground mr-auto text-xs", "data-testid": "convert-component-summary", children: ["Applies to ", plan.languages.join(", "), ".", pendingAiWrites > 0 && (_jsxs(_Fragment, { children: [" ", "The AI writes ", pendingAiWrites, " more value", pendingAiWrites === 1 ? "" : "s", " when you convert."] }))] })), _jsx(Button, { variant: "ghost", onClick: () => props.onClose?.(null), children: "Cancel" }), _jsx(Button, { variant: "default", disabled: !canConvert, onClick: convert, "data-testid": "convert-component-confirm", children: plan?.mode === "merge" ? "Merge" : "Convert" })] })] }) }));
364
+ }
365
+ /**
366
+ * The user's line to the AI: instructions it follows for the mapping and the
367
+ * written values. Each one refines the current result; all of them also apply
368
+ * to the values written when the user converts.
369
+ */
370
+ function AiInstructions({ refine, error, models, modelId, onModelChange, aiCalls, instructions, draft, onDraftChange, onSubmit, onStartOver, }) {
371
+ const running = refine === "running";
372
+ return (_jsxs("section", { className: "border-highlight-100/25 bg-highlight-100/5 rounded-lg border p-3", "data-testid": "convert-component-ai", "data-state": refine, children: [_jsxs("div", { className: "mb-2 flex items-center gap-2 text-xs", children: [_jsx(Sparkles, { className: "text-highlight-100 h-3.5 w-3.5", strokeWidth: 1.5 }), _jsx("span", { className: "shrink-0 font-medium", children: "AI conversion" }), _jsx("span", { className: "text-muted-foreground ml-auto flex min-w-0 items-center gap-1.5 truncate", children: running ? (_jsxs(_Fragment, { children: [_jsx(Spinner, { size: "xs" }), _jsx("span", { "data-testid": "convert-component-ai-running", children: "Mapping and writing..." })] })) : refine === "error" ? (_jsx("span", { className: "text-feedback-red", "data-testid": "convert-component-ai-error", children: error ?? "The AI is unavailable." })) : refine === "done" ? (_jsx("span", { "data-testid": "convert-component-ai-done", children: "Fields mapped and written by AI" })) : null }), models.length > 1 && (_jsx("div", { className: "w-48 shrink-0", children: _jsx(Select, { size: "xs", maxWidth: "100%", value: modelId ?? "", disabled: running, searchable: models.length > 8, placeholder: "AI model", "data-testid": "convert-component-ai-model", options: models.map((model) => ({ value: model.id, label: model.name })), onValueChange: onModelChange }) })), models.length === 1 && (_jsx("span", { className: "text-muted-foreground shrink-0", "data-testid": "convert-component-ai-model-name", children: models[0].name })), aiCalls && _jsx(ConversionAiDebugButton, { calls: aiCalls, running: running })] }), instructions.length > 0 && (_jsx("ol", { className: "mb-2 space-y-1", "data-testid": "convert-component-ai-instructions", children: instructions.map((instruction, index) => (_jsxs("li", { className: "text-muted-foreground flex items-start gap-1.5 text-xs", "data-testid": "convert-component-ai-instruction", children: [_jsx(Check, { className: "text-highlight-100 mt-0.5 h-3 w-3 shrink-0", strokeWidth: 2 }), _jsx("span", { className: "min-w-0 break-words", children: instruction })] }, `${index}:${instruction}`))) })), _jsxs("div", { className: "flex items-end gap-2", children: [_jsx(Textarea, { value: draft, rows: 1, disabled: running, placeholder: instructions.length > 0
373
+ ? "Refine the result, e.g. “make the text shorter”"
374
+ : "Tell the AI how to convert, e.g. “use the headline as a heading in the text” or “shorten the teaser to one sentence”", className: "min-h-9 bg-white", "data-testid": "convert-component-ai-input", onChange: (event) => onDraftChange(event.target.value), onKeyDown: (event) => {
375
+ if (event.key === "Enter" && !event.shiftKey) {
376
+ event.preventDefault();
377
+ onSubmit();
378
+ }
379
+ } }), _jsxs(Button, { size: "sm", variant: "default", disabled: running, onClick: onSubmit, "data-testid": "convert-component-ai-apply", className: "shrink-0 gap-1.5", children: [_jsx(Sparkles, { className: "h-3.5 w-3.5", strokeWidth: 1.5 }), draft.trim() ? "Apply" : refine === "error" ? "Try again" : "Run again"] })] }), instructions.length > 0 && !running && (_jsxs("button", { type: "button", className: "text-muted-foreground hover:text-foreground mt-2 flex items-center gap-1 text-[11px]", onClick: onStartOver, "data-testid": "convert-component-ai-start-over", children: [_jsx(RotateCcw, { className: "h-3 w-3", strokeWidth: 1.5 }), "Start over without instructions"] }))] }));
380
+ }
381
+ function SectionHeading({ title, subtitle, trailing, }) {
382
+ return (_jsxs("div", { className: "mb-3 flex items-end justify-between gap-4", children: [_jsxs("div", { children: [_jsx("h3", { className: "text-base font-medium", children: title }), subtitle && _jsx("span", { className: "text-muted-foreground text-xs", children: subtitle })] }), trailing] }));
383
+ }
384
+ function GroupSections({ plan, state, group, item, showGroupName, pendingPreviews, aiRunning, onChangeRow, onGeneratePreview, onSwitchInstance, onChangeChild, }) {
385
+ const index = group.itemKeys.indexOf(item.key);
386
+ const lost = getLostFields(plan, state, item);
387
+ const children = getVisibleChildren(plan, state, item);
388
+ const removedChildren = children.filter((child) => (state.children[item.key]?.[child.componentId]?.action ?? child.action) === "remove");
389
+ const switcher = group.itemKeys.length > 1 ? (_jsxs("div", { className: "flex items-center gap-1 text-xs", "data-testid": "convert-component-instance-switcher", children: [_jsx(Button, { variant: "ghost", size: "iconXs", "aria-label": "Previous component", onClick: () => onSwitchInstance(-1), children: _jsx(ChevronLeft, { className: "h-4 w-4", strokeWidth: 1.5 }) }), _jsxs("span", { className: "text-muted-foreground max-w-[220px] truncate", "data-testid": "convert-component-instance", children: [item.name, " \u00B7 ", index + 1, " of ", group.itemKeys.length] }), _jsx(Button, { variant: "ghost", size: "iconXs", "aria-label": "Next component", onClick: () => onSwitchInstance(1), children: _jsx(ChevronRight, { className: "h-4 w-4", strokeWidth: 1.5 }) })] })) : undefined;
390
+ return (_jsxs(_Fragment, { children: [_jsxs("section", { "data-testid": "convert-component-fields", "data-group-key": group.key, children: [_jsx(SectionHeading, { title: showGroupName ? `Fields from ${group.sourceTypeName}` : "Fields", subtitle: plan.mode === "merge"
391
+ ? "Each field of the new component and where its content comes from."
392
+ : `Each field of the new component and where its content comes from${group.itemKeys.length > 1 ? ` (one mapping for all ${group.itemKeys.length})` : ""}.`, trailing: switcher }), _jsxs("div", { className: "text-muted-foreground grid grid-cols-[minmax(0,170px)_minmax(0,240px)_minmax(0,1fr)] gap-3 px-1 pb-1.5 text-[11px] font-medium", children: [_jsxs("span", { children: [plan.target.name, " field"] }), _jsx("span", { children: "Content from" }), _jsx("span", { children: "Result" })] }), plan.target.fields.length === 0 && (_jsxs("div", { className: "text-muted-foreground border-border-default border-t px-1 py-3 text-xs", children: [plan.target.name, " has no content fields."] })), plan.target.fields.map((field) => {
393
+ const row = state.rows[group.key]?.[field.id] ?? {
394
+ sourceKey: null,
395
+ mode: "empty",
396
+ origin: "none",
397
+ };
398
+ return (_jsx(MappingRow, { plan: plan, state: state, group: group, item: item, field: field, row: row, pending: !!pendingPreviews[`${item.key}:${field.id}`] || (aiRunning && isAiRow(row)), onChange: (sourceKey, mode, instruction) => onChangeRow(group, field, sourceKey, mode, instruction), onGeneratePreview: () => onGeneratePreview(field, row) }, field.id));
399
+ })] }), children.length > 0 && (_jsxs("section", { "data-testid": "convert-component-children", children: [_jsx(SectionHeading, { title: "Child components", subtitle: `Components inside ${plan.mode === "merge" ? "the merged components" : item.name}.` }), children.map((child) => (_jsx(ChildRow, { plan: plan, child: child, state: state.children[item.key]?.[child.componentId], onChange: (next) => onChangeChild(child.componentId, next) }, child.componentId)))] })), _jsxs("section", { "data-testid": "convert-component-lost", children: [_jsx(SectionHeading, { title: "Won't carry over" }), _jsx(LostList, { plan: plan, item: item, lost: lost, removedChildren: removedChildren })] })] }));
400
+ }
401
+ function MappingRow({ plan, state, group, item, field, row, pending, onChange, onGeneratePreview, }) {
402
+ const options = getRowOptions(plan, state, group, item, field.id);
403
+ const value = encodeRowValue(row.sourceKey, row.mode);
404
+ const preview = state.previews[item.key]?.[field.id];
405
+ const [instruction, setInstruction] = useState(row.instruction ?? "");
406
+ const aiRow = row.mode === "generate" || row.mode === "rewrite";
407
+ const usedLabels = (row.mode === "generate" ? row.uses ?? [] : [])
408
+ .map((key) => group.sourceFields.find((o) => o.key === key))
409
+ .filter((option) => !!option)
410
+ .map((option) => plan.mode === "merge" && option.componentName
411
+ ? `${option.componentName} · ${option.displayName}`
412
+ : option.displayName);
413
+ useEffect(() => {
414
+ setInstruction(row.instruction ?? "");
415
+ }, [row.instruction]);
416
+ return (_jsxs("div", { className: "border-border-default grid grid-cols-[minmax(0,170px)_minmax(0,240px)_minmax(0,1fr)] items-start gap-3 border-t px-1 py-2.5", "data-testid": "convert-component-row", "data-target-field": field.name, "data-mode": row.mode, children: [_jsxs("div", { className: "min-w-0 pt-1.5", children: [_jsx("div", { className: "truncate text-xs font-medium", title: field.displayName, children: field.displayName }), _jsx("div", { className: "text-muted-foreground truncate text-[11px]", children: field.type })] }), _jsxs("div", { className: "flex min-w-0 flex-col gap-1.5", children: [_jsx(Select, { size: "sm", maxWidth: "100%", value: value, options: options.map((option) => ({
417
+ value: option.value,
418
+ label: option.label,
419
+ description: option.description,
420
+ })), searchable: options.length > 8, "data-testid": "convert-component-row-source", onValueChange: (next) => {
421
+ const option = options.find((o) => o.value === next);
422
+ if (!option)
423
+ return;
424
+ onChange(option.sourceKey, option.mode, option.mode === "generate" || option.mode === "rewrite" ? row.instruction : undefined);
425
+ } }), aiRow && (_jsx(Textarea, { value: instruction, rows: 1, placeholder: "Instruction for this field (optional)", className: "min-h-7 px-2 py-1 text-[11px] leading-snug", "data-testid": "convert-component-row-instruction", onChange: (event) => setInstruction(event.target.value), onBlur: () => {
426
+ if ((row.instruction ?? "") !== instruction) {
427
+ onChange(row.sourceKey, row.mode, instruction || undefined);
428
+ }
429
+ }, onKeyDown: (event) => {
430
+ if (event.key === "Enter" && !event.shiftKey) {
431
+ event.preventDefault();
432
+ event.target.blur();
433
+ }
434
+ } })), usedLabels.length > 0 && (_jsxs("span", { className: "text-muted-foreground text-[11px]", "data-testid": "convert-component-row-uses", children: ["Based on ", usedLabels.join(", ")] })), row.origin === "ai" && row.reason && (_jsx("span", { className: "text-muted-foreground text-[11px]", children: row.reason }))] }), _jsxs("div", { className: "min-w-0 pt-1", "data-testid": "convert-component-row-preview", children: [_jsx(ValuePreview, { row: row, field: field, preview: preview, pending: pending, onGenerate: onGeneratePreview, hasSourceValue: row.mode === "generate" || !!(row.sourceKey && item.sourceValues[row.sourceKey]?.hasValue) }), row.mode === "generate" && !pending && (_jsx(OtherLanguageValues, { item: item, fieldId: field.id, currentLanguage: plan.currentLanguage, values: state.languageValues[item.key] }))] })] }));
435
+ }
436
+ function ValuePreview({ row, field, preview, pending, hasSourceValue, onGenerate, }) {
437
+ const aiRow = row.mode === "generate" || row.mode === "rewrite";
438
+ if (row.mode === "empty" || (!row.sourceKey && row.mode !== "generate")) {
439
+ return _jsx("span", { className: "text-muted-foreground text-xs", children: "Stays empty" });
440
+ }
441
+ if (!hasSourceValue) {
442
+ return _jsx("span", { className: "text-muted-foreground text-xs", children: "Source is empty" });
443
+ }
444
+ if (pending) {
445
+ return (_jsxs("span", { className: "text-muted-foreground flex items-center gap-2 text-xs", children: [_jsx(Spinner, { size: "xs" }), aiRow ? "Writing..." : "Converting..."] }));
446
+ }
447
+ if (preview?.error) {
448
+ return (_jsxs("span", { className: "flex flex-wrap items-center gap-x-2 text-xs", children: [_jsx("span", { className: "text-feedback-red", children: preview.error }), aiRow && (_jsx("button", { type: "button", className: "text-highlight-100 underline-offset-2 hover:underline", onClick: onGenerate, "data-testid": "convert-component-row-generate", children: "Try again" }))] }));
449
+ }
450
+ if (!preview || (!preview.hasValue && !preview.raw)) {
451
+ if (aiRow) {
452
+ return (_jsxs("span", { className: "text-muted-foreground flex flex-wrap items-center gap-x-2 text-xs", children: [_jsx(AiBadge, {}), "Written when you convert.", _jsx("button", { type: "button", className: "text-highlight-100 underline-offset-2 hover:underline", onClick: onGenerate, "data-testid": "convert-component-row-generate", children: "Write now" })] }));
453
+ }
454
+ return _jsx("span", { className: "text-muted-foreground text-xs", children: "..." });
455
+ }
456
+ // AI-written rich text shows its formatting, so a heading the AI added reads as one.
457
+ if (aiRow && preview.raw && field.category === "rich-text") {
458
+ return (_jsxs("div", { className: "flex min-w-0 items-start gap-2 text-xs", "data-testid": "convert-component-row-value", children: [_jsx(AiBadge, {}), _jsx("div", { className: "max-h-40 min-w-0 overflow-y-auto break-words [&_a]:underline [&_h1]:mb-1 [&_h1]:text-sm [&_h1]:font-semibold [&_h2]:mb-1 [&_h2]:text-[13px] [&_h2]:font-semibold [&_h3]:mb-1 [&_h3]:font-semibold [&_li]:ml-4 [&_ol]:list-decimal [&_p]:mb-1 [&_ul]:list-disc", "data-testid": "convert-component-row-html", dangerouslySetInnerHTML: { __html: sanitizeHtml(preview.raw) } })] }));
459
+ }
460
+ return (_jsxs("div", { className: "flex min-w-0 items-start gap-2 text-xs", "data-testid": "convert-component-row-value", children: [aiRow && _jsx(AiBadge, {}), preview.imageUrl && (_jsx("img", { src: preview.imageUrl, alt: "", className: "border-border-default h-9 w-14 shrink-0 rounded border object-cover" })), _jsx("span", { className: "line-clamp-4 min-w-0 break-words", title: preview.text, children: preview.text })] }));
461
+ }
462
+ /**
463
+ * The languages besides the current one the AI already wrote this field in;
464
+ * hovering one shows its text. Languages still missing are written on convert.
465
+ */
466
+ function OtherLanguageValues({ item, fieldId, currentLanguage, values, }) {
467
+ const others = item.languages.filter((language) => language !== currentLanguage);
468
+ if (others.length === 0)
469
+ return null;
470
+ return (_jsx("div", { className: "text-muted-foreground mt-1 flex flex-wrap items-center gap-1 text-[11px]", "data-testid": "convert-component-row-languages", children: others.map((language) => {
471
+ const value = values?.[language]?.[fieldId];
472
+ return (_jsx("span", { title: value ? sanitizeTooltip(value) : "Written when you convert", "data-language": language, "data-written": value ? "true" : "false", className: value
473
+ ? "bg-highlight-100/10 text-highlight-100 rounded px-1.5 py-px"
474
+ : "border-border-default rounded border border-dashed px-1.5 py-px", children: language }, language));
475
+ }) }));
476
+ }
477
+ /** Tooltip text for a written value: its text without markup. */
478
+ function sanitizeTooltip(value) {
479
+ const element = document.createElement("div");
480
+ element.innerHTML = sanitizeHtml(value);
481
+ return (element.textContent ?? "").trim();
482
+ }
483
+ function AiBadge() {
484
+ return (_jsx("span", { className: "bg-highlight-100/10 text-highlight-100 shrink-0 rounded px-1.5 py-px text-[10px] font-medium", children: "AI" }));
485
+ }
486
+ function ChildRow({ plan, child, state, onChange, }) {
487
+ const current = state ?? {
488
+ action: child.action,
489
+ targetPlaceholder: child.targetPlaceholder,
490
+ targetTypeId: child.targetTypeId,
491
+ targetTypeName: child.targetTypeName,
492
+ nested: child.nested,
493
+ };
494
+ const options = [
495
+ ...child.movePlaceholders.map((placeholder) => ({
496
+ value: `move|${placeholder}`,
497
+ label: `Move to ${humanizePlaceholder(placeholder)}`,
498
+ state: { action: "move", targetPlaceholder: placeholder },
499
+ })),
500
+ ];
501
+ if (child.targetTypeId && child.targetPlaceholder) {
502
+ options.push({
503
+ value: `convert|${child.targetPlaceholder}|${child.targetTypeId}`,
504
+ label: `Convert to ${child.targetTypeName ?? "another type"} in ${humanizePlaceholder(child.targetPlaceholder)}`,
505
+ state: {
506
+ action: "convert",
507
+ targetPlaceholder: child.targetPlaceholder,
508
+ targetTypeId: child.targetTypeId,
509
+ targetTypeName: child.targetTypeName,
510
+ nested: child.nested,
511
+ },
512
+ });
513
+ }
514
+ options.push({ value: "remove", label: "Remove", state: { action: "remove" } });
515
+ const value = current.action === "move"
516
+ ? `move|${current.targetPlaceholder}`
517
+ : current.action === "convert"
518
+ ? `convert|${current.targetPlaceholder}|${current.targetTypeId}`
519
+ : "remove";
520
+ // Each field of the converted child: where it comes from, or what the AI wrote (current language).
521
+ const nestedFields = current.action === "convert" && current.nested
522
+ ? current.nested.mappings
523
+ .filter((m) => m.mode !== "empty" && (m.mode === "generate" || m.sourceKey))
524
+ .map((m) => {
525
+ const nested = current.nested;
526
+ const targetField = nested.targetFields.find((f) => f.id === m.targetFieldId);
527
+ if (!targetField)
528
+ return null;
529
+ if (m.mode === "generate") {
530
+ const written = nested.values?.[plan.currentLanguage]?.[m.targetFieldId];
531
+ return {
532
+ id: m.targetFieldId,
533
+ field: targetField.displayName,
534
+ ai: true,
535
+ text: written ? sanitizeTooltip(written) : "Written when you convert",
536
+ languages: Object.keys(nested.values ?? {}).filter((language) => language !== plan.currentLanguage && nested.values[language]?.[m.targetFieldId]),
537
+ };
538
+ }
539
+ const source = nested.sourceFields.find((o) => o.key === m.sourceKey);
540
+ return source
541
+ ? { id: m.targetFieldId, field: targetField.displayName, ai: false, text: `from ${source.displayName}`, languages: [] }
542
+ : null;
543
+ })
544
+ .filter((f) => f !== null)
545
+ : [];
546
+ return (_jsxs("div", { className: "border-border-default grid grid-cols-[minmax(0,170px)_minmax(0,240px)_minmax(0,1fr)] items-start gap-3 border-t px-1 py-2.5", "data-testid": "convert-component-child", "data-action": current.action, children: [_jsxs("div", { className: "min-w-0 pt-1.5", children: [_jsx("div", { className: "truncate text-xs font-medium", children: child.name }), _jsx("div", { className: "text-muted-foreground truncate text-[11px]", children: child.typeName })] }), _jsx(Select, { size: "sm", maxWidth: "100%", value: value, "data-testid": "convert-component-child-action", options: options.map((o) => ({ value: o.value, label: o.label })), onValueChange: (next) => {
547
+ const option = options.find((o) => o.value === next);
548
+ if (option)
549
+ onChange(option.state);
550
+ } }), _jsx("div", { className: "text-muted-foreground min-w-0 pt-1.5 text-xs", children: current.action === "remove" ? (child.reason ?? `Not placed in ${plan.target.name}.`) : current.action !== "convert" ? ("Moves along with its content.") : nestedFields.length === 0 ? ("Converted without field content.") : (_jsx("ul", { className: "space-y-1", "data-testid": "convert-component-child-fields", children: nestedFields.map((f) => (_jsxs("li", { className: "flex min-w-0 items-start gap-1.5", "data-ai": f.ai ? "true" : "false", children: [_jsx("span", { className: "text-foreground shrink-0 font-medium", children: f.field }), f.ai && _jsx(AiBadge, {}), _jsx("span", { className: "line-clamp-2 min-w-0 break-words", title: f.text, children: f.text }), f.languages.length > 0 && (_jsxs("span", { className: "shrink-0 text-[10px]", children: ["+", f.languages.join(", ")] }))] }, f.id))) })) })] }));
551
+ }
552
+ function SourcesSection({ plan, state, item, onChange, }) {
553
+ const merged = new Set(getMergedSourceIds(plan, state, item).map(normalizeId));
554
+ return (_jsxs("section", { "data-testid": "convert-component-sources", children: [_jsx(SectionHeading, { title: "Components", subtitle: "Merge a component's fields into the new one, or place it inside as a child." }), item.sourceRoles.map((role) => {
555
+ const current = state.roles[role.componentId] ?? role;
556
+ const options = [
557
+ { value: "merge", label: "Merge its fields" },
558
+ ...role.childPlaceholders.map((placeholder) => ({
559
+ value: `child|${placeholder}`,
560
+ label: `Add as child in ${humanizePlaceholder(placeholder)}`,
561
+ })),
562
+ ];
563
+ if (role.targetTypeId && role.targetPlaceholder) {
564
+ options.push({
565
+ value: `child|${role.targetPlaceholder}|${role.targetTypeId}`,
566
+ label: `Add as ${role.targetTypeName ?? "child"} in ${humanizePlaceholder(role.targetPlaceholder)}`,
567
+ });
568
+ }
569
+ const value = current.role === "merge"
570
+ ? "merge"
571
+ : current.targetTypeId
572
+ ? `child|${current.targetPlaceholder}|${current.targetTypeId}`
573
+ : `child|${current.targetPlaceholder}`;
574
+ return (_jsxs("div", { className: "border-border-default grid grid-cols-[minmax(0,170px)_minmax(0,240px)_minmax(0,1fr)] items-start gap-3 border-t px-1 py-2.5", "data-testid": "convert-component-source", "data-role": current.role, children: [_jsxs("div", { className: "min-w-0 pt-1.5", children: [_jsx("div", { className: "truncate text-xs font-medium", children: role.name }), _jsx("div", { className: "text-muted-foreground truncate text-[11px]", children: role.typeName })] }), _jsx(Select, { size: "sm", maxWidth: "100%", value: value, "data-testid": "convert-component-source-role", options: options, onValueChange: (next) => {
575
+ if (next === "merge") {
576
+ onChange(role.componentId, { role: "merge" });
577
+ return;
578
+ }
579
+ const [, placeholder, typeId] = next.split("|");
580
+ onChange(role.componentId, {
581
+ role: "child",
582
+ targetPlaceholder: placeholder,
583
+ targetTypeId: typeId,
584
+ targetTypeName: typeId ? role.targetTypeName : undefined,
585
+ nested: typeId ? role.nested : undefined,
586
+ });
587
+ } }), _jsx("div", { className: "text-muted-foreground min-w-0 pt-1.5 text-xs", children: merged.has(normalizeId(role.componentId))
588
+ ? "Its fields can feed the new component; it is removed afterwards."
589
+ : "Placed inside the new component with its content." })] }, role.componentId));
590
+ })] }));
591
+ }
592
+ function LostList({ plan, item, lost, removedChildren, }) {
593
+ const entries = [
594
+ ...lost.map((field) => ({
595
+ key: `field:${field.key}`,
596
+ label: field.label,
597
+ detail: field.preview.text || (field.preview.imageUrl ? "Image" : undefined),
598
+ })),
599
+ ];
600
+ if (removedChildren.length > 0) {
601
+ entries.push({
602
+ key: "children",
603
+ label: `${removedChildren.length} child component${removedChildren.length === 1 ? "" : "s"} removed`,
604
+ detail: removedChildren.map((c) => c.name).join(", "),
605
+ });
606
+ }
607
+ if (item.droppedParameters.length > 0) {
608
+ entries.push({
609
+ key: "parameters",
610
+ label: "Rendering parameters",
611
+ detail: item.droppedParameters.join(", "),
612
+ });
613
+ }
614
+ if (item.personalizationRulesDropped > 0) {
615
+ entries.push({
616
+ key: "personalization",
617
+ label: "Personalization",
618
+ detail: `${item.personalizationRulesDropped} rule${item.personalizationRulesDropped === 1 ? "" : "s"} that change content${plan.mode === "merge" ? " (not carried over when merging)" : ""}`,
619
+ });
620
+ }
621
+ if (item.suggestedEdits > 0) {
622
+ entries.push({
623
+ key: "suggested-edits",
624
+ label: "Suggested edits",
625
+ detail: "Suggestions on fields that are not copied unchanged stay with the old component.",
626
+ });
627
+ }
628
+ if (entries.length === 0) {
629
+ return (_jsx("div", { className: "text-muted-foreground text-xs", "data-testid": "convert-component-lost-none", children: "Everything with content carries over." }));
630
+ }
631
+ return (_jsx("ul", { className: "space-y-1.5", children: entries.map((entry) => (_jsxs("li", { className: "flex items-start gap-2 text-xs", "data-testid": "convert-component-lost-entry", children: [_jsx(AlertTriangle, { className: "text-feedback-orange mt-0.5 h-3.5 w-3.5 shrink-0", strokeWidth: 1.5 }), _jsxs("span", { className: "min-w-0", children: [_jsx("span", { className: "font-medium", children: entry.label }), entry.detail && (_jsxs("span", { className: "text-muted-foreground", children: [" \u00B7 ", entry.detail] }))] })] }, entry.key))) }));
632
+ }
633
+ //# sourceMappingURL=ConvertComponentDialog.js.map