Last round of prettier: npx prettier --write src/

This commit is contained in:
Scott Idem
2026-03-24 13:27:40 -04:00
parent 23d25bf65a
commit a8f3c29b9f
146 changed files with 13201 additions and 9277 deletions

View File

@@ -8,10 +8,22 @@ import type { Writable } from 'svelte/store';
import type { key_val } from '$lib/stores/ae_stores';
import { badges_loc_defaults, badges_sess_defaults } from '$lib/stores/ae_events_stores__badges_defaults';
import { launcher_loc_defaults, launcher_sess_defaults } from '$lib/stores/ae_events_stores__launcher_defaults';
import { leads_loc_defaults, leads_sess_defaults } from '$lib/stores/ae_events_stores__leads_defaults';
import { pres_mgmt_loc_defaults, pres_mgmt_sess_defaults } from '$lib/stores/ae_events_stores__pres_mgmt_defaults';
import {
badges_loc_defaults,
badges_sess_defaults
} from '$lib/stores/ae_events_stores__badges_defaults';
import {
launcher_loc_defaults,
launcher_sess_defaults
} from '$lib/stores/ae_events_stores__launcher_defaults';
import {
leads_loc_defaults,
leads_sess_defaults
} from '$lib/stores/ae_events_stores__leads_defaults';
import {
pres_mgmt_loc_defaults,
pres_mgmt_sess_defaults
} from '$lib/stores/ae_events_stores__pres_mgmt_defaults';
// Deployment version stamp. Compared against events_sess.ver in events/+layout.svelte
// to detect stale persisted data after a deploy (triggers a reload). Bump this alongside
@@ -72,10 +84,12 @@ const events_local_data_struct: key_val = {
// Presentation Management — see ae_events_stores__pres_mgmt_defaults.ts
pres_mgmt: pres_mgmt_loc_defaults
};
export const events_loc: Writable<key_val> = persisted('ae_events_loc', events_local_data_struct);
export const events_loc: Writable<key_val> = persisted(
'ae_events_loc',
events_local_data_struct
);
/* *** BEGIN *** Initialize events_session_data_struct */
// In-memory only (writable, not persisted). Resets on page load.
@@ -235,4 +249,4 @@ export const events_trig: Writable<key_val> = writable(tmp__events_trig);
// events_trig_kv: response/status map — keys are request IDs, values are
// completion status or Promise results. Used for tracking parallel downloads.
const tmp__events_trig_kv: key_val = {};
export const events_trig_kv = writable(tmp__events_trig_kv);
export const events_trig_kv = writable(tmp__events_trig_kv);

View File

@@ -64,8 +64,8 @@ export const badges_loc_defaults: BadgesLocState = {
// Filter states
qry_printed_status: 'all', // 'all' | 'printed' | 'not_printed'
qry_affiliations: null, // null = no affiliation filter
qry_sort_order: '', // '' = default sort order
qry_affiliations: null, // null = no affiliation filter
qry_sort_order: '', // '' = default sort order
status_qry__search: null,
use_id_li: true,

View File

@@ -185,12 +185,13 @@ export const launcher_loc_defaults: LauncherLocState = {
},
native: {
host_file_config_path: 'device_configs/ae_native_app_config.default.json'
host_file_config_path:
'device_configs/ae_native_app_config.default.json'
},
idle_timer: 7 * 60 * 1000, // Milliseconds until idle state is entered.
idle_cycle: 5 * 1000, // How frequently idle status is checked (ms).
idle_loop_period: 3 * 60 * 1000, // How frequently screen-saver loop and similar run (ms).
idle_timer: 7 * 60 * 1000, // Milliseconds until idle state is entered.
idle_cycle: 5 * 1000, // How frequently idle status is checked (ms).
idle_loop_period: 3 * 60 * 1000, // How frequently screen-saver loop and similar run (ms).
screen_saver_img_kv: {}, // Built when launcher_file_cont loads — image files only.
modal__title: '-- Not Set --',

View File

@@ -30,7 +30,10 @@ export interface LeadsLocState {
tracking__qry__licensee_email: string;
entered_passcode: string | null;
// Value shape: key = passcode/email used; type = 'shared' | 'licensed'; entries expire after a configurable max age.
auth_exhibit_kv: Record<string, { key: string; type: string; updated_on: string }>;
auth_exhibit_kv: Record<
string,
{ key: string; type: string; updated_on: string }
>;
edit_license_li: boolean;
// Key = exhibit ID (random), value = last-used tab name.
tab: Record<string, string>;
@@ -61,7 +64,7 @@ export interface LeadsSessState {
show_form__view_lead: boolean | string;
show_confirm__add_lead: string[];
submit_status__license: string | null; // 'saving' | 'created' | 'updated'
submit_status__search: string | null; // 'searching' | 'complete'
submit_status__search: string | null; // 'searching' | 'complete'
last_refresh_time: string | null;
next_refresh_countdown: number;
entered_passcode: string | null;
@@ -75,7 +78,7 @@ export interface LeadsSessState {
// Persisted leads config — survives browser sessions.
export const leads_loc_defaults: LeadsLocState = {
show_option__paid_tab: true,
show_content__scan_alert: true, // Workaround for QR scanner edge-case bug.
show_content__scan_alert: true, // Workaround for QR scanner edge-case bug.
show_content__scan_requirements: true,
show_content__custom_question_descriptions: true,
show_content__email_link_warning: true,
@@ -85,10 +88,10 @@ export const leads_loc_defaults: LeadsLocState = {
// Should be overridden by the active event's external_event_id in cfg_json.
default__external_registration_id: '2024_Annual Meeting',
auto_view: true, // Show the new lead immediately after adding by scan or search.
auto_view: true, // Show the new lead immediately after adding by scan or search.
auto_hide_on_sign_in: true,
show_hidden: false, // Hidden (archived) leads are excluded from the main list.
show_hidden: false, // Hidden (archived) leads are excluded from the main list.
show_not_enabled: false,
refresh_interval__tracking_li: 30000, // 30 seconds.
@@ -133,7 +136,7 @@ export const leads_sess_defaults: LeadsSessState = {
show_confirm__add_lead: [],
submit_status__license: null, // 'saving' | 'created' | 'updated'
submit_status__search: null, // 'searching' | 'complete'
submit_status__search: null, // 'searching' | 'complete'
last_refresh_time: null as string | null,
next_refresh_countdown: 0,

View File

@@ -12,8 +12,8 @@ export interface PresMgmtLocState {
datetime_format: string;
time_format: string;
time_hours: 12 | 24;
qry_enabled: string; // 'all' | 'disabled' | 'enabled'
qry_hidden: string; // 'all' | 'hidden' | 'not_hidden'
qry_enabled: string; // 'all' | 'disabled' | 'enabled'
qry_hidden: string; // 'all' | 'hidden' | 'not_hidden'
qry_limit__files: number;
qry_limit__presentations: number;
qry_limit__presenters: number;
@@ -122,7 +122,7 @@ export const pres_mgmt_loc_defaults: PresMgmtLocState = {
time_format: 'time_12_short',
time_hours: 12, // 12 or 24
qry_enabled: 'enabled', // 'all' | 'disabled' | 'enabled'
qry_enabled: 'enabled', // 'all' | 'disabled' | 'enabled'
qry_hidden: 'not_hidden', // 'all' | 'hidden' | 'not_hidden'
qry_limit__files: 75,
qry_limit__presentations: 25,
@@ -168,7 +168,7 @@ export const pres_mgmt_loc_defaults: PresMgmtLocState = {
hide__session_li_location_field: false,
hide__session_li_poc_field: false,
hide__launcher_link_legacy: true, // Flask version.
hide__launcher_link: true, // SvelteKit version.
hide__launcher_link: true, // SvelteKit version.
hide__location_link: true,
show_content__disabled_files: false,
@@ -235,9 +235,9 @@ export const pres_mgmt_sess_defaults: PresMgmtSessState = {
show__edit_location: {},
show__edit_poc_person: {},
show__view_alert: {}, // Key-value: show alert by ID.
show__view_alert: {}, // Key-value: show alert by ID.
show__edit_alert_msg: {}, // Key-value: show edit alert msg by ID.
tmp__alert_msg: {}, // Key-value: temp alert msg content by ID.
tmp__alert_msg: {}, // Key-value: temp alert msg content by ID.
session_qr_url: {}, // Key-value: session_id → URL string.

View File

@@ -97,7 +97,10 @@ const idaa_local_data_struct: key_val = {
}
};
export const idaa_loc: Writable<key_val> = persisted('ae_idaa_loc', idaa_local_data_struct);
export const idaa_loc: Writable<key_val> = persisted(
'ae_idaa_loc',
idaa_local_data_struct
);
/* *** BEGIN *** Initialize idaa_session_data_struct */
// In-memory only (not persisted). Resets on page load.

View File

@@ -148,7 +148,8 @@ const ae_app_local_data_defaults: key_val = {
theme_mode: 'light',
theme_name: 'wintry', // wintry
classes__form: 'border border-surface-200 p-4 space-y-4 rounded-container',
classes__form:
'border border-surface-200 p-4 space-y-4 rounded-container',
qr: {}
},
@@ -204,7 +205,10 @@ const ae_app_local_data_defaults: key_val = {
}
};
export const ae_loc: Writable<key_val> = persisted('ae_loc', ae_app_local_data_defaults);
export const ae_loc: Writable<key_val> = persisted(
'ae_loc',
ae_app_local_data_defaults
);
// *** BEGIN *** Temporary app data. This should be stored to session storage.
const ae_app_session_data_defaults: key_val = {
@@ -365,7 +369,10 @@ export const slct_trigger: any = writable(null);
// Auth error signal — set by API helpers on 401/403 to trigger the session-expired banner in the root layout.
// Only set from browser context (never SSR). 'expired' covers both 401 and 403 responses.
export const ae_auth_error = writable<{ type: 'expired' | null; ts: number | null }>({ type: null, ts: null });
export const ae_auth_error = writable<{
type: 'expired' | null;
ts: number | null;
}>({ type: null, ts: null });
// Reactive clock — updates every second. Used for live countdown and elapsed-time displays.
export const time = readable(new Date(), function start(set) {

View File

@@ -40,8 +40,8 @@ export interface AeUser {
email: string | null;
allow_auth_key: string | null; // Magic-link token — allows sign-in without password.
super: boolean;
manager: boolean; // Can manage accounts and users globally.
administrator: boolean; // Account-level administrator.
manager: boolean; // Can manage accounts and users globally.
administrator: boolean; // Account-level administrator.
verified: boolean;
public: boolean;
person_id: string | null;
@@ -50,7 +50,12 @@ export interface AeUser {
[key: string]: any; // API may populate additional user fields.
}
export type AccessType = 'anonymous' | 'public' | 'authenticated' | 'trusted' | 'administrator';
export type AccessType =
| 'anonymous'
| 'public'
| 'authenticated'
| 'trusted'
| 'administrator';
export interface AuthLocState {
account_id: string | null;
@@ -150,8 +155,8 @@ export const auth_loc_defaults: AuthLocState = {
email: null,
allow_auth_key: null, // Magic-link token — allows sign-in without password.
super: false,
manager: false, // Can manage accounts and users globally.
administrator: false, // Account-level administrator.
manager: false, // Can manage accounts and users globally.
administrator: false, // Account-level administrator.
verified: false,
public: false,
person_id: null,

View File

@@ -55,6 +55,8 @@ function _check_and_wipe(key: string, expected_version: number): void {
} catch {
// Corrupt JSON — wipe unconditionally.
localStorage.removeItem(key);
console.warn(`[store_versions] '${key}' wiped — corrupt JSON in localStorage`);
console.warn(
`[store_versions] '${key}' wiped — corrupt JSON in localStorage`
);
}
}