sveltekit-ui 1.0.39 → 1.0.40
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.
|
@@ -6,14 +6,13 @@ export function create_code_manager(config) {
|
|
|
6
6
|
let content = $derived(set_closurable(config?.content, null))
|
|
7
7
|
let copy_button_manager = $state(null)
|
|
8
8
|
|
|
9
|
-
function init(
|
|
9
|
+
function init() {
|
|
10
10
|
copy_button_manager = create_button_manager({
|
|
11
11
|
type: "soft",
|
|
12
12
|
is_uniform: true,
|
|
13
13
|
support_icon: "clipboard",
|
|
14
14
|
is_success_animation: true,
|
|
15
|
-
on_click: () =>
|
|
16
|
-
copy_to_clipboard(typeof config?.content == "string" ? config?.content : JSON.stringify(config?.content)),
|
|
15
|
+
on_click: () => copy_to_clipboard(typeof content == "string" ? content : JSON.stringify(content)),
|
|
17
16
|
})
|
|
18
17
|
}
|
|
19
18
|
|
package/package.json
CHANGED
|
@@ -6,14 +6,13 @@ export function create_code_manager(config) {
|
|
|
6
6
|
let content = $derived(set_closurable(config?.content, null))
|
|
7
7
|
let copy_button_manager = $state(null)
|
|
8
8
|
|
|
9
|
-
function init(
|
|
9
|
+
function init() {
|
|
10
10
|
copy_button_manager = create_button_manager({
|
|
11
11
|
type: "soft",
|
|
12
12
|
is_uniform: true,
|
|
13
13
|
support_icon: "clipboard",
|
|
14
14
|
is_success_animation: true,
|
|
15
|
-
on_click: () =>
|
|
16
|
-
copy_to_clipboard(typeof config?.content == "string" ? config?.content : JSON.stringify(config?.content)),
|
|
15
|
+
on_click: () => copy_to_clipboard(typeof content == "string" ? content : JSON.stringify(content)),
|
|
17
16
|
})
|
|
18
17
|
}
|
|
19
18
|
|