mio-previewer 0.1.6 → 0.1.8

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 (176) hide show
  1. package/README.md +12 -2
  2. package/README.zh-CN.md +26 -1
  3. package/dist/{_basePickBy-m5_T47yz.js → _basePickBy-CFTZygnR.js} +30 -30
  4. package/dist/_basePickBy-tPOC0EMH.cjs +1 -0
  5. package/dist/{_baseUniq-BnywwJBY.js → _baseUniq-COpRdEZm.js} +52 -52
  6. package/dist/_baseUniq-DqpG5gxq.cjs +1 -0
  7. package/dist/{arc-BDHD79aE.js → arc-CA-zaVHH.js} +15 -15
  8. package/dist/arc-D6SpLjCN.cjs +1 -0
  9. package/dist/{architecture-O4VJ6CD3-B3mtkY33.cjs → architecture-O4VJ6CD3-CpYFg8kG.cjs} +1 -1
  10. package/dist/{architecture-O4VJ6CD3-DXA5X_yx.js → architecture-O4VJ6CD3-DhXiEYF9.js} +1 -1
  11. package/dist/architectureDiagram-VXUJARFQ-C-ZDGP3T.cjs +36 -0
  12. package/dist/{architectureDiagram-VXUJARFQ-WrHvlvqz.js → architectureDiagram-VXUJARFQ-CMDGkfwW.js} +132 -132
  13. package/dist/{blockDiagram-VD42YOAC-B8yzpSUt.js → blockDiagram-VD42YOAC-B6yyyBoP.js} +45 -45
  14. package/dist/{blockDiagram-VD42YOAC-iGUQhHOa.cjs → blockDiagram-VD42YOAC-BboMD6jZ.cjs} +4 -4
  15. package/dist/{c4Diagram-YG6GDRKO-r1vmxT4H.js → c4Diagram-YG6GDRKO-Bk3UfYds.js} +2 -2
  16. package/dist/{c4Diagram-YG6GDRKO-BC0oVCkM.cjs → c4Diagram-YG6GDRKO-CAnMUU5Q.cjs} +1 -1
  17. package/dist/channel-By4yEUpY.cjs +1 -0
  18. package/dist/{channel-BlCmYLjm.js → channel-CGHeB_wL.js} +1 -1
  19. package/dist/{chunk-4BX2VUAB-BvRfkHhg.js → chunk-4BX2VUAB-DQLiny3u.js} +1 -1
  20. package/dist/chunk-4BX2VUAB-r3h9zqZy.cjs +1 -0
  21. package/dist/{chunk-55IACEB6-B6RNQ_Dl.js → chunk-55IACEB6-BvzkNW0T.js} +3 -3
  22. package/dist/chunk-55IACEB6-F8U2tzR2.cjs +1 -0
  23. package/dist/{chunk-B4BG7PRW-B2nNYsy_.cjs → chunk-B4BG7PRW-DNWDyosT.cjs} +3 -3
  24. package/dist/{chunk-B4BG7PRW-DlrKAjak.js → chunk-B4BG7PRW-XH3xle9g.js} +10 -10
  25. package/dist/{chunk-DI55MBZ5-CZnuDYt1.js → chunk-DI55MBZ5-7cI7r4vk.js} +3 -3
  26. package/dist/{chunk-DI55MBZ5-BUn8iSqn.cjs → chunk-DI55MBZ5-DBabq0PW.cjs} +1 -1
  27. package/dist/{chunk-FMBD7UC4-QZu7cQhg.cjs → chunk-FMBD7UC4-BSSIfQJH.cjs} +1 -1
  28. package/dist/{chunk-FMBD7UC4-Kiqgsjq0.js → chunk-FMBD7UC4-Z_IXsR9N.js} +1 -1
  29. package/dist/chunk-QN33PNHL-Cb-RTcJE.cjs +1 -0
  30. package/dist/{chunk-QN33PNHL-CN23wkk5.js → chunk-QN33PNHL-dvg-wDdg.js} +1 -1
  31. package/dist/{chunk-QZHKN3VN-DRwz5CXr.js → chunk-QZHKN3VN-Chg9twhX.js} +1 -1
  32. package/dist/chunk-QZHKN3VN-DR2ed2kF.cjs +1 -0
  33. package/dist/{chunk-TZMSLE5B-Bwr0045t.js → chunk-TZMSLE5B-CIgbKyu_.js} +1 -1
  34. package/dist/chunk-TZMSLE5B-D3CSz4N0.cjs +1 -0
  35. package/dist/{classDiagram-v2-WZHVMYZB-DxjNGm48.js → classDiagram-2ON5EDUG-CC9xOx_t.js} +2 -2
  36. package/dist/classDiagram-2ON5EDUG-De8Dohf7.cjs +1 -0
  37. package/dist/{classDiagram-2ON5EDUG-DxjNGm48.js → classDiagram-v2-WZHVMYZB-CC9xOx_t.js} +2 -2
  38. package/dist/classDiagram-v2-WZHVMYZB-De8Dohf7.cjs +1 -0
  39. package/dist/{clone-xXnwx9JX.js → clone-BrZZgHT6.js} +1 -1
  40. package/dist/clone-CXoO9ncp.cjs +1 -0
  41. package/dist/cose-bilkent-S5V4N54A-0DFD6rcw.cjs +1 -0
  42. package/dist/{cose-bilkent-S5V4N54A-DwACfiOr.js → cose-bilkent-S5V4N54A-CDs3BBYp.js} +1 -1
  43. package/dist/{custom-C1QhDj-y.js → cursorPlugin-CLM_tkck.js} +2677 -2611
  44. package/dist/{custom-BB9B2BL2.cjs → cursorPlugin-vB5SgZWZ.cjs} +42 -42
  45. package/dist/{dagre-6UL2VRFP-D8jgPXZB.js → dagre-6UL2VRFP-BlMhpFnF.js} +119 -119
  46. package/dist/dagre-6UL2VRFP-DuUBkSw0.cjs +4 -0
  47. package/dist/diagram-PSM6KHXK-CmQ4F2JN.cjs +24 -0
  48. package/dist/{diagram-PSM6KHXK-CVislPq4.js → diagram-PSM6KHXK-CoqSYWPX.js} +53 -53
  49. package/dist/diagram-QEK2KX5R-DqSiNmiR.cjs +43 -0
  50. package/dist/{diagram-QEK2KX5R-JH3FlTXl.js → diagram-QEK2KX5R-FqbXBaqH.js} +20 -20
  51. package/dist/diagram-S2PKOQOG-DYEcRvla.cjs +24 -0
  52. package/dist/{diagram-S2PKOQOG-BgorvXyP.js → diagram-S2PKOQOG-u-4zOtyY.js} +23 -23
  53. package/dist/{erDiagram-Q2GNP2WA-DyFoT35Q.js → erDiagram-Q2GNP2WA-CXn9GtvJ.js} +4 -4
  54. package/dist/{erDiagram-Q2GNP2WA-DjGQSNEd.cjs → erDiagram-Q2GNP2WA-DWDeWLTL.cjs} +1 -1
  55. package/dist/{flowDiagram-NV44I4VS-C5_i8vKb.cjs → flowDiagram-NV44I4VS-C60QhUiz.cjs} +3 -3
  56. package/dist/{flowDiagram-NV44I4VS-Bp-q8kkE.js → flowDiagram-NV44I4VS-CvRJQSEg.js} +14 -14
  57. package/dist/ganttDiagram-LVOFAZNH-DuTD48a9.cjs +267 -0
  58. package/dist/{ganttDiagram-LVOFAZNH-D5BjYh4O.js → ganttDiagram-LVOFAZNH-bsx5CB5d.js} +2 -2
  59. package/dist/{gitGraph-ZV4HHKMB-CMC3ZF2n.js → gitGraph-ZV4HHKMB-BjAayPSR.js} +1 -1
  60. package/dist/{gitGraph-ZV4HHKMB-6xujjpfY.cjs → gitGraph-ZV4HHKMB-kRwxNQnW.cjs} +1 -1
  61. package/dist/{gitGraphDiagram-NY62KEGX-DYmh2kRW.js → gitGraphDiagram-NY62KEGX-DPM59sAG.js} +45 -45
  62. package/dist/gitGraphDiagram-NY62KEGX-DsyQIiCo.cjs +65 -0
  63. package/dist/{graph-D3gnYK1X.js → graph-CilVg985.js} +8 -8
  64. package/dist/graph-T55iHwif.cjs +1 -0
  65. package/dist/{info-63CPKGFF-CEKaKKTJ.cjs → info-63CPKGFF-BKQtOsLZ.cjs} +1 -1
  66. package/dist/info-63CPKGFF-D-_lE7q9.js +5 -0
  67. package/dist/{infoDiagram-F6ZHWCRC-CvuN8Xe0.js → infoDiagram-F6ZHWCRC-B6bTTLIe.js} +2 -2
  68. package/dist/infoDiagram-F6ZHWCRC-Dfs9venE.cjs +2 -0
  69. package/dist/{journeyDiagram-XKPGCS4Q-CMD1dNlA.js → journeyDiagram-XKPGCS4Q-BKPpLUXu.js} +4 -4
  70. package/dist/{journeyDiagram-XKPGCS4Q-NZ7Zwwno.cjs → journeyDiagram-XKPGCS4Q-CkWQvbbC.cjs} +1 -1
  71. package/dist/{kanban-definition-3W4ZIXB7-DdiLRhLn.js → kanban-definition-3W4ZIXB7-CLac2PpK.js} +44 -44
  72. package/dist/{kanban-definition-3W4ZIXB7-DKjyogIQ.cjs → kanban-definition-3W4ZIXB7-DzI_mEvf.cjs} +1 -1
  73. package/dist/{layout-D4zQO2o2.js → layout-DOxjVt30.js} +42 -42
  74. package/dist/layout-LjH1X4pD.cjs +1 -0
  75. package/dist/linear-BZdfTIw6.cjs +1 -0
  76. package/dist/{linear-DsHZ7VTP.js → linear-nITCRSwN.js} +29 -29
  77. package/dist/{mermaid-parser.core-scIqCLhe.js → mermaid-parser.core-BvyFzRhX.js} +205 -205
  78. package/dist/{mermaid-parser.core-DilcMT1B.cjs → mermaid-parser.core-YAHoRfr_.cjs} +2 -2
  79. package/dist/{mindmap-definition-VGOIOE7T-Ei8sTs44.cjs → mindmap-definition-VGOIOE7T-8Pk45I0T.cjs} +2 -2
  80. package/dist/{mindmap-definition-VGOIOE7T-tfBKngxr.js → mindmap-definition-VGOIOE7T-BTlAV786.js} +18 -18
  81. package/dist/mio-previewer.cjs.js +16 -3
  82. package/dist/mio-previewer.css +1 -1
  83. package/dist/mio-previewer.es.js +4524 -27
  84. package/dist/{packet-HUATNLJX-DJA8At21.cjs → packet-HUATNLJX-CNiEJWxQ.cjs} +1 -1
  85. package/dist/{packet-HUATNLJX-Dj4GcjQR.js → packet-HUATNLJX-Cn2d6cbh.js} +1 -1
  86. package/dist/{pie-WTHONI2E-B79PEY8l.cjs → pie-WTHONI2E-CEUZL-GO.cjs} +1 -1
  87. package/dist/pie-WTHONI2E-COsOPmmh.js +5 -0
  88. package/dist/pieDiagram-ADFJNKIX-8mFQx_vI.cjs +30 -0
  89. package/dist/{pieDiagram-ADFJNKIX-CJrJzhlE.js → pieDiagram-ADFJNKIX-CgDIBKwo.js} +39 -39
  90. package/dist/plugins/custom.cjs.js +1 -1
  91. package/dist/plugins/custom.es.js +4 -3
  92. package/dist/plugins/markdown-it.cjs.js +3 -1
  93. package/dist/plugins/markdown-it.es.js +128 -66
  94. package/dist/{quadrantDiagram-AYHSOK5B-UCGi708D.cjs → quadrantDiagram-AYHSOK5B-CExSZwWH.cjs} +1 -1
  95. package/dist/{quadrantDiagram-AYHSOK5B-42v2tFCR.js → quadrantDiagram-AYHSOK5B-TlBxKPiG.js} +2 -2
  96. package/dist/{radar-NJJJXTRR-PPOjSXgX.cjs → radar-NJJJXTRR-D3p36qrE.cjs} +1 -1
  97. package/dist/radar-NJJJXTRR-hKx4VhDB.js +5 -0
  98. package/dist/{requirementDiagram-UZGBJVZJ-CCCu9RXm.cjs → requirementDiagram-UZGBJVZJ-BEcIIQ5C.cjs} +1 -1
  99. package/dist/{requirementDiagram-UZGBJVZJ-m_gma9iH.js → requirementDiagram-UZGBJVZJ-Dl5ijlU7.js} +27 -27
  100. package/dist/sankeyDiagram-TZEHDZUN-_AuPE8rx.cjs +10 -0
  101. package/dist/{sankeyDiagram-TZEHDZUN-eY44cJlE.js → sankeyDiagram-TZEHDZUN-bIR5yy8v.js} +56 -56
  102. package/dist/{sequenceDiagram-WL72ISMW-CBoGDk3g.cjs → sequenceDiagram-WL72ISMW-BG5OjhGw.cjs} +9 -9
  103. package/dist/{sequenceDiagram-WL72ISMW-Chw20cva.js → sequenceDiagram-WL72ISMW-DT79Xx9V.js} +3 -3
  104. package/dist/{stateDiagram-FKZM4ZOC-3yy_Kvnk.js → stateDiagram-FKZM4ZOC-CDfDuz0s.js} +16 -16
  105. package/dist/stateDiagram-FKZM4ZOC-CaZkY5ch.cjs +1 -0
  106. package/dist/{stateDiagram-v2-4FDKWEC3-DELyMBBc.js → stateDiagram-v2-4FDKWEC3-DroYR31A.js} +2 -2
  107. package/dist/stateDiagram-v2-4FDKWEC3-GfIoqgb_.cjs +1 -0
  108. package/dist/{timeline-definition-IT6M3QCI-imDDAjaW.cjs → timeline-definition-IT6M3QCI-BxCHgT34.cjs} +14 -14
  109. package/dist/{timeline-definition-IT6M3QCI-DSbrx1um.js → timeline-definition-IT6M3QCI-CzA493Rr.js} +24 -24
  110. package/dist/{treemap-75Q7IDZK-Bwj_esWs.js → treemap-75Q7IDZK-B7s32RV1.js} +1 -1
  111. package/dist/{treemap-75Q7IDZK-DaCs42wt.cjs → treemap-75Q7IDZK-hLeVdex4.cjs} +1 -1
  112. package/dist/types/entries/plugin-alert.d.ts +1 -1
  113. package/dist/types/entries/plugin-codeblock.d.ts +1 -1
  114. package/dist/types/entries/plugin-emoji.d.ts +1 -1
  115. package/dist/types/entries/plugin-katex.d.ts +1 -1
  116. package/dist/types/entries/plugin-mermaid.d.ts +1 -1
  117. package/dist/types/index.d.ts +4 -2
  118. package/dist/types/plugins/custom/codeBlockPlugin.d.ts +42 -0
  119. package/dist/types/plugins/custom/cursorPlugin.d.ts +42 -0
  120. package/dist/types/plugins/custom/emojiPlugin.d.ts +46 -0
  121. package/dist/types/plugins/custom/index.d.ts +8 -0
  122. package/dist/types/plugins/custom/mermaidPlugin.d.ts +45 -0
  123. package/dist/types/plugins/{AlertPlugin.d.ts → markdown-it/alertPlugin.d.ts} +4 -4
  124. package/dist/types/plugins/markdown-it/index.d.ts +2 -0
  125. package/dist/types/types.d.ts +23 -2
  126. package/dist/{xychartDiagram-PRI3JC2R-CpYE-5EP.js → xychartDiagram-PRI3JC2R-Bb_Kt4vj.js} +29 -29
  127. package/dist/{xychartDiagram-PRI3JC2R-CBaFcd4q.cjs → xychartDiagram-PRI3JC2R-DQLU-dCp.cjs} +1 -1
  128. package/package.json +8 -5
  129. package/dist/AlertPlugin-B74_-nlo.cjs +0 -3
  130. package/dist/AlertPlugin-DUG0ldg_.js +0 -66
  131. package/dist/MdRenderer.vue_vue_type_style_index_0_lang-B26E5SLd.js +0 -4562
  132. package/dist/MdRenderer.vue_vue_type_style_index_0_lang-CT8VuqF6.cjs +0 -16
  133. package/dist/_basePickBy-CWzy8CIJ.cjs +0 -1
  134. package/dist/_baseUniq-DzAGUMoa.cjs +0 -1
  135. package/dist/_plugin-vue_export-helper-BHFhmbuH.cjs +0 -1
  136. package/dist/_plugin-vue_export-helper-CHgC5LLL.js +0 -9
  137. package/dist/arc-BAZxwgoG.cjs +0 -1
  138. package/dist/architectureDiagram-VXUJARFQ-CBEmF4c4.cjs +0 -36
  139. package/dist/channel-CybseUM2.cjs +0 -1
  140. package/dist/chunk-4BX2VUAB-6PxxKRiV.cjs +0 -1
  141. package/dist/chunk-55IACEB6-BaqZa58T.cjs +0 -1
  142. package/dist/chunk-QN33PNHL-NFeQwU1C.cjs +0 -1
  143. package/dist/chunk-QZHKN3VN-Bq63ipAz.cjs +0 -1
  144. package/dist/chunk-TZMSLE5B-Dp8UhykY.cjs +0 -1
  145. package/dist/classDiagram-2ON5EDUG-CWAjzXtp.cjs +0 -1
  146. package/dist/classDiagram-v2-WZHVMYZB-CWAjzXtp.cjs +0 -1
  147. package/dist/clone-W1VAscty.cjs +0 -1
  148. package/dist/cose-bilkent-S5V4N54A-DGtDnCf_.cjs +0 -1
  149. package/dist/dagre-6UL2VRFP-B7OkXNwm.cjs +0 -4
  150. package/dist/diagram-PSM6KHXK-DSJu8JZ6.cjs +0 -24
  151. package/dist/diagram-QEK2KX5R-CoE4joH1.cjs +0 -43
  152. package/dist/diagram-S2PKOQOG-CtcEZ9xO.cjs +0 -24
  153. package/dist/entries/md.cjs.js +0 -1
  154. package/dist/entries/md.es.js +0 -5
  155. package/dist/ganttDiagram-LVOFAZNH-CWj5yJz4.cjs +0 -267
  156. package/dist/gitGraphDiagram-NY62KEGX-Bijj3zxW.cjs +0 -65
  157. package/dist/graph-DFTHBY71.cjs +0 -1
  158. package/dist/info-63CPKGFF-BLYzhYAj.js +0 -5
  159. package/dist/infoDiagram-F6ZHWCRC-CGakmtht.cjs +0 -2
  160. package/dist/layout-BKa4J6c-.cjs +0 -1
  161. package/dist/linear-DZQR44UC.cjs +0 -1
  162. package/dist/pie-WTHONI2E-L2ei45O-.js +0 -5
  163. package/dist/pieDiagram-ADFJNKIX-BIV_iyZL.cjs +0 -30
  164. package/dist/radar-NJJJXTRR-BF1JzV5Y.js +0 -5
  165. package/dist/sankeyDiagram-TZEHDZUN-Dt6lrgnr.cjs +0 -10
  166. package/dist/stateDiagram-FKZM4ZOC-t7WnWKbx.cjs +0 -1
  167. package/dist/stateDiagram-v2-4FDKWEC3-Ct9Imkjc.cjs +0 -1
  168. package/dist/types/entries/md.d.ts +0 -3
  169. package/dist/types/entries/plugins/custom.d.ts +0 -3
  170. package/dist/types/entries/plugins/markdown-it.d.ts +0 -2
  171. package/dist/types/helpers/containerHelpers.d.ts +0 -58
  172. package/dist/types/helpers/index.d.ts +0 -4
  173. package/dist/types/plugins/CodeBlockPlugin.d.ts +0 -9
  174. package/dist/types/plugins/EmojiPlugin.d.ts +0 -11
  175. package/dist/types/plugins/mermaidPlugin.d.ts +0 -13
  176. /package/dist/types/plugins/{katexPlugin.d.ts → markdown-it/katexPlugin.d.ts} +0 -0
@@ -0,0 +1,46 @@
1
+ import type { CustomPlugin } from '../../types';
2
+ /**
3
+ * Emoji 插件配置选项
4
+ */
5
+ export interface EmojiPluginOptions {
6
+ /**
7
+ * 优先级(默认 10)
8
+ */
9
+ priority?: number;
10
+ /**
11
+ * 自定义 emoji 映射表
12
+ * @example { ':custom:': '🎨', ':logo:': '🚀' }
13
+ */
14
+ customEmojis?: Record<string, string>;
15
+ }
16
+ /**
17
+ * emojiPlugin - Emoji 文本替换插件
18
+ *
19
+ * 将文本中的 :emoji_code: 替换为对应的 emoji 符号
20
+ *
21
+ * @param options - 插件配置选项
22
+ * @param options.priority - 优先级(默认 10)
23
+ * @param options.customEmojis - 自定义 emoji 映射表
24
+ * @returns CustomPlugin
25
+ *
26
+ * @example
27
+ * ```ts
28
+ * // 默认配置(内置常用 emoji)
29
+ * { plugin: emojiPlugin }
30
+ *
31
+ * // 添加自定义 emoji
32
+ * {
33
+ * plugin: emojiPlugin,
34
+ * options: {
35
+ * customEmojis: { ':custom:': '🎨', ':logo:': '🚀' }
36
+ * }
37
+ * }
38
+ * ```
39
+ *
40
+ * 内置支持的 emoji:
41
+ * :smile: 😊, :heart: ❤️, :fire: 🔥, :rocket: 🚀, :star: ⭐
42
+ * :thumbsup: 👍, :tada: 🎉, :check: ✅, :cross: ❌, :eyes: 👀
43
+ * :thinking: 🤔, :100: 💯
44
+ */
45
+ export declare function emojiPlugin(options?: EmojiPluginOptions): CustomPlugin;
46
+ export default emojiPlugin;
@@ -0,0 +1,8 @@
1
+ export { codeBlockPlugin } from './codeBlockPlugin';
2
+ export type { CodeBlockPluginOptions } from './codeBlockPlugin';
3
+ export { emojiPlugin } from './emojiPlugin';
4
+ export type { EmojiPluginOptions } from './emojiPlugin';
5
+ export { mermaidPlugin } from './mermaidPlugin';
6
+ export type { MermaidPluginOptions } from './mermaidPlugin';
7
+ export { cursorPlugin } from './cursorPlugin';
8
+ export type { CursorPluginOptions } from './cursorPlugin';
@@ -0,0 +1,45 @@
1
+ /**
2
+ * Mermaid Plugin for RecursiveRenderer
3
+ * Detects code blocks with language="mermaid" and renders them as interactive diagrams
4
+ */
5
+ import type { CustomPlugin } from '../../types';
6
+ /**
7
+ * Mermaid 插件配置选项
8
+ */
9
+ export interface MermaidPluginOptions {
10
+ /**
11
+ * 优先级(默认 80,高于 CodeBlock 以拦截 mermaid 代码块)
12
+ */
13
+ priority?: number;
14
+ /**
15
+ * Mermaid 主题配置
16
+ */
17
+ theme?: 'default' | 'dark' | 'forest' | 'neutral';
18
+ }
19
+ /**
20
+ * Mermaid Plugin
21
+ * Test: matches <pre><code class="language-mermaid">
22
+ * Render: creates MermaidDiagram component with code content
23
+ *
24
+ * @param options - 插件配置选项
25
+ * @param options.priority - 优先级(默认 80)
26
+ * @param options.theme - Mermaid 主题
27
+ * @returns CustomPlugin
28
+ *
29
+ * @example
30
+ * ```ts
31
+ * // 默认配置
32
+ * { plugin: mermaidPlugin }
33
+ *
34
+ * // 自定义优先级和主题
35
+ * {
36
+ * plugin: mermaidPlugin,
37
+ * options: {
38
+ * priority: 90,
39
+ * theme: 'dark'
40
+ * }
41
+ * }
42
+ * ```
43
+ */
44
+ export declare function mermaidPlugin(options?: MermaidPluginOptions): CustomPlugin;
45
+ export default mermaidPlugin;
@@ -1,5 +1,5 @@
1
1
  /**
2
- * AlertPlugin - markdown-it 插件,支持 Alert 警告框
2
+ * alertPlugin - markdown-it 插件,支持 Alert 警告框
3
3
  *
4
4
  * 支持 markdown 语法:
5
5
  * ::: info
@@ -11,8 +11,8 @@
11
11
  * 使用方式:直接放到 markdownItPlugins 里
12
12
  *
13
13
  * @example
14
- * import { AlertPlugin } from './plugins/AlertPlugin'
14
+ * import { alertPlugin } from './plugins/alertPlugin'
15
15
  *
16
- * <MdRenderer :markdownItPlugins="[{ plugin: AlertPlugin }]" />
16
+ * <MdRenderer :markdownItPlugins="[{ plugin: alertPlugin }]" />
17
17
  */
18
- export declare function AlertPlugin(md: any): void;
18
+ export declare function alertPlugin(md: any): void;
@@ -0,0 +1,2 @@
1
+ export { alertPlugin } from './alertPlugin';
2
+ export { katexPlugin } from './katexPlugin';
@@ -33,6 +33,27 @@ export type CustomPlugin = {
33
33
  */
34
34
  render: (node: ASTNode, renderChildren: () => (VNode | string | null)[], h: typeof import('vue').h) => VNode | string | null;
35
35
  };
36
+ /**
37
+ * Custom 插件配置(支持 options)
38
+ *
39
+ * 使用方式:
40
+ * ```ts
41
+ * customPlugins: [
42
+ * { plugin: codeBlockPlugin }, // 无配置
43
+ * { plugin: cursorPlugin, options: { shape: 'line' } } // 带配置
44
+ * ]
45
+ * ```
46
+ */
47
+ export type CustomPluginConfig = {
48
+ /**
49
+ * 插件工厂函数(接收可选配置,返回 CustomPlugin)
50
+ */
51
+ plugin: (options?: any) => CustomPlugin;
52
+ /**
53
+ * 插件选项(可选)
54
+ */
55
+ options?: any;
56
+ };
36
57
  /**
37
58
  * Markdown-it 插件配置
38
59
  */
@@ -71,7 +92,7 @@ export type MdRendererProps = {
71
92
  */
72
93
  markdownItOptions?: Record<string, any>;
73
94
  /**
74
- * Custom 渲染插件
95
+ * Custom 渲染插件配置
75
96
  */
76
- customPlugins?: CustomPlugin[];
97
+ customPlugins?: CustomPluginConfig[];
77
98
  };
@@ -1,7 +1,7 @@
1
- import { _ as a, s as gi, g as xi, q as Xt, p as di, a as fi, b as pi, l as Nt, H as mi, e as yi, y as bi, E as St, D as Yt, F as Ai, K as wi, i as Ci, aF as Si, R as Wt } from "./custom-C1QhDj-y.js";
1
+ import { _ as a, s as gi, g as xi, y as Xt, x as di, b as fi, d as pi, l as Nt, M as mi, i as yi, C as bi, I as St, H as Yt, K as Ai, O as wi, n as Ci, aJ as Si, V as Wt } from "./cursorPlugin-CLM_tkck.js";
2
2
  import { i as _i } from "./init-DjUOC4st.js";
3
3
  import { o as ki } from "./ordinal-DfAQgscy.js";
4
- import { l as zt } from "./linear-DsHZ7VTP.js";
4
+ import { l as zt } from "./linear-nITCRSwN.js";
5
5
  function Ri(e, t, i) {
6
6
  e = +e, t = +t, i = (n = arguments.length) < 2 ? (t = e, e = 0, 1) : n < 3 ? 1 : +i;
7
7
  for (var s = -1, n = Math.max(0, Math.ceil((t - e) / i)) | 0, o = new Array(n); ++s < n; )
@@ -44,8 +44,8 @@ function yt() {
44
44
  }, _i.apply(C(), arguments);
45
45
  }
46
46
  var bt = (function() {
47
- var e = /* @__PURE__ */ a(function(F, h, u, x) {
48
- for (u = u || {}, x = F.length; x--; u[F[x]] = h) ;
47
+ var e = /* @__PURE__ */ a(function(O, h, u, x) {
48
+ for (u = u || {}, x = O.length; x--; u[O[x]] = h) ;
49
49
  return u;
50
50
  }, "o"), t = [1, 10, 12, 14, 16, 18, 19, 21, 23], i = [2, 6], s = [1, 3], n = [1, 5], o = [1, 6], g = [1, 7], m = [1, 5, 10, 12, 14, 16, 18, 19, 21, 23, 34, 35, 36], p = [1, 25], k = [1, 26], v = [1, 28], C = [1, 29], b = [1, 30], E = [1, 31], D = [1, 32], P = [1, 33], I = [1, 34], y = [1, 35], _ = [1, 36], c = [1, 37], W = [1, 43], z = [1, 42], U = [1, 47], X = [1, 50], l = [1, 10, 12, 14, 16, 18, 19, 21, 23, 34, 35, 36], L = [1, 10, 12, 14, 16, 18, 19, 21, 23, 24, 26, 27, 28, 34, 35, 36], S = [1, 10, 12, 14, 16, 18, 19, 21, 23, 24, 26, 27, 28, 34, 35, 36, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50], R = [1, 64], $ = {
51
51
  trace: /* @__PURE__ */ a(function() {
@@ -172,7 +172,7 @@ var bt = (function() {
172
172
  return V = d.pop() || T.lex() || Mt, typeof V != "number" && (V instanceof Array && (d = V, V = d.pop()), V = u.symbols_[V] || V), V;
173
173
  }
174
174
  a(Vt, "lex");
175
- for (var M, H, B, pt, q = {}, ct, O, Bt, ut; ; ) {
175
+ for (var M, H, B, pt, q = {}, ct, F, Bt, ut; ; ) {
176
176
  if (H = x[x.length - 1], this.defaultActions[H] ? B = this.defaultActions[H] : ((M === null || typeof M > "u") && (M = Vt()), B = at[H] && at[H][M]), typeof B > "u" || !B.length || !B[0]) {
177
177
  var mt = "";
178
178
  ut = [];
@@ -195,13 +195,13 @@ Expecting ` + ut.join(", ") + ", got '" + (this.terminals_[M] || M) + "'" : mt =
195
195
  x.push(M), w.push(T.yytext), r.push(T.yylloc), x.push(B[1]), M = null, It = T.yyleng, f = T.yytext, lt = T.yylineno, ft = T.yylloc;
196
196
  break;
197
197
  case 2:
198
- if (O = this.productions_[B[1]][1], q.$ = w[w.length - O], q._$ = {
199
- first_line: r[r.length - (O || 1)].first_line,
198
+ if (F = this.productions_[B[1]][1], q.$ = w[w.length - F], q._$ = {
199
+ first_line: r[r.length - (F || 1)].first_line,
200
200
  last_line: r[r.length - 1].last_line,
201
- first_column: r[r.length - (O || 1)].first_column,
201
+ first_column: r[r.length - (F || 1)].first_column,
202
202
  last_column: r[r.length - 1].last_column
203
203
  }, ci && (q._$.range = [
204
- r[r.length - (O || 1)].range[0],
204
+ r[r.length - (F || 1)].range[0],
205
205
  r[r.length - 1].range[1]
206
206
  ]), pt = this.performAction.apply(q, [
207
207
  f,
@@ -213,7 +213,7 @@ Expecting ` + ut.join(", ") + ", got '" + (this.terminals_[M] || M) + "'" : mt =
213
213
  r
214
214
  ].concat(li)), typeof pt < "u")
215
215
  return pt;
216
- O && (x = x.slice(0, -1 * O * 2), w = w.slice(0, -1 * O), r = r.slice(0, -1 * O)), x.push(this.productions_[B[1]][0]), w.push(q.$), r.push(q._$), Bt = at[x[x.length - 2]][x[x.length - 1]], x.push(Bt);
216
+ F && (x = x.slice(0, -1 * F * 2), w = w.slice(0, -1 * F), r = r.slice(0, -1 * F)), x.push(this.productions_[B[1]][0]), w.push(q.$), r.push(q._$), Bt = at[x[x.length - 2]][x[x.length - 1]], x.push(Bt);
217
217
  break;
218
218
  case 3:
219
219
  return !0;
@@ -222,7 +222,7 @@ Expecting ` + ut.join(", ") + ", got '" + (this.terminals_[M] || M) + "'" : mt =
222
222
  return !0;
223
223
  }, "parse")
224
224
  }, Et = /* @__PURE__ */ (function() {
225
- var F = {
225
+ var O = {
226
226
  EOF: 1,
227
227
  parseError: /* @__PURE__ */ a(function(u, x) {
228
228
  if (this.yy.parser)
@@ -497,7 +497,7 @@ Expecting ` + ut.join(", ") + ", got '" + (this.terminals_[M] || M) + "'" : mt =
497
497
  rules: [/^(?:%%(?!\{)[^\n]*)/i, /^(?:[^\}]%%[^\n]*)/i, /^(?:(\r?\n))/i, /^(?:(\r?\n))/i, /^(?:[\n\r]+)/i, /^(?:%%[^\n]*)/i, /^(?:title\b)/i, /^(?:accTitle\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*\{\s*)/i, /^(?:\{)/i, /^(?:[^\}]*)/i, /^(?:xychart-beta\b)/i, /^(?:xychart\b)/i, /^(?:(?:vertical|horizontal))/i, /^(?:x-axis\b)/i, /^(?:y-axis\b)/i, /^(?:\[)/i, /^(?:-->)/i, /^(?:line\b)/i, /^(?:bar\b)/i, /^(?:\[)/i, /^(?:[+-]?(?:\d+(?:\.\d+)?|\.\d+))/i, /^(?:\])/i, /^(?:(?:`\) \{ this\.pushState\(md_string\); \}\n<md_string>\(\?:\(\?!`"\)\.\)\+ \{ return MD_STR; \}\n<md_string>\(\?:`))/i, /^(?:["])/i, /^(?:["])/i, /^(?:[^"]*)/i, /^(?:\[)/i, /^(?:\])/i, /^(?:[A-Za-z]+)/i, /^(?::)/i, /^(?:\+)/i, /^(?:,)/i, /^(?:=)/i, /^(?:\*)/i, /^(?:#)/i, /^(?:[\_])/i, /^(?:\.)/i, /^(?:&)/i, /^(?:-)/i, /^(?:[0-9]+)/i, /^(?:\s+)/i, /^(?:;)/i, /^(?:$)/i],
498
498
  conditions: { data_inner: { rules: [0, 1, 4, 5, 6, 7, 9, 11, 14, 15, 16, 17, 18, 21, 22, 24, 25, 26, 27, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46], inclusive: !0 }, data: { rules: [0, 1, 3, 4, 5, 6, 7, 9, 11, 14, 15, 16, 17, 18, 21, 22, 23, 26, 27, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46], inclusive: !0 }, axis_band_data: { rules: [0, 1, 4, 5, 6, 7, 9, 11, 14, 15, 16, 17, 18, 21, 22, 25, 26, 27, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46], inclusive: !0 }, axis_data: { rules: [0, 1, 2, 4, 5, 6, 7, 9, 11, 14, 15, 16, 17, 18, 19, 20, 21, 22, 24, 26, 27, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46], inclusive: !0 }, acc_descr_multiline: { rules: [12, 13], inclusive: !1 }, acc_descr: { rules: [10], inclusive: !1 }, acc_title: { rules: [8], inclusive: !1 }, title: { rules: [], inclusive: !1 }, md_string: { rules: [], inclusive: !1 }, string: { rules: [28, 29], inclusive: !1 }, INITIAL: { rules: [0, 1, 4, 5, 6, 7, 9, 11, 14, 15, 16, 17, 18, 21, 22, 26, 27, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46], inclusive: !0 } }
499
499
  };
500
- return F;
500
+ return O;
501
501
  })();
502
502
  $.lexer = Et;
503
503
  function N() {
@@ -539,7 +539,7 @@ var j, Ht = (j = class {
539
539
  }
540
540
  return n.remove(), s;
541
541
  }
542
- }, a(j, "TextDimensionCalculatorWithFont"), j), Ft = 0.7, Ot = 0.2, Q, Ut = (Q = class {
542
+ }, a(j, "TextDimensionCalculatorWithFont"), j), Ot = 0.7, Ft = 0.2, Q, Ut = (Q = class {
543
543
  constructor(t, i, s, n) {
544
544
  this.axisConfig = t, this.title = i, this.textDimensionCalculator = s, this.axisThemeConfig = n, this.boundingRect = { x: 0, y: 0, width: 0, height: 0 }, this.axisPosition = "left", this.showTitle = !1, this.showLabel = !1, this.showTick = !1, this.showAxisLine = !1, this.outerPadding = 0, this.titleTextHeight = 0, this.labelTextHeight = 0, this.range = [0, 10], this.boundingRect = { x: 0, y: 0, width: 0, height: 0 }, this.axisPosition = "left";
545
545
  }
@@ -566,12 +566,12 @@ var j, Ht = (j = class {
566
566
  );
567
567
  }
568
568
  recalculateOuterPaddingToDrawBar() {
569
- Ft * this.getTickDistance() > this.outerPadding * 2 && (this.outerPadding = Math.floor(Ft * this.getTickDistance() / 2)), this.recalculateScale();
569
+ Ot * this.getTickDistance() > this.outerPadding * 2 && (this.outerPadding = Math.floor(Ot * this.getTickDistance() / 2)), this.recalculateScale();
570
570
  }
571
571
  calculateSpaceIfDrawnHorizontally(t) {
572
572
  let i = t.height;
573
573
  if (this.axisConfig.showAxisLine && i > this.axisConfig.axisLineWidth && (i -= this.axisConfig.axisLineWidth, this.showAxisLine = !0), this.axisConfig.showLabel) {
574
- const s = this.getLabelDimension(), n = Ot * t.width;
574
+ const s = this.getLabelDimension(), n = Ft * t.width;
575
575
  this.outerPadding = Math.min(s.width / 2, n);
576
576
  const o = s.height + this.axisConfig.labelPadding * 2;
577
577
  this.labelTextHeight = s.height, o <= i && (i -= o, this.showLabel = !0);
@@ -588,7 +588,7 @@ var j, Ht = (j = class {
588
588
  calculateSpaceIfDrawnVertical(t) {
589
589
  let i = t.width;
590
590
  if (this.axisConfig.showAxisLine && i > this.axisConfig.axisLineWidth && (i -= this.axisConfig.axisLineWidth, this.showAxisLine = !0), this.axisConfig.showLabel) {
591
- const s = this.getLabelDimension(), n = Ot * t.height;
591
+ const s = this.getLabelDimension(), n = Ft * t.height;
592
592
  this.outerPadding = Math.min(s.height / 2, n);
593
593
  const o = s.width + this.axisConfig.labelPadding * 2;
594
594
  o <= i && (i -= o, this.showLabel = !0);
@@ -808,7 +808,7 @@ var j, Ht = (j = class {
808
808
  getScaleValue(t) {
809
809
  return this.scale(t) ?? this.getRange()[0];
810
810
  }
811
- }, a(K, "BandAxis"), K), Z, vi = (Z = class extends Ut {
811
+ }, a(K, "BandAxis"), K), J, vi = (J = class extends Ut {
812
812
  constructor(t, i, s, n, o) {
813
813
  super(t, n, o, i), this.domain = s, this.scale = zt().domain(this.domain).range(this.getRange());
814
814
  }
@@ -822,7 +822,7 @@ var j, Ht = (j = class {
822
822
  getScaleValue(t) {
823
823
  return this.scale(t);
824
824
  }
825
- }, a(Z, "LinearAxis"), Z);
825
+ }, a(J, "LinearAxis"), J);
826
826
  function wt(e, t, i, s) {
827
827
  const n = new Ht(s);
828
828
  return _t(e) ? new Di(
@@ -840,7 +840,7 @@ function wt(e, t, i, s) {
840
840
  );
841
841
  }
842
842
  a(wt, "getAxis");
843
- var J, Pi = (J = class {
843
+ var Z, Pi = (Z = class {
844
844
  constructor(t, i, s, n) {
845
845
  this.textDimensionCalculator = t, this.chartConfig = i, this.chartData = s, this.chartThemeConfig = n, this.boundingRect = {
846
846
  x: 0,
@@ -881,7 +881,7 @@ var J, Pi = (J = class {
881
881
  ]
882
882
  }), t;
883
883
  }
884
- }, a(J, "ChartTitle"), J);
884
+ }, a(Z, "ChartTitle"), Z);
885
885
  function $t(e, t, i, s) {
886
886
  const n = new Ht(s);
887
887
  return new Pi(n, e, t, i);
@@ -1149,18 +1149,18 @@ function vt(e, t) {
1149
1149
  A.xAxis = { type: "linear", title: A.xAxis.title, min: e, max: t }, gt = !0;
1150
1150
  }
1151
1151
  a(vt, "setXAxisRangeData");
1152
- function Zt(e) {
1152
+ function Jt(e) {
1153
1153
  A.xAxis = {
1154
1154
  type: "band",
1155
1155
  title: A.xAxis.title,
1156
1156
  categories: e.map((t) => xt(t.text))
1157
1157
  }, gt = !0;
1158
1158
  }
1159
- a(Zt, "setXAxisBand");
1160
- function Jt(e) {
1159
+ a(Jt, "setXAxisBand");
1160
+ function Zt(e) {
1161
1161
  A.yAxis.title = xt(e.text);
1162
1162
  }
1163
- a(Jt, "setYAxisTitle");
1163
+ a(Zt, "setYAxisTitle");
1164
1164
  function ti(e, t) {
1165
1165
  A.yAxis = { type: "linear", title: A.yAxis.title, min: e, max: t }, kt = !0;
1166
1166
  }
@@ -1247,8 +1247,8 @@ var Bi = /* @__PURE__ */ a(function() {
1247
1247
  setOrientation: Qt,
1248
1248
  setXAxisTitle: Kt,
1249
1249
  setXAxisRangeData: vt,
1250
- setXAxisBand: Zt,
1251
- setYAxisTitle: Jt,
1250
+ setXAxisBand: Jt,
1251
+ setYAxisTitle: Zt,
1252
1252
  setYAxisRangeData: ti,
1253
1253
  setLineData: ei,
1254
1254
  setBarData: si,
@@ -1306,7 +1306,7 @@ var Bi = /* @__PURE__ */ a(function() {
1306
1306
  _.selectAll("text").data(z).enter().append("text").attr("x", (l) => l.data.x + l.data.width - 10).attr("y", (l) => l.data.y + l.data.height / 2).attr("text-anchor", "end").attr("dominant-baseline", "middle").attr("fill", "black").attr("font-size", `${X}px`).text((l) => l.label);
1307
1307
  } else {
1308
1308
  let c = function(l, L, S) {
1309
- const { data: R, label: $ } = l, N = L * $.length * 0.7, F = R.x + R.width / 2, h = F - N / 2, u = F + N / 2, x = h >= R.x && u <= R.x + R.width, d = R.y + S + L <= R.y + R.height;
1309
+ const { data: R, label: $ } = l, N = L * $.length * 0.7, O = R.x + R.width / 2, h = O - N / 2, u = O + N / 2, x = h >= R.x && u <= R.x + R.width, d = R.y + S + L <= R.y + R.height;
1310
1310
  return x && d;
1311
1311
  };
1312
1312
  a(c, "fitsInBar");
@@ -1328,12 +1328,12 @@ var Bi = /* @__PURE__ */ a(function() {
1328
1328
  break;
1329
1329
  }
1330
1330
  }
1331
- }, "draw"), Fi = {
1331
+ }, "draw"), Oi = {
1332
1332
  draw: zi
1333
1333
  }, Hi = {
1334
1334
  parser: Ti,
1335
1335
  db: Wi,
1336
- renderer: Fi
1336
+ renderer: Oi
1337
1337
  };
1338
1338
  export {
1339
1339
  Hi as diagram
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./custom-BB9B2BL2.cjs"),oe=require("./init-CHZsXQcr.cjs"),he=require("./ordinal-CagbB1m8.cjs"),Bt=require("./linear-DZQR44UC.cjs");function le(i,t,e){i=+i,t=+t,e=(a=arguments.length)<2?(t=i,i=0,1):a<3?1:+e;for(var s=-1,a=Math.max(0,Math.ceil((t-i)/e))|0,o=new Array(a);++s<a;)o[s]=i+s*e;return o}function yt(){var i=he.ordinal().unknown(void 0),t=i.domain,e=i.range,s=0,a=1,o,g,m=!1,p=0,k=0,v=.5;delete i.unknown;function w(){var _=t().length,E=a<s,D=E?a:s,P=E?s:a;o=(P-D)/Math.max(1,_-p+k*2),m&&(o=Math.floor(o)),D+=(P-D-o*(_-p))*v,g=o*(1-p),m&&(D=Math.round(D),g=Math.round(g));var M=le(_).map(function(y){return D+o*y});return e(E?M.reverse():M)}return i.domain=function(_){return arguments.length?(t(_),w()):t()},i.range=function(_){return arguments.length?([s,a]=_,s=+s,a=+a,w()):[s,a]},i.rangeRound=function(_){return[s,a]=_,s=+s,a=+a,m=!0,w()},i.bandwidth=function(){return g},i.step=function(){return o},i.round=function(_){return arguments.length?(m=!!_,w()):m},i.padding=function(_){return arguments.length?(p=Math.min(1,k=+_),w()):p},i.paddingInner=function(_){return arguments.length?(p=Math.min(1,_),w()):p},i.paddingOuter=function(_){return arguments.length?(k=+_,w()):k},i.align=function(_){return arguments.length?(v=Math.max(0,Math.min(1,_)),w()):v},i.copy=function(){return yt(t(),[s,a]).round(m).paddingInner(p).paddingOuter(k).align(v)},oe.initRange.apply(w(),arguments)}var _t=(function(){var i=n.__name(function(O,h,u,x){for(u=u||{},x=O.length;x--;u[O[x]]=h);return u},"o"),t=[1,10,12,14,16,18,19,21,23],e=[2,6],s=[1,3],a=[1,5],o=[1,6],g=[1,7],m=[1,5,10,12,14,16,18,19,21,23,34,35,36],p=[1,25],k=[1,26],v=[1,28],w=[1,29],_=[1,30],E=[1,31],D=[1,32],P=[1,33],M=[1,34],y=[1,35],S=[1,36],c=[1,37],W=[1,43],z=[1,42],U=[1,47],X=[1,50],l=[1,10,12,14,16,18,19,21,23,34,35,36],L=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36],C=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36,41,42,43,44,45,46,47,48,49,50],T=[1,64],$={trace:n.__name(function(){},"trace"),yy:{},symbols_:{error:2,start:3,eol:4,XYCHART:5,chartConfig:6,document:7,CHART_ORIENTATION:8,statement:9,title:10,text:11,X_AXIS:12,parseXAxis:13,Y_AXIS:14,parseYAxis:15,LINE:16,plotData:17,BAR:18,acc_title:19,acc_title_value:20,acc_descr:21,acc_descr_value:22,acc_descr_multiline_value:23,SQUARE_BRACES_START:24,commaSeparatedNumbers:25,SQUARE_BRACES_END:26,NUMBER_WITH_DECIMAL:27,COMMA:28,xAxisData:29,bandData:30,ARROW_DELIMITER:31,commaSeparatedTexts:32,yAxisData:33,NEWLINE:34,SEMI:35,EOF:36,alphaNum:37,STR:38,MD_STR:39,alphaNumToken:40,AMP:41,NUM:42,ALPHA:43,PLUS:44,EQUALS:45,MULT:46,DOT:47,BRKT:48,MINUS:49,UNDERSCORE:50,$accept:0,$end:1},terminals_:{2:"error",5:"XYCHART",8:"CHART_ORIENTATION",10:"title",12:"X_AXIS",14:"Y_AXIS",16:"LINE",18:"BAR",19:"acc_title",20:"acc_title_value",21:"acc_descr",22:"acc_descr_value",23:"acc_descr_multiline_value",24:"SQUARE_BRACES_START",26:"SQUARE_BRACES_END",27:"NUMBER_WITH_DECIMAL",28:"COMMA",31:"ARROW_DELIMITER",34:"NEWLINE",35:"SEMI",36:"EOF",38:"STR",39:"MD_STR",41:"AMP",42:"NUM",43:"ALPHA",44:"PLUS",45:"EQUALS",46:"MULT",47:"DOT",48:"BRKT",49:"MINUS",50:"UNDERSCORE"},productions_:[0,[3,2],[3,3],[3,2],[3,1],[6,1],[7,0],[7,2],[9,2],[9,2],[9,2],[9,2],[9,2],[9,3],[9,2],[9,3],[9,2],[9,2],[9,1],[17,3],[25,3],[25,1],[13,1],[13,2],[13,1],[29,1],[29,3],[30,3],[32,3],[32,1],[15,1],[15,2],[15,1],[33,3],[4,1],[4,1],[4,1],[11,1],[11,1],[11,1],[37,1],[37,2],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1]],performAction:n.__name(function(h,u,x,d,A,r,at){var f=r.length-1;switch(A){case 5:d.setOrientation(r[f]);break;case 9:d.setDiagramTitle(r[f].text.trim());break;case 12:d.setLineData({text:"",type:"text"},r[f]);break;case 13:d.setLineData(r[f-1],r[f]);break;case 14:d.setBarData({text:"",type:"text"},r[f]);break;case 15:d.setBarData(r[f-1],r[f]);break;case 16:this.$=r[f].trim(),d.setAccTitle(this.$);break;case 17:case 18:this.$=r[f].trim(),d.setAccDescription(this.$);break;case 19:this.$=r[f-1];break;case 20:this.$=[Number(r[f-2]),...r[f]];break;case 21:this.$=[Number(r[f])];break;case 22:d.setXAxisTitle(r[f]);break;case 23:d.setXAxisTitle(r[f-1]);break;case 24:d.setXAxisTitle({type:"text",text:""});break;case 25:d.setXAxisBand(r[f]);break;case 26:d.setXAxisRangeData(Number(r[f-2]),Number(r[f]));break;case 27:this.$=r[f-1];break;case 28:this.$=[r[f-2],...r[f]];break;case 29:this.$=[r[f]];break;case 30:d.setYAxisTitle(r[f]);break;case 31:d.setYAxisTitle(r[f-1]);break;case 32:d.setYAxisTitle({type:"text",text:""});break;case 33:d.setYAxisRangeData(Number(r[f-2]),Number(r[f]));break;case 37:this.$={text:r[f],type:"text"};break;case 38:this.$={text:r[f],type:"text"};break;case 39:this.$={text:r[f],type:"markdown"};break;case 40:this.$=r[f];break;case 41:this.$=r[f-1]+""+r[f];break}},"anonymous"),table:[i(t,e,{3:1,4:2,7:4,5:s,34:a,35:o,36:g}),{1:[3]},i(t,e,{4:2,7:4,3:8,5:s,34:a,35:o,36:g}),i(t,e,{4:2,7:4,6:9,3:10,5:s,8:[1,11],34:a,35:o,36:g}),{1:[2,4],9:12,10:[1,13],12:[1,14],14:[1,15],16:[1,16],18:[1,17],19:[1,18],21:[1,19],23:[1,20]},i(m,[2,34]),i(m,[2,35]),i(m,[2,36]),{1:[2,1]},i(t,e,{4:2,7:4,3:21,5:s,34:a,35:o,36:g}),{1:[2,3]},i(m,[2,5]),i(t,[2,7],{4:22,34:a,35:o,36:g}),{11:23,37:24,38:p,39:k,40:27,41:v,42:w,43:_,44:E,45:D,46:P,47:M,48:y,49:S,50:c},{11:39,13:38,24:W,27:z,29:40,30:41,37:24,38:p,39:k,40:27,41:v,42:w,43:_,44:E,45:D,46:P,47:M,48:y,49:S,50:c},{11:45,15:44,27:U,33:46,37:24,38:p,39:k,40:27,41:v,42:w,43:_,44:E,45:D,46:P,47:M,48:y,49:S,50:c},{11:49,17:48,24:X,37:24,38:p,39:k,40:27,41:v,42:w,43:_,44:E,45:D,46:P,47:M,48:y,49:S,50:c},{11:52,17:51,24:X,37:24,38:p,39:k,40:27,41:v,42:w,43:_,44:E,45:D,46:P,47:M,48:y,49:S,50:c},{20:[1,53]},{22:[1,54]},i(l,[2,18]),{1:[2,2]},i(l,[2,8]),i(l,[2,9]),i(L,[2,37],{40:55,41:v,42:w,43:_,44:E,45:D,46:P,47:M,48:y,49:S,50:c}),i(L,[2,38]),i(L,[2,39]),i(C,[2,40]),i(C,[2,42]),i(C,[2,43]),i(C,[2,44]),i(C,[2,45]),i(C,[2,46]),i(C,[2,47]),i(C,[2,48]),i(C,[2,49]),i(C,[2,50]),i(C,[2,51]),i(l,[2,10]),i(l,[2,22],{30:41,29:56,24:W,27:z}),i(l,[2,24]),i(l,[2,25]),{31:[1,57]},{11:59,32:58,37:24,38:p,39:k,40:27,41:v,42:w,43:_,44:E,45:D,46:P,47:M,48:y,49:S,50:c},i(l,[2,11]),i(l,[2,30],{33:60,27:U}),i(l,[2,32]),{31:[1,61]},i(l,[2,12]),{17:62,24:X},{25:63,27:T},i(l,[2,14]),{17:65,24:X},i(l,[2,16]),i(l,[2,17]),i(C,[2,41]),i(l,[2,23]),{27:[1,66]},{26:[1,67]},{26:[2,29],28:[1,68]},i(l,[2,31]),{27:[1,69]},i(l,[2,13]),{26:[1,70]},{26:[2,21],28:[1,71]},i(l,[2,15]),i(l,[2,26]),i(l,[2,27]),{11:59,32:72,37:24,38:p,39:k,40:27,41:v,42:w,43:_,44:E,45:D,46:P,47:M,48:y,49:S,50:c},i(l,[2,33]),i(l,[2,19]),{25:73,27:T},{26:[2,28]},{26:[2,20]}],defaultActions:{8:[2,1],10:[2,3],21:[2,2],72:[2,28],73:[2,20]},parseError:n.__name(function(h,u){if(u.recoverable)this.trace(h);else{var x=new Error(h);throw x.hash=u,x}},"parseError"),parse:n.__name(function(h){var u=this,x=[0],d=[],A=[null],r=[],at=this.table,f="",lt=0,Et=0,se=2,Mt=1,ne=r.slice.call(arguments,1),R=Object.create(this.lexer),Y={yy:{}};for(var dt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,dt)&&(Y.yy[dt]=this.yy[dt]);R.setInput(h,Y.yy),Y.yy.lexer=R,Y.yy.parser=this,typeof R.yylloc>"u"&&(R.yylloc={});var ft=R.yylloc;r.push(ft);var ae=R.options&&R.options.ranges;typeof Y.yy.parseError=="function"?this.parseError=Y.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function re(V){x.length=x.length-2*V,A.length=A.length-V,r.length=r.length-V}n.__name(re,"popStack");function It(){var V;return V=d.pop()||R.lex()||Mt,typeof V!="number"&&(V instanceof Array&&(d=V,V=d.pop()),V=u.symbols_[V]||V),V}n.__name(It,"lex");for(var I,H,B,pt,q={},ct,F,Vt,ut;;){if(H=x[x.length-1],this.defaultActions[H]?B=this.defaultActions[H]:((I===null||typeof I>"u")&&(I=It()),B=at[H]&&at[H][I]),typeof B>"u"||!B.length||!B[0]){var mt="";ut=[];for(ct in at[H])this.terminals_[ct]&&ct>se&&ut.push("'"+this.terminals_[ct]+"'");R.showPosition?mt="Parse error on line "+(lt+1)+`:
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./cursorPlugin-vB5SgZWZ.cjs"),oe=require("./init-CHZsXQcr.cjs"),he=require("./ordinal-CagbB1m8.cjs"),Bt=require("./linear-BZdfTIw6.cjs");function le(i,t,e){i=+i,t=+t,e=(a=arguments.length)<2?(t=i,i=0,1):a<3?1:+e;for(var s=-1,a=Math.max(0,Math.ceil((t-i)/e))|0,o=new Array(a);++s<a;)o[s]=i+s*e;return o}function yt(){var i=he.ordinal().unknown(void 0),t=i.domain,e=i.range,s=0,a=1,o,g,m=!1,p=0,k=0,v=.5;delete i.unknown;function w(){var _=t().length,E=a<s,D=E?a:s,P=E?s:a;o=(P-D)/Math.max(1,_-p+k*2),m&&(o=Math.floor(o)),D+=(P-D-o*(_-p))*v,g=o*(1-p),m&&(D=Math.round(D),g=Math.round(g));var M=le(_).map(function(y){return D+o*y});return e(E?M.reverse():M)}return i.domain=function(_){return arguments.length?(t(_),w()):t()},i.range=function(_){return arguments.length?([s,a]=_,s=+s,a=+a,w()):[s,a]},i.rangeRound=function(_){return[s,a]=_,s=+s,a=+a,m=!0,w()},i.bandwidth=function(){return g},i.step=function(){return o},i.round=function(_){return arguments.length?(m=!!_,w()):m},i.padding=function(_){return arguments.length?(p=Math.min(1,k=+_),w()):p},i.paddingInner=function(_){return arguments.length?(p=Math.min(1,_),w()):p},i.paddingOuter=function(_){return arguments.length?(k=+_,w()):k},i.align=function(_){return arguments.length?(v=Math.max(0,Math.min(1,_)),w()):v},i.copy=function(){return yt(t(),[s,a]).round(m).paddingInner(p).paddingOuter(k).align(v)},oe.initRange.apply(w(),arguments)}var _t=(function(){var i=n.__name(function(O,h,u,x){for(u=u||{},x=O.length;x--;u[O[x]]=h);return u},"o"),t=[1,10,12,14,16,18,19,21,23],e=[2,6],s=[1,3],a=[1,5],o=[1,6],g=[1,7],m=[1,5,10,12,14,16,18,19,21,23,34,35,36],p=[1,25],k=[1,26],v=[1,28],w=[1,29],_=[1,30],E=[1,31],D=[1,32],P=[1,33],M=[1,34],y=[1,35],S=[1,36],c=[1,37],W=[1,43],z=[1,42],U=[1,47],X=[1,50],l=[1,10,12,14,16,18,19,21,23,34,35,36],L=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36],C=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36,41,42,43,44,45,46,47,48,49,50],T=[1,64],$={trace:n.__name(function(){},"trace"),yy:{},symbols_:{error:2,start:3,eol:4,XYCHART:5,chartConfig:6,document:7,CHART_ORIENTATION:8,statement:9,title:10,text:11,X_AXIS:12,parseXAxis:13,Y_AXIS:14,parseYAxis:15,LINE:16,plotData:17,BAR:18,acc_title:19,acc_title_value:20,acc_descr:21,acc_descr_value:22,acc_descr_multiline_value:23,SQUARE_BRACES_START:24,commaSeparatedNumbers:25,SQUARE_BRACES_END:26,NUMBER_WITH_DECIMAL:27,COMMA:28,xAxisData:29,bandData:30,ARROW_DELIMITER:31,commaSeparatedTexts:32,yAxisData:33,NEWLINE:34,SEMI:35,EOF:36,alphaNum:37,STR:38,MD_STR:39,alphaNumToken:40,AMP:41,NUM:42,ALPHA:43,PLUS:44,EQUALS:45,MULT:46,DOT:47,BRKT:48,MINUS:49,UNDERSCORE:50,$accept:0,$end:1},terminals_:{2:"error",5:"XYCHART",8:"CHART_ORIENTATION",10:"title",12:"X_AXIS",14:"Y_AXIS",16:"LINE",18:"BAR",19:"acc_title",20:"acc_title_value",21:"acc_descr",22:"acc_descr_value",23:"acc_descr_multiline_value",24:"SQUARE_BRACES_START",26:"SQUARE_BRACES_END",27:"NUMBER_WITH_DECIMAL",28:"COMMA",31:"ARROW_DELIMITER",34:"NEWLINE",35:"SEMI",36:"EOF",38:"STR",39:"MD_STR",41:"AMP",42:"NUM",43:"ALPHA",44:"PLUS",45:"EQUALS",46:"MULT",47:"DOT",48:"BRKT",49:"MINUS",50:"UNDERSCORE"},productions_:[0,[3,2],[3,3],[3,2],[3,1],[6,1],[7,0],[7,2],[9,2],[9,2],[9,2],[9,2],[9,2],[9,3],[9,2],[9,3],[9,2],[9,2],[9,1],[17,3],[25,3],[25,1],[13,1],[13,2],[13,1],[29,1],[29,3],[30,3],[32,3],[32,1],[15,1],[15,2],[15,1],[33,3],[4,1],[4,1],[4,1],[11,1],[11,1],[11,1],[37,1],[37,2],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1]],performAction:n.__name(function(h,u,x,d,A,r,at){var f=r.length-1;switch(A){case 5:d.setOrientation(r[f]);break;case 9:d.setDiagramTitle(r[f].text.trim());break;case 12:d.setLineData({text:"",type:"text"},r[f]);break;case 13:d.setLineData(r[f-1],r[f]);break;case 14:d.setBarData({text:"",type:"text"},r[f]);break;case 15:d.setBarData(r[f-1],r[f]);break;case 16:this.$=r[f].trim(),d.setAccTitle(this.$);break;case 17:case 18:this.$=r[f].trim(),d.setAccDescription(this.$);break;case 19:this.$=r[f-1];break;case 20:this.$=[Number(r[f-2]),...r[f]];break;case 21:this.$=[Number(r[f])];break;case 22:d.setXAxisTitle(r[f]);break;case 23:d.setXAxisTitle(r[f-1]);break;case 24:d.setXAxisTitle({type:"text",text:""});break;case 25:d.setXAxisBand(r[f]);break;case 26:d.setXAxisRangeData(Number(r[f-2]),Number(r[f]));break;case 27:this.$=r[f-1];break;case 28:this.$=[r[f-2],...r[f]];break;case 29:this.$=[r[f]];break;case 30:d.setYAxisTitle(r[f]);break;case 31:d.setYAxisTitle(r[f-1]);break;case 32:d.setYAxisTitle({type:"text",text:""});break;case 33:d.setYAxisRangeData(Number(r[f-2]),Number(r[f]));break;case 37:this.$={text:r[f],type:"text"};break;case 38:this.$={text:r[f],type:"text"};break;case 39:this.$={text:r[f],type:"markdown"};break;case 40:this.$=r[f];break;case 41:this.$=r[f-1]+""+r[f];break}},"anonymous"),table:[i(t,e,{3:1,4:2,7:4,5:s,34:a,35:o,36:g}),{1:[3]},i(t,e,{4:2,7:4,3:8,5:s,34:a,35:o,36:g}),i(t,e,{4:2,7:4,6:9,3:10,5:s,8:[1,11],34:a,35:o,36:g}),{1:[2,4],9:12,10:[1,13],12:[1,14],14:[1,15],16:[1,16],18:[1,17],19:[1,18],21:[1,19],23:[1,20]},i(m,[2,34]),i(m,[2,35]),i(m,[2,36]),{1:[2,1]},i(t,e,{4:2,7:4,3:21,5:s,34:a,35:o,36:g}),{1:[2,3]},i(m,[2,5]),i(t,[2,7],{4:22,34:a,35:o,36:g}),{11:23,37:24,38:p,39:k,40:27,41:v,42:w,43:_,44:E,45:D,46:P,47:M,48:y,49:S,50:c},{11:39,13:38,24:W,27:z,29:40,30:41,37:24,38:p,39:k,40:27,41:v,42:w,43:_,44:E,45:D,46:P,47:M,48:y,49:S,50:c},{11:45,15:44,27:U,33:46,37:24,38:p,39:k,40:27,41:v,42:w,43:_,44:E,45:D,46:P,47:M,48:y,49:S,50:c},{11:49,17:48,24:X,37:24,38:p,39:k,40:27,41:v,42:w,43:_,44:E,45:D,46:P,47:M,48:y,49:S,50:c},{11:52,17:51,24:X,37:24,38:p,39:k,40:27,41:v,42:w,43:_,44:E,45:D,46:P,47:M,48:y,49:S,50:c},{20:[1,53]},{22:[1,54]},i(l,[2,18]),{1:[2,2]},i(l,[2,8]),i(l,[2,9]),i(L,[2,37],{40:55,41:v,42:w,43:_,44:E,45:D,46:P,47:M,48:y,49:S,50:c}),i(L,[2,38]),i(L,[2,39]),i(C,[2,40]),i(C,[2,42]),i(C,[2,43]),i(C,[2,44]),i(C,[2,45]),i(C,[2,46]),i(C,[2,47]),i(C,[2,48]),i(C,[2,49]),i(C,[2,50]),i(C,[2,51]),i(l,[2,10]),i(l,[2,22],{30:41,29:56,24:W,27:z}),i(l,[2,24]),i(l,[2,25]),{31:[1,57]},{11:59,32:58,37:24,38:p,39:k,40:27,41:v,42:w,43:_,44:E,45:D,46:P,47:M,48:y,49:S,50:c},i(l,[2,11]),i(l,[2,30],{33:60,27:U}),i(l,[2,32]),{31:[1,61]},i(l,[2,12]),{17:62,24:X},{25:63,27:T},i(l,[2,14]),{17:65,24:X},i(l,[2,16]),i(l,[2,17]),i(C,[2,41]),i(l,[2,23]),{27:[1,66]},{26:[1,67]},{26:[2,29],28:[1,68]},i(l,[2,31]),{27:[1,69]},i(l,[2,13]),{26:[1,70]},{26:[2,21],28:[1,71]},i(l,[2,15]),i(l,[2,26]),i(l,[2,27]),{11:59,32:72,37:24,38:p,39:k,40:27,41:v,42:w,43:_,44:E,45:D,46:P,47:M,48:y,49:S,50:c},i(l,[2,33]),i(l,[2,19]),{25:73,27:T},{26:[2,28]},{26:[2,20]}],defaultActions:{8:[2,1],10:[2,3],21:[2,2],72:[2,28],73:[2,20]},parseError:n.__name(function(h,u){if(u.recoverable)this.trace(h);else{var x=new Error(h);throw x.hash=u,x}},"parseError"),parse:n.__name(function(h){var u=this,x=[0],d=[],A=[null],r=[],at=this.table,f="",lt=0,Et=0,se=2,Mt=1,ne=r.slice.call(arguments,1),R=Object.create(this.lexer),Y={yy:{}};for(var dt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,dt)&&(Y.yy[dt]=this.yy[dt]);R.setInput(h,Y.yy),Y.yy.lexer=R,Y.yy.parser=this,typeof R.yylloc>"u"&&(R.yylloc={});var ft=R.yylloc;r.push(ft);var ae=R.options&&R.options.ranges;typeof Y.yy.parseError=="function"?this.parseError=Y.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function re(V){x.length=x.length-2*V,A.length=A.length-V,r.length=r.length-V}n.__name(re,"popStack");function It(){var V;return V=d.pop()||R.lex()||Mt,typeof V!="number"&&(V instanceof Array&&(d=V,V=d.pop()),V=u.symbols_[V]||V),V}n.__name(It,"lex");for(var I,H,B,pt,q={},ct,F,Vt,ut;;){if(H=x[x.length-1],this.defaultActions[H]?B=this.defaultActions[H]:((I===null||typeof I>"u")&&(I=It()),B=at[H]&&at[H][I]),typeof B>"u"||!B.length||!B[0]){var mt="";ut=[];for(ct in at[H])this.terminals_[ct]&&ct>se&&ut.push("'"+this.terminals_[ct]+"'");R.showPosition?mt="Parse error on line "+(lt+1)+`:
2
2
  `+R.showPosition()+`
3
3
  Expecting `+ut.join(", ")+", got '"+(this.terminals_[I]||I)+"'":mt="Parse error on line "+(lt+1)+": Unexpected "+(I==Mt?"end of input":"'"+(this.terminals_[I]||I)+"'"),this.parseError(mt,{text:R.match,token:this.terminals_[I]||I,line:R.yylineno,loc:ft,expected:ut})}if(B[0]instanceof Array&&B.length>1)throw new Error("Parse Error: multiple actions possible at state: "+H+", token: "+I);switch(B[0]){case 1:x.push(I),A.push(R.yytext),r.push(R.yylloc),x.push(B[1]),I=null,Et=R.yyleng,f=R.yytext,lt=R.yylineno,ft=R.yylloc;break;case 2:if(F=this.productions_[B[1]][1],q.$=A[A.length-F],q._$={first_line:r[r.length-(F||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(F||1)].first_column,last_column:r[r.length-1].last_column},ae&&(q._$.range=[r[r.length-(F||1)].range[0],r[r.length-1].range[1]]),pt=this.performAction.apply(q,[f,Et,lt,Y.yy,B[1],A,r].concat(ne)),typeof pt<"u")return pt;F&&(x=x.slice(0,-1*F*2),A=A.slice(0,-1*F),r=r.slice(0,-1*F)),x.push(this.productions_[B[1]][0]),A.push(q.$),r.push(q._$),Vt=at[x[x.length-2]][x[x.length-1]],x.push(Vt);break;case 3:return!0}}return!0},"parse")},Lt=(function(){var O={EOF:1,parseError:n.__name(function(u,x){if(this.yy.parser)this.yy.parser.parseError(u,x);else throw new Error(u)},"parseError"),setInput:n.__name(function(h,u){return this.yy=u||this.yy||{},this._input=h,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:n.__name(function(){var h=this._input[0];this.yytext+=h,this.yyleng++,this.offset++,this.match+=h,this.matched+=h;var u=h.match(/(?:\r\n?|\n).*/g);return u?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),h},"input"),unput:n.__name(function(h){var u=h.length,x=h.split(/(?:\r\n?|\n)/g);this._input=h+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-u),this.offset-=u;var d=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),x.length-1&&(this.yylineno-=x.length-1);var A=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:x?(x.length===d.length?this.yylloc.first_column:0)+d[d.length-x.length].length-x[0].length:this.yylloc.first_column-u},this.options.ranges&&(this.yylloc.range=[A[0],A[0]+this.yyleng-u]),this.yyleng=this.yytext.length,this},"unput"),more:n.__name(function(){return this._more=!0,this},"more"),reject:n.__name(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
4
4
  `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:n.__name(function(h){this.unput(this.match.slice(h))},"less"),pastInput:n.__name(function(){var h=this.matched.substr(0,this.matched.length-this.match.length);return(h.length>20?"...":"")+h.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:n.__name(function(){var h=this.match;return h.length<20&&(h+=this._input.substr(0,20-h.length)),(h.substr(0,20)+(h.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:n.__name(function(){var h=this.pastInput(),u=new Array(h.length+1).join("-");return h+this.upcomingInput()+`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mio-previewer",
3
- "version": "0.1.6",
3
+ "version": "0.1.8",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "engines": {
@@ -50,14 +50,17 @@
50
50
  },
51
51
  "exports": {
52
52
  ".": {
53
- "import": "./dist/entries/md.es.js",
54
- "require": "./dist/entries/md.cjs.js"
53
+ "types": "./dist/types/src/index.d.ts",
54
+ "import": "./dist/mio-previewer.es.js",
55
+ "require": "./dist/mio-previewer.cjs.js"
55
56
  },
56
57
  "./plugins/custom": {
58
+ "types": "./dist/types/src/plugins/custom/index.d.ts",
57
59
  "import": "./dist/plugins/custom.es.js",
58
60
  "require": "./dist/plugins/custom.cjs.js"
59
61
  },
60
62
  "./plugins/markdown-it": {
63
+ "types": "./dist/types/src/plugins/markdown-it/index.d.ts",
61
64
  "import": "./dist/plugins/markdown-it.es.js",
62
65
  "require": "./dist/plugins/markdown-it.cjs.js"
63
66
  },
@@ -67,10 +70,10 @@
67
70
  "typesVersions": {
68
71
  "*": {
69
72
  "plugins/custom": [
70
- "dist/types/src/entries/plugins/custom.d.ts"
73
+ "dist/types/src/plugins/custom/index.d.ts"
71
74
  ],
72
75
  "plugins/markdown-it": [
73
- "dist/types/src/entries/plugins/markdown-it.d.ts"
76
+ "dist/types/src/plugins/markdown-it/index.d.ts"
74
77
  ],
75
78
  "*": [
76
79
  "dist/types/src/*"
@@ -1,3 +0,0 @@
1
- "use strict";function $(a,i,l){function t(r){return r.trim().split(" ",2)[0]===i}function d(r,c,_,b,e){return r[c].nesting===1&&r[c].attrJoin("class",i),e.renderToken(r,c,_,b,e)}l=l||{};const p=3,u=l.marker||":",h=u.charCodeAt(0),f=u.length,A=l.validate||t,m=l.render||d;function C(r,c,_,b){let e,g=!1,n=r.bMarks[c]+r.tShift[c],s=r.eMarks[c];if(h!==r.src.charCodeAt(n))return!1;for(e=n+1;e<=s&&u[(e-n)%f]===r.src[e];e++);const x=Math.floor((e-n)/f);if(x<p)return!1;e-=(e-n)%f;const M=r.src.slice(n,e),v=r.src.slice(e,s);if(!A(v,M))return!1;if(b)return!0;let o=c;for(;o++,!(o>=_||(n=r.bMarks[o]+r.tShift[o],s=r.eMarks[o],n<s&&r.sCount[o]<r.blkIndent));)if(h===r.src.charCodeAt(n)&&!(r.sCount[o]-r.blkIndent>=4)){for(e=n+1;e<=s&&u[(e-n)%f]===r.src[e];e++);if(!(Math.floor((e-n)/f)<x)&&(e-=(e-n)%f,e=r.skipSpaces(e),!(e<s))){g=!0;break}}const T=r.parentType,S=r.lineMax;r.parentType="container",r.lineMax=o;const k=r.push("container_"+i+"_open","div",1);k.markup=M,k.block=!0,k.info=v,k.map=[c,o],r.md.block.tokenize(r,c+1,o);const y=r.push("container_"+i+"_close","div",-1);return y.markup=r.src.slice(n,e),y.block=!0,r.parentType=T,r.lineMax=S,r.line=o+(g?1:0),!0}a.block.ruler.before("fence","container_"+i,C,{alt:["paragraph","reference","blockquote","list"]}),a.renderer.rules["container_"+i+"_open"]=m,a.renderer.rules["container_"+i+"_close"]=m}function w(a){const i=["info","warning","error","success"],l={info:"#0ea5e9",warning:"#f59e0b",error:"#ef4444",success:"#10b981"};i.forEach(t=>{a.use($,t,{render:(d,p)=>{const u=l[t];return d[p].nesting===1?`<div class="custom-alert alert-${t}" style="padding: 12px 16px; border-left: 4px solid ${u}; background-color: ${u}15; margin: 8px 0; border-radius: 4px; font-family: system-ui, -apple-system, sans-serif;">
2
- `:`</div>
3
- `}})})}exports.AlertPlugin=w;
@@ -1,66 +0,0 @@
1
- function $(s, i, l) {
2
- function t(r) {
3
- return r.trim().split(" ", 2)[0] === i;
4
- }
5
- function p(r, c, _, b, e) {
6
- return r[c].nesting === 1 && r[c].attrJoin("class", i), e.renderToken(r, c, _, b, e);
7
- }
8
- l = l || {};
9
- const d = 3, u = l.marker || ":", h = u.charCodeAt(0), f = u.length, A = l.validate || t, m = l.render || p;
10
- function C(r, c, _, b) {
11
- let e, g = !1, n = r.bMarks[c] + r.tShift[c], a = r.eMarks[c];
12
- if (h !== r.src.charCodeAt(n))
13
- return !1;
14
- for (e = n + 1; e <= a && u[(e - n) % f] === r.src[e]; e++)
15
- ;
16
- const x = Math.floor((e - n) / f);
17
- if (x < d)
18
- return !1;
19
- e -= (e - n) % f;
20
- const M = r.src.slice(n, e), v = r.src.slice(e, a);
21
- if (!A(v, M))
22
- return !1;
23
- if (b)
24
- return !0;
25
- let o = c;
26
- for (; o++, !(o >= _ || (n = r.bMarks[o] + r.tShift[o], a = r.eMarks[o], n < a && r.sCount[o] < r.blkIndent)); )
27
- if (h === r.src.charCodeAt(n) && !(r.sCount[o] - r.blkIndent >= 4)) {
28
- for (e = n + 1; e <= a && u[(e - n) % f] === r.src[e]; e++)
29
- ;
30
- if (!(Math.floor((e - n) / f) < x) && (e -= (e - n) % f, e = r.skipSpaces(e), !(e < a))) {
31
- g = !0;
32
- break;
33
- }
34
- }
35
- const T = r.parentType, S = r.lineMax;
36
- r.parentType = "container", r.lineMax = o;
37
- const k = r.push("container_" + i + "_open", "div", 1);
38
- k.markup = M, k.block = !0, k.info = v, k.map = [c, o], r.md.block.tokenize(r, c + 1, o);
39
- const y = r.push("container_" + i + "_close", "div", -1);
40
- return y.markup = r.src.slice(n, e), y.block = !0, r.parentType = T, r.lineMax = S, r.line = o + (g ? 1 : 0), !0;
41
- }
42
- s.block.ruler.before("fence", "container_" + i, C, {
43
- alt: ["paragraph", "reference", "blockquote", "list"]
44
- }), s.renderer.rules["container_" + i + "_open"] = m, s.renderer.rules["container_" + i + "_close"] = m;
45
- }
46
- function w(s) {
47
- const i = ["info", "warning", "error", "success"], l = {
48
- info: "#0ea5e9",
49
- warning: "#f59e0b",
50
- error: "#ef4444",
51
- success: "#10b981"
52
- };
53
- i.forEach((t) => {
54
- s.use($, t, {
55
- render: (p, d) => {
56
- const u = l[t];
57
- return p[d].nesting === 1 ? `<div class="custom-alert alert-${t}" style="padding: 12px 16px; border-left: 4px solid ${u}; background-color: ${u}15; margin: 8px 0; border-radius: 4px; font-family: system-ui, -apple-system, sans-serif;">
58
- ` : `</div>
59
- `;
60
- }
61
- });
62
- });
63
- }
64
- export {
65
- w as A
66
- };