Fix: System-wide type hardening and V3 API alignment

This commit is contained in:
Scott Idem
2026-01-22 19:22:16 -05:00
parent 9de1d4b23e
commit 4976f2d897
11 changed files with 87 additions and 56 deletions

View File

@@ -259,6 +259,20 @@ export const shorten_string = function shorten_string({
return new_string;
};
// Svelte action to set focus on an element
function set_focus(node: HTMLElement, focus: boolean) {
if (focus) {
node.focus();
}
return {
update(new_focus: boolean) {
if (new_focus) {
node.focus();
}
}
};
}
// Updated 2024-06-19
// This function should return a shorted version of a filename if over the max length. It should always contain at least the first character of the original filename and the complete extension.
// Example 1: The Original Long File Name.pdf -> The Orig....pdf
@@ -328,5 +342,6 @@ export const ae_util = {
encrypt_content: encrypt_content,
encrypt_wrapper: encrypt_wrapper,
decrypt_content: decrypt_content,
decrypt_wrapper: decrypt_wrapper
decrypt_wrapper: decrypt_wrapper,
set_focus: set_focus
};