stylis/000755 001751 000177 0000000000 14723427167014127 5ustar00runner000000 000000 1472342716714723427167stylis/LICENSE000644 001751 000177 0000002165 14723427167015140 0ustar00runner000000 000000 1472342716714723427167 MIT License Copyright (c) Microsoft Corporation. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE stylis/README.md000644 001751 000177 0000000647 14723427167015415 0ustar00runner000000 000000 1472342716714723427167# Installation > `npm install --save @types/stylis` # Summary This package contains type definitions for stylis (https://github.com/thysultan/stylis.js). # Details Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/stylis. ### Additional Details * Last updated: Mon, 02 Dec 2024 22:02:31 GMT * Dependencies: none # Credits These definitions were written by . stylis/index.d.ts000644 001751 000177 0000011357 14723427167016037 0ustar00runner000000 000000 1472342716714723427167export as namespace stylis; export interface Element { parent: Element | null; children: Element[] | string; root: Element | null; type: string; props: string[] | string; value: string; length: number; return: string; line: number; column: number; } export type ArrayMapCallback = (value: string, index: number, array: string[]) => string; // eslint-disable-next-line @typescript-eslint/no-invalid-void-type export type Middleware = (element: Element, index: number, children: Element[], callback: Middleware) => string | void; // Enum.js export const MS = "-ms-"; export const MOZ = "-moz-"; export const WEBKIT = "-webkit-"; export const COMMENT = "comm"; export const RULESET = "rule"; export const DECLARATION = "decl"; export const PAGE = "@page"; export const MEDIA = "@media"; export const IMPORT = "@import"; export const CHARSET = "@charset"; export const VIEWPORT = "@viewport"; export const SUPPORTS = "@supports"; export const DOCUMENT = "@document"; export const NAMESPACE = "@namespace"; export const KEYFRAMES = "@keyframes"; export const FONT_FACE = "@font-face"; export const COUNTER_STYLE = "@counter-style"; export const FONT_FEATURE_VALUES = "@font-feature-values"; export const LAYER = "@layer"; export const SCOPE = "@scope"; // Utility.js export function hash(value: string, length: number): number; export function trim(value: string): string; export function match(value: string, pattern: RegExp): string | null; export function replace(value: string, pattern: string | RegExp, replacement: string): string; export function indexof(value: string, search: unknown): number; export function charat(value: string, index: number): number; export function substr(value: string, begin: number, end: number): string; export function strlen(value: string): number; export function sizeof(value: unknown[]): number; export function append(value: T, array: T[]): T; export function combine(array: string[], callback: ArrayMapCallback): string; export function abs(x: number): number; export function from(...codes: number[]): string; // Parser.js export function compile(value: string): Element[]; export function parse( value: string, root: Element, parent: Element | null, rule: Element | string[], rules: string[], rulesets: Element[], pseudo: number, points: number[], declarations: string[], ): Element[]; export function ruleset( value: string, root: Element, parent: Element | null, index: number, offset: number, rules: string[], points: number[], type: string, props: string[], children: Element[], length: number, ): Element; export function comment(value: string, root: Element, parent: Element | null): Element; export function declaration(value: string, root: Element, parent: Element | null, length: number): Element; // Prefixer.js export function prefix(value: string, length: number): string; // Tokenizer.js export let line: number; export let column: number; export let length: number; export let position: number; export let character: number; export let characters: string; export function node( value: string, root: Element, parent: Element | null, type: string, props: string[], children: Element[], length: number, ): Element; export function copy(root: Element, props: Partial): Element; export function char(): number; export function next(): number; export function peek(): number; export function caret(): number; export function slice(begin: number, end: number): string; export function token(type: number): number; export function alloc(value: string): unknown[]; export function dealloc(value: T[]): T[]; export function delimit(type: number): string; export function tokenize(value: string): string[]; export function whitespace(type: number): string; export function tokenizer(children: string[]): string[]; export function delimiter(type: number): number; export function commenter(type: number, index: number): string; export function identifier(index: number): string; // Serializer.js export function serialize(children: Element[], callback: Middleware): string; // @type {Middleware} export function stringify(element: Element, index: number, children: Element[], callback: Middleware): string; // Middleware.js export function middleware(collection: Middleware[]): Middleware; export function rulesheet(callback: (ret: string) => void): Middleware; // @type {Middleware} // eslint-disable-next-line @typescript-eslint/no-invalid-void-type export function prefixer(element: Element, index: number, children: Element[], callback: Middleware): string | void; // @type {Middleware} // eslint-disable-next-line @typescript-eslint/no-invalid-void-type export function namespace(element: Element): string | void; stylis/package.json000644 001751 000177 0000001222 14723427167016412 0ustar00runner000000 000000 1472342716714723427167{ "name": "@types/stylis", "version": "4.2.7", "description": "TypeScript definitions for stylis", "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/stylis", "license": "MIT", "contributors": [], "main": "", "types": "index.d.ts", "repository": { "type": "git", "url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git", "directory": "types/stylis" }, "scripts": {}, "dependencies": {}, "peerDependencies": {}, "typesPublisherContentHash": "7dd80b9975bf4e02604bc0b75e857923de66aa29341d29d19d2aca35a12e89a0", "typeScriptVersion": "5.0" }