markview-vue 0.1.9 → 0.1.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (119) hide show
  1. package/dist/assets/_basePickBy-CHITUj4p.cjs +1 -0
  2. package/dist/assets/_basePickBy-ybeSkJfi.js +151 -0
  3. package/dist/assets/_baseUniq-BGLq8QRh.cjs +1 -0
  4. package/dist/assets/_baseUniq-xGqTUv6g.js +614 -0
  5. package/dist/assets/arc-Ba_uALHe.cjs +1 -0
  6. package/dist/assets/arc-CbsfC7zA.js +83 -0
  7. package/dist/assets/architecture-7HQA4BMR-B6phKgs-.js +6 -0
  8. package/dist/assets/architecture-7HQA4BMR-BdQzdD9-.cjs +1 -0
  9. package/dist/assets/architectureDiagram-VXUJARFQ-CIAXg-eb.js +4669 -0
  10. package/dist/assets/architectureDiagram-VXUJARFQ-DDSvQNjx.cjs +36 -0
  11. package/dist/assets/blockDiagram-VD42YOAC-CWR8l5l2.cjs +122 -0
  12. package/dist/assets/blockDiagram-VD42YOAC-wQlEggOh.js +2265 -0
  13. package/dist/assets/c4Diagram-YG6GDRKO-CrrMmY-D.cjs +10 -0
  14. package/dist/assets/c4Diagram-YG6GDRKO-FBfLZqNW.js +1581 -0
  15. package/dist/assets/channel-BRGQuuVl.js +5 -0
  16. package/dist/assets/channel-CZ4XWtuo.cjs +1 -0
  17. package/dist/assets/chunk-4BX2VUAB-BMbuSe4x.js +9 -0
  18. package/dist/assets/chunk-4BX2VUAB-FPWk2Aj8.cjs +1 -0
  19. package/dist/assets/chunk-55IACEB6-Cjgh_--n.cjs +1 -0
  20. package/dist/assets/chunk-55IACEB6-DiVv8R-7.js +8 -0
  21. package/dist/assets/chunk-B4BG7PRW-B_CFJmuC.cjs +165 -0
  22. package/dist/assets/chunk-B4BG7PRW-CObtScCP.js +1376 -0
  23. package/dist/assets/chunk-DI55MBZ5-BFm-KDUn.js +1382 -0
  24. package/dist/assets/chunk-DI55MBZ5-BZpMjriS.cjs +220 -0
  25. package/dist/assets/chunk-FMBD7UC4-Bo7IX0Tg.js +19 -0
  26. package/dist/assets/chunk-FMBD7UC4-Cd9Z8061.cjs +15 -0
  27. package/dist/assets/chunk-QN33PNHL-CaS89Uk_.js +20 -0
  28. package/dist/assets/chunk-QN33PNHL-KOmxd_kK.cjs +1 -0
  29. package/dist/assets/chunk-QZHKN3VN-Czbci--E.js +15 -0
  30. package/dist/assets/chunk-QZHKN3VN-D0_TUemW.cjs +1 -0
  31. package/dist/assets/chunk-TZMSLE5B-DPTrW-NE.js +64 -0
  32. package/dist/assets/chunk-TZMSLE5B-tWWaxsin.cjs +1 -0
  33. package/dist/assets/classDiagram-2ON5EDUG-BwYE0avN.js +16 -0
  34. package/dist/assets/classDiagram-2ON5EDUG-D6CGN0lK.cjs +1 -0
  35. package/dist/assets/classDiagram-v2-WZHVMYZB-BwYE0avN.js +16 -0
  36. package/dist/assets/classDiagram-v2-WZHVMYZB-D6CGN0lK.cjs +1 -0
  37. package/dist/assets/clone-BfRhdNm4.cjs +1 -0
  38. package/dist/assets/clone-CIEijpnt.js +8 -0
  39. package/dist/assets/cose-bilkent-S5V4N54A-CGYbjcpr.cjs +1 -0
  40. package/dist/assets/cose-bilkent-S5V4N54A-D8qsMnvS.js +2609 -0
  41. package/dist/assets/cytoscape.esm-CjI2IsL8.js +18735 -0
  42. package/dist/assets/cytoscape.esm-o9WRfNPd.cjs +331 -0
  43. package/dist/assets/dagre-6UL2VRFP-BzWnLxya.cjs +4 -0
  44. package/dist/assets/dagre-6UL2VRFP-C4Q40rgn.js +447 -0
  45. package/dist/assets/defaultLocale-BgPVtth8.js +171 -0
  46. package/dist/assets/defaultLocale-C4wbwF1n.cjs +1 -0
  47. package/dist/assets/diagram-PSM6KHXK-Cb5u6c6h.js +533 -0
  48. package/dist/assets/diagram-PSM6KHXK-CwWgRjfE.cjs +24 -0
  49. package/dist/assets/diagram-QEK2KX5R-Bi2NJFR_.js +221 -0
  50. package/dist/assets/diagram-QEK2KX5R-CLiJ34Ww.cjs +43 -0
  51. package/dist/assets/diagram-S2PKOQOG-C3UiRU3w.js +143 -0
  52. package/dist/assets/diagram-S2PKOQOG-OPuGn1kE.cjs +24 -0
  53. package/dist/assets/erDiagram-Q2GNP2WA-DVhIup4P.js +842 -0
  54. package/dist/assets/erDiagram-Q2GNP2WA-mrezvRlN.cjs +60 -0
  55. package/dist/assets/flowDiagram-NV44I4VS-BI2afYbF.js +1627 -0
  56. package/dist/assets/flowDiagram-NV44I4VS-uldiRJtW.cjs +162 -0
  57. package/dist/assets/ganttDiagram-JELNMOA3-B8_pSkSq.js +2671 -0
  58. package/dist/assets/ganttDiagram-JELNMOA3-XTesuTLx.cjs +267 -0
  59. package/dist/assets/gitGraph-G5XIXVHT-C3nHpXwk.js +6 -0
  60. package/dist/assets/gitGraph-G5XIXVHT-DEcLAdEU.cjs +1 -0
  61. package/dist/assets/gitGraphDiagram-V2S2FVAM-CTOC3DiT.cjs +65 -0
  62. package/dist/assets/gitGraphDiagram-V2S2FVAM-Cnf8w3oC.js +712 -0
  63. package/dist/assets/graph-BuIO7SSf.js +247 -0
  64. package/dist/assets/graph-p9DI0XAm.cjs +1 -0
  65. package/dist/assets/index-C69mIz56.js +44761 -0
  66. package/dist/assets/index-C9QevtQd.cjs +547 -0
  67. package/dist/assets/info-VBDWY6EO-BsNozlXs.cjs +1 -0
  68. package/dist/assets/info-VBDWY6EO-C_OL8dwF.js +6 -0
  69. package/dist/assets/infoDiagram-HS3SLOUP-BiRaPpy-.cjs +2 -0
  70. package/dist/assets/infoDiagram-HS3SLOUP-DguMzWUX.js +24 -0
  71. package/dist/assets/init-CHZsXQcr.cjs +1 -0
  72. package/dist/assets/init-DjUOC4st.js +16 -0
  73. package/dist/assets/journeyDiagram-XKPGCS4Q-DrmZKsPZ.cjs +139 -0
  74. package/dist/assets/journeyDiagram-XKPGCS4Q-SAJGgxHv.js +834 -0
  75. package/dist/assets/kanban-definition-3W4ZIXB7-CACD_qKY.cjs +89 -0
  76. package/dist/assets/kanban-definition-3W4ZIXB7-Dqllh40x.js +721 -0
  77. package/dist/assets/layout-BfkZhPei.js +1335 -0
  78. package/dist/assets/layout-DJMp8xuD.cjs +1 -0
  79. package/dist/assets/linear-B9X-K1ie.js +259 -0
  80. package/dist/assets/linear-qhmmwiXh.cjs +1 -0
  81. package/dist/assets/mermaid-parser.core-9igjpGWA.js +17976 -0
  82. package/dist/assets/mermaid-parser.core-CdI_2l2U.cjs +160 -0
  83. package/dist/assets/mermaid.core-C0ptc8Ci.js +15357 -0
  84. package/dist/assets/mermaid.core-D53Nknii.cjs +255 -0
  85. package/dist/assets/mindmap-definition-VGOIOE7T-C5GlPlyz.cjs +68 -0
  86. package/dist/assets/mindmap-definition-VGOIOE7T-D9ynDOFV.js +787 -0
  87. package/dist/assets/ordinal-CagbB1m8.cjs +1 -0
  88. package/dist/assets/ordinal-DfAQgscy.js +61 -0
  89. package/dist/assets/packet-DYOGHKS2-1rlG7uoS.js +6 -0
  90. package/dist/assets/packet-DYOGHKS2-DZgqFf8l.cjs +1 -0
  91. package/dist/assets/pie-VRWISCQL-BuCxcsRA.cjs +1 -0
  92. package/dist/assets/pie-VRWISCQL-CSl0KPjm.js +6 -0
  93. package/dist/assets/pieDiagram-ADFJNKIX-DJy51I_a.cjs +30 -0
  94. package/dist/assets/pieDiagram-ADFJNKIX-beKcRjnx.js +161 -0
  95. package/dist/assets/quadrantDiagram-AYHSOK5B-CHvt8eYr.js +1024 -0
  96. package/dist/assets/quadrantDiagram-AYHSOK5B-DW0ytD6Y.cjs +7 -0
  97. package/dist/assets/radar-ZZBFDIW7-CTFB0BiB.cjs +1 -0
  98. package/dist/assets/radar-ZZBFDIW7-rwWCZwIk.js +6 -0
  99. package/dist/assets/requirementDiagram-UZGBJVZJ-BRAtpmw9.js +852 -0
  100. package/dist/assets/requirementDiagram-UZGBJVZJ-BaBtXpY5.cjs +64 -0
  101. package/dist/assets/sankeyDiagram-TZEHDZUN-CC-AD2xc.cjs +10 -0
  102. package/dist/assets/sankeyDiagram-TZEHDZUN-jQduv77E.js +810 -0
  103. package/dist/assets/sequenceDiagram-WL72ISMW-CMJL0tZT.cjs +145 -0
  104. package/dist/assets/sequenceDiagram-WL72ISMW-DeVW1A54.js +2518 -0
  105. package/dist/assets/stateDiagram-FKZM4ZOC-BlHSDL2f.js +263 -0
  106. package/dist/assets/stateDiagram-FKZM4ZOC-D8dN0qMe.cjs +1 -0
  107. package/dist/assets/stateDiagram-v2-4FDKWEC3-B5KcJcLk.cjs +1 -0
  108. package/dist/assets/stateDiagram-v2-4FDKWEC3-D6MOxCaK.js +16 -0
  109. package/dist/assets/timeline-definition-IT6M3QCI-CQQMX29d.js +799 -0
  110. package/dist/assets/timeline-definition-IT6M3QCI-DPNrBMbj.cjs +61 -0
  111. package/dist/assets/treemap-GDKQZRPO-BRkjlMcy.js +6 -0
  112. package/dist/assets/treemap-GDKQZRPO-DXgt6YFC.cjs +1 -0
  113. package/dist/assets/xychartDiagram-PRI3JC2R-BymhHCL4.cjs +7 -0
  114. package/dist/assets/xychartDiagram-PRI3JC2R-ZD4dLllP.js +1340 -0
  115. package/dist/index.cjs +1 -537
  116. package/dist/index.d.ts +182 -35
  117. package/dist/index.js +68 -44394
  118. package/dist/style.css +1 -1
  119. package/package.json +4 -2
package/dist/index.d.ts CHANGED
@@ -5,7 +5,6 @@ import { FunctionalComponent } from 'vue';
5
5
  import { HighlighterCore } from 'shiki/core';
6
6
  import { InjectionKey } from 'vue';
7
7
  import { LucideProps } from 'lucide-vue-next';
8
- import { MDXComponents } from 'mdx/types';
9
8
  import { MDXProps } from 'mdx/types';
10
9
  import { PluggableList } from '@mdx-js/mdx/lib/core';
11
10
  import { Plugin as Plugin_2 } from 'vue';
@@ -49,9 +48,9 @@ declare const __VLS_component_14: DefineComponent<Props, {}, {}, {}, {}, Compone
49
48
  title: string;
50
49
  }, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
51
50
 
52
- declare const __VLS_component_15: DefineComponent<__VLS_Props_12, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
51
+ declare const __VLS_component_15: DefineComponent<__VLS_Props_14, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
53
52
  motionEnd: () => any;
54
- }, string, PublicProps, Readonly<__VLS_Props_12> & Readonly<{
53
+ }, string, PublicProps, Readonly<__VLS_Props_14> & Readonly<{
55
54
  onMotionEnd?: (() => any) | undefined;
56
55
  }>, {
57
56
  duration: number;
@@ -62,11 +61,11 @@ declare const __VLS_component_15: DefineComponent<__VLS_Props_12, {}, {}, {}, {}
62
61
  contentRef: HTMLDivElement;
63
62
  }, HTMLDivElement>;
64
63
 
65
- declare const __VLS_component_16: DefineComponent<__VLS_Props_13, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
64
+ declare const __VLS_component_16: DefineComponent<__VLS_Props_15, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
66
65
  change: (expanded: boolean) => any;
67
66
  motionEnd: () => any;
68
67
  "update:expanded": (value: boolean) => any;
69
- }, string, PublicProps, Readonly<__VLS_Props_13> & Readonly<{
68
+ }, string, PublicProps, Readonly<__VLS_Props_15> & Readonly<{
70
69
  onChange?: ((expanded: boolean) => any) | undefined;
71
70
  onMotionEnd?: (() => any) | undefined;
72
71
  "onUpdate:expanded"?: ((value: boolean) => any) | undefined;
@@ -80,7 +79,7 @@ declare const __VLS_component_16: DefineComponent<__VLS_Props_13, {}, {}, {}, {}
80
79
  expandText: string;
81
80
  }, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
82
81
 
83
- declare const __VLS_component_17: DefineComponent<__VLS_Props_15, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<__VLS_Props_15> & Readonly<{}>, {
82
+ declare const __VLS_component_17: DefineComponent<__VLS_Props_17, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<__VLS_Props_17> & Readonly<{}>, {
84
83
  disabled: boolean;
85
84
  position: TooltipPosition;
86
85
  trigger: "hover" | "focus" | "both";
@@ -93,10 +92,10 @@ declare const __VLS_component_17: DefineComponent<__VLS_Props_15, {}, {}, {}, {}
93
92
  tooltipRef: HTMLDivElement;
94
93
  }, any>;
95
94
 
96
- declare const __VLS_component_18: DefineComponent<__VLS_Props_17, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
95
+ declare const __VLS_component_18: DefineComponent<__VLS_Props_19, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
97
96
  change: (checked: boolean) => any;
98
97
  "update:modelValue": (value: boolean) => any;
99
- }, string, PublicProps, Readonly<__VLS_Props_17> & Readonly<{
98
+ }, string, PublicProps, Readonly<__VLS_Props_19> & Readonly<{
100
99
  onChange?: ((checked: boolean) => any) | undefined;
101
100
  "onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
102
101
  }>, {
@@ -105,10 +104,10 @@ declare const __VLS_component_18: DefineComponent<__VLS_Props_17, {}, {}, {}, {}
105
104
  indeterminate: boolean;
106
105
  }, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLSpanElement>;
107
106
 
108
- declare const __VLS_component_19: DefineComponent<__VLS_Props_18, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
107
+ declare const __VLS_component_19: DefineComponent<__VLS_Props_20, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
109
108
  close: () => any;
110
109
  click: (e: MouseEvent) => any;
111
- }, string, PublicProps, Readonly<__VLS_Props_18> & Readonly<{
110
+ }, string, PublicProps, Readonly<__VLS_Props_20> & Readonly<{
112
111
  onClose?: (() => any) | undefined;
113
112
  onClick?: ((e: MouseEvent) => any) | undefined;
114
113
  }>, {
@@ -120,7 +119,7 @@ declare const __VLS_component_19: DefineComponent<__VLS_Props_18, {}, {}, {}, {}
120
119
 
121
120
  declare const __VLS_component_2: DefineComponent<{}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
122
121
 
123
- declare const __VLS_component_20: DefineComponent<__VLS_Props_19, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<__VLS_Props_19> & Readonly<{}>, {
122
+ declare const __VLS_component_20: DefineComponent<__VLS_Props_21, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<__VLS_Props_21> & Readonly<{}>, {
124
123
  layout: "horizontal" | "vertical";
125
124
  dashed: boolean;
126
125
  align: "left" | "center" | "right";
@@ -148,6 +147,17 @@ declare type __VLS_Props = {
148
147
  };
149
148
 
150
149
  declare type __VLS_Props_10 = {
150
+ items: TocItem_2[];
151
+ activeId?: string;
152
+ minLevel?: number;
153
+ maxLevel?: number;
154
+ };
155
+
156
+ declare type __VLS_Props_11 = {
157
+ active?: boolean;
158
+ };
159
+
160
+ declare type __VLS_Props_12 = {
151
161
  src?: string;
152
162
  alt?: string;
153
163
  width?: string | number;
@@ -155,20 +165,20 @@ declare type __VLS_Props_10 = {
155
165
  fit?: 'fill' | 'contain' | 'cover' | 'none' | 'scale-down';
156
166
  };
157
167
 
158
- declare type __VLS_Props_11 = {
168
+ declare type __VLS_Props_13 = {
159
169
  visible: boolean;
160
170
  src: string;
161
171
  title?: string;
162
172
  };
163
173
 
164
- declare type __VLS_Props_12 = {
174
+ declare type __VLS_Props_14 = {
165
175
  isOpen?: boolean;
166
176
  duration?: number;
167
177
  keepDOM?: boolean;
168
178
  collapseHeight?: number;
169
179
  };
170
180
 
171
- declare type __VLS_Props_13 = {
181
+ declare type __VLS_Props_15 = {
172
182
  title?: string;
173
183
  defaultExpanded?: boolean;
174
184
  expanded?: boolean;
@@ -180,13 +190,13 @@ declare type __VLS_Props_13 = {
180
190
  expandText?: string;
181
191
  };
182
192
 
183
- declare type __VLS_Props_14 = {
193
+ declare type __VLS_Props_16 = {
184
194
  name: IconName;
185
195
  size?: number;
186
196
  strokeWidth?: number;
187
197
  };
188
198
 
189
- declare type __VLS_Props_15 = {
199
+ declare type __VLS_Props_17 = {
190
200
  content: string;
191
201
  position?: TooltipPosition;
192
202
  trigger?: 'hover' | 'focus' | 'both';
@@ -197,36 +207,36 @@ declare type __VLS_Props_15 = {
197
207
  disabled?: boolean;
198
208
  };
199
209
 
200
- declare type __VLS_Props_16 = {
210
+ declare type __VLS_Props_18 = {
201
211
  href: string;
202
212
  alwaysVisible?: boolean;
203
213
  };
204
214
 
205
- declare type __VLS_Props_17 = {
215
+ declare type __VLS_Props_19 = {
206
216
  modelValue?: boolean;
207
217
  disabled?: boolean;
208
218
  indeterminate?: boolean;
209
219
  };
210
220
 
211
- declare type __VLS_Props_18 = {
221
+ declare type __VLS_Props_2 = {
222
+ src?: string;
223
+ alt?: string;
224
+ };
225
+
226
+ declare type __VLS_Props_20 = {
212
227
  size?: TagSize;
213
228
  type?: TagType;
214
229
  color?: TagColor;
215
230
  closable?: boolean;
216
231
  };
217
232
 
218
- declare type __VLS_Props_19 = {
233
+ declare type __VLS_Props_21 = {
219
234
  layout?: 'horizontal' | 'vertical';
220
235
  dashed?: boolean;
221
236
  align?: 'left' | 'center' | 'right';
222
237
  margin?: string | number;
223
238
  };
224
239
 
225
- declare type __VLS_Props_2 = {
226
- src?: string;
227
- alt?: string;
228
- };
229
-
230
240
  declare type __VLS_Props_3 = {
231
241
  dashed?: boolean;
232
242
  };
@@ -261,7 +271,7 @@ declare type __VLS_Props_8 = {
261
271
  };
262
272
 
263
273
  declare type __VLS_Props_9 = {
264
- active?: boolean;
274
+ code: string;
265
275
  };
266
276
 
267
277
  declare function __VLS_template(): {
@@ -612,7 +622,7 @@ declare type __VLS_WithTemplateSlots_9<T, S> = T & {
612
622
 
613
623
  export declare const a: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
614
624
 
615
- export declare const Anchor: DefineComponent<__VLS_Props_16, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<__VLS_Props_16> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLSpanElement>;
625
+ export declare const Anchor: DefineComponent<__VLS_Props_18, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<__VLS_Props_18> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLSpanElement>;
616
626
 
617
627
  export declare const BlockHeader: __VLS_WithTemplateSlots_11<typeof __VLS_component_11, __VLS_TemplateResult_11["slots"]>;
618
628
 
@@ -630,7 +640,7 @@ export declare const CodeBlock: DefineComponent<__VLS_Props_4, {}, {}, {}, {}, C
630
640
  maxLines: number;
631
641
  }, {}, {}, {}, string, ComponentProvideOptions, false, {
632
642
  bodyRef: HTMLDivElement;
633
- }, HTMLDivElement>;
643
+ }, any>;
634
644
 
635
645
  export declare const CollapseSection: __VLS_WithTemplateSlots_16<typeof __VLS_component_16, __VLS_TemplateResult_16["slots"]>;
636
646
 
@@ -673,6 +683,32 @@ declare type ContainerType_2 = 'tip' | 'warning' | 'danger' | 'info';
673
683
  */
674
684
  export declare function copyToClipboard(text: string): Promise<boolean>;
675
685
 
686
+ /**
687
+ * 创建 Highlighter Vue Plugin
688
+ *
689
+ * 在应用初始化时预加载语言,后续所有 MarkdownRender 实例自动可用。
690
+ *
691
+ * @example
692
+ * ```ts
693
+ * import { createHighlighterPlugin } from 'markview-vue'
694
+ *
695
+ * // 方式 1:传入多个语言
696
+ * app.use(createHighlighterPlugin({
697
+ * langs: [
698
+ * import('@shikijs/langs/python'),
699
+ * import('@shikijs/langs/rust'),
700
+ * import('@shikijs/langs/go'),
701
+ * ]
702
+ * }))
703
+ *
704
+ * // 方式 2:传入整个语言包
705
+ * app.use(createHighlighterPlugin({
706
+ * langs: import('@shikijs/langs')
707
+ * }))
708
+ * ```
709
+ */
710
+ export declare function createHighlighterPlugin(options?: HighlighterPluginOptions): Plugin_2;
711
+
676
712
  declare const _default: __VLS_WithTemplateSlots_4<typeof __VLS_component_4, __VLS_TemplateResult_4["slots"]>;
677
713
  export { _default as ListItem }
678
714
  export { _default as li }
@@ -701,6 +737,11 @@ export { _default_6 as mark }
701
737
 
702
738
  export declare const Divider: __VLS_WithTemplateSlots_20<typeof __VLS_component_20, __VLS_TemplateResult_20["slots"]>;
703
739
 
740
+ /**
741
+ * 确保 highlighter 已初始化
742
+ */
743
+ declare function ensureReady(): Promise<void>;
744
+
704
745
  /**
705
746
  * 从 VNode 中提取语言标识(用于代码块)
706
747
  */
@@ -764,10 +805,19 @@ declare function hide(): void;
764
805
 
765
806
  /**
766
807
  * 高亮代码
808
+ *
809
+ * @param code - 源代码
810
+ * @param lang - 语言标识
811
+ * @param theme - 主题名称,'light' | 'dark',默认 'light'
767
812
  */
768
- export declare function highlightCode(code: string, lang: string): Promise<string>;
813
+ export declare function highlightCode(code: string, lang: string, theme?: 'light' | 'dark'): Promise<string>;
814
+
815
+ export declare interface HighlighterPluginOptions {
816
+ /** 需要预加载的语言包 */
817
+ langs?: LangInput;
818
+ }
769
819
 
770
- export declare const Icon: DefineComponent<__VLS_Props_14, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<__VLS_Props_14> & Readonly<{}>, {
820
+ export declare const Icon: DefineComponent<__VLS_Props_16, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<__VLS_Props_16> & Readonly<{}>, {
771
821
  size: number;
772
822
  strokeWidth: number;
773
823
  }, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
@@ -800,6 +850,8 @@ declare const iconMap: {
800
850
  readonly info: FunctionalComponent<LucideProps, {}, any, {}>;
801
851
  readonly lightbulb: FunctionalComponent<LucideProps, {}, any, {}>;
802
852
  readonly code: FunctionalComponent<LucideProps, {}, any, {}>;
853
+ readonly 'code-2': FunctionalComponent<LucideProps, {}, any, {}>;
854
+ readonly eye: FunctionalComponent<LucideProps, {}, any, {}>;
803
855
  readonly table: FunctionalComponent<LucideProps, {}, any, {}>;
804
856
  readonly quote: FunctionalComponent<LucideProps, {}, any, {}>;
805
857
  readonly image: FunctionalComponent<LucideProps, {}, any, {}>;
@@ -808,19 +860,26 @@ declare const iconMap: {
808
860
 
809
861
  export declare type IconName = keyof typeof iconMap;
810
862
 
811
- declare const Image_2: DefineComponent<__VLS_Props_10, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<__VLS_Props_10> & Readonly<{}>, {
863
+ declare const Image_2: DefineComponent<__VLS_Props_12, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<__VLS_Props_12> & Readonly<{}>, {
812
864
  fit: "fill" | "contain" | "cover" | "none" | "scale-down";
813
865
  }, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
814
866
  export { Image_2 as Image }
815
867
 
816
- export declare const ImagePreview: DefineComponent<__VLS_Props_11, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
868
+ export declare const ImagePreview: DefineComponent<__VLS_Props_13, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
817
869
  close: () => any;
818
- }, string, PublicProps, Readonly<__VLS_Props_11> & Readonly<{
870
+ }, string, PublicProps, Readonly<__VLS_Props_13> & Readonly<{
819
871
  onClose?: (() => any) | undefined;
820
872
  }>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
821
873
 
822
874
  export declare const img: DefineComponent<__VLS_Props_2, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<__VLS_Props_2> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLElement>;
823
875
 
876
+ declare const isLoading: Ref<boolean, boolean>;
877
+
878
+ declare const isReady: Ref<boolean, boolean>;
879
+
880
+ /** 支持的语言包输入类型 */
881
+ export declare type LangInput = Promise<any>[] | Promise<any>;
882
+
824
883
  /**
825
884
  * 语言别名映射表
826
885
  */
@@ -828,6 +887,40 @@ export declare const LANGUAGE_ALIASES: Record<string, string>;
828
887
 
829
888
  export declare const List: __VLS_WithTemplateSlots_13<typeof __VLS_component_13, __VLS_TemplateResult_13["slots"]>;
830
889
 
890
+ declare const loadedLangs: Ref<string[], string[]>;
891
+
892
+ /**
893
+ * 加载额外语言
894
+ *
895
+ * @param langs - 支持单个 Promise、Promise 数组、或整个语言包
896
+ */
897
+ declare function loadLangs(langs: LangInput): Promise<void>;
898
+
899
+ /**
900
+ * 动态加载额外语言
901
+ *
902
+ * @param langs - 语言包输入,支持以下格式:
903
+ * - 单个语言 Promise:`import('@shikijs/langs/python')`
904
+ * - 语言 Promise 数组:`[import('@shikijs/langs/python'), import('@shikijs/langs/rust')]`
905
+ * - 语言包 Promise:`import('@shikijs/langs')` — 自动解析包内所有语言
906
+ *
907
+ * @example
908
+ * ```ts
909
+ * // 方式1:传入单个语言
910
+ * await loadLanguages(import('@shikijs/langs/python'))
911
+ *
912
+ * // 方式2:传入多个语言
913
+ * await loadLanguages([
914
+ * import('@shikijs/langs/python'),
915
+ * import('@shikijs/langs/rust'),
916
+ * ])
917
+ *
918
+ * // 方式3:传入整个语言包(会自动解析所有语言)
919
+ * await loadLanguages(import('@shikijs/langs'))
920
+ * ```
921
+ */
922
+ export declare function loadLanguages(langs: LangInput): Promise<void>;
923
+
831
924
  export declare const MarkdownRender: DefineComponent<MarkdownRenderProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
832
925
  error: (error: Error) => any;
833
926
  rendered: () => any;
@@ -843,7 +936,7 @@ export declare const MarkdownRender: DefineComponent<MarkdownRenderProps, {}, {}
843
936
  }>, {
844
937
  format: "md" | "mdx";
845
938
  theme: "light" | "dark";
846
- components: MDXComponents;
939
+ components: MDXProps["components"];
847
940
  raw: string;
848
941
  remarkGfm: boolean;
849
942
  prefix: string;
@@ -853,6 +946,7 @@ export declare const MarkdownRender: DefineComponent<MarkdownRenderProps, {}, {}
853
946
  tocMode: "sidebar" | "embedded";
854
947
  showBackTop: boolean;
855
948
  backTopThreshold: number;
949
+ extraLangs: LangInput;
856
950
  }, {}, {}, {}, string, ComponentProvideOptions, false, {
857
951
  wrapperRef: HTMLDivElement;
858
952
  contentRef: HTMLDivElement;
@@ -899,8 +993,19 @@ export declare interface MarkdownRenderProps {
899
993
  showBackTop?: boolean;
900
994
  /** 回到顶部按钮显示阈值(滚动距离) */
901
995
  backTopThreshold?: number;
996
+ /**
997
+ * 额外语言包,支持以下格式:
998
+ * - 单个语言:import('@shikijs/langs/python')
999
+ * - 语言数组:[import('@shikijs/langs/python'), import('@shikijs/langs/rust')]
1000
+ * - 语言包(bundled):import('@shikijs/langs') — 自动解析包内所有语言
1001
+ */
1002
+ extraLangs?: LangInput;
902
1003
  }
903
1004
 
1005
+ export declare const Mermaid: DefineComponent<__VLS_Props_9, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<__VLS_Props_9> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {
1006
+ containerRef: HTMLDivElement;
1007
+ }, HTMLDivElement>;
1008
+
904
1009
  /**
905
1010
  * 规范化语言标识
906
1011
  */
@@ -937,9 +1042,12 @@ declare interface Props {
937
1042
  */
938
1043
  export declare function provideHeadingCollapse(): HeadingCollapseState;
939
1044
 
1045
+ /** 刷新已加载语言列表 */
1046
+ declare function refreshLoadedLangs(): Promise<void>;
1047
+
940
1048
  declare function show(msg: string, toastType?: ToastType_2, duration?: number): void;
941
1049
 
942
- export declare const Skeleton: DefineComponent<__VLS_Props_9, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<__VLS_Props_9> & Readonly<{}>, {
1050
+ export declare const Skeleton: DefineComponent<__VLS_Props_11, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<__VLS_Props_11> & Readonly<{}>, {
943
1051
  active: boolean;
944
1052
  }, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
945
1053
 
@@ -996,6 +1104,15 @@ declare interface TocItem_2 {
996
1104
  id: string;
997
1105
  }
998
1106
 
1107
+ export declare const TocMobile: DefineComponent<__VLS_Props_10, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
1108
+ click: (item: TocItem_2) => any;
1109
+ }, string, PublicProps, Readonly<__VLS_Props_10> & Readonly<{
1110
+ onClick?: ((item: TocItem_2) => any) | undefined;
1111
+ }>, {
1112
+ minLevel: number;
1113
+ maxLevel: number;
1114
+ }, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
1115
+
999
1116
  export declare interface TocProps {
1000
1117
  /** 目录项列表 */
1001
1118
  items: TocItem_2[];
@@ -1036,6 +1153,36 @@ export declare const ul: DefineComponent<{}, () => VNode<RendererNode, RendererE
1036
1153
  */
1037
1154
  export declare function useHeadingCollapse(): HeadingCollapseState | null;
1038
1155
 
1156
+ /**
1157
+ * Composable:在组件内使用 highlighter
1158
+ *
1159
+ * @example
1160
+ * ```ts
1161
+ * const { loadLangs, loadedLangs, isReady } = useHighlighter()
1162
+ *
1163
+ * onMounted(async () => {
1164
+ * await loadLangs(import('@shikijs/langs/go'))
1165
+ * console.log('已加载:', loadedLangs.value)
1166
+ * })
1167
+ * ```
1168
+ */
1169
+ export declare function useHighlighter(): UseHighlighterReturn;
1170
+
1171
+ export declare interface UseHighlighterReturn {
1172
+ /** highlighter 是否已初始化 */
1173
+ isReady: typeof isReady;
1174
+ /** 当前已加载的语言列表 */
1175
+ loadedLangs: typeof loadedLangs;
1176
+ /** 是否正在加载语言 */
1177
+ isLoading: typeof isLoading;
1178
+ /** 加载额外语言 */
1179
+ loadLangs: typeof loadLangs;
1180
+ /** 确保 highlighter 已初始化 */
1181
+ ensureReady: typeof ensureReady;
1182
+ /** 刷新已加载语言列表 */
1183
+ refreshLoadedLangs: typeof refreshLoadedLangs;
1184
+ }
1185
+
1039
1186
  /**
1040
1187
  * Vue 插件安装方法,支持 app.use() 方式全局注册
1041
1188
  */