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
+30
View File
@@ -0,0 +1,30 @@
// Utilities
import { onMounted, shallowRef, toRef } from 'vue';
import { propsFactory } from "../util/index.js"; // Types
// Types
// Composables
export const makeRevealProps = propsFactory({
reveal: {
type: [Boolean, Object],
default: false
}
}, 'reveal');
export function useReveal(props) {
const defaultDuration = 900;
const duration = toRef(() => typeof props.reveal === 'object' ? Math.max(0, Number(props.reveal.duration ?? defaultDuration)) : defaultDuration);
const state = shallowRef(props.reveal ? 'initial' : 'disabled');
onMounted(async () => {
if (props.reveal) {
state.value = 'initial';
await new Promise(resolve => requestAnimationFrame(resolve));
state.value = 'pending';
await new Promise(resolve => setTimeout(resolve, duration.value));
state.value = 'done';
}
});
return {
duration,
state
};
}
//# sourceMappingURL=reveal.js.map