@vunk/plus 0.0.2 → 0.0.4
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/components/monaco-editor/index.d.ts +1 -0
- package/components/monaco-editor/index.mjs +12 -1
- package/components/monaco-editor/src/ctx.d.ts +4 -0
- package/components/vditor/index.d.ts +1 -0
- package/components/vditor/index.mjs +12 -1
- package/components/vditor/src/ctx.d.ts +7 -0
- package/package.json +1 -1
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { bindPropsFactory, onEmitsFactory } from '@vunk/core/shared/utils-vue';
|
|
1
2
|
import { defineComponent, ref, onMounted, nextTick, watchEffect, openBlock, createElementBlock } from 'vue';
|
|
2
3
|
import { editor } from 'monaco-editor';
|
|
3
4
|
import { watchPausable } from '@vueuse/core';
|
|
@@ -17,9 +18,19 @@ const props = {
|
|
|
17
18
|
default: false
|
|
18
19
|
}
|
|
19
20
|
};
|
|
21
|
+
const createBindProps = bindPropsFactory(props);
|
|
20
22
|
const emits = {
|
|
21
23
|
"update:modelValue": null
|
|
22
24
|
};
|
|
25
|
+
const createOnEmits = onEmitsFactory(emits);
|
|
26
|
+
|
|
27
|
+
var ctx = /*#__PURE__*/Object.freeze({
|
|
28
|
+
__proto__: null,
|
|
29
|
+
createBindProps: createBindProps,
|
|
30
|
+
createOnEmits: createOnEmits,
|
|
31
|
+
emits: emits,
|
|
32
|
+
props: props
|
|
33
|
+
});
|
|
23
34
|
|
|
24
35
|
var _sfc_main = defineComponent({
|
|
25
36
|
name: "VkMonacoEditor",
|
|
@@ -80,4 +91,4 @@ VkMonacoEditor.install = (app) => {
|
|
|
80
91
|
app.component(VkMonacoEditor.name || "VkMonacoEditor", VkMonacoEditor);
|
|
81
92
|
};
|
|
82
93
|
|
|
83
|
-
export { VkMonacoEditor, types as __VkMonacoEditor, VkMonacoEditor as default };
|
|
94
|
+
export { VkMonacoEditor, ctx as _VkMonacoEditorCtx, types as __VkMonacoEditor, VkMonacoEditor as default };
|
|
@@ -14,6 +14,10 @@ export declare const props: {
|
|
|
14
14
|
default: boolean;
|
|
15
15
|
};
|
|
16
16
|
};
|
|
17
|
+
export declare const createBindProps: <T2 extends import("@vunk/core").NormalObject, EX extends (Extract<"modelValue", keyof T2> | Extract<"defaultOptions", keyof T2> | Extract<"readOnly", keyof T2>)[]>(propsArg: T2, excludes?: EX) => import("vue").ComputedRef<{ [P in EX extends (infer KE)[] ? Exclude<Extract<"modelValue", keyof T2>, KE> | Exclude<Extract<"defaultOptions", keyof T2>, KE> | Exclude<Extract<"readOnly", keyof T2>, KE> : Extract<"modelValue", keyof T2> | Extract<"defaultOptions", keyof T2> | Extract<"readOnly", keyof T2>]: { [k in Extract<"modelValue", keyof T2> | Extract<"defaultOptions", keyof T2> | Extract<"readOnly", keyof T2>]: T2[k]; }[P]; }>;
|
|
17
18
|
export declare const emits: {
|
|
18
19
|
'update:modelValue': any;
|
|
19
20
|
};
|
|
21
|
+
export declare const createOnEmits: <T2 extends import("@vunk/core").AnyFunc, EX extends "update:modelValue"[]>(emit: T2, excludes?: EX) => { [P in EX extends (infer KE)[] ? Exclude<"update:modelValue", KE> : "update:modelValue"]: {
|
|
22
|
+
'update:modelValue': (...e: import("@vunk/core").RestParameters<T2>) => void;
|
|
23
|
+
}[P]; };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import Vditor from 'vditor';
|
|
2
|
+
import { bindPropsFactory, onEmitsFactory } from '@vunk/core/shared/utils-vue';
|
|
2
3
|
import { inject, unref, defineComponent, nextTick, ref, watch, shallowRef, provide, onMounted, resolveComponent, openBlock, createElementBlock, Fragment, createElementVNode, createBlock, withCtx, normalizeClass, renderSlot, createCommentVNode } from 'vue';
|
|
3
4
|
import { watchPausable, useMutationObserver } from '@vueuse/core';
|
|
4
5
|
import { _ as _export_sfc } from '../_plugin-vue_export-helper.mjs';
|
|
@@ -54,12 +55,22 @@ const props = {
|
|
|
54
55
|
default: false
|
|
55
56
|
}
|
|
56
57
|
};
|
|
58
|
+
const createBindProps = bindPropsFactory(props);
|
|
57
59
|
const emits = {
|
|
58
60
|
load: (e) => e,
|
|
59
61
|
"update:modelValue": (e) => e,
|
|
60
62
|
ctrlEnter: (e) => e,
|
|
61
63
|
"update:fullscreen": (e) => e
|
|
62
64
|
};
|
|
65
|
+
const createOnEmits = onEmitsFactory(emits);
|
|
66
|
+
|
|
67
|
+
var ctx = /*#__PURE__*/Object.freeze({
|
|
68
|
+
__proto__: null,
|
|
69
|
+
createBindProps: createBindProps,
|
|
70
|
+
createOnEmits: createOnEmits,
|
|
71
|
+
emits: emits,
|
|
72
|
+
props: props
|
|
73
|
+
});
|
|
63
74
|
|
|
64
75
|
function mitt(n){return {all:n=n||new Map,on:function(t,e){var i=n.get(t);i?i.push(e):n.set(t,[e]);},off:function(t,e){var i=n.get(t);i&&(e?i.splice(i.indexOf(e)>>>0,1):n.set(t,[]));},emit:function(t,e){var i=n.get(t);i&&i.slice().map(function(n){n(e);}),(i=n.get("*"))&&i.slice().map(function(n){n(t,e);});}}}
|
|
65
76
|
|
|
@@ -276,4 +287,4 @@ VkVditor.install = (app) => {
|
|
|
276
287
|
app.component(VkVditor.name || "VkVditor", VkVditor);
|
|
277
288
|
};
|
|
278
289
|
|
|
279
|
-
export { VkVditor, types as __VkVditor, VkVditor as default };
|
|
290
|
+
export { VkVditor, ctx as _VkVditorCtx, types as __VkVditor, VkVditor as default };
|
|
@@ -22,9 +22,16 @@ export declare const props: {
|
|
|
22
22
|
default: boolean;
|
|
23
23
|
};
|
|
24
24
|
};
|
|
25
|
+
export declare const createBindProps: <T2 extends import("@vunk/core").NormalObject, EX extends (Extract<"modelValue", keyof T2> | Extract<"defaultOptions", keyof T2> | Extract<"placeholder", keyof T2> | Extract<"toolbar", keyof T2> | Extract<"fullscreen", keyof T2>)[]>(propsArg: T2, excludes?: EX) => import("vue").ComputedRef<{ [P in EX extends (infer KE)[] ? Exclude<Extract<"modelValue", keyof T2>, KE> | Exclude<Extract<"defaultOptions", keyof T2>, KE> | Exclude<Extract<"placeholder", keyof T2>, KE> | Exclude<Extract<"toolbar", keyof T2>, KE> | Exclude<Extract<"fullscreen", keyof T2>, KE> : Extract<"modelValue", keyof T2> | Extract<"defaultOptions", keyof T2> | Extract<"placeholder", keyof T2> | Extract<"toolbar", keyof T2> | Extract<"fullscreen", keyof T2>]: { [k in Extract<"modelValue", keyof T2> | Extract<"defaultOptions", keyof T2> | Extract<"placeholder", keyof T2> | Extract<"toolbar", keyof T2> | Extract<"fullscreen", keyof T2>]: T2[k]; }[P]; }>;
|
|
25
26
|
export declare const emits: {
|
|
26
27
|
load: (e: Vditor) => Vditor;
|
|
27
28
|
'update:modelValue': (e: string) => string;
|
|
28
29
|
ctrlEnter: (e: string) => string;
|
|
29
30
|
'update:fullscreen': (e: boolean) => boolean;
|
|
30
31
|
};
|
|
32
|
+
export declare const createOnEmits: <T2 extends import("@vunk/core").AnyFunc, EX extends ("load" | "update:modelValue" | "update:fullscreen" | "ctrlEnter")[]>(emit: T2, excludes?: EX) => { [P in EX extends (infer KE)[] ? Exclude<"load", KE> | Exclude<"update:modelValue", KE> | Exclude<"update:fullscreen", KE> | Exclude<"ctrlEnter", KE> : "load" | "update:modelValue" | "update:fullscreen" | "ctrlEnter"]: {
|
|
33
|
+
load: (...e: import("@vunk/core").RestParameters<T2>) => void;
|
|
34
|
+
'update:modelValue': (...e: import("@vunk/core").RestParameters<T2>) => void;
|
|
35
|
+
ctrlEnter: (...e: import("@vunk/core").RestParameters<T2>) => void;
|
|
36
|
+
'update:fullscreen': (...e: import("@vunk/core").RestParameters<T2>) => void;
|
|
37
|
+
}[P]; };
|