/** * The value type accepted by the `attr()` directive for a single attribute. * * - `string | number` — set the attribute to that value * - `boolean` — true → set to "", false → remove * - `null | undefined` — remove the attribute * - `[condition, val]` — conditional: set when truthy, remove when falsy * - `[condition, trueVal, falseVal]` — ternary */ export type AttrValue = string | number | boolean | null | undefined | [unknown, string | number | boolean] | [unknown, string | number | boolean, string | number | boolean]; /** A map of attribute names to their values. */ export type AttrMap = Record; /** * Resolve a single attribute value to either a set-action (with a string value) * or a remove-action. * * This is a pure function with zero dependencies — safe to import from anywhere. * * @example * resolveAttrValue("hello") // { action: "set", value: "hello" } * resolveAttrValue(42) // { action: "set", value: "42" } * resolveAttrValue(true) // { action: "set", value: "" } * resolveAttrValue(false) // { action: "remove" } * resolveAttrValue(null) // { action: "remove" } * resolveAttrValue([true, "yes"]) // { action: "set", value: "yes" } * resolveAttrValue([false, "yes"]) // { action: "remove" } * resolveAttrValue([true, "a", "b"]) // { action: "set", value: "a" } */ export declare function resolveAttrValue(value: AttrValue): { action: "set"; value: string; } | { action: "remove"; }; //# sourceMappingURL=resolveAttrValue.d.ts.map