zartui 3.1.55 → 3.1.57
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/es/hierarchy-select/HierarchySelect.mjs +1 -1
- package/es/index.d.ts +1 -1
- package/es/index.mjs +1 -1
- package/es/speech-recognizer/SpeechRecognizer.d.ts +6 -1
- package/es/speech-recognizer/SpeechRecognizer.mjs +5 -2
- package/es/speech-recognizer/index.d.ts +5 -1
- package/es/speech-recognizer/recorder.d.ts +1 -1
- package/es/speech-recognizer/recorder.mjs +5 -1
- package/lib/hierarchy-select/HierarchySelect.js +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.js +1 -1
- package/lib/speech-recognizer/SpeechRecognizer.d.ts +6 -1
- package/lib/speech-recognizer/SpeechRecognizer.js +5 -2
- package/lib/speech-recognizer/index.d.ts +5 -1
- package/lib/speech-recognizer/recorder.d.ts +1 -1
- package/lib/speech-recognizer/recorder.js +5 -1
- package/lib/web-types.json +1 -1
- package/lib/zartui.cjs.js +12 -5
- package/lib/zartui.es.js +12 -5
- package/lib/zartui.js +12 -5
- package/lib/zartui.min.js +1 -1
- package/package.json +3 -3
|
@@ -277,7 +277,7 @@ var stdin_default = defineComponent({
|
|
|
277
277
|
if (!props.autoChangeToChildren) {
|
|
278
278
|
return item && (item == null ? void 0 : item.children);
|
|
279
279
|
}
|
|
280
|
-
return props.asyncGetter && (item == null ? void 0 : item.children) || !props.asyncGetter && ((_a = item == null ? void 0 : item.children) == null ? void 0 : _a.length);
|
|
280
|
+
return props.asyncGetter && (item == null ? void 0 : item.children) || !props.asyncGetter && !!((_a = item == null ? void 0 : item.children) == null ? void 0 : _a.length);
|
|
281
281
|
};
|
|
282
282
|
const getToSubDisabled = (item) => {
|
|
283
283
|
var _a;
|
package/es/index.d.ts
CHANGED
package/es/index.mjs
CHANGED
|
@@ -77,7 +77,7 @@ import { Timeline } from "./timeline/index.mjs";
|
|
|
77
77
|
import { Toast } from "./toast/index.mjs";
|
|
78
78
|
import { Uploader } from "./uploader/index.mjs";
|
|
79
79
|
import { Video } from "./video/index.mjs";
|
|
80
|
-
const version = "3.1.
|
|
80
|
+
const version = "3.1.56";
|
|
81
81
|
function install(app) {
|
|
82
82
|
const components = [
|
|
83
83
|
ActionSheet,
|
|
@@ -2,6 +2,7 @@ import { ExtractPropTypes } from "vue";
|
|
|
2
2
|
declare const speechRecognizerProps: {
|
|
3
3
|
title: StringConstructor;
|
|
4
4
|
value: StringConstructor;
|
|
5
|
+
type: StringConstructor;
|
|
5
6
|
show: BooleanConstructor;
|
|
6
7
|
closeOnPopstate: {
|
|
7
8
|
type: BooleanConstructor;
|
|
@@ -16,6 +17,7 @@ export type speechRecognizerProps = ExtractPropTypes<typeof speechRecognizerProp
|
|
|
16
17
|
declare const _default: import("vue").DefineComponent<ExtractPropTypes<{
|
|
17
18
|
title: StringConstructor;
|
|
18
19
|
value: StringConstructor;
|
|
20
|
+
type: StringConstructor;
|
|
19
21
|
show: BooleanConstructor;
|
|
20
22
|
closeOnPopstate: {
|
|
21
23
|
type: BooleanConstructor;
|
|
@@ -25,9 +27,10 @@ declare const _default: import("vue").DefineComponent<ExtractPropTypes<{
|
|
|
25
27
|
type: BooleanConstructor;
|
|
26
28
|
default: true;
|
|
27
29
|
};
|
|
28
|
-
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("change" | "close" | "update:show" | "confirm" | "update:value")[], "change" | "close" | "update:show" | "confirm" | "update:value", import("vue").PublicProps, Readonly<ExtractPropTypes<{
|
|
30
|
+
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("onTouchend" | "onTouchstart" | "change" | "close" | "update:show" | "confirm" | "update:value")[], "onTouchend" | "onTouchstart" | "change" | "close" | "update:show" | "confirm" | "update:value", import("vue").PublicProps, Readonly<ExtractPropTypes<{
|
|
29
31
|
title: StringConstructor;
|
|
30
32
|
value: StringConstructor;
|
|
33
|
+
type: StringConstructor;
|
|
31
34
|
show: BooleanConstructor;
|
|
32
35
|
closeOnPopstate: {
|
|
33
36
|
type: BooleanConstructor;
|
|
@@ -42,6 +45,8 @@ declare const _default: import("vue").DefineComponent<ExtractPropTypes<{
|
|
|
42
45
|
onClose?: ((...args: any[]) => any) | undefined;
|
|
43
46
|
"onUpdate:show"?: ((...args: any[]) => any) | undefined;
|
|
44
47
|
onConfirm?: ((...args: any[]) => any) | undefined;
|
|
48
|
+
onOnTouchend?: ((...args: any[]) => any) | undefined;
|
|
49
|
+
onOnTouchstart?: ((...args: any[]) => any) | undefined;
|
|
45
50
|
"onUpdate:value"?: ((...args: any[]) => any) | undefined;
|
|
46
51
|
}>, {
|
|
47
52
|
show: boolean;
|
|
@@ -8,6 +8,7 @@ const [name, bem] = createNamespace("speech-recognizer");
|
|
|
8
8
|
const speechRecognizerProps = {
|
|
9
9
|
title: String,
|
|
10
10
|
value: String,
|
|
11
|
+
type: String,
|
|
11
12
|
show: Boolean,
|
|
12
13
|
closeOnPopstate: truthProp,
|
|
13
14
|
closeOnClickOverlay: truthProp
|
|
@@ -15,7 +16,7 @@ const speechRecognizerProps = {
|
|
|
15
16
|
var stdin_default = defineComponent({
|
|
16
17
|
name,
|
|
17
18
|
props: speechRecognizerProps,
|
|
18
|
-
emits: ["change", "confirm", "close", "update:show", "update:value"],
|
|
19
|
+
emits: ["change", "confirm", "close", "update:show", "update:value", "onTouchstart", "onTouchend"],
|
|
19
20
|
setup(props, {
|
|
20
21
|
emit,
|
|
21
22
|
slots
|
|
@@ -25,7 +26,7 @@ var stdin_default = defineComponent({
|
|
|
25
26
|
const {
|
|
26
27
|
startRecording,
|
|
27
28
|
stopRecording
|
|
28
|
-
} = useRecorder(emit);
|
|
29
|
+
} = useRecorder(emit, props.type);
|
|
29
30
|
const modelValue = computed({
|
|
30
31
|
get: () => props.value,
|
|
31
32
|
set: (val) => {
|
|
@@ -130,12 +131,14 @@ var stdin_default = defineComponent({
|
|
|
130
131
|
e.preventDefault();
|
|
131
132
|
};
|
|
132
133
|
const onTouchstart = () => {
|
|
134
|
+
emit("onTouchstart");
|
|
133
135
|
isPlaying.value = true;
|
|
134
136
|
startRecording();
|
|
135
137
|
};
|
|
136
138
|
const onTouchend = () => {
|
|
137
139
|
isPlaying.value = false;
|
|
138
140
|
stopRecording();
|
|
141
|
+
emit("onTouchend");
|
|
139
142
|
};
|
|
140
143
|
const renderPlay = () => {
|
|
141
144
|
const text = props.value ? props.value : "\u8BF7\u8BF4\u8BDD";
|
|
@@ -2,6 +2,7 @@ import { speechRecognizerProps } from './SpeechRecognizer';
|
|
|
2
2
|
export declare const SpeechRecognizer: import("../utils").WithInstall<import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
3
3
|
title: StringConstructor;
|
|
4
4
|
value: StringConstructor;
|
|
5
|
+
type: StringConstructor;
|
|
5
6
|
show: BooleanConstructor;
|
|
6
7
|
closeOnPopstate: {
|
|
7
8
|
type: BooleanConstructor;
|
|
@@ -11,9 +12,10 @@ export declare const SpeechRecognizer: import("../utils").WithInstall<import("vu
|
|
|
11
12
|
type: BooleanConstructor;
|
|
12
13
|
default: true;
|
|
13
14
|
};
|
|
14
|
-
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("change" | "close" | "update:show" | "confirm" | "update:value")[], "change" | "close" | "update:show" | "confirm" | "update:value", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
15
|
+
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("onTouchend" | "onTouchstart" | "change" | "close" | "update:show" | "confirm" | "update:value")[], "onTouchend" | "onTouchstart" | "change" | "close" | "update:show" | "confirm" | "update:value", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
15
16
|
title: StringConstructor;
|
|
16
17
|
value: StringConstructor;
|
|
18
|
+
type: StringConstructor;
|
|
17
19
|
show: BooleanConstructor;
|
|
18
20
|
closeOnPopstate: {
|
|
19
21
|
type: BooleanConstructor;
|
|
@@ -28,6 +30,8 @@ export declare const SpeechRecognizer: import("../utils").WithInstall<import("vu
|
|
|
28
30
|
onClose?: ((...args: any[]) => any) | undefined;
|
|
29
31
|
"onUpdate:show"?: ((...args: any[]) => any) | undefined;
|
|
30
32
|
onConfirm?: ((...args: any[]) => any) | undefined;
|
|
33
|
+
onOnTouchend?: ((...args: any[]) => any) | undefined;
|
|
34
|
+
onOnTouchstart?: ((...args: any[]) => any) | undefined;
|
|
31
35
|
"onUpdate:value"?: ((...args: any[]) => any) | undefined;
|
|
32
36
|
}>, {
|
|
33
37
|
show: boolean;
|
|
@@ -20,7 +20,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
20
20
|
};
|
|
21
21
|
import { ref } from "vue";
|
|
22
22
|
import { showFailToast } from "../toast/index.mjs";
|
|
23
|
-
function useRecorder(emit) {
|
|
23
|
+
function useRecorder(emit, type = "") {
|
|
24
24
|
const recordedBlobs = ref([]);
|
|
25
25
|
const mediaRecorder = ref();
|
|
26
26
|
if (!navigator.mediaDevices) {
|
|
@@ -55,6 +55,10 @@ function useRecorder(emit) {
|
|
|
55
55
|
mediaRecorder.value.ondataavailable = (event) => {
|
|
56
56
|
if (event.data && event.data.size > 0) {
|
|
57
57
|
recordedBlobs.value.push(event.data);
|
|
58
|
+
if (type === "raw") {
|
|
59
|
+
emit("change", recordedBlobs.value);
|
|
60
|
+
return;
|
|
61
|
+
}
|
|
58
62
|
const blob = new Blob(recordedBlobs.value, { type: "audio/wav" });
|
|
59
63
|
convertBlobToBase64(blob);
|
|
60
64
|
}
|
|
@@ -309,7 +309,7 @@ var stdin_default = (0, import_vue.defineComponent)({
|
|
|
309
309
|
if (!props.autoChangeToChildren) {
|
|
310
310
|
return item && (item == null ? void 0 : item.children);
|
|
311
311
|
}
|
|
312
|
-
return props.asyncGetter && (item == null ? void 0 : item.children) || !props.asyncGetter && ((_a = item == null ? void 0 : item.children) == null ? void 0 : _a.length);
|
|
312
|
+
return props.asyncGetter && (item == null ? void 0 : item.children) || !props.asyncGetter && !!((_a = item == null ? void 0 : item.children) == null ? void 0 : _a.length);
|
|
313
313
|
};
|
|
314
314
|
const getToSubDisabled = (item) => {
|
|
315
315
|
var _a;
|
package/lib/index.d.ts
CHANGED
package/lib/index.js
CHANGED
|
@@ -182,7 +182,7 @@ __reExport(stdin_exports, require("./timeline"), module.exports);
|
|
|
182
182
|
__reExport(stdin_exports, require("./toast"), module.exports);
|
|
183
183
|
__reExport(stdin_exports, require("./uploader"), module.exports);
|
|
184
184
|
__reExport(stdin_exports, require("./video"), module.exports);
|
|
185
|
-
const version = "3.1.
|
|
185
|
+
const version = "3.1.56";
|
|
186
186
|
function install(app) {
|
|
187
187
|
const components = [
|
|
188
188
|
import_action_sheet.ActionSheet,
|
|
@@ -2,6 +2,7 @@ import { ExtractPropTypes } from "vue";
|
|
|
2
2
|
declare const speechRecognizerProps: {
|
|
3
3
|
title: StringConstructor;
|
|
4
4
|
value: StringConstructor;
|
|
5
|
+
type: StringConstructor;
|
|
5
6
|
show: BooleanConstructor;
|
|
6
7
|
closeOnPopstate: {
|
|
7
8
|
type: BooleanConstructor;
|
|
@@ -16,6 +17,7 @@ export type speechRecognizerProps = ExtractPropTypes<typeof speechRecognizerProp
|
|
|
16
17
|
declare const _default: import("vue").DefineComponent<ExtractPropTypes<{
|
|
17
18
|
title: StringConstructor;
|
|
18
19
|
value: StringConstructor;
|
|
20
|
+
type: StringConstructor;
|
|
19
21
|
show: BooleanConstructor;
|
|
20
22
|
closeOnPopstate: {
|
|
21
23
|
type: BooleanConstructor;
|
|
@@ -25,9 +27,10 @@ declare const _default: import("vue").DefineComponent<ExtractPropTypes<{
|
|
|
25
27
|
type: BooleanConstructor;
|
|
26
28
|
default: true;
|
|
27
29
|
};
|
|
28
|
-
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("change" | "close" | "update:show" | "confirm" | "update:value")[], "change" | "close" | "update:show" | "confirm" | "update:value", import("vue").PublicProps, Readonly<ExtractPropTypes<{
|
|
30
|
+
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("onTouchend" | "onTouchstart" | "change" | "close" | "update:show" | "confirm" | "update:value")[], "onTouchend" | "onTouchstart" | "change" | "close" | "update:show" | "confirm" | "update:value", import("vue").PublicProps, Readonly<ExtractPropTypes<{
|
|
29
31
|
title: StringConstructor;
|
|
30
32
|
value: StringConstructor;
|
|
33
|
+
type: StringConstructor;
|
|
31
34
|
show: BooleanConstructor;
|
|
32
35
|
closeOnPopstate: {
|
|
33
36
|
type: BooleanConstructor;
|
|
@@ -42,6 +45,8 @@ declare const _default: import("vue").DefineComponent<ExtractPropTypes<{
|
|
|
42
45
|
onClose?: ((...args: any[]) => any) | undefined;
|
|
43
46
|
"onUpdate:show"?: ((...args: any[]) => any) | undefined;
|
|
44
47
|
onConfirm?: ((...args: any[]) => any) | undefined;
|
|
48
|
+
onOnTouchend?: ((...args: any[]) => any) | undefined;
|
|
49
|
+
onOnTouchstart?: ((...args: any[]) => any) | undefined;
|
|
45
50
|
"onUpdate:value"?: ((...args: any[]) => any) | undefined;
|
|
46
51
|
}>, {
|
|
47
52
|
show: boolean;
|
|
@@ -40,6 +40,7 @@ const [name, bem] = (0, import_utils.createNamespace)("speech-recognizer");
|
|
|
40
40
|
const speechRecognizerProps = {
|
|
41
41
|
title: String,
|
|
42
42
|
value: String,
|
|
43
|
+
type: String,
|
|
43
44
|
show: Boolean,
|
|
44
45
|
closeOnPopstate: import_utils.truthProp,
|
|
45
46
|
closeOnClickOverlay: import_utils.truthProp
|
|
@@ -47,7 +48,7 @@ const speechRecognizerProps = {
|
|
|
47
48
|
var stdin_default = (0, import_vue.defineComponent)({
|
|
48
49
|
name,
|
|
49
50
|
props: speechRecognizerProps,
|
|
50
|
-
emits: ["change", "confirm", "close", "update:show", "update:value"],
|
|
51
|
+
emits: ["change", "confirm", "close", "update:show", "update:value", "onTouchstart", "onTouchend"],
|
|
51
52
|
setup(props, {
|
|
52
53
|
emit,
|
|
53
54
|
slots
|
|
@@ -57,7 +58,7 @@ var stdin_default = (0, import_vue.defineComponent)({
|
|
|
57
58
|
const {
|
|
58
59
|
startRecording,
|
|
59
60
|
stopRecording
|
|
60
|
-
} = (0, import_recorder.useRecorder)(emit);
|
|
61
|
+
} = (0, import_recorder.useRecorder)(emit, props.type);
|
|
61
62
|
const modelValue = (0, import_vue.computed)({
|
|
62
63
|
get: () => props.value,
|
|
63
64
|
set: (val) => {
|
|
@@ -162,12 +163,14 @@ var stdin_default = (0, import_vue.defineComponent)({
|
|
|
162
163
|
e.preventDefault();
|
|
163
164
|
};
|
|
164
165
|
const onTouchstart = () => {
|
|
166
|
+
emit("onTouchstart");
|
|
165
167
|
isPlaying.value = true;
|
|
166
168
|
startRecording();
|
|
167
169
|
};
|
|
168
170
|
const onTouchend = () => {
|
|
169
171
|
isPlaying.value = false;
|
|
170
172
|
stopRecording();
|
|
173
|
+
emit("onTouchend");
|
|
171
174
|
};
|
|
172
175
|
const renderPlay = () => {
|
|
173
176
|
const text = props.value ? props.value : "\u8BF7\u8BF4\u8BDD";
|
|
@@ -2,6 +2,7 @@ import { speechRecognizerProps } from './SpeechRecognizer';
|
|
|
2
2
|
export declare const SpeechRecognizer: import("../utils").WithInstall<import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
3
3
|
title: StringConstructor;
|
|
4
4
|
value: StringConstructor;
|
|
5
|
+
type: StringConstructor;
|
|
5
6
|
show: BooleanConstructor;
|
|
6
7
|
closeOnPopstate: {
|
|
7
8
|
type: BooleanConstructor;
|
|
@@ -11,9 +12,10 @@ export declare const SpeechRecognizer: import("../utils").WithInstall<import("vu
|
|
|
11
12
|
type: BooleanConstructor;
|
|
12
13
|
default: true;
|
|
13
14
|
};
|
|
14
|
-
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("change" | "close" | "update:show" | "confirm" | "update:value")[], "change" | "close" | "update:show" | "confirm" | "update:value", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
15
|
+
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("onTouchend" | "onTouchstart" | "change" | "close" | "update:show" | "confirm" | "update:value")[], "onTouchend" | "onTouchstart" | "change" | "close" | "update:show" | "confirm" | "update:value", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
15
16
|
title: StringConstructor;
|
|
16
17
|
value: StringConstructor;
|
|
18
|
+
type: StringConstructor;
|
|
17
19
|
show: BooleanConstructor;
|
|
18
20
|
closeOnPopstate: {
|
|
19
21
|
type: BooleanConstructor;
|
|
@@ -28,6 +30,8 @@ export declare const SpeechRecognizer: import("../utils").WithInstall<import("vu
|
|
|
28
30
|
onClose?: ((...args: any[]) => any) | undefined;
|
|
29
31
|
"onUpdate:show"?: ((...args: any[]) => any) | undefined;
|
|
30
32
|
onConfirm?: ((...args: any[]) => any) | undefined;
|
|
33
|
+
onOnTouchend?: ((...args: any[]) => any) | undefined;
|
|
34
|
+
onOnTouchstart?: ((...args: any[]) => any) | undefined;
|
|
31
35
|
"onUpdate:value"?: ((...args: any[]) => any) | undefined;
|
|
32
36
|
}>, {
|
|
33
37
|
show: boolean;
|
|
@@ -42,7 +42,7 @@ __export(stdin_exports, {
|
|
|
42
42
|
module.exports = __toCommonJS(stdin_exports);
|
|
43
43
|
var import_vue = require("vue");
|
|
44
44
|
var import_toast = require("../toast");
|
|
45
|
-
function useRecorder(emit) {
|
|
45
|
+
function useRecorder(emit, type = "") {
|
|
46
46
|
const recordedBlobs = (0, import_vue.ref)([]);
|
|
47
47
|
const mediaRecorder = (0, import_vue.ref)();
|
|
48
48
|
if (!navigator.mediaDevices) {
|
|
@@ -77,6 +77,10 @@ function useRecorder(emit) {
|
|
|
77
77
|
mediaRecorder.value.ondataavailable = (event) => {
|
|
78
78
|
if (event.data && event.data.size > 0) {
|
|
79
79
|
recordedBlobs.value.push(event.data);
|
|
80
|
+
if (type === "raw") {
|
|
81
|
+
emit("change", recordedBlobs.value);
|
|
82
|
+
return;
|
|
83
|
+
}
|
|
80
84
|
const blob = new Blob(recordedBlobs.value, { type: "audio/wav" });
|
|
81
85
|
convertBlobToBase64(blob);
|
|
82
86
|
}
|