vue-devui 1.6.4-markdown.0 → 1.6.4-markdown.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vue-devui",
3
- "version": "1.6.4-markdown.0",
3
+ "version": "1.6.4-markdown.1",
4
4
  "license": "MIT",
5
5
  "description": "DevUI components based on Vite and Vue3",
6
6
  "keywords": [
@@ -86,6 +86,9 @@ export declare const editorMdProps: {
86
86
  customHintReplaceFn: {
87
87
  type: PropType<(prefix: string, row: any) => string>;
88
88
  };
89
+ beforeShowHint: {
90
+ type: PropType<(value: string) => boolean>;
91
+ };
89
92
  baseUrl: {
90
93
  type: StringConstructor;
91
94
  default: null;
package/vue-devui.es.js CHANGED
@@ -35934,7 +35934,8 @@ function useEditorMd(props, ctx2) {
35934
35934
  customHintReplaceFn,
35935
35935
  hintConfig,
35936
35936
  disableChangeEvent,
35937
- modelValue
35937
+ modelValue,
35938
+ beforeShowHint
35938
35939
  } = toRefs(props);
35939
35940
  const toolbars = reactive(cloneDeep_1(DEFAULT_TOOLBARS));
35940
35941
  const editorRef = ref();
@@ -36055,6 +36056,13 @@ function useEditorMd(props, ctx2) {
36055
36056
  const cursor = editorIns.getCursor();
36056
36057
  let i = prefixes.value.length;
36057
36058
  const value = editorIns.getLine(cursor.line).replace(/\t/g, " ");
36059
+ let result2 = false;
36060
+ if (beforeShowHint == null ? void 0 : beforeShowHint.value) {
36061
+ result2 = beforeShowHint.value(value);
36062
+ }
36063
+ if (result2) {
36064
+ return;
36065
+ }
36058
36066
  const selection = editorIns.getSelection();
36059
36067
  const isImgRegx = /^\!\[\S+/;
36060
36068
  if (selection) {
@@ -36353,6 +36361,9 @@ const editorMdProps = __spreadProps(__spreadValues({}, commonProps$1), {
36353
36361
  },
36354
36362
  customHintReplaceFn: {
36355
36363
  type: Function
36364
+ },
36365
+ beforeShowHint: {
36366
+ type: Function
36356
36367
  }
36357
36368
  });
36358
36369
  const EditorMdInjectionKey = Symbol("d-editor-md");
@@ -54187,7 +54198,7 @@ const installs = [
54187
54198
  VirtualListInstall
54188
54199
  ];
54189
54200
  var vueDevui = {
54190
- version: "1.6.4-markdown.0",
54201
+ version: "1.6.4-markdown.1",
54191
54202
  install(app) {
54192
54203
  installs.forEach((p) => app.use(p));
54193
54204
  }