@stacksjs/ts-css 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,14 @@
1
+ import type { CssNode } from '../parse';
2
+ export declare function minify(source: string, options?: MinifyOptions): MinifyResult;
3
+ export declare function minifyBlock(source: string, options?: MinifyOptions): MinifyResult;
4
+ export declare interface MinifyOptions {
5
+ comments?: boolean | 'exclamation' | 'first-exclamation'
6
+ floatPrecision?: number | null
7
+ restructure?: boolean
8
+ forceMediaMerge?: boolean
9
+ usage?: { tags?: string[], ids?: string[], classes?: string[], force?: boolean } | null
10
+ }
11
+ export declare interface MinifyResult {
12
+ css: string
13
+ ast: CssNode
14
+ }
@@ -0,0 +1,5 @@
1
+ import type { CssNode } from '../parse';
2
+ import type { Selector as WhatSelector } from '../what';
3
+ export declare function specificity(input: CssNode | WhatSelector[][] | WhatSelector[] | string): Specificity;
4
+ export declare function specificityToString(s: Specificity): string;
5
+ export type Specificity = [number, number, number];
@@ -0,0 +1,2 @@
1
+ import type { CssNode } from './types';
2
+ export declare function clone<T extends CssNode>(node: T): T;
@@ -0,0 +1,2 @@
1
+ import type { CssNode } from './types';
2
+ export declare function generate(node: CssNode): string;
@@ -0,0 +1,58 @@
1
+ export type { ListItem } from './list';
2
+ export type { Token } from './tokenizer';
3
+ export type {
4
+ Atrule,
5
+ AtrulePrelude,
6
+ AttributeSelector,
7
+ Block,
8
+ ClassSelector,
9
+ Combinator,
10
+ CommentNode,
11
+ CssLocation,
12
+ CssNode,
13
+ CssNodeType,
14
+ Declaration,
15
+ DeclarationList,
16
+ DimensionNode,
17
+ FunctionNode,
18
+ HashNode,
19
+ Identifier,
20
+ IdSelector,
21
+ MediaFeatureNode,
22
+ MediaQueryListNode,
23
+ MediaQueryNode,
24
+ NestingSelector,
25
+ NthNode,
26
+ NumberNode,
27
+ OperatorNode,
28
+ ParenthesesNode,
29
+ ParseContext,
30
+ ParseOptions,
31
+ PercentageNode,
32
+ PseudoClassSelector,
33
+ PseudoElementSelector,
34
+ RatioNode,
35
+ Raw,
36
+ RawNode,
37
+ Rule,
38
+ Selector,
39
+ SelectorList,
40
+ StringNode,
41
+ StyleSheet,
42
+ TypeSelector,
43
+ UnicodeRangeNode,
44
+ UrlNode,
45
+ Value,
46
+ WhiteSpaceNode,
47
+ } from './types';
48
+ export type { WalkContext, WalkVisitor } from './walker';
49
+ /**
50
+ * Public surface for the CSS parser/generator/walker. Drop-in compatible
51
+ * with css-tree v3 for the API surface used by csso/SVGO.
52
+ */
53
+ export { clone } from './clone';
54
+ export { generate } from './generator';
55
+ export { CssList as List, makeList } from './list';
56
+ export { parse, TokenType } from './parser';
57
+ export { decodeName, Tokenizer } from './tokenizer';
58
+ export { walk } from './walker';