@vunk/plus 1.4.7 → 1.5.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/components/WebGLRenderer.mjs +1 -0
- package/components/WebGPURenderer.mjs +1 -0
- package/components/broadcasting-markdown/index.mjs +60 -12
- package/components/broadcasting-markdown/src/ctx.d.ts +10 -0
- package/components/broadcasting-markdown/src/index.vue.d.ts +42 -1
- package/components/browserAll.mjs +1 -0
- package/components/bubble-list/src/index.vue.d.ts +43 -62
- package/components/bubble-templates/src/index.vue.d.ts +40 -0
- package/components/chat-independent/src/index.vue.d.ts +47 -66
- package/components/index2.mjs +1498 -62
- package/components/pixi-frame/index.d.ts +3 -1
- package/components/pixi-frame/index.mjs +2 -1
- package/components/pixi-frame/src/apng.vue.d.ts +187 -0
- package/components/pixi-frame/src/core.vue.d.ts +92 -59
- package/components/pixi-frame/src/ctx.d.ts +20 -0
- package/components/pixi-frame/src/index.vue.d.ts +445 -9
- package/components/pixi-frame/src/types.d.ts +17 -1
- package/components/pixi-frame/src/useSprite.d.ts +11 -0
- package/components/pixi-frame/src/video.vue.d.ts +185 -0
- package/components/sender/src/index.vue.d.ts +1 -1
- package/components/text/index.d.ts +4 -0
- package/components/text/index.mjs +106 -0
- package/components/text/src/ctx.d.ts +320 -0
- package/components/text/src/index.vue.d.ts +2314 -0
- package/components/text/src/types.d.ts +1 -0
- package/components/typing-markdown/index.css +19 -0
- package/components/typing-markdown/index.mjs +17 -4
- package/components/typing-markdown/src/ctx.d.ts +8 -0
- package/components/typing-markdown/src/index.vue.d.ts +18 -0
- package/components/webworkerAll.mjs +1 -0
- package/index.css +19 -0
- package/package.json +5 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -2,6 +2,25 @@
|
|
|
2
2
|
animation: blink 0.7s infinite;
|
|
3
3
|
content: '|';
|
|
4
4
|
}
|
|
5
|
+
.vk-typing-markdown.is-loading:not(.is-typing) .is-last::after {
|
|
6
|
+
content: '';
|
|
7
|
+
display: inline-block;
|
|
8
|
+
width: 1em;
|
|
9
|
+
text-align: left;
|
|
10
|
+
animation: dotTyping 1.2s steps(4, end) infinite;
|
|
11
|
+
}
|
|
12
|
+
@keyframes dotTyping {
|
|
13
|
+
0% { content: '';
|
|
14
|
+
}
|
|
15
|
+
25% { content: '.';
|
|
16
|
+
}
|
|
17
|
+
50% { content: '..';
|
|
18
|
+
}
|
|
19
|
+
75% { content: '...';
|
|
20
|
+
}
|
|
21
|
+
100% { content: '';
|
|
22
|
+
}
|
|
23
|
+
}
|
|
5
24
|
@keyframes blink {
|
|
6
25
|
0%, 100% {
|
|
7
26
|
opacity: 1;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { noop, computedAsync, debouncedRef } from '@vueuse/core';
|
|
2
|
+
import { useModelComputed } from '@vunk/core/composables';
|
|
2
3
|
import { noop as noop$1 } from '@vunk/shared/function';
|
|
3
4
|
import { defineComponent, ref, computed, watch, createElementBlock, openBlock, normalizeClass } from 'vue';
|
|
4
5
|
import { highlight } from '@vunk/shared/markdown/shiki';
|
|
@@ -155,10 +156,18 @@ const props = {
|
|
|
155
156
|
markdownItSetup: {
|
|
156
157
|
type: Function,
|
|
157
158
|
default: null
|
|
159
|
+
},
|
|
160
|
+
finished: {
|
|
161
|
+
type: Boolean
|
|
162
|
+
},
|
|
163
|
+
loading: {
|
|
164
|
+
type: Boolean,
|
|
165
|
+
default: false
|
|
158
166
|
}
|
|
159
167
|
};
|
|
160
168
|
const emits = {
|
|
161
|
-
typing: null
|
|
169
|
+
"typing": null,
|
|
170
|
+
"update:finished": null
|
|
162
171
|
};
|
|
163
172
|
|
|
164
173
|
var _sfc_main = defineComponent({
|
|
@@ -186,9 +195,12 @@ var _sfc_main = defineComponent({
|
|
|
186
195
|
return !props2.pause && !props2.disabled && currentIndex.value !== props2.source.length;
|
|
187
196
|
});
|
|
188
197
|
const isDebouncedTyping = debouncedRef(isTyping, 100);
|
|
189
|
-
const isFinished =
|
|
198
|
+
const isFinished = useModelComputed({
|
|
199
|
+
default: false,
|
|
200
|
+
key: "finished"
|
|
201
|
+
}, props2, emit);
|
|
190
202
|
function typeWriter() {
|
|
191
|
-
if (props2.pause || props2.disabled) {
|
|
203
|
+
if (props2.pause || props2.disabled || props2.source.length === 0) {
|
|
192
204
|
return;
|
|
193
205
|
}
|
|
194
206
|
if (currentIndex.value < props2.source.length) {
|
|
@@ -225,7 +237,8 @@ const _hoisted_1 = ["innerHTML"];
|
|
|
225
237
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
226
238
|
return openBlock(), createElementBlock("div", {
|
|
227
239
|
class: normalizeClass(["vk-typing-markdown", {
|
|
228
|
-
"is-typing": _ctx.isDebouncedTyping
|
|
240
|
+
"is-typing": _ctx.isDebouncedTyping,
|
|
241
|
+
"is-loading": _ctx.loading
|
|
229
242
|
}]),
|
|
230
243
|
innerHTML: _ctx.htmlText
|
|
231
244
|
}, null, 10, _hoisted_1);
|
|
@@ -27,7 +27,15 @@ export declare const props: {
|
|
|
27
27
|
type: PropType<(md: MarkdownItAsync) => void>;
|
|
28
28
|
default: null;
|
|
29
29
|
};
|
|
30
|
+
finished: {
|
|
31
|
+
type: BooleanConstructor;
|
|
32
|
+
};
|
|
33
|
+
loading: {
|
|
34
|
+
type: BooleanConstructor;
|
|
35
|
+
default: boolean;
|
|
36
|
+
};
|
|
30
37
|
};
|
|
31
38
|
export declare const emits: {
|
|
32
39
|
typing: null;
|
|
40
|
+
'update:finished': null;
|
|
33
41
|
};
|
|
@@ -19,11 +19,19 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
19
19
|
type: import("vue").PropType<(md: import("markdown-it-async").MarkdownItAsync) => void>;
|
|
20
20
|
default: null;
|
|
21
21
|
};
|
|
22
|
+
finished: {
|
|
23
|
+
type: BooleanConstructor;
|
|
24
|
+
};
|
|
25
|
+
loading: {
|
|
26
|
+
type: BooleanConstructor;
|
|
27
|
+
default: boolean;
|
|
28
|
+
};
|
|
22
29
|
}>, {
|
|
23
30
|
htmlText: import("vue").Ref<string, string>;
|
|
24
31
|
isDebouncedTyping: Readonly<import("vue").Ref<boolean, boolean>>;
|
|
25
32
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
26
33
|
typing: null;
|
|
34
|
+
'update:finished': null;
|
|
27
35
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
28
36
|
source: {
|
|
29
37
|
type: StringConstructor;
|
|
@@ -45,13 +53,23 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
45
53
|
type: import("vue").PropType<(md: import("markdown-it-async").MarkdownItAsync) => void>;
|
|
46
54
|
default: null;
|
|
47
55
|
};
|
|
56
|
+
finished: {
|
|
57
|
+
type: BooleanConstructor;
|
|
58
|
+
};
|
|
59
|
+
loading: {
|
|
60
|
+
type: BooleanConstructor;
|
|
61
|
+
default: boolean;
|
|
62
|
+
};
|
|
48
63
|
}>> & Readonly<{
|
|
49
64
|
onTyping?: ((...args: any[]) => any) | undefined;
|
|
65
|
+
"onUpdate:finished"?: ((...args: any[]) => any) | undefined;
|
|
50
66
|
}>, {
|
|
51
67
|
source: string;
|
|
52
68
|
delay: number;
|
|
53
69
|
pause: boolean;
|
|
54
70
|
disabled: boolean;
|
|
55
71
|
markdownItSetup: (md: import("markdown-it-async").MarkdownItAsync) => void;
|
|
72
|
+
finished: boolean;
|
|
73
|
+
loading: boolean;
|
|
56
74
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
57
75
|
export default _default;
|
package/index.css
CHANGED
|
@@ -194,6 +194,25 @@
|
|
|
194
194
|
animation: blink 0.7s infinite;
|
|
195
195
|
content: '|';
|
|
196
196
|
}
|
|
197
|
+
.vk-typing-markdown.is-loading:not(.is-typing) .is-last::after {
|
|
198
|
+
content: '';
|
|
199
|
+
display: inline-block;
|
|
200
|
+
width: 1em;
|
|
201
|
+
text-align: left;
|
|
202
|
+
animation: dotTyping 1.2s steps(4, end) infinite;
|
|
203
|
+
}
|
|
204
|
+
@keyframes dotTyping {
|
|
205
|
+
0% { content: '';
|
|
206
|
+
}
|
|
207
|
+
25% { content: '.';
|
|
208
|
+
}
|
|
209
|
+
50% { content: '..';
|
|
210
|
+
}
|
|
211
|
+
75% { content: '...';
|
|
212
|
+
}
|
|
213
|
+
100% { content: '';
|
|
214
|
+
}
|
|
215
|
+
}
|
|
197
216
|
@keyframes blink {
|
|
198
217
|
0%, 100% {
|
|
199
218
|
opacity: 1;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vunk/plus",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.5.1",
|
|
4
4
|
"description": "",
|
|
5
5
|
"author": "",
|
|
6
6
|
"license": "ISC",
|
|
@@ -59,6 +59,10 @@
|
|
|
59
59
|
"import": "./components/typing-markdown/index.mjs",
|
|
60
60
|
"types": "./components/typing-markdown/index.d.ts"
|
|
61
61
|
},
|
|
62
|
+
"./components/text": {
|
|
63
|
+
"import": "./components/text/index.mjs",
|
|
64
|
+
"types": "./components/text/index.d.ts"
|
|
65
|
+
},
|
|
62
66
|
"./components/tables-v1-checkbox": {
|
|
63
67
|
"import": "./components/tables-v1-checkbox/index.mjs",
|
|
64
68
|
"types": "./components/tables-v1-checkbox/index.d.ts"
|