sveltekit-ui 1.0.72 → 1.0.74
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/dist/Components/ColorInput/index.svelte.js +23 -20
- package/dist/Components/Qr/index.svelte +33 -11
- package/dist/Components/Qr/index.svelte.js +9 -3
- package/dist/Components/QrInput/index.svelte +3 -1
- package/dist/Components/QrInput/index.svelte.js +20 -16
- package/package.json +3 -3
- package/src/lib/Components/ColorInput/index.svelte.js +23 -20
- package/src/lib/Components/Qr/index.svelte +33 -11
- package/src/lib/Components/Qr/index.svelte.js +9 -3
- package/src/lib/Components/QrInput/index.svelte +3 -1
- package/src/lib/Components/QrInput/index.svelte.js +20 -16
- package/src/routes/+layout.svelte +1 -2
- package/src/routes/+page.svelte +1 -1
- package/src/routes/{[component] → components/[component]}/Showcase/QrInput/index.svelte +0 -4
- package/src/routes/sitemap.xml/+server.js +80 -0
- /package/src/routes/{[component] → components/[component]}/+page.svelte +0 -0
- /package/src/routes/{[component] → components/[component]}/Showcase/Alert/index.svelte +0 -0
- /package/src/routes/{[component] → components/[component]}/Showcase/Audio/index.svelte +0 -0
- /package/src/routes/{[component] → components/[component]}/Showcase/AudioEditor/index.svelte +0 -0
- /package/src/routes/{[component] → components/[component]}/Showcase/AuthCodeInput/index.svelte +0 -0
- /package/src/routes/{[component] → components/[component]}/Showcase/Breadcrumbs/index.svelte +0 -0
- /package/src/routes/{[component] → components/[component]}/Showcase/Button/index.svelte +0 -0
- /package/src/routes/{[component] → components/[component]}/Showcase/Chart/index.svelte +0 -0
- /package/src/routes/{[component] → components/[component]}/Showcase/Checkbox/index.svelte +0 -0
- /package/src/routes/{[component] → components/[component]}/Showcase/Code/index.svelte +0 -0
- /package/src/routes/{[component] → components/[component]}/Showcase/Color/index.svelte +0 -0
- /package/src/routes/{[component] → components/[component]}/Showcase/ColorInput/index.svelte +0 -0
- /package/src/routes/{[component] → components/[component]}/Showcase/ConditionsInput/index.svelte +0 -0
- /package/src/routes/{[component] → components/[component]}/Showcase/Confetti/index.svelte +0 -0
- /package/src/routes/{[component] → components/[component]}/Showcase/Content/index.svelte +0 -0
- /package/src/routes/{[component] → components/[component]}/Showcase/ContentInput/index.svelte +0 -0
- /package/src/routes/{[component] → components/[component]}/Showcase/CronInput/index.svelte +0 -0
- /package/src/routes/{[component] → components/[component]}/Showcase/DocsDefinition/index.svelte +0 -0
- /package/src/routes/{[component] → components/[component]}/Showcase/Dropdown/index.svelte +0 -0
- /package/src/routes/{[component] → components/[component]}/Showcase/FileInput/index.svelte +0 -0
- /package/src/routes/{[component] → components/[component]}/Showcase/Icon/index.svelte +0 -0
- /package/src/routes/{[component] → components/[component]}/Showcase/IconInput/index.svelte +0 -0
- /package/src/routes/{[component] → components/[component]}/Showcase/Image/index.svelte +0 -0
- /package/src/routes/{[component] → components/[component]}/Showcase/ImageEditor/index.svelte +0 -0
- /package/src/routes/{[component] → components/[component]}/Showcase/ImageSlider/index.svelte +0 -0
- /package/src/routes/{[component] → components/[component]}/Showcase/InfoBox/index.svelte +0 -0
- /package/src/routes/{[component] → components/[component]}/Showcase/Json/index.svelte +0 -0
- /package/src/routes/{[component] → components/[component]}/Showcase/LabeledItem/index.svelte +0 -0
- /package/src/routes/{[component] → components/[component]}/Showcase/Link/index.svelte +0 -0
- /package/src/routes/{[component] → components/[component]}/Showcase/LoadingWheel/index.svelte +0 -0
- /package/src/routes/{[component] → components/[component]}/Showcase/Location/index.svelte +0 -0
- /package/src/routes/{[component] → components/[component]}/Showcase/LocationInput/index.svelte +0 -0
- /package/src/routes/{[component] → components/[component]}/Showcase/Number/index.svelte +0 -0
- /package/src/routes/{[component] → components/[component]}/Showcase/Popover/index.svelte +0 -0
- /package/src/routes/{[component] → components/[component]}/Showcase/Qr/index.svelte +0 -0
- /package/src/routes/{[component] → components/[component]}/Showcase/Slider/index.svelte +0 -0
- /package/src/routes/{[component] → components/[component]}/Showcase/Spacer/index.svelte +0 -0
- /package/src/routes/{[component] → components/[component]}/Showcase/StoragePicker/index.svelte +0 -0
- /package/src/routes/{[component] → components/[component]}/Showcase/TableAdvanced/index.svelte +0 -0
- /package/src/routes/{[component] → components/[component]}/Showcase/Tag/index.svelte +0 -0
- /package/src/routes/{[component] → components/[component]}/Showcase/TextArrayInput/index.svelte +0 -0
- /package/src/routes/{[component] → components/[component]}/Showcase/TextInput/index.svelte +0 -0
- /package/src/routes/{[component] → components/[component]}/Showcase/Time/index.svelte +0 -0
- /package/src/routes/{[component] → components/[component]}/Showcase/TimeInput/index.svelte +0 -0
- /package/src/routes/{[component] → components/[component]}/Showcase/Tooltip/index.svelte +0 -0
- /package/src/routes/{[component] → components/[component]}/Showcase/TransparentBackground/index.svelte +0 -0
- /package/src/routes/{[component] → components/[component]}/Showcase/XFollow/index.svelte +0 -0
- /package/src/routes/{[component] → components/[component]}/Showcase/XPost/index.svelte +0 -0
- /package/src/routes/{[component] → components/[component]}/Showcase/YoutubeChannelButton/index.svelte +0 -0
- /package/src/routes/{[component] → components/[component]}/Showcase/YoutubeVideo/index.svelte +0 -0
|
@@ -5,16 +5,30 @@ import { create_popover_manager } from "../Popover/index.svelte.js"
|
|
|
5
5
|
|
|
6
6
|
export function create_color_input_manager(config) {
|
|
7
7
|
const base_range = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24]
|
|
8
|
-
|
|
8
|
+
let val_base = $state({
|
|
9
9
|
l: 19,
|
|
10
10
|
c: 10,
|
|
11
11
|
h: 15,
|
|
12
12
|
o: 24,
|
|
13
13
|
is_dark_theme_invert: true,
|
|
14
|
-
}
|
|
14
|
+
})
|
|
15
15
|
|
|
16
16
|
let id = create_unique_id(null, 20)
|
|
17
17
|
let val = $state(null)
|
|
18
|
+
let is_dark_theme_invert_checkbox_manager = $state(null)
|
|
19
|
+
let popover_manager = $state(null)
|
|
20
|
+
let toggle_button_manager = $state(null)
|
|
21
|
+
let finish_button_manager = $state(null)
|
|
22
|
+
let lightness_up_button_manager = $state(null)
|
|
23
|
+
let lightness_down_button_manager = $state(null)
|
|
24
|
+
let chroma_up_button_manager = $state(null)
|
|
25
|
+
let chroma_down_button_manager = $state(null)
|
|
26
|
+
let hue_up_button_manager = $state(null)
|
|
27
|
+
let hue_down_button_manager = $state(null)
|
|
28
|
+
let opacity_up_button_manager = $state(null)
|
|
29
|
+
let opacity_down_button_manager = $state(null)
|
|
30
|
+
let set_null_button_manager = $state(null)
|
|
31
|
+
|
|
18
32
|
let is_show_opacity = $derived(set_closurable(config?.is_show_opacity, true))
|
|
19
33
|
let l_options = $derived(order_num_options(set_closurable(config?.l_options, base_range)))
|
|
20
34
|
let c_options = $derived(order_num_options(set_closurable(config?.c_options, base_range)))
|
|
@@ -30,20 +44,6 @@ export function create_color_input_manager(config) {
|
|
|
30
44
|
return null
|
|
31
45
|
}
|
|
32
46
|
|
|
33
|
-
let is_dark_theme_invert_checkbox_manager = $state(null)
|
|
34
|
-
let popover_manager = $state(null)
|
|
35
|
-
let toggle_button_manager = $state(null)
|
|
36
|
-
let finish_button_manager = $state(null)
|
|
37
|
-
let lightness_up_button_manager = $state(null)
|
|
38
|
-
let lightness_down_button_manager = $state(null)
|
|
39
|
-
let chroma_up_button_manager = $state(null)
|
|
40
|
-
let chroma_down_button_manager = $state(null)
|
|
41
|
-
let hue_up_button_manager = $state(null)
|
|
42
|
-
let hue_down_button_manager = $state(null)
|
|
43
|
-
let opacity_up_button_manager = $state(null)
|
|
44
|
-
let opacity_down_button_manager = $state(null)
|
|
45
|
-
let set_null_button_manager = $state(null)
|
|
46
|
-
|
|
47
47
|
let css_val = $derived(
|
|
48
48
|
typeof val?.l === "number" && typeof val?.c === "number" && typeof val?.h === "number" && typeof val?.o === "number"
|
|
49
49
|
? `oklch(var(--l${val.l}) var(--c${val.c}) var(--h${val.h}) / var(--o${val.o}))`
|
|
@@ -70,12 +70,12 @@ export function create_color_input_manager(config) {
|
|
|
70
70
|
c: val_static?.c ?? val_base?.c,
|
|
71
71
|
h: val_static?.h ?? val_base?.h,
|
|
72
72
|
o: val_static?.o ?? val_base?.o,
|
|
73
|
-
is_dark_theme_invert: val_static?.is_dark_theme_invert ??
|
|
73
|
+
is_dark_theme_invert: val_static?.is_dark_theme_invert ?? is_dark_theme_invert_checkbox_manager?.val,
|
|
74
74
|
}
|
|
75
75
|
} else {
|
|
76
76
|
val = null
|
|
77
77
|
}
|
|
78
|
-
is_dark_theme_invert_checkbox_manager.set_val(val?.is_dark_theme_invert)
|
|
78
|
+
is_dark_theme_invert_checkbox_manager.set_val(val?.is_dark_theme_invert ?? val_base?.is_dark_theme_invert)
|
|
79
79
|
if (config?.on_change) {
|
|
80
80
|
config?.on_change(val)
|
|
81
81
|
}
|
|
@@ -183,8 +183,9 @@ export function create_color_input_manager(config) {
|
|
|
183
183
|
}
|
|
184
184
|
|
|
185
185
|
function init(config) {
|
|
186
|
+
val_base.is_dark_theme_invert = config?.is_dark_theme_invert
|
|
186
187
|
is_dark_theme_invert_checkbox_manager = create_checkbox_manager({
|
|
187
|
-
val:
|
|
188
|
+
val: config?.is_dark_theme_invert,
|
|
188
189
|
type: "toggle",
|
|
189
190
|
on_change: (input) => set_is_dark_theme_invert(input),
|
|
190
191
|
})
|
|
@@ -306,7 +307,9 @@ export function create_color_input_manager(config) {
|
|
|
306
307
|
|
|
307
308
|
return {
|
|
308
309
|
id,
|
|
309
|
-
val_base
|
|
310
|
+
get val_base() {
|
|
311
|
+
return val_base
|
|
312
|
+
},
|
|
310
313
|
get val() {
|
|
311
314
|
return val
|
|
312
315
|
},
|
|
@@ -16,17 +16,26 @@
|
|
|
16
16
|
</script>
|
|
17
17
|
|
|
18
18
|
<div style="display: flex; flex-direction: column; gap: .5rem;">
|
|
19
|
-
<div
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
>
|
|
24
|
-
<div
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
19
|
+
<div
|
|
20
|
+
class="qr_wrap"
|
|
21
|
+
style="--base: {manager?.size}px; --scale: {manager?.scale}; --target: calc(var(--base) * var(--scale));"
|
|
22
|
+
>
|
|
23
|
+
<div class="qr_fit">
|
|
24
|
+
<div
|
|
25
|
+
class="qr_container"
|
|
26
|
+
style="
|
|
27
|
+
width: var(--base);
|
|
28
|
+
height: var(--base);
|
|
29
|
+
background-color: {manager?.background_color};
|
|
30
|
+
border-radius: {manager?.border_radius}rem;
|
|
31
|
+
box-shadow: 0 0 0 {manager?.border_width}px {manager?.border_color};
|
|
32
|
+
"
|
|
33
|
+
>
|
|
34
|
+
<div style="grid-area: stack;" id={`qr_${manager?.id}`}></div>
|
|
35
|
+
{#if !manager?.is_loaded}
|
|
36
|
+
<div class="load"><LoadingWheel color={"var(--g14-t)"} sw={0.4} /></div>
|
|
37
|
+
{/if}
|
|
38
|
+
</div>
|
|
30
39
|
</div>
|
|
31
40
|
</div>
|
|
32
41
|
{#if manager?.is_show_copy}
|
|
@@ -54,6 +63,19 @@
|
|
|
54
63
|
display: grid;
|
|
55
64
|
grid-template-areas: "stack";
|
|
56
65
|
}
|
|
66
|
+
.qr_wrap {
|
|
67
|
+
width: var(--target);
|
|
68
|
+
height: var(--target);
|
|
69
|
+
position: relative;
|
|
70
|
+
}
|
|
71
|
+
.qr_fit {
|
|
72
|
+
position: absolute;
|
|
73
|
+
inset: 0;
|
|
74
|
+
width: var(--base);
|
|
75
|
+
height: var(--base);
|
|
76
|
+
transform: scale(var(--scale));
|
|
77
|
+
transform-origin: top left;
|
|
78
|
+
}
|
|
57
79
|
.load {
|
|
58
80
|
grid-area: stack;
|
|
59
81
|
width: 50%;
|
|
@@ -7,6 +7,7 @@ export function create_qr_manager(config) {
|
|
|
7
7
|
const id = create_unique_id(null, 20)
|
|
8
8
|
let margin = $state(null)
|
|
9
9
|
let size = $state(null)
|
|
10
|
+
let display_size = $state(200)
|
|
10
11
|
let image_size = $state(null)
|
|
11
12
|
let type_number = $state(null)
|
|
12
13
|
let error_correction_level = $state(null)
|
|
@@ -20,7 +21,6 @@ export function create_qr_manager(config) {
|
|
|
20
21
|
let image = $state(null)
|
|
21
22
|
let extension = $state(null)
|
|
22
23
|
let quality = $state(null)
|
|
23
|
-
|
|
24
24
|
let copy_button_manager = $state(null)
|
|
25
25
|
let download_button_manager = $state(null)
|
|
26
26
|
let extention_dropdown_manager = $state(null)
|
|
@@ -31,6 +31,8 @@ export function create_qr_manager(config) {
|
|
|
31
31
|
let is_show_copy = $derived(set_closurable(config?.is_show_copy, false))
|
|
32
32
|
let is_show_download = $derived(set_closurable(config?.is_show_download, false))
|
|
33
33
|
|
|
34
|
+
let scale = $derived(display_size && size ? display_size / size : 0.25)
|
|
35
|
+
|
|
34
36
|
function get_options() {
|
|
35
37
|
// convert "var(--primary-t)" to css the works for qr_ download like oklch(0.67 0.26 203)
|
|
36
38
|
const color_css = get_css_variable_value(color)
|
|
@@ -136,13 +138,14 @@ export function create_qr_manager(config) {
|
|
|
136
138
|
|
|
137
139
|
function set_options(input) {
|
|
138
140
|
margin = input?.margin ?? 10
|
|
139
|
-
size = input?.size ??
|
|
141
|
+
size = input?.size ?? 800
|
|
142
|
+
display_size = input?.display_size ?? 200
|
|
140
143
|
image_size = input?.image_size ?? 0.5
|
|
141
144
|
type_number = input?.type_number ?? 0
|
|
142
145
|
error_correction_level = input?.error_correction_level ?? "Q"
|
|
143
146
|
color = color_to_css(input?.color ?? "var(--primary-t)")
|
|
144
147
|
corner_color = color_to_css(input?.corner_color ?? "color-mix(in oklab, var(--primary-t), var(--bg) 20%)")
|
|
145
|
-
background_color = color_to_css(input?.background_color ?? "
|
|
148
|
+
background_color = color_to_css(input?.background_color ?? "#ffffff00")
|
|
146
149
|
border_color = color_to_css(input?.border_color ?? "var(--shadow7-t)")
|
|
147
150
|
border_radius = input?.border_radius ?? (size + 2 * margin) / 100
|
|
148
151
|
border_width = input?.border_width ?? 1
|
|
@@ -287,6 +290,9 @@ export function create_qr_manager(config) {
|
|
|
287
290
|
get error_message() {
|
|
288
291
|
return error_message
|
|
289
292
|
},
|
|
293
|
+
get scale() {
|
|
294
|
+
return scale
|
|
295
|
+
},
|
|
290
296
|
init,
|
|
291
297
|
on_mount,
|
|
292
298
|
download,
|
|
@@ -40,6 +40,8 @@
|
|
|
40
40
|
<div style="border: 1px solid var(--shadow4-t); border-radius: 1rem; padding: 1rem;">
|
|
41
41
|
<h2>Result</h2>
|
|
42
42
|
<Button manager={manager?.set_changes_button_manager} />
|
|
43
|
-
<
|
|
43
|
+
<div>
|
|
44
|
+
<Qr manager={manager?.qr_manager} />
|
|
45
|
+
</div>
|
|
44
46
|
</div>
|
|
45
47
|
</div>
|
|
@@ -44,23 +44,23 @@ export function create_qr_input_manager(config) {
|
|
|
44
44
|
})
|
|
45
45
|
|
|
46
46
|
function set_changes() {
|
|
47
|
-
qr_manager.update(val)
|
|
47
|
+
qr_manager.update({ ...val, display_size: 280 })
|
|
48
48
|
}
|
|
49
49
|
|
|
50
50
|
function init(config) {
|
|
51
51
|
margin_slider_manager = create_slider_manager({
|
|
52
52
|
label: "Margin",
|
|
53
53
|
min: 0,
|
|
54
|
-
max:
|
|
54
|
+
max: 100,
|
|
55
55
|
step: 1,
|
|
56
|
-
val: config?.val?.margin ??
|
|
56
|
+
val: config?.val?.margin ?? 40,
|
|
57
57
|
})
|
|
58
58
|
size_slider_manager = create_slider_manager({
|
|
59
59
|
label: "Size",
|
|
60
|
-
min:
|
|
61
|
-
max:
|
|
60
|
+
min: 100,
|
|
61
|
+
max: 2000,
|
|
62
62
|
step: 1,
|
|
63
|
-
val: config?.val?.size ??
|
|
63
|
+
val: config?.val?.size ?? 1000,
|
|
64
64
|
})
|
|
65
65
|
image_size_slider_manager = create_slider_manager({
|
|
66
66
|
label: "Image Size",
|
|
@@ -78,16 +78,16 @@ export function create_qr_input_manager(config) {
|
|
|
78
78
|
border_radius_slider_manager = create_slider_manager({
|
|
79
79
|
label: "Border Radius",
|
|
80
80
|
min: 0,
|
|
81
|
-
max:
|
|
82
|
-
step:
|
|
83
|
-
val: config?.val?.border_radius ??
|
|
81
|
+
max: 50,
|
|
82
|
+
step: 1,
|
|
83
|
+
val: config?.val?.border_radius ?? 10,
|
|
84
84
|
})
|
|
85
85
|
border_width_slider_manager = create_slider_manager({
|
|
86
86
|
label: "Border Width",
|
|
87
87
|
min: 0,
|
|
88
|
-
max:
|
|
88
|
+
max: 10,
|
|
89
89
|
step: 1,
|
|
90
|
-
val: config?.val?.border_width ??
|
|
90
|
+
val: config?.val?.border_width ?? 5,
|
|
91
91
|
})
|
|
92
92
|
error_correction_level_dropdown_manager = create_dropdown_manager({
|
|
93
93
|
is_button_compressed: true,
|
|
@@ -101,22 +101,26 @@ export function create_qr_input_manager(config) {
|
|
|
101
101
|
})
|
|
102
102
|
color_manager = create_color_input_manager({
|
|
103
103
|
is_show_opacity: false,
|
|
104
|
-
|
|
104
|
+
is_dark_theme_invert: false,
|
|
105
|
+
l_options: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25],
|
|
105
106
|
val: config?.val?.color ?? null,
|
|
106
107
|
})
|
|
107
108
|
corner_color_manager = create_color_input_manager({
|
|
108
109
|
is_show_opacity: false,
|
|
109
|
-
|
|
110
|
+
is_dark_theme_invert: false,
|
|
111
|
+
l_options: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25],
|
|
110
112
|
val: config?.val?.corner_color ?? null,
|
|
111
113
|
})
|
|
112
114
|
background_color_manager = create_color_input_manager({
|
|
113
115
|
is_show_opacity: true,
|
|
114
|
-
|
|
116
|
+
is_dark_theme_invert: false,
|
|
117
|
+
l_options: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25],
|
|
115
118
|
val: config?.val?.background_color ?? null,
|
|
116
119
|
})
|
|
117
120
|
border_color_manager = create_color_input_manager({
|
|
118
121
|
is_show_opacity: false,
|
|
119
|
-
|
|
122
|
+
is_dark_theme_invert: false,
|
|
123
|
+
l_options: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25],
|
|
120
124
|
val: config?.val?.border_color ?? null,
|
|
121
125
|
})
|
|
122
126
|
is_show_copy_checkbox_manager = create_checkbox_manager({
|
|
@@ -142,7 +146,7 @@ export function create_qr_input_manager(config) {
|
|
|
142
146
|
<path id="part-2" fill="#1c82ff" fill-rule="nonzero" d="M400.3 328.6c0 22-5.6 41.7-17 59.2a113 113 0 0 1-49.6 41.2 186 186 0 0 1-77.6 14.8c-35.8 0-65.4-6.7-88.7-20.3-16.5-9.7-30-22.7-40.3-39a88.6 88.6 0 0 1-15.4-47.5c0-8.9 3-16.5 9.3-22.9 6.1-6.4 14-9.5 23.6-9.5a28 28 0 0 1 19.7 7.4c5.4 5 10 12.3 13.8 22 4.6 11.6 9.6 21.3 15 29 5.3 7.8 12.9 14.2 22.6 19.3q14.7 7.5 38.4 7.5c21.8 0 39.6-5 53.2-15.2a45.8 45.8 0 0 0 20.4-38c0-12.1-3.6-22-11-29.4a71 71 0 0 0-28.5-17.3 490 490 0 0 0-46.7-12.6c-26.1-6.1-48-13.2-65.5-21.4a106 106 0 0 1-42-33.5 86.8 86.8 0 0 1-15.4-52.6c0-20 5.4-37.8 16.4-53.3a103 103 0 0 1 47.3-35.8c20.6-8.4 45-12.5 72.8-12.5 22.3 0 41.6 2.7 57.9 8.3a122 122 0 0 1 40.5 22 92 92 0 0 1 23.5 28.9c5 10 7.5 19.9 7.5 29.5 0 8.7-3.1 16.6-9.3 23.6s-14 10.6-23.2 10.6q-12.6 0-19.2-6.3a85 85 0 0 1-14.2-20.7 94 94 0 0 0-23.8-32.1c-9.3-7.7-24.1-11.5-44.6-11.5-19 0-34.3 4.1-46 12.5-11.6 8.3-17.5 18.3-17.5 30 0 7.3 2 13.6 6 19a50 50 0 0 0 16.3 13.5c7 3.8 14 6.8 21.1 9 7.1 2.1 18.8 5.2 35.2 9.4 20.5 4.8 39 10 55.6 15.8a169 169 0 0 1 42.4 21.1 86.6 86.6 0 0 1 27.3 31.3c6.5 12.7 9.7 28.2 9.7 46.5"/>
|
|
143
147
|
</svg>`,
|
|
144
148
|
})
|
|
145
|
-
qr_manager = create_qr_manager(val)
|
|
149
|
+
qr_manager = create_qr_manager({ ...val, display_size: 280 })
|
|
146
150
|
set_changes_button_manager = create_button_manager({
|
|
147
151
|
c: 1,
|
|
148
152
|
l: 0,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sveltekit-ui",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.74",
|
|
4
4
|
"description": "A SvelteKit UI component library for building modern web applications",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -25,13 +25,13 @@
|
|
|
25
25
|
"@sveltejs/kit": "^2.22.2"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
|
-
"@sveltejs/adapter-vercel": "^5.10.
|
|
28
|
+
"@sveltejs/adapter-vercel": "^5.10.3",
|
|
29
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
33
|
"typescript": "^5.9.3",
|
|
34
|
-
"vite": "^7.1.
|
|
34
|
+
"vite": "^7.1.8"
|
|
35
35
|
},
|
|
36
36
|
"homepage": "https://www.sveltekit-ui.com",
|
|
37
37
|
"keywords": [
|
|
@@ -5,16 +5,30 @@ import { create_popover_manager } from "$lib/Components/Popover/index.svelte.js"
|
|
|
5
5
|
|
|
6
6
|
export function create_color_input_manager(config) {
|
|
7
7
|
const base_range = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24]
|
|
8
|
-
|
|
8
|
+
let val_base = $state({
|
|
9
9
|
l: 19,
|
|
10
10
|
c: 10,
|
|
11
11
|
h: 15,
|
|
12
12
|
o: 24,
|
|
13
13
|
is_dark_theme_invert: true,
|
|
14
|
-
}
|
|
14
|
+
})
|
|
15
15
|
|
|
16
16
|
let id = create_unique_id(null, 20)
|
|
17
17
|
let val = $state(null)
|
|
18
|
+
let is_dark_theme_invert_checkbox_manager = $state(null)
|
|
19
|
+
let popover_manager = $state(null)
|
|
20
|
+
let toggle_button_manager = $state(null)
|
|
21
|
+
let finish_button_manager = $state(null)
|
|
22
|
+
let lightness_up_button_manager = $state(null)
|
|
23
|
+
let lightness_down_button_manager = $state(null)
|
|
24
|
+
let chroma_up_button_manager = $state(null)
|
|
25
|
+
let chroma_down_button_manager = $state(null)
|
|
26
|
+
let hue_up_button_manager = $state(null)
|
|
27
|
+
let hue_down_button_manager = $state(null)
|
|
28
|
+
let opacity_up_button_manager = $state(null)
|
|
29
|
+
let opacity_down_button_manager = $state(null)
|
|
30
|
+
let set_null_button_manager = $state(null)
|
|
31
|
+
|
|
18
32
|
let is_show_opacity = $derived(set_closurable(config?.is_show_opacity, true))
|
|
19
33
|
let l_options = $derived(order_num_options(set_closurable(config?.l_options, base_range)))
|
|
20
34
|
let c_options = $derived(order_num_options(set_closurable(config?.c_options, base_range)))
|
|
@@ -30,20 +44,6 @@ export function create_color_input_manager(config) {
|
|
|
30
44
|
return null
|
|
31
45
|
}
|
|
32
46
|
|
|
33
|
-
let is_dark_theme_invert_checkbox_manager = $state(null)
|
|
34
|
-
let popover_manager = $state(null)
|
|
35
|
-
let toggle_button_manager = $state(null)
|
|
36
|
-
let finish_button_manager = $state(null)
|
|
37
|
-
let lightness_up_button_manager = $state(null)
|
|
38
|
-
let lightness_down_button_manager = $state(null)
|
|
39
|
-
let chroma_up_button_manager = $state(null)
|
|
40
|
-
let chroma_down_button_manager = $state(null)
|
|
41
|
-
let hue_up_button_manager = $state(null)
|
|
42
|
-
let hue_down_button_manager = $state(null)
|
|
43
|
-
let opacity_up_button_manager = $state(null)
|
|
44
|
-
let opacity_down_button_manager = $state(null)
|
|
45
|
-
let set_null_button_manager = $state(null)
|
|
46
|
-
|
|
47
47
|
let css_val = $derived(
|
|
48
48
|
typeof val?.l === "number" && typeof val?.c === "number" && typeof val?.h === "number" && typeof val?.o === "number"
|
|
49
49
|
? `oklch(var(--l${val.l}) var(--c${val.c}) var(--h${val.h}) / var(--o${val.o}))`
|
|
@@ -70,12 +70,12 @@ export function create_color_input_manager(config) {
|
|
|
70
70
|
c: val_static?.c ?? val_base?.c,
|
|
71
71
|
h: val_static?.h ?? val_base?.h,
|
|
72
72
|
o: val_static?.o ?? val_base?.o,
|
|
73
|
-
is_dark_theme_invert: val_static?.is_dark_theme_invert ??
|
|
73
|
+
is_dark_theme_invert: val_static?.is_dark_theme_invert ?? is_dark_theme_invert_checkbox_manager?.val,
|
|
74
74
|
}
|
|
75
75
|
} else {
|
|
76
76
|
val = null
|
|
77
77
|
}
|
|
78
|
-
is_dark_theme_invert_checkbox_manager.set_val(val?.is_dark_theme_invert)
|
|
78
|
+
is_dark_theme_invert_checkbox_manager.set_val(val?.is_dark_theme_invert ?? val_base?.is_dark_theme_invert)
|
|
79
79
|
if (config?.on_change) {
|
|
80
80
|
config?.on_change(val)
|
|
81
81
|
}
|
|
@@ -183,8 +183,9 @@ export function create_color_input_manager(config) {
|
|
|
183
183
|
}
|
|
184
184
|
|
|
185
185
|
function init(config) {
|
|
186
|
+
val_base.is_dark_theme_invert = config?.is_dark_theme_invert
|
|
186
187
|
is_dark_theme_invert_checkbox_manager = create_checkbox_manager({
|
|
187
|
-
val:
|
|
188
|
+
val: config?.is_dark_theme_invert,
|
|
188
189
|
type: "toggle",
|
|
189
190
|
on_change: (input) => set_is_dark_theme_invert(input),
|
|
190
191
|
})
|
|
@@ -306,7 +307,9 @@ export function create_color_input_manager(config) {
|
|
|
306
307
|
|
|
307
308
|
return {
|
|
308
309
|
id,
|
|
309
|
-
val_base
|
|
310
|
+
get val_base() {
|
|
311
|
+
return val_base
|
|
312
|
+
},
|
|
310
313
|
get val() {
|
|
311
314
|
return val
|
|
312
315
|
},
|
|
@@ -16,17 +16,26 @@
|
|
|
16
16
|
</script>
|
|
17
17
|
|
|
18
18
|
<div style="display: flex; flex-direction: column; gap: .5rem;">
|
|
19
|
-
<div
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
>
|
|
24
|
-
<div
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
19
|
+
<div
|
|
20
|
+
class="qr_wrap"
|
|
21
|
+
style="--base: {manager?.size}px; --scale: {manager?.scale}; --target: calc(var(--base) * var(--scale));"
|
|
22
|
+
>
|
|
23
|
+
<div class="qr_fit">
|
|
24
|
+
<div
|
|
25
|
+
class="qr_container"
|
|
26
|
+
style="
|
|
27
|
+
width: var(--base);
|
|
28
|
+
height: var(--base);
|
|
29
|
+
background-color: {manager?.background_color};
|
|
30
|
+
border-radius: {manager?.border_radius}rem;
|
|
31
|
+
box-shadow: 0 0 0 {manager?.border_width}px {manager?.border_color};
|
|
32
|
+
"
|
|
33
|
+
>
|
|
34
|
+
<div style="grid-area: stack;" id={`qr_${manager?.id}`}></div>
|
|
35
|
+
{#if !manager?.is_loaded}
|
|
36
|
+
<div class="load"><LoadingWheel color={"var(--g14-t)"} sw={0.4} /></div>
|
|
37
|
+
{/if}
|
|
38
|
+
</div>
|
|
30
39
|
</div>
|
|
31
40
|
</div>
|
|
32
41
|
{#if manager?.is_show_copy}
|
|
@@ -54,6 +63,19 @@
|
|
|
54
63
|
display: grid;
|
|
55
64
|
grid-template-areas: "stack";
|
|
56
65
|
}
|
|
66
|
+
.qr_wrap {
|
|
67
|
+
width: var(--target);
|
|
68
|
+
height: var(--target);
|
|
69
|
+
position: relative;
|
|
70
|
+
}
|
|
71
|
+
.qr_fit {
|
|
72
|
+
position: absolute;
|
|
73
|
+
inset: 0;
|
|
74
|
+
width: var(--base);
|
|
75
|
+
height: var(--base);
|
|
76
|
+
transform: scale(var(--scale));
|
|
77
|
+
transform-origin: top left;
|
|
78
|
+
}
|
|
57
79
|
.load {
|
|
58
80
|
grid-area: stack;
|
|
59
81
|
width: 50%;
|
|
@@ -7,6 +7,7 @@ export function create_qr_manager(config) {
|
|
|
7
7
|
const id = create_unique_id(null, 20)
|
|
8
8
|
let margin = $state(null)
|
|
9
9
|
let size = $state(null)
|
|
10
|
+
let display_size = $state(200)
|
|
10
11
|
let image_size = $state(null)
|
|
11
12
|
let type_number = $state(null)
|
|
12
13
|
let error_correction_level = $state(null)
|
|
@@ -20,7 +21,6 @@ export function create_qr_manager(config) {
|
|
|
20
21
|
let image = $state(null)
|
|
21
22
|
let extension = $state(null)
|
|
22
23
|
let quality = $state(null)
|
|
23
|
-
|
|
24
24
|
let copy_button_manager = $state(null)
|
|
25
25
|
let download_button_manager = $state(null)
|
|
26
26
|
let extention_dropdown_manager = $state(null)
|
|
@@ -31,6 +31,8 @@ export function create_qr_manager(config) {
|
|
|
31
31
|
let is_show_copy = $derived(set_closurable(config?.is_show_copy, false))
|
|
32
32
|
let is_show_download = $derived(set_closurable(config?.is_show_download, false))
|
|
33
33
|
|
|
34
|
+
let scale = $derived(display_size && size ? display_size / size : 0.25)
|
|
35
|
+
|
|
34
36
|
function get_options() {
|
|
35
37
|
// convert "var(--primary-t)" to css the works for qr_ download like oklch(0.67 0.26 203)
|
|
36
38
|
const color_css = get_css_variable_value(color)
|
|
@@ -136,13 +138,14 @@ export function create_qr_manager(config) {
|
|
|
136
138
|
|
|
137
139
|
function set_options(input) {
|
|
138
140
|
margin = input?.margin ?? 10
|
|
139
|
-
size = input?.size ??
|
|
141
|
+
size = input?.size ?? 800
|
|
142
|
+
display_size = input?.display_size ?? 200
|
|
140
143
|
image_size = input?.image_size ?? 0.5
|
|
141
144
|
type_number = input?.type_number ?? 0
|
|
142
145
|
error_correction_level = input?.error_correction_level ?? "Q"
|
|
143
146
|
color = color_to_css(input?.color ?? "var(--primary-t)")
|
|
144
147
|
corner_color = color_to_css(input?.corner_color ?? "color-mix(in oklab, var(--primary-t), var(--bg) 20%)")
|
|
145
|
-
background_color = color_to_css(input?.background_color ?? "
|
|
148
|
+
background_color = color_to_css(input?.background_color ?? "#ffffff00")
|
|
146
149
|
border_color = color_to_css(input?.border_color ?? "var(--shadow7-t)")
|
|
147
150
|
border_radius = input?.border_radius ?? (size + 2 * margin) / 100
|
|
148
151
|
border_width = input?.border_width ?? 1
|
|
@@ -287,6 +290,9 @@ export function create_qr_manager(config) {
|
|
|
287
290
|
get error_message() {
|
|
288
291
|
return error_message
|
|
289
292
|
},
|
|
293
|
+
get scale() {
|
|
294
|
+
return scale
|
|
295
|
+
},
|
|
290
296
|
init,
|
|
291
297
|
on_mount,
|
|
292
298
|
download,
|
|
@@ -40,6 +40,8 @@
|
|
|
40
40
|
<div style="border: 1px solid var(--shadow4-t); border-radius: 1rem; padding: 1rem;">
|
|
41
41
|
<h2>Result</h2>
|
|
42
42
|
<Button manager={manager?.set_changes_button_manager} />
|
|
43
|
-
<
|
|
43
|
+
<div>
|
|
44
|
+
<Qr manager={manager?.qr_manager} />
|
|
45
|
+
</div>
|
|
44
46
|
</div>
|
|
45
47
|
</div>
|
|
@@ -44,23 +44,23 @@ export function create_qr_input_manager(config) {
|
|
|
44
44
|
})
|
|
45
45
|
|
|
46
46
|
function set_changes() {
|
|
47
|
-
qr_manager.update(val)
|
|
47
|
+
qr_manager.update({ ...val, display_size: 280 })
|
|
48
48
|
}
|
|
49
49
|
|
|
50
50
|
function init(config) {
|
|
51
51
|
margin_slider_manager = create_slider_manager({
|
|
52
52
|
label: "Margin",
|
|
53
53
|
min: 0,
|
|
54
|
-
max:
|
|
54
|
+
max: 100,
|
|
55
55
|
step: 1,
|
|
56
|
-
val: config?.val?.margin ??
|
|
56
|
+
val: config?.val?.margin ?? 40,
|
|
57
57
|
})
|
|
58
58
|
size_slider_manager = create_slider_manager({
|
|
59
59
|
label: "Size",
|
|
60
|
-
min:
|
|
61
|
-
max:
|
|
60
|
+
min: 100,
|
|
61
|
+
max: 2000,
|
|
62
62
|
step: 1,
|
|
63
|
-
val: config?.val?.size ??
|
|
63
|
+
val: config?.val?.size ?? 1000,
|
|
64
64
|
})
|
|
65
65
|
image_size_slider_manager = create_slider_manager({
|
|
66
66
|
label: "Image Size",
|
|
@@ -78,16 +78,16 @@ export function create_qr_input_manager(config) {
|
|
|
78
78
|
border_radius_slider_manager = create_slider_manager({
|
|
79
79
|
label: "Border Radius",
|
|
80
80
|
min: 0,
|
|
81
|
-
max:
|
|
82
|
-
step:
|
|
83
|
-
val: config?.val?.border_radius ??
|
|
81
|
+
max: 50,
|
|
82
|
+
step: 1,
|
|
83
|
+
val: config?.val?.border_radius ?? 10,
|
|
84
84
|
})
|
|
85
85
|
border_width_slider_manager = create_slider_manager({
|
|
86
86
|
label: "Border Width",
|
|
87
87
|
min: 0,
|
|
88
|
-
max:
|
|
88
|
+
max: 10,
|
|
89
89
|
step: 1,
|
|
90
|
-
val: config?.val?.border_width ??
|
|
90
|
+
val: config?.val?.border_width ?? 5,
|
|
91
91
|
})
|
|
92
92
|
error_correction_level_dropdown_manager = create_dropdown_manager({
|
|
93
93
|
is_button_compressed: true,
|
|
@@ -101,22 +101,26 @@ export function create_qr_input_manager(config) {
|
|
|
101
101
|
})
|
|
102
102
|
color_manager = create_color_input_manager({
|
|
103
103
|
is_show_opacity: false,
|
|
104
|
-
|
|
104
|
+
is_dark_theme_invert: false,
|
|
105
|
+
l_options: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25],
|
|
105
106
|
val: config?.val?.color ?? null,
|
|
106
107
|
})
|
|
107
108
|
corner_color_manager = create_color_input_manager({
|
|
108
109
|
is_show_opacity: false,
|
|
109
|
-
|
|
110
|
+
is_dark_theme_invert: false,
|
|
111
|
+
l_options: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25],
|
|
110
112
|
val: config?.val?.corner_color ?? null,
|
|
111
113
|
})
|
|
112
114
|
background_color_manager = create_color_input_manager({
|
|
113
115
|
is_show_opacity: true,
|
|
114
|
-
|
|
116
|
+
is_dark_theme_invert: false,
|
|
117
|
+
l_options: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25],
|
|
115
118
|
val: config?.val?.background_color ?? null,
|
|
116
119
|
})
|
|
117
120
|
border_color_manager = create_color_input_manager({
|
|
118
121
|
is_show_opacity: false,
|
|
119
|
-
|
|
122
|
+
is_dark_theme_invert: false,
|
|
123
|
+
l_options: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25],
|
|
120
124
|
val: config?.val?.border_color ?? null,
|
|
121
125
|
})
|
|
122
126
|
is_show_copy_checkbox_manager = create_checkbox_manager({
|
|
@@ -142,7 +146,7 @@ export function create_qr_input_manager(config) {
|
|
|
142
146
|
<path id="part-2" fill="#1c82ff" fill-rule="nonzero" d="M400.3 328.6c0 22-5.6 41.7-17 59.2a113 113 0 0 1-49.6 41.2 186 186 0 0 1-77.6 14.8c-35.8 0-65.4-6.7-88.7-20.3-16.5-9.7-30-22.7-40.3-39a88.6 88.6 0 0 1-15.4-47.5c0-8.9 3-16.5 9.3-22.9 6.1-6.4 14-9.5 23.6-9.5a28 28 0 0 1 19.7 7.4c5.4 5 10 12.3 13.8 22 4.6 11.6 9.6 21.3 15 29 5.3 7.8 12.9 14.2 22.6 19.3q14.7 7.5 38.4 7.5c21.8 0 39.6-5 53.2-15.2a45.8 45.8 0 0 0 20.4-38c0-12.1-3.6-22-11-29.4a71 71 0 0 0-28.5-17.3 490 490 0 0 0-46.7-12.6c-26.1-6.1-48-13.2-65.5-21.4a106 106 0 0 1-42-33.5 86.8 86.8 0 0 1-15.4-52.6c0-20 5.4-37.8 16.4-53.3a103 103 0 0 1 47.3-35.8c20.6-8.4 45-12.5 72.8-12.5 22.3 0 41.6 2.7 57.9 8.3a122 122 0 0 1 40.5 22 92 92 0 0 1 23.5 28.9c5 10 7.5 19.9 7.5 29.5 0 8.7-3.1 16.6-9.3 23.6s-14 10.6-23.2 10.6q-12.6 0-19.2-6.3a85 85 0 0 1-14.2-20.7 94 94 0 0 0-23.8-32.1c-9.3-7.7-24.1-11.5-44.6-11.5-19 0-34.3 4.1-46 12.5-11.6 8.3-17.5 18.3-17.5 30 0 7.3 2 13.6 6 19a50 50 0 0 0 16.3 13.5c7 3.8 14 6.8 21.1 9 7.1 2.1 18.8 5.2 35.2 9.4 20.5 4.8 39 10 55.6 15.8a169 169 0 0 1 42.4 21.1 86.6 86.6 0 0 1 27.3 31.3c6.5 12.7 9.7 28.2 9.7 46.5"/>
|
|
143
147
|
</svg>`,
|
|
144
148
|
})
|
|
145
|
-
qr_manager = create_qr_manager(val)
|
|
149
|
+
qr_manager = create_qr_manager({ ...val, display_size: 280 })
|
|
146
150
|
set_changes_button_manager = create_button_manager({
|
|
147
151
|
c: 1,
|
|
148
152
|
l: 0,
|
|
@@ -46,7 +46,6 @@
|
|
|
46
46
|
{ name: "Cron Input", key: "cron_input" },
|
|
47
47
|
{ name: "Dropdown", key: "dropdown" },
|
|
48
48
|
{ name: "File Input", key: "file_input" },
|
|
49
|
-
// { name: "Function Input", key: "function_input" },
|
|
50
49
|
{ name: "Icon", key: "icon" },
|
|
51
50
|
{ name: "Icon Input", key: "icon_input" },
|
|
52
51
|
{ name: "Image", key: "image" },
|
|
@@ -92,7 +91,7 @@
|
|
|
92
91
|
text: h?.name,
|
|
93
92
|
text_align: "left",
|
|
94
93
|
selected_type: () => (page.params.component === h?.key ? "selected" : null),
|
|
95
|
-
on_click: () => layout_manager.goto_path(
|
|
94
|
+
on_click: () => layout_manager.goto_path(`/components/${h?.key}`),
|
|
96
95
|
})
|
|
97
96
|
)
|
|
98
97
|
|
package/src/routes/+page.svelte
CHANGED
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
const site = "https://www.sveltekit-ui.com"
|
|
2
|
+
|
|
3
|
+
const components = [
|
|
4
|
+
{ name: "Alert", key: "alert" },
|
|
5
|
+
{ name: "Audio", key: "audio" },
|
|
6
|
+
{ name: "Audio Editor", key: "audio_editor" },
|
|
7
|
+
{ name: "Auth Code Input", key: "auth_code_input" },
|
|
8
|
+
{ name: "Breadcrumbs", key: "breadcrumbs" },
|
|
9
|
+
{ name: "Button", key: "button" },
|
|
10
|
+
{ name: "Chart", key: "chart" },
|
|
11
|
+
{ name: "Checkbox", key: "checkbox" },
|
|
12
|
+
{ name: "Code", key: "code" },
|
|
13
|
+
{ name: "Color", key: "color" },
|
|
14
|
+
{ name: "Color Input", key: "color_input" },
|
|
15
|
+
{ name: "Confetti", key: "confetti" },
|
|
16
|
+
{ name: "Content", key: "content" },
|
|
17
|
+
{ name: "Content Input", key: "content_input" },
|
|
18
|
+
{ name: "Cron Input", key: "cron_input" },
|
|
19
|
+
{ name: "Dropdown", key: "dropdown" },
|
|
20
|
+
{ name: "File Input", key: "file_input" },
|
|
21
|
+
{ name: "Icon", key: "icon" },
|
|
22
|
+
{ name: "Icon Input", key: "icon_input" },
|
|
23
|
+
{ name: "Image", key: "image" },
|
|
24
|
+
{ name: "Image Editor", key: "image_editor" },
|
|
25
|
+
{ name: "ImageSlider", key: "image_slider" },
|
|
26
|
+
{ name: "InfoBox", key: "info_box" },
|
|
27
|
+
{ name: "Json", key: "json" },
|
|
28
|
+
{ name: "LabeledItem", key: "labeled_item" },
|
|
29
|
+
{ name: "Layout", key: "layout" },
|
|
30
|
+
{ name: "Link", key: "link" },
|
|
31
|
+
{ name: "LoadingWheel", key: "loading_wheel" },
|
|
32
|
+
{ name: "Location", key: "location" },
|
|
33
|
+
{ name: "Location Input", key: "location_input" },
|
|
34
|
+
{ name: "Number", key: "number" },
|
|
35
|
+
{ name: "Popover", key: "popover" },
|
|
36
|
+
{ name: "Qr", key: "qr" },
|
|
37
|
+
{ name: "QrInput", key: "qr_input" },
|
|
38
|
+
{ name: "Slider", key: "slider" },
|
|
39
|
+
{ name: "Spacer", key: "spacer" },
|
|
40
|
+
{ name: "StoragePicker", key: "storage_picker" },
|
|
41
|
+
{ name: "Table Advanced", key: "table_advanced" },
|
|
42
|
+
{ name: "Tag", key: "tag" },
|
|
43
|
+
{ name: "Text Array Input", key: "text_array_input" },
|
|
44
|
+
{ name: "Text Input", key: "text_input" },
|
|
45
|
+
{ name: "Time", key: "time" },
|
|
46
|
+
{ name: "Time Input", key: "time_input" },
|
|
47
|
+
{ name: "Tooltip", key: "tooltip" },
|
|
48
|
+
{ name: "TransparentBackground", key: "transparent_background" },
|
|
49
|
+
{ name: "XPost", key: "x_post" },
|
|
50
|
+
{ name: "XFollow", key: "x_follow" },
|
|
51
|
+
{ name: "Youtube Follow Button", key: "youtube_channel_button" },
|
|
52
|
+
{ name: "Youtube Video", key: "youtube_video" },
|
|
53
|
+
]
|
|
54
|
+
|
|
55
|
+
export async function GET() {
|
|
56
|
+
const components_urls = components
|
|
57
|
+
.map(
|
|
58
|
+
({ key }) => `
|
|
59
|
+
<url>
|
|
60
|
+
<loc>${site}/components/${key}</loc>
|
|
61
|
+
<changefreq>weekly</changefreq>
|
|
62
|
+
<priority>0.8</priority>
|
|
63
|
+
</url>`
|
|
64
|
+
)
|
|
65
|
+
.join("")
|
|
66
|
+
const xml = `<?xml version="1.0" encoding="UTF-8"?>
|
|
67
|
+
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
|
|
68
|
+
<url>
|
|
69
|
+
<loc>${site}</loc>
|
|
70
|
+
<changefreq>daily</changefreq>
|
|
71
|
+
<priority>1.0</priority>
|
|
72
|
+
</url>
|
|
73
|
+
<url>
|
|
74
|
+
<loc>${site}/components</loc>
|
|
75
|
+
<changefreq>daily</changefreq>
|
|
76
|
+
<priority>0.9</priority>
|
|
77
|
+
</url>${components_urls}
|
|
78
|
+
</urlset>`.trim()
|
|
79
|
+
return new Response(xml, { headers: { "content-type": "application/xml" } })
|
|
80
|
+
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/src/routes/{[component] → components/[component]}/Showcase/AudioEditor/index.svelte
RENAMED
|
File without changes
|
/package/src/routes/{[component] → components/[component]}/Showcase/AuthCodeInput/index.svelte
RENAMED
|
File without changes
|
/package/src/routes/{[component] → components/[component]}/Showcase/Breadcrumbs/index.svelte
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/src/routes/{[component] → components/[component]}/Showcase/ConditionsInput/index.svelte
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/src/routes/{[component] → components/[component]}/Showcase/ContentInput/index.svelte
RENAMED
|
File without changes
|
|
File without changes
|
/package/src/routes/{[component] → components/[component]}/Showcase/DocsDefinition/index.svelte
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/src/routes/{[component] → components/[component]}/Showcase/ImageEditor/index.svelte
RENAMED
|
File without changes
|
/package/src/routes/{[component] → components/[component]}/Showcase/ImageSlider/index.svelte
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/src/routes/{[component] → components/[component]}/Showcase/LabeledItem/index.svelte
RENAMED
|
File without changes
|
|
File without changes
|
/package/src/routes/{[component] → components/[component]}/Showcase/LoadingWheel/index.svelte
RENAMED
|
File without changes
|
|
File without changes
|
/package/src/routes/{[component] → components/[component]}/Showcase/LocationInput/index.svelte
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/src/routes/{[component] → components/[component]}/Showcase/StoragePicker/index.svelte
RENAMED
|
File without changes
|
/package/src/routes/{[component] → components/[component]}/Showcase/TableAdvanced/index.svelte
RENAMED
|
File without changes
|
|
File without changes
|
/package/src/routes/{[component] → components/[component]}/Showcase/TextArrayInput/index.svelte
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/src/routes/{[component] → components/[component]}/Showcase/YoutubeVideo/index.svelte
RENAMED
|
File without changes
|