chore: rename website-astro to website, update gitignore

- Rename website-astro/ to website/
- Add website/dist/ and website/.astro/ to gitignore
- Update generate-website-data.mjs output path
This commit is contained in:
Aaron Powell
2026-01-28 16:42:32 +11:00
parent 4b3bd3d0ad
commit aa42998e29
69 changed files with 17 additions and 16941 deletions

View File

@@ -0,0 +1,34 @@
/**
* Choices.js wrapper with sensible defaults
*/
import Choices from 'choices.js';
import 'choices.js/public/assets/styles/choices.min.css';
export type { Choices };
/**
* Get selected values from a Choices instance
*/
export function getChoicesValues(choices: Choices): string[] {
const val = choices.getValue(true);
return Array.isArray(val) ? val : (val ? [val] : []);
}
/**
* Create a new Choices instance with sensible defaults
*/
export function createChoices(selector: string | HTMLSelectElement, options: Partial<Choices['config']> = {}): Choices {
return new Choices(selector, {
removeItemButton: true,
searchPlaceholderValue: 'Search...',
noResultsText: 'No results found',
noChoicesText: 'No options available',
itemSelectText: '',
shouldSort: false,
searchResultLimit: 100,
resetScrollPosition: false,
...options,
});
}
export { Choices };