@kernelift/markdown 1.2.0 → 1.2.2

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.
package/README.md CHANGED
@@ -1,5 +1,7 @@
1
1
  # @kernelift/markdown
2
2
 
3
+ 在线预览: https://kernelift-labs.github.io/playground/#/markdown-editor
4
+
3
5
  基于 `markdown-it` 和 `highlight.js` 的 Markdown 渲染组件,提供强大的 Markdown 渲染和代码高亮功能。
4
6
 
5
7
  ## 功能特性
@@ -269,9 +271,10 @@ const isDark = ref(true);
269
271
 
270
272
  ## Emits
271
273
 
272
- | 事件名 | 说明 | 参数 |
273
- | ----------------- | -------------- | ----------------- |
274
- | update:modelValue | 内容变化时触发 | `(value: string)` |
274
+ | 事件名 | 说明 | 参数 |
275
+ | ----------------- | ---------------------------------------- | --------------------------------- |
276
+ | update:modelValue | 内容变化时触发 | `(value: string)` |
277
+ | rendered | 渲染完成时触发(包含增量渲染和完整渲染) | `(context: string, html: string)` |
275
278
 
276
279
  ## Expose
277
280
 
package/dist/index.d.ts CHANGED
@@ -27,6 +27,7 @@ declare type __VLS_Props = {
27
27
  * 用于优化高频更新场景
28
28
  */
29
29
  incrementalDebounce?: number;
30
+ performanceLog?: boolean;
30
31
  };
31
32
 
32
33
  declare type __VLS_PublicProps = {
@@ -43,7 +44,10 @@ resetRenderState: () => void;
43
44
  isStreaming: Ref<boolean, boolean>;
44
45
  }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
45
46
  "update:modelValue": (value: string) => any;
47
+ } & {
48
+ rendered: (context: string, html: string) => any;
46
49
  }, string, PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
50
+ onRendered?: ((context: string, html: string) => any) | undefined;
47
51
  "onUpdate:modelValue"?: ((value: string) => any) | undefined;
48
52
  }>, {
49
53
  plugins: Array<any>;
@@ -55,6 +59,7 @@ codeMaxHeight: number;
55
59
  themeMode: "light" | "dark";
56
60
  incremental: boolean;
57
61
  incrementalDebounce: number;
62
+ performanceLog: boolean;
58
63
  }, {}, {}, {}, string, ComponentProvideOptions, false, {
59
64
  containerRef: HTMLDivElement;
60
65
  }, HTMLElement>;