sveltekit-ui 1.0.69 → 1.0.72
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.
|
@@ -433,23 +433,23 @@ export function create_audio_editor_manager(config) {
|
|
|
433
433
|
if (!response.ok) {
|
|
434
434
|
throw new Error(await response.text())
|
|
435
435
|
}
|
|
436
|
-
let
|
|
436
|
+
let res_body = await response.json()
|
|
437
437
|
let res = {
|
|
438
438
|
tags: null,
|
|
439
439
|
image: null,
|
|
440
440
|
}
|
|
441
|
-
if (
|
|
442
|
-
res.tags = { ...audio_tags_input_base, ...
|
|
443
|
-
if (
|
|
444
|
-
let buffer_data =
|
|
441
|
+
if (res_body?.raw) {
|
|
442
|
+
res.tags = { ...audio_tags_input_base, ...res_body?.raw }
|
|
443
|
+
if (res_body?.raw?.["APIC"]?.imageBuffer) {
|
|
444
|
+
let buffer_data = res_body?.raw?.["APIC"]?.imageBuffer.data
|
|
445
445
|
let uint_8_array = new Uint8Array(buffer_data)
|
|
446
|
-
let blob = new Blob([uint_8_array], { type:
|
|
446
|
+
let blob = new Blob([uint_8_array], { type: res_body?.raw?.["APIC"]?.mime })
|
|
447
447
|
res.image = {
|
|
448
448
|
file: blob,
|
|
449
|
-
type:
|
|
449
|
+
type: res_body?.raw?.["APIC"]?.mime,
|
|
450
450
|
src: URL.createObjectURL(blob),
|
|
451
451
|
size_kb: Math.ceil(blob.size / 1024),
|
|
452
|
-
description:
|
|
452
|
+
description: res_body?.raw?.["APIC"]?.description,
|
|
453
453
|
}
|
|
454
454
|
}
|
|
455
455
|
}
|
|
@@ -553,16 +553,19 @@ export function create_audio_editor_manager(config) {
|
|
|
553
553
|
method: "POST",
|
|
554
554
|
body: form_data,
|
|
555
555
|
})
|
|
556
|
+
console.log("fetch_audio_post_res", response)
|
|
556
557
|
if (!response.ok) {
|
|
557
558
|
let error_mes = await response.text()
|
|
558
559
|
is_loading_generate_audio = false
|
|
559
560
|
error_message = error_mes ?? "Error making audio changes."
|
|
560
561
|
return
|
|
561
562
|
}
|
|
562
|
-
let
|
|
563
|
+
let res_body = await response.json()
|
|
564
|
+
console.log("res_body1", res_body)
|
|
563
565
|
// add to new file to client side temporary_storage data
|
|
564
|
-
let new_audio_src = `${file_prefix}${
|
|
566
|
+
let new_audio_src = `${file_prefix}${res_body?.id}`
|
|
565
567
|
let new_audio_file = await url_to_file(new_audio_src, file_name_derived)
|
|
568
|
+
console.log("new_audio_file", new_audio_file)
|
|
566
569
|
is_loading_generate_audio = false
|
|
567
570
|
is_alt_content_shown = true
|
|
568
571
|
setTimeout(() => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sveltekit-ui",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.72",
|
|
4
4
|
"description": "A SvelteKit UI component library for building modern web applications",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -19,18 +19,18 @@
|
|
|
19
19
|
"dependencies": {
|
|
20
20
|
"context-filter-polyfill": "^0.3.23",
|
|
21
21
|
"qr-code-styling": "^1.9.2",
|
|
22
|
-
"svelte": "^5.39.
|
|
22
|
+
"svelte": "^5.39.8"
|
|
23
23
|
},
|
|
24
24
|
"peerDependencies": {
|
|
25
25
|
"@sveltejs/kit": "^2.22.2"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"@sveltejs/adapter-vercel": "^5.10.2",
|
|
29
|
-
"@sveltejs/kit": "^2.43.
|
|
29
|
+
"@sveltejs/kit": "^2.43.7",
|
|
30
30
|
"@sveltejs/package": "^2.5.4",
|
|
31
31
|
"@sveltejs/vite-plugin-svelte": "^6.2.1",
|
|
32
32
|
"@vercel/analytics": "^1.5.0",
|
|
33
|
-
"typescript": "^5.9.
|
|
33
|
+
"typescript": "^5.9.3",
|
|
34
34
|
"vite": "^7.1.7"
|
|
35
35
|
},
|
|
36
36
|
"homepage": "https://www.sveltekit-ui.com",
|
|
@@ -433,23 +433,23 @@ export function create_audio_editor_manager(config) {
|
|
|
433
433
|
if (!response.ok) {
|
|
434
434
|
throw new Error(await response.text())
|
|
435
435
|
}
|
|
436
|
-
let
|
|
436
|
+
let res_body = await response.json()
|
|
437
437
|
let res = {
|
|
438
438
|
tags: null,
|
|
439
439
|
image: null,
|
|
440
440
|
}
|
|
441
|
-
if (
|
|
442
|
-
res.tags = { ...audio_tags_input_base, ...
|
|
443
|
-
if (
|
|
444
|
-
let buffer_data =
|
|
441
|
+
if (res_body?.raw) {
|
|
442
|
+
res.tags = { ...audio_tags_input_base, ...res_body?.raw }
|
|
443
|
+
if (res_body?.raw?.["APIC"]?.imageBuffer) {
|
|
444
|
+
let buffer_data = res_body?.raw?.["APIC"]?.imageBuffer.data
|
|
445
445
|
let uint_8_array = new Uint8Array(buffer_data)
|
|
446
|
-
let blob = new Blob([uint_8_array], { type:
|
|
446
|
+
let blob = new Blob([uint_8_array], { type: res_body?.raw?.["APIC"]?.mime })
|
|
447
447
|
res.image = {
|
|
448
448
|
file: blob,
|
|
449
|
-
type:
|
|
449
|
+
type: res_body?.raw?.["APIC"]?.mime,
|
|
450
450
|
src: URL.createObjectURL(blob),
|
|
451
451
|
size_kb: Math.ceil(blob.size / 1024),
|
|
452
|
-
description:
|
|
452
|
+
description: res_body?.raw?.["APIC"]?.description,
|
|
453
453
|
}
|
|
454
454
|
}
|
|
455
455
|
}
|
|
@@ -553,16 +553,19 @@ export function create_audio_editor_manager(config) {
|
|
|
553
553
|
method: "POST",
|
|
554
554
|
body: form_data,
|
|
555
555
|
})
|
|
556
|
+
console.log("fetch_audio_post_res", response)
|
|
556
557
|
if (!response.ok) {
|
|
557
558
|
let error_mes = await response.text()
|
|
558
559
|
is_loading_generate_audio = false
|
|
559
560
|
error_message = error_mes ?? "Error making audio changes."
|
|
560
561
|
return
|
|
561
562
|
}
|
|
562
|
-
let
|
|
563
|
+
let res_body = await response.json()
|
|
564
|
+
console.log("res_body1", res_body)
|
|
563
565
|
// add to new file to client side temporary_storage data
|
|
564
|
-
let new_audio_src = `${file_prefix}${
|
|
566
|
+
let new_audio_src = `${file_prefix}${res_body?.id}`
|
|
565
567
|
let new_audio_file = await url_to_file(new_audio_src, file_name_derived)
|
|
568
|
+
console.log("new_audio_file", new_audio_file)
|
|
566
569
|
is_loading_generate_audio = false
|
|
567
570
|
is_alt_content_shown = true
|
|
568
571
|
setTimeout(() => {
|
|
@@ -10,17 +10,17 @@
|
|
|
10
10
|
// method: "POST",
|
|
11
11
|
// body: JSON.stringify({ prompt: input }),
|
|
12
12
|
// })
|
|
13
|
-
// const
|
|
13
|
+
// const res_body = await response.json()
|
|
14
14
|
// if (!response.ok) {
|
|
15
15
|
// return {
|
|
16
16
|
// is_success: false,
|
|
17
|
-
// error_message:
|
|
17
|
+
// error_message: res_body?.message ?? "Error generating image.",
|
|
18
18
|
// }
|
|
19
19
|
// }
|
|
20
20
|
// return {
|
|
21
21
|
// is_success: true,
|
|
22
22
|
// data: {
|
|
23
|
-
// b64_json:
|
|
23
|
+
// b64_json: res_body?.b64_json,
|
|
24
24
|
// },
|
|
25
25
|
// }
|
|
26
26
|
// } catch (err) {
|
|
@@ -42,20 +42,20 @@
|
|
|
42
42
|
// method: "POST",
|
|
43
43
|
// body: form_data,
|
|
44
44
|
// })
|
|
45
|
-
// let
|
|
45
|
+
// let res_body = await response.json()
|
|
46
46
|
// if (!response.ok) {
|
|
47
|
-
// throw new Error(
|
|
47
|
+
// throw new Error(res_body?.message || "Unknown error")
|
|
48
48
|
// }
|
|
49
|
-
// console.log("
|
|
49
|
+
// console.log("res_body33q", res_body)
|
|
50
50
|
// if (!response.ok) {
|
|
51
51
|
// return {
|
|
52
52
|
// is_success: false,
|
|
53
|
-
// error_message:
|
|
53
|
+
// error_message: res_body?.message ?? "Error removing image background.",
|
|
54
54
|
// }
|
|
55
55
|
// }
|
|
56
56
|
// return {
|
|
57
57
|
// is_success: true,
|
|
58
|
-
// data:
|
|
58
|
+
// data: res_body,
|
|
59
59
|
// }
|
|
60
60
|
// } catch (err) {
|
|
61
61
|
// return {
|