1decf588c1
- Add ts/toast.ts: typed port of the Alpine toast store + window.toast + window.fetchWithHtmxTriggers. Toast / ToastStore / ToastMessage interfaces type the store and the show-toast CustomEvent detail; Alpine declared as a type-only ambient global - Declare window.toast in ts/globals.d.ts - Stays a classic (non-module) script — no import/export — so it keeps defining globals; layout.py now serves dist/toast.js Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
15 lines
523 B
TypeScript
15 lines
523 B
TypeScript
export {};
|
|
|
|
declare global {
|
|
interface Window {
|
|
fetchWithHtmxTriggers(input: RequestInfo | URL, init?: RequestInit): Promise<Response>;
|
|
toast(message: string, type?: string): void;
|
|
readSearchSelect(form: HTMLElement): void;
|
|
applyFilterBar(event: Event): boolean;
|
|
clearFilterBar(formId: string, filterInputId: string): void;
|
|
toggleStringFilterInput(radio: HTMLInputElement): void;
|
|
showPresetNameInput(): void;
|
|
savePreset(formId: string, filterInputId: string, saveUrl: string): void;
|
|
}
|
|
}
|