@notectl/core 2.1.3 → 2.2.1

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 (1427) hide show
  1. package/dist/chunks/AlignmentPlugin-BLzRjrUl.mjs +2 -0
  2. package/dist/chunks/AlignmentPlugin-BLzRjrUl.mjs.map +1 -0
  3. package/dist/chunks/AttrRegistry-CRnXTPha.mjs +2 -0
  4. package/dist/chunks/AttrRegistry-CRnXTPha.mjs.map +1 -0
  5. package/dist/chunks/AttributedMarkCommands-CxhdUsuE.mjs +2 -0
  6. package/dist/chunks/AttributedMarkCommands-CxhdUsuE.mjs.map +1 -0
  7. package/dist/chunks/BidiIsolationPlugin-DNPXe5ga.mjs +2 -0
  8. package/dist/chunks/BidiIsolationPlugin-DNPXe5ga.mjs.map +1 -0
  9. package/dist/chunks/BlockInsertion-C7jFEeYB.mjs +2 -0
  10. package/dist/chunks/BlockInsertion-C7jFEeYB.mjs.map +1 -0
  11. package/dist/chunks/BlockTypePickerRegistry-U4uY7-lN.mjs +2 -0
  12. package/dist/chunks/BlockTypePickerRegistry-U4uY7-lN.mjs.map +1 -0
  13. package/dist/chunks/BlockquotePlugin-YgXcV4mT.mjs +2 -0
  14. package/dist/chunks/BlockquotePlugin-YgXcV4mT.mjs.map +1 -0
  15. package/dist/chunks/CaretNavigationPlugin-P6OYaTSq.mjs +2 -0
  16. package/dist/chunks/CaretNavigationPlugin-P6OYaTSq.mjs.map +1 -0
  17. package/dist/chunks/CodeBlockPlugin-ChPv3Edf.mjs +2 -0
  18. package/dist/chunks/CodeBlockPlugin-ChPv3Edf.mjs.map +1 -0
  19. package/dist/chunks/ColorGrid-D5-teEjD.mjs +2 -0
  20. package/dist/chunks/ColorGrid-D5-teEjD.mjs.map +1 -0
  21. package/dist/chunks/ColorPickerPopup-_Gp09pdx.mjs +2 -0
  22. package/dist/chunks/ColorPickerPopup-_Gp09pdx.mjs.map +1 -0
  23. package/dist/chunks/ColorValidation-okAvytHQ.mjs +2 -0
  24. package/dist/chunks/ColorValidation-okAvytHQ.mjs.map +1 -0
  25. package/dist/chunks/CommandHelpers-NV80Ff1G.mjs +2 -0
  26. package/dist/chunks/CommandHelpers-NV80Ff1G.mjs.map +1 -0
  27. package/dist/chunks/Commands-ixGhPiRG.mjs +2 -0
  28. package/dist/chunks/Commands-ixGhPiRG.mjs.map +1 -0
  29. package/dist/chunks/Decoration-DZK7hrL1.mjs +2 -0
  30. package/dist/chunks/Decoration-DZK7hrL1.mjs.map +1 -0
  31. package/dist/chunks/DirectionDetection-7HmMUZrx.mjs +2 -0
  32. package/dist/chunks/DirectionDetection-7HmMUZrx.mjs.map +1 -0
  33. package/dist/chunks/DirectionIcons-DhRvPVoz.mjs +2 -0
  34. package/dist/chunks/DirectionIcons-DhRvPVoz.mjs.map +1 -0
  35. package/dist/chunks/Document-znhIcvM9.mjs +2 -0
  36. package/dist/chunks/Document-znhIcvM9.mjs.map +1 -0
  37. package/dist/chunks/DocumentParser-DCjOW3us.mjs +2 -0
  38. package/dist/chunks/DocumentParser-DCjOW3us.mjs.map +1 -0
  39. package/dist/chunks/FontPlugin-COYtG1Uo.mjs +2 -0
  40. package/dist/chunks/FontPlugin-COYtG1Uo.mjs.map +1 -0
  41. package/dist/chunks/FontSizePlugin-CLcfdTm3.mjs +2 -0
  42. package/dist/chunks/FontSizePlugin-CLcfdTm3.mjs.map +1 -0
  43. package/dist/chunks/FormulaPlugin-DphHU4Rn.mjs +2 -0
  44. package/dist/chunks/FormulaPlugin-DphHU4Rn.mjs.map +1 -0
  45. package/dist/chunks/GapCursorNavigation-Bkuu_Ek8.mjs +2 -0
  46. package/dist/chunks/GapCursorNavigation-Bkuu_Ek8.mjs.map +1 -0
  47. package/dist/chunks/GapCursorPlugin-CRDmQEi1.mjs +2 -0
  48. package/dist/chunks/GapCursorPlugin-CRDmQEi1.mjs.map +1 -0
  49. package/dist/chunks/HardBreakPlugin-Cr6dMQ-H.mjs +2 -0
  50. package/dist/chunks/HardBreakPlugin-Cr6dMQ-H.mjs.map +1 -0
  51. package/dist/chunks/HeadingPlugin-3NL4ARPp.mjs +2 -0
  52. package/dist/chunks/HeadingPlugin-3NL4ARPp.mjs.map +1 -0
  53. package/dist/chunks/HighlightPlugin-dHxnAuoW.mjs +2 -0
  54. package/dist/chunks/HighlightPlugin-dHxnAuoW.mjs.map +1 -0
  55. package/dist/chunks/HorizontalRulePlugin-BYPaI4TR.mjs +2 -0
  56. package/dist/chunks/HorizontalRulePlugin-BYPaI4TR.mjs.map +1 -0
  57. package/dist/chunks/ImagePlugin-kgokm-a1.mjs +2 -0
  58. package/dist/chunks/ImagePlugin-kgokm-a1.mjs.map +1 -0
  59. package/dist/chunks/InlineCodePlugin-Bl1jyDwk.mjs +2 -0
  60. package/dist/chunks/InlineCodePlugin-Bl1jyDwk.mjs.map +1 -0
  61. package/dist/chunks/InlineStyleMarkSpec-Cc-b1tlm.mjs +2 -0
  62. package/dist/chunks/InlineStyleMarkSpec-Cc-b1tlm.mjs.map +1 -0
  63. package/dist/chunks/KeyboardNav-DZXdTg-_.mjs +2 -0
  64. package/dist/chunks/KeyboardNav-DZXdTg-_.mjs.map +1 -0
  65. package/dist/chunks/LinkPlugin-Dmcfo3On.mjs +2 -0
  66. package/dist/chunks/LinkPlugin-Dmcfo3On.mjs.map +1 -0
  67. package/dist/chunks/ListPlugin-Ch-5CsFc.mjs +2 -0
  68. package/dist/chunks/ListPlugin-Ch-5CsFc.mjs.map +1 -0
  69. package/dist/chunks/NavigationQueries-3zTaNBlp.mjs +2 -0
  70. package/dist/chunks/NavigationQueries-3zTaNBlp.mjs.map +1 -0
  71. package/dist/chunks/NodeResolver-BplmzA7c.mjs +2 -0
  72. package/dist/chunks/NodeResolver-BplmzA7c.mjs.map +1 -0
  73. package/dist/chunks/NodeSelectionCommands-dUmbRoZ2.mjs +2 -0
  74. package/dist/chunks/NodeSelectionCommands-dUmbRoZ2.mjs.map +1 -0
  75. package/dist/chunks/NodeSpecPatching-DToX09gc.mjs +2 -0
  76. package/dist/chunks/NodeSpecPatching-DToX09gc.mjs.map +1 -0
  77. package/dist/chunks/Platform-wPvKFB9m.mjs +2 -0
  78. package/dist/chunks/Platform-wPvKFB9m.mjs.map +1 -0
  79. package/dist/chunks/PluginHelpers-C3aCCGfX.mjs +2 -0
  80. package/dist/chunks/PluginHelpers-C3aCCGfX.mjs.map +1 -0
  81. package/dist/chunks/PopupKeyboardPatterns-ZdAQB78m.mjs +2 -0
  82. package/dist/chunks/PopupKeyboardPatterns-ZdAQB78m.mjs.map +1 -0
  83. package/dist/chunks/PopupManager-DsT1uRWi.mjs +2 -0
  84. package/dist/chunks/PopupManager-DsT1uRWi.mjs.map +1 -0
  85. package/dist/chunks/PopupPositioning-BEnz90Oh.mjs +2 -0
  86. package/dist/chunks/PopupPositioning-BEnz90Oh.mjs.map +1 -0
  87. package/dist/chunks/PrintPlugin-Bq-Z14K1.mjs +2 -0
  88. package/dist/chunks/PrintPlugin-Bq-Z14K1.mjs.map +1 -0
  89. package/dist/chunks/PrintTypes-DA0Cc--M.mjs +2 -0
  90. package/dist/chunks/PrintTypes-DA0Cc--M.mjs.map +1 -0
  91. package/dist/chunks/RangeIterator-Cl4_k8cx.mjs +2 -0
  92. package/dist/chunks/RangeIterator-Cl4_k8cx.mjs.map +1 -0
  93. package/dist/chunks/SelectionSync-DCJpNFat.mjs +2 -0
  94. package/dist/chunks/SelectionSync-DCJpNFat.mjs.map +1 -0
  95. package/dist/chunks/ShortcutFormatting-DZK70CN9.mjs +2 -0
  96. package/dist/chunks/ShortcutFormatting-DZK70CN9.mjs.map +1 -0
  97. package/dist/chunks/SimpleMark-CezTJnXh.mjs +2 -0
  98. package/dist/chunks/SimpleMark-CezTJnXh.mjs.map +1 -0
  99. package/dist/chunks/SmartPastePlugin-DlApY6Vw.mjs +2 -0
  100. package/dist/chunks/SmartPastePlugin-DlApY6Vw.mjs.map +1 -0
  101. package/dist/chunks/StrikethroughPlugin-BuFDABvz.mjs +2 -0
  102. package/dist/chunks/StrikethroughPlugin-BuFDABvz.mjs.map +1 -0
  103. package/dist/chunks/StyleRuntime-Bwde5icB.mjs +2 -0
  104. package/dist/chunks/StyleRuntime-Bwde5icB.mjs.map +1 -0
  105. package/dist/chunks/SuperSubPlugin-CiLJ7i4s.mjs +2 -0
  106. package/dist/chunks/SuperSubPlugin-CiLJ7i4s.mjs.map +1 -0
  107. package/dist/chunks/SyntaxTokenTypes-C9dGwufi.mjs +2 -0
  108. package/dist/chunks/SyntaxTokenTypes-C9dGwufi.mjs.map +1 -0
  109. package/dist/chunks/TablePlugin-5ru-y-YX.mjs +2 -0
  110. package/dist/chunks/TablePlugin-5ru-y-YX.mjs.map +1 -0
  111. package/dist/chunks/TextColorPlugin-Vz-Nz8aH.mjs +2 -0
  112. package/dist/chunks/TextColorPlugin-Vz-Nz8aH.mjs.map +1 -0
  113. package/dist/chunks/TextDirectionAutoPlugin-Behl6KMe.mjs +2 -0
  114. package/dist/chunks/TextDirectionAutoPlugin-Behl6KMe.mjs.map +1 -0
  115. package/dist/chunks/TextDirectionPlugin-C3h1n-aA.mjs +2 -0
  116. package/dist/chunks/TextDirectionPlugin-C3h1n-aA.mjs.map +1 -0
  117. package/dist/chunks/TextDirectionService-DRfeQnF6.mjs +2 -0
  118. package/dist/chunks/TextDirectionService-DRfeQnF6.mjs.map +1 -0
  119. package/dist/chunks/TextFormattingPlugin-D_nRMeBn.mjs +2 -0
  120. package/dist/chunks/TextFormattingPlugin-D_nRMeBn.mjs.map +1 -0
  121. package/dist/chunks/ToolbarPlugin-CSMSgjPM.mjs +2 -0
  122. package/dist/chunks/ToolbarPlugin-CSMSgjPM.mjs.map +1 -0
  123. package/dist/chunks/TypedKeys-E3jOGByL.mjs +2 -0
  124. package/dist/chunks/TypedKeys-E3jOGByL.mjs.map +1 -0
  125. package/dist/chunks/VideoPlugin-BUCGIYXr.mjs +2 -0
  126. package/dist/chunks/VideoPlugin-BUCGIYXr.mjs.map +1 -0
  127. package/dist/chunks/WordBoundary-CYDAtEks.mjs +2 -0
  128. package/dist/chunks/WordBoundary-CYDAtEks.mjs.map +1 -0
  129. package/dist/chunks/XmlDetector-DxBGXqua.mjs +2 -0
  130. package/dist/chunks/XmlDetector-DxBGXqua.mjs.map +1 -0
  131. package/dist/chunks/XmlPatterns-BiHS8w3k.mjs +2 -0
  132. package/dist/chunks/XmlPatterns-BiHS8w3k.mjs.map +1 -0
  133. package/dist/chunks/XmlSupport-B_F65M8G.mjs +2 -0
  134. package/dist/chunks/XmlSupport-B_F65M8G.mjs.map +1 -0
  135. package/dist/chunks/ar-B38MlRRN.mjs +2 -0
  136. package/dist/chunks/ar-B38MlRRN.mjs.map +1 -0
  137. package/dist/chunks/ar-BIeE0C5A.mjs +2 -0
  138. package/dist/chunks/ar-BIeE0C5A.mjs.map +1 -0
  139. package/dist/chunks/ar-BK0rFxF_.mjs +2 -0
  140. package/dist/chunks/ar-BK0rFxF_.mjs.map +1 -0
  141. package/dist/chunks/ar-BK4O36ep.mjs +2 -0
  142. package/dist/chunks/ar-BK4O36ep.mjs.map +1 -0
  143. package/dist/chunks/ar-BNUWuZe3.mjs +2 -0
  144. package/dist/chunks/ar-BNUWuZe3.mjs.map +1 -0
  145. package/dist/chunks/ar-BSXH8acw.mjs +2 -0
  146. package/dist/chunks/ar-BSXH8acw.mjs.map +1 -0
  147. package/dist/chunks/ar-BY8yNlGe.mjs +2 -0
  148. package/dist/chunks/ar-BY8yNlGe.mjs.map +1 -0
  149. package/dist/chunks/ar-BgHkduPE.mjs +2 -0
  150. package/dist/chunks/ar-BgHkduPE.mjs.map +1 -0
  151. package/dist/chunks/ar-BnfWtLhK.mjs +2 -0
  152. package/dist/chunks/ar-BnfWtLhK.mjs.map +1 -0
  153. package/dist/chunks/ar-BwCPhCf6.mjs +2 -0
  154. package/dist/chunks/ar-BwCPhCf6.mjs.map +1 -0
  155. package/dist/chunks/ar-Bymjd9Z_.mjs +2 -0
  156. package/dist/chunks/ar-Bymjd9Z_.mjs.map +1 -0
  157. package/dist/chunks/ar-CKPpdJ7F.mjs +2 -0
  158. package/dist/chunks/ar-CKPpdJ7F.mjs.map +1 -0
  159. package/dist/chunks/ar-C_ir5Uf4.mjs +2 -0
  160. package/dist/chunks/ar-C_ir5Uf4.mjs.map +1 -0
  161. package/dist/chunks/ar-CkE6GDVA.mjs +2 -0
  162. package/dist/chunks/ar-CkE6GDVA.mjs.map +1 -0
  163. package/dist/chunks/ar-ClgA1KQM.mjs +2 -0
  164. package/dist/chunks/ar-ClgA1KQM.mjs.map +1 -0
  165. package/dist/chunks/ar-Cm1DOK74.mjs +2 -0
  166. package/dist/chunks/ar-Cm1DOK74.mjs.map +1 -0
  167. package/dist/chunks/ar-CseGhQtS.mjs +2 -0
  168. package/dist/chunks/ar-CseGhQtS.mjs.map +1 -0
  169. package/dist/chunks/ar-D0bqkviV.mjs +2 -0
  170. package/dist/chunks/ar-D0bqkviV.mjs.map +1 -0
  171. package/dist/chunks/ar-D5d185g0.mjs +2 -0
  172. package/dist/chunks/ar-D5d185g0.mjs.map +1 -0
  173. package/dist/chunks/ar-DSwUyX47.mjs +2 -0
  174. package/dist/chunks/ar-DSwUyX47.mjs.map +1 -0
  175. package/dist/chunks/ar-DfSNWZX7.mjs +2 -0
  176. package/dist/chunks/ar-DfSNWZX7.mjs.map +1 -0
  177. package/dist/chunks/ar-Dghtfs46.mjs +2 -0
  178. package/dist/chunks/ar-Dghtfs46.mjs.map +1 -0
  179. package/dist/chunks/ar-DvNKBrJd.mjs +2 -0
  180. package/dist/chunks/ar-DvNKBrJd.mjs.map +1 -0
  181. package/dist/chunks/ar-KNULRI8r.mjs +2 -0
  182. package/dist/chunks/ar-KNULRI8r.mjs.map +1 -0
  183. package/dist/chunks/ar-NtGRavHz.mjs +2 -0
  184. package/dist/chunks/ar-NtGRavHz.mjs.map +1 -0
  185. package/dist/chunks/ar-Y9KjJLX8.mjs +2 -0
  186. package/dist/chunks/ar-Y9KjJLX8.mjs.map +1 -0
  187. package/dist/chunks/ar-odM5gkvw.mjs +2 -0
  188. package/dist/chunks/ar-odM5gkvw.mjs.map +1 -0
  189. package/dist/chunks/color-picker-C89H4SVX.mjs +2 -0
  190. package/dist/chunks/color-picker-C89H4SVX.mjs.map +1 -0
  191. package/dist/chunks/de-B1TXiyll.mjs +2 -0
  192. package/dist/chunks/de-B1TXiyll.mjs.map +1 -0
  193. package/dist/chunks/de-BDRaxLyi.mjs +2 -0
  194. package/dist/chunks/de-BDRaxLyi.mjs.map +1 -0
  195. package/dist/chunks/de-BGOpZ8Ls.mjs +2 -0
  196. package/dist/chunks/de-BGOpZ8Ls.mjs.map +1 -0
  197. package/dist/chunks/de-BfZ5qXWz.mjs +2 -0
  198. package/dist/chunks/de-BfZ5qXWz.mjs.map +1 -0
  199. package/dist/chunks/de-BibufNIa.mjs +2 -0
  200. package/dist/chunks/de-BibufNIa.mjs.map +1 -0
  201. package/dist/chunks/de-BkZqCmzL.mjs +2 -0
  202. package/dist/chunks/de-BkZqCmzL.mjs.map +1 -0
  203. package/dist/chunks/de-BzRd2oyR.mjs +2 -0
  204. package/dist/chunks/de-BzRd2oyR.mjs.map +1 -0
  205. package/dist/chunks/de-C4gnHDmk.mjs +2 -0
  206. package/dist/chunks/de-C4gnHDmk.mjs.map +1 -0
  207. package/dist/chunks/de-C4iw9SEp.mjs +2 -0
  208. package/dist/chunks/de-C4iw9SEp.mjs.map +1 -0
  209. package/dist/chunks/de-CLWzcDoW.mjs +2 -0
  210. package/dist/chunks/de-CLWzcDoW.mjs.map +1 -0
  211. package/dist/chunks/de-Cbv0otYM.mjs +2 -0
  212. package/dist/chunks/de-Cbv0otYM.mjs.map +1 -0
  213. package/dist/chunks/de-Cinp7zmo.mjs +2 -0
  214. package/dist/chunks/de-Cinp7zmo.mjs.map +1 -0
  215. package/dist/chunks/de-CvnyjI_X.mjs +2 -0
  216. package/dist/chunks/de-CvnyjI_X.mjs.map +1 -0
  217. package/dist/chunks/de-DCx3Shj3.mjs +2 -0
  218. package/dist/chunks/de-DCx3Shj3.mjs.map +1 -0
  219. package/dist/chunks/de-Dav2GzjV.mjs +2 -0
  220. package/dist/chunks/de-Dav2GzjV.mjs.map +1 -0
  221. package/dist/chunks/de-Dc7GRbWc.mjs +2 -0
  222. package/dist/chunks/de-Dc7GRbWc.mjs.map +1 -0
  223. package/dist/chunks/de-DdntlpT3.mjs +2 -0
  224. package/dist/chunks/de-DdntlpT3.mjs.map +1 -0
  225. package/dist/chunks/de-DefykdF-.mjs +2 -0
  226. package/dist/chunks/de-DefykdF-.mjs.map +1 -0
  227. package/dist/chunks/de-DfQQIP8Y.mjs +2 -0
  228. package/dist/chunks/de-DfQQIP8Y.mjs.map +1 -0
  229. package/dist/chunks/de-DkcKDkbA.mjs +2 -0
  230. package/dist/chunks/de-DkcKDkbA.mjs.map +1 -0
  231. package/dist/chunks/de-DqGfLfeV.mjs +2 -0
  232. package/dist/chunks/de-DqGfLfeV.mjs.map +1 -0
  233. package/dist/chunks/de-DudqIJho.mjs +2 -0
  234. package/dist/chunks/de-DudqIJho.mjs.map +1 -0
  235. package/dist/chunks/de-LCXA2xWj.mjs +2 -0
  236. package/dist/chunks/de-LCXA2xWj.mjs.map +1 -0
  237. package/dist/chunks/de-YygmrxGp.mjs +2 -0
  238. package/dist/chunks/de-YygmrxGp.mjs.map +1 -0
  239. package/dist/chunks/de-asI3UlFG.mjs +2 -0
  240. package/dist/chunks/de-asI3UlFG.mjs.map +1 -0
  241. package/dist/chunks/de-kvMvD3AJ.mjs +2 -0
  242. package/dist/chunks/de-kvMvD3AJ.mjs.map +1 -0
  243. package/dist/chunks/de-pnfTnS03.mjs +2 -0
  244. package/dist/chunks/de-pnfTnS03.mjs.map +1 -0
  245. package/dist/chunks/es-4tbAR0If.mjs +2 -0
  246. package/dist/chunks/es-4tbAR0If.mjs.map +1 -0
  247. package/dist/chunks/es-B9z2Xwj0.mjs +2 -0
  248. package/dist/chunks/es-B9z2Xwj0.mjs.map +1 -0
  249. package/dist/chunks/es-BJxjRQSg.mjs +2 -0
  250. package/dist/chunks/es-BJxjRQSg.mjs.map +1 -0
  251. package/dist/chunks/es-BSyxBRjn.mjs +2 -0
  252. package/dist/chunks/es-BSyxBRjn.mjs.map +1 -0
  253. package/dist/chunks/es-Bcpq2xfU.mjs +2 -0
  254. package/dist/chunks/es-Bcpq2xfU.mjs.map +1 -0
  255. package/dist/chunks/es-BhUjc8mO.mjs +2 -0
  256. package/dist/chunks/es-BhUjc8mO.mjs.map +1 -0
  257. package/dist/chunks/es-Bm7hoJSI.mjs +2 -0
  258. package/dist/chunks/es-Bm7hoJSI.mjs.map +1 -0
  259. package/dist/chunks/es-C0E-lFIC.mjs +2 -0
  260. package/dist/chunks/es-C0E-lFIC.mjs.map +1 -0
  261. package/dist/chunks/es-C2wBBQ7N.mjs +2 -0
  262. package/dist/chunks/es-C2wBBQ7N.mjs.map +1 -0
  263. package/dist/chunks/es-C9vhYpfP.mjs +2 -0
  264. package/dist/chunks/es-C9vhYpfP.mjs.map +1 -0
  265. package/dist/chunks/es-Cgslt0Hp.mjs +2 -0
  266. package/dist/chunks/es-Cgslt0Hp.mjs.map +1 -0
  267. package/dist/chunks/es-CksXDFxg.mjs +2 -0
  268. package/dist/chunks/es-CksXDFxg.mjs.map +1 -0
  269. package/dist/chunks/es-CnQUZlfY.mjs +2 -0
  270. package/dist/chunks/es-CnQUZlfY.mjs.map +1 -0
  271. package/dist/chunks/es-CrRNOn2Q.mjs +2 -0
  272. package/dist/chunks/es-CrRNOn2Q.mjs.map +1 -0
  273. package/dist/chunks/es-D0427MIH.mjs +2 -0
  274. package/dist/chunks/es-D0427MIH.mjs.map +1 -0
  275. package/dist/chunks/es-D19xfXus.mjs +2 -0
  276. package/dist/chunks/es-D19xfXus.mjs.map +1 -0
  277. package/dist/chunks/es-Dk6lCcOt.mjs +2 -0
  278. package/dist/chunks/es-Dk6lCcOt.mjs.map +1 -0
  279. package/dist/chunks/es-Dls_xPCW.mjs +2 -0
  280. package/dist/chunks/es-Dls_xPCW.mjs.map +1 -0
  281. package/dist/chunks/es-DrcsyDvI.mjs +2 -0
  282. package/dist/chunks/es-DrcsyDvI.mjs.map +1 -0
  283. package/dist/chunks/es-DwKejbO9.mjs +2 -0
  284. package/dist/chunks/es-DwKejbO9.mjs.map +1 -0
  285. package/dist/chunks/es-NcrWuNe1.mjs +2 -0
  286. package/dist/chunks/es-NcrWuNe1.mjs.map +1 -0
  287. package/dist/chunks/es-RaZerssd.mjs +2 -0
  288. package/dist/chunks/es-RaZerssd.mjs.map +1 -0
  289. package/dist/chunks/es-TIjHCFNF.mjs +2 -0
  290. package/dist/chunks/es-TIjHCFNF.mjs.map +1 -0
  291. package/dist/chunks/es-eZcDkBb-.mjs +2 -0
  292. package/dist/chunks/es-eZcDkBb-.mjs.map +1 -0
  293. package/dist/chunks/es-j_-KW9-4.mjs +2 -0
  294. package/dist/chunks/es-j_-KW9-4.mjs.map +1 -0
  295. package/dist/chunks/es-kGLwn8EB.mjs +2 -0
  296. package/dist/chunks/es-kGLwn8EB.mjs.map +1 -0
  297. package/dist/chunks/es-qQRDC0Ge.mjs +2 -0
  298. package/dist/chunks/es-qQRDC0Ge.mjs.map +1 -0
  299. package/dist/chunks/fonts-ZXAIMT3b.mjs +2 -0
  300. package/dist/chunks/fonts-ZXAIMT3b.mjs.map +1 -0
  301. package/dist/chunks/fr-B27zAq0X.mjs +2 -0
  302. package/dist/chunks/fr-B27zAq0X.mjs.map +1 -0
  303. package/dist/chunks/fr-BEd3ZHO4.mjs +2 -0
  304. package/dist/chunks/fr-BEd3ZHO4.mjs.map +1 -0
  305. package/dist/chunks/fr-BHXLpdaH.mjs +2 -0
  306. package/dist/chunks/fr-BHXLpdaH.mjs.map +1 -0
  307. package/dist/chunks/fr-BKu4eU3V.mjs +2 -0
  308. package/dist/chunks/fr-BKu4eU3V.mjs.map +1 -0
  309. package/dist/chunks/fr-BUrUZ5UQ.mjs +2 -0
  310. package/dist/chunks/fr-BUrUZ5UQ.mjs.map +1 -0
  311. package/dist/chunks/fr-BlqlUQ3b.mjs +2 -0
  312. package/dist/chunks/fr-BlqlUQ3b.mjs.map +1 -0
  313. package/dist/chunks/fr-BruEqDw1.mjs +2 -0
  314. package/dist/chunks/fr-BruEqDw1.mjs.map +1 -0
  315. package/dist/chunks/fr-BwuuFBkA.mjs +2 -0
  316. package/dist/chunks/fr-BwuuFBkA.mjs.map +1 -0
  317. package/dist/chunks/fr-C2lLh5Ti.mjs +2 -0
  318. package/dist/chunks/fr-C2lLh5Ti.mjs.map +1 -0
  319. package/dist/chunks/fr-C7N2_AlK.mjs +2 -0
  320. package/dist/chunks/fr-C7N2_AlK.mjs.map +1 -0
  321. package/dist/chunks/fr-COfd6sLW.mjs +2 -0
  322. package/dist/chunks/fr-COfd6sLW.mjs.map +1 -0
  323. package/dist/chunks/fr-COx4cSxc.mjs +2 -0
  324. package/dist/chunks/fr-COx4cSxc.mjs.map +1 -0
  325. package/dist/chunks/fr-CX37XjPO.mjs +2 -0
  326. package/dist/chunks/fr-CX37XjPO.mjs.map +1 -0
  327. package/dist/chunks/fr-CYn6fMiH.mjs +2 -0
  328. package/dist/chunks/fr-CYn6fMiH.mjs.map +1 -0
  329. package/dist/chunks/fr-CbsiyDEa.mjs +2 -0
  330. package/dist/chunks/fr-CbsiyDEa.mjs.map +1 -0
  331. package/dist/chunks/fr-CcZiELJY.mjs +2 -0
  332. package/dist/chunks/fr-CcZiELJY.mjs.map +1 -0
  333. package/dist/chunks/fr-CeHzUPVT.mjs +2 -0
  334. package/dist/chunks/fr-CeHzUPVT.mjs.map +1 -0
  335. package/dist/chunks/fr-Cv73J4QZ.mjs +2 -0
  336. package/dist/chunks/fr-Cv73J4QZ.mjs.map +1 -0
  337. package/dist/chunks/fr-DDLuorz7.mjs +2 -0
  338. package/dist/chunks/fr-DDLuorz7.mjs.map +1 -0
  339. package/dist/chunks/fr-DMA4CAyo.mjs +2 -0
  340. package/dist/chunks/fr-DMA4CAyo.mjs.map +1 -0
  341. package/dist/chunks/fr-DNJuGtO1.mjs +2 -0
  342. package/dist/chunks/fr-DNJuGtO1.mjs.map +1 -0
  343. package/dist/chunks/fr-DQOE8O6_.mjs +2 -0
  344. package/dist/chunks/fr-DQOE8O6_.mjs.map +1 -0
  345. package/dist/chunks/fr-DXjOwGew.mjs +2 -0
  346. package/dist/chunks/fr-DXjOwGew.mjs.map +1 -0
  347. package/dist/chunks/fr-DilrEvE_.mjs +2 -0
  348. package/dist/chunks/fr-DilrEvE_.mjs.map +1 -0
  349. package/dist/chunks/fr-P7iY3ntE.mjs +2 -0
  350. package/dist/chunks/fr-P7iY3ntE.mjs.map +1 -0
  351. package/dist/chunks/fr-ViUNGo_J.mjs +2 -0
  352. package/dist/chunks/fr-ViUNGo_J.mjs.map +1 -0
  353. package/dist/chunks/fr-gdIyLcGC.mjs +2 -0
  354. package/dist/chunks/fr-gdIyLcGC.mjs.map +1 -0
  355. package/dist/chunks/full-h88Sb2MR.mjs +2 -0
  356. package/dist/chunks/full-h88Sb2MR.mjs.map +1 -0
  357. package/dist/chunks/hi-BC82Jxjl.mjs +2 -0
  358. package/dist/chunks/hi-BC82Jxjl.mjs.map +1 -0
  359. package/dist/chunks/hi-BCTarnem.mjs +2 -0
  360. package/dist/chunks/hi-BCTarnem.mjs.map +1 -0
  361. package/dist/chunks/hi-BMStjhJF.mjs +2 -0
  362. package/dist/chunks/hi-BMStjhJF.mjs.map +1 -0
  363. package/dist/chunks/hi-BQ2Fyx7t.mjs +2 -0
  364. package/dist/chunks/hi-BQ2Fyx7t.mjs.map +1 -0
  365. package/dist/chunks/hi-Bg4-z2Os.mjs +2 -0
  366. package/dist/chunks/hi-Bg4-z2Os.mjs.map +1 -0
  367. package/dist/chunks/hi-BgqI_gOH.mjs +2 -0
  368. package/dist/chunks/hi-BgqI_gOH.mjs.map +1 -0
  369. package/dist/chunks/hi-CEPSeUBX.mjs +2 -0
  370. package/dist/chunks/hi-CEPSeUBX.mjs.map +1 -0
  371. package/dist/chunks/hi-CRaZj5Uo.mjs +2 -0
  372. package/dist/chunks/hi-CRaZj5Uo.mjs.map +1 -0
  373. package/dist/chunks/hi-CT0uK1Me.mjs +2 -0
  374. package/dist/chunks/hi-CT0uK1Me.mjs.map +1 -0
  375. package/dist/chunks/hi-CnIpMd8L.mjs +2 -0
  376. package/dist/chunks/hi-CnIpMd8L.mjs.map +1 -0
  377. package/dist/chunks/hi-CnSv0JhL.mjs +2 -0
  378. package/dist/chunks/hi-CnSv0JhL.mjs.map +1 -0
  379. package/dist/chunks/hi-DLLBZu67.mjs +2 -0
  380. package/dist/chunks/hi-DLLBZu67.mjs.map +1 -0
  381. package/dist/chunks/hi-DMg_aiSR.mjs +2 -0
  382. package/dist/chunks/hi-DMg_aiSR.mjs.map +1 -0
  383. package/dist/chunks/hi-DWwLzOX5.mjs +2 -0
  384. package/dist/chunks/hi-DWwLzOX5.mjs.map +1 -0
  385. package/dist/chunks/hi-D_4Xi4Nv.mjs +2 -0
  386. package/dist/chunks/hi-D_4Xi4Nv.mjs.map +1 -0
  387. package/dist/chunks/hi-D_Jtykmj.mjs +2 -0
  388. package/dist/chunks/hi-D_Jtykmj.mjs.map +1 -0
  389. package/dist/chunks/hi-Da5pRz8E.mjs +2 -0
  390. package/dist/chunks/hi-Da5pRz8E.mjs.map +1 -0
  391. package/dist/chunks/hi-DqL20WmM.mjs +2 -0
  392. package/dist/chunks/hi-DqL20WmM.mjs.map +1 -0
  393. package/dist/chunks/hi-DwQopxRg.mjs +2 -0
  394. package/dist/chunks/hi-DwQopxRg.mjs.map +1 -0
  395. package/dist/chunks/hi-IuMohSSw.mjs +2 -0
  396. package/dist/chunks/hi-IuMohSSw.mjs.map +1 -0
  397. package/dist/chunks/hi-PUX7dDPm.mjs +2 -0
  398. package/dist/chunks/hi-PUX7dDPm.mjs.map +1 -0
  399. package/dist/chunks/hi-RmfZAmwT.mjs +2 -0
  400. package/dist/chunks/hi-RmfZAmwT.mjs.map +1 -0
  401. package/dist/chunks/hi-UIBrTEVu.mjs +2 -0
  402. package/dist/chunks/hi-UIBrTEVu.mjs.map +1 -0
  403. package/dist/chunks/hi-_SjWnfeh.mjs +2 -0
  404. package/dist/chunks/hi-_SjWnfeh.mjs.map +1 -0
  405. package/dist/chunks/hi-dV2GZgH_.mjs +2 -0
  406. package/dist/chunks/hi-dV2GZgH_.mjs.map +1 -0
  407. package/dist/chunks/hi-ehh5oKz3.mjs +2 -0
  408. package/dist/chunks/hi-ehh5oKz3.mjs.map +1 -0
  409. package/dist/chunks/hi-yXnRBFJK.mjs +2 -0
  410. package/dist/chunks/hi-yXnRBFJK.mjs.map +1 -0
  411. package/dist/chunks/minimal-a40NeBQ_.mjs +2 -0
  412. package/dist/chunks/minimal-a40NeBQ_.mjs.map +1 -0
  413. package/dist/chunks/pt-2a8Oto6x.mjs +2 -0
  414. package/dist/chunks/pt-2a8Oto6x.mjs.map +1 -0
  415. package/dist/chunks/pt-ALzIyTiI.mjs +2 -0
  416. package/dist/chunks/pt-ALzIyTiI.mjs.map +1 -0
  417. package/dist/chunks/pt-B2hMlTc6.mjs +2 -0
  418. package/dist/chunks/pt-B2hMlTc6.mjs.map +1 -0
  419. package/dist/chunks/pt-BCIkSb0w.mjs +2 -0
  420. package/dist/chunks/pt-BCIkSb0w.mjs.map +1 -0
  421. package/dist/chunks/pt-BFotmq5x.mjs +2 -0
  422. package/dist/chunks/pt-BFotmq5x.mjs.map +1 -0
  423. package/dist/chunks/pt-BM7OScX6.mjs +2 -0
  424. package/dist/chunks/pt-BM7OScX6.mjs.map +1 -0
  425. package/dist/chunks/pt-BM7zXWxW.mjs +2 -0
  426. package/dist/chunks/pt-BM7zXWxW.mjs.map +1 -0
  427. package/dist/chunks/pt-BchCuzFq.mjs +2 -0
  428. package/dist/chunks/pt-BchCuzFq.mjs.map +1 -0
  429. package/dist/chunks/pt-BmcHFWoR.mjs +2 -0
  430. package/dist/chunks/pt-BmcHFWoR.mjs.map +1 -0
  431. package/dist/chunks/pt-C53W99RV.mjs +2 -0
  432. package/dist/chunks/pt-C53W99RV.mjs.map +1 -0
  433. package/dist/chunks/pt-CORQy8qv.mjs +2 -0
  434. package/dist/chunks/pt-CORQy8qv.mjs.map +1 -0
  435. package/dist/chunks/pt-CUPKr943.mjs +2 -0
  436. package/dist/chunks/pt-CUPKr943.mjs.map +1 -0
  437. package/dist/chunks/pt-CYkKDsLa.mjs +2 -0
  438. package/dist/chunks/pt-CYkKDsLa.mjs.map +1 -0
  439. package/dist/chunks/pt-Cd_SXHKt.mjs +2 -0
  440. package/dist/chunks/pt-Cd_SXHKt.mjs.map +1 -0
  441. package/dist/chunks/pt-CjN3Oq-6.mjs +2 -0
  442. package/dist/chunks/pt-CjN3Oq-6.mjs.map +1 -0
  443. package/dist/chunks/pt-CrKrgktr.mjs +2 -0
  444. package/dist/chunks/pt-CrKrgktr.mjs.map +1 -0
  445. package/dist/chunks/pt-Crmbkj0e.mjs +2 -0
  446. package/dist/chunks/pt-Crmbkj0e.mjs.map +1 -0
  447. package/dist/chunks/pt-D19IWOM_.mjs +2 -0
  448. package/dist/chunks/pt-D19IWOM_.mjs.map +1 -0
  449. package/dist/chunks/pt-D6zY7l2E.mjs +2 -0
  450. package/dist/chunks/pt-D6zY7l2E.mjs.map +1 -0
  451. package/dist/chunks/pt-DA5hufLZ.mjs +2 -0
  452. package/dist/chunks/pt-DA5hufLZ.mjs.map +1 -0
  453. package/dist/chunks/pt-DEfBqu-c.mjs +2 -0
  454. package/dist/chunks/pt-DEfBqu-c.mjs.map +1 -0
  455. package/dist/chunks/pt-DG3rw6nK.mjs +2 -0
  456. package/dist/chunks/pt-DG3rw6nK.mjs.map +1 -0
  457. package/dist/chunks/pt-DRoAHNZi.mjs +2 -0
  458. package/dist/chunks/pt-DRoAHNZi.mjs.map +1 -0
  459. package/dist/chunks/pt-Eml9QiUL.mjs +2 -0
  460. package/dist/chunks/pt-Eml9QiUL.mjs.map +1 -0
  461. package/dist/chunks/pt-Haa3wVmA.mjs +2 -0
  462. package/dist/chunks/pt-Haa3wVmA.mjs.map +1 -0
  463. package/dist/chunks/pt-aj7zOxTg.mjs +2 -0
  464. package/dist/chunks/pt-aj7zOxTg.mjs.map +1 -0
  465. package/dist/chunks/pt-l6dTmkQk.mjs +2 -0
  466. package/dist/chunks/pt-l6dTmkQk.mjs.map +1 -0
  467. package/dist/chunks/ru--JPEpdcJ.mjs +2 -0
  468. package/dist/chunks/ru--JPEpdcJ.mjs.map +1 -0
  469. package/dist/chunks/ru-B76ORyqe.mjs +2 -0
  470. package/dist/chunks/ru-B76ORyqe.mjs.map +1 -0
  471. package/dist/chunks/ru-BDQ62WuE.mjs +2 -0
  472. package/dist/chunks/ru-BDQ62WuE.mjs.map +1 -0
  473. package/dist/chunks/ru-BQ6W3lwr.mjs +2 -0
  474. package/dist/chunks/ru-BQ6W3lwr.mjs.map +1 -0
  475. package/dist/chunks/ru-BQpaitci.mjs +2 -0
  476. package/dist/chunks/ru-BQpaitci.mjs.map +1 -0
  477. package/dist/chunks/ru-Bm9VwJLu.mjs +2 -0
  478. package/dist/chunks/ru-Bm9VwJLu.mjs.map +1 -0
  479. package/dist/chunks/ru-BnNdik6i.mjs +2 -0
  480. package/dist/chunks/ru-BnNdik6i.mjs.map +1 -0
  481. package/dist/chunks/ru-Bo4am8cd.mjs +2 -0
  482. package/dist/chunks/ru-Bo4am8cd.mjs.map +1 -0
  483. package/dist/chunks/ru-C1k56xWQ.mjs +2 -0
  484. package/dist/chunks/ru-C1k56xWQ.mjs.map +1 -0
  485. package/dist/chunks/ru-C4rnSQlI.mjs +2 -0
  486. package/dist/chunks/ru-C4rnSQlI.mjs.map +1 -0
  487. package/dist/chunks/ru-CKM3t1sv.mjs +2 -0
  488. package/dist/chunks/ru-CKM3t1sv.mjs.map +1 -0
  489. package/dist/chunks/ru-CO6eCsxU.mjs +2 -0
  490. package/dist/chunks/ru-CO6eCsxU.mjs.map +1 -0
  491. package/dist/chunks/ru-CTaYpQ9_.mjs +2 -0
  492. package/dist/chunks/ru-CTaYpQ9_.mjs.map +1 -0
  493. package/dist/chunks/ru-CdY8d80t.mjs +2 -0
  494. package/dist/chunks/ru-CdY8d80t.mjs.map +1 -0
  495. package/dist/chunks/ru-CsDtaWRd.mjs +2 -0
  496. package/dist/chunks/ru-CsDtaWRd.mjs.map +1 -0
  497. package/dist/chunks/ru-Cy_4nn8h.mjs +2 -0
  498. package/dist/chunks/ru-Cy_4nn8h.mjs.map +1 -0
  499. package/dist/chunks/ru-DACtjNuJ.mjs +2 -0
  500. package/dist/chunks/ru-DACtjNuJ.mjs.map +1 -0
  501. package/dist/chunks/ru-DN6yN_w9.mjs +2 -0
  502. package/dist/chunks/ru-DN6yN_w9.mjs.map +1 -0
  503. package/dist/chunks/ru-DThFtd76.mjs +2 -0
  504. package/dist/chunks/ru-DThFtd76.mjs.map +1 -0
  505. package/dist/chunks/ru-Dd_P7hP7.mjs +2 -0
  506. package/dist/chunks/ru-Dd_P7hP7.mjs.map +1 -0
  507. package/dist/chunks/ru-Dhuxwzwy.mjs +2 -0
  508. package/dist/chunks/ru-Dhuxwzwy.mjs.map +1 -0
  509. package/dist/chunks/ru-Dn6UDGIG.mjs +2 -0
  510. package/dist/chunks/ru-Dn6UDGIG.mjs.map +1 -0
  511. package/dist/chunks/ru-DojHc5wu.mjs +2 -0
  512. package/dist/chunks/ru-DojHc5wu.mjs.map +1 -0
  513. package/dist/chunks/ru-DyWzWBjV.mjs +2 -0
  514. package/dist/chunks/ru-DyWzWBjV.mjs.map +1 -0
  515. package/dist/chunks/ru-NBxCkjlP.mjs +2 -0
  516. package/dist/chunks/ru-NBxCkjlP.mjs.map +1 -0
  517. package/dist/chunks/ru-_MQaVHam.mjs +2 -0
  518. package/dist/chunks/ru-_MQaVHam.mjs.map +1 -0
  519. package/dist/chunks/ru-wv17PPrd.mjs +2 -0
  520. package/dist/chunks/ru-wv17PPrd.mjs.map +1 -0
  521. package/dist/chunks/src-ooaZ_Egu.mjs +2 -0
  522. package/dist/chunks/src-ooaZ_Egu.mjs.map +1 -0
  523. package/dist/chunks/zh-2-Y3Limy.mjs +2 -0
  524. package/dist/chunks/zh-2-Y3Limy.mjs.map +1 -0
  525. package/dist/chunks/zh-B02VPMqX.mjs +2 -0
  526. package/dist/chunks/zh-B02VPMqX.mjs.map +1 -0
  527. package/dist/chunks/zh-BYjLBWWN.mjs +2 -0
  528. package/dist/chunks/zh-BYjLBWWN.mjs.map +1 -0
  529. package/dist/chunks/zh-Bt2ZdHcS.mjs +2 -0
  530. package/dist/chunks/zh-Bt2ZdHcS.mjs.map +1 -0
  531. package/dist/chunks/zh-BuN_C4o-.mjs +2 -0
  532. package/dist/chunks/zh-BuN_C4o-.mjs.map +1 -0
  533. package/dist/chunks/zh-CA3BDj0Y.mjs +2 -0
  534. package/dist/chunks/zh-CA3BDj0Y.mjs.map +1 -0
  535. package/dist/chunks/zh-CHuGP7RS.mjs +2 -0
  536. package/dist/chunks/zh-CHuGP7RS.mjs.map +1 -0
  537. package/dist/chunks/zh-CIPsF5P8.mjs +2 -0
  538. package/dist/chunks/zh-CIPsF5P8.mjs.map +1 -0
  539. package/dist/chunks/zh-C_YS18re.mjs +2 -0
  540. package/dist/chunks/zh-C_YS18re.mjs.map +1 -0
  541. package/dist/chunks/zh-CfMPFWUg.mjs +2 -0
  542. package/dist/chunks/zh-CfMPFWUg.mjs.map +1 -0
  543. package/dist/chunks/zh-CfjCcBIB.mjs +2 -0
  544. package/dist/chunks/zh-CfjCcBIB.mjs.map +1 -0
  545. package/dist/chunks/zh-CqQph809.mjs +2 -0
  546. package/dist/chunks/zh-CqQph809.mjs.map +1 -0
  547. package/dist/chunks/zh-Cxe42GC5.mjs +2 -0
  548. package/dist/chunks/zh-Cxe42GC5.mjs.map +1 -0
  549. package/dist/chunks/zh-CyMU2cTf.mjs +2 -0
  550. package/dist/chunks/zh-CyMU2cTf.mjs.map +1 -0
  551. package/dist/chunks/zh-Cynz1sBa.mjs +2 -0
  552. package/dist/chunks/zh-Cynz1sBa.mjs.map +1 -0
  553. package/dist/chunks/zh-DRKs6Q0a.mjs +2 -0
  554. package/dist/chunks/zh-DRKs6Q0a.mjs.map +1 -0
  555. package/dist/chunks/zh-DTuIJjx6.mjs +2 -0
  556. package/dist/chunks/zh-DTuIJjx6.mjs.map +1 -0
  557. package/dist/chunks/zh-DTz9l6mp.mjs +2 -0
  558. package/dist/chunks/zh-DTz9l6mp.mjs.map +1 -0
  559. package/dist/chunks/zh-DZwjiJmn.mjs +2 -0
  560. package/dist/chunks/zh-DZwjiJmn.mjs.map +1 -0
  561. package/dist/chunks/zh-D_VJDQl4.mjs +2 -0
  562. package/dist/chunks/zh-D_VJDQl4.mjs.map +1 -0
  563. package/dist/chunks/zh-Dt20Om7Z.mjs +2 -0
  564. package/dist/chunks/zh-Dt20Om7Z.mjs.map +1 -0
  565. package/dist/chunks/zh-SgsZ9f-W.mjs +2 -0
  566. package/dist/chunks/zh-SgsZ9f-W.mjs.map +1 -0
  567. package/dist/chunks/zh-XR7Ls7m-.mjs +2 -0
  568. package/dist/chunks/zh-XR7Ls7m-.mjs.map +1 -0
  569. package/dist/chunks/zh-aXPI9lKF.mjs +2 -0
  570. package/dist/chunks/zh-aXPI9lKF.mjs.map +1 -0
  571. package/dist/chunks/zh-cLXIKkZQ.mjs +2 -0
  572. package/dist/chunks/zh-cLXIKkZQ.mjs.map +1 -0
  573. package/dist/chunks/zh-cZUtN871.mjs +2 -0
  574. package/dist/chunks/zh-cZUtN871.mjs.map +1 -0
  575. package/dist/chunks/zh-hcdnCGUp.mjs +2 -0
  576. package/dist/chunks/zh-hcdnCGUp.mjs.map +1 -0
  577. package/dist/commands/AttributedMarkCommands.d.ts.map +1 -1
  578. package/dist/commands/BlockInsertion.d.ts +27 -0
  579. package/dist/commands/BlockInsertion.d.ts.map +1 -1
  580. package/dist/commands/CommandHelpers.d.ts +12 -0
  581. package/dist/commands/CommandHelpers.d.ts.map +1 -1
  582. package/dist/commands/Commands.d.ts.map +1 -1
  583. package/dist/commands/ContainerCommands.d.ts +24 -0
  584. package/dist/commands/ContainerCommands.d.ts.map +1 -0
  585. package/dist/commands/CursorMarks.d.ts +13 -0
  586. package/dist/commands/CursorMarks.d.ts.map +1 -0
  587. package/dist/commands/GapCursorCommands.d.ts.map +1 -1
  588. package/dist/commands/MarkCommands.d.ts.map +1 -1
  589. package/dist/commands/NodeSelectionCommands.d.ts.map +1 -1
  590. package/dist/commands/PasteCommand.d.ts.map +1 -1
  591. package/dist/commands/SelectionDeletion.d.ts +25 -0
  592. package/dist/commands/SelectionDeletion.d.ts.map +1 -0
  593. package/dist/editor/ContentSerializer.d.ts +1 -1
  594. package/dist/editor/ContentSerializer.d.ts.map +1 -1
  595. package/dist/editor/NotectlEditor.d.ts +10 -5
  596. package/dist/editor/NotectlEditor.d.ts.map +1 -1
  597. package/dist/fonts.d.ts +11 -0
  598. package/dist/fonts.d.ts.map +1 -1
  599. package/dist/fonts.mjs +1 -1
  600. package/dist/full.d.ts +2 -0
  601. package/dist/full.d.ts.map +1 -1
  602. package/dist/full.mjs +1 -1
  603. package/dist/html.d.ts +1 -1
  604. package/dist/html.d.ts.map +1 -1
  605. package/dist/html.mjs +1 -1
  606. package/dist/input/ClipboardHandler.d.ts.map +1 -1
  607. package/dist/input/HTMLParser.d.ts +3 -0
  608. package/dist/input/HTMLParser.d.ts.map +1 -1
  609. package/dist/input/KeyboardHandler.d.ts.map +1 -1
  610. package/dist/input/PasteHTMLHandler.d.ts +1 -1
  611. package/dist/input/PasteHTMLHandler.d.ts.map +1 -1
  612. package/dist/input/PasteRichBlockHandler.d.ts +1 -1
  613. package/dist/input/PasteRichBlockHandler.d.ts.map +1 -1
  614. package/dist/input/SelectionDocument.d.ts.map +1 -1
  615. package/dist/model/ContentSlice.d.ts +6 -7
  616. package/dist/model/ContentSlice.d.ts.map +1 -1
  617. package/dist/model/Document.d.ts +34 -0
  618. package/dist/model/Document.d.ts.map +1 -1
  619. package/dist/model/GraphemeUtils.d.ts +8 -2
  620. package/dist/model/GraphemeUtils.d.ts.map +1 -1
  621. package/dist/model/MarkSpec.d.ts +6 -0
  622. package/dist/model/MarkSpec.d.ts.map +1 -1
  623. package/dist/model/NodeResolver.d.ts +11 -0
  624. package/dist/model/NodeResolver.d.ts.map +1 -1
  625. package/dist/model/Schema.d.ts +6 -0
  626. package/dist/model/Schema.d.ts.map +1 -1
  627. package/dist/model/SchemaRegistry.d.ts.map +1 -1
  628. package/dist/notectl-core.mjs +1 -1
  629. package/dist/notectl-core.umd.js +1 -1
  630. package/dist/notectl-core.umd.js.map +1 -1
  631. package/dist/plugins/PluginContextFactory.d.ts.map +1 -1
  632. package/dist/plugins/alignment/AlignmentPlugin.d.ts.map +1 -1
  633. package/dist/plugins/alignment.mjs +1 -1
  634. package/dist/plugins/bidi-isolation/BidiIsolationPlugin.d.ts.map +1 -1
  635. package/dist/plugins/bidi-isolation.mjs +1 -1
  636. package/dist/plugins/blockquote/BlockquoteKeyboardHandlers.d.ts +1 -1
  637. package/dist/plugins/blockquote/BlockquoteKeyboardHandlers.d.ts.map +1 -1
  638. package/dist/plugins/blockquote/BlockquotePlugin.d.ts +13 -3
  639. package/dist/plugins/blockquote/BlockquotePlugin.d.ts.map +1 -1
  640. package/dist/plugins/blockquote.mjs +1 -1
  641. package/dist/plugins/caret-navigation.mjs +1 -1
  642. package/dist/plugins/code-block/AutoPairController.d.ts +50 -0
  643. package/dist/plugins/code-block/AutoPairController.d.ts.map +1 -0
  644. package/dist/plugins/code-block/CodeBlockDecorations.d.ts +16 -0
  645. package/dist/plugins/code-block/CodeBlockDecorations.d.ts.map +1 -0
  646. package/dist/plugins/code-block/CodeBlockHighlighting.d.ts +10 -0
  647. package/dist/plugins/code-block/CodeBlockHighlighting.d.ts.map +1 -0
  648. package/dist/plugins/code-block/CodeBlockKeyboardHandlers.d.ts.map +1 -1
  649. package/dist/plugins/code-block/CodeBlockNodeView.d.ts.map +1 -1
  650. package/dist/plugins/code-block/CodeBlockPlugin.d.ts +1 -35
  651. package/dist/plugins/code-block/CodeBlockPlugin.d.ts.map +1 -1
  652. package/dist/plugins/code-block/CodeBlockSchema.d.ts +11 -0
  653. package/dist/plugins/code-block/CodeBlockSchema.d.ts.map +1 -0
  654. package/dist/plugins/code-block/TokenCache.d.ts +21 -0
  655. package/dist/plugins/code-block/TokenCache.d.ts.map +1 -0
  656. package/dist/plugins/code-block.mjs +1 -1
  657. package/dist/plugins/font/FontPlugin.d.ts.map +1 -1
  658. package/dist/plugins/font-size/FontSizeOperations.d.ts +7 -3
  659. package/dist/plugins/font-size/FontSizeOperations.d.ts.map +1 -1
  660. package/dist/plugins/font-size/FontSizePlugin.d.ts.map +1 -1
  661. package/dist/plugins/font-size.mjs +1 -1
  662. package/dist/plugins/font.mjs +1 -1
  663. package/dist/plugins/formula/DisplayMathNodeSpec.d.ts +5 -0
  664. package/dist/plugins/formula/DisplayMathNodeSpec.d.ts.map +1 -0
  665. package/dist/plugins/formula/DisplayMathNodeView.d.ts +12 -0
  666. package/dist/plugins/formula/DisplayMathNodeView.d.ts.map +1 -0
  667. package/dist/plugins/formula/FormulaCommands.d.ts +35 -0
  668. package/dist/plugins/formula/FormulaCommands.d.ts.map +1 -0
  669. package/dist/plugins/formula/FormulaEditTrigger.d.ts +12 -0
  670. package/dist/plugins/formula/FormulaEditTrigger.d.ts.map +1 -0
  671. package/dist/plugins/formula/FormulaEditorMount.d.ts +19 -0
  672. package/dist/plugins/formula/FormulaEditorMount.d.ts.map +1 -0
  673. package/dist/plugins/formula/FormulaInputRules.d.ts +4 -0
  674. package/dist/plugins/formula/FormulaInputRules.d.ts.map +1 -0
  675. package/dist/plugins/formula/FormulaLocale.d.ts +45 -0
  676. package/dist/plugins/formula/FormulaLocale.d.ts.map +1 -0
  677. package/dist/plugins/formula/FormulaOverlay.d.ts +38 -0
  678. package/dist/plugins/formula/FormulaOverlay.d.ts.map +1 -0
  679. package/dist/plugins/formula/FormulaPasteInterceptor.d.ts +10 -0
  680. package/dist/plugins/formula/FormulaPasteInterceptor.d.ts.map +1 -0
  681. package/dist/plugins/formula/FormulaPlugin.d.ts +22 -0
  682. package/dist/plugins/formula/FormulaPlugin.d.ts.map +1 -0
  683. package/dist/plugins/formula/FormulaRendering.d.ts +18 -0
  684. package/dist/plugins/formula/FormulaRendering.d.ts.map +1 -0
  685. package/dist/plugins/formula/FormulaStyles.d.ts +12 -0
  686. package/dist/plugins/formula/FormulaStyles.d.ts.map +1 -0
  687. package/dist/plugins/formula/FormulaToolbar.d.ts +5 -0
  688. package/dist/plugins/formula/FormulaToolbar.d.ts.map +1 -0
  689. package/dist/plugins/formula/FormulaTypes.d.ts +64 -0
  690. package/dist/plugins/formula/FormulaTypes.d.ts.map +1 -0
  691. package/dist/plugins/formula/InlineMathNodeSpec.d.ts +5 -0
  692. package/dist/plugins/formula/InlineMathNodeSpec.d.ts.map +1 -0
  693. package/dist/plugins/formula/MathFont.d.ts +4 -0
  694. package/dist/plugins/formula/MathFont.d.ts.map +1 -0
  695. package/dist/plugins/formula/MathFontFace.d.ts +4 -0
  696. package/dist/plugins/formula/MathFontFace.d.ts.map +1 -0
  697. package/dist/plugins/formula/index.d.ts +14 -0
  698. package/dist/plugins/formula/index.d.ts.map +1 -0
  699. package/dist/plugins/formula/latex/LatexParser.d.ts +8 -0
  700. package/dist/plugins/formula/latex/LatexParser.d.ts.map +1 -0
  701. package/dist/plugins/formula/latex/LatexParserTypes.d.ts +61 -0
  702. package/dist/plugins/formula/latex/LatexParserTypes.d.ts.map +1 -0
  703. package/dist/plugins/formula/latex/LatexSymbols.d.ts +87 -0
  704. package/dist/plugins/formula/latex/LatexSymbols.d.ts.map +1 -0
  705. package/dist/plugins/formula/latex/LatexToMathML.d.ts +33 -0
  706. package/dist/plugins/formula/latex/LatexToMathML.d.ts.map +1 -0
  707. package/dist/plugins/formula/latex/LatexTokenizer.d.ts +45 -0
  708. package/dist/plugins/formula/latex/LatexTokenizer.d.ts.map +1 -0
  709. package/dist/plugins/formula/latex/MathAlphabet.d.ts +42 -0
  710. package/dist/plugins/formula/latex/MathAlphabet.d.ts.map +1 -0
  711. package/dist/plugins/formula/latex/handlers/Accents.d.ts +6 -0
  712. package/dist/plugins/formula/latex/handlers/Accents.d.ts.map +1 -0
  713. package/dist/plugins/formula/latex/handlers/Delimiters.d.ts +12 -0
  714. package/dist/plugins/formula/latex/handlers/Delimiters.d.ts.map +1 -0
  715. package/dist/plugins/formula/latex/handlers/Environments.d.ts +9 -0
  716. package/dist/plugins/formula/latex/handlers/Environments.d.ts.map +1 -0
  717. package/dist/plugins/formula/latex/handlers/Fonts.d.ts +6 -0
  718. package/dist/plugins/formula/latex/handlers/Fonts.d.ts.map +1 -0
  719. package/dist/plugins/formula/latex/handlers/Spacing.d.ts +13 -0
  720. package/dist/plugins/formula/latex/handlers/Spacing.d.ts.map +1 -0
  721. package/dist/plugins/formula/latex/handlers/Structures.d.ts +19 -0
  722. package/dist/plugins/formula/latex/handlers/Structures.d.ts.map +1 -0
  723. package/dist/plugins/formula/latex/index.d.ts +11 -0
  724. package/dist/plugins/formula/latex/index.d.ts.map +1 -0
  725. package/dist/plugins/formula/locales/ar.d.ts +4 -0
  726. package/dist/plugins/formula/locales/ar.d.ts.map +1 -0
  727. package/dist/plugins/formula/locales/de.d.ts +4 -0
  728. package/dist/plugins/formula/locales/de.d.ts.map +1 -0
  729. package/dist/plugins/formula/locales/es.d.ts +4 -0
  730. package/dist/plugins/formula/locales/es.d.ts.map +1 -0
  731. package/dist/plugins/formula/locales/fr.d.ts +4 -0
  732. package/dist/plugins/formula/locales/fr.d.ts.map +1 -0
  733. package/dist/plugins/formula/locales/hi.d.ts +4 -0
  734. package/dist/plugins/formula/locales/hi.d.ts.map +1 -0
  735. package/dist/plugins/formula/locales/pt.d.ts +4 -0
  736. package/dist/plugins/formula/locales/pt.d.ts.map +1 -0
  737. package/dist/plugins/formula/locales/ru.d.ts +4 -0
  738. package/dist/plugins/formula/locales/ru.d.ts.map +1 -0
  739. package/dist/plugins/formula/locales/zh.d.ts +4 -0
  740. package/dist/plugins/formula/locales/zh.d.ts.map +1 -0
  741. package/dist/plugins/formula/math-field/MathField.d.ts +45 -0
  742. package/dist/plugins/formula/math-field/MathField.d.ts.map +1 -0
  743. package/dist/plugins/formula/math-field/MathFieldTypes.d.ts +73 -0
  744. package/dist/plugins/formula/math-field/MathFieldTypes.d.ts.map +1 -0
  745. package/dist/plugins/formula/math-field/MathPalette.d.ts +16 -0
  746. package/dist/plugins/formula/math-field/MathPalette.d.ts.map +1 -0
  747. package/dist/plugins/formula/math-field/MathPaletteData.d.ts +15 -0
  748. package/dist/plugins/formula/math-field/MathPaletteData.d.ts.map +1 -0
  749. package/dist/plugins/formula/math-field/index.d.ts +9 -0
  750. package/dist/plugins/formula/math-field/index.d.ts.map +1 -0
  751. package/dist/plugins/formula/mathml/MathMLBuilder.d.ts +58 -0
  752. package/dist/plugins/formula/mathml/MathMLBuilder.d.ts.map +1 -0
  753. package/dist/plugins/formula/mathml/MathMLDocument.d.ts +54 -0
  754. package/dist/plugins/formula/mathml/MathMLDocument.d.ts.map +1 -0
  755. package/dist/plugins/formula/mathml/MathMLSanitize.d.ts +15 -0
  756. package/dist/plugins/formula/mathml/MathMLSanitize.d.ts.map +1 -0
  757. package/dist/plugins/formula/mathml/index.d.ts +8 -0
  758. package/dist/plugins/formula/mathml/index.d.ts.map +1 -0
  759. package/dist/plugins/formula.mjs +1 -0
  760. package/dist/plugins/gap-cursor.mjs +1 -1
  761. package/dist/plugins/hard-break.mjs +1 -1
  762. package/dist/plugins/heading.mjs +1 -1
  763. package/dist/plugins/highlight/HighlightPalette.d.ts +7 -0
  764. package/dist/plugins/highlight/HighlightPalette.d.ts.map +1 -0
  765. package/dist/plugins/highlight/HighlightPlugin.d.ts.map +1 -1
  766. package/dist/plugins/highlight.mjs +1 -1
  767. package/dist/plugins/horizontal-rule/HorizontalRulePlugin.d.ts.map +1 -1
  768. package/dist/plugins/horizontal-rule.mjs +1 -1
  769. package/dist/plugins/image/ImageCommands.d.ts.map +1 -1
  770. package/dist/plugins/image/ImageNodeView.d.ts.map +1 -1
  771. package/dist/plugins/image.mjs +1 -1
  772. package/dist/plugins/inline-code/InlineCodePlugin.d.ts +1 -4
  773. package/dist/plugins/inline-code/InlineCodePlugin.d.ts.map +1 -1
  774. package/dist/plugins/inline-code.mjs +1 -1
  775. package/dist/plugins/language.mjs +1 -1
  776. package/dist/plugins/link/LinkPlugin.d.ts.map +1 -1
  777. package/dist/plugins/link.mjs +1 -1
  778. package/dist/plugins/list.mjs +1 -1
  779. package/dist/plugins/print.mjs +1 -1
  780. package/dist/plugins/shared/InlineStyleMarkSpec.d.ts +22 -0
  781. package/dist/plugins/shared/InlineStyleMarkSpec.d.ts.map +1 -0
  782. package/dist/plugins/shared/NodeSpecPatching.d.ts +16 -0
  783. package/dist/plugins/shared/NodeSpecPatching.d.ts.map +1 -0
  784. package/dist/plugins/shared/PluginHelpers.d.ts +8 -0
  785. package/dist/plugins/shared/PluginHelpers.d.ts.map +1 -1
  786. package/dist/plugins/shared/PopupManager.d.ts.map +1 -1
  787. package/dist/plugins/shared/PopupPositioning.d.ts +20 -0
  788. package/dist/plugins/shared/PopupPositioning.d.ts.map +1 -1
  789. package/dist/plugins/shared/SimpleMark.d.ts +22 -0
  790. package/dist/plugins/shared/SimpleMark.d.ts.map +1 -0
  791. package/dist/plugins/shared.mjs +1 -1
  792. package/dist/plugins/smart-paste.mjs +1 -1
  793. package/dist/plugins/strikethrough/StrikethroughPlugin.d.ts +0 -4
  794. package/dist/plugins/strikethrough/StrikethroughPlugin.d.ts.map +1 -1
  795. package/dist/plugins/strikethrough.mjs +1 -1
  796. package/dist/plugins/super-sub/SuperSubPlugin.d.ts.map +1 -1
  797. package/dist/plugins/super-sub.mjs +1 -1
  798. package/dist/plugins/table/TableCommands.d.ts.map +1 -1
  799. package/dist/plugins/table/TableNavigation.d.ts.map +1 -1
  800. package/dist/plugins/table/TablePlugin.d.ts.map +1 -1
  801. package/dist/plugins/table.mjs +1 -1
  802. package/dist/plugins/text-color/TextColorPalette.d.ts +6 -0
  803. package/dist/plugins/text-color/TextColorPalette.d.ts.map +1 -0
  804. package/dist/plugins/text-color/TextColorPlugin.d.ts.map +1 -1
  805. package/dist/plugins/text-color.mjs +1 -1
  806. package/dist/plugins/text-direction/TextDirectionPlugin.d.ts.map +1 -1
  807. package/dist/plugins/text-direction-auto.mjs +1 -1
  808. package/dist/plugins/text-direction.mjs +1 -1
  809. package/dist/plugins/text-formatting/TextFormattingPlugin.d.ts.map +1 -1
  810. package/dist/plugins/text-formatting.mjs +1 -1
  811. package/dist/plugins/toolbar.mjs +1 -1
  812. package/dist/plugins/video/VideoCommands.d.ts +62 -0
  813. package/dist/plugins/video/VideoCommands.d.ts.map +1 -0
  814. package/dist/plugins/video/VideoEditOverlay.d.ts +30 -0
  815. package/dist/plugins/video/VideoEditOverlay.d.ts.map +1 -0
  816. package/dist/plugins/video/VideoEmbedPrompt.d.ts +18 -0
  817. package/dist/plugins/video/VideoEmbedPrompt.d.ts.map +1 -0
  818. package/dist/plugins/video/VideoFacade.d.ts +46 -0
  819. package/dist/plugins/video/VideoFacade.d.ts.map +1 -0
  820. package/dist/plugins/video/VideoLocale.d.ts +53 -0
  821. package/dist/plugins/video/VideoLocale.d.ts.map +1 -0
  822. package/dist/plugins/video/VideoNodeSpec.d.ts +24 -0
  823. package/dist/plugins/video/VideoNodeSpec.d.ts.map +1 -0
  824. package/dist/plugins/video/VideoNodeView.d.ts +16 -0
  825. package/dist/plugins/video/VideoNodeView.d.ts.map +1 -0
  826. package/dist/plugins/video/VideoPasteInterceptor.d.ts +9 -0
  827. package/dist/plugins/video/VideoPasteInterceptor.d.ts.map +1 -0
  828. package/dist/plugins/video/VideoPlugin.d.ts +31 -0
  829. package/dist/plugins/video/VideoPlugin.d.ts.map +1 -0
  830. package/dist/plugins/video/VideoPopup.d.ts +28 -0
  831. package/dist/plugins/video/VideoPopup.d.ts.map +1 -0
  832. package/dist/plugins/video/VideoPopupStyles.d.ts +3 -0
  833. package/dist/plugins/video/VideoPopupStyles.d.ts.map +1 -0
  834. package/dist/plugins/video/VideoProviders.d.ts +98 -0
  835. package/dist/plugins/video/VideoProviders.d.ts.map +1 -0
  836. package/dist/plugins/video/VideoResize.d.ts +35 -0
  837. package/dist/plugins/video/VideoResize.d.ts.map +1 -0
  838. package/dist/plugins/video/VideoSanitizeHook.d.ts +23 -0
  839. package/dist/plugins/video/VideoSanitizeHook.d.ts.map +1 -0
  840. package/dist/plugins/video/VideoSelectionToolbar.d.ts +20 -0
  841. package/dist/plugins/video/VideoSelectionToolbar.d.ts.map +1 -0
  842. package/dist/plugins/video/VideoStyles.d.ts +3 -0
  843. package/dist/plugins/video/VideoStyles.d.ts.map +1 -0
  844. package/dist/plugins/video/VideoTypes.d.ts +102 -0
  845. package/dist/plugins/video/VideoTypes.d.ts.map +1 -0
  846. package/dist/plugins/video/VideoViewHelpers.d.ts +13 -0
  847. package/dist/plugins/video/VideoViewHelpers.d.ts.map +1 -0
  848. package/dist/plugins/video/index.d.ts +6 -0
  849. package/dist/plugins/video/index.d.ts.map +1 -0
  850. package/dist/plugins/video/locales/ar.d.ts +4 -0
  851. package/dist/plugins/video/locales/ar.d.ts.map +1 -0
  852. package/dist/plugins/video/locales/de.d.ts +4 -0
  853. package/dist/plugins/video/locales/de.d.ts.map +1 -0
  854. package/dist/plugins/video/locales/es.d.ts +4 -0
  855. package/dist/plugins/video/locales/es.d.ts.map +1 -0
  856. package/dist/plugins/video/locales/fr.d.ts +4 -0
  857. package/dist/plugins/video/locales/fr.d.ts.map +1 -0
  858. package/dist/plugins/video/locales/hi.d.ts +4 -0
  859. package/dist/plugins/video/locales/hi.d.ts.map +1 -0
  860. package/dist/plugins/video/locales/pt.d.ts +4 -0
  861. package/dist/plugins/video/locales/pt.d.ts.map +1 -0
  862. package/dist/plugins/video/locales/ru.d.ts +4 -0
  863. package/dist/plugins/video/locales/ru.d.ts.map +1 -0
  864. package/dist/plugins/video/locales/zh.d.ts +4 -0
  865. package/dist/plugins/video/locales/zh.d.ts.map +1 -0
  866. package/dist/plugins/video.mjs +1 -0
  867. package/dist/presets/FullPreset.d.ts +1 -1
  868. package/dist/presets/FullPreset.d.ts.map +1 -1
  869. package/dist/presets/PresetTypes.d.ts +4 -0
  870. package/dist/presets/PresetTypes.d.ts.map +1 -1
  871. package/dist/presets/full.mjs +1 -1
  872. package/dist/presets/minimal.mjs +1 -1
  873. package/dist/presets.mjs +1 -1
  874. package/dist/serialization/CSSClassCollector.d.ts.map +1 -1
  875. package/dist/serialization/ContentHTMLTypes.d.ts +19 -1
  876. package/dist/serialization/ContentHTMLTypes.d.ts.map +1 -1
  877. package/dist/serialization/DocumentParser.d.ts.map +1 -1
  878. package/dist/serialization/DocumentSerializer.d.ts +3 -3
  879. package/dist/serialization/DocumentSerializer.d.ts.map +1 -1
  880. package/dist/serialization/HTMLWhitespace.d.ts +22 -0
  881. package/dist/serialization/HTMLWhitespace.d.ts.map +1 -0
  882. package/dist/serialization/MarkSerializer.d.ts.map +1 -1
  883. package/dist/serialization/index.d.ts +1 -1
  884. package/dist/serialization/index.d.ts.map +1 -1
  885. package/dist/state/BlockTreeOps.d.ts +8 -1
  886. package/dist/state/BlockTreeOps.d.ts.map +1 -1
  887. package/dist/state/EditorState.d.ts.map +1 -1
  888. package/dist/state/NavigationQueries.d.ts +11 -0
  889. package/dist/state/NavigationQueries.d.ts.map +1 -1
  890. package/dist/test/TestUtils.d.ts +1 -1
  891. package/dist/test/TestUtils.d.ts.map +1 -1
  892. package/dist/view/CaretNavigation.d.ts.map +1 -1
  893. package/dist/view/SelectionSync.d.ts.map +1 -1
  894. package/dist/view/ViewMovementCommands.d.ts.map +1 -1
  895. package/package.json +16 -1
  896. package/dist/chunks/AlignmentPlugin-CjmLXGsv.mjs +0 -2
  897. package/dist/chunks/AlignmentPlugin-CjmLXGsv.mjs.map +0 -1
  898. package/dist/chunks/AttrRegistry-cXq6uQK2.mjs +0 -2
  899. package/dist/chunks/AttrRegistry-cXq6uQK2.mjs.map +0 -1
  900. package/dist/chunks/AttributedMarkCommands-Ctt_1xRD.mjs +0 -2
  901. package/dist/chunks/AttributedMarkCommands-Ctt_1xRD.mjs.map +0 -1
  902. package/dist/chunks/BidiIsolationPlugin-q3zoofgZ.mjs +0 -2
  903. package/dist/chunks/BidiIsolationPlugin-q3zoofgZ.mjs.map +0 -1
  904. package/dist/chunks/BlockInsertion-4QmiYRMo.mjs +0 -2
  905. package/dist/chunks/BlockInsertion-4QmiYRMo.mjs.map +0 -1
  906. package/dist/chunks/BlockTypePickerRegistry-DgI_LlNO.mjs +0 -2
  907. package/dist/chunks/BlockTypePickerRegistry-DgI_LlNO.mjs.map +0 -1
  908. package/dist/chunks/BlockquotePlugin-BTsDYB3K.mjs +0 -2
  909. package/dist/chunks/BlockquotePlugin-BTsDYB3K.mjs.map +0 -1
  910. package/dist/chunks/CaretNavigationPlugin-BFBov4H7.mjs +0 -2
  911. package/dist/chunks/CaretNavigationPlugin-BFBov4H7.mjs.map +0 -1
  912. package/dist/chunks/CodeBlockPlugin-o0Aoq9Nu.mjs +0 -2
  913. package/dist/chunks/CodeBlockPlugin-o0Aoq9Nu.mjs.map +0 -1
  914. package/dist/chunks/ColorGrid-U5NtjqyV.mjs +0 -2
  915. package/dist/chunks/ColorGrid-U5NtjqyV.mjs.map +0 -1
  916. package/dist/chunks/ColorPickerPopup-BYSMUZZx.mjs +0 -2
  917. package/dist/chunks/ColorPickerPopup-BYSMUZZx.mjs.map +0 -1
  918. package/dist/chunks/ColorValidation-3viVw_tK.mjs +0 -2
  919. package/dist/chunks/ColorValidation-3viVw_tK.mjs.map +0 -1
  920. package/dist/chunks/CommandHelpers-BqHfwW7i.mjs +0 -2
  921. package/dist/chunks/CommandHelpers-BqHfwW7i.mjs.map +0 -1
  922. package/dist/chunks/Commands-BC_EPIEx.mjs +0 -2
  923. package/dist/chunks/Commands-BC_EPIEx.mjs.map +0 -1
  924. package/dist/chunks/Decoration-BeTkTHRO.mjs +0 -2
  925. package/dist/chunks/Decoration-BeTkTHRO.mjs.map +0 -1
  926. package/dist/chunks/DirectionDetection-kAewerPz.mjs +0 -2
  927. package/dist/chunks/DirectionDetection-kAewerPz.mjs.map +0 -1
  928. package/dist/chunks/DirectionIcons-BQHHAEYU.mjs +0 -2
  929. package/dist/chunks/DirectionIcons-BQHHAEYU.mjs.map +0 -1
  930. package/dist/chunks/Document-DJmYYuBx.mjs +0 -2
  931. package/dist/chunks/Document-DJmYYuBx.mjs.map +0 -1
  932. package/dist/chunks/DocumentParser-D2hn-48i.mjs +0 -2
  933. package/dist/chunks/DocumentParser-D2hn-48i.mjs.map +0 -1
  934. package/dist/chunks/FontPlugin-TmUrcVn1.mjs +0 -2
  935. package/dist/chunks/FontPlugin-TmUrcVn1.mjs.map +0 -1
  936. package/dist/chunks/FontSizePlugin-Bwui7gLI.mjs +0 -2
  937. package/dist/chunks/FontSizePlugin-Bwui7gLI.mjs.map +0 -1
  938. package/dist/chunks/GapCursorNavigation-BEO5L2-O.mjs +0 -2
  939. package/dist/chunks/GapCursorNavigation-BEO5L2-O.mjs.map +0 -1
  940. package/dist/chunks/GapCursorPlugin-BiZQyVrJ.mjs +0 -2
  941. package/dist/chunks/GapCursorPlugin-BiZQyVrJ.mjs.map +0 -1
  942. package/dist/chunks/HardBreakPlugin-Dj4pkSk-.mjs +0 -2
  943. package/dist/chunks/HardBreakPlugin-Dj4pkSk-.mjs.map +0 -1
  944. package/dist/chunks/HeadingPlugin-D8xIRk25.mjs +0 -2
  945. package/dist/chunks/HeadingPlugin-D8xIRk25.mjs.map +0 -1
  946. package/dist/chunks/HighlightPlugin-CNX7lup0.mjs +0 -2
  947. package/dist/chunks/HighlightPlugin-CNX7lup0.mjs.map +0 -1
  948. package/dist/chunks/HorizontalRulePlugin-D-ZjKGDv.mjs +0 -2
  949. package/dist/chunks/HorizontalRulePlugin-D-ZjKGDv.mjs.map +0 -1
  950. package/dist/chunks/ImagePlugin-DwL8i3pO.mjs +0 -2
  951. package/dist/chunks/ImagePlugin-DwL8i3pO.mjs.map +0 -1
  952. package/dist/chunks/InlineCodePlugin-BpXNuKAa.mjs +0 -2
  953. package/dist/chunks/InlineCodePlugin-BpXNuKAa.mjs.map +0 -1
  954. package/dist/chunks/KeyboardNav-BZIHDPDV.mjs +0 -2
  955. package/dist/chunks/KeyboardNav-BZIHDPDV.mjs.map +0 -1
  956. package/dist/chunks/LinkPlugin-BK15pc0u.mjs +0 -2
  957. package/dist/chunks/LinkPlugin-BK15pc0u.mjs.map +0 -1
  958. package/dist/chunks/ListPlugin-B5ihlVNx.mjs +0 -2
  959. package/dist/chunks/ListPlugin-B5ihlVNx.mjs.map +0 -1
  960. package/dist/chunks/NavigationQueries-DhptdQBe.mjs +0 -2
  961. package/dist/chunks/NavigationQueries-DhptdQBe.mjs.map +0 -1
  962. package/dist/chunks/NodeSelectionCommands-DenSYOfB.mjs +0 -2
  963. package/dist/chunks/NodeSelectionCommands-DenSYOfB.mjs.map +0 -1
  964. package/dist/chunks/Platform-D9TRT4Mn.mjs +0 -2
  965. package/dist/chunks/Platform-D9TRT4Mn.mjs.map +0 -1
  966. package/dist/chunks/PluginHelpers-BZphovwz.mjs +0 -2
  967. package/dist/chunks/PluginHelpers-BZphovwz.mjs.map +0 -1
  968. package/dist/chunks/PopupKeyboardPatterns-CgUM5kPf.mjs +0 -2
  969. package/dist/chunks/PopupKeyboardPatterns-CgUM5kPf.mjs.map +0 -1
  970. package/dist/chunks/PopupManager-B5SHhDsx.mjs +0 -2
  971. package/dist/chunks/PopupManager-B5SHhDsx.mjs.map +0 -1
  972. package/dist/chunks/PopupPositioning-BfahfPOm.mjs +0 -2
  973. package/dist/chunks/PopupPositioning-BfahfPOm.mjs.map +0 -1
  974. package/dist/chunks/PrintPlugin-CckjtZ9B.mjs +0 -2
  975. package/dist/chunks/PrintPlugin-CckjtZ9B.mjs.map +0 -1
  976. package/dist/chunks/PrintTypes-Ci3XW_s8.mjs +0 -2
  977. package/dist/chunks/PrintTypes-Ci3XW_s8.mjs.map +0 -1
  978. package/dist/chunks/RangeIterator-ZooGMxGy.mjs +0 -2
  979. package/dist/chunks/RangeIterator-ZooGMxGy.mjs.map +0 -1
  980. package/dist/chunks/ShortcutFormatting-DQPMvupx.mjs +0 -2
  981. package/dist/chunks/ShortcutFormatting-DQPMvupx.mjs.map +0 -1
  982. package/dist/chunks/SmartPastePlugin-B_zi9WT9.mjs +0 -2
  983. package/dist/chunks/SmartPastePlugin-B_zi9WT9.mjs.map +0 -1
  984. package/dist/chunks/StrikethroughPlugin-2XDKYefG.mjs +0 -2
  985. package/dist/chunks/StrikethroughPlugin-2XDKYefG.mjs.map +0 -1
  986. package/dist/chunks/StyleRuntime-D3d1XFFe.mjs +0 -2
  987. package/dist/chunks/StyleRuntime-D3d1XFFe.mjs.map +0 -1
  988. package/dist/chunks/SuperSubPlugin-6gdrjKZv.mjs +0 -2
  989. package/dist/chunks/SuperSubPlugin-6gdrjKZv.mjs.map +0 -1
  990. package/dist/chunks/SyntaxTokenTypes-DZwhanGO.mjs +0 -2
  991. package/dist/chunks/SyntaxTokenTypes-DZwhanGO.mjs.map +0 -1
  992. package/dist/chunks/TablePlugin-DW78Y4pB.mjs +0 -2
  993. package/dist/chunks/TablePlugin-DW78Y4pB.mjs.map +0 -1
  994. package/dist/chunks/TextColorPlugin-CgHro45N.mjs +0 -2
  995. package/dist/chunks/TextColorPlugin-CgHro45N.mjs.map +0 -1
  996. package/dist/chunks/TextDirectionAutoPlugin-C88ZeXJo.mjs +0 -2
  997. package/dist/chunks/TextDirectionAutoPlugin-C88ZeXJo.mjs.map +0 -1
  998. package/dist/chunks/TextDirectionPlugin-BTTqrWbL.mjs +0 -2
  999. package/dist/chunks/TextDirectionPlugin-BTTqrWbL.mjs.map +0 -1
  1000. package/dist/chunks/TextDirectionService-DzuOMFm8.mjs +0 -2
  1001. package/dist/chunks/TextDirectionService-DzuOMFm8.mjs.map +0 -1
  1002. package/dist/chunks/TextFormattingPlugin-BD4Qlpls.mjs +0 -2
  1003. package/dist/chunks/TextFormattingPlugin-BD4Qlpls.mjs.map +0 -1
  1004. package/dist/chunks/ToolbarPlugin-D5_-gWmH.mjs +0 -2
  1005. package/dist/chunks/ToolbarPlugin-D5_-gWmH.mjs.map +0 -1
  1006. package/dist/chunks/TypedKeys-CU7aToqY.mjs +0 -2
  1007. package/dist/chunks/TypedKeys-CU7aToqY.mjs.map +0 -1
  1008. package/dist/chunks/WordBoundary-Cz2bSRAU.mjs +0 -2
  1009. package/dist/chunks/WordBoundary-Cz2bSRAU.mjs.map +0 -1
  1010. package/dist/chunks/XmlDetector-DM-Vv-XW.mjs +0 -2
  1011. package/dist/chunks/XmlDetector-DM-Vv-XW.mjs.map +0 -1
  1012. package/dist/chunks/XmlPatterns-B-V-mHF4.mjs +0 -2
  1013. package/dist/chunks/XmlPatterns-B-V-mHF4.mjs.map +0 -1
  1014. package/dist/chunks/XmlSupport-Dr1S1HN9.mjs +0 -2
  1015. package/dist/chunks/XmlSupport-Dr1S1HN9.mjs.map +0 -1
  1016. package/dist/chunks/ar-4r3DgNTY.mjs +0 -2
  1017. package/dist/chunks/ar-4r3DgNTY.mjs.map +0 -1
  1018. package/dist/chunks/ar-7EtzKNIe.mjs +0 -2
  1019. package/dist/chunks/ar-7EtzKNIe.mjs.map +0 -1
  1020. package/dist/chunks/ar-B2pDI_LT.mjs +0 -2
  1021. package/dist/chunks/ar-B2pDI_LT.mjs.map +0 -1
  1022. package/dist/chunks/ar-BV6-zQd7.mjs +0 -2
  1023. package/dist/chunks/ar-BV6-zQd7.mjs.map +0 -1
  1024. package/dist/chunks/ar-BaCL4Bzy.mjs +0 -2
  1025. package/dist/chunks/ar-BaCL4Bzy.mjs.map +0 -1
  1026. package/dist/chunks/ar-BdGHrLSw.mjs +0 -2
  1027. package/dist/chunks/ar-BdGHrLSw.mjs.map +0 -1
  1028. package/dist/chunks/ar-BwYDKOvO.mjs +0 -2
  1029. package/dist/chunks/ar-BwYDKOvO.mjs.map +0 -1
  1030. package/dist/chunks/ar-C5eLSf71.mjs +0 -2
  1031. package/dist/chunks/ar-C5eLSf71.mjs.map +0 -1
  1032. package/dist/chunks/ar-CEUn6f7s.mjs +0 -2
  1033. package/dist/chunks/ar-CEUn6f7s.mjs.map +0 -1
  1034. package/dist/chunks/ar-CGYb1t6O.mjs +0 -2
  1035. package/dist/chunks/ar-CGYb1t6O.mjs.map +0 -1
  1036. package/dist/chunks/ar-CjK36QZ9.mjs +0 -2
  1037. package/dist/chunks/ar-CjK36QZ9.mjs.map +0 -1
  1038. package/dist/chunks/ar-D9jfC3WF.mjs +0 -2
  1039. package/dist/chunks/ar-D9jfC3WF.mjs.map +0 -1
  1040. package/dist/chunks/ar-DFeA_UxF.mjs +0 -2
  1041. package/dist/chunks/ar-DFeA_UxF.mjs.map +0 -1
  1042. package/dist/chunks/ar-DMuawOHV.mjs +0 -2
  1043. package/dist/chunks/ar-DMuawOHV.mjs.map +0 -1
  1044. package/dist/chunks/ar-DV30sa3s.mjs +0 -2
  1045. package/dist/chunks/ar-DV30sa3s.mjs.map +0 -1
  1046. package/dist/chunks/ar-DWwG54pa.mjs +0 -2
  1047. package/dist/chunks/ar-DWwG54pa.mjs.map +0 -1
  1048. package/dist/chunks/ar-DcJbUbml.mjs +0 -2
  1049. package/dist/chunks/ar-DcJbUbml.mjs.map +0 -1
  1050. package/dist/chunks/ar-DelI54_I.mjs +0 -2
  1051. package/dist/chunks/ar-DelI54_I.mjs.map +0 -1
  1052. package/dist/chunks/ar-DmqFnvxC.mjs +0 -2
  1053. package/dist/chunks/ar-DmqFnvxC.mjs.map +0 -1
  1054. package/dist/chunks/ar-DpEHjBUk.mjs +0 -2
  1055. package/dist/chunks/ar-DpEHjBUk.mjs.map +0 -1
  1056. package/dist/chunks/ar-EnfTpUuB.mjs +0 -2
  1057. package/dist/chunks/ar-EnfTpUuB.mjs.map +0 -1
  1058. package/dist/chunks/ar-ZHVy9O4c.mjs +0 -2
  1059. package/dist/chunks/ar-ZHVy9O4c.mjs.map +0 -1
  1060. package/dist/chunks/ar-_7aFyBGi.mjs +0 -2
  1061. package/dist/chunks/ar-_7aFyBGi.mjs.map +0 -1
  1062. package/dist/chunks/ar-l75rG_xT.mjs +0 -2
  1063. package/dist/chunks/ar-l75rG_xT.mjs.map +0 -1
  1064. package/dist/chunks/ar-qU1PohHA.mjs +0 -2
  1065. package/dist/chunks/ar-qU1PohHA.mjs.map +0 -1
  1066. package/dist/chunks/color-picker-BTex2Cfu.mjs +0 -2
  1067. package/dist/chunks/color-picker-BTex2Cfu.mjs.map +0 -1
  1068. package/dist/chunks/de-BDfimoiQ.mjs +0 -2
  1069. package/dist/chunks/de-BDfimoiQ.mjs.map +0 -1
  1070. package/dist/chunks/de-BSkOdXQZ.mjs +0 -2
  1071. package/dist/chunks/de-BSkOdXQZ.mjs.map +0 -1
  1072. package/dist/chunks/de-BooQr0-C.mjs +0 -2
  1073. package/dist/chunks/de-BooQr0-C.mjs.map +0 -1
  1074. package/dist/chunks/de-ByvLzlOc.mjs +0 -2
  1075. package/dist/chunks/de-ByvLzlOc.mjs.map +0 -1
  1076. package/dist/chunks/de-C03n6uR5.mjs +0 -2
  1077. package/dist/chunks/de-C03n6uR5.mjs.map +0 -1
  1078. package/dist/chunks/de-C0TfkuUd.mjs +0 -2
  1079. package/dist/chunks/de-C0TfkuUd.mjs.map +0 -1
  1080. package/dist/chunks/de-C0khkRSC.mjs +0 -2
  1081. package/dist/chunks/de-C0khkRSC.mjs.map +0 -1
  1082. package/dist/chunks/de-C4IW4BVo.mjs +0 -2
  1083. package/dist/chunks/de-C4IW4BVo.mjs.map +0 -1
  1084. package/dist/chunks/de-CDSG9CMy.mjs +0 -2
  1085. package/dist/chunks/de-CDSG9CMy.mjs.map +0 -1
  1086. package/dist/chunks/de-CkIwUE6R.mjs +0 -2
  1087. package/dist/chunks/de-CkIwUE6R.mjs.map +0 -1
  1088. package/dist/chunks/de-CmJ9oOiP.mjs +0 -2
  1089. package/dist/chunks/de-CmJ9oOiP.mjs.map +0 -1
  1090. package/dist/chunks/de-CrjOjB4F.mjs +0 -2
  1091. package/dist/chunks/de-CrjOjB4F.mjs.map +0 -1
  1092. package/dist/chunks/de-D5_uflBY.mjs +0 -2
  1093. package/dist/chunks/de-D5_uflBY.mjs.map +0 -1
  1094. package/dist/chunks/de-DH5zRyrS.mjs +0 -2
  1095. package/dist/chunks/de-DH5zRyrS.mjs.map +0 -1
  1096. package/dist/chunks/de-DJqgaz5N.mjs +0 -2
  1097. package/dist/chunks/de-DJqgaz5N.mjs.map +0 -1
  1098. package/dist/chunks/de-DMiAi5QJ.mjs +0 -2
  1099. package/dist/chunks/de-DMiAi5QJ.mjs.map +0 -1
  1100. package/dist/chunks/de-DT6VbHNl.mjs +0 -2
  1101. package/dist/chunks/de-DT6VbHNl.mjs.map +0 -1
  1102. package/dist/chunks/de-DbqObFs9.mjs +0 -2
  1103. package/dist/chunks/de-DbqObFs9.mjs.map +0 -1
  1104. package/dist/chunks/de-Dl0svzeh.mjs +0 -2
  1105. package/dist/chunks/de-Dl0svzeh.mjs.map +0 -1
  1106. package/dist/chunks/de-DzMY3LLH.mjs +0 -2
  1107. package/dist/chunks/de-DzMY3LLH.mjs.map +0 -1
  1108. package/dist/chunks/de-JGuzWRyC.mjs +0 -2
  1109. package/dist/chunks/de-JGuzWRyC.mjs.map +0 -1
  1110. package/dist/chunks/de-MOHX9tl7.mjs +0 -2
  1111. package/dist/chunks/de-MOHX9tl7.mjs.map +0 -1
  1112. package/dist/chunks/de-mtjvG1Li.mjs +0 -2
  1113. package/dist/chunks/de-mtjvG1Li.mjs.map +0 -1
  1114. package/dist/chunks/de-oNyi0r7G.mjs +0 -2
  1115. package/dist/chunks/de-oNyi0r7G.mjs.map +0 -1
  1116. package/dist/chunks/de-y5fJdnH9.mjs +0 -2
  1117. package/dist/chunks/de-y5fJdnH9.mjs.map +0 -1
  1118. package/dist/chunks/es-B-V14ELw.mjs +0 -2
  1119. package/dist/chunks/es-B-V14ELw.mjs.map +0 -1
  1120. package/dist/chunks/es-Bf6WRo_H.mjs +0 -2
  1121. package/dist/chunks/es-Bf6WRo_H.mjs.map +0 -1
  1122. package/dist/chunks/es-Bw9vJu_M.mjs +0 -2
  1123. package/dist/chunks/es-Bw9vJu_M.mjs.map +0 -1
  1124. package/dist/chunks/es-CCdE3xXm.mjs +0 -2
  1125. package/dist/chunks/es-CCdE3xXm.mjs.map +0 -1
  1126. package/dist/chunks/es-CDoZMS8v.mjs +0 -2
  1127. package/dist/chunks/es-CDoZMS8v.mjs.map +0 -1
  1128. package/dist/chunks/es-CO1hBMDj.mjs +0 -2
  1129. package/dist/chunks/es-CO1hBMDj.mjs.map +0 -1
  1130. package/dist/chunks/es-CU2TUgK3.mjs +0 -2
  1131. package/dist/chunks/es-CU2TUgK3.mjs.map +0 -1
  1132. package/dist/chunks/es-CXeJJ2r1.mjs +0 -2
  1133. package/dist/chunks/es-CXeJJ2r1.mjs.map +0 -1
  1134. package/dist/chunks/es-Cc337sYN.mjs +0 -2
  1135. package/dist/chunks/es-Cc337sYN.mjs.map +0 -1
  1136. package/dist/chunks/es-Ck88JtiM.mjs +0 -2
  1137. package/dist/chunks/es-Ck88JtiM.mjs.map +0 -1
  1138. package/dist/chunks/es-CmOFsz0P.mjs +0 -2
  1139. package/dist/chunks/es-CmOFsz0P.mjs.map +0 -1
  1140. package/dist/chunks/es-CpcUYxtO.mjs +0 -2
  1141. package/dist/chunks/es-CpcUYxtO.mjs.map +0 -1
  1142. package/dist/chunks/es-Cqp8LgVd.mjs +0 -2
  1143. package/dist/chunks/es-Cqp8LgVd.mjs.map +0 -1
  1144. package/dist/chunks/es-CsK826Q8.mjs +0 -2
  1145. package/dist/chunks/es-CsK826Q8.mjs.map +0 -1
  1146. package/dist/chunks/es-D7wyE736.mjs +0 -2
  1147. package/dist/chunks/es-D7wyE736.mjs.map +0 -1
  1148. package/dist/chunks/es-DGCoEaRB.mjs +0 -2
  1149. package/dist/chunks/es-DGCoEaRB.mjs.map +0 -1
  1150. package/dist/chunks/es-DPsoXXVT.mjs +0 -2
  1151. package/dist/chunks/es-DPsoXXVT.mjs.map +0 -1
  1152. package/dist/chunks/es-Df2ocRb2.mjs +0 -2
  1153. package/dist/chunks/es-Df2ocRb2.mjs.map +0 -1
  1154. package/dist/chunks/es-DgVSWMPU.mjs +0 -2
  1155. package/dist/chunks/es-DgVSWMPU.mjs.map +0 -1
  1156. package/dist/chunks/es-Dltvy1GA.mjs +0 -2
  1157. package/dist/chunks/es-Dltvy1GA.mjs.map +0 -1
  1158. package/dist/chunks/es-DtElbzrQ.mjs +0 -2
  1159. package/dist/chunks/es-DtElbzrQ.mjs.map +0 -1
  1160. package/dist/chunks/es-ERjP_b2h.mjs +0 -2
  1161. package/dist/chunks/es-ERjP_b2h.mjs.map +0 -1
  1162. package/dist/chunks/es-SN8M8vXY.mjs +0 -2
  1163. package/dist/chunks/es-SN8M8vXY.mjs.map +0 -1
  1164. package/dist/chunks/es-domW6tKg.mjs +0 -2
  1165. package/dist/chunks/es-domW6tKg.mjs.map +0 -1
  1166. package/dist/chunks/es-luS_ivBE.mjs +0 -2
  1167. package/dist/chunks/es-luS_ivBE.mjs.map +0 -1
  1168. package/dist/chunks/fonts-DVgoAAns.mjs +0 -2
  1169. package/dist/chunks/fonts-DVgoAAns.mjs.map +0 -1
  1170. package/dist/chunks/fr-BPa6RyuB.mjs +0 -2
  1171. package/dist/chunks/fr-BPa6RyuB.mjs.map +0 -1
  1172. package/dist/chunks/fr-BYK62vy-.mjs +0 -2
  1173. package/dist/chunks/fr-BYK62vy-.mjs.map +0 -1
  1174. package/dist/chunks/fr-BZH71A1g.mjs +0 -2
  1175. package/dist/chunks/fr-BZH71A1g.mjs.map +0 -1
  1176. package/dist/chunks/fr-BomQM4Qz.mjs +0 -2
  1177. package/dist/chunks/fr-BomQM4Qz.mjs.map +0 -1
  1178. package/dist/chunks/fr-BujOdWeE.mjs +0 -2
  1179. package/dist/chunks/fr-BujOdWeE.mjs.map +0 -1
  1180. package/dist/chunks/fr-C6BCt-Fk.mjs +0 -2
  1181. package/dist/chunks/fr-C6BCt-Fk.mjs.map +0 -1
  1182. package/dist/chunks/fr-C8NXcJOp.mjs +0 -2
  1183. package/dist/chunks/fr-C8NXcJOp.mjs.map +0 -1
  1184. package/dist/chunks/fr-C8aNnvoW.mjs +0 -2
  1185. package/dist/chunks/fr-C8aNnvoW.mjs.map +0 -1
  1186. package/dist/chunks/fr-C8jqjdbQ.mjs +0 -2
  1187. package/dist/chunks/fr-C8jqjdbQ.mjs.map +0 -1
  1188. package/dist/chunks/fr-Cg97syqs.mjs +0 -2
  1189. package/dist/chunks/fr-Cg97syqs.mjs.map +0 -1
  1190. package/dist/chunks/fr-CiT36QA9.mjs +0 -2
  1191. package/dist/chunks/fr-CiT36QA9.mjs.map +0 -1
  1192. package/dist/chunks/fr-D3Ho_0MV.mjs +0 -2
  1193. package/dist/chunks/fr-D3Ho_0MV.mjs.map +0 -1
  1194. package/dist/chunks/fr-DA37dDuJ.mjs +0 -2
  1195. package/dist/chunks/fr-DA37dDuJ.mjs.map +0 -1
  1196. package/dist/chunks/fr-DK9dc8bZ.mjs +0 -2
  1197. package/dist/chunks/fr-DK9dc8bZ.mjs.map +0 -1
  1198. package/dist/chunks/fr-DNA_bC6X.mjs +0 -2
  1199. package/dist/chunks/fr-DNA_bC6X.mjs.map +0 -1
  1200. package/dist/chunks/fr-DPXU2MTy.mjs +0 -2
  1201. package/dist/chunks/fr-DPXU2MTy.mjs.map +0 -1
  1202. package/dist/chunks/fr-DZCsB6H7.mjs +0 -2
  1203. package/dist/chunks/fr-DZCsB6H7.mjs.map +0 -1
  1204. package/dist/chunks/fr-Dd8f28BD.mjs +0 -2
  1205. package/dist/chunks/fr-Dd8f28BD.mjs.map +0 -1
  1206. package/dist/chunks/fr-DmCLgc4F.mjs +0 -2
  1207. package/dist/chunks/fr-DmCLgc4F.mjs.map +0 -1
  1208. package/dist/chunks/fr-DtEXB4RG.mjs +0 -2
  1209. package/dist/chunks/fr-DtEXB4RG.mjs.map +0 -1
  1210. package/dist/chunks/fr-FvGvPlqS.mjs +0 -2
  1211. package/dist/chunks/fr-FvGvPlqS.mjs.map +0 -1
  1212. package/dist/chunks/fr-V3LUcmFE.mjs +0 -2
  1213. package/dist/chunks/fr-V3LUcmFE.mjs.map +0 -1
  1214. package/dist/chunks/fr-eiqXGNgf.mjs +0 -2
  1215. package/dist/chunks/fr-eiqXGNgf.mjs.map +0 -1
  1216. package/dist/chunks/fr-fEWGSNI2.mjs +0 -2
  1217. package/dist/chunks/fr-fEWGSNI2.mjs.map +0 -1
  1218. package/dist/chunks/fr-w23c3SBW.mjs +0 -2
  1219. package/dist/chunks/fr-w23c3SBW.mjs.map +0 -1
  1220. package/dist/chunks/full-yocxIDB8.mjs +0 -2
  1221. package/dist/chunks/full-yocxIDB8.mjs.map +0 -1
  1222. package/dist/chunks/hi-4Xqp7mZC.mjs +0 -2
  1223. package/dist/chunks/hi-4Xqp7mZC.mjs.map +0 -1
  1224. package/dist/chunks/hi-8Eu7f89Y.mjs +0 -2
  1225. package/dist/chunks/hi-8Eu7f89Y.mjs.map +0 -1
  1226. package/dist/chunks/hi-BA9PP8mL.mjs +0 -2
  1227. package/dist/chunks/hi-BA9PP8mL.mjs.map +0 -1
  1228. package/dist/chunks/hi-BLCjECcV.mjs +0 -2
  1229. package/dist/chunks/hi-BLCjECcV.mjs.map +0 -1
  1230. package/dist/chunks/hi-BX9P0764.mjs +0 -2
  1231. package/dist/chunks/hi-BX9P0764.mjs.map +0 -1
  1232. package/dist/chunks/hi-BakCaBYh.mjs +0 -2
  1233. package/dist/chunks/hi-BakCaBYh.mjs.map +0 -1
  1234. package/dist/chunks/hi-BoITZeVd.mjs +0 -2
  1235. package/dist/chunks/hi-BoITZeVd.mjs.map +0 -1
  1236. package/dist/chunks/hi-C3BvlTfV.mjs +0 -2
  1237. package/dist/chunks/hi-C3BvlTfV.mjs.map +0 -1
  1238. package/dist/chunks/hi-C5HGb5IH.mjs +0 -2
  1239. package/dist/chunks/hi-C5HGb5IH.mjs.map +0 -1
  1240. package/dist/chunks/hi-CIpo_sTL.mjs +0 -2
  1241. package/dist/chunks/hi-CIpo_sTL.mjs.map +0 -1
  1242. package/dist/chunks/hi-CWRofsw7.mjs +0 -2
  1243. package/dist/chunks/hi-CWRofsw7.mjs.map +0 -1
  1244. package/dist/chunks/hi-C_eipolR.mjs +0 -2
  1245. package/dist/chunks/hi-C_eipolR.mjs.map +0 -1
  1246. package/dist/chunks/hi-ClaAWR5y.mjs +0 -2
  1247. package/dist/chunks/hi-ClaAWR5y.mjs.map +0 -1
  1248. package/dist/chunks/hi-Cn2ywhVT.mjs +0 -2
  1249. package/dist/chunks/hi-Cn2ywhVT.mjs.map +0 -1
  1250. package/dist/chunks/hi-CrsqMuKk.mjs +0 -2
  1251. package/dist/chunks/hi-CrsqMuKk.mjs.map +0 -1
  1252. package/dist/chunks/hi-D-iC4Hvv.mjs +0 -2
  1253. package/dist/chunks/hi-D-iC4Hvv.mjs.map +0 -1
  1254. package/dist/chunks/hi-DEN9a54c.mjs +0 -2
  1255. package/dist/chunks/hi-DEN9a54c.mjs.map +0 -1
  1256. package/dist/chunks/hi-DK9HmINW.mjs +0 -2
  1257. package/dist/chunks/hi-DK9HmINW.mjs.map +0 -1
  1258. package/dist/chunks/hi-DOnHDEqt.mjs +0 -2
  1259. package/dist/chunks/hi-DOnHDEqt.mjs.map +0 -1
  1260. package/dist/chunks/hi-DY0SGobQ.mjs +0 -2
  1261. package/dist/chunks/hi-DY0SGobQ.mjs.map +0 -1
  1262. package/dist/chunks/hi-FSXMWIXU.mjs +0 -2
  1263. package/dist/chunks/hi-FSXMWIXU.mjs.map +0 -1
  1264. package/dist/chunks/hi-JroSY-2k.mjs +0 -2
  1265. package/dist/chunks/hi-JroSY-2k.mjs.map +0 -1
  1266. package/dist/chunks/hi-WDIZzgAJ.mjs +0 -2
  1267. package/dist/chunks/hi-WDIZzgAJ.mjs.map +0 -1
  1268. package/dist/chunks/hi-fLLnVGix.mjs +0 -2
  1269. package/dist/chunks/hi-fLLnVGix.mjs.map +0 -1
  1270. package/dist/chunks/hi-f_MCrd2N.mjs +0 -2
  1271. package/dist/chunks/hi-f_MCrd2N.mjs.map +0 -1
  1272. package/dist/chunks/minimal-BL3kgYy-.mjs +0 -2
  1273. package/dist/chunks/minimal-BL3kgYy-.mjs.map +0 -1
  1274. package/dist/chunks/pt-206lqjCP.mjs +0 -2
  1275. package/dist/chunks/pt-206lqjCP.mjs.map +0 -1
  1276. package/dist/chunks/pt-B5wz6m3c.mjs +0 -2
  1277. package/dist/chunks/pt-B5wz6m3c.mjs.map +0 -1
  1278. package/dist/chunks/pt-B6KMxxw4.mjs +0 -2
  1279. package/dist/chunks/pt-B6KMxxw4.mjs.map +0 -1
  1280. package/dist/chunks/pt-BCg3YzEh.mjs +0 -2
  1281. package/dist/chunks/pt-BCg3YzEh.mjs.map +0 -1
  1282. package/dist/chunks/pt-BFr-zfd2.mjs +0 -2
  1283. package/dist/chunks/pt-BFr-zfd2.mjs.map +0 -1
  1284. package/dist/chunks/pt-BG1fIcHV.mjs +0 -2
  1285. package/dist/chunks/pt-BG1fIcHV.mjs.map +0 -1
  1286. package/dist/chunks/pt-Bhytb-k2.mjs +0 -2
  1287. package/dist/chunks/pt-Bhytb-k2.mjs.map +0 -1
  1288. package/dist/chunks/pt-Bjb6_1gI.mjs +0 -2
  1289. package/dist/chunks/pt-Bjb6_1gI.mjs.map +0 -1
  1290. package/dist/chunks/pt-BzQagqFt.mjs +0 -2
  1291. package/dist/chunks/pt-BzQagqFt.mjs.map +0 -1
  1292. package/dist/chunks/pt-C2rlfcQ4.mjs +0 -2
  1293. package/dist/chunks/pt-C2rlfcQ4.mjs.map +0 -1
  1294. package/dist/chunks/pt-C4xLSFYA.mjs +0 -2
  1295. package/dist/chunks/pt-C4xLSFYA.mjs.map +0 -1
  1296. package/dist/chunks/pt-CBxnU7dE.mjs +0 -2
  1297. package/dist/chunks/pt-CBxnU7dE.mjs.map +0 -1
  1298. package/dist/chunks/pt-CMXLiIJ3.mjs +0 -2
  1299. package/dist/chunks/pt-CMXLiIJ3.mjs.map +0 -1
  1300. package/dist/chunks/pt-Cn2yMIyR.mjs +0 -2
  1301. package/dist/chunks/pt-Cn2yMIyR.mjs.map +0 -1
  1302. package/dist/chunks/pt-DAh8UqJa.mjs +0 -2
  1303. package/dist/chunks/pt-DAh8UqJa.mjs.map +0 -1
  1304. package/dist/chunks/pt-DLe58Npz.mjs +0 -2
  1305. package/dist/chunks/pt-DLe58Npz.mjs.map +0 -1
  1306. package/dist/chunks/pt-D_DXzKyU.mjs +0 -2
  1307. package/dist/chunks/pt-D_DXzKyU.mjs.map +0 -1
  1308. package/dist/chunks/pt-DhC7TYvg.mjs +0 -2
  1309. package/dist/chunks/pt-DhC7TYvg.mjs.map +0 -1
  1310. package/dist/chunks/pt-Dl18NLl1.mjs +0 -2
  1311. package/dist/chunks/pt-Dl18NLl1.mjs.map +0 -1
  1312. package/dist/chunks/pt-Dz2YeCP4.mjs +0 -2
  1313. package/dist/chunks/pt-Dz2YeCP4.mjs.map +0 -1
  1314. package/dist/chunks/pt-GfM-nxvv.mjs +0 -2
  1315. package/dist/chunks/pt-GfM-nxvv.mjs.map +0 -1
  1316. package/dist/chunks/pt-PjsDW8WW.mjs +0 -2
  1317. package/dist/chunks/pt-PjsDW8WW.mjs.map +0 -1
  1318. package/dist/chunks/pt-X-M5uPLn.mjs +0 -2
  1319. package/dist/chunks/pt-X-M5uPLn.mjs.map +0 -1
  1320. package/dist/chunks/pt-appBsYpC.mjs +0 -2
  1321. package/dist/chunks/pt-appBsYpC.mjs.map +0 -1
  1322. package/dist/chunks/pt-i9ZFEE69.mjs +0 -2
  1323. package/dist/chunks/pt-i9ZFEE69.mjs.map +0 -1
  1324. package/dist/chunks/ru-B8HSQCj5.mjs +0 -2
  1325. package/dist/chunks/ru-B8HSQCj5.mjs.map +0 -1
  1326. package/dist/chunks/ru-BAOr7UOh.mjs +0 -2
  1327. package/dist/chunks/ru-BAOr7UOh.mjs.map +0 -1
  1328. package/dist/chunks/ru-BIV3iuR9.mjs +0 -2
  1329. package/dist/chunks/ru-BIV3iuR9.mjs.map +0 -1
  1330. package/dist/chunks/ru-BMJRGir6.mjs +0 -2
  1331. package/dist/chunks/ru-BMJRGir6.mjs.map +0 -1
  1332. package/dist/chunks/ru-BO59Tir1.mjs +0 -2
  1333. package/dist/chunks/ru-BO59Tir1.mjs.map +0 -1
  1334. package/dist/chunks/ru-BRnZSWPo.mjs +0 -2
  1335. package/dist/chunks/ru-BRnZSWPo.mjs.map +0 -1
  1336. package/dist/chunks/ru-Bf546sX_.mjs +0 -2
  1337. package/dist/chunks/ru-Bf546sX_.mjs.map +0 -1
  1338. package/dist/chunks/ru-Bfjq7sha.mjs +0 -2
  1339. package/dist/chunks/ru-Bfjq7sha.mjs.map +0 -1
  1340. package/dist/chunks/ru-Bm8utWf9.mjs +0 -2
  1341. package/dist/chunks/ru-Bm8utWf9.mjs.map +0 -1
  1342. package/dist/chunks/ru-BmneOLgh.mjs +0 -2
  1343. package/dist/chunks/ru-BmneOLgh.mjs.map +0 -1
  1344. package/dist/chunks/ru-Byrj1o3C.mjs +0 -2
  1345. package/dist/chunks/ru-Byrj1o3C.mjs.map +0 -1
  1346. package/dist/chunks/ru-C8ftQh9b.mjs +0 -2
  1347. package/dist/chunks/ru-C8ftQh9b.mjs.map +0 -1
  1348. package/dist/chunks/ru-CNjcfDD9.mjs +0 -2
  1349. package/dist/chunks/ru-CNjcfDD9.mjs.map +0 -1
  1350. package/dist/chunks/ru-Ccya5aSC.mjs +0 -2
  1351. package/dist/chunks/ru-Ccya5aSC.mjs.map +0 -1
  1352. package/dist/chunks/ru-Cd-mH9wa.mjs +0 -2
  1353. package/dist/chunks/ru-Cd-mH9wa.mjs.map +0 -1
  1354. package/dist/chunks/ru-CeZe9jTZ.mjs +0 -2
  1355. package/dist/chunks/ru-CeZe9jTZ.mjs.map +0 -1
  1356. package/dist/chunks/ru-Cl03u8Q0.mjs +0 -2
  1357. package/dist/chunks/ru-Cl03u8Q0.mjs.map +0 -1
  1358. package/dist/chunks/ru-CoCIIElm.mjs +0 -2
  1359. package/dist/chunks/ru-CoCIIElm.mjs.map +0 -1
  1360. package/dist/chunks/ru-CzUyZZmy.mjs +0 -2
  1361. package/dist/chunks/ru-CzUyZZmy.mjs.map +0 -1
  1362. package/dist/chunks/ru-D3fRdonc.mjs +0 -2
  1363. package/dist/chunks/ru-D3fRdonc.mjs.map +0 -1
  1364. package/dist/chunks/ru-Ddy9ONaX.mjs +0 -2
  1365. package/dist/chunks/ru-Ddy9ONaX.mjs.map +0 -1
  1366. package/dist/chunks/ru-Dgcyz845.mjs +0 -2
  1367. package/dist/chunks/ru-Dgcyz845.mjs.map +0 -1
  1368. package/dist/chunks/ru-DnIXvlfL.mjs +0 -2
  1369. package/dist/chunks/ru-DnIXvlfL.mjs.map +0 -1
  1370. package/dist/chunks/ru-DyBnSwCM.mjs +0 -2
  1371. package/dist/chunks/ru-DyBnSwCM.mjs.map +0 -1
  1372. package/dist/chunks/ru-i27SgAts.mjs +0 -2
  1373. package/dist/chunks/ru-i27SgAts.mjs.map +0 -1
  1374. package/dist/chunks/src-DfK2_MVH.mjs +0 -2
  1375. package/dist/chunks/src-DfK2_MVH.mjs.map +0 -1
  1376. package/dist/chunks/zh-6QoY3dY_.mjs +0 -2
  1377. package/dist/chunks/zh-6QoY3dY_.mjs.map +0 -1
  1378. package/dist/chunks/zh-9WLieF9N.mjs +0 -2
  1379. package/dist/chunks/zh-9WLieF9N.mjs.map +0 -1
  1380. package/dist/chunks/zh-B0VaFyeQ.mjs +0 -2
  1381. package/dist/chunks/zh-B0VaFyeQ.mjs.map +0 -1
  1382. package/dist/chunks/zh-B4pfqHD3.mjs +0 -2
  1383. package/dist/chunks/zh-B4pfqHD3.mjs.map +0 -1
  1384. package/dist/chunks/zh-BpaN1Nmc.mjs +0 -2
  1385. package/dist/chunks/zh-BpaN1Nmc.mjs.map +0 -1
  1386. package/dist/chunks/zh-BqCL2eZf.mjs +0 -2
  1387. package/dist/chunks/zh-BqCL2eZf.mjs.map +0 -1
  1388. package/dist/chunks/zh-Bvgb-e4z.mjs +0 -2
  1389. package/dist/chunks/zh-Bvgb-e4z.mjs.map +0 -1
  1390. package/dist/chunks/zh-C2by0u64.mjs +0 -2
  1391. package/dist/chunks/zh-C2by0u64.mjs.map +0 -1
  1392. package/dist/chunks/zh-C4Ia0Zrx.mjs +0 -2
  1393. package/dist/chunks/zh-C4Ia0Zrx.mjs.map +0 -1
  1394. package/dist/chunks/zh-CBHCLph7.mjs +0 -2
  1395. package/dist/chunks/zh-CBHCLph7.mjs.map +0 -1
  1396. package/dist/chunks/zh-CBJQlvWb.mjs +0 -2
  1397. package/dist/chunks/zh-CBJQlvWb.mjs.map +0 -1
  1398. package/dist/chunks/zh-CBNSrvly.mjs +0 -2
  1399. package/dist/chunks/zh-CBNSrvly.mjs.map +0 -1
  1400. package/dist/chunks/zh-CKEh4EwR.mjs +0 -2
  1401. package/dist/chunks/zh-CKEh4EwR.mjs.map +0 -1
  1402. package/dist/chunks/zh-CN8KiZ9v.mjs +0 -2
  1403. package/dist/chunks/zh-CN8KiZ9v.mjs.map +0 -1
  1404. package/dist/chunks/zh-CRJMQ4dT.mjs +0 -2
  1405. package/dist/chunks/zh-CRJMQ4dT.mjs.map +0 -1
  1406. package/dist/chunks/zh-CSg0qxe0.mjs +0 -2
  1407. package/dist/chunks/zh-CSg0qxe0.mjs.map +0 -1
  1408. package/dist/chunks/zh-CX7Bx0ia.mjs +0 -2
  1409. package/dist/chunks/zh-CX7Bx0ia.mjs.map +0 -1
  1410. package/dist/chunks/zh-CvlL1G9n.mjs +0 -2
  1411. package/dist/chunks/zh-CvlL1G9n.mjs.map +0 -1
  1412. package/dist/chunks/zh-DBKn0pzM.mjs +0 -2
  1413. package/dist/chunks/zh-DBKn0pzM.mjs.map +0 -1
  1414. package/dist/chunks/zh-DLOng8d-.mjs +0 -2
  1415. package/dist/chunks/zh-DLOng8d-.mjs.map +0 -1
  1416. package/dist/chunks/zh-DLVkXfcI.mjs +0 -2
  1417. package/dist/chunks/zh-DLVkXfcI.mjs.map +0 -1
  1418. package/dist/chunks/zh-DuaKGwyq.mjs +0 -2
  1419. package/dist/chunks/zh-DuaKGwyq.mjs.map +0 -1
  1420. package/dist/chunks/zh-KUnAhArn.mjs +0 -2
  1421. package/dist/chunks/zh-KUnAhArn.mjs.map +0 -1
  1422. package/dist/chunks/zh-wVp_7rfC.mjs +0 -2
  1423. package/dist/chunks/zh-wVp_7rfC.mjs.map +0 -1
  1424. package/dist/chunks/zh-z2wm3EA5.mjs +0 -2
  1425. package/dist/chunks/zh-z2wm3EA5.mjs.map +0 -1
  1426. package/dist/input/InternalClipboard.d.ts +0 -13
  1427. package/dist/input/InternalClipboard.d.ts.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PrintTypes-DA0Cc--M.mjs","names":[],"sources":["../../src/editor/theme/ThemeTokens.ts","../../src/editor/theme/ThemeEngine.ts","../../src/model/PaperSize.ts","../../src/plugins/print/PrintTypes.ts"],"sourcesContent":["/**\n * Theme token types, built-in themes, and theme creation helpers.\n */\n\nimport type { SyntaxTokenType, TokenStyleValue } from './SyntaxTokenTypes.js';\nimport { resolveTokenColor } from './SyntaxTokenTypes.js';\n\n/** Primitive color palette a theme defines. */\nexport interface ThemePrimitives {\n\treadonly background: string;\n\treadonly foreground: string;\n\treadonly mutedForeground: string;\n\treadonly border: string;\n\treadonly borderFocus: string;\n\treadonly primary: string;\n\treadonly primaryForeground: string;\n\treadonly primaryMuted: string;\n\treadonly surfaceRaised: string;\n\treadonly surfaceOverlay: string;\n\treadonly hoverBackground: string;\n\treadonly activeBackground: string;\n\treadonly danger: string;\n\treadonly dangerMuted: string;\n\treadonly success: string;\n\treadonly shadow: string;\n\treadonly focusRing: string;\n}\n\n/** Component-level toolbar overrides. */\nexport interface ThemeToolbar {\n\treadonly background: string;\n\treadonly borderColor: string;\n}\n\n/** Syntax highlighting token styles — one entry per canonical token type. */\nexport type ThemeSyntax = { readonly [K in SyntaxTokenType]: TokenStyleValue };\n\n/** Component-level code block overrides. */\nexport interface ThemeCodeBlock {\n\treadonly background: string;\n\treadonly foreground: string;\n\treadonly headerBackground: string;\n\treadonly headerForeground: string;\n\treadonly headerBorder: string;\n\treadonly syntax?: ThemeSyntax;\n}\n\n/** Component-level inline code overrides. */\nexport interface ThemeInlineCode {\n\treadonly background: string;\n\treadonly foreground: string;\n}\n\n/** Component-level tooltip overrides. */\nexport interface ThemeTooltip {\n\treadonly background: string;\n\treadonly foreground: string;\n}\n\n/** Full theme definition. */\nexport interface Theme {\n\treadonly name: string;\n\treadonly primitives: ThemePrimitives;\n\treadonly toolbar?: Partial<ThemeToolbar>;\n\treadonly inlineCode?: Partial<ThemeInlineCode>;\n\treadonly codeBlock?: Partial<ThemeCodeBlock>;\n\treadonly tooltip?: Partial<ThemeTooltip>;\n}\n\n/** Partial custom theme — deeply partial for creating overrides. */\nexport interface PartialTheme {\n\treadonly name: string;\n\treadonly primitives?: Partial<ThemePrimitives>;\n\treadonly toolbar?: Partial<ThemeToolbar>;\n\treadonly inlineCode?: Partial<ThemeInlineCode>;\n\treadonly codeBlock?: Partial<Omit<ThemeCodeBlock, 'syntax'>> & {\n\t\treadonly syntax?: Partial<ThemeSyntax>;\n\t};\n\treadonly tooltip?: Partial<ThemeTooltip>;\n}\n\n/** Built-in theme presets. */\nexport const ThemePreset = {\n\tLight: 'light',\n\tDark: 'dark',\n\tSystem: 'system',\n} as const;\nexport type ThemePreset = (typeof ThemePreset)[keyof typeof ThemePreset];\n\n/** Built-in light theme. */\nexport const LIGHT_THEME: Theme = {\n\tname: 'light',\n\tprimitives: {\n\t\tbackground: '#ffffff',\n\t\tforeground: '#1a1a1a',\n\t\tmutedForeground: '#666666',\n\t\tborder: '#d0d0d0',\n\t\tborderFocus: '#4a90d9',\n\t\tprimary: '#4a90d9',\n\t\tprimaryForeground: '#1a5fa0',\n\t\tprimaryMuted: '#d0e0f0',\n\t\tsurfaceRaised: '#f8f8f8',\n\t\tsurfaceOverlay: '#ffffff',\n\t\thoverBackground: '#e8e8e8',\n\t\tactiveBackground: '#d0e0f0',\n\t\tdanger: '#dc2626',\n\t\tdangerMuted: '#fee2e2',\n\t\tsuccess: '#1a8c1a',\n\t\tshadow: 'rgba(0, 0, 0, 0.15)',\n\t\tfocusRing: 'rgba(74, 144, 217, 0.2)',\n\t},\n\tinlineCode: {\n\t\tbackground: '#edf0f5',\n\t\tforeground: '#334155',\n\t},\n\tcodeBlock: {\n\t\tbackground: '#f8fafc',\n\t\tforeground: '#334155',\n\t\theaderBackground: '#f1f5f9',\n\t\theaderForeground: '#64748b',\n\t\theaderBorder: '#e2e8f0',\n\t\tsyntax: {\n\t\t\tkeyword: '#d73a49',\n\t\t\tstring: '#032f62',\n\t\t\tcomment: { color: '#6a737d', fontStyle: 'italic' },\n\t\t\tnumber: '#005cc5',\n\t\t\tfunction: '#6f42c1',\n\t\t\toperator: '#d73a49',\n\t\t\tpunctuation: '#24292e',\n\t\t\tboolean: '#005cc5',\n\t\t\tnull: '#005cc5',\n\t\t\tproperty: '#005cc5',\n\t\t\ttype: '#e36209',\n\t\t\tannotation: '#6f42c1',\n\t\t\ttag: '#22863a',\n\t\t\tattribute: '#6f42c1',\n\t\t\tconstant: '#005cc5',\n\t\t\tregex: '#032f62',\n\t\t},\n\t},\n\ttooltip: {\n\t\tbackground: '#1a1a1a',\n\t\tforeground: '#ffffff',\n\t},\n};\n\n/** Built-in dark theme. */\nexport const DARK_THEME: Theme = {\n\tname: 'dark',\n\tprimitives: {\n\t\tbackground: '#1e1e2e',\n\t\tforeground: '#cdd6f4',\n\t\tmutedForeground: '#7f849c',\n\t\tborder: '#45475a',\n\t\tborderFocus: '#89b4fa',\n\t\tprimary: '#89b4fa',\n\t\tprimaryForeground: '#89b4fa',\n\t\tprimaryMuted: 'rgba(137, 180, 250, 0.15)',\n\t\tsurfaceRaised: '#313244',\n\t\tsurfaceOverlay: '#313244',\n\t\thoverBackground: '#45475a',\n\t\tactiveBackground: 'rgba(137, 180, 250, 0.15)',\n\t\tdanger: '#f38ba8',\n\t\tdangerMuted: 'rgba(243, 139, 168, 0.15)',\n\t\tsuccess: '#a6e3a1',\n\t\tshadow: 'rgba(0, 0, 0, 0.4)',\n\t\tfocusRing: 'rgba(137, 180, 250, 0.25)',\n\t},\n\tinlineCode: {\n\t\tbackground: '#313244',\n\t\tforeground: '#cdd6f4',\n\t},\n\tcodeBlock: {\n\t\tbackground: '#313244',\n\t\tforeground: '#cdd6f4',\n\t\theaderBackground: '#45475a',\n\t\theaderForeground: '#bac2de',\n\t\theaderBorder: '#585b70',\n\t\tsyntax: {\n\t\t\tkeyword: '#cba6f7',\n\t\t\tstring: '#a6e3a1',\n\t\t\tcomment: { color: '#9399b2', fontStyle: 'italic' },\n\t\t\tnumber: '#fab387',\n\t\t\tfunction: '#89b4fa',\n\t\t\toperator: '#89dceb',\n\t\t\tpunctuation: '#bac2de',\n\t\t\tboolean: '#fab387',\n\t\t\tnull: '#f38ba8',\n\t\t\tproperty: '#89b4fa',\n\t\t\ttype: '#fab387',\n\t\t\tannotation: '#cba6f7',\n\t\t\ttag: '#a6e3a1',\n\t\t\tattribute: '#89b4fa',\n\t\t\tconstant: '#f9e2af',\n\t\t\tregex: '#a6e3a1',\n\t\t},\n\t},\n\ttooltip: {\n\t\tbackground: '#585b70',\n\t\tforeground: '#cdd6f4',\n\t},\n};\n\n/** Creates a custom theme by extending a base theme with partial overrides. */\nexport function createTheme(base: Theme, overrides: PartialTheme): Theme {\n\tconst mergeSyntax = (): ThemeSyntax | undefined => {\n\t\tif (!overrides.codeBlock?.syntax) return base.codeBlock?.syntax;\n\t\tif (!base.codeBlock?.syntax) return undefined;\n\t\treturn { ...base.codeBlock.syntax, ...overrides.codeBlock.syntax } as ThemeSyntax;\n\t};\n\n\treturn {\n\t\tname: overrides.name,\n\t\tprimitives: { ...base.primitives, ...overrides.primitives },\n\t\ttoolbar: overrides.toolbar ? { ...base.toolbar, ...overrides.toolbar } : base.toolbar,\n\t\tinlineCode: overrides.inlineCode\n\t\t\t? { ...base.inlineCode, ...overrides.inlineCode }\n\t\t\t: base.inlineCode,\n\t\tcodeBlock: overrides.codeBlock\n\t\t\t? {\n\t\t\t\t\t...base.codeBlock,\n\t\t\t\t\t...overrides.codeBlock,\n\t\t\t\t\tsyntax: mergeSyntax(),\n\t\t\t\t}\n\t\t\t: base.codeBlock,\n\t\ttooltip: overrides.tooltip ? { ...base.tooltip, ...overrides.tooltip } : base.tooltip,\n\t};\n}\n\n// Re-export for convenience — avoids extra imports in consumer code.\nexport { resolveTokenColor };\n\n/** Resolves a ThemePreset string or Theme object to a full Theme. */\nexport function resolveTheme(theme: ThemePreset | Theme): Theme {\n\tif (typeof theme === 'object') return theme;\n\tswitch (theme) {\n\t\tcase ThemePreset.Light:\n\t\t\treturn LIGHT_THEME;\n\t\tcase ThemePreset.Dark:\n\t\t\treturn DARK_THEME;\n\t\tcase ThemePreset.System:\n\t\t\t// System is resolved externally via matchMedia; default to light.\n\t\t\treturn LIGHT_THEME;\n\t\tdefault:\n\t\t\treturn LIGHT_THEME;\n\t}\n}\n","/**\n * Theme engine — converts a Theme object into CSS custom properties.\n */\n\nimport {\n\tSYNTAX_TOKEN_TYPES,\n\tresolveTokenColor,\n\tresolveTokenFontStyle,\n\tresolveTokenFontWeight,\n} from './SyntaxTokenTypes.js';\nimport type { TokenStyleValue } from './SyntaxTokenTypes.js';\nimport type { Theme, ThemeSyntax } from './ThemeTokens.js';\n\n// --- Static entries (non-syntax) ---\n\nconst STATIC_ENTRIES: ReadonlyArray<readonly [string, string]> = [\n\t// Primitives\n\t['primitives.background', '--notectl-bg'],\n\t['primitives.foreground', '--notectl-fg'],\n\t['primitives.mutedForeground', '--notectl-fg-muted'],\n\t['primitives.border', '--notectl-border'],\n\t['primitives.borderFocus', '--notectl-border-focus'],\n\t['primitives.primary', '--notectl-primary'],\n\t['primitives.primaryForeground', '--notectl-primary-fg'],\n\t['primitives.primaryMuted', '--notectl-primary-muted'],\n\t['primitives.surfaceRaised', '--notectl-surface-raised'],\n\t['primitives.surfaceOverlay', '--notectl-surface-overlay'],\n\t['primitives.hoverBackground', '--notectl-hover-bg'],\n\t['primitives.activeBackground', '--notectl-active-bg'],\n\t['primitives.danger', '--notectl-danger'],\n\t['primitives.dangerMuted', '--notectl-danger-muted'],\n\t['primitives.success', '--notectl-success'],\n\t['primitives.shadow', '--notectl-shadow'],\n\t['primitives.focusRing', '--notectl-focus-ring'],\n\t// Component: toolbar\n\t['toolbar.background', '--notectl-toolbar-bg'],\n\t['toolbar.borderColor', '--notectl-toolbar-border'],\n\t// Component: inlineCode\n\t['inlineCode.background', '--notectl-code-bg'],\n\t['inlineCode.foreground', '--notectl-code-color'],\n\t// Component: codeBlock (non-syntax)\n\t['codeBlock.background', '--notectl-code-block-bg'],\n\t['codeBlock.foreground', '--notectl-code-block-color'],\n\t['codeBlock.headerBackground', '--notectl-code-block-header-bg'],\n\t['codeBlock.headerForeground', '--notectl-code-block-header-color'],\n\t['codeBlock.headerBorder', '--notectl-code-block-header-border'],\n\t// Component: tooltip\n\t['tooltip.background', '--notectl-tooltip-bg'],\n\t['tooltip.foreground', '--notectl-tooltip-fg'],\n];\n\n// --- Generated syntax variable map (derived from SYNTAX_TOKEN_TYPES) ---\n\nconst SYNTAX_VARIABLE_MAP: ReadonlyArray<readonly [string, string]> = SYNTAX_TOKEN_TYPES.map(\n\t(type) => [`codeBlock.syntax.${type}`, `--notectl-code-token-${type}`] as const,\n);\n\n/** Full variable map: static entries + syntax entries. */\nconst VARIABLE_MAP: ReadonlyArray<readonly [string, string]> = [\n\t...STATIC_ENTRIES,\n\t...SYNTAX_VARIABLE_MAP,\n];\n\n// --- Static fallbacks (non-syntax) ---\n\nconst STATIC_FALLBACKS: ReadonlyArray<readonly [string, string]> = [\n\t['--notectl-toolbar-bg', 'var(--notectl-surface-raised)'],\n\t['--notectl-toolbar-border', 'var(--notectl-border)'],\n\t['--notectl-code-bg', 'var(--notectl-surface-raised)'],\n\t['--notectl-code-color', 'var(--notectl-fg)'],\n\t['--notectl-code-block-bg', 'var(--notectl-surface-raised)'],\n\t['--notectl-code-block-color', 'var(--notectl-fg)'],\n\t['--notectl-code-block-header-bg', 'var(--notectl-surface-raised)'],\n\t['--notectl-code-block-header-color', 'var(--notectl-fg-muted)'],\n\t['--notectl-code-block-header-border', 'var(--notectl-border)'],\n\t['--notectl-tooltip-bg', 'var(--notectl-fg)'],\n\t['--notectl-tooltip-fg', 'var(--notectl-bg)'],\n];\n\n// --- Generated syntax fallbacks (derived from SYNTAX_TOKEN_TYPES) ---\n\nconst SYNTAX_FALLBACKS: ReadonlyArray<readonly [string, string]> = SYNTAX_TOKEN_TYPES.map(\n\t(type) => [`--notectl-code-token-${type}`, 'var(--notectl-code-block-color)'] as const,\n);\n\n/** Fallbacks for component tokens when not explicitly set. */\nconst COMPONENT_FALLBACKS: ReadonlyMap<string, string> = new Map([\n\t...STATIC_FALLBACKS,\n\t...SYNTAX_FALLBACKS,\n]);\n\n/** Resolves a dotted path like 'primitives.background' from a Theme. */\nfunction resolvePath(theme: Theme, path: string): string | undefined {\n\tconst parts: string[] = path.split('.');\n\tlet current: unknown = theme;\n\tfor (const part of parts) {\n\t\tif (current === undefined || current === null) return undefined;\n\t\tif (typeof current !== 'object') return undefined;\n\t\tcurrent = (current as Record<string, unknown>)[part];\n\t}\n\tif (typeof current === 'string') return current;\n\tif (typeof current === 'object' && current !== null && 'color' in current) {\n\t\treturn resolveTokenColor(current as TokenStyleValue);\n\t}\n\treturn undefined;\n}\n\n/** Emits font-style/font-weight CSS vars for syntax tokens that use TokenStyle objects. */\nfunction emitTokenStyleVars(syntax: ThemeSyntax, lines: string[]): void {\n\tfor (const type of SYNTAX_TOKEN_TYPES) {\n\t\tconst value: TokenStyleValue = syntax[type];\n\t\tif (typeof value !== 'object') continue;\n\n\t\tconst fontStyle: string | undefined = resolveTokenFontStyle(value);\n\t\tif (fontStyle) {\n\t\t\tlines.push(`\\t--notectl-code-token-${type}-font-style: ${fontStyle};`);\n\t\t}\n\t\tconst fontWeight: string | undefined = resolveTokenFontWeight(value);\n\t\tif (fontWeight) {\n\t\t\tlines.push(`\\t--notectl-code-token-${type}-font-weight: ${fontWeight};`);\n\t\t}\n\t}\n}\n\n/** Generates CSS text with all theme custom properties on :host. */\nexport function generateThemeCSS(theme: Theme): string {\n\tconst lines: string[] = [':host {'];\n\n\tfor (const [path, cssVar] of VARIABLE_MAP) {\n\t\tconst value: string | undefined = resolvePath(theme, path);\n\t\tif (value !== undefined) {\n\t\t\tlines.push(`\\t${cssVar}: ${value};`);\n\t\t} else {\n\t\t\tconst fallback: string | undefined = COMPONENT_FALLBACKS.get(cssVar);\n\t\t\tif (fallback) {\n\t\t\t\tlines.push(`\\t${cssVar}: ${fallback};`);\n\t\t\t}\n\t\t}\n\t}\n\n\t// Emit font-style / font-weight vars for TokenStyle entries\n\tif (theme.codeBlock?.syntax) {\n\t\temitTokenStyleVars(theme.codeBlock.syntax, lines);\n\t}\n\n\tlines.push('}');\n\treturn lines.join('\\n');\n}\n\n/** Creates a CSSStyleSheet populated with theme CSS variables. */\nexport function createThemeStyleSheet(theme: Theme): CSSStyleSheet {\n\tconst sheet: CSSStyleSheet = new CSSStyleSheet();\n\tsheet.replaceSync(generateThemeCSS(theme));\n\treturn sheet;\n}\n","/**\n * Paper size definitions and dimension helpers.\n * Used by PaperLayoutController for WYSIWYG page layout\n * and by PrintStyleCollector for @page CSS rules.\n */\n\n/** Conversion factor: 1mm = 96/25.4 px at CSS reference pixel (96 DPI). */\nconst MM_TO_PX: number = 96 / 25.4;\n\n/** Physical dimensions of a paper size. */\nexport interface PaperDimensions {\n\treadonly widthMm: number;\n\treadonly heightMm: number;\n\treadonly widthPx: number;\n\treadonly heightPx: number;\n}\n\n/** Available paper size presets. */\nexport const PaperSize = {\n\tDINA4: 'din-a4',\n\tDINA5: 'din-a5',\n\tUSLetter: 'us-letter',\n\tUSLegal: 'us-legal',\n} as const;\nexport type PaperSize = (typeof PaperSize)[keyof typeof PaperSize];\n\n/** Rounds to nearest integer for pixel dimensions. */\nfunction mmToPx(mm: number): number {\n\treturn Math.round(mm * MM_TO_PX);\n}\n\n/** Lookup table for paper dimensions. */\nconst PAPER_DIMENSIONS: ReadonlyMap<PaperSize, PaperDimensions> = new Map<\n\tPaperSize,\n\tPaperDimensions\n>([\n\t[PaperSize.DINA4, { widthMm: 210, heightMm: 297, widthPx: mmToPx(210), heightPx: mmToPx(297) }],\n\t[PaperSize.DINA5, { widthMm: 148, heightMm: 210, widthPx: mmToPx(148), heightPx: mmToPx(210) }],\n\t[\n\t\tPaperSize.USLetter,\n\t\t{ widthMm: 215.9, heightMm: 279.4, widthPx: mmToPx(215.9), heightPx: mmToPx(279.4) },\n\t],\n\t[\n\t\tPaperSize.USLegal,\n\t\t{ widthMm: 215.9, heightMm: 355.6, widthPx: mmToPx(215.9), heightPx: mmToPx(355.6) },\n\t],\n]);\n\n/** CSS @page size keywords for each paper size. */\nconst CSS_SIZE_KEYWORDS: ReadonlyMap<PaperSize, string> = new Map<PaperSize, string>([\n\t[PaperSize.DINA4, 'A4'],\n\t[PaperSize.DINA5, 'A5'],\n\t[PaperSize.USLetter, 'letter'],\n\t[PaperSize.USLegal, 'legal'],\n]);\n\n/** Returns the physical and pixel dimensions for a paper size. */\nexport function getPaperDimensions(size: PaperSize): PaperDimensions {\n\tconst dims: PaperDimensions | undefined = PAPER_DIMENSIONS.get(size);\n\tif (!dims) {\n\t\tthrow new Error(`Unknown paper size: ${size}`);\n\t}\n\treturn dims;\n}\n\n/**\n * Document margin constants for paper mode (in px).\n * These define the content padding inside the paper surface in the editor,\n * and become @page margins in print output to ensure WYSIWYG fidelity.\n */\nexport const PAPER_MARGIN_TOP_PX: number = 48;\nexport const PAPER_MARGIN_HORIZONTAL_PX: number = 56;\nexport const PAPER_VIEWPORT_PADDING_PX: number = 24;\n\n/** Type guard: returns true if the value is a valid PaperSize string. */\nexport function isValidPaperSize(value: string): value is PaperSize {\n\treturn (Object.values(PaperSize) as string[]).includes(value);\n}\n\n/** Returns the CSS @page size keyword (e.g. 'A4', 'letter') for a paper size. */\nexport function getPaperCSSSize(size: PaperSize): string {\n\tconst keyword: string | undefined = CSS_SIZE_KEYWORDS.get(size);\n\tif (!keyword) {\n\t\tthrow new Error(`Unknown paper size: ${size}`);\n\t}\n\treturn keyword;\n}\n","/**\n * Type definitions, service keys, and event keys for the PrintPlugin.\n */\n\nimport type { PaperSize } from '../../model/PaperSize.js';\nimport type { NodeTypeName } from '../../model/TypeBrands.js';\nimport { EventKey, ServiceKey } from '../Plugin.js';\n\n// --- Print Options ---\n\nexport interface PrintOptions {\n\t/** Page title shown in the browser print header. */\n\treadonly title?: string;\n\n\t/** Additional CSS appended to the print stylesheet. */\n\treadonly customCSS?: string;\n\n\t/**\n\t * Header HTML inserted once at the top of the print document.\n\t * For repeating per-page headers, use toHTML() with server-side PDF generation.\n\t */\n\treadonly header?: string | (() => string);\n\n\t/**\n\t * Footer HTML inserted once at the bottom of the print document.\n\t * For repeating per-page footers, use toHTML() with server-side PDF generation.\n\t */\n\treadonly footer?: string | (() => string);\n\n\t/** Page margins as CSS value (e.g. '2cm'). */\n\treadonly margin?: string;\n\n\t/** Force page break before these block types. */\n\treadonly pageBreakBefore?: readonly NodeTypeName[];\n\n\t/** Exclude these block types from print output. */\n\treadonly excludeBlockTypes?: readonly NodeTypeName[];\n\n\t/**\n\t * Whether to preserve background colors and images in print output.\n\t * Defaults to `true` (WYSIWYG). Set to `false` to let the browser strip\n\t * backgrounds (e.g. to save ink).\n\t */\n\treadonly printBackground?: boolean;\n\n\t/**\n\t * Force light theme tokens in print output for readability on paper.\n\t * Defaults to `true`. Set to `false` to print with the current editor theme.\n\t */\n\treadonly forceLightTheme?: boolean;\n\n\t/** Page orientation. */\n\treadonly orientation?: 'portrait' | 'landscape';\n\n\t/** Paper size for @page CSS rule. When set, overrides the default A4 page size. */\n\treadonly paperSize?: PaperSize;\n}\n\n// --- Plugin Configuration ---\n\nexport interface PrintPluginConfig {\n\t/** Default options applied to every print() call. */\n\treadonly defaults?: PrintOptions;\n\n\t/** Keyboard shortcut (default: 'Mod-P'). */\n\treadonly keyBinding?: string;\n\n\t/** Show toolbar button (default: true). */\n\treadonly showToolbarItem?: boolean;\n\n\t/** Locale override for user-facing strings. */\n\treadonly locale?: import('./PrintLocale.js').PrintLocale;\n}\n\n// --- Service Interface ---\n\nexport interface PrintService {\n\t/** Prints the editor content with optional configuration. */\n\tprint(options?: PrintOptions): void;\n\n\t/** Generates print-ready HTML as a complete document string. */\n\ttoHTML(options?: PrintOptions): string;\n}\n\n// --- Service & Event Keys ---\n\nexport const PRINT_SERVICE_KEY: ServiceKey<PrintService> = new ServiceKey<PrintService>('print');\n\nexport const BEFORE_PRINT: EventKey<BeforePrintEvent> = new EventKey<BeforePrintEvent>(\n\t'print:before',\n);\n\nexport const AFTER_PRINT: EventKey<AfterPrintEvent> = new EventKey<AfterPrintEvent>('print:after');\n\n// --- Event Payloads ---\n\nexport interface BeforePrintEvent {\n\t/** Options can be mutated — EventBus passes by reference. */\n\toptions: PrintOptions;\n\t/** Set to true to cancel the print. */\n\tcancelled: boolean;\n}\n\nexport interface AfterPrintEvent {\n\t/** The generated HTML (read-only). */\n\treadonly html: string;\n}\n"],"mappings":"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"}
@@ -0,0 +1,2 @@
1
+ import{f as o}from"./Document-znhIcvM9.mjs";function t(o,t,n){const f=o.getBlockOrder(),c=f.indexOf(t.from.blockId),e=f.indexOf(t.to.blockId);for(let r=c;r<=e;r++){const o=f[r];o&&n(o)}}function n(t,n,f){const c=t.getBlockOrder(),e=c.indexOf(n.from.blockId),r=c.indexOf(n.to.blockId);for(let s=e;s<=r;s++){const i=c[s];if(!i)continue;const d=t.getBlock(i);if(!d)continue;const l=s===e?n.from.offset:0,k=s===r?n.to.offset:o(d);l!==k&&f(i,l,k)}}export{n,t};
2
+ //# sourceMappingURL=RangeIterator-Cl4_k8cx.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RangeIterator-Cl4_k8cx.mjs","names":[],"sources":["../../src/commands/RangeIterator.ts"],"sourcesContent":["/**\n * Utility for iterating over blocks within a selection range.\n *\n * Extracted from Commands.ts to break circular dependencies:\n * Commands.ts re-exports from MarkCommands.ts / AttributedMarkCommands.ts,\n * which in turn import forEachBlockInRange from Commands.ts.\n */\n\nimport { getBlockLength } from '../model/Document.js';\nimport type { SelectionRange } from '../model/Selection.js';\nimport type { BlockId } from '../model/TypeBrands.js';\nimport type { EditorState } from '../state/EditorState.js';\n\n/**\n * Iterates over every block ID in the given selection range, including\n * empty blocks and boundary blocks regardless of offset span.\n * Designed for block-level operations (e.g. setBlockType) where offsets are irrelevant.\n */\nexport function forEachBlockIdInRange(\n\tstate: EditorState,\n\trange: SelectionRange,\n\tcallback: (blockId: BlockId) => void,\n): void {\n\tconst blockOrder: readonly BlockId[] = state.getBlockOrder();\n\tconst fromIdx: number = blockOrder.indexOf(range.from.blockId);\n\tconst toIdx: number = blockOrder.indexOf(range.to.blockId);\n\n\tfor (let i: number = fromIdx; i <= toIdx; i++) {\n\t\tconst blockId: BlockId | undefined = blockOrder[i];\n\t\tif (!blockId) continue;\n\t\tcallback(blockId);\n\t}\n}\n\n/**\n * Iterates over each block in the given selection range, invoking the callback\n * with the block ID, per-block start offset, and per-block end offset.\n * Blocks where `from === to` are skipped automatically.\n */\nexport function forEachBlockInRange(\n\tstate: EditorState,\n\trange: SelectionRange,\n\tcallback: (blockId: BlockId, from: number, to: number) => void,\n): void {\n\tconst blockOrder: readonly BlockId[] = state.getBlockOrder();\n\tconst fromIdx: number = blockOrder.indexOf(range.from.blockId);\n\tconst toIdx: number = blockOrder.indexOf(range.to.blockId);\n\n\tfor (let i: number = fromIdx; i <= toIdx; i++) {\n\t\tconst blockId: BlockId | undefined = blockOrder[i];\n\t\tif (!blockId) continue;\n\t\tconst block = state.getBlock(blockId);\n\t\tif (!block) continue;\n\n\t\tconst from: number = i === fromIdx ? range.from.offset : 0;\n\t\tconst to: number = i === toIdx ? range.to.offset : getBlockLength(block);\n\n\t\tif (from === to) continue;\n\t\tcallback(blockId, from, to);\n\t}\n}\n"],"mappings":"4CAkBA,SAAgB,EACf,EACA,EACA,GAEA,MAAM,EAAiC,EAAM,gBACvC,EAAkB,EAAW,QAAQ,EAAM,KAAK,SAChD,EAAgB,EAAW,QAAQ,EAAM,GAAG,SAElD,IAAK,IAAI,EAAY,EAAS,GAAK,EAAO,IAAK,CAC9C,MAAM,EAA+B,EAAW,GAC3C,GACL,EAAS,IASX,SAAgB,EACf,EACA,EACA,GAEA,MAAM,EAAiC,EAAM,gBACvC,EAAkB,EAAW,QAAQ,EAAM,KAAK,SAChD,EAAgB,EAAW,QAAQ,EAAM,GAAG,SAElD,IAAK,IAAI,EAAY,EAAS,GAAK,EAAO,IAAK,CAC9C,MAAM,EAA+B,EAAW,GAChD,IAAK,EAAS,SACd,MAAM,EAAQ,EAAM,SAAS,GAC7B,IAAK,EAAO,SAEZ,MAAM,EAAe,IAAM,EAAU,EAAM,KAAK,OAAS,EACnD,EAAa,IAAM,EAAQ,EAAM,GAAG,OAAS,EAAe,GAE9D,IAAS,GACb,EAAS,EAAS,EAAM"}
@@ -0,0 +1,2 @@
1
+ import{a as t,c as e,i as n,l as o}from"./Selection-aeiSsvhe.mjs";import{t as r}from"./TypeBrands-BZDKMjR-.mjs";import{r as f,t as s}from"./DomUtils-RKbAVBQz.mjs";function c(t){return t instanceof HTMLElement&&"false"===t.getAttribute("contenteditable")}function i(){return window.getSelection()}function d(t,e){const n=t.getRootNode();if(!(n instanceof ShadowRoot))return null;if(!("getComposedRanges"in e))return null;let o;try{o=e.getComposedRanges({shadowRoots:[n]})}catch{try{o=e.getComposedRanges(n)}catch{return null}}const r=o[0];if(!r)return null;const f="direction"in e&&"backward"===e.direction;return{anchorNode:f?r.endContainer:r.startContainer,anchorOffset:f?r.endOffset:r.startOffset,focusNode:f?r.startContainer:r.endContainer,focusOffset:f?r.startOffset:r.endOffset}}function a(t,e){const n=d(t,e);if(n)return n;const o=e.anchorNode;if(!o)return null;const r=e.focusNode;return r?{anchorNode:o,anchorOffset:e.anchorOffset,focusNode:r,focusOffset:e.focusOffset}:null}function l(t,n){const r=i();if(!r)return;if(e(n))return void r.removeAllRanges();if(o(n)){const e=t.querySelector(`[data-block-id="${n.nodeId}"]`);if(!e)return;const o=e.parentNode;if(!o)return;const f=p(o,e);try{r.setBaseAndExtent(o,f,o,f+1)}catch{}return}const f=N(t,n.anchor),s=N(t,n.head);if(f&&s)try{r.setBaseAndExtent(f.node,f.offset,s.node,s.offset)}catch{}}function u(e){const n=i();if(!n||0===n.rangeCount)return null;const o=a(e,n);if(!o)return null;if(!e.contains(o.anchorNode)||!e.contains(o.focusNode))return null;const r=h(e,o.anchorNode,o.anchorOffset),f=h(e,o.focusNode,o.focusOffset);return r&&f?t(r,f):null}function N(t,e){let n=null;if(e.path&&e.path.length>0){let o=t;for(const t of e.path){const e=o.querySelector(`:scope [data-block-id="${t}"]`);if(!e)break;o=e}o!==t&&o.getAttribute("data-block-id")===e.blockId&&(n=o)}if(n??=t.querySelector(`[data-block-id="${e.blockId}"]`),!n)return null;const o=E(n);if(1===o.childNodes.length&&"BR"===o.firstChild?.nodeName)return{node:o,offset:0};let r=e.offset;const f=T(o);let s=f.nextNode();for(;s;){if(s.nodeType===Node.TEXT_NODE){const t=s.textContent?.length??0;if(r<=t)return{node:s,offset:r};r-=t}else if(c(s)){if(0===r){const t=s.parentNode;if(t)return{node:t,offset:p(t,s)}}r-=1}s=f.nextNode()}const i=o.lastChild;return i?i.nodeType===Node.TEXT_NODE?{node:i,offset:i.textContent?.length??0}:{node:o,offset:o.childNodes.length}:{node:o,offset:0}}function h(t,e,o){const i=f(t,e);if(!i)return null;const d=i.getAttribute("data-block-id");if(!d)return null;const a=r(d),l=s(t,i),u=E(i);if(e===i||e===u){const t=e===u?u:i;let r=0,f=0;for(const e of Array.from(t.childNodes)){if(f>=o)break;r+=g(e),f++}return n(a,r,l.length>1?l:void 0)}if(u!==i&&!u.contains(e))return n(a,0,l.length>1?l:void 0);let N=0;const h=T(u);let p=h.nextNode();for(;p;){if(p===e)return p.nodeType===Node.TEXT_NODE?n(a,N+o,l.length>1?l:void 0):n(a,N,l.length>1?l:void 0);p.nodeType===Node.TEXT_NODE?N+=p.textContent?.length??0:c(p)&&(N+=1),p=h.nextNode()}if(e.nodeType===Node.ELEMENT_NODE){const t=function(t,e){let n=0,o=0;for(const r of Array.from(t.childNodes)){if(o>=e)break;n+=g(r),o++}return n}(e,o),r=function(t,e){let n=0,o=e;for(;o&&o!==t;){const t=o.parentNode;if(!t)return null;for(const e of Array.from(t.childNodes)){if(e===o)break;n+=g(e)}o=t}return o===t?n:null}(u,e);return n(a,null===r?t:r+t,l.length>1?l:void 0)}return n(a,0,l.length>1?l:void 0)}function T(t){return document.createTreeWalker(t,NodeFilter.SHOW_ALL,{acceptNode:e=>e instanceof HTMLElement&&e.hasAttribute("data-cursor-wrapper")||function(t,e){let n=t.parentNode;for(;n&&n!==e;){if(c(n))return!0;n=n.parentNode}return!1}(e,t)||e instanceof HTMLElement&&e.hasAttribute("data-block-id")&&e!==t?NodeFilter.FILTER_REJECT:e.nodeType===Node.TEXT_NODE||c(e)?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP})}function p(t,e){let n=0;for(const o of Array.from(t.childNodes)){if(o===e)return n;n++}return n}function E(t){return t.querySelector("[data-content-dom]")??t}function g(t){if(t.nodeType===Node.TEXT_NODE)return t.textContent?.length??0;if(c(t))return 1;let e=0;for(const n of Array.from(t.childNodes))e+=g(n);return e}export{u as a,a as i,i as n,l as o,d as r,h as t};
2
+ //# sourceMappingURL=SelectionSync-DCJpNFat.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SelectionSync-DCJpNFat.mjs","names":[],"sources":["../../src/view/SelectionSync.ts"],"sourcesContent":["/**\n * Selection synchronization between editor state and DOM.\n */\n\nimport type { EditorSelection, Position, Selection } from '../model/Selection.js';\nimport {\n\tcreatePosition,\n\tcreateSelection,\n\tisGapCursor,\n\tisNodeSelection,\n} from '../model/Selection.js';\nimport { blockId as toBlockId } from '../model/TypeBrands.js';\nimport { buildBlockPath, findBlockAncestor } from './DomUtils.js';\n\ninterface DOMPosition {\n\tnode: Node;\n\toffset: number;\n}\n\n/**\n * True when `node` is an InlineNode element — rendered `contenteditable=\"false\"`\n * and counted as width 1 in state offset space.\n */\nfunction isInlineNodeEl(node: Node | null | undefined): node is HTMLElement {\n\treturn node instanceof HTMLElement && node.getAttribute('contenteditable') === 'false';\n}\n\n/** Gets the selection object for writing (collapse, setBaseAndExtent). */\nexport function getSelection(): globalThis.Selection | null {\n\treturn window.getSelection();\n}\n\n/**\n * Endpoints returned by reading selection via getComposedRanges().\n * Used to correctly read selection inside Shadow DOM on Safari 17+,\n * Chrome 137+, and Firefox 142+.\n */\nexport interface SelectionEndpoints {\n\tanchorNode: Node;\n\tanchorOffset: number;\n\tfocusNode: Node;\n\tfocusOffset: number;\n}\n\n/**\n * Reads the selection endpoints using getComposedRanges() when inside a\n * Shadow DOM. Returns null if not in a shadow root or the API is unavailable.\n *\n * Handles two call signatures:\n * - Modern (Chrome 137+, Firefox 142+): sel.getComposedRanges({ shadowRoots: [root] })\n * - Legacy (Safari 17+): sel.getComposedRanges(root)\n *\n * StaticRange always uses document order. When `Selection.direction` is\n * `\"backward\"`, anchor/focus are swapped to reconstruct the correct\n * directional endpoints. When direction is `\"none\"` or absent the\n * forward (document-order) mapping is used.\n *\n * Note: Safari 17–18 supports getComposedRanges but not\n * Selection.direction — backward selections will be read as forward.\n */\nexport function readComposedSelection(\n\tcontainer: HTMLElement,\n\tsel: globalThis.Selection,\n): SelectionEndpoints | null {\n\tconst root = container.getRootNode();\n\tif (!(root instanceof ShadowRoot)) return null;\n\tif (!('getComposedRanges' in sel)) return null;\n\n\tlet ranges: StaticRange[];\n\ttry {\n\t\t// Modern syntax (Chrome 137+, Firefox 142+)\n\t\tranges = (\n\t\t\tsel as unknown as {\n\t\t\t\tgetComposedRanges(opts: { shadowRoots: ShadowRoot[] }): StaticRange[];\n\t\t\t}\n\t\t).getComposedRanges({ shadowRoots: [root] });\n\t} catch {\n\t\ttry {\n\t\t\t// Legacy syntax (Safari 17+)\n\t\t\tranges = (\n\t\t\t\tsel as unknown as {\n\t\t\t\t\tgetComposedRanges(...roots: ShadowRoot[]): StaticRange[];\n\t\t\t\t}\n\t\t\t).getComposedRanges(root);\n\t\t} catch {\n\t\t\treturn null;\n\t\t}\n\t}\n\n\tconst range = ranges[0];\n\tif (!range) return null;\n\n\tconst isBackward: boolean =\n\t\t'direction' in sel && (sel as unknown as { direction: string }).direction === 'backward';\n\n\treturn {\n\t\tanchorNode: isBackward ? range.endContainer : range.startContainer,\n\t\tanchorOffset: isBackward ? range.endOffset : range.startOffset,\n\t\tfocusNode: isBackward ? range.startContainer : range.endContainer,\n\t\tfocusOffset: isBackward ? range.startOffset : range.endOffset,\n\t};\n}\n\n/**\n * Reads the DOM selection endpoints, preferring `getComposedRanges()` when\n * the container is inside a Shadow DOM.\n *\n * Returns `null` when `anchorNode` is unavailable (no selection).\n *\n * In Shadow DOM mode the endpoints come from a `StaticRange` which uses\n * document order. `Selection.direction` is used to reconstruct anchor/focus\n * for backward selections.\n */\nexport function readDOMSelectionEndpoints(\n\tcontainer: HTMLElement,\n\tdomSel: globalThis.Selection,\n): SelectionEndpoints | null {\n\tconst composed: SelectionEndpoints | null = readComposedSelection(container, domSel);\n\tif (composed) return composed;\n\n\tconst anchorNode: Node | null = domSel.anchorNode;\n\tif (!anchorNode) return null;\n\tconst focusNode: Node | null = domSel.focusNode;\n\tif (!focusNode) return null;\n\n\treturn {\n\t\tanchorNode,\n\t\tanchorOffset: domSel.anchorOffset,\n\t\tfocusNode,\n\t\tfocusOffset: domSel.focusOffset,\n\t};\n}\n\n/** Syncs the editor state selection to the DOM. */\nexport function syncSelectionToDOM(container: HTMLElement, selection: EditorSelection): void {\n\tconst domSel = getSelection();\n\tif (!domSel) return;\n\n\t// GapCursor: clear browser selection (gap cursor has no DOM equivalent)\n\tif (isGapCursor(selection)) {\n\t\tdomSel.removeAllRanges();\n\t\treturn;\n\t}\n\n\t// NodeSelection: select the entire block element\n\tif (isNodeSelection(selection)) {\n\t\tconst blockEl = container.querySelector(`[data-block-id=\"${selection.nodeId}\"]`);\n\t\tif (!blockEl) return;\n\t\tconst parent = blockEl.parentNode;\n\t\tif (!parent) return;\n\t\tconst childIdx = childIndexOf(parent, blockEl);\n\t\ttry {\n\t\t\tdomSel.setBaseAndExtent(parent, childIdx, parent, childIdx + 1);\n\t\t} catch {\n\t\t\t// Selection may fail if DOM is not yet rendered\n\t\t}\n\t\treturn;\n\t}\n\n\tconst anchorPos = statePositionToDOM(container, selection.anchor);\n\tconst headPos = statePositionToDOM(container, selection.head);\n\n\tif (!anchorPos || !headPos) return;\n\n\ttry {\n\t\tdomSel.setBaseAndExtent(anchorPos.node, anchorPos.offset, headPos.node, headPos.offset);\n\t} catch {\n\t\t// Selection may fail if DOM is not yet rendered\n\t}\n}\n\n/** Reads the current DOM selection and converts it to a state selection. */\nexport function readSelectionFromDOM(container: HTMLElement): Selection | null {\n\tconst domSel = getSelection();\n\tif (!domSel || domSel.rangeCount === 0) return null;\n\n\tconst endpoints: SelectionEndpoints | null = readDOMSelectionEndpoints(container, domSel);\n\tif (!endpoints) return null;\n\n\tif (!container.contains(endpoints.anchorNode) || !container.contains(endpoints.focusNode)) {\n\t\treturn null;\n\t}\n\n\tconst anchor = domPositionToState(container, endpoints.anchorNode, endpoints.anchorOffset);\n\tconst head = domPositionToState(container, endpoints.focusNode, endpoints.focusOffset);\n\n\tif (!anchor || !head) return null;\n\n\treturn createSelection(anchor, head);\n}\n\n/** Converts a state position (blockId + offset) to a DOM position (node + offset). */\nfunction statePositionToDOM(container: HTMLElement, pos: Position): DOMPosition | null {\n\t// If path is available, navigate directly to the leaf block\n\tlet blockEl: Element | null = null;\n\tif (pos.path && pos.path.length > 0) {\n\t\tlet current: Element = container;\n\t\tfor (const id of pos.path) {\n\t\t\tconst found = current.querySelector(`:scope [data-block-id=\"${id}\"]`);\n\t\t\tif (!found) break;\n\t\t\tcurrent = found;\n\t\t}\n\t\tif (current !== container && current.getAttribute('data-block-id') === pos.blockId) {\n\t\t\tblockEl = current;\n\t\t}\n\t}\n\tblockEl ??= container.querySelector(`[data-block-id=\"${pos.blockId}\"]`);\n\tif (!blockEl) return null;\n\n\t// Use contentDOM if available (NodeView blocks like code_block)\n\tconst contentEl: Element = resolveContentRoot(blockEl);\n\n\t// Handle empty paragraphs with <br>\n\tif (contentEl.childNodes.length === 1 && contentEl.firstChild?.nodeName === 'BR') {\n\t\treturn { node: contentEl, offset: 0 };\n\t}\n\n\t// Walk through text nodes and inline elements to find the correct position\n\tlet remaining = pos.offset;\n\tconst walker = createInlineContentWalker(contentEl);\n\n\tlet current = walker.nextNode();\n\twhile (current) {\n\t\tif (current.nodeType === Node.TEXT_NODE) {\n\t\t\tconst len = current.textContent?.length ?? 0;\n\t\t\tif (remaining <= len) {\n\t\t\t\treturn { node: current, offset: remaining };\n\t\t\t}\n\t\t\tremaining -= len;\n\t\t} else if (isInlineNodeEl(current)) {\n\t\t\t// InlineNode element — width 1 in state offset space\n\t\t\tif (remaining === 0) {\n\t\t\t\t// Position before this inline element\n\t\t\t\tconst parent = current.parentNode;\n\t\t\t\tif (parent) {\n\t\t\t\t\tconst childIndex = childIndexOf(parent, current);\n\t\t\t\t\treturn { node: parent, offset: childIndex };\n\t\t\t\t}\n\t\t\t}\n\t\t\tremaining -= 1;\n\t\t}\n\t\tcurrent = walker.nextNode();\n\t}\n\n\t// Fallback: position at end of block\n\tconst lastChild = contentEl.lastChild;\n\tif (lastChild) {\n\t\tif (lastChild.nodeType === Node.TEXT_NODE) {\n\t\t\treturn { node: lastChild, offset: lastChild.textContent?.length ?? 0 };\n\t\t}\n\t\treturn { node: contentEl, offset: contentEl.childNodes.length };\n\t}\n\n\treturn { node: contentEl, offset: 0 };\n}\n\n/** Converts a DOM position to a state position, including nested path. */\nexport function domPositionToState(\n\tcontainer: HTMLElement,\n\tnode: Node,\n\tdomOffset: number,\n): Position | null {\n\t// Find the innermost block element\n\tconst blockEl = findBlockAncestor(container, node);\n\tif (!blockEl) return null;\n\n\tconst rawBlockId = blockEl.getAttribute('data-block-id');\n\tif (!rawBlockId) return null;\n\tconst bid = toBlockId(rawBlockId);\n\n\t// Build path by collecting all data-block-id ancestors from leaf to root\n\tconst path = buildBlockPath(container, blockEl);\n\n\t// Use contentDOM if available (NodeView blocks like code_block)\n\tconst contentEl: Element = resolveContentRoot(blockEl);\n\n\t// Handle clicks on the block or content element itself (e.g. empty paragraph with <br>)\n\tif (node === blockEl || node === contentEl) {\n\t\tconst targetEl: Element = node === contentEl ? contentEl : blockEl;\n\t\tlet childOffset = 0;\n\t\tlet childIdx = 0;\n\t\tfor (const child of Array.from(targetEl.childNodes)) {\n\t\t\tif (childIdx >= domOffset) break;\n\t\t\tchildOffset += inlineContentWidth(child);\n\t\t\tchildIdx++;\n\t\t}\n\t\treturn createPosition(bid, childOffset, path.length > 1 ? path : undefined);\n\t}\n\n\t// If node is outside the contentDOM (e.g. in NodeView header), map to offset 0\n\tif (contentEl !== blockEl && !contentEl.contains(node)) {\n\t\treturn createPosition(bid, 0, path.length > 1 ? path : undefined);\n\t}\n\n\t// Calculate offset by walking text nodes and inline elements\n\tlet offset = 0;\n\tconst walker = createInlineContentWalker(contentEl);\n\n\tlet walkerNode = walker.nextNode();\n\twhile (walkerNode) {\n\t\tif (walkerNode === node) {\n\t\t\tif (walkerNode.nodeType === Node.TEXT_NODE) {\n\t\t\t\treturn createPosition(bid, offset + domOffset, path.length > 1 ? path : undefined);\n\t\t\t}\n\t\t\t// Node is an inline element — return offset at its start\n\t\t\treturn createPosition(bid, offset, path.length > 1 ? path : undefined);\n\t\t}\n\t\tif (walkerNode.nodeType === Node.TEXT_NODE) {\n\t\t\toffset += walkerNode.textContent?.length ?? 0;\n\t\t} else if (isInlineNodeEl(walkerNode)) {\n\t\t\toffset += 1;\n\t\t}\n\t\twalkerNode = walker.nextNode();\n\t}\n\n\t// If the node is not a text node, try to find the offset from element context\n\tif (node.nodeType === Node.ELEMENT_NODE) {\n\t\tconst childOffset = inlineOffsetForChildIndex(node, domOffset);\n\t\tconst offsetBeforeNode = inlineOffsetBeforeNode(contentEl, node);\n\t\tconst totalOffset = offsetBeforeNode === null ? childOffset : offsetBeforeNode + childOffset;\n\t\treturn createPosition(bid, totalOffset, path.length > 1 ? path : undefined);\n\t}\n\n\treturn createPosition(bid, 0, path.length > 1 ? path : undefined);\n}\n\n/** Counts inline width for the first `childIndex` children of an element. */\nfunction inlineOffsetForChildIndex(node: Node, childIndex: number): number {\n\tlet childOffset = 0;\n\tlet childIdx = 0;\n\tfor (const child of Array.from(node.childNodes)) {\n\t\tif (childIdx >= childIndex) break;\n\t\tchildOffset += inlineContentWidth(child);\n\t\tchildIdx++;\n\t}\n\treturn childOffset;\n}\n\n/** Returns the inline offset from `root` to the start of `node`, or null when unrelated. */\nfunction inlineOffsetBeforeNode(root: Element, node: Node): number | null {\n\tlet offset = 0;\n\tlet current: Node | null = node;\n\n\twhile (current && current !== root) {\n\t\tconst parent: Node | null = current.parentNode;\n\t\tif (!parent) return null;\n\n\t\tfor (const sibling of Array.from(parent.childNodes) as Node[]) {\n\t\t\tif (sibling === current) break;\n\t\t\toffset += inlineContentWidth(sibling);\n\t\t}\n\n\t\tcurrent = parent;\n\t}\n\n\treturn current === root ? offset : null;\n}\n\n/** Checks if a node is inside a contentEditable=\"false\" inline element. */\nfunction isInsideInlineElement(node: Node, root: Element): boolean {\n\tlet parent: Node | null = node.parentNode;\n\twhile (parent && parent !== root) {\n\t\tif (isInlineNodeEl(parent)) {\n\t\t\treturn true;\n\t\t}\n\t\tparent = parent.parentNode;\n\t}\n\treturn false;\n}\n\n/**\n * Creates a TreeWalker that visits text nodes and contentEditable=\"false\"\n * inline elements within a block, skipping mark wrappers and nested blocks.\n */\nfunction createInlineContentWalker(blockEl: Element): TreeWalker {\n\treturn document.createTreeWalker(blockEl, NodeFilter.SHOW_ALL, {\n\t\tacceptNode: (n: Node) => {\n\t\t\t// Skip cursor wrapper (ZWS for stored marks during IME composition)\n\t\t\tif (n instanceof HTMLElement && n.hasAttribute('data-cursor-wrapper')) {\n\t\t\t\treturn NodeFilter.FILTER_REJECT;\n\t\t\t}\n\t\t\t// Skip anything inside an inline element (contentEditable=\"false\")\n\t\t\tif (isInsideInlineElement(n, blockEl)) return NodeFilter.FILTER_REJECT;\n\t\t\t// Skip nested block elements and their descendants\n\t\t\tif (n instanceof HTMLElement && n.hasAttribute('data-block-id') && n !== blockEl) {\n\t\t\t\treturn NodeFilter.FILTER_REJECT;\n\t\t\t}\n\t\t\t// Accept text nodes\n\t\t\tif (n.nodeType === Node.TEXT_NODE) return NodeFilter.FILTER_ACCEPT;\n\t\t\t// Accept inline elements (contentEditable=\"false\")\n\t\t\tif (isInlineNodeEl(n)) {\n\t\t\t\treturn NodeFilter.FILTER_ACCEPT;\n\t\t\t}\n\t\t\t// Skip other elements (mark wrappers, decoration wrappers) — descend\n\t\t\treturn NodeFilter.FILTER_SKIP;\n\t\t},\n\t});\n}\n\n/** Returns the child index of a node within its parent. */\nfunction childIndexOf(parent: Node, child: Node): number {\n\tlet idx = 0;\n\tfor (const c of Array.from(parent.childNodes)) {\n\t\tif (c === child) return idx;\n\t\tidx++;\n\t}\n\treturn idx;\n}\n\n/**\n * Resolves the content root for inline content walking.\n * If the block element has a contentDOM (marked with data-content-dom),\n * returns it so the walker skips NodeView structural elements (headers, etc.).\n */\nfunction resolveContentRoot(blockEl: Element): Element {\n\tconst contentDOM: Element | null = blockEl.querySelector('[data-content-dom]');\n\treturn contentDOM ?? blockEl;\n}\n\n/** Counts the inline content width of a DOM node (text length + 1 per inline element). */\nfunction inlineContentWidth(node: Node): number {\n\tif (node.nodeType === Node.TEXT_NODE) {\n\t\treturn node.textContent?.length ?? 0;\n\t}\n\tif (isInlineNodeEl(node)) {\n\t\treturn 1;\n\t}\n\t// Mark wrapper or other element — sum children\n\tlet width = 0;\n\tfor (const child of Array.from(node.childNodes)) {\n\t\twidth += inlineContentWidth(child);\n\t}\n\treturn width;\n}\n"],"mappings":"mKAuBA,SAAS,EAAe,GACvB,OAAO,aAAgB,aAAwD,UAAzC,EAAK,aAAa,mBAIzD,SAAgB,IACf,OAAO,OAAO,eA+Bf,SAAgB,EACf,EACA,GAEA,MAAM,EAAO,EAAU,cACvB,KAAM,aAAgB,YAAa,OAAO,KAC1C,KAAM,sBAAuB,GAAM,OAAO,KAE1C,IAAI,EACJ,IAEC,EACC,EAGC,kBAAkB,CAAE,YAAa,CAAC,WAEpC,IAEC,EACC,EAGC,kBAAkB,SAEpB,OAAO,MAIT,MAAM,EAAQ,EAAO,GACrB,IAAK,EAAO,OAAO,KAEnB,MAAM,EACL,cAAe,GAA+D,aAAvD,EAAyC,UAEjE,MAAO,CACN,WAAY,EAAa,EAAM,aAAe,EAAM,eACpD,aAAc,EAAa,EAAM,UAAY,EAAM,YACnD,UAAW,EAAa,EAAM,eAAiB,EAAM,aACrD,YAAa,EAAa,EAAM,YAAc,EAAM,WActD,SAAgB,EACf,EACA,GAEA,MAAM,EAAsC,EAAsB,EAAW,GAC7E,GAAI,EAAU,OAAO,EAErB,MAAM,EAA0B,EAAO,WACvC,IAAK,EAAY,OAAO,KACxB,MAAM,EAAyB,EAAO,UACtC,OAAK,EAEE,CACN,aACA,aAAc,EAAO,aACrB,YACA,YAAa,EAAO,aANE,KAWxB,SAAgB,EAAmB,EAAwB,GAC1D,MAAM,EAAS,IACf,IAAK,EAAQ,OAGb,GAAI,EAAY,GAEf,YADA,EAAO,kBAKR,GAAI,EAAgB,GAAY,CAC/B,MAAM,EAAU,EAAU,cAAc,mBAAmB,EAAU,YACrE,IAAK,EAAS,OACd,MAAM,EAAS,EAAQ,WACvB,IAAK,EAAQ,OACb,MAAM,EAAW,EAAa,EAAQ,GACtC,IACC,EAAO,iBAAiB,EAAQ,EAAU,EAAQ,EAAW,SACtD,CAGR,OAGD,MAAM,EAAY,EAAmB,EAAW,EAAU,QACpD,EAAU,EAAmB,EAAW,EAAU,MAExD,GAAK,GAAc,EAEnB,IACC,EAAO,iBAAiB,EAAU,KAAM,EAAU,OAAQ,EAAQ,KAAM,EAAQ,cACzE,EAMT,SAAgB,EAAqB,GACpC,MAAM,EAAS,IACf,IAAK,GAAgC,IAAtB,EAAO,WAAkB,OAAO,KAE/C,MAAM,EAAuC,EAA0B,EAAW,GAClF,IAAK,EAAW,OAAO,KAEvB,IAAK,EAAU,SAAS,EAAU,cAAgB,EAAU,SAAS,EAAU,WAC9E,OAAO,KAGR,MAAM,EAAS,EAAmB,EAAW,EAAU,WAAY,EAAU,cACvE,EAAO,EAAmB,EAAW,EAAU,UAAW,EAAU,aAE1E,OAAK,GAAW,EAET,EAAgB,EAAQ,GAFF,KAM9B,SAAS,EAAmB,EAAwB,GAEnD,IAAI,EAA0B,KAC9B,GAAI,EAAI,MAAQ,EAAI,KAAK,OAAS,EAAG,CACpC,IAAI,EAAmB,EACvB,IAAK,MAAM,KAAM,EAAI,KAAM,CAC1B,MAAM,EAAQ,EAAQ,cAAc,0BAA0B,OAC9D,IAAK,EAAO,MACZ,EAAU,EAEP,IAAY,GAAa,EAAQ,aAAa,mBAAqB,EAAI,UAC1E,EAAU,GAIZ,GADA,IAAY,EAAU,cAAc,mBAAmB,EAAI,cACtD,EAAS,OAAO,KAGrB,MAAM,EAAqB,EAAmB,GAG9C,GAAoC,IAAhC,EAAU,WAAW,QAAmD,OAAnC,EAAU,YAAY,SAC9D,MAAO,CAAE,KAAM,EAAW,OAAQ,GAInC,IAAI,EAAY,EAAI,OACpB,MAAM,EAAS,EAA0B,GAEzC,IAAI,EAAU,EAAO,WACrB,KAAO,GAAS,CACf,GAAI,EAAQ,WAAa,KAAK,UAAW,CACxC,MAAM,EAAM,EAAQ,aAAa,QAAU,EAC3C,GAAI,GAAa,EAChB,MAAO,CAAE,KAAM,EAAS,OAAQ,GAEjC,GAAa,UACH,EAAe,GAAU,CAEnC,GAAkB,IAAd,EAAiB,CAEpB,MAAM,EAAS,EAAQ,WACvB,GAAI,EAEH,MAAO,CAAE,KAAM,EAAQ,OADJ,EAAa,EAAQ,IAI1C,GAAa,EAEd,EAAU,EAAO,WAIlB,MAAM,EAAY,EAAU,UAC5B,OAAI,EACC,EAAU,WAAa,KAAK,UACxB,CAAE,KAAM,EAAW,OAAQ,EAAU,aAAa,QAAU,GAE7D,CAAE,KAAM,EAAW,OAAQ,EAAU,WAAW,QAGjD,CAAE,KAAM,EAAW,OAAQ,GAInC,SAAgB,EACf,EACA,EACA,GAGA,MAAM,EAAU,EAAkB,EAAW,GAC7C,IAAK,EAAS,OAAO,KAErB,MAAM,EAAa,EAAQ,aAAa,iBACxC,IAAK,EAAY,OAAO,KACxB,MAAM,EAAM,EAAU,GAGhB,EAAO,EAAe,EAAW,GAGjC,EAAqB,EAAmB,GAG9C,GAAI,IAAS,GAAW,IAAS,EAAW,CAC3C,MAAM,EAAoB,IAAS,EAAY,EAAY,EAC3D,IAAI,EAAc,EACd,EAAW,EACf,IAAK,MAAM,KAAS,MAAM,KAAK,EAAS,YAAa,CACpD,GAAI,GAAY,EAAW,MAC3B,GAAe,EAAmB,GAClC,IAED,OAAO,EAAe,EAAK,EAAa,EAAK,OAAS,EAAI,OAAO,GAIlE,GAAI,IAAc,IAAY,EAAU,SAAS,GAChD,OAAO,EAAe,EAAK,EAAG,EAAK,OAAS,EAAI,OAAO,GAIxD,IAAI,EAAS,EACb,MAAM,EAAS,EAA0B,GAEzC,IAAI,EAAa,EAAO,WACxB,KAAO,GAAY,CAClB,GAAI,IAAe,EAClB,OAAI,EAAW,WAAa,KAAK,UACzB,EAAe,EAAK,EAAS,EAAW,EAAK,OAAS,EAAI,OAAO,GAGlE,EAAe,EAAK,EAAQ,EAAK,OAAS,EAAI,OAAO,GAEzD,EAAW,WAAa,KAAK,UAChC,GAAU,EAAW,aAAa,QAAU,EAClC,EAAe,KACzB,GAAU,GAEX,EAAa,EAAO,WAIrB,GAAI,EAAK,WAAa,KAAK,aAAc,CACxC,MAAM,EAUR,SAAmC,EAAY,GAC9C,IAAI,EAAc,EACd,EAAW,EACf,IAAK,MAAM,KAAS,MAAM,KAAK,EAAK,YAAa,CAChD,GAAI,GAAY,EAAY,MAC5B,GAAe,EAAmB,GAClC,IAED,OAAO,EAlBc,CAA0B,EAAM,GAC9C,EAqBR,SAAgC,EAAe,GAC9C,IAAI,EAAS,EACT,EAAuB,EAE3B,KAAO,GAAW,IAAY,GAAM,CACnC,MAAM,EAAsB,EAAQ,WACpC,IAAK,EAAQ,OAAO,KAEpB,IAAK,MAAM,KAAW,MAAM,KAAK,EAAO,YAAuB,CAC9D,GAAI,IAAY,EAAS,MACzB,GAAU,EAAmB,GAG9B,EAAU,EAGX,OAAO,IAAY,EAAO,EAAS,KArCT,CAAuB,EAAW,GAE3D,OAAO,EAAe,EADmB,OAArB,EAA4B,EAAc,EAAmB,EACzC,EAAK,OAAS,EAAI,OAAO,GAGlE,OAAO,EAAe,EAAK,EAAG,EAAK,OAAS,EAAI,OAAO,GAmDxD,SAAS,EAA0B,GAClC,OAAO,SAAS,iBAAiB,EAAS,WAAW,SAAU,CAC9D,WAAa,GAER,aAAa,aAAe,EAAE,aAAa,wBAnBlD,SAA+B,EAAY,GAC1C,IAAI,EAAsB,EAAK,WAC/B,KAAO,GAAU,IAAW,GAAM,CACjC,GAAI,EAAe,GAClB,OAAO,EAER,EAAS,EAAO,WAEjB,OAAO,EAeD,CAAsB,EAAG,IAEzB,aAAa,aAAe,EAAE,aAAa,kBAAoB,IAAM,EALjE,WAAW,cASf,EAAE,WAAa,KAAK,WAEpB,EAAe,GAFuB,WAAW,cAM9C,WAAW,cAMrB,SAAS,EAAa,EAAc,GACnC,IAAI,EAAM,EACV,IAAK,MAAM,KAAK,MAAM,KAAK,EAAO,YAAa,CAC9C,GAAI,IAAM,EAAO,OAAO,EACxB,IAED,OAAO,EAQR,SAAS,EAAmB,GAE3B,OADmC,EAAQ,cAAc,uBACpC,EAItB,SAAS,EAAmB,GAC3B,GAAI,EAAK,WAAa,KAAK,UAC1B,OAAO,EAAK,aAAa,QAAU,EAEpC,GAAI,EAAe,GAClB,OAAO,EAGR,IAAI,EAAQ,EACZ,IAAK,MAAM,KAAS,MAAM,KAAK,EAAK,YACnC,GAAS,EAAmB,GAE7B,OAAO"}
@@ -0,0 +1,2 @@
1
+ import{r as e}from"./Platform-wPvKFB9m.mjs";function r(r){return e()?r.replace(/Mod/g,"⌘").replace(/Shift/g,"⇧").replace(/Alt/g,"⌥").replace(/-/g,""):r.replace(/Mod/g,"Ctrl").replace(/-/g,"+")}export{r as t};
2
+ //# sourceMappingURL=ShortcutFormatting-DZK70CN9.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ShortcutFormatting-DZK70CN9.mjs","names":[],"sources":["../../src/plugins/shared/ShortcutFormatting.ts"],"sourcesContent":["import { isMac } from '../../platform/Platform.js';\n\n/**\n * Formats a keymap binding string into a human-readable shortcut,\n * using platform-appropriate modifier symbols (⌘ on Mac, Ctrl on others).\n *\n * @example formatShortcut('Mod-B') → \"Ctrl+B\" or \"⌘B\"\n * @example formatShortcut('Mod-Shift-X') → \"Ctrl+Shift+X\" or \"⌘⇧X\"\n */\nexport function formatShortcut(binding: string): string {\n\tif (isMac()) {\n\t\treturn binding\n\t\t\t.replace(/Mod/g, '⌘')\n\t\t\t.replace(/Shift/g, '⇧')\n\t\t\t.replace(/Alt/g, '⌥')\n\t\t\t.replace(/-/g, '');\n\t}\n\treturn binding.replace(/Mod/g, 'Ctrl').replace(/-/g, '+');\n}\n"],"mappings":"4CASA,SAAgB,EAAe,GAC9B,OAAI,IACI,EACL,QAAQ,OAAQ,KAChB,QAAQ,SAAU,KAClB,QAAQ,OAAQ,KAChB,QAAQ,KAAM,IAEV,EAAQ,QAAQ,OAAQ,QAAQ,QAAQ,KAAM"}
@@ -0,0 +1,2 @@
1
+ import{_ as o,m as r}from"./Commands-ixGhPiRG.mjs";import{i as e}from"./TypeBrands-BZDKMjR-.mjs";import{n as m}from"./PluginHelpers-C3aCCGfX.mjs";function t(t,a){const i=e(a.markSpec.type);t.registerMarkSpec(a.markSpec),t.registerCommand(a.command,()=>m(t,o(t.getState(),i))),a.keyBinding&&t.registerKeymap({[a.keyBinding]:()=>t.executeCommand(a.command)}),a.toolbar&&t.registerToolbarItem({id:a.toolbar.id,group:a.toolbar.group,icon:a.toolbar.icon,label:a.toolbar.label,tooltip:a.toolbar.tooltip,command:a.command,isActive:o=>r(o,i)})}export{t};
2
+ //# sourceMappingURL=SimpleMark-CezTJnXh.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SimpleMark-CezTJnXh.mjs","names":[],"sources":["../../src/plugins/shared/SimpleMark.ts"],"sourcesContent":["/**\n * Registers the common core of a simple toggle mark: its MarkSpec, a toggle\n * command, an optional keyboard shortcut, and an optional toolbar button.\n *\n * Plugins that need more (input rules, exclusivity middleware, config-driven\n * variants) layer those on top after calling this — it deliberately models only\n * the shared core, not every mark plugin.\n */\n\nimport { isMarkActive, toggleMark } from '../../commands/Commands.js';\nimport type { MarkSpec } from '../../model/MarkSpec.js';\nimport { markType } from '../../model/TypeBrands.js';\nimport type { PluginContext } from '../Plugin.js';\nimport { dispatchIfPresent } from './PluginHelpers.js';\n\nexport interface SimpleMarkToolbar {\n\treadonly id: string;\n\treadonly group: string;\n\treadonly icon: string;\n\treadonly label: string;\n\treadonly tooltip: string;\n}\n\nexport interface SimpleMarkDefinition {\n\t/** The mark spec to register (defines DOM/HTML rendering and parsing). */\n\treadonly markSpec: MarkSpec;\n\t/** Toggle command name, e.g. `'toggleStrikethrough'`. */\n\treadonly command: string;\n\t/** Keyboard shortcut bound to the command; omit or `null` to skip. */\n\treadonly keyBinding?: string | null;\n\t/** Toolbar button; omit to skip. */\n\treadonly toolbar?: SimpleMarkToolbar;\n}\n\n/** Registers a simple toggle mark's spec, command, keymap, and toolbar item. */\nexport function registerSimpleMark(context: PluginContext, def: SimpleMarkDefinition): void {\n\tconst type = markType(def.markSpec.type);\n\n\tcontext.registerMarkSpec(def.markSpec);\n\n\tcontext.registerCommand(def.command, () =>\n\t\tdispatchIfPresent(context, toggleMark(context.getState(), type)),\n\t);\n\n\tif (def.keyBinding) {\n\t\tcontext.registerKeymap({ [def.keyBinding]: () => context.executeCommand(def.command) });\n\t}\n\n\tif (def.toolbar) {\n\t\tcontext.registerToolbarItem({\n\t\t\tid: def.toolbar.id,\n\t\t\tgroup: def.toolbar.group,\n\t\t\ticon: def.toolbar.icon,\n\t\t\tlabel: def.toolbar.label,\n\t\t\ttooltip: def.toolbar.tooltip,\n\t\t\tcommand: def.command,\n\t\t\tisActive: (state) => isMarkActive(state, type),\n\t\t});\n\t}\n}\n"],"mappings":"kJAmCA,SAAgB,EAAmB,EAAwB,GAC1D,MAAM,EAAO,EAAS,EAAI,SAAS,MAEnC,EAAQ,iBAAiB,EAAI,UAE7B,EAAQ,gBAAgB,EAAI,QAAA,IAC3B,EAAkB,EAAS,EAAW,EAAQ,WAAY,KAGvD,EAAI,YACP,EAAQ,eAAe,CAAA,CAAG,EAAI,YAAA,IAAmB,EAAQ,eAAe,EAAI,WAGzE,EAAI,SACP,EAAQ,oBAAoB,CAC3B,GAAI,EAAI,QAAQ,GAChB,MAAO,EAAI,QAAQ,MACnB,KAAM,EAAI,QAAQ,KAClB,MAAO,EAAI,QAAQ,MACnB,QAAS,EAAI,QAAQ,QACrB,QAAS,EAAI,QACb,SAAW,GAAU,EAAa,EAAO"}
@@ -0,0 +1,2 @@
1
+ import{l as t,r as e,s as n}from"./Document-znhIcvM9.mjs";import{c as o,o as s,t as c,u as r}from"./Selection-aeiSsvhe.mjs";import{t as a}from"./Commands-ixGhPiRG.mjs";import{a as i}from"./TypeBrands-BZDKMjR-.mjs";import{a as l,c as d,i as u,l as h,s as m}from"./BlockInsertion-C7jFEeYB.mjs";import{n as g}from"./TypedKeys-E3jOGByL.mjs";import{a as f,s as p}from"./PluginHelpers-C3aCCGfX.mjs";import{l as x}from"./XmlDetector-DxBGXqua.mjs";var k=/\n(?:[ \t]*\n)+/;function C(t,e){return!t.detection&&!e.detection||!(!t.detection||!e.detection)&&t.detection.language===e.detection.language}function b(t,e){const n=`${t.text}\n\n${e.text}`;if(!t.detection&&!e.detection)return{text:n,detection:null};const o=t.detection,s=e.detection;return{text:n,detection:{language:o.language,formattedText:`${o.formattedText}\n\n${s.formattedText}`,confidence:Math.max(o.confidence,s.confidence)}}}var j={detectedAsCodeBlock:t=>`Pasted as ${t} code block with syntax highlighting.`,detectedMixedContent:(t,e,n)=>{const o=[];if(t>0&&o.push(`${t} paragraph${t>1?"s":""}`),e>0){const t=n.join(", ");o.push(`${e} code block${e>1?"s":""} (${t})`)}return`Pasted as ${o.join(" and ")}.`}},B=/* @__PURE__ */Object.assign({"./locales/ar.ts":()=>import("./ar-DvNKBrJd.mjs"),"./locales/de.ts":()=>import("./de-DefykdF-.mjs"),"./locales/es.ts":()=>import("./es-CrRNOn2Q.mjs"),"./locales/fr.ts":()=>import("./fr-BKu4eU3V.mjs"),"./locales/hi.ts":()=>import("./hi-RmfZAmwT.mjs"),"./locales/pt.ts":()=>import("./pt-DRoAHNZi.mjs"),"./locales/ru.ts":()=>import("./ru-B76ORyqe.mjs"),"./locales/zh.ts":()=>import("./zh-Bt2ZdHcS.mjs")});async function y(t){return p(B,t,j)}var T=new g("smartPaste"),P=class{id="smart-paste";name="Smart Paste";dependencies=["code-block"];config;detectors=[];context=null;locale=j;constructor(t){this.config={...t}}async init(t){this.context=t,this.locale=await f(t,this.config.locale,j,y);const e=t.getService(x);if(e&&e.onRegister(t=>{t.detection&&this.detectors.push(t.detection)}),this.config.detectors)for(const n of this.config.detectors)this.detectors.push(n);t.registerPasteInterceptor(this.handlePaste,{name:"smart-paste",priority:50}),t.registerService(T,{registerDetector:t=>{this.detectors.push(t)}})}destroy(){this.context=null,this.detectors.length=0}handlePaste=(t,e,n)=>{if(this.isCursorInCodeBlock(n))return null;const o=function(t,e){const n=t.split(k).map(t=>t.trim()).filter(t=>t.length>0);if(0===n.length)return null;let o=!1;const s=n.map(t=>{const n=function(t,e){let n=null;for(const o of e){const e=o.detect(t);e&&(null===n||e.confidence>n.confidence||e.confidence===n.confidence&&e.language<n.language)&&(n=e)}return n}(t,e);return n&&(o=!0),{text:t,detection:n}});return o?function(t){if(t.length<=1)return t;const e=[t[0]];for(let n=1;n<t.length;n++){const o=t[n],s=e[e.length-1];C(s,o)?e[e.length-1]=b(s,o):e.push(o)}return e}(s):null}(t,this.detectors);return o?1===o.length&&o[0]?.detection?this.handleSingleCodeBlock(n,o[0].detection):this.handleMixedContent(n,o):null};isCursorInCodeBlock(t){const e=t.selection;return!!r(e)&&"code_block"===t.getBlock(e.anchor.blockId)?.type}handleSingleCodeBlock(t,e){const n=this.buildCodeBlockTransaction(t,e);return n&&this.context&&this.context.announce(this.locale.detectedAsCodeBlock(e.language)),n}buildCodeBlockTransaction(o,d){const u=o.selection,h=o.transaction("paste");let g;g=r(u)&&!s(u)?a(o,h)??u.anchor.blockId:m(u);const f=t(),p=e(i("code_block"),[n(d.formattedText)],f,{language:d.language,backgroundColor:""});return l(o,h,g,p,u,this.context?.getSchemaRegistry())?(h.setSelection(c(f,d.formattedText.length)),h.build()):null}handleMixedContent(t,e){const n=this.buildMultiBlockTransaction(t,e);return n&&this.context&&this.announceMixedContent(e),n}buildMultiBlockTransaction(t,e){const n=t.selection,i=t.transaction("paste");let l;l=r(n)&&!s(n)?a(t,i)??n.anchor.blockId:m(n);const g=u(t,l),f=this.context?.getSchemaRegistry(),p=g?d(t,l,g,f):h(t,l,f);if(!p)return null;const x=!g&&o(n)&&"before"===n.side?0:1;let k,C=p.anchorIndex+x,b=0;for(const o of e){const t=o.detection?this.createCodeBlockNode(o.detection):this.createParagraphNode(o.text);i.insertNode(p.parentPath,C,t),C++,k=t.id,b=o.detection?o.detection.formattedText.length:o.text.length}return(g?p.isAnchorEmpty&&p.anchorIndex>=0:p.isAnchorEmpty&&!o(n))&&i.removeNode(p.parentPath,p.anchorIndex),k&&i.setSelection(c(k,b)),i.build()}createCodeBlockNode(o){return e(i("code_block"),[n(o.formattedText)],t(),{language:o.language,backgroundColor:""})}createParagraphNode(o){return e(i("paragraph"),[n(o)],t())}announceMixedContent(t){let e=0,n=0;const o=[];for(const s of t)s.detection?(n++,o.includes(s.detection.language)||o.push(s.detection.language)):e++;this.context?.announce(this.locale.detectedMixedContent(e,n,o))}};export{y as i,T as n,j as r,P as t};
2
+ //# sourceMappingURL=SmartPastePlugin-DlApY6Vw.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SmartPastePlugin-DlApY6Vw.mjs","names":[],"sources":["../../src/plugins/smart-paste/ContentSplitter.ts","../../src/plugins/smart-paste/SmartPasteLocale.ts","../../src/plugins/smart-paste/SmartPasteTypes.ts","../../src/plugins/smart-paste/SmartPastePlugin.ts"],"sourcesContent":["/**\n * Splits pasted text at blank-line boundaries and classifies each segment\n * using content detectors. Adjacent segments of the same type are merged.\n */\n\nimport type { ContentDetector, DetectionResult, PasteSegment } from './SmartPasteTypes.js';\n\n/** Pattern matching one or more consecutive blank lines (may contain whitespace). */\nconst BLANK_LINE_SPLIT: RegExp = /\\n(?:[ \\t]*\\n)+/;\n\n/**\n * Splits text at blank-line boundaries and classifies each segment\n * using the provided detectors. Returns null if no code is detected\n * in any segment (the paste should fall through to default handling).\n */\nexport function splitAndClassify(\n\ttext: string,\n\tdetectors: readonly ContentDetector[],\n): readonly PasteSegment[] | null {\n\tconst rawSegments: readonly string[] = text.split(BLANK_LINE_SPLIT);\n\tconst trimmed: readonly string[] = rawSegments\n\t\t.map((s: string) => s.trim())\n\t\t.filter((s: string) => s.length > 0);\n\n\tif (trimmed.length === 0) return null;\n\n\tlet hasCode = false;\n\tconst segments: PasteSegment[] = trimmed.map((segmentText: string): PasteSegment => {\n\t\tconst detection: DetectionResult | null = detectBest(segmentText, detectors);\n\t\tif (detection) hasCode = true;\n\t\treturn { text: segmentText, detection };\n\t});\n\n\tif (!hasCode) return null;\n\n\treturn mergeAdjacentSegments(segments);\n}\n\n/**\n * Merges adjacent segments that share the same classification:\n * consecutive text segments become one paragraph, consecutive code\n * segments of the same language become one code block.\n */\nexport function mergeAdjacentSegments(segments: readonly PasteSegment[]): readonly PasteSegment[] {\n\tif (segments.length <= 1) return segments;\n\n\tconst merged: PasteSegment[] = [segments[0] as PasteSegment];\n\n\tfor (let i = 1; i < segments.length; i++) {\n\t\tconst current: PasteSegment = segments[i] as PasteSegment;\n\t\tconst previous: PasteSegment = merged[merged.length - 1] as PasteSegment;\n\n\t\tif (canMerge(previous, current)) {\n\t\t\tmerged[merged.length - 1] = merge(previous, current);\n\t\t} else {\n\t\t\tmerged.push(current);\n\t\t}\n\t}\n\n\treturn merged;\n}\n\n/**\n * Picks the highest-confidence detection result from all detectors.\n * Ties are broken deterministically by lexicographic language id so the\n * outcome does not depend on detector registration order.\n */\nfunction detectBest(text: string, detectors: readonly ContentDetector[]): DetectionResult | null {\n\tlet best: DetectionResult | null = null;\n\n\tfor (const detector of detectors) {\n\t\tconst result: DetectionResult | null = detector.detect(text);\n\t\tif (!result) continue;\n\t\tif (\n\t\t\tbest === null ||\n\t\t\tresult.confidence > best.confidence ||\n\t\t\t(result.confidence === best.confidence && result.language < best.language)\n\t\t) {\n\t\t\tbest = result;\n\t\t}\n\t}\n\n\treturn best;\n}\n\n/** Two segments can merge if both are text or both are code of the same language. */\nfunction canMerge(a: PasteSegment, b: PasteSegment): boolean {\n\tif (!a.detection && !b.detection) return true;\n\tif (a.detection && b.detection) return a.detection.language === b.detection.language;\n\treturn false;\n}\n\n/** Merges two compatible segments into one. */\nfunction merge(a: PasteSegment, b: PasteSegment): PasteSegment {\n\tconst joinedText: string = `${a.text}\\n\\n${b.text}`;\n\n\tif (!a.detection && !b.detection) {\n\t\treturn { text: joinedText, detection: null };\n\t}\n\n\tconst detA: DetectionResult = a.detection as DetectionResult;\n\tconst detB: DetectionResult = b.detection as DetectionResult;\n\n\treturn {\n\t\ttext: joinedText,\n\t\tdetection: {\n\t\t\tlanguage: detA.language,\n\t\t\tformattedText: `${detA.formattedText}\\n\\n${detB.formattedText}`,\n\t\t\tconfidence: Math.max(detA.confidence, detB.confidence),\n\t\t},\n\t};\n}\n","/** Locale interface and default English locale for the SmartPastePlugin. */\n\nimport { type LocaleModuleMap, loadLocaleModule } from '../shared/LocaleLoader.js';\n\nexport interface SmartPasteLocale {\n\treadonly detectedAsCodeBlock: (language: string) => string;\n\treadonly detectedMixedContent: (\n\t\ttextCount: number,\n\t\tcodeCount: number,\n\t\tlanguages: readonly string[],\n\t) => string;\n}\n\nexport const SMART_PASTE_LOCALE_EN: SmartPasteLocale = {\n\tdetectedAsCodeBlock: (language: string) =>\n\t\t`Pasted as ${language} code block with syntax highlighting.`,\n\tdetectedMixedContent: (textCount: number, codeCount: number, languages: readonly string[]) => {\n\t\tconst parts: string[] = [];\n\t\tif (textCount > 0) {\n\t\t\tparts.push(`${textCount} paragraph${textCount > 1 ? 's' : ''}`);\n\t\t}\n\t\tif (codeCount > 0) {\n\t\t\tconst langList: string = languages.join(', ');\n\t\t\tparts.push(`${codeCount} code block${codeCount > 1 ? 's' : ''} (${langList})`);\n\t\t}\n\t\treturn `Pasted as ${parts.join(' and ')}.`;\n\t},\n};\n\nconst localeModules: LocaleModuleMap<SmartPasteLocale> = import.meta.glob<{\n\tdefault: SmartPasteLocale;\n}>('./locales/*.ts', { eager: false });\n\nexport async function loadSmartPasteLocale(lang: string): Promise<SmartPasteLocale> {\n\treturn loadLocaleModule(localeModules, lang, SMART_PASTE_LOCALE_EN);\n}\n","/**\n * Types for the smart paste plugin — content detection and formatting.\n */\n\nimport { ServiceKey } from '../Plugin.js';\nimport type { SmartPasteLocale } from './SmartPasteLocale.js';\n\n/** Result of detecting structured content in pasted text. */\nexport interface DetectionResult {\n\treadonly language: string;\n\treadonly formattedText: string;\n\treadonly confidence: number;\n}\n\n/** A classified segment of pasted text — either plain text or detected code. */\nexport interface PasteSegment {\n\treadonly text: string;\n\treadonly detection: DetectionResult | null;\n}\n\n/** Interface for content detectors that identify and format pasted text. */\nexport interface ContentDetector {\n\treadonly id: string;\n\tdetect(text: string): DetectionResult | null;\n}\n\n/** Configuration for the SmartPastePlugin. */\nexport interface SmartPasteConfig {\n\treadonly detectors?: readonly ContentDetector[];\n\treadonly locale?: SmartPasteLocale;\n}\n\n/** Public service for registering additional content detectors at runtime. */\nexport interface SmartPasteService {\n\tregisterDetector(detector: ContentDetector): void;\n}\n\nexport const SMART_PASTE_SERVICE_KEY = new ServiceKey<SmartPasteService>('smartPaste');\n","/**\n * SmartPastePlugin: detects structured content in clipboard text\n * and inserts it as formatted code blocks with syntax highlighting.\n * Mixed content (text + code) is split into separate blocks.\n */\n\nimport {\n\ttype InsertionContext,\n\tfindTableCellAncestor,\n\tinsertBlockAfterAnchor,\n\tresolveAnchorBlockId,\n\tresolveCellInsertionContext,\n\tresolveRootInsertionContext,\n} from '../../commands/BlockInsertion.js';\nimport { addDeleteSelectionSteps } from '../../commands/Commands.js';\nimport {\n\ttype BlockNode,\n\tcreateBlockNode,\n\tcreateTextNode,\n\tgenerateBlockId,\n} from '../../model/Document.js';\nimport {\n\tcreateCollapsedSelection,\n\tisCollapsed,\n\tisGapCursor,\n\tisTextSelection,\n} from '../../model/Selection.js';\nimport type { BlockId, NodeTypeName } from '../../model/TypeBrands.js';\nimport { nodeType } from '../../model/TypeBrands.js';\nimport type { EditorState } from '../../state/EditorState.js';\nimport type { Transaction } from '../../state/Transaction.js';\nimport type { PasteInterceptor, Plugin, PluginContext } from '../Plugin.js';\nimport { LANGUAGE_REGISTRY_SERVICE_KEY } from '../language/LanguageTypes.js';\nimport { resolveLocale } from '../shared/PluginHelpers.js';\nimport { splitAndClassify } from './ContentSplitter.js';\nimport {\n\tSMART_PASTE_LOCALE_EN,\n\ttype SmartPasteLocale,\n\tloadSmartPasteLocale,\n} from './SmartPasteLocale.js';\nimport type {\n\tContentDetector,\n\tDetectionResult,\n\tPasteSegment,\n\tSmartPasteConfig,\n} from './SmartPasteTypes.js';\nimport { SMART_PASTE_SERVICE_KEY } from './SmartPasteTypes.js';\n\nexport class SmartPastePlugin implements Plugin {\n\treadonly id = 'smart-paste';\n\treadonly name = 'Smart Paste';\n\treadonly dependencies = ['code-block'] as const;\n\n\tprivate readonly config: SmartPasteConfig;\n\tprivate readonly detectors: ContentDetector[] = [];\n\tprivate context: PluginContext | null = null;\n\tprivate locale: SmartPasteLocale = SMART_PASTE_LOCALE_EN;\n\n\tconstructor(config?: Partial<SmartPasteConfig>) {\n\t\tthis.config = { ...config };\n\t}\n\n\tasync init(context: PluginContext): Promise<void> {\n\t\tthis.context = context;\n\n\t\tthis.locale = await resolveLocale(\n\t\t\tcontext,\n\t\t\tthis.config.locale,\n\t\t\tSMART_PASTE_LOCALE_EN,\n\t\t\tloadSmartPasteLocale,\n\t\t);\n\n\t\t// Subscribe to language registry for detectors (replay provides built-ins)\n\t\tconst registry = context.getService(LANGUAGE_REGISTRY_SERVICE_KEY);\n\t\tif (registry) {\n\t\t\tregistry.onRegister((support) => {\n\t\t\t\tif (support.detection) {\n\t\t\t\t\tthis.detectors.push(support.detection);\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\n\t\t// Register config-provided detectors\n\t\tif (this.config.detectors) {\n\t\t\tfor (const detector of this.config.detectors) {\n\t\t\t\tthis.detectors.push(detector);\n\t\t\t}\n\t\t}\n\n\t\t// Register paste interceptor\n\t\tcontext.registerPasteInterceptor(this.handlePaste, { name: 'smart-paste', priority: 50 });\n\n\t\t// Register service for external detector registration\n\t\tcontext.registerService(SMART_PASTE_SERVICE_KEY, {\n\t\t\tregisterDetector: (detector: ContentDetector) => {\n\t\t\t\tthis.detectors.push(detector);\n\t\t\t},\n\t\t});\n\t}\n\n\tdestroy(): void {\n\t\tthis.context = null;\n\t\tthis.detectors.length = 0;\n\t}\n\n\t// --- Paste Interceptor ---\n\n\tprivate readonly handlePaste: PasteInterceptor = (\n\t\tplainText: string,\n\t\t_html: string,\n\t\tstate: EditorState,\n\t): Transaction | null => {\n\t\tif (this.isCursorInCodeBlock(state)) return null;\n\n\t\tconst segments: readonly PasteSegment[] | null = splitAndClassify(plainText, this.detectors);\n\t\tif (!segments) return null;\n\n\t\t// Single code-only segment: use existing fast path\n\t\tif (segments.length === 1 && segments[0]?.detection) {\n\t\t\treturn this.handleSingleCodeBlock(state, segments[0].detection);\n\t\t}\n\n\t\t// Mixed content: create multiple blocks\n\t\treturn this.handleMixedContent(state, segments);\n\t};\n\n\tprivate isCursorInCodeBlock(state: EditorState): boolean {\n\t\tconst sel = state.selection;\n\t\tif (!isTextSelection(sel)) return false;\n\n\t\tconst block: BlockNode | undefined = state.getBlock(sel.anchor.blockId);\n\t\treturn block?.type === 'code_block';\n\t}\n\n\t// --- Single Code Block (existing behavior) ---\n\n\tprivate handleSingleCodeBlock(\n\t\tstate: EditorState,\n\t\tdetection: DetectionResult,\n\t): Transaction | null {\n\t\tconst tr: Transaction | null = this.buildCodeBlockTransaction(state, detection);\n\t\tif (tr && this.context) {\n\t\t\tthis.context.announce(this.locale.detectedAsCodeBlock(detection.language));\n\t\t}\n\t\treturn tr;\n\t}\n\n\tprivate buildCodeBlockTransaction(\n\t\tstate: EditorState,\n\t\tdetection: DetectionResult,\n\t): Transaction | null {\n\t\tconst sel = state.selection;\n\t\tconst builder = state.transaction('paste');\n\n\t\t// Delete selection if range-selected\n\t\tlet anchorBlockId: BlockId;\n\t\tif (isTextSelection(sel) && !isCollapsed(sel)) {\n\t\t\tconst landingId: BlockId | undefined = addDeleteSelectionSteps(state, builder);\n\t\t\tanchorBlockId = landingId ?? sel.anchor.blockId;\n\t\t} else {\n\t\t\tanchorBlockId = resolveAnchorBlockId(sel);\n\t\t}\n\n\t\t// Create the code block node\n\t\tconst newBlockId: BlockId = generateBlockId();\n\t\tconst codeBlock: BlockNode = createBlockNode(\n\t\t\tnodeType('code_block') as NodeTypeName,\n\t\t\t[createTextNode(detection.formattedText)],\n\t\t\tnewBlockId,\n\t\t\t{ language: detection.language, backgroundColor: '' },\n\t\t);\n\n\t\t// Insert at cursor (handles cell vs root, empty anchor removal)\n\t\tconst inserted: boolean = insertBlockAfterAnchor(\n\t\t\tstate,\n\t\t\tbuilder,\n\t\t\tanchorBlockId,\n\t\t\tcodeBlock,\n\t\t\tsel,\n\t\t\tthis.context?.getSchemaRegistry(),\n\t\t);\n\t\tif (!inserted) return null;\n\n\t\tbuilder.setSelection(createCollapsedSelection(newBlockId, detection.formattedText.length));\n\n\t\treturn builder.build();\n\t}\n\n\t// --- Mixed Content (multiple blocks) ---\n\n\tprivate handleMixedContent(\n\t\tstate: EditorState,\n\t\tsegments: readonly PasteSegment[],\n\t): Transaction | null {\n\t\tconst tr: Transaction | null = this.buildMultiBlockTransaction(state, segments);\n\t\tif (tr && this.context) {\n\t\t\tthis.announceMixedContent(segments);\n\t\t}\n\t\treturn tr;\n\t}\n\n\tprivate buildMultiBlockTransaction(\n\t\tstate: EditorState,\n\t\tsegments: readonly PasteSegment[],\n\t): Transaction | null {\n\t\tconst sel = state.selection;\n\t\tconst builder = state.transaction('paste');\n\n\t\tlet anchorBlockId: BlockId;\n\t\tif (isTextSelection(sel) && !isCollapsed(sel)) {\n\t\t\tconst landingId: BlockId | undefined = addDeleteSelectionSteps(state, builder);\n\t\t\tanchorBlockId = landingId ?? sel.anchor.blockId;\n\t\t} else {\n\t\t\tanchorBlockId = resolveAnchorBlockId(sel);\n\t\t}\n\n\t\tconst cellId: BlockId | undefined = findTableCellAncestor(state, anchorBlockId);\n\t\tconst schemaRegistry = this.context?.getSchemaRegistry();\n\n\t\tconst ctx: InsertionContext | undefined = cellId\n\t\t\t? resolveCellInsertionContext(state, anchorBlockId, cellId, schemaRegistry)\n\t\t\t: resolveRootInsertionContext(state, anchorBlockId, schemaRegistry);\n\t\tif (!ctx) return null;\n\n\t\tconst insertOffset: number = !cellId && isGapCursor(sel) && sel.side === 'before' ? 0 : 1;\n\t\tlet insertIndex: number = ctx.anchorIndex + insertOffset;\n\t\tlet lastBlockId: BlockId | undefined;\n\t\tlet lastBlockTextLen = 0;\n\n\t\tfor (const segment of segments) {\n\t\t\tconst block: BlockNode = segment.detection\n\t\t\t\t? this.createCodeBlockNode(segment.detection)\n\t\t\t\t: this.createParagraphNode(segment.text);\n\n\t\t\tbuilder.insertNode(ctx.parentPath, insertIndex, block);\n\t\t\tinsertIndex++;\n\t\t\tlastBlockId = block.id;\n\t\t\tlastBlockTextLen = segment.detection\n\t\t\t\t? segment.detection.formattedText.length\n\t\t\t\t: segment.text.length;\n\t\t}\n\n\t\tconst shouldRemoveAnchor: boolean = cellId\n\t\t\t? ctx.isAnchorEmpty && ctx.anchorIndex >= 0\n\t\t\t: ctx.isAnchorEmpty && !isGapCursor(sel);\n\n\t\tif (shouldRemoveAnchor) {\n\t\t\tbuilder.removeNode(ctx.parentPath, ctx.anchorIndex);\n\t\t}\n\n\t\tif (lastBlockId) {\n\t\t\tbuilder.setSelection(createCollapsedSelection(lastBlockId, lastBlockTextLen));\n\t\t}\n\n\t\treturn builder.build();\n\t}\n\n\tprivate createCodeBlockNode(detection: DetectionResult): BlockNode {\n\t\treturn createBlockNode(\n\t\t\tnodeType('code_block') as NodeTypeName,\n\t\t\t[createTextNode(detection.formattedText)],\n\t\t\tgenerateBlockId(),\n\t\t\t{ language: detection.language, backgroundColor: '' },\n\t\t);\n\t}\n\n\tprivate createParagraphNode(text: string): BlockNode {\n\t\treturn createBlockNode(\n\t\t\tnodeType('paragraph') as NodeTypeName,\n\t\t\t[createTextNode(text)],\n\t\t\tgenerateBlockId(),\n\t\t);\n\t}\n\n\tprivate announceMixedContent(segments: readonly PasteSegment[]): void {\n\t\tlet textCount = 0;\n\t\tlet codeCount = 0;\n\t\tconst languages: string[] = [];\n\n\t\tfor (const segment of segments) {\n\t\t\tif (segment.detection) {\n\t\t\t\tcodeCount++;\n\t\t\t\tif (!languages.includes(segment.detection.language)) {\n\t\t\t\t\tlanguages.push(segment.detection.language);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\ttextCount++;\n\t\t\t}\n\t\t}\n\n\t\tthis.context?.announce(this.locale.detectedMixedContent(textCount, codeCount, languages));\n\t}\n}\n"],"mappings":"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"}
@@ -0,0 +1,2 @@
1
+ import{a as t,s}from"./PluginHelpers-C3aCCGfX.mjs";import{t as o}from"./ShortcutFormatting-DZK70CN9.mjs";import{t as r}from"./SimpleMark-CezTJnXh.mjs";var i={label:"Strikethrough",tooltip:t=>`Strikethrough (${t})`},e=/* @__PURE__ */Object.assign({"./locales/ar.ts":()=>import("./ar-CkE6GDVA.mjs"),"./locales/de.ts":()=>import("./de-Dav2GzjV.mjs"),"./locales/es.ts":()=>import("./es-C0E-lFIC.mjs"),"./locales/fr.ts":()=>import("./fr-DQOE8O6_.mjs"),"./locales/hi.ts":()=>import("./hi-D_4Xi4Nv.mjs"),"./locales/pt.ts":()=>import("./pt-BCIkSb0w.mjs"),"./locales/ru.ts":()=>import("./ru-DojHc5wu.mjs"),"./locales/zh.ts":()=>import("./zh-XR7Ls7m-.mjs")});async function a(t){return s(e,t,i)}var l={},h=class{id="strikethrough";name="Strikethrough";priority=22;config;locale;constructor(t){this.config={...l,...t}}async init(s){this.locale=await t(s,this.config.locale,i,a),r(s,{markSpec:{type:"strikethrough",rank:3,toDOM:()=>document.createElement("s"),toHTMLString:(t,s)=>`<s>${s}</s>`,parseHTML:[{tag:"s"},{tag:"strike"},{tag:"del"},{tag:"span",getAttrs:t=>!!t.style.textDecoration.includes("line-through")&&{}}],sanitize:{tags:["s"]}},command:"toggleStrikethrough",keyBinding:"Mod-Shift-X",toolbar:{id:"strikethrough",group:"format",icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M10 19h4v-3h-4v3zM5 4v3h5v3h4V7h5V4H5zM3 14h18v-2H3v2z"/></svg>',label:this.locale.label,tooltip:this.locale.tooltip(o("Mod-Shift-X"))}})}};export{i as n,a as r,h as t};
2
+ //# sourceMappingURL=StrikethroughPlugin-BuFDABvz.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"StrikethroughPlugin-BuFDABvz.mjs","names":[],"sources":["../../src/plugins/strikethrough/StrikethroughLocale.ts","../../src/plugins/strikethrough/StrikethroughPlugin.ts"],"sourcesContent":["/**\n * Locale interface and default English locale for the StrikethroughPlugin.\n */\n\nimport { type LocaleModuleMap, loadLocaleModule } from '../shared/LocaleLoader.js';\n\n// --- Locale Interface ---\n\nexport interface StrikethroughLocale {\n\treadonly label: string;\n\treadonly tooltip: (shortcut: string) => string;\n}\n\n// --- Default English Locale ---\n\nexport const STRIKETHROUGH_LOCALE_EN: StrikethroughLocale = {\n\tlabel: 'Strikethrough',\n\ttooltip: (shortcut: string) => `Strikethrough (${shortcut})`,\n};\n\n// --- Lazy Locale Loader ---\n\nconst localeModules: LocaleModuleMap<StrikethroughLocale> = import.meta.glob<{\n\tdefault: StrikethroughLocale;\n}>('./locales/*.ts', { eager: false });\n\nexport async function loadStrikethroughLocale(lang: string): Promise<StrikethroughLocale> {\n\treturn loadLocaleModule(localeModules, lang, STRIKETHROUGH_LOCALE_EN);\n}\n","/**\n * StrikethroughPlugin: registers a strikethrough inline mark with MarkSpec,\n * toggle command, keyboard shortcut (Mod-Shift-X), and a toolbar button.\n */\n\nimport type { Plugin, PluginContext } from '../Plugin.js';\nimport { resolveLocale } from '../shared/PluginHelpers.js';\nimport { formatShortcut } from '../shared/ShortcutFormatting.js';\nimport { registerSimpleMark } from '../shared/SimpleMark.js';\nimport {\n\tSTRIKETHROUGH_LOCALE_EN,\n\ttype StrikethroughLocale,\n\tloadStrikethroughLocale,\n} from './StrikethroughLocale.js';\n\n// --- Attribute Registry Augmentation ---\n\ndeclare module '../../model/AttrRegistry.js' {\n\tinterface MarkAttrRegistry {\n\t\tstrikethrough: Record<string, never>;\n\t}\n}\n\n// --- Configuration ---\n\nexport interface StrikethroughConfig {\n\treadonly locale?: StrikethroughLocale;\n}\n\nconst DEFAULT_CONFIG: StrikethroughConfig = {};\n\n// --- Plugin ---\n\nexport class StrikethroughPlugin implements Plugin {\n\treadonly id = 'strikethrough';\n\treadonly name = 'Strikethrough';\n\treadonly priority = 22;\n\n\tprivate readonly config: StrikethroughConfig;\n\tprivate locale!: StrikethroughLocale;\n\n\tconstructor(config?: Partial<StrikethroughConfig>) {\n\t\tthis.config = { ...DEFAULT_CONFIG, ...config };\n\t}\n\n\tasync init(context: PluginContext): Promise<void> {\n\t\tthis.locale = await resolveLocale(\n\t\t\tcontext,\n\t\t\tthis.config.locale,\n\t\t\tSTRIKETHROUGH_LOCALE_EN,\n\t\t\tloadStrikethroughLocale,\n\t\t);\n\t\tconst icon =\n\t\t\t'<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path d=\"M10 19h4v-3h-4v3zM5 4v3h5v3h4V7h5V4H5zM3 14h18v-2H3v2z\"/></svg>';\n\n\t\tregisterSimpleMark(context, {\n\t\t\tmarkSpec: {\n\t\t\t\ttype: 'strikethrough',\n\t\t\t\trank: 3,\n\t\t\t\ttoDOM() {\n\t\t\t\t\treturn document.createElement('s');\n\t\t\t\t},\n\t\t\t\ttoHTMLString: (_mark, content) => `<s>${content}</s>`,\n\t\t\t\tparseHTML: [\n\t\t\t\t\t{ tag: 's' },\n\t\t\t\t\t{ tag: 'strike' },\n\t\t\t\t\t{ tag: 'del' },\n\t\t\t\t\t{\n\t\t\t\t\t\ttag: 'span',\n\t\t\t\t\t\tgetAttrs: (el: HTMLElement) => {\n\t\t\t\t\t\t\treturn el.style.textDecoration.includes('line-through') ? {} : false;\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t\tsanitize: { tags: ['s'] },\n\t\t\t},\n\t\t\tcommand: 'toggleStrikethrough',\n\t\t\tkeyBinding: 'Mod-Shift-X',\n\t\t\ttoolbar: {\n\t\t\t\tid: 'strikethrough',\n\t\t\t\tgroup: 'format',\n\t\t\t\ticon,\n\t\t\t\tlabel: this.locale.label,\n\t\t\t\ttooltip: this.locale.tooltip(formatShortcut('Mod-Shift-X')),\n\t\t\t},\n\t\t});\n\t}\n}\n"],"mappings":"uJAeA,IAAa,EAA+C,CAC3D,MAAO,gBACP,QAAU,GAAqB,kBAAkB,MAK5C,iBAAsD,OAAA,OAAA,CAAA,kBAAA,IAAA,OAAA,qBAAA,kBAAA,IAAA,OAAA,qBAAA,kBAAA,IAAA,OAAA,qBAAA,kBAAA,IAAA,OAAA,qBAAA,kBAAA,IAAA,OAAA,qBAAA,kBAAA,IAAA,OAAA,qBAAA,kBAAA,IAAA,OAAA,qBAAA,kBAAA,IAAA,OAAA,uBAI5D,eAAsB,EAAwB,GAC7C,OAAO,EAAiB,EAAe,EAAM,GCE9C,IAAM,EAAsC,CAAA,EAI/B,EAAb,MACC,GAAc,gBACd,KAAgB,gBAChB,SAAoB,GAEpB,OACA,OAEA,WAAA,CAAY,GACX,KAAK,OAAS,IAAK,KAAmB,GAGvC,UAAM,CAAK,GACV,KAAK,aAAe,EACnB,EACA,KAAK,OAAO,OACZ,EACA,GAKD,EAAmB,EAAS,CAC3B,SAAU,CACT,KAAM,gBACN,KAAM,EACN,MAAA,IACQ,SAAS,cAAc,KAE/B,aAAA,CAAe,EAAO,IAAY,MAAM,QACxC,UAAW,CACV,CAAE,IAAK,KACP,CAAE,IAAK,UACP,CAAE,IAAK,OACP,CACC,IAAK,OACL,SAAW,KACH,EAAG,MAAM,eAAe,SAAS,iBAAkB,CAAA,IAI7D,SAAU,CAAE,KAAM,CAAC,OAEpB,QAAS,sBACT,WAAY,cACZ,QAAS,CACR,GAAI,gBACJ,MAAO,SACP,KA5BD,uIA6BC,MAAO,KAAK,OAAO,MACnB,QAAS,KAAK,OAAO,QAAQ,EAAe"}
@@ -0,0 +1,2 @@
1
+ var e="data-notectl-style-token",t=/* @__PURE__ */new WeakMap,n=/* @__PURE__ */new WeakMap;function s(){if("undefined"==typeof CSSStyleSheet)return null;try{return new CSSStyleSheet}catch{return null}}function o(e,s){const o=n.get(e);o&&(o.destroy(),n.delete(e)),t.set(e,{nonce:s.nonce,sheet:s.sheet??null})}function i(e){const s=n.get(e);s&&(s.destroy(),n.delete(e)),t.delete(e)}function r(e,t,n){const s=f(e);s?y(s.root,s.settings).setProperty(e,t,n):d(e,t,n)}function l(e,t){r(e,t,"")}function c(e,t){const n=f(e);if(n)y(n.root,n.settings).setProperties(e,t);else for(const[s,o]of Object.entries(t))d(e,s,o??"")}function a(e,t){const n=f(e);n?y(n.root,n.settings).setStyleText(e,t):e.style.cssText=t}function h(e,t){const n=f(e);if(!n){const n=e.style.cssText;return void(e.style.cssText=n?`${n}; ${t}`:t)}y(n.root,n.settings).appendStyleText(e,t)}function u(e){const n=m(e);if(n)return t.get(n)?.nonce}function d(e,t,n){t.startsWith("--")||t.includes("-")?n?e.style.setProperty(t,n):e.style.removeProperty(t):e.style[t]=n}function f(e){const n=function(e){return m(e)}(e);if(!n)return null;const s=t.get(n);return s?{root:n,settings:s}:null}function y(e,t){const s=n.get(e);if(s)return s;const o=new p(e,t);return n.set(e,o),o}function S(e){return"undefined"!=typeof ShadowRoot&&e instanceof ShadowRoot}function k(e){return"undefined"!=typeof Document&&e instanceof Document}function m(e){const t=S(e)||k(e)?e:e.getRootNode();return S(t)||k(t)?t:"undefined"!=typeof document?document:null}var p=class{declarationByElement=/* @__PURE__ */new WeakMap;tokenByDeclaration=/* @__PURE__ */new Map;declarationByToken=/* @__PURE__ */new Map;tokenRefCount=/* @__PURE__ */new Map;tokenByElement=/* @__PURE__ */new WeakMap;tokenCounter=0;root;nonce;sheet;fallbackStyleElement=null;ownsAdoptedSheet=!1;constructor(e,t){this.root=e,this.nonce=t.nonce,this.sheet=t.sheet??null}destroy(){this.clearRuntimeRules(),this.ownsAdoptedSheet&&this.sheet&&"adoptedStyleSheets"in this.root&&(this.root.adoptedStyleSheets=this.root.adoptedStyleSheets.filter(e=>e!==this.sheet)),this.fallbackStyleElement?.remove(),this.fallbackStyleElement=null,this.sheet=null,this.ownsAdoptedSheet=!1,this.tokenByDeclaration.clear(),this.declarationByToken.clear(),this.tokenRefCount.clear(),this.tokenCounter=0}setProperty(e,t,n){const s=this.getOrCreateDeclarations(e),o=R(t);n?s.set(o,n):s.delete(o),this.syncElementToken(e,s)}setProperties(e,t){const n=this.getOrCreateDeclarations(e);for(const[s,o]of Object.entries(t)){const e=R(s);o?n.set(e,o):n.delete(e)}this.syncElementToken(e,n)}setStyleText(e,t){const n=g(t);0!==n.size?(this.declarationByElement.set(e,n),this.syncElementToken(e,n)):this.clearElementStyles(e)}appendStyleText(e,t){const n=g(t);if(0===n.size)return;const s=this.getOrCreateDeclarations(e);for(const[o,i]of n)s.set(o,i);this.syncElementToken(e,s)}getStyleText(e){const t=this.declarationByElement.get(e);return t&&0!==t.size?E(t):""}getOrCreateDeclarations(e){const t=this.declarationByElement.get(e);if(t)return t;const n=/* @__PURE__ */new Map;return this.declarationByElement.set(e,n),n}syncElementToken(t,n){const s=this.tokenByElement.get(t);if(0===n.size)return void this.clearElementStyles(t);const o=E(n);let i=this.tokenByDeclaration.get(o);i||(i=`s${this.tokenCounter.toString(36)}`,this.tokenCounter+=1,this.tokenByDeclaration.set(o,i),this.declarationByToken.set(i,o),this.insertRule(i,o)),s!==i&&(this.retainToken(i),s&&this.releaseToken(s),this.tokenByElement.set(t,i)),t.setAttribute(e,i)}insertRule(e,t){const n=`${C(e)} { ${t}; }`,s=this.ensureSheet();if(s)try{s.insertRule(n,s.cssRules.length)}catch{}}ensureSheet(){if(this.sheet)return this.sheet;if("undefined"!=typeof CSSStyleSheet)try{const e=new CSSStyleSheet;if("adoptedStyleSheets"in this.root){const t=this.root.adoptedStyleSheets;return this.root.adoptedStyleSheets=[...t,e],this.sheet=e,this.ownsAdoptedSheet=!0,e}}catch{}return this.sheet=this.ensureFallbackStyleElement().sheet??null,this.sheet}clearElementStyles(t){this.declarationByElement.delete(t);const n=this.tokenByElement.get(t);n&&(this.tokenByElement.delete(t),this.releaseToken(n)),t.removeAttribute(e)}retainToken(e){const t=this.tokenRefCount.get(e)??0;this.tokenRefCount.set(e,t+1)}releaseToken(e){const t=this.tokenRefCount.get(e);if(!t)return;if(t>1)return void this.tokenRefCount.set(e,t-1);this.tokenRefCount.delete(e);const n=this.declarationByToken.get(e);n&&(this.declarationByToken.delete(e),this.tokenByDeclaration.delete(n)),this.deleteRule(e)}deleteRule(e){const t=this.sheet;if(!t)return;const n=C(e);for(let s=t.cssRules.length-1;s>=0;s-=1){const e=t.cssRules[s];if(e&&T(e,n)){try{t.deleteRule(s)}catch{}return}}}clearRuntimeRules(){const t=this.sheet;if(t)for(let n=t.cssRules.length-1;n>=0;n-=1){const s=t.cssRules[n];if(s&&s.cssText.includes(`[${e}="`))try{t.deleteRule(n)}catch{}}}ensureFallbackStyleElement(){if(this.fallbackStyleElement)return this.fallbackStyleElement;const e=document.createElement("style");return e.setAttribute("data-notectl-runtime-styles",""),this.nonce&&e.setAttribute("nonce",this.nonce),S(this.root)?this.root.appendChild(e):(this.root.head??this.root.documentElement).appendChild(e),this.fallbackStyleElement=e,e}};function g(e){const t=/* @__PURE__ */new Map;for(const n of e.split(";")){const e=n.trim();if(!e)continue;const s=e.indexOf(":");if(s<=0)continue;const o=R(e.slice(0,s)),i=e.slice(s+1).trim();i?t.set(o,i):t.delete(o)}return t}function E(e){return Array.from(e.entries()).sort(([e],[t])=>e.localeCompare(t)).map(([e,t])=>`${e}: ${t}`).join("; ")}function R(e){const t=e.trim();return t?t.startsWith("--")?t:t.includes("-")?t.toLowerCase():t.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`).toLowerCase():""}function C(t){return`[${e}="${t}"]`}function T(e,t){return"undefined"!=typeof CSSStyleRule&&e instanceof CSSStyleRule?e.selectorText===t:e.cssText.includes(t)}export{l as a,a as c,o as i,i as l,s as n,c as o,u as r,r as s,h as t};
2
+ //# sourceMappingURL=StyleRuntime-Bwde5icB.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"StyleRuntime-Bwde5icB.mjs","names":[],"sources":["../../src/style/StyleRuntime.ts"],"sourcesContent":["/**\n * Runtime style abstraction.\n *\n * Writes no inline styles and instead assigns token attributes\n * backed by dynamic CSS rules in a stylesheet.\n * Elements outside a registered root fall back to inline styles.\n */\n\nexport interface StyleRootOptions {\n\treadonly nonce?: string;\n\treadonly sheet?: CSSStyleSheet | null;\n}\n\ntype StyleRoot = ShadowRoot | Document;\n\ninterface RootConfig {\n\treadonly nonce?: string;\n\treadonly sheet: CSSStyleSheet | null;\n}\n\nconst STYLE_TOKEN_ATTR = 'data-notectl-style-token';\nconst STYLE_ELEMENT_ATTR = 'data-notectl-runtime-styles';\n\nconst rootConfigs: WeakMap<StyleRoot, RootConfig> = new WeakMap();\nconst strictEngines: WeakMap<StyleRoot, StrictStyleEngine> = new WeakMap();\n\n/** Creates a constructable stylesheet when the environment supports it. */\nexport function createRuntimeStyleSheet(): CSSStyleSheet | null {\n\tif (typeof CSSStyleSheet === 'undefined') return null;\n\ttry {\n\t\treturn new CSSStyleSheet();\n\t} catch {\n\t\treturn null;\n\t}\n}\n\n/** Registers styling mode for a root (shadow root or document). */\nexport function registerStyleRoot(root: StyleRoot, options: StyleRootOptions): void {\n\tconst previous = strictEngines.get(root);\n\tif (previous) {\n\t\tprevious.destroy();\n\t\tstrictEngines.delete(root);\n\t}\n\trootConfigs.set(root, {\n\t\tnonce: options.nonce,\n\t\tsheet: options.sheet ?? null,\n\t});\n}\n\n/** Unregisters root styling and tears down strict runtime state if present. */\nexport function unregisterStyleRoot(root: StyleRoot): void {\n\tconst engine = strictEngines.get(root);\n\tif (engine) {\n\t\tengine.destroy();\n\t\tstrictEngines.delete(root);\n\t}\n\trootConfigs.delete(root);\n}\n\n/** Sets a single style property. Empty value removes the property. */\nexport function setStyleProperty(el: HTMLElement, property: string, value: string): void {\n\tconst config = resolveConfig(el);\n\tif (!config) {\n\t\tsetInlineProperty(el, property, value);\n\t\treturn;\n\t}\n\tgetStrictEngine(config.root, config.settings).setProperty(el, property, value);\n}\n\n/** Removes a single style property. */\nexport function removeStyleProperty(el: HTMLElement, property: string): void {\n\tsetStyleProperty(el, property, '');\n}\n\n/** Sets multiple style properties in one call. */\nexport function setStyleProperties(\n\tel: HTMLElement,\n\tproperties: Readonly<Record<string, string | undefined | null>>,\n): void {\n\tconst config = resolveConfig(el);\n\tif (!config) {\n\t\tfor (const [property, value] of Object.entries(properties)) {\n\t\t\tsetInlineProperty(el, property, value ?? '');\n\t\t}\n\t\treturn;\n\t}\n\tgetStrictEngine(config.root, config.settings).setProperties(el, properties);\n}\n\n/** Replaces the element style text. */\nexport function setStyleText(el: HTMLElement, cssText: string): void {\n\tconst config = resolveConfig(el);\n\tif (!config) {\n\t\tel.style.cssText = cssText;\n\t\treturn;\n\t}\n\tgetStrictEngine(config.root, config.settings).setStyleText(el, cssText);\n}\n\n/** Merges a cssText fragment into current element styles. */\nexport function appendStyleText(el: HTMLElement, cssText: string): void {\n\tconst config = resolveConfig(el);\n\tif (!config) {\n\t\tconst current = el.style.cssText;\n\t\tel.style.cssText = current ? `${current}; ${cssText}` : cssText;\n\t\treturn;\n\t}\n\tgetStrictEngine(config.root, config.settings).appendStyleText(el, cssText);\n}\n\n/** Returns serialized styles for an element. */\nexport function getStyleText(el: HTMLElement): string {\n\tconst config = resolveConfig(el);\n\tif (!config) return el.style.cssText;\n\treturn getStrictEngine(config.root, config.settings).getStyleText(el);\n}\n\n/** Returns the configured CSP nonce for the node's style root (if any). */\nexport function getStyleNonceForNode(node: Node): string | undefined {\n\tconst root = resolveStyleRootFromNode(node);\n\tif (!root) return undefined;\n\treturn rootConfigs.get(root)?.nonce;\n}\n\nfunction setInlineProperty(el: HTMLElement, property: string, value: string): void {\n\tif (property.startsWith('--')) {\n\t\tif (value) {\n\t\t\tel.style.setProperty(property, value);\n\t\t} else {\n\t\t\tel.style.removeProperty(property);\n\t\t}\n\t\treturn;\n\t}\n\tif (property.includes('-')) {\n\t\tif (value) {\n\t\t\tel.style.setProperty(property, value);\n\t\t} else {\n\t\t\tel.style.removeProperty(property);\n\t\t}\n\t\treturn;\n\t}\n\t(el.style as CSSStyleDeclaration & Record<string, string>)[property] = value;\n}\n\nfunction resolveConfig(el: HTMLElement): { root: StyleRoot; settings: RootConfig } | null {\n\tconst root = resolveStyleRoot(el);\n\tif (!root) return null;\n\tconst settings = rootConfigs.get(root);\n\tif (!settings) return null;\n\treturn { root, settings };\n}\n\nfunction resolveStyleRoot(el: HTMLElement): StyleRoot | null {\n\treturn resolveStyleRootFromNode(el);\n}\n\nfunction getStrictEngine(root: StyleRoot, config: RootConfig): StrictStyleEngine {\n\tconst cached = strictEngines.get(root);\n\tif (cached) return cached;\n\tconst engine = new StrictStyleEngine(root, config);\n\tstrictEngines.set(root, engine);\n\treturn engine;\n}\n\nfunction isShadowRoot(value: unknown): value is ShadowRoot {\n\treturn typeof ShadowRoot !== 'undefined' && value instanceof ShadowRoot;\n}\n\nfunction isDocument(value: unknown): value is Document {\n\treturn typeof Document !== 'undefined' && value instanceof Document;\n}\n\nfunction resolveStyleRootFromNode(node: Node): StyleRoot | null {\n\tconst rootNode: Node = isShadowRoot(node) || isDocument(node) ? node : node.getRootNode();\n\tif (isShadowRoot(rootNode)) return rootNode;\n\tif (isDocument(rootNode)) return rootNode;\n\tif (typeof document !== 'undefined') return document;\n\treturn null;\n}\n\nclass StrictStyleEngine {\n\tprivate readonly declarationByElement: WeakMap<HTMLElement, Map<string, string>> = new WeakMap();\n\tprivate readonly tokenByDeclaration: Map<string, string> = new Map();\n\tprivate readonly declarationByToken: Map<string, string> = new Map();\n\tprivate readonly tokenRefCount: Map<string, number> = new Map();\n\tprivate readonly tokenByElement: WeakMap<HTMLElement, string> = new WeakMap();\n\tprivate tokenCounter = 0;\n\tprivate readonly root: StyleRoot;\n\tprivate readonly nonce?: string;\n\tprivate sheet: CSSStyleSheet | null;\n\tprivate fallbackStyleElement: HTMLStyleElement | null = null;\n\tprivate ownsAdoptedSheet = false;\n\n\tconstructor(root: StyleRoot, config: RootConfig) {\n\t\tthis.root = root;\n\t\tthis.nonce = config.nonce;\n\t\tthis.sheet = config.sheet ?? null;\n\t}\n\n\tdestroy(): void {\n\t\tthis.clearRuntimeRules();\n\t\tif (this.ownsAdoptedSheet && this.sheet && 'adoptedStyleSheets' in this.root) {\n\t\t\tthis.root.adoptedStyleSheets = this.root.adoptedStyleSheets.filter(\n\t\t\t\t(adoptedSheet: CSSStyleSheet): boolean => adoptedSheet !== this.sheet,\n\t\t\t);\n\t\t}\n\t\tthis.fallbackStyleElement?.remove();\n\t\tthis.fallbackStyleElement = null;\n\t\tthis.sheet = null;\n\t\tthis.ownsAdoptedSheet = false;\n\t\tthis.tokenByDeclaration.clear();\n\t\tthis.declarationByToken.clear();\n\t\tthis.tokenRefCount.clear();\n\t\tthis.tokenCounter = 0;\n\t}\n\n\tsetProperty(el: HTMLElement, property: string, value: string): void {\n\t\tconst declarations = this.getOrCreateDeclarations(el);\n\t\tconst name = normalizePropertyName(property);\n\t\tif (!value) {\n\t\t\tdeclarations.delete(name);\n\t\t} else {\n\t\t\tdeclarations.set(name, value);\n\t\t}\n\t\tthis.syncElementToken(el, declarations);\n\t}\n\n\tsetProperties(\n\t\tel: HTMLElement,\n\t\tproperties: Readonly<Record<string, string | undefined | null>>,\n\t): void {\n\t\tconst declarations = this.getOrCreateDeclarations(el);\n\t\tfor (const [property, value] of Object.entries(properties)) {\n\t\t\tconst name = normalizePropertyName(property);\n\t\t\tif (!value) {\n\t\t\t\tdeclarations.delete(name);\n\t\t\t} else {\n\t\t\t\tdeclarations.set(name, value);\n\t\t\t}\n\t\t}\n\t\tthis.syncElementToken(el, declarations);\n\t}\n\n\tsetStyleText(el: HTMLElement, cssText: string): void {\n\t\tconst declarations = parseStyleText(cssText);\n\t\tif (declarations.size === 0) {\n\t\t\tthis.clearElementStyles(el);\n\t\t\treturn;\n\t\t}\n\t\tthis.declarationByElement.set(el, declarations);\n\t\tthis.syncElementToken(el, declarations);\n\t}\n\n\tappendStyleText(el: HTMLElement, cssText: string): void {\n\t\tconst parsed = parseStyleText(cssText);\n\t\tif (parsed.size === 0) return;\n\t\tconst declarations = this.getOrCreateDeclarations(el);\n\t\tfor (const [property, value] of parsed) {\n\t\t\tdeclarations.set(property, value);\n\t\t}\n\t\tthis.syncElementToken(el, declarations);\n\t}\n\n\tgetStyleText(el: HTMLElement): string {\n\t\tconst declarations = this.declarationByElement.get(el);\n\t\tif (!declarations || declarations.size === 0) return '';\n\t\treturn serializeDeclarations(declarations);\n\t}\n\n\tprivate getOrCreateDeclarations(el: HTMLElement): Map<string, string> {\n\t\tconst existing = this.declarationByElement.get(el);\n\t\tif (existing) return existing;\n\t\tconst created = new Map<string, string>();\n\t\tthis.declarationByElement.set(el, created);\n\t\treturn created;\n\t}\n\n\tprivate syncElementToken(el: HTMLElement, declarations: Map<string, string>): void {\n\t\tconst previousToken = this.tokenByElement.get(el);\n\t\tif (declarations.size === 0) {\n\t\t\tthis.clearElementStyles(el);\n\t\t\treturn;\n\t\t}\n\n\t\tconst declarationText = serializeDeclarations(declarations);\n\t\tlet token = this.tokenByDeclaration.get(declarationText);\n\t\tif (!token) {\n\t\t\ttoken = `s${this.tokenCounter.toString(36)}`;\n\t\t\tthis.tokenCounter += 1;\n\t\t\tthis.tokenByDeclaration.set(declarationText, token);\n\t\t\tthis.declarationByToken.set(token, declarationText);\n\t\t\tthis.insertRule(token, declarationText);\n\t\t}\n\t\tif (previousToken !== token) {\n\t\t\tthis.retainToken(token);\n\t\t\tif (previousToken) {\n\t\t\t\tthis.releaseToken(previousToken);\n\t\t\t}\n\t\t\tthis.tokenByElement.set(el, token);\n\t\t}\n\t\tel.setAttribute(STYLE_TOKEN_ATTR, token);\n\t}\n\n\tprivate insertRule(token: string, declarationText: string): void {\n\t\tconst rule = `${buildTokenSelector(token)} { ${declarationText}; }`;\n\t\tconst sheet = this.ensureSheet();\n\t\tif (!sheet) return;\n\t\ttry {\n\t\t\tsheet.insertRule(rule, sheet.cssRules.length);\n\t\t} catch {\n\t\t\t// Ignore malformed declarations from third-party plugin attrs.\n\t\t}\n\t}\n\n\tprivate ensureSheet(): CSSStyleSheet | null {\n\t\tif (this.sheet) return this.sheet;\n\n\t\tif (typeof CSSStyleSheet !== 'undefined') {\n\t\t\ttry {\n\t\t\t\tconst sheet = new CSSStyleSheet();\n\t\t\t\tif ('adoptedStyleSheets' in this.root) {\n\t\t\t\t\tconst adopted = this.root.adoptedStyleSheets;\n\t\t\t\t\tthis.root.adoptedStyleSheets = [...adopted, sheet];\n\t\t\t\t\tthis.sheet = sheet;\n\t\t\t\t\tthis.ownsAdoptedSheet = true;\n\t\t\t\t\treturn sheet;\n\t\t\t\t}\n\t\t\t} catch {\n\t\t\t\t// Fall through to style element fallback.\n\t\t\t}\n\t\t}\n\n\t\tconst style = this.ensureFallbackStyleElement();\n\t\tthis.sheet = (style.sheet as CSSStyleSheet | null) ?? null;\n\t\treturn this.sheet;\n\t}\n\n\tprivate clearElementStyles(el: HTMLElement): void {\n\t\tthis.declarationByElement.delete(el);\n\t\tconst token = this.tokenByElement.get(el);\n\t\tif (token) {\n\t\t\tthis.tokenByElement.delete(el);\n\t\t\tthis.releaseToken(token);\n\t\t}\n\t\tel.removeAttribute(STYLE_TOKEN_ATTR);\n\t}\n\n\tprivate retainToken(token: string): void {\n\t\tconst current = this.tokenRefCount.get(token) ?? 0;\n\t\tthis.tokenRefCount.set(token, current + 1);\n\t}\n\n\tprivate releaseToken(token: string): void {\n\t\tconst current = this.tokenRefCount.get(token);\n\t\tif (!current) return;\n\t\tif (current > 1) {\n\t\t\tthis.tokenRefCount.set(token, current - 1);\n\t\t\treturn;\n\t\t}\n\t\tthis.tokenRefCount.delete(token);\n\t\tconst declaration = this.declarationByToken.get(token);\n\t\tif (declaration) {\n\t\t\tthis.declarationByToken.delete(token);\n\t\t\tthis.tokenByDeclaration.delete(declaration);\n\t\t}\n\t\tthis.deleteRule(token);\n\t}\n\n\tprivate deleteRule(token: string): void {\n\t\tconst sheet = this.sheet;\n\t\tif (!sheet) return;\n\t\tconst selector = buildTokenSelector(token);\n\t\tfor (let index = sheet.cssRules.length - 1; index >= 0; index -= 1) {\n\t\t\tconst rule = sheet.cssRules[index];\n\t\t\tif (!rule || !isTokenSelectorMatch(rule, selector)) continue;\n\t\t\ttry {\n\t\t\t\tsheet.deleteRule(index);\n\t\t\t} catch {\n\t\t\t\t// Ignore parser/runtime discrepancies in unsupported environments.\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t}\n\n\tprivate clearRuntimeRules(): void {\n\t\tconst sheet = this.sheet;\n\t\tif (!sheet) return;\n\t\tfor (let index = sheet.cssRules.length - 1; index >= 0; index -= 1) {\n\t\t\tconst rule = sheet.cssRules[index];\n\t\t\tif (!rule || !rule.cssText.includes(`[${STYLE_TOKEN_ATTR}=\"`)) continue;\n\t\t\ttry {\n\t\t\t\tsheet.deleteRule(index);\n\t\t\t} catch {\n\t\t\t\t// Ignore parser/runtime discrepancies in unsupported environments.\n\t\t\t}\n\t\t}\n\t}\n\n\tprivate ensureFallbackStyleElement(): HTMLStyleElement {\n\t\tif (this.fallbackStyleElement) return this.fallbackStyleElement;\n\t\tconst style: HTMLStyleElement = document.createElement('style');\n\t\tstyle.setAttribute(STYLE_ELEMENT_ATTR, '');\n\t\tif (this.nonce) {\n\t\t\tstyle.setAttribute('nonce', this.nonce);\n\t\t}\n\t\tif (isShadowRoot(this.root)) {\n\t\t\tthis.root.appendChild(style);\n\t\t} else {\n\t\t\tconst host = this.root.head ?? this.root.documentElement;\n\t\t\thost.appendChild(style);\n\t\t}\n\t\tthis.fallbackStyleElement = style;\n\t\treturn style;\n\t}\n}\n\nfunction parseStyleText(styleText: string): Map<string, string> {\n\tconst declarations = new Map<string, string>();\n\tfor (const rawPart of styleText.split(';')) {\n\t\tconst part = rawPart.trim();\n\t\tif (!part) continue;\n\t\tconst separator = part.indexOf(':');\n\t\tif (separator <= 0) continue;\n\t\tconst property = normalizePropertyName(part.slice(0, separator));\n\t\tconst value = part.slice(separator + 1).trim();\n\t\tif (!value) {\n\t\t\tdeclarations.delete(property);\n\t\t} else {\n\t\t\tdeclarations.set(property, value);\n\t\t}\n\t}\n\treturn declarations;\n}\n\nfunction serializeDeclarations(declarations: Map<string, string>): string {\n\tconst ordered: [string, string][] = Array.from(declarations.entries()).sort(([a], [b]) =>\n\t\ta.localeCompare(b),\n\t);\n\treturn ordered.map(([property, value]) => `${property}: ${value}`).join('; ');\n}\n\nfunction normalizePropertyName(property: string): string {\n\tconst trimmed = property.trim();\n\tif (!trimmed) return '';\n\tif (trimmed.startsWith('--')) return trimmed;\n\tif (trimmed.includes('-')) return trimmed.toLowerCase();\n\treturn trimmed.replace(/[A-Z]/g, (char: string) => `-${char.toLowerCase()}`).toLowerCase();\n}\n\nfunction buildTokenSelector(token: string): string {\n\treturn `[${STYLE_TOKEN_ATTR}=\"${token}\"]`;\n}\n\nfunction isTokenSelectorMatch(rule: CSSRule, selector: string): boolean {\n\tif (typeof CSSStyleRule !== 'undefined' && rule instanceof CSSStyleRule) {\n\t\treturn rule.selectorText === selector;\n\t}\n\treturn rule.cssText.includes(selector);\n}\n"],"mappings":"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"}
@@ -0,0 +1,2 @@
1
+ import{_ as s,m as t}from"./Commands-ixGhPiRG.mjs";import{i as e}from"./TypeBrands-BZDKMjR-.mjs";import{a as i,n as r,o,s as p}from"./PluginHelpers-C3aCCGfX.mjs";import{t as c}from"./ShortcutFormatting-DZK70CN9.mjs";var a={superscriptLabel:"Superscript",superscriptTooltip:s=>`Superscript (${s})`,subscriptLabel:"Subscript",subscriptTooltip:s=>`Subscript (${s})`},n=/* @__PURE__ */Object.assign({"./locales/ar.ts":()=>import("./ar-C_ir5Uf4.mjs"),"./locales/de.ts":()=>import("./de-CvnyjI_X.mjs"),"./locales/es.ts":()=>import("./es-CksXDFxg.mjs"),"./locales/fr.ts":()=>import("./fr-DMA4CAyo.mjs"),"./locales/hi.ts":()=>import("./hi-dV2GZgH_.mjs"),"./locales/pt.ts":()=>import("./pt-CUPKr943.mjs"),"./locales/ru.ts":()=>import("./ru-DN6yN_w9.mjs"),"./locales/zh.ts":()=>import("./zh-B02VPMqX.mjs")});async function l(s){return p(n,s,a)}var u={superscript:!0,subscript:!0},m=[{type:"superscript",opposite:"subscript",configKey:"superscript",rank:4,tag:"sup",icon:['<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">','<path d="M16 7.41L11.41 12 16 16.59 14.59 18l-6-6 6-6z"',' fill="none"/>','<path d="M9.64 7.64c.23-.5.36-1.05.36-1.64'," 0-2.21-1.79-4-4-4H2v14h4.36c2.34 0 4.24-1.9"," 4.24-4.24 0-1.6-.89-2.99-2.2-3.71zM4.5 4.5H6c.83"," 0 1.5.67 1.5 1.5S6.83 7.5 6 7.5H4.5v-3zm2 9H4.5v-3H6.5c.83",' 0 1.5.67 1.5 1.5s-.67 1.5-1.5 1.5z" fill="none"/>','<path d="M15.97 3.84c0-.47.19-.91.53-1.21.34-.31.8-.49'," 1.3-.49.5 0 .95.18 1.28.48.32.3.5.7.51 1.15h1.59c-.02","-.96-.43-1.83-1.13-2.42C19.36.77 18.45.44 17.5.44c-.88"," 0-1.74.28-2.39.8-.67.53-1.06 1.28-1.06 2.1 0 .76.34"," 1.47.93 1.97.59.49 1.41.84 2.32 1.15.7.24 1.26.5 1.62.8.35.3.53.64.53"," 1.02 0 .48-.2.93-.55 1.24-.36.3-.84.48-1.37.48-.55 0-1.04-.2-1.39-.54","-.34-.33-.53-.8-.53-1.32h-1.58c.01 1.02.43 1.95 1.16 2.57.72.62 1.67.96"," 2.67.96.92 0 1.81-.3 2.46-.84.67-.56 1.04-1.33 1.04-2.18 0-.81-.36-1.56","-.99-2.08-.62-.51-1.48-.88-2.43-1.2-.67-.23-1.2-.47-1.52-.75-.32-.27-.46",'-.59-.46-.94z"/>','<path d="M5.88 20h2.66l3.4-5.42L15.3 20h2.67l-4.73-7.38',' 4.37-6.62h-2.6l-3.07 4.98L8.92 6h-2.6l4.26 6.58z"/>',"</svg>"].join(""),keyBinding:"Mod-.",toHTMLString:s=>`<sup>${s}</sup>`,parseHTML:[{tag:"sup"}],sanitize:{tags:["sup"]}},{type:"subscript",opposite:"superscript",configKey:"subscript",rank:4,tag:"sub",icon:['<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">','<path d="M15.97 16.84c0-.47.19-.91.53-1.21.34-.31.8-.49'," 1.3-.49.5 0 .95.18 1.28.48.32.3.5.7.51 1.15h1.59c-.02","-.96-.43-1.83-1.13-2.42-.7-.58-1.61-.91-2.56-.91-.88"," 0-1.74.28-2.39.8-.67.53-1.06 1.28-1.06 2.1 0 .76.34"," 1.47.93 1.97.59.49 1.41.84 2.32 1.15.7.24 1.26.5 1.62.8.35.3.53.64.53"," 1.02 0 .48-.2.93-.55 1.24-.36.3-.84.48-1.37.48-.55 0-1.04-.2-1.39-.54","-.34-.33-.53-.8-.53-1.32h-1.58c.01 1.02.43 1.95 1.16 2.57.72.62 1.67.96"," 2.67.96.92 0 1.81-.3 2.46-.84.67-.56 1.04-1.33 1.04-2.18 0-.81-.36-1.56","-.99-2.08-.62-.51-1.48-.88-2.43-1.2-.67-.23-1.2-.47-1.52-.75-.32-.27-.46",'-.59-.46-.94z"/>','<path d="M5.88 18h2.66l3.4-5.42L15.3 18h2.67l-4.73-7.38',' 4.37-6.62h-2.6l-3.07 4.98L8.92 4h-2.6l4.26 6.58z"/>',"</svg>"].join(""),keyBinding:"Mod-,",toHTMLString:s=>`<sub>${s}</sub>`,parseHTML:[{tag:"sub"}],sanitize:{tags:["sub"]}}],g=class{id="super-sub";name="Superscript & Subscript";priority=23;config;locale;constructor(s){this.config={...u,...s}}async init(s){this.locale=await i(s,this.config.locale,a,l);const t=m.filter(s=>this.config[s.configKey]);for(const e of t)this.registerMark(s,e);this.registerKeymaps(s,t),this.registerExclusivityMiddleware(s,t),this.registerDisabledToolbarItems(s)}registerMark(i,p){const a=o(p.type),n=this.isToolbarVisible(p.configKey);if(i.registerMarkSpec({type:p.type,rank:p.rank,toDOM:()=>document.createElement(p.tag),toHTMLString:(s,t)=>p.toHTMLString(t),parseHTML:p.parseHTML,sanitize:p.sanitize}),i.registerCommand(a,()=>r(i,s(i.getState(),e(p.type)))),n){const s="superscript"===p.type?this.locale.superscriptLabel:this.locale.subscriptLabel,r="superscript"===p.type?this.locale.superscriptTooltip(c(p.keyBinding)):this.locale.subscriptTooltip(c(p.keyBinding));i.registerToolbarItem({id:p.type,group:"format",icon:p.icon,label:s,tooltip:r,command:a,isActive:s=>t(s,e(p.type))})}}registerKeymaps(s,t){const e={};for(const i of t){const t=o(i.type);e[i.keyBinding]=()=>s.executeCommand(t)}Object.keys(e).length>0&&s.registerKeymap(e)}registerExclusivityMiddleware(s,t){t.some(s=>"superscript"===s.type)&&t.some(s=>"subscript"===s.type)&&s.registerMiddleware((s,t,i)=>{let r=!1;const o=[];for(const c of s.steps){if("addMark"!==c.type){o.push(c);continue}const s=c.mark.type,t=m.find(t=>t.type===s);if(!t){o.push(c);continue}r=!0;const i={type:"removeMark",blockId:c.blockId,from:c.from,to:c.to,mark:{type:e(t.opposite)},...c.path?{path:c.path}:{}};o.push(i,c)}let p=s.storedMarksAfter;if(p){const s=p.some(s=>"superscript"===s.type),t=p.some(s=>"subscript"===s.type);if(s&&t){const s=p.findLastIndex(s=>"superscript"===s.type)>p.findLastIndex(s=>"subscript"===s.type)?"subscript":"superscript";p=p.filter(t=>t.type!==s),r=!0}}i(r?{...s,steps:o,storedMarksAfter:p}:s)},{name:"super-sub:exclusivity"})}registerDisabledToolbarItems(s){if(this.config.toolbar)for(const t of m){const e=this.config[t.configKey],i=this.config.toolbar[t.configKey]??!0;if(!e&&i){const e="superscript"===t.type?this.locale.superscriptLabel:this.locale.subscriptLabel;s.registerToolbarItem({id:t.type,group:"format",icon:t.icon,label:e,command:o(t.type),isEnabled:()=>!1})}}}isToolbarVisible(s){return!this.config.toolbar||(this.config.toolbar[s]??!0)}};export{a as n,l as r,g as t};
2
+ //# sourceMappingURL=SuperSubPlugin-CiLJ7i4s.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SuperSubPlugin-CiLJ7i4s.mjs","names":[],"sources":["../../src/plugins/super-sub/SuperSubLocale.ts","../../src/plugins/super-sub/SuperSubPlugin.ts"],"sourcesContent":["/**\n * Locale interface and default English locale for the SuperSubPlugin.\n */\n\nimport { type LocaleModuleMap, loadLocaleModule } from '../shared/LocaleLoader.js';\n\n// --- Locale Interface ---\n\nexport interface SuperSubLocale {\n\treadonly superscriptLabel: string;\n\treadonly superscriptTooltip: (shortcut: string) => string;\n\treadonly subscriptLabel: string;\n\treadonly subscriptTooltip: (shortcut: string) => string;\n}\n\n// --- Default English Locale ---\n\nexport const SUPER_SUB_LOCALE_EN: SuperSubLocale = {\n\tsuperscriptLabel: 'Superscript',\n\tsuperscriptTooltip: (shortcut: string) => `Superscript (${shortcut})`,\n\tsubscriptLabel: 'Subscript',\n\tsubscriptTooltip: (shortcut: string) => `Subscript (${shortcut})`,\n};\n\n// --- Lazy Locale Loader ---\n\nconst localeModules: LocaleModuleMap<SuperSubLocale> = import.meta.glob<{\n\tdefault: SuperSubLocale;\n}>('./locales/*.ts', { eager: false });\n\nexport async function loadSuperSubLocale(lang: string): Promise<SuperSubLocale> {\n\treturn loadLocaleModule(localeModules, lang, SUPER_SUB_LOCALE_EN);\n}\n","/**\n * SuperSubPlugin: registers superscript and subscript inline marks with\n * MarkSpecs, toggle commands, keyboard shortcuts, toolbar buttons, and\n * a middleware that enforces mutual exclusivity between the two marks.\n *\n * Data-driven — each mark type is defined declaratively and all\n * registrations are derived from the same definition table.\n */\n\nimport { isMarkActive, toggleMark } from '../../commands/Commands.js';\nimport type { Mark } from '../../model/Document.js';\nimport type { ParseRule } from '../../model/ParseRule.js';\nimport type { SanitizeConfig } from '../../model/SanitizeConfig.js';\nimport { markType as mkType } from '../../model/TypeBrands.js';\nimport type { RemoveMarkStep, Step } from '../../state/Transaction.js';\nimport type { Plugin, PluginContext } from '../Plugin.js';\nimport { dispatchIfPresent, resolveLocale, toCommandName } from '../shared/PluginHelpers.js';\nimport { formatShortcut } from '../shared/ShortcutFormatting.js';\nimport { SUPER_SUB_LOCALE_EN, type SuperSubLocale, loadSuperSubLocale } from './SuperSubLocale.js';\n\n// --- Attribute Registry Augmentation ---\n\ndeclare module '../../model/AttrRegistry.js' {\n\tinterface MarkAttrRegistry {\n\t\tsuperscript: Record<string, never>;\n\t\tsubscript: Record<string, never>;\n\t}\n}\n\n// --- Configuration ---\n\n/** Controls toolbar button visibility per mark. */\nexport interface SuperSubToolbarConfig {\n\treadonly superscript?: boolean;\n\treadonly subscript?: boolean;\n}\n\n/** Controls which marks are enabled and which toolbar buttons are shown. */\nexport interface SuperSubConfig {\n\treadonly superscript: boolean;\n\treadonly subscript: boolean;\n\treadonly toolbar?: SuperSubToolbarConfig;\n\treadonly locale?: SuperSubLocale;\n}\n\nconst DEFAULT_CONFIG: SuperSubConfig = {\n\tsuperscript: true,\n\tsubscript: true,\n};\n\n// --- Mark Definitions ---\n\ninterface MarkDefinition {\n\treadonly type: 'superscript' | 'subscript';\n\treadonly opposite: 'superscript' | 'subscript';\n\treadonly configKey: keyof Omit<SuperSubConfig, 'toolbar' | 'locale'>;\n\treadonly rank: number;\n\treadonly tag: string;\n\treadonly icon: string;\n\treadonly keyBinding: string;\n\treadonly toHTMLString: (content: string) => string;\n\treadonly parseHTML: readonly ParseRule[];\n\treadonly sanitize: SanitizeConfig;\n}\n\nconst SUPERSCRIPT_ICON: string = [\n\t'<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">',\n\t'<path d=\"M16 7.41L11.41 12 16 16.59 14.59 18l-6-6 6-6z\"',\n\t' fill=\"none\"/>',\n\t'<path d=\"M9.64 7.64c.23-.5.36-1.05.36-1.64',\n\t' 0-2.21-1.79-4-4-4H2v14h4.36c2.34 0 4.24-1.9',\n\t' 4.24-4.24 0-1.6-.89-2.99-2.2-3.71zM4.5 4.5H6c.83',\n\t' 0 1.5.67 1.5 1.5S6.83 7.5 6 7.5H4.5v-3zm2 9H4.5v-3H6.5c.83',\n\t' 0 1.5.67 1.5 1.5s-.67 1.5-1.5 1.5z\" fill=\"none\"/>',\n\t'<path d=\"M15.97 3.84c0-.47.19-.91.53-1.21.34-.31.8-.49',\n\t' 1.3-.49.5 0 .95.18 1.28.48.32.3.5.7.51 1.15h1.59c-.02',\n\t'-.96-.43-1.83-1.13-2.42C19.36.77 18.45.44 17.5.44c-.88',\n\t' 0-1.74.28-2.39.8-.67.53-1.06 1.28-1.06 2.1 0 .76.34',\n\t' 1.47.93 1.97.59.49 1.41.84 2.32 1.15.7.24 1.26.5 1.62.8.35.3.53.64.53',\n\t' 1.02 0 .48-.2.93-.55 1.24-.36.3-.84.48-1.37.48-.55 0-1.04-.2-1.39-.54',\n\t'-.34-.33-.53-.8-.53-1.32h-1.58c.01 1.02.43 1.95 1.16 2.57.72.62 1.67.96',\n\t' 2.67.96.92 0 1.81-.3 2.46-.84.67-.56 1.04-1.33 1.04-2.18 0-.81-.36-1.56',\n\t'-.99-2.08-.62-.51-1.48-.88-2.43-1.2-.67-.23-1.2-.47-1.52-.75-.32-.27-.46',\n\t'-.59-.46-.94z\"/>',\n\t'<path d=\"M5.88 20h2.66l3.4-5.42L15.3 20h2.67l-4.73-7.38',\n\t' 4.37-6.62h-2.6l-3.07 4.98L8.92 6h-2.6l4.26 6.58z\"/>',\n\t'</svg>',\n].join('');\n\nconst SUBSCRIPT_ICON: string = [\n\t'<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">',\n\t'<path d=\"M15.97 16.84c0-.47.19-.91.53-1.21.34-.31.8-.49',\n\t' 1.3-.49.5 0 .95.18 1.28.48.32.3.5.7.51 1.15h1.59c-.02',\n\t'-.96-.43-1.83-1.13-2.42-.7-.58-1.61-.91-2.56-.91-.88',\n\t' 0-1.74.28-2.39.8-.67.53-1.06 1.28-1.06 2.1 0 .76.34',\n\t' 1.47.93 1.97.59.49 1.41.84 2.32 1.15.7.24 1.26.5 1.62.8.35.3.53.64.53',\n\t' 1.02 0 .48-.2.93-.55 1.24-.36.3-.84.48-1.37.48-.55 0-1.04-.2-1.39-.54',\n\t'-.34-.33-.53-.8-.53-1.32h-1.58c.01 1.02.43 1.95 1.16 2.57.72.62 1.67.96',\n\t' 2.67.96.92 0 1.81-.3 2.46-.84.67-.56 1.04-1.33 1.04-2.18 0-.81-.36-1.56',\n\t'-.99-2.08-.62-.51-1.48-.88-2.43-1.2-.67-.23-1.2-.47-1.52-.75-.32-.27-.46',\n\t'-.59-.46-.94z\"/>',\n\t'<path d=\"M5.88 18h2.66l3.4-5.42L15.3 18h2.67l-4.73-7.38',\n\t' 4.37-6.62h-2.6l-3.07 4.98L8.92 4h-2.6l4.26 6.58z\"/>',\n\t'</svg>',\n].join('');\n\nconst MARK_DEFINITIONS: readonly MarkDefinition[] = [\n\t{\n\t\ttype: 'superscript',\n\t\topposite: 'subscript',\n\t\tconfigKey: 'superscript',\n\t\trank: 4,\n\t\ttag: 'sup',\n\t\ticon: SUPERSCRIPT_ICON,\n\t\tkeyBinding: 'Mod-.',\n\t\ttoHTMLString: (content) => `<sup>${content}</sup>`,\n\t\tparseHTML: [{ tag: 'sup' }],\n\t\tsanitize: { tags: ['sup'] },\n\t},\n\t{\n\t\ttype: 'subscript',\n\t\topposite: 'superscript',\n\t\tconfigKey: 'subscript',\n\t\trank: 4,\n\t\ttag: 'sub',\n\t\ticon: SUBSCRIPT_ICON,\n\t\tkeyBinding: 'Mod-,',\n\t\ttoHTMLString: (content) => `<sub>${content}</sub>`,\n\t\tparseHTML: [{ tag: 'sub' }],\n\t\tsanitize: { tags: ['sub'] },\n\t},\n];\n\n// --- Plugin ---\n\nexport class SuperSubPlugin implements Plugin {\n\treadonly id = 'super-sub';\n\treadonly name = 'Superscript & Subscript';\n\treadonly priority = 23;\n\n\tprivate readonly config: SuperSubConfig;\n\tprivate locale!: SuperSubLocale;\n\n\tconstructor(config?: Partial<SuperSubConfig>) {\n\t\tthis.config = { ...DEFAULT_CONFIG, ...config };\n\t}\n\n\tasync init(context: PluginContext): Promise<void> {\n\t\tthis.locale = await resolveLocale(\n\t\t\tcontext,\n\t\t\tthis.config.locale,\n\t\t\tSUPER_SUB_LOCALE_EN,\n\t\t\tloadSuperSubLocale,\n\t\t);\n\n\t\tconst enabledMarks: MarkDefinition[] = MARK_DEFINITIONS.filter(\n\t\t\t(def) => this.config[def.configKey],\n\t\t);\n\n\t\tfor (const def of enabledMarks) {\n\t\t\tthis.registerMark(context, def);\n\t\t}\n\n\t\tthis.registerKeymaps(context, enabledMarks);\n\t\tthis.registerExclusivityMiddleware(context, enabledMarks);\n\t\tthis.registerDisabledToolbarItems(context);\n\t}\n\n\tprivate registerMark(context: PluginContext, def: MarkDefinition): void {\n\t\tconst commandName: string = toCommandName(def.type);\n\t\tconst toolbarVisible: boolean = this.isToolbarVisible(def.configKey);\n\n\t\tcontext.registerMarkSpec({\n\t\t\ttype: def.type,\n\t\t\trank: def.rank,\n\t\t\ttoDOM() {\n\t\t\t\treturn document.createElement(def.tag);\n\t\t\t},\n\t\t\ttoHTMLString: (_mark, content) => def.toHTMLString(content),\n\t\t\tparseHTML: def.parseHTML,\n\t\t\tsanitize: def.sanitize,\n\t\t});\n\n\t\tcontext.registerCommand(commandName, () =>\n\t\t\tdispatchIfPresent(context, toggleMark(context.getState(), mkType(def.type))),\n\t\t);\n\n\t\tif (toolbarVisible) {\n\t\t\tconst label: string =\n\t\t\t\tdef.type === 'superscript' ? this.locale.superscriptLabel : this.locale.subscriptLabel;\n\t\t\tconst tooltip: string =\n\t\t\t\tdef.type === 'superscript'\n\t\t\t\t\t? this.locale.superscriptTooltip(formatShortcut(def.keyBinding))\n\t\t\t\t\t: this.locale.subscriptTooltip(formatShortcut(def.keyBinding));\n\t\t\tcontext.registerToolbarItem({\n\t\t\t\tid: def.type,\n\t\t\t\tgroup: 'format',\n\t\t\t\ticon: def.icon,\n\t\t\t\tlabel,\n\t\t\t\ttooltip,\n\t\t\t\tcommand: commandName,\n\t\t\t\tisActive: (state) => isMarkActive(state, mkType(def.type)),\n\t\t\t});\n\t\t}\n\t}\n\n\tprivate registerKeymaps(context: PluginContext, marks: readonly MarkDefinition[]): void {\n\t\tconst keymap: Record<string, () => boolean> = {};\n\t\tfor (const def of marks) {\n\t\t\tconst commandName: string = toCommandName(def.type);\n\t\t\tkeymap[def.keyBinding] = () => context.executeCommand(commandName);\n\t\t}\n\t\tif (Object.keys(keymap).length > 0) {\n\t\t\tcontext.registerKeymap(keymap);\n\t\t}\n\t}\n\n\t/**\n\t * Ensures superscript and subscript are mutually exclusive.\n\t * When an addMark step for one type is found, a removeMark step\n\t * for the opposite type is injected. For stored marks, the opposite\n\t * mark is filtered out.\n\t */\n\tprivate registerExclusivityMiddleware(\n\t\tcontext: PluginContext,\n\t\tenabledMarks: readonly MarkDefinition[],\n\t): void {\n\t\tconst bothEnabled: boolean =\n\t\t\tenabledMarks.some((d) => d.type === 'superscript') &&\n\t\t\tenabledMarks.some((d) => d.type === 'subscript');\n\n\t\tif (!bothEnabled) return;\n\n\t\tcontext.registerMiddleware(\n\t\t\t(tr, _state, next) => {\n\t\t\t\tlet patched = false;\n\n\t\t\t\t// Handle addMark steps: inject removeMark for the opposite type\n\t\t\t\tconst patchedSteps: Step[] = [];\n\t\t\t\tfor (const step of tr.steps) {\n\t\t\t\t\tif (step.type !== 'addMark') {\n\t\t\t\t\t\tpatchedSteps.push(step);\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\n\t\t\t\t\tconst markName: string = step.mark.type;\n\t\t\t\t\tconst def: MarkDefinition | undefined = MARK_DEFINITIONS.find((d) => d.type === markName);\n\t\t\t\t\tif (!def) {\n\t\t\t\t\t\tpatchedSteps.push(step);\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\n\t\t\t\t\tpatched = true;\n\t\t\t\t\tconst removeStep: RemoveMarkStep = {\n\t\t\t\t\t\ttype: 'removeMark',\n\t\t\t\t\t\tblockId: step.blockId,\n\t\t\t\t\t\tfrom: step.from,\n\t\t\t\t\t\tto: step.to,\n\t\t\t\t\t\tmark: { type: mkType(def.opposite) },\n\t\t\t\t\t\t...(step.path ? { path: step.path } : {}),\n\t\t\t\t\t};\n\t\t\t\t\tpatchedSteps.push(removeStep, step);\n\t\t\t\t}\n\n\t\t\t\t// Handle stored marks: remove the opposite mark\n\t\t\t\tlet storedMarksAfter: readonly Mark[] | null = tr.storedMarksAfter;\n\t\t\t\tif (storedMarksAfter) {\n\t\t\t\t\tconst hasSup: boolean = storedMarksAfter.some((m) => m.type === 'superscript');\n\t\t\t\t\tconst hasSub: boolean = storedMarksAfter.some((m) => m.type === 'subscript');\n\n\t\t\t\t\tif (hasSup && hasSub) {\n\t\t\t\t\t\t// Keep the one that was most recently added (last in array)\n\t\t\t\t\t\tconst lastSupIdx: number = storedMarksAfter.findLastIndex(\n\t\t\t\t\t\t\t(m) => m.type === 'superscript',\n\t\t\t\t\t\t);\n\t\t\t\t\t\tconst lastSubIdx: number = storedMarksAfter.findLastIndex(\n\t\t\t\t\t\t\t(m) => m.type === 'subscript',\n\t\t\t\t\t\t);\n\t\t\t\t\t\tconst removeType: string = lastSupIdx > lastSubIdx ? 'subscript' : 'superscript';\n\n\t\t\t\t\t\tstoredMarksAfter = storedMarksAfter.filter((m) => m.type !== removeType);\n\t\t\t\t\t\tpatched = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tnext(patched ? { ...tr, steps: patchedSteps, storedMarksAfter } : tr);\n\t\t\t},\n\t\t\t{ name: 'super-sub:exclusivity' },\n\t\t);\n\t}\n\n\t/**\n\t * Registers disabled toolbar buttons for marks whose feature is disabled\n\t * but whose toolbar button is explicitly requested.\n\t */\n\tprivate registerDisabledToolbarItems(context: PluginContext): void {\n\t\tif (!this.config.toolbar) return;\n\n\t\tfor (const def of MARK_DEFINITIONS) {\n\t\t\tconst featureEnabled: boolean = this.config[def.configKey];\n\t\t\tconst toolbarVisible: boolean = this.config.toolbar[def.configKey] ?? true;\n\n\t\t\tif (!featureEnabled && toolbarVisible) {\n\t\t\t\tconst label: string =\n\t\t\t\t\tdef.type === 'superscript' ? this.locale.superscriptLabel : this.locale.subscriptLabel;\n\t\t\t\tcontext.registerToolbarItem({\n\t\t\t\t\tid: def.type,\n\t\t\t\t\tgroup: 'format',\n\t\t\t\t\ticon: def.icon,\n\t\t\t\t\tlabel,\n\t\t\t\t\tcommand: toCommandName(def.type),\n\t\t\t\t\tisEnabled: () => false,\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t}\n\n\tprivate isToolbarVisible(configKey: keyof Omit<SuperSubConfig, 'toolbar' | 'locale'>): boolean {\n\t\tif (!this.config.toolbar) return true;\n\t\treturn this.config.toolbar[configKey] ?? true;\n\t}\n}\n"],"mappings":"wNAiBA,IAAa,EAAsC,CAClD,iBAAkB,cAClB,mBAAqB,GAAqB,gBAAgB,KAC1D,eAAgB,YAChB,iBAAmB,GAAqB,cAAc,MAKjD,iBAAiD,OAAA,OAAA,CAAA,kBAAA,IAAA,OAAA,qBAAA,kBAAA,IAAA,OAAA,qBAAA,kBAAA,IAAA,OAAA,qBAAA,kBAAA,IAAA,OAAA,qBAAA,kBAAA,IAAA,OAAA,qBAAA,kBAAA,IAAA,OAAA,qBAAA,kBAAA,IAAA,OAAA,qBAAA,kBAAA,IAAA,OAAA,uBAIvD,eAAsB,EAAmB,GACxC,OAAO,EAAiB,EAAe,EAAM,GCc9C,IAAM,EAAiC,CACtC,aAAa,EACb,WAAW,GA2DN,EAA8C,CACnD,CACC,KAAM,cACN,SAAU,YACV,UAAW,cACX,KAAM,EACN,IAAK,MACL,KAhD+B,CAChC,+DACA,0DACA,iBACA,6CACA,+CACA,oDACA,8DACA,qDACA,yDACA,yDACA,yDACA,uDACA,yEACA,yEACA,0EACA,2EACA,2EACA,mBACA,0DACA,uDACA,UACC,KAAK,IA2BL,WAAY,QACZ,aAAe,GAAY,QAAQ,UACnC,UAAW,CAAC,CAAE,IAAK,QACnB,SAAU,CAAE,KAAM,CAAC,SAEpB,CACC,KAAM,YACN,SAAU,cACV,UAAW,YACX,KAAM,EACN,IAAK,MACL,KApC6B,CAC9B,+DACA,0DACA,yDACA,uDACA,uDACA,yEACA,yEACA,0EACA,2EACA,2EACA,mBACA,0DACA,uDACA,UACC,KAAK,IAsBL,WAAY,QACZ,aAAe,GAAY,QAAQ,UACnC,UAAW,CAAC,CAAE,IAAK,QACnB,SAAU,CAAE,KAAM,CAAC,UAMR,EAAb,MACC,GAAc,YACd,KAAgB,0BAChB,SAAoB,GAEpB,OACA,OAEA,WAAA,CAAY,GACX,KAAK,OAAS,IAAK,KAAmB,GAGvC,UAAM,CAAK,GACV,KAAK,aAAe,EACnB,EACA,KAAK,OAAO,OACZ,EACA,GAGD,MAAM,EAAiC,EAAiB,OACtD,GAAQ,KAAK,OAAO,EAAI,YAG1B,IAAK,MAAM,KAAO,EACjB,KAAK,aAAa,EAAS,GAG5B,KAAK,gBAAgB,EAAS,GAC9B,KAAK,8BAA8B,EAAS,GAC5C,KAAK,6BAA6B,GAGnC,YAAA,CAAqB,EAAwB,GAC5C,MAAM,EAAsB,EAAc,EAAI,MACxC,EAA0B,KAAK,iBAAiB,EAAI,WAiB1D,GAfA,EAAQ,iBAAiB,CACxB,KAAM,EAAI,KACV,KAAM,EAAI,KACV,MAAA,IACQ,SAAS,cAAc,EAAI,KAEnC,aAAA,CAAe,EAAO,IAAY,EAAI,aAAa,GACnD,UAAW,EAAI,UACf,SAAU,EAAI,WAGf,EAAQ,gBAAgB,EAAA,IACvB,EAAkB,EAAS,EAAW,EAAQ,WAAY,EAAO,EAAI,SAGlE,EAAgB,CACnB,MAAM,EACQ,gBAAb,EAAI,KAAyB,KAAK,OAAO,iBAAmB,KAAK,OAAO,eACnE,EACQ,gBAAb,EAAI,KACD,KAAK,OAAO,mBAAmB,EAAe,EAAI,aAClD,KAAK,OAAO,iBAAiB,EAAe,EAAI,aACpD,EAAQ,oBAAoB,CAC3B,GAAI,EAAI,KACR,MAAO,SACP,KAAM,EAAI,KACV,QACA,UACA,QAAS,EACT,SAAW,GAAU,EAAa,EAAO,EAAO,EAAI,UAKvD,eAAA,CAAwB,EAAwB,GAC/C,MAAM,EAAwC,CAAA,EAC9C,IAAK,MAAM,KAAO,EAAO,CACxB,MAAM,EAAsB,EAAc,EAAI,MAC9C,EAAO,EAAI,YAAA,IAAoB,EAAQ,eAAe,GAEnD,OAAO,KAAK,GAAQ,OAAS,GAChC,EAAQ,eAAe,GAUzB,6BAAA,CACC,EACA,GAGC,EAAa,KAAM,GAAiB,gBAAX,EAAE,OAC3B,EAAa,KAAM,GAAiB,cAAX,EAAE,OAI5B,EAAQ,mBAAA,CACN,EAAI,EAAQ,KACZ,IAAI,GAAU,EAGd,MAAM,EAAuB,GAC7B,IAAK,MAAM,KAAQ,EAAG,MAAO,CAC5B,GAAkB,YAAd,EAAK,KAAoB,CAC5B,EAAa,KAAK,GAClB,SAGD,MAAM,EAAmB,EAAK,KAAK,KAC7B,EAAkC,EAAiB,KAAM,GAAM,EAAE,OAAS,GAChF,IAAK,EAAK,CACT,EAAa,KAAK,GAClB,SAGD,GAAU,EACV,MAAM,EAA6B,CAClC,KAAM,aACN,QAAS,EAAK,QACd,KAAM,EAAK,KACX,GAAI,EAAK,GACT,KAAM,CAAE,KAAM,EAAO,EAAI,cACrB,EAAK,KAAO,CAAE,KAAM,EAAK,MAAS,CAAA,GAEvC,EAAa,KAAK,EAAY,GAI/B,IAAI,EAA2C,EAAG,iBAClD,GAAI,EAAkB,CACrB,MAAM,EAAkB,EAAiB,KAAM,GAAiB,gBAAX,EAAE,MACjD,EAAkB,EAAiB,KAAM,GAAiB,cAAX,EAAE,MAEvD,GAAI,GAAU,EAAQ,CAQrB,MAAM,EANqB,EAAiB,cAC1C,GAAiB,gBAAX,EAAE,MAEiB,EAAiB,cAC1C,GAAiB,cAAX,EAAE,MAE2C,YAAc,cAEnE,EAAmB,EAAiB,OAAQ,GAAM,EAAE,OAAS,GAC7D,GAAU,GAIZ,EAAK,EAAU,IAAK,EAAI,MAAO,EAAc,oBAAqB,IAEnE,CAAE,KAAM,0BAQV,4BAAA,CAAqC,GACpC,GAAK,KAAK,OAAO,QAEjB,IAAK,MAAM,KAAO,EAAkB,CACnC,MAAM,EAA0B,KAAK,OAAO,EAAI,WAC1C,EAA0B,KAAK,OAAO,QAAQ,EAAI,aAAc,EAEtE,IAAK,GAAkB,EAAgB,CACtC,MAAM,EACQ,gBAAb,EAAI,KAAyB,KAAK,OAAO,iBAAmB,KAAK,OAAO,eACzE,EAAQ,oBAAoB,CAC3B,GAAI,EAAI,KACR,MAAO,SACP,KAAM,EAAI,KACV,QACA,QAAS,EAAc,EAAI,MAC3B,UAAA,KAAiB,MAMrB,gBAAA,CAAyB,GACxB,OAAK,KAAK,OAAO,UACV,KAAK,OAAO,QAAQ,KAAc"}
@@ -0,0 +1,2 @@
1
+ var t=["keyword","string","comment","number","function","operator","punctuation","boolean","null","property","type","annotation","tag","attribute","constant","regex"];function n(t){return"string"==typeof t?t:t.color}function o(t){return"object"==typeof t?t.fontStyle:void 0}function e(t){return"object"==typeof t?t.fontWeight:void 0}export{e as i,n,o as r,t};
2
+ //# sourceMappingURL=SyntaxTokenTypes-C9dGwufi.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SyntaxTokenTypes-C9dGwufi.mjs","names":[],"sources":["../../src/editor/theme/SyntaxTokenTypes.ts"],"sourcesContent":["/**\n * Canonical syntax token type list and style resolution utilities.\n *\n * Single source of truth for all syntax highlighting token types.\n * Adding a new token type here automatically propagates to themes,\n * CSS variables, and token CSS classes.\n */\n\n/** All supported syntax token types. */\nexport const SYNTAX_TOKEN_TYPES = [\n\t'keyword',\n\t'string',\n\t'comment',\n\t'number',\n\t'function',\n\t'operator',\n\t'punctuation',\n\t'boolean',\n\t'null',\n\t'property',\n\t'type',\n\t'annotation',\n\t'tag',\n\t'attribute',\n\t'constant',\n\t'regex',\n] as const;\n\n/** A syntax token type from the canonical list. */\nexport type SyntaxTokenType = (typeof SYNTAX_TOKEN_TYPES)[number];\n\n/** Per-token style: color plus optional font weight and style. */\nexport interface TokenStyle {\n\treadonly color: string;\n\treadonly fontWeight?: 'normal' | 'bold';\n\treadonly fontStyle?: 'normal' | 'italic';\n}\n\n/** A token style value is either a plain color string or a full TokenStyle object. */\nexport type TokenStyleValue = string | TokenStyle;\n\n/** Extracts the color from a TokenStyleValue. */\nexport function resolveTokenColor(value: TokenStyleValue): string {\n\treturn typeof value === 'string' ? value : value.color;\n}\n\n/** Extracts the font-style from a TokenStyleValue, or undefined if not set. */\nexport function resolveTokenFontStyle(value: TokenStyleValue): string | undefined {\n\treturn typeof value === 'object' ? value.fontStyle : undefined;\n}\n\n/** Extracts the font-weight from a TokenStyleValue, or undefined if not set. */\nexport function resolveTokenFontWeight(value: TokenStyleValue): string | undefined {\n\treturn typeof value === 'object' ? value.fontWeight : undefined;\n}\n"],"mappings":"AASA,IAAa,EAAqB,CACjC,UACA,SACA,UACA,SACA,WACA,WACA,cACA,UACA,OACA,WACA,OACA,aACA,MACA,YACA,WACA,SAiBD,SAAgB,EAAkB,GACjC,MAAwB,iBAAV,EAAqB,EAAQ,EAAM,MAIlD,SAAgB,EAAsB,GACrC,MAAwB,iBAAV,EAAqB,EAAM,eAAY,EAItD,SAAgB,EAAuB,GACtC,MAAwB,iBAAV,EAAqB,EAAM,gBAAa"}
@@ -0,0 +1,2 @@
1
+ import{a as t,f as e,l as n,r as o,s as r,u as l}from"./Document-znhIcvM9.mjs";import{c as i,l as s,o as a,r as c,t as d,u}from"./Selection-aeiSsvhe.mjs";import{a as b}from"./TypeBrands-BZDKMjR-.mjs";import{r as p}from"./HTMLUtils-brwcaufP.mjs";import{i as h,t as m}from"./Decoration-DZK7hrL1.mjs";import{t as f}from"./CommandHelpers-NV80Ff1G.mjs";import{o as v}from"./BlockInsertion-C7jFEeYB.mjs";import{a as g,o as x,s as w}from"./StyleRuntime-Bwde5icB.mjs";import{n as C}from"./TypedKeys-E3jOGByL.mjs";import{a as I,s as y}from"./PluginHelpers-C3aCCGfX.mjs";import{t as k}from"./KeyboardNav-DZXdTg-_.mjs";import{r as S}from"./PopupPositioning-BEnz90Oh.mjs";import{i as L}from"./ColorValidation-okAvytHQ.mjs";import{n as A,t as R}from"./ColorGrid-D5-teEjD.mjs";function B(){const t=o(b("paragraph"),[r("")],n());return o(b("table_cell"),[t],n())}function E(t,e){const n=t.getNodePath(e);if(!n)return null;let o=null,r=null,i=null,s=null;for(const l of n){const e=t.getBlock(l);e&&("table"===e.type?(o=l,r=e):"table_row"===e.type?i=l:"table_cell"===e.type&&(s=l))}if("table_cell"===t.getBlock(e)?.type&&(s=e),!(o&&r&&s&&i))return null;const a=t.doc.children.findIndex(t=>t.id===o),c=l(r),d=c.findIndex(t=>t.id===i);if(-1===d)return null;const u=c[d];if(!u)return null;const b=l(u),p=b.findIndex(t=>t.id===s);if(-1===p)return null;const h=b.length,m=c.length;return{tableId:o,tableIndex:a,rowId:i,rowIndex:d,cellId:s,colIndex:p,totalRows:m,totalCols:h}}function T(t,e,n,o){const r=t.getBlock(e);if(!r)return null;const i=l(r)[n];return i?l(i)[o]?.id??null:null}function M(t,e){const n=t.getBlock(e);if(!n)return e;const o=l(n)[0];if(!o)return e;let r=o;for(;;){const t=l(r)[0];if(!t)return r.id;r=t}}function N(t,e){const n=t.getBlock(e);if(!n)return e;const o=l(n),r=o[o.length-1];if(!r)return e;let i=r;for(;;){const t=l(i),e=t[t.length-1];if(!e)return i.id;i=e}}function H(t,e){const n=t.getNodePath(e);if(!n)return!1;for(const o of n)if("table"===t.getBlock(o)?.type)return!0;return!1}var D={insertRowAbove:"Insert Row Above",insertRowBelow:"Insert Row Below",insertColumnLeft:"Insert Column Left",insertColumnRight:"Insert Column Right",deleteRow:"Delete Row",deleteColumn:"Delete Column",borderColorLabel:"Border Color...",deleteTable:"Delete Table",tableActions:"Table actions",menuKeyboardHint:"↑↓ Navigate · Enter Select · Esc Close",insertRow:"Insert row",insertColumn:"Insert column",addRow:"Add row",addColumn:"Add column",tableActionsHint:"Table actions (Right-click or Shift+F10)",contextMenuHint:"Right-click or Shift+F10 for table actions",borderColor:"Border color",defaultColor:"Default",noBorders:"No borders",borderColorPicker:"Border color picker",announceBorderColorSet:t=>`Table border color set to ${t}`,announceBorderReset:"Table borders reset to default",borderSwatchLabel:t=>`Border ${t}`,announceRowInsertedAbove:"Row inserted above",announceRowInsertedBelow:"Row inserted below",announceColumnInserted:t=>`Column inserted ${t}`,announceRowDeleted:"Row deleted",announceColumnDeleted:"Column deleted",announceTableDeleted:"Table deleted",insertTable:"Insert Table",tableAriaLabel:(t,e)=>`Table with ${t} rows and ${e} columns`,tableAriaDescription:"Right-click or press Shift+F10 for table actions"},P=/* @__PURE__ */Object.assign({"./locales/ar.ts":()=>import("./ar-KNULRI8r.mjs"),"./locales/de.ts":()=>import("./de-DkcKDkbA.mjs"),"./locales/es.ts":()=>import("./es-BJxjRQSg.mjs"),"./locales/fr.ts":()=>import("./fr-BwuuFBkA.mjs"),"./locales/hi.ts":()=>import("./hi-BQ2Fyx7t.mjs"),"./locales/pt.ts":()=>import("./pt-DEfBqu-c.mjs"),"./locales/ru.ts":()=>import("./ru-Dn6UDGIG.mjs"),"./locales/zh.ts":()=>import("./zh-BuN_C4o-.mjs")});async function z(t){return y(P,t,D)}var $=["#000000","#434343","#666666","#999999","#b7b7b7","#cccccc","#d9d9d9","#efefef","#980000","#cc0000","#e69138","#f1c232","#6aa84f","#45818e","#3c78d8","#3d85c6","#674ea7","#a64d79","#0b5394","#38761d"];function j(t,e,n){const o=t.getBlock(e);if(!o||"table"!==o.type)return null;const r=t.getNodePath(e);if(!r)return null;if(void 0===n){const{borderColor:e,...n}=o.attrs??{},l=n;return t.transaction("command").setNodeAttr(r,l).setSelection(t.selection).build()}const l={...o.attrs,borderColor:n};return t.transaction("command").setNodeAttr(r,l).setSelection(t.selection).build()}function _(t,e,n=D){const o=t.getState();if(!u(o.selection))return!1;const r=E(o,o.selection.anchor.blockId);if(!r)return!1;const l=j(o,r.tableId,e);if(!l)return!1;t.dispatch(l);const i="none"===e?"none":A(e);return t.announce(n.announceBorderColorSet(i)),!0}function V(t,e=D){const n=t.getState();if(!u(n.selection))return!1;const o=E(n,n.selection.anchor.blockId);if(!o)return!1;const r=j(n,o.tableId,void 0);return!!r&&(t.dispatch(r),t.announce(e.announceBorderReset),!0)}function O(t,e){const n=t.getBlock(e);if(n)return n.attrs?.borderColor}function F(t,e,n,o,r=D){t.classList.add("notectl-color-picker");const l=O(e.getState(),n),i=document.createElement("button");i.type="button",i.className="notectl-color-picker__default",i.textContent=r.defaultColor,i.addEventListener("mousedown",t=>{t.preventDefault(),t.stopPropagation(),V(e,r),o()}),i.addEventListener("keydown",t=>{"Escape"===t.key&&(t.preventDefault(),o())}),t.appendChild(i);const s=document.createElement("button");s.type="button",s.className="notectl-color-picker__default",s.textContent=r.noBorders,s.addEventListener("mousedown",t=>{t.preventDefault(),t.stopPropagation(),_(e,"none",r),o()}),s.addEventListener("keydown",t=>{"Escape"===t.key&&(t.preventDefault(),o())}),t.appendChild(s),R(t,{colors:$,columns:5,ariaLabel:r.borderColorPicker,ariaLabelPrefix:"",activeColor:l??null,swatchLabel:r.borderSwatchLabel,titleAsName:!0,onSelect:t=>{_(e,t,r),o()},onClose:o})}function q(t,e,r){const i=t.getBlock(e);if(!i)return null;const s=l(i),a=s[0]?l(s[0]).length:0;if(0===a)return null;const c=function(t){const e=[];for(let n=0;n<t;n++)e.push(B());return o(b("table_row"),e,n())}(a),u=t.transaction("command").insertNode([e],r,c),p=l(c)[0],h=p?l(p)[0]:void 0;return h?u.setSelection(d(h.id,0)):p&&u.setSelection(d(p.id,0)),u.build()}function Z(t,e,n){const o=t.getBlock(e);if(!o)return null;const r=l(o),i=t.transaction("command");for(const l of r){const t=B();i.insertNode([e,l.id],n,t)}return i.setSelection(t.selection),i.build()}function K(t,e,n,o=0){const r=t.getBlock(e);if(!r)return null;if(l(r).length<=1)return Y(t,e);const i=t.transaction("command").removeNode([e],n),s=T(t,e,n>0?n-1:1,o);if(s){const e=M(t,s);i.setSelection(d(e,0))}return i.build()}function X(t,e,n,o=0){const r=t.getBlock(e);if(!r)return null;const i=l(r);if((i[0]?l(i[0]).length:0)<=1)return Y(t,e);const s=t.transaction("command");for(let l=i.length-1;l>=0;l--){const t=i[l];t&&s.removeNode([e,t.id],n)}const a=T(t,e,o,n>0?n-1:1);if(a){const e=M(t,a);s.setSelection(d(e,0))}return s.build()}function Y(e,o){const r=e.doc.children.findIndex(t=>t.id===o);if(-1===r)return null;if(1===e.doc.children.length){const o=t(n());return e.transaction("command").insertNode([],0,o).removeNode([],1).setSelection(d(o.id,0)).build()}const l=e.transaction("command").removeNode([],r),i=e.doc.children[r+1];if(i){const t=f(e,i.id,"start");if(t)return l.setSelection(t),l.build()}const s=e.doc.children[r-1];if(s){const t=f(e,s.id,"end");if(t)return l.setSelection(t),l.build()}return null}function U(t,e,r){const i=t.getState(),s=i.selection;if(!u(s))return!1;const a=function(t,e){const r=n(),l=[];for(let i=0;i<t;i++){const t=[];for(let n=0;n<e;n++)t.push(B());l.push(o(b("table_row"),t,n()))}return o(b("table"),l,r)}(e,r),c=i.transaction("command");if(!v(i,c,s.anchor.blockId,a))return!1;const p=l(a)[0],h=p?l(p)[0]:void 0,m=h?l(h)[0]:void 0;return m?c.setSelection(d(m.id,0)):h&&c.setSelection(d(h.id,0)),t.dispatch(c.build()),!0}function W(t,e){const n=t.getState();if(!u(n.selection))return!1;const o=E(n,n.selection.anchor.blockId);if(!o)return!1;const r=q(n,o.tableId,o.rowIndex+1);return!!r&&(t.dispatch(r),t.announce(e.announceRowInsertedBelow),!0)}function G(t,e,n){const o=t.getState();if(!u(o.selection))return!1;const r=E(o,o.selection.anchor.blockId);if(!r)return!1;const l="left"===e?r.colIndex:r.colIndex+1,i=Z(o,r.tableId,l);return!!i&&(t.dispatch(i),t.announce(n.announceColumnInserted(e)),!0)}function Q(t,e){t.registerCommand("insertTable",()=>U(t,3,3)),t.registerCommand("addRowAbove",()=>function(t,e){const n=t.getState();if(!u(n.selection))return!1;const o=E(n,n.selection.anchor.blockId);if(!o)return!1;const r=q(n,o.tableId,o.rowIndex);return!!r&&(t.dispatch(r),t.announce(e.announceRowInsertedAbove),!0)}(t,e)),t.registerCommand("addRowBelow",()=>W(t,e)),t.registerCommand("addColumnLeft",()=>function(t,e){return G(t,"left",e)}(t,e)),t.registerCommand("addColumnRight",()=>function(t,e){return G(t,"right",e)}(t,e)),t.registerCommand("deleteRow",()=>function(t,e){const n=t.getState();if(!u(n.selection))return!1;const o=E(n,n.selection.anchor.blockId);if(!o)return!1;const r=K(n,o.tableId,o.rowIndex,o.colIndex);return!!r&&(t.dispatch(r),t.announce(e.announceRowDeleted),!0)}(t,e)),t.registerCommand("deleteColumn",()=>function(t,e){const n=t.getState();if(!u(n.selection))return!1;const o=E(n,n.selection.anchor.blockId);if(!o)return!1;const r=X(n,o.tableId,o.colIndex,o.rowIndex);return!!r&&(t.dispatch(r),t.announce(e.announceColumnDeleted),!0)}(t,e)),t.registerCommand("selectTable",()=>function(t){const e=t.getState(),n=e.selection;if(s(n))return"table"===e.getBlock(n.nodeId)?.type;if(i(n))return!1;const o=E(e,n.anchor.blockId);if(!o)return!1;const r=e.getNodePath(o.tableId);if(!r)return!1;const l=e.transaction("command").setSelection(c(o.tableId,r)).build();return t.dispatch(l),!0}(t)),t.registerCommand("deleteTable",()=>function(t,e){const n=t.getState(),o=function(t){if(s(t.selection)){const e=t.getBlock(t.selection.nodeId);return"table"!==e?.type?null:{tableId:e.id}}if(i(t.selection))return null;const e=E(t,t.selection.anchor.blockId);return e?{tableId:e.tableId}:null}(n);if(!o)return!1;const r=Y(n,o.tableId);return!!r&&(t.dispatch(r),t.announce(e.announceTableDeleted),!0)}(t,e))}function J(t,e,n,o,r,l=D,i){let s=!0,a=null,c=null;const d=document.createElement("div");d.className="notectl-table-context-menu",d.setAttribute("role","menu"),d.setAttribute("aria-label",l.tableActions),d.setAttribute("contenteditable","false");const u=[];let b=0;const p=function(t){return[{type:"item",label:t.insertRowAbove,command:"addRowAbove"},{type:"item",label:t.insertRowBelow,command:"addRowBelow"},{type:"separator"},{type:"item",label:t.insertColumnLeft,command:"addColumnLeft"},{type:"item",label:t.insertColumnRight,command:"addColumnRight"},{type:"separator"},{type:"item",label:t.deleteRow,command:"deleteRow"},{type:"item",label:t.deleteColumn,command:"deleteColumn"},{type:"separator"},{type:"submenu",label:t.borderColorLabel,id:"borderColor"},{type:"separator"},{type:"item",label:t.deleteTable,command:"deleteTable"}]}(l);for(const I of p){if("separator"===I.type){const t=document.createElement("div");t.setAttribute("role","separator"),d.appendChild(t);continue}const t=document.createElement("button");t.type="button",t.setAttribute("role","menuitem"),t.textContent=I.label,"submenu"===I.type&&(t.dataset.submenu=I.id,t.setAttribute("aria-haspopup","true"),t.setAttribute("aria-expanded","false")),"item"===I.type&&(t.dataset.command=I.command),t.addEventListener("mousedown",t=>{t.preventDefault(),t.stopPropagation()}),t.addEventListener("click",n=>{n.stopPropagation(),"item"===I.type?(e.executeCommand(I.command),C()):"submenu"===I.type&&m(t)}),u.push(t),d.appendChild(t)}const h=document.createElement("div");function m(o){if(f(),o.setAttribute("aria-expanded","true"),i)c=i.open({anchor:o,position:"right",referenceNode:d,parent:{close:()=>C(),getElement:()=>d},onClose:()=>{c=null,a=null,v()},content:(t,r)=>{t.className="notectl-table-context-menu",t.setAttribute("contenteditable","false"),a=t,t.addEventListener("keydown",t=>{t.stopPropagation();const e="rtl"===getComputedStyle(d).direction?"ArrowRight":"ArrowLeft";t.key===e&&(t.preventDefault(),r(),o.focus())}),F(t,e,n,()=>C(),l)}});else{a=document.createElement("div"),a.className="notectl-table-context-menu",a.setAttribute("contenteditable","false"),a.addEventListener("keydown",t=>{t.stopPropagation();const e="rtl"===getComputedStyle(d).direction?"ArrowRight":"ArrowLeft";t.key===e&&(t.preventDefault(),f(),o.focus())}),F(a,e,n,()=>C(),l),t.appendChild(a);const r=d.getBoundingClientRect(),i="rtl"===getComputedStyle(d).direction;S(a,r,{position:"right",isRtl:i}),requestAnimationFrame(()=>{(a?.querySelector("button"))?.focus()})}}function f(){c?(c.close(),c=null,a=null):a&&(a.remove(),a=null),v()}function v(){for(const t of u)t.dataset.submenu&&t.setAttribute("aria-expanded","false")}h.className="notectl-table-context-menu__hint",h.setAttribute("aria-hidden","true"),h.textContent=l.menuKeyboardHint,d.appendChild(h),k(u,b),d.addEventListener("keydown",t=>{switch(t.stopPropagation(),t.key){case"Escape":return t.preventDefault(),void C();case"ArrowDown":return t.preventDefault(),b=(b+1)%u.length,k(u,b),void u[b]?.focus();case"ArrowUp":return t.preventDefault(),b=(b-1+u.length)%u.length,k(u,b),void u[b]?.focus();case"ArrowRight":case"ArrowLeft":{t.preventDefault();const e="rtl"===getComputedStyle(d).direction?"ArrowLeft":"ArrowRight";if(t.key===e){const t=u[b];t?.dataset.submenu&&m(t)}else f(),u[b]?.focus();return}case"Enter":case" ":{t.preventDefault();const n=u[b];if(!n)return;return void(n.dataset.submenu?m(n):n.dataset.command&&(e.executeCommand(n.dataset.command),C()))}case"Home":return t.preventDefault(),b=0,k(u,b),void u[b]?.focus();case"End":return t.preventDefault(),b=u.length-1,k(u,b),void u[b]?.focus()}}),S(d,o,{position:"below-start"}),t.appendChild(d),u[0]?.focus(),requestAnimationFrame(()=>{s&&u[0]&&u[0].focus()});const g=t=>{const e=t.composedPath();e.includes(d)||a&&e.includes(a)||C()};let x=null,w=!1;function C(){s&&(s=!1,f(),d.remove(),null!==x&&(clearTimeout(x),x=null),w&&(document.removeEventListener("mousedown",g,!0),w=!1),r?.())}return x=setTimeout(()=>{x=null,document.addEventListener("mousedown",g,!0),w=!0},0),{isOpen:()=>s,close:C,destroy:C}}var tt=null;function et(t,e){const n=t.getState();if(!u(n.selection))return!1;const o=n.selection,r=E(n,o.anchor.blockId);return!!r&&e(n,o,r)}function nt(t){return et(t,(e,n,o)=>{const r=o.tableIndex+1;if(r>=e.doc.children.length)return!1;const l=e.doc.children[r];if(!l)return!1;const i=e.transaction("command").setSelection(d(l.id,0)).build();return t.dispatch(i),!0})}function ot(t,e,n,o){const r=t.getState(),l=T(r,e,n,o);if(!l)return!1;const i=M(r,l),s=r.transaction("command").setSelection(d(i,0)).build();return t.dispatch(s),!0}function rt(t,n,o,r){const l=t.getState(),i=T(l,n,o,r);if(!i)return!1;const s=N(l,i),a=l.getBlock(s);if(!a)return!1;const c=e(a),u=l.transaction("command").setSelection(d(s,c)).build();return t.dispatch(u),!0}function lt(t,e){const n=t.getState(),o=n.getNodePath(e);if(!o)return!1;const r=n.transaction("input").setSelection(c(e,o)).build();return t.dispatch(r),!0}var it='<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 12 12" fill="none"><path d="M6 1v10M1 6h10" stroke="currentColor" stroke-width="1.8" stroke-linecap="round"/></svg>';function st(t,e,n){const o=document.createElement("button");return o.className=t,o.innerHTML=e,o.title=n,o.type="button",o.setAttribute("aria-label",n),o.setAttribute("contenteditable","false"),o.addEventListener("mousedown",t=>{t.preventDefault(),t.stopPropagation()}),o}function at(t,e){const n=document.createElement("div");n.className=`ntbl-insert-line ntbl-insert-line--${t}`,n.setAttribute("contenteditable","false"),n.setAttribute("data-notectl-no-print","");const o=st("ntbl-insert-btn",it,e);return n.appendChild(o),n}function ct(t,e){const n=document.createElement("button");n.className=`ntbl-add-zone ${t}`,n.type="button",n.setAttribute("contenteditable","false"),n.setAttribute("aria-label",e),n.setAttribute("data-notectl-no-print",""),n.title=e;const o=document.createElement("span");return o.className="ntbl-add-icon",o.innerHTML=it,n.appendChild(o),n.addEventListener("mousedown",t=>{t.preventDefault(),t.stopPropagation()}),n}function dt(t){const e=document.createElement("div");return e.className=t,e.setAttribute("contenteditable","false"),e.setAttribute("data-notectl-no-print",""),e}function ut(t,e){x(t,"none"===e?{backgroundColor:"transparent",border:"1px dashed rgba(128,128,128,0.4)"}:e?{backgroundColor:e,border:"1px solid rgba(0,0,0,0.15)"}:{backgroundColor:"var(--notectl-border)",border:"1px solid rgba(0,0,0,0.15)"})}function bt(t,e,n,o){const r=document.createElement("div");r.className=`ntbl-handle ${t}`,r.dataset.index=String(e);const l=st("ntbl-handle-delete",'<svg xmlns="http://www.w3.org/2000/svg" width="10" height="10" viewBox="0 0 10 10" fill="none"><path d="M2 2l6 6M8 2l-6 6" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/></svg>',n);return l.addEventListener("click",t=>{t.preventDefault(),t.stopPropagation(),o(e)}),r.appendChild(l),r}function pt(t,e){let n=0,o=0,r=t;for(;r&&r!==e;)n+=r.offsetTop,o+=r.offsetLeft,r=r.offsetParent;return{top:n,left:o}}var ht=class{tableId;numRows;numCols;activeRowIndex=-1;activeColIndex=-1;colBar;rowBar;insertLineH;insertLineV;addRowZone;addColZone;deleteTableBtn;borderColorBtn;actionsBtn;contextHint;observer;borderColorPopup=null;activeContextMenu=null;container;tableEl;getState;dispatchFn;pluginContext;locale;onMouseMove=t=>{const e=this.tableEl.getBoundingClientRect(),n=t.clientX-e.left,o=t.clientY-e.top;if(!(n>=-10&&n<=e.width+10&&o>=-10&&o<=e.height+10))return void this.hideInsertLines();const r=function(t,e,n,o){let r=Number.POSITIVE_INFINITY,l=null;for(const a of n){const t=Math.abs(e-a.position);t<r&&t<10&&(r=t,l=a)}let i=Number.POSITIVE_INFINITY,s=null;for(const a of o){const e=Math.abs(t-a.position);e<i&&e<10&&(i=e,s=a)}return l&&(!s||r<=i)?{type:"row",border:l}:s?{type:"col",border:s}:{type:"none",border:null}}(n,o,function(t){const e=t.querySelectorAll(":scope > tbody > tr"),n=t.offsetTop,o=[];for(let r=1;r<e.length;r++){const t=e[r];t&&o.push({position:t.offsetTop-n,index:r})}return o}(this.tableEl),function(t,e){if(e<=1)return[];const n=t/e,o=[];for(let r=1;r<e;r++)o.push({position:Math.round(n*r),index:r});return o}(this.tableEl.offsetWidth,this.numCols));"row"===r.type&&r.border?(this.showHorizontalLine(r.border),this.hideVerticalLine()):"col"===r.type&&r.border?(this.showVerticalLine(r.border),this.hideHorizontalLine()):this.hideInsertLines()};onMouseLeave=()=>{this.hideInsertLines()};constructor(t,e,n,o,r,i,s=D){if(this.container=t,this.tableEl=e,this.getState=o,this.dispatchFn=r,this.pluginContext=i??null,this.locale=s,this.tableId=n.id,this.numRows=l(n).length,this.numCols=this.countCols(n),this.colBar=dt("ntbl-col-bar"),this.rowBar=dt("ntbl-row-bar"),this.insertLineH=at("horizontal",s.insertRow),this.insertLineV=at("vertical",s.insertColumn),this.addRowZone=ct("ntbl-add-row",s.addRow),this.addColZone=ct("ntbl-add-col",s.addColumn),this.deleteTableBtn=st("ntbl-delete-table-btn",'<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 24 24" fill="none"><path d="M9 3h6m-9 4h12M10 11v6m4-6v6m-9 3h14l-1-13H6L5 20z" stroke="currentColor" stroke-width="1.7" stroke-linecap="round" stroke-linejoin="round"/></svg>',s.deleteTable),this.deleteTableBtn.setAttribute("data-notectl-no-print",""),i){const t=O(o(),this.tableId);this.borderColorBtn=function(t,e){const n=st("ntbl-border-color-btn",'<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 24 24" fill="none"><path d="M3 3h18v18H3V3zm0 6h18M3 15h18M9 3v18M15 3v18" stroke="currentColor" stroke-width="1.5"/></svg>',t);n.setAttribute("data-notectl-no-print","");const o=document.createElement("span");return o.className="ntbl-border-color-swatch",ut(o,e),n.appendChild(o),n}(s.borderColor,t),this.actionsBtn=function(t){const e=st("ntbl-actions-btn",'<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 24 24" fill="currentColor"><circle cx="12" cy="5" r="2"/><circle cx="12" cy="12" r="2"/><circle cx="12" cy="19" r="2"/></svg>',t);return e.setAttribute("data-notectl-no-print",""),e}(s.tableActionsHint)}else this.borderColorBtn=null,this.actionsBtn=null;t.append(this.colBar,this.rowBar,this.insertLineH,this.insertLineV,this.addRowZone,this.addColZone,this.deleteTableBtn),this.borderColorBtn&&t.appendChild(this.borderColorBtn),this.actionsBtn&&t.appendChild(this.actionsBtn),this.contextHint=function(t){const e=document.createElement("div");return e.className="ntbl-context-hint",e.setAttribute("aria-hidden","true"),e.setAttribute("contenteditable","false"),e.setAttribute("data-notectl-no-print",""),e.textContent=t,e}(s.contextMenuHint),t.appendChild(this.contextHint),this.rebuildColHandles(),this.rebuildRowHandles(),this.bindEventListeners(),this.observer=new ResizeObserver(()=>{this.positionControls()}),this.observer.observe(e),requestAnimationFrame(()=>this.positionControls())}update(t){this.tableId=t.id;const e=l(t).length,n=this.countCols(t);if(e===this.numRows&&n===this.numCols||(this.numRows=e,this.numCols=n,this.rebuildColHandles(),this.rebuildRowHandles()),this.borderColorBtn){const e=this.borderColorBtn.querySelector(".ntbl-border-color-swatch");if(e){const n=t.attrs?.borderColor;ut(e,n)}}requestAnimationFrame(()=>this.positionControls())}destroy(){this.activeContextMenu?.destroy(),this.closeBorderColorPopup(),this.observer.disconnect(),this.container.removeEventListener("mousemove",this.onMouseMove),this.container.removeEventListener("mouseleave",this.onMouseLeave),this.colBar.remove(),this.rowBar.remove(),this.insertLineH.remove(),this.insertLineV.remove(),this.addRowZone.remove(),this.addColZone.remove(),this.deleteTableBtn.remove(),this.borderColorBtn?.remove(),this.actionsBtn?.remove(),this.contextHint.remove()}bindEventListeners(){const t=this.insertLineH.querySelector(".ntbl-insert-btn"),e=this.insertLineV.querySelector(".ntbl-insert-btn");if(t.addEventListener("click",()=>{this.activeRowIndex>=0&&this.dispatchTransaction(q(this.getState(),this.tableId,this.activeRowIndex))}),e.addEventListener("click",()=>{this.activeColIndex>=0&&this.dispatchTransaction(Z(this.getState(),this.tableId,this.activeColIndex))}),this.addRowZone.addEventListener("click",()=>{this.dispatchTransaction(q(this.getState(),this.tableId,this.numRows))}),this.addColZone.addEventListener("click",()=>{this.dispatchTransaction(Z(this.getState(),this.tableId,this.numCols))}),this.deleteTableBtn.addEventListener("click",()=>{this.dispatchTransaction(Y(this.getState(),this.tableId))}),this.borderColorBtn&&this.pluginContext){const t=this.pluginContext;this.borderColorBtn.addEventListener("click",()=>{this.toggleBorderColorPopup(t)})}if(this.actionsBtn&&this.pluginContext){const t=this.pluginContext;this.actionsBtn.addEventListener("click",()=>{this.openActionsMenu(t)})}this.container.addEventListener("mousemove",this.onMouseMove),this.container.addEventListener("mouseleave",this.onMouseLeave)}openActionsMenu(t){if(this.activeContextMenu?.isOpen())return this.activeContextMenu.close(),void(this.activeContextMenu=null);if(!this.actionsBtn)return;const e=this.actionsBtn.getBoundingClientRect(),n=new DOMRect(e.left,e.bottom+4,0,0);this.activeContextMenu=J(this.container,t,this.tableId,n,()=>{this.activeContextMenu=null},this.locale)}toggleBorderColorPopup(t){this.borderColorPopup?this.closeBorderColorPopup():(this.borderColorPopup=document.createElement("div"),this.borderColorPopup.className="notectl-table-context-menu",x(this.borderColorPopup,{position:"absolute",top:"24px",left:"24px",zIndex:"10000"}),this.borderColorPopup.setAttribute("contenteditable","false"),F(this.borderColorPopup,t,this.tableId,()=>{this.closeBorderColorPopup()},this.locale),this.container.appendChild(this.borderColorPopup))}closeBorderColorPopup(){this.borderColorPopup&&(this.borderColorPopup.remove(),this.borderColorPopup=null)}dispatchTransaction(t){t&&this.dispatchFn(t)}countCols(t){const e=l(t);return e[0]?l(e[0]).length:0}positionControls(){!function(t,e,n){const o=t.children;if(0===o.length)return;const r=e/n;for(let l=0;l<o.length;l++){const t=o[l];x(t,{left:`${Math.round(r*l)}px`,width:`${Math.round(r)}px`})}w(t,"width",`${e}px`)}(this.colBar,this.tableEl.offsetWidth,this.numCols),function(t,e){const n=t.children;if(0===n.length)return;const o=e.querySelectorAll(":scope > tbody > tr"),r=e.offsetTop;let l=0;for(let i=0;i<n.length;i++){const t=n[i],e=o[i];if(e){const n=e.offsetTop-r,o=e.offsetHeight;x(t,{top:`${n}px`,height:`${o}px`}),l=n+o}}w(t,"height",`${l}px`)}(this.rowBar,this.tableEl),function(t,e,n,o){const r=pt(n,o),l=n.offsetHeight,i=n.offsetWidth;x(t,{width:`${i}px`,left:`${r.left}px`}),x(e,{height:`${l}px`,top:`${r.top}px`})}(this.addRowZone,this.addColZone,this.tableEl,this.container)}showHorizontalLine(t){this.activeRowIndex=t.index;const e=pt(this.tableEl,this.container);x(this.insertLineH,{top:e.top+t.position-1+"px",left:`${e.left}px`,width:`${this.tableEl.offsetWidth}px`}),this.insertLineH.classList.add("ntbl-insert-line--visible")}showVerticalLine(t){this.activeColIndex=t.index;const e=pt(this.tableEl,this.container);x(this.insertLineV,{left:e.left+t.position-1+"px",top:`${e.top}px`,height:`${this.tableEl.offsetHeight}px`}),this.insertLineV.classList.add("ntbl-insert-line--visible")}hideInsertLines(){this.hideHorizontalLine(),this.hideVerticalLine()}hideHorizontalLine(){this.insertLineH.classList.remove("ntbl-insert-line--visible"),this.activeRowIndex=-1}hideVerticalLine(){this.insertLineV.classList.remove("ntbl-insert-line--visible"),this.activeColIndex=-1}rebuildColHandles(){this.colBar.innerHTML="";for(let t=0;t<this.numCols;t++){const e=bt("ntbl-col-handle",t,this.locale.deleteColumn,t=>{this.dispatchTransaction(X(this.getState(),this.tableId,t))});this.colBar.appendChild(e)}}rebuildRowHandles(){this.rowBar.innerHTML="";for(let t=0;t<this.numRows;t++){const e=bt("ntbl-row-handle",t,this.locale.deleteRow,t=>{this.dispatchTransaction(K(this.getState(),this.tableId,t))});this.rowBar.appendChild(e)}}};function mt(t,e){"none"===e?(w(t,"--ntbl-border-color","transparent"),t.classList.add("notectl-table--borderless")):e?(w(t,"--ntbl-border-color",e),t.classList.remove("notectl-table--borderless")):(g(t,"--ntbl-border-color"),t.classList.remove("notectl-table--borderless"))}var ft=new C("tableSelection"),vt={maxPickerRows:8,maxPickerCols:8},gt="border-collapse: collapse; width: 100%; table-layout: fixed",xt="border: 1px solid var(--ntbl-bc, #d0d0d0); padding: 8px 12px; vertical-align: top",wt=class{id="table";name="Table";priority=40;config;locale;selectionService=null;cleanupMouseSelection=null;context=null;constructor(t){this.config={...vt,...t}}async init(t){this.locale=await I(t,this.config.locale,D,z),t.registerStyleSheet('\n/* Table */\n.notectl-table-wrapper {\n\tmargin: 8px 0;\n\toverflow-x: auto;\n\tposition: relative;\n}\n\n.notectl-table {\n\twidth: 100%;\n\tborder-collapse: collapse;\n\ttable-layout: fixed;\n}\n\n/* Border resolution order: per-table local override → theme component token → theme global token.\n * The inline --ntbl-border-color is set by the toolbar\'s "border color" action and must win\n * over the theme so per-table customizations remain visible after a theme switch.\n */\n.notectl-table td {\n\tborder: 1px solid var(--ntbl-border-color, var(--notectl-table-border, var(--notectl-border)));\n\tbackground: var(--notectl-table-cell-bg, transparent);\n\tpadding: 8px 12px;\n\tmin-width: 60px;\n\tvertical-align: top;\n\tmin-height: 1.6em;\n}\n\n.notectl-table th {\n\tborder: 1px solid var(--ntbl-border-color, var(--notectl-table-border, var(--notectl-border)));\n\tbackground: var(--notectl-table-header-bg, var(--notectl-surface-raised));\n\tpadding: 8px 12px;\n\tmin-width: 60px;\n\tvertical-align: top;\n\ttext-align: start;\n\tfont-weight: 600;\n}\n\n.notectl-table--borderless td {\n\tborder: 1px dashed rgba(128, 128, 128, 0.15);\n}\n\n@media print {\n\t.notectl-table--borderless td {\n\t\tborder: none;\n\t}\n}\n\n.notectl-table td:focus-within {\n\toutline: 2px solid var(--notectl-primary);\n\toutline-offset: -2px;\n}\n\n.notectl-table-cell--selected {\n\tbackground: var(--notectl-primary-muted);\n}\n\n/* Table Context Menu */\n.notectl-table-context-menu {\n\tbackground: var(--notectl-surface-overlay);\n\tborder: 1px solid var(--notectl-border);\n\tborder-radius: 6px;\n\tbox-shadow: 0 4px 12px var(--notectl-shadow);\n\tpadding: 4px 0;\n\tmin-width: 180px;\n\tz-index: 10000;\n}\n\n.notectl-table-context-menu button {\n\tdisplay: block;\n\twidth: 100%;\n\tpadding: 8px 12px;\n\ttext-align: start;\n\tborder: none;\n\tbackground: none;\n\tcursor: pointer;\n\tfont-size: 14px;\n\tcolor: var(--notectl-fg);\n\tfont-family: inherit;\n}\n\n.notectl-table-context-menu button:hover {\n\tbackground: var(--notectl-hover-bg);\n}\n\n.notectl-table-context-menu hr {\n\tborder: none;\n\tborder-top: 1px solid var(--notectl-border);\n\tmargin: 4px 0;\n}\n\n/* === Table Controls === */\n\n/* Outer container for table + controls */\n.ntbl-container {\n\tposition: relative;\n\tmargin: 8px 0;\n\tpadding-block-start: 24px;\n\tpadding-inline-start: 24px;\n}\n\n.ntbl-container .notectl-table-wrapper {\n\tmargin: 0;\n}\n\n.ntbl-container.notectl-table--selected .notectl-table-wrapper {\n\toutline: 2px solid var(--notectl-primary-fg);\n\toutline-offset: 2px;\n\tborder-radius: 6px;\n}\n\n/* --- Column Handle Bar --- */\n.ntbl-col-bar {\n\tposition: absolute;\n\ttop: 0;\n\tinset-inline-start: 24px;\n\theight: 20px;\n\tdisplay: flex;\n\topacity: 0;\n\ttransition: opacity 0.2s ease;\n\tz-index: 3;\n\tpointer-events: none;\n}\n\n.ntbl-container:hover .ntbl-col-bar,\n.ntbl-container:focus-within .ntbl-col-bar {\n\topacity: 1;\n\tpointer-events: auto;\n}\n\n.ntbl-container.notectl-table--selected .ntbl-col-bar {\n\topacity: 1;\n\tpointer-events: auto;\n}\n\n/* --- Row Handle Bar --- */\n.ntbl-row-bar {\n\tposition: absolute;\n\ttop: 24px;\n\tinset-inline-start: 0;\n\twidth: 20px;\n\tdisplay: flex;\n\tflex-direction: column;\n\topacity: 0;\n\ttransition: opacity 0.2s ease;\n\tz-index: 3;\n\tpointer-events: none;\n}\n\n.ntbl-container:hover .ntbl-row-bar,\n.ntbl-container:focus-within .ntbl-row-bar {\n\topacity: 1;\n\tpointer-events: auto;\n}\n\n.ntbl-container.notectl-table--selected .ntbl-row-bar {\n\topacity: 1;\n\tpointer-events: auto;\n}\n\n/* --- Handle (shared base) --- */\n.ntbl-handle {\n\tposition: absolute;\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n\tcursor: pointer;\n\ttransition: background 0.15s ease;\n\tborder-radius: 3px;\n}\n\n.ntbl-col-handle {\n\theight: 100%;\n\tbackground: var(--notectl-hover-bg);\n\tborder-radius: 4px 4px 0 0;\n}\n\n.ntbl-col-handle:hover {\n\tbackground: var(--notectl-border);\n}\n\n.ntbl-row-handle {\n\twidth: 100%;\n\tbackground: var(--notectl-hover-bg);\n\tborder-start-start-radius: 4px;\n\tborder-end-start-radius: 4px;\n}\n\n.ntbl-row-handle:hover {\n\tbackground: var(--notectl-border);\n}\n\n/* --- Handle Delete Button --- */\n.ntbl-handle-delete {\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n\twidth: 16px;\n\theight: 16px;\n\tborder: none;\n\tbackground: transparent;\n\tcolor: var(--notectl-fg-muted);\n\tcursor: pointer;\n\tborder-radius: 3px;\n\tpadding: 0;\n\topacity: 0;\n\ttransform: scale(0.7);\n\ttransition: opacity 0.15s, transform 0.15s,\n\t\tbackground 0.15s, color 0.15s;\n}\n\n.ntbl-handle:hover .ntbl-handle-delete,\n.ntbl-handle:focus-within .ntbl-handle-delete {\n\topacity: 1;\n\ttransform: scale(1);\n}\n\n.ntbl-handle-delete:hover,\n.ntbl-handle-delete:focus-visible {\n\tbackground: var(--notectl-danger-muted);\n\tcolor: var(--notectl-danger);\n}\n\n.ntbl-handle-delete:focus-visible {\n\toutline: none;\n\tbox-shadow: 0 0 0 2px var(--notectl-focus-ring);\n}\n\n/* --- Insert Lines --- */\n.ntbl-insert-line {\n\tposition: absolute;\n\tpointer-events: none;\n\topacity: 0;\n\ttransition: opacity 0.15s ease;\n\tz-index: 6;\n}\n\n.ntbl-insert-line--visible {\n\topacity: 1;\n\tpointer-events: auto;\n}\n\n.ntbl-insert-line--horizontal {\n\theight: 2px;\n\tbackground: linear-gradient(\n\t\t90deg,\n\t\ttransparent,\n\t\tvar(--notectl-primary) 8%,\n\t\tvar(--notectl-primary) 92%,\n\t\ttransparent\n\t);\n\tbox-shadow: 0 0 6px var(--notectl-focus-ring);\n}\n\n.ntbl-insert-line--vertical {\n\twidth: 2px;\n\tbackground: linear-gradient(\n\t\t180deg,\n\t\ttransparent,\n\t\tvar(--notectl-primary) 8%,\n\t\tvar(--notectl-primary) 92%,\n\t\ttransparent\n\t);\n\tbox-shadow: 0 0 6px var(--notectl-focus-ring);\n}\n\n/* --- Insert Button on Line --- */\n.ntbl-insert-btn {\n\tposition: absolute;\n\twidth: 20px;\n\theight: 20px;\n\tborder-radius: 50%;\n\tbackground: var(--notectl-surface-raised);\n\tborder: 2px solid var(--notectl-primary);\n\tcolor: var(--notectl-primary);\n\tcursor: pointer;\n\tpointer-events: all;\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n\tpadding: 0;\n\tbox-shadow: 0 2px 8px var(--notectl-focus-ring);\n\ttransition: background 0.15s, color 0.15s,\n\t\ttransform 0.15s, box-shadow 0.15s;\n}\n\n.ntbl-insert-line--horizontal .ntbl-insert-btn {\n\tleft: 50%;\n\ttop: -9px;\n\ttransform: translateX(-50%);\n}\n\n.ntbl-insert-line--vertical .ntbl-insert-btn {\n\ttop: 50%;\n\tinset-inline-start: -9px;\n\ttransform: translateY(-50%);\n}\n\n.ntbl-insert-btn:hover,\n.ntbl-insert-btn:focus-visible {\n\tbackground: var(--notectl-primary);\n\tcolor: var(--notectl-primary-fg);\n\tbox-shadow: 0 2px 12px var(--notectl-focus-ring);\n}\n\n.ntbl-insert-btn:focus-visible {\n\toutline: none;\n\tbox-shadow: 0 0 0 2px var(--notectl-focus-ring);\n}\n\n.ntbl-insert-line--horizontal .ntbl-insert-btn:hover {\n\ttransform: translateX(-50%) scale(1.2);\n}\n\n.ntbl-insert-line--vertical .ntbl-insert-btn:hover {\n\ttransform: translateY(-50%) scale(1.2);\n}\n\n/* --- Add Row / Add Column Zones --- */\n.ntbl-add-zone {\n\tposition: absolute;\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n\tcursor: pointer;\n\tuser-select: none;\n\topacity: 0;\n\ttransition: opacity 0.2s ease, background 0.2s ease,\n\t\tborder-color 0.2s ease;\n}\n\n.ntbl-container:hover .ntbl-add-zone,\n.ntbl-container:focus-within .ntbl-add-zone {\n\topacity: 1;\n}\n\n.ntbl-container.notectl-table--selected .ntbl-add-zone {\n\topacity: 1;\n}\n\n.ntbl-delete-table-btn {\n\tposition: absolute;\n\ttop: 0;\n\tinset-inline-start: 0;\n\twidth: 20px;\n\theight: 20px;\n\tborder: 1px solid var(--notectl-danger);\n\tborder-radius: 4px;\n\tbackground: var(--notectl-surface-raised);\n\tcolor: var(--notectl-danger);\n\tdisplay: inline-flex;\n\talign-items: center;\n\tjustify-content: center;\n\topacity: 0;\n\ttransition: opacity 0.2s ease, background 0.15s, border-color 0.15s;\n\tz-index: 7;\n}\n\n.ntbl-container:hover .ntbl-delete-table-btn,\n.ntbl-container:focus-within .ntbl-delete-table-btn,\n.ntbl-container.notectl-table--selected .ntbl-delete-table-btn {\n\topacity: 1;\n}\n\n.ntbl-delete-table-btn:hover,\n.ntbl-delete-table-btn:focus-visible {\n\tbackground: var(--notectl-danger-muted);\n\tborder-color: var(--notectl-danger);\n}\n\n.ntbl-delete-table-btn:focus-visible {\n\toutline: none;\n\tbox-shadow: 0 0 0 2px var(--notectl-focus-ring);\n}\n\n/* --- Context Menu Discovery Hint --- */\n.ntbl-context-hint {\n\tposition: absolute;\n\ttop: 4px;\n\tinset-inline-end: 0;\n\tfont-size: 11px;\n\tcolor: var(--notectl-fg-muted);\n\tpadding: 2px 8px;\n\tborder-radius: 4px;\n\topacity: 0;\n\ttransition: opacity 0.2s ease;\n\tpointer-events: none;\n\twhite-space: nowrap;\n\tz-index: 5;\n}\n\n.ntbl-container:hover .ntbl-context-hint,\n.ntbl-container:focus-within .ntbl-context-hint,\n.ntbl-container.notectl-table--selected .ntbl-context-hint {\n\topacity: 1;\n}\n\n/* --- Table Actions Button --- */\n.ntbl-actions-btn {\n\tposition: absolute;\n\ttop: 0;\n\tinset-inline-start: 48px;\n\twidth: 20px;\n\theight: 20px;\n\tborder: 1px solid var(--notectl-border);\n\tborder-radius: 4px;\n\tbackground: var(--notectl-surface-raised);\n\tcolor: var(--notectl-fg-muted);\n\tdisplay: inline-flex;\n\talign-items: center;\n\tjustify-content: center;\n\topacity: 0;\n\ttransition: opacity 0.2s ease, background 0.15s, border-color 0.15s;\n\tz-index: 7;\n\tcursor: pointer;\n\tpadding: 0;\n}\n\n.ntbl-container:hover .ntbl-actions-btn,\n.ntbl-container:focus-within .ntbl-actions-btn,\n.ntbl-container.notectl-table--selected .ntbl-actions-btn {\n\topacity: 1;\n}\n\n.ntbl-actions-btn:hover,\n.ntbl-actions-btn:focus-visible {\n\tbackground: var(--notectl-hover-bg);\n\tborder-color: var(--notectl-primary);\n}\n\n.ntbl-actions-btn:focus-visible {\n\toutline: none;\n\tbox-shadow: 0 0 0 2px var(--notectl-focus-ring);\n}\n\n/* --- Border Color Button --- */\n.ntbl-border-color-btn {\n\tposition: absolute;\n\ttop: 0;\n\tinset-inline-start: 24px;\n\twidth: 20px;\n\theight: 20px;\n\tborder: 1px solid var(--notectl-border);\n\tborder-radius: 4px;\n\tbackground: var(--notectl-surface-raised);\n\tcolor: var(--notectl-fg-muted);\n\tdisplay: inline-flex;\n\talign-items: center;\n\tjustify-content: center;\n\topacity: 0;\n\ttransition: opacity 0.2s ease, background 0.15s, border-color 0.15s;\n\tz-index: 7;\n\tcursor: pointer;\n\tpadding: 0;\n}\n\n.ntbl-container:hover .ntbl-border-color-btn,\n.ntbl-container:focus-within .ntbl-border-color-btn,\n.ntbl-container.notectl-table--selected .ntbl-border-color-btn {\n\topacity: 1;\n}\n\n.ntbl-border-color-btn:hover,\n.ntbl-border-color-btn:focus-visible {\n\tbackground: var(--notectl-hover-bg);\n\tborder-color: var(--notectl-primary);\n}\n\n.ntbl-border-color-btn:focus-visible {\n\toutline: none;\n\tbox-shadow: 0 0 0 2px var(--notectl-focus-ring);\n}\n\n.ntbl-border-color-swatch {\n\twidth: 10px;\n\theight: 10px;\n\tborder-radius: 2px;\n\tborder: 1px solid rgba(0, 0, 0, 0.15);\n}\n\n/* --- Context Menu Keyboard Hint --- */\n.notectl-table-context-menu__hint {\n\tpadding: 4px 12px 6px;\n\tfont-size: 11px;\n\tcolor: var(--notectl-fg-muted);\n\tborder-top: 1px solid var(--notectl-border);\n\tmargin-top: 4px;\n\ttext-align: center;\n\tuser-select: none;\n}\n\n/* --- Context Menu Focus --- */\n.notectl-table-context-menu button:focus-visible {\n\toutline: none;\n\tbackground: var(--notectl-primary-muted);\n\tbox-shadow: inset 0 0 0 2px var(--notectl-focus-ring);\n}\n\n.notectl-table-context-menu [role="separator"] {\n\tborder: none;\n\tborder-top: 1px solid var(--notectl-border);\n\tmargin: 4px 0;\n\theight: 0;\n}\n\n.ntbl-add-row {\n\tbottom: 0;\n\theight: 24px;\n\tborder: 1px dashed var(--notectl-border);\n\tborder-end-start-radius: 6px;\n\tborder-end-end-radius: 6px;\n\tborder-block-start: none;\n\tcolor: var(--notectl-fg-muted);\n\ttransform: translateY(100%);\n}\n\n.ntbl-add-row:hover,\n.ntbl-add-row:focus-visible {\n\tbackground: var(--notectl-primary-muted);\n\tborder-color: var(--notectl-primary);\n\tcolor: var(--notectl-primary);\n}\n\n.ntbl-add-row:focus-visible {\n\toutline: none;\n\tbox-shadow: 0 0 0 2px var(--notectl-focus-ring);\n}\n\n.ntbl-add-col {\n\tinset-inline-end: 0;\n\ttop: 24px;\n\twidth: 24px;\n\tborder: 1px dashed var(--notectl-border);\n\tborder-start-end-radius: 6px;\n\tborder-end-end-radius: 6px;\n\tborder-inline-start: none;\n\tcolor: var(--notectl-fg-muted);\n\ttransform: translateX(100%);\n}\n\n[dir="rtl"] .ntbl-add-col {\n\ttransform: translateX(-100%);\n}\n\n.ntbl-add-col:hover,\n.ntbl-add-col:focus-visible {\n\tbackground: var(--notectl-primary-muted);\n\tborder-color: var(--notectl-primary);\n\tcolor: var(--notectl-primary);\n}\n\n.ntbl-add-col:focus-visible {\n\toutline: none;\n\tbox-shadow: 0 0 0 2px var(--notectl-focus-ring);\n}\n\n.ntbl-add-icon {\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n\ttransition: transform 0.2s ease;\n}\n\n.ntbl-add-zone:hover .ntbl-add-icon {\n\ttransform: scale(1.15);\n}\n'),this.context=t,this.registerNodeSpecs(t),this.registerNodeViews(t),Q(t,this.locale),t.registerCommand("resetTableBorderColor",()=>V(t,this.locale)),function(t,n){t.registerKeymap({Tab:()=>function(t,e){return et(t,(n,o,r)=>r.colIndex<r.totalCols-1?ot(t,r.tableId,r.rowIndex,r.colIndex+1):r.rowIndex<r.totalRows-1?ot(t,r.tableId,r.rowIndex+1,0):(W(t,e),!0))}(t,n),"Shift-Tab":()=>function(t){return et(t,(e,n,o)=>o.colIndex>0?ot(t,o.tableId,o.rowIndex,o.colIndex-1):!(o.rowIndex>0)||ot(t,o.tableId,o.rowIndex-1,o.totalCols-1))}(t),Backspace:()=>function(t){return et(t,(e,n,o)=>{if(!a(n))return!1;if(0!==n.anchor.offset)return!1;if(0!==o.rowIndex||0!==o.colIndex)return!1;const r=M(e,o.cellId);return n.anchor.blockId===r&&lt(t,o.tableId)})}(t),Delete:()=>function(t){return et(t,(n,o,r)=>{if(!a(o))return!1;const l=n.getBlock(o.anchor.blockId);if(!l)return!1;const i=e(l);if(o.anchor.offset!==i)return!1;if(r.rowIndex!==r.totalRows-1||r.colIndex!==r.totalCols-1)return!1;const s=N(n,r.cellId);return o.anchor.blockId===s&&lt(t,r.tableId)})}(t),ArrowDown:()=>function(t){return et(t,(e,n,o)=>{const r=N(e,o.cellId);return n.anchor.blockId===r&&(o.rowIndex>=o.totalRows-1?nt(t):ot(t,o.tableId,o.rowIndex+1,o.colIndex))})}(t),ArrowUp:()=>function(t){return et(t,(e,n,o)=>{const r=M(e,o.cellId);return n.anchor.blockId===r&&!(o.rowIndex<=0)&&ot(t,o.tableId,o.rowIndex-1,o.colIndex)})}(t),ArrowRight:()=>function(t){return et(t,(n,o,r)=>{if(!a(o))return!1;const l=n.getBlock(o.anchor.blockId);if(!l)return!1;const i=e(l);if(o.anchor.offset!==i)return!1;const s=N(n,r.cellId);return o.anchor.blockId===s&&(r.colIndex<r.totalCols-1?ot(t,r.tableId,r.rowIndex,r.colIndex+1):!(r.rowIndex<r.totalRows-1)||ot(t,r.tableId,r.rowIndex+1,0))})}(t),ArrowLeft:()=>function(t){return et(t,(e,n,o)=>{if(!a(n))return!1;if(0!==n.anchor.offset)return!1;const r=M(e,o.cellId);return n.anchor.blockId===r&&(o.colIndex>0?rt(t,o.tableId,o.rowIndex,o.colIndex-1):!(o.rowIndex>0)||rt(t,o.tableId,o.rowIndex-1,o.totalCols-1))})}(t),Escape:()=>nt(t),"Shift-F10":()=>function(t){return et(t,(e,n,o)=>{const r=t.getContainer(),l=r.querySelector(`[data-block-id="${o.cellId}"]`);if(!l)return!1;const i=l.getBoundingClientRect(),s=new DOMRect(i.left+i.width/2,i.bottom,0,0),a=r.querySelector(`[data-block-id="${o.tableId}"].ntbl-container`)??r;return tt?.close(),tt=J(a,t,o.tableId,s,()=>{tt=null}),!0})}(t)},{priority:"context"})}(t,this.locale),this.registerToolbarItem(t),this.selectionService=function(t){let e=null,n=[],o=/* @__PURE__ */new Set;function r(){if(!e)return n=[],void(o=/* @__PURE__ */new Set);const r=t.getState(),l=[],i=Math.min(e.fromRow,e.toRow),s=Math.max(e.fromRow,e.toRow),a=Math.min(e.fromCol,e.toCol),c=Math.max(e.fromCol,e.toCol);for(let t=i;t<=s;t++)for(let n=a;n<=c;n++){const o=T(r,e.tableId,t,n);o&&l.push(o)}n=l,o=new Set(l)}const l={getSelectedRange:()=>e,setSelectedRange(n){e=n,r();const o=t.getState();t.dispatch(o.transaction("api").setSelection(o.selection).build())},clearSelectionSilent(){e=null,r()},getSelectedCellIds:()=>n,isSelected:t=>o.has(t)};return t.registerService(ft,l),l}(t)}onReady(){this.context&&this.selectionService&&(this.cleanupMouseSelection=function(t,e){const n=t.getContainer();let o=null,r=!1;function l(n){const l=n.target.closest("td[data-block-id]");if(!l)return o=null,r=!1,void e.setSelectedRange(null);if(n.shiftKey){if(o){const r=E(t.getState(),l.getAttribute("data-block-id"));if(!r||r.tableId!==o.tableId)return o=null,void e.setSelectedRange(null);n.preventDefault(),e.setSelectedRange({tableId:o.tableId,fromRow:o.row,fromCol:o.col,toRow:r.rowIndex,toCol:r.colIndex})}}else{e.setSelectedRange(null);const n=E(t.getState(),l.getAttribute("data-block-id"));if(!n)return o=null,void(r=!1);o={tableId:n.tableId,row:n.rowIndex,col:n.colIndex},r=!0}}function i(n){if(!r||!o)return;const l=n.target.closest("td[data-block-id]");if(!l)return;const i=E(t.getState(),l.getAttribute("data-block-id"));i&&i.tableId===o.tableId&&(i.rowIndex===o.row&&i.colIndex===o.col||(n.preventDefault(),e.setSelectedRange({tableId:o.tableId,fromRow:o.row,fromCol:o.col,toRow:i.rowIndex,toCol:i.colIndex})))}function s(){r=!1}return n.addEventListener("mousedown",l),n.addEventListener("mousemove",i),document.addEventListener("mouseup",s),()=>{n.removeEventListener("mousedown",l),n.removeEventListener("mousemove",i),document.removeEventListener("mouseup",s)}}(this.context,this.selectionService))}destroy(){this.cleanupMouseSelection?.(),this.cleanupMouseSelection=null,this.selectionService=null,this.context=null}decorations(t){if(!this.selectionService)return m.empty;if(!this.selectionService.getSelectedRange())return m.empty;const e=t.selection;if(!u(e)||!H(t,e.anchor.blockId))return this.selectionService.clearSelectionSilent(),m.empty;const n=this.selectionService.getSelectedCellIds();if(0===n.length)return m.empty;const o=[];for(const r of n)o.push(h(r,{class:"notectl-table-cell--selected"}));return m.create(o)}registerNodeSpecs(t){t.registerNodeSpec({type:"table",group:"block",content:{allow:["table_row"],min:1},isolating:!0,selectable:!0,toDOM(t){const e=document.createElement("div");return e.className="notectl-table-wrapper",e.setAttribute("data-block-id",t.id),e.setAttribute("part","table"),e},toHTML(t,e,n){const o=t.attrs?.borderColor,r=function(t){return t?"none"===t?`${gt}; --ntbl-bc: transparent`:L(t)?`${gt}; --ntbl-bc: ${p(t)}`:gt:gt}(o);return`<table${n?.styleAttr(r)??` style="${r}"`}>${e}</table>`},sanitize:{tags:["table","tbody"]}}),t.registerNodeSpec({type:"table_row",group:"table_content",content:{allow:["table_cell"],min:1},toDOM(t){const e=document.createElement("tr");return e.setAttribute("data-block-id",t.id),e.setAttribute("role","row"),e.setAttribute("part","table-row"),e},toHTML:(t,e)=>`<tr>${e}</tr>`,sanitize:{tags:["tr"]}}),t.registerNodeSpec({type:"table_cell",group:"table_content",content:{allow:["paragraph","list_item","heading","blockquote","image","video","horizontal_rule"]},isolating:!0,toDOM(t){const e=document.createElement("td");return e.setAttribute("data-block-id",t.id),e.setAttribute("role","cell"),e.setAttribute("part","table-cell"),e},toHTML(t,e,n){const o=t.attrs?.colspan??1,r=t.attrs?.rowspan??1,l=[n?.styleAttr(xt)??` style="${xt}"`];return o>1&&l.push(` colspan="${o}"`),r>1&&l.push(` rowspan="${r}"`),`<td${l.join("")}>${e}</td>`},sanitize:{tags:["td"],attrs:["colspan","rowspan"]}})}registerNodeViews(t){t.getSchemaRegistry(),t.registerNodeView("table",function(t,e,n=D){return(t,o,r)=>{const i=document.createElement("div");i.className="ntbl-container",i.setAttribute("data-block-id",t.id),i.setAttribute("data-selectable","true");const s=document.createElement("div");s.className="notectl-table-wrapper";const a=document.createElement("table");a.className="notectl-table",a.setAttribute("role","table");const c=l(t),d=c.length,u=c[0]?l(c[0]).length:0;a.setAttribute("aria-label",n.tableAriaLabel(d,u)),a.setAttribute("aria-description",n.tableAriaDescription);const b=document.createElement("tbody");a.appendChild(b),s.appendChild(a),i.appendChild(s),mt(a,t.attrs?.borderColor);const p=document.createElement("div");p.className="notectl-sr-only",p.setAttribute("aria-live","polite"),p.setAttribute("aria-atomic","true"),i.appendChild(p);const h=function(t,e,n,o,r,l,i){return new ht(t,e,n,o,r,l,i)}(i,a,t,o,r,e,n);let m=null,f=t.id;const v=t=>{if(!e)return;t.preventDefault(),t.stopPropagation(),m?.close();const o=new DOMRect(t.clientX,t.clientY,0,0);m=J(i,e,f,o,()=>{m=null},n)};return a.addEventListener("contextmenu",v),{dom:i,contentDOM:b,update(t){if("table"!==t.type)return!1;f=t.id,i.setAttribute("data-block-id",t.id),i.setAttribute("data-selectable","true");const e=l(t),o=e.length,r=e[0]?l(e[0]).length:0;return a.setAttribute("aria-label",n.tableAriaLabel(o,r)),mt(a,t.attrs?.borderColor),h.update(t),!1},destroy(){m?.destroy(),a.removeEventListener("contextmenu",v),h.destroy()},selectNode(){i.classList.add("notectl-table--selected")},deselectNode(){i.classList.remove("notectl-table--selected")}}}}(0,t,this.locale)),t.registerNodeView("table_row",(t,e,n)=>{const o=document.createElement("tr");return o.setAttribute("data-block-id",t.id),o.setAttribute("role","row"),{dom:o,contentDOM:o,update:t=>("table_row"!==t.type||o.setAttribute("data-block-id",t.id),!1),destroy(){}}}),t.registerNodeView("table_cell",(t,e,n)=>{const o=document.createElement("td");o.setAttribute("data-block-id",t.id),o.setAttribute("role","cell");const r=t.attrs?.colspan??1,l=t.attrs?.rowspan??1;r>1&&(o.colSpan=r),l>1&&(o.rowSpan=l);const i=t.attrs?.align;return i&&"left"!==i&&w(o,"textAlign",i),{dom:o,contentDOM:o,update(t){if("table_cell"!==t.type)return!1;o.setAttribute("data-block-id",t.id);const e=t.attrs?.colspan??1,n=t.attrs?.rowspan??1;return e>1?o.colSpan=e:o.removeAttribute("colspan"),n>1?o.rowSpan=n:o.removeAttribute("rowspan"),!1},destroy(){}}})}registerToolbarItem(t){const e=this.config.maxPickerRows??8,n=this.config.maxPickerCols??8;t.registerToolbarItem({id:"table",group:"insert",icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M3 3h18v18H3V3zm2 2v4h6V5H5zm8 0v4h6V5h-6zm-8 6v4h6v-4H5zm8 0v4h6v-4h-6zm-8 6v4h6v-4H5zm8 0v4h6v-4h-6z"/></svg>',label:this.locale.insertTable,tooltip:this.locale.insertTable,command:"insertTable",popupType:"gridPicker",popupConfig:{maxRows:e,maxCols:n,onSelect:(e,n)=>{U(t,e,n)}},isActive:t=>!!u(t.selection)&&H(t,t.selection.anchor.blockId)})}};export{ft as n,wt as t};
2
+ //# sourceMappingURL=TablePlugin-5ru-y-YX.mjs.map