@pinkpixel/marzipan 1.0.9 → 1.1.0

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 (251) hide show
  1. package/README.md +23 -1
  2. package/dist/{_basePickBy-7myk7wY6.js → _basePickBy-CBhXlrs3.js} +3 -3
  3. package/dist/{_basePickBy-7myk7wY6.js.map → _basePickBy-CBhXlrs3.js.map} +1 -1
  4. package/dist/{_baseUniq-DVSvs9C9.js → _baseUniq-BnlNEqx5.js} +2 -2
  5. package/dist/{_baseUniq-DVSvs9C9.js.map → _baseUniq-BnlNEqx5.js.map} +1 -1
  6. package/dist/actions/core/formats.d.ts.map +1 -1
  7. package/dist/actions/core/formats.js +5 -0
  8. package/dist/actions/core/formats.js.map +1 -1
  9. package/dist/actions/index.d.ts +4 -0
  10. package/dist/actions/index.d.ts.map +1 -1
  11. package/dist/actions/index.js +20 -0
  12. package/dist/actions/index.js.map +1 -1
  13. package/dist/{arc-CfMWIGxd.js → arc-DKfQKN_X.js} +2 -2
  14. package/dist/{arc-CfMWIGxd.js.map → arc-DKfQKN_X.js.map} +1 -1
  15. package/dist/{architectureDiagram-VXUJARFQ-BUbrFcAV.js → architectureDiagram-VXUJARFQ-DyTB8Kgd.js} +5 -5
  16. package/dist/{architectureDiagram-VXUJARFQ-BUbrFcAV.js.map → architectureDiagram-VXUJARFQ-DyTB8Kgd.js.map} +1 -1
  17. package/dist/{blockDiagram-VD42YOAC-jy_Bz7_a.js → blockDiagram-VD42YOAC-BCYA47jf.js} +7 -12
  18. package/dist/{blockDiagram-VD42YOAC-jy_Bz7_a.js.map → blockDiagram-VD42YOAC-BCYA47jf.js.map} +1 -1
  19. package/dist/{c4Diagram-YG6GDRKO-D-ENeA7h.js → c4Diagram-YG6GDRKO-ChtfMRpM.js} +3 -3
  20. package/dist/{c4Diagram-YG6GDRKO-D-ENeA7h.js.map → c4Diagram-YG6GDRKO-ChtfMRpM.js.map} +1 -1
  21. package/dist/channel-XZzkxuXg.js +6 -0
  22. package/dist/{channel-BCTxewZI.js.map → channel-XZzkxuXg.js.map} +1 -1
  23. package/dist/{chunk-4BX2VUAB-BPOEnnJc.js → chunk-4BX2VUAB-Cx8HPvOf.js} +2 -2
  24. package/dist/{chunk-4BX2VUAB-BPOEnnJc.js.map → chunk-4BX2VUAB-Cx8HPvOf.js.map} +1 -1
  25. package/dist/{chunk-55IACEB6-CvbNm4Ij.js → chunk-55IACEB6-DGQSbiTY.js} +2 -2
  26. package/dist/{chunk-55IACEB6-CvbNm4Ij.js.map → chunk-55IACEB6-DGQSbiTY.js.map} +1 -1
  27. package/dist/{chunk-B4BG7PRW-C_qWbbk6.js → chunk-B4BG7PRW-CY260R4Q.js} +5 -5
  28. package/dist/{chunk-B4BG7PRW-C_qWbbk6.js.map → chunk-B4BG7PRW-CY260R4Q.js.map} +1 -1
  29. package/dist/{chunk-DI55MBZ5-BiWs6KMl.js → chunk-DI55MBZ5-B4h9UrCS.js} +4 -4
  30. package/dist/{chunk-DI55MBZ5-BiWs6KMl.js.map → chunk-DI55MBZ5-B4h9UrCS.js.map} +1 -1
  31. package/dist/{chunk-FMBD7UC4-B9NJjOBf.js → chunk-FMBD7UC4-BrVGjj-q.js} +2 -2
  32. package/dist/{chunk-FMBD7UC4-B9NJjOBf.js.map → chunk-FMBD7UC4-BrVGjj-q.js.map} +1 -1
  33. package/dist/{chunk-QN33PNHL-0k4tnBW4.js → chunk-QN33PNHL-DZm-2bJu.js} +2 -2
  34. package/dist/{chunk-QN33PNHL-0k4tnBW4.js.map → chunk-QN33PNHL-DZm-2bJu.js.map} +1 -1
  35. package/dist/{chunk-QZHKN3VN-Cqlx-pCX.js → chunk-QZHKN3VN-Hi_p5q2K.js} +2 -2
  36. package/dist/{chunk-QZHKN3VN-Cqlx-pCX.js.map → chunk-QZHKN3VN-Hi_p5q2K.js.map} +1 -1
  37. package/dist/{chunk-TZMSLE5B-CIL9qnEM.js → chunk-TZMSLE5B-CIZlLW3r.js} +2 -2
  38. package/dist/{chunk-TZMSLE5B-CIL9qnEM.js.map → chunk-TZMSLE5B-CIZlLW3r.js.map} +1 -1
  39. package/dist/{classDiagram-2ON5EDUG-Cg641kit.js → classDiagram-2ON5EDUG-QSrTDjZ0.js} +3 -3
  40. package/dist/{classDiagram-2ON5EDUG-Cg641kit.js.map → classDiagram-2ON5EDUG-QSrTDjZ0.js.map} +1 -1
  41. package/dist/{classDiagram-2ON5EDUG-DvfCZ1-0.js → classDiagram-v2-WZHVMYZB-QSrTDjZ0.js} +3 -3
  42. package/dist/{classDiagram-v2-WZHVMYZB-Cg641kit.js.map → classDiagram-v2-WZHVMYZB-QSrTDjZ0.js.map} +1 -1
  43. package/dist/clone-B6rhP1DC.js +9 -0
  44. package/dist/{clone-BZ5Rkhbx.js.map → clone-B6rhP1DC.js.map} +1 -1
  45. package/dist/{cose-bilkent-S5V4N54A-DIb5rck_.js → cose-bilkent-S5V4N54A-Cz05oWQ-.js} +3 -3
  46. package/dist/{cose-bilkent-S5V4N54A-DIb5rck_.js.map → cose-bilkent-S5V4N54A-Cz05oWQ-.js.map} +1 -1
  47. package/dist/{cytoscape.esm-DfdJODL8.js → cytoscape.esm-Cvf3sx9F.js} +16 -47
  48. package/dist/{cytoscape.esm-DfdJODL8.js.map → cytoscape.esm-Cvf3sx9F.js.map} +1 -1
  49. package/dist/{dagre-6UL2VRFP-BFkZcVkL.js → dagre-6UL2VRFP-24cZIDCv.js} +7 -7
  50. package/dist/{dagre-6UL2VRFP-BFkZcVkL.js.map → dagre-6UL2VRFP-24cZIDCv.js.map} +1 -1
  51. package/dist/defaultLocale-BgPVtth8.js +172 -0
  52. package/dist/defaultLocale-BgPVtth8.js.map +1 -0
  53. package/dist/{diagram-PSM6KHXK-DyiwV-ia.js → diagram-PSM6KHXK-hMkwALkg.js} +7 -7
  54. package/dist/{diagram-PSM6KHXK-DyiwV-ia.js.map → diagram-PSM6KHXK-hMkwALkg.js.map} +1 -1
  55. package/dist/{diagram-QEK2KX5R-DxjNZqZ_.js → diagram-QEK2KX5R-DN407_qN.js} +4 -4
  56. package/dist/{diagram-QEK2KX5R-DxjNZqZ_.js.map → diagram-QEK2KX5R-DN407_qN.js.map} +1 -1
  57. package/dist/{diagram-S2PKOQOG-CCX3j4vi.js → diagram-S2PKOQOG-DYfbxKMk.js} +4 -4
  58. package/dist/{diagram-S2PKOQOG-BOO6_G9V.js.map → diagram-S2PKOQOG-DYfbxKMk.js.map} +1 -1
  59. package/dist/{erDiagram-Q2GNP2WA-Bm9LxMmY.js → erDiagram-Q2GNP2WA-CyzD1x2b.js} +5 -5
  60. package/dist/{erDiagram-Q2GNP2WA-Bm9LxMmY.js.map → erDiagram-Q2GNP2WA-CyzD1x2b.js.map} +1 -1
  61. package/dist/{flowDiagram-NV44I4VS-CDsRBuXA.js → flowDiagram-NV44I4VS-BHrJSYHv.js} +6 -6
  62. package/dist/{flowDiagram-NV44I4VS-CDsRBuXA.js.map → flowDiagram-NV44I4VS-BHrJSYHv.js.map} +1 -1
  63. package/dist/ganttDiagram-JELNMOA3-DibD3FLu.js +2671 -0
  64. package/dist/ganttDiagram-JELNMOA3-DibD3FLu.js.map +1 -0
  65. package/dist/{gitGraphDiagram-NY62KEGX-BgmbSTgN.js → gitGraphDiagram-V2S2FVAM-BlXeU9uI.js} +5 -5
  66. package/dist/gitGraphDiagram-V2S2FVAM-BlXeU9uI.js.map +1 -0
  67. package/dist/{graph-CSVEP8oS.js → graph-BN01VVM9.js} +3 -3
  68. package/dist/{graph-CSVEP8oS.js.map → graph-BN01VVM9.js.map} +1 -1
  69. package/dist/index-DjXgvYA3.js +36 -0
  70. package/dist/index-DjXgvYA3.js.map +1 -0
  71. package/dist/index.d.ts +60 -0
  72. package/dist/index.d.ts.map +1 -1
  73. package/dist/index.js +357 -303
  74. package/dist/index.js.map +1 -1
  75. package/dist/{infoDiagram-F6ZHWCRC-BIKrEuHs.js → infoDiagram-HS3SLOUP-Dqf1wtMF.js} +3 -3
  76. package/dist/{infoDiagram-F6ZHWCRC-BIKrEuHs.js.map → infoDiagram-HS3SLOUP-Dqf1wtMF.js.map} +1 -1
  77. package/dist/{journeyDiagram-XKPGCS4Q-B5P7hkT-.js → journeyDiagram-XKPGCS4Q-DCJl6fPA.js} +5 -5
  78. package/dist/{journeyDiagram-XKPGCS4Q-B5P7hkT-.js.map → journeyDiagram-XKPGCS4Q-DCJl6fPA.js.map} +1 -1
  79. package/dist/{kanban-definition-3W4ZIXB7-DJzoU3Tr.js → kanban-definition-3W4ZIXB7-C4uKwcnd.js} +3 -3
  80. package/dist/{kanban-definition-3W4ZIXB7-CLtnd0xR.js.map → kanban-definition-3W4ZIXB7-C4uKwcnd.js.map} +1 -1
  81. package/dist/{layout-CdTiJocX.js → layout-DPZm-_SA.js} +33 -22
  82. package/dist/layout-DPZm-_SA.js.map +1 -0
  83. package/dist/{linear-Cr_O1Zei.js → linear-DgKHAz_i.js} +3 -3
  84. package/dist/{linear-BhblBDrV.js.map → linear-DgKHAz_i.js.map} +1 -1
  85. package/dist/marzipan.d.ts.map +1 -1
  86. package/dist/marzipan.js +9 -5
  87. package/dist/marzipan.js.map +1 -1
  88. package/dist/{mermaid.core-DENutRS8.js → mermaid.core-KR6iXUBd.js} +430 -415
  89. package/dist/{mermaid.core-BwjwqwU6.js.map → mermaid.core-KR6iXUBd.js.map} +1 -1
  90. package/dist/{mindmap-definition-VGOIOE7T-BNBUkXyU.js → mindmap-definition-VGOIOE7T-DDKBtjHc.js} +4 -4
  91. package/dist/{mindmap-definition-VGOIOE7T-BNBUkXyU.js.map → mindmap-definition-VGOIOE7T-DDKBtjHc.js.map} +1 -1
  92. package/dist/{ordinal-DfAQgscy.js → ordinal-B6-f3MAq.js} +2 -2
  93. package/dist/{ordinal-DfAQgscy.js.map → ordinal-B6-f3MAq.js.map} +1 -1
  94. package/dist/parser.d.ts.map +1 -1
  95. package/dist/parser.js +0 -4
  96. package/dist/parser.js.map +1 -1
  97. package/dist/{pieDiagram-ADFJNKIX-BND3UUQ-.js → pieDiagram-ADFJNKIX-hp1Z1x8W.js} +6 -6
  98. package/dist/{pieDiagram-ADFJNKIX-BND3UUQ-.js.map → pieDiagram-ADFJNKIX-hp1Z1x8W.js.map} +1 -1
  99. package/dist/plugins/accentSwatchPlugin.d.ts.map +1 -1
  100. package/dist/plugins/accentSwatchPlugin.js +33 -33
  101. package/dist/plugins/accentSwatchPlugin.js.map +1 -1
  102. package/dist/plugins/block-handles.d.ts +24 -9
  103. package/dist/plugins/block-handles.d.ts.map +1 -1
  104. package/dist/plugins/block-handles.js +102 -78
  105. package/dist/plugins/block-handles.js.map +1 -1
  106. package/dist/plugins/imageManagerPlugin.js.map +1 -1
  107. package/dist/plugins/index.d.ts +16 -0
  108. package/dist/plugins/index.d.ts.map +1 -1
  109. package/dist/plugins/index.js +29 -2
  110. package/dist/plugins/index.js.map +1 -1
  111. package/dist/plugins/mermaidPlugin.js +1 -1
  112. package/dist/plugins/tableGridPlugin.d.ts.map +1 -1
  113. package/dist/plugins/tableGridPlugin.js +23 -23
  114. package/dist/plugins/tableGridPlugin.js.map +1 -1
  115. package/dist/{quadrantDiagram-AYHSOK5B-iCwbSiz2.js → quadrantDiagram-AYHSOK5B-B9wjnoWH.js} +3 -3
  116. package/dist/{quadrantDiagram-AYHSOK5B-CnLHbrEF.js.map → quadrantDiagram-AYHSOK5B-B9wjnoWH.js.map} +1 -1
  117. package/dist/{requirementDiagram-UZGBJVZJ-CH1vdgr6.js → requirementDiagram-UZGBJVZJ-CAYg9pNG.js} +4 -4
  118. package/dist/{requirementDiagram-UZGBJVZJ-CH1vdgr6.js.map → requirementDiagram-UZGBJVZJ-CAYg9pNG.js.map} +1 -1
  119. package/dist/{sankeyDiagram-TZEHDZUN-CV5-bwv8.js → sankeyDiagram-TZEHDZUN-Dbi0-ImG.js} +3 -3
  120. package/dist/{sankeyDiagram-TZEHDZUN-CV5-bwv8.js.map → sankeyDiagram-TZEHDZUN-Dbi0-ImG.js.map} +1 -1
  121. package/dist/{sequenceDiagram-WL72ISMW-Cq1otbHU.js → sequenceDiagram-WL72ISMW-CgnGVPN0.js} +4 -4
  122. package/dist/{sequenceDiagram-WL72ISMW-BG1sXWAR.js.map → sequenceDiagram-WL72ISMW-CgnGVPN0.js.map} +1 -1
  123. package/dist/{stateDiagram-FKZM4ZOC-BJ5UwskL.js → stateDiagram-FKZM4ZOC-BnrHMBt-.js} +5 -5
  124. package/dist/{stateDiagram-FKZM4ZOC-BJ5UwskL.js.map → stateDiagram-FKZM4ZOC-BnrHMBt-.js.map} +1 -1
  125. package/dist/{stateDiagram-v2-4FDKWEC3-BbM9NXKp.js → stateDiagram-v2-4FDKWEC3-CvQCssRZ.js} +3 -3
  126. package/dist/{stateDiagram-v2-4FDKWEC3-BbM9NXKp.js.map → stateDiagram-v2-4FDKWEC3-CvQCssRZ.js.map} +1 -1
  127. package/dist/styles.d.ts.map +1 -1
  128. package/dist/styles.js +25 -21
  129. package/dist/styles.js.map +1 -1
  130. package/dist/themes.d.ts +6 -0
  131. package/dist/themes.d.ts.map +1 -1
  132. package/dist/themes.js +2 -0
  133. package/dist/themes.js.map +1 -1
  134. package/dist/{timeline-definition-IT6M3QCI-B4lGoGS8.js → timeline-definition-IT6M3QCI-C9po0EuD.js} +3 -3
  135. package/dist/{timeline-definition-IT6M3QCI-CqPEUsh4.js.map → timeline-definition-IT6M3QCI-C9po0EuD.js.map} +1 -1
  136. package/dist/treemap-GDKQZRPO-DUJ_UgsM.js +17929 -0
  137. package/dist/treemap-GDKQZRPO-DUJ_UgsM.js.map +1 -0
  138. package/dist/{xychartDiagram-PRI3JC2R-C3_IO4Rm.js → xychartDiagram-PRI3JC2R-Daz1URdd.js} +4 -4
  139. package/dist/{xychartDiagram-PRI3JC2R-C3_IO4Rm.js.map → xychartDiagram-PRI3JC2R-Daz1URdd.js.map} +1 -1
  140. package/docs/.vitepress/config.ts +77 -0
  141. package/docs/README.md +3 -1
  142. package/docs/TABLE_OF_CONTENTS.md +1 -0
  143. package/docs/api.md +42 -2
  144. package/docs/{block-handles.README.md → block-handles.md} +2 -6
  145. package/docs/index.md +95 -0
  146. package/docs/plugins.md +24 -0
  147. package/docs/public/favicon.png +0 -0
  148. package/docs/public/logo.png +0 -0
  149. package/docs/types.d.ts +1 -1
  150. package/docs/types.md +150 -0
  151. package/package.json +11 -4
  152. package/dist/_basePickBy-BXyyc71p.js +0 -152
  153. package/dist/_basePickBy-BXyyc71p.js.map +0 -1
  154. package/dist/_baseUniq-Dde5pUWM.js +0 -615
  155. package/dist/_baseUniq-Dde5pUWM.js.map +0 -1
  156. package/dist/arc-wOVD9GAB.js +0 -84
  157. package/dist/arc-wOVD9GAB.js.map +0 -1
  158. package/dist/architectureDiagram-VXUJARFQ-Bb4i7x-6.js +0 -4663
  159. package/dist/architectureDiagram-VXUJARFQ-Bb4i7x-6.js.map +0 -1
  160. package/dist/blockDiagram-VD42YOAC-ldSoJhgA.js +0 -2262
  161. package/dist/blockDiagram-VD42YOAC-ldSoJhgA.js.map +0 -1
  162. package/dist/c4Diagram-YG6GDRKO-zzDx0s1r.js +0 -1581
  163. package/dist/c4Diagram-YG6GDRKO-zzDx0s1r.js.map +0 -1
  164. package/dist/channel-BCTxewZI.js +0 -6
  165. package/dist/channel-CwQyz_h8.js +0 -6
  166. package/dist/channel-CwQyz_h8.js.map +0 -1
  167. package/dist/chunk-4BX2VUAB-Cfh_4i4X.js +0 -9
  168. package/dist/chunk-4BX2VUAB-Cfh_4i4X.js.map +0 -1
  169. package/dist/chunk-55IACEB6-DNOIVRvW.js +0 -9
  170. package/dist/chunk-55IACEB6-DNOIVRvW.js.map +0 -1
  171. package/dist/chunk-B4BG7PRW-DeY8sefa.js +0 -1376
  172. package/dist/chunk-B4BG7PRW-DeY8sefa.js.map +0 -1
  173. package/dist/chunk-DI55MBZ5-D_yXJA03.js +0 -1371
  174. package/dist/chunk-DI55MBZ5-D_yXJA03.js.map +0 -1
  175. package/dist/chunk-FMBD7UC4-DFfhN2XA.js +0 -20
  176. package/dist/chunk-FMBD7UC4-DFfhN2XA.js.map +0 -1
  177. package/dist/chunk-QN33PNHL-CVrLUVsI.js +0 -20
  178. package/dist/chunk-QN33PNHL-CVrLUVsI.js.map +0 -1
  179. package/dist/chunk-QZHKN3VN-FvAf_VJR.js +0 -16
  180. package/dist/chunk-QZHKN3VN-FvAf_VJR.js.map +0 -1
  181. package/dist/chunk-TZMSLE5B-DxYTPD3t.js +0 -65
  182. package/dist/chunk-TZMSLE5B-DxYTPD3t.js.map +0 -1
  183. package/dist/classDiagram-2ON5EDUG-DvfCZ1-0.js.map +0 -1
  184. package/dist/classDiagram-v2-WZHVMYZB-Cg641kit.js +0 -17
  185. package/dist/classDiagram-v2-WZHVMYZB-DvfCZ1-0.js +0 -17
  186. package/dist/classDiagram-v2-WZHVMYZB-DvfCZ1-0.js.map +0 -1
  187. package/dist/clone-BZ5Rkhbx.js +0 -9
  188. package/dist/clone-D062_nJ-.js +0 -9
  189. package/dist/clone-D062_nJ-.js.map +0 -1
  190. package/dist/cose-bilkent-S5V4N54A-Doh7yBTX.js +0 -2609
  191. package/dist/cose-bilkent-S5V4N54A-Doh7yBTX.js.map +0 -1
  192. package/dist/dagre-6UL2VRFP-CZKadRq9.js +0 -445
  193. package/dist/dagre-6UL2VRFP-CZKadRq9.js.map +0 -1
  194. package/dist/defaultLocale-D7EN2tov.js +0 -172
  195. package/dist/defaultLocale-D7EN2tov.js.map +0 -1
  196. package/dist/diagram-PSM6KHXK-VDtnZynV.js +0 -532
  197. package/dist/diagram-PSM6KHXK-VDtnZynV.js.map +0 -1
  198. package/dist/diagram-QEK2KX5R-Dczirmo7.js +0 -218
  199. package/dist/diagram-QEK2KX5R-Dczirmo7.js.map +0 -1
  200. package/dist/diagram-S2PKOQOG-BOO6_G9V.js +0 -143
  201. package/dist/diagram-S2PKOQOG-CCX3j4vi.js.map +0 -1
  202. package/dist/erDiagram-Q2GNP2WA-nwmrf6lJ.js +0 -842
  203. package/dist/erDiagram-Q2GNP2WA-nwmrf6lJ.js.map +0 -1
  204. package/dist/flowDiagram-NV44I4VS-DQEdMlRX.js +0 -1621
  205. package/dist/flowDiagram-NV44I4VS-DQEdMlRX.js.map +0 -1
  206. package/dist/ganttDiagram-LVOFAZNH-BHG15mHm.js +0 -2506
  207. package/dist/ganttDiagram-LVOFAZNH-BHG15mHm.js.map +0 -1
  208. package/dist/ganttDiagram-LVOFAZNH-WMiy-Gep.js +0 -2506
  209. package/dist/ganttDiagram-LVOFAZNH-WMiy-Gep.js.map +0 -1
  210. package/dist/gitGraphDiagram-NY62KEGX-BgmbSTgN.js.map +0 -1
  211. package/dist/gitGraphDiagram-NY62KEGX-D_Oe_z5q.js +0 -700
  212. package/dist/gitGraphDiagram-NY62KEGX-D_Oe_z5q.js.map +0 -1
  213. package/dist/graph-DnSw707R.js +0 -248
  214. package/dist/graph-DnSw707R.js.map +0 -1
  215. package/dist/infoDiagram-F6ZHWCRC-BzTgHHGF.js +0 -25
  216. package/dist/infoDiagram-F6ZHWCRC-BzTgHHGF.js.map +0 -1
  217. package/dist/journeyDiagram-XKPGCS4Q-Cwx0rvbI.js +0 -835
  218. package/dist/journeyDiagram-XKPGCS4Q-Cwx0rvbI.js.map +0 -1
  219. package/dist/kanban-definition-3W4ZIXB7-CLtnd0xR.js +0 -720
  220. package/dist/kanban-definition-3W4ZIXB7-DJzoU3Tr.js.map +0 -1
  221. package/dist/layout-CdTiJocX.js.map +0 -1
  222. package/dist/layout-mDCCYMKB.js +0 -1325
  223. package/dist/layout-mDCCYMKB.js.map +0 -1
  224. package/dist/linear-BhblBDrV.js +0 -260
  225. package/dist/linear-Cr_O1Zei.js.map +0 -1
  226. package/dist/mermaid.core-BwjwqwU6.js +0 -15249
  227. package/dist/mermaid.core-DENutRS8.js.map +0 -1
  228. package/dist/mindmap-definition-VGOIOE7T-BXBE9eta.js +0 -785
  229. package/dist/mindmap-definition-VGOIOE7T-BXBE9eta.js.map +0 -1
  230. package/dist/pieDiagram-ADFJNKIX-DgEtM4kB.js +0 -162
  231. package/dist/pieDiagram-ADFJNKIX-DgEtM4kB.js.map +0 -1
  232. package/dist/quadrantDiagram-AYHSOK5B-CnLHbrEF.js +0 -1023
  233. package/dist/quadrantDiagram-AYHSOK5B-iCwbSiz2.js.map +0 -1
  234. package/dist/requirementDiagram-UZGBJVZJ-caC7K17a.js +0 -851
  235. package/dist/requirementDiagram-UZGBJVZJ-caC7K17a.js.map +0 -1
  236. package/dist/sankeyDiagram-TZEHDZUN-Gl503N-l.js +0 -811
  237. package/dist/sankeyDiagram-TZEHDZUN-Gl503N-l.js.map +0 -1
  238. package/dist/sequenceDiagram-WL72ISMW-BG1sXWAR.js +0 -2512
  239. package/dist/sequenceDiagram-WL72ISMW-Cq1otbHU.js.map +0 -1
  240. package/dist/stateDiagram-FKZM4ZOC-DZEKan9V.js +0 -264
  241. package/dist/stateDiagram-FKZM4ZOC-DZEKan9V.js.map +0 -1
  242. package/dist/stateDiagram-v2-4FDKWEC3-H1gqsSsO.js +0 -17
  243. package/dist/stateDiagram-v2-4FDKWEC3-H1gqsSsO.js.map +0 -1
  244. package/dist/timeline-definition-IT6M3QCI-B4lGoGS8.js.map +0 -1
  245. package/dist/timeline-definition-IT6M3QCI-CqPEUsh4.js +0 -796
  246. package/dist/treemap-75Q7IDZK-Cx8WKL-4.js +0 -12988
  247. package/dist/treemap-75Q7IDZK-Cx8WKL-4.js.map +0 -1
  248. package/dist/treemap-75Q7IDZK-DmPg5GN7.js +0 -12988
  249. package/dist/treemap-75Q7IDZK-DmPg5GN7.js.map +0 -1
  250. package/dist/xychartDiagram-PRI3JC2R-DnhFwjWO.js +0 -1341
  251. package/dist/xychartDiagram-PRI3JC2R-DnhFwjWO.js.map +0 -1
package/dist/index.js CHANGED
@@ -1,4 +1,16 @@
1
- import { BlockHandlesPlugin as Le } from "./plugins/block-handles.js";
1
+ import { BlockHandlesPlugin as Ce } from "./plugins/block-handles.js";
2
+ import { i as ct } from "./index-DjXgvYA3.js";
3
+ import { accentSwatchPlugin as dt, accentSwatchStyles as mt } from "./plugins/accentSwatchPlugin.js";
4
+ import { imageManagerPlugin as ut, imageManagerStyles as ft } from "./plugins/imageManagerPlugin.js";
5
+ import { imagePickerPlugin as bt } from "./plugins/imagePickerPlugin.js";
6
+ import { mermaidPlugin as wt } from "./plugins/mermaidPlugin.js";
7
+ import { mermaidExternalPlugin as yt } from "./plugins/mermaidExternal.js";
8
+ import { tablePlugin as zt } from "./plugins/tablePlugin.js";
9
+ import { tableGridPlugin as St, tableGridStyles as Ct } from "./plugins/tableGridPlugin.js";
10
+ import { tableGeneratorPlugin as Tt } from "./plugins/tableGenerator.js";
11
+ import { tinyHighlightPlugin as $t, tinyHighlightStyles as Mt } from "./plugins/tinyHighlight.js";
12
+ import { b as Pt, r as _t } from "./table-DMIy93NJ.js";
13
+ import { imagePickerPlugin as Bt } from "./plugins/imagePicker.js";
2
14
  const I = class I {
3
15
  /**
4
16
  * Reset link index (call before parsing a new document)
@@ -205,16 +217,16 @@ const I = class I {
205
217
  const o = [], s = /\[([^\]]+)\]\(([^)]+)\)/g;
206
218
  let a;
207
219
  for (; (a = s.exec(e)) !== null; ) {
208
- const h = a.index + a[0].indexOf("](") + 2, u = h + a[2].length;
209
- o.push({ start: h, end: u });
220
+ const m = a.index + a[0].indexOf("](") + 2, u = m + a[2].length;
221
+ o.push({ start: m, end: u });
210
222
  }
211
223
  const c = /(?<!`)(`+)(?!`)((?:(?!\1).)+?)(\1)(?!`)/g;
212
224
  let p;
213
225
  const d = [];
214
226
  for (; (p = c.exec(e)) !== null; ) {
215
- const l = p.index, h = p.index + p[0].length;
227
+ const l = p.index, m = p.index + p[0].length;
216
228
  o.some(
217
- (m) => l >= m.start && h <= m.end
229
+ (h) => l >= h.start && m <= h.end
218
230
  ) || d.push({
219
231
  match: p[0],
220
232
  index: p.index,
@@ -223,32 +235,32 @@ const I = class I {
223
235
  closeTicks: p[3]
224
236
  });
225
237
  }
226
- return d.sort((l, h) => h.index - l.index), d.forEach((l) => {
227
- const h = `${n++}`;
228
- t.set(h, {
238
+ return d.sort((l, m) => m.index - l.index), d.forEach((l) => {
239
+ const m = `${n++}`;
240
+ t.set(m, {
229
241
  type: "code",
230
242
  original: l.match,
231
243
  openTicks: l.openTicks,
232
244
  content: l.content,
233
245
  closeTicks: l.closeTicks
234
- }), r = r.substring(0, l.index) + h + r.substring(l.index + l.match.length);
235
- }), r = r.replace(/!\[([^\]]*)\]\(([^\s)]+)(?:\s+"([^"]+)")?\)/g, (l, h, u, m) => {
246
+ }), r = r.substring(0, l.index) + m + r.substring(l.index + l.match.length);
247
+ }), r = r.replace(/!\[([^\]]*)\]\(([^\s)]+)(?:\s+"([^"]+)")?\)/g, (l, m, u, h) => {
236
248
  const f = `${n++}`;
237
249
  return t.set(f, {
238
250
  type: "image",
239
251
  original: l,
240
- alt: h,
252
+ alt: m,
241
253
  url: u,
242
- title: m
254
+ title: h
243
255
  }), f;
244
- }), r = r.replace(/\[([^\]]+)\]\(([^)]+)\)/g, (l, h, u) => {
245
- const m = `${n++}`;
246
- return t.set(m, {
256
+ }), r = r.replace(/\[([^\]]+)\]\(([^)]+)\)/g, (l, m, u) => {
257
+ const h = `${n++}`;
258
+ return t.set(h, {
247
259
  type: "link",
248
260
  original: l,
249
- linkText: h,
261
+ linkText: m,
250
262
  url: u
251
- }), m;
263
+ }), h;
252
264
  }), { protectedText: r, sanctuaries: t };
253
265
  }
254
266
  /**
@@ -273,8 +285,8 @@ const I = class I {
273
285
  let a = o.linkText;
274
286
  t.forEach((d, l) => {
275
287
  if (a.includes(l) && d.type === "code") {
276
- const h = `<code><span class="syntax-marker">${d.openTicks}</span>${this.escapeHtml(d.content)}<span class="syntax-marker">${d.closeTicks}</span></code>`;
277
- a = a.replace(l, h);
288
+ const m = `<code><span class="syntax-marker">${d.openTicks}</span>${this.escapeHtml(d.content)}<span class="syntax-marker">${d.closeTicks}</span></code>`;
289
+ a = a.replace(l, m);
278
290
  }
279
291
  }), a = this.parseStrikethrough(a), a = this.parseBold(a), a = this.parseItalic(a);
280
292
  const c = `--link-${this.linkIndex++}`;
@@ -323,19 +335,19 @@ const I = class I {
323
335
  let o = !1;
324
336
  const a = r.map((c, p) => {
325
337
  if (n && p === t) {
326
- const h = this.escapeHtml(c) || "&nbsp;";
327
- return `<div class="raw-line" data-block-id="${this.generateBlockId()}" data-block-type="paragraph" data-line-start="${p}" data-line-end="${p}">${h}</div>`;
338
+ const m = this.escapeHtml(c) || "&nbsp;";
339
+ return `<div class="raw-line" data-block-id="${this.generateBlockId()}" data-block-type="paragraph" data-line-start="${p}" data-line-end="${p}">${m}</div>`;
328
340
  }
329
341
  if (/^```[^`]*$/.test(c))
330
342
  return o = !o, this.parseLine(c, p);
331
343
  if (o) {
332
- const h = this.escapeHtml(c), u = this.preserveIndentation(h, c);
344
+ const m = this.escapeHtml(c), u = this.preserveIndentation(m, c);
333
345
  return `<div data-block-id="${this.generateBlockId()}" data-block-type="code-content" data-line-start="${p}" data-line-end="${p}">${u || "&nbsp;"}</div>`;
334
346
  }
335
347
  const l = this.escapeHtml(c);
336
348
  if (this.isTableRow(l)) {
337
- const h = this.generateBlockId();
338
- return this.isTableSeparator(l) ? `<div class="table-separator" data-block-id="${h}" data-block-type="table-separator" data-line-start="${p}" data-line-end="${p}">${l}</div>` : `<div class="table-row" data-block-id="${h}" data-block-type="table-row" data-line-start="${p}" data-line-end="${p}">${l}</div>`;
349
+ const m = this.generateBlockId();
350
+ return this.isTableSeparator(l) ? `<div class="table-separator" data-block-id="${m}" data-block-type="table-separator" data-line-start="${p}" data-line-end="${p}">${l}</div>` : `<div class="table-row" data-block-id="${m}" data-block-type="table-row" data-line-start="${p}" data-line-end="${p}">${l}</div>`;
339
351
  }
340
352
  return this.parseLine(c, p);
341
353
  }).join("");
@@ -372,10 +384,10 @@ const I = class I {
372
384
  continue;
373
385
  } else
374
386
  a = null, c = !1;
375
- const h = l.querySelector(".code-fence");
376
- if (h) {
377
- const m = h.textContent;
378
- if (m.startsWith("```"))
387
+ const m = l.querySelector(".code-fence");
388
+ if (m) {
389
+ const h = m.textContent;
390
+ if (h.startsWith("```"))
379
391
  if (s) {
380
392
  s = !1, o = null;
381
393
  continue;
@@ -383,27 +395,27 @@ const I = class I {
383
395
  s = !0, o = document.createElement("pre");
384
396
  const f = document.createElement("code");
385
397
  o.appendChild(f), o.className = "code-block";
386
- const g = m.slice(3).trim();
398
+ const g = h.slice(3).trim();
387
399
  g && (f.className = `language-${g}`), t.insertBefore(o, l.nextSibling), o._codeElement = f;
388
400
  continue;
389
401
  }
390
402
  }
391
403
  if (s && o && l.tagName === "DIV" && !l.querySelector(".code-fence")) {
392
- const m = o._codeElement || o.querySelector("code");
393
- m.textContent.length > 0 && (m.textContent += `
404
+ const h = o._codeElement || o.querySelector("code");
405
+ h.textContent.length > 0 && (h.textContent += `
394
406
  `);
395
407
  const f = l.textContent.replace(/\u00A0/g, " ");
396
- m.textContent += f, l.remove();
408
+ h.textContent += f, l.remove();
397
409
  continue;
398
410
  }
399
411
  let u = null;
400
412
  if (l.tagName === "DIV" && (u = l.querySelector("li")), u) {
401
- const m = u.classList.contains("bullet-list"), f = u.classList.contains("ordered-list");
402
- if (!m && !f) {
413
+ const h = u.classList.contains("bullet-list"), f = u.classList.contains("ordered-list");
414
+ if (!h && !f) {
403
415
  n = null, r = null;
404
416
  continue;
405
417
  }
406
- const g = m ? "ul" : "ol";
418
+ const g = h ? "ul" : "ol";
407
419
  (!n || r !== g) && (n = document.createElement(g), t.insertBefore(n, l), r = g);
408
420
  const b = [];
409
421
  for (const v of l.childNodes)
@@ -451,8 +463,8 @@ const I = class I {
451
463
  return t = t.replace(n, (r, o, s, a) => {
452
464
  const p = (s.match(/<div>(.*?)<\/div>/gs) || []).map((u) => u.replace(/<div>(.*?)<\/div>/s, "$1").replace(/&nbsp;/g, " ")).join(`
453
465
  `), d = o.slice(3).trim(), l = d ? ` class="language-${d}"` : "";
454
- let h = `<div><span class="code-fence">${o}</span></div>`;
455
- return h += `<pre class="code-block"><code${l}>${p}</code></pre>`, h += `<div><span class="code-fence">${a}</span></div>`, h;
466
+ let m = `<div><span class="code-fence">${o}</span></div>`;
467
+ return m += `<pre class="code-block"><code${l}>${p}</code></pre>`, m += `<div><span class="code-fence">${a}</span></div>`, m;
456
468
  }), t;
457
469
  }
458
470
  /**
@@ -465,10 +477,10 @@ const I = class I {
465
477
  const n = e.split(`
466
478
  `);
467
479
  let r = 0, o = 0, s = 0;
468
- for (let h = 0; h < n.length; h++) {
469
- const u = n[h].length;
480
+ for (let m = 0; m < n.length; m++) {
481
+ const u = n[m].length;
470
482
  if (r + u >= t) {
471
- o = h, s = r;
483
+ o = m, s = r;
472
484
  break;
473
485
  }
474
486
  r += u + 1;
@@ -555,8 +567,8 @@ const I = class I {
555
567
  r || n.clear();
556
568
  const l = (n.get(p) || 0) + 1;
557
569
  n.set(p, l);
558
- for (const [h] of n)
559
- h > p && n.delete(h);
570
+ for (const [m] of n)
571
+ m > p && n.delete(m);
560
572
  return r = !0, `${c}${l}. ${d}`;
561
573
  } else
562
574
  return (s.trim() === "" || !s.match(/^\s/)) && (r = !1, n.clear()), s;
@@ -569,8 +581,8 @@ I.linkIndex = 0, I.blockIndex = 0, I.LIST_PATTERNS = {
569
581
  numbered: /^(\s*)(\d+)\.\s+(.*)$/,
570
582
  checkbox: /^(\s*)-\s+\[([ x])\]\s+(.*)$/
571
583
  };
572
- let T = I;
573
- const S = {
584
+ let H = I;
585
+ const L = {
574
586
  bold: {
575
587
  prefix: "**",
576
588
  suffix: "**",
@@ -613,6 +625,11 @@ const S = {
613
625
  multiline: !0,
614
626
  surroundWithNewlines: !0
615
627
  },
628
+ strikethrough: {
629
+ prefix: "~~",
630
+ suffix: "~~",
631
+ trimFirst: !0
632
+ },
616
633
  header1: { prefix: "# " },
617
634
  header2: { prefix: "## " },
618
635
  header3: { prefix: "### " },
@@ -620,7 +637,7 @@ const S = {
620
637
  header5: { prefix: "##### " },
621
638
  header6: { prefix: "###### " }
622
639
  };
623
- function Se() {
640
+ function Ee() {
624
641
  return {
625
642
  prefix: "",
626
643
  suffix: "",
@@ -636,9 +653,9 @@ function Se() {
636
653
  trimFirst: !1
637
654
  };
638
655
  }
639
- function C(i) {
656
+ function E(i) {
640
657
  const e = {
641
- ...Se(),
658
+ ...Ee(),
642
659
  ...i
643
660
  };
644
661
  return e.scanFor = i.scanFor ?? null, e;
@@ -664,7 +681,7 @@ function V(i) {
664
681
  B && (console.group("📝 Result"), console.log("Text to insert:", JSON.stringify(i.text)), console.log("New selection:", `${i.selectionStart}-${i.selectionEnd}`), console.groupEnd());
665
682
  }
666
683
  let x = null;
667
- function H(i, e) {
684
+ function T(i, e) {
668
685
  const t = F();
669
686
  t && (console.group("🔧 insertText"), console.log("Current selection:", `${i.selectionStart}-${i.selectionEnd}`), console.log("Text to insert:", JSON.stringify(e.text)), console.log("New selection to set:", e.selectionStart, "-", e.selectionEnd)), i.focus();
670
687
  const n = i.selectionStart, r = i.selectionEnd, o = i.value.slice(0, n), s = i.value.slice(r);
@@ -717,26 +734,25 @@ function pe(i) {
717
734
  case "manual":
718
735
  x = !1;
719
736
  break;
720
- case "auto":
721
737
  default:
722
738
  x = null;
723
739
  break;
724
740
  }
725
741
  }
726
- function Ce() {
742
+ function Te() {
727
743
  return x === !0 ? "native" : x === !1 ? "manual" : "auto";
728
744
  }
729
745
  function O(i) {
730
746
  return i.trim().split(`
731
747
  `).length > 1;
732
748
  }
733
- function Ee(i, e) {
749
+ function He(i, e) {
734
750
  let t = e;
735
751
  for (; i[t] && i[t - 1] != null && !/\s/.test(i[t - 1]); )
736
752
  t -= 1;
737
753
  return t;
738
754
  }
739
- function Te(i, e, t) {
755
+ function $e(i, e, t) {
740
756
  let n = e;
741
757
  const r = t ? /\n/ : /\s/;
742
758
  for (; i[n] && !r.test(i[n]); )
@@ -752,23 +768,23 @@ function de(i) {
752
768
  i.selectionStart >= t && i.selectionStart < t + r && (i.selectionStart = t), i.selectionEnd >= t && i.selectionEnd < t + r && (n === e.length - 1 ? i.selectionEnd = Math.min(t + e[n].length, i.value.length) : i.selectionEnd = t + r - 1), t += r;
753
769
  }
754
770
  }
755
- function He(i, e, t, n = !1) {
771
+ function Me(i, e, t, n = !1) {
756
772
  if (i.selectionStart === i.selectionEnd)
757
- i.selectionStart = Ee(i.value, i.selectionStart), i.selectionEnd = Te(i.value, i.selectionEnd, n);
773
+ i.selectionStart = He(i.value, i.selectionStart), i.selectionEnd = $e(i.value, i.selectionEnd, n);
758
774
  else {
759
775
  const r = i.selectionStart - e.length, o = i.selectionEnd + t.length, s = i.value.slice(r, i.selectionStart) === e, a = i.value.slice(i.selectionEnd, o) === t;
760
776
  s && a && (i.selectionStart = r, i.selectionEnd = o);
761
777
  }
762
778
  return i.value.slice(i.selectionStart, i.selectionEnd);
763
779
  }
764
- function D(i) {
780
+ function U(i) {
765
781
  const e = i.value.slice(0, i.selectionStart), t = i.value.slice(i.selectionEnd), n = e.match(/\n*$/), r = t.match(/^\n*/), o = n ? n[0].length : 0, s = r ? r[0].length : 0;
766
782
  let a = "", c = "";
767
783
  return /\S/.test(e) && o < 2 && (a = `
768
784
  `.repeat(2 - o)), /\S/.test(t) && s < 2 && (c = `
769
785
  `.repeat(2 - s)), { newlinesToAppend: a, newlinesToPrepend: c };
770
786
  }
771
- function he(i, e) {
787
+ function me(i, e) {
772
788
  const t = i.selectionStart, n = i.selectionEnd, r = i.scrollTop;
773
789
  e(), i.selectionStart = t, i.selectionEnd = n, i.scrollTop = r;
774
790
  }
@@ -788,13 +804,13 @@ function j(i, e, t = {}) {
788
804
  de(i);
789
805
  const c = e(i);
790
806
  if (t.adjustSelection) {
791
- const p = i.value.slice(i.selectionStart, i.selectionEnd), d = t.prefix ?? "", l = d.length > 0 && p.startsWith(d), h = t.adjustSelection(
807
+ const p = i.value.slice(i.selectionStart, i.selectionEnd), d = t.prefix ?? "", l = d.length > 0 && p.startsWith(d), m = t.adjustSelection(
792
808
  l,
793
809
  n,
794
810
  r,
795
811
  a
796
812
  );
797
- return c.selectionStart = h.start, c.selectionEnd = h.end, c;
813
+ return c.selectionStart = m.start, c.selectionEnd = m.end, c;
798
814
  }
799
815
  if (t.prefix) {
800
816
  const d = i.value.slice(i.selectionStart, i.selectionEnd).startsWith(t.prefix);
@@ -810,7 +826,7 @@ function j(i, e, t = {}) {
810
826
  }
811
827
  return c;
812
828
  }
813
- function A(i, e) {
829
+ function M(i, e) {
814
830
  const {
815
831
  prefix: t,
816
832
  suffix: n,
@@ -821,49 +837,49 @@ function A(i, e) {
821
837
  scanFor: c,
822
838
  surroundWithNewlines: p,
823
839
  trimFirst: d
824
- } = e, l = i.selectionStart, h = i.selectionEnd;
825
- let u = i.value.slice(i.selectionStart, i.selectionEnd), m = O(u) && r && r.length > 0 ? `${r}
840
+ } = e, l = i.selectionStart, m = i.selectionEnd;
841
+ let u = i.value.slice(i.selectionStart, i.selectionEnd), h = O(u) && r && r.length > 0 ? `${r}
826
842
  ` : t, f = O(u) && o && o.length > 0 ? `
827
843
  ${o}` : n;
828
844
  if (a) {
829
845
  const z = i.value[i.selectionStart - 1];
830
- i.selectionStart !== 0 && z != null && !/\s/.test(z) && (m = ` ${m}`);
846
+ i.selectionStart !== 0 && z != null && !/\s/.test(z) && (h = ` ${h}`);
831
847
  }
832
- u = He(i, m, f, e.multiline);
848
+ u = Me(i, h, f, e.multiline);
833
849
  let g = i.selectionStart, b = i.selectionEnd;
834
850
  const v = !!s && s.length > 0 && f.includes(s) && u.length > 0;
835
851
  let y = "", Y = "";
836
852
  if (p) {
837
- const z = D(i);
838
- y = z.newlinesToAppend, Y = z.newlinesToPrepend, m = y + t, f += Y;
839
- }
840
- if (u.startsWith(m) && u.endsWith(f)) {
841
- const z = u.slice(m.length, u.length - f.length);
842
- if (l === h) {
843
- let L = l - m.length;
844
- L = Math.max(L, g), L = Math.min(L, g + z.length), g = L, b = L;
853
+ const z = U(i);
854
+ y = z.newlinesToAppend, Y = z.newlinesToPrepend, h = y + t, f += Y;
855
+ }
856
+ if (u.startsWith(h) && u.endsWith(f)) {
857
+ const z = u.slice(h.length, u.length - f.length);
858
+ if (l === m) {
859
+ let S = l - h.length;
860
+ S = Math.max(S, g), S = Math.min(S, g + z.length), g = S, b = S;
845
861
  } else
846
862
  b = g + z.length;
847
863
  return { text: z, selectionStart: g, selectionEnd: b };
848
864
  }
849
865
  if (!v) {
850
- let z = m + u + f;
851
- g = l + m.length, b = h + m.length;
852
- const L = u.match(/^\s*|\s*$/g);
853
- if (d && L) {
854
- const ee = L[0] ?? "", te = L[1] ?? "";
855
- z = ee + m + u.trim() + f + te, g += ee.length, b -= te.length;
866
+ let z = h + u + f;
867
+ g = l + h.length, b = m + h.length;
868
+ const S = u.match(/^\s*|\s*$/g);
869
+ if (d && S) {
870
+ const ee = S[0] ?? "", te = S[1] ?? "";
871
+ z = ee + h + u.trim() + f + te, g += ee.length, b -= te.length;
856
872
  }
857
873
  return { text: z, selectionStart: g, selectionEnd: b };
858
874
  }
859
875
  if (c && (typeof c == "string" ? new RegExp(c) : c).test(u)) {
860
- const L = m + f.replace(s, u);
861
- return g = g + m.length, b = g, { text: L, selectionStart: g, selectionEnd: b };
876
+ const S = h + f.replace(s, u);
877
+ return g = g + h.length, b = g, { text: S, selectionStart: g, selectionEnd: b };
862
878
  }
863
- const xe = m + u + f, ze = f.indexOf(s);
864
- return g = g + m.length + u.length + ze, b = g + s.length, { text: xe, selectionStart: g, selectionEnd: b };
879
+ const Le = h + u + f, Se = f.indexOf(s);
880
+ return g = g + h.length + u.length + Se, b = g + s.length, { text: Le, selectionStart: g, selectionEnd: b };
865
881
  }
866
- function U(i, e) {
882
+ function D(i, e) {
867
883
  const { prefix: t, suffix: n, surroundWithNewlines: r } = e;
868
884
  let o = i.value.slice(i.selectionStart, i.selectionEnd), s = i.selectionStart, a = i.selectionEnd;
869
885
  const c = o.split(`
@@ -876,7 +892,7 @@ function U(i, e) {
876
892
  `), a = s + o.length;
877
893
  else if (o = c.map((d) => t + d + (n ?? "")).join(`
878
894
  `), r) {
879
- const { newlinesToAppend: d, newlinesToPrepend: l } = D(i);
895
+ const { newlinesToAppend: d, newlinesToPrepend: l } = U(i);
880
896
  s += d.length, a = s + o.length, o = d + o + l;
881
897
  }
882
898
  return { text: o, selectionStart: s, selectionEnd: a };
@@ -899,37 +915,37 @@ function ie(i) {
899
915
  processed: n
900
916
  };
901
917
  }
902
- function P(i, e) {
918
+ function _(i, e) {
903
919
  return e ? "- " : `${i + 1}. `;
904
920
  }
905
- function $e(i, e) {
921
+ function Ae(i, e) {
906
922
  let t, n, r;
907
923
  return i.orderedList ? (t = ne(e), n = ie(t.text), r = n.text) : (t = ie(e), n = ne(t.text), r = n.text), [t, n, r];
908
924
  }
909
- function Me(i, e) {
925
+ function Pe(i, e) {
910
926
  const t = i.selectionStart === i.selectionEnd;
911
927
  let n = i.selectionStart, r = i.selectionEnd;
912
928
  de(i);
913
- const o = i.value.slice(i.selectionStart, i.selectionEnd), [s, a, c] = $e(e, o), p = c.split(`
914
- `).map((f, g) => `${P(g, e.unorderedList)}${f}`), d = p.reduce((f, g, b) => f + P(b, e.unorderedList).length, 0), l = p.reduce((f, g, b) => f + P(b, !e.unorderedList).length, 0);
929
+ const o = i.value.slice(i.selectionStart, i.selectionEnd), [s, a, c] = Ae(e, o), p = c.split(`
930
+ `).map((f, g) => `${_(g, e.unorderedList)}${f}`), d = p.reduce((f, g, b) => f + _(b, e.unorderedList).length, 0), l = p.reduce((f, g, b) => f + _(b, !e.unorderedList).length, 0);
915
931
  if (s.processed)
916
- return t ? (n = Math.max(n - P(0, e.unorderedList).length, 0), r = n) : (n = i.selectionStart, r = i.selectionEnd - d), { text: c, selectionStart: n, selectionEnd: r };
917
- const { newlinesToAppend: h, newlinesToPrepend: u } = D(i), m = h + p.join(`
932
+ return t ? (n = Math.max(n - _(0, e.unorderedList).length, 0), r = n) : (n = i.selectionStart, r = i.selectionEnd - d), { text: c, selectionStart: n, selectionEnd: r };
933
+ const { newlinesToAppend: m, newlinesToPrepend: u } = U(i), h = m + p.join(`
918
934
  `) + u;
919
935
  return t ? (n = Math.max(
920
- n + P(0, e.unorderedList).length + h.length,
936
+ n + _(0, e.unorderedList).length + m.length,
921
937
  0
922
- ), r = n) : a.processed ? (n = Math.max(i.selectionStart + h.length, 0), r = i.selectionEnd + h.length + d - l) : (n = Math.max(i.selectionStart + h.length, 0), r = i.selectionEnd + h.length + d), { text: m, selectionStart: n, selectionEnd: r };
938
+ ), r = n) : a.processed ? (n = Math.max(i.selectionStart + m.length, 0), r = i.selectionEnd + m.length + d - l) : (n = Math.max(i.selectionStart + m.length, 0), r = i.selectionEnd + m.length + d), { text: h, selectionStart: n, selectionEnd: r };
923
939
  }
924
- function me(i, e) {
940
+ function he(i, e) {
925
941
  const t = j(
926
942
  i,
927
- (n) => Me(n, e),
943
+ (n) => Pe(n, e),
928
944
  {
929
945
  adjustSelection: (n, r, o, s) => {
930
- const a = i.value.slice(s, i.selectionEnd), c = /^\d+\.\s+/, p = /^- /, d = c.test(a), l = p.test(a), h = e.orderedList && d || e.unorderedList && l;
946
+ const a = i.value.slice(s, i.selectionEnd), c = /^\d+\.\s+/, p = /^- /, d = c.test(a), l = p.test(a), m = e.orderedList && d || e.unorderedList && l;
931
947
  if (r === o) {
932
- if (h) {
948
+ if (m) {
933
949
  const f = a.match(e.orderedList ? c : p), g = f ? f[0].length : 0;
934
950
  return {
935
951
  start: Math.max(r - g, s),
@@ -943,21 +959,21 @@ function me(i, e) {
943
959
  end: r + v
944
960
  };
945
961
  }
946
- const m = e.unorderedList ? 2 : 3;
962
+ const h = e.unorderedList ? 2 : 3;
947
963
  return {
948
- start: r + m,
949
- end: r + m
964
+ start: r + h,
965
+ end: r + h
950
966
  };
951
967
  }
952
- if (h) {
953
- const m = a.match(e.orderedList ? c : p), f = m ? m[0].length : 0;
968
+ if (m) {
969
+ const h = a.match(e.orderedList ? c : p), f = h ? h[0].length : 0;
954
970
  return {
955
971
  start: Math.max(r - f, s),
956
972
  end: Math.max(o - f, s)
957
973
  };
958
974
  }
959
975
  if (d || l) {
960
- const m = a.match(d ? c : p), f = m ? m[0].length : 0, b = (e.unorderedList ? 2 : 3) - f;
976
+ const h = a.match(d ? c : p), f = h ? h[0].length : 0, b = (e.unorderedList ? 2 : 3) - f;
961
977
  return {
962
978
  start: r + b,
963
979
  end: o + b
@@ -972,10 +988,10 @@ function me(i, e) {
972
988
  prefix: e.unorderedList ? "- " : "1. "
973
989
  }
974
990
  );
975
- H(i, t);
991
+ T(i, t);
976
992
  }
977
- function Ae(i, e) {
978
- const t = S[e];
993
+ function _e(i, e) {
994
+ const t = L[e];
979
995
  if (!t) return !1;
980
996
  const n = t.prefix ?? "", r = t.suffix ?? "";
981
997
  return n ? r ? i.startsWith(n) && i.endsWith(r) : i.startsWith(n) : !1;
@@ -995,20 +1011,20 @@ function q(i) {
995
1011
  a.startsWith("- ") && (a.startsWith("- [ ] ") || a.startsWith("- [x] ") ? e.push("task-list") : e.push("bullet-list")), /^\d+\.\s/.test(a) && e.push("numbered-list"), a.startsWith("> ") && e.push("quote"), a.startsWith("### ") ? e.push("header-3") : a.startsWith("## ") ? e.push("header-2") : a.startsWith("# ") && e.push("header");
996
1012
  const c = Math.max(0, t - 10), p = Math.min(r.length, n + 10), d = r.slice(c, p);
997
1013
  if (d.includes("**")) {
998
- const l = r.slice(Math.max(0, t - 100), t), h = r.slice(n, Math.min(r.length, n + 100)), u = l.lastIndexOf("**"), m = h.indexOf("**");
999
- u !== -1 && m !== -1 && e.push("bold");
1014
+ const l = r.slice(Math.max(0, t - 100), t), m = r.slice(n, Math.min(r.length, n + 100)), u = l.lastIndexOf("**"), h = m.indexOf("**");
1015
+ u !== -1 && h !== -1 && e.push("bold");
1000
1016
  }
1001
1017
  if (d.includes("_")) {
1002
- const l = r.slice(Math.max(0, t - 100), t), h = r.slice(n, Math.min(r.length, n + 100)), u = l.lastIndexOf("_"), m = h.indexOf("_");
1003
- u !== -1 && m !== -1 && e.push("italic");
1018
+ const l = r.slice(Math.max(0, t - 100), t), m = r.slice(n, Math.min(r.length, n + 100)), u = l.lastIndexOf("_"), h = m.indexOf("_");
1019
+ u !== -1 && h !== -1 && e.push("italic");
1004
1020
  }
1005
1021
  if (d.includes("`")) {
1006
- const l = r.slice(Math.max(0, t - 100), t), h = r.slice(n, Math.min(r.length, n + 100));
1007
- l.includes("`") && h.includes("`") && e.push("code");
1022
+ const l = r.slice(Math.max(0, t - 100), t), m = r.slice(n, Math.min(r.length, n + 100));
1023
+ l.includes("`") && m.includes("`") && e.push("code");
1008
1024
  }
1009
1025
  if (d.includes("[") && d.includes("]")) {
1010
- const l = r.slice(Math.max(0, t - 100), t), h = r.slice(n, Math.min(r.length, n + 100)), u = l.lastIndexOf("["), m = h.indexOf("]");
1011
- u !== -1 && m !== -1 && r.slice(n + m + 1, n + m + 10).startsWith("(") && e.push("link");
1026
+ const l = r.slice(Math.max(0, t - 100), t), m = r.slice(n, Math.min(r.length, n + 100)), u = l.lastIndexOf("["), h = m.indexOf("]");
1027
+ u !== -1 && h !== -1 && r.slice(n + h + 1, n + h + 10).startsWith("(") && e.push("link");
1012
1028
  }
1013
1029
  return e;
1014
1030
  }
@@ -1022,18 +1038,18 @@ function fe(i, e = {}) {
1022
1038
  const c = a.split(`
1023
1039
  `);
1024
1040
  let p = 0, d = 0, l = 0;
1025
- for (const h of c) {
1026
- if (o >= l && o <= l + h.length) {
1027
- p = l, d = l + h.length;
1041
+ for (const m of c) {
1042
+ if (o >= l && o <= l + m.length) {
1043
+ p = l, d = l + m.length;
1028
1044
  break;
1029
1045
  }
1030
- l += h.length + 1;
1046
+ l += m.length + 1;
1031
1047
  }
1032
1048
  i.selectionStart = p, i.selectionEnd = d;
1033
1049
  return;
1034
1050
  }
1035
- if (r && Ae(a.slice(o, s), r)) {
1036
- const c = S[r], p = (c.prefix ?? "").length, d = (c.suffix ?? "").length;
1051
+ if (r && _e(a.slice(o, s), r)) {
1052
+ const c = L[r], p = (c.prefix ?? "").length, d = (c.suffix ?? "").length;
1037
1053
  i.selectionStart = Math.max(0, o - p), i.selectionEnd = Math.min(a.length, s + d);
1038
1054
  return;
1039
1055
  }
@@ -1046,29 +1062,29 @@ function fe(i, e = {}) {
1046
1062
  i.selectionStart = c, i.selectionEnd = p;
1047
1063
  }
1048
1064
  }
1049
- function E(i) {
1065
+ function C(i) {
1050
1066
  return !!i && !i.disabled && !i.readOnly;
1051
1067
  }
1052
1068
  function W(i) {
1053
- if (!E(i)) return;
1069
+ if (!C(i)) return;
1054
1070
  k("toggleBold", "Starting"), N(i, "Before");
1055
- const e = C(S.bold), t = A(i, e);
1056
- V(t), H(i, t), N(i, "After");
1071
+ const e = E(L.bold), t = M(i, e);
1072
+ V(t), T(i, t), N(i, "After");
1057
1073
  }
1058
1074
  function K(i) {
1059
- if (!E(i)) return;
1060
- const e = C(S.italic), t = A(i, e);
1061
- H(i, t);
1075
+ if (!C(i)) return;
1076
+ const e = E(L.italic), t = M(i, e);
1077
+ T(i, t);
1062
1078
  }
1063
1079
  function ge(i) {
1064
- if (!E(i)) return;
1065
- const e = C(S.code), t = A(i, e);
1066
- H(i, t);
1080
+ if (!C(i)) return;
1081
+ const e = E(L.code), t = M(i, e);
1082
+ T(i, t);
1067
1083
  }
1068
1084
  function Z(i, e = {}) {
1069
- if (!E(i)) return;
1085
+ if (!C(i)) return;
1070
1086
  const t = i.value.slice(i.selectionStart, i.selectionEnd);
1071
- let n = C(S.link);
1087
+ let n = E(L.link);
1072
1088
  if (t && /^https?:\/\//.test(t) && !e.url ? n = {
1073
1089
  ...n,
1074
1090
  suffix: `](${t})`,
@@ -1081,39 +1097,54 @@ function Z(i, e = {}) {
1081
1097
  const s = i.selectionStart;
1082
1098
  i.value = i.value.slice(0, s) + e.text + i.value.slice(s), i.selectionStart = s, i.selectionEnd = s + e.text.length;
1083
1099
  }
1084
- const o = A(i, n);
1085
- H(i, o);
1100
+ const o = M(i, n);
1101
+ T(i, o);
1086
1102
  }
1087
1103
  function J(i) {
1088
- if (!E(i)) return;
1089
- const e = C(S.bulletList);
1090
- me(i, e);
1091
- }
1092
- function Q(i) {
1093
- if (!E(i)) return;
1094
- const e = C(S.numberedList);
1095
- me(i, e);
1104
+ if (!C(i)) return;
1105
+ const e = E(L.bulletList);
1106
+ he(i, e);
1096
1107
  }
1097
1108
  function G(i) {
1098
- if (!E(i)) return;
1109
+ if (!C(i)) return;
1110
+ const e = E(L.numberedList);
1111
+ he(i, e);
1112
+ }
1113
+ function Q(i) {
1114
+ if (!C(i)) return;
1099
1115
  k("toggleQuote", "Starting"), N(i, "Initial");
1100
- const e = C(S.quote), t = j(
1116
+ const e = E(L.quote), t = j(
1101
1117
  i,
1102
- (n) => U(n, e),
1118
+ (n) => D(n, e),
1103
1119
  { prefix: e.prefix }
1104
1120
  );
1105
- V(t), H(i, t), N(i, "Final");
1121
+ V(t), T(i, t), N(i, "Final");
1106
1122
  }
1107
1123
  function X(i) {
1108
- if (!E(i)) return;
1109
- const e = C(S.taskList), t = j(
1124
+ if (!C(i)) return;
1125
+ const e = E(L.taskList), t = j(
1110
1126
  i,
1111
- (n) => U(n, e),
1127
+ (n) => D(n, e),
1112
1128
  { prefix: e.prefix }
1113
1129
  );
1114
- H(i, t);
1130
+ T(i, t);
1131
+ }
1132
+ function be(i) {
1133
+ if (!C(i)) return;
1134
+ const e = E(L.strikethrough), t = M(i, e);
1135
+ T(i, t);
1136
+ }
1137
+ function ve(i) {
1138
+ if (!C(i)) return;
1139
+ const e = i.selectionStart, n = i.value.slice(0, e), o = (n.length > 0 && !n.endsWith(`
1140
+ `) ? `
1141
+ ` : "") + `
1142
+ ---
1143
+
1144
+ `;
1145
+ i.setRangeText(o, e, i.selectionEnd, "end"), i.dispatchEvent(new Event("input", { bubbles: !0 }));
1115
1146
  }
1116
- function _e(i, e, t) {
1147
+ function Ie(i, e, t) {
1117
1148
  let n = e;
1118
1149
  for (; n > 0 && i[n - 1] !== `
1119
1150
  `; )
@@ -1125,16 +1156,16 @@ function _e(i, e, t) {
1125
1156
  return { lineStart: n, lineEnd: r };
1126
1157
  }
1127
1158
  function R(i, e = 1, t = !1) {
1128
- if (!E(i)) return;
1159
+ if (!C(i)) return;
1129
1160
  (e < 1 || e > 6) && (e = 1), k("insertHeader", "============ START ============"), k("insertHeader", `Level: ${e}, Toggle: ${t}`), k("insertHeader", `Initial cursor: ${i.selectionStart}-${i.selectionEnd}`);
1130
- const n = `header${e === 1 ? "1" : e}`, r = C(S[n] || S.header1);
1161
+ const n = `header${e === 1 ? "1" : e}`, r = E(L[n] || L.header1);
1131
1162
  k("insertHeader", `Style prefix: "${r.prefix}"`);
1132
- const o = i.value, s = i.selectionStart, a = i.selectionEnd, { lineStart: c, lineEnd: p } = _e(o, s, a), d = o.slice(c, p);
1163
+ const o = i.value, s = i.selectionStart, a = i.selectionEnd, { lineStart: c, lineEnd: p } = Ie(o, s, a), d = o.slice(c, p);
1133
1164
  k("insertHeader", `Current line (before): "${d}"`);
1134
- const l = d.match(/^(#{1,6})\s*/), h = l ? l[1].length : 0, u = l ? l[0].length : 0;
1135
- k("insertHeader", `Existing header match: ${l ? l[0] : "none"}`), k("insertHeader", `Existing level: ${h}`), k("insertHeader", `Target level: ${e}`);
1136
- const m = t && h === e;
1137
- k("insertHeader", `Should toggle OFF: ${m}`);
1165
+ const l = d.match(/^(#{1,6})\s*/), m = l ? l[1].length : 0, u = l ? l[0].length : 0;
1166
+ k("insertHeader", `Existing header match: ${l ? l[0] : "none"}`), k("insertHeader", `Existing level: ${m}`), k("insertHeader", `Target level: ${e}`);
1167
+ const h = t && m === e;
1168
+ k("insertHeader", `Should toggle OFF: ${h}`);
1138
1169
  const f = j(
1139
1170
  i,
1140
1171
  (g) => {
@@ -1143,7 +1174,7 @@ function R(i, e = 1, t = !1) {
1143
1174
  const v = b.replace(/^#{1,6}\s*/, "");
1144
1175
  k("insertHeader", `Cleaned line: "${v}"`);
1145
1176
  let y;
1146
- return m ? (k("insertHeader", "ACTION: Toggling OFF - removing header"), y = v) : h > 0 ? (k("insertHeader", `ACTION: Replacing H${h} with H${e}`), y = r.prefix + v) : (k("insertHeader", "ACTION: Adding new header"), y = r.prefix + v), k("insertHeader", `New line: "${y}"`), {
1177
+ return h ? (k("insertHeader", "ACTION: Toggling OFF - removing header"), y = v) : m > 0 ? (k("insertHeader", `ACTION: Replacing H${m} with H${e}`), y = r.prefix + v) : (k("insertHeader", "ACTION: Adding new header"), y = r.prefix + v), k("insertHeader", `New line: "${y}"`), {
1147
1178
  text: y,
1148
1179
  selectionStart: g.selectionStart,
1149
1180
  selectionEnd: g.selectionEnd
@@ -1152,7 +1183,7 @@ function R(i, e = 1, t = !1) {
1152
1183
  {
1153
1184
  prefix: r.prefix,
1154
1185
  adjustSelection: (g, b, v) => {
1155
- if (k("insertHeader", `Adjusting selection with existing prefix length ${u}`), m) {
1186
+ if (k("insertHeader", `Adjusting selection with existing prefix length ${u}`), h) {
1156
1187
  const y = Math.max(b - u, c);
1157
1188
  return {
1158
1189
  start: y,
@@ -1173,89 +1204,93 @@ function R(i, e = 1, t = !1) {
1173
1204
  }
1174
1205
  }
1175
1206
  );
1176
- V(f), k("insertHeader", "============ END ============"), H(i, f);
1207
+ V(f), k("insertHeader", "============ END ============"), T(i, f);
1177
1208
  }
1178
- function be(i) {
1209
+ function we(i) {
1179
1210
  R(i, 1, !0);
1180
1211
  }
1181
- function ve(i) {
1212
+ function ke(i) {
1182
1213
  R(i, 2, !0);
1183
1214
  }
1184
- function we(i) {
1215
+ function ye(i) {
1185
1216
  R(i, 3, !0);
1186
1217
  }
1187
- function ke(i, e) {
1188
- if (!E(i)) return;
1189
- const t = C(e);
1218
+ function xe(i, e) {
1219
+ if (!C(i)) return;
1220
+ const t = E(e);
1190
1221
  let n;
1191
1222
  if (t.multiline) {
1192
1223
  const r = i.value.slice(i.selectionStart, i.selectionEnd);
1193
- O(r) ? n = U(i, t) : n = A(i, t);
1224
+ O(r) ? n = D(i, t) : n = M(i, t);
1194
1225
  } else
1195
- n = A(i, t);
1196
- H(i, n);
1226
+ n = M(i, t);
1227
+ T(i, n);
1197
1228
  }
1198
1229
  const re = {
1199
1230
  toggleBold: W,
1200
1231
  toggleItalic: K,
1201
1232
  toggleCode: ge,
1233
+ toggleStrikethrough: be,
1202
1234
  insertLink: Z,
1235
+ insertHorizontalRule: ve,
1203
1236
  toggleBulletList: J,
1204
- toggleNumberedList: Q,
1205
- toggleQuote: G,
1237
+ toggleNumberedList: G,
1238
+ toggleQuote: Q,
1206
1239
  toggleTaskList: X,
1207
1240
  insertHeader: R,
1208
- toggleH1: be,
1209
- toggleH2: ve,
1210
- toggleH3: we,
1241
+ toggleH1: we,
1242
+ toggleH2: ke,
1243
+ toggleH3: ye,
1211
1244
  getActiveFormats: q,
1212
1245
  hasFormat: ue,
1213
1246
  expandSelection: fe,
1214
- applyCustomFormat: ke,
1215
- preserveSelection: he,
1247
+ applyCustomFormat: xe,
1248
+ preserveSelection: me,
1216
1249
  setUndoMethod: pe,
1217
1250
  setDebugMode: ce,
1218
1251
  getDebugMode: F
1219
- }, Pe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1252
+ }, Be = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1220
1253
  __proto__: null,
1221
1254
  actions: re,
1222
- applyCustomFormat: ke,
1255
+ applyCustomFormat: xe,
1223
1256
  default: re,
1224
1257
  expandSelection: fe,
1225
1258
  getActiveFormats: q,
1226
1259
  getDebugMode: F,
1227
- getUndoMethod: Ce,
1260
+ getUndoMethod: Te,
1228
1261
  hasFormat: ue,
1229
1262
  insertHeader: R,
1263
+ insertHorizontalRule: ve,
1230
1264
  insertLink: Z,
1231
- preserveSelection: he,
1265
+ preserveSelection: me,
1232
1266
  setDebugMode: ce,
1233
1267
  setUndoMethod: pe,
1234
1268
  toggleBold: W,
1235
1269
  toggleBulletList: J,
1236
1270
  toggleCode: ge,
1237
- toggleH1: be,
1238
- toggleH2: ve,
1239
- toggleH3: we,
1271
+ toggleH1: we,
1272
+ toggleH2: ke,
1273
+ toggleH3: ye,
1240
1274
  toggleItalic: K,
1241
- toggleNumberedList: Q,
1242
- toggleQuote: G,
1275
+ toggleNumberedList: G,
1276
+ toggleQuote: Q,
1277
+ toggleStrikethrough: be,
1243
1278
  toggleTaskList: X
1244
- }, Symbol.toStringTag, { value: "Module" })), Ie = {
1279
+ }, Symbol.toStringTag, { value: "Module" })), Re = {
1245
1280
  b: "toggleBold",
1246
1281
  i: "toggleItalic",
1247
1282
  k: "insertLink"
1248
- }, Be = {
1283
+ }, Ne = {
1249
1284
  Digit7: "toggleNumberedList",
1250
1285
  Digit8: "toggleBulletList"
1251
1286
  };
1252
- class ye {
1287
+ class ze {
1253
1288
  constructor(e) {
1254
1289
  this.editor = e, this.textarea = e.textarea;
1255
1290
  }
1256
1291
  handleKeydown(e) {
1257
1292
  if (!(navigator.platform.toLowerCase().includes("mac") ? e.metaKey : e.ctrlKey)) return !1;
1258
- const o = e.key.toLowerCase(), s = Be[e.code], a = s ?? Ie[o];
1293
+ const o = e.key.toLowerCase(), s = Ne[e.code], a = s ?? Re[o];
1259
1294
  return !a || s && !e.shiftKey || !s && (o === "b" || o === "i" || o === "k") && e.shiftKey ? !1 : (e.preventDefault(), this.editor.toolbar ? this.editor.toolbar.handleAction(a) : this.handleAction(a), !0);
1260
1295
  }
1261
1296
  handleAction(e) {
@@ -1275,10 +1310,10 @@ class ye {
1275
1310
  J(t);
1276
1311
  break;
1277
1312
  case "toggleNumberedList":
1278
- Q(t);
1313
+ G(t);
1279
1314
  break;
1280
1315
  case "toggleQuote":
1281
- G(t);
1316
+ Q(t);
1282
1317
  break;
1283
1318
  case "toggleTaskList":
1284
1319
  X(t);
@@ -1290,7 +1325,7 @@ class ye {
1290
1325
  destroy() {
1291
1326
  }
1292
1327
  }
1293
- const _ = {
1328
+ const P = {
1294
1329
  name: "solar",
1295
1330
  colors: {
1296
1331
  bgPrimary: "#faf0ca",
@@ -1336,8 +1371,10 @@ const _ = {
1336
1371
  // Yale Blue - icon color
1337
1372
  toolbarHover: "#f5f5f5",
1338
1373
  // Light gray - hover background
1339
- toolbarActive: "#faf0ca"
1374
+ toolbarActive: "#faf0ca",
1340
1375
  // Lemon Chiffon - active button background
1376
+ border: "rgba(13, 59, 102, 0.25)"
1377
+ // Table/element borders
1341
1378
  }
1342
1379
  }, oe = {
1343
1380
  name: "cave",
@@ -1385,20 +1422,22 @@ const _ = {
1385
1422
  // Light blue-gray - icon color
1386
1423
  toolbarHover: "#243546",
1387
1424
  // Slightly lighter charcoal - hover background
1388
- toolbarActive: "#2a3f52"
1425
+ toolbarActive: "#2a3f52",
1389
1426
  // Even lighter - active button background
1427
+ border: "rgba(197, 221, 232, 0.2)"
1428
+ // Table/element borders
1390
1429
  }
1391
1430
  }, se = {
1392
- solar: _,
1431
+ solar: P,
1393
1432
  cave: oe,
1394
1433
  // Aliases for backward compatibility
1395
- light: _,
1434
+ light: P,
1396
1435
  dark: oe
1397
1436
  };
1398
1437
  function $(i) {
1399
1438
  return typeof i == "string" ? { ...se[i] || se.solar, name: i } : i;
1400
1439
  }
1401
- function Re(i) {
1440
+ function je(i) {
1402
1441
  const e = [];
1403
1442
  for (const [t, n] of Object.entries(i)) {
1404
1443
  const r = t.replace(/([A-Z])/g, "-$1").toLowerCase();
@@ -1416,7 +1455,7 @@ function ae(i, e = {}) {
1416
1455
  }
1417
1456
  };
1418
1457
  }
1419
- function Ne(i = {}) {
1458
+ function Oe(i = {}) {
1420
1459
  const {
1421
1460
  fontSize: e = "14px",
1422
1461
  lineHeight: t = 1.6,
@@ -1433,7 +1472,7 @@ function Ne(i = {}) {
1433
1472
  `)}
1434
1473
  }
1435
1474
  }
1436
- ` : "", c = o && o.colors ? Re(o.colors) : "";
1475
+ ` : "", c = o && o.colors ? je(o.colors) : "";
1437
1476
  return `
1438
1477
  /* Marzipan Editor Styles */
1439
1478
 
@@ -1841,24 +1880,17 @@ function Ne(i = {}) {
1841
1880
  .marzipan-stats {
1842
1881
  height: 40px !important;
1843
1882
  padding: 0 20px !important;
1844
- background: #f8f9fa !important;
1845
- border-top: 1px solid #e0e0e0 !important;
1883
+ background: var(--bg-primary, #f8f9fa) !important;
1884
+ border-top: 1px solid var(--toolbar-border, #e0e0e0) !important;
1846
1885
  display: flex !important;
1847
1886
  justify-content: space-between !important;
1848
1887
  align-items: center !important;
1849
1888
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
1850
1889
  font-size: 0.85rem !important;
1851
- color: #666 !important;
1890
+ color: var(--text, #666) !important;
1852
1891
  grid-row: 3 !important; /* Always third row in grid */
1853
1892
  }
1854
1893
 
1855
- /* Dark theme stats bar */
1856
- .marzipan-container[data-theme="cave"] .marzipan-stats {
1857
- background: var(--bg-secondary, #1D2D3E) !important;
1858
- border-top: 1px solid rgba(197, 221, 232, 0.1) !important;
1859
- color: var(--text, #c5dde8) !important;
1860
- }
1861
-
1862
1894
  .marzipan-stats .marzipan-stat {
1863
1895
  display: flex !important;
1864
1896
  align-items: center !important;
@@ -2210,26 +2242,37 @@ function Ne(i = {}) {
2210
2242
 
2211
2243
  /* Tables - GFM-style table rendering */
2212
2244
  .marzipan-preview .marzipan-table {
2213
- border-collapse: collapse;
2214
- margin: 1em 0;
2215
- width: 100%;
2216
- overflow: auto;
2245
+ border-collapse: collapse !important;
2246
+ margin: 1em 0 !important;
2247
+ width: 100% !important;
2248
+ overflow: auto !important;
2249
+ display: table !important;
2217
2250
  }
2218
2251
 
2219
2252
  .marzipan-preview .marzipan-table th,
2220
2253
  .marzipan-preview .marzipan-table td {
2221
- border: 1px solid var(--border, #ddd);
2222
- padding: 0.5em 1em;
2223
- text-align: left;
2254
+ border: 1px solid var(--border, rgba(128,128,128,0.4)) !important;
2255
+ padding: 0.4em 0.8em !important;
2256
+ text-align: left !important;
2224
2257
  }
2225
2258
 
2226
2259
  .marzipan-preview .marzipan-table th {
2227
- background: var(--bg-secondary, #f5f5f5);
2228
- font-weight: 600;
2260
+ background: var(--bg-secondary, rgba(128,128,128,0.15)) !important;
2261
+ font-weight: 600 !important;
2262
+ }
2263
+
2264
+ .marzipan-preview .marzipan-table tr:nth-child(even) td {
2265
+ background: var(--bg-secondary, rgba(128,128,128,0.05)) !important;
2229
2266
  }
2230
2267
 
2231
- .marzipan-preview .marzipan-table tr:nth-child(even) {
2232
- background: var(--bg-secondary, #f9f9f9);
2268
+ .marzipan-preview .marzipan-table thead,
2269
+ .marzipan-preview .marzipan-table tbody,
2270
+ .marzipan-preview .marzipan-table tr {
2271
+ display: table-row-group !important;
2272
+ }
2273
+
2274
+ .marzipan-preview .marzipan-table tr {
2275
+ display: table-row !important;
2233
2276
  }
2234
2277
 
2235
2278
  /* In preview mode - hide table syntax markers */
@@ -2256,35 +2299,35 @@ function Ne(i = {}) {
2256
2299
  ${a}
2257
2300
  `;
2258
2301
  }
2259
- const je = `<svg viewBox="0 0 18 18">
2302
+ const Fe = `<svg viewBox="0 0 18 18">
2260
2303
  <path stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5,4H9.5A2.5,2.5,0,0,1,12,6.5v0A2.5,2.5,0,0,1,9.5,9H5A0,0,0,0,1,5,9V4A0,0,0,0,1,5,4Z"></path>
2261
2304
  <path stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5,9h5.5A2.5,2.5,0,0,1,13,11.5v0A2.5,2.5,0,0,1,10.5,14H5a0,0,0,0,1,0,0V9A0,0,0,0,1,5,9Z"></path>
2262
- </svg>`, Oe = `<svg viewBox="0 0 18 18">
2305
+ </svg>`, Ve = `<svg viewBox="0 0 18 18">
2263
2306
  <line stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" x1="7" x2="13" y1="4" y2="4"></line>
2264
2307
  <line stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" x1="5" x2="11" y1="14" y2="14"></line>
2265
2308
  <line stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" x1="8" x2="10" y1="14" y2="4"></line>
2266
- </svg>`, Fe = `<svg viewBox="0 0 18 18">
2309
+ </svg>`, Ue = `<svg viewBox="0 0 18 18">
2267
2310
  <path fill="currentColor" d="M10,4V14a1,1,0,0,1-2,0V10H3v4a1,1,0,0,1-2,0V4A1,1,0,0,1,3,4V8H8V4a1,1,0,0,1,2,0Zm6.06787,9.209H14.98975V7.59863a.54085.54085,0,0,0-.605-.60547h-.62744a1.01119,1.01119,0,0,0-.748.29688L11.645,8.56641a.5435.5435,0,0,0-.022.8584l.28613.30762a.53861.53861,0,0,0,.84717.0332l.09912-.08789a1.2137,1.2137,0,0,0,.2417-.35254h.02246s-.01123.30859-.01123.60547V13.209H12.041a.54085.54085,0,0,0-.605.60547v.43945a.54085.54085,0,0,0,.605.60547h4.02686a.54085.54085,0,0,0,.605-.60547v-.43945A.54085.54085,0,0,0,16.06787,13.209Z"></path>
2268
- </svg>`, Ve = `<svg viewBox="0 0 18 18">
2269
- <path fill="currentColor" d="M16.73975,13.81445v.43945a.54085.54085,0,0,1-.605.60547H11.855a.58392.58392,0,0,1-.64893-.60547V14.0127c0-2.90527,3.39941-3.42187,3.39941-4.55469a.77675.77675,0,0,0-.84717-.78125,1.17684,1.17684,0,0,0-.83594.38477c-.2749.26367-.561.374-.85791.13184l-.4292-.34082c-.30811-.24219-.38525-.51758-.1543-.81445a2.97155,2.97155,0,0,1,2.45361-1.17676,2.45393,2.45393,0,0,1,2.68408,2.40918c0,2.45312-3.1792,2.92676-3.27832,3.93848h2.79443A.54085.54085,0,0,1,16.73975,13.81445ZM9,3A.99974.99974,0,0,0,8,4V8H3V4A1,1,0,0,0,1,4V14a1,1,0,0,0,2,0V10H8v4a1,1,0,0,0,2,0V4A.99974.99974,0,0,0,9,3Z"></path>
2270
2311
  </svg>`, De = `<svg viewBox="0 0 18 18">
2312
+ <path fill="currentColor" d="M16.73975,13.81445v.43945a.54085.54085,0,0,1-.605.60547H11.855a.58392.58392,0,0,1-.64893-.60547V14.0127c0-2.90527,3.39941-3.42187,3.39941-4.55469a.77675.77675,0,0,0-.84717-.78125,1.17684,1.17684,0,0,0-.83594.38477c-.2749.26367-.561.374-.85791.13184l-.4292-.34082c-.30811-.24219-.38525-.51758-.1543-.81445a2.97155,2.97155,0,0,1,2.45361-1.17676,2.45393,2.45393,0,0,1,2.68408,2.40918c0,2.45312-3.1792,2.92676-3.27832,3.93848h2.79443A.54085.54085,0,0,1,16.73975,13.81445ZM9,3A.99974.99974,0,0,0,8,4V8H3V4A1,1,0,0,0,1,4V14a1,1,0,0,0,2,0V10H8v4a1,1,0,0,0,2,0V4A.99974.99974,0,0,0,9,3Z"></path>
2313
+ </svg>`, qe = `<svg viewBox="0 0 18 18">
2271
2314
  <path fill="currentColor" d="M16.65186,12.30664a2.6742,2.6742,0,0,1-2.915,2.68457,3.96592,3.96592,0,0,1-2.25537-.6709.56007.56007,0,0,1-.13232-.83594L11.64648,13c.209-.34082.48389-.36328.82471-.1543a2.32654,2.32654,0,0,0,1.12256.33008c.71484,0,1.12207-.35156,1.12207-.78125,0-.61523-.61621-.86816-1.46338-.86816H13.2085a.65159.65159,0,0,1-.68213-.41895l-.05518-.10937a.67114.67114,0,0,1,.14307-.78125l.71533-.86914a8.55289,8.55289,0,0,1,.68213-.7373V8.58887a3.93913,3.93913,0,0,1-.748.05469H11.9873a.54085.54085,0,0,1-.605-.60547V7.59863a.54085.54085,0,0,1,.605-.60547h3.75146a.53773.53773,0,0,1,.60547.59375v.17676a1.03723,1.03723,0,0,1-.27539.748L14.74854,10.0293A2.31132,2.31132,0,0,1,16.65186,12.30664ZM9,3A.99974.99974,0,0,0,8,4V8H3V4A1,1,0,0,0,1,4V14a1,1,0,0,0,2,0V10H8v4a1,1,0,0,0,2,0V4A.99974.99974,0,0,0,9,3Z"></path>
2272
- </svg>`, Ue = `<svg viewBox="0 0 18 18">
2315
+ </svg>`, We = `<svg viewBox="0 0 18 18">
2273
2316
  <line stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" x1="7" x2="11" y1="7" y2="11"></line>
2274
2317
  <path stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8.9,4.577a3.476,3.476,0,0,1,.36,4.679A3.476,3.476,0,0,1,4.577,8.9C3.185,7.5,2.035,6.4,4.217,4.217S7.5,3.185,8.9,4.577Z"></path>
2275
2318
  <path stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.423,9.1a3.476,3.476,0,0,0-4.679-.36,3.476,3.476,0,0,0,.36,4.679c1.392,1.392,2.5,2.542,4.679.36S14.815,10.5,13.423,9.1Z"></path>
2276
- </svg>`, qe = `<svg viewBox="0 0 18 18">
2319
+ </svg>`, Ke = `<svg viewBox="0 0 18 18">
2277
2320
  <polyline stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" points="5 7 3 9 5 11"></polyline>
2278
2321
  <polyline stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" points="13 7 15 9 13 11"></polyline>
2279
2322
  <line stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" x1="10" x2="8" y1="5" y2="13"></line>
2280
- </svg>`, We = `<svg viewBox="0 0 18 18">
2323
+ </svg>`, Ze = `<svg viewBox="0 0 18 18">
2281
2324
  <line stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" x1="6" x2="15" y1="4" y2="4"></line>
2282
2325
  <line stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" x1="6" x2="15" y1="9" y2="9"></line>
2283
2326
  <line stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" x1="6" x2="15" y1="14" y2="14"></line>
2284
2327
  <line stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" x1="3" x2="3" y1="4" y2="4"></line>
2285
2328
  <line stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" x1="3" x2="3" y1="9" y2="9"></line>
2286
2329
  <line stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" x1="3" x2="3" y1="14" y2="14"></line>
2287
- </svg>`, Ke = `<svg viewBox="0 0 18 18">
2330
+ </svg>`, Je = `<svg viewBox="0 0 18 18">
2288
2331
  <line stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" x1="7" x2="15" y1="4" y2="4"></line>
2289
2332
  <line stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" x1="7" x2="15" y1="9" y2="9"></line>
2290
2333
  <line stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" x1="7" x2="15" y1="14" y2="14"></line>
@@ -2292,39 +2335,39 @@ const je = `<svg viewBox="0 0 18 18">
2292
2335
  <path fill="currentColor" d="M3.5,6A0.5,0.5,0,0,1,3,5.5V3.085l-0.276.138A0.5,0.5,0,0,1,2.053,3c-0.124-.247-0.023-0.324.224-0.447l1-.5A0.5,0.5,0,0,1,4,2.5v3A0.5,0.5,0,0,1,3.5,6Z"></path>
2293
2336
  <path stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="1" d="M4.5,10.5h-2c0-.234,1.85-1.076,1.85-2.234A0.959,0.959,0,0,0,2.5,8.156"></path>
2294
2337
  <path stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="1" d="M2.5,14.846a0.959,0.959,0,0,0,1.85-.109A0.7,0.7,0,0,0,3.75,14a0.688,0.688,0,0,0,.6-0.736,0.959,0.959,0,0,0-1.85-.109"></path>
2295
- </svg>`, Ze = `<svg viewBox="2 2 20 20">
2338
+ </svg>`, Ge = `<svg viewBox="2 2 20 20">
2296
2339
  <path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 10.8182L9 10.8182C8.80222 10.8182 8.60888 10.7649 8.44443 10.665C8.27998 10.5651 8.15181 10.4231 8.07612 10.257C8.00043 10.0909 7.98063 9.90808 8.01922 9.73174C8.0578 9.55539 8.15304 9.39341 8.29289 9.26627C8.43275 9.13913 8.61093 9.05255 8.80491 9.01747C8.99889 8.98239 9.19996 9.00039 9.38268 9.0692C9.56541 9.13801 9.72159 9.25453 9.83147 9.40403C9.94135 9.55353 10 9.72929 10 9.90909L10 12.1818C10 12.664 9.78929 13.1265 9.41421 13.4675C9.03914 13.8084 8.53043 14 8 14"></path>
2297
2340
  <path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M16 10.8182L15 10.8182C14.8022 10.8182 14.6089 10.7649 14.4444 10.665C14.28 10.5651 14.1518 10.4231 14.0761 10.257C14.0004 10.0909 13.9806 9.90808 14.0192 9.73174C14.0578 9.55539 14.153 9.39341 14.2929 9.26627C14.4327 9.13913 14.6109 9.05255 14.8049 9.01747C14.9989 8.98239 15.2 9.00039 15.3827 9.0692C15.5654 9.13801 15.7216 9.25453 15.8315 9.40403C15.9414 9.55353 16 9.72929 16 9.90909L16 12.1818C16 12.664 15.7893 13.1265 15.4142 13.4675C15.0391 13.8084 14.5304 14 14 14"></path>
2298
- </svg>`, Je = `<svg viewBox="0 0 18 18">
2341
+ </svg>`, Qe = `<svg viewBox="0 0 18 18">
2299
2342
  <line stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" x1="8" x2="16" y1="4" y2="4"></line>
2300
2343
  <line stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" x1="8" x2="16" y1="9" y2="9"></line>
2301
2344
  <line stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" x1="8" x2="16" y1="14" y2="14"></line>
2302
2345
  <rect stroke="currentColor" fill="none" stroke-width="1.5" x="2" y="3" width="3" height="3" rx="0.5"></rect>
2303
2346
  <rect stroke="currentColor" fill="none" stroke-width="1.5" x="2" y="13" width="3" height="3" rx="0.5"></rect>
2304
2347
  <polyline stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" points="2.65 9.5 3.5 10.5 5 8.5"></polyline>
2305
- </svg>`, Qe = `<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
2348
+ </svg>`, Xe = `<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
2306
2349
  <path d="M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z" fill="none"></path>
2307
2350
  <circle cx="12" cy="12" r="3" fill="none"></circle>
2308
- </svg>`, Ge = `<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
2351
+ </svg>`, Ye = `<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
2309
2352
  <path d="M17.94 17.94A10.94 10.94 0 0 1 12 20c-7 0-11-8-11-8a20.29 20.29 0 0 1 5.06-6.88"></path>
2310
2353
  <path d="M9.9 4.24A10.94 10.94 0 0 1 12 4c7 0 11 8 11 8a20.29 20.29 0 0 1-4.22 5.02"></path>
2311
2354
  <path d="M1 1l22 22"></path>
2312
2355
  <path d="M14.12 14.12A3 3 0 0 1 9.88 9.88"></path>
2313
- </svg>`, Xe = {
2314
- bold: { name: "bold", icon: je, title: "Bold (Ctrl+B)", action: "toggleBold" },
2315
- italic: { name: "italic", icon: Oe, title: "Italic (Ctrl+I)", action: "toggleItalic" },
2316
- code: { name: "code", icon: qe, title: "Code (Ctrl+`)", action: "toggleCode" },
2317
- link: { name: "link", icon: Ue, title: "Insert Link (Ctrl+K)", action: "insertLink" },
2318
- quote: { name: "quote", icon: Ze, title: "Quote", action: "toggleQuote" },
2319
- bulletList: { name: "bulletList", icon: We, title: "Bullet List", action: "toggleBulletList" },
2320
- orderedList: { name: "orderedList", icon: Ke, title: "Numbered List", action: "toggleNumberedList" },
2321
- taskList: { name: "taskList", icon: Je, title: "Task List", action: "toggleTaskList" },
2322
- h1: { name: "h1", icon: Fe, title: "Heading 1", action: "insertH1" },
2323
- h2: { name: "h2", icon: Ve, title: "Heading 2", action: "insertH2" },
2324
- h3: { name: "h3", icon: De, title: "Heading 3", action: "insertH3" },
2325
- view: { name: "viewMode", icon: Qe, title: "View mode", action: "toggle-view-menu", hasDropdown: !0 },
2326
- plain: { name: "togglePlain", icon: Ge, title: "Toggle plain textarea", action: "toggle-plain" }
2327
- }, Ye = [
2356
+ </svg>`, et = {
2357
+ bold: { name: "bold", icon: Fe, title: "Bold (Ctrl+B)", action: "toggleBold" },
2358
+ italic: { name: "italic", icon: Ve, title: "Italic (Ctrl+I)", action: "toggleItalic" },
2359
+ code: { name: "code", icon: Ke, title: "Code (Ctrl+`)", action: "toggleCode" },
2360
+ link: { name: "link", icon: We, title: "Insert Link (Ctrl+K)", action: "insertLink" },
2361
+ quote: { name: "quote", icon: Ge, title: "Quote", action: "toggleQuote" },
2362
+ bulletList: { name: "bulletList", icon: Ze, title: "Bullet List", action: "toggleBulletList" },
2363
+ orderedList: { name: "orderedList", icon: Je, title: "Numbered List", action: "toggleNumberedList" },
2364
+ taskList: { name: "taskList", icon: Qe, title: "Task List", action: "toggleTaskList" },
2365
+ h1: { name: "h1", icon: Ue, title: "Heading 1", action: "insertH1" },
2366
+ h2: { name: "h2", icon: De, title: "Heading 2", action: "insertH2" },
2367
+ h3: { name: "h3", icon: qe, title: "Heading 3", action: "insertH3" },
2368
+ view: { name: "viewMode", icon: Xe, title: "View mode", action: "toggle-view-menu", hasDropdown: !0 },
2369
+ plain: { name: "togglePlain", icon: Ye, title: "Toggle plain textarea", action: "toggle-plain" }
2370
+ }, tt = [
2328
2371
  "bold",
2329
2372
  "italic",
2330
2373
  "|",
@@ -2342,13 +2385,13 @@ const je = `<svg viewBox="0 0 18 18">
2342
2385
  "taskList",
2343
2386
  "|",
2344
2387
  "view"
2345
- ], et = /* @__PURE__ */ new Set(["|", "separator", "divider"]);
2346
- class tt {
2388
+ ], nt = /* @__PURE__ */ new Set(["|", "separator", "divider"]);
2389
+ class it {
2347
2390
  constructor(e, t = null) {
2348
- this.container = null, this.buttons = {}, this.actions = Pe, this.editor = e, this.buttonConfig = t;
2391
+ this.container = null, this.buttons = {}, this.actions = Be, this.editor = e, this.buttonConfig = t;
2349
2392
  }
2350
2393
  create() {
2351
- this.container = document.createElement("div"), this.container.className = "marzipan-toolbar", this.container.setAttribute("role", "toolbar"), this.container.setAttribute("aria-label", "Text formatting"), this.resolveButtons(this.buttonConfig ?? Ye).forEach((r) => {
2394
+ this.container = document.createElement("div"), this.container.className = "marzipan-toolbar", this.container.setAttribute("role", "toolbar"), this.container.setAttribute("aria-label", "Text formatting"), this.resolveButtons(this.buttonConfig ?? tt).forEach((r) => {
2352
2395
  if (r.separator) {
2353
2396
  const o = document.createElement("div");
2354
2397
  o.className = "marzipan-toolbar-separator", o.setAttribute("role", "separator"), this.container.appendChild(o);
@@ -2365,11 +2408,11 @@ class tt {
2365
2408
  return e.forEach((n) => {
2366
2409
  if (n) {
2367
2410
  if (typeof n == "string") {
2368
- if (et.has(n)) {
2411
+ if (nt.has(n)) {
2369
2412
  t.push({ separator: !0 });
2370
2413
  return;
2371
2414
  }
2372
- const r = Xe[n];
2415
+ const r = et[n];
2373
2416
  r ? t.push({ ...r }) : console.warn(`[Marzipan] Unknown toolbar button preset: ${n}`);
2374
2417
  return;
2375
2418
  }
@@ -2522,7 +2565,6 @@ class tt {
2522
2565
  case "preview":
2523
2566
  this.editor.showPreviewMode?.(!0);
2524
2567
  break;
2525
- case "normal":
2526
2568
  default:
2527
2569
  this.editor.showPlainTextarea(!1), typeof this.editor.showPreviewMode == "function" && this.editor.showPreviewMode(!1);
2528
2570
  break;
@@ -2533,7 +2575,7 @@ class tt {
2533
2575
  }
2534
2576
  }
2535
2577
  let le = !1;
2536
- function nt() {
2578
+ function rt() {
2537
2579
  if (le || typeof document > "u") return;
2538
2580
  const i = document.createElement("style");
2539
2581
  i.className = "marzipan-link-tooltip-styles", i.textContent = `
@@ -2567,12 +2609,12 @@ function nt() {
2567
2609
  }
2568
2610
  `, document.head.appendChild(i), le = !0;
2569
2611
  }
2570
- class it {
2612
+ class ot {
2571
2613
  constructor(e) {
2572
2614
  this.editor = e, this.tooltip = null, this.currentLink = null, this.hideTimeout = null, this.supportsAnchor = !1, this._selectionHandler = null, this._keyupHandler = null, this._inputHandler = null, this._scrollHandler = null, this._tooltipEnterHandler = null, this._tooltipLeaveHandler = null, this.init();
2573
2615
  }
2574
2616
  init() {
2575
- typeof CSS > "u" || typeof CSS.supports != "function" || !(CSS.supports("position-anchor: --x") && CSS.supports("position-area: center")) || (nt(), this.supportsAnchor = !0, this.createTooltip(), this.bindListeners());
2617
+ typeof CSS > "u" || typeof CSS.supports != "function" || !(CSS.supports("position-anchor: --x") && CSS.supports("position-area: center")) || (rt(), this.supportsAnchor = !0, this.createTooltip(), this.bindListeners());
2576
2618
  }
2577
2619
  bindListeners() {
2578
2620
  !this.supportsAnchor || typeof document > "u" || !this.tooltip || (this._selectionHandler = () => this.handleSelectionChange(), document.addEventListener("selectionchange", this._selectionHandler), this._keyupHandler = (e) => {
@@ -2642,11 +2684,6 @@ class it {
2642
2684
  this.cancelHide(), this._selectionHandler && typeof document < "u" && (document.removeEventListener("selectionchange", this._selectionHandler), this._selectionHandler = null), this._keyupHandler && (this.editor.textarea.removeEventListener("keyup", this._keyupHandler), this._keyupHandler = null), this._inputHandler && (this.editor.textarea.removeEventListener("input", this._inputHandler), this._inputHandler = null), this._scrollHandler && (this.editor.textarea.removeEventListener("scroll", this._scrollHandler), this._scrollHandler = null), this._tooltipEnterHandler && (this.tooltip?.removeEventListener("mouseenter", this._tooltipEnterHandler), this._tooltipEnterHandler = null), this._tooltipLeaveHandler && (this.tooltip?.removeEventListener("mouseleave", this._tooltipLeaveHandler), this._tooltipLeaveHandler = null), this.tooltip && this.tooltip.parentNode && this.tooltip.parentNode.removeChild(this.tooltip), this.tooltip = null, this.currentLink = null;
2643
2685
  }
2644
2686
  }
2645
- /**
2646
- * Marzipan - A lightweight markdown editor and viewer
2647
- * @version 1.0.7
2648
- * @license Apache-2.0
2649
- */
2650
2687
  const w = class w {
2651
2688
  /**
2652
2689
  * Constructor - Always returns an array of instances
@@ -2682,15 +2719,15 @@ const w = class w {
2682
2719
  _init(e, t = {}) {
2683
2720
  this.element = e, this.options = this._mergeOptions(t), this.instanceTheme = this.options.theme ?? null, this.instanceColors = this.options.colors ? { ...this.options.colors } : null, this._appliedThemeColorKeys = /* @__PURE__ */ new Set(), this.instanceId = ++w.instanceCount, this.initialized = !1, this._autoResizeInputHandler = null, this._autoResizeResizeHandler = null, this._minAutoHeight = null, this._maxAutoHeight = null, w.injectStyles(), w.initGlobalListeners();
2684
2721
  const n = e.querySelector(".marzipan-container"), r = e.querySelector(".marzipan-wrapper");
2685
- if (n || r ? this._recoverFromDOM(n, r) : this._buildFromScratch(), this.shortcuts = new ye(this), this.linkTooltip = new it(this), this.options.toolbar) {
2722
+ if (n || r ? this._recoverFromDOM(n, r) : this._buildFromScratch(), this.shortcuts = new ze(this), this.linkTooltip = new ot(this), this.options.toolbar) {
2686
2723
  const s = typeof this.options.toolbar == "object" ? this.options.toolbar.buttons : null;
2687
- this.toolbar = new tt(this, s), this.toolbar.create(), this.textarea.addEventListener("selectionchange", () => {
2724
+ this.toolbar = new it(this, s), this.toolbar.create(), this.textarea.addEventListener("selectionchange", () => {
2688
2725
  this.toolbar?.updateButtonStates?.();
2689
2726
  }), this.textarea.addEventListener("input", () => {
2690
2727
  this.toolbar?.updateButtonStates?.();
2691
2728
  });
2692
2729
  }
2693
- this.options.blockHandles !== !1 && (this.blockHandlesPlugin = new Le(
2730
+ this.options.blockHandles !== !1 && (this.blockHandlesPlugin = new Ce(
2694
2731
  this.textarea,
2695
2732
  this.preview,
2696
2733
  typeof this.options.blockHandles == "object" ? this.options.blockHandles : {}
@@ -2773,7 +2810,7 @@ const w = class w {
2773
2810
  }
2774
2811
  _resolveTheme() {
2775
2812
  let e = this.instanceTheme;
2776
- return typeof e == "string" && (e = $(e)), e || (e = w.currentTheme || _), typeof e == "string" && (e = $(e)), this.instanceColors ? ae(e, this.instanceColors) : e;
2813
+ return typeof e == "string" && (e = $(e)), e || (e = w.currentTheme || P), typeof e == "string" && (e = $(e)), this.instanceColors ? ae(e, this.instanceColors) : e;
2777
2814
  }
2778
2815
  _applyTheme(e) {
2779
2816
  if (!e) return;
@@ -2848,7 +2885,7 @@ const w = class w {
2848
2885
  * Update preview with parsed markdown
2849
2886
  */
2850
2887
  updatePreview() {
2851
- const e = this.textarea.value, t = this.textarea.selectionStart, n = this._getCurrentLine(e, t), r = T.parse(e, n, this.options.showActiveLineRaw);
2888
+ const e = this.textarea.value, t = this.textarea.selectionStart, n = this._getCurrentLine(e, t), r = H.parse(e, n, this.options.showActiveLineRaw);
2852
2889
  if (this.preview.innerHTML = r || '<span style="color: #808080;">Start typing...</span>', this.options?.hooks?.afterPreviewRender)
2853
2890
  try {
2854
2891
  this.options.hooks.afterPreviewRender(this.preview, this);
@@ -2880,7 +2917,7 @@ const w = class w {
2880
2917
  * Handle input events
2881
2918
  * @private
2882
2919
  */
2883
- handleInput(e) {
2920
+ handleInput() {
2884
2921
  this.updatePreview();
2885
2922
  }
2886
2923
  /**
@@ -2893,7 +2930,7 @@ const w = class w {
2893
2930
  const n = this.textarea.selectionStart, r = this.textarea.selectionEnd, o = this.textarea.value;
2894
2931
  if (n !== r && e.shiftKey) {
2895
2932
  const s = o.substring(0, n), a = o.substring(n, r), c = o.substring(r), d = a.split(`
2896
- `).map((l) => l.replace(/^ /, "")).join(`
2933
+ `).map((l) => l.replace(/^ {2}/, "")).join(`
2897
2934
  `);
2898
2935
  document.execCommand ? (this.textarea.setSelectionRange(n, r), document.execCommand("insertText", !1, d)) : (this.textarea.value = s + d + c, this.textarea.selectionStart = n, this.textarea.selectionEnd = n + d.length);
2899
2936
  } else if (n !== r) {
@@ -2917,7 +2954,7 @@ const w = class w {
2917
2954
  * @returns {boolean} Whether the event was handled
2918
2955
  */
2919
2956
  handleSmartListContinuation() {
2920
- const e = this.textarea, t = e.selectionStart, n = T.getListContext(e.value, t);
2957
+ const e = this.textarea, t = e.selectionStart, n = H.getListContext(e.value, t);
2921
2958
  return !n || !n.inList ? !1 : n.content.trim() === "" && t >= n.markerEndPos ? (this.deleteListMarker(n), !0) : (t > n.markerEndPos && t < n.lineEnd ? this.splitListItem(n, t) : this.insertNewListItem(n), n.listType === "numbered" && this.scheduleNumberedListUpdate(), !0);
2922
2959
  }
2923
2960
  /**
@@ -2932,7 +2969,7 @@ const w = class w {
2932
2969
  * @private
2933
2970
  */
2934
2971
  insertNewListItem(e) {
2935
- const t = T.createNewListItem(e);
2972
+ const t = H.createNewListItem(e);
2936
2973
  document.execCommand("insertText", !1, `
2937
2974
  ` + t), this.textarea.dispatchEvent(new Event("input", { bubbles: !0 }));
2938
2975
  }
@@ -2943,7 +2980,7 @@ const w = class w {
2943
2980
  splitListItem(e, t) {
2944
2981
  const n = e.content.substring(t - e.markerEndPos);
2945
2982
  this.textarea.setSelectionRange(t, e.lineEnd), document.execCommand("delete");
2946
- const r = T.createNewListItem(e);
2983
+ const r = H.createNewListItem(e);
2947
2984
  document.execCommand("insertText", !1, `
2948
2985
  ` + r + n);
2949
2986
  const o = this.textarea.selectionStart - n.length;
@@ -2963,7 +3000,7 @@ const w = class w {
2963
3000
  * @private
2964
3001
  */
2965
3002
  updateNumberedLists() {
2966
- const e = this.textarea.value, t = this.textarea.selectionStart, n = T.renumberLists(e);
3003
+ const e = this.textarea.value, t = this.textarea.selectionStart, n = H.renumberLists(e);
2967
3004
  if (n !== e) {
2968
3005
  let r = 0;
2969
3006
  const o = e.split(`
@@ -2986,7 +3023,7 @@ const w = class w {
2986
3023
  * Handle scroll events
2987
3024
  * @private
2988
3025
  */
2989
- handleScroll(e) {
3026
+ handleScroll() {
2990
3027
  this.preview.scrollTop = this.textarea.scrollTop, this.preview.scrollLeft = this.textarea.scrollLeft;
2991
3028
  }
2992
3029
  /**
@@ -3025,7 +3062,7 @@ const w = class w {
3025
3062
  */
3026
3063
  getRenderedHTML(e = {}) {
3027
3064
  const t = this.getValue();
3028
- let n = T.parse(t);
3065
+ let n = H.parse(t);
3029
3066
  return e.cleanHTML && (n = n.replace(/<span class="syntax-marker[^"]*">.*?<\/span>/g, ""), n = n.replace(/\sclass="(bullet-list|ordered-list|code-fence|hr-marker|blockquote|url-part)"/g, ""), n = n.replace(/\sclass=""/g, "")), n;
3030
3067
  }
3031
3068
  /**
@@ -3185,7 +3222,7 @@ const w = class w {
3185
3222
  * Destroy the editor instance
3186
3223
  */
3187
3224
  destroy() {
3188
- if (this.element.MarzipanInstance = null, w.instances.delete(this.element), this.numberUpdateTimeout && (clearTimeout(this.numberUpdateTimeout), this.numberUpdateTimeout = null), this._teardownAutoResize(), this.linkTooltip && (this.linkTooltip.destroy(), this.linkTooltip = null), this.toolbar && (this.toolbar.destroy(), this.toolbar = null), this.shortcuts && this.shortcuts.destroy(), this.wrapper) {
3225
+ if (this.element.MarzipanInstance = null, w.instances.delete(this.element), this.numberUpdateTimeout && (clearTimeout(this.numberUpdateTimeout), this.numberUpdateTimeout = null), this._teardownAutoResize(), this.blockHandlesPlugin && (this.blockHandlesPlugin.destroy(), this.blockHandlesPlugin = null), this.linkTooltip && (this.linkTooltip.destroy(), this.linkTooltip = null), this.toolbar && (this.toolbar.destroy(), this.toolbar = null), this.shortcuts && this.shortcuts.destroy(), this.wrapper) {
3189
3226
  const e = this.getValue();
3190
3227
  this.wrapper.remove(), this.element.textContent = e;
3191
3228
  }
@@ -3231,7 +3268,7 @@ const w = class w {
3231
3268
  if (w.stylesInjected && !e) return;
3232
3269
  const t = document.querySelector("style.marzipan-styles");
3233
3270
  t && t.remove();
3234
- const n = w.currentTheme || _, r = Ne({ theme: n }), o = document.createElement("style");
3271
+ const n = w.currentTheme || P, r = Oe({ theme: n }), o = document.createElement("style");
3235
3272
  o.className = "marzipan-styles", o.textContent = r, document.head.appendChild(o), w.stylesInjected = !0;
3236
3273
  }
3237
3274
  /**
@@ -3272,44 +3309,61 @@ const w = class w {
3272
3309
  const n = e.target.closest(".marzipan-wrapper")?._instance;
3273
3310
  n && n.handleScroll(e);
3274
3311
  }
3275
- }, !0), document.addEventListener("selectionchange", (e) => {
3276
- const t = document.activeElement;
3277
- if (t && t.classList.contains("marzipan-input")) {
3278
- const r = t.closest(".marzipan-wrapper")?._instance;
3279
- r && (r.options.showStats && r.statsBar && r._updateStats(), clearTimeout(r._selectionTimeout), r._selectionTimeout = setTimeout(() => {
3280
- r.updatePreview();
3312
+ }, !0), document.addEventListener("selectionchange", () => {
3313
+ const e = document.activeElement;
3314
+ if (e && e.classList.contains("marzipan-input")) {
3315
+ const n = e.closest(".marzipan-wrapper")?._instance;
3316
+ n && (n.options.showStats && n.statsBar && n._updateStats(), clearTimeout(n._selectionTimeout), n._selectionTimeout = setTimeout(() => {
3317
+ n.updatePreview();
3281
3318
  }, 50));
3282
3319
  }
3283
3320
  }), w.globalListenersInitialized = !0);
3284
3321
  }
3285
3322
  };
3286
3323
  w.instances = /* @__PURE__ */ new WeakMap(), w.stylesInjected = !1, w.globalListenersInitialized = !1, w.instanceCount = 0;
3287
- let M = w;
3288
- M.MarkdownParser = T;
3289
- M.ShortcutsManager = ye;
3290
- M.themes = {
3291
- solar: _,
3324
+ let A = w;
3325
+ A.MarkdownParser = H;
3326
+ A.ShortcutsManager = ze;
3327
+ A.themes = {
3328
+ solar: P,
3292
3329
  cave: $("cave"),
3293
3330
  light: $("light"),
3294
3331
  dark: $("dark")
3295
3332
  };
3296
- M.getTheme = $;
3297
- M.currentTheme = _;
3333
+ A.getTheme = $;
3334
+ A.currentTheme = P;
3298
3335
  export {
3299
- Le as BlockHandlesPlugin,
3300
- it as LinkTooltip,
3301
- T as MarkdownParser,
3302
- M as Marzipan,
3303
- ye as ShortcutsManager,
3304
- tt as Toolbar,
3305
- Pe as actions,
3336
+ Ce as BlockHandlesPlugin,
3337
+ ot as LinkTooltip,
3338
+ H as MarkdownParser,
3339
+ A as Marzipan,
3340
+ ze as ShortcutsManager,
3341
+ it as Toolbar,
3342
+ dt as accentSwatchPlugin,
3343
+ mt as accentSwatchStyles,
3344
+ Be as actions,
3345
+ Pt as buildTableMarkdown,
3306
3346
  oe as cave,
3307
- M as default,
3308
- Ne as generateStyles,
3347
+ Bt as coreImagePickerPlugin,
3348
+ A as default,
3349
+ Oe as generateStyles,
3309
3350
  $ as getTheme,
3351
+ ut as imageManagerPlugin,
3352
+ ft as imageManagerStyles,
3353
+ bt as imagePickerPlugin,
3310
3354
  ae as mergeTheme,
3311
- _ as solar,
3312
- Re as themeToCSSVars,
3313
- se as themes
3355
+ yt as mermaidExternalPlugin,
3356
+ wt as mermaidPlugin,
3357
+ ct as plugins,
3358
+ _t as resolvePositiveInteger,
3359
+ P as solar,
3360
+ Tt as tableGeneratorPlugin,
3361
+ St as tableGridPlugin,
3362
+ Ct as tableGridStyles,
3363
+ zt as tablePlugin,
3364
+ je as themeToCSSVars,
3365
+ se as themes,
3366
+ $t as tinyHighlightPlugin,
3367
+ Mt as tinyHighlightStyles
3314
3368
  };
3315
3369
  //# sourceMappingURL=index.js.map