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
+10
View File
@@ -0,0 +1,10 @@
import type { DirectiveBinding } from 'vue';
import type { Anchor } from '../../util/index.js';
export interface TooltipDirectiveBinding extends Omit<DirectiveBinding<string>, 'arg' | 'value'> {
arg?: {
[T in Anchor]: T extends `${infer A} ${infer B}` ? `${A}-${B}` : T;
}[Anchor];
value: boolean | string | Record<string, any>;
}
export declare const Tooltip: import("../../composables/directiveComponent.js").CustomDirective<TooltipDirectiveBinding>;
export default Tooltip;
+15
View File
@@ -0,0 +1,15 @@
// Components
import { VTooltip } from "../../components/VTooltip/index.js"; // Composables
import { useDirectiveComponent } from "../../composables/directiveComponent.js"; // Utilities
import { isObject } from "../../util/index.js"; // Types
export const Tooltip = useDirectiveComponent(VTooltip, binding => {
const disabled = isObject(binding.value) ? !binding.value.text : ['', false, null].includes(binding.value); // undefined means true
return {
activator: disabled ? null : 'parent',
location: binding.arg?.replace('-', ' '),
text: typeof binding.value === 'boolean' ? undefined : binding.value
};
});
export default Tooltip;
//# sourceMappingURL=index.js.map
+1
View File
@@ -0,0 +1 @@
{"version":3,"file":"index.js","names":["VTooltip","useDirectiveComponent","isObject","Tooltip","binding","disabled","value","text","includes","activator","location","arg","replace","undefined"],"sources":["../../../src/directives/tooltip/index.ts"],"sourcesContent":["// Components\nimport { VTooltip } from '@/components/VTooltip'\n\n// Composables\nimport { useDirectiveComponent } from '@/composables/directiveComponent'\n\n// Utilities\nimport { isObject } from '@/util'\n\n// Types\nimport type { DirectiveBinding } from 'vue'\nimport type { Anchor } from '@/util'\n\nexport interface TooltipDirectiveBinding extends Omit<DirectiveBinding<string>, 'arg' | 'value'> {\n arg?: { [T in Anchor]: T extends `${infer A} ${infer B}` ? `${A}-${B}` : T }[Anchor]\n value: boolean | string | Record<string, any>\n}\n\nexport const Tooltip = useDirectiveComponent<TooltipDirectiveBinding>(VTooltip, binding => {\n const disabled = isObject(binding.value)\n ? !binding.value.text\n : ['', false, null].includes(binding.value) // undefined means true\n\n return {\n activator: disabled ? null : 'parent',\n location: binding.arg?.replace('-', ' '),\n text: typeof binding.value === 'boolean' ? undefined : binding.value,\n }\n})\n\nexport default Tooltip\n"],"mappings":"AAAA;AAAA,SACSA,QAAQ,8CAEjB;AAAA,SACSC,qBAAqB,mDAE9B;AAAA,SACSC,QAAQ,+BAEjB;AASA,OAAO,MAAMC,OAAO,GAAGF,qBAAqB,CAA0BD,QAAQ,EAAEI,OAAO,IAAI;EACzF,MAAMC,QAAQ,GAAGH,QAAQ,CAACE,OAAO,CAACE,KAAK,CAAC,GACpC,CAACF,OAAO,CAACE,KAAK,CAACC,IAAI,GACnB,CAAC,EAAE,EAAE,KAAK,EAAE,IAAI,CAAC,CAACC,QAAQ,CAACJ,OAAO,CAACE,KAAK,CAAC,EAAC;;EAE9C,OAAO;IACLG,SAAS,EAAEJ,QAAQ,GAAG,IAAI,GAAG,QAAQ;IACrCK,QAAQ,EAAEN,OAAO,CAACO,GAAG,EAAEC,OAAO,CAAC,GAAG,EAAE,GAAG,CAAC;IACxCL,IAAI,EAAE,OAAOH,OAAO,CAACE,KAAK,KAAK,SAAS,GAAGO,SAAS,GAAGT,OAAO,CAACE;EACjE,CAAC;AACH,CAAC,CAAC;AAEF,eAAeH,OAAO","ignoreList":[]}