Files
SnowLuma/.pnpm-store/v11/files/32/6a73fb11550e8f8f764a263f9879b74264335ce2eab5d0a2e06e21e63f35327546939448e2ef3484f64e378921eb9c91c9bbee61bc9c95896ff39544e358cc
TanTan 2a69b23b47
Dev Build / cleanup (push) Canceled after 0s
Dev Build / typecheck (push) Canceled after 0s
Dev Build / build (linux-arm64, ubuntu-24.04-arm, linux-arm64) (push) Canceled after 0s
Dev Build / build (linux-x64, ubuntu-latest, linux-x64) (push) Canceled after 0s
Dev Build / build (win-x64, windows-latest, win32-x64) (push) Canceled after 0s
Dev Build / dispatch-dev-docker (push) Canceled after 0s
docs: 仓库链接指向本镜像仓库
2026-11-13 09:27:07 +08:00

62 lines
3.0 KiB
Plaintext

//#region src/helper/css/common.d.ts
export declare const PSEUDO_GLOBAL_SELECTOR = ":-hono-global";
export declare const isPseudoGlobalSelectorRe: RegExp;
export declare const DEFAULT_STYLE_ID = "hono-css";
export declare const SELECTOR: unique symbol;
export declare const CLASS_NAME: unique symbol;
export declare const STYLE_STRING: unique symbol;
export declare const SELECTORS: unique symbol;
export declare const EXTERNAL_CLASS_NAMES: unique symbol;
declare const CSS_ESCAPED: unique symbol;
export interface CssClassName {
[SELECTOR]: string;
[CLASS_NAME]: string;
[STYLE_STRING]: string;
[SELECTORS]: CssClassName[];
[EXTERNAL_CLASS_NAMES]: string[];
}
export declare const IS_CSS_ESCAPED: unique symbol;
interface CssEscapedString {
[CSS_ESCAPED]: string;
}
/**
* @experimental
* `rawCssString` is an experimental feature.
* The API might be changed.
*/
export declare const rawCssString: (value: string) => CssEscapedString;
export declare const minify: (css: string) => string;
type CssVariableBasicType = CssClassName | CssEscapedString | string | number | boolean | null | undefined;
type CssVariableAsyncType = Promise<CssVariableBasicType>;
type CssVariableArrayType = (CssVariableBasicType | CssVariableAsyncType)[];
export type CssVariableType = CssVariableBasicType | CssVariableAsyncType | CssVariableArrayType;
/**
* A function that customizes generated CSS class names.
*
* @param hash - The default hash-based class name (e.g. `css-1234567890`)
* @param label - The comment label extracted from the CSS template, may be empty.
* Whitespace is trimmed and inner spaces are replaced with hyphens.
* @param styleString - The minified CSS style string
* @returns The custom class name to use. Must be a safe CSS identifier;
* otherwise, the default hash is used as a fallback.
*/
export type ClassNameSlug = (hash: string, label: string, styleString: string) => string;
/**
* A callback function called when an invalid slug is returned from ClassNameSlug.
*
* @param slug - The invalid slug
*/
export type OnInvalidSlug = (slug: string) => void;
export declare const buildStyleString: (strings: TemplateStringsArray, values: CssVariableType[]) => [string, string, CssClassName[], string[]];
export declare const cssCommon: (strings: TemplateStringsArray, values: CssVariableType[], classNameSlug?: ClassNameSlug, onInvalidSlug?: OnInvalidSlug) => CssClassName;
export declare const cxCommon: (args: (string | boolean | null | undefined | CssClassName)[]) => (string | boolean | null | undefined | CssClassName)[];
export declare const keyframesCommon: (strings: TemplateStringsArray, values: CssVariableType[], classNameSlug?: ClassNameSlug, onInvalidSlug?: OnInvalidSlug) => CssClassName;
type ViewTransitionType = {
(strings: TemplateStringsArray, values: CssVariableType[], classNameSlug?: ClassNameSlug, onInvalidSlug?: OnInvalidSlug): CssClassName;
(content: CssClassName): CssClassName;
(): CssClassName;
};
export declare const viewTransitionCommon: ViewTransitionType;
//#endregion
export {};