Files
headroom/frontend/node_modules/svelte-eslint-parser/lib/parser/style-context.d.ts
Santhosh Janardhanan de2d83092e feat: Reinitialize frontend with SvelteKit and TypeScript
- Delete old Vite+Svelte frontend
- Initialize new SvelteKit project with TypeScript
- Configure Tailwind CSS v4 + DaisyUI
- Implement JWT authentication with auto-refresh
- Create login page with form validation (Zod)
- Add protected route guards
- Update Docker configuration for single-stage build
- Add E2E tests with Playwright (6/11 passing)
- Fix Svelte 5 reactivity with $state() runes

Known issues:
- 5 E2E tests failing (timing/async issues)
- Token refresh implementation needs debugging
- Validation error display timing
2026-02-17 16:19:59 -05:00

43 lines
1.7 KiB
TypeScript

import type { Node, Root, Rule } from "postcss";
import { type Node as SelectorNode, type Root as SelectorRoot } from "postcss-selector-parser";
import type { Context } from "../context/index.js";
import type { SourceLocation, SvelteStyleElement } from "../ast/index.js";
export type StyleContext = StyleContextNoStyleElement | StyleContextParseError | StyleContextSuccess | StyleContextUnknownLang;
export interface StyleContextNoStyleElement {
status: "no-style-element";
}
export interface StyleContextParseError {
status: "parse-error";
sourceLang: string;
error: Error;
}
export interface StyleContextSuccess {
status: "success";
sourceLang: string;
sourceAst: Root;
}
export interface StyleContextUnknownLang {
status: "unknown-lang";
sourceLang: string;
}
/**
* Extracts style source from a SvelteStyleElement and parses it into a PostCSS AST.
*/
export declare function parseStyleContext(styleElement: SvelteStyleElement | undefined, ctx: Context): StyleContext;
/**
* Parses a PostCSS Rule node's selector and returns its AST.
*/
export declare function parseSelector(rule: Rule): SelectorRoot;
/**
* Extracts a node location (like that of any ESLint node) from a parsed svelte style node.
*/
export declare function styleNodeLoc(node: Node): Partial<SourceLocation>;
/**
* Extracts a node range (like that of any ESLint node) from a parsed svelte style node.
*/
export declare function styleNodeRange(node: Node): [number | undefined, number | undefined];
/**
* Extracts a node location (like that of any ESLint node) from a parsed svelte selector node.
*/
export declare function styleSelectorNodeLoc(node: SelectorNode): Partial<SourceLocation>;