routie dev init since i didn't adhere to any proper guidance up until now

This commit is contained in:
2026-04-29 22:27:29 -06:00
commit e1dabb71e2
15301 changed files with 3562618 additions and 0 deletions
+27
View File
@@ -0,0 +1,27 @@
// Utilities
import { shallowRef, toRef, useId } from 'vue';
import { propsFactory } from "../util/index.js"; // Types
// Types
// Composables
export const makeAutocompleteProps = propsFactory({
autocomplete: String
}, 'autocomplete');
export function useAutocomplete(props) {
const uniqueId = useId();
const reloadTrigger = shallowRef(0);
const isSuppressing = toRef(() => props.autocomplete === 'suppress');
const fieldName = toRef(() => {
if (!props.name) return undefined;
return isSuppressing.value ? `${props.name}-${uniqueId}-${reloadTrigger.value}` : props.name;
});
const fieldAutocomplete = toRef(() => {
return isSuppressing.value ? 'off' : props.autocomplete;
});
return {
isSuppressing,
fieldAutocomplete,
fieldName,
update: () => reloadTrigger.value = new Date().getTime()
};
}
//# sourceMappingURL=autocomplete.js.map