chore(client): fix type errors

This commit is contained in:
ByteAtATime 2025-07-09 10:23:18 -07:00
parent 9a176d6590
commit d4d134bc20
No known key found for this signature in database
6 changed files with 23 additions and 10 deletions

View file

@ -91,7 +91,10 @@ export function resolveIcon(
type: 'image',
src: src,
mask: icon.mask,
tintColor: icon.tintColor
tintColor:
typeof icon.tintColor === 'object' && icon.tintColor
? { adjustContrast: false, ...icon.tintColor }
: icon.tintColor
};
}

View file

@ -8,7 +8,7 @@ import { openUrl } from '@tauri-apps/plugin-opener';
if (typeof window !== 'undefined') {
window.HTMLElement.prototype.animate = () => ({
finished: Promise.resolve(),
finished: Promise.resolve({} as Animation),
cancel: () => {},
play: () => {},
pause: () => {},
@ -23,12 +23,16 @@ if (typeof window !== 'undefined') {
playbackRate: 1,
pending: false,
playState: 'idle',
ready: Promise.resolve(),
ready: Promise.resolve({} as Animation),
onfinish: null,
oncancel: null,
onremove: null,
effect: null,
id: ''
id: '',
replaceState: 'active',
addEventListener: () => {},
removeEventListener: () => {},
dispatchEvent: () => false
});
}

View file

@ -5,16 +5,16 @@
import type { HTMLInputAttributes } from 'svelte/elements';
type Props = {
value: string | undefined | null;
value?: string | undefined | null;
} & HTMLInputAttributes;
let { value, ...restProps }: Props = $props();
let { value = $bindable(), ...restProps }: Props = $props();
let showPassword = $state(false);
const inputType = $derived(showPassword ? 'text' : 'password');
</script>
<div class="relative">
<Input {...restProps} {value} type={inputType} files={undefined} class="pr-10" />
<Input {...restProps} bind:value type={inputType} files={undefined} class="pr-10" />
<Button
type="button"
variant="ghost"

View file

@ -46,7 +46,7 @@
if (componentProps && !isInitialized) {
const initial = componentProps.defaultValue ?? componentProps.value;
if (initial !== undefined) {
internalValue = initial;
internalValue = initial ?? undefined;
} else if (firstItemValue !== undefined) {
onDispatch(nodeId, 'onChange', [firstItemValue]);
if (!isControlled) {

View file

@ -49,7 +49,6 @@ export * from './detail';
export * from './grid';
export * from './list';
export * from './form';
export * from '@raycast-linux/protocol';
export * from './color';
export * from './dropdown';
export * from './section';

View file

@ -55,7 +55,14 @@ export function useGridView(args: () => GridViewArgs) {
if (!root) return { allItems: items, emptyViewNodeId };
const defaultSectionProps = { ...gridProps, title: undefined, subtitle: undefined };
const defaultSectionProps = {
isLoading: false,
throttle: false,
columns: 6,
...gridProps,
title: undefined,
subtitle: undefined
};
const processSection = (sectionNode: UINode, sectionPropsOverride?: Partial<GridProps>) => {
const rawSectionProps = {