import type { Expression } from 'estree'; import { type Node } from 'estree-walker'; import MagicString from 'magic-string'; export declare const hasTComponent: (code: string) => boolean; type BaseAttribute = { name: string; start: number; end: number; }; type BaseAttributeValue = { start: number; end: number; }; type TextAttributeValue = BaseAttributeValue & { type: 'Text'; raw: string; data: string; }; type AttributeShorthandValue = BaseAttributeValue & { type: 'AttributeShorthand'; expression: Expression & { start: number; end: number; }; }; type MustacheTagAttributeValue = BaseAttributeValue & { type: 'MustacheTag'; expression: Expression & { start: number; end: number; }; }; type EventHandlerAttribute = BaseAttribute & { type: 'EventHandler'; name: string; }; type BooleanAttribute = BaseAttribute & { type: 'Attribute'; value: true; }; type TextAttribute = BaseAttribute & { type: 'Attribute'; value: TextAttributeValue[]; }; type MustacheTagAttribute = BaseAttribute & { type: 'Attribute'; value: MustacheTagAttributeValue[]; }; type ShorthandAttribute = BaseAttribute & { type: 'Attribute'; value: AttributeShorthandValue[]; }; type ValueAttribute = BooleanAttribute | TextAttribute | MustacheTagAttribute | ShorthandAttribute; type Attribute = EventHandlerAttribute | ValueAttribute; type DefinedNode = Omit & { type: Node['type'] | 'InlineComponent'; name: string; start: number; end: number; attributes: Attribute[]; }; type TComponentNode = DefinedNode & { name: `T.${string}` | 'T'; }; export declare const findNodeByIndex: (markup: MagicString, index: number) => TComponentNode | undefined; /** * Upserts an attribute to a `` component. */ export declare const upsertAttribute: (markup: MagicString, node: TComponentNode, attributeName: string, value: unknown, position: 'first' | 'last', precision?: number) => void; /** * Removes an attribute from a `` component. */ export declare const removeAttribute: (markup: MagicString, node: TComponentNode, attributeName: string) => void; /** * Read the value of an attribute from a `` component. */ export declare const readAttribute: (markup: MagicString, node: TComponentNode, attributeName: string) => any; export declare const addStudioRuntimeProps: (markup: MagicString, id: string) => void; export {};