formanitor 0.3.12 → 0.3.13

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 (256) hide show
  1. package/dist/{AddInvestigationWidget-O5YSYLE3.mjs → AddInvestigationWidget-J3NS2VC3.mjs} +5 -5
  2. package/dist/{AddInvestigationWidget-O5YSYLE3.mjs.map → AddInvestigationWidget-J3NS2VC3.mjs.map} +1 -1
  3. package/dist/{AddInvestigationWidget-DLFDZCXO.cjs → AddInvestigationWidget-UOZCAC6Q.cjs} +10 -10
  4. package/dist/{AddInvestigationWidget-DLFDZCXO.cjs.map → AddInvestigationWidget-UOZCAC6Q.cjs.map} +1 -1
  5. package/dist/{AddMedicationWidget-CB7IWDBA.mjs → AddMedicationWidget-K77LLYN6.mjs} +4 -4
  6. package/dist/{AddMedicationWidget-CB7IWDBA.mjs.map → AddMedicationWidget-K77LLYN6.mjs.map} +1 -1
  7. package/dist/{AddMedicationWidget-H5WKS2I6.cjs → AddMedicationWidget-VHR5FSX6.cjs} +10 -10
  8. package/dist/{AddMedicationWidget-H5WKS2I6.cjs.map → AddMedicationWidget-VHR5FSX6.cjs.map} +1 -1
  9. package/dist/{AddProcedureWidget-X5HI4TYI.cjs → AddProcedureWidget-IKX3PNS3.cjs} +8 -8
  10. package/dist/{AddProcedureWidget-X5HI4TYI.cjs.map → AddProcedureWidget-IKX3PNS3.cjs.map} +1 -1
  11. package/dist/{AddProcedureWidget-DJBRBWYJ.mjs → AddProcedureWidget-Q3KXGPEO.mjs} +4 -4
  12. package/dist/{AddProcedureWidget-DJBRBWYJ.mjs.map → AddProcedureWidget-Q3KXGPEO.mjs.map} +1 -1
  13. package/dist/{BiometryIolWorkupWidget-IAX66Z3X.cjs → BiometryIolWorkupWidget-4IHRSZUV.cjs} +6 -6
  14. package/dist/{BiometryIolWorkupWidget-IAX66Z3X.cjs.map → BiometryIolWorkupWidget-4IHRSZUV.cjs.map} +1 -1
  15. package/dist/{BiometryIolWorkupWidget-V5TC4O3D.mjs → BiometryIolWorkupWidget-KJF3JCL5.mjs} +4 -4
  16. package/dist/{BiometryIolWorkupWidget-V5TC4O3D.mjs.map → BiometryIolWorkupWidget-KJF3JCL5.mjs.map} +1 -1
  17. package/dist/BpeChartWidget-LHIWXWBK.mjs +7 -0
  18. package/dist/{BpeChartWidget-O2PYAUUT.cjs.map → BpeChartWidget-LHIWXWBK.mjs.map} +1 -1
  19. package/dist/BpeChartWidget-RLIG4ALE.cjs +28 -0
  20. package/dist/{BpeChartWidget-Z6B4DIVB.mjs.map → BpeChartWidget-RLIG4ALE.cjs.map} +1 -1
  21. package/dist/{DateTimeWidget-ADOL65JG.mjs → DateTimeWidget-4OHDJPOX.mjs} +4 -4
  22. package/dist/{DateTimeWidget-ADOL65JG.mjs.map → DateTimeWidget-4OHDJPOX.mjs.map} +1 -1
  23. package/dist/{DateTimeWidget-3WFHTPJB.cjs → DateTimeWidget-ZXPIE7FP.cjs} +6 -6
  24. package/dist/{DateTimeWidget-3WFHTPJB.cjs.map → DateTimeWidget-ZXPIE7FP.cjs.map} +1 -1
  25. package/dist/{DateWidget-WOFQJVJA.cjs → DateWidget-AKMCXZ3M.cjs} +6 -6
  26. package/dist/{DateWidget-WOFQJVJA.cjs.map → DateWidget-AKMCXZ3M.cjs.map} +1 -1
  27. package/dist/{DateWidget-GOZNF5UN.mjs → DateWidget-F7UEHDK5.mjs} +4 -4
  28. package/dist/{DateWidget-GOZNF5UN.mjs.map → DateWidget-F7UEHDK5.mjs.map} +1 -1
  29. package/dist/{DentalChartWidget-GAHJB4SR.mjs → DentalChartWidget-L7H5OIE7.mjs} +4 -4
  30. package/dist/{DentalChartWidget-GAHJB4SR.mjs.map → DentalChartWidget-L7H5OIE7.mjs.map} +1 -1
  31. package/dist/DentalChartWidget-ZVUVPZGT.cjs +21 -0
  32. package/dist/{DentalChartWidget-JBJ4OAYR.cjs.map → DentalChartWidget-ZVUVPZGT.cjs.map} +1 -1
  33. package/dist/{DiagnosisTextareaWidget-A3WAYPXF.mjs → DiagnosisTextareaWidget-2CNMKZ5U.mjs} +4 -4
  34. package/dist/{DiagnosisTextareaWidget-A3WAYPXF.mjs.map → DiagnosisTextareaWidget-2CNMKZ5U.mjs.map} +1 -1
  35. package/dist/{DiagnosisTextareaWidget-BCXJFGHP.cjs → DiagnosisTextareaWidget-H2F7PBUB.cjs} +7 -7
  36. package/dist/{DiagnosisTextareaWidget-BCXJFGHP.cjs.map → DiagnosisTextareaWidget-H2F7PBUB.cjs.map} +1 -1
  37. package/dist/{DifferentialDiagnosisWidget-BEGFMAMB.mjs → DifferentialDiagnosisWidget-5ZOZOZSP.mjs} +3 -3
  38. package/dist/{DifferentialDiagnosisWidget-BEGFMAMB.mjs.map → DifferentialDiagnosisWidget-5ZOZOZSP.mjs.map} +1 -1
  39. package/dist/{DifferentialDiagnosisWidget-AZDGGX2N.cjs → DifferentialDiagnosisWidget-SJEBX26D.cjs} +5 -5
  40. package/dist/{DifferentialDiagnosisWidget-AZDGGX2N.cjs.map → DifferentialDiagnosisWidget-SJEBX26D.cjs.map} +1 -1
  41. package/dist/{DischargeMedicationOrdersWidget-THGP5JJU.mjs → DischargeMedicationOrdersWidget-57SYCQIW.mjs} +4 -4
  42. package/dist/{DischargeMedicationOrdersWidget-THGP5JJU.mjs.map → DischargeMedicationOrdersWidget-57SYCQIW.mjs.map} +1 -1
  43. package/dist/{DischargeMedicationOrdersWidget-DSIONWUX.cjs → DischargeMedicationOrdersWidget-P4ZITIXV.cjs} +7 -7
  44. package/dist/{DischargeMedicationOrdersWidget-DSIONWUX.cjs.map → DischargeMedicationOrdersWidget-P4ZITIXV.cjs.map} +1 -1
  45. package/dist/{EditableTable-TZFFJ3LV.mjs → EditableTable-BO6TDZB7.mjs} +3 -3
  46. package/dist/{EditableTable-TZFFJ3LV.mjs.map → EditableTable-BO6TDZB7.mjs.map} +1 -1
  47. package/dist/{EditableTable-SAQYJ6QT.cjs → EditableTable-KSNDX7SU.cjs} +4 -4
  48. package/dist/{EditableTable-SAQYJ6QT.cjs.map → EditableTable-KSNDX7SU.cjs.map} +1 -1
  49. package/dist/{ExtraOralExamWidget-IKKYSM3E.cjs → ExtraOralExamWidget-FT4U3IOG.cjs} +13 -13
  50. package/dist/{ExtraOralExamWidget-IKKYSM3E.cjs.map → ExtraOralExamWidget-FT4U3IOG.cjs.map} +1 -1
  51. package/dist/{ExtraOralExamWidget-FGPSCRND.mjs → ExtraOralExamWidget-WSEAECPS.mjs} +4 -4
  52. package/dist/{ExtraOralExamWidget-FGPSCRND.mjs.map → ExtraOralExamWidget-WSEAECPS.mjs.map} +1 -1
  53. package/dist/{FollowupWidget-YUU4PFSD.cjs → FollowupWidget-SBW6M2U2.cjs} +5 -5
  54. package/dist/{FollowupWidget-YUU4PFSD.cjs.map → FollowupWidget-SBW6M2U2.cjs.map} +1 -1
  55. package/dist/{FollowupWidget-3Z7LTEWK.mjs → FollowupWidget-SJECHW7S.mjs} +3 -3
  56. package/dist/{FollowupWidget-3Z7LTEWK.mjs.map → FollowupWidget-SJECHW7S.mjs.map} +1 -1
  57. package/dist/{FunctionalImpairmentScoreWidget-RWBGSKEU.mjs → FunctionalImpairmentScoreWidget-DDJ7ZDNS.mjs} +4 -4
  58. package/dist/{FunctionalImpairmentScoreWidget-RWBGSKEU.mjs.map → FunctionalImpairmentScoreWidget-DDJ7ZDNS.mjs.map} +1 -1
  59. package/dist/{FunctionalImpairmentScoreWidget-VB2O6K7V.cjs → FunctionalImpairmentScoreWidget-OSC5JXTO.cjs} +6 -6
  60. package/dist/{FunctionalImpairmentScoreWidget-VB2O6K7V.cjs.map → FunctionalImpairmentScoreWidget-OSC5JXTO.cjs.map} +1 -1
  61. package/dist/{GsExaminationWidget-V3M6BYHQ.cjs → GsExaminationWidget-J4J3J4F2.cjs} +28 -28
  62. package/dist/{GsExaminationWidget-V3M6BYHQ.cjs.map → GsExaminationWidget-J4J3J4F2.cjs.map} +1 -1
  63. package/dist/{GsExaminationWidget-3FKYFSYF.mjs → GsExaminationWidget-P77CVF67.mjs} +5 -5
  64. package/dist/{GsExaminationWidget-3FKYFSYF.mjs.map → GsExaminationWidget-P77CVF67.mjs.map} +1 -1
  65. package/dist/{GsGradingWidget-YTECG44D.cjs → GsGradingWidget-JUHQFOIY.cjs} +12 -12
  66. package/dist/{GsGradingWidget-YTECG44D.cjs.map → GsGradingWidget-JUHQFOIY.cjs.map} +1 -1
  67. package/dist/{GsGradingWidget-OAO4H7OT.mjs → GsGradingWidget-L7XQHXKA.mjs} +4 -4
  68. package/dist/{GsGradingWidget-OAO4H7OT.mjs.map → GsGradingWidget-L7XQHXKA.mjs.map} +1 -1
  69. package/dist/{GsSmartHistoryWidget-R76GVKXS.mjs → GsSmartHistoryWidget-36TAZHGA.mjs} +5 -5
  70. package/dist/{GsSmartHistoryWidget-R76GVKXS.mjs.map → GsSmartHistoryWidget-36TAZHGA.mjs.map} +1 -1
  71. package/dist/{GsSmartHistoryWidget-KCPXV7QN.cjs → GsSmartHistoryWidget-44KN5X3J.cjs} +18 -18
  72. package/dist/{GsSmartHistoryWidget-KCPXV7QN.cjs.map → GsSmartHistoryWidget-44KN5X3J.cjs.map} +1 -1
  73. package/dist/{HiddenVitalsWidget-I3BDEKZ4.mjs → HiddenVitalsWidget-BKBSZ5G5.mjs} +4 -4
  74. package/dist/{HiddenVitalsWidget-I3BDEKZ4.mjs.map → HiddenVitalsWidget-BKBSZ5G5.mjs.map} +1 -1
  75. package/dist/{HiddenVitalsWidget-C5RWJM6Q.cjs → HiddenVitalsWidget-D5EY2BVO.cjs} +6 -6
  76. package/dist/{HiddenVitalsWidget-C5RWJM6Q.cjs.map → HiddenVitalsWidget-D5EY2BVO.cjs.map} +1 -1
  77. package/dist/{LensAssessmentWidget-MWSYAJVG.mjs → LensAssessmentWidget-E73L5RLN.mjs} +4 -4
  78. package/dist/{LensAssessmentWidget-MWSYAJVG.mjs.map → LensAssessmentWidget-E73L5RLN.mjs.map} +1 -1
  79. package/dist/{LensAssessmentWidget-MPKJE5L4.cjs → LensAssessmentWidget-PXNEWVJH.cjs} +6 -6
  80. package/dist/{LensAssessmentWidget-MPKJE5L4.cjs.map → LensAssessmentWidget-PXNEWVJH.cjs.map} +1 -1
  81. package/dist/{MarMedicationOrdersWidget-FTOEDP5F.mjs → MarMedicationOrdersWidget-C5UFYFM3.mjs} +4 -4
  82. package/dist/{MarMedicationOrdersWidget-FTOEDP5F.mjs.map → MarMedicationOrdersWidget-C5UFYFM3.mjs.map} +1 -1
  83. package/dist/{MarMedicationOrdersWidget-YYODUHM2.cjs → MarMedicationOrdersWidget-F3TI6CZJ.cjs} +7 -7
  84. package/dist/{MarMedicationOrdersWidget-YYODUHM2.cjs.map → MarMedicationOrdersWidget-F3TI6CZJ.cjs.map} +1 -1
  85. package/dist/{OBGExaminationWidget-A6ZWPBLG.mjs → OBGExaminationWidget-4XZ2MRME.mjs} +5 -5
  86. package/dist/{OBGExaminationWidget-A6ZWPBLG.mjs.map → OBGExaminationWidget-4XZ2MRME.mjs.map} +1 -1
  87. package/dist/{OBGExaminationWidget-XXQX34VO.cjs → OBGExaminationWidget-CCYR22O4.cjs} +17 -17
  88. package/dist/{OBGExaminationWidget-XXQX34VO.cjs.map → OBGExaminationWidget-CCYR22O4.cjs.map} +1 -1
  89. package/dist/{OBGPathwayWidget-3H7XSIHF.mjs → OBGPathwayWidget-FF54CCRL.mjs} +7 -7
  90. package/dist/{OBGPathwayWidget-3H7XSIHF.mjs.map → OBGPathwayWidget-FF54CCRL.mjs.map} +1 -1
  91. package/dist/{OBGPathwayWidget-ISVQGOIM.cjs → OBGPathwayWidget-VAF5DWA5.cjs} +23 -23
  92. package/dist/{OBGPathwayWidget-ISVQGOIM.cjs.map → OBGPathwayWidget-VAF5DWA5.cjs.map} +1 -1
  93. package/dist/{ObstetricHistoryWidget-XUI2SDMW.cjs → ObstetricHistoryWidget-DZL6OJLX.cjs} +18 -18
  94. package/dist/{ObstetricHistoryWidget-XUI2SDMW.cjs.map → ObstetricHistoryWidget-DZL6OJLX.cjs.map} +1 -1
  95. package/dist/{ObstetricHistoryWidget-57HV25E5.mjs → ObstetricHistoryWidget-OTXBTHTA.mjs} +6 -6
  96. package/dist/{ObstetricHistoryWidget-57HV25E5.mjs.map → ObstetricHistoryWidget-OTXBTHTA.mjs.map} +1 -1
  97. package/dist/{OphthalDiagnosisWidget-UNBXRQWJ.cjs → OphthalDiagnosisWidget-HHNBYK3Q.cjs} +4 -4
  98. package/dist/{OphthalDiagnosisWidget-UNBXRQWJ.cjs.map → OphthalDiagnosisWidget-HHNBYK3Q.cjs.map} +1 -1
  99. package/dist/{OphthalDiagnosisWidget-FW4U7AMU.mjs → OphthalDiagnosisWidget-W4NMKL4J.mjs} +3 -3
  100. package/dist/{OphthalDiagnosisWidget-FW4U7AMU.mjs.map → OphthalDiagnosisWidget-W4NMKL4J.mjs.map} +1 -1
  101. package/dist/{OphthalmologyWidget-7D6LWQ7D.cjs → OphthalmologyWidget-FQPWK24C.cjs} +4 -4
  102. package/dist/{OphthalmologyWidget-7D6LWQ7D.cjs.map → OphthalmologyWidget-FQPWK24C.cjs.map} +1 -1
  103. package/dist/{OphthalmologyWidget-VXUCHSLP.mjs → OphthalmologyWidget-H7NMSWYI.mjs} +3 -3
  104. package/dist/{OphthalmologyWidget-VXUCHSLP.mjs.map → OphthalmologyWidget-H7NMSWYI.mjs.map} +1 -1
  105. package/dist/{OralHygieneWidget-Z42AE5YZ.cjs → OralHygieneWidget-5SCO62HF.cjs} +8 -8
  106. package/dist/{OralHygieneWidget-Z42AE5YZ.cjs.map → OralHygieneWidget-5SCO62HF.cjs.map} +1 -1
  107. package/dist/{OralHygieneWidget-4QFEFEUB.mjs → OralHygieneWidget-VUDFCZTC.mjs} +4 -4
  108. package/dist/{OralHygieneWidget-4QFEFEUB.mjs.map → OralHygieneWidget-VUDFCZTC.mjs.map} +1 -1
  109. package/dist/{OrthopedicExamWidget-S6OYLNWB.mjs → OrthopedicExamWidget-PQVPCXLT.mjs} +5 -5
  110. package/dist/{OrthopedicExamWidget-S6OYLNWB.mjs.map → OrthopedicExamWidget-PQVPCXLT.mjs.map} +1 -1
  111. package/dist/{OrthopedicExamWidget-DXHFBGMH.cjs → OrthopedicExamWidget-PUIYU2TL.cjs} +9 -9
  112. package/dist/{OrthopedicExamWidget-DXHFBGMH.cjs.map → OrthopedicExamWidget-PUIYU2TL.cjs.map} +1 -1
  113. package/dist/{PainScaleFlagsWidget-KRJXSYBR.mjs → PainScaleFlagsWidget-D75RW7VM.mjs} +6 -6
  114. package/dist/{PainScaleFlagsWidget-KRJXSYBR.mjs.map → PainScaleFlagsWidget-D75RW7VM.mjs.map} +1 -1
  115. package/dist/{PainScaleFlagsWidget-PJ6P65IS.cjs → PainScaleFlagsWidget-L3I3PRM7.cjs} +13 -13
  116. package/dist/{PainScaleFlagsWidget-PJ6P65IS.cjs.map → PainScaleFlagsWidget-L3I3PRM7.cjs.map} +1 -1
  117. package/dist/{PregnancyStatusWidget-L3SGWA4G.cjs → PregnancyStatusWidget-4ZPJM7GG.cjs} +7 -7
  118. package/dist/{PregnancyStatusWidget-L3SGWA4G.cjs.map → PregnancyStatusWidget-4ZPJM7GG.cjs.map} +1 -1
  119. package/dist/{PregnancyStatusWidget-ECCSG54Z.mjs → PregnancyStatusWidget-6TRM2UWA.mjs} +4 -4
  120. package/dist/{PregnancyStatusWidget-ECCSG54Z.mjs.map → PregnancyStatusWidget-6TRM2UWA.mjs.map} +1 -1
  121. package/dist/{ReferralWidget-3762ULVV.mjs → ReferralWidget-DO2GDTGG.mjs} +4 -4
  122. package/dist/{ReferralWidget-3762ULVV.mjs.map → ReferralWidget-DO2GDTGG.mjs.map} +1 -1
  123. package/dist/{ReferralWidget-VA3PUZLL.cjs → ReferralWidget-WR7EN7Y6.cjs} +8 -8
  124. package/dist/{ReferralWidget-VA3PUZLL.cjs.map → ReferralWidget-WR7EN7Y6.cjs.map} +1 -1
  125. package/dist/{RichTextWidget-ZNTAHAQ6.cjs → RichTextWidget-6IQPGNO7.cjs} +7 -7
  126. package/dist/{RichTextWidget-Y7OWJOMZ.mjs.map → RichTextWidget-6IQPGNO7.cjs.map} +1 -1
  127. package/dist/RichTextWidget-CSFWGM3F.mjs +11 -0
  128. package/dist/{RichTextWidget-ZNTAHAQ6.cjs.map → RichTextWidget-CSFWGM3F.mjs.map} +1 -1
  129. package/dist/SmartTextarea-ESTMIA5I.mjs +12 -0
  130. package/dist/{SmartTextarea-AZSP4J3C.cjs.map → SmartTextarea-ESTMIA5I.mjs.map} +1 -1
  131. package/dist/{SmartTextarea-AZSP4J3C.cjs → SmartTextarea-GAW2BXZE.cjs} +6 -6
  132. package/dist/{SmartTextarea-M4TU55KU.mjs.map → SmartTextarea-GAW2BXZE.cjs.map} +1 -1
  133. package/dist/{SuggestionTextareaWidget-LMF7QBV7.cjs → SuggestionTextareaWidget-H737OFYH.cjs} +19 -19
  134. package/dist/{SuggestionTextareaWidget-LMF7QBV7.cjs.map → SuggestionTextareaWidget-H737OFYH.cjs.map} +1 -1
  135. package/dist/{SuggestionTextareaWidget-U4B6NDPB.mjs → SuggestionTextareaWidget-JY5PWPPC.mjs} +7 -7
  136. package/dist/{SuggestionTextareaWidget-U4B6NDPB.mjs.map → SuggestionTextareaWidget-JY5PWPPC.mjs.map} +1 -1
  137. package/dist/{SurgicalRiskFlagsWidget-FRSYPAXJ.mjs → SurgicalRiskFlagsWidget-JLBSOLBA.mjs} +4 -4
  138. package/dist/{SurgicalRiskFlagsWidget-FRSYPAXJ.mjs.map → SurgicalRiskFlagsWidget-JLBSOLBA.mjs.map} +1 -1
  139. package/dist/{SurgicalRiskFlagsWidget-EBVJG63N.cjs → SurgicalRiskFlagsWidget-NSSB4U3Z.cjs} +6 -6
  140. package/dist/{SurgicalRiskFlagsWidget-EBVJG63N.cjs.map → SurgicalRiskFlagsWidget-NSSB4U3Z.cjs.map} +1 -1
  141. package/dist/{TreatmentPlanWidget-AOMWYYB2.cjs → TreatmentPlanWidget-FNU3L3N3.cjs} +8 -8
  142. package/dist/{TreatmentPlanWidget-AOMWYYB2.cjs.map → TreatmentPlanWidget-FNU3L3N3.cjs.map} +1 -1
  143. package/dist/{TreatmentPlanWidget-XZUH65IO.mjs → TreatmentPlanWidget-H223CYQZ.mjs} +5 -5
  144. package/dist/{TreatmentPlanWidget-XZUH65IO.mjs.map → TreatmentPlanWidget-H223CYQZ.mjs.map} +1 -1
  145. package/dist/{UrologyExaminationWidget-NEFFEGCR.mjs → UrologyExaminationWidget-DNJGQXAH.mjs} +5 -5
  146. package/dist/{UrologyExaminationWidget-NEFFEGCR.mjs.map → UrologyExaminationWidget-DNJGQXAH.mjs.map} +1 -1
  147. package/dist/{UrologyExaminationWidget-OQYEGMIU.cjs → UrologyExaminationWidget-O4ENNCGR.cjs} +18 -18
  148. package/dist/{UrologyExaminationWidget-OQYEGMIU.cjs.map → UrologyExaminationWidget-O4ENNCGR.cjs.map} +1 -1
  149. package/dist/{UrologyPathwayWidget-AWASSTOT.cjs → UrologyPathwayWidget-343EB3CN.cjs} +10 -10
  150. package/dist/{UrologyPathwayWidget-AWASSTOT.cjs.map → UrologyPathwayWidget-343EB3CN.cjs.map} +1 -1
  151. package/dist/{UrologyPathwayWidget-KUYKP2JP.mjs → UrologyPathwayWidget-NFLUEPWO.mjs} +5 -5
  152. package/dist/{UrologyPathwayWidget-KUYKP2JP.mjs.map → UrologyPathwayWidget-NFLUEPWO.mjs.map} +1 -1
  153. package/dist/{UrologySmartHistoryWidget-UW5HRCNZ.cjs → UrologySmartHistoryWidget-D4YG6UVB.cjs} +19 -19
  154. package/dist/{UrologySmartHistoryWidget-UW5HRCNZ.cjs.map → UrologySmartHistoryWidget-D4YG6UVB.cjs.map} +1 -1
  155. package/dist/{UrologySmartHistoryWidget-STKGAL4E.mjs → UrologySmartHistoryWidget-DFNY627Z.mjs} +5 -5
  156. package/dist/{UrologySmartHistoryWidget-STKGAL4E.mjs.map → UrologySmartHistoryWidget-DFNY627Z.mjs.map} +1 -1
  157. package/dist/{VitalsWidget-6IFKZ3B5.cjs → VitalsWidget-ILPP6ZJM.cjs} +5 -5
  158. package/dist/{VitalsWidget-6IFKZ3B5.cjs.map → VitalsWidget-ILPP6ZJM.cjs.map} +1 -1
  159. package/dist/{VitalsWidget-VBECLSXS.mjs → VitalsWidget-LCP6UJIK.mjs} +3 -3
  160. package/dist/{VitalsWidget-VBECLSXS.mjs.map → VitalsWidget-LCP6UJIK.mjs.map} +1 -1
  161. package/dist/{chunk-6D4VDOIO.cjs → chunk-4FXFHR57.cjs} +4 -4
  162. package/dist/{chunk-6D4VDOIO.cjs.map → chunk-4FXFHR57.cjs.map} +1 -1
  163. package/dist/{chunk-32PV5N5F.mjs → chunk-4HRGKJXY.mjs} +3 -3
  164. package/dist/{chunk-32PV5N5F.mjs.map → chunk-4HRGKJXY.mjs.map} +1 -1
  165. package/dist/{chunk-7TMCC6NZ.mjs → chunk-5474K4UA.mjs} +3 -3
  166. package/dist/{chunk-7TMCC6NZ.mjs.map → chunk-5474K4UA.mjs.map} +1 -1
  167. package/dist/{chunk-O5E3R7A5.mjs → chunk-74PGBNQL.mjs} +3 -3
  168. package/dist/{chunk-O5E3R7A5.mjs.map → chunk-74PGBNQL.mjs.map} +1 -1
  169. package/dist/{chunk-XB3YNGKB.mjs → chunk-7TWSJ75O.mjs} +4 -4
  170. package/dist/{chunk-XB3YNGKB.mjs.map → chunk-7TWSJ75O.mjs.map} +1 -1
  171. package/dist/{chunk-CYA674S2.mjs → chunk-A6LXDIX7.mjs} +3 -3
  172. package/dist/{chunk-CYA674S2.mjs.map → chunk-A6LXDIX7.mjs.map} +1 -1
  173. package/dist/{chunk-GDBWN7P6.cjs → chunk-AF3CBRGP.cjs} +8 -8
  174. package/dist/{chunk-GDBWN7P6.cjs.map → chunk-AF3CBRGP.cjs.map} +1 -1
  175. package/dist/{chunk-C2BZVYUI.cjs → chunk-AK4VIOZ4.cjs} +7 -7
  176. package/dist/{chunk-C2BZVYUI.cjs.map → chunk-AK4VIOZ4.cjs.map} +1 -1
  177. package/dist/{chunk-BJ2VLXGL.cjs → chunk-AZCZKMIE.cjs} +6 -6
  178. package/dist/{chunk-BJ2VLXGL.cjs.map → chunk-AZCZKMIE.cjs.map} +1 -1
  179. package/dist/{chunk-FKVI2E7G.cjs → chunk-EAYQOSSH.cjs} +4 -4
  180. package/dist/{chunk-FKVI2E7G.cjs.map → chunk-EAYQOSSH.cjs.map} +1 -1
  181. package/dist/{chunk-KEG37EFI.cjs → chunk-FMBNVXQE.cjs} +34 -18
  182. package/dist/chunk-FMBNVXQE.cjs.map +1 -0
  183. package/dist/{chunk-ZEE43BXF.cjs → chunk-GHTWXNPC.cjs} +5 -5
  184. package/dist/{chunk-ZEE43BXF.cjs.map → chunk-GHTWXNPC.cjs.map} +1 -1
  185. package/dist/{chunk-JMMBFI2F.cjs → chunk-GI5QBDPX.cjs} +17 -13
  186. package/dist/chunk-GI5QBDPX.cjs.map +1 -0
  187. package/dist/{chunk-NDG4TJTR.mjs → chunk-HSPOCOFQ.mjs} +3 -3
  188. package/dist/{chunk-NDG4TJTR.mjs.map → chunk-HSPOCOFQ.mjs.map} +1 -1
  189. package/dist/{chunk-LLBYSBKY.cjs → chunk-J7G77636.cjs} +4 -4
  190. package/dist/{chunk-LLBYSBKY.cjs.map → chunk-J7G77636.cjs.map} +1 -1
  191. package/dist/{chunk-ST6T6U3E.mjs → chunk-KAYCW2DF.mjs} +3 -3
  192. package/dist/{chunk-ST6T6U3E.mjs.map → chunk-KAYCW2DF.mjs.map} +1 -1
  193. package/dist/{chunk-BHYPA5NY.mjs → chunk-L3UDG6T3.mjs} +3 -3
  194. package/dist/{chunk-BHYPA5NY.mjs.map → chunk-L3UDG6T3.mjs.map} +1 -1
  195. package/dist/{chunk-GC2GZBUY.cjs → chunk-LBIZDREX.cjs} +4 -4
  196. package/dist/{chunk-GC2GZBUY.cjs.map → chunk-LBIZDREX.cjs.map} +1 -1
  197. package/dist/{chunk-ICC7EWBV.mjs → chunk-MEZUEPR2.mjs} +27 -11
  198. package/dist/chunk-MEZUEPR2.mjs.map +1 -0
  199. package/dist/{chunk-FJ2NG3NL.mjs → chunk-MRVPTU64.mjs} +4 -4
  200. package/dist/{chunk-FJ2NG3NL.mjs.map → chunk-MRVPTU64.mjs.map} +1 -1
  201. package/dist/{chunk-NHWT2G7D.mjs → chunk-NOFLNJZ6.mjs} +13 -9
  202. package/dist/chunk-NOFLNJZ6.mjs.map +1 -0
  203. package/dist/{chunk-Y3MQRSHA.cjs → chunk-P3UZGB74.cjs} +4 -4
  204. package/dist/{chunk-Y3MQRSHA.cjs.map → chunk-P3UZGB74.cjs.map} +1 -1
  205. package/dist/{chunk-QBAMLKAM.cjs → chunk-Q24OK7J6.cjs} +10 -3
  206. package/dist/chunk-Q24OK7J6.cjs.map +1 -0
  207. package/dist/{chunk-DJTZ3QNF.mjs → chunk-SJWKNDI5.mjs} +3 -3
  208. package/dist/{chunk-DJTZ3QNF.mjs.map → chunk-SJWKNDI5.mjs.map} +1 -1
  209. package/dist/{chunk-XXRQCN4Y.mjs → chunk-SORZQ6J6.mjs} +3 -3
  210. package/dist/{chunk-XXRQCN4Y.mjs.map → chunk-SORZQ6J6.mjs.map} +1 -1
  211. package/dist/{chunk-KGCEATHN.cjs → chunk-T66LW3J5.cjs} +4 -4
  212. package/dist/{chunk-KGCEATHN.cjs.map → chunk-T66LW3J5.cjs.map} +1 -1
  213. package/dist/{chunk-DFWDHCLP.mjs → chunk-TPVPMO7W.mjs} +10 -4
  214. package/dist/chunk-TPVPMO7W.mjs.map +1 -0
  215. package/dist/{chunk-GLJ5LI6K.cjs → chunk-V5NEFZGE.cjs} +5 -5
  216. package/dist/{chunk-GLJ5LI6K.cjs.map → chunk-V5NEFZGE.cjs.map} +1 -1
  217. package/dist/{chunk-JNCCDIZF.cjs → chunk-VFATO7VP.cjs} +4 -4
  218. package/dist/{chunk-JNCCDIZF.cjs.map → chunk-VFATO7VP.cjs.map} +1 -1
  219. package/dist/{chunk-IRIZKQOR.mjs → chunk-WNQBXIAP.mjs} +3 -3
  220. package/dist/{chunk-IRIZKQOR.mjs.map → chunk-WNQBXIAP.mjs.map} +1 -1
  221. package/dist/{chunk-5WKPCNAT.mjs → chunk-X4WL56LN.mjs} +3 -3
  222. package/dist/{chunk-5WKPCNAT.mjs.map → chunk-X4WL56LN.mjs.map} +1 -1
  223. package/dist/{chunk-MUEFZIBA.cjs → chunk-ZMLPHAGC.cjs} +4 -4
  224. package/dist/{chunk-MUEFZIBA.cjs.map → chunk-ZMLPHAGC.cjs.map} +1 -1
  225. package/dist/index.cjs +150 -146
  226. package/dist/index.d.cts +66 -33
  227. package/dist/index.d.ts +66 -33
  228. package/dist/index.mjs +57 -57
  229. package/dist/read-only-table.d.cts +2 -2
  230. package/dist/read-only-table.d.ts +2 -2
  231. package/dist/rich-text.cjs +2961 -5
  232. package/dist/rich-text.cjs.map +1 -1
  233. package/dist/rich-text.d.cts +7 -3
  234. package/dist/rich-text.d.ts +7 -3
  235. package/dist/rich-text.mjs +2948 -4
  236. package/dist/rich-text.mjs.map +1 -1
  237. package/dist/richTextClassName-DGvZ5_t4.d.cts +3040 -0
  238. package/dist/richTextClassName-DGvZ5_t4.d.ts +3040 -0
  239. package/dist/smart.cjs +5 -5
  240. package/dist/smart.d.cts +2 -2
  241. package/dist/smart.d.ts +2 -2
  242. package/dist/smart.mjs +3 -3
  243. package/package.json +1 -1
  244. package/dist/BpeChartWidget-O2PYAUUT.cjs +0 -28
  245. package/dist/BpeChartWidget-Z6B4DIVB.mjs +0 -7
  246. package/dist/DentalChartWidget-JBJ4OAYR.cjs +0 -21
  247. package/dist/RichTextWidget-Y7OWJOMZ.mjs +0 -11
  248. package/dist/SmartTextarea-M4TU55KU.mjs +0 -12
  249. package/dist/chunk-DFWDHCLP.mjs.map +0 -1
  250. package/dist/chunk-ICC7EWBV.mjs.map +0 -1
  251. package/dist/chunk-JMMBFI2F.cjs.map +0 -1
  252. package/dist/chunk-KEG37EFI.cjs.map +0 -1
  253. package/dist/chunk-NHWT2G7D.mjs.map +0 -1
  254. package/dist/chunk-QBAMLKAM.cjs.map +0 -1
  255. package/dist/richTextClassName--8wkuHkW.d.cts +0 -10
  256. package/dist/richTextClassName--8wkuHkW.d.ts +0 -10
@@ -0,0 +1,3040 @@
1
+ import { Transaction, EditorState, Plugin, PluginKey } from '@tiptap/pm/state';
2
+ import { Slice, Node as Node$1, Mark as Mark$1, Schema, NodeType as NodeType$1, NodeSpec, DOMOutputSpec, MarkType as MarkType$1, MarkSpec, ParseOptions, ResolvedPos, Fragment } from '@tiptap/pm/model';
3
+ import { NodeViewConstructor, NodeView, MarkViewConstructor, MarkView, EditorView, EditorProps } from '@tiptap/pm/view';
4
+ import { Transform, MapResult } from '@tiptap/pm/transform';
5
+
6
+ type StringKeyOf<T> = Extract<keyof T, string>;
7
+ type CallbackType<T extends Record<string, any>, EventName extends StringKeyOf<T>> = T[EventName] extends any[] ? T[EventName] : [T[EventName]];
8
+ type CallbackFunction<T extends Record<string, any>, EventName extends StringKeyOf<T>> = (...props: CallbackType<T, EventName>) => any;
9
+ declare class EventEmitter<T extends Record<string, any>> {
10
+ private callbacks;
11
+ on<EventName extends StringKeyOf<T>>(event: EventName, fn: CallbackFunction<T, EventName>): this;
12
+ emit<EventName extends StringKeyOf<T>>(event: EventName, ...args: CallbackType<T, EventName>): this;
13
+ off<EventName extends StringKeyOf<T>>(event: EventName, fn?: CallbackFunction<T, EventName>): this;
14
+ once<EventName extends StringKeyOf<T>>(event: EventName, fn: CallbackFunction<T, EventName>): this;
15
+ removeAllListeners(): void;
16
+ }
17
+
18
+ type InputRuleMatch = {
19
+ index: number;
20
+ text: string;
21
+ replaceWith?: string;
22
+ match?: RegExpMatchArray;
23
+ data?: Record<string, any>;
24
+ };
25
+ type InputRuleFinder = RegExp | ((text: string) => InputRuleMatch | null);
26
+ declare class InputRule {
27
+ find: InputRuleFinder;
28
+ handler: (props: {
29
+ state: EditorState;
30
+ range: Range;
31
+ match: ExtendedRegExpMatchArray;
32
+ commands: SingleCommands;
33
+ chain: () => ChainedCommands;
34
+ can: () => CanCommands;
35
+ }) => void | null;
36
+ undoable: boolean;
37
+ constructor(config: {
38
+ find: InputRuleFinder;
39
+ handler: (props: {
40
+ state: EditorState;
41
+ range: Range;
42
+ match: ExtendedRegExpMatchArray;
43
+ commands: SingleCommands;
44
+ chain: () => ChainedCommands;
45
+ can: () => CanCommands;
46
+ }) => void | null;
47
+ undoable?: boolean;
48
+ });
49
+ }
50
+
51
+ interface MarkConfig<Options = any, Storage = any> extends ExtendableConfig<Options, Storage, MarkConfig<Options, Storage>, MarkType$1> {
52
+ /**
53
+ * Mark View
54
+ */
55
+ addMarkView?: ((this: {
56
+ name: string;
57
+ options: Options;
58
+ storage: Storage;
59
+ editor: Editor;
60
+ type: MarkType$1;
61
+ parent: ParentConfig<MarkConfig<Options, Storage>>['addMarkView'];
62
+ }) => MarkViewRenderer) | null;
63
+ /**
64
+ * Keep mark after split node
65
+ */
66
+ keepOnSplit?: boolean | (() => boolean);
67
+ /**
68
+ * Inclusive
69
+ */
70
+ inclusive?: MarkSpec['inclusive'] | ((this: {
71
+ name: string;
72
+ options: Options;
73
+ storage: Storage;
74
+ parent: ParentConfig<MarkConfig<Options, Storage>>['inclusive'];
75
+ editor?: Editor;
76
+ }) => MarkSpec['inclusive']);
77
+ /**
78
+ * Excludes
79
+ */
80
+ excludes?: MarkSpec['excludes'] | ((this: {
81
+ name: string;
82
+ options: Options;
83
+ storage: Storage;
84
+ parent: ParentConfig<MarkConfig<Options, Storage>>['excludes'];
85
+ editor?: Editor;
86
+ }) => MarkSpec['excludes']);
87
+ /**
88
+ * Marks this Mark as exitable
89
+ */
90
+ exitable?: boolean | (() => boolean);
91
+ /**
92
+ * Group
93
+ */
94
+ group?: MarkSpec['group'] | ((this: {
95
+ name: string;
96
+ options: Options;
97
+ storage: Storage;
98
+ parent: ParentConfig<MarkConfig<Options, Storage>>['group'];
99
+ editor?: Editor;
100
+ }) => MarkSpec['group']);
101
+ /**
102
+ * Spanning
103
+ */
104
+ spanning?: MarkSpec['spanning'] | ((this: {
105
+ name: string;
106
+ options: Options;
107
+ storage: Storage;
108
+ parent: ParentConfig<MarkConfig<Options, Storage>>['spanning'];
109
+ editor?: Editor;
110
+ }) => MarkSpec['spanning']);
111
+ /**
112
+ * Code
113
+ */
114
+ code?: boolean | ((this: {
115
+ name: string;
116
+ options: Options;
117
+ storage: Storage;
118
+ parent: ParentConfig<MarkConfig<Options, Storage>>['code'];
119
+ editor?: Editor;
120
+ }) => boolean);
121
+ /**
122
+ * Parse HTML
123
+ */
124
+ parseHTML?: (this: {
125
+ name: string;
126
+ options: Options;
127
+ storage: Storage;
128
+ parent: ParentConfig<MarkConfig<Options, Storage>>['parseHTML'];
129
+ editor?: Editor;
130
+ }) => MarkSpec['parseDOM'];
131
+ /**
132
+ * Render HTML
133
+ */
134
+ renderHTML?: ((this: {
135
+ name: string;
136
+ options: Options;
137
+ storage: Storage;
138
+ parent: ParentConfig<MarkConfig<Options, Storage>>['renderHTML'];
139
+ editor?: Editor;
140
+ }, props: {
141
+ mark: Mark$1;
142
+ HTMLAttributes: Record<string, any>;
143
+ }) => DOMOutputSpec) | null;
144
+ /**
145
+ * Attributes
146
+ */
147
+ addAttributes?: (this: {
148
+ name: string;
149
+ options: Options;
150
+ storage: Storage;
151
+ parent: ParentConfig<MarkConfig<Options, Storage>>['addAttributes'];
152
+ editor?: Editor;
153
+ }) => Attributes$1 | {};
154
+ }
155
+ /**
156
+ * The Mark class is used to create custom mark extensions.
157
+ * @see https://tiptap.dev/api/extensions#create-a-new-extension
158
+ */
159
+ declare class Mark<Options = any, Storage = any> extends Extendable<Options, Storage, MarkConfig<Options, Storage>> {
160
+ type: string;
161
+ /**
162
+ * Create a new Mark instance
163
+ * @param config - Mark configuration object or a function that returns a configuration object
164
+ */
165
+ static create<O = any, S = any>(config?: Partial<MarkConfig<O, S>> | (() => Partial<MarkConfig<O, S>>)): Mark<O, S>;
166
+ static handleExit({ editor, mark }: {
167
+ editor: Editor;
168
+ mark: Mark;
169
+ }): boolean;
170
+ configure(options?: Partial<Options>): Mark<Options, Storage>;
171
+ extend<ExtendedOptions = Options, ExtendedStorage = Storage, ExtendedConfig extends MarkConfig<ExtendedOptions, ExtendedStorage> = MarkConfig<ExtendedOptions, ExtendedStorage>>(extendedConfig?: (() => Partial<ExtendedConfig>) | (Partial<ExtendedConfig> & ThisType<{
172
+ name: string;
173
+ options: ExtendedOptions;
174
+ storage: ExtendedStorage;
175
+ editor: Editor;
176
+ type: MarkType$1;
177
+ }>)): Mark<ExtendedOptions, ExtendedStorage>;
178
+ }
179
+
180
+ interface NodeConfig<Options = any, Storage = any> extends ExtendableConfig<Options, Storage, NodeConfig<Options, Storage>, NodeType$1> {
181
+ /**
182
+ * Node View
183
+ */
184
+ addNodeView?: ((this: {
185
+ name: string;
186
+ options: Options;
187
+ storage: Storage;
188
+ editor: Editor;
189
+ type: NodeType$1;
190
+ parent: ParentConfig<NodeConfig<Options, Storage>>['addNodeView'];
191
+ }) => NodeViewRenderer | null) | null;
192
+ /**
193
+ * Defines if this node should be a top level node (doc)
194
+ * @default false
195
+ * @example true
196
+ */
197
+ topNode?: boolean;
198
+ /**
199
+ * The content expression for this node, as described in the [schema
200
+ * guide](/docs/guide/#schema.content_expressions). When not given,
201
+ * the node does not allow any content.
202
+ *
203
+ * You can read more about it on the Prosemirror documentation here
204
+ * @see https://prosemirror.net/docs/guide/#schema.content_expressions
205
+ * @default undefined
206
+ * @example content: 'block+'
207
+ * @example content: 'headline paragraph block*'
208
+ */
209
+ content?: NodeSpec['content'] | ((this: {
210
+ name: string;
211
+ options: Options;
212
+ storage: Storage;
213
+ parent: ParentConfig<NodeConfig<Options, Storage>>['content'];
214
+ editor?: Editor;
215
+ }) => NodeSpec['content']);
216
+ /**
217
+ * The marks that are allowed inside of this node. May be a
218
+ * space-separated string referring to mark names or groups, `"_"`
219
+ * to explicitly allow all marks, or `""` to disallow marks. When
220
+ * not given, nodes with inline content default to allowing all
221
+ * marks, other nodes default to not allowing marks.
222
+ *
223
+ * @example marks: 'strong em'
224
+ */
225
+ marks?: NodeSpec['marks'] | ((this: {
226
+ name: string;
227
+ options: Options;
228
+ storage: Storage;
229
+ parent: ParentConfig<NodeConfig<Options, Storage>>['marks'];
230
+ editor?: Editor;
231
+ }) => NodeSpec['marks']);
232
+ /**
233
+ * The group or space-separated groups to which this node belongs,
234
+ * which can be referred to in the content expressions for the
235
+ * schema.
236
+ *
237
+ * By default Tiptap uses the groups 'block' and 'inline' for nodes. You
238
+ * can also use custom groups if you want to group specific nodes together
239
+ * and handle them in your schema.
240
+ * @example group: 'block'
241
+ * @example group: 'inline'
242
+ * @example group: 'customBlock' // this uses a custom group
243
+ */
244
+ group?: NodeSpec['group'] | ((this: {
245
+ name: string;
246
+ options: Options;
247
+ storage: Storage;
248
+ parent: ParentConfig<NodeConfig<Options, Storage>>['group'];
249
+ editor?: Editor;
250
+ }) => NodeSpec['group']);
251
+ /**
252
+ * Should be set to true for inline nodes. (Implied for text nodes.)
253
+ */
254
+ inline?: NodeSpec['inline'] | ((this: {
255
+ name: string;
256
+ options: Options;
257
+ storage: Storage;
258
+ parent: ParentConfig<NodeConfig<Options, Storage>>['inline'];
259
+ editor?: Editor;
260
+ }) => NodeSpec['inline']);
261
+ /**
262
+ * Can be set to true to indicate that, though this isn't a [leaf
263
+ * node](https://prosemirror.net/docs/ref/#model.NodeType.isLeaf), it doesn't have directly editable
264
+ * content and should be treated as a single unit in the view.
265
+ *
266
+ * @example atom: true
267
+ */
268
+ atom?: NodeSpec['atom'] | ((this: {
269
+ name: string;
270
+ options: Options;
271
+ storage: Storage;
272
+ parent: ParentConfig<NodeConfig<Options, Storage>>['atom'];
273
+ editor?: Editor;
274
+ }) => NodeSpec['atom']);
275
+ /**
276
+ * Controls whether nodes of this type can be selected as a [node
277
+ * selection](https://prosemirror.net/docs/ref/#state.NodeSelection). Defaults to true for non-text
278
+ * nodes.
279
+ *
280
+ * @default true
281
+ * @example selectable: false
282
+ */
283
+ selectable?: NodeSpec['selectable'] | ((this: {
284
+ name: string;
285
+ options: Options;
286
+ storage: Storage;
287
+ parent: ParentConfig<NodeConfig<Options, Storage>>['selectable'];
288
+ editor?: Editor;
289
+ }) => NodeSpec['selectable']);
290
+ /**
291
+ * Determines whether nodes of this type can be dragged without
292
+ * being selected. Defaults to false.
293
+ *
294
+ * @default: false
295
+ * @example: draggable: true
296
+ */
297
+ draggable?: NodeSpec['draggable'] | ((this: {
298
+ name: string;
299
+ options: Options;
300
+ storage: Storage;
301
+ parent: ParentConfig<NodeConfig<Options, Storage>>['draggable'];
302
+ editor?: Editor;
303
+ }) => NodeSpec['draggable']);
304
+ /**
305
+ * Can be used to indicate that this node contains code, which
306
+ * causes some commands to behave differently.
307
+ */
308
+ code?: NodeSpec['code'] | ((this: {
309
+ name: string;
310
+ options: Options;
311
+ storage: Storage;
312
+ parent: ParentConfig<NodeConfig<Options, Storage>>['code'];
313
+ editor?: Editor;
314
+ }) => NodeSpec['code']);
315
+ /**
316
+ * Controls way whitespace in this a node is parsed. The default is
317
+ * `"normal"`, which causes the [DOM parser](https://prosemirror.net/docs/ref/#model.DOMParser) to
318
+ * collapse whitespace in normal mode, and normalize it (replacing
319
+ * newlines and such with spaces) otherwise. `"pre"` causes the
320
+ * parser to preserve spaces inside the node. When this option isn't
321
+ * given, but [`code`](https://prosemirror.net/docs/ref/#model.NodeSpec.code) is true, `whitespace`
322
+ * will default to `"pre"`. Note that this option doesn't influence
323
+ * the way the node is rendered—that should be handled by `toDOM`
324
+ * and/or styling.
325
+ */
326
+ whitespace?: NodeSpec['whitespace'] | ((this: {
327
+ name: string;
328
+ options: Options;
329
+ storage: Storage;
330
+ parent: ParentConfig<NodeConfig<Options, Storage>>['whitespace'];
331
+ editor?: Editor;
332
+ }) => NodeSpec['whitespace']);
333
+ /**
334
+ * Allows a **single** node to be set as linebreak equivalent (e.g. hardBreak).
335
+ * When converting between block types that have whitespace set to "pre"
336
+ * and don't support the linebreak node (e.g. codeBlock) and other block types
337
+ * that do support the linebreak node (e.g. paragraphs) - this node will be used
338
+ * as the linebreak instead of stripping the newline.
339
+ *
340
+ * See [linebreakReplacement](https://prosemirror.net/docs/ref/#model.NodeSpec.linebreakReplacement).
341
+ */
342
+ linebreakReplacement?: NodeSpec['linebreakReplacement'] | ((this: {
343
+ name: string;
344
+ options: Options;
345
+ storage: Storage;
346
+ parent: ParentConfig<NodeConfig<Options, Storage>>['linebreakReplacement'];
347
+ editor?: Editor;
348
+ }) => NodeSpec['linebreakReplacement']);
349
+ /**
350
+ * When enabled, enables both
351
+ * [`definingAsContext`](https://prosemirror.net/docs/ref/#model.NodeSpec.definingAsContext) and
352
+ * [`definingForContent`](https://prosemirror.net/docs/ref/#model.NodeSpec.definingForContent).
353
+ *
354
+ * @default false
355
+ * @example isolating: true
356
+ */
357
+ defining?: NodeSpec['defining'] | ((this: {
358
+ name: string;
359
+ options: Options;
360
+ storage: Storage;
361
+ parent: ParentConfig<NodeConfig<Options, Storage>>['defining'];
362
+ editor?: Editor;
363
+ }) => NodeSpec['defining']);
364
+ /**
365
+ * When enabled (default is false), the sides of nodes of this type
366
+ * count as boundaries that regular editing operations, like
367
+ * backspacing or lifting, won't cross. An example of a node that
368
+ * should probably have this enabled is a table cell.
369
+ */
370
+ isolating?: NodeSpec['isolating'] | ((this: {
371
+ name: string;
372
+ options: Options;
373
+ storage: Storage;
374
+ parent: ParentConfig<NodeConfig<Options, Storage>>['isolating'];
375
+ editor?: Editor;
376
+ }) => NodeSpec['isolating']);
377
+ /**
378
+ * Associates DOM parser information with this node, which can be
379
+ * used by [`DOMParser.fromSchema`](https://prosemirror.net/docs/ref/#model.DOMParser^fromSchema) to
380
+ * automatically derive a parser. The `node` field in the rules is
381
+ * implied (the name of this node will be filled in automatically).
382
+ * If you supply your own parser, you do not need to also specify
383
+ * parsing rules in your schema.
384
+ *
385
+ * @example parseHTML: [{ tag: 'div', attrs: { 'data-id': 'my-block' } }]
386
+ */
387
+ parseHTML?: (this: {
388
+ name: string;
389
+ options: Options;
390
+ storage: Storage;
391
+ parent: ParentConfig<NodeConfig<Options, Storage>>['parseHTML'];
392
+ editor?: Editor;
393
+ }) => NodeSpec['parseDOM'];
394
+ /**
395
+ * A description of a DOM structure. Can be either a string, which is
396
+ * interpreted as a text node, a DOM node, which is interpreted as
397
+ * itself, a `{dom, contentDOM}` object, or an array.
398
+ *
399
+ * An array describes a DOM element. The first value in the array
400
+ * should be a string—the name of the DOM element, optionally prefixed
401
+ * by a namespace URL and a space. If the second element is plain
402
+ * object, it is interpreted as a set of attributes for the element.
403
+ * Any elements after that (including the 2nd if it's not an attribute
404
+ * object) are interpreted as children of the DOM elements, and must
405
+ * either be valid `DOMOutputSpec` values, or the number zero.
406
+ *
407
+ * The number zero (pronounced “hole”) is used to indicate the place
408
+ * where a node's child nodes should be inserted. If it occurs in an
409
+ * output spec, it should be the only child element in its parent
410
+ * node.
411
+ *
412
+ * @example toDOM: ['div[data-id="my-block"]', { class: 'my-block' }, 0]
413
+ */
414
+ renderHTML?: ((this: {
415
+ name: string;
416
+ options: Options;
417
+ storage: Storage;
418
+ parent: ParentConfig<NodeConfig<Options, Storage>>['renderHTML'];
419
+ editor?: Editor;
420
+ }, props: {
421
+ node: Node$1;
422
+ HTMLAttributes: Record<string, any>;
423
+ }) => DOMOutputSpec) | null;
424
+ /**
425
+ * renders the node as text
426
+ * @example renderText: () => 'foo
427
+ */
428
+ renderText?: ((this: {
429
+ name: string;
430
+ options: Options;
431
+ storage: Storage;
432
+ parent: ParentConfig<NodeConfig<Options, Storage>>['renderText'];
433
+ editor?: Editor;
434
+ }, props: {
435
+ node: Node$1;
436
+ pos: number;
437
+ parent: Node$1;
438
+ index: number;
439
+ }) => string) | null;
440
+ /**
441
+ * Add attributes to the node
442
+ * @example addAttributes: () => ({ class: 'foo' })
443
+ */
444
+ addAttributes?: (this: {
445
+ name: string;
446
+ options: Options;
447
+ storage: Storage;
448
+ parent: ParentConfig<NodeConfig<Options, Storage>>['addAttributes'];
449
+ editor?: Editor;
450
+ }) => Attributes$1 | {};
451
+ }
452
+ /**
453
+ * The Node class is used to create custom node extensions.
454
+ * @see https://tiptap.dev/api/extensions#create-a-new-extension
455
+ */
456
+ declare class Node<Options = any, Storage = any> extends Extendable<Options, Storage, NodeConfig<Options, Storage>> {
457
+ type: string;
458
+ /**
459
+ * Create a new Node instance
460
+ * @param config - Node configuration object or a function that returns a configuration object
461
+ */
462
+ static create<O = any, S = any>(config?: Partial<NodeConfig<O, S>> | (() => Partial<NodeConfig<O, S>>)): Node<O, S>;
463
+ configure(options?: Partial<Options>): Node<Options, Storage>;
464
+ extend<ExtendedOptions = Options, ExtendedStorage = Storage, ExtendedConfig extends NodeConfig<ExtendedOptions, ExtendedStorage> = NodeConfig<ExtendedOptions, ExtendedStorage>>(extendedConfig?: (() => Partial<ExtendedConfig>) | (Partial<ExtendedConfig> & ThisType<{
465
+ name: string;
466
+ options: ExtendedOptions;
467
+ storage: ExtendedStorage;
468
+ editor: Editor;
469
+ type: NodeType$1;
470
+ }>)): Node<ExtendedOptions, ExtendedStorage>;
471
+ }
472
+
473
+ type PasteRuleMatch = {
474
+ index: number;
475
+ text: string;
476
+ replaceWith?: string;
477
+ match?: RegExpMatchArray;
478
+ data?: Record<string, any>;
479
+ };
480
+ type PasteRuleFinder = RegExp | ((text: string, event?: ClipboardEvent | null) => PasteRuleMatch[] | null | undefined);
481
+ /**
482
+ * Paste rules are used to react to pasted content.
483
+ * @see https://tiptap.dev/docs/editor/extensions/custom-extensions/extend-existing#paste-rules
484
+ */
485
+ declare class PasteRule {
486
+ find: PasteRuleFinder;
487
+ handler: (props: {
488
+ state: EditorState;
489
+ range: Range;
490
+ match: ExtendedRegExpMatchArray;
491
+ commands: SingleCommands;
492
+ chain: () => ChainedCommands;
493
+ can: () => CanCommands;
494
+ pasteEvent: ClipboardEvent | null;
495
+ dropEvent: DragEvent | null;
496
+ }) => void | null;
497
+ constructor(config: {
498
+ find: PasteRuleFinder;
499
+ handler: (props: {
500
+ can: () => CanCommands;
501
+ chain: () => ChainedCommands;
502
+ commands: SingleCommands;
503
+ dropEvent: DragEvent | null;
504
+ match: ExtendedRegExpMatchArray;
505
+ pasteEvent: ClipboardEvent | null;
506
+ range: Range;
507
+ state: EditorState;
508
+ }) => void | null;
509
+ });
510
+ }
511
+
512
+ interface ExtendableConfig<Options = any, Storage = any, Config extends ExtensionConfig<Options, Storage> | NodeConfig<Options, Storage> | MarkConfig<Options, Storage> | ExtendableConfig<Options, Storage> = ExtendableConfig<Options, Storage, any, any>, PMType = any> {
513
+ /**
514
+ * The extension name - this must be unique.
515
+ * It will be used to identify the extension.
516
+ *
517
+ * @example 'myExtension'
518
+ */
519
+ name: string;
520
+ /**
521
+ * The priority of your extension. The higher, the earlier it will be called
522
+ * and will take precedence over other extensions with a lower priority.
523
+ * @default 100
524
+ * @example 101
525
+ */
526
+ priority?: number;
527
+ /**
528
+ * This method will add options to this extension
529
+ * @see https://tiptap.dev/docs/editor/guide/custom-extensions#settings
530
+ * @example
531
+ * addOptions() {
532
+ * return {
533
+ * myOption: 'foo',
534
+ * myOtherOption: 10,
535
+ * }
536
+ */
537
+ addOptions?: (this: {
538
+ name: string;
539
+ parent: ParentConfig<Config>['addOptions'];
540
+ }) => Options;
541
+ /**
542
+ * The default storage this extension can save data to.
543
+ * @see https://tiptap.dev/docs/editor/guide/custom-extensions#storage
544
+ * @example
545
+ * defaultStorage: {
546
+ * prefetchedUsers: [],
547
+ * loading: false,
548
+ * }
549
+ */
550
+ addStorage?: (this: {
551
+ name: string;
552
+ options: Options;
553
+ parent: ParentConfig<Config>['addStorage'];
554
+ }) => Storage;
555
+ /**
556
+ * This function adds globalAttributes to specific nodes.
557
+ * @see https://tiptap.dev/docs/editor/guide/custom-extensions#global-attributes
558
+ * @example
559
+ * addGlobalAttributes() {
560
+ * return [
561
+ * {
562
+ // Extend the following extensions
563
+ * types: [
564
+ * 'heading',
565
+ * 'paragraph',
566
+ * ],
567
+ * // … with those attributes
568
+ * attributes: {
569
+ * textAlign: {
570
+ * default: 'left',
571
+ * renderHTML: attributes => ({
572
+ * style: `text-align: ${attributes.textAlign}`,
573
+ * }),
574
+ * parseHTML: element => element.style.textAlign || 'left',
575
+ * },
576
+ * },
577
+ * },
578
+ * ]
579
+ * }
580
+ */
581
+ addGlobalAttributes?: (this: {
582
+ name: string;
583
+ options: Options;
584
+ storage: Storage;
585
+ extensions: (Node | Mark)[];
586
+ parent: ParentConfig<Config>['addGlobalAttributes'];
587
+ }) => GlobalAttributes;
588
+ /**
589
+ * This function adds commands to the editor
590
+ * @see https://tiptap.dev/docs/editor/guide/custom-extensions#commands
591
+ * @example
592
+ * addCommands() {
593
+ * return {
594
+ * myCommand: () => ({ chain }) => chain().setMark('type', 'foo').run(),
595
+ * }
596
+ * }
597
+ */
598
+ addCommands?: (this: {
599
+ name: string;
600
+ options: Options;
601
+ storage: Storage;
602
+ editor: Editor;
603
+ type: PMType;
604
+ parent: ParentConfig<Config>['addCommands'];
605
+ }) => Partial<RawCommands>;
606
+ /**
607
+ * This function registers keyboard shortcuts.
608
+ * @see https://tiptap.dev/docs/editor/guide/custom-extensions#keyboard-shortcuts
609
+ * @example
610
+ * addKeyboardShortcuts() {
611
+ * return {
612
+ * 'Mod-l': () => this.editor.commands.toggleBulletList(),
613
+ * }
614
+ * },
615
+ */
616
+ addKeyboardShortcuts?: (this: {
617
+ name: string;
618
+ options: Options;
619
+ storage: Storage;
620
+ editor: Editor;
621
+ type: PMType;
622
+ parent: ParentConfig<Config>['addKeyboardShortcuts'];
623
+ }) => {
624
+ [key: string]: KeyboardShortcutCommand;
625
+ };
626
+ /**
627
+ * This function adds input rules to the editor.
628
+ * @see https://tiptap.dev/docs/editor/guide/custom-extensions#input-rules
629
+ * @example
630
+ * addInputRules() {
631
+ * return [
632
+ * markInputRule({
633
+ * find: inputRegex,
634
+ * type: this.type,
635
+ * }),
636
+ * ]
637
+ * },
638
+ */
639
+ addInputRules?: (this: {
640
+ name: string;
641
+ options: Options;
642
+ storage: Storage;
643
+ editor: Editor;
644
+ type: PMType;
645
+ parent: ParentConfig<Config>['addInputRules'];
646
+ }) => InputRule[];
647
+ /**
648
+ * This function adds paste rules to the editor.
649
+ * @see https://tiptap.dev/docs/editor/guide/custom-extensions#paste-rules
650
+ * @example
651
+ * addPasteRules() {
652
+ * return [
653
+ * markPasteRule({
654
+ * find: pasteRegex,
655
+ * type: this.type,
656
+ * }),
657
+ * ]
658
+ * },
659
+ */
660
+ addPasteRules?: (this: {
661
+ name: string;
662
+ options: Options;
663
+ storage: Storage;
664
+ editor: Editor;
665
+ type: PMType;
666
+ parent: ParentConfig<Config>['addPasteRules'];
667
+ }) => PasteRule[];
668
+ /**
669
+ * This function adds Prosemirror plugins to the editor
670
+ * @see https://tiptap.dev/docs/editor/guide/custom-extensions#prosemirror-plugins
671
+ * @example
672
+ * addProseMirrorPlugins() {
673
+ * return [
674
+ * customPlugin(),
675
+ * ]
676
+ * }
677
+ */
678
+ addProseMirrorPlugins?: (this: {
679
+ name: string;
680
+ options: Options;
681
+ storage: Storage;
682
+ editor: Editor;
683
+ type: PMType;
684
+ parent: ParentConfig<Config>['addProseMirrorPlugins'];
685
+ }) => Plugin[];
686
+ /**
687
+ * This function transforms pasted HTML content before it's parsed.
688
+ * Extensions can use this to modify or clean up pasted HTML.
689
+ * The transformations are chained - each extension's transform receives
690
+ * the output from the previous extension's transform.
691
+ * @see https://tiptap.dev/docs/editor/guide/custom-extensions#transform-pasted-html
692
+ * @example
693
+ * transformPastedHTML(html) {
694
+ * // Remove all style attributes
695
+ * return html.replace(/style="[^"]*"/g, '')
696
+ * }
697
+ */
698
+ transformPastedHTML?: (this: {
699
+ name: string;
700
+ options: Options;
701
+ storage: Storage;
702
+ editor: Editor;
703
+ type: PMType;
704
+ parent: ParentConfig<Config>['transformPastedHTML'];
705
+ }, html: string) => string;
706
+ /**
707
+ * This function adds additional extensions to the editor. This is useful for
708
+ * building extension kits.
709
+ * @example
710
+ * addExtensions() {
711
+ * return [
712
+ * BulletList,
713
+ * OrderedList,
714
+ * ListItem
715
+ * ]
716
+ * }
717
+ */
718
+ addExtensions?: (this: {
719
+ name: string;
720
+ options: Options;
721
+ storage: Storage;
722
+ parent: ParentConfig<Config>['addExtensions'];
723
+ }) => Extensions;
724
+ /**
725
+ * The markdown token name
726
+ *
727
+ * This is the name of the token that this extension uses to parse and render markdown and comes from the Marked Lexer.
728
+ *
729
+ * @see https://github.com/markedjs/marked/blob/master/src/Tokens.ts
730
+ *
731
+ */
732
+ markdownTokenName?: string;
733
+ /**
734
+ * The parse function used by the markdown parser to convert markdown tokens to ProseMirror nodes.
735
+ */
736
+ parseMarkdown?: (token: MarkdownToken, helpers: MarkdownParseHelpers) => MarkdownParseResult;
737
+ /**
738
+ * The serializer function used by the markdown serializer to convert ProseMirror nodes to markdown tokens.
739
+ */
740
+ renderMarkdown?: (node: JSONContent, helpers: MarkdownRendererHelpers, ctx: RenderContext) => string;
741
+ /**
742
+ * The markdown tokenizer responsible for turning a markdown string into tokens
743
+ *
744
+ * Custom tokenizers are only needed when you want to parse non-standard markdown token.
745
+ */
746
+ markdownTokenizer?: MarkdownTokenizer;
747
+ /**
748
+ * Optional markdown options for indentation
749
+ */
750
+ markdownOptions?: {
751
+ /**
752
+ * Defines if this markdown element should indent it's child elements
753
+ */
754
+ indentsContent?: boolean;
755
+ /**
756
+ * Lets a mark tell the Markdown serializer which inline HTML tags it can
757
+ * safely use when plain markdown delimiters would become ambiguous.
758
+ *
759
+ * This is mainly useful for overlapping marks. For example, bold followed
760
+ * by bold+italic followed by italic cannot always be written back with only
761
+ * `*` and `**` in a way that still parses correctly. In that case, the
762
+ * serializer can close the overlapping section with markdown and reopen the
763
+ * remaining tail with HTML instead.
764
+ *
765
+ * Example:
766
+ * - desired formatting: `**123` + `*456*` + `789 italic`
767
+ * - serialized result: `**123*456***<em>789</em>`
768
+ *
769
+ * If your extension defines custom mark names, set `htmlReopen` on that
770
+ * extension so the serializer can reuse its HTML form for overlap cases.
771
+ */
772
+ htmlReopen?: {
773
+ open: string;
774
+ close: string;
775
+ };
776
+ };
777
+ /**
778
+ * This function extends the schema of the node.
779
+ * @example
780
+ * extendNodeSchema() {
781
+ * return {
782
+ * group: 'inline',
783
+ * selectable: false,
784
+ * }
785
+ * }
786
+ */
787
+ extendNodeSchema?: ((this: {
788
+ name: string;
789
+ options: Options;
790
+ storage: Storage;
791
+ parent: ParentConfig<Config>['extendNodeSchema'];
792
+ }, extension: Node) => Record<string, any>) | null;
793
+ /**
794
+ * This function extends the schema of the mark.
795
+ * @example
796
+ * extendMarkSchema() {
797
+ * return {
798
+ * group: 'inline',
799
+ * selectable: false,
800
+ * }
801
+ * }
802
+ */
803
+ extendMarkSchema?: ((this: {
804
+ name: string;
805
+ options: Options;
806
+ storage: Storage;
807
+ parent: ParentConfig<Config>['extendMarkSchema'];
808
+ }, extension: Mark) => Record<string, any>) | null;
809
+ /**
810
+ * The editor is not ready yet.
811
+ */
812
+ onBeforeCreate?: ((this: {
813
+ name: string;
814
+ options: Options;
815
+ storage: Storage;
816
+ editor: Editor;
817
+ type: PMType;
818
+ parent: ParentConfig<Config>['onBeforeCreate'];
819
+ }, event: EditorEvents['beforeCreate']) => void) | null;
820
+ /**
821
+ * The editor is ready.
822
+ */
823
+ onCreate?: ((this: {
824
+ name: string;
825
+ options: Options;
826
+ storage: Storage;
827
+ editor: Editor;
828
+ type: PMType;
829
+ parent: ParentConfig<Config>['onCreate'];
830
+ }, event: EditorEvents['create']) => void) | null;
831
+ /**
832
+ * The content has changed.
833
+ */
834
+ onUpdate?: ((this: {
835
+ name: string;
836
+ options: Options;
837
+ storage: Storage;
838
+ editor: Editor;
839
+ type: PMType;
840
+ parent: ParentConfig<Config>['onUpdate'];
841
+ }, event: EditorEvents['update']) => void) | null;
842
+ /**
843
+ * The selection has changed.
844
+ */
845
+ onSelectionUpdate?: ((this: {
846
+ name: string;
847
+ options: Options;
848
+ storage: Storage;
849
+ editor: Editor;
850
+ type: PMType;
851
+ parent: ParentConfig<Config>['onSelectionUpdate'];
852
+ }, event: EditorEvents['selectionUpdate']) => void) | null;
853
+ /**
854
+ * The editor state has changed.
855
+ */
856
+ onTransaction?: ((this: {
857
+ name: string;
858
+ options: Options;
859
+ storage: Storage;
860
+ editor: Editor;
861
+ type: PMType;
862
+ parent: ParentConfig<Config>['onTransaction'];
863
+ }, event: EditorEvents['transaction']) => void) | null;
864
+ /**
865
+ * The editor is focused.
866
+ */
867
+ onFocus?: ((this: {
868
+ name: string;
869
+ options: Options;
870
+ storage: Storage;
871
+ editor: Editor;
872
+ type: PMType;
873
+ parent: ParentConfig<Config>['onFocus'];
874
+ }, event: EditorEvents['focus']) => void) | null;
875
+ /**
876
+ * The editor isn’t focused anymore.
877
+ */
878
+ onBlur?: ((this: {
879
+ name: string;
880
+ options: Options;
881
+ storage: Storage;
882
+ editor: Editor;
883
+ type: PMType;
884
+ parent: ParentConfig<Config>['onBlur'];
885
+ }, event: EditorEvents['blur']) => void) | null;
886
+ /**
887
+ * The editor is destroyed.
888
+ */
889
+ onDestroy?: ((this: {
890
+ name: string;
891
+ options: Options;
892
+ storage: Storage;
893
+ editor: Editor;
894
+ type: PMType;
895
+ parent: ParentConfig<Config>['onDestroy'];
896
+ }, event: EditorEvents['destroy']) => void) | null;
897
+ /**
898
+ * This hook allows you to intercept and modify transactions before they are dispatched.
899
+ *
900
+ * Example
901
+ * ```ts
902
+ * dispatchTransaction({ transaction, next }) {
903
+ * console.log('Dispatching transaction:', transaction)
904
+ * next(transaction)
905
+ * }
906
+ * ```
907
+ *
908
+ * @param props - The dispatch transaction props
909
+ */
910
+ dispatchTransaction?: ((this: {
911
+ name: string;
912
+ options: Options;
913
+ storage: Storage;
914
+ editor: Editor;
915
+ type: PMType;
916
+ parent: ParentConfig<Config>['dispatchTransaction'];
917
+ }, props: DispatchTransactionProps) => void) | null;
918
+ }
919
+ declare class Extendable<Options = any, Storage = any, Config = ExtensionConfig<Options, Storage> | NodeConfig<Options, Storage> | MarkConfig<Options, Storage>> {
920
+ type: string;
921
+ parent: Extendable | null;
922
+ child: Extendable | null;
923
+ name: string;
924
+ config: Config;
925
+ constructor(config?: Partial<Config>);
926
+ get options(): Options;
927
+ get storage(): Readonly<Storage>;
928
+ configure(options?: Partial<Options>): Extendable<Options, Storage, ExtensionConfig<Options, Storage> | NodeConfig<Options, Storage> | MarkConfig<Options, Storage>>;
929
+ extend<ExtendedOptions = Options, ExtendedStorage = Storage, ExtendedConfig = ExtensionConfig<ExtendedOptions, ExtendedStorage> | NodeConfig<ExtendedOptions, ExtendedStorage> | MarkConfig<ExtendedOptions, ExtendedStorage>>(extendedConfig?: Partial<ExtendedConfig>): Extendable<ExtendedOptions, ExtendedStorage>;
930
+ }
931
+ type AnyExtension = Extendable;
932
+ type Extensions = AnyExtension[];
933
+ type ParentConfig<T> = Partial<{
934
+ [P in keyof T]: Required<T>[P] extends (...args: any) => any ? (...args: Parameters<Required<T>[P]>) => ReturnType<Required<T>[P]> : T[P];
935
+ }>;
936
+ interface EditorEvents {
937
+ mount: {
938
+ /**
939
+ * The editor instance
940
+ */
941
+ editor: Editor;
942
+ };
943
+ unmount: {
944
+ /**
945
+ * The editor instance
946
+ */
947
+ editor: Editor;
948
+ };
949
+ beforeCreate: {
950
+ /**
951
+ * The editor instance
952
+ */
953
+ editor: Editor;
954
+ };
955
+ create: {
956
+ /**
957
+ * The editor instance
958
+ */
959
+ editor: Editor;
960
+ };
961
+ contentError: {
962
+ /**
963
+ * The editor instance
964
+ */
965
+ editor: Editor;
966
+ /**
967
+ * The error that occurred while parsing the content
968
+ */
969
+ error: Error;
970
+ /**
971
+ * If called, will re-initialize the editor with the collaboration extension removed.
972
+ * This will prevent syncing back deletions of content not present in the current schema.
973
+ */
974
+ disableCollaboration: () => void;
975
+ };
976
+ update: {
977
+ /**
978
+ * The editor instance
979
+ */
980
+ editor: Editor;
981
+ /**
982
+ * The transaction that caused the update
983
+ */
984
+ transaction: Transaction;
985
+ /**
986
+ * Appended transactions that were added to the initial transaction by plugins
987
+ */
988
+ appendedTransactions: Transaction[];
989
+ };
990
+ selectionUpdate: {
991
+ /**
992
+ * The editor instance
993
+ */
994
+ editor: Editor;
995
+ /**
996
+ * The transaction that caused the selection update
997
+ */
998
+ transaction: Transaction;
999
+ };
1000
+ beforeTransaction: {
1001
+ /**
1002
+ * The editor instance
1003
+ */
1004
+ editor: Editor;
1005
+ /**
1006
+ * The transaction that will be applied
1007
+ */
1008
+ transaction: Transaction;
1009
+ /**
1010
+ * The next state of the editor after the transaction is applied
1011
+ */
1012
+ nextState: EditorState;
1013
+ };
1014
+ transaction: {
1015
+ /**
1016
+ * The editor instance
1017
+ */
1018
+ editor: Editor;
1019
+ /**
1020
+ * The initial transaction
1021
+ */
1022
+ transaction: Transaction;
1023
+ /**
1024
+ * Appended transactions that were added to the initial transaction by plugins
1025
+ */
1026
+ appendedTransactions: Transaction[];
1027
+ };
1028
+ focus: {
1029
+ /**
1030
+ * The editor instance
1031
+ */
1032
+ editor: Editor;
1033
+ /**
1034
+ * The focus event
1035
+ */
1036
+ event: FocusEvent;
1037
+ /**
1038
+ * The transaction that caused the focus
1039
+ */
1040
+ transaction: Transaction;
1041
+ };
1042
+ blur: {
1043
+ /**
1044
+ * The editor instance
1045
+ */
1046
+ editor: Editor;
1047
+ /**
1048
+ * The focus event
1049
+ */
1050
+ event: FocusEvent;
1051
+ /**
1052
+ * The transaction that caused the blur
1053
+ */
1054
+ transaction: Transaction;
1055
+ };
1056
+ destroy: void;
1057
+ paste: {
1058
+ /**
1059
+ * The editor instance
1060
+ */
1061
+ editor: Editor;
1062
+ /**
1063
+ * The clipboard event
1064
+ */
1065
+ event: ClipboardEvent;
1066
+ /**
1067
+ * The slice that was pasted
1068
+ */
1069
+ slice: Slice;
1070
+ };
1071
+ drop: {
1072
+ /**
1073
+ * The editor instance
1074
+ */
1075
+ editor: Editor;
1076
+ /**
1077
+ * The drag event
1078
+ */
1079
+ event: DragEvent;
1080
+ /**
1081
+ * The slice that was dropped
1082
+ */
1083
+ slice: Slice;
1084
+ /**
1085
+ * Whether the content was moved (true) or copied (false)
1086
+ */
1087
+ moved: boolean;
1088
+ };
1089
+ delete: {
1090
+ /**
1091
+ * The editor instance
1092
+ */
1093
+ editor: Editor;
1094
+ /**
1095
+ * The range of the deleted content (before the deletion)
1096
+ */
1097
+ deletedRange: Range;
1098
+ /**
1099
+ * The new range of positions of where the deleted content was in the new document (after the deletion)
1100
+ */
1101
+ newRange: Range;
1102
+ /**
1103
+ * The transaction that caused the deletion
1104
+ */
1105
+ transaction: Transaction;
1106
+ /**
1107
+ * The combined transform (including all appended transactions) that caused the deletion
1108
+ */
1109
+ combinedTransform: Transform;
1110
+ /**
1111
+ * Whether the deletion was partial (only a part of this content was deleted)
1112
+ */
1113
+ partial: boolean;
1114
+ /**
1115
+ * This is the start position of the mark in the document (before the deletion)
1116
+ */
1117
+ from: number;
1118
+ /**
1119
+ * This is the end position of the mark in the document (before the deletion)
1120
+ */
1121
+ to: number;
1122
+ } & ({
1123
+ /**
1124
+ * The content that was deleted
1125
+ */
1126
+ type: 'node';
1127
+ /**
1128
+ * The node which the deletion occurred in
1129
+ * @note This can be a parent node of the deleted content
1130
+ */
1131
+ node: Node$1;
1132
+ /**
1133
+ * The new start position of the node in the document (after the deletion)
1134
+ */
1135
+ newFrom: number;
1136
+ /**
1137
+ * The new end position of the node in the document (after the deletion)
1138
+ */
1139
+ newTo: number;
1140
+ } | {
1141
+ /**
1142
+ * The content that was deleted
1143
+ */
1144
+ type: 'mark';
1145
+ /**
1146
+ * The mark that was deleted
1147
+ */
1148
+ mark: Mark$1;
1149
+ });
1150
+ }
1151
+ /**
1152
+ * Props passed to the `dispatchTransaction` hook in extensions.
1153
+ */
1154
+ type DispatchTransactionProps = {
1155
+ /**
1156
+ * The transaction that is about to be dispatched.
1157
+ */
1158
+ transaction: Transaction;
1159
+ /**
1160
+ * A function that should be called to pass the transaction down to the next extension
1161
+ * (or eventually to the editor).
1162
+ *
1163
+ * @param transaction The transaction to dispatch
1164
+ */
1165
+ next: (transaction: Transaction) => void;
1166
+ };
1167
+ type EnableRules = (AnyExtension | string)[] | boolean;
1168
+ interface EditorOptions {
1169
+ /**
1170
+ * The element to bind the editor to:
1171
+ * - If an `Element` is passed, the editor will be mounted appended to that element
1172
+ * - If `null` is passed, the editor will not be mounted automatically
1173
+ * - If an object with a `mount` property is passed, the editor will be mounted to that element
1174
+ * - If a function is passed, it will be called with the editor's element, which should place the editor within the document
1175
+ */
1176
+ element: Element | {
1177
+ mount: HTMLElement;
1178
+ } | ((editor: HTMLElement) => void) | null;
1179
+ /**
1180
+ * The content of the editor (HTML, JSON, or a JSON array)
1181
+ */
1182
+ content: Content;
1183
+ /**
1184
+ * The extensions to use
1185
+ */
1186
+ extensions: Extensions;
1187
+ /**
1188
+ * Whether to inject base CSS styles
1189
+ */
1190
+ injectCSS: boolean;
1191
+ /**
1192
+ * A nonce to use for CSP while injecting styles
1193
+ */
1194
+ injectNonce: string | undefined;
1195
+ /**
1196
+ * The editor's initial focus position
1197
+ */
1198
+ autofocus: FocusPosition;
1199
+ /**
1200
+ * Whether the editor is editable
1201
+ */
1202
+ editable: boolean;
1203
+ /**
1204
+ * The default text direction for all content in the editor.
1205
+ * When set to 'ltr' or 'rtl', all nodes will have the corresponding dir attribute.
1206
+ * When set to 'auto', the dir attribute will be set based on content detection.
1207
+ * When undefined, no dir attribute will be added.
1208
+ * @default undefined
1209
+ */
1210
+ textDirection?: 'ltr' | 'rtl' | 'auto';
1211
+ /**
1212
+ * The editor's props
1213
+ */
1214
+ editorProps: EditorProps;
1215
+ /**
1216
+ * The editor's content parser options
1217
+ */
1218
+ parseOptions: ParseOptions;
1219
+ /**
1220
+ * The editor's core extension options
1221
+ */
1222
+ coreExtensionOptions?: {
1223
+ clipboardTextSerializer?: {
1224
+ blockSeparator?: string;
1225
+ };
1226
+ /**
1227
+ * Options for the `tabindex` core extension.
1228
+ */
1229
+ tabindex?: {
1230
+ /**
1231
+ * The value for the `tabindex` attribute on the editor element.
1232
+ */
1233
+ value?: string;
1234
+ };
1235
+ delete?: {
1236
+ /**
1237
+ * Whether the `delete` extension should be called asynchronously to avoid blocking the editor while processing deletions
1238
+ * @default true deletion events are called asynchronously
1239
+ */
1240
+ async?: boolean;
1241
+ /**
1242
+ * Allows filtering the transactions that are processed by the `delete` extension.
1243
+ * If the function returns `true`, the transaction will be ignored.
1244
+ */
1245
+ filterTransaction?: (transaction: Transaction) => boolean;
1246
+ };
1247
+ };
1248
+ /**
1249
+ * Whether to enable input rules behavior
1250
+ */
1251
+ enableInputRules: EnableRules;
1252
+ /**
1253
+ * Whether to enable paste rules behavior
1254
+ */
1255
+ enablePasteRules: EnableRules;
1256
+ /**
1257
+ * Determines whether core extensions are enabled.
1258
+ *
1259
+ * If set to `false`, all core extensions will be disabled.
1260
+ * To disable specific core extensions, provide an object where the keys are the extension names and the values are `false`.
1261
+ * Extensions not listed in the object will remain enabled.
1262
+ *
1263
+ * @example
1264
+ * // Disable all core extensions
1265
+ * enabledCoreExtensions: false
1266
+ *
1267
+ * @example
1268
+ * // Disable only the keymap core extension
1269
+ * enabledCoreExtensions: { keymap: false }
1270
+ *
1271
+ * @default true
1272
+ */
1273
+ enableCoreExtensions?: boolean | Partial<Record<'editable' | 'clipboardTextSerializer' | 'commands' | 'focusEvents' | 'keymap' | 'tabindex' | 'drop' | 'paste' | 'delete' | 'textDirection', false>>;
1274
+ /**
1275
+ * If `true`, the editor will check the content for errors on initialization.
1276
+ * Emitting the `contentError` event if the content is invalid.
1277
+ * Which can be used to show a warning or error message to the user.
1278
+ * @default false
1279
+ */
1280
+ enableContentCheck: boolean;
1281
+ /**
1282
+ * If `true`, the editor will emit the `contentError` event if invalid content is
1283
+ * encountered but `enableContentCheck` is `false`. This lets you preserve the
1284
+ * invalid editor content while still showing a warning or error message to
1285
+ * the user.
1286
+ *
1287
+ * @default false
1288
+ */
1289
+ emitContentError: boolean;
1290
+ /**
1291
+ * Called before the editor is constructed.
1292
+ */
1293
+ onBeforeCreate: (props: EditorEvents['beforeCreate']) => void;
1294
+ /**
1295
+ * Called after the editor is constructed.
1296
+ */
1297
+ onCreate: (props: EditorEvents['create']) => void;
1298
+ /**
1299
+ * Called when the editor is mounted.
1300
+ */
1301
+ onMount: (props: EditorEvents['mount']) => void;
1302
+ /**
1303
+ * Called when the editor is unmounted.
1304
+ */
1305
+ onUnmount: (props: EditorEvents['unmount']) => void;
1306
+ /**
1307
+ * Called when the editor encounters an error while parsing the content.
1308
+ * Only enabled if `enableContentCheck` is `true`.
1309
+ */
1310
+ onContentError: (props: EditorEvents['contentError']) => void;
1311
+ /**
1312
+ * Called when the editor's content is updated.
1313
+ */
1314
+ onUpdate: (props: EditorEvents['update']) => void;
1315
+ /**
1316
+ * Called when the editor's selection is updated.
1317
+ */
1318
+ onSelectionUpdate: (props: EditorEvents['selectionUpdate']) => void;
1319
+ /**
1320
+ * Called after a transaction is applied to the editor.
1321
+ */
1322
+ onTransaction: (props: EditorEvents['transaction']) => void;
1323
+ /**
1324
+ * Called on focus events.
1325
+ */
1326
+ onFocus: (props: EditorEvents['focus']) => void;
1327
+ /**
1328
+ * Called on blur events.
1329
+ */
1330
+ onBlur: (props: EditorEvents['blur']) => void;
1331
+ /**
1332
+ * Called when the editor is destroyed.
1333
+ */
1334
+ onDestroy: (props: EditorEvents['destroy']) => void;
1335
+ /**
1336
+ * Called when content is pasted into the editor.
1337
+ */
1338
+ onPaste: (e: ClipboardEvent, slice: Slice) => void;
1339
+ /**
1340
+ * Called when content is dropped into the editor.
1341
+ */
1342
+ onDrop: (e: DragEvent, slice: Slice, moved: boolean) => void;
1343
+ /**
1344
+ * Called when content is deleted from the editor.
1345
+ */
1346
+ onDelete: (props: EditorEvents['delete']) => void;
1347
+ /**
1348
+ * Whether to enable extension-level dispatching of transactions.
1349
+ * If `false`, extensions cannot define their own `dispatchTransaction` hook.
1350
+ *
1351
+ * @default true
1352
+ * @example
1353
+ * new Editor({
1354
+ * enableExtensionDispatchTransaction: false,
1355
+ * })
1356
+ */
1357
+ enableExtensionDispatchTransaction?: boolean;
1358
+ }
1359
+ /**
1360
+ * The editor's content as HTML
1361
+ */
1362
+ type HTMLContent = string;
1363
+ /**
1364
+ * A Tiptap JSON node or document. Tiptap JSON is the standard format for
1365
+ * storing and manipulating Tiptap content. It is equivalent to the JSON
1366
+ * representation of a Prosemirror node.
1367
+ *
1368
+ * Tiptap JSON documents are trees of nodes. The root node is usually of type
1369
+ * `doc`. Nodes can have other nodes as children. Nodes can also have marks and
1370
+ * attributes. Text nodes (nodes with type `text`) have a `text` property and no
1371
+ * children.
1372
+ *
1373
+ * @example
1374
+ * ```ts
1375
+ * const content: JSONContent = {
1376
+ * type: 'doc',
1377
+ * content: [
1378
+ * {
1379
+ * type: 'paragraph',
1380
+ * content: [
1381
+ * {
1382
+ * type: 'text',
1383
+ * text: 'Hello ',
1384
+ * },
1385
+ * {
1386
+ * type: 'text',
1387
+ * text: 'world',
1388
+ * marks: [{ type: 'bold' }],
1389
+ * },
1390
+ * ],
1391
+ * },
1392
+ * ],
1393
+ * }
1394
+ * ```
1395
+ */
1396
+ type JSONContent = {
1397
+ /**
1398
+ * The type of the node
1399
+ */
1400
+ type?: string;
1401
+ /**
1402
+ * The attributes of the node. Attributes can have any JSON-serializable value.
1403
+ */
1404
+ attrs?: Record<string, any> | undefined;
1405
+ /**
1406
+ * The children of the node. A node can have other nodes as children.
1407
+ */
1408
+ content?: JSONContent[];
1409
+ /**
1410
+ * A list of marks of the node. Inline nodes can have marks.
1411
+ */
1412
+ marks?: {
1413
+ /**
1414
+ * The type of the mark
1415
+ */
1416
+ type: string;
1417
+ /**
1418
+ * The attributes of the mark. Attributes can have any JSON-serializable value.
1419
+ */
1420
+ attrs?: Record<string, any>;
1421
+ [key: string]: any;
1422
+ }[];
1423
+ /**
1424
+ * The text content of the node. This property is only present on text nodes
1425
+ * (i.e. nodes with `type: 'text'`).
1426
+ *
1427
+ * Text nodes cannot have children, but they can have marks.
1428
+ */
1429
+ text?: string;
1430
+ [key: string]: any;
1431
+ };
1432
+ /**
1433
+ * A mark type is either a JSON representation of a mark or a Prosemirror mark instance
1434
+ */
1435
+ type MarkType<Type extends string | {
1436
+ name: string;
1437
+ } = any, TAttributes extends undefined | Record<string, any> = any> = {
1438
+ type: Type;
1439
+ attrs: TAttributes;
1440
+ };
1441
+ /**
1442
+ * A node type is either a JSON representation of a node or a Prosemirror node instance
1443
+ */
1444
+ type NodeType<Type extends string | {
1445
+ name: string;
1446
+ } = any, TAttributes extends undefined | Record<string, any> = any, NodeMarkType extends MarkType = any, TContent extends (NodeType | TextType)[] = any> = {
1447
+ type: Type;
1448
+ attrs: TAttributes;
1449
+ content?: TContent;
1450
+ marks?: NodeMarkType[];
1451
+ };
1452
+ /**
1453
+ * A node type is either a JSON representation of a doc node or a Prosemirror doc node instance
1454
+ */
1455
+ type DocumentType<TDocAttributes extends Record<string, any> | undefined = Record<string, any>, TContentType extends NodeType[] = NodeType[]> = Omit<NodeType<'doc', TDocAttributes, never, TContentType>, 'marks' | 'content'> & {
1456
+ content: TContentType;
1457
+ };
1458
+ /**
1459
+ * A node type is either a JSON representation of a text node or a Prosemirror text node instance
1460
+ */
1461
+ type TextType<TMarkType extends MarkType = MarkType> = {
1462
+ type: 'text';
1463
+ text: string;
1464
+ marks: TMarkType[];
1465
+ };
1466
+ type Content = HTMLContent | JSONContent | JSONContent[] | null;
1467
+ type CommandProps = {
1468
+ editor: Editor;
1469
+ tr: Transaction;
1470
+ commands: SingleCommands;
1471
+ can: () => CanCommands;
1472
+ chain: () => ChainedCommands;
1473
+ state: EditorState;
1474
+ view: EditorView;
1475
+ dispatch: ((args?: any) => any) | undefined;
1476
+ };
1477
+ type Command = (props: CommandProps) => boolean;
1478
+ type KeyboardShortcutCommand = (props: {
1479
+ editor: Editor;
1480
+ }) => boolean;
1481
+ type Attribute = {
1482
+ default?: any;
1483
+ validate?: string | ((value: any) => void);
1484
+ rendered?: boolean;
1485
+ renderHTML?: ((attributes: Record<string, any>) => Record<string, any> | null) | null;
1486
+ parseHTML?: ((element: HTMLElement) => any | null) | null;
1487
+ keepOnSplit?: boolean;
1488
+ isRequired?: boolean;
1489
+ };
1490
+ type Attributes$1 = {
1491
+ [key: string]: Attribute;
1492
+ };
1493
+ type ExtensionAttribute = {
1494
+ type: string;
1495
+ name: string;
1496
+ attribute: Required<Omit<Attribute, 'validate'>> & Pick<Attribute, 'validate'>;
1497
+ };
1498
+ type GlobalAttributes = {
1499
+ /**
1500
+ * The node & mark types this attribute should be applied to.
1501
+ * Can be a specific array of type names, or a shorthand string:
1502
+ * - `'*'` applies to all nodes (excluding text) and all marks
1503
+ * - `'nodes'` applies to all nodes (excluding the built-in text node)
1504
+ * - `'marks'` applies to all marks
1505
+ * - `string[]` applies to specific node/mark types by name
1506
+ * @example
1507
+ * types: '*' // All nodes and marks
1508
+ * types: 'nodes' // All nodes
1509
+ * types: 'marks' // All marks
1510
+ * types: ['heading', 'paragraph'] // Specific types
1511
+ */
1512
+ types: string[] | 'nodes' | 'marks' | '*';
1513
+ /**
1514
+ * The attributes to add to the node or mark types.
1515
+ */
1516
+ attributes: Record<string, Attribute | undefined>;
1517
+ }[];
1518
+ type UnionToIntersection<U> = (U extends any ? (k: U) => void : never) extends (k: infer I) => void ? I : never;
1519
+ type ValuesOf<T> = T[keyof T];
1520
+ type KeysWithTypeOf<T, Type> = {
1521
+ [P in keyof T]: T[P] extends Type ? P : never;
1522
+ }[keyof T];
1523
+ interface NodeViewRendererProps {
1524
+ /**
1525
+ * The node that is being rendered.
1526
+ */
1527
+ node: Parameters<NodeViewConstructor>[0];
1528
+ /**
1529
+ * The editor's view.
1530
+ */
1531
+ view: Parameters<NodeViewConstructor>[1];
1532
+ /**
1533
+ * A function that can be called to get the node's current position in the document.
1534
+ */
1535
+ getPos: Parameters<NodeViewConstructor>[2];
1536
+ /**
1537
+ * is an array of node or inline decorations that are active around the node.
1538
+ * They are automatically drawn in the normal way, and you will usually just want to ignore this, but they can also be used as a way to provide context information to the node view without adding it to the document itself.
1539
+ */
1540
+ decorations: Parameters<NodeViewConstructor>[3];
1541
+ /**
1542
+ * holds the decorations for the node's content. You can safely ignore this if your view has no content or a contentDOM property, since the editor will draw the decorations on the content.
1543
+ * But if you, for example, want to create a nested editor with the content, it may make sense to provide it with the inner decorations.
1544
+ */
1545
+ innerDecorations: Parameters<NodeViewConstructor>[4];
1546
+ /**
1547
+ * The editor instance.
1548
+ */
1549
+ editor: Editor;
1550
+ /**
1551
+ * The extension that is responsible for the node.
1552
+ */
1553
+ extension: Node;
1554
+ /**
1555
+ * The HTML attributes that should be added to the node's DOM element.
1556
+ */
1557
+ HTMLAttributes: Record<string, any>;
1558
+ }
1559
+ type NodeViewRenderer = (props: NodeViewRendererProps) => NodeView;
1560
+ interface MarkViewRendererProps {
1561
+ /**
1562
+ * The node that is being rendered.
1563
+ */
1564
+ mark: Parameters<MarkViewConstructor>[0];
1565
+ /**
1566
+ * The editor's view.
1567
+ */
1568
+ view: Parameters<MarkViewConstructor>[1];
1569
+ /**
1570
+ * indicates whether the mark's content is inline
1571
+ */
1572
+ inline: Parameters<MarkViewConstructor>[2];
1573
+ /**
1574
+ * The editor instance.
1575
+ */
1576
+ editor: Editor;
1577
+ /**
1578
+ * The extension that is responsible for the mark.
1579
+ */
1580
+ extension: Mark;
1581
+ /**
1582
+ * The HTML attributes that should be added to the mark's DOM element.
1583
+ */
1584
+ HTMLAttributes: Record<string, any>;
1585
+ updateAttributes: (attrs: Record<string, any>) => void;
1586
+ }
1587
+ type MarkViewRenderer<Props = MarkViewRendererProps> = (props: Props) => MarkView;
1588
+ type UnionCommands<T = Command> = UnionToIntersection<ValuesOf<Pick<Commands<T>, KeysWithTypeOf<Commands<T>, object>>>>;
1589
+ type RawCommands = {
1590
+ [Item in keyof UnionCommands]: UnionCommands<Command>[Item];
1591
+ };
1592
+ type SingleCommands = {
1593
+ [Item in keyof UnionCommands]: UnionCommands<boolean>[Item];
1594
+ };
1595
+ type ChainedCommands = {
1596
+ [Item in keyof UnionCommands]: UnionCommands<ChainedCommands>[Item];
1597
+ } & {
1598
+ run: () => boolean;
1599
+ };
1600
+ type CanCommands = SingleCommands & {
1601
+ chain: () => ChainedCommands;
1602
+ };
1603
+ type FocusPosition = 'start' | 'end' | 'all' | number | boolean | null;
1604
+ type Range = {
1605
+ from: number;
1606
+ to: number;
1607
+ };
1608
+ type TextSerializer = (props: {
1609
+ node: Node$1;
1610
+ pos: number;
1611
+ parent: Node$1;
1612
+ index: number;
1613
+ range: Range;
1614
+ }) => string;
1615
+ type ExtendedRegExpMatchArray = RegExpMatchArray & {
1616
+ data?: Record<string, any>;
1617
+ };
1618
+ /** Markdown related types */
1619
+ type MarkdownToken = {
1620
+ type?: string;
1621
+ raw?: string;
1622
+ text?: string;
1623
+ tokens?: MarkdownToken[];
1624
+ depth?: number;
1625
+ items?: MarkdownToken[];
1626
+ [key: string]: any;
1627
+ };
1628
+ /**
1629
+ * Helpers specifically for parsing markdown tokens into Tiptap JSON.
1630
+ * These are provided to extension parse handlers.
1631
+ */
1632
+ type MarkdownParseHelpers = {
1633
+ /** Parse an array of inline tokens into text nodes with marks */
1634
+ parseInline: (tokens: MarkdownToken[]) => JSONContent[];
1635
+ /** Tokenize source text as inline markdown when supported by the markdown parser */
1636
+ tokenizeInline?: (src: string) => MarkdownToken[];
1637
+ /** Parse an array of block-level tokens */
1638
+ parseChildren: (tokens: MarkdownToken[]) => JSONContent[];
1639
+ /** Parse block-level tokens while preserving implicit empty paragraphs from blank lines */
1640
+ parseBlockChildren?: (tokens: MarkdownToken[]) => JSONContent[];
1641
+ /** Create a text node with optional marks */
1642
+ createTextNode: (text: string, marks?: Array<{
1643
+ type: string;
1644
+ attrs?: any;
1645
+ }>) => JSONContent;
1646
+ /** Create any node type with attributes and content */
1647
+ createNode: (type: string, attrs?: any, content?: JSONContent[]) => JSONContent;
1648
+ /** Apply a mark to content (used for inline marks like bold, italic) */
1649
+ applyMark: (markType: string, content: JSONContent[], attrs?: any) => {
1650
+ mark: string;
1651
+ content: JSONContent[];
1652
+ attrs?: any;
1653
+ };
1654
+ };
1655
+
1656
+ /**
1657
+ * Return shape for parser-level `parse` handlers.
1658
+ * - a single JSON-like node
1659
+ * - an array of JSON-like nodes
1660
+ * - or a `{ mark: string, content: JSONLike[] }` shape to apply a mark
1661
+ */
1662
+ type MarkdownParseResult = JSONContent | JSONContent[] | {
1663
+ mark: string;
1664
+ content: JSONContent[];
1665
+ attrs?: any;
1666
+ };
1667
+ type RenderContext = {
1668
+ index: number;
1669
+ level: number;
1670
+ meta?: Record<string, any>;
1671
+ parentType?: string | null;
1672
+ previousNode?: JSONContent | null;
1673
+ };
1674
+ /**
1675
+ * Configuration object passed to custom marked.js tokenizers
1676
+ */
1677
+ type MarkdownLexerConfiguration = {
1678
+ /**
1679
+ * Can be used to transform source text into inline tokens - useful while tokenizing child tokens.
1680
+ * @param src
1681
+ * @returns Array of inline tokens
1682
+ */
1683
+ inlineTokens: (src: string) => MarkdownToken[];
1684
+ /**
1685
+ * Can be used to transform source text into block-level tokens - useful while tokenizing child tokens.
1686
+ * @param src
1687
+ * @returns Array of block-level tokens
1688
+ */
1689
+ blockTokens: (src: string) => MarkdownToken[];
1690
+ };
1691
+ /** Custom tokenizer function for marked.js extensions */
1692
+ type MarkdownTokenizer = {
1693
+ /** Token name this tokenizer creates */
1694
+ name: string;
1695
+ /** Priority level for tokenizer ordering (higher = earlier) */
1696
+ level?: 'block' | 'inline';
1697
+ /** A string to look for or a function that returns the start index of the token in the source string */
1698
+ start?: string | ((src: string) => number);
1699
+ /** Function that attempts to parse custom syntax from start of text */
1700
+ tokenize: (src: string, tokens: MarkdownToken[], lexer: MarkdownLexerConfiguration) => MarkdownToken | undefined | void;
1701
+ };
1702
+ type MarkdownRendererHelpers = {
1703
+ /**
1704
+ * Render children nodes to a markdown string, optionally separated by a string.
1705
+ * @param nodes The node or array of nodes to render
1706
+ * @param separator An optional separator string (legacy) or RenderContext
1707
+ * @returns The rendered markdown string
1708
+ */
1709
+ renderChildren: (nodes: JSONContent | JSONContent[], separator?: string) => string;
1710
+ /** Render a single child node with its sibling index preserved */
1711
+ renderChild?: (node: JSONContent, index: number) => string;
1712
+ /**
1713
+ * Render a text token to a markdown string
1714
+ * @param prefix The prefix to add before the content
1715
+ * @param content The content to wrap
1716
+ * @returns The wrapped content
1717
+ */
1718
+ wrapInBlock: (prefix: string, content: string) => string;
1719
+ /**
1720
+ * Indent a markdown string according to the provided RenderContext
1721
+ * @param content The content to indent
1722
+ * @returns The indented content
1723
+ */
1724
+ indent: (content: string) => string;
1725
+ };
1726
+ type Utils = {
1727
+ /**
1728
+ * Returns the new position after applying a transaction.
1729
+ *
1730
+ * @param position The position to update. A MappablePosition instance.
1731
+ * @param transaction The transaction to apply.
1732
+ * @returns The new position after applying the transaction.
1733
+ *
1734
+ * @example
1735
+ * const position = editor.utils.createMappablePosition(10)
1736
+ * const {position, mapResult} = editor.utils.getUpdatedPosition(position, transaction)
1737
+ */
1738
+ getUpdatedPosition: (position: MappablePosition, transaction: Transaction) => GetUpdatedPositionResult;
1739
+ /**
1740
+ * Creates a MappablePosition from a position number. A mappable position can be used to track the
1741
+ * next position after applying a transaction.
1742
+ *
1743
+ * @param position The position (as a number) where the MappablePosition will be created.
1744
+ * @returns A new MappablePosition instance at the given position.
1745
+ *
1746
+ * @example
1747
+ * const position = editor.utils.createMappablePosition(10)
1748
+ */
1749
+ createMappablePosition: (position: number) => MappablePosition;
1750
+ };
1751
+
1752
+ /**
1753
+ * Create a flattened array of extensions by traversing the `addExtensions` field.
1754
+ * @param extensions An array of Tiptap extensions
1755
+ * @returns A flattened array of Tiptap extensions
1756
+ */
1757
+ declare function flattenExtensions(extensions: Extensions): Extensions;
1758
+
1759
+ interface ExtensionConfig<Options = any, Storage = any> extends ExtendableConfig<Options, Storage, ExtensionConfig<Options, Storage>, null> {
1760
+ }
1761
+ /**
1762
+ * The Extension class is the base class for all extensions.
1763
+ * @see https://tiptap.dev/api/extensions#create-a-new-extension
1764
+ */
1765
+ declare class Extension<Options = any, Storage = any> extends Extendable<Options, Storage, ExtensionConfig<Options, Storage>> {
1766
+ type: string;
1767
+ /**
1768
+ * Create a new Extension instance
1769
+ * @param config - Extension configuration object or a function that returns a configuration object
1770
+ */
1771
+ static create<O = any, S = any>(config?: Partial<ExtensionConfig<O, S>> | (() => Partial<ExtensionConfig<O, S>>)): Extension<O, S>;
1772
+ configure(options?: Partial<Options>): Extension<Options, Storage>;
1773
+ extend<ExtendedOptions = Options, ExtendedStorage = Storage, ExtendedConfig = ExtensionConfig<ExtendedOptions, ExtendedStorage>>(extendedConfig?: (() => Partial<ExtendedConfig>) | (Partial<ExtendedConfig> & ThisType<{
1774
+ name: string;
1775
+ options: ExtendedOptions;
1776
+ storage: ExtendedStorage;
1777
+ editor: Editor;
1778
+ type: null;
1779
+ }>)): Extension<ExtendedOptions, ExtendedStorage>;
1780
+ }
1781
+
1782
+ /**
1783
+ * A class that represents a mappable position in the editor. It can be extended
1784
+ * by other extensions to add additional position mapping capabilities.
1785
+ */
1786
+ declare class MappablePosition {
1787
+ /**
1788
+ * The absolute position in the editor.
1789
+ */
1790
+ position: number;
1791
+ constructor(position: number);
1792
+ /**
1793
+ * Creates a MappablePosition from a JSON object.
1794
+ */
1795
+ static fromJSON(json: any): MappablePosition;
1796
+ /**
1797
+ * Converts the MappablePosition to a JSON object.
1798
+ */
1799
+ toJSON(): any;
1800
+ }
1801
+ /**
1802
+ * The result of the getUpdatedPosition function.
1803
+ */
1804
+ interface GetUpdatedPositionResult {
1805
+ position: MappablePosition;
1806
+ mapResult: MapResult | null;
1807
+ }
1808
+
1809
+ /**
1810
+ * Returns a flattened and sorted extension list while
1811
+ * also checking for duplicated extensions and warns the user.
1812
+ * @param extensions An array of Tiptap extensions
1813
+ * @returns An flattened and sorted array of Tiptap extensions
1814
+ */
1815
+ declare function resolveExtensions(extensions: Extensions): Extensions;
1816
+
1817
+ /**
1818
+ * Sort extensions by priority.
1819
+ * @param extensions An array of Tiptap extensions
1820
+ * @returns A sorted array of Tiptap extensions by priority
1821
+ */
1822
+ declare function sortExtensions(extensions: Extensions): Extensions;
1823
+
1824
+ declare class ExtensionManager {
1825
+ editor: Editor;
1826
+ schema: Schema;
1827
+ /**
1828
+ * A flattened and sorted array of all extensions
1829
+ */
1830
+ extensions: Extensions;
1831
+ /**
1832
+ * A non-flattened array of base extensions (no sub-extensions)
1833
+ */
1834
+ baseExtensions: Extensions;
1835
+ splittableMarks: string[];
1836
+ constructor(extensions: Extensions, editor: Editor);
1837
+ static resolve: typeof resolveExtensions;
1838
+ static sort: typeof sortExtensions;
1839
+ static flatten: typeof flattenExtensions;
1840
+ /**
1841
+ * Get all commands from the extensions.
1842
+ * @returns An object with all commands where the key is the command name and the value is the command function
1843
+ */
1844
+ get commands(): RawCommands;
1845
+ /**
1846
+ * Get all registered Prosemirror plugins from the extensions.
1847
+ * @returns An array of Prosemirror plugins
1848
+ */
1849
+ get plugins(): Plugin[];
1850
+ /**
1851
+ * Get all attributes from the extensions.
1852
+ * @returns An array of attributes
1853
+ */
1854
+ get attributes(): ExtensionAttribute[];
1855
+ /**
1856
+ * Get all node views from the extensions.
1857
+ * @returns An object with all node views where the key is the node name and the value is the node view function
1858
+ */
1859
+ get nodeViews(): Record<string, NodeViewConstructor>;
1860
+ /**
1861
+ * Get the composed dispatchTransaction function from all extensions.
1862
+ * @param baseDispatch The base dispatch function (e.g. from the editor or user props)
1863
+ * @returns A composed dispatch function
1864
+ */
1865
+ dispatchTransaction(baseDispatch: (tr: Transaction) => void): (tr: Transaction) => void;
1866
+ /**
1867
+ * Get the composed transformPastedHTML function from all extensions.
1868
+ * @param baseTransform The base transform function (e.g. from the editor props)
1869
+ * @returns A composed transform function that chains all extension transforms
1870
+ */
1871
+ transformPastedHTML(baseTransform?: (html: string, view?: any) => string): (html: string, view?: EditorView) => string;
1872
+ get markViews(): Record<string, MarkViewConstructor>;
1873
+ /**
1874
+ * Destroy the extension manager and clean up all extension references
1875
+ * to prevent memory leaks through parent/child extension chains.
1876
+ *
1877
+ * Walks each extension's full parent chain and nulls every forward
1878
+ * `parent.child → current` link where the parent still points to the
1879
+ * current node. This breaks the retention path from module-scope
1880
+ * singleton roots through deep extend() chains.
1881
+ *
1882
+ * Only ancestor `.child` links matching the current chain are cleared.
1883
+ * The `.parent` pointer on ancestors is never touched — extensions
1884
+ * may be shared across live editors, so their own backward references
1885
+ * and non-matching forward links must remain intact.
1886
+ */
1887
+ destroy(): void;
1888
+ /**
1889
+ * Go through all extensions, create extension storages & setup marks
1890
+ * & bind editor event listener.
1891
+ */
1892
+ private setupExtensions;
1893
+ }
1894
+
1895
+ declare class NodePos {
1896
+ private resolvedPos;
1897
+ private isBlock;
1898
+ private editor;
1899
+ private get name();
1900
+ constructor(pos: ResolvedPos, editor: Editor, isBlock?: boolean, node?: Node$1 | null);
1901
+ private currentNode;
1902
+ get node(): Node$1;
1903
+ get element(): HTMLElement;
1904
+ actualDepth: number | null;
1905
+ get depth(): number;
1906
+ get pos(): number;
1907
+ get content(): Fragment;
1908
+ set content(content: Content);
1909
+ get attributes(): {
1910
+ [key: string]: any;
1911
+ };
1912
+ get textContent(): string;
1913
+ get size(): number;
1914
+ get from(): number;
1915
+ get range(): Range;
1916
+ get to(): number;
1917
+ get parent(): NodePos | null;
1918
+ get before(): NodePos | null;
1919
+ get after(): NodePos | null;
1920
+ get children(): NodePos[];
1921
+ get firstChild(): NodePos | null;
1922
+ get lastChild(): NodePos | null;
1923
+ closest(selector: string, attributes?: {
1924
+ [key: string]: any;
1925
+ }): NodePos | null;
1926
+ querySelector(selector: string, attributes?: {
1927
+ [key: string]: any;
1928
+ }): NodePos | null;
1929
+ querySelectorAll(selector: string, attributes?: {
1930
+ [key: string]: any;
1931
+ }, firstItemOnly?: boolean): NodePos[];
1932
+ setAttribute(attributes: {
1933
+ [key: string]: any;
1934
+ }): void;
1935
+ }
1936
+
1937
+ interface InsertContentOptions {
1938
+ /**
1939
+ * Options for parsing the content.
1940
+ */
1941
+ parseOptions?: ParseOptions;
1942
+ /**
1943
+ * Whether to update the selection after inserting the content.
1944
+ */
1945
+ updateSelection?: boolean;
1946
+ applyInputRules?: boolean;
1947
+ applyPasteRules?: boolean;
1948
+ }
1949
+
1950
+ interface InsertContentAtOptions {
1951
+ /**
1952
+ * Options for parsing the content.
1953
+ */
1954
+ parseOptions?: ParseOptions;
1955
+ /**
1956
+ * Whether to update the selection after inserting the content.
1957
+ */
1958
+ updateSelection?: boolean;
1959
+ /**
1960
+ * Whether to apply input rules after inserting the content.
1961
+ */
1962
+ applyInputRules?: boolean;
1963
+ /**
1964
+ * Whether to apply paste rules after inserting the content.
1965
+ */
1966
+ applyPasteRules?: boolean;
1967
+ /**
1968
+ * Whether to throw an error if the content is invalid.
1969
+ */
1970
+ errorOnInvalidContent?: boolean;
1971
+ }
1972
+
1973
+ interface SetContentOptions {
1974
+ /**
1975
+ * Options for parsing the content.
1976
+ * @default {}
1977
+ */
1978
+ parseOptions?: ParseOptions;
1979
+ /**
1980
+ * Whether to throw an error if the content is invalid.
1981
+ */
1982
+ errorOnInvalidContent?: boolean;
1983
+ /**
1984
+ * Whether to emit an update event.
1985
+ * @default true
1986
+ */
1987
+ emitUpdate?: boolean;
1988
+ }
1989
+
1990
+ declare module '@tiptap/core' {
1991
+ interface Commands<ReturnType> {
1992
+ blur: {
1993
+ /**
1994
+ * Removes focus from the editor.
1995
+ * @example editor.commands.blur()
1996
+ */
1997
+ blur: () => ReturnType;
1998
+ };
1999
+ }
2000
+ }
2001
+
2002
+ declare module '@tiptap/core' {
2003
+ interface Commands<ReturnType> {
2004
+ clearContent: {
2005
+ /**
2006
+ * Clear the whole document.
2007
+ * @example editor.commands.clearContent()
2008
+ */
2009
+ clearContent: (
2010
+ /**
2011
+ * Whether to emit an update event.
2012
+ * @default true
2013
+ */
2014
+ emitUpdate?: boolean) => ReturnType;
2015
+ };
2016
+ }
2017
+ }
2018
+
2019
+ declare module '@tiptap/core' {
2020
+ interface Commands<ReturnType> {
2021
+ clearNodes: {
2022
+ /**
2023
+ * Normalize nodes to a simple paragraph.
2024
+ * @example editor.commands.clearNodes()
2025
+ */
2026
+ clearNodes: () => ReturnType;
2027
+ };
2028
+ }
2029
+ }
2030
+
2031
+ declare module '@tiptap/core' {
2032
+ interface Commands<ReturnType> {
2033
+ command: {
2034
+ /**
2035
+ * Define a command inline.
2036
+ * @param fn The command function.
2037
+ * @example
2038
+ * editor.commands.command(({ tr, state }) => {
2039
+ * ...
2040
+ * return true
2041
+ * })
2042
+ */
2043
+ command: (fn: (props: Parameters<Command>[0]) => boolean) => ReturnType;
2044
+ };
2045
+ }
2046
+ }
2047
+
2048
+ declare module '@tiptap/core' {
2049
+ interface Commands<ReturnType> {
2050
+ createParagraphNear: {
2051
+ /**
2052
+ * Create a paragraph nearby.
2053
+ * @example editor.commands.createParagraphNear()
2054
+ */
2055
+ createParagraphNear: () => ReturnType;
2056
+ };
2057
+ }
2058
+ }
2059
+
2060
+ declare module '@tiptap/core' {
2061
+ interface Commands<ReturnType> {
2062
+ cut: {
2063
+ /**
2064
+ * Cuts content from a range and inserts it at a given position.
2065
+ * @param range The range to cut.
2066
+ * @param range.from The start position of the range.
2067
+ * @param range.to The end position of the range.
2068
+ * @param targetPos The position to insert the content at.
2069
+ * @example editor.commands.cut({ from: 1, to: 3 }, 5)
2070
+ */
2071
+ cut: ({ from, to }: {
2072
+ from: number;
2073
+ to: number;
2074
+ }, targetPos: number) => ReturnType;
2075
+ };
2076
+ }
2077
+ }
2078
+
2079
+ declare module '@tiptap/core' {
2080
+ interface Commands<ReturnType> {
2081
+ deleteCurrentNode: {
2082
+ /**
2083
+ * Delete the node that currently has the selection anchor.
2084
+ * @example editor.commands.deleteCurrentNode()
2085
+ */
2086
+ deleteCurrentNode: () => ReturnType;
2087
+ };
2088
+ }
2089
+ }
2090
+
2091
+ declare module '@tiptap/core' {
2092
+ interface Commands<ReturnType> {
2093
+ deleteNode: {
2094
+ /**
2095
+ * Delete a node with a given type or name.
2096
+ * @param typeOrName The type or name of the node.
2097
+ * @example editor.commands.deleteNode('paragraph')
2098
+ */
2099
+ deleteNode: (typeOrName: string | NodeType$1) => ReturnType;
2100
+ };
2101
+ }
2102
+ }
2103
+
2104
+ declare module '@tiptap/core' {
2105
+ interface Commands<ReturnType> {
2106
+ deleteRange: {
2107
+ /**
2108
+ * Delete a given range.
2109
+ * @param range The range to delete.
2110
+ * @example editor.commands.deleteRange({ from: 1, to: 3 })
2111
+ */
2112
+ deleteRange: (range: Range) => ReturnType;
2113
+ };
2114
+ }
2115
+ }
2116
+
2117
+ declare module '@tiptap/core' {
2118
+ interface Commands<ReturnType> {
2119
+ deleteSelection: {
2120
+ /**
2121
+ * Delete the selection, if there is one.
2122
+ * @example editor.commands.deleteSelection()
2123
+ */
2124
+ deleteSelection: () => ReturnType;
2125
+ };
2126
+ }
2127
+ }
2128
+
2129
+ declare module '@tiptap/core' {
2130
+ interface Commands<ReturnType> {
2131
+ enter: {
2132
+ /**
2133
+ * Trigger enter.
2134
+ * @example editor.commands.enter()
2135
+ */
2136
+ enter: () => ReturnType;
2137
+ };
2138
+ }
2139
+ }
2140
+
2141
+ declare module '@tiptap/core' {
2142
+ interface Commands<ReturnType> {
2143
+ exitCode: {
2144
+ /**
2145
+ * Exit from a code block.
2146
+ * @example editor.commands.exitCode()
2147
+ */
2148
+ exitCode: () => ReturnType;
2149
+ };
2150
+ }
2151
+ }
2152
+
2153
+ declare module '@tiptap/core' {
2154
+ interface Commands<ReturnType> {
2155
+ extendMarkRange: {
2156
+ /**
2157
+ * Extends the text selection to the current mark by type or name.
2158
+ * @param typeOrName The type or name of the mark.
2159
+ * @param attributes The attributes to match against.
2160
+ * If not provided, only the first mark at the position will be matched.
2161
+ * @example editor.commands.extendMarkRange('bold')
2162
+ * @example editor.commands.extendMarkRange('mention', { userId: "1" })
2163
+ */
2164
+ extendMarkRange: (
2165
+ /**
2166
+ * The type or name of the mark.
2167
+ */
2168
+ typeOrName: string | MarkType$1,
2169
+ /**
2170
+ * The attributes of the mark.
2171
+ */
2172
+ attributes?: Record<string, any>) => ReturnType;
2173
+ };
2174
+ }
2175
+ }
2176
+
2177
+ declare module '@tiptap/core' {
2178
+ interface Commands<ReturnType> {
2179
+ first: {
2180
+ /**
2181
+ * Runs one command after the other and stops at the first which returns true.
2182
+ * @param commands The commands to run.
2183
+ * @example editor.commands.first([command1, command2])
2184
+ */
2185
+ first: (commands: Command[] | ((props: CommandProps) => Command[])) => ReturnType;
2186
+ };
2187
+ }
2188
+ }
2189
+
2190
+ declare module '@tiptap/core' {
2191
+ interface Commands<ReturnType> {
2192
+ focus: {
2193
+ /**
2194
+ * Focus the editor at the given position.
2195
+ * @param position The position to focus at.
2196
+ * @param options.scrollIntoView Scroll the focused position into view after focusing
2197
+ * @example editor.commands.focus()
2198
+ * @example editor.commands.focus(32, { scrollIntoView: false })
2199
+ */
2200
+ focus: (
2201
+ /**
2202
+ * The position to focus at.
2203
+ */
2204
+ position?: FocusPosition,
2205
+ /**
2206
+ * Optional options
2207
+ * @default { scrollIntoView: true }
2208
+ */
2209
+ options?: {
2210
+ scrollIntoView?: boolean;
2211
+ }) => ReturnType;
2212
+ };
2213
+ }
2214
+ }
2215
+
2216
+ declare module '@tiptap/core' {
2217
+ interface Commands<ReturnType> {
2218
+ forEach: {
2219
+ /**
2220
+ * Loop through an array of items.
2221
+ */
2222
+ forEach: <T>(items: T[], fn: (item: T, props: CommandProps & {
2223
+ index: number;
2224
+ }) => boolean) => ReturnType;
2225
+ };
2226
+ }
2227
+ }
2228
+ declare module '@tiptap/core' {
2229
+ interface Commands<ReturnType> {
2230
+ insertContent: {
2231
+ /**
2232
+ * Insert a node or string of HTML at the current position.
2233
+ * @example editor.commands.insertContent('<h1>Example</h1>')
2234
+ * @example editor.commands.insertContent('<h1>Example</h1>', { updateSelection: false })
2235
+ */
2236
+ insertContent: (
2237
+ /**
2238
+ * The ProseMirror content to insert.
2239
+ */
2240
+ value: Content | Node$1 | Fragment,
2241
+ /**
2242
+ * Optional options
2243
+ */
2244
+ options?: InsertContentOptions) => ReturnType;
2245
+ };
2246
+ }
2247
+ }
2248
+ declare module '@tiptap/core' {
2249
+ interface Commands<ReturnType> {
2250
+ insertContentAt: {
2251
+ /**
2252
+ * Insert a node or string of HTML at a specific position.
2253
+ * @example editor.commands.insertContentAt(0, '<h1>Example</h1>')
2254
+ */
2255
+ insertContentAt: (
2256
+ /**
2257
+ * The position to insert the content at.
2258
+ */
2259
+ position: number | Range,
2260
+ /**
2261
+ * The ProseMirror content to insert.
2262
+ */
2263
+ value: Content | Node$1 | Fragment,
2264
+ /**
2265
+ * Optional options
2266
+ */
2267
+ options?: InsertContentAtOptions) => ReturnType;
2268
+ };
2269
+ }
2270
+ }
2271
+
2272
+ declare module '@tiptap/core' {
2273
+ interface Commands<ReturnType> {
2274
+ joinUp: {
2275
+ /**
2276
+ * Join the selected block or, if there is a text selection, the closest ancestor block of the selection that can be joined, with the sibling above it.
2277
+ * @example editor.commands.joinUp()
2278
+ */
2279
+ joinUp: () => ReturnType;
2280
+ };
2281
+ joinDown: {
2282
+ /**
2283
+ * Join the selected block, or the closest ancestor of the selection that can be joined, with the sibling after it.
2284
+ * @example editor.commands.joinDown()
2285
+ */
2286
+ joinDown: () => ReturnType;
2287
+ };
2288
+ joinBackward: {
2289
+ /**
2290
+ * If the selection is empty and at the start of a textblock, try to reduce the distance between that block and the one before it—if there's a block directly before it that can be joined, join them.
2291
+ * If not, try to move the selected block closer to the next one in the document structure by lifting it out of its
2292
+ * parent or moving it into a parent of the previous block. Will use the view for accurate (bidi-aware) start-of-textblock detection if given.
2293
+ * @example editor.commands.joinBackward()
2294
+ */
2295
+ joinBackward: () => ReturnType;
2296
+ };
2297
+ joinForward: {
2298
+ /**
2299
+ * If the selection is empty and the cursor is at the end of a textblock, try to reduce or remove the boundary between that block and the one after it,
2300
+ * either by joining them or by moving the other block closer to this one in the tree structure.
2301
+ * Will use the view for accurate start-of-textblock detection if given.
2302
+ * @example editor.commands.joinForward()
2303
+ */
2304
+ joinForward: () => ReturnType;
2305
+ };
2306
+ }
2307
+ }
2308
+
2309
+ declare module '@tiptap/core' {
2310
+ interface Commands<ReturnType> {
2311
+ joinItemBackward: {
2312
+ /**
2313
+ * Join two items backward.
2314
+ * @example editor.commands.joinItemBackward()
2315
+ */
2316
+ joinItemBackward: () => ReturnType;
2317
+ };
2318
+ }
2319
+ }
2320
+
2321
+ declare module '@tiptap/core' {
2322
+ interface Commands<ReturnType> {
2323
+ joinItemForward: {
2324
+ /**
2325
+ * Join two items Forwards.
2326
+ * @example editor.commands.joinItemForward()
2327
+ */
2328
+ joinItemForward: () => ReturnType;
2329
+ };
2330
+ }
2331
+ }
2332
+
2333
+ declare module '@tiptap/core' {
2334
+ interface Commands<ReturnType> {
2335
+ joinTextblockBackward: {
2336
+ /**
2337
+ * A more limited form of joinBackward that only tries to join the current textblock to the one before it, if the cursor is at the start of a textblock.
2338
+ */
2339
+ joinTextblockBackward: () => ReturnType;
2340
+ };
2341
+ }
2342
+ }
2343
+
2344
+ declare module '@tiptap/core' {
2345
+ interface Commands<ReturnType> {
2346
+ joinTextblockForward: {
2347
+ /**
2348
+ * A more limited form of joinForward that only tries to join the current textblock to the one after it, if the cursor is at the end of a textblock.
2349
+ */
2350
+ joinTextblockForward: () => ReturnType;
2351
+ };
2352
+ }
2353
+ }
2354
+
2355
+ declare module '@tiptap/core' {
2356
+ interface Commands<ReturnType> {
2357
+ keyboardShortcut: {
2358
+ /**
2359
+ * Trigger a keyboard shortcut.
2360
+ * @param name The name of the keyboard shortcut.
2361
+ * @example editor.commands.keyboardShortcut('Mod-b')
2362
+ */
2363
+ keyboardShortcut: (name: string) => ReturnType;
2364
+ };
2365
+ }
2366
+ }
2367
+
2368
+ declare module '@tiptap/core' {
2369
+ interface Commands<ReturnType> {
2370
+ lift: {
2371
+ /**
2372
+ * Removes an existing wrap if possible lifting the node out of it
2373
+ * @param typeOrName The type or name of the node.
2374
+ * @param attributes The attributes of the node.
2375
+ * @example editor.commands.lift('paragraph')
2376
+ * @example editor.commands.lift('heading', { level: 1 })
2377
+ */
2378
+ lift: (typeOrName: string | NodeType$1, attributes?: Record<string, any>) => ReturnType;
2379
+ };
2380
+ }
2381
+ }
2382
+
2383
+ declare module '@tiptap/core' {
2384
+ interface Commands<ReturnType> {
2385
+ liftEmptyBlock: {
2386
+ /**
2387
+ * If the cursor is in an empty textblock that can be lifted, lift the block.
2388
+ * @example editor.commands.liftEmptyBlock()
2389
+ */
2390
+ liftEmptyBlock: () => ReturnType;
2391
+ };
2392
+ }
2393
+ }
2394
+
2395
+ declare module '@tiptap/core' {
2396
+ interface Commands<ReturnType> {
2397
+ liftListItem: {
2398
+ /**
2399
+ * Create a command to lift the list item around the selection up into a wrapping list.
2400
+ * @param typeOrName The type or name of the node.
2401
+ * @example editor.commands.liftListItem('listItem')
2402
+ */
2403
+ liftListItem: (typeOrName: string | NodeType$1) => ReturnType;
2404
+ };
2405
+ }
2406
+ }
2407
+
2408
+ declare module '@tiptap/core' {
2409
+ interface Commands<ReturnType> {
2410
+ newlineInCode: {
2411
+ /**
2412
+ * Add a newline character in code.
2413
+ * @example editor.commands.newlineInCode()
2414
+ */
2415
+ newlineInCode: () => ReturnType;
2416
+ };
2417
+ }
2418
+ }
2419
+
2420
+ declare module '@tiptap/core' {
2421
+ interface Commands<ReturnType> {
2422
+ resetAttributes: {
2423
+ /**
2424
+ * Resets some node attributes to the default value.
2425
+ * @param typeOrName The type or name of the node.
2426
+ * @param attributes The attributes of the node to reset.
2427
+ * @example editor.commands.resetAttributes('heading', 'level')
2428
+ */
2429
+ resetAttributes: (typeOrName: string | NodeType$1 | MarkType$1, attributes: string | string[]) => ReturnType;
2430
+ };
2431
+ }
2432
+ }
2433
+
2434
+ declare module '@tiptap/core' {
2435
+ interface Commands<ReturnType> {
2436
+ scrollIntoView: {
2437
+ /**
2438
+ * Scroll the selection into view.
2439
+ * @example editor.commands.scrollIntoView()
2440
+ */
2441
+ scrollIntoView: () => ReturnType;
2442
+ };
2443
+ }
2444
+ }
2445
+
2446
+ declare module '@tiptap/core' {
2447
+ interface Commands<ReturnType> {
2448
+ selectAll: {
2449
+ /**
2450
+ * Select the whole document.
2451
+ * @example editor.commands.selectAll()
2452
+ */
2453
+ selectAll: () => ReturnType;
2454
+ };
2455
+ }
2456
+ }
2457
+
2458
+ declare module '@tiptap/core' {
2459
+ interface Commands<ReturnType> {
2460
+ selectNodeBackward: {
2461
+ /**
2462
+ * Select a node backward.
2463
+ * @example editor.commands.selectNodeBackward()
2464
+ */
2465
+ selectNodeBackward: () => ReturnType;
2466
+ };
2467
+ }
2468
+ }
2469
+
2470
+ declare module '@tiptap/core' {
2471
+ interface Commands<ReturnType> {
2472
+ selectNodeForward: {
2473
+ /**
2474
+ * Select a node forward.
2475
+ * @example editor.commands.selectNodeForward()
2476
+ */
2477
+ selectNodeForward: () => ReturnType;
2478
+ };
2479
+ }
2480
+ }
2481
+
2482
+ declare module '@tiptap/core' {
2483
+ interface Commands<ReturnType> {
2484
+ selectParentNode: {
2485
+ /**
2486
+ * Select the parent node.
2487
+ * @example editor.commands.selectParentNode()
2488
+ */
2489
+ selectParentNode: () => ReturnType;
2490
+ };
2491
+ }
2492
+ }
2493
+
2494
+ declare module '@tiptap/core' {
2495
+ interface Commands<ReturnType> {
2496
+ selectTextblockEnd: {
2497
+ /**
2498
+ * Moves the cursor to the end of current text block.
2499
+ * @example editor.commands.selectTextblockEnd()
2500
+ */
2501
+ selectTextblockEnd: () => ReturnType;
2502
+ };
2503
+ }
2504
+ }
2505
+
2506
+ declare module '@tiptap/core' {
2507
+ interface Commands<ReturnType> {
2508
+ selectTextblockStart: {
2509
+ /**
2510
+ * Moves the cursor to the start of current text block.
2511
+ * @example editor.commands.selectTextblockStart()
2512
+ */
2513
+ selectTextblockStart: () => ReturnType;
2514
+ };
2515
+ }
2516
+ }
2517
+ declare module '@tiptap/core' {
2518
+ interface Commands<ReturnType> {
2519
+ setContent: {
2520
+ /**
2521
+ * Replace the whole document with new content.
2522
+ * @param content The new content.
2523
+ * @param emitUpdate Whether to emit an update event.
2524
+ * @param parseOptions Options for parsing the content.
2525
+ * @example editor.commands.setContent('<p>Example text</p>')
2526
+ */
2527
+ setContent: (
2528
+ /**
2529
+ * The new content.
2530
+ */
2531
+ content: Content | Fragment | Node$1,
2532
+ /**
2533
+ * Options for `setContent`.
2534
+ */
2535
+ options?: SetContentOptions) => ReturnType;
2536
+ };
2537
+ }
2538
+ }
2539
+
2540
+ declare module '@tiptap/core' {
2541
+ interface Commands<ReturnType> {
2542
+ setMark: {
2543
+ /**
2544
+ * Add a mark with new attributes.
2545
+ * @param typeOrName The mark type or name.
2546
+ * @example editor.commands.setMark('bold', { level: 1 })
2547
+ */
2548
+ setMark: (typeOrName: string | MarkType$1, attributes?: Record<string, any>) => ReturnType;
2549
+ };
2550
+ }
2551
+ }
2552
+
2553
+ declare module '@tiptap/core' {
2554
+ interface Commands<ReturnType> {
2555
+ setMeta: {
2556
+ /**
2557
+ * Store a metadata property in the current transaction.
2558
+ * @param key The key of the metadata property.
2559
+ * @param value The value to store.
2560
+ * @example editor.commands.setMeta('foo', 'bar')
2561
+ */
2562
+ setMeta: (key: string | Plugin | PluginKey, value: any) => ReturnType;
2563
+ };
2564
+ }
2565
+ }
2566
+
2567
+ declare module '@tiptap/core' {
2568
+ interface Commands<ReturnType> {
2569
+ setNode: {
2570
+ /**
2571
+ * Replace a given range with a node.
2572
+ * @param typeOrName The type or name of the node
2573
+ * @param attributes The attributes of the node
2574
+ * @example editor.commands.setNode('paragraph')
2575
+ */
2576
+ setNode: (typeOrName: string | NodeType$1, attributes?: Record<string, any>) => ReturnType;
2577
+ };
2578
+ }
2579
+ }
2580
+
2581
+ declare module '@tiptap/core' {
2582
+ interface Commands<ReturnType> {
2583
+ setNodeSelection: {
2584
+ /**
2585
+ * Creates a NodeSelection.
2586
+ * @param position - Position of the node.
2587
+ * @example editor.commands.setNodeSelection(10)
2588
+ */
2589
+ setNodeSelection: (position: number) => ReturnType;
2590
+ };
2591
+ }
2592
+ }
2593
+
2594
+ declare module '@tiptap/core' {
2595
+ interface Commands<ReturnType> {
2596
+ setTextDirection: {
2597
+ /**
2598
+ * Set the text direction for nodes.
2599
+ * If no position is provided, it will use the current selection.
2600
+ * @param direction The text direction to set ('ltr', 'rtl', or 'auto')
2601
+ * @param position Optional position or range to apply the direction to
2602
+ * @example editor.commands.setTextDirection('rtl')
2603
+ * @example editor.commands.setTextDirection('ltr', { from: 0, to: 10 })
2604
+ */
2605
+ setTextDirection: (direction: 'ltr' | 'rtl' | 'auto', position?: number | Range) => ReturnType;
2606
+ };
2607
+ }
2608
+ }
2609
+
2610
+ declare module '@tiptap/core' {
2611
+ interface Commands<ReturnType> {
2612
+ setTextSelection: {
2613
+ /**
2614
+ * Creates a TextSelection.
2615
+ * @param position The position of the selection.
2616
+ * @example editor.commands.setTextSelection(10)
2617
+ */
2618
+ setTextSelection: (position: number | Range) => ReturnType;
2619
+ };
2620
+ }
2621
+ }
2622
+
2623
+ declare module '@tiptap/core' {
2624
+ interface Commands<ReturnType> {
2625
+ sinkListItem: {
2626
+ /**
2627
+ * Sink the list item down into an inner list.
2628
+ * @param typeOrName The type or name of the node.
2629
+ * @example editor.commands.sinkListItem('listItem')
2630
+ */
2631
+ sinkListItem: (typeOrName: string | NodeType$1) => ReturnType;
2632
+ };
2633
+ }
2634
+ }
2635
+
2636
+ declare module '@tiptap/core' {
2637
+ interface Commands<ReturnType> {
2638
+ splitBlock: {
2639
+ /**
2640
+ * Forks a new node from an existing node.
2641
+ * @param options.keepMarks Keep marks from the previous node.
2642
+ * @example editor.commands.splitBlock()
2643
+ * @example editor.commands.splitBlock({ keepMarks: true })
2644
+ */
2645
+ splitBlock: (options?: {
2646
+ keepMarks?: boolean;
2647
+ }) => ReturnType;
2648
+ };
2649
+ }
2650
+ }
2651
+
2652
+ declare module '@tiptap/core' {
2653
+ interface Commands<ReturnType> {
2654
+ splitListItem: {
2655
+ /**
2656
+ * Splits one list item into two list items.
2657
+ * @param typeOrName The type or name of the node.
2658
+ * @param overrideAttrs The attributes to ensure on the new node.
2659
+ * @example editor.commands.splitListItem('listItem')
2660
+ */
2661
+ splitListItem: (typeOrName: string | NodeType$1, overrideAttrs?: Record<string, any>) => ReturnType;
2662
+ };
2663
+ }
2664
+ }
2665
+
2666
+ declare module '@tiptap/core' {
2667
+ interface Commands<ReturnType> {
2668
+ toggleList: {
2669
+ /**
2670
+ * Toggle between different list types.
2671
+ * @param listTypeOrName The type or name of the list.
2672
+ * @param itemTypeOrName The type or name of the list item.
2673
+ * @param keepMarks Keep marks when toggling.
2674
+ * @param attributes Attributes for the new list.
2675
+ * @example editor.commands.toggleList('bulletList', 'listItem')
2676
+ */
2677
+ toggleList: (listTypeOrName: string | NodeType$1, itemTypeOrName: string | NodeType$1, keepMarks?: boolean, attributes?: Record<string, any>) => ReturnType;
2678
+ };
2679
+ }
2680
+ }
2681
+
2682
+ declare module '@tiptap/core' {
2683
+ interface Commands<ReturnType> {
2684
+ toggleMark: {
2685
+ /**
2686
+ * Toggle a mark on and off.
2687
+ * @param typeOrName The mark type or name.
2688
+ * @param attributes The attributes of the mark.
2689
+ * @param options.extendEmptyMarkRange Removes the mark even across the current selection. Defaults to `false`.
2690
+ * @example editor.commands.toggleMark('bold')
2691
+ */
2692
+ toggleMark: (
2693
+ /**
2694
+ * The mark type or name.
2695
+ */
2696
+ typeOrName: string | MarkType$1,
2697
+ /**
2698
+ * The attributes of the mark.
2699
+ */
2700
+ attributes?: Record<string, any>, options?: {
2701
+ /**
2702
+ * Removes the mark even across the current selection. Defaults to `false`.
2703
+ */
2704
+ extendEmptyMarkRange?: boolean;
2705
+ }) => ReturnType;
2706
+ };
2707
+ }
2708
+ }
2709
+
2710
+ declare module '@tiptap/core' {
2711
+ interface Commands<ReturnType> {
2712
+ toggleNode: {
2713
+ /**
2714
+ * Toggle a node with another node.
2715
+ * @param typeOrName The type or name of the node.
2716
+ * @param toggleTypeOrName The type or name of the node to toggle.
2717
+ * @param attributes The attributes of the node.
2718
+ * @example editor.commands.toggleNode('heading', 'paragraph')
2719
+ */
2720
+ toggleNode: (typeOrName: string | NodeType$1, toggleTypeOrName: string | NodeType$1, attributes?: Record<string, any>) => ReturnType;
2721
+ };
2722
+ }
2723
+ }
2724
+
2725
+ declare module '@tiptap/core' {
2726
+ interface Commands<ReturnType> {
2727
+ toggleWrap: {
2728
+ /**
2729
+ * Wraps nodes in another node, or removes an existing wrap.
2730
+ * @param typeOrName The type or name of the node.
2731
+ * @param attributes The attributes of the node.
2732
+ * @example editor.commands.toggleWrap('blockquote')
2733
+ */
2734
+ toggleWrap: (typeOrName: string | NodeType$1, attributes?: Record<string, any>) => ReturnType;
2735
+ };
2736
+ }
2737
+ }
2738
+
2739
+ declare module '@tiptap/core' {
2740
+ interface Commands<ReturnType> {
2741
+ undoInputRule: {
2742
+ /**
2743
+ * Undo an input rule.
2744
+ * @example editor.commands.undoInputRule()
2745
+ */
2746
+ undoInputRule: () => ReturnType;
2747
+ };
2748
+ }
2749
+ }
2750
+
2751
+ declare module '@tiptap/core' {
2752
+ interface Commands<ReturnType> {
2753
+ unsetAllMarks: {
2754
+ /**
2755
+ * Remove all marks in the current selection.
2756
+ * @example editor.commands.unsetAllMarks()
2757
+ */
2758
+ unsetAllMarks: () => ReturnType;
2759
+ };
2760
+ }
2761
+ }
2762
+
2763
+ declare module '@tiptap/core' {
2764
+ interface Commands<ReturnType> {
2765
+ unsetMark: {
2766
+ /**
2767
+ * Remove all marks in the current selection.
2768
+ * @param typeOrName The mark type or name.
2769
+ * @param options.extendEmptyMarkRange Removes the mark even across the current selection. Defaults to `false`.
2770
+ * @example editor.commands.unsetMark('bold')
2771
+ */
2772
+ unsetMark: (
2773
+ /**
2774
+ * The mark type or name.
2775
+ */
2776
+ typeOrName: string | MarkType$1, options?: {
2777
+ /**
2778
+ * Removes the mark even across the current selection. Defaults to `false`.
2779
+ */
2780
+ extendEmptyMarkRange?: boolean;
2781
+ }) => ReturnType;
2782
+ };
2783
+ }
2784
+ }
2785
+
2786
+ declare module '@tiptap/core' {
2787
+ interface Commands<ReturnType> {
2788
+ unsetTextDirection: {
2789
+ /**
2790
+ * Remove the text direction attribute from nodes.
2791
+ * If no position is provided, it will use the current selection.
2792
+ * @param position Optional position or range to remove the direction from
2793
+ * @example editor.commands.unsetTextDirection()
2794
+ * @example editor.commands.unsetTextDirection({ from: 0, to: 10 })
2795
+ */
2796
+ unsetTextDirection: (position?: number | Range) => ReturnType;
2797
+ };
2798
+ }
2799
+ }
2800
+
2801
+ declare module '@tiptap/core' {
2802
+ interface Commands<ReturnType> {
2803
+ updateAttributes: {
2804
+ /**
2805
+ * Update attributes of a node or mark.
2806
+ * @param typeOrName The type or name of the node or mark.
2807
+ * @param attributes The attributes of the node or mark.
2808
+ * @example editor.commands.updateAttributes('mention', { userId: "2" })
2809
+ */
2810
+ updateAttributes: (
2811
+ /**
2812
+ * The type or name of the node or mark.
2813
+ */
2814
+ typeOrName: string | NodeType$1 | MarkType$1,
2815
+ /**
2816
+ * The attributes of the node or mark.
2817
+ */
2818
+ attributes: Record<string, any>) => ReturnType;
2819
+ };
2820
+ }
2821
+ }
2822
+
2823
+ declare module '@tiptap/core' {
2824
+ interface Commands<ReturnType> {
2825
+ wrapIn: {
2826
+ /**
2827
+ * Wraps nodes in another node.
2828
+ * @param typeOrName The type or name of the node.
2829
+ * @param attributes The attributes of the node.
2830
+ * @example editor.commands.wrapIn('blockquote')
2831
+ */
2832
+ wrapIn: (typeOrName: string | NodeType$1, attributes?: Record<string, any>) => ReturnType;
2833
+ };
2834
+ }
2835
+ }
2836
+
2837
+ declare module '@tiptap/core' {
2838
+ interface Commands<ReturnType> {
2839
+ wrapInList: {
2840
+ /**
2841
+ * Wrap a node in a list.
2842
+ * @param typeOrName The type or name of the node.
2843
+ * @param attributes The attributes of the node.
2844
+ * @example editor.commands.wrapInList('bulletList')
2845
+ */
2846
+ wrapInList: (typeOrName: string | NodeType$1, attributes?: Record<string, any>) => ReturnType;
2847
+ };
2848
+ }
2849
+ }
2850
+ declare class Editor extends EventEmitter<EditorEvents> {
2851
+ private commandManager;
2852
+ extensionManager: ExtensionManager;
2853
+ private css;
2854
+ private className;
2855
+ schema: Schema;
2856
+ private editorView;
2857
+ isFocused: boolean;
2858
+ private destroyed;
2859
+ private editorState;
2860
+ /**
2861
+ * The editor is considered initialized after the `create` event has been emitted.
2862
+ */
2863
+ isInitialized: boolean;
2864
+ extensionStorage: Storage;
2865
+ /**
2866
+ * A unique ID for this editor instance.
2867
+ */
2868
+ instanceId: string;
2869
+ options: EditorOptions;
2870
+ constructor(options?: Partial<EditorOptions>);
2871
+ /**
2872
+ * Attach the editor to the DOM, creating a new editor view.
2873
+ */
2874
+ mount(el: NonNullable<EditorOptions['element']> & {}): void;
2875
+ /**
2876
+ * Remove the editor from the DOM, but still allow remounting at a different point in time
2877
+ */
2878
+ unmount(): void;
2879
+ /**
2880
+ * Returns the editor storage.
2881
+ */
2882
+ get storage(): Storage;
2883
+ /**
2884
+ * An object of all registered commands.
2885
+ */
2886
+ get commands(): SingleCommands;
2887
+ /**
2888
+ * Create a command chain to call multiple commands at once.
2889
+ */
2890
+ chain(): ChainedCommands;
2891
+ /**
2892
+ * Check if a command or a command chain can be executed. Without executing it.
2893
+ */
2894
+ can(): CanCommands;
2895
+ /**
2896
+ * Inject CSS styles.
2897
+ */
2898
+ private injectCSS;
2899
+ /**
2900
+ * Update editor options.
2901
+ *
2902
+ * @param options A list of options
2903
+ */
2904
+ setOptions(options?: Partial<EditorOptions>): void;
2905
+ /**
2906
+ * Update editable state of the editor.
2907
+ */
2908
+ setEditable(editable: boolean, emitUpdate?: boolean): void;
2909
+ /**
2910
+ * Returns whether the editor is editable.
2911
+ */
2912
+ get isEditable(): boolean;
2913
+ /**
2914
+ * Returns the editor view.
2915
+ */
2916
+ get view(): EditorView;
2917
+ /**
2918
+ * Returns the editor state.
2919
+ */
2920
+ get state(): EditorState;
2921
+ /**
2922
+ * Register a ProseMirror plugin.
2923
+ *
2924
+ * @param plugin A ProseMirror plugin
2925
+ * @param handlePlugins Control how to merge the plugin into the existing plugins.
2926
+ * @returns The new editor state
2927
+ */
2928
+ registerPlugin(plugin: Plugin, handlePlugins?: (newPlugin: Plugin, plugins: Plugin[]) => Plugin[]): EditorState;
2929
+ /**
2930
+ * Unregister a ProseMirror plugin.
2931
+ *
2932
+ * @param nameOrPluginKeyToRemove The plugins name
2933
+ * @returns The new editor state or undefined if the editor is destroyed
2934
+ */
2935
+ unregisterPlugin(nameOrPluginKeyToRemove: string | PluginKey | (string | PluginKey)[]): EditorState | undefined;
2936
+ /**
2937
+ * Creates an extension manager.
2938
+ */
2939
+ private createExtensionManager;
2940
+ /**
2941
+ * Creates an command manager.
2942
+ */
2943
+ private createCommandManager;
2944
+ /**
2945
+ * Creates a ProseMirror schema.
2946
+ */
2947
+ private createSchema;
2948
+ /**
2949
+ * Creates the initial document.
2950
+ */
2951
+ private createDoc;
2952
+ /**
2953
+ * Creates a ProseMirror view.
2954
+ */
2955
+ private createView;
2956
+ /**
2957
+ * Creates all node and mark views.
2958
+ */
2959
+ createNodeViews(): void;
2960
+ /**
2961
+ * Prepend class name to element.
2962
+ */
2963
+ prependClass(): void;
2964
+ isCapturingTransaction: boolean;
2965
+ private capturedTransaction;
2966
+ captureTransaction(fn: () => void): Transaction | null;
2967
+ /**
2968
+ * The callback over which to send transactions (state updates) produced by the view.
2969
+ *
2970
+ * @param transaction An editor state transaction
2971
+ */
2972
+ private dispatchTransaction;
2973
+ /**
2974
+ * Get attributes of the currently selected node or mark.
2975
+ */
2976
+ getAttributes(nameOrType: string | NodeType$1 | MarkType$1): Record<string, any>;
2977
+ /**
2978
+ * Returns if the currently selected node or mark is active.
2979
+ *
2980
+ * @param name Name of the node or mark
2981
+ * @param attributes Attributes of the node or mark
2982
+ */
2983
+ isActive(name: string, attributes?: {}): boolean;
2984
+ isActive(attributes: {}): boolean;
2985
+ /**
2986
+ * Get the document as JSON.
2987
+ */
2988
+ getJSON(): DocumentType<Record<string, any> | undefined, NodeType<string, undefined | Record<string, any>, any, (NodeType | TextType)[]>[]>;
2989
+ /**
2990
+ * Get the document as HTML.
2991
+ */
2992
+ getHTML(): string;
2993
+ /**
2994
+ * Get the document as text.
2995
+ */
2996
+ getText(options?: {
2997
+ blockSeparator?: string;
2998
+ textSerializers?: Record<string, TextSerializer>;
2999
+ }): string;
3000
+ /**
3001
+ * Check if there is no content.
3002
+ */
3003
+ get isEmpty(): boolean;
3004
+ /**
3005
+ * Destroy the editor.
3006
+ */
3007
+ destroy(): void;
3008
+ /**
3009
+ * Check if the editor is already destroyed.
3010
+ */
3011
+ get isDestroyed(): boolean;
3012
+ $node(selector: string, attributes?: {
3013
+ [key: string]: any;
3014
+ }): NodePos | null;
3015
+ $nodes(selector: string, attributes?: {
3016
+ [key: string]: any;
3017
+ }): NodePos[] | null;
3018
+ $pos(pos: number): NodePos;
3019
+ get $doc(): NodePos;
3020
+ /**
3021
+ * Returns a set of utilities for working with positions and ranges.
3022
+ */
3023
+ utils: Utils;
3024
+ }
3025
+
3026
+ interface Commands<ReturnType = any> {
3027
+ }
3028
+ interface Storage {
3029
+ }
3030
+
3031
+ /**
3032
+ * Tailwind classes for rendering stored richtext HTML (e.g. read-only views).
3033
+ *
3034
+ * Lives in its own lightweight module so that read-only consumers (and the
3035
+ * main package entry) can use it without statically pulling in the TipTap /
3036
+ * ProseMirror editor that {@link RichTextWidget} depends on.
3037
+ */
3038
+ declare function richTextHtmlClassName(): string;
3039
+
3040
+ export { Editor as E, Extension as a, type Extensions as b, richTextHtmlClassName as r };