type VariantValue = string | number | boolean | undefined; type VariantProps = Record; /** * tailwind-styled-v4 — Svelte Adapter * * Svelte 4+ adapter menggunakan action dan store pattern. * Kompatibel dengan Svelte 5 runes mode. * * Dua pola yang didukung: * 1. `tw()` — buat class string resolver untuk dipakai di template * 2. `createSvelteComponent()` — buat Svelte component via Svelte API * * @example * * * * */ interface SvelteComponentConfig { base?: string; variants?: Record>; compoundVariants?: Array<{ class: string; [key: string]: VariantValue; }>; defaultVariants?: Record; } /** * Class variant resolver — pola utama untuk Svelte. * Returns fungsi yang menerima props dan mengembalikan class string. * * Gunakan ini di ` * * */ declare function styled(node: HTMLElement, { config, props }: { config: SvelteComponentConfig; props?: VariantProps; }): { update: ({ config: cfg, props: p, }: { config: SvelteComponentConfig; props?: VariantProps; }) => void; destroy(): void; }; /** * Svelte 5 runes-compatible variant factory. * Mengembalikan reactive class string menggunakan $derived pattern. * * @example * // Dalam Svelte 5 component: * const { className, variantProps } = createVariants({ * base: 'px-4 py-2', * variants: { size: { sm: 'h-8', lg: 'h-12' } }, * }, () => ({ size: currentSize })) * * // className adalah fungsi yang return class string terkini */ declare function createVariants(config: SvelteComponentConfig, getProps: () => VariantProps): { className: () => string; config: SvelteComponentConfig; }; export { type SvelteComponentConfig, createVariants, cv, styled, tw };