@parhelia/core 0.3.12832 → 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 (472) 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.js +6 -0
  23. package/dist/editor/agent-changes/agentChangeTargets.js.map +1 -1
  24. package/dist/editor/agent-changes/agentChangeTextHighlight.d.ts +48 -4
  25. package/dist/editor/agent-changes/agentChangeTextHighlight.js +67 -9
  26. package/dist/editor/agent-changes/agentChangeTextHighlight.js.map +1 -1
  27. package/dist/editor/ai/AgentImagePreview.d.ts +13 -0
  28. package/dist/editor/ai/AgentImagePreview.js +41 -0
  29. package/dist/editor/ai/AgentImagePreview.js.map +1 -0
  30. package/dist/editor/ai/terminal/components/CreateItemToolCallContent.js +1 -1
  31. package/dist/editor/ai/terminal/components/CreateItemToolCallContent.js.map +1 -1
  32. package/dist/editor/ai/terminal/components/ResponseTurnDuration.js +1 -2
  33. package/dist/editor/ai/terminal/components/ResponseTurnDuration.js.map +1 -1
  34. package/dist/editor/ai/terminal/components/ToolCallDiagnosticsPanel.d.ts +6 -0
  35. package/dist/editor/ai/terminal/components/ToolCallDiagnosticsPanel.js +61 -0
  36. package/dist/editor/ai/terminal/components/ToolCallDiagnosticsPanel.js.map +1 -0
  37. package/dist/editor/ai/terminal/toolCallDiagnostics.d.ts +34 -0
  38. package/dist/editor/ai/terminal/toolCallDiagnostics.js +218 -0
  39. package/dist/editor/ai/terminal/toolCallDiagnostics.js.map +1 -0
  40. package/dist/editor/bridge/linkDownload.d.ts +3 -0
  41. package/dist/editor/bridge/linkDownload.js +52 -0
  42. package/dist/editor/bridge/linkDownload.js.map +1 -0
  43. package/dist/editor/client/clipboardStorage.d.ts +10 -0
  44. package/dist/editor/client/clipboardStorage.js +57 -0
  45. package/dist/editor/client/clipboardStorage.js.map +1 -0
  46. package/dist/editor/client/hooks/useRepositoryItemRefresh.d.ts +4 -0
  47. package/dist/editor/client/hooks/useRepositoryItemRefresh.js +62 -0
  48. package/dist/editor/client/hooks/useRepositoryItemRefresh.js.map +1 -0
  49. package/dist/editor/client/liveEditState.d.ts +16 -0
  50. package/dist/editor/client/liveEditState.js +25 -0
  51. package/dist/editor/client/liveEditState.js.map +1 -0
  52. package/dist/editor/client/liveSessionState.d.ts +6 -0
  53. package/dist/editor/client/liveSessionState.js +20 -0
  54. package/dist/editor/client/liveSessionState.js.map +1 -0
  55. package/dist/editor/client/valueStore.d.ts +22 -0
  56. package/dist/editor/client/valueStore.js +29 -0
  57. package/dist/editor/client/valueStore.js.map +1 -0
  58. package/dist/editor/commands/componentClipboardCommands.d.ts +35 -0
  59. package/dist/editor/commands/componentClipboardCommands.js +271 -0
  60. package/dist/editor/commands/componentClipboardCommands.js.map +1 -0
  61. package/dist/editor/commands/componentMenuGroups.d.ts +2 -0
  62. package/dist/editor/commands/componentMenuGroups.js +43 -0
  63. package/dist/editor/commands/componentMenuGroups.js.map +1 -0
  64. package/dist/editor/component-conversion/ComponentTypePickerDialog.d.ts +12 -0
  65. package/dist/editor/component-conversion/ComponentTypePickerDialog.js +40 -0
  66. package/dist/editor/component-conversion/ComponentTypePickerDialog.js.map +1 -0
  67. package/dist/editor/component-conversion/ConversionAiDebugButton.d.ts +17 -0
  68. package/dist/editor/component-conversion/ConversionAiDebugButton.js +80 -0
  69. package/dist/editor/component-conversion/ConversionAiDebugButton.js.map +1 -0
  70. package/dist/editor/component-conversion/ConvertComponentDialog.d.ts +28 -0
  71. package/dist/editor/component-conversion/ConvertComponentDialog.js +633 -0
  72. package/dist/editor/component-conversion/ConvertComponentDialog.js.map +1 -0
  73. package/dist/editor/component-conversion/conversionModel.d.ts +109 -0
  74. package/dist/editor/component-conversion/conversionModel.js +519 -0
  75. package/dist/editor/component-conversion/conversionModel.js.map +1 -0
  76. package/dist/editor/component-conversion/conversionService.d.ts +12 -0
  77. package/dist/editor/component-conversion/conversionService.js +16 -0
  78. package/dist/editor/component-conversion/conversionService.js.map +1 -0
  79. package/dist/editor/component-conversion/conversionTypes.d.ts +214 -0
  80. package/dist/editor/component-conversion/conversionTypes.js +2 -0
  81. package/dist/editor/component-conversion/conversionTypes.js.map +1 -0
  82. package/dist/editor/component-conversion/convertComponentsCommand.d.ts +25 -0
  83. package/dist/editor/component-conversion/convertComponentsCommand.js +196 -0
  84. package/dist/editor/component-conversion/convertComponentsCommand.js.map +1 -0
  85. package/dist/editor/field-types/FieldHistoryBoundary.js +28 -7
  86. package/dist/editor/field-types/FieldHistoryBoundary.js.map +1 -1
  87. package/dist/editor/field-types/fieldStyles.d.ts +21 -0
  88. package/dist/editor/field-types/fieldStyles.js +22 -0
  89. package/dist/editor/field-types/fieldStyles.js.map +1 -0
  90. package/dist/editor/field-types/richtext/utils/changeHighlight.d.ts +14 -0
  91. package/dist/editor/field-types/richtext/utils/changeHighlight.js +12 -1
  92. package/dist/editor/field-types/richtext/utils/changeHighlight.js.map +1 -1
  93. package/dist/editor/field-types/richtext/utils/spellCheckText.d.ts +31 -0
  94. package/dist/editor/field-types/richtext/utils/spellCheckText.js +82 -0
  95. package/dist/editor/field-types/richtext/utils/spellCheckText.js.map +1 -0
  96. package/dist/editor/field-types/useFocusedFieldInput.d.ts +13 -0
  97. package/dist/editor/field-types/useFocusedFieldInput.js +50 -0
  98. package/dist/editor/field-types/useFocusedFieldInput.js.map +1 -0
  99. package/dist/editor/field-types/useFormFieldSelectionRange.d.ts +43 -0
  100. package/dist/editor/field-types/useFormFieldSelectionRange.js +149 -0
  101. package/dist/editor/field-types/useFormFieldSelectionRange.js.map +1 -0
  102. package/dist/editor/find-replace/FindReplacePanel.d.ts +11 -0
  103. package/dist/editor/find-replace/FindReplacePanel.js +311 -0
  104. package/dist/editor/find-replace/FindReplacePanel.js.map +1 -0
  105. package/dist/editor/find-replace/findReplaceCommand.d.ts +8 -0
  106. package/dist/editor/find-replace/findReplaceCommand.js +25 -0
  107. package/dist/editor/find-replace/findReplaceCommand.js.map +1 -0
  108. package/dist/editor/find-replace/findReplaceMatches.d.ts +42 -0
  109. package/dist/editor/find-replace/findReplaceMatches.js +66 -0
  110. package/dist/editor/find-replace/findReplaceMatches.js.map +1 -0
  111. package/dist/editor/find-replace/findReplaceStore.d.ts +30 -0
  112. package/dist/editor/find-replace/findReplaceStore.js +61 -0
  113. package/dist/editor/find-replace/findReplaceStore.js.map +1 -0
  114. package/dist/editor/find-replace/findReplaceTargets.d.ts +51 -0
  115. package/dist/editor/find-replace/findReplaceTargets.js +110 -0
  116. package/dist/editor/find-replace/findReplaceTargets.js.map +1 -0
  117. package/dist/editor/find-replace/findReplaceText.d.ts +50 -0
  118. package/dist/editor/find-replace/findReplaceText.js +189 -0
  119. package/dist/editor/find-replace/findReplaceText.js.map +1 -0
  120. package/dist/editor/itemContextMenuGroups.js +10 -1
  121. package/dist/editor/itemContextMenuGroups.js.map +1 -1
  122. package/dist/editor/media-selector/MediaDetailsView.d.ts +14 -0
  123. package/dist/editor/media-selector/MediaDetailsView.js +152 -0
  124. package/dist/editor/media-selector/MediaDetailsView.js.map +1 -0
  125. package/dist/editor/media-selector/useMediaFolderDrag.d.ts +26 -0
  126. package/dist/editor/media-selector/useMediaFolderDrag.js +153 -0
  127. package/dist/editor/media-selector/useMediaFolderDrag.js.map +1 -0
  128. package/dist/editor/menubar/toolbar-sections/CommentsToggleControl.d.ts +11 -0
  129. package/dist/editor/menubar/toolbar-sections/CommentsToggleControl.js +65 -0
  130. package/dist/editor/menubar/toolbar-sections/CommentsToggleControl.js.map +1 -0
  131. package/dist/editor/menubar/toolbar-sections/FindReplaceControls.d.ts +6 -0
  132. package/dist/editor/menubar/toolbar-sections/FindReplaceControls.js +31 -0
  133. package/dist/editor/menubar/toolbar-sections/FindReplaceControls.js.map +1 -0
  134. package/dist/editor/menubar/toolbar-sections/SpellCheckToggleControl.d.ts +5 -0
  135. package/dist/editor/menubar/toolbar-sections/SpellCheckToggleControl.js +16 -0
  136. package/dist/editor/menubar/toolbar-sections/SpellCheckToggleControl.js.map +1 -0
  137. package/dist/editor/mobileBottomPanel.d.ts +40 -0
  138. package/dist/editor/mobileBottomPanel.js +63 -0
  139. package/dist/editor/mobileBottomPanel.js.map +1 -0
  140. package/dist/editor/page-editor-chrome/AgentChangeHighlightings.d.ts +3 -6
  141. package/dist/editor/page-editor-chrome/AgentChangeHighlightings.js +8 -6
  142. package/dist/editor/page-editor-chrome/AgentChangeHighlightings.js.map +1 -1
  143. package/dist/editor/page-editor-chrome/BridgePasteCleanupOverlay.d.ts +6 -0
  144. package/dist/editor/page-editor-chrome/BridgePasteCleanupOverlay.js +100 -0
  145. package/dist/editor/page-editor-chrome/BridgePasteCleanupOverlay.js.map +1 -0
  146. package/dist/editor/page-editor-chrome/CanvasOverviewRulerBinding.d.ts +9 -0
  147. package/dist/editor/page-editor-chrome/CanvasOverviewRulerBinding.js +32 -0
  148. package/dist/editor/page-editor-chrome/CanvasOverviewRulerBinding.js.map +1 -0
  149. package/dist/editor/page-editor-chrome/CommentTargetPickerCanvasLayer.d.ts +14 -0
  150. package/dist/editor/page-editor-chrome/CommentTargetPickerCanvasLayer.js +110 -0
  151. package/dist/editor/page-editor-chrome/CommentTargetPickerCanvasLayer.js.map +1 -0
  152. package/dist/editor/page-editor-chrome/ConversionIndicators.d.ts +8 -0
  153. package/dist/editor/page-editor-chrome/ConversionIndicators.js +75 -0
  154. package/dist/editor/page-editor-chrome/ConversionIndicators.js.map +1 -0
  155. package/dist/editor/page-editor-chrome/DiffHighlightOverlay.d.ts +9 -13
  156. package/dist/editor/page-editor-chrome/DiffHighlightOverlay.js +25 -20
  157. package/dist/editor/page-editor-chrome/DiffHighlightOverlay.js.map +1 -1
  158. package/dist/editor/page-editor-chrome/FeedbackLeaderCanvasSegment.d.ts +15 -0
  159. package/dist/editor/page-editor-chrome/FeedbackLeaderCanvasSegment.js +31 -0
  160. package/dist/editor/page-editor-chrome/FeedbackLeaderCanvasSegment.js.map +1 -0
  161. package/dist/editor/page-editor-chrome/FindReplaceHighlightings.d.ts +11 -0
  162. package/dist/editor/page-editor-chrome/FindReplaceHighlightings.js +120 -0
  163. package/dist/editor/page-editor-chrome/FindReplaceHighlightings.js.map +1 -0
  164. package/dist/editor/page-editor-chrome/SpellCheckHighlightings.d.ts +12 -0
  165. package/dist/editor/page-editor-chrome/SpellCheckHighlightings.js +197 -0
  166. package/dist/editor/page-editor-chrome/SpellCheckHighlightings.js.map +1 -0
  167. package/dist/editor/page-editor-chrome/ValidationRulerMarks.d.ts +11 -0
  168. package/dist/editor/page-editor-chrome/ValidationRulerMarks.js +56 -0
  169. package/dist/editor/page-editor-chrome/ValidationRulerMarks.js.map +1 -0
  170. package/dist/editor/page-editor-chrome/overlay/feedbackAnchorMeasurements.d.ts +44 -0
  171. package/dist/editor/page-editor-chrome/overlay/feedbackAnchorMeasurements.js +89 -0
  172. package/dist/editor/page-editor-chrome/overlay/feedbackAnchorMeasurements.js.map +1 -0
  173. package/dist/editor/page-editor-chrome/overlay/feedbackAnchorStore.d.ts +17 -0
  174. package/dist/editor/page-editor-chrome/overlay/feedbackAnchorStore.js +53 -0
  175. package/dist/editor/page-editor-chrome/overlay/feedbackAnchorStore.js.map +1 -0
  176. package/dist/editor/page-editor-chrome/overlay/useBridgeTextRangeRequest.d.ts +11 -0
  177. package/dist/editor/page-editor-chrome/overlay/useBridgeTextRangeRequest.js +84 -0
  178. package/dist/editor/page-editor-chrome/overlay/useBridgeTextRangeRequest.js.map +1 -0
  179. package/dist/editor/page-editor-chrome/overlay/useCommentAnchorMeasurements.d.ts +34 -0
  180. package/dist/editor/page-editor-chrome/overlay/useCommentAnchorMeasurements.js +229 -0
  181. package/dist/editor/page-editor-chrome/overlay/useCommentAnchorMeasurements.js.map +1 -0
  182. package/dist/editor/page-editor-chrome/overlay/useOverlayViewportRight.d.ts +9 -0
  183. package/dist/editor/page-editor-chrome/overlay/useOverlayViewportRight.js +34 -0
  184. package/dist/editor/page-editor-chrome/overlay/useOverlayViewportRight.js.map +1 -0
  185. package/dist/editor/page-editor-chrome/overlay/useSuggestionAnchorMeasurements.d.ts +49 -0
  186. package/dist/editor/page-editor-chrome/overlay/useSuggestionAnchorMeasurements.js +241 -0
  187. package/dist/editor/page-editor-chrome/overlay/useSuggestionAnchorMeasurements.js.map +1 -0
  188. package/dist/editor/page-viewer/CanvasOverviewRuler.d.ts +11 -0
  189. package/dist/editor/page-viewer/CanvasOverviewRuler.js +65 -0
  190. package/dist/editor/page-viewer/CanvasOverviewRuler.js.map +1 -0
  191. package/dist/editor/page-viewer/DynamicRenderingsBar.d.ts +23 -0
  192. package/dist/editor/page-viewer/DynamicRenderingsBar.js +28 -0
  193. package/dist/editor/page-viewer/DynamicRenderingsBar.js.map +1 -0
  194. package/dist/editor/page-viewer/DynamicRenderingsStrip.d.ts +18 -0
  195. package/dist/editor/page-viewer/DynamicRenderingsStrip.js +29 -0
  196. package/dist/editor/page-viewer/DynamicRenderingsStrip.js.map +1 -0
  197. package/dist/editor/page-viewer/FeedbackMargin.d.ts +57 -0
  198. package/dist/editor/page-viewer/FeedbackMargin.js +377 -0
  199. package/dist/editor/page-viewer/FeedbackMargin.js.map +1 -0
  200. package/dist/editor/page-viewer/FeedbackMarginController.d.ts +76 -0
  201. package/dist/editor/page-viewer/FeedbackMarginController.js +241 -0
  202. package/dist/editor/page-viewer/FeedbackMarginController.js.map +1 -0
  203. package/dist/editor/page-viewer/FeedbackMarginMarker.d.ts +16 -0
  204. package/dist/editor/page-viewer/FeedbackMarginMarker.js +24 -0
  205. package/dist/editor/page-viewer/FeedbackMarginMarker.js.map +1 -0
  206. package/dist/editor/page-viewer/FeedbackMarginResizeHandle.d.ts +23 -0
  207. package/dist/editor/page-viewer/FeedbackMarginResizeHandle.js +105 -0
  208. package/dist/editor/page-viewer/FeedbackMarginResizeHandle.js.map +1 -0
  209. package/dist/editor/page-viewer/InteractivePreviewBar.d.ts +24 -0
  210. package/dist/editor/page-viewer/InteractivePreviewBar.js +31 -0
  211. package/dist/editor/page-viewer/InteractivePreviewBar.js.map +1 -0
  212. package/dist/editor/page-viewer/MobileCommentsPanel.d.ts +16 -0
  213. package/dist/editor/page-viewer/MobileCommentsPanel.js +112 -0
  214. package/dist/editor/page-viewer/MobileCommentsPanel.js.map +1 -0
  215. package/dist/editor/page-viewer/RenderingAiCheck.d.ts +18 -0
  216. package/dist/editor/page-viewer/RenderingAiCheck.js +45 -0
  217. package/dist/editor/page-viewer/RenderingAiCheck.js.map +1 -0
  218. package/dist/editor/page-viewer/RenderingApprovalDialog.d.ts +32 -0
  219. package/dist/editor/page-viewer/RenderingApprovalDialog.js +191 -0
  220. package/dist/editor/page-viewer/RenderingApprovalDialog.js.map +1 -0
  221. package/dist/editor/page-viewer/SealedClientCodePreview.d.ts +17 -0
  222. package/dist/editor/page-viewer/SealedClientCodePreview.js +38 -0
  223. package/dist/editor/page-viewer/SealedClientCodePreview.js.map +1 -0
  224. package/dist/editor/page-viewer/canvasFrameNavigation.d.ts +18 -0
  225. package/dist/editor/page-viewer/canvasFrameNavigation.js +36 -0
  226. package/dist/editor/page-viewer/canvasFrameNavigation.js.map +1 -0
  227. package/dist/editor/page-viewer/canvasLoadSettling.d.ts +42 -0
  228. package/dist/editor/page-viewer/canvasLoadSettling.js +46 -0
  229. package/dist/editor/page-viewer/canvasLoadSettling.js.map +1 -0
  230. package/dist/editor/page-viewer/canvasScrollHandoff.d.ts +34 -0
  231. package/dist/editor/page-viewer/canvasScrollHandoff.js +55 -0
  232. package/dist/editor/page-viewer/canvasScrollHandoff.js.map +1 -0
  233. package/dist/editor/page-viewer/compareFrameWidth.d.ts +8 -0
  234. package/dist/editor/page-viewer/compareFrameWidth.js +25 -0
  235. package/dist/editor/page-viewer/compareFrameWidth.js.map +1 -0
  236. package/dist/editor/page-viewer/feedbackMarginLayout.d.ts +119 -0
  237. package/dist/editor/page-viewer/feedbackMarginLayout.js +155 -0
  238. package/dist/editor/page-viewer/feedbackMarginLayout.js.map +1 -0
  239. package/dist/editor/page-viewer/feedbackMarginSources.d.ts +36 -0
  240. package/dist/editor/page-viewer/feedbackMarginSources.js +196 -0
  241. package/dist/editor/page-viewer/feedbackMarginSources.js.map +1 -0
  242. package/dist/editor/page-viewer/feedbackMarginWidth.d.ts +43 -0
  243. package/dist/editor/page-viewer/feedbackMarginWidth.js +107 -0
  244. package/dist/editor/page-viewer/feedbackMarginWidth.js.map +1 -0
  245. package/dist/editor/page-viewer/interactivePreview.d.ts +168 -0
  246. package/dist/editor/page-viewer/interactivePreview.js +344 -0
  247. package/dist/editor/page-viewer/interactivePreview.js.map +1 -0
  248. package/dist/editor/page-viewer/minimapViewport.d.ts +2 -0
  249. package/dist/editor/page-viewer/minimapViewport.js +34 -0
  250. package/dist/editor/page-viewer/minimapViewport.js.map +1 -0
  251. package/dist/editor/page-viewer/openPageItems.d.ts +29 -0
  252. package/dist/editor/page-viewer/openPageItems.js +73 -0
  253. package/dist/editor/page-viewer/openPageItems.js.map +1 -0
  254. package/dist/editor/page-viewer/overviewRuler.d.ts +128 -0
  255. package/dist/editor/page-viewer/overviewRuler.js +226 -0
  256. package/dist/editor/page-viewer/overviewRuler.js.map +1 -0
  257. package/dist/editor/page-viewer/renderingApproval.d.ts +59 -0
  258. package/dist/editor/page-viewer/renderingApproval.js +186 -0
  259. package/dist/editor/page-viewer/renderingApproval.js.map +1 -0
  260. package/dist/editor/page-viewer/renderingChanges.d.ts +29 -0
  261. package/dist/editor/page-viewer/renderingChanges.js +40 -0
  262. package/dist/editor/page-viewer/renderingChanges.js.map +1 -0
  263. package/dist/editor/page-viewer/scrollIntoViewTextRanges.d.ts +23 -0
  264. package/dist/editor/page-viewer/scrollIntoViewTextRanges.js +26 -0
  265. package/dist/editor/page-viewer/scrollIntoViewTextRanges.js.map +1 -0
  266. package/dist/editor/page-viewer/useInteractivePreview.d.ts +77 -0
  267. package/dist/editor/page-viewer/useInteractivePreview.js +210 -0
  268. package/dist/editor/page-viewer/useInteractivePreview.js.map +1 -0
  269. package/dist/editor/reviews/CollapsibleText.d.ts +13 -0
  270. package/dist/editor/reviews/CollapsibleText.js +41 -0
  271. package/dist/editor/reviews/CollapsibleText.js.map +1 -0
  272. package/dist/editor/reviews/CommentImageAttachments.d.ts +12 -0
  273. package/dist/editor/reviews/CommentImageAttachments.js +19 -0
  274. package/dist/editor/reviews/CommentImageAttachments.js.map +1 -0
  275. package/dist/editor/reviews/CommentQuote.d.ts +13 -0
  276. package/dist/editor/reviews/CommentQuote.js +35 -0
  277. package/dist/editor/reviews/CommentQuote.js.map +1 -0
  278. package/dist/editor/reviews/CommentTargetOutline.d.ts +13 -0
  279. package/dist/editor/reviews/CommentTargetOutline.js +21 -0
  280. package/dist/editor/reviews/CommentTargetOutline.js.map +1 -0
  281. package/dist/editor/reviews/CommentTargetPickerDomLayer.d.ts +7 -0
  282. package/dist/editor/reviews/CommentTargetPickerDomLayer.js +117 -0
  283. package/dist/editor/reviews/CommentTargetPickerDomLayer.js.map +1 -0
  284. package/dist/editor/reviews/CommentThreadAgentLink.d.ts +28 -0
  285. package/dist/editor/reviews/CommentThreadAgentLink.js +37 -0
  286. package/dist/editor/reviews/CommentThreadAgentLink.js.map +1 -0
  287. package/dist/editor/reviews/CommentThreadCard.d.ts +34 -0
  288. package/dist/editor/reviews/CommentThreadCard.js +156 -0
  289. package/dist/editor/reviews/CommentThreadCard.js.map +1 -0
  290. package/dist/editor/reviews/SuggestionThreadCard.d.ts +19 -0
  291. package/dist/editor/reviews/SuggestionThreadCard.js +25 -0
  292. package/dist/editor/reviews/SuggestionThreadCard.js.map +1 -0
  293. package/dist/editor/reviews/addCommentOnTarget.d.ts +22 -0
  294. package/dist/editor/reviews/addCommentOnTarget.js +32 -0
  295. package/dist/editor/reviews/addCommentOnTarget.js.map +1 -0
  296. package/dist/editor/reviews/balloonLayout.d.ts +51 -0
  297. package/dist/editor/reviews/balloonLayout.js +101 -0
  298. package/dist/editor/reviews/balloonLayout.js.map +1 -0
  299. package/dist/editor/reviews/commentAgentAttachments.d.ts +5 -0
  300. package/dist/editor/reviews/commentAgentAttachments.js +51 -0
  301. package/dist/editor/reviews/commentAgentAttachments.js.map +1 -0
  302. package/dist/editor/reviews/commentImages.d.ts +48 -0
  303. package/dist/editor/reviews/commentImages.js +128 -0
  304. package/dist/editor/reviews/commentImages.js.map +1 -0
  305. package/dist/editor/reviews/commentTargetPicker.d.ts +114 -0
  306. package/dist/editor/reviews/commentTargetPicker.js +153 -0
  307. package/dist/editor/reviews/commentTargetPicker.js.map +1 -0
  308. package/dist/editor/reviews/feedbackBalloonDate.d.ts +8 -0
  309. package/dist/editor/reviews/feedbackBalloonDate.js +22 -0
  310. package/dist/editor/reviews/feedbackBalloonDate.js.map +1 -0
  311. package/dist/editor/reviews/feedbackDrafts.d.ts +49 -0
  312. package/dist/editor/reviews/feedbackDrafts.js +74 -0
  313. package/dist/editor/reviews/feedbackDrafts.js.map +1 -0
  314. package/dist/editor/reviews/feedbackHoverState.d.ts +18 -0
  315. package/dist/editor/reviews/feedbackHoverState.js +35 -0
  316. package/dist/editor/reviews/feedbackHoverState.js.map +1 -0
  317. package/dist/editor/reviews/feedbackPersonFilter.d.ts +3 -0
  318. package/dist/editor/reviews/feedbackPersonFilter.js +32 -0
  319. package/dist/editor/reviews/feedbackPersonFilter.js.map +1 -0
  320. package/dist/editor/reviews/feedbackThreadSelection.d.ts +10 -0
  321. package/dist/editor/reviews/feedbackThreadSelection.js +31 -0
  322. package/dist/editor/reviews/feedbackThreadSelection.js.map +1 -0
  323. package/dist/editor/reviews/feedbackThreads.d.ts +50 -0
  324. package/dist/editor/reviews/feedbackThreads.js +135 -0
  325. package/dist/editor/reviews/feedbackThreads.js.map +1 -0
  326. package/dist/editor/reviews/feedbackWheelForwarding.d.ts +34 -0
  327. package/dist/editor/reviews/feedbackWheelForwarding.js +108 -0
  328. package/dist/editor/reviews/feedbackWheelForwarding.js.map +1 -0
  329. package/dist/editor/reviews/reviewUrlScope.d.ts +23 -0
  330. package/dist/editor/reviews/reviewUrlScope.js +86 -0
  331. package/dist/editor/reviews/reviewUrlScope.js.map +1 -0
  332. package/dist/editor/reviews/scrollWithin.d.ts +29 -0
  333. package/dist/editor/reviews/scrollWithin.js +87 -0
  334. package/dist/editor/reviews/scrollWithin.js.map +1 -0
  335. package/dist/editor/reviews/subtreeFeedback.d.ts +57 -0
  336. package/dist/editor/reviews/subtreeFeedback.js +137 -0
  337. package/dist/editor/reviews/subtreeFeedback.js.map +1 -0
  338. package/dist/editor/reviews/useCommentImagePaste.d.ts +80 -0
  339. package/dist/editor/reviews/useCommentImagePaste.js +252 -0
  340. package/dist/editor/reviews/useCommentImagePaste.js.map +1 -0
  341. package/dist/editor/reviews/useFeedbackThreads.d.ts +35 -0
  342. package/dist/editor/reviews/useFeedbackThreads.js +137 -0
  343. package/dist/editor/reviews/useFeedbackThreads.js.map +1 -0
  344. package/dist/editor/reviews/useMeasuredHeights.d.ts +25 -0
  345. package/dist/editor/reviews/useMeasuredHeights.js +176 -0
  346. package/dist/editor/reviews/useMeasuredHeights.js.map +1 -0
  347. package/dist/editor/reviews/usePendingFeedbackFocus.d.ts +7 -0
  348. package/dist/editor/reviews/usePendingFeedbackFocus.js +42 -0
  349. package/dist/editor/reviews/usePendingFeedbackFocus.js.map +1 -0
  350. package/dist/editor/services/mcpAccessService.d.ts +93 -0
  351. package/dist/editor/services/mcpAccessService.js +41 -0
  352. package/dist/editor/services/mcpAccessService.js.map +1 -0
  353. package/dist/editor/services/previewTokenService.d.ts +14 -0
  354. package/dist/editor/services/previewTokenService.js +34 -0
  355. package/dist/editor/services/previewTokenService.js.map +1 -0
  356. package/dist/editor/services/renderingsService.d.ts +117 -0
  357. package/dist/editor/services/renderingsService.js +245 -0
  358. package/dist/editor/services/renderingsService.js.map +1 -0
  359. package/dist/editor/services/spellCheckService.d.ts +13 -0
  360. package/dist/editor/services/spellCheckService.js +33 -0
  361. package/dist/editor/services/spellCheckService.js.map +1 -0
  362. package/dist/editor/settings/panels/McpAccessPanel.d.ts +7 -0
  363. package/dist/editor/settings/panels/McpAccessPanel.js +95 -0
  364. package/dist/editor/settings/panels/McpAccessPanel.js.map +1 -0
  365. package/dist/editor/settings/panels/McpAccessSettingsView.d.ts +8 -0
  366. package/dist/editor/settings/panels/McpAccessSettingsView.js +221 -0
  367. package/dist/editor/settings/panels/McpAccessSettingsView.js.map +1 -0
  368. package/dist/editor/settings/panels/SpellCheckPanel.d.ts +8 -0
  369. package/dist/editor/settings/panels/SpellCheckPanel.js +253 -0
  370. package/dist/editor/settings/panels/SpellCheckPanel.js.map +1 -0
  371. package/dist/editor/sidebar/FeedbackSidebar.d.ts +7 -0
  372. package/dist/editor/sidebar/FeedbackSidebar.js +300 -0
  373. package/dist/editor/sidebar/FeedbackSidebar.js.map +1 -0
  374. package/dist/editor/sidebar/OperationDetailsContent.js +50 -0
  375. package/dist/editor/sidebar/OperationDetailsContent.js.map +1 -1
  376. package/dist/editor/sidebar/liveComponentThumbnails.d.ts +19 -6
  377. package/dist/editor/sidebar/liveComponentThumbnails.js +39 -18
  378. package/dist/editor/sidebar/liveComponentThumbnails.js.map +1 -1
  379. package/dist/editor/spellcheck/canvasSpellCheckContextMenu.d.ts +30 -0
  380. package/dist/editor/spellcheck/canvasSpellCheckContextMenu.js +69 -0
  381. package/dist/editor/spellcheck/canvasSpellCheckContextMenu.js.map +1 -0
  382. package/dist/editor/spellcheck/htmlSpellDocument.d.ts +60 -0
  383. package/dist/editor/spellcheck/htmlSpellDocument.js +181 -0
  384. package/dist/editor/spellcheck/htmlSpellDocument.js.map +1 -0
  385. package/dist/editor/spellcheck/htmlSpellTokenizer.d.ts +45 -0
  386. package/dist/editor/spellcheck/htmlSpellTokenizer.js +277 -0
  387. package/dist/editor/spellcheck/htmlSpellTokenizer.js.map +1 -0
  388. package/dist/editor/spellcheck/replacementGuard.d.ts +27 -0
  389. package/dist/editor/spellcheck/replacementGuard.js +29 -0
  390. package/dist/editor/spellcheck/replacementGuard.js.map +1 -0
  391. package/dist/editor/spellcheck/spellCheckCanvasStore.d.ts +17 -0
  392. package/dist/editor/spellcheck/spellCheckCanvasStore.js +37 -0
  393. package/dist/editor/spellcheck/spellCheckCanvasStore.js.map +1 -0
  394. package/dist/editor/spellcheck/spellCheckCanvasTargets.d.ts +71 -0
  395. package/dist/editor/spellcheck/spellCheckCanvasTargets.js +126 -0
  396. package/dist/editor/spellcheck/spellCheckCanvasTargets.js.map +1 -0
  397. package/dist/editor/spellcheck/spellCheckClient.d.ts +66 -0
  398. package/dist/editor/spellcheck/spellCheckClient.js +0 -0
  399. package/dist/editor/spellcheck/spellCheckClient.js.map +1 -0
  400. package/dist/editor/spellcheck/spellCheckContextMenu.d.ts +52 -0
  401. package/dist/editor/spellcheck/spellCheckContextMenu.js +120 -0
  402. package/dist/editor/spellcheck/spellCheckContextMenu.js.map +1 -0
  403. package/dist/editor/spellcheck/spellCheckReplace.d.ts +8 -0
  404. package/dist/editor/spellcheck/spellCheckReplace.js +20 -0
  405. package/dist/editor/spellcheck/spellCheckReplace.js.map +1 -0
  406. package/dist/editor/spellcheck/spellCheckStyles.d.ts +11 -0
  407. package/dist/editor/spellcheck/spellCheckStyles.js +12 -0
  408. package/dist/editor/spellcheck/spellCheckStyles.js.map +1 -0
  409. package/dist/editor/spellcheck/spellCheckTypes.d.ts +94 -0
  410. package/dist/editor/spellcheck/spellCheckTypes.js +2 -0
  411. package/dist/editor/spellcheck/spellCheckTypes.js.map +1 -0
  412. package/dist/editor/spellcheck/textMarkHitTest.d.ts +14 -0
  413. package/dist/editor/spellcheck/textMarkHitTest.js +39 -0
  414. package/dist/editor/spellcheck/textMarkHitTest.js.map +1 -0
  415. package/dist/editor/spellcheck/useSpellCheck.d.ts +16 -0
  416. package/dist/editor/spellcheck/useSpellCheck.js +57 -0
  417. package/dist/editor/spellcheck/useSpellCheck.js.map +1 -0
  418. package/dist/editor/ui/DynamicRenderingsPublishWarning.d.ts +14 -0
  419. package/dist/editor/ui/DynamicRenderingsPublishWarning.js +40 -0
  420. package/dist/editor/ui/DynamicRenderingsPublishWarning.js.map +1 -0
  421. package/dist/editor/ui/ParheliaMark.d.ts +15 -0
  422. package/dist/editor/ui/ParheliaMark.js +12 -0
  423. package/dist/editor/ui/ParheliaMark.js.map +1 -0
  424. package/dist/editor/ui/RootItemPicker.d.ts +18 -0
  425. package/dist/editor/ui/RootItemPicker.js +112 -0
  426. package/dist/editor/ui/RootItemPicker.js.map +1 -0
  427. package/dist/editor/undoEligibility.d.ts +2 -0
  428. package/dist/editor/undoEligibility.js +8 -0
  429. package/dist/editor/undoEligibility.js.map +1 -0
  430. package/dist/editor/utils/dataTransferImages.d.ts +7 -0
  431. package/dist/editor/utils/dataTransferImages.js +43 -0
  432. package/dist/editor/utils/dataTransferImages.js.map +1 -0
  433. package/dist/editor/validation/navigateToValidationIssue.d.ts +2 -2
  434. package/dist/editor/validation/navigateToValidationIssue.js +1 -1
  435. package/dist/editor/validation/navigateToValidationIssue.js.map +1 -1
  436. package/dist/editor/validation/validationRulerIssues.d.ts +17 -0
  437. package/dist/editor/validation/validationRulerIssues.js +44 -0
  438. package/dist/editor/validation/validationRulerIssues.js.map +1 -0
  439. package/dist/revision.d.ts +2 -2
  440. package/dist/revision.js +2 -2
  441. package/dist/task-board/components/AttentionPromptDialog.d.ts +13 -0
  442. package/dist/task-board/components/AttentionPromptDialog.js +45 -0
  443. package/dist/task-board/components/AttentionPromptDialog.js.map +1 -0
  444. package/dist/task-board/components/GoalFindingsTable.d.ts +43 -0
  445. package/dist/task-board/components/GoalFindingsTable.js +160 -0
  446. package/dist/task-board/components/GoalFindingsTable.js.map +1 -0
  447. package/dist/task-board/components/IssuePanel.d.ts +31 -0
  448. package/dist/task-board/components/IssuePanel.js +268 -0
  449. package/dist/task-board/components/IssuePanel.js.map +1 -0
  450. package/dist/task-board/components/SubgoalFindings.d.ts +40 -0
  451. package/dist/task-board/components/SubgoalFindings.js +88 -0
  452. package/dist/task-board/components/SubgoalFindings.js.map +1 -0
  453. package/dist/task-board/services/issueService.d.ts +193 -0
  454. package/dist/task-board/services/issueService.js +97 -0
  455. package/dist/task-board/services/issueService.js.map +1 -0
  456. package/dist/task-board/taskBlockers.d.ts +10 -0
  457. package/dist/task-board/taskBlockers.js +66 -0
  458. package/dist/task-board/taskBlockers.js.map +1 -0
  459. package/dist/task-board/utils/projectDashboardModel.js +14 -0
  460. package/dist/task-board/utils/projectDashboardModel.js.map +1 -1
  461. package/dist/task-board/views/ProjectDashboardView.js +5 -13
  462. package/dist/task-board/views/ProjectDashboardView.js.map +1 -1
  463. package/dist/tour/sandbox-tour-copy.d.ts +8 -0
  464. package/dist/tour/sandbox-tour-copy.js +8 -0
  465. package/dist/tour/sandbox-tour-copy.js.map +1 -1
  466. package/dist/tour/sandbox-tour.d.ts +3 -0
  467. package/dist/tour/sandbox-tour.js +107 -3
  468. package/dist/tour/sandbox-tour.js.map +1 -1
  469. package/package.json +1 -1
  470. package/dist/editor/page-editor-chrome/bridgeLinkValue.d.ts +0 -10
  471. package/dist/editor/page-editor-chrome/bridgeLinkValue.js +0 -55
  472. package/dist/editor/page-editor-chrome/bridgeLinkValue.js.map +0 -1
@@ -0,0 +1,66 @@
1
+ import { localStorageService } from "../services/localStorageService";
2
+ import type { ExecutionResult } from "../services/serviceHelper";
3
+ import type { CheckedResult, LanguageState, SpellCheckResponse } from "./spellCheckTypes";
4
+ /**
5
+ * Shared spell-check client. Every surface (rich text, inputs, canvas fields)
6
+ * registers the text it shows under a key; the client debounces per language,
7
+ * batches the pending texts into requests that respect the server limits,
8
+ * caches results by dictionary and exact text, and tells subscribers when
9
+ * anything changed. Nothing here touches React or the DOM.
10
+ */
11
+ export type SpellCheckClientDeps = {
12
+ check?: (language: string, texts: {
13
+ key: string;
14
+ text: string;
15
+ }[], signal?: AbortSignal) => Promise<ExecutionResult<SpellCheckResponse>>;
16
+ storage?: Pick<typeof localStorageService, "getItem" | "setItem">;
17
+ now?: () => number;
18
+ debounceMs?: number;
19
+ /** Re-issue checks after this long while a dictionary is still downloading. */
20
+ downloadingRetryMs?: number;
21
+ /** Stay quiet this long after the server reported an unavailable or unsupported language. */
22
+ unavailableQuietMs?: number;
23
+ /** Results older than this are re-requested (active revalidation for mounted texts). */
24
+ freshnessMs?: number;
25
+ cacheCapacity?: number;
26
+ maxTextsPerRequest?: number;
27
+ maxUnitsPerRequest?: number;
28
+ /** Longer texts are cut at a whitespace before this many code units before sending. */
29
+ maxTextUnits?: number;
30
+ };
31
+ /** The same normalization the server applies to custom-word keys. */
32
+ export declare function normalizeWordKey(word: string): string;
33
+ /**
34
+ * Cuts a text that exceeds `maxUnits` at the last whitespace before the cap
35
+ * (never inside a surrogate pair) so the request stays within server limits.
36
+ */
37
+ export declare function truncateForCheck(text: string, maxUnits: number): {
38
+ sentText: string;
39
+ truncated: boolean;
40
+ };
41
+ export declare function createSpellCheckClient(deps?: SpellCheckClientDeps): {
42
+ subscribe(listener: () => void): () => void;
43
+ getRevision(): number;
44
+ /** Registers (or updates) the text shown under `key` and checks it when needed. */
45
+ request(key: string, language: string, text: string): void;
46
+ /** Forgets `key`; a pending check for it is dropped. */
47
+ release(key: string): void;
48
+ /** The cached result for `text` in `language`, with ignored words filtered out. */
49
+ getResult(language: string, text: string): CheckedResult | undefined;
50
+ getDictionaryId(language: string): string | undefined;
51
+ getLanguageState(language: string): LanguageState;
52
+ isAvailable(language: string): boolean;
53
+ ignoreWord(language: string, word: string): void;
54
+ isIgnored(language: string, word: string): boolean;
55
+ getIgnoredWords(language: string): string[];
56
+ /** Drops every result of the dictionary and re-checks the mounted texts. */
57
+ invalidateDictionary(dictionaryId: string): void;
58
+ /** Convenience: resolves the language to its dictionary (or itself) and invalidates that. */
59
+ invalidateLanguage(language: string): void;
60
+ /** Test seam. */
61
+ reset(): void;
62
+ /** Test seam: number of cached results. */
63
+ getCacheSize(): number;
64
+ };
65
+ export type SpellCheckClient = ReturnType<typeof createSpellCheckClient>;
66
+ export declare const spellCheckClient: SpellCheckClient;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"spellCheckClient.js","sourceRoot":"","sources":["../../../src/editor/spellcheck/spellCheckClient.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AAEtE,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAyD9D,MAAM,sBAAsB,GAAG,qBAAqB,CAAC;AAErD,qEAAqE;AACrE,MAAM,UAAU,gBAAgB,CAAC,IAAY;IAC3C,OAAO,IAAI;SACR,IAAI,EAAE;SACN,SAAS,CAAC,KAAK,CAAC;SAChB,OAAO,CAAC,OAAO,EAAE,GAAG,CAAC;SACrB,WAAW,EAAE,CAAC;AACnB,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,gBAAgB,CAC9B,IAAY,EACZ,QAAgB;IAEhB,IAAI,IAAI,CAAC,MAAM,IAAI,QAAQ;QA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,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,UAAU,CAAC,KAAK,EAAE,CAAC,CAAC;YACtD,QAAQ,CAAC,KAAK,EAAE,CAAC;YACjB,OAAO,CAAC,KAAK,EAAE,CAAC;YAChB,MAAM,CAAC,KAAK,EAAE,CAAC;YACf,WAAW,CAAC,KAAK,EAAE,CAAC;YACpB,oBAAoB,CAAC,KAAK,EAAE,CAAC;YAC7B,kBAAkB,CAAC,KAAK,EAAE,CAAC;YAC3B,KAAK,CAAC,KAAK,EAAE,CAAC;YACd,KAAK,CAAC,KAAK,EAAE,CAAC;YACd,OAAO,CAAC,KAAK,EAAE,CAAC;YAChB,MAAM,EAAE,CAAC;QACX,CAAC;QAED,2CAA2C;QAC3C,YAAY;YACV,OAAO,KAAK,CAAC,IAAI,CAAC;QACpB,CAAC;KACF,CAAC;IAEF,OAAO,MAAM,CAAC;AAChB,CAAC;AAID,MAAM,CAAC,MAAM,gBAAgB,GAAqB,sBAAsB,EAAE,CAAC"}
@@ -0,0 +1,52 @@
1
+ import type { MenuItem } from "../../config/types";
2
+ import { suggestSpelling } from "../services/spellCheckService";
3
+ import { type SpellReplacementCapture } from "./replacementGuard";
4
+ import { type SpellCheckClient } from "./spellCheckClient";
5
+ import type { Misspelling } from "./spellCheckTypes";
6
+ export declare const SPELLCHECK_MENU_ID_PREFIX = "spellcheck-";
7
+ export declare const MAX_SUGGESTIONS = 8;
8
+ /** Placeholder shown while suggestions load; replaced via `updateContextMenu`. */
9
+ export declare function createSpellCheckLoadingItem(): MenuItem;
10
+ /**
11
+ * Adds `word` to the shared dictionary of `language` and invalidates cached
12
+ * results so every surface re-checks. Returns true on success.
13
+ */
14
+ export declare function addWordToDictionary(language: string, word: string, client?: SpellCheckClient): Promise<boolean>;
15
+ export type SpellCheckMenuArgs = {
16
+ language: string;
17
+ word: string;
18
+ onReplace: (replacement: string) => void | Promise<void>;
19
+ onIgnore: () => void;
20
+ onAddToDictionary: () => Promise<void> | void;
21
+ signal?: AbortSignal;
22
+ suggest?: typeof suggestSpelling;
23
+ };
24
+ /**
25
+ * The suggestion section of a context menu for one misspelled word: up to
26
+ * eight suggestions (or a disabled "No suggestions" entry), a separator,
27
+ * "Ignore" and "Add to dictionary". Returns an empty list when the server has
28
+ * no usable dictionary or reports the word as correct.
29
+ */
30
+ export declare function buildSpellCheckMenuItems(args: SpellCheckMenuArgs): Promise<MenuItem[]>;
31
+ /** The part of the edit context the menu needs. */
32
+ export type SpellCheckMenuHost = {
33
+ showContextMenu(event: unknown, items: MenuItem[]): void;
34
+ updateContextMenu(items: MenuItem[]): void;
35
+ };
36
+ /**
37
+ * Opens the suggestion menu for one misspelling: shows the loading entry at
38
+ * once, fills in suggestions when they arrive, and applies a replacement only
39
+ * after the surface's current text proves to be the checked text.
40
+ */
41
+ export declare function openSpellCheckMenu(args: {
42
+ host: SpellCheckMenuHost;
43
+ event: unknown;
44
+ language: string;
45
+ misspelling: Misspelling;
46
+ /** The text the misspelling offsets belong to. */
47
+ checkedText: string;
48
+ /** The surface's text at the moment a suggestion is applied. */
49
+ getCurrentText: () => string;
50
+ applyReplacement: (capture: SpellReplacementCapture, replacement: string) => void;
51
+ client?: SpellCheckClient;
52
+ }): void;
@@ -0,0 +1,120 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { BookPlus, EyeOff } from "lucide-react";
3
+ import { toast } from "sonner";
4
+ import { addCustomWord, suggestSpelling } from "../services/spellCheckService";
5
+ import { Spinner } from "../ui/Spinner";
6
+ import { captureReplacement, STALE_REPLACEMENT_MESSAGE, verifyReplacement, } from "./replacementGuard";
7
+ import { spellCheckClient } from "./spellCheckClient";
8
+ export const SPELLCHECK_MENU_ID_PREFIX = "spellcheck-";
9
+ export const MAX_SUGGESTIONS = 8;
10
+ /** Placeholder shown while suggestions load; replaced via `updateContextMenu`. */
11
+ export function createSpellCheckLoadingItem() {
12
+ return {
13
+ id: `${SPELLCHECK_MENU_ID_PREFIX}loading`,
14
+ label: "Loading suggestions…",
15
+ icon: _jsx(Spinner, { size: "sm" }),
16
+ disabled: true,
17
+ };
18
+ }
19
+ /**
20
+ * Adds `word` to the shared dictionary of `language` and invalidates cached
21
+ * results so every surface re-checks. Returns true on success.
22
+ */
23
+ export async function addWordToDictionary(language, word, client = spellCheckClient) {
24
+ const result = await addCustomWord(language, word);
25
+ const response = result.type === "success" ? result.data : undefined;
26
+ if (!response?.success) {
27
+ toast.error(response?.message ?? result.summary ?? "The word could not be added.");
28
+ if (response?.dictionaryId)
29
+ client.invalidateDictionary(response.dictionaryId);
30
+ return false;
31
+ }
32
+ client.invalidateDictionary(response.dictionaryId ?? language);
33
+ toast.success(`"${response.word ?? word}" was added to the dictionary.`);
34
+ return true;
35
+ }
36
+ /**
37
+ * The suggestion section of a context menu for one misspelled word: up to
38
+ * eight suggestions (or a disabled "No suggestions" entry), a separator,
39
+ * "Ignore" and "Add to dictionary". Returns an empty list when the server has
40
+ * no usable dictionary or reports the word as correct.
41
+ */
42
+ export async function buildSpellCheckMenuItems(args) {
43
+ const suggest = args.suggest ?? suggestSpelling;
44
+ const result = await suggest(args.language, args.word, args.signal);
45
+ const response = result.type === "success" ? result.data : undefined;
46
+ if (!response || response.status !== "available" || response.isCorrect)
47
+ return [];
48
+ const suggestions = (response.suggestions ?? []).slice(0, MAX_SUGGESTIONS);
49
+ const items = suggestions.map((suggestion, index) => ({
50
+ id: `${SPELLCHECK_MENU_ID_PREFIX}suggestion-${index}`,
51
+ label: suggestion,
52
+ className: "font-medium",
53
+ command: async () => {
54
+ await args.onReplace(suggestion);
55
+ },
56
+ }));
57
+ if (items.length === 0) {
58
+ items.push({
59
+ id: `${SPELLCHECK_MENU_ID_PREFIX}no-suggestions`,
60
+ label: "No suggestions",
61
+ disabled: true,
62
+ });
63
+ }
64
+ items.push({ id: `${SPELLCHECK_MENU_ID_PREFIX}separator`, separator: true });
65
+ items.push({
66
+ id: `${SPELLCHECK_MENU_ID_PREFIX}ignore`,
67
+ label: "Ignore",
68
+ icon: _jsx(EyeOff, { strokeWidth: 1.5 }),
69
+ command: async () => {
70
+ args.onIgnore();
71
+ },
72
+ });
73
+ items.push({
74
+ id: `${SPELLCHECK_MENU_ID_PREFIX}add-word`,
75
+ label: "Add to dictionary",
76
+ icon: _jsx(BookPlus, { strokeWidth: 1.5 }),
77
+ command: async () => {
78
+ await args.onAddToDictionary();
79
+ },
80
+ });
81
+ return items;
82
+ }
83
+ /**
84
+ * Opens the suggestion menu for one misspelling: shows the loading entry at
85
+ * once, fills in suggestions when they arrive, and applies a replacement only
86
+ * after the surface's current text proves to be the checked text.
87
+ */
88
+ export function openSpellCheckMenu(args) {
89
+ const client = args.client ?? spellCheckClient;
90
+ const { language, misspelling } = args;
91
+ const capture = captureReplacement(args.checkedText, misspelling);
92
+ args.host.showContextMenu(args.event, [createSpellCheckLoadingItem()]);
93
+ void buildSpellCheckMenuItems({
94
+ language,
95
+ word: misspelling.word,
96
+ onReplace: (replacement) => {
97
+ const verdict = verifyReplacement(capture, args.getCurrentText());
98
+ if (!verdict.ok) {
99
+ toast.info(STALE_REPLACEMENT_MESSAGE);
100
+ return;
101
+ }
102
+ args.applyReplacement(capture, replacement);
103
+ },
104
+ onIgnore: () => client.ignoreWord(language, misspelling.word),
105
+ onAddToDictionary: async () => {
106
+ await addWordToDictionary(language, misspelling.word, client);
107
+ },
108
+ }).then((items) => {
109
+ args.host.updateContextMenu(items.length > 0
110
+ ? items
111
+ : [
112
+ {
113
+ id: `${SPELLCHECK_MENU_ID_PREFIX}none`,
114
+ label: "No suggestions",
115
+ disabled: true,
116
+ },
117
+ ]);
118
+ });
119
+ }
120
+ //# sourceMappingURL=spellCheckContextMenu.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"spellCheckContextMenu.js","sourceRoot":"","sources":["../../../src/editor/spellcheck/spellCheckContextMenu.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,EAAE,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,OAAO,EAAE,IAAI,CAAC,cAAc,EAAE,CAAC,CAAC;YAClE,IAAI,CAAC,OAAO,CAAC,EAAE,EAAE,CAAC;gBAChB,KAAK,CAAC,IAAI,CAAC,yBAAyB,CAAC,CAAC;gBACtC,OAAO;YACT,CAAC;YACD,IAAI,CAAC,gBAAgB,CAAC,OAAO,EAAE,WAAW,CAAC,CAAC;QAC9C,CAAC;QACD,QAAQ,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,UAAU,CAAC,QAAQ,EAAE,WAAW,CAAC,IAAI,CAAC;QAC7D,iBAAiB,EAAE,KAAK,IAAI,EAAE;YAC5B,MAAM,mBAAmB,CAAC,QAAQ,EAAE,WAAW,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;QAChE,CAAC;KACF,CAAC,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,EAAE;QAChB,IAAI,CAAC,IAAI,CAAC,iBAAiB,CACzB,KAAK,CAAC,MAAM,GAAG,CAAC;YACd,CAAC,CAAC,KAAK;YACP,CAAC,CAAC;gBACE;oBACE,EAAE,EAAE,GAAG,yBAAyB,MAAM;oBACtC,KAAK,EAAE,gBAAgB;oBACvB,QAAQ,EAAE,IAAI;iBACf;aACF,CACN,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC"}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Replaces the spell-text range [start, end) of a stored field value with
3
+ * `replacement`. Plain text values are spliced directly; rich text goes
4
+ * through the shared parsed representation so only the word changes and the
5
+ * rest of the markup stays byte for byte. Returns undefined when the range
6
+ * does not spell `word` (stale offsets) or spans inline formatting.
7
+ */
8
+ export declare function replaceRenderedRange(value: string, fieldType: string | undefined, start: number, end: number, word: string, replacement: string): string | undefined;
@@ -0,0 +1,20 @@
1
+ import { isHtmlFieldType } from "../find-replace/findReplaceText";
2
+ import { parseHtmlSpellDocument, replaceInDocument } from "./htmlSpellDocument";
3
+ /**
4
+ * Replaces the spell-text range [start, end) of a stored field value with
5
+ * `replacement`. Plain text values are spliced directly; rich text goes
6
+ * through the shared parsed representation so only the word changes and the
7
+ * rest of the markup stays byte for byte. Returns undefined when the range
8
+ * does not spell `word` (stale offsets) or spans inline formatting.
9
+ */
10
+ export function replaceRenderedRange(value, fieldType, start, end, word, replacement) {
11
+ if (end <= start)
12
+ return undefined;
13
+ if (!isHtmlFieldType(fieldType)) {
14
+ if (value.slice(start, end) !== word)
15
+ return undefined;
16
+ return value.slice(0, start) + replacement + value.slice(end);
17
+ }
18
+ return replaceInDocument(parseHtmlSpellDocument(value), start, end, word, replacement);
19
+ }
20
+ //# sourceMappingURL=spellCheckReplace.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"spellCheckReplace.js","sourceRoot":"","sources":["../../../src/editor/spellcheck/spellCheckReplace.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAClE,OAAO,EAAE,sBAAsB,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAEhF;;;;;;GAMG;AACH,MAAM,UAAU,oBAAoB,CAClC,KAAa,EACb,SAA6B,EAC7B,KAAa,EACb,GAAW,EACX,IAAY,EACZ,WAAmB;IAEnB,IAAI,GAAG,IAAI,KAAK;QAAE,OAAO,SAAS,CAAC;IACnC,IAAI,CAAC,eAAe,CAAC,SAAS,CAAC,EAAE,CAAC;QAChC,IAAI,KAAK,CAAC,KAAK,CAAC,KAAK,EAAE,GAAG,CAAC,KAAK,IAAI;YAAE,OAAO,SAAS,CAAC;QACvD,OAAO,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,CAAC,GAAG,WAAW,GAAG,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAChE,CAAC;IACD,OAAO,iBAAiB,CAAC,sBAAsB,CAAC,KAAK,CAAC,EAAE,KAAK,EAAE,GAAG,EAAE,IAAI,EAAE,WAAW,CAAC,CAAC;AACzF,CAAC"}
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Wavy red underline for a misspelled word in text surfaces (Slate leaves and
3
+ * the input/textarea mirror). The canvas overlay draws the same wave with the
4
+ * `.spellcheck-underline` class from styles.css because it has no glyphs to
5
+ * decorate.
6
+ */
7
+ export declare const misspelledTextClass = "underline decoration-wavy decoration-feedback-red decoration-[1.5px] underline-offset-2";
8
+ /** Class of the canvas overlay strip drawn under a misspelled word. */
9
+ export declare const spellCheckUnderlineClass = "spellcheck-underline";
10
+ /** Height of the canvas underline strip in CSS pixels. */
11
+ export declare const SPELLCHECK_UNDERLINE_HEIGHT = 3;
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Wavy red underline for a misspelled word in text surfaces (Slate leaves and
3
+ * the input/textarea mirror). The canvas overlay draws the same wave with the
4
+ * `.spellcheck-underline` class from styles.css because it has no glyphs to
5
+ * decorate.
6
+ */
7
+ export const misspelledTextClass = "underline decoration-wavy decoration-feedback-red decoration-[1.5px] underline-offset-2";
8
+ /** Class of the canvas overlay strip drawn under a misspelled word. */
9
+ export const spellCheckUnderlineClass = "spellcheck-underline";
10
+ /** Height of the canvas underline strip in CSS pixels. */
11
+ export const SPELLCHECK_UNDERLINE_HEIGHT = 3;
12
+ //# sourceMappingURL=spellCheckStyles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"spellCheckStyles.js","sourceRoot":"","sources":["../../../src/editor/spellcheck/spellCheckStyles.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAC9B,yFAAyF,CAAC;AAE5F,uEAAuE;AACvE,MAAM,CAAC,MAAM,wBAAwB,GAAG,sBAAsB,CAAC;AAE/D,0DAA0D;AAC1D,MAAM,CAAC,MAAM,2BAA2B,GAAG,CAAC,CAAC"}
@@ -0,0 +1,94 @@
1
+ /** A misspelled word as [start, end) UTF-16 offsets into the checked text. */
2
+ export type Misspelling = {
3
+ start: number;
4
+ end: number;
5
+ word: string;
6
+ };
7
+ export type SpellCheckStatus = "available" | "downloading" | "unavailable" | "unsupported";
8
+ export type SpellCheckTextResultDto = {
9
+ key: string;
10
+ misspellings: Misspelling[];
11
+ truncated: boolean;
12
+ checkedLength: number;
13
+ };
14
+ export type SpellCheckResponse = {
15
+ language: string;
16
+ dictionaryId?: string | null;
17
+ revision: string;
18
+ status: SpellCheckStatus;
19
+ results: SpellCheckTextResultDto[];
20
+ };
21
+ export type SpellSuggestResponse = {
22
+ word: string;
23
+ dictionaryId?: string | null;
24
+ revision: string;
25
+ status: SpellCheckStatus;
26
+ isCorrect: boolean;
27
+ suggestions: string[];
28
+ };
29
+ export type SpellCheckWordDto = {
30
+ word: string;
31
+ created: string;
32
+ createdBy: string;
33
+ };
34
+ export type SpellCheckWordsResponse = {
35
+ language: string;
36
+ dictionaryId?: string | null;
37
+ revision: string;
38
+ words: SpellCheckWordDto[];
39
+ };
40
+ export type SpellCheckWordMutationResponse = {
41
+ success: boolean;
42
+ dictionaryId?: string | null;
43
+ revision: string;
44
+ word?: string | null;
45
+ message?: string | null;
46
+ };
47
+ export type DictionaryStatus = "available" | "downloading" | "missing" | "failed" | "disabled" | "unsupported";
48
+ export type SpellCheckDictionaryStatus = {
49
+ id: string;
50
+ language: string;
51
+ region?: string | null;
52
+ /** A bare language code or an unknown region resolves to this dictionary. */
53
+ isDefaultForLanguage: boolean;
54
+ status: DictionaryStatus;
55
+ revision: string;
56
+ installId?: string | null;
57
+ sourceRef?: string | null;
58
+ licenseFile?: string | null;
59
+ downloadedUtc?: string | null;
60
+ lastError?: string | null;
61
+ nextRetryUtc?: string | null;
62
+ customWordCount: number;
63
+ };
64
+ export type SpellCheckStatusResponse = {
65
+ enabled: boolean;
66
+ dictionaryFolder?: string | null;
67
+ dictionaryBaseUrl?: string | null;
68
+ sourceRef?: string | null;
69
+ dictionaries: SpellCheckDictionaryStatus[];
70
+ };
71
+ /** A cached check result for one exact text. */
72
+ export type CheckedResult = {
73
+ dictionaryId: string;
74
+ revision: string;
75
+ misspellings: Misspelling[];
76
+ truncated: boolean;
77
+ /** Code units of the original text that are covered by `misspellings`. */
78
+ checkedLength: number;
79
+ /** `Date.now()` when the result arrived. */
80
+ checkedAt: number;
81
+ };
82
+ /** What a surface gets back from the client for its current text. */
83
+ export type SpellCheckView = {
84
+ misspellings: Misspelling[];
85
+ /** The text the result belongs to, for the replacement guard. */
86
+ checkedText: string | undefined;
87
+ checkedLength: number;
88
+ truncated: boolean;
89
+ revision: string | undefined;
90
+ dictionaryId: string | undefined;
91
+ /** False while the language has no usable dictionary (nothing is underlined). */
92
+ available: boolean;
93
+ };
94
+ export type LanguageState = "available" | "downloading" | "unavailable" | "unsupported";
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=spellCheckTypes.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"spellCheckTypes.js","sourceRoot":"","sources":["../../../src/editor/spellcheck/spellCheckTypes.ts"],"names":[],"mappings":""}
@@ -0,0 +1,14 @@
1
+ import type { Misspelling } from "./spellCheckTypes";
2
+ /**
3
+ * Finds the misspelling mark of a text mirror under a viewport point. The
4
+ * mirror (see `TextMarkBackdrop`) is pointer-events-none, so hit testing walks
5
+ * its `[data-misspelled]` spans and their client rects instead. `text` is the
6
+ * control's current value, used to read the word back from the offsets.
7
+ */
8
+ export declare function findMisspellingAtPoint(mirror: HTMLElement | null | undefined, text: string, clientX: number, clientY: number): Misspelling | undefined;
9
+ /**
10
+ * Fallback when the mirror is not mounted: the browser moves the caret to the
11
+ * right-clicked position, so the misspelling containing the caret is the one
12
+ * under the pointer.
13
+ */
14
+ export declare function findMisspellingAtCaret(caretOffset: number | null | undefined, misspellings: readonly Misspelling[]): Misspelling | undefined;
@@ -0,0 +1,39 @@
1
+ /** Vertical slack in CSS pixels so a click on the underline itself still hits the word. */
2
+ const VERTICAL_SLACK = 2;
3
+ /**
4
+ * Finds the misspelling mark of a text mirror under a viewport point. The
5
+ * mirror (see `TextMarkBackdrop`) is pointer-events-none, so hit testing walks
6
+ * its `[data-misspelled]` spans and their client rects instead. `text` is the
7
+ * control's current value, used to read the word back from the offsets.
8
+ */
9
+ export function findMisspellingAtPoint(mirror, text, clientX, clientY) {
10
+ if (!mirror)
11
+ return undefined;
12
+ const marks = mirror.querySelectorAll("[data-misspelled]");
13
+ for (const mark of Array.from(marks)) {
14
+ const start = Number(mark.dataset.start);
15
+ const end = Number(mark.dataset.end);
16
+ if (!Number.isFinite(start) || !Number.isFinite(end) || end <= start)
17
+ continue;
18
+ for (const rect of Array.from(mark.getClientRects())) {
19
+ if (clientX >= rect.left &&
20
+ clientX <= rect.right &&
21
+ clientY >= rect.top - VERTICAL_SLACK &&
22
+ clientY <= rect.bottom + VERTICAL_SLACK) {
23
+ return { start, end, word: text.slice(start, end) };
24
+ }
25
+ }
26
+ }
27
+ return undefined;
28
+ }
29
+ /**
30
+ * Fallback when the mirror is not mounted: the browser moves the caret to the
31
+ * right-clicked position, so the misspelling containing the caret is the one
32
+ * under the pointer.
33
+ */
34
+ export function findMisspellingAtCaret(caretOffset, misspellings) {
35
+ if (caretOffset === null || caretOffset === undefined)
36
+ return undefined;
37
+ return misspellings.find((m) => m.start <= caretOffset && caretOffset <= m.end);
38
+ }
39
+ //# sourceMappingURL=textMarkHitTest.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"textMarkHitTest.js","sourceRoot":"","sources":["../../../src/editor/spellcheck/textMarkHitTest.ts"],"names":[],"mappings":"AAEA,2FAA2F;AAC3F,MAAM,cAAc,GAAG,CAAC,CAAC;AAEzB;;;;;GAKG;AACH,MAAM,UAAU,sBAAsB,CACpC,MAAsC,EACtC,IAAY,EACZ,OAAe,EACf,OAAe;IAEf,IAAI,CAAC,MAAM;QAAE,OAAO,SAAS,CAAC;IAC9B,MAAM,KAAK,GAAG,MAAM,CAAC,gBAAgB,CAAc,mBAAmB,CAAC,CAAC;IACxE,KAAK,MAAM,IAAI,IAAI,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;QACrC,MAAM,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;QACzC,MAAM,GAAG,GAAG,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;QACrC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,GAAG,IAAI,KAAK;YAAE,SAAS;QAC/E,KAAK,MAAM,IAAI,IAAI,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,cAAc,EAAE,CAAC,EAAE,CAAC;YACrD,IACE,OAAO,IAAI,IAAI,CAAC,IAAI;gBACpB,OAAO,IAAI,IAAI,CAAC,KAAK;gBACrB,OAAO,IAAI,IAAI,CAAC,GAAG,GAAG,cAAc;gBACpC,OAAO,IAAI,IAAI,CAAC,MAAM,GAAG,cAAc,EACvC,CAAC;gBACD,OAAO,EAAE,KAAK,EAAE,GAAG,EAAE,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,GAAG,CAAC,EAAE,CAAC;YACtD,CAAC;QACH,CAAC;IACH,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,sBAAsB,CACpC,WAAsC,EACtC,YAAoC;IAEpC,IAAI,WAAW,KAAK,IAAI,IAAI,WAAW,KAAK,SAAS;QAAE,OAAO,SAAS,CAAC;IACxE,OAAO,YAAY,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,IAAI,WAAW,IAAI,WAAW,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC;AAClF,CAAC"}
@@ -0,0 +1,16 @@
1
+ import { type SpellCheckClient } from "./spellCheckClient";
2
+ import type { SpellCheckView } from "./spellCheckTypes";
3
+ /** True when the current user has spell checking switched on (the default). */
4
+ export declare function useSpellCheckEnabled(): boolean;
5
+ /**
6
+ * Registers `text` with the shared spell-check client and returns the
7
+ * misspellings known for it. `key` must be unique per surface and field so a
8
+ * form field and the canvas can check the same text side by side.
9
+ */
10
+ export declare function useSpellCheck(args: {
11
+ key: string;
12
+ language: string | undefined;
13
+ text: string;
14
+ enabled?: boolean;
15
+ client?: SpellCheckClient;
16
+ }): SpellCheckView;
@@ -0,0 +1,57 @@
1
+ import { useEffect, useMemo, useSyncExternalStore } from "react";
2
+ import { useEditContext } from "../client/editContext";
3
+ import { spellCheckClient } from "./spellCheckClient";
4
+ const EMPTY = {
5
+ misspellings: [],
6
+ checkedText: undefined,
7
+ checkedLength: 0,
8
+ truncated: false,
9
+ revision: undefined,
10
+ dictionaryId: undefined,
11
+ available: false,
12
+ };
13
+ /** True when the current user has spell checking switched on (the default). */
14
+ export function useSpellCheckEnabled() {
15
+ const editContext = useEditContext();
16
+ return (editContext?.userInfo?.preferences?.spellCheckEnabled !== false &&
17
+ editContext?.mode !== "preview");
18
+ }
19
+ /**
20
+ * Registers `text` with the shared spell-check client and returns the
21
+ * misspellings known for it. `key` must be unique per surface and field so a
22
+ * form field and the canvas can check the same text side by side.
23
+ */
24
+ export function useSpellCheck(args) {
25
+ const { key, language, text } = args;
26
+ const client = args.client ?? spellCheckClient;
27
+ const preferenceEnabled = useSpellCheckEnabled();
28
+ const enabled = (args.enabled ?? true) && preferenceEnabled && !!language;
29
+ useSyncExternalStore(client.subscribe, client.getRevision, client.getRevision);
30
+ useEffect(() => {
31
+ if (!enabled || !language)
32
+ return;
33
+ client.request(key, language, text);
34
+ return () => client.release(key);
35
+ }, [client, enabled, key, language, text]);
36
+ // The revision subscription above re-renders this hook; the memo reads the
37
+ // latest cached result for the exact text on every render.
38
+ return useMemo(() => {
39
+ if (!enabled || !language)
40
+ return EMPTY;
41
+ const result = client.getResult(language, text);
42
+ if (!result) {
43
+ return { ...EMPTY, available: client.isAvailable(language) };
44
+ }
45
+ return {
46
+ misspellings: result.misspellings,
47
+ checkedText: text,
48
+ checkedLength: result.checkedLength,
49
+ truncated: result.truncated,
50
+ revision: result.revision,
51
+ dictionaryId: result.dictionaryId,
52
+ available: true,
53
+ };
54
+ // eslint-disable-next-line react-hooks/exhaustive-deps
55
+ }, [client, enabled, language, text, client.getRevision()]);
56
+ }
57
+ //# sourceMappingURL=useSpellCheck.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useSpellCheck.js","sourceRoot":"","sources":["../../../src/editor/spellcheck/useSpellCheck.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,oBAAoB,EAAE,MAAM,OAAO,CAAC;AACjE,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,gBAAgB,EAAyB,MAAM,oBAAoB,CAAC;AAG7E,MAAM,KAAK,GAAmB;IAC5B,YAAY,EAAE,EAAE;IAChB,WAAW,EAAE,SAAS;IACtB,aAAa,EAAE,CAAC;IAChB,SAAS,EAAE,KAAK;IAChB,QAAQ,EAAE,SAAS;IACnB,YAAY,EAAE,SAAS;IACvB,SAAS,EAAE,KAAK;CACjB,CAAC;AAEF,+EAA+E;AAC/E,MAAM,UAAU,oBAAoB;IAClC,MAAM,WAAW,GAAG,cAAc,EAAE,CAAC;IACrC,OAAO,CACL,WAAW,EAAE,QAAQ,EAAE,WAAW,EAAE,iBAAiB,KAAK,KAAK;QAC/D,WAAW,EAAE,IAAI,KAAK,SAAS,CAChC,CAAC;AACJ,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,aAAa,CAAC,IAM7B;IACC,MAAM,EAAE,GAAG,EAAE,QAAQ,EAAE,IAAI,EAAE,GAAG,IAAI,CAAC;IACrC,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,IAAI,gBAAgB,CAAC;IAC/C,MAAM,iBAAiB,GAAG,oBAAoB,EAAE,CAAC;IACjD,MAAM,OAAO,GAAG,CAAC,IAAI,CAAC,OAAO,IAAI,IAAI,CAAC,IAAI,iBAAiB,IAAI,CAAC,CAAC,QAAQ,CAAC;IAE1E,oBA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type DynamicRenderingsPublishWarningProps = {
3
+ page: PageVersion | undefined;
4
+ className?: string;
5
+ };
6
+ /**
7
+ * Warns before publishing a page whose dynamic renderings or theme are not
8
+ * approved: published pages leave them out. It never blocks publishing, and
9
+ * it stays silent when the approval state cannot be loaded (for example on a
10
+ * CM without dynamic renderings). The page's renderings are the ones its
11
+ * canvas showed last; the CM adds the page tenant's theme.
12
+ */
13
+ export declare function DynamicRenderingsPublishWarning({ page, className, }: DynamicRenderingsPublishWarningProps): import("react").JSX.Element | null;
14
+ export {};